add repeat to packet; release 0.5
This commit is contained in:
parent
3b62cd55ad
commit
26ff0e7844
|
@ -1,3 +1,6 @@
|
|||
v0.5, 3 Apr 2013
|
||||
Add repeat.
|
||||
|
||||
v0.4, 24 Dec 2012
|
||||
Add set_payload.
|
||||
|
||||
|
|
2058
netfilterqueue.c
2058
netfilterqueue.c
File diff suppressed because it is too large
Load Diff
|
@ -183,6 +183,7 @@ cdef class Packet:
|
|||
cpdef set_mark(self, u_int32_t mark)
|
||||
cpdef accept(self)
|
||||
cpdef drop(self)
|
||||
cpdef repeat(self)
|
||||
|
||||
cdef class NetfilterQueue:
|
||||
cdef object user_callback # User callback
|
||||
|
|
|
@ -5,7 +5,7 @@ function.
|
|||
Copyright: (c) 2011, Kerkhoff Technologies Inc.
|
||||
License: MIT; see LICENSE.txt
|
||||
"""
|
||||
VERSION = (0, 4, 0)
|
||||
VERSION = (0, 5, 0)
|
||||
|
||||
# Constants for module users
|
||||
COPY_NONE = 1
|
||||
|
@ -73,8 +73,7 @@ cdef class Packet:
|
|||
modified_payload_len = len(self._given_payload)
|
||||
modified_payload = self._given_payload
|
||||
if self._mark_is_set:
|
||||
nfq_set_verdict_mark( # TODO: make this use nfq_set_verdict2 if
|
||||
# available on system
|
||||
nfq_set_verdict_mark(
|
||||
self._qh,
|
||||
self.id,
|
||||
verdict,
|
||||
|
@ -119,6 +118,10 @@ cdef class Packet:
|
|||
"""Drop the packet."""
|
||||
self.verdict(NF_DROP)
|
||||
|
||||
cpdef repeat(self):
|
||||
"""Repeat the packet."""
|
||||
self.verdict(NF_REPEAT)
|
||||
|
||||
cdef class NetfilterQueue:
|
||||
"""Handle a single numbered queue."""
|
||||
def __cinit__(self, *args, **kwargs):
|
||||
|
|
Loading…
Reference in New Issue