diff --git a/netfilterqueue.c b/netfilterqueue.c index 010283a..693bb31 100644 --- a/netfilterqueue.c +++ b/netfilterqueue.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.24.1 */ +/* Generated by Cython 0.23.4 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -7,10 +7,10 @@ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) #error Cython requires Python 2.6+ or Python 3.2+. #else -#define CYTHON_ABI "0_24_1" +#define CYTHON_ABI "0_23_4" #include #ifndef offsetof - #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall @@ -36,23 +36,17 @@ #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION - #define CYTHON_COMPILING_IN_PYPY 1 - #define CYTHON_COMPILING_IN_CPYTHON 0 +#define CYTHON_COMPILING_IN_PYPY 1 +#define CYTHON_COMPILING_IN_CPYTHON 0 #else - #define CYTHON_COMPILING_IN_PYPY 0 - #define CYTHON_COMPILING_IN_CPYTHON 1 +#define CYTHON_COMPILING_IN_PYPY 0 +#define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000 - #define CYTHON_USE_PYLONG_INTERNALS 1 -#endif -#if CYTHON_USE_PYLONG_INTERNALS - #include "longintrepr.h" - #undef SHIFT - #undef BASE - #undef MASK +#define CYTHON_USE_PYLONG_INTERNALS 1 #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) - #define Py_OptimizeFlag 0 +#define Py_OptimizeFlag 0 #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" @@ -88,7 +82,6 @@ #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) @@ -97,7 +90,6 @@ #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) @@ -110,17 +102,6 @@ #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif -#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check) - #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) -#endif -#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) - #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) -#endif -#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) - #define PyObject_Malloc(s) PyMem_Malloc(s) - #define PyObject_Free(p) PyMem_Free(p) - #define PyObject_Realloc(p) PyMem_Realloc(p) -#endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 @@ -128,9 +109,6 @@ #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif -#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) - #define PyObject_ASCII(o) PyObject_Repr(o) -#endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject @@ -238,18 +216,8 @@ static CYTHON_INLINE float __PYX_NAN() { return value; } #endif -#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) -#define __Pyx_truncl trunc -#else -#define __Pyx_truncl truncl -#endif -#define __PYX_ERR(f_index, lineno, Ln_error) \ -{ \ - __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ -} - #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) @@ -306,7 +274,7 @@ static CYTHON_INLINE float __PYX_NAN() { # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif -typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; +typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 @@ -380,7 +348,7 @@ static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); -static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_COMPILING_IN_CPYTHON @@ -389,12 +357,6 @@ static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) -#if PY_MAJOR_VERSION >= 3 -#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) -#else -#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) -#endif -#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { @@ -485,7 +447,6 @@ static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; -static PyObject *__pyx_empty_unicode; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; @@ -610,6 +571,7 @@ struct __pyx_obj_14netfilterqueue_Packet { struct nfq_q_handle *_qh; struct nfq_data *_nfa; struct nfqnl_msg_packet_hdr *_hdr; + struct nfqnl_msg_packet_hw *_hw; int _verdict_is_set; int _mark_is_set; u_int32_t _given_mark; @@ -621,10 +583,11 @@ struct __pyx_obj_14netfilterqueue_Packet { Py_ssize_t payload_len; char *payload; struct timeval timestamp; + u_int8_t hw_addr[8]; }; -/* "netfilterqueue.pxd":208 +/* "netfilterqueue.pxd":211 * cpdef repeat(self) * * cdef class NetfilterQueue: # <<<<<<<<<<<<<< @@ -665,7 +628,6 @@ struct __pyx_vtabstruct_14netfilterqueue_Packet { static struct __pyx_vtabstruct_14netfilterqueue_Packet *__pyx_vtabptr_14netfilterqueue_Packet; /* --- Runtime support code (head) --- */ -/* Refnanny.proto */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif @@ -728,7 +690,6 @@ static struct __pyx_vtabstruct_14netfilterqueue_Packet *__pyx_vtabptr_14netfilte #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) -/* PyObjectGetAttrStr.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); @@ -744,121 +705,64 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif -/* GetBuiltinName.proto */ static PyObject *__Pyx_GetBuiltinName(PyObject *name); -/* ForceInitThreads.proto */ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif -/* PyObjectCall.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif -/* PyObjectCallMethO.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif -/* PyObjectCallOneArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); -/* PyThreadStateGet.proto */ -#if CYTHON_COMPILING_IN_CPYTHON -#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; -#define __Pyx_PyThreadState_assign __pyx_tstate = PyThreadState_GET(); -#else -#define __Pyx_PyThreadState_declare -#define __Pyx_PyThreadState_assign -#endif +static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); -/* PyErrFetchRestore.proto */ -#if CYTHON_COMPILING_IN_CPYTHON -#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) -#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) -#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) -#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) -static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); -static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); -#else -#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) -#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) -#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) -#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) -#endif - -/* WriteUnraisableException.proto */ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil); -/* RaiseArgTupleInvalid.proto */ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); -/* KeywordStringCheck.proto */ static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); -/* GetModuleGlobalName.proto */ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); -/* RaiseException.proto */ +#include + static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); -/* PyObjectCallNoArg.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); #else #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) #endif -/* ArgTypeTest.proto */ static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); -/* dict_getitem_default.proto */ static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); -/* RaiseDoubleKeywords.proto */ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); -/* ParseKeywords.proto */ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ const char* function_name); -/* SaveResetException.proto */ -#if CYTHON_COMPILING_IN_CPYTHON -#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) -static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); -#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) -static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); -#else -#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) -#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) -#endif +static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); +static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); -/* PyErrExceptionMatches.proto */ -#if CYTHON_COMPILING_IN_CPYTHON -#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) -static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); -#else -#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) -#endif - -/* GetException.proto */ -#if CYTHON_COMPILING_IN_CPYTHON -#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) -static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); -#else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); -#endif -/* GetItemInt.proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ @@ -880,16 +784,13 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); -/* SetVTable.proto */ static int __Pyx_SetVtable(PyObject *dict, void *vtable); -/* Import.proto */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); -/* CodeObjectCache.proto */ typedef struct { - PyCodeObject* code_object; int code_line; + PyCodeObject* code_object; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; @@ -901,47 +802,33 @@ static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int co static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); -/* AddTraceback.proto */ static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_u_int8_t(u_int8_t value); - -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_u_int32_t(u_int32_t value); - -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_u_int16_t(u_int16_t value); - -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); - -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value); - -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); - -/* CIntFromPy.proto */ static CYTHON_INLINE u_int32_t __Pyx_PyInt_As_u_int32_t(PyObject *); -/* CIntFromPy.proto */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); -/* CIntFromPy.proto */ static CYTHON_INLINE u_int8_t __Pyx_PyInt_As_u_int8_t(PyObject *); -/* CIntFromPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_u_int8_t(u_int8_t value); + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_u_int32_t(u_int32_t value); + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_u_int16_t(u_int16_t value); + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); + static CYTHON_INLINE u_int16_t __Pyx_PyInt_As_u_int16_t(PyObject *); -/* CIntFromPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value); + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); + static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); -/* CheckBinaryVersion.proto */ static int __Pyx_check_binary_version(void); -/* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); static PyObject *__pyx_f_14netfilterqueue_6Packet_set_nfq_data(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self, struct nfq_q_handle *__pyx_v_qh, struct nfq_data *__pyx_v_nfa); /* proto*/ @@ -969,191 +856,191 @@ int __pyx_module_is_main_netfilterqueue = 0; /* Implementation of 'netfilterqueue' */ static PyObject *__pyx_builtin_OSError; static PyObject *__pyx_builtin_RuntimeWarning; -static const char __pyx_k_AH[] = "AH"; -static const char __pyx_k_FC[] = "FC"; -static const char __pyx_k_IL[] = "IL"; -static const char __pyx_k_IP[] = "IP"; -static const char __pyx_k_SM[] = "SM"; -static const char __pyx_k_ST[] = "ST"; -static const char __pyx_k_TP[] = "TP++"; -static const char __pyx_k_af[] = "af"; -static const char __pyx_k_3PC[] = "3PC"; -static const char __pyx_k_A_N[] = "A/N"; -static const char __pyx_k_BNA[] = "BNA"; -static const char __pyx_k_CBT[] = "CBT"; -static const char __pyx_k_DDP[] = "DDP"; -static const char __pyx_k_DDX[] = "DDX"; -static const char __pyx_k_DGP[] = "DGP"; -static const char __pyx_k_DSR[] = "DSR"; -static const char __pyx_k_EGP[] = "EGP"; -static const char __pyx_k_ESP[] = "ESP"; -static const char __pyx_k_GGP[] = "GGP"; -static const char __pyx_k_GRE[] = "GRE"; -static const char __pyx_k_HIP[] = "HIP"; -static const char __pyx_k_HMP[] = "HMP"; -static const char __pyx_k_IGP[] = "IGP"; -static const char __pyx_k_MTP[] = "MTP"; -static const char __pyx_k_MUX[] = "MUX"; -static const char __pyx_k_PGM[] = "PGM"; -static const char __pyx_k_PIM[] = "PIM"; -static const char __pyx_k_PRM[] = "PRM"; -static const char __pyx_k_PTP[] = "PTP"; -static const char __pyx_k_PUP[] = "PUP"; -static const char __pyx_k_PVP[] = "PVP"; -static const char __pyx_k_QNX[] = "QNX"; -static const char __pyx_k_RDP[] = "RDP"; -static const char __pyx_k_RVD[] = "RVD"; -static const char __pyx_k_SMP[] = "SMP"; -static const char __pyx_k_SNP[] = "SNP"; -static const char __pyx_k_SPS[] = "SPS"; -static const char __pyx_k_SRP[] = "SRP"; -static const char __pyx_k_STP[] = "STP"; -static const char __pyx_k_TCF[] = "TCF"; -static const char __pyx_k_TCP[] = "TCP"; -static const char __pyx_k_TTP[] = "TTP"; -static const char __pyx_k_UDP[] = "UDP"; -static const char __pyx_k_UTI[] = "UTI"; -static const char __pyx_k_WSN[] = "WSN"; -static const char __pyx_k_XTP[] = "XTP"; -static const char __pyx_k_get[] = "get"; -static const char __pyx_k_ARIS[] = "ARIS"; -static const char __pyx_k_CFTP[] = "CFTP"; -static const char __pyx_k_CPHB[] = "CPHB"; -static const char __pyx_k_CPNX[] = "CPNX"; -static const char __pyx_k_CRTP[] = "CRTP"; -static const char __pyx_k_DCCP[] = "DCCP"; -static const char __pyx_k_FIRE[] = "FIRE"; -static const char __pyx_k_GMTP[] = "GMTP"; -static const char __pyx_k_IATP[] = "IATP"; -static const char __pyx_k_ICMP[] = "ICMP"; -static const char __pyx_k_IDPR[] = "IDPR"; -static const char __pyx_k_IDRP[] = "IDRP"; -static const char __pyx_k_IFMP[] = "IFMP"; -static const char __pyx_k_IGMP[] = "IGMP"; -static const char __pyx_k_IPCV[] = "IPCV"; -static const char __pyx_k_IPIP[] = "IPIP"; -static const char __pyx_k_IPLT[] = "IPLT"; -static const char __pyx_k_IPPC[] = "IPPC"; -static const char __pyx_k_IPv6[] = "IPv6"; -static const char __pyx_k_IRTP[] = "IRTP"; -static const char __pyx_k_ISIS[] = "ISIS"; -static const char __pyx_k_L2TP[] = "L2TP"; -static const char __pyx_k_LARP[] = "LARP"; -static const char __pyx_k_MICP[] = "MICP"; -static const char __pyx_k_NARP[] = "NARP"; -static const char __pyx_k_PIPE[] = "PIPE"; -static const char __pyx_k_PNNI[] = "PNNI"; -static const char __pyx_k_RSVP[] = "RSVP"; -static const char __pyx_k_SCPS[] = "SCPS"; -static const char __pyx_k_SCTP[] = "SCTP"; -static const char __pyx_k_SDRP[] = "SDRP"; -static const char __pyx_k_SKIP[] = "SKIP"; -static const char __pyx_k_TLSP[] = "TLSP"; -static const char __pyx_k_VISA[] = "VISA"; -static const char __pyx_k_VMTP[] = "VMTP"; -static const char __pyx_k_VRRP[] = "VRRP"; -static const char __pyx_k_XNET[] = "XNET"; -static const char __pyx_k_args[] = "args"; -static const char __pyx_k_drop[] = "drop"; -static const char __pyx_k_main[] = "__main__"; -static const char __pyx_k_mode[] = "mode"; -static const char __pyx_k_recv[] = "recv"; -static const char __pyx_k_test[] = "__test__"; -static const char __pyx_k_ARGUS[] = "ARGUS"; -static const char __pyx_k_AX_25[] = "AX.25"; -static const char __pyx_k_CHAOS[] = "CHAOS"; -static const char __pyx_k_CRUDP[] = "CRUDP"; -static const char __pyx_k_EIGRP[] = "EIGRP"; -static const char __pyx_k_EMCON[] = "EMCON"; -static const char __pyx_k_ENCAP[] = "ENCAP"; -static const char __pyx_k_SWIPE[] = "SWIPE"; -static const char __pyx_k_Shim6[] = "Shim6"; -static const char __pyx_k_VINES[] = "VINES"; -static const char __pyx_k_block[] = "block"; -static const char __pyx_k_error[] = "error"; -static const char __pyx_k_manet[] = "manet"; -static const char __pyx_k_range[] = "range"; -static const char __pyx_k_HOPOPT[] = "HOPOPT"; -static const char __pyx_k_IPComp[] = "IPComp"; -static const char __pyx_k_ISO_IP[] = "ISO-IP"; -static const char __pyx_k_I_NLSP[] = "I-NLSP"; -static const char __pyx_k_LEAF_1[] = "LEAF-1"; -static const char __pyx_k_LEAF_2[] = "LEAF-2"; -static const char __pyx_k_MOBILE[] = "MOBILE"; -static const char __pyx_k_NETBLT[] = "NETBLT"; -static const char __pyx_k_NVP_II[] = "NVP-II"; -static const char __pyx_k_SCC_SP[] = "SCC-SP"; -static const char __pyx_k_SUN_ND[] = "SUN-ND"; -static const char __pyx_k_WB_MON[] = "WB-MON"; -static const char __pyx_k_accept[] = "accept"; -static const char __pyx_k_get_fd[] = "get_fd"; -static const char __pyx_k_import[] = "__import__"; -static const char __pyx_k_repeat[] = "repeat"; -static const char __pyx_k_socket[] = "socket"; -static const char __pyx_k_ETHERIP[] = "ETHERIP"; -static const char __pyx_k_ISO_TP4[] = "ISO-TP4"; -static const char __pyx_k_MFE_NSP[] = "MFE-NSP"; -static const char __pyx_k_OSError[] = "OSError"; -static const char __pyx_k_OSPFIGP[] = "OSPFIGP"; -static const char __pyx_k_SAT_MON[] = "SAT-MON"; -static const char __pyx_k_TRUNK_1[] = "TRUNK-1"; -static const char __pyx_k_TRUNK_2[] = "TRUNK-2"; -static const char __pyx_k_UDPLite[] = "UDPLite"; -static const char __pyx_k_VERSION[] = "VERSION"; -static const char __pyx_k_XNS_IDP[] = "XNS-IDP"; -static const char __pyx_k_max_len[] = "max_len"; -static const char __pyx_k_DCN_MEAS[] = "DCN-MEAS"; -static const char __pyx_k_Mobility[] = "Mobility"; -static const char __pyx_k_Reserved[] = "Reserved"; -static const char __pyx_k_SSCOPMCE[] = "SSCOPMCE"; -static const char __pyx_k_WB_EXPAK[] = "WB-EXPAK"; -static const char __pyx_k_get_mark[] = "get_mark"; -static const char __pyx_k_set_mark[] = "set_mark"; -static const char __pyx_k_sock_len[] = "sock_len"; -static const char __pyx_k_COPY_META[] = "COPY_META"; -static const char __pyx_k_COPY_NONE[] = "COPY_NONE"; -static const char __pyx_k_IDPR_CMTP[] = "IDPR-CMTP"; -static const char __pyx_k_IPX_in_IP[] = "IPX-in-IP"; -static const char __pyx_k_IPv6_Frag[] = "IPv6-Frag"; -static const char __pyx_k_IPv6_ICMP[] = "IPv6-ICMP"; -static const char __pyx_k_IPv6_Opts[] = "IPv6-Opts"; -static const char __pyx_k_KRYPTOLAN[] = "KRYPTOLAN"; -static const char __pyx_k_MERIT_INP[] = "MERIT-INP"; -static const char __pyx_k_PROTOCOLS[] = "PROTOCOLS"; -static const char __pyx_k_SAT_EXPAK[] = "SAT-EXPAK"; -static const char __pyx_k_queue_num[] = "queue_num"; -static const char __pyx_k_BR_SAT_MON[] = "BR-SAT-MON"; -static const char __pyx_k_IPv6_NoNxt[] = "IPv6-NoNxt"; -static const char __pyx_k_IPv6_Route[] = "IPv6-Route"; -static const char __pyx_k_MPLS_in_IP[] = "MPLS-in-IP"; -static const char __pyx_k_NSFNET_IGP[] = "NSFNET-IGP"; -static const char __pyx_k_Sprite_RPC[] = "Sprite-RPC"; -static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; -static const char __pyx_k_BBN_RCC_MON[] = "BBN-RCC-MON"; -static const char __pyx_k_COPY_PACKET[] = "COPY_PACKET"; -static const char __pyx_k_Compaq_Peer[] = "Compaq-Peer"; -static const char __pyx_k_SECURE_VMTP[] = "SECURE-VMTP"; -static const char __pyx_k_set_payload[] = "set_payload"; -static const char __pyx_k_get_timestamp[] = "get_timestamp"; -static const char __pyx_k_user_callback[] = "user_callback"; -static const char __pyx_k_RuntimeWarning[] = "RuntimeWarning"; -static const char __pyx_k_RSVP_E2E_IGNORE[] = "RSVP-E2E-IGNORE"; -static const char __pyx_k_get_payload_len[] = "get_payload_len"; -static const char __pyx_k_Unknown_protocol[] = "Unknown protocol"; -static const char __pyx_k_s_packet_s_bytes[] = "%s packet, %s bytes"; -static const char __pyx_k_any_local_network[] = "any local network"; -static const char __pyx_k_any_0_hop_protocol[] = "any 0-hop protocol"; -static const char __pyx_k_Failed_to_open_NFQueue[] = "Failed to open NFQueue."; -static const char __pyx_k_Failed_to_create_queue_s[] = "Failed to create queue %s."; -static const char __pyx_k_any_host_internal_protocol[] = "any host internal protocol"; -static const char __pyx_k_any_distributed_file_system[] = "any distributed file system"; -static const char __pyx_k_any_private_encryption_scheme[] = "any private encryption scheme"; -static const char __pyx_k_Failed_to_set_packet_copy_mode[] = "Failed to set packet copy mode."; -static const char __pyx_k_Bind_to_a_Linux_netfilter_queue[] = "\nBind to a Linux netfilter queue. Send packets to a user-specified callback\nfunction.\n\nCopyright: (c) 2011, Kerkhoff Technologies Inc.\nLicense: MIT; see LICENSE.txt\n"; -static const char __pyx_k_Failed_to_bind_family_s_Are_you[] = "Failed to bind family %s. Are you root?"; -static const char __pyx_k_Failed_to_get_payload_of_packet[] = "Failed to get payload of packet."; -static const char __pyx_k_Socket_rcvbuf_limit_is_now_d_req[] = "Socket rcvbuf limit is now %d, requested %d."; -static const char __pyx_k_Verdict_already_given_for_this_p[] = "Verdict already given for this packet."; +static char __pyx_k_AH[] = "AH"; +static char __pyx_k_FC[] = "FC"; +static char __pyx_k_IL[] = "IL"; +static char __pyx_k_IP[] = "IP"; +static char __pyx_k_SM[] = "SM"; +static char __pyx_k_ST[] = "ST"; +static char __pyx_k_TP[] = "TP++"; +static char __pyx_k_af[] = "af"; +static char __pyx_k_3PC[] = "3PC"; +static char __pyx_k_A_N[] = "A/N"; +static char __pyx_k_BNA[] = "BNA"; +static char __pyx_k_CBT[] = "CBT"; +static char __pyx_k_DDP[] = "DDP"; +static char __pyx_k_DDX[] = "DDX"; +static char __pyx_k_DGP[] = "DGP"; +static char __pyx_k_DSR[] = "DSR"; +static char __pyx_k_EGP[] = "EGP"; +static char __pyx_k_ESP[] = "ESP"; +static char __pyx_k_GGP[] = "GGP"; +static char __pyx_k_GRE[] = "GRE"; +static char __pyx_k_HIP[] = "HIP"; +static char __pyx_k_HMP[] = "HMP"; +static char __pyx_k_IGP[] = "IGP"; +static char __pyx_k_MTP[] = "MTP"; +static char __pyx_k_MUX[] = "MUX"; +static char __pyx_k_PGM[] = "PGM"; +static char __pyx_k_PIM[] = "PIM"; +static char __pyx_k_PRM[] = "PRM"; +static char __pyx_k_PTP[] = "PTP"; +static char __pyx_k_PUP[] = "PUP"; +static char __pyx_k_PVP[] = "PVP"; +static char __pyx_k_QNX[] = "QNX"; +static char __pyx_k_RDP[] = "RDP"; +static char __pyx_k_RVD[] = "RVD"; +static char __pyx_k_SMP[] = "SMP"; +static char __pyx_k_SNP[] = "SNP"; +static char __pyx_k_SPS[] = "SPS"; +static char __pyx_k_SRP[] = "SRP"; +static char __pyx_k_STP[] = "STP"; +static char __pyx_k_TCF[] = "TCF"; +static char __pyx_k_TCP[] = "TCP"; +static char __pyx_k_TTP[] = "TTP"; +static char __pyx_k_UDP[] = "UDP"; +static char __pyx_k_UTI[] = "UTI"; +static char __pyx_k_WSN[] = "WSN"; +static char __pyx_k_XTP[] = "XTP"; +static char __pyx_k_get[] = "get"; +static char __pyx_k_ARIS[] = "ARIS"; +static char __pyx_k_CFTP[] = "CFTP"; +static char __pyx_k_CPHB[] = "CPHB"; +static char __pyx_k_CPNX[] = "CPNX"; +static char __pyx_k_CRTP[] = "CRTP"; +static char __pyx_k_DCCP[] = "DCCP"; +static char __pyx_k_FIRE[] = "FIRE"; +static char __pyx_k_GMTP[] = "GMTP"; +static char __pyx_k_IATP[] = "IATP"; +static char __pyx_k_ICMP[] = "ICMP"; +static char __pyx_k_IDPR[] = "IDPR"; +static char __pyx_k_IDRP[] = "IDRP"; +static char __pyx_k_IFMP[] = "IFMP"; +static char __pyx_k_IGMP[] = "IGMP"; +static char __pyx_k_IPCV[] = "IPCV"; +static char __pyx_k_IPIP[] = "IPIP"; +static char __pyx_k_IPLT[] = "IPLT"; +static char __pyx_k_IPPC[] = "IPPC"; +static char __pyx_k_IPv6[] = "IPv6"; +static char __pyx_k_IRTP[] = "IRTP"; +static char __pyx_k_ISIS[] = "ISIS"; +static char __pyx_k_L2TP[] = "L2TP"; +static char __pyx_k_LARP[] = "LARP"; +static char __pyx_k_MICP[] = "MICP"; +static char __pyx_k_NARP[] = "NARP"; +static char __pyx_k_PIPE[] = "PIPE"; +static char __pyx_k_PNNI[] = "PNNI"; +static char __pyx_k_RSVP[] = "RSVP"; +static char __pyx_k_SCPS[] = "SCPS"; +static char __pyx_k_SCTP[] = "SCTP"; +static char __pyx_k_SDRP[] = "SDRP"; +static char __pyx_k_SKIP[] = "SKIP"; +static char __pyx_k_TLSP[] = "TLSP"; +static char __pyx_k_VISA[] = "VISA"; +static char __pyx_k_VMTP[] = "VMTP"; +static char __pyx_k_VRRP[] = "VRRP"; +static char __pyx_k_XNET[] = "XNET"; +static char __pyx_k_args[] = "args"; +static char __pyx_k_drop[] = "drop"; +static char __pyx_k_main[] = "__main__"; +static char __pyx_k_mode[] = "mode"; +static char __pyx_k_recv[] = "recv"; +static char __pyx_k_test[] = "__test__"; +static char __pyx_k_ARGUS[] = "ARGUS"; +static char __pyx_k_AX_25[] = "AX.25"; +static char __pyx_k_CHAOS[] = "CHAOS"; +static char __pyx_k_CRUDP[] = "CRUDP"; +static char __pyx_k_EIGRP[] = "EIGRP"; +static char __pyx_k_EMCON[] = "EMCON"; +static char __pyx_k_ENCAP[] = "ENCAP"; +static char __pyx_k_SWIPE[] = "SWIPE"; +static char __pyx_k_Shim6[] = "Shim6"; +static char __pyx_k_VINES[] = "VINES"; +static char __pyx_k_block[] = "block"; +static char __pyx_k_error[] = "error"; +static char __pyx_k_manet[] = "manet"; +static char __pyx_k_range[] = "range"; +static char __pyx_k_HOPOPT[] = "HOPOPT"; +static char __pyx_k_IPComp[] = "IPComp"; +static char __pyx_k_ISO_IP[] = "ISO-IP"; +static char __pyx_k_I_NLSP[] = "I-NLSP"; +static char __pyx_k_LEAF_1[] = "LEAF-1"; +static char __pyx_k_LEAF_2[] = "LEAF-2"; +static char __pyx_k_MOBILE[] = "MOBILE"; +static char __pyx_k_NETBLT[] = "NETBLT"; +static char __pyx_k_NVP_II[] = "NVP-II"; +static char __pyx_k_SCC_SP[] = "SCC-SP"; +static char __pyx_k_SUN_ND[] = "SUN-ND"; +static char __pyx_k_WB_MON[] = "WB-MON"; +static char __pyx_k_accept[] = "accept"; +static char __pyx_k_get_fd[] = "get_fd"; +static char __pyx_k_import[] = "__import__"; +static char __pyx_k_repeat[] = "repeat"; +static char __pyx_k_socket[] = "socket"; +static char __pyx_k_ETHERIP[] = "ETHERIP"; +static char __pyx_k_ISO_TP4[] = "ISO-TP4"; +static char __pyx_k_MFE_NSP[] = "MFE-NSP"; +static char __pyx_k_OSError[] = "OSError"; +static char __pyx_k_OSPFIGP[] = "OSPFIGP"; +static char __pyx_k_SAT_MON[] = "SAT-MON"; +static char __pyx_k_TRUNK_1[] = "TRUNK-1"; +static char __pyx_k_TRUNK_2[] = "TRUNK-2"; +static char __pyx_k_UDPLite[] = "UDPLite"; +static char __pyx_k_VERSION[] = "VERSION"; +static char __pyx_k_XNS_IDP[] = "XNS-IDP"; +static char __pyx_k_max_len[] = "max_len"; +static char __pyx_k_DCN_MEAS[] = "DCN-MEAS"; +static char __pyx_k_Mobility[] = "Mobility"; +static char __pyx_k_Reserved[] = "Reserved"; +static char __pyx_k_SSCOPMCE[] = "SSCOPMCE"; +static char __pyx_k_WB_EXPAK[] = "WB-EXPAK"; +static char __pyx_k_get_mark[] = "get_mark"; +static char __pyx_k_set_mark[] = "set_mark"; +static char __pyx_k_sock_len[] = "sock_len"; +static char __pyx_k_COPY_META[] = "COPY_META"; +static char __pyx_k_COPY_NONE[] = "COPY_NONE"; +static char __pyx_k_IDPR_CMTP[] = "IDPR-CMTP"; +static char __pyx_k_IPX_in_IP[] = "IPX-in-IP"; +static char __pyx_k_IPv6_Frag[] = "IPv6-Frag"; +static char __pyx_k_IPv6_ICMP[] = "IPv6-ICMP"; +static char __pyx_k_IPv6_Opts[] = "IPv6-Opts"; +static char __pyx_k_KRYPTOLAN[] = "KRYPTOLAN"; +static char __pyx_k_MERIT_INP[] = "MERIT-INP"; +static char __pyx_k_PROTOCOLS[] = "PROTOCOLS"; +static char __pyx_k_SAT_EXPAK[] = "SAT-EXPAK"; +static char __pyx_k_queue_num[] = "queue_num"; +static char __pyx_k_BR_SAT_MON[] = "BR-SAT-MON"; +static char __pyx_k_IPv6_NoNxt[] = "IPv6-NoNxt"; +static char __pyx_k_IPv6_Route[] = "IPv6-Route"; +static char __pyx_k_MPLS_in_IP[] = "MPLS-in-IP"; +static char __pyx_k_NSFNET_IGP[] = "NSFNET-IGP"; +static char __pyx_k_Sprite_RPC[] = "Sprite-RPC"; +static char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; +static char __pyx_k_BBN_RCC_MON[] = "BBN-RCC-MON"; +static char __pyx_k_COPY_PACKET[] = "COPY_PACKET"; +static char __pyx_k_Compaq_Peer[] = "Compaq-Peer"; +static char __pyx_k_SECURE_VMTP[] = "SECURE-VMTP"; +static char __pyx_k_set_payload[] = "set_payload"; +static char __pyx_k_get_timestamp[] = "get_timestamp"; +static char __pyx_k_user_callback[] = "user_callback"; +static char __pyx_k_RuntimeWarning[] = "RuntimeWarning"; +static char __pyx_k_RSVP_E2E_IGNORE[] = "RSVP-E2E-IGNORE"; +static char __pyx_k_get_payload_len[] = "get_payload_len"; +static char __pyx_k_Unknown_protocol[] = "Unknown protocol"; +static char __pyx_k_s_packet_s_bytes[] = "%s packet, %s bytes"; +static char __pyx_k_any_local_network[] = "any local network"; +static char __pyx_k_any_0_hop_protocol[] = "any 0-hop protocol"; +static char __pyx_k_Failed_to_open_NFQueue[] = "Failed to open NFQueue."; +static char __pyx_k_Failed_to_create_queue_s[] = "Failed to create queue %s."; +static char __pyx_k_any_host_internal_protocol[] = "any host internal protocol"; +static char __pyx_k_any_distributed_file_system[] = "any distributed file system"; +static char __pyx_k_any_private_encryption_scheme[] = "any private encryption scheme"; +static char __pyx_k_Failed_to_set_packet_copy_mode[] = "Failed to set packet copy mode."; +static char __pyx_k_Bind_to_a_Linux_netfilter_queue[] = "\nBind to a Linux netfilter queue. Send packets to a user-specified callback\nfunction.\n\nCopyright: (c) 2011, Kerkhoff Technologies Inc.\nLicense: MIT; see LICENSE.txt\n"; +static char __pyx_k_Failed_to_bind_family_s_Are_you[] = "Failed to bind family %s. Are you root?"; +static char __pyx_k_Failed_to_get_payload_of_packet[] = "Failed to get payload of packet."; +static char __pyx_k_Socket_rcvbuf_limit_is_now_d_req[] = "Socket rcvbuf limit is now %d, requested %d."; +static char __pyx_k_Verdict_already_given_for_this_p[] = "Verdict already given for this packet."; static PyObject *__pyx_kp_s_3PC; static PyObject *__pyx_n_s_AH; static PyObject *__pyx_n_s_ARGUS; @@ -1340,15 +1227,16 @@ static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_user_callback; static int __pyx_pf_14netfilterqueue_6Packet___cinit__(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14netfilterqueue_6Packet_2__str__(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_14netfilterqueue_6Packet_4get_payload(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_14netfilterqueue_6Packet_6get_payload_len(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_14netfilterqueue_6Packet_8get_timestamp(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_14netfilterqueue_6Packet_10set_payload(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self, PyObject *__pyx_v_payload); /* proto */ -static PyObject *__pyx_pf_14netfilterqueue_6Packet_12set_mark(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self, u_int32_t __pyx_v_mark); /* proto */ -static PyObject *__pyx_pf_14netfilterqueue_6Packet_14get_mark(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_14netfilterqueue_6Packet_16accept(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_14netfilterqueue_6Packet_18drop(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_14netfilterqueue_6Packet_20repeat(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_14netfilterqueue_6Packet_4get_hw(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_14netfilterqueue_6Packet_6get_payload(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_14netfilterqueue_6Packet_8get_payload_len(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_14netfilterqueue_6Packet_10get_timestamp(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_14netfilterqueue_6Packet_12set_payload(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self, PyObject *__pyx_v_payload); /* proto */ +static PyObject *__pyx_pf_14netfilterqueue_6Packet_14set_mark(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self, u_int32_t __pyx_v_mark); /* proto */ +static PyObject *__pyx_pf_14netfilterqueue_6Packet_16get_mark(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_14netfilterqueue_6Packet_18accept(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_14netfilterqueue_6Packet_20drop(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_14netfilterqueue_6Packet_22repeat(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14netfilterqueue_6Packet_2id___get__(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14netfilterqueue_6Packet_11hw_protocol___get__(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14netfilterqueue_6Packet_4hook___get__(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self); /* proto */ @@ -1532,6 +1420,9 @@ static int __pyx_f_14netfilterqueue_global_callback(struct nfq_q_handle *__pyx_v PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif @@ -1568,7 +1459,7 @@ static int __pyx_f_14netfilterqueue_global_callback(struct nfq_q_handle *__pyx_v * packet.set_nfq_data(qh, nfa) * user_callback(packet) */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_14netfilterqueue_Packet), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_14netfilterqueue_Packet), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_packet = ((struct __pyx_obj_14netfilterqueue_Packet *)__pyx_t_1); __pyx_t_1 = 0; @@ -1580,7 +1471,7 @@ static int __pyx_f_14netfilterqueue_global_callback(struct nfq_q_handle *__pyx_v * user_callback(packet) * return 1 */ - __pyx_t_1 = ((struct __pyx_vtabstruct_14netfilterqueue_Packet *)__pyx_v_packet->__pyx_vtab)->set_nfq_data(__pyx_v_packet, __pyx_v_qh, __pyx_v_nfa); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_14netfilterqueue_Packet *)__pyx_v_packet->__pyx_vtab)->set_nfq_data(__pyx_v_packet, __pyx_v_qh, __pyx_v_nfa); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -1603,16 +1494,16 @@ static int __pyx_f_14netfilterqueue_global_callback(struct nfq_q_handle *__pyx_v } } if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_packet)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_packet)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); } else { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 37, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_packet)); __Pyx_GIVEREF(((PyObject *)__pyx_v_packet)); PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)__pyx_v_packet)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -1762,6 +1653,9 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_2__str__(struct __pyx_obj_14n PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); /* "netfilterqueue.pyx":48 @@ -1780,12 +1674,12 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_2__str__(struct __pyx_obj_14n * return "%s packet, %s bytes" % (protocol, self.payload_len) * */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PROTOCOLS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PROTOCOLS); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 49, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyInt_From_u_int8_t(__pyx_v_hdr->protocol); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_u_int8_t(__pyx_v_hdr->protocol); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -1799,7 +1693,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_2__str__(struct __pyx_obj_14n __pyx_t_5 = 1; } } - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 49, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -1810,7 +1704,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_2__str__(struct __pyx_obj_14n __Pyx_GIVEREF(__pyx_kp_s_Unknown_protocol); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_kp_s_Unknown_protocol); __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -1825,9 +1719,9 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_2__str__(struct __pyx_obj_14n * cdef set_nfq_data(self, nfq_q_handle *qh, nfq_data *nfa): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->payload_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->payload_len); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_protocol); __Pyx_GIVEREF(__pyx_v_protocol); @@ -1835,7 +1729,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_2__str__(struct __pyx_obj_14n __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_packet_s_bytes, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_packet_s_bytes, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; @@ -1878,8 +1772,12 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_set_nfq_data(struct __pyx_obj_ PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations u_int8_t __pyx_t_1; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; + u_int8_t *__pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_nfq_data", 0); /* "netfilterqueue.pyx":57 @@ -1896,7 +1794,7 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_set_nfq_data(struct __pyx_obj_ * self._qh = qh * self._nfa = nfa # <<<<<<<<<<<<<< * self._hdr = nfq_get_msg_packet_hdr(nfa) - * + * self._hw = nfq_get_packet_hw(nfa) */ __pyx_v_self->_nfa = __pyx_v_nfa; @@ -1904,13 +1802,22 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_set_nfq_data(struct __pyx_obj_ * self._qh = qh * self._nfa = nfa * self._hdr = nfq_get_msg_packet_hdr(nfa) # <<<<<<<<<<<<<< + * self._hw = nfq_get_packet_hw(nfa) * - * self.id = ntohl(self._hdr.packet_id) */ __pyx_v_self->_hdr = nfq_get_msg_packet_hdr(__pyx_v_nfa); - /* "netfilterqueue.pyx":61 + /* "netfilterqueue.pyx":60 + * self._nfa = nfa * self._hdr = nfq_get_msg_packet_hdr(nfa) + * self._hw = nfq_get_packet_hw(nfa) # <<<<<<<<<<<<<< + * + * self.id = ntohl(self._hdr.packet_id) + */ + __pyx_v_self->_hw = nfq_get_packet_hw(__pyx_v_nfa); + + /* "netfilterqueue.pyx":62 + * self._hw = nfq_get_packet_hw(nfa) * * self.id = ntohl(self._hdr.packet_id) # <<<<<<<<<<<<<< * self.hw_protocol = ntohs(self._hdr.hw_protocol) @@ -1918,27 +1825,37 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_set_nfq_data(struct __pyx_obj_ */ __pyx_v_self->id = ntohl(__pyx_v_self->_hdr->packet_id); - /* "netfilterqueue.pyx":62 + /* "netfilterqueue.pyx":63 * * self.id = ntohl(self._hdr.packet_id) * self.hw_protocol = ntohs(self._hdr.hw_protocol) # <<<<<<<<<<<<<< * self.hook = self._hdr.hook - * + * self.hw_addr = self._hw.hw_addr */ __pyx_v_self->hw_protocol = ntohs(__pyx_v_self->_hdr->hw_protocol); - /* "netfilterqueue.pyx":63 + /* "netfilterqueue.pyx":64 * self.id = ntohl(self._hdr.packet_id) * self.hw_protocol = ntohs(self._hdr.hw_protocol) * self.hook = self._hdr.hook # <<<<<<<<<<<<<< + * self.hw_addr = self._hw.hw_addr * - * self.payload_len = nfq_get_payload(self._nfa, &self.payload) */ __pyx_t_1 = __pyx_v_self->_hdr->hook; __pyx_v_self->hook = __pyx_t_1; /* "netfilterqueue.pyx":65 + * self.hw_protocol = ntohs(self._hdr.hw_protocol) * self.hook = self._hdr.hook + * self.hw_addr = self._hw.hw_addr # <<<<<<<<<<<<<< + * + * self.payload_len = nfq_get_payload(self._nfa, &self.payload) + */ + __pyx_t_2 = __pyx_v_self->_hw->hw_addr; + memcpy(&(__pyx_v_self->hw_addr[0]), __pyx_t_2, sizeof(__pyx_v_self->hw_addr[0]) * (8 - 0)); + + /* "netfilterqueue.pyx":67 + * self.hw_addr = self._hw.hw_addr * * self.payload_len = nfq_get_payload(self._nfa, &self.payload) # <<<<<<<<<<<<<< * if self.payload_len < 0: @@ -1946,30 +1863,30 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_set_nfq_data(struct __pyx_obj_ */ __pyx_v_self->payload_len = nfq_get_payload(__pyx_v_self->_nfa, (&__pyx_v_self->payload)); - /* "netfilterqueue.pyx":66 + /* "netfilterqueue.pyx":68 * * self.payload_len = nfq_get_payload(self._nfa, &self.payload) * if self.payload_len < 0: # <<<<<<<<<<<<<< * raise OSError("Failed to get payload of packet.") * */ - __pyx_t_2 = ((__pyx_v_self->payload_len < 0) != 0); - if (__pyx_t_2) { + __pyx_t_3 = ((__pyx_v_self->payload_len < 0) != 0); + if (__pyx_t_3) { - /* "netfilterqueue.pyx":67 + /* "netfilterqueue.pyx":69 * self.payload_len = nfq_get_payload(self._nfa, &self.payload) * if self.payload_len < 0: * raise OSError("Failed to get payload of packet.") # <<<<<<<<<<<<<< * * nfq_get_timestamp(self._nfa, &self.timestamp) */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 67, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "netfilterqueue.pyx":66 + /* "netfilterqueue.pyx":68 * * self.payload_len = nfq_get_payload(self._nfa, &self.payload) * if self.payload_len < 0: # <<<<<<<<<<<<<< @@ -1978,7 +1895,7 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_set_nfq_data(struct __pyx_obj_ */ } - /* "netfilterqueue.pyx":69 + /* "netfilterqueue.pyx":71 * raise OSError("Failed to get payload of packet.") * * nfq_get_timestamp(self._nfa, &self.timestamp) # <<<<<<<<<<<<<< @@ -1987,7 +1904,7 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_set_nfq_data(struct __pyx_obj_ */ nfq_get_timestamp(__pyx_v_self->_nfa, (&__pyx_v_self->timestamp)); - /* "netfilterqueue.pyx":70 + /* "netfilterqueue.pyx":72 * * nfq_get_timestamp(self._nfa, &self.timestamp) * self.mark = nfq_get_nfmark(nfa) # <<<<<<<<<<<<<< @@ -2008,7 +1925,7 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_set_nfq_data(struct __pyx_obj_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("netfilterqueue.Packet.set_nfq_data", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -2017,7 +1934,7 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_set_nfq_data(struct __pyx_obj_ return __pyx_r; } -/* "netfilterqueue.pyx":72 +/* "netfilterqueue.pyx":74 * self.mark = nfq_get_nfmark(nfa) * * cdef void verdict(self, u_int8_t verdict): # <<<<<<<<<<<<<< @@ -2033,9 +1950,12 @@ static void __pyx_f_14netfilterqueue_6Packet_verdict(struct __pyx_obj_14netfilte PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; unsigned char *__pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("verdict", 0); - /* "netfilterqueue.pyx":74 + /* "netfilterqueue.pyx":76 * cdef void verdict(self, u_int8_t verdict): * """Call appropriate set_verdict... function on packet.""" * if self._verdict_is_set: # <<<<<<<<<<<<<< @@ -2045,20 +1965,20 @@ static void __pyx_f_14netfilterqueue_6Packet_verdict(struct __pyx_obj_14netfilte __pyx_t_1 = (__pyx_v_self->_verdict_is_set != 0); if (__pyx_t_1) { - /* "netfilterqueue.pyx":75 + /* "netfilterqueue.pyx":77 * """Call appropriate set_verdict... function on packet.""" * if self._verdict_is_set: * raise RuntimeWarning("Verdict already given for this packet.") # <<<<<<<<<<<<<< * * cdef u_int32_t modified_payload_len = 0 */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeWarning, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeWarning, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 75, __pyx_L1_error) + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "netfilterqueue.pyx":74 + /* "netfilterqueue.pyx":76 * cdef void verdict(self, u_int8_t verdict): * """Call appropriate set_verdict... function on packet.""" * if self._verdict_is_set: # <<<<<<<<<<<<<< @@ -2067,7 +1987,7 @@ static void __pyx_f_14netfilterqueue_6Packet_verdict(struct __pyx_obj_14netfilte */ } - /* "netfilterqueue.pyx":77 + /* "netfilterqueue.pyx":79 * raise RuntimeWarning("Verdict already given for this packet.") * * cdef u_int32_t modified_payload_len = 0 # <<<<<<<<<<<<<< @@ -2076,7 +1996,7 @@ static void __pyx_f_14netfilterqueue_6Packet_verdict(struct __pyx_obj_14netfilte */ __pyx_v_modified_payload_len = 0; - /* "netfilterqueue.pyx":78 + /* "netfilterqueue.pyx":80 * * cdef u_int32_t modified_payload_len = 0 * cdef unsigned char *modified_payload = NULL # <<<<<<<<<<<<<< @@ -2085,7 +2005,7 @@ static void __pyx_f_14netfilterqueue_6Packet_verdict(struct __pyx_obj_14netfilte */ __pyx_v_modified_payload = NULL; - /* "netfilterqueue.pyx":79 + /* "netfilterqueue.pyx":81 * cdef u_int32_t modified_payload_len = 0 * cdef unsigned char *modified_payload = NULL * if self._given_payload: # <<<<<<<<<<<<<< @@ -2095,7 +2015,7 @@ static void __pyx_f_14netfilterqueue_6Packet_verdict(struct __pyx_obj_14netfilte __pyx_t_1 = (__pyx_v_self->_given_payload != Py_None) && (PyBytes_GET_SIZE(__pyx_v_self->_given_payload) != 0); if (__pyx_t_1) { - /* "netfilterqueue.pyx":80 + /* "netfilterqueue.pyx":82 * cdef unsigned char *modified_payload = NULL * if self._given_payload: * modified_payload_len = len(self._given_payload) # <<<<<<<<<<<<<< @@ -2106,23 +2026,23 @@ static void __pyx_f_14netfilterqueue_6Packet_verdict(struct __pyx_obj_14netfilte __Pyx_INCREF(__pyx_t_2); if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 80, __pyx_L1_error) + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_3 = PyBytes_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 80, __pyx_L1_error) + __pyx_t_3 = PyBytes_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_modified_payload_len = __pyx_t_3; - /* "netfilterqueue.pyx":81 + /* "netfilterqueue.pyx":83 * if self._given_payload: * modified_payload_len = len(self._given_payload) * modified_payload = self._given_payload # <<<<<<<<<<<<<< * if self._mark_is_set: * nfq_set_verdict2( */ - __pyx_t_4 = __Pyx_PyObject_AsUString(__pyx_v_self->_given_payload); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 81, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_AsUString(__pyx_v_self->_given_payload); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_modified_payload = __pyx_t_4; - /* "netfilterqueue.pyx":79 + /* "netfilterqueue.pyx":81 * cdef u_int32_t modified_payload_len = 0 * cdef unsigned char *modified_payload = NULL * if self._given_payload: # <<<<<<<<<<<<<< @@ -2131,7 +2051,7 @@ static void __pyx_f_14netfilterqueue_6Packet_verdict(struct __pyx_obj_14netfilte */ } - /* "netfilterqueue.pyx":82 + /* "netfilterqueue.pyx":84 * modified_payload_len = len(self._given_payload) * modified_payload = self._given_payload * if self._mark_is_set: # <<<<<<<<<<<<<< @@ -2141,7 +2061,7 @@ static void __pyx_f_14netfilterqueue_6Packet_verdict(struct __pyx_obj_14netfilte __pyx_t_1 = (__pyx_v_self->_mark_is_set != 0); if (__pyx_t_1) { - /* "netfilterqueue.pyx":83 + /* "netfilterqueue.pyx":85 * modified_payload = self._given_payload * if self._mark_is_set: * nfq_set_verdict2( # <<<<<<<<<<<<<< @@ -2150,7 +2070,7 @@ static void __pyx_f_14netfilterqueue_6Packet_verdict(struct __pyx_obj_14netfilte */ nfq_set_verdict2(__pyx_v_self->_qh, __pyx_v_self->id, __pyx_v_verdict, __pyx_v_self->_given_mark, __pyx_v_modified_payload_len, __pyx_v_modified_payload); - /* "netfilterqueue.pyx":82 + /* "netfilterqueue.pyx":84 * modified_payload_len = len(self._given_payload) * modified_payload = self._given_payload * if self._mark_is_set: # <<<<<<<<<<<<<< @@ -2160,7 +2080,7 @@ static void __pyx_f_14netfilterqueue_6Packet_verdict(struct __pyx_obj_14netfilte goto __pyx_L5; } - /* "netfilterqueue.pyx":91 + /* "netfilterqueue.pyx":93 * modified_payload) * else: * nfq_set_verdict( # <<<<<<<<<<<<<< @@ -2169,7 +2089,7 @@ static void __pyx_f_14netfilterqueue_6Packet_verdict(struct __pyx_obj_14netfilte */ /*else*/ { - /* "netfilterqueue.pyx":96 + /* "netfilterqueue.pyx":98 * verdict, * modified_payload_len, * modified_payload) # <<<<<<<<<<<<<< @@ -2180,16 +2100,16 @@ static void __pyx_f_14netfilterqueue_6Packet_verdict(struct __pyx_obj_14netfilte } __pyx_L5:; - /* "netfilterqueue.pyx":98 + /* "netfilterqueue.pyx":100 * modified_payload) * * self._verdict_is_set = True # <<<<<<<<<<<<<< * - * def get_payload(self): + * def get_hw(self): */ __pyx_v_self->_verdict_is_set = 1; - /* "netfilterqueue.pyx":72 + /* "netfilterqueue.pyx":74 * self.mark = nfq_get_nfmark(nfa) * * cdef void verdict(self, u_int8_t verdict): # <<<<<<<<<<<<<< @@ -2206,48 +2126,163 @@ static void __pyx_f_14netfilterqueue_6Packet_verdict(struct __pyx_obj_14netfilte __Pyx_RefNannyFinishContext(); } -/* "netfilterqueue.pyx":100 +/* "netfilterqueue.pyx":102 * self._verdict_is_set = True * + * def get_hw(self): # <<<<<<<<<<<<<< + * """Return the hardware address as Python string.""" + * cdef object py_string + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_14netfilterqueue_6Packet_5get_hw(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_14netfilterqueue_6Packet_4get_hw[] = "Return the hardware address as Python string."; +static PyObject *__pyx_pw_14netfilterqueue_6Packet_5get_hw(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_hw (wrapper)", 0); + __pyx_r = __pyx_pf_14netfilterqueue_6Packet_4get_hw(((struct __pyx_obj_14netfilterqueue_Packet *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_14netfilterqueue_6Packet_4get_hw(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self) { + PyObject *__pyx_v_py_string = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_hw", 0); + + /* "netfilterqueue.pyx":105 + * """Return the hardware address as Python string.""" + * cdef object py_string + * if cpython.version.PY_MAJOR_VERSION >= 3: # <<<<<<<<<<<<<< + * py_string = PyBytes_FromStringAndSize(self.hw_addr, 8) + * else: + */ + __pyx_t_1 = ((PY_MAJOR_VERSION >= 3) != 0); + if (__pyx_t_1) { + + /* "netfilterqueue.pyx":106 + * cdef object py_string + * if cpython.version.PY_MAJOR_VERSION >= 3: + * py_string = PyBytes_FromStringAndSize(self.hw_addr, 8) # <<<<<<<<<<<<<< + * else: + * py_string = PyString_FromStringAndSize(self.hw_addr, 8) + */ + __pyx_t_2 = PyBytes_FromStringAndSize(((char *)__pyx_v_self->hw_addr), 8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_py_string = __pyx_t_2; + __pyx_t_2 = 0; + + /* "netfilterqueue.pyx":105 + * """Return the hardware address as Python string.""" + * cdef object py_string + * if cpython.version.PY_MAJOR_VERSION >= 3: # <<<<<<<<<<<<<< + * py_string = PyBytes_FromStringAndSize(self.hw_addr, 8) + * else: + */ + goto __pyx_L3; + } + + /* "netfilterqueue.pyx":108 + * py_string = PyBytes_FromStringAndSize(self.hw_addr, 8) + * else: + * py_string = PyString_FromStringAndSize(self.hw_addr, 8) # <<<<<<<<<<<<<< + * return py_string + * + */ + /*else*/ { + __pyx_t_2 = PyString_FromStringAndSize(((char *)__pyx_v_self->hw_addr), 8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_py_string = __pyx_t_2; + __pyx_t_2 = 0; + } + __pyx_L3:; + + /* "netfilterqueue.pyx":109 + * else: + * py_string = PyString_FromStringAndSize(self.hw_addr, 8) + * return py_string # <<<<<<<<<<<<<< + * + * def get_payload(self): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_py_string); + __pyx_r = __pyx_v_py_string; + goto __pyx_L0; + + /* "netfilterqueue.pyx":102 + * self._verdict_is_set = True + * + * def get_hw(self): # <<<<<<<<<<<<<< + * """Return the hardware address as Python string.""" + * cdef object py_string + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("netfilterqueue.Packet.get_hw", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_py_string); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "netfilterqueue.pyx":111 + * return py_string + * * def get_payload(self): # <<<<<<<<<<<<<< * """Return payload as Python string.""" * cdef object py_string */ /* Python wrapper */ -static PyObject *__pyx_pw_14netfilterqueue_6Packet_5get_payload(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_14netfilterqueue_6Packet_4get_payload[] = "Return payload as Python string."; -static PyObject *__pyx_pw_14netfilterqueue_6Packet_5get_payload(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_14netfilterqueue_6Packet_7get_payload(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_14netfilterqueue_6Packet_6get_payload[] = "Return payload as Python string."; +static PyObject *__pyx_pw_14netfilterqueue_6Packet_7get_payload(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_payload (wrapper)", 0); - __pyx_r = __pyx_pf_14netfilterqueue_6Packet_4get_payload(((struct __pyx_obj_14netfilterqueue_Packet *)__pyx_v_self)); + __pyx_r = __pyx_pf_14netfilterqueue_6Packet_6get_payload(((struct __pyx_obj_14netfilterqueue_Packet *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_14netfilterqueue_6Packet_4get_payload(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self) { +static PyObject *__pyx_pf_14netfilterqueue_6Packet_6get_payload(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self) { PyObject *__pyx_v_py_string = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_payload", 0); - /* "netfilterqueue.pyx":103 + /* "netfilterqueue.pyx":114 * """Return payload as Python string.""" * cdef object py_string * py_string = self.payload[:self.payload_len] # <<<<<<<<<<<<<< * return py_string * */ - __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_self->payload + 0, __pyx_v_self->payload_len - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_self->payload + 0, __pyx_v_self->payload_len - 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_py_string = __pyx_t_1; __pyx_t_1 = 0; - /* "netfilterqueue.pyx":104 + /* "netfilterqueue.pyx":115 * cdef object py_string * py_string = self.payload[:self.payload_len] * return py_string # <<<<<<<<<<<<<< @@ -2259,8 +2294,8 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_4get_payload(struct __pyx_obj __pyx_r = __pyx_v_py_string; goto __pyx_L0; - /* "netfilterqueue.pyx":100 - * self._verdict_is_set = True + /* "netfilterqueue.pyx":111 + * return py_string * * def get_payload(self): # <<<<<<<<<<<<<< * """Return payload as Python string.""" @@ -2279,7 +2314,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_4get_payload(struct __pyx_obj return __pyx_r; } -/* "netfilterqueue.pyx":106 +/* "netfilterqueue.pyx":117 * return py_string * * cpdef Py_ssize_t get_payload_len(self): # <<<<<<<<<<<<<< @@ -2287,7 +2322,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_4get_payload(struct __pyx_obj * */ -static PyObject *__pyx_pw_14netfilterqueue_6Packet_7get_payload_len(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_14netfilterqueue_6Packet_9get_payload_len(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static Py_ssize_t __pyx_f_14netfilterqueue_6Packet_get_payload_len(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self, int __pyx_skip_dispatch) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations @@ -2296,14 +2331,17 @@ static Py_ssize_t __pyx_f_14netfilterqueue_6Packet_get_payload_len(struct __pyx_ PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_payload_len", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_payload_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_payload_len); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_7get_payload_len)) { + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_9get_payload_len)) { __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -2316,14 +2354,14 @@ static Py_ssize_t __pyx_f_14netfilterqueue_6Packet_get_payload_len(struct __pyx_ } } if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -2332,7 +2370,7 @@ static Py_ssize_t __pyx_f_14netfilterqueue_6Packet_get_payload_len(struct __pyx_ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "netfilterqueue.pyx":107 + /* "netfilterqueue.pyx":118 * * cpdef Py_ssize_t get_payload_len(self): * return self.payload_len # <<<<<<<<<<<<<< @@ -2342,7 +2380,7 @@ static Py_ssize_t __pyx_f_14netfilterqueue_6Packet_get_payload_len(struct __pyx_ __pyx_r = __pyx_v_self->payload_len; goto __pyx_L0; - /* "netfilterqueue.pyx":106 + /* "netfilterqueue.pyx":117 * return py_string * * cpdef Py_ssize_t get_payload_len(self): # <<<<<<<<<<<<<< @@ -2364,25 +2402,28 @@ static Py_ssize_t __pyx_f_14netfilterqueue_6Packet_get_payload_len(struct __pyx_ } /* Python wrapper */ -static PyObject *__pyx_pw_14netfilterqueue_6Packet_7get_payload_len(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_14netfilterqueue_6Packet_7get_payload_len(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_14netfilterqueue_6Packet_9get_payload_len(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_14netfilterqueue_6Packet_9get_payload_len(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_payload_len (wrapper)", 0); - __pyx_r = __pyx_pf_14netfilterqueue_6Packet_6get_payload_len(((struct __pyx_obj_14netfilterqueue_Packet *)__pyx_v_self)); + __pyx_r = __pyx_pf_14netfilterqueue_6Packet_8get_payload_len(((struct __pyx_obj_14netfilterqueue_Packet *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_14netfilterqueue_6Packet_6get_payload_len(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self) { +static PyObject *__pyx_pf_14netfilterqueue_6Packet_8get_payload_len(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_payload_len", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyInt_FromSsize_t(__pyx_f_14netfilterqueue_6Packet_get_payload_len(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_f_14netfilterqueue_6Packet_get_payload_len(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -2399,7 +2440,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_6get_payload_len(struct __pyx return __pyx_r; } -/* "netfilterqueue.pyx":109 +/* "netfilterqueue.pyx":120 * return self.payload_len * * cpdef double get_timestamp(self): # <<<<<<<<<<<<<< @@ -2407,7 +2448,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_6get_payload_len(struct __pyx * */ -static PyObject *__pyx_pw_14netfilterqueue_6Packet_9get_timestamp(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_14netfilterqueue_6Packet_11get_timestamp(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static double __pyx_f_14netfilterqueue_6Packet_get_timestamp(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self, int __pyx_skip_dispatch) { double __pyx_r; __Pyx_RefNannyDeclarations @@ -2416,14 +2457,17 @@ static double __pyx_f_14netfilterqueue_6Packet_get_timestamp(struct __pyx_obj_14 PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; double __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_timestamp", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_timestamp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_9get_timestamp)) { + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_11get_timestamp)) { __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -2436,14 +2480,14 @@ static double __pyx_f_14netfilterqueue_6Packet_get_timestamp(struct __pyx_obj_14 } } if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 109, __pyx_L1_error) + __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -2452,7 +2496,7 @@ static double __pyx_f_14netfilterqueue_6Packet_get_timestamp(struct __pyx_obj_14 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "netfilterqueue.pyx":110 + /* "netfilterqueue.pyx":121 * * cpdef double get_timestamp(self): * return self.timestamp.tv_sec + (self.timestamp.tv_usec/1000000.0) # <<<<<<<<<<<<<< @@ -2462,7 +2506,7 @@ static double __pyx_f_14netfilterqueue_6Packet_get_timestamp(struct __pyx_obj_14 __pyx_r = (__pyx_v_self->timestamp.tv_sec + (__pyx_v_self->timestamp.tv_usec / 1000000.0)); goto __pyx_L0; - /* "netfilterqueue.pyx":109 + /* "netfilterqueue.pyx":120 * return self.payload_len * * cpdef double get_timestamp(self): # <<<<<<<<<<<<<< @@ -2484,25 +2528,28 @@ static double __pyx_f_14netfilterqueue_6Packet_get_timestamp(struct __pyx_obj_14 } /* Python wrapper */ -static PyObject *__pyx_pw_14netfilterqueue_6Packet_9get_timestamp(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_14netfilterqueue_6Packet_9get_timestamp(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_14netfilterqueue_6Packet_11get_timestamp(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_14netfilterqueue_6Packet_11get_timestamp(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_timestamp (wrapper)", 0); - __pyx_r = __pyx_pf_14netfilterqueue_6Packet_8get_timestamp(((struct __pyx_obj_14netfilterqueue_Packet *)__pyx_v_self)); + __pyx_r = __pyx_pf_14netfilterqueue_6Packet_10get_timestamp(((struct __pyx_obj_14netfilterqueue_Packet *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_14netfilterqueue_6Packet_8get_timestamp(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self) { +static PyObject *__pyx_pf_14netfilterqueue_6Packet_10get_timestamp(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_timestamp", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_f_14netfilterqueue_6Packet_get_timestamp(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_f_14netfilterqueue_6Packet_get_timestamp(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -2519,7 +2566,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_8get_timestamp(struct __pyx_o return __pyx_r; } -/* "netfilterqueue.pyx":112 +/* "netfilterqueue.pyx":123 * return self.timestamp.tv_sec + (self.timestamp.tv_usec/1000000.0) * * cpdef set_payload(self, bytes payload): # <<<<<<<<<<<<<< @@ -2527,7 +2574,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_8get_timestamp(struct __pyx_o * self._given_payload = payload */ -static PyObject *__pyx_pw_14netfilterqueue_6Packet_11set_payload(PyObject *__pyx_v_self, PyObject *__pyx_v_payload); /*proto*/ +static PyObject *__pyx_pw_14netfilterqueue_6Packet_13set_payload(PyObject *__pyx_v_self, PyObject *__pyx_v_payload); /*proto*/ static PyObject *__pyx_f_14netfilterqueue_6Packet_set_payload(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self, PyObject *__pyx_v_payload, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -2536,14 +2583,17 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_set_payload(struct __pyx_obj_1 PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_payload", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_payload); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_payload); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_11set_payload)) { + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_13set_payload)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; @@ -2557,16 +2607,16 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_set_payload(struct __pyx_obj_1 } } if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_payload); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_payload); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); } else { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_v_payload); __Pyx_GIVEREF(__pyx_v_payload); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_payload); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -2579,7 +2629,7 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_set_payload(struct __pyx_obj_1 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "netfilterqueue.pyx":114 + /* "netfilterqueue.pyx":125 * cpdef set_payload(self, bytes payload): * """Set the new payload of this packet.""" * self._given_payload = payload # <<<<<<<<<<<<<< @@ -2592,7 +2642,7 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_set_payload(struct __pyx_obj_1 __Pyx_DECREF(__pyx_v_self->_given_payload); __pyx_v_self->_given_payload = __pyx_v_payload; - /* "netfilterqueue.pyx":112 + /* "netfilterqueue.pyx":123 * return self.timestamp.tv_sec + (self.timestamp.tv_usec/1000000.0) * * cpdef set_payload(self, bytes payload): # <<<<<<<<<<<<<< @@ -2618,14 +2668,17 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_set_payload(struct __pyx_obj_1 } /* Python wrapper */ -static PyObject *__pyx_pw_14netfilterqueue_6Packet_11set_payload(PyObject *__pyx_v_self, PyObject *__pyx_v_payload); /*proto*/ -static char __pyx_doc_14netfilterqueue_6Packet_10set_payload[] = "Set the new payload of this packet."; -static PyObject *__pyx_pw_14netfilterqueue_6Packet_11set_payload(PyObject *__pyx_v_self, PyObject *__pyx_v_payload) { +static PyObject *__pyx_pw_14netfilterqueue_6Packet_13set_payload(PyObject *__pyx_v_self, PyObject *__pyx_v_payload); /*proto*/ +static char __pyx_doc_14netfilterqueue_6Packet_12set_payload[] = "Set the new payload of this packet."; +static PyObject *__pyx_pw_14netfilterqueue_6Packet_13set_payload(PyObject *__pyx_v_self, PyObject *__pyx_v_payload) { + CYTHON_UNUSED int __pyx_lineno = 0; + CYTHON_UNUSED const char *__pyx_filename = NULL; + CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_payload (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_payload), (&PyBytes_Type), 1, "payload", 1))) __PYX_ERR(0, 112, __pyx_L1_error) - __pyx_r = __pyx_pf_14netfilterqueue_6Packet_10set_payload(((struct __pyx_obj_14netfilterqueue_Packet *)__pyx_v_self), ((PyObject*)__pyx_v_payload)); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_payload), (&PyBytes_Type), 1, "payload", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_14netfilterqueue_6Packet_12set_payload(((struct __pyx_obj_14netfilterqueue_Packet *)__pyx_v_self), ((PyObject*)__pyx_v_payload)); /* function exit code */ goto __pyx_L0; @@ -2636,13 +2689,16 @@ static PyObject *__pyx_pw_14netfilterqueue_6Packet_11set_payload(PyObject *__pyx return __pyx_r; } -static PyObject *__pyx_pf_14netfilterqueue_6Packet_10set_payload(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self, PyObject *__pyx_v_payload) { +static PyObject *__pyx_pf_14netfilterqueue_6Packet_12set_payload(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self, PyObject *__pyx_v_payload) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_payload", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_14netfilterqueue_6Packet_set_payload(__pyx_v_self, __pyx_v_payload, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_1 = __pyx_f_14netfilterqueue_6Packet_set_payload(__pyx_v_self, __pyx_v_payload, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -2659,7 +2715,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_10set_payload(struct __pyx_ob return __pyx_r; } -/* "netfilterqueue.pyx":116 +/* "netfilterqueue.pyx":127 * self._given_payload = payload * * cpdef set_mark(self, u_int32_t mark): # <<<<<<<<<<<<<< @@ -2667,7 +2723,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_10set_payload(struct __pyx_ob * self._mark_is_set = True */ -static PyObject *__pyx_pw_14netfilterqueue_6Packet_13set_mark(PyObject *__pyx_v_self, PyObject *__pyx_arg_mark); /*proto*/ +static PyObject *__pyx_pw_14netfilterqueue_6Packet_15set_mark(PyObject *__pyx_v_self, PyObject *__pyx_arg_mark); /*proto*/ static PyObject *__pyx_f_14netfilterqueue_6Packet_set_mark(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self, u_int32_t __pyx_v_mark, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -2677,16 +2733,19 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_set_mark(struct __pyx_obj_14ne PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_mark", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_mark); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_mark); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_13set_mark)) { + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_15set_mark)) { __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyInt_From_u_int32_t(__pyx_v_mark); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_u_int32_t(__pyx_v_mark); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -2700,17 +2759,17 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_set_mark(struct __pyx_obj_14ne } } if (!__pyx_t_5) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -2723,7 +2782,7 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_set_mark(struct __pyx_obj_14ne __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "netfilterqueue.pyx":117 + /* "netfilterqueue.pyx":128 * * cpdef set_mark(self, u_int32_t mark): * self._given_mark = mark # <<<<<<<<<<<<<< @@ -2732,7 +2791,7 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_set_mark(struct __pyx_obj_14ne */ __pyx_v_self->_given_mark = __pyx_v_mark; - /* "netfilterqueue.pyx":118 + /* "netfilterqueue.pyx":129 * cpdef set_mark(self, u_int32_t mark): * self._given_mark = mark * self._mark_is_set = True # <<<<<<<<<<<<<< @@ -2741,7 +2800,7 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_set_mark(struct __pyx_obj_14ne */ __pyx_v_self->_mark_is_set = 1; - /* "netfilterqueue.pyx":116 + /* "netfilterqueue.pyx":127 * self._given_payload = payload * * cpdef set_mark(self, u_int32_t mark): # <<<<<<<<<<<<<< @@ -2768,14 +2827,17 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_set_mark(struct __pyx_obj_14ne } /* Python wrapper */ -static PyObject *__pyx_pw_14netfilterqueue_6Packet_13set_mark(PyObject *__pyx_v_self, PyObject *__pyx_arg_mark); /*proto*/ -static PyObject *__pyx_pw_14netfilterqueue_6Packet_13set_mark(PyObject *__pyx_v_self, PyObject *__pyx_arg_mark) { +static PyObject *__pyx_pw_14netfilterqueue_6Packet_15set_mark(PyObject *__pyx_v_self, PyObject *__pyx_arg_mark); /*proto*/ +static PyObject *__pyx_pw_14netfilterqueue_6Packet_15set_mark(PyObject *__pyx_v_self, PyObject *__pyx_arg_mark) { u_int32_t __pyx_v_mark; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_mark (wrapper)", 0); assert(__pyx_arg_mark); { - __pyx_v_mark = __Pyx_PyInt_As_u_int32_t(__pyx_arg_mark); if (unlikely((__pyx_v_mark == (u_int32_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 116, __pyx_L3_error) + __pyx_v_mark = __Pyx_PyInt_As_u_int32_t(__pyx_arg_mark); if (unlikely((__pyx_v_mark == (u_int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -2783,20 +2845,23 @@ static PyObject *__pyx_pw_14netfilterqueue_6Packet_13set_mark(PyObject *__pyx_v_ __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_14netfilterqueue_6Packet_12set_mark(((struct __pyx_obj_14netfilterqueue_Packet *)__pyx_v_self), ((u_int32_t)__pyx_v_mark)); + __pyx_r = __pyx_pf_14netfilterqueue_6Packet_14set_mark(((struct __pyx_obj_14netfilterqueue_Packet *)__pyx_v_self), ((u_int32_t)__pyx_v_mark)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_14netfilterqueue_6Packet_12set_mark(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self, u_int32_t __pyx_v_mark) { +static PyObject *__pyx_pf_14netfilterqueue_6Packet_14set_mark(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self, u_int32_t __pyx_v_mark) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_mark", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_14netfilterqueue_6Packet_set_mark(__pyx_v_self, __pyx_v_mark, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_t_1 = __pyx_f_14netfilterqueue_6Packet_set_mark(__pyx_v_self, __pyx_v_mark, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -2813,7 +2878,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_12set_mark(struct __pyx_obj_1 return __pyx_r; } -/* "netfilterqueue.pyx":120 +/* "netfilterqueue.pyx":131 * self._mark_is_set = True * * cpdef get_mark(self): # <<<<<<<<<<<<<< @@ -2821,7 +2886,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_12set_mark(struct __pyx_obj_1 * return self._given_mark */ -static PyObject *__pyx_pw_14netfilterqueue_6Packet_15get_mark(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_14netfilterqueue_6Packet_17get_mark(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_14netfilterqueue_6Packet_get_mark(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -2830,14 +2895,17 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_get_mark(struct __pyx_obj_14ne PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_mark", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_mark); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_mark); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_15get_mark)) { + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_17get_mark)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; @@ -2851,10 +2919,10 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_get_mark(struct __pyx_obj_14ne } } if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -2866,7 +2934,7 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_get_mark(struct __pyx_obj_14ne __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "netfilterqueue.pyx":121 + /* "netfilterqueue.pyx":132 * * cpdef get_mark(self): * if self._mark_is_set: # <<<<<<<<<<<<<< @@ -2876,7 +2944,7 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_get_mark(struct __pyx_obj_14ne __pyx_t_5 = (__pyx_v_self->_mark_is_set != 0); if (__pyx_t_5) { - /* "netfilterqueue.pyx":122 + /* "netfilterqueue.pyx":133 * cpdef get_mark(self): * if self._mark_is_set: * return self._given_mark # <<<<<<<<<<<<<< @@ -2884,13 +2952,13 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_get_mark(struct __pyx_obj_14ne * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_u_int32_t(__pyx_v_self->_given_mark); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_u_int32_t(__pyx_v_self->_given_mark); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "netfilterqueue.pyx":121 + /* "netfilterqueue.pyx":132 * * cpdef get_mark(self): * if self._mark_is_set: # <<<<<<<<<<<<<< @@ -2899,7 +2967,7 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_get_mark(struct __pyx_obj_14ne */ } - /* "netfilterqueue.pyx":123 + /* "netfilterqueue.pyx":134 * if self._mark_is_set: * return self._given_mark * return self.mark # <<<<<<<<<<<<<< @@ -2907,13 +2975,13 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_get_mark(struct __pyx_obj_14ne * cpdef accept(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_u_int32_t(__pyx_v_self->mark); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_u_int32_t(__pyx_v_self->mark); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "netfilterqueue.pyx":120 + /* "netfilterqueue.pyx":131 * self._mark_is_set = True * * cpdef get_mark(self): # <<<<<<<<<<<<<< @@ -2936,25 +3004,28 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_get_mark(struct __pyx_obj_14ne } /* Python wrapper */ -static PyObject *__pyx_pw_14netfilterqueue_6Packet_15get_mark(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_14netfilterqueue_6Packet_15get_mark(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_14netfilterqueue_6Packet_17get_mark(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_14netfilterqueue_6Packet_17get_mark(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_mark (wrapper)", 0); - __pyx_r = __pyx_pf_14netfilterqueue_6Packet_14get_mark(((struct __pyx_obj_14netfilterqueue_Packet *)__pyx_v_self)); + __pyx_r = __pyx_pf_14netfilterqueue_6Packet_16get_mark(((struct __pyx_obj_14netfilterqueue_Packet *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_14netfilterqueue_6Packet_14get_mark(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self) { +static PyObject *__pyx_pf_14netfilterqueue_6Packet_16get_mark(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_mark", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_14netfilterqueue_6Packet_get_mark(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_t_1 = __pyx_f_14netfilterqueue_6Packet_get_mark(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -2971,7 +3042,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_14get_mark(struct __pyx_obj_1 return __pyx_r; } -/* "netfilterqueue.pyx":125 +/* "netfilterqueue.pyx":136 * return self.mark * * cpdef accept(self): # <<<<<<<<<<<<<< @@ -2979,7 +3050,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_14get_mark(struct __pyx_obj_1 * self.verdict(NF_ACCEPT) */ -static PyObject *__pyx_pw_14netfilterqueue_6Packet_17accept(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_14netfilterqueue_6Packet_19accept(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_14netfilterqueue_6Packet_accept(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -2987,14 +3058,17 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_accept(struct __pyx_obj_14netf PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("accept", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_accept); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_accept); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_17accept)) { + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_19accept)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; @@ -3008,10 +3082,10 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_accept(struct __pyx_obj_14netf } } if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -3023,7 +3097,7 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_accept(struct __pyx_obj_14netf __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "netfilterqueue.pyx":127 + /* "netfilterqueue.pyx":138 * cpdef accept(self): * """Accept the packet.""" * self.verdict(NF_ACCEPT) # <<<<<<<<<<<<<< @@ -3032,7 +3106,7 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_accept(struct __pyx_obj_14netf */ ((struct __pyx_vtabstruct_14netfilterqueue_Packet *)__pyx_v_self->__pyx_vtab)->verdict(__pyx_v_self, __pyx_e_14netfilterqueue_NF_ACCEPT); - /* "netfilterqueue.pyx":125 + /* "netfilterqueue.pyx":136 * return self.mark * * cpdef accept(self): # <<<<<<<<<<<<<< @@ -3057,26 +3131,29 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_accept(struct __pyx_obj_14netf } /* Python wrapper */ -static PyObject *__pyx_pw_14netfilterqueue_6Packet_17accept(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_14netfilterqueue_6Packet_16accept[] = "Accept the packet."; -static PyObject *__pyx_pw_14netfilterqueue_6Packet_17accept(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_14netfilterqueue_6Packet_19accept(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_14netfilterqueue_6Packet_18accept[] = "Accept the packet."; +static PyObject *__pyx_pw_14netfilterqueue_6Packet_19accept(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("accept (wrapper)", 0); - __pyx_r = __pyx_pf_14netfilterqueue_6Packet_16accept(((struct __pyx_obj_14netfilterqueue_Packet *)__pyx_v_self)); + __pyx_r = __pyx_pf_14netfilterqueue_6Packet_18accept(((struct __pyx_obj_14netfilterqueue_Packet *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_14netfilterqueue_6Packet_16accept(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self) { +static PyObject *__pyx_pf_14netfilterqueue_6Packet_18accept(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("accept", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_14netfilterqueue_6Packet_accept(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_t_1 = __pyx_f_14netfilterqueue_6Packet_accept(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -3093,7 +3170,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_16accept(struct __pyx_obj_14n return __pyx_r; } -/* "netfilterqueue.pyx":129 +/* "netfilterqueue.pyx":140 * self.verdict(NF_ACCEPT) * * cpdef drop(self): # <<<<<<<<<<<<<< @@ -3101,7 +3178,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_16accept(struct __pyx_obj_14n * self.verdict(NF_DROP) */ -static PyObject *__pyx_pw_14netfilterqueue_6Packet_19drop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_14netfilterqueue_6Packet_21drop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_14netfilterqueue_6Packet_drop(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -3109,14 +3186,17 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_drop(struct __pyx_obj_14netfil PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("drop", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_drop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_drop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_19drop)) { + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_21drop)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; @@ -3130,10 +3210,10 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_drop(struct __pyx_obj_14netfil } } if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 129, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 129, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -3145,7 +3225,7 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_drop(struct __pyx_obj_14netfil __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "netfilterqueue.pyx":131 + /* "netfilterqueue.pyx":142 * cpdef drop(self): * """Drop the packet.""" * self.verdict(NF_DROP) # <<<<<<<<<<<<<< @@ -3154,7 +3234,7 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_drop(struct __pyx_obj_14netfil */ ((struct __pyx_vtabstruct_14netfilterqueue_Packet *)__pyx_v_self->__pyx_vtab)->verdict(__pyx_v_self, __pyx_e_14netfilterqueue_NF_DROP); - /* "netfilterqueue.pyx":129 + /* "netfilterqueue.pyx":140 * self.verdict(NF_ACCEPT) * * cpdef drop(self): # <<<<<<<<<<<<<< @@ -3179,26 +3259,29 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_drop(struct __pyx_obj_14netfil } /* Python wrapper */ -static PyObject *__pyx_pw_14netfilterqueue_6Packet_19drop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_14netfilterqueue_6Packet_18drop[] = "Drop the packet."; -static PyObject *__pyx_pw_14netfilterqueue_6Packet_19drop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_14netfilterqueue_6Packet_21drop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_14netfilterqueue_6Packet_20drop[] = "Drop the packet."; +static PyObject *__pyx_pw_14netfilterqueue_6Packet_21drop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("drop (wrapper)", 0); - __pyx_r = __pyx_pf_14netfilterqueue_6Packet_18drop(((struct __pyx_obj_14netfilterqueue_Packet *)__pyx_v_self)); + __pyx_r = __pyx_pf_14netfilterqueue_6Packet_20drop(((struct __pyx_obj_14netfilterqueue_Packet *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_14netfilterqueue_6Packet_18drop(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self) { +static PyObject *__pyx_pf_14netfilterqueue_6Packet_20drop(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("drop", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_14netfilterqueue_6Packet_drop(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error) + __pyx_t_1 = __pyx_f_14netfilterqueue_6Packet_drop(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -3215,7 +3298,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_18drop(struct __pyx_obj_14net return __pyx_r; } -/* "netfilterqueue.pyx":133 +/* "netfilterqueue.pyx":144 * self.verdict(NF_DROP) * * cpdef repeat(self): # <<<<<<<<<<<<<< @@ -3223,7 +3306,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_18drop(struct __pyx_obj_14net * self.verdict(NF_REPEAT) */ -static PyObject *__pyx_pw_14netfilterqueue_6Packet_21repeat(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_14netfilterqueue_6Packet_23repeat(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_14netfilterqueue_6Packet_repeat(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -3231,14 +3314,17 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_repeat(struct __pyx_obj_14netf PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("repeat", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_repeat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_repeat); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_21repeat)) { + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_23repeat)) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; @@ -3252,10 +3338,10 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_repeat(struct __pyx_obj_14netf } } if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -3267,7 +3353,7 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_repeat(struct __pyx_obj_14netf __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "netfilterqueue.pyx":135 + /* "netfilterqueue.pyx":146 * cpdef repeat(self): * """Repeat the packet.""" * self.verdict(NF_REPEAT) # <<<<<<<<<<<<<< @@ -3276,7 +3362,7 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_repeat(struct __pyx_obj_14netf */ ((struct __pyx_vtabstruct_14netfilterqueue_Packet *)__pyx_v_self->__pyx_vtab)->verdict(__pyx_v_self, __pyx_e_14netfilterqueue_NF_REPEAT); - /* "netfilterqueue.pyx":133 + /* "netfilterqueue.pyx":144 * self.verdict(NF_DROP) * * cpdef repeat(self): # <<<<<<<<<<<<<< @@ -3301,26 +3387,29 @@ static PyObject *__pyx_f_14netfilterqueue_6Packet_repeat(struct __pyx_obj_14netf } /* Python wrapper */ -static PyObject *__pyx_pw_14netfilterqueue_6Packet_21repeat(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_14netfilterqueue_6Packet_20repeat[] = "Repeat the packet."; -static PyObject *__pyx_pw_14netfilterqueue_6Packet_21repeat(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_14netfilterqueue_6Packet_23repeat(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_14netfilterqueue_6Packet_22repeat[] = "Repeat the packet."; +static PyObject *__pyx_pw_14netfilterqueue_6Packet_23repeat(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("repeat (wrapper)", 0); - __pyx_r = __pyx_pf_14netfilterqueue_6Packet_20repeat(((struct __pyx_obj_14netfilterqueue_Packet *)__pyx_v_self)); + __pyx_r = __pyx_pf_14netfilterqueue_6Packet_22repeat(((struct __pyx_obj_14netfilterqueue_Packet *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_14netfilterqueue_6Packet_20repeat(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self) { +static PyObject *__pyx_pf_14netfilterqueue_6Packet_22repeat(struct __pyx_obj_14netfilterqueue_Packet *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("repeat", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_14netfilterqueue_6Packet_repeat(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_1 = __pyx_f_14netfilterqueue_6Packet_repeat(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -3337,7 +3426,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_20repeat(struct __pyx_obj_14n return __pyx_r; } -/* "netfilterqueue.pxd":180 +/* "netfilterqueue.pxd":181 * * # From NFQ packet header: * cdef readonly u_int32_t id # <<<<<<<<<<<<<< @@ -3362,9 +3451,12 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_2id___get__(struct __pyx_obj_ PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_u_int32_t(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 180, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_u_int32_t(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -3381,7 +3473,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_2id___get__(struct __pyx_obj_ return __pyx_r; } -/* "netfilterqueue.pxd":181 +/* "netfilterqueue.pxd":182 * # From NFQ packet header: * cdef readonly u_int32_t id * cdef readonly u_int16_t hw_protocol # <<<<<<<<<<<<<< @@ -3406,9 +3498,12 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_11hw_protocol___get__(struct PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_u_int16_t(__pyx_v_self->hw_protocol); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 181, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_u_int16_t(__pyx_v_self->hw_protocol); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -3425,7 +3520,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_11hw_protocol___get__(struct return __pyx_r; } -/* "netfilterqueue.pxd":182 +/* "netfilterqueue.pxd":183 * cdef readonly u_int32_t id * cdef readonly u_int16_t hw_protocol * cdef readonly u_int8_t hook # <<<<<<<<<<<<<< @@ -3450,9 +3545,12 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_4hook___get__(struct __pyx_ob PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_u_int8_t(__pyx_v_self->hook); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 182, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_u_int8_t(__pyx_v_self->hook); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -3469,7 +3567,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_4hook___get__(struct __pyx_ob return __pyx_r; } -/* "netfilterqueue.pxd":183 +/* "netfilterqueue.pxd":184 * cdef readonly u_int16_t hw_protocol * cdef readonly u_int8_t hook * cdef readonly u_int32_t mark # <<<<<<<<<<<<<< @@ -3494,9 +3592,12 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_4mark___get__(struct __pyx_ob PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_u_int32_t(__pyx_v_self->mark); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 183, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_u_int32_t(__pyx_v_self->mark); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -3513,12 +3614,12 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_4mark___get__(struct __pyx_ob return __pyx_r; } -/* "netfilterqueue.pxd":187 +/* "netfilterqueue.pxd":188 * # Packet details: * cdef Py_ssize_t payload_len * cdef readonly char *payload # <<<<<<<<<<<<<< * cdef timeval timestamp - * # TODO: implement these + * cdef u_int8_t hw_addr[8] */ /* Python wrapper */ @@ -3538,9 +3639,12 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_7payload___get__(struct __pyx PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->payload); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 187, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->payload); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -3557,7 +3661,7 @@ static PyObject *__pyx_pf_14netfilterqueue_6Packet_7payload___get__(struct __pyx return __pyx_r; } -/* "netfilterqueue.pyx":139 +/* "netfilterqueue.pyx":150 * cdef class NetfilterQueue: * """Handle a single numbered queue.""" * def __cinit__(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -3594,25 +3698,28 @@ static int __pyx_pf_14netfilterqueue_14NetfilterQueue___cinit__(struct __pyx_obj PyObject *__pyx_t_2 = NULL; u_int16_t __pyx_t_3; int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "netfilterqueue.pyx":140 + /* "netfilterqueue.pyx":151 * """Handle a single numbered queue.""" * def __cinit__(self, *args, **kwargs): * self.af = kwargs.get("af", PF_INET) # <<<<<<<<<<<<<< * * self.h = nfq_open() */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_14netfilterqueue_PF_INET); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_14netfilterqueue_PF_INET); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwargs, __pyx_n_s_af, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwargs, __pyx_n_s_af, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyInt_As_u_int16_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (u_int16_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_u_int16_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (u_int16_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->af = __pyx_t_3; - /* "netfilterqueue.pyx":142 + /* "netfilterqueue.pyx":153 * self.af = kwargs.get("af", PF_INET) * * self.h = nfq_open() # <<<<<<<<<<<<<< @@ -3621,7 +3728,7 @@ static int __pyx_pf_14netfilterqueue_14NetfilterQueue___cinit__(struct __pyx_obj */ __pyx_v_self->h = nfq_open(); - /* "netfilterqueue.pyx":143 + /* "netfilterqueue.pyx":154 * * self.h = nfq_open() * if self.h == NULL: # <<<<<<<<<<<<<< @@ -3631,20 +3738,20 @@ static int __pyx_pf_14netfilterqueue_14NetfilterQueue___cinit__(struct __pyx_obj __pyx_t_4 = ((__pyx_v_self->h == NULL) != 0); if (__pyx_t_4) { - /* "netfilterqueue.pyx":144 + /* "netfilterqueue.pyx":155 * self.h = nfq_open() * if self.h == NULL: * raise OSError("Failed to open NFQueue.") # <<<<<<<<<<<<<< * nfq_unbind_pf(self.h, self.af) # This does NOT kick out previous * # running queues */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 144, __pyx_L1_error) + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "netfilterqueue.pyx":143 + /* "netfilterqueue.pyx":154 * * self.h = nfq_open() * if self.h == NULL: # <<<<<<<<<<<<<< @@ -3653,7 +3760,7 @@ static int __pyx_pf_14netfilterqueue_14NetfilterQueue___cinit__(struct __pyx_obj */ } - /* "netfilterqueue.pyx":145 + /* "netfilterqueue.pyx":156 * if self.h == NULL: * raise OSError("Failed to open NFQueue.") * nfq_unbind_pf(self.h, self.af) # This does NOT kick out previous # <<<<<<<<<<<<<< @@ -3662,7 +3769,7 @@ static int __pyx_pf_14netfilterqueue_14NetfilterQueue___cinit__(struct __pyx_obj */ nfq_unbind_pf(__pyx_v_self->h, __pyx_v_self->af); - /* "netfilterqueue.pyx":147 + /* "netfilterqueue.pyx":158 * nfq_unbind_pf(self.h, self.af) # This does NOT kick out previous * # running queues * if nfq_bind_pf(self.h, self.af) < 0: # <<<<<<<<<<<<<< @@ -3672,31 +3779,31 @@ static int __pyx_pf_14netfilterqueue_14NetfilterQueue___cinit__(struct __pyx_obj __pyx_t_4 = ((nfq_bind_pf(__pyx_v_self->h, __pyx_v_self->af) < 0) != 0); if (__pyx_t_4) { - /* "netfilterqueue.pyx":148 + /* "netfilterqueue.pyx":159 * # running queues * if nfq_bind_pf(self.h, self.af) < 0: * raise OSError("Failed to bind family %s. Are you root?" % self.af) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ - __pyx_t_2 = __Pyx_PyInt_From_u_int16_t(__pyx_v_self->af); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 148, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_u_int16_t(__pyx_v_self->af); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Failed_to_bind_family_s_Are_you, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Failed_to_bind_family_s_Are_you, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 148, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 148, __pyx_L1_error) + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "netfilterqueue.pyx":147 + /* "netfilterqueue.pyx":158 * nfq_unbind_pf(self.h, self.af) # This does NOT kick out previous * # running queues * if nfq_bind_pf(self.h, self.af) < 0: # <<<<<<<<<<<<<< @@ -3705,7 +3812,7 @@ static int __pyx_pf_14netfilterqueue_14NetfilterQueue___cinit__(struct __pyx_obj */ } - /* "netfilterqueue.pyx":139 + /* "netfilterqueue.pyx":150 * cdef class NetfilterQueue: * """Handle a single numbered queue.""" * def __cinit__(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -3726,7 +3833,7 @@ static int __pyx_pf_14netfilterqueue_14NetfilterQueue___cinit__(struct __pyx_obj return __pyx_r; } -/* "netfilterqueue.pyx":150 +/* "netfilterqueue.pyx":161 * raise OSError("Failed to bind family %s. Are you root?" % self.af) * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -3750,7 +3857,7 @@ static void __pyx_pf_14netfilterqueue_14NetfilterQueue_2__dealloc__(struct __pyx int __pyx_t_1; __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "netfilterqueue.pyx":151 + /* "netfilterqueue.pyx":162 * * def __dealloc__(self): * if self.qh != NULL: # <<<<<<<<<<<<<< @@ -3760,7 +3867,7 @@ static void __pyx_pf_14netfilterqueue_14NetfilterQueue_2__dealloc__(struct __pyx __pyx_t_1 = ((__pyx_v_self->qh != NULL) != 0); if (__pyx_t_1) { - /* "netfilterqueue.pyx":152 + /* "netfilterqueue.pyx":163 * def __dealloc__(self): * if self.qh != NULL: * nfq_destroy_queue(self.qh) # <<<<<<<<<<<<<< @@ -3769,7 +3876,7 @@ static void __pyx_pf_14netfilterqueue_14NetfilterQueue_2__dealloc__(struct __pyx */ nfq_destroy_queue(__pyx_v_self->qh); - /* "netfilterqueue.pyx":151 + /* "netfilterqueue.pyx":162 * * def __dealloc__(self): * if self.qh != NULL: # <<<<<<<<<<<<<< @@ -3778,7 +3885,7 @@ static void __pyx_pf_14netfilterqueue_14NetfilterQueue_2__dealloc__(struct __pyx */ } - /* "netfilterqueue.pyx":155 + /* "netfilterqueue.pyx":166 * # Don't call nfq_unbind_pf unless you want to disconnect any other * # processes using this libnetfilter_queue on this protocol family! * nfq_close(self.h) # <<<<<<<<<<<<<< @@ -3787,7 +3894,7 @@ static void __pyx_pf_14netfilterqueue_14NetfilterQueue_2__dealloc__(struct __pyx */ nfq_close(__pyx_v_self->h); - /* "netfilterqueue.pyx":150 + /* "netfilterqueue.pyx":161 * raise OSError("Failed to bind family %s. Are you root?" % self.af) * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -3799,7 +3906,7 @@ static void __pyx_pf_14netfilterqueue_14NetfilterQueue_2__dealloc__(struct __pyx __Pyx_RefNannyFinishContext(); } -/* "netfilterqueue.pyx":157 +/* "netfilterqueue.pyx":168 * nfq_close(self.h) * * def bind(self, int queue_num, object user_callback, # <<<<<<<<<<<<<< @@ -3817,6 +3924,9 @@ static PyObject *__pyx_pw_14netfilterqueue_14NetfilterQueue_5bind(PyObject *__py u_int8_t __pyx_v_mode; u_int32_t __pyx_v_range; u_int32_t __pyx_v_sock_len; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("bind (wrapper)", 0); @@ -3844,7 +3954,7 @@ static PyObject *__pyx_pw_14netfilterqueue_14NetfilterQueue_5bind(PyObject *__py case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_user_callback)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("bind", 0, 2, 6, 1); __PYX_ERR(0, 157, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("bind", 0, 2, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { @@ -3868,7 +3978,7 @@ static PyObject *__pyx_pw_14netfilterqueue_14NetfilterQueue_5bind(PyObject *__py } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bind") < 0)) __PYX_ERR(0, 157, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bind") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -3882,32 +3992,32 @@ static PyObject *__pyx_pw_14netfilterqueue_14NetfilterQueue_5bind(PyObject *__py default: goto __pyx_L5_argtuple_error; } } - __pyx_v_queue_num = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_queue_num == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 157, __pyx_L3_error) + __pyx_v_queue_num = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_queue_num == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_user_callback = values[1]; if (values[2]) { - __pyx_v_max_len = __Pyx_PyInt_As_u_int32_t(values[2]); if (unlikely((__pyx_v_max_len == (u_int32_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 158, __pyx_L3_error) + __pyx_v_max_len = __Pyx_PyInt_As_u_int32_t(values[2]); if (unlikely((__pyx_v_max_len == (u_int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_max_len = ((u_int32_t)0x400); } if (values[3]) { - __pyx_v_mode = __Pyx_PyInt_As_u_int8_t(values[3]); if (unlikely((__pyx_v_mode == (u_int8_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 159, __pyx_L3_error) + __pyx_v_mode = __Pyx_PyInt_As_u_int8_t(values[3]); if (unlikely((__pyx_v_mode == (u_int8_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_mode = __pyx_k__4; } if (values[4]) { - __pyx_v_range = __Pyx_PyInt_As_u_int32_t(values[4]); if (unlikely((__pyx_v_range == (u_int32_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 160, __pyx_L3_error) + __pyx_v_range = __Pyx_PyInt_As_u_int32_t(values[4]); if (unlikely((__pyx_v_range == (u_int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_range = ((u_int32_t)0xFFFF); } if (values[5]) { - __pyx_v_sock_len = __Pyx_PyInt_As_u_int32_t(values[5]); if (unlikely((__pyx_v_sock_len == (u_int32_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 161, __pyx_L3_error) + __pyx_v_sock_len = __Pyx_PyInt_As_u_int32_t(values[5]); if (unlikely((__pyx_v_sock_len == (u_int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_sock_len = ((u_int32_t)0x257800); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("bind", 0, 2, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 157, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("bind", 0, 2, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("netfilterqueue.NetfilterQueue.bind", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3928,9 +4038,12 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_4bind(struct __pyx_o PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("bind", 0); - /* "netfilterqueue.pyx":164 + /* "netfilterqueue.pyx":175 * """Create and bind to a new queue.""" * cdef unsigned int newsiz * self.user_callback = user_callback # <<<<<<<<<<<<<< @@ -3943,7 +4056,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_4bind(struct __pyx_o __Pyx_DECREF(__pyx_v_self->user_callback); __pyx_v_self->user_callback = __pyx_v_user_callback; - /* "netfilterqueue.pyx":165 + /* "netfilterqueue.pyx":176 * cdef unsigned int newsiz * self.user_callback = user_callback * self.qh = nfq_create_queue(self.h, queue_num, # <<<<<<<<<<<<<< @@ -3952,7 +4065,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_4bind(struct __pyx_o */ __pyx_v_self->qh = nfq_create_queue(__pyx_v_self->h, __pyx_v_queue_num, ((nfq_callback *)__pyx_f_14netfilterqueue_global_callback), ((void *)__pyx_v_self)); - /* "netfilterqueue.pyx":167 + /* "netfilterqueue.pyx":178 * self.qh = nfq_create_queue(self.h, queue_num, * global_callback, self) * if self.qh == NULL: # <<<<<<<<<<<<<< @@ -3962,31 +4075,31 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_4bind(struct __pyx_o __pyx_t_1 = ((__pyx_v_self->qh == NULL) != 0); if (__pyx_t_1) { - /* "netfilterqueue.pyx":168 + /* "netfilterqueue.pyx":179 * global_callback, self) * if self.qh == NULL: * raise OSError("Failed to create queue %s." % queue_num) # <<<<<<<<<<<<<< * * if range > MaxCopySize: */ - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_queue_num); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_queue_num); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Failed_to_create_queue_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Failed_to_create_queue_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 168, __pyx_L1_error) + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "netfilterqueue.pyx":167 + /* "netfilterqueue.pyx":178 * self.qh = nfq_create_queue(self.h, queue_num, * global_callback, self) * if self.qh == NULL: # <<<<<<<<<<<<<< @@ -3995,7 +4108,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_4bind(struct __pyx_o */ } - /* "netfilterqueue.pyx":170 + /* "netfilterqueue.pyx":181 * raise OSError("Failed to create queue %s." % queue_num) * * if range > MaxCopySize: # <<<<<<<<<<<<<< @@ -4005,7 +4118,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_4bind(struct __pyx_o __pyx_t_1 = ((__pyx_v_range > 0xFB0) != 0); if (__pyx_t_1) { - /* "netfilterqueue.pyx":171 + /* "netfilterqueue.pyx":182 * * if range > MaxCopySize: * range = MaxCopySize # <<<<<<<<<<<<<< @@ -4014,7 +4127,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_4bind(struct __pyx_o */ __pyx_v_range = 0xFB0; - /* "netfilterqueue.pyx":170 + /* "netfilterqueue.pyx":181 * raise OSError("Failed to create queue %s." % queue_num) * * if range > MaxCopySize: # <<<<<<<<<<<<<< @@ -4023,7 +4136,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_4bind(struct __pyx_o */ } - /* "netfilterqueue.pyx":172 + /* "netfilterqueue.pyx":183 * if range > MaxCopySize: * range = MaxCopySize * if nfq_set_mode(self.qh, mode, range) < 0: # <<<<<<<<<<<<<< @@ -4033,20 +4146,20 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_4bind(struct __pyx_o __pyx_t_1 = ((nfq_set_mode(__pyx_v_self->qh, __pyx_v_mode, __pyx_v_range) < 0) != 0); if (__pyx_t_1) { - /* "netfilterqueue.pyx":173 + /* "netfilterqueue.pyx":184 * range = MaxCopySize * if nfq_set_mode(self.qh, mode, range) < 0: * raise OSError("Failed to set packet copy mode.") # <<<<<<<<<<<<<< * * nfq_set_queue_maxlen(self.qh, max_len) */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 173, __pyx_L1_error) + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "netfilterqueue.pyx":172 + /* "netfilterqueue.pyx":183 * if range > MaxCopySize: * range = MaxCopySize * if nfq_set_mode(self.qh, mode, range) < 0: # <<<<<<<<<<<<<< @@ -4055,7 +4168,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_4bind(struct __pyx_o */ } - /* "netfilterqueue.pyx":175 + /* "netfilterqueue.pyx":186 * raise OSError("Failed to set packet copy mode.") * * nfq_set_queue_maxlen(self.qh, max_len) # <<<<<<<<<<<<<< @@ -4064,7 +4177,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_4bind(struct __pyx_o */ nfq_set_queue_maxlen(__pyx_v_self->qh, __pyx_v_max_len); - /* "netfilterqueue.pyx":177 + /* "netfilterqueue.pyx":188 * nfq_set_queue_maxlen(self.qh, max_len) * * newsiz = nfnl_rcvbufsiz(nfq_nfnlh(self.h),sock_len) # <<<<<<<<<<<<<< @@ -4073,7 +4186,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_4bind(struct __pyx_o */ __pyx_v_newsiz = nfnl_rcvbufsiz(nfq_nfnlh(__pyx_v_self->h), __pyx_v_sock_len); - /* "netfilterqueue.pyx":178 + /* "netfilterqueue.pyx":189 * * newsiz = nfnl_rcvbufsiz(nfq_nfnlh(self.h),sock_len) * if newsiz != sock_len*2: # <<<<<<<<<<<<<< @@ -4083,18 +4196,18 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_4bind(struct __pyx_o __pyx_t_1 = ((__pyx_v_newsiz != (__pyx_v_sock_len * 2)) != 0); if (__pyx_t_1) { - /* "netfilterqueue.pyx":179 + /* "netfilterqueue.pyx":190 * newsiz = nfnl_rcvbufsiz(nfq_nfnlh(self.h),sock_len) * if newsiz != sock_len*2: * raise RuntimeWarning("Socket rcvbuf limit is now %d, requested %d." % (newsiz,sock_len)) # <<<<<<<<<<<<<< * * def unbind(self): */ - __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_newsiz); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_newsiz); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyInt_From_u_int32_t(__pyx_v_sock_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_u_int32_t(__pyx_v_sock_len); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 179, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); @@ -4102,22 +4215,22 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_4bind(struct __pyx_o PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_3 = 0; __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Socket_rcvbuf_limit_is_now_d_req, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Socket_rcvbuf_limit_is_now_d_req, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 179, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeWarning, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeWarning, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 179, __pyx_L1_error) + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "netfilterqueue.pyx":178 + /* "netfilterqueue.pyx":189 * * newsiz = nfnl_rcvbufsiz(nfq_nfnlh(self.h),sock_len) * if newsiz != sock_len*2: # <<<<<<<<<<<<<< @@ -4126,7 +4239,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_4bind(struct __pyx_o */ } - /* "netfilterqueue.pyx":157 + /* "netfilterqueue.pyx":168 * nfq_close(self.h) * * def bind(self, int queue_num, object user_callback, # <<<<<<<<<<<<<< @@ -4149,7 +4262,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_4bind(struct __pyx_o return __pyx_r; } -/* "netfilterqueue.pyx":181 +/* "netfilterqueue.pyx":192 * raise RuntimeWarning("Socket rcvbuf limit is now %d, requested %d." % (newsiz,sock_len)) * * def unbind(self): # <<<<<<<<<<<<<< @@ -4177,7 +4290,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_6unbind(struct __pyx int __pyx_t_1; __Pyx_RefNannySetupContext("unbind", 0); - /* "netfilterqueue.pyx":183 + /* "netfilterqueue.pyx":194 * def unbind(self): * """Destroy the queue.""" * if self.qh != NULL: # <<<<<<<<<<<<<< @@ -4187,7 +4300,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_6unbind(struct __pyx __pyx_t_1 = ((__pyx_v_self->qh != NULL) != 0); if (__pyx_t_1) { - /* "netfilterqueue.pyx":184 + /* "netfilterqueue.pyx":195 * """Destroy the queue.""" * if self.qh != NULL: * nfq_destroy_queue(self.qh) # <<<<<<<<<<<<<< @@ -4196,7 +4309,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_6unbind(struct __pyx */ nfq_destroy_queue(__pyx_v_self->qh); - /* "netfilterqueue.pyx":183 + /* "netfilterqueue.pyx":194 * def unbind(self): * """Destroy the queue.""" * if self.qh != NULL: # <<<<<<<<<<<<<< @@ -4205,7 +4318,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_6unbind(struct __pyx */ } - /* "netfilterqueue.pyx":185 + /* "netfilterqueue.pyx":196 * if self.qh != NULL: * nfq_destroy_queue(self.qh) * self.qh = NULL # <<<<<<<<<<<<<< @@ -4214,7 +4327,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_6unbind(struct __pyx */ __pyx_v_self->qh = NULL; - /* "netfilterqueue.pyx":181 + /* "netfilterqueue.pyx":192 * raise RuntimeWarning("Socket rcvbuf limit is now %d, requested %d." % (newsiz,sock_len)) * * def unbind(self): # <<<<<<<<<<<<<< @@ -4229,7 +4342,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_6unbind(struct __pyx return __pyx_r; } -/* "netfilterqueue.pyx":188 +/* "netfilterqueue.pyx":199 * # See warning about nfq_unbind_pf in __dealloc__ above. * * def get_fd(self): # <<<<<<<<<<<<<< @@ -4255,9 +4368,12 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_8get_fd(struct __pyx PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_fd", 0); - /* "netfilterqueue.pyx":190 + /* "netfilterqueue.pyx":201 * def get_fd(self): * """Get the file descriptor of the queue handler.""" * return nfq_fd(self.h) # <<<<<<<<<<<<<< @@ -4265,13 +4381,13 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_8get_fd(struct __pyx * def run(self, block=True): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(nfq_fd(__pyx_v_self->h)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(nfq_fd(__pyx_v_self->h)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "netfilterqueue.pyx":188 + /* "netfilterqueue.pyx":199 * # See warning about nfq_unbind_pf in __dealloc__ above. * * def get_fd(self): # <<<<<<<<<<<<<< @@ -4290,7 +4406,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_8get_fd(struct __pyx return __pyx_r; } -/* "netfilterqueue.pyx":192 +/* "netfilterqueue.pyx":203 * return nfq_fd(self.h) * * def run(self, block=True): # <<<<<<<<<<<<<< @@ -4303,6 +4419,9 @@ static PyObject *__pyx_pw_14netfilterqueue_14NetfilterQueue_11run(PyObject *__py static char __pyx_doc_14netfilterqueue_14NetfilterQueue_10run[] = "Accept packets using recv."; static PyObject *__pyx_pw_14netfilterqueue_14NetfilterQueue_11run(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_block = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("run (wrapper)", 0); @@ -4327,7 +4446,7 @@ static PyObject *__pyx_pw_14netfilterqueue_14NetfilterQueue_11run(PyObject *__py } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "run") < 0)) __PYX_ERR(0, 192, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "run") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -4340,7 +4459,7 @@ static PyObject *__pyx_pw_14netfilterqueue_14NetfilterQueue_11run(PyObject *__py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("run", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 192, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("run", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("netfilterqueue.NetfilterQueue.run", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -4365,16 +4484,19 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_10run(struct __pyx_o PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("run", 0); - /* "netfilterqueue.pyx":194 + /* "netfilterqueue.pyx":205 * def run(self, block=True): * """Accept packets using recv.""" * cdef int fd = self.get_fd() # <<<<<<<<<<<<<< * cdef char buf[BufferSize] * cdef int rv */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_fd); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -4387,25 +4509,25 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_10run(struct __pyx_o } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_fd = __pyx_t_4; - /* "netfilterqueue.pyx":198 + /* "netfilterqueue.pyx":209 * cdef int rv * cdef int recv_flags * recv_flags = 0 if block else MSG_DONTWAIT # <<<<<<<<<<<<<< * * while True: */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_block); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 198, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_block); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_5) { __pyx_t_4 = 0; } else { @@ -4413,7 +4535,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_10run(struct __pyx_o } __pyx_v_recv_flags = __pyx_t_4; - /* "netfilterqueue.pyx":200 + /* "netfilterqueue.pyx":211 * recv_flags = 0 if block else MSG_DONTWAIT * * while True: # <<<<<<<<<<<<<< @@ -4422,7 +4544,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_10run(struct __pyx_o */ while (1) { - /* "netfilterqueue.pyx":201 + /* "netfilterqueue.pyx":212 * * while True: * with nogil: # <<<<<<<<<<<<<< @@ -4436,7 +4558,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_10run(struct __pyx_o #endif /*try:*/ { - /* "netfilterqueue.pyx":202 + /* "netfilterqueue.pyx":213 * while True: * with nogil: * rv = recv(fd, buf, sizeof(buf), recv_flags) # <<<<<<<<<<<<<< @@ -4446,7 +4568,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_10run(struct __pyx_o __pyx_v_rv = recv(__pyx_v_fd, __pyx_v_buf, (sizeof(__pyx_v_buf)), __pyx_v_recv_flags); } - /* "netfilterqueue.pyx":201 + /* "netfilterqueue.pyx":212 * * while True: * with nogil: # <<<<<<<<<<<<<< @@ -4464,7 +4586,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_10run(struct __pyx_o } } - /* "netfilterqueue.pyx":203 + /* "netfilterqueue.pyx":214 * with nogil: * rv = recv(fd, buf, sizeof(buf), recv_flags) * if (rv >= 0): # <<<<<<<<<<<<<< @@ -4474,7 +4596,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_10run(struct __pyx_o __pyx_t_5 = ((__pyx_v_rv >= 0) != 0); if (__pyx_t_5) { - /* "netfilterqueue.pyx":204 + /* "netfilterqueue.pyx":215 * rv = recv(fd, buf, sizeof(buf), recv_flags) * if (rv >= 0): * nfq_handle_packet(self.h, buf, rv) # <<<<<<<<<<<<<< @@ -4483,7 +4605,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_10run(struct __pyx_o */ nfq_handle_packet(__pyx_v_self->h, __pyx_v_buf, __pyx_v_rv); - /* "netfilterqueue.pyx":203 + /* "netfilterqueue.pyx":214 * with nogil: * rv = recv(fd, buf, sizeof(buf), recv_flags) * if (rv >= 0): # <<<<<<<<<<<<<< @@ -4493,7 +4615,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_10run(struct __pyx_o goto __pyx_L10; } - /* "netfilterqueue.pyx":206 + /* "netfilterqueue.pyx":217 * nfq_handle_packet(self.h, buf, rv) * else: * if errno != ENOBUFS: # <<<<<<<<<<<<<< @@ -4504,7 +4626,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_10run(struct __pyx_o __pyx_t_5 = ((errno != __pyx_e_14netfilterqueue_ENOBUFS) != 0); if (__pyx_t_5) { - /* "netfilterqueue.pyx":207 + /* "netfilterqueue.pyx":218 * else: * if errno != ENOBUFS: * break # <<<<<<<<<<<<<< @@ -4513,7 +4635,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_10run(struct __pyx_o */ goto __pyx_L4_break; - /* "netfilterqueue.pyx":206 + /* "netfilterqueue.pyx":217 * nfq_handle_packet(self.h, buf, rv) * else: * if errno != ENOBUFS: # <<<<<<<<<<<<<< @@ -4526,7 +4648,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_10run(struct __pyx_o } __pyx_L4_break:; - /* "netfilterqueue.pyx":192 + /* "netfilterqueue.pyx":203 * return nfq_fd(self.h) * * def run(self, block=True): # <<<<<<<<<<<<<< @@ -4549,7 +4671,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_10run(struct __pyx_o return __pyx_r; } -/* "netfilterqueue.pyx":209 +/* "netfilterqueue.pyx":220 * break * * def run_socket(self, s): # <<<<<<<<<<<<<< @@ -4591,9 +4713,12 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_12run_socket(struct PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("run_socket", 0); - /* "netfilterqueue.pyx":211 + /* "netfilterqueue.pyx":222 * def run_socket(self, s): * """Accept packets using socket.recv so that, for example, gevent can monkeypatch it.""" * while True: # <<<<<<<<<<<<<< @@ -4602,7 +4727,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_12run_socket(struct */ while (1) { - /* "netfilterqueue.pyx":212 + /* "netfilterqueue.pyx":223 * """Accept packets using socket.recv so that, for example, gevent can monkeypatch it.""" * while True: * try: # <<<<<<<<<<<<<< @@ -4610,40 +4735,38 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_12run_socket(struct * rv = len(buf) */ { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "netfilterqueue.pyx":213 + /* "netfilterqueue.pyx":224 * while True: * try: * buf = s.recv(BufferSize) # <<<<<<<<<<<<<< * rv = len(buf) * if rv >= 0: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_recv); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 213, __pyx_L5_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_recv); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 213, __pyx_L5_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_buf, __pyx_t_5); __pyx_t_5 = 0; - /* "netfilterqueue.pyx":214 + /* "netfilterqueue.pyx":225 * try: * buf = s.recv(BufferSize) * rv = len(buf) # <<<<<<<<<<<<<< * if rv >= 0: * nfq_handle_packet(self.h, buf, rv) */ - __pyx_t_6 = PyObject_Length(__pyx_v_buf); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 214, __pyx_L5_error) + __pyx_t_6 = PyObject_Length(__pyx_v_buf); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __pyx_v_rv = __pyx_t_6; - /* "netfilterqueue.pyx":215 + /* "netfilterqueue.pyx":226 * buf = s.recv(BufferSize) * rv = len(buf) * if rv >= 0: # <<<<<<<<<<<<<< @@ -4653,17 +4776,17 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_12run_socket(struct __pyx_t_7 = ((__pyx_v_rv >= 0) != 0); if (__pyx_t_7) { - /* "netfilterqueue.pyx":216 + /* "netfilterqueue.pyx":227 * rv = len(buf) * if rv >= 0: * nfq_handle_packet(self.h, buf, rv) # <<<<<<<<<<<<<< * else: * break */ - __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_buf); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 216, __pyx_L5_error) + __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_buf); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L5_error;} nfq_handle_packet(__pyx_v_self->h, __pyx_t_8, __pyx_v_rv); - /* "netfilterqueue.pyx":215 + /* "netfilterqueue.pyx":226 * buf = s.recv(BufferSize) * rv = len(buf) * if rv >= 0: # <<<<<<<<<<<<<< @@ -4673,7 +4796,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_12run_socket(struct goto __pyx_L13; } - /* "netfilterqueue.pyx":218 + /* "netfilterqueue.pyx":229 * nfq_handle_packet(self.h, buf, rv) * else: * break # <<<<<<<<<<<<<< @@ -4685,7 +4808,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_12run_socket(struct } __pyx_L13:; - /* "netfilterqueue.pyx":212 + /* "netfilterqueue.pyx":223 * """Accept packets using socket.recv so that, for example, gevent can monkeypatch it.""" * while True: * try: # <<<<<<<<<<<<<< @@ -4698,64 +4821,63 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_12run_socket(struct __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L12_try_end; __pyx_L5_error:; - __Pyx_PyThreadState_assign __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "netfilterqueue.pyx":219 + /* "netfilterqueue.pyx":230 * else: * break * except socket.error as e: # <<<<<<<<<<<<<< * err = e.args[0] * if err == ENOBUFS: */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 219, __pyx_L7_except_error) + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_socket); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 219, __pyx_L7_except_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_t_4); + __pyx_t_9 = PyErr_ExceptionMatches(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_9) { __Pyx_AddTraceback("netfilterqueue.NetfilterQueue.run_socket", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_10) < 0) __PYX_ERR(0, 219, __pyx_L7_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_5); - /* "netfilterqueue.pyx":220 + /* "netfilterqueue.pyx":231 * break * except socket.error as e: * err = e.args[0] # <<<<<<<<<<<<<< * if err == ENOBUFS: * continue */ - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 220, __pyx_L7_except_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 220, __pyx_L7_except_error) + __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}; __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF_SET(__pyx_v_err, __pyx_t_12); __pyx_t_12 = 0; - /* "netfilterqueue.pyx":221 + /* "netfilterqueue.pyx":232 * except socket.error as e: * err = e.args[0] * if err == ENOBUFS: # <<<<<<<<<<<<<< * continue * elif err == EAGAIN or err == EWOULDBLOCK: */ - __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_e_14netfilterqueue_ENOBUFS); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 221, __pyx_L7_except_error) + __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_e_14netfilterqueue_ENOBUFS); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_12); - __pyx_t_11 = PyObject_RichCompare(__pyx_v_err, __pyx_t_12, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 221, __pyx_L7_except_error) + __pyx_t_11 = PyObject_RichCompare(__pyx_v_err, __pyx_t_12, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 221, __pyx_L7_except_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_7) { - /* "netfilterqueue.pyx":222 + /* "netfilterqueue.pyx":233 * err = e.args[0] * if err == ENOBUFS: * continue # <<<<<<<<<<<<<< @@ -4764,7 +4886,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_12run_socket(struct */ goto __pyx_L15_except_continue; - /* "netfilterqueue.pyx":221 + /* "netfilterqueue.pyx":232 * except socket.error as e: * err = e.args[0] * if err == ENOBUFS: # <<<<<<<<<<<<<< @@ -4773,35 +4895,35 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_12run_socket(struct */ } - /* "netfilterqueue.pyx":223 + /* "netfilterqueue.pyx":234 * if err == ENOBUFS: * continue * elif err == EAGAIN or err == EWOULDBLOCK: # <<<<<<<<<<<<<< * # This should only happen with a non-blocking socket, and the * # app should call run_socket again when more data is available. */ - __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_e_14netfilterqueue_EAGAIN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 223, __pyx_L7_except_error) + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_e_14netfilterqueue_EAGAIN); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = PyObject_RichCompare(__pyx_v_err, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 223, __pyx_L7_except_error) + __pyx_t_12 = PyObject_RichCompare(__pyx_v_err, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 223, __pyx_L7_except_error) + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!__pyx_t_13) { } else { __pyx_t_7 = __pyx_t_13; goto __pyx_L17_bool_binop_done; } - __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_e_14netfilterqueue_EWOULDBLOCK); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 223, __pyx_L7_except_error) + __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_e_14netfilterqueue_EWOULDBLOCK); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_GOTREF(__pyx_t_12); - __pyx_t_11 = PyObject_RichCompare(__pyx_v_err, __pyx_t_12, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 223, __pyx_L7_except_error) + __pyx_t_11 = PyObject_RichCompare(__pyx_v_err, __pyx_t_12, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 223, __pyx_L7_except_error) + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_7 = __pyx_t_13; __pyx_L17_bool_binop_done:; if (__pyx_t_7) { - /* "netfilterqueue.pyx":226 + /* "netfilterqueue.pyx":237 * # This should only happen with a non-blocking socket, and the * # app should call run_socket again when more data is available. * break # <<<<<<<<<<<<<< @@ -4810,7 +4932,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_12run_socket(struct */ goto __pyx_L14_except_break; - /* "netfilterqueue.pyx":223 + /* "netfilterqueue.pyx":234 * if err == ENOBUFS: * continue * elif err == EAGAIN or err == EWOULDBLOCK: # <<<<<<<<<<<<<< @@ -4819,7 +4941,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_12run_socket(struct */ } - /* "netfilterqueue.pyx":229 + /* "netfilterqueue.pyx":240 * else: * # This is bad. Let the caller handle it. * raise e # <<<<<<<<<<<<<< @@ -4828,7 +4950,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_12run_socket(struct */ /*else*/ { __Pyx_Raise(__pyx_v_e, 0, 0, 0); - __PYX_ERR(0, 229, __pyx_L7_except_error) + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} } __pyx_L14_except_break:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -4844,28 +4966,25 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_12run_socket(struct goto __pyx_L7_except_error; __pyx_L7_except_error:; - /* "netfilterqueue.pyx":212 + /* "netfilterqueue.pyx":223 * """Accept packets using socket.recv so that, for example, gevent can monkeypatch it.""" * while True: * try: # <<<<<<<<<<<<<< * buf = s.recv(BufferSize) * rv = len(buf) */ - __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L10_try_break:; - __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L4_break; __pyx_L11_try_continue:; - __Pyx_PyThreadState_assign __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); @@ -4877,7 +4996,7 @@ static PyObject *__pyx_pf_14netfilterqueue_14NetfilterQueue_12run_socket(struct } __pyx_L4_break:; - /* "netfilterqueue.pyx":209 + /* "netfilterqueue.pyx":220 * break * * def run_socket(self, s): # <<<<<<<<<<<<<< @@ -4956,24 +5075,25 @@ static PyObject *__pyx_getprop_14netfilterqueue_6Packet_payload(PyObject *o, CYT } static PyMethodDef __pyx_methods_14netfilterqueue_Packet[] = { - {"get_payload", (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_5get_payload, METH_NOARGS, __pyx_doc_14netfilterqueue_6Packet_4get_payload}, - {"get_payload_len", (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_7get_payload_len, METH_NOARGS, 0}, - {"get_timestamp", (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_9get_timestamp, METH_NOARGS, 0}, - {"set_payload", (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_11set_payload, METH_O, __pyx_doc_14netfilterqueue_6Packet_10set_payload}, - {"set_mark", (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_13set_mark, METH_O, 0}, - {"get_mark", (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_15get_mark, METH_NOARGS, 0}, - {"accept", (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_17accept, METH_NOARGS, __pyx_doc_14netfilterqueue_6Packet_16accept}, - {"drop", (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_19drop, METH_NOARGS, __pyx_doc_14netfilterqueue_6Packet_18drop}, - {"repeat", (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_21repeat, METH_NOARGS, __pyx_doc_14netfilterqueue_6Packet_20repeat}, + {"get_hw", (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_5get_hw, METH_NOARGS, __pyx_doc_14netfilterqueue_6Packet_4get_hw}, + {"get_payload", (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_7get_payload, METH_NOARGS, __pyx_doc_14netfilterqueue_6Packet_6get_payload}, + {"get_payload_len", (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_9get_payload_len, METH_NOARGS, 0}, + {"get_timestamp", (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_11get_timestamp, METH_NOARGS, 0}, + {"set_payload", (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_13set_payload, METH_O, __pyx_doc_14netfilterqueue_6Packet_12set_payload}, + {"set_mark", (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_15set_mark, METH_O, 0}, + {"get_mark", (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_17get_mark, METH_NOARGS, 0}, + {"accept", (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_19accept, METH_NOARGS, __pyx_doc_14netfilterqueue_6Packet_18accept}, + {"drop", (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_21drop, METH_NOARGS, __pyx_doc_14netfilterqueue_6Packet_20drop}, + {"repeat", (PyCFunction)__pyx_pw_14netfilterqueue_6Packet_23repeat, METH_NOARGS, __pyx_doc_14netfilterqueue_6Packet_22repeat}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_14netfilterqueue_Packet[] = { - {(char *)"id", __pyx_getprop_14netfilterqueue_6Packet_id, 0, (char *)0, 0}, - {(char *)"hw_protocol", __pyx_getprop_14netfilterqueue_6Packet_hw_protocol, 0, (char *)0, 0}, - {(char *)"hook", __pyx_getprop_14netfilterqueue_6Packet_hook, 0, (char *)0, 0}, - {(char *)"mark", __pyx_getprop_14netfilterqueue_6Packet_mark, 0, (char *)0, 0}, - {(char *)"payload", __pyx_getprop_14netfilterqueue_6Packet_payload, 0, (char *)0, 0}, + {(char *)"id", __pyx_getprop_14netfilterqueue_6Packet_id, 0, 0, 0}, + {(char *)"hw_protocol", __pyx_getprop_14netfilterqueue_6Packet_hw_protocol, 0, 0, 0}, + {(char *)"hook", __pyx_getprop_14netfilterqueue_6Packet_hook, 0, 0, 0}, + {(char *)"mark", __pyx_getprop_14netfilterqueue_6Packet_mark, 0, 0, 0}, + {(char *)"payload", __pyx_getprop_14netfilterqueue_6Packet_payload, 0, 0, 0}, {0, 0, 0, 0, 0} }; @@ -5375,8 +5495,8 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_OSError = __Pyx_GetBuiltinName(__pyx_n_s_OSError); if (!__pyx_builtin_OSError) __PYX_ERR(0, 67, __pyx_L1_error) - __pyx_builtin_RuntimeWarning = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeWarning); if (!__pyx_builtin_RuntimeWarning) __PYX_ERR(0, 75, __pyx_L1_error) + __pyx_builtin_OSError = __Pyx_GetBuiltinName(__pyx_n_s_OSError); if (!__pyx_builtin_OSError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_RuntimeWarning = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeWarning); if (!__pyx_builtin_RuntimeWarning) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; @@ -5386,58 +5506,58 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "netfilterqueue.pyx":67 + /* "netfilterqueue.pyx":69 * self.payload_len = nfq_get_payload(self._nfa, &self.payload) * if self.payload_len < 0: * raise OSError("Failed to get payload of packet.") # <<<<<<<<<<<<<< * * nfq_get_timestamp(self._nfa, &self.timestamp) */ - __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_Failed_to_get_payload_of_packet); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 67, __pyx_L1_error) + __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_Failed_to_get_payload_of_packet); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); - /* "netfilterqueue.pyx":75 + /* "netfilterqueue.pyx":77 * """Call appropriate set_verdict... function on packet.""" * if self._verdict_is_set: * raise RuntimeWarning("Verdict already given for this packet.") # <<<<<<<<<<<<<< * * cdef u_int32_t modified_payload_len = 0 */ - __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_Verdict_already_given_for_this_p); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 75, __pyx_L1_error) + __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_Verdict_already_given_for_this_p); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); - /* "netfilterqueue.pyx":144 + /* "netfilterqueue.pyx":155 * self.h = nfq_open() * if self.h == NULL: * raise OSError("Failed to open NFQueue.") # <<<<<<<<<<<<<< * nfq_unbind_pf(self.h, self.af) # This does NOT kick out previous * # running queues */ - __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_open_NFQueue); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 144, __pyx_L1_error) + __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_open_NFQueue); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); - /* "netfilterqueue.pyx":173 + /* "netfilterqueue.pyx":184 * range = MaxCopySize * if nfq_set_mode(self.qh, mode, range) < 0: * raise OSError("Failed to set packet copy mode.") # <<<<<<<<<<<<<< * * nfq_set_queue_maxlen(self.qh, max_len) */ - __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_set_packet_copy_mode); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_set_packet_copy_mode); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); - /* "netfilterqueue.pyx":213 + /* "netfilterqueue.pyx":224 * while True: * try: * buf = s.recv(BufferSize) # <<<<<<<<<<<<<< * rv = len(buf) * if rv >= 0: */ - __pyx_tuple__6 = PyTuple_Pack(1, __pyx_int_4096); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_tuple__6 = PyTuple_Pack(1, __pyx_int_4096); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); @@ -5448,7 +5568,7 @@ static int __Pyx_InitCachedConstants(void) { * * # Constants for module users */ - __pyx_tuple__7 = PyTuple_Pack(3, __pyx_int_0, __pyx_int_7, __pyx_int_0); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 8, __pyx_L1_error) + __pyx_tuple__7 = PyTuple_Pack(3, __pyx_int_0, __pyx_int_7, __pyx_int_0); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); __Pyx_RefNannyFinishContext(); @@ -5459,150 +5579,150 @@ static int __Pyx_InitCachedConstants(void) { } static int __Pyx_InitGlobals(void) { - if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error); - __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_11 = PyInt_FromLong(11); if (unlikely(!__pyx_int_11)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_12 = PyInt_FromLong(12); if (unlikely(!__pyx_int_12)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_13 = PyInt_FromLong(13); if (unlikely(!__pyx_int_13)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_14 = PyInt_FromLong(14); if (unlikely(!__pyx_int_14)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_16 = PyInt_FromLong(16); if (unlikely(!__pyx_int_16)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_17 = PyInt_FromLong(17); if (unlikely(!__pyx_int_17)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_18 = PyInt_FromLong(18); if (unlikely(!__pyx_int_18)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_19 = PyInt_FromLong(19); if (unlikely(!__pyx_int_19)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_20 = PyInt_FromLong(20); if (unlikely(!__pyx_int_20)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_21 = PyInt_FromLong(21); if (unlikely(!__pyx_int_21)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_22 = PyInt_FromLong(22); if (unlikely(!__pyx_int_22)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_23 = PyInt_FromLong(23); if (unlikely(!__pyx_int_23)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_24 = PyInt_FromLong(24); if (unlikely(!__pyx_int_24)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_25 = PyInt_FromLong(25); if (unlikely(!__pyx_int_25)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_26 = PyInt_FromLong(26); if (unlikely(!__pyx_int_26)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_27 = PyInt_FromLong(27); if (unlikely(!__pyx_int_27)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_28 = PyInt_FromLong(28); if (unlikely(!__pyx_int_28)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_29 = PyInt_FromLong(29); if (unlikely(!__pyx_int_29)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_30 = PyInt_FromLong(30); if (unlikely(!__pyx_int_30)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_31 = PyInt_FromLong(31); if (unlikely(!__pyx_int_31)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_33 = PyInt_FromLong(33); if (unlikely(!__pyx_int_33)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_34 = PyInt_FromLong(34); if (unlikely(!__pyx_int_34)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_35 = PyInt_FromLong(35); if (unlikely(!__pyx_int_35)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_36 = PyInt_FromLong(36); if (unlikely(!__pyx_int_36)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_37 = PyInt_FromLong(37); if (unlikely(!__pyx_int_37)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_38 = PyInt_FromLong(38); if (unlikely(!__pyx_int_38)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_39 = PyInt_FromLong(39); if (unlikely(!__pyx_int_39)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_40 = PyInt_FromLong(40); if (unlikely(!__pyx_int_40)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_41 = PyInt_FromLong(41); if (unlikely(!__pyx_int_41)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_42 = PyInt_FromLong(42); if (unlikely(!__pyx_int_42)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_43 = PyInt_FromLong(43); if (unlikely(!__pyx_int_43)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_44 = PyInt_FromLong(44); if (unlikely(!__pyx_int_44)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_45 = PyInt_FromLong(45); if (unlikely(!__pyx_int_45)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_46 = PyInt_FromLong(46); if (unlikely(!__pyx_int_46)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_47 = PyInt_FromLong(47); if (unlikely(!__pyx_int_47)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_48 = PyInt_FromLong(48); if (unlikely(!__pyx_int_48)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_49 = PyInt_FromLong(49); if (unlikely(!__pyx_int_49)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_50 = PyInt_FromLong(50); if (unlikely(!__pyx_int_50)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_51 = PyInt_FromLong(51); if (unlikely(!__pyx_int_51)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_52 = PyInt_FromLong(52); if (unlikely(!__pyx_int_52)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_53 = PyInt_FromLong(53); if (unlikely(!__pyx_int_53)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_54 = PyInt_FromLong(54); if (unlikely(!__pyx_int_54)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_55 = PyInt_FromLong(55); if (unlikely(!__pyx_int_55)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_56 = PyInt_FromLong(56); if (unlikely(!__pyx_int_56)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_57 = PyInt_FromLong(57); if (unlikely(!__pyx_int_57)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_58 = PyInt_FromLong(58); if (unlikely(!__pyx_int_58)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_59 = PyInt_FromLong(59); if (unlikely(!__pyx_int_59)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_60 = PyInt_FromLong(60); if (unlikely(!__pyx_int_60)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_61 = PyInt_FromLong(61); if (unlikely(!__pyx_int_61)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_62 = PyInt_FromLong(62); if (unlikely(!__pyx_int_62)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_63 = PyInt_FromLong(63); if (unlikely(!__pyx_int_63)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_64 = PyInt_FromLong(64); if (unlikely(!__pyx_int_64)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_65 = PyInt_FromLong(65); if (unlikely(!__pyx_int_65)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_66 = PyInt_FromLong(66); if (unlikely(!__pyx_int_66)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_67 = PyInt_FromLong(67); if (unlikely(!__pyx_int_67)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_68 = PyInt_FromLong(68); if (unlikely(!__pyx_int_68)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_69 = PyInt_FromLong(69); if (unlikely(!__pyx_int_69)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_70 = PyInt_FromLong(70); if (unlikely(!__pyx_int_70)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_71 = PyInt_FromLong(71); if (unlikely(!__pyx_int_71)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_72 = PyInt_FromLong(72); if (unlikely(!__pyx_int_72)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_73 = PyInt_FromLong(73); if (unlikely(!__pyx_int_73)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_74 = PyInt_FromLong(74); if (unlikely(!__pyx_int_74)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_75 = PyInt_FromLong(75); if (unlikely(!__pyx_int_75)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_76 = PyInt_FromLong(76); if (unlikely(!__pyx_int_76)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_77 = PyInt_FromLong(77); if (unlikely(!__pyx_int_77)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_78 = PyInt_FromLong(78); if (unlikely(!__pyx_int_78)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_79 = PyInt_FromLong(79); if (unlikely(!__pyx_int_79)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_80 = PyInt_FromLong(80); if (unlikely(!__pyx_int_80)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_81 = PyInt_FromLong(81); if (unlikely(!__pyx_int_81)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_82 = PyInt_FromLong(82); if (unlikely(!__pyx_int_82)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_83 = PyInt_FromLong(83); if (unlikely(!__pyx_int_83)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_84 = PyInt_FromLong(84); if (unlikely(!__pyx_int_84)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_85 = PyInt_FromLong(85); if (unlikely(!__pyx_int_85)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_86 = PyInt_FromLong(86); if (unlikely(!__pyx_int_86)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_87 = PyInt_FromLong(87); if (unlikely(!__pyx_int_87)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_88 = PyInt_FromLong(88); if (unlikely(!__pyx_int_88)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_89 = PyInt_FromLong(89); if (unlikely(!__pyx_int_89)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_90 = PyInt_FromLong(90); if (unlikely(!__pyx_int_90)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_91 = PyInt_FromLong(91); if (unlikely(!__pyx_int_91)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_92 = PyInt_FromLong(92); if (unlikely(!__pyx_int_92)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_93 = PyInt_FromLong(93); if (unlikely(!__pyx_int_93)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_94 = PyInt_FromLong(94); if (unlikely(!__pyx_int_94)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_95 = PyInt_FromLong(95); if (unlikely(!__pyx_int_95)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_96 = PyInt_FromLong(96); if (unlikely(!__pyx_int_96)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_97 = PyInt_FromLong(97); if (unlikely(!__pyx_int_97)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_98 = PyInt_FromLong(98); if (unlikely(!__pyx_int_98)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_99 = PyInt_FromLong(99); if (unlikely(!__pyx_int_99)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_101 = PyInt_FromLong(101); if (unlikely(!__pyx_int_101)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_102 = PyInt_FromLong(102); if (unlikely(!__pyx_int_102)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_103 = PyInt_FromLong(103); if (unlikely(!__pyx_int_103)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_104 = PyInt_FromLong(104); if (unlikely(!__pyx_int_104)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_105 = PyInt_FromLong(105); if (unlikely(!__pyx_int_105)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_106 = PyInt_FromLong(106); if (unlikely(!__pyx_int_106)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_107 = PyInt_FromLong(107); if (unlikely(!__pyx_int_107)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_108 = PyInt_FromLong(108); if (unlikely(!__pyx_int_108)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_109 = PyInt_FromLong(109); if (unlikely(!__pyx_int_109)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_110 = PyInt_FromLong(110); if (unlikely(!__pyx_int_110)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_111 = PyInt_FromLong(111); if (unlikely(!__pyx_int_111)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_112 = PyInt_FromLong(112); if (unlikely(!__pyx_int_112)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_113 = PyInt_FromLong(113); if (unlikely(!__pyx_int_113)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_114 = PyInt_FromLong(114); if (unlikely(!__pyx_int_114)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_115 = PyInt_FromLong(115); if (unlikely(!__pyx_int_115)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_116 = PyInt_FromLong(116); if (unlikely(!__pyx_int_116)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_117 = PyInt_FromLong(117); if (unlikely(!__pyx_int_117)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_118 = PyInt_FromLong(118); if (unlikely(!__pyx_int_118)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_119 = PyInt_FromLong(119); if (unlikely(!__pyx_int_119)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_120 = PyInt_FromLong(120); if (unlikely(!__pyx_int_120)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_121 = PyInt_FromLong(121); if (unlikely(!__pyx_int_121)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_122 = PyInt_FromLong(122); if (unlikely(!__pyx_int_122)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_123 = PyInt_FromLong(123); if (unlikely(!__pyx_int_123)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_124 = PyInt_FromLong(124); if (unlikely(!__pyx_int_124)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_125 = PyInt_FromLong(125); if (unlikely(!__pyx_int_125)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_126 = PyInt_FromLong(126); if (unlikely(!__pyx_int_126)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_127 = PyInt_FromLong(127); if (unlikely(!__pyx_int_127)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_128 = PyInt_FromLong(128); if (unlikely(!__pyx_int_128)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_129 = PyInt_FromLong(129); if (unlikely(!__pyx_int_129)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_130 = PyInt_FromLong(130); if (unlikely(!__pyx_int_130)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_131 = PyInt_FromLong(131); if (unlikely(!__pyx_int_131)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_132 = PyInt_FromLong(132); if (unlikely(!__pyx_int_132)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_133 = PyInt_FromLong(133); if (unlikely(!__pyx_int_133)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_134 = PyInt_FromLong(134); if (unlikely(!__pyx_int_134)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_135 = PyInt_FromLong(135); if (unlikely(!__pyx_int_135)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_136 = PyInt_FromLong(136); if (unlikely(!__pyx_int_136)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_137 = PyInt_FromLong(137); if (unlikely(!__pyx_int_137)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_138 = PyInt_FromLong(138); if (unlikely(!__pyx_int_138)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_139 = PyInt_FromLong(139); if (unlikely(!__pyx_int_139)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_140 = PyInt_FromLong(140); if (unlikely(!__pyx_int_140)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_255 = PyInt_FromLong(255); if (unlikely(!__pyx_int_255)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_4096 = PyInt_FromLong(4096); if (unlikely(!__pyx_int_4096)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_11 = PyInt_FromLong(11); if (unlikely(!__pyx_int_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_12 = PyInt_FromLong(12); if (unlikely(!__pyx_int_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_13 = PyInt_FromLong(13); if (unlikely(!__pyx_int_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_14 = PyInt_FromLong(14); if (unlikely(!__pyx_int_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_16 = PyInt_FromLong(16); if (unlikely(!__pyx_int_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_17 = PyInt_FromLong(17); if (unlikely(!__pyx_int_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_18 = PyInt_FromLong(18); if (unlikely(!__pyx_int_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_19 = PyInt_FromLong(19); if (unlikely(!__pyx_int_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_20 = PyInt_FromLong(20); if (unlikely(!__pyx_int_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_21 = PyInt_FromLong(21); if (unlikely(!__pyx_int_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_22 = PyInt_FromLong(22); if (unlikely(!__pyx_int_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_23 = PyInt_FromLong(23); if (unlikely(!__pyx_int_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_24 = PyInt_FromLong(24); if (unlikely(!__pyx_int_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_25 = PyInt_FromLong(25); if (unlikely(!__pyx_int_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_26 = PyInt_FromLong(26); if (unlikely(!__pyx_int_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_27 = PyInt_FromLong(27); if (unlikely(!__pyx_int_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_28 = PyInt_FromLong(28); if (unlikely(!__pyx_int_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_29 = PyInt_FromLong(29); if (unlikely(!__pyx_int_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_30 = PyInt_FromLong(30); if (unlikely(!__pyx_int_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_31 = PyInt_FromLong(31); if (unlikely(!__pyx_int_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_33 = PyInt_FromLong(33); if (unlikely(!__pyx_int_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_34 = PyInt_FromLong(34); if (unlikely(!__pyx_int_34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_35 = PyInt_FromLong(35); if (unlikely(!__pyx_int_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_36 = PyInt_FromLong(36); if (unlikely(!__pyx_int_36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_37 = PyInt_FromLong(37); if (unlikely(!__pyx_int_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_38 = PyInt_FromLong(38); if (unlikely(!__pyx_int_38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_39 = PyInt_FromLong(39); if (unlikely(!__pyx_int_39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_40 = PyInt_FromLong(40); if (unlikely(!__pyx_int_40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_41 = PyInt_FromLong(41); if (unlikely(!__pyx_int_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_42 = PyInt_FromLong(42); if (unlikely(!__pyx_int_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_43 = PyInt_FromLong(43); if (unlikely(!__pyx_int_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_44 = PyInt_FromLong(44); if (unlikely(!__pyx_int_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_45 = PyInt_FromLong(45); if (unlikely(!__pyx_int_45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_46 = PyInt_FromLong(46); if (unlikely(!__pyx_int_46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_47 = PyInt_FromLong(47); if (unlikely(!__pyx_int_47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_48 = PyInt_FromLong(48); if (unlikely(!__pyx_int_48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_49 = PyInt_FromLong(49); if (unlikely(!__pyx_int_49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_50 = PyInt_FromLong(50); if (unlikely(!__pyx_int_50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_51 = PyInt_FromLong(51); if (unlikely(!__pyx_int_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_52 = PyInt_FromLong(52); if (unlikely(!__pyx_int_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_53 = PyInt_FromLong(53); if (unlikely(!__pyx_int_53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_54 = PyInt_FromLong(54); if (unlikely(!__pyx_int_54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_55 = PyInt_FromLong(55); if (unlikely(!__pyx_int_55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_56 = PyInt_FromLong(56); if (unlikely(!__pyx_int_56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_57 = PyInt_FromLong(57); if (unlikely(!__pyx_int_57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_58 = PyInt_FromLong(58); if (unlikely(!__pyx_int_58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_59 = PyInt_FromLong(59); if (unlikely(!__pyx_int_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_60 = PyInt_FromLong(60); if (unlikely(!__pyx_int_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_61 = PyInt_FromLong(61); if (unlikely(!__pyx_int_61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_62 = PyInt_FromLong(62); if (unlikely(!__pyx_int_62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_63 = PyInt_FromLong(63); if (unlikely(!__pyx_int_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_64 = PyInt_FromLong(64); if (unlikely(!__pyx_int_64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_65 = PyInt_FromLong(65); if (unlikely(!__pyx_int_65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_66 = PyInt_FromLong(66); if (unlikely(!__pyx_int_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_67 = PyInt_FromLong(67); if (unlikely(!__pyx_int_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_68 = PyInt_FromLong(68); if (unlikely(!__pyx_int_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_69 = PyInt_FromLong(69); if (unlikely(!__pyx_int_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_70 = PyInt_FromLong(70); if (unlikely(!__pyx_int_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_71 = PyInt_FromLong(71); if (unlikely(!__pyx_int_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_72 = PyInt_FromLong(72); if (unlikely(!__pyx_int_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_73 = PyInt_FromLong(73); if (unlikely(!__pyx_int_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_74 = PyInt_FromLong(74); if (unlikely(!__pyx_int_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_75 = PyInt_FromLong(75); if (unlikely(!__pyx_int_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_76 = PyInt_FromLong(76); if (unlikely(!__pyx_int_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_77 = PyInt_FromLong(77); if (unlikely(!__pyx_int_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_78 = PyInt_FromLong(78); if (unlikely(!__pyx_int_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_79 = PyInt_FromLong(79); if (unlikely(!__pyx_int_79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_80 = PyInt_FromLong(80); if (unlikely(!__pyx_int_80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_81 = PyInt_FromLong(81); if (unlikely(!__pyx_int_81)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_82 = PyInt_FromLong(82); if (unlikely(!__pyx_int_82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_83 = PyInt_FromLong(83); if (unlikely(!__pyx_int_83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_84 = PyInt_FromLong(84); if (unlikely(!__pyx_int_84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_85 = PyInt_FromLong(85); if (unlikely(!__pyx_int_85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_86 = PyInt_FromLong(86); if (unlikely(!__pyx_int_86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_87 = PyInt_FromLong(87); if (unlikely(!__pyx_int_87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_88 = PyInt_FromLong(88); if (unlikely(!__pyx_int_88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_89 = PyInt_FromLong(89); if (unlikely(!__pyx_int_89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_90 = PyInt_FromLong(90); if (unlikely(!__pyx_int_90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_91 = PyInt_FromLong(91); if (unlikely(!__pyx_int_91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_92 = PyInt_FromLong(92); if (unlikely(!__pyx_int_92)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_93 = PyInt_FromLong(93); if (unlikely(!__pyx_int_93)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_94 = PyInt_FromLong(94); if (unlikely(!__pyx_int_94)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_95 = PyInt_FromLong(95); if (unlikely(!__pyx_int_95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_96 = PyInt_FromLong(96); if (unlikely(!__pyx_int_96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_97 = PyInt_FromLong(97); if (unlikely(!__pyx_int_97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_98 = PyInt_FromLong(98); if (unlikely(!__pyx_int_98)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_99 = PyInt_FromLong(99); if (unlikely(!__pyx_int_99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_101 = PyInt_FromLong(101); if (unlikely(!__pyx_int_101)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_102 = PyInt_FromLong(102); if (unlikely(!__pyx_int_102)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_103 = PyInt_FromLong(103); if (unlikely(!__pyx_int_103)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_104 = PyInt_FromLong(104); if (unlikely(!__pyx_int_104)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_105 = PyInt_FromLong(105); if (unlikely(!__pyx_int_105)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_106 = PyInt_FromLong(106); if (unlikely(!__pyx_int_106)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_107 = PyInt_FromLong(107); if (unlikely(!__pyx_int_107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_108 = PyInt_FromLong(108); if (unlikely(!__pyx_int_108)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_109 = PyInt_FromLong(109); if (unlikely(!__pyx_int_109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_110 = PyInt_FromLong(110); if (unlikely(!__pyx_int_110)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_111 = PyInt_FromLong(111); if (unlikely(!__pyx_int_111)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_112 = PyInt_FromLong(112); if (unlikely(!__pyx_int_112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_113 = PyInt_FromLong(113); if (unlikely(!__pyx_int_113)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_114 = PyInt_FromLong(114); if (unlikely(!__pyx_int_114)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_115 = PyInt_FromLong(115); if (unlikely(!__pyx_int_115)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_116 = PyInt_FromLong(116); if (unlikely(!__pyx_int_116)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_117 = PyInt_FromLong(117); if (unlikely(!__pyx_int_117)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_118 = PyInt_FromLong(118); if (unlikely(!__pyx_int_118)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_119 = PyInt_FromLong(119); if (unlikely(!__pyx_int_119)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_120 = PyInt_FromLong(120); if (unlikely(!__pyx_int_120)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_121 = PyInt_FromLong(121); if (unlikely(!__pyx_int_121)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_122 = PyInt_FromLong(122); if (unlikely(!__pyx_int_122)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_123 = PyInt_FromLong(123); if (unlikely(!__pyx_int_123)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_124 = PyInt_FromLong(124); if (unlikely(!__pyx_int_124)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_125 = PyInt_FromLong(125); if (unlikely(!__pyx_int_125)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_126 = PyInt_FromLong(126); if (unlikely(!__pyx_int_126)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_127 = PyInt_FromLong(127); if (unlikely(!__pyx_int_127)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_128 = PyInt_FromLong(128); if (unlikely(!__pyx_int_128)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_129 = PyInt_FromLong(129); if (unlikely(!__pyx_int_129)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_130 = PyInt_FromLong(130); if (unlikely(!__pyx_int_130)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_131 = PyInt_FromLong(131); if (unlikely(!__pyx_int_131)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_132 = PyInt_FromLong(132); if (unlikely(!__pyx_int_132)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_133 = PyInt_FromLong(133); if (unlikely(!__pyx_int_133)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_134 = PyInt_FromLong(134); if (unlikely(!__pyx_int_134)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_135 = PyInt_FromLong(135); if (unlikely(!__pyx_int_135)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_136 = PyInt_FromLong(136); if (unlikely(!__pyx_int_136)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_137 = PyInt_FromLong(137); if (unlikely(!__pyx_int_137)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_138 = PyInt_FromLong(138); if (unlikely(!__pyx_int_138)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_139 = PyInt_FromLong(139); if (unlikely(!__pyx_int_139)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_140 = PyInt_FromLong(140); if (unlikely(!__pyx_int_140)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_255 = PyInt_FromLong(255); if (unlikely(!__pyx_int_255)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_4096 = PyInt_FromLong(4096); if (unlikely(!__pyx_int_4096)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; @@ -5617,6 +5737,9 @@ PyMODINIT_FUNC PyInit_netfilterqueue(void) #endif { PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); @@ -5628,24 +5751,23 @@ PyMODINIT_FUNC PyInit_netfilterqueue(void) } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_netfilterqueue(void)", 0); - if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED - if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED - if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Coroutine_USED - if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__pyx_Coroutine_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED - if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_StopAsyncIteration_USED - if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__pyx_StopAsyncIteration_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ @@ -5660,34 +5782,34 @@ PyMODINIT_FUNC PyInit_netfilterqueue(void) #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif - if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); - __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif - if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ - if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_InitGlobals() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) - if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_netfilterqueue) { - if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if PY_MAJOR_VERSION >= 3 { - PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "netfilterqueue")) { - if (unlikely(PyDict_SetItemString(modules, "netfilterqueue", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely(PyDict_SetItemString(modules, "netfilterqueue", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /*--- Builtin init code ---*/ - if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_InitCachedBuiltins() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ - if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_InitCachedConstants() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ @@ -5703,21 +5825,21 @@ PyMODINIT_FUNC PyInit_netfilterqueue(void) __pyx_vtable_14netfilterqueue_Packet.accept = (PyObject *(*)(struct __pyx_obj_14netfilterqueue_Packet *, int __pyx_skip_dispatch))__pyx_f_14netfilterqueue_6Packet_accept; __pyx_vtable_14netfilterqueue_Packet.drop = (PyObject *(*)(struct __pyx_obj_14netfilterqueue_Packet *, int __pyx_skip_dispatch))__pyx_f_14netfilterqueue_6Packet_drop; __pyx_vtable_14netfilterqueue_Packet.repeat = (PyObject *(*)(struct __pyx_obj_14netfilterqueue_Packet *, int __pyx_skip_dispatch))__pyx_f_14netfilterqueue_6Packet_repeat; - if (PyType_Ready(&__pyx_type_14netfilterqueue_Packet) < 0) __PYX_ERR(0, 40, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_14netfilterqueue_Packet) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_14netfilterqueue_Packet.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_14netfilterqueue_Packet.tp_dict, __pyx_vtabptr_14netfilterqueue_Packet) < 0) __PYX_ERR(0, 40, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "Packet", (PyObject *)&__pyx_type_14netfilterqueue_Packet) < 0) __PYX_ERR(0, 40, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_14netfilterqueue_Packet.tp_dict, __pyx_vtabptr_14netfilterqueue_Packet) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "Packet", (PyObject *)&__pyx_type_14netfilterqueue_Packet) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_14netfilterqueue_Packet = &__pyx_type_14netfilterqueue_Packet; - if (PyType_Ready(&__pyx_type_14netfilterqueue_NetfilterQueue) < 0) __PYX_ERR(0, 137, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_14netfilterqueue_NetfilterQueue) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_14netfilterqueue_NetfilterQueue.tp_print = 0; - if (PyObject_SetAttrString(__pyx_m, "NetfilterQueue", (PyObject *)&__pyx_type_14netfilterqueue_NetfilterQueue) < 0) __PYX_ERR(0, 137, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "NetfilterQueue", (PyObject *)&__pyx_type_14netfilterqueue_NetfilterQueue) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_14netfilterqueue_NetfilterQueue = &__pyx_type_14netfilterqueue_NetfilterQueue; /*--- Type import code ---*/ /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) - if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_patch_abc() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /* "netfilterqueue.pyx":8 @@ -5727,7 +5849,7 @@ PyMODINIT_FUNC PyInit_netfilterqueue(void) * * # Constants for module users */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_VERSION, __pyx_tuple__7) < 0) __PYX_ERR(0, 8, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_VERSION, __pyx_tuple__7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "netfilterqueue.pyx":11 * @@ -5736,7 +5858,7 @@ PyMODINIT_FUNC PyInit_netfilterqueue(void) * COPY_META = 1 * COPY_PACKET = 2 */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_COPY_NONE, __pyx_int_0) < 0) __PYX_ERR(0, 11, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_COPY_NONE, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "netfilterqueue.pyx":12 * # Constants for module users @@ -5745,7 +5867,7 @@ PyMODINIT_FUNC PyInit_netfilterqueue(void) * COPY_PACKET = 2 * */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_COPY_META, __pyx_int_1) < 0) __PYX_ERR(0, 12, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_COPY_META, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "netfilterqueue.pyx":13 * COPY_NONE = 0 @@ -5754,7 +5876,7 @@ PyMODINIT_FUNC PyInit_netfilterqueue(void) * * # Packet copying defaults */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_COPY_PACKET, __pyx_int_2) < 0) __PYX_ERR(0, 13, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_COPY_PACKET, __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "netfilterqueue.pyx":27 * DEF SockRcvSize = DEFAULT_MAX_QUEUELEN * SockCopySize / 2 @@ -5763,12 +5885,12 @@ PyMODINIT_FUNC PyInit_netfilterqueue(void) * cimport cpython.version * */ - __pyx_t_1 = __Pyx_Import(__pyx_n_s_socket, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_socket, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_socket, __pyx_t_1) < 0) __PYX_ERR(0, 27, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_socket, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "netfilterqueue.pyx":159 + /* "netfilterqueue.pyx":170 * def bind(self, int queue_num, object user_callback, * u_int32_t max_len=DEFAULT_MAX_QUEUELEN, * u_int8_t mode=NFQNL_COPY_PACKET, # <<<<<<<<<<<<<< @@ -5777,158 +5899,158 @@ PyMODINIT_FUNC PyInit_netfilterqueue(void) */ __pyx_k__4 = NFQNL_COPY_PACKET; - /* "netfilterqueue.pyx":232 + /* "netfilterqueue.pyx":243 * * PROTOCOLS = { * 0: "HOPOPT", # <<<<<<<<<<<<<< * 1: "ICMP", * 2: "IGMP", */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_int_0, __pyx_n_s_HOPOPT) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_1, __pyx_n_s_ICMP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_2, __pyx_n_s_IGMP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_3, __pyx_n_s_GGP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_4, __pyx_n_s_IP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_5, __pyx_n_s_ST) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_6, __pyx_n_s_TCP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_7, __pyx_n_s_CBT) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_8, __pyx_n_s_EGP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_9, __pyx_n_s_IGP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_10, __pyx_kp_s_BBN_RCC_MON) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_11, __pyx_kp_s_NVP_II) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_12, __pyx_n_s_PUP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_13, __pyx_n_s_ARGUS) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_14, __pyx_n_s_EMCON) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_15, __pyx_n_s_XNET) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_16, __pyx_n_s_CHAOS) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_17, __pyx_n_s_UDP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_18, __pyx_n_s_MUX) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_19, __pyx_kp_s_DCN_MEAS) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_20, __pyx_n_s_HMP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_21, __pyx_n_s_PRM) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_22, __pyx_kp_s_XNS_IDP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_23, __pyx_kp_s_TRUNK_1) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_24, __pyx_kp_s_TRUNK_2) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_25, __pyx_kp_s_LEAF_1) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_26, __pyx_kp_s_LEAF_2) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_27, __pyx_n_s_RDP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_28, __pyx_n_s_IRTP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_29, __pyx_kp_s_ISO_TP4) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_30, __pyx_n_s_NETBLT) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_31, __pyx_kp_s_MFE_NSP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_32, __pyx_kp_s_MERIT_INP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_33, __pyx_n_s_DCCP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_34, __pyx_kp_s_3PC) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_35, __pyx_n_s_IDPR) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_36, __pyx_n_s_XTP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_37, __pyx_n_s_DDP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_38, __pyx_kp_s_IDPR_CMTP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_39, __pyx_kp_s_TP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_40, __pyx_n_s_IL) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_41, __pyx_n_s_IPv6) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_42, __pyx_n_s_SDRP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_43, __pyx_kp_s_IPv6_Route) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_44, __pyx_kp_s_IPv6_Frag) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_45, __pyx_n_s_IDRP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_46, __pyx_n_s_RSVP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_47, __pyx_n_s_GRE) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_48, __pyx_n_s_DSR) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_49, __pyx_n_s_BNA) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_50, __pyx_n_s_ESP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_51, __pyx_n_s_AH) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_52, __pyx_kp_s_I_NLSP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_53, __pyx_n_s_SWIPE) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_54, __pyx_n_s_NARP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_55, __pyx_n_s_MOBILE) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_56, __pyx_n_s_TLSP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_57, __pyx_n_s_SKIP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_58, __pyx_kp_s_IPv6_ICMP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_59, __pyx_kp_s_IPv6_NoNxt) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_60, __pyx_kp_s_IPv6_Opts) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_61, __pyx_kp_s_any_host_internal_protocol) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_62, __pyx_n_s_CFTP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_63, __pyx_kp_s_any_local_network) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_64, __pyx_kp_s_SAT_EXPAK) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_65, __pyx_n_s_KRYPTOLAN) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_66, __pyx_n_s_RVD) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_67, __pyx_n_s_IPPC) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_68, __pyx_kp_s_any_distributed_file_system) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_69, __pyx_kp_s_SAT_MON) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_70, __pyx_n_s_VISA) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_71, __pyx_n_s_IPCV) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_72, __pyx_n_s_CPNX) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_73, __pyx_n_s_CPHB) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_74, __pyx_n_s_WSN) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_75, __pyx_n_s_PVP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_76, __pyx_kp_s_BR_SAT_MON) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_77, __pyx_kp_s_SUN_ND) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_78, __pyx_kp_s_WB_MON) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_79, __pyx_kp_s_WB_EXPAK) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_80, __pyx_kp_s_ISO_IP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_81, __pyx_n_s_VMTP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_82, __pyx_kp_s_SECURE_VMTP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_83, __pyx_n_s_VINES) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_84, __pyx_n_s_TTP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_85, __pyx_kp_s_NSFNET_IGP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_86, __pyx_n_s_DGP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_87, __pyx_n_s_TCF) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_88, __pyx_n_s_EIGRP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_89, __pyx_n_s_OSPFIGP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_90, __pyx_kp_s_Sprite_RPC) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_91, __pyx_n_s_LARP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_92, __pyx_n_s_MTP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_93, __pyx_kp_s_AX_25) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_94, __pyx_n_s_IPIP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_95, __pyx_n_s_MICP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_96, __pyx_kp_s_SCC_SP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_97, __pyx_n_s_ETHERIP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_98, __pyx_n_s_ENCAP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_99, __pyx_kp_s_any_private_encryption_scheme) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_100, __pyx_n_s_GMTP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_101, __pyx_n_s_IFMP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_102, __pyx_n_s_PNNI) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_103, __pyx_n_s_PIM) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_104, __pyx_n_s_ARIS) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_105, __pyx_n_s_SCPS) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_106, __pyx_n_s_QNX) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_107, __pyx_kp_s_A_N) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_108, __pyx_n_s_IPComp) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_109, __pyx_n_s_SNP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_110, __pyx_kp_s_Compaq_Peer) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_111, __pyx_kp_s_IPX_in_IP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_112, __pyx_n_s_VRRP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_113, __pyx_n_s_PGM) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_114, __pyx_kp_s_any_0_hop_protocol) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_115, __pyx_n_s_L2TP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_116, __pyx_n_s_DDX) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_117, __pyx_n_s_IATP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_118, __pyx_n_s_STP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_119, __pyx_n_s_SRP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_120, __pyx_n_s_UTI) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_121, __pyx_n_s_SMP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_122, __pyx_n_s_SM) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_123, __pyx_n_s_PTP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_124, __pyx_n_s_ISIS) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_125, __pyx_n_s_FIRE) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_126, __pyx_n_s_CRTP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_127, __pyx_n_s_CRUDP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_128, __pyx_n_s_SSCOPMCE) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_129, __pyx_n_s_IPLT) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_130, __pyx_n_s_SPS) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_131, __pyx_n_s_PIPE) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_132, __pyx_n_s_SCTP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_133, __pyx_n_s_FC) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_134, __pyx_kp_s_RSVP_E2E_IGNORE) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_135, __pyx_n_s_Mobility) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_136, __pyx_n_s_UDPLite) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_137, __pyx_kp_s_MPLS_in_IP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_138, __pyx_n_s_manet) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_139, __pyx_n_s_HIP) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_140, __pyx_n_s_Shim6) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_255, __pyx_n_s_Reserved) < 0) __PYX_ERR(0, 232, __pyx_L1_error) - if (PyDict_SetItem(__pyx_d, __pyx_n_s_PROTOCOLS, __pyx_t_1) < 0) __PYX_ERR(0, 231, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_int_0, __pyx_n_s_HOPOPT) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_1, __pyx_n_s_ICMP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_2, __pyx_n_s_IGMP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_3, __pyx_n_s_GGP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_4, __pyx_n_s_IP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_5, __pyx_n_s_ST) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_6, __pyx_n_s_TCP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_7, __pyx_n_s_CBT) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_8, __pyx_n_s_EGP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_9, __pyx_n_s_IGP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_10, __pyx_kp_s_BBN_RCC_MON) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_11, __pyx_kp_s_NVP_II) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_12, __pyx_n_s_PUP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_13, __pyx_n_s_ARGUS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_14, __pyx_n_s_EMCON) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_15, __pyx_n_s_XNET) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_16, __pyx_n_s_CHAOS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_17, __pyx_n_s_UDP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_18, __pyx_n_s_MUX) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_19, __pyx_kp_s_DCN_MEAS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_20, __pyx_n_s_HMP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_21, __pyx_n_s_PRM) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_22, __pyx_kp_s_XNS_IDP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_23, __pyx_kp_s_TRUNK_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_24, __pyx_kp_s_TRUNK_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_25, __pyx_kp_s_LEAF_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_26, __pyx_kp_s_LEAF_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_27, __pyx_n_s_RDP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_28, __pyx_n_s_IRTP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_29, __pyx_kp_s_ISO_TP4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_30, __pyx_n_s_NETBLT) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_31, __pyx_kp_s_MFE_NSP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_32, __pyx_kp_s_MERIT_INP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_33, __pyx_n_s_DCCP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_34, __pyx_kp_s_3PC) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_35, __pyx_n_s_IDPR) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_36, __pyx_n_s_XTP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_37, __pyx_n_s_DDP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_38, __pyx_kp_s_IDPR_CMTP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_39, __pyx_kp_s_TP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_40, __pyx_n_s_IL) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_41, __pyx_n_s_IPv6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_42, __pyx_n_s_SDRP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_43, __pyx_kp_s_IPv6_Route) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_44, __pyx_kp_s_IPv6_Frag) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_45, __pyx_n_s_IDRP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_46, __pyx_n_s_RSVP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_47, __pyx_n_s_GRE) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_48, __pyx_n_s_DSR) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_49, __pyx_n_s_BNA) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_50, __pyx_n_s_ESP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_51, __pyx_n_s_AH) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_52, __pyx_kp_s_I_NLSP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_53, __pyx_n_s_SWIPE) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_54, __pyx_n_s_NARP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_55, __pyx_n_s_MOBILE) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_56, __pyx_n_s_TLSP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_57, __pyx_n_s_SKIP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_58, __pyx_kp_s_IPv6_ICMP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_59, __pyx_kp_s_IPv6_NoNxt) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_60, __pyx_kp_s_IPv6_Opts) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_61, __pyx_kp_s_any_host_internal_protocol) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_62, __pyx_n_s_CFTP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_63, __pyx_kp_s_any_local_network) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_64, __pyx_kp_s_SAT_EXPAK) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_65, __pyx_n_s_KRYPTOLAN) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_66, __pyx_n_s_RVD) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_67, __pyx_n_s_IPPC) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_68, __pyx_kp_s_any_distributed_file_system) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_69, __pyx_kp_s_SAT_MON) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_70, __pyx_n_s_VISA) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_71, __pyx_n_s_IPCV) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_72, __pyx_n_s_CPNX) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_73, __pyx_n_s_CPHB) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_74, __pyx_n_s_WSN) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_75, __pyx_n_s_PVP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_76, __pyx_kp_s_BR_SAT_MON) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_77, __pyx_kp_s_SUN_ND) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_78, __pyx_kp_s_WB_MON) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_79, __pyx_kp_s_WB_EXPAK) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_80, __pyx_kp_s_ISO_IP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_81, __pyx_n_s_VMTP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_82, __pyx_kp_s_SECURE_VMTP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_83, __pyx_n_s_VINES) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_84, __pyx_n_s_TTP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_85, __pyx_kp_s_NSFNET_IGP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_86, __pyx_n_s_DGP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_87, __pyx_n_s_TCF) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_88, __pyx_n_s_EIGRP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_89, __pyx_n_s_OSPFIGP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_90, __pyx_kp_s_Sprite_RPC) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_91, __pyx_n_s_LARP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_92, __pyx_n_s_MTP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_93, __pyx_kp_s_AX_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_94, __pyx_n_s_IPIP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_95, __pyx_n_s_MICP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_96, __pyx_kp_s_SCC_SP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_97, __pyx_n_s_ETHERIP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_98, __pyx_n_s_ENCAP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_99, __pyx_kp_s_any_private_encryption_scheme) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_100, __pyx_n_s_GMTP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_101, __pyx_n_s_IFMP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_102, __pyx_n_s_PNNI) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_103, __pyx_n_s_PIM) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_104, __pyx_n_s_ARIS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_105, __pyx_n_s_SCPS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_106, __pyx_n_s_QNX) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_107, __pyx_kp_s_A_N) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_108, __pyx_n_s_IPComp) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_109, __pyx_n_s_SNP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_110, __pyx_kp_s_Compaq_Peer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_111, __pyx_kp_s_IPX_in_IP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_112, __pyx_n_s_VRRP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_113, __pyx_n_s_PGM) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_114, __pyx_kp_s_any_0_hop_protocol) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_115, __pyx_n_s_L2TP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_116, __pyx_n_s_DDX) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_117, __pyx_n_s_IATP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_118, __pyx_n_s_STP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_119, __pyx_n_s_SRP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_120, __pyx_n_s_UTI) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_121, __pyx_n_s_SMP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_122, __pyx_n_s_SM) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_123, __pyx_n_s_PTP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_124, __pyx_n_s_ISIS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_125, __pyx_n_s_FIRE) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_126, __pyx_n_s_CRTP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_127, __pyx_n_s_CRUDP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_128, __pyx_n_s_SSCOPMCE) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_129, __pyx_n_s_IPLT) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_130, __pyx_n_s_SPS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_131, __pyx_n_s_PIPE) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_132, __pyx_n_s_SCTP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_133, __pyx_n_s_FC) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_134, __pyx_kp_s_RSVP_E2E_IGNORE) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_135, __pyx_n_s_Mobility) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_136, __pyx_n_s_UDPLite) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_137, __pyx_kp_s_MPLS_in_IP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_138, __pyx_n_s_manet) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_139, __pyx_n_s_HIP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_140, __pyx_n_s_Shim6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_int_255, __pyx_n_s_Reserved) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_PROTOCOLS, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "netfilterqueue.pyx":1 @@ -5936,9 +6058,9 @@ PyMODINIT_FUNC PyInit_netfilterqueue(void) * Bind to a Linux netfilter queue. Send packets to a user-specified callback * function. */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /*--- Wrapped vars code ---*/ @@ -5964,7 +6086,6 @@ PyMODINIT_FUNC PyInit_netfilterqueue(void) } /* --- Runtime support code --- */ -/* Refnanny */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; @@ -5981,7 +6102,6 @@ end: } #endif -/* GetBuiltinName */ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); if (unlikely(!result)) { @@ -5995,7 +6115,6 @@ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { return result; } -/* PyObjectCall */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; @@ -6015,7 +6134,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg } #endif -/* PyObjectCallMethO */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; @@ -6035,7 +6153,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject } #endif -/* PyObjectCallOneArg */ #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; @@ -6070,10 +6187,10 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec } #endif -/* PyErrFetchRestore */ - #if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { +#if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; + PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; @@ -6083,33 +6200,34 @@ static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObjec Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); +#else + PyErr_Restore(type, value, tb); +#endif } -static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { +#if CYTHON_COMPILING_IN_CPYTHON + PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; -} +#else + PyErr_Fetch(type, value, tb); #endif +} -/* WriteUnraisableException */ - static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, +static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, int full_traceback, CYTHON_UNUSED int nogil) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; - __Pyx_PyThreadState_declare #ifdef WITH_THREAD PyGILState_STATE state; if (nogil) state = PyGILState_Ensure(); -#ifdef _MSC_VER - else state = (PyGILState_STATE)-1; #endif -#endif - __Pyx_PyThreadState_assign __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); if (full_traceback) { Py_XINCREF(old_exc); @@ -6136,8 +6254,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject #endif } -/* RaiseArgTupleInvalid */ - static void __Pyx_RaiseArgtupleInvalid( +static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, @@ -6162,8 +6279,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject (num_expected == 1) ? "" : "s", num_found); } -/* KeywordStringCheck */ - static CYTHON_INLINE int __Pyx_CheckKeywordStrings( +static CYTHON_INLINE int __Pyx_CheckKeywordStrings( PyObject *kwdict, const char* function_name, int kw_allowed) @@ -6202,8 +6318,7 @@ invalid_keyword: return 0; } -/* GetModuleGlobalName */ - static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { +static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); @@ -6220,11 +6335,9 @@ invalid_keyword: return result; } -/* RaiseException */ - #if PY_MAJOR_VERSION < 3 +#if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { - __Pyx_PyThreadState_declare Py_XINCREF(type); if (!value || value == Py_None) value = NULL; @@ -6263,7 +6376,6 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, goto raise_error; } } - __Pyx_PyThreadState_assign __Pyx_ErrRestore(type, value, tb); return; raise_error: @@ -6383,8 +6495,7 @@ bad: } #endif -/* PyObjectCallNoArg */ - #if CYTHON_COMPILING_IN_CPYTHON +#if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { #ifdef __Pyx_CyFunction_USED if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) { @@ -6399,8 +6510,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { } #endif -/* ArgTypeTest */ - static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { +static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", name, type->tp_name, Py_TYPE(obj)->tp_name); @@ -6426,8 +6536,7 @@ static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, in return 0; } -/* dict_getitem_default */ - static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { +static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { PyObject* value; #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY value = PyDict_GetItemWithError(d, key); @@ -6454,8 +6563,7 @@ static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, in return value; } -/* RaiseDoubleKeywords */ - static void __Pyx_RaiseDoubleKeywordsError( +static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) { @@ -6468,8 +6576,7 @@ static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, in #endif } -/* ParseKeywords */ - static int __Pyx_ParseOptionalKeywords( +static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject **argnames[], PyObject *kwds2, @@ -6570,18 +6677,23 @@ bad: return -1; } -/* SaveResetException */ - #if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { +#if CYTHON_COMPILING_IN_CPYTHON + PyThreadState *tstate = PyThreadState_GET(); *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); +#else + PyErr_GetExcInfo(type, value, tb); +#endif } -static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { +#if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; + PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; @@ -6591,28 +6703,16 @@ static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); -} -#endif - -/* PyErrExceptionMatches */ - #if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) { - PyObject *exc_type = tstate->curexc_type; - if (exc_type == err) return 1; - if (unlikely(!exc_type)) return 0; - return PyErr_GivenExceptionMatches(exc_type, err); -} -#endif - -/* GetException */ - #if CYTHON_COMPILING_IN_CPYTHON -static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #else -static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { + PyErr_SetExcInfo(type, value, tb); #endif +} + +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { PyObject *local_type, *local_value, *local_tb; #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; + PyThreadState *tstate = PyThreadState_GET(); local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; @@ -6665,8 +6765,7 @@ bad: return -1; } -/* GetItemInt */ - static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); @@ -6730,9 +6829,10 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, if (likely(l >= 0)) { i += l; } else { - if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + if (PyErr_ExceptionMatches(PyExc_OverflowError)) + PyErr_Clear(); + else return NULL; - PyErr_Clear(); } } return m->sq_item(o, i); @@ -6746,8 +6846,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); } -/* SetVTable */ - static int __Pyx_SetVtable(PyObject *dict, void *vtable) { +static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 PyObject *ob = PyCapsule_New(vtable, 0, 0); #else @@ -6764,8 +6863,7 @@ bad: return -1; } -/* Import */ - static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; @@ -6838,8 +6936,7 @@ bad: return module; } -/* CodeObjectCache */ - static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; @@ -6918,8 +7015,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { Py_INCREF(code_object); } -/* AddTraceback */ - #include "compile.h" +#include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( @@ -6999,8 +7095,7 @@ bad: Py_XDECREF(py_frame); } -/* CIntFromPyVerify */ - #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) @@ -7021,170 +7116,11 @@ bad: return (target_type) value;\ } -/* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_u_int8_t(u_int8_t value) { - const u_int8_t neg_one = (u_int8_t) -1, const_zero = (u_int8_t) 0; - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(u_int8_t) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(u_int8_t) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); - } else if (sizeof(u_int8_t) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); - } - } else { - if (sizeof(u_int8_t) <= sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(u_int8_t) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(u_int8_t), - little, !is_unsigned); - } -} +#if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" +#endif -/* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_u_int32_t(u_int32_t value) { - const u_int32_t neg_one = (u_int32_t) -1, const_zero = (u_int32_t) 0; - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(u_int32_t) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(u_int32_t) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); - } else if (sizeof(u_int32_t) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); - } - } else { - if (sizeof(u_int32_t) <= sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(u_int32_t) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(u_int32_t), - little, !is_unsigned); - } -} - -/* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_u_int16_t(u_int16_t value) { - const u_int16_t neg_one = (u_int16_t) -1, const_zero = (u_int16_t) 0; - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(u_int16_t) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(u_int16_t) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); - } else if (sizeof(u_int16_t) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); - } - } else { - if (sizeof(u_int16_t) <= sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(u_int16_t) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(u_int16_t), - little, !is_unsigned); - } -} - -/* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - const int neg_one = (int) -1, const_zero = (int) 0; - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(int) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(int) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); - } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); - } - } else { - if (sizeof(int) <= sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(int), - little, !is_unsigned); - } -} - -/* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) { - const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0; - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(unsigned int) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(unsigned int) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); - } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); - } - } else { - if (sizeof(unsigned int) <= sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(unsigned int), - little, !is_unsigned); - } -} - -/* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - const long neg_one = (long) -1, const_zero = (long) 0; - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(long) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(long) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); - } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); - } - } else { - if (sizeof(long) <= sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(long), - little, !is_unsigned); - } -} - -/* CIntFromPy */ - static CYTHON_INLINE u_int32_t __Pyx_PyInt_As_u_int32_t(PyObject *x) { +static CYTHON_INLINE u_int32_t __Pyx_PyInt_As_u_int32_t(PyObject *x) { const u_int32_t neg_one = (u_int32_t) -1, const_zero = (u_int32_t) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 @@ -7259,7 +7195,7 @@ bad: const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (u_int32_t) 0; - case -1: __PYX_VERIFY_RETURN_INT(u_int32_t, sdigit, (sdigit) (-(sdigit)digits[0])) + case -1: __PYX_VERIFY_RETURN_INT(u_int32_t, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(u_int32_t, digit, +digits[0]) case -2: if (8 * sizeof(u_int32_t) - 1 > 1 * PyLong_SHIFT) { @@ -7329,7 +7265,7 @@ bad: "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else u_int32_t val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); + PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; @@ -7352,7 +7288,7 @@ bad: } } else { u_int32_t val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (u_int32_t) -1; val = __Pyx_PyInt_As_u_int32_t(tmp); Py_DECREF(tmp); @@ -7368,8 +7304,7 @@ raise_neg_overflow: return (u_int32_t) -1; } -/* CIntFromPy */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 @@ -7444,7 +7379,7 @@ raise_neg_overflow: const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; - case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) + case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) case -2: if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { @@ -7514,7 +7449,7 @@ raise_neg_overflow: "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else int val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); + PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; @@ -7537,7 +7472,7 @@ raise_neg_overflow: } } else { int val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); @@ -7553,8 +7488,7 @@ raise_neg_overflow: return (int) -1; } -/* CIntFromPy */ - static CYTHON_INLINE u_int8_t __Pyx_PyInt_As_u_int8_t(PyObject *x) { +static CYTHON_INLINE u_int8_t __Pyx_PyInt_As_u_int8_t(PyObject *x) { const u_int8_t neg_one = (u_int8_t) -1, const_zero = (u_int8_t) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 @@ -7629,7 +7563,7 @@ raise_neg_overflow: const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (u_int8_t) 0; - case -1: __PYX_VERIFY_RETURN_INT(u_int8_t, sdigit, (sdigit) (-(sdigit)digits[0])) + case -1: __PYX_VERIFY_RETURN_INT(u_int8_t, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(u_int8_t, digit, +digits[0]) case -2: if (8 * sizeof(u_int8_t) - 1 > 1 * PyLong_SHIFT) { @@ -7699,7 +7633,7 @@ raise_neg_overflow: "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else u_int8_t val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); + PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; @@ -7722,7 +7656,7 @@ raise_neg_overflow: } } else { u_int8_t val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (u_int8_t) -1; val = __Pyx_PyInt_As_u_int8_t(tmp); Py_DECREF(tmp); @@ -7738,8 +7672,111 @@ raise_neg_overflow: return (u_int8_t) -1; } -/* CIntFromPy */ - static CYTHON_INLINE u_int16_t __Pyx_PyInt_As_u_int16_t(PyObject *x) { +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_u_int8_t(u_int8_t value) { + const u_int8_t neg_one = (u_int8_t) -1, const_zero = (u_int8_t) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(u_int8_t) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(u_int8_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); + } else if (sizeof(u_int8_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + } + } else { + if (sizeof(u_int8_t) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(u_int8_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(u_int8_t), + little, !is_unsigned); + } +} + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_u_int32_t(u_int32_t value) { + const u_int32_t neg_one = (u_int32_t) -1, const_zero = (u_int32_t) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(u_int32_t) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(u_int32_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); + } else if (sizeof(u_int32_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + } + } else { + if (sizeof(u_int32_t) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(u_int32_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(u_int32_t), + little, !is_unsigned); + } +} + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_u_int16_t(u_int16_t value) { + const u_int16_t neg_one = (u_int16_t) -1, const_zero = (u_int16_t) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(u_int16_t) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(u_int16_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); + } else if (sizeof(u_int16_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + } + } else { + if (sizeof(u_int16_t) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(u_int16_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(u_int16_t), + little, !is_unsigned); + } +} + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { + const int neg_one = (int) -1, const_zero = (int) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); + } +} + +static CYTHON_INLINE u_int16_t __Pyx_PyInt_As_u_int16_t(PyObject *x) { const u_int16_t neg_one = (u_int16_t) -1, const_zero = (u_int16_t) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 @@ -7814,7 +7851,7 @@ raise_neg_overflow: const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (u_int16_t) 0; - case -1: __PYX_VERIFY_RETURN_INT(u_int16_t, sdigit, (sdigit) (-(sdigit)digits[0])) + case -1: __PYX_VERIFY_RETURN_INT(u_int16_t, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(u_int16_t, digit, +digits[0]) case -2: if (8 * sizeof(u_int16_t) - 1 > 1 * PyLong_SHIFT) { @@ -7884,7 +7921,7 @@ raise_neg_overflow: "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else u_int16_t val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); + PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; @@ -7907,7 +7944,7 @@ raise_neg_overflow: } } else { u_int16_t val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (u_int16_t) -1; val = __Pyx_PyInt_As_u_int16_t(tmp); Py_DECREF(tmp); @@ -7923,8 +7960,59 @@ raise_neg_overflow: return (u_int16_t) -1; } -/* CIntFromPy */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) { + const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(unsigned int) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(unsigned int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); + } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + } + } else { + if (sizeof(unsigned int) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(unsigned int), + little, !is_unsigned); + } +} + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { + const long neg_one = (long) -1, const_zero = (long) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); + } +} + +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 @@ -7999,7 +8087,7 @@ raise_neg_overflow: const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; - case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) + case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) case -2: if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { @@ -8069,7 +8157,7 @@ raise_neg_overflow: "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else long val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); + PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; @@ -8092,7 +8180,7 @@ raise_neg_overflow: } } else { long val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); @@ -8108,8 +8196,7 @@ raise_neg_overflow: return (long) -1; } -/* CheckBinaryVersion */ - static int __Pyx_check_binary_version(void) { +static int __Pyx_check_binary_version(void) { char ctversion[4], rtversion[4]; PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); @@ -8124,8 +8211,7 @@ raise_neg_overflow: return 0; } -/* InitStrings */ - static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { @@ -8225,7 +8311,7 @@ static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } -static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; diff --git a/netfilterqueue.pxd b/netfilterqueue.pxd index 8954b18..d1ca827 100644 --- a/netfilterqueue.pxd +++ b/netfilterqueue.pxd @@ -170,6 +170,7 @@ cdef class Packet: cdef nfq_q_handle *_qh cdef nfq_data *_nfa cdef nfqnl_msg_packet_hdr *_hdr + cdef nfqnl_msg_packet_hw *_hw cdef bint _verdict_is_set # True if verdict has been issued, # false otherwise cdef bint _mark_is_set # True if a mark has been given, false otherwise @@ -186,6 +187,8 @@ cdef class Packet: cdef Py_ssize_t payload_len cdef readonly char *payload cdef timeval timestamp + cdef u_int8_t hw_addr[8] + # TODO: implement these #cdef u_int8_t hw_addr[8] # A eui64-formatted address? #cdef readonly u_int32_t nfmark diff --git a/netfilterqueue.pyx b/netfilterqueue.pyx index 18718a0..2004050 100644 --- a/netfilterqueue.pyx +++ b/netfilterqueue.pyx @@ -57,10 +57,12 @@ cdef class Packet: self._qh = qh self._nfa = nfa self._hdr = nfq_get_msg_packet_hdr(nfa) + self._hw = nfq_get_packet_hw(nfa) self.id = ntohl(self._hdr.packet_id) self.hw_protocol = ntohs(self._hdr.hw_protocol) self.hook = self._hdr.hook + self.hw_addr = self._hw.hw_addr self.payload_len = nfq_get_payload(self._nfa, &self.payload) if self.payload_len < 0: @@ -97,6 +99,15 @@ cdef class Packet: self._verdict_is_set = True + def get_hw(self): + """Return the hardware address as Python string.""" + cdef object py_string + if cpython.version.PY_MAJOR_VERSION >= 3: + py_string = PyBytes_FromStringAndSize(self.hw_addr, 8) + else: + py_string = PyString_FromStringAndSize(self.hw_addr, 8) + return py_string + def get_payload(self): """Return payload as Python string.""" cdef object py_string