Versions in this module Expand all Collapse all v2 v2.0.0 May 11, 2024 Changes in this version + const NfAccept + const NfDrop + const NfQaCfgFlagConntrack + const NfQaCfgFlagFailOpen + const NfQaCfgFlagGSO + const NfQaCfgFlagSecCx + const NfQaCfgFlagUIDGid + const NfQeueue + const NfQnlCopyMeta + const NfQnlCopyNone + const NfQnlCopyPacket + const NfRepeat + const NfStolen + var ErrInvFlag = errors.New("invalid Flag") + var ErrInvalidVerdict = errors.New("invalid verdict") + var ErrNotLinux = errors.New("not implemented for OS other than linux") + var ErrRecvMsg = errors.New("received error message") + var ErrUnexpMsg = errors.New("received unexpected message from kernel") + type Attribute struct + CapLen *uint32 + Ct *[]byte + CtInfo *uint32 + Exp *[]byte + GID *uint32 + Hook *uint8 + HwAddr *[]byte + HwProtocol *uint16 + InDev *uint32 + L2Hdr *[]byte + Mark *uint32 + OutDev *uint32 + PacketID *uint32 + Payload *[]byte + PhysInDev *uint32 + PhysOutDev *uint32 + SecCtx *string + SkbInfo *[]byte + SkbPrio *uint32 + Timestamp *time.Time + UID *uint32 + type Config struct + AfFamily uint8 + Copymode uint8 + Flags uint32 + Logger Logger + MaxPacketLen uint32 + MaxQueueLen uint32 + NetNS int + NfQueue uint16 + ReadTimeout time.Duration + WriteTimeout time.Duration + type ErrorFunc func(e error) int + type HookFunc func(a Attribute) int + type Logger interface + Debugf func(format string, args ...interface{}) + Errorf func(format string, args ...interface{}) + type Nfqueue struct + Con *netlink.Conn + func Open(config *Config) (*Nfqueue, error) + func (nfqueue *Nfqueue) Close() error + func (nfqueue *Nfqueue) Register(ctx context.Context, fn HookFunc) error + func (nfqueue *Nfqueue) RegisterWithErrorFunc(ctx context.Context, fn HookFunc, errfn ErrorFunc) error + func (nfqueue *Nfqueue) SetOption(o netlink.ConnOption, enable bool) error + func (nfqueue *Nfqueue) SetVerdict(id uint32, verdict int) error + func (nfqueue *Nfqueue) SetVerdictBatch(id uint32, verdict int) error + func (nfqueue *Nfqueue) SetVerdictModPacket(id uint32, verdict int, packet []byte) error + func (nfqueue *Nfqueue) SetVerdictModPacketWithConnMark(id uint32, verdict, mark int, packet []byte) error + func (nfqueue *Nfqueue) SetVerdictModPacketWithMark(id uint32, verdict, mark int, packet []byte) error + func (nfqueue *Nfqueue) SetVerdictWithConnMark(id uint32, verdict, mark int) error + func (nfqueue *Nfqueue) SetVerdictWithMark(id uint32, verdict, mark int) error Other modules containing this package github.com/florianl/go-nfqueue