Files
Mellaris/io/nfqueue_stub.go
T
hayzam 7a3f6e945d Improves flow handling and adds runtime stats APIs
Refactors TCP and UDP flow managers to enhance analyzer selection and flow binding accuracy, including O(1) UDP stream rebinding by 5-tuple.
Introduces runtime stats tracking for engine and ruleset operations, exposing new APIs for granular performance and error metrics.
Optimizes GeoMatcher with result caching and supports efficient geosite set matching, reducing redundant computation in ruleset expressions.
2026-05-13 06:10:38 +05:30

44 lines
921 B
Go

//go:build !linux
// +build !linux
package io
import (
"context"
"errors"
"net"
)
var errNFQueueUnsupported = errors.New("nfqueue packet io is only supported on linux")
type NFQueuePacketIOConfig struct {
QueueSize uint32
ReadBuffer int
WriteBuffer int
Local bool
RST bool
NumQueues int
MaxPacketLen uint32
}
func NewNFQueuePacketIO(config NFQueuePacketIOConfig) (PacketIO, error) {
_ = config
return nil, errNFQueueUnsupported
}
func (*unsupportedPacketIO) Register(context.Context, PacketCallback) error {
return errNFQueueUnsupported
}
func (*unsupportedPacketIO) SetVerdict(Packet, Verdict, []byte) error {
return errNFQueueUnsupported
}
func (*unsupportedPacketIO) ProtectedDialContext(context.Context, string, string) (net.Conn, error) {
return nil, errNFQueueUnsupported
}
func (*unsupportedPacketIO) Close() error { return nil }
type unsupportedPacketIO struct{}