Add simple example script from existing documentation. Regenerate netfilterqueue.c with Cython 0.25.2.
This commit is contained in:
parent
2758696f6d
commit
a4b3a44b08
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env python
|
||||
from netfilterqueue import NetfilterQueue
|
||||
|
||||
def print_and_accept(pkt):
|
||||
print(pkt)
|
||||
pkt.accept()
|
||||
|
||||
nfqueue = NetfilterQueue()
|
||||
nfqueue.bind(1, print_and_accept)
|
||||
try:
|
||||
nfqueue.run()
|
||||
except KeyboardInterrupt:
|
||||
print('')
|
||||
|
||||
nfqueue.unbind()
|
2695
netfilterqueue.c
2695
netfilterqueue.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue