Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chifflier/nfqueue-go
/ functions
Functions
26 in github.com/chifflier/nfqueue-go
⨍
Functions
26
◇
Types & classes
3
↓ 3 callers
Method
Close
()
nfqueue/nfqueue.go:166
↓ 2 callers
Method
Bind
Bind binds a Queue to a given protocol family. Usually, the family is syscall.AF_INET for IPv4, and syscall.AF_INET6 for IPv6
nfqueue/nfqueue.go:178
↓ 2 callers
Method
CreateQueue
Create a new queue handle The queue must be initialized (using Init) and bound (using Bind), and a callback function must be set (using SetCallback).
nfqueue/nfqueue.go:211
↓ 2 callers
Method
DestroyQueue
Destroy a queue handle This also unbind from the nfqueue handler, so you don't have to call Unbind() Note that errors from this function can usually
nfqueue/nfqueue.go:233
↓ 2 callers
Method
Init
Init creates a netfilter queue which can be used to receive packets from the kernel.
nfqueue/nfqueue.go:149
↓ 2 callers
Method
Loop
Main loop: Loop starts a loop, receiving kernel events and processing packets using the callback function.
nfqueue/nfqueue.go:275
↓ 2 callers
Method
SetCallback
SetCallback sets the callback function, fired when a packet is received.
nfqueue/nfqueue.go:161
↓ 2 callers
Method
SetVerdict
SetVerdict issues a verdict for a packet. Every queued packet _must_ have a verdict specified by userspace.
nfqueue/nfqueue.go:335
↓ 2 callers
Method
StopLoop
()
nfqueue/nfqueue.go:294
↓ 2 callers
Method
Unbind
Unbind a queue from the given protocol family. Note that errors from this function can usually be ignored.
nfqueue/nfqueue.go:194
↓ 1 callers
Method
GetInDev
Returns the interface that the packet was received through
nfqueue/nfqueue.go:363
↓ 1 callers
Method
GetNFMark
Returns the packet mark
nfqueue/nfqueue.go:358
↓ 1 callers
Method
GetOutDev
Returns the interface that the packet will be routed out
nfqueue/nfqueue.go:368
↓ 1 callers
Method
GetPhysInDev
Returns the physical interface that the packet was received through
nfqueue/nfqueue.go:373
↓ 1 callers
Method
GetPhysOutDev
Returns the physical interface that the packet will be routed out
nfqueue/nfqueue.go:378
↓ 1 callers
Method
SetMode
SetMode sets the amount of packet data that nfqueue copies to userspace Default mode is NFQNL_COPY_PACKET
nfqueue/nfqueue.go:250
↓ 1 callers
Function
build_payload
(c_qh *C.struct_nfq_q_handle, ptr_nfad *unsafe.Pointer)
nfqueue/nfqueue.go:310
Function
GoCallbackWrapper
* Cast argument to Queue* before calling the real callback Notes: - export cannot be done in the same file (nfqueue.go) else it fails to build
nfqueue/nfq_cb.go:29
Method
SetQueueMaxLen
SetQueueMaxLen fixes the number of packets the kernel will store before internally before dropping upcoming packets
nfqueue/nfqueue.go:262
Method
SetVerdictMark
SetVerdictMark issues a verdict for a packet, but a mark can be set Every queued packet _must_ have a verdict specified by userspace.
nfqueue/libnfqueue1.go:24
Method
SetVerdictMarkModified
SetVerdictMarkModified issues a verdict for a packet, but replaces the packet with the provided one, and a mark can be set. Every queued packet _must
nfqueue/libnfqueue1.go:39
Method
SetVerdictModified
SetVerdictModified issues a verdict for a packet, but replaces the packet with the provided one. Every queued packet _must_ have a verdict specified
nfqueue/nfqueue.go:345
Function
main
()
nfqueue/test_nfqueue/test_nfqueue.go:24
Function
main
()
nfqueue/test_nfqueue_gopacket/test_nfqueue.go:38
Function
real_callback
(payload *nfqueue.Payload)
nfqueue/test_nfqueue/test_nfqueue.go:12
Function
real_callback
(payload *nfqueue.Payload)
nfqueue/test_nfqueue_gopacket/test_nfqueue.go:15