Add simple example script from existing documentation. Regenerate netfilterqueue.c with Cython 0.25.2.

This commit is contained in:
Matt Fox 2016-12-15 01:26:35 -08:00
parent 2758696f6d
commit a4b3a44b08
2 changed files with 1607 additions and 1103 deletions

15
examples/print_and_accept.py Executable file
View File

@ -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()

File diff suppressed because it is too large Load Diff