From 5bb1e56b69fb744a6e6cf2f7cd6c08d524ce9476 Mon Sep 17 00:00:00 2001 From: eaglegai Date: Thu, 29 Oct 2020 19:59:04 +0800 Subject: [PATCH] switch to python3 instead of python2 --- libdnet.spec | 30 +- ...hon2-support-and-add-python3-support.patch | 3054 +++++++++++++++++ 2 files changed, 3072 insertions(+), 12 deletions(-) create mode 100644 remove-python2-support-and-add-python3-support.patch diff --git a/libdnet.spec b/libdnet.spec index 9ced350..c6e11f0 100644 --- a/libdnet.spec +++ b/libdnet.spec @@ -1,6 +1,6 @@ Name: libdnet Version: 1.12 -Release: 29 +Release: 30 Summary: Simple portable interface work with low-level networking routines License: BSD @@ -9,8 +9,8 @@ Source: http://src.fedoraproject.org/repo/pkgs/libdnet/libdnet-1.12.tgz/9253e Patch0: %{name}-shrext.patch Patch1: dnet-config-multilib.patch -Patch9000: add-sorted-function-remove-differences.patch - +Patch2: add-sorted-function-remove-differences.patch +Patch3: remove-python2-support-and-add-python3-support.patch BuildRequires: gcc-c++ %description @@ -34,16 +34,16 @@ Requires: %{name} = %{version}-%{release} %description progs %{name}-progs contains sample applications that want to make use of %{name} -%package -n python2-%{name} -%{?python_provide:%python_provide python2-%{name}} +%package -n python3-%{name} +%{?python_provide:%python_provide python3-%{name}} Provides: %{name}-python = %{version}-%{release} Obsoletes: %{name}-python Summary: Python bindings for %{name} Requires: %{name} = %{version}-%{release} -BuildRequires: python2-devel +BuildRequires: python3-devel -%description -n python2-%{name} -Python2 package for python-%{name} +%description -n python3-%{name} +Python3 package for python-%{name} %package_help @@ -58,14 +58,14 @@ export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %make_build pushd python -%{__python2} setup.py build +%{__python3} setup.py build popd %install %{__make} install DESTDIR=%{buildroot} pushd python -%{__python2} setup.py install --skip-build --root %{buildroot} +%{__python3} setup.py install --skip-build --root %{buildroot} popd %delete_la @@ -89,9 +89,9 @@ popd %defattr(-,root,root) %{_sbindir}/* -%files -n python2-%{name} +%files -n python3-%{name} %defattr(-,root,root) -%{python2_sitearch}/* +%{python3_sitearch}/* %files help %defattr(-,root,root) @@ -100,6 +100,12 @@ popd %{_mandir}/man8/*.8* %changelog +* Thu Oct 29 2020 gaihuiying - 1.12 - 30 +- Type:rquirement +- ID:NA +- SUG:NA +- DESC:remove python2, and switch to python3 + * Fri Sep 11 2020 lunankun - 1.12 - 29 - Type:bugfix - ID:NA diff --git a/remove-python2-support-and-add-python3-support.patch b/remove-python2-support-and-add-python3-support.patch new file mode 100644 index 0000000..a180431 --- /dev/null +++ b/remove-python2-support-and-add-python3-support.patch @@ -0,0 +1,3054 @@ +From 8337d32bf72a270975012895a5e481e24fb368a4 Mon Sep 17 00:00:00 2001 +From: Mayank Rawat +Date: Thu, 7 May 2020 20:04:30 -0700 +Subject: [PATCH] removed python2 support python3 support added + +removed deprecated string function and module creation process +--- + python/dnet.c | 856 ++++++++++++++++++++++++++++---------------------------- + python/dnet.pyx | 106 +++---- + 2 files changed, 483 insertions(+), 479 deletions(-) + +diff --git a/python/dnet.c b/python/dnet.c +index 3af2a28..2e5703b 100644 +--- a/python/dnet.c ++++ b/python/dnet.c +@@ -1,8 +1,10 @@ + /* Generated by Pyrex 0.9.4.1 on Sat Jan 20 06:39:10 2007 */ + + #define PY_SSIZE_T_CLEAN ++#define Py_TPFLAGS_CHECKTYPES 0 + #include "Python.h" + #include "structmember.h" ++ + #ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG + #endif +@@ -10,8 +12,8 @@ + typedef int Py_ssize_t; + #define PY_SSIZE_T_MAX INT_MAX + #define PY_SSIZE_T_MIN INT_MIN +- #define PyInt_FromSsize_t(z) PyInt_FromLong(z) +- #define PyInt_AsSsize_t(o) PyInt_AsLong(o) ++ #define PyLong_FromSsize_t(z) PyLong_FromLong(z) ++ #define PyLong_AsSsize_t(o) PyLong_AsLong(o) + #endif + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" +@@ -405,12 +407,12 @@ static PyObject *__pyx_f_4dnet___memcpy(char (*__pyx_v_dst),PyObject *__pyx_v_sr + Py_INCREF(__pyx_v_src); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":44 */ +- __pyx_1 = (PyString_Size(__pyx_v_src) != __pyx_v_n); ++ __pyx_1 = (PyBytes_Size(__pyx_v_src) != __pyx_v_n); + if (__pyx_1) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":45 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;} +- __pyx_3 = PyInt_FromLong(__pyx_v_n); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;} ++ __pyx_3 = PyLong_FromLong(__pyx_v_n); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;} + __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); + Py_INCREF(__pyx_v_src); +@@ -427,7 +429,7 @@ static PyObject *__pyx_f_4dnet___memcpy(char (*__pyx_v_dst),PyObject *__pyx_v_sr + __pyx_L2:; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":46 */ +- __pyx_5 = PyString_AsString(__pyx_v_src); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; goto __pyx_L1;} ++ __pyx_5 = PyBytes_AsString(__pyx_v_src); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; goto __pyx_L1;} + memcpy(__pyx_v_dst,__pyx_5,__pyx_v_n); + + __pyx_r = Py_None; Py_INCREF(Py_None); +@@ -449,7 +451,7 @@ static PyObject *__pyx_f_4dnet___oserror(void) { + PyObject *__pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":50 */ +- __pyx_1 = PyString_FromString(strerror(errno)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; goto __pyx_L1;} ++ __pyx_1 = PyBytes_FromString(strerror(errno)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; + goto __pyx_L0; +@@ -519,7 +521,7 @@ static int __pyx_f_4dnet_3eth___init__(PyObject *__pyx_v_self, PyObject *__pyx_a + Py_INCREF(__pyx_v_device); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":110 */ +- __pyx_1 = PyString_AsString(__pyx_v_device); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; goto __pyx_L1;} ++ __pyx_1 = PyBytes_AsString(__pyx_v_device); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; goto __pyx_L1;} + ((struct __pyx_obj_4dnet_eth *)__pyx_v_self)->eth = eth_open(__pyx_1); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":111 */ +@@ -578,7 +580,7 @@ static PyObject *__pyx_f_4dnet_3eth_get(PyObject *__pyx_v_self, PyObject *__pyx_ + __pyx_L2:; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":120 */ +- __pyx_2 = PyString_FromStringAndSize(__pyx_v_ea.data,6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;} ++ __pyx_2 = PyBytes_FromStringAndSize(__pyx_v_ea.data,6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; +@@ -654,8 +656,8 @@ static PyObject *__pyx_f_4dnet_3eth_send(PyObject *__pyx_v_self, PyObject *__pyx + Py_INCREF(__pyx_v_frame); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":141 */ +- __pyx_1 = PyString_AsString(__pyx_v_frame); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; goto __pyx_L1;} +- __pyx_2 = PyInt_FromLong(eth_send(((struct __pyx_obj_4dnet_eth *)__pyx_v_self)->eth,__pyx_1,PyString_Size(__pyx_v_frame))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; goto __pyx_L1;} ++ __pyx_1 = PyBytes_AsString(__pyx_v_frame); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; goto __pyx_L1;} ++ __pyx_2 = PyLong_FromLong(eth_send(((struct __pyx_obj_4dnet_eth *)__pyx_v_self)->eth,__pyx_1,PyBytes_Size(__pyx_v_frame))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; +@@ -710,7 +712,7 @@ static PyObject *__pyx_f_4dnet_eth_ntoa(PyObject *__pyx_self, PyObject *__pyx_ar + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":152 */ +- __pyx_1 = PyString_FromString(eth_ntoa((&__pyx_v_ea))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; goto __pyx_L1;} ++ __pyx_1 = PyBytes_FromString(eth_ntoa((&__pyx_v_ea))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; + goto __pyx_L0; +@@ -744,7 +746,7 @@ static PyObject *__pyx_f_4dnet_eth_aton(PyObject *__pyx_self, PyObject *__pyx_ar + Py_INCREF(__pyx_v_buf); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":158 */ +- __pyx_1 = PyString_AsString(__pyx_v_buf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; goto __pyx_L1;} ++ __pyx_1 = PyBytes_AsString(__pyx_v_buf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; goto __pyx_L1;} + __pyx_2 = (eth_aton(__pyx_1,(&__pyx_v_ea)) < 0); + if (__pyx_2) { + +@@ -758,7 +760,7 @@ static PyObject *__pyx_f_4dnet_eth_aton(PyObject *__pyx_self, PyObject *__pyx_ar + __pyx_L2:; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":160 */ +- __pyx_3 = PyString_FromStringAndSize(__pyx_v_ea.data,6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; goto __pyx_L1;} ++ __pyx_3 = PyBytes_FromStringAndSize(__pyx_v_ea.data,6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; goto __pyx_L1;} + __pyx_r = __pyx_3; + __pyx_3 = 0; + goto __pyx_L0; +@@ -775,7 +777,7 @@ static PyObject *__pyx_f_4dnet_eth_aton(PyObject *__pyx_self, PyObject *__pyx_ar + } + + static PyObject *__pyx_f_4dnet_eth_pack_hdr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +-static char __pyx_doc_4dnet_eth_pack_hdr[] = "Return a packed binary string representing an Ethernet header.\n \n Keyword arguments:\n dst -- destination address (6-byte binary string)\n src -- source address (6-byte binary string)\n type -- Ethernet payload type (ETH_TYPE_*) (16-bit integer)\n "; ++static char __pyx_doc_4dnet_eth_pack_hdr[] = "Return a packed binary string representing an Ethernet header.\n \n Keyword arguments:\n dst -- destination address (6-byte binary string)\n src -- source address (6-byte binary string)\n type -- Ethernet payload type (ETH_TYPE_*) (16-bit integer)\n "; + static PyObject *__pyx_f_4dnet_eth_pack_hdr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_dst = 0; + PyObject *__pyx_v_src = 0; +@@ -804,11 +806,11 @@ static PyObject *__pyx_f_4dnet_eth_pack_hdr(PyObject *__pyx_self, PyObject *__py + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":175 */ +- __pyx_2 = PyInt_AsLong(__pyx_v_type); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; goto __pyx_L1;} ++ __pyx_2 = PyLong_AsLong(__pyx_v_type); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; goto __pyx_L1;} + eth_pack_hdr(__pyx_v_hdr,__pyx_v_d,__pyx_v_s,__pyx_2); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":176 */ +- __pyx_1 = PyString_FromStringAndSize(__pyx_v_hdr,14); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; goto __pyx_L1;} ++ __pyx_1 = PyBytes_FromStringAndSize(__pyx_v_hdr,14); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; + goto __pyx_L0; +@@ -879,8 +881,8 @@ static PyObject *__pyx_f_4dnet_2ip_send(PyObject *__pyx_v_self, PyObject *__pyx_ + Py_INCREF(__pyx_v_pkt); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":259 */ +- __pyx_1 = PyString_AsString(__pyx_v_pkt); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L1;} +- __pyx_2 = PyInt_FromLong(ip_send(((struct __pyx_obj_4dnet_ip *)__pyx_v_self)->ip,__pyx_1,PyString_Size(__pyx_v_pkt))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L1;} ++ __pyx_1 = PyBytes_AsString(__pyx_v_pkt); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L1;} ++ __pyx_2 = PyLong_FromLong(ip_send(((struct __pyx_obj_4dnet_ip *)__pyx_v_self)->ip,__pyx_1,PyBytes_Size(__pyx_v_pkt))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; +@@ -934,14 +936,14 @@ static PyObject *__pyx_f_4dnet_ip_ntoa(PyObject *__pyx_self, PyObject *__pyx_arg + Py_INCREF(__pyx_v_buf); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":271 */ +- __pyx_1 = PyInt_Check(__pyx_v_buf); ++ __pyx_1 = PyLong_Check(__pyx_v_buf); + if (!__pyx_1) { + __pyx_1 = PyLong_Check(__pyx_v_buf); + } + if (__pyx_1) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":272 */ +- __pyx_2 = PyInt_AsUnsignedLongMask(__pyx_v_buf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; goto __pyx_L1;} ++ __pyx_2 = PyLong_AsUnsignedLongMask(__pyx_v_buf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; goto __pyx_L1;} + __pyx_v_i = ntohl(__pyx_2); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":273 */ +@@ -957,7 +959,7 @@ static PyObject *__pyx_f_4dnet_ip_ntoa(PyObject *__pyx_self, PyObject *__pyx_arg + __pyx_L2:; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":276 */ +- __pyx_3 = PyString_FromString(ip_ntoa((&__pyx_v_ia))); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} ++ __pyx_3 = PyBytes_FromString(ip_ntoa((&__pyx_v_ia))); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} + __pyx_r = __pyx_3; + __pyx_3 = 0; + goto __pyx_L0; +@@ -991,7 +993,7 @@ static PyObject *__pyx_f_4dnet_ip_aton(PyObject *__pyx_self, PyObject *__pyx_arg + Py_INCREF(__pyx_v_buf); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":282 */ +- __pyx_1 = PyString_AsString(__pyx_v_buf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; goto __pyx_L1;} ++ __pyx_1 = PyBytes_AsString(__pyx_v_buf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; goto __pyx_L1;} + __pyx_2 = (ip_aton(__pyx_1,(&__pyx_v_ia)) < 0); + if (__pyx_2) { + +@@ -1005,7 +1007,7 @@ static PyObject *__pyx_f_4dnet_ip_aton(PyObject *__pyx_self, PyObject *__pyx_arg + __pyx_L2:; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":284 */ +- __pyx_3 = PyString_FromStringAndSize(((char (*))(&__pyx_v_ia)),4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;} ++ __pyx_3 = PyBytes_FromStringAndSize(((char (*))(&__pyx_v_ia)),4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;} + __pyx_r = __pyx_3; + __pyx_3 = 0; + goto __pyx_L0; +@@ -1055,7 +1057,7 @@ static PyObject *__pyx_f_4dnet_ip_checksum(PyObject *__pyx_self, PyObject *__pyx + ip_checksum(__pyx_v_buf,__pyx_v_n); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":300 */ +- __pyx_2 = PyString_FromStringAndSize(__pyx_v_buf,__pyx_v_n); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; goto __pyx_L1;} ++ __pyx_2 = PyBytes_FromStringAndSize(__pyx_v_buf,__pyx_v_n); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; +@@ -1067,14 +1069,14 @@ static PyObject *__pyx_f_4dnet_ip_checksum(PyObject *__pyx_self, PyObject *__pyx + __pyx_v_p = malloc(__pyx_v_n); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":302 */ +- __pyx_3 = PyString_AsString(__pyx_v_pkt); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; goto __pyx_L1;} ++ __pyx_3 = PyBytes_AsString(__pyx_v_pkt); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; goto __pyx_L1;} + memcpy(__pyx_v_p,__pyx_3,__pyx_v_n); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":303 */ + ip_checksum(__pyx_v_p,__pyx_v_n); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":304 */ +- __pyx_2 = PyString_FromStringAndSize(__pyx_v_p,__pyx_v_n); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; goto __pyx_L1;} ++ __pyx_2 = PyBytes_FromStringAndSize(__pyx_v_p,__pyx_v_n); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; goto __pyx_L1;} + Py_DECREF(__pyx_v_s); + __pyx_v_s = __pyx_2; + __pyx_2 = 0; +@@ -1126,7 +1128,7 @@ static PyObject *__pyx_f_4dnet_ip_cksum_add(PyObject *__pyx_self, PyObject *__py + if (__pyx_1) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":313 */ +- __pyx_2 = PyInt_FromLong(ip_cksum_add(__pyx_v_p,__pyx_v_n,__pyx_v_sum)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; goto __pyx_L1;} ++ __pyx_2 = PyLong_FromLong(ip_cksum_add(__pyx_v_p,__pyx_v_n,__pyx_v_sum)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; +@@ -1162,7 +1164,7 @@ static PyObject *__pyx_f_4dnet_ip_cksum_carry(PyObject *__pyx_self, PyObject *__ + if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_sum)) return 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":318 */ +- __pyx_1 = PyInt_FromLong(ip_cksum_carry(__pyx_v_sum)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(ip_cksum_carry(__pyx_v_sum)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; + goto __pyx_L0; +@@ -1178,7 +1180,7 @@ static PyObject *__pyx_f_4dnet_ip_cksum_carry(PyObject *__pyx_self, PyObject *__ + } + + static PyObject *__pyx_f_4dnet_ip_pack_hdr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +-static char __pyx_doc_4dnet_ip_pack_hdr[] = "Return a packed binary string representing an IP header.\n \n Keyword arguments:\n tos -- type of service (8-bit integer)\n len -- length (IP_HDR_LEN + payload) (16-bit integer)\n id -- packet ID (16-bit integer)\n off -- fragmentation offset (16-bit integer)\n ttl -- time-to-live (8-bit integer)\n p -- protocol (IP_PROTO_*) (8-bit integer)\n src -- source address (4-byte binary string)\n dst -- destination address (4-byte binary string)\n "; ++static char __pyx_doc_4dnet_ip_pack_hdr[] = "Return a packed binary string representing an IP header.\n \n Keyword arguments:\n tos -- type of service (8-bit integer)\n len -- length (IP_HDR_LEN + payload) (16-bit integer)\n id -- packet ID (16-bit integer)\n off -- fragmentation offset (16-bit integer)\n ttl -- time-to-live (8-bit integer)\n p -- protocol (IP_PROTO_*) (8-bit integer)\n src -- source address (4-byte binary string)\n dst -- destination address (4-byte binary string)\n "; + static PyObject *__pyx_f_4dnet_ip_pack_hdr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_tos = 0; + PyObject *__pyx_v_len = 0; +@@ -1227,16 +1229,16 @@ static PyObject *__pyx_f_4dnet_ip_pack_hdr(PyObject *__pyx_self, PyObject *__pyx + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":339 */ +- __pyx_2 = PyInt_AsLong(__pyx_v_tos); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;} +- __pyx_3 = PyInt_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;} +- __pyx_4 = PyInt_AsLong(__pyx_v_id); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;} +- __pyx_5 = PyInt_AsLong(__pyx_v_off); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;} +- __pyx_6 = PyInt_AsLong(__pyx_v_ttl); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;} +- __pyx_7 = PyInt_AsLong(__pyx_v_p); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;} ++ __pyx_2 = PyLong_AsLong(__pyx_v_tos); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;} ++ __pyx_3 = PyLong_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;} ++ __pyx_4 = PyLong_AsLong(__pyx_v_id); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;} ++ __pyx_5 = PyLong_AsLong(__pyx_v_off); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;} ++ __pyx_6 = PyLong_AsLong(__pyx_v_ttl); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;} ++ __pyx_7 = PyLong_AsLong(__pyx_v_p); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;} + ip_pack_hdr(__pyx_v_hdr,__pyx_2,__pyx_3,__pyx_4,__pyx_5,__pyx_6,__pyx_7,__pyx_v_s,__pyx_v_d); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":340 */ +- __pyx_1 = PyString_FromStringAndSize(__pyx_v_hdr,20); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; goto __pyx_L1;} ++ __pyx_1 = PyBytes_FromStringAndSize(__pyx_v_hdr,20); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; + goto __pyx_L0; +@@ -1275,7 +1277,7 @@ static PyObject *__pyx_f_4dnet_ip6_ntoa(PyObject *__pyx_self, PyObject *__pyx_ar + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":375 */ +- __pyx_1 = PyString_FromString(ip6_ntoa((&__pyx_v_ia))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; goto __pyx_L1;} ++ __pyx_1 = PyBytes_FromString(ip6_ntoa((&__pyx_v_ia))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; + goto __pyx_L0; +@@ -1309,7 +1311,7 @@ static PyObject *__pyx_f_4dnet_ip6_aton(PyObject *__pyx_self, PyObject *__pyx_ar + Py_INCREF(__pyx_v_buf); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":381 */ +- __pyx_1 = PyString_AsString(__pyx_v_buf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; goto __pyx_L1;} ++ __pyx_1 = PyBytes_AsString(__pyx_v_buf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; goto __pyx_L1;} + __pyx_2 = (ip6_aton(__pyx_1,(&__pyx_v_ia)) < 0); + if (__pyx_2) { + +@@ -1323,7 +1325,7 @@ static PyObject *__pyx_f_4dnet_ip6_aton(PyObject *__pyx_self, PyObject *__pyx_ar + __pyx_L2:; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":383 */ +- __pyx_3 = PyString_FromStringAndSize(((char (*))(&__pyx_v_ia)),16); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; goto __pyx_L1;} ++ __pyx_3 = PyBytes_FromStringAndSize(((char (*))(&__pyx_v_ia)),16); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; goto __pyx_L1;} + __pyx_r = __pyx_3; + __pyx_3 = 0; + goto __pyx_L0; +@@ -1350,8 +1352,8 @@ static PyObject *__pyx_f_4dnet_ip6_checksum(PyObject *__pyx_self, PyObject *__py + Py_INCREF(__pyx_v_buf); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":392 */ +- __pyx_1 = PyString_AsString(__pyx_v_buf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; goto __pyx_L1;} +- ip6_checksum(__pyx_1,PyString_Size(__pyx_v_buf)); ++ __pyx_1 = PyBytes_AsString(__pyx_v_buf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; goto __pyx_L1;} ++ ip6_checksum(__pyx_1,PyBytes_Size(__pyx_v_buf)); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":393 */ + Py_INCREF(__pyx_v_buf); +@@ -1369,7 +1371,7 @@ static PyObject *__pyx_f_4dnet_ip6_checksum(PyObject *__pyx_self, PyObject *__py + } + + static PyObject *__pyx_f_4dnet_ip6_pack_hdr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +-static char __pyx_doc_4dnet_ip6_pack_hdr[] = "Return a packed binary string representing an IPv6 header.\n \n Keyword arguments:\n fc -- flow class (8-bit integer)\n fl -- flow label (20-bit integer)\n plen -- payload length (16-bit integer)\n nxt -- next header (IP_PROTO_*) (8-bit integer)\n hlim -- hop limit (8-bit integer)\n src -- source address (16-byte binary string)\n dst -- destination address (16-byte binary string)\n "; ++static char __pyx_doc_4dnet_ip6_pack_hdr[] = "Return a packed binary string representing an IPv6 header.\n \n Keyword arguments:\n fc -- flow class (8-bit integer)\n fl -- flow label (20-bit integer)\n plen -- payload length (16-bit integer)\n nxt -- next header (IP_PROTO_*) (8-bit integer)\n hlim -- hop limit (8-bit integer)\n src -- source address (16-byte binary string)\n dst -- destination address (16-byte binary string)\n "; + static PyObject *__pyx_f_4dnet_ip6_pack_hdr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_fc = 0; + PyObject *__pyx_v_fl = 0; +@@ -1414,15 +1416,15 @@ static PyObject *__pyx_f_4dnet_ip6_pack_hdr(PyObject *__pyx_self, PyObject *__py + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":412 */ +- __pyx_2 = PyInt_AsLong(__pyx_v_fc); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;} +- __pyx_3 = PyInt_AsLong(__pyx_v_fl); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;} +- __pyx_4 = PyInt_AsLong(__pyx_v_plen); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;} +- __pyx_5 = PyInt_AsLong(__pyx_v_nxt); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;} +- __pyx_6 = PyInt_AsLong(__pyx_v_hlim); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;} ++ __pyx_2 = PyLong_AsLong(__pyx_v_fc); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;} ++ __pyx_3 = PyLong_AsLong(__pyx_v_fl); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;} ++ __pyx_4 = PyLong_AsLong(__pyx_v_plen); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;} ++ __pyx_5 = PyLong_AsLong(__pyx_v_nxt); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;} ++ __pyx_6 = PyLong_AsLong(__pyx_v_hlim); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;} + ip6_pack_hdr(__pyx_v_hdr,__pyx_2,__pyx_3,__pyx_4,__pyx_5,__pyx_6,__pyx_v_s,__pyx_v_d); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":413 */ +- __pyx_1 = PyString_FromStringAndSize(__pyx_v_hdr,40); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; goto __pyx_L1;} ++ __pyx_1 = PyBytes_FromStringAndSize(__pyx_v_hdr,40); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; + goto __pyx_L0; +@@ -1468,27 +1470,27 @@ static int __pyx_f_4dnet_4addr___init__(PyObject *__pyx_v_self, PyObject *__pyx_ + Py_INCREF(__pyx_v_type); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":445 */ +- if (PyObject_Cmp(__pyx_v_addrtxt, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; goto __pyx_L1;} ++ if (__pyx_1=PyObject_RichCompareBool(__pyx_v_addrtxt, Py_None, Py_EQ) == 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; goto __pyx_L1;} + __pyx_1 = __pyx_1 != 0; + if (__pyx_1) { +- __pyx_2 = PyString_AsString(__pyx_v_addrtxt); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; goto __pyx_L1;} ++ __pyx_2 = PyBytes_AsString(__pyx_v_addrtxt); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; goto __pyx_L1;} + __pyx_1 = (addr_aton(__pyx_2,(&((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr)) < 0); + } + if (__pyx_1) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":446 */ +- __pyx_1 = (PyString_Size(__pyx_v_addrtxt) == 4); ++ __pyx_1 = (PyBytes_Size(__pyx_v_addrtxt) == 4); + if (__pyx_1) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":447 */ + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_IP); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; goto __pyx_L1;} +- __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; goto __pyx_L1;} ++ __pyx_4 = PyLong_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type = __pyx_4; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":448 */ + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_IP_ADDR_BITS); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; goto __pyx_L1;} +- __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; goto __pyx_L1;} ++ __pyx_4 = PyLong_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits = __pyx_4; + +@@ -1529,7 +1531,7 @@ static PyObject *__pyx_f_4dnet_4addr_4type___get__(PyObject *__pyx_v_self) { + Py_INCREF(__pyx_v_self); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":456 */ +- __pyx_1 = PyInt_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; + goto __pyx_L0; +@@ -1554,7 +1556,7 @@ static int __pyx_f_4dnet_4addr_4type___set__(PyObject *__pyx_v_self, PyObject *_ + int __pyx_1; + PyObject *__pyx_2 = 0; + Py_INCREF(__pyx_v_self); +- __pyx_v_value = PyInt_AsUnsignedLongMask(__pyx_arg_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; goto __pyx_L1;} ++ __pyx_v_value = PyLong_AsUnsignedLongMask(__pyx_arg_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; goto __pyx_L1;} + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":458 */ + __pyx_1 = (__pyx_v_value > 65535); +@@ -1588,7 +1590,7 @@ static PyObject *__pyx_f_4dnet_4addr_4bits___get__(PyObject *__pyx_v_self) { + Py_INCREF(__pyx_v_self); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":464 */ +- __pyx_1 = PyInt_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; + goto __pyx_L0; +@@ -1611,7 +1613,7 @@ static int __pyx_f_4dnet_4addr_4bits___set__(PyObject *__pyx_v_self, PyObject *_ + int __pyx_1; + PyObject *__pyx_2 = 0; + Py_INCREF(__pyx_v_self); +- __pyx_v_value = PyInt_AsUnsignedLongMask(__pyx_arg_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; goto __pyx_L1;} ++ __pyx_v_value = PyLong_AsUnsignedLongMask(__pyx_arg_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; goto __pyx_L1;} + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":466 */ + __pyx_1 = (__pyx_v_value > 65535); +@@ -1654,9 +1656,9 @@ static PyObject *__pyx_f_4dnet_4addr_4data___get__(PyObject *__pyx_v_self) { + Py_INCREF(__pyx_v_self); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":472 */ +- __pyx_1 = PyInt_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_ETH); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; goto __pyx_L1;} +- if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; goto __pyx_L1;} ++ if (__pyx_3 = PyObject_RichCompareBool(__pyx_1, __pyx_2, Py_EQ) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; goto __pyx_L1;} + __pyx_3 = __pyx_3 == 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; +@@ -1669,9 +1671,9 @@ static PyObject *__pyx_f_4dnet_4addr_4data___get__(PyObject *__pyx_v_self) { + goto __pyx_L0; + goto __pyx_L2; + } +- __pyx_2 = PyInt_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; goto __pyx_L1;} ++ __pyx_2 = PyLong_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; goto __pyx_L1;} + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_IP); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; goto __pyx_L1;} +- if (PyObject_Cmp(__pyx_2, __pyx_1, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; goto __pyx_L1;} ++ if (__pyx_3=PyObject_RichCompareBool(__pyx_2, __pyx_1, Py_EQ) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; goto __pyx_L1;} + __pyx_3 = __pyx_3 == 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; +@@ -1684,9 +1686,9 @@ static PyObject *__pyx_f_4dnet_4addr_4data___get__(PyObject *__pyx_v_self) { + goto __pyx_L0; + goto __pyx_L2; + } +- __pyx_1 = PyInt_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_IP6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; goto __pyx_L1;} +- if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; goto __pyx_L1;} ++ if (__pyx_3=PyObject_RichCompareBool(__pyx_1, __pyx_2, Py_EQ) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; goto __pyx_L1;} + __pyx_3 = __pyx_3 == 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; +@@ -1734,9 +1736,9 @@ static PyObject *__pyx_f_4dnet_4addr_3eth___get__(PyObject *__pyx_v_self) { + Py_INCREF(__pyx_v_self); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":484 */ +- __pyx_1 = PyInt_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_ETH); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; goto __pyx_L1;} +- if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; goto __pyx_L1;} ++ if (__pyx_3 = PyObject_RichCompareBool(__pyx_1, __pyx_2,Py_EQ ) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; goto __pyx_L1;} + __pyx_3 = __pyx_3 != 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; +@@ -1752,7 +1754,7 @@ static PyObject *__pyx_f_4dnet_4addr_3eth___get__(PyObject *__pyx_v_self) { + __pyx_L2:; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":486 */ +- __pyx_2 = PyString_FromStringAndSize(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_data8,6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; goto __pyx_L1;} ++ __pyx_2 = PyBytes_FromStringAndSize(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_data8,6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; +@@ -1784,9 +1786,9 @@ static int __pyx_f_4dnet_4addr_3eth___set__(PyObject *__pyx_v_self, PyObject *__ + Py_INCREF(__pyx_v_value); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":489 */ +- __pyx_1 = PyInt_FromLong(PyString_Size(__pyx_v_value)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(PyBytes_Size(__pyx_v_value)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_ETH_ADDR_LEN); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; goto __pyx_L1;} +- if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; goto __pyx_L1;} ++ if (__pyx_3=PyObject_RichCompareBool(__pyx_1, __pyx_2,Py_EQ ) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; goto __pyx_L1;} + __pyx_3 = __pyx_3 != 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; +@@ -1807,13 +1809,13 @@ static int __pyx_f_4dnet_4addr_3eth___set__(PyObject *__pyx_v_self, PyObject *__ + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":492 */ + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_ETH); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; goto __pyx_L1;} +- __pyx_4 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; goto __pyx_L1;} ++ __pyx_4 = PyLong_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type = __pyx_4; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":493 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_ETH_ADDR_BITS); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; goto __pyx_L1;} +- __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; goto __pyx_L1;} ++ __pyx_4 = PyLong_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits = __pyx_4; + +@@ -1843,9 +1845,9 @@ static PyObject *__pyx_f_4dnet_4addr_2ip___get__(PyObject *__pyx_v_self) { + Py_INCREF(__pyx_v_self); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":498 */ +- __pyx_1 = PyInt_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_IP); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; goto __pyx_L1;} +- if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; goto __pyx_L1;} ++ if (__pyx_3=PyObject_RichCompareBool(__pyx_1, __pyx_2, Py_EQ) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; goto __pyx_L1;} + __pyx_3 = __pyx_3 != 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; +@@ -1861,7 +1863,7 @@ static PyObject *__pyx_f_4dnet_4addr_2ip___get__(PyObject *__pyx_v_self) { + __pyx_L2:; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":500 */ +- __pyx_2 = PyString_FromStringAndSize(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_data8,4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; goto __pyx_L1;} ++ __pyx_2 = PyBytes_FromStringAndSize(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_data8,4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; +@@ -1893,11 +1895,11 @@ static int __pyx_f_4dnet_4addr_2ip___set__(PyObject *__pyx_v_self, PyObject *__p + Py_INCREF(__pyx_v_value); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":504 */ +- __pyx_1 = PyInt_Check(__pyx_v_value); ++ __pyx_1 = PyLong_Check(__pyx_v_value); + if (__pyx_1) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":505 */ +- ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_ip = htonl(PyInt_AsLong(__pyx_v_value)); ++ ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_ip = htonl(PyLong_AsLong(__pyx_v_value)); + goto __pyx_L2; + } + __pyx_1 = PyLong_Check(__pyx_v_value); +@@ -1907,9 +1909,9 @@ static int __pyx_f_4dnet_4addr_2ip___set__(PyObject *__pyx_v_self, PyObject *__p + ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_ip = htonl(PyLong_AsUnsignedLong(__pyx_v_value)); + goto __pyx_L2; + } +- __pyx_2 = PyInt_FromLong(PyString_Size(__pyx_v_value)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; goto __pyx_L1;} ++ __pyx_2 = PyLong_FromLong(PyBytes_Size(__pyx_v_value)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_IP_ADDR_LEN); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; goto __pyx_L1;} +- if (PyObject_Cmp(__pyx_2, __pyx_3, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; goto __pyx_L1;} ++ if (__pyx_1 = PyObject_RichCompareBool(__pyx_2, __pyx_3, Py_EQ) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; goto __pyx_L1;} + __pyx_1 = __pyx_1 != 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; +@@ -1932,13 +1934,13 @@ static int __pyx_f_4dnet_4addr_2ip___set__(PyObject *__pyx_v_self, PyObject *__p + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":512 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_IP); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;} +- __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;} ++ __pyx_4 = PyLong_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type = __pyx_4; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":513 */ + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_IP_ADDR_BITS); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;} +- __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;} ++ __pyx_4 = PyLong_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits = __pyx_4; + +@@ -1968,9 +1970,9 @@ static PyObject *__pyx_f_4dnet_4addr_3ip6___get__(PyObject *__pyx_v_self) { + Py_INCREF(__pyx_v_self); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":518 */ +- __pyx_1 = PyInt_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_IP6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; goto __pyx_L1;} +- if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; goto __pyx_L1;} ++ if (__pyx_3 = PyObject_RichCompareBool(__pyx_1, __pyx_2, Py_EQ) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; goto __pyx_L1;} + __pyx_3 = __pyx_3 != 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; +@@ -1986,7 +1988,7 @@ static PyObject *__pyx_f_4dnet_4addr_3ip6___get__(PyObject *__pyx_v_self) { + __pyx_L2:; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":520 */ +- __pyx_2 = PyString_FromStringAndSize(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_data8,16); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; goto __pyx_L1;} ++ __pyx_2 = PyBytes_FromStringAndSize(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_data8,16); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; +@@ -2018,9 +2020,9 @@ static int __pyx_f_4dnet_4addr_3ip6___set__(PyObject *__pyx_v_self, PyObject *__ + Py_INCREF(__pyx_v_value); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":523 */ +- __pyx_1 = PyInt_FromLong(PyString_Size(__pyx_v_value)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(PyBytes_Size(__pyx_v_value)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_IP6_ADDR_LEN); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; goto __pyx_L1;} +- if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; goto __pyx_L1;} ++ if (__pyx_3 = PyObject_RichCompareBool(__pyx_1, __pyx_2, Py_EQ) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; goto __pyx_L1;} + __pyx_3 = __pyx_3 != 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; +@@ -2041,13 +2043,13 @@ static int __pyx_f_4dnet_4addr_3ip6___set__(PyObject *__pyx_v_self, PyObject *__ + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":526 */ + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_IP6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; goto __pyx_L1;} +- __pyx_4 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; goto __pyx_L1;} ++ __pyx_4 = PyLong_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type = __pyx_4; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":527 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_IP6_ADDR_BITS); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; goto __pyx_L1;} +- __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; goto __pyx_L1;} ++ __pyx_4 = PyLong_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits = __pyx_4; + +@@ -2167,7 +2169,7 @@ static PyObject *__pyx_f_4dnet_4addr___add__(PyObject *__pyx_v_self, PyObject *_ + __pyx_v_z = Py_None; Py_INCREF(Py_None); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":543 */ +- __pyx_1 = PyInt_Check(__pyx_v_self); ++ __pyx_1 = PyLong_Check(__pyx_v_self); + if (__pyx_1) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":544 */ +@@ -2183,7 +2185,7 @@ static PyObject *__pyx_f_4dnet_4addr___add__(PyObject *__pyx_v_self, PyObject *_ + __pyx_3 = 0; + goto __pyx_L2; + } +- __pyx_1 = PyInt_Check(__pyx_v_other); ++ __pyx_1 = PyLong_Check(__pyx_v_other); + if (__pyx_1) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":546 */ +@@ -2223,7 +2225,7 @@ static PyObject *__pyx_f_4dnet_4addr___add__(PyObject *__pyx_v_self, PyObject *_ + __pyx_3 = PyLong_FromUnsignedLong(ntohl(((struct __pyx_obj_4dnet_addr *)__pyx_v_x)->_addr.addr_ip)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;} + __pyx_2 = PyNumber_Add(__pyx_3, __pyx_v_y); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; +- __pyx_5 = PyInt_AsUnsignedLongMask(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;} ++ __pyx_5 = PyLong_AsUnsignedLongMask(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + ((struct __pyx_obj_4dnet_addr *)__pyx_v_z)->_addr.addr_ip = htonl(__pyx_5); + +@@ -2405,9 +2407,9 @@ static long __pyx_f_4dnet_4addr___hash__(PyObject *__pyx_v_self) { + __pyx_v_i = Py_None; Py_INCREF(Py_None); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":578 */ +- __pyx_1 = PyInt_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_ETH); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; goto __pyx_L1;} +- if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; goto __pyx_L1;} ++ if (__pyx_3=PyObject_RichCompareBool(__pyx_1, __pyx_2, Py_EQ) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; goto __pyx_L1;} + __pyx_3 = __pyx_3 == 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; +@@ -2415,9 +2417,9 @@ static long __pyx_f_4dnet_4addr___hash__(PyObject *__pyx_v_self) { + __pyx_v_size = 6; + goto __pyx_L2; + } +- __pyx_1 = PyInt_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_IP); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; goto __pyx_L1;} +- if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; goto __pyx_L1;} ++ if (__pyx_3 = PyObject_RichCompareBool(__pyx_1, __pyx_2, Py_EQ) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; goto __pyx_L1;} + __pyx_3 = __pyx_3 == 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; +@@ -2425,9 +2427,9 @@ static long __pyx_f_4dnet_4addr___hash__(PyObject *__pyx_v_self) { + __pyx_v_size = 4; + goto __pyx_L2; + } +- __pyx_1 = PyInt_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_IP6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; goto __pyx_L1;} +- if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; goto __pyx_L1;} ++ if (__pyx_3=PyObject_RichCompareBool(__pyx_1, __pyx_2, Py_EQ) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; goto __pyx_L1;} + __pyx_3 = __pyx_3 == 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; +@@ -2451,13 +2453,13 @@ static long __pyx_f_4dnet_4addr___hash__(PyObject *__pyx_v_self) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":585 */ + for (__pyx_4 = 0+1; __pyx_4 < __pyx_v_size; ++__pyx_4) { +- __pyx_1 = PyInt_FromLong(__pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(__pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; goto __pyx_L1;} + Py_DECREF(__pyx_v_i); + __pyx_v_i = __pyx_1; + __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":586 */ +- __pyx_5 = PyInt_AsSsize_t(__pyx_v_i); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; goto __pyx_L1;} ++ __pyx_5 = PyLong_AsSsize_t(__pyx_v_i); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; goto __pyx_L1;} + __pyx_v_y = ((1000003 * __pyx_v_y) ^ (((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_data8[__pyx_5])); + __pyx_L3:; + } +@@ -2511,9 +2513,9 @@ static PyObject *__pyx_f_4dnet_4addr___int__(PyObject *__pyx_v_self) { + Py_INCREF(__pyx_v_self); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":594 */ +- __pyx_1 = PyInt_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_IP); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; goto __pyx_L1;} +- if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; goto __pyx_L1;} ++ if (__pyx_3=PyObject_RichCompareBool(__pyx_1, __pyx_2, Py_EQ) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; goto __pyx_L1;} + __pyx_3 = __pyx_3 != 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; +@@ -2591,9 +2593,9 @@ static PyObject *__pyx_f_4dnet_4addr___iter__(PyObject *__pyx_v_self) { + Py_INCREF(__pyx_v_self); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":603 */ +- __pyx_2 = PyInt_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; goto __pyx_L1;} ++ __pyx_2 = PyLong_FromLong(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_IP); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; goto __pyx_L1;} +- if (PyObject_Cmp(__pyx_2, __pyx_3, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; goto __pyx_L1;} ++ if (__pyx_1 = PyObject_RichCompareBool(__pyx_2, __pyx_3,Py_EQ) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; goto __pyx_L1;} + __pyx_1 = __pyx_1 != 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; +@@ -2669,7 +2671,7 @@ static PyObject *__pyx_f_4dnet_4addr___repr__(PyObject *__pyx_v_self) { + __pyx_L2:; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":622 */ +- __pyx_2 = PyString_FromString(__pyx_v_p); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; goto __pyx_L1;} ++ __pyx_2 = PyBytes_FromString(__pyx_v_p); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; +@@ -2698,11 +2700,11 @@ static int __pyx_f_4dnet_15__addr_ip4_iter___init__(PyObject *__pyx_v_self, PyOb + Py_INCREF(__pyx_v_max); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":629 */ +- __pyx_1 = PyInt_AsUnsignedLongMask(__pyx_v_cur); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; goto __pyx_L1;} ++ __pyx_1 = PyLong_AsUnsignedLongMask(__pyx_v_cur); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; goto __pyx_L1;} + ((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->cur = ntohl(__pyx_1); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":630 */ +- __pyx_1 = PyInt_AsUnsignedLongMask(__pyx_v_max); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; goto __pyx_L1;} ++ __pyx_1 = PyLong_AsUnsignedLongMask(__pyx_v_max); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; goto __pyx_L1;} + ((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->max = ntohl(__pyx_1); + + __pyx_r = 0; +@@ -2745,13 +2747,13 @@ static PyObject *__pyx_f_4dnet_15__addr_ip4_iter___next__(PyObject *__pyx_v_self + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":636 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_IP); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; goto __pyx_L1;} +- __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; goto __pyx_L1;} ++ __pyx_4 = PyLong_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_v_next->_addr.addr_type = __pyx_4; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":637 */ + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_IP_ADDR_BITS); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; goto __pyx_L1;} +- __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; goto __pyx_L1;} ++ __pyx_4 = PyLong_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_v_next->_addr.addr_bits = __pyx_4; + +@@ -2865,7 +2867,7 @@ static int __pyx_f_4dnet___arp_callback(struct arp_entry (*__pyx_v_entry),void ( + if (__pyx_5) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":686 */ +- __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; goto __pyx_L1;} + Py_DECREF(__pyx_v_ret); + __pyx_v_ret = __pyx_1; + __pyx_1 = 0; +@@ -2874,7 +2876,7 @@ static int __pyx_f_4dnet___arp_callback(struct arp_entry (*__pyx_v_entry),void ( + __pyx_L2:; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":687 */ +- __pyx_4 = PyInt_AsLong(__pyx_v_ret); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; goto __pyx_L1;} ++ __pyx_4 = PyLong_AsLong(__pyx_v_ret); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; goto __pyx_L1;} + __pyx_r = __pyx_4; + goto __pyx_L0; + +@@ -3057,7 +3059,7 @@ static PyObject *__pyx_f_4dnet_3arp_get(PyObject *__pyx_v_self, PyObject *__pyx_ + if (__pyx_1) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":735 */ +- __pyx_2 = PyString_FromString(addr_ntoa((&__pyx_v_entry.arp_ha))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; goto __pyx_L1;} ++ __pyx_2 = PyBytes_FromString(addr_ntoa((&__pyx_v_entry.arp_ha))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); + __pyx_2 = 0; +@@ -3115,7 +3117,7 @@ static PyObject *__pyx_f_4dnet_3arp_loop(PyObject *__pyx_v_self, PyObject *__pyx + __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":749 */ +- __pyx_1 = PyInt_FromLong(arp_loop(((struct __pyx_obj_4dnet_arp *)__pyx_v_self)->arp,__pyx_f_4dnet___arp_callback,((void (*))__pyx_v__arg))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(arp_loop(((struct __pyx_obj_4dnet_arp *)__pyx_v_self)->arp,__pyx_f_4dnet___arp_callback,((void (*))__pyx_v__arg))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; + goto __pyx_L0; +@@ -3215,7 +3217,7 @@ static void __pyx_f_4dnet_3arp___dealloc__(PyObject *__pyx_v_self) { + } + + static PyObject *__pyx_f_4dnet_arp_pack_hdr_ethip(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +-static char __pyx_doc_4dnet_arp_pack_hdr_ethip[] = "Return a packed binary string representing an Ethernet/IP ARP message.\n \n Keyword arguments:\n op -- operation (ARP_OP_*) (16-bit integer)\n sha -- sender Ethernet address (6-byte binary string)\n spa -- sender IP address (4-byte binary string)\n dha -- destination Ethernet address (6-byte binary string)\n dpa -- destination IP address (4-byte binary string)\n "; ++static char __pyx_doc_4dnet_arp_pack_hdr_ethip[] = "Return a packed binary string representing an Ethernet/IP ARP message.\n \n Keyword arguments:\n op -- operation (ARP_OP_*) (16-bit integer)\n sha -- sender Ethernet address (6-byte binary string)\n spa -- sender IP address (4-byte binary string)\n dha -- destination Ethernet address (6-byte binary string)\n dpa -- destination IP address (4-byte binary string)\n "; + static PyObject *__pyx_f_4dnet_arp_pack_hdr_ethip(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_op = 0; + PyObject *__pyx_v_sha = 0; +@@ -3260,11 +3262,11 @@ static PyObject *__pyx_f_4dnet_arp_pack_hdr_ethip(PyObject *__pyx_self, PyObject + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":779 */ +- __pyx_2 = PyInt_AsLong(__pyx_v_op); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;} ++ __pyx_2 = PyLong_AsLong(__pyx_v_op); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;} + arp_pack_hdr_ethip(__pyx_v_buf,__pyx_2,__pyx_v_sh,__pyx_v_sp,__pyx_v_dh,__pyx_v_dp); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":780 */ +- __pyx_1 = PyString_FromStringAndSize(__pyx_v_buf,28); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; goto __pyx_L1;} ++ __pyx_1 = PyBytes_FromStringAndSize(__pyx_v_buf,28); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; + goto __pyx_L0; +@@ -3285,7 +3287,7 @@ static PyObject *__pyx_f_4dnet_arp_pack_hdr_ethip(PyObject *__pyx_self, PyObject + } + + static PyObject *__pyx_f_4dnet_icmp_pack_hdr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +-static char __pyx_doc_4dnet_icmp_pack_hdr[] = "Return a packed binary string representing an ICMP header.\n\n Keyword arguments:\n type -- ICMP type (8-bit integer)\n code -- ICMP code (8-bit integer)\n "; ++static char __pyx_doc_4dnet_icmp_pack_hdr[] = "Return a packed binary string representing an ICMP header.\n\n Keyword arguments:\n type -- ICMP type (8-bit integer)\n code -- ICMP code (8-bit integer)\n "; + static PyObject *__pyx_f_4dnet_icmp_pack_hdr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_type = 0; + PyObject *__pyx_v_code = 0; +@@ -3300,12 +3302,12 @@ static PyObject *__pyx_f_4dnet_icmp_pack_hdr(PyObject *__pyx_self, PyObject *__p + Py_INCREF(__pyx_v_code); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":796 */ +- __pyx_1 = PyInt_AsLong(__pyx_v_type); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; goto __pyx_L1;} +- __pyx_2 = PyInt_AsLong(__pyx_v_code); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; goto __pyx_L1;} ++ __pyx_1 = PyLong_AsLong(__pyx_v_type); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; goto __pyx_L1;} ++ __pyx_2 = PyLong_AsLong(__pyx_v_code); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; goto __pyx_L1;} + icmp_pack_hdr(__pyx_v_buf,__pyx_1,__pyx_2); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":797 */ +- __pyx_3 = PyString_FromStringAndSize(__pyx_v_buf,(sizeof(__pyx_v_buf))); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; goto __pyx_L1;} ++ __pyx_3 = PyBytes_FromStringAndSize(__pyx_v_buf,(sizeof(__pyx_v_buf))); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; goto __pyx_L1;} + __pyx_r = __pyx_3; + __pyx_3 = 0; + goto __pyx_L0; +@@ -3323,7 +3325,7 @@ static PyObject *__pyx_f_4dnet_icmp_pack_hdr(PyObject *__pyx_self, PyObject *__p + } + + static PyObject *__pyx_f_4dnet_tcp_pack_hdr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +-static char __pyx_doc_4dnet_tcp_pack_hdr[] = "Return a packed binary string representing a TCP header.\n\n Keyword arguments:\n sport -- source port (16-bit integer)\n dport -- destination port (16-bit integer)\n seq -- sequence number (32-bit integer)\n ack -- acknowledgment number (32-bit integer)\n flags -- control flags (TH_*) (8-bit integer bitmask)\n win -- window size (16-bit integer)\n urp -- urgent pointer (16-bit integer)\n "; ++static char __pyx_doc_4dnet_tcp_pack_hdr[] = "Return a packed binary string representing a TCP header.\n\n Keyword arguments:\n sport -- source port (16-bit integer)\n dport -- destination port (16-bit integer)\n seq -- sequence number (32-bit integer)\n ack -- acknowledgment number (32-bit integer)\n flags -- control flags (TH_*) (8-bit integer bitmask)\n win -- window size (16-bit integer)\n urp -- urgent pointer (16-bit integer)\n "; + static PyObject *__pyx_f_4dnet_tcp_pack_hdr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_sport = 0; + PyObject *__pyx_v_dport = 0; +@@ -3358,17 +3360,17 @@ static PyObject *__pyx_f_4dnet_tcp_pack_hdr(PyObject *__pyx_self, PyObject *__py + Py_INCREF(__pyx_v_urp); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":862 */ +- __pyx_1 = PyInt_AsLong(__pyx_v_sport); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;} +- __pyx_2 = PyInt_AsLong(__pyx_v_dport); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;} +- __pyx_3 = PyInt_AsUnsignedLongMask(__pyx_v_seq); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;} +- __pyx_4 = PyInt_AsUnsignedLongMask(__pyx_v_ack); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;} +- __pyx_5 = PyInt_AsLong(__pyx_v_flags); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;} +- __pyx_6 = PyInt_AsLong(__pyx_v_win); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;} +- __pyx_7 = PyInt_AsLong(__pyx_v_urp); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;} ++ __pyx_1 = PyLong_AsLong(__pyx_v_sport); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;} ++ __pyx_2 = PyLong_AsLong(__pyx_v_dport); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;} ++ __pyx_3 = PyLong_AsUnsignedLongMask(__pyx_v_seq); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;} ++ __pyx_4 = PyLong_AsUnsignedLongMask(__pyx_v_ack); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;} ++ __pyx_5 = PyLong_AsLong(__pyx_v_flags); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;} ++ __pyx_6 = PyLong_AsLong(__pyx_v_win); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;} ++ __pyx_7 = PyLong_AsLong(__pyx_v_urp); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;} + tcp_pack_hdr(__pyx_v_buf,__pyx_1,__pyx_2,__pyx_3,__pyx_4,__pyx_5,__pyx_6,__pyx_7); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":863 */ +- __pyx_8 = PyString_FromStringAndSize(__pyx_v_buf,(sizeof(__pyx_v_buf))); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; goto __pyx_L1;} ++ __pyx_8 = PyBytes_FromStringAndSize(__pyx_v_buf,(sizeof(__pyx_v_buf))); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; goto __pyx_L1;} + __pyx_r = __pyx_8; + __pyx_8 = 0; + goto __pyx_L0; +@@ -3391,7 +3393,7 @@ static PyObject *__pyx_f_4dnet_tcp_pack_hdr(PyObject *__pyx_self, PyObject *__py + } + + static PyObject *__pyx_f_4dnet_udp_pack_hdr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +-static char __pyx_doc_4dnet_udp_pack_hdr[] = "Return a packed binary string representing a UDP header.\n\n Keyword arguments:\n sport -- source port (16-bit integer)\n dport -- destination port (16-bit integer)\n ulen -- UDP header + data length (16-bit integer)\n "; ++static char __pyx_doc_4dnet_udp_pack_hdr[] = "Return a packed binary string representing a UDP header.\n\n Keyword arguments:\n sport -- source port (16-bit integer)\n dport -- destination port (16-bit integer)\n ulen -- UDP header + data length (16-bit integer)\n "; + static PyObject *__pyx_f_4dnet_udp_pack_hdr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_sport = 0; + PyObject *__pyx_v_dport = 0; +@@ -3410,13 +3412,13 @@ static PyObject *__pyx_f_4dnet_udp_pack_hdr(PyObject *__pyx_self, PyObject *__py + Py_INCREF(__pyx_v_ulen); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":883 */ +- __pyx_1 = PyInt_AsLong(__pyx_v_sport); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; goto __pyx_L1;} +- __pyx_2 = PyInt_AsLong(__pyx_v_dport); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; goto __pyx_L1;} +- __pyx_3 = PyInt_AsLong(__pyx_v_ulen); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; goto __pyx_L1;} ++ __pyx_1 = PyLong_AsLong(__pyx_v_sport); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; goto __pyx_L1;} ++ __pyx_2 = PyLong_AsLong(__pyx_v_dport); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; goto __pyx_L1;} ++ __pyx_3 = PyLong_AsLong(__pyx_v_ulen); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; goto __pyx_L1;} + udp_pack_hdr(__pyx_v_buf,__pyx_1,__pyx_2,__pyx_3); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":884 */ +- __pyx_4 = PyString_FromStringAndSize(__pyx_v_buf,(sizeof(__pyx_v_buf))); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; goto __pyx_L1;} ++ __pyx_4 = PyBytes_FromStringAndSize(__pyx_v_buf,(sizeof(__pyx_v_buf))); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; goto __pyx_L1;} + __pyx_r = __pyx_4; + __pyx_4 = 0; + goto __pyx_L0; +@@ -3467,17 +3469,17 @@ static PyObject *__pyx_f_4dnet_ifent_to_dict(struct intf_entry (*__pyx_v_entry)) + __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":927 */ +- __pyx_1 = PyString_FromString(__pyx_v_entry->intf_name); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; goto __pyx_L1;} ++ __pyx_1 = PyBytes_FromString(__pyx_v_entry->intf_name); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; goto __pyx_L1;} + if (PyObject_SetItem(__pyx_v_d, __pyx_n_name, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":928 */ +- __pyx_1 = PyInt_FromLong(__pyx_v_entry->intf_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(__pyx_v_entry->intf_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; goto __pyx_L1;} + if (PyObject_SetItem(__pyx_v_d, __pyx_n_type, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":929 */ +- __pyx_1 = PyInt_FromLong(__pyx_v_entry->intf_flags); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(__pyx_v_entry->intf_flags); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; goto __pyx_L1;} + if (PyObject_SetItem(__pyx_v_d, __pyx_n_flags, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + +@@ -3487,16 +3489,16 @@ static PyObject *__pyx_f_4dnet_ifent_to_dict(struct intf_entry (*__pyx_v_entry)) + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":931 */ +- __pyx_1 = PyInt_FromLong(__pyx_v_entry->intf_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(__pyx_v_entry->intf_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_NONE); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; goto __pyx_L1;} +- if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; goto __pyx_L1;} ++ if (__pyx_3 = PyObject_RichCompareBool(__pyx_1, __pyx_2, Py_EQ) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; goto __pyx_L1;} + __pyx_3 = __pyx_3 != 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + if (__pyx_3) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":932 */ +- __pyx_1 = PyString_FromString(addr_ntoa((&__pyx_v_entry->intf_addr))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; goto __pyx_L1;} ++ __pyx_1 = PyBytes_FromString(addr_ntoa((&__pyx_v_entry->intf_addr))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1); + __pyx_1 = 0; +@@ -3509,16 +3511,16 @@ static PyObject *__pyx_f_4dnet_ifent_to_dict(struct intf_entry (*__pyx_v_entry)) + __pyx_L2:; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":933 */ +- __pyx_2 = PyInt_FromLong(__pyx_v_entry->intf_dst_addr.addr_type); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; goto __pyx_L1;} ++ __pyx_2 = PyLong_FromLong(__pyx_v_entry->intf_dst_addr.addr_type); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; goto __pyx_L1;} + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_NONE); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; goto __pyx_L1;} +- if (PyObject_Cmp(__pyx_2, __pyx_1, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; goto __pyx_L1;} ++ if (__pyx_3 = PyObject_RichCompareBool(__pyx_2, __pyx_1, Py_EQ) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; goto __pyx_L1;} + __pyx_3 = __pyx_3 != 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + if (__pyx_3) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":934 */ +- __pyx_2 = PyString_FromString(addr_ntoa((&__pyx_v_entry->intf_dst_addr))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; goto __pyx_L1;} ++ __pyx_2 = PyBytes_FromString(addr_ntoa((&__pyx_v_entry->intf_dst_addr))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; goto __pyx_L1;} + __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2); + __pyx_2 = 0; +@@ -3531,16 +3533,16 @@ static PyObject *__pyx_f_4dnet_ifent_to_dict(struct intf_entry (*__pyx_v_entry)) + __pyx_L3:; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":935 */ +- __pyx_1 = PyInt_FromLong(__pyx_v_entry->intf_link_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(__pyx_v_entry->intf_link_addr.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_NONE); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; goto __pyx_L1;} +- if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; goto __pyx_L1;} ++ if (__pyx_3 = PyObject_RichCompareBool(__pyx_1, __pyx_2, Py_EQ) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; goto __pyx_L1;} + __pyx_3 = __pyx_3 != 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + if (__pyx_3) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":936 */ +- __pyx_1 = PyString_FromString(addr_ntoa((&__pyx_v_entry->intf_link_addr))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; goto __pyx_L1;} ++ __pyx_1 = PyBytes_FromString(addr_ntoa((&__pyx_v_entry->intf_link_addr))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1); + __pyx_1 = 0; +@@ -3565,15 +3567,15 @@ static PyObject *__pyx_f_4dnet_ifent_to_dict(struct intf_entry (*__pyx_v_entry)) + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":939 */ + __pyx_5 = __pyx_v_entry->intf_alias_num; + for (__pyx_4 = 0; __pyx_4 < __pyx_5; ++__pyx_4) { +- __pyx_1 = PyInt_FromLong(__pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(__pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; goto __pyx_L1;} + Py_DECREF(__pyx_v_i); + __pyx_v_i = __pyx_1; + __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":940 */ + __pyx_2 = PyObject_GetAttr(__pyx_v_l, __pyx_n_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;} +- __pyx_6 = PyInt_AsSsize_t(__pyx_v_i); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;} +- __pyx_1 = PyString_FromString(addr_ntoa((&(__pyx_v_entry->intf_alias_addrs[__pyx_6])))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;} ++ __pyx_6 = PyLong_AsSsize_t(__pyx_v_i); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;} ++ __pyx_1 = PyBytes_FromString(addr_ntoa((&(__pyx_v_entry->intf_alias_addrs[__pyx_6])))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;} + __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_7, 0, __pyx_1); + __pyx_1 = 0; +@@ -3643,7 +3645,7 @@ static PyObject *__pyx_f_4dnet_dict_to_ifent(PyObject *__pyx_v_d,struct intf_ent + __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":946 */ +- __pyx_2 = PyString_AsString(__pyx_v_s); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; goto __pyx_L1;} ++ __pyx_2 = PyBytes_AsString(__pyx_v_s); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; goto __pyx_L1;} + strlcpy(__pyx_v_entry->intf_name,__pyx_2,16); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":947 */ +@@ -3652,7 +3654,7 @@ static PyObject *__pyx_f_4dnet_dict_to_ifent(PyObject *__pyx_v_d,struct intf_ent + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":948 */ + __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_flags); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; goto __pyx_L1;} +- __pyx_4 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; goto __pyx_L1;} ++ __pyx_4 = PyLong_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_entry->intf_flags = __pyx_4; + goto __pyx_L2; +@@ -3665,7 +3667,7 @@ static PyObject *__pyx_f_4dnet_dict_to_ifent(PyObject *__pyx_v_d,struct intf_ent + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":950 */ + __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_mtu); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; goto __pyx_L1;} +- __pyx_5 = PyInt_AsUnsignedLongMask(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; goto __pyx_L1;} ++ __pyx_5 = PyLong_AsUnsignedLongMask(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_entry->intf_mtu = __pyx_5; + goto __pyx_L3; +@@ -3721,14 +3723,14 @@ static PyObject *__pyx_f_4dnet_dict_to_ifent(PyObject *__pyx_v_d,struct intf_ent + __pyx_6 = PyObject_Call(__pyx_1, __pyx_7, 0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_7); __pyx_7 = 0; +- __pyx_5 = PyInt_AsUnsignedLongMask(__pyx_6); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; goto __pyx_L1;} ++ __pyx_5 = PyLong_AsUnsignedLongMask(__pyx_6); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; + __pyx_v_entry->intf_alias_num = __pyx_5; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":959 */ + __pyx_5 = __pyx_v_entry->intf_alias_num; + for (__pyx_8 = 0; __pyx_8 < __pyx_5; ++__pyx_8) { +- __pyx_1 = PyInt_FromLong(__pyx_8); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(__pyx_8); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; goto __pyx_L1;} + Py_DECREF(__pyx_v_i); + __pyx_v_i = __pyx_1; + __pyx_1 = 0; +@@ -3737,7 +3739,7 @@ static PyObject *__pyx_f_4dnet_dict_to_ifent(PyObject *__pyx_v_d,struct intf_ent + __pyx_7 = PyObject_GetItem(__pyx_v_d, __pyx_n_alias_addrs); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; goto __pyx_L1;} + __pyx_6 = PyObject_GetItem(__pyx_7, __pyx_v_i); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; goto __pyx_L1;} + Py_DECREF(__pyx_7); __pyx_7 = 0; +- __pyx_9 = PyInt_AsSsize_t(__pyx_v_i); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; goto __pyx_L1;} ++ __pyx_9 = PyLong_AsSsize_t(__pyx_v_i); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; goto __pyx_L1;} + (__pyx_v_entry->intf_alias_addrs[__pyx_9]) = ((struct __pyx_obj_4dnet_addr *)__pyx_6)->_addr; + Py_DECREF(__pyx_6); __pyx_6 = 0; + __pyx_L8:; +@@ -3809,7 +3811,7 @@ static int __pyx_f_4dnet___intf_callback(struct intf_entry (*__pyx_v_entry),void + if (__pyx_5) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":966 */ +- __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; goto __pyx_L1;} ++ __pyx_2 = PyLong_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; goto __pyx_L1;} + Py_DECREF(__pyx_v_ret); + __pyx_v_ret = __pyx_2; + __pyx_2 = 0; +@@ -3818,7 +3820,7 @@ static int __pyx_f_4dnet___intf_callback(struct intf_entry (*__pyx_v_entry),void + __pyx_L2:; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":967 */ +- __pyx_4 = PyInt_AsLong(__pyx_v_ret); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; goto __pyx_L1;} ++ __pyx_4 = PyLong_AsLong(__pyx_v_ret); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; goto __pyx_L1;} + __pyx_r = __pyx_4; + goto __pyx_L0; + +@@ -3900,7 +3902,7 @@ static PyObject *__pyx_f_4dnet_4intf_get(PyObject *__pyx_v_self, PyObject *__pyx + __pyx_v_ifent->intf_len = 1024; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":988 */ +- __pyx_1 = PyString_AsString(__pyx_v_name); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; goto __pyx_L1;} ++ __pyx_1 = PyBytes_AsString(__pyx_v_name); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; goto __pyx_L1;} + strlcpy(__pyx_v_ifent->intf_name,__pyx_1,16); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":989 */ +@@ -4050,7 +4052,7 @@ static PyObject *__pyx_f_4dnet_4intf_get_dst(PyObject *__pyx_v_self, PyObject *_ + } + + static PyObject *__pyx_f_4dnet_4intf_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +-static char __pyx_doc_4dnet_4intf_set[] = "Set the configuration for an interface from a dict.\n\n Dict values:\n name -- name of interface to set (string)\n flags -- interface flags (INTF_FLAG_*) (integer bitmask)\n mtu -- interface MTU (integer)\n addr -- primary network address (addr object)\n dst_addr -- point-to-point dst address (addr object)\n link_addr -- link-layer address (addr object)\n alias_addrs -- additional network addresses (list of addr objects)\n "; ++static char __pyx_doc_4dnet_4intf_set[] = "Set the configuration for an interface from a dict.\n\n Dict values:\n name -- name of interface to set (string)\n flags -- interface flags (INTF_FLAG_*) (integer bitmask)\n mtu -- interface MTU (integer)\n addr -- primary network address (addr object)\n dst_addr -- point-to-point dst address (addr object)\n link_addr -- link-layer address (addr object)\n alias_addrs -- additional network addresses (list of addr objects)\n "; + static PyObject *__pyx_f_4dnet_4intf_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_d = 0; + struct intf_entry (*__pyx_v_ifent); +@@ -4132,7 +4134,7 @@ static PyObject *__pyx_f_4dnet_4intf_loop(PyObject *__pyx_v_self, PyObject *__py + __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1049 */ +- __pyx_1 = PyInt_FromLong(intf_loop(((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf,__pyx_f_4dnet___intf_callback,((void (*))__pyx_v__arg))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(intf_loop(((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf,__pyx_f_4dnet___intf_callback,((void (*))__pyx_v__arg))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; + goto __pyx_L0; +@@ -4303,7 +4305,7 @@ static int __pyx_f_4dnet___route_callback(struct route_entry (*__pyx_v_entry),vo + if (__pyx_5) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1085 */ +- __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; goto __pyx_L1;} + Py_DECREF(__pyx_v_ret); + __pyx_v_ret = __pyx_1; + __pyx_1 = 0; +@@ -4312,7 +4314,7 @@ static int __pyx_f_4dnet___route_callback(struct route_entry (*__pyx_v_entry),vo + __pyx_L2:; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1086 */ +- __pyx_4 = PyInt_AsLong(__pyx_v_ret); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; goto __pyx_L1;} ++ __pyx_4 = PyLong_AsLong(__pyx_v_ret); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; goto __pyx_L1;} + __pyx_r = __pyx_4; + goto __pyx_L0; + +@@ -4495,7 +4497,7 @@ static PyObject *__pyx_f_4dnet_5route_get(PyObject *__pyx_v_self, PyObject *__py + if (__pyx_1) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1134 */ +- __pyx_2 = PyString_FromString(addr_ntoa((&__pyx_v_entry.route_gw))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;} ++ __pyx_2 = PyBytes_FromString(addr_ntoa((&__pyx_v_entry.route_gw))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); + __pyx_2 = 0; +@@ -4553,7 +4555,7 @@ static PyObject *__pyx_f_4dnet_5route_loop(PyObject *__pyx_v_self, PyObject *__p + __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1148 */ +- __pyx_1 = PyInt_FromLong(route_loop(((struct __pyx_obj_4dnet_route *)__pyx_v_self)->route,__pyx_f_4dnet___route_callback,((void (*))__pyx_v__arg))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1148; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(route_loop(((struct __pyx_obj_4dnet_route *)__pyx_v_self)->route,__pyx_f_4dnet___route_callback,((void (*))__pyx_v__arg))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1148; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; + goto __pyx_L0; +@@ -4676,17 +4678,17 @@ static PyObject *__pyx_f_4dnet_rule_to_dict(struct fw_rule (*__pyx_v_rule)) { + __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1191 */ +- __pyx_1 = PyString_FromString(__pyx_v_rule->fw_device); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; goto __pyx_L1;} ++ __pyx_1 = PyBytes_FromString(__pyx_v_rule->fw_device); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; goto __pyx_L1;} + if (PyObject_SetItem(__pyx_v_d, __pyx_n_device, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1192 */ +- __pyx_1 = PyInt_FromLong(__pyx_v_rule->fw_op); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(__pyx_v_rule->fw_op); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; goto __pyx_L1;} + if (PyObject_SetItem(__pyx_v_d, __pyx_n_op, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1193 */ +- __pyx_1 = PyInt_FromLong(__pyx_v_rule->fw_dir); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(__pyx_v_rule->fw_dir); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; goto __pyx_L1;} + if (PyObject_SetItem(__pyx_v_d, __pyx_n_dir, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + +@@ -4695,7 +4697,7 @@ static PyObject *__pyx_f_4dnet_rule_to_dict(struct fw_rule (*__pyx_v_rule)) { + if (__pyx_2) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1195 */ +- __pyx_1 = PyInt_FromLong(__pyx_v_rule->fw_proto); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(__pyx_v_rule->fw_proto); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; goto __pyx_L1;} + if (PyObject_SetItem(__pyx_v_d, __pyx_n_proto, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + goto __pyx_L2; +@@ -4703,16 +4705,16 @@ static PyObject *__pyx_f_4dnet_rule_to_dict(struct fw_rule (*__pyx_v_rule)) { + __pyx_L2:; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1196 */ +- __pyx_1 = PyInt_FromLong(__pyx_v_rule->fw_src.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(__pyx_v_rule->fw_src.addr_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_NONE); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; goto __pyx_L1;} +- if (PyObject_Cmp(__pyx_1, __pyx_3, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; goto __pyx_L1;} ++ if (__pyx_2 = PyObject_RichCompareBool(__pyx_1, __pyx_3, Py_EQ) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; goto __pyx_L1;} + __pyx_2 = __pyx_2 != 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + if (__pyx_2) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1197 */ +- __pyx_1 = PyString_FromString(addr_ntoa((&__pyx_v_rule->fw_src))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; goto __pyx_L1;} ++ __pyx_1 = PyBytes_FromString(addr_ntoa((&__pyx_v_rule->fw_src))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); + __pyx_1 = 0; +@@ -4725,16 +4727,16 @@ static PyObject *__pyx_f_4dnet_rule_to_dict(struct fw_rule (*__pyx_v_rule)) { + __pyx_L3:; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1198 */ +- __pyx_3 = PyInt_FromLong(__pyx_v_rule->fw_dst.addr_type); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1198; goto __pyx_L1;} ++ __pyx_3 = PyLong_FromLong(__pyx_v_rule->fw_dst.addr_type); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1198; goto __pyx_L1;} + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_NONE); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1198; goto __pyx_L1;} +- if (PyObject_Cmp(__pyx_3, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1198; goto __pyx_L1;} ++ if (__pyx_2 = PyObject_RichCompareBool(__pyx_3, __pyx_1, Py_EQ) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1198; goto __pyx_L1;} + __pyx_2 = __pyx_2 != 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + if (__pyx_2) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1199 */ +- __pyx_3 = PyString_FromString(addr_ntoa((&__pyx_v_rule->fw_dst))); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; goto __pyx_L1;} ++ __pyx_3 = PyBytes_FromString(addr_ntoa((&__pyx_v_rule->fw_dst))); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; goto __pyx_L1;} + __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3); + __pyx_3 = 0; +@@ -4755,8 +4757,8 @@ static PyObject *__pyx_f_4dnet_rule_to_dict(struct fw_rule (*__pyx_v_rule)) { + if (__pyx_4) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1201 */ +- __pyx_1 = PyInt_FromLong((__pyx_v_rule->fw_sport[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; goto __pyx_L1;} +- __pyx_3 = PyInt_FromLong((__pyx_v_rule->fw_sport[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong((__pyx_v_rule->fw_sport[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; goto __pyx_L1;} ++ __pyx_3 = PyLong_FromLong((__pyx_v_rule->fw_sport[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; goto __pyx_L1;} + __pyx_5 = PyList_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; goto __pyx_L1;} + PyList_SET_ITEM(__pyx_5, 0, __pyx_1); + PyList_SET_ITEM(__pyx_5, 1, __pyx_3); +@@ -4777,8 +4779,8 @@ static PyObject *__pyx_f_4dnet_rule_to_dict(struct fw_rule (*__pyx_v_rule)) { + if (__pyx_4) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1203 */ +- __pyx_1 = PyInt_FromLong((__pyx_v_rule->fw_dport[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; goto __pyx_L1;} +- __pyx_3 = PyInt_FromLong((__pyx_v_rule->fw_dport[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong((__pyx_v_rule->fw_dport[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; goto __pyx_L1;} ++ __pyx_3 = PyLong_FromLong((__pyx_v_rule->fw_dport[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; goto __pyx_L1;} + __pyx_5 = PyList_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; goto __pyx_L1;} + PyList_SET_ITEM(__pyx_5, 0, __pyx_1); + PyList_SET_ITEM(__pyx_5, 1, __pyx_3); +@@ -4827,18 +4829,18 @@ static PyObject *__pyx_f_4dnet_dict_to_rule(PyObject *__pyx_v_d,struct fw_rule ( + __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1208 */ +- __pyx_2 = PyString_AsString(__pyx_v_s); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; goto __pyx_L1;} ++ __pyx_2 = PyBytes_AsString(__pyx_v_s); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; goto __pyx_L1;} + strlcpy(__pyx_v_rule->fw_device,__pyx_2,16); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1209 */ + __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_op); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; goto __pyx_L1;} +- __pyx_3 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; goto __pyx_L1;} ++ __pyx_3 = PyLong_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_rule->fw_op = __pyx_3; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1210 */ + __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_dir); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; goto __pyx_L1;} +- __pyx_3 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; goto __pyx_L1;} ++ __pyx_3 = PyLong_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_rule->fw_dir = __pyx_3; + +@@ -4848,21 +4850,21 @@ static PyObject *__pyx_f_4dnet_dict_to_rule(PyObject *__pyx_v_d,struct fw_rule ( + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1212 */ + __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_proto); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; goto __pyx_L1;} +- __pyx_3 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; goto __pyx_L1;} ++ __pyx_3 = PyLong_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_rule->fw_proto = __pyx_3; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1213 */ +- __pyx_1 = PyInt_FromLong(__pyx_v_rule->fw_proto); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(__pyx_v_rule->fw_proto); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; goto __pyx_L1;} + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_IP_PROTO_TCP); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; goto __pyx_L1;} +- if (PyObject_Cmp(__pyx_1, __pyx_4, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; goto __pyx_L1;} ++ if (__pyx_3 = PyObject_RichCompareBool(__pyx_1, __pyx_4, Py_EQ) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; goto __pyx_L1;} + __pyx_3 = __pyx_3 == 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_4); __pyx_4 = 0; + if (!__pyx_3) { +- __pyx_1 = PyInt_FromLong(__pyx_v_rule->fw_proto); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(__pyx_v_rule->fw_proto); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; goto __pyx_L1;} + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_IP_PROTO_UDP); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; goto __pyx_L1;} +- if (PyObject_Cmp(__pyx_1, __pyx_4, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; goto __pyx_L1;} ++ if (__pyx_3 = PyObject_RichCompareBool(__pyx_1, __pyx_4, Py_EQ) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; goto __pyx_L1;} + __pyx_3 = __pyx_3 == 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_4); __pyx_4 = 0; +@@ -4911,21 +4913,21 @@ static PyObject *__pyx_f_4dnet_dict_to_rule(PyObject *__pyx_v_d,struct fw_rule ( + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1221 */ + __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_sport); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; goto __pyx_L1;} +- __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; goto __pyx_L1;} ++ __pyx_4 = PyLong_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; goto __pyx_L1;} + __pyx_5 = PyObject_GetItem(__pyx_1, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_4); __pyx_4 = 0; +- __pyx_3 = PyInt_AsLong(__pyx_5); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; goto __pyx_L1;} ++ __pyx_3 = PyLong_AsLong(__pyx_5); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + (__pyx_v_rule->fw_sport[0]) = __pyx_3; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1222 */ + __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_sport); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; goto __pyx_L1;} +- __pyx_4 = PyInt_FromLong(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; goto __pyx_L1;} ++ __pyx_4 = PyLong_FromLong(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; goto __pyx_L1;} + __pyx_5 = PyObject_GetItem(__pyx_1, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_4); __pyx_4 = 0; +- __pyx_3 = PyInt_AsLong(__pyx_5); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; goto __pyx_L1;} ++ __pyx_3 = PyLong_AsLong(__pyx_5); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + (__pyx_v_rule->fw_sport[1]) = __pyx_3; + goto __pyx_L6; +@@ -4938,21 +4940,21 @@ static PyObject *__pyx_f_4dnet_dict_to_rule(PyObject *__pyx_v_d,struct fw_rule ( + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1224 */ + __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_dport); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; goto __pyx_L1;} +- __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; goto __pyx_L1;} ++ __pyx_4 = PyLong_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; goto __pyx_L1;} + __pyx_5 = PyObject_GetItem(__pyx_1, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_4); __pyx_4 = 0; +- __pyx_3 = PyInt_AsLong(__pyx_5); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; goto __pyx_L1;} ++ __pyx_3 = PyLong_AsLong(__pyx_5); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + (__pyx_v_rule->fw_dport[0]) = __pyx_3; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1225 */ + __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_dport); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; goto __pyx_L1;} +- __pyx_4 = PyInt_FromLong(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; goto __pyx_L1;} ++ __pyx_4 = PyLong_FromLong(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; goto __pyx_L1;} + __pyx_5 = PyObject_GetItem(__pyx_1, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_4); __pyx_4 = 0; +- __pyx_3 = PyInt_AsLong(__pyx_5); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; goto __pyx_L1;} ++ __pyx_3 = PyLong_AsLong(__pyx_5); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + (__pyx_v_rule->fw_dport[1]) = __pyx_3; + goto __pyx_L7; +@@ -5020,7 +5022,7 @@ static int __pyx_f_4dnet___fw_callback(struct fw_rule (*__pyx_v_rule),void (*__p + if (__pyx_5) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1231 */ +- __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; goto __pyx_L1;} ++ __pyx_2 = PyLong_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; goto __pyx_L1;} + Py_DECREF(__pyx_v_ret); + __pyx_v_ret = __pyx_2; + __pyx_2 = 0; +@@ -5029,7 +5031,7 @@ static int __pyx_f_4dnet___fw_callback(struct fw_rule (*__pyx_v_rule),void (*__p + __pyx_L2:; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1232 */ +- __pyx_4 = PyInt_AsLong(__pyx_v_ret); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; goto __pyx_L1;} ++ __pyx_4 = PyLong_AsLong(__pyx_v_ret); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; goto __pyx_L1;} + __pyx_r = __pyx_4; + goto __pyx_L0; + +@@ -5089,7 +5091,7 @@ static int __pyx_f_4dnet_2fw___init__(PyObject *__pyx_v_self, PyObject *__pyx_ar + } + + static PyObject *__pyx_f_4dnet_2fw_add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +-static char __pyx_doc_4dnet_2fw_add[] = "Add a firewall rule specified as a dict.\n\n Dict values:\n device -- interface name (string)\n op -- operation (FW_OP_*) (integer)\n dir -- direction (FW_DIR_*) (integer)\n proto -- IP protocol (IP_PROTO_*) (integer)\n src -- source address / net (addr object)\n dst -- destination address / net (addr object)\n sport -- source port range or ICMP type/mask (list of 2 integers)\n dport -- dest port range or ICMP code/mask (list of 2 integers)\n "; ++static char __pyx_doc_4dnet_2fw_add[] = "Add a firewall rule specified as a dict.\n\n Dict values:\n device -- interface name (string)\n op -- operation (FW_OP_*) (integer)\n dir -- direction (FW_DIR_*) (integer)\n proto -- IP protocol (IP_PROTO_*) (integer)\n src -- source address / net (addr object)\n dst -- destination address / net (addr object)\n sport -- source port range or ICMP type/mask (list of 2 integers)\n dport -- dest port range or ICMP code/mask (list of 2 integers)\n "; + static PyObject *__pyx_f_4dnet_2fw_add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_d = 0; + struct fw_rule __pyx_v_rule; +@@ -5213,7 +5215,7 @@ static PyObject *__pyx_f_4dnet_2fw_loop(PyObject *__pyx_v_self, PyObject *__pyx_ + __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1284 */ +- __pyx_1 = PyInt_FromLong(fw_loop(((struct __pyx_obj_4dnet_fw *)__pyx_v_self)->fw,__pyx_f_4dnet___fw_callback,((void (*))__pyx_v__arg))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(fw_loop(((struct __pyx_obj_4dnet_fw *)__pyx_v_self)->fw,__pyx_f_4dnet___fw_callback,((void (*))__pyx_v__arg))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; + goto __pyx_L0; +@@ -5366,19 +5368,19 @@ static PyObject *__pyx_f_4dnet_4rand_get(PyObject *__pyx_v_self, PyObject *__pyx + __pyx_v_s = Py_None; Py_INCREF(Py_None); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1334 */ +- __pyx_1 = PyInt_FromLong(1024); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; goto __pyx_L1;} +- if (PyObject_Cmp(__pyx_v_len, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(1024); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; goto __pyx_L1;} ++ if (__pyx_2 = PyObject_RichCompareBool(__pyx_v_len, __pyx_1, Py_EQ) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; goto __pyx_L1;} + __pyx_2 = __pyx_2 <= 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + if (__pyx_2) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1335 */ +- __pyx_2 = PyInt_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; goto __pyx_L1;} ++ __pyx_2 = PyLong_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; goto __pyx_L1;} + rand_get(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand,__pyx_v_buf,__pyx_2); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1336 */ +- __pyx_2 = PyInt_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; goto __pyx_L1;} +- __pyx_1 = PyString_FromStringAndSize(__pyx_v_buf,__pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; goto __pyx_L1;} ++ __pyx_2 = PyLong_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; goto __pyx_L1;} ++ __pyx_1 = PyBytes_FromStringAndSize(__pyx_v_buf,__pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; + goto __pyx_L0; +@@ -5387,16 +5389,16 @@ static PyObject *__pyx_f_4dnet_4rand_get(PyObject *__pyx_v_self, PyObject *__pyx + __pyx_L2:; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1337 */ +- __pyx_2 = PyInt_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; goto __pyx_L1;} ++ __pyx_2 = PyLong_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; goto __pyx_L1;} + __pyx_v_p = malloc(__pyx_2); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1338 */ +- __pyx_2 = PyInt_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; goto __pyx_L1;} ++ __pyx_2 = PyLong_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; goto __pyx_L1;} + rand_get(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand,__pyx_v_p,__pyx_2); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1339 */ +- __pyx_2 = PyInt_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; goto __pyx_L1;} +- __pyx_1 = PyString_FromStringAndSize(__pyx_v_p,__pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; goto __pyx_L1;} ++ __pyx_2 = PyLong_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; goto __pyx_L1;} ++ __pyx_1 = PyBytes_FromStringAndSize(__pyx_v_p,__pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; goto __pyx_L1;} + Py_DECREF(__pyx_v_s); + __pyx_v_s = __pyx_1; + __pyx_1 = 0; +@@ -5434,8 +5436,8 @@ static PyObject *__pyx_f_4dnet_4rand_set(PyObject *__pyx_v_self, PyObject *__pyx + Py_INCREF(__pyx_v_buf); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1349 */ +- __pyx_1 = PyString_AsString(__pyx_v_buf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; goto __pyx_L1;} +- rand_set(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand,__pyx_1,PyString_Size(__pyx_v_buf)); ++ __pyx_1 = PyBytes_AsString(__pyx_v_buf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; goto __pyx_L1;} ++ rand_set(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand,__pyx_1,PyBytes_Size(__pyx_v_buf)); + + __pyx_r = Py_None; Py_INCREF(Py_None); + goto __pyx_L0; +@@ -5460,8 +5462,8 @@ static PyObject *__pyx_f_4dnet_4rand_add(PyObject *__pyx_v_self, PyObject *__pyx + Py_INCREF(__pyx_v_buf); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1357 */ +- __pyx_1 = PyString_AsString(__pyx_v_buf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; goto __pyx_L1;} +- rand_add(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand,__pyx_1,PyString_Size(__pyx_v_buf)); ++ __pyx_1 = PyBytes_AsString(__pyx_v_buf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; goto __pyx_L1;} ++ rand_add(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand,__pyx_1,PyBytes_Size(__pyx_v_buf)); + + __pyx_r = Py_None; Py_INCREF(Py_None); + goto __pyx_L0; +@@ -5569,12 +5571,12 @@ static PyObject *__pyx_f_4dnet_4rand_xrange(PyObject *__pyx_v_self, PyObject *__ + Py_INCREF(__pyx_v_stop); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1377 */ +- if (PyObject_Cmp(__pyx_v_stop, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; goto __pyx_L1;} ++ if (__pyx_1 = PyObject_RichCompareBool(__pyx_v_stop, Py_None, Py_EQ) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; goto __pyx_L1;} + __pyx_1 = __pyx_1 == 0; + if (__pyx_1) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1378 */ +- __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; goto __pyx_L1;} ++ __pyx_2 = PyLong_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; goto __pyx_L1;} + __pyx_3 = PyTuple_New(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; goto __pyx_L1;} + Py_INCREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); +@@ -5669,11 +5671,11 @@ static int __pyx_f_4dnet_13__rand_xrange___init__(PyObject *__pyx_v_self, PyObje + ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->rand = ((struct __pyx_obj_4dnet_rand *)__pyx_v_r)->rand; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1403 */ +- __pyx_1 = PyInt_Check(__pyx_v_start); ++ __pyx_1 = PyLong_Check(__pyx_v_start); + if (__pyx_1) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1404 */ +- ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->start = PyInt_AsLong(__pyx_v_start); ++ ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->start = PyLong_AsLong(__pyx_v_start); + goto __pyx_L2; + } + __pyx_1 = PyLong_Check(__pyx_v_start); +@@ -5694,11 +5696,11 @@ static int __pyx_f_4dnet_13__rand_xrange___init__(PyObject *__pyx_v_self, PyObje + __pyx_L2:; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1410 */ +- __pyx_1 = PyInt_Check(__pyx_v_start); ++ __pyx_1 = PyLong_Check(__pyx_v_start); + if (__pyx_1) { + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1411 */ +- ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->max = (PyInt_AsLong(__pyx_v_stop) - ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->start); ++ ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->max = (PyLong_AsLong(__pyx_v_stop) - ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->start); + goto __pyx_L3; + } + __pyx_1 = PyLong_Check(__pyx_v_start); +@@ -5866,7 +5868,7 @@ static PyObject *__pyx_f_4dnet_13__rand_xrange___next__(PyObject *__pyx_v_self) + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1453 */ + for (__pyx_3 = 0+1; __pyx_3 < __pyx_e_4dnet_TEAROUNDS; ++__pyx_3) { +- __pyx_2 = PyInt_FromLong(__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1453; goto __pyx_L1;} ++ __pyx_2 = PyLong_FromLong(__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1453; goto __pyx_L1;} + Py_DECREF(__pyx_v_i); + __pyx_v_i = __pyx_2; + __pyx_2 = 0; +@@ -5939,11 +5941,11 @@ static int __pyx_f_4dnet_3tun___init__(PyObject *__pyx_v_self, PyObject *__pyx_a + if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dst), __pyx_ptype_4dnet_addr, 1, "dst")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; goto __pyx_L1;} + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1491 */ +- __pyx_1 = PyInt_AsLong(__pyx_v_mtu); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1491; goto __pyx_L1;} ++ __pyx_1 = PyLong_AsLong(__pyx_v_mtu); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1491; goto __pyx_L1;} + ((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun = tun_open((&__pyx_v_src->_addr),(&__pyx_v_dst->_addr),__pyx_1); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1492 */ +- __pyx_1 = PyInt_AsLong(__pyx_v_mtu); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; goto __pyx_L1;} ++ __pyx_1 = PyLong_AsLong(__pyx_v_mtu); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; goto __pyx_L1;} + ((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->mtu = __pyx_1; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1493 */ +@@ -5962,7 +5964,7 @@ static int __pyx_f_4dnet_3tun___init__(PyObject *__pyx_v_self, PyObject *__pyx_a + __pyx_L2:; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1495 */ +- __pyx_1 = PyInt_AsLong(__pyx_v_mtu); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; goto __pyx_L1;} ++ __pyx_1 = PyLong_AsLong(__pyx_v_mtu); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; goto __pyx_L1;} + ((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->buf = malloc(__pyx_1); + + __pyx_r = 0; +@@ -5987,7 +5989,7 @@ static PyObject *__pyx_f_4dnet_3tun_4name___get__(PyObject *__pyx_v_self) { + Py_INCREF(__pyx_v_self); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1500 */ +- __pyx_1 = PyString_FromString(tun_name(((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; goto __pyx_L1;} ++ __pyx_1 = PyBytes_FromString(tun_name(((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; + goto __pyx_L0; +@@ -6010,7 +6012,7 @@ static PyObject *__pyx_f_4dnet_3tun_2fd___get__(PyObject *__pyx_v_self) { + Py_INCREF(__pyx_v_self); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1505 */ +- __pyx_1 = PyInt_FromLong(tun_fileno(((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1505; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(tun_fileno(((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1505; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; + goto __pyx_L0; +@@ -6036,7 +6038,7 @@ static PyObject *__pyx_f_4dnet_3tun_fileno(PyObject *__pyx_v_self, PyObject *__p + Py_INCREF(__pyx_v_self); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1509 */ +- __pyx_1 = PyInt_FromLong(tun_fileno(((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1509; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(tun_fileno(((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1509; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; + goto __pyx_L0; +@@ -6065,8 +6067,8 @@ static PyObject *__pyx_f_4dnet_3tun_send(PyObject *__pyx_v_self, PyObject *__pyx + Py_INCREF(__pyx_v_pkt); + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1518 */ +- __pyx_1 = PyString_AsString(__pyx_v_pkt); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; goto __pyx_L1;} +- __pyx_2 = PyInt_FromLong(tun_send(((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun,__pyx_1,PyString_Size(__pyx_v_pkt))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; goto __pyx_L1;} ++ __pyx_1 = PyBytes_AsString(__pyx_v_pkt); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; goto __pyx_L1;} ++ __pyx_2 = PyLong_FromLong(tun_send(((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun,__pyx_1,PyBytes_Size(__pyx_v_pkt))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; +@@ -6114,7 +6116,7 @@ static PyObject *__pyx_f_4dnet_3tun_recv(PyObject *__pyx_v_self, PyObject *__pyx + __pyx_L2:; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1526 */ +- __pyx_2 = PyString_FromStringAndSize(((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->buf,__pyx_v_n); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1526; goto __pyx_L1;} ++ __pyx_2 = PyBytes_FromStringAndSize(((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->buf,__pyx_v_n); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1526; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; +@@ -6503,8 +6505,7 @@ static PyBufferProcs __pyx_tp_as_buffer_eth = { + }; + + PyTypeObject __pyx_type_4dnet_eth = { +- PyObject_HEAD_INIT(0) +- 0, /*ob_size*/ ++ PyVarObject_HEAD_INIT(0, 0) /*ob_size*/ + "dnet.eth", /*tp_name*/ + sizeof(struct __pyx_obj_4dnet_eth), /*tp_basicsize*/ + 0, /*tp_itemsize*/ +@@ -6655,8 +6656,7 @@ static PyBufferProcs __pyx_tp_as_buffer_ip = { + }; + + PyTypeObject __pyx_type_4dnet_ip = { +- PyObject_HEAD_INIT(0) +- 0, /*ob_size*/ ++ PyVarObject_HEAD_INIT(0, 0) /*ob_size*/ + "dnet.ip", /*tp_name*/ + sizeof(struct __pyx_obj_4dnet_ip), /*tp_basicsize*/ + 0, /*tp_itemsize*/ +@@ -6884,8 +6884,7 @@ static PyBufferProcs __pyx_tp_as_buffer_addr = { + }; + + PyTypeObject __pyx_type_4dnet_addr = { +- PyObject_HEAD_INIT(0) +- 0, /*ob_size*/ ++ PyVarObject_HEAD_INIT(0, 0) /*ob_size*/ + "dnet.addr", /*tp_name*/ + sizeof(struct __pyx_obj_4dnet_addr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ +@@ -7026,8 +7025,7 @@ static PyBufferProcs __pyx_tp_as_buffer___addr_ip4_iter = { + }; + + PyTypeObject __pyx_type_4dnet___addr_ip4_iter = { +- PyObject_HEAD_INIT(0) +- 0, /*ob_size*/ ++ PyVarObject_HEAD_INIT(0, 0) /*ob_size*/ + "dnet.__addr_ip4_iter", /*tp_name*/ + sizeof(struct __pyx_obj_4dnet___addr_ip4_iter), /*tp_basicsize*/ + 0, /*tp_itemsize*/ +@@ -7181,8 +7179,7 @@ static PyBufferProcs __pyx_tp_as_buffer_arp = { + }; + + PyTypeObject __pyx_type_4dnet_arp = { +- PyObject_HEAD_INIT(0) +- 0, /*ob_size*/ ++ PyVarObject_HEAD_INIT(0, 0) /*ob_size*/ + "dnet.arp", /*tp_name*/ + sizeof(struct __pyx_obj_4dnet_arp), /*tp_basicsize*/ + 0, /*tp_itemsize*/ +@@ -7337,8 +7334,7 @@ static PyBufferProcs __pyx_tp_as_buffer_intf = { + }; + + PyTypeObject __pyx_type_4dnet_intf = { +- PyObject_HEAD_INIT(0) +- 0, /*ob_size*/ ++ PyVarObject_HEAD_INIT(0, 0) /*ob_size*/ + "dnet.intf", /*tp_name*/ + sizeof(struct __pyx_obj_4dnet_intf), /*tp_basicsize*/ + 0, /*tp_itemsize*/ +@@ -7492,8 +7488,7 @@ static PyBufferProcs __pyx_tp_as_buffer_route = { + }; + + PyTypeObject __pyx_type_4dnet_route = { +- PyObject_HEAD_INIT(0) +- 0, /*ob_size*/ ++ PyVarObject_HEAD_INIT(0, 0) /*ob_size*/ + "dnet.route", /*tp_name*/ + sizeof(struct __pyx_obj_4dnet_route), /*tp_basicsize*/ + 0, /*tp_itemsize*/ +@@ -7646,8 +7641,7 @@ static PyBufferProcs __pyx_tp_as_buffer_fw = { + }; + + PyTypeObject __pyx_type_4dnet_fw = { +- PyObject_HEAD_INIT(0) +- 0, /*ob_size*/ ++ PyVarObject_HEAD_INIT(0, 0) /*ob_size*/ + "dnet.fw", /*tp_name*/ + sizeof(struct __pyx_obj_4dnet_fw), /*tp_basicsize*/ + 0, /*tp_itemsize*/ +@@ -7804,8 +7798,7 @@ static PyBufferProcs __pyx_tp_as_buffer_rand = { + }; + + PyTypeObject __pyx_type_4dnet_rand = { +- PyObject_HEAD_INIT(0) +- 0, /*ob_size*/ ++ PyVarObject_HEAD_INIT(0, 0) /*ob_size*/ + "dnet.rand", /*tp_name*/ + sizeof(struct __pyx_obj_4dnet_rand), /*tp_basicsize*/ + 0, /*tp_itemsize*/ +@@ -7946,8 +7939,7 @@ static PyBufferProcs __pyx_tp_as_buffer___rand_xrange = { + }; + + PyTypeObject __pyx_type_4dnet___rand_xrange = { +- PyObject_HEAD_INIT(0) +- 0, /*ob_size*/ ++ PyVarObject_HEAD_INIT(0, 0) /*ob_size*/ + "dnet.__rand_xrange", /*tp_name*/ + sizeof(struct __pyx_obj_4dnet___rand_xrange), /*tp_basicsize*/ + 0, /*tp_itemsize*/ +@@ -8115,8 +8107,7 @@ static PyBufferProcs __pyx_tp_as_buffer_tun = { + }; + + PyTypeObject __pyx_type_4dnet_tun = { +- PyObject_HEAD_INIT(0) +- 0, /*ob_size*/ ++ PyVarObject_HEAD_INIT(0, 0) /*ob_size*/ + "dnet.tun", /*tp_name*/ + sizeof(struct __pyx_obj_4dnet_tun), /*tp_basicsize*/ + 0, /*tp_itemsize*/ +@@ -8186,9 +8177,20 @@ static struct PyMethodDef __pyx_methods[] = { + }; + + static void __pyx_init_filenames(void); /*proto*/ +- +-PyMODINIT_FUNC initdnet(void); /*proto*/ +-PyMODINIT_FUNC initdnet(void) { ++static struct PyModuleDef dnet = { ++ PyModuleDef_HEAD_INIT, ++ "dnet", /* m_name */ ++ __pyx_mdoc, /* m_doc */ ++ -1, /* m_size */ ++ __pyx_methods, /* m_methods */ ++ NULL, /* m_reload */ ++ NULL, /* m_traverse */ ++ NULL, /* m_clear */ ++ NULL, /* m_free */ ++ }; ++ ++PyMODINIT_FUNC PyInit_dnet(void); /*proto*/ ++PyMODINIT_FUNC PyInit_dnet(void) { + PyObject *__pyx_1 = 0; + PyObject *__pyx_2 = 0; + PyObject *__pyx_3 = 0; +@@ -8221,7 +8223,7 @@ PyMODINIT_FUNC initdnet(void) { + PyObject *__pyx_30 = 0; + PyObject *__pyx_31 = 0; + __pyx_init_filenames(); +- __pyx_m = Py_InitModule4("dnet", __pyx_methods, __pyx_mdoc, 0, PYTHON_API_VERSION); ++ __pyx_m = PyModule_Create2(&dnet,PYTHON_API_VERSION); + if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; goto __pyx_L1;}; + __pyx_b = PyImport_AddModule("__builtin__"); + if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; goto __pyx_L1;}; +@@ -8278,37 +8280,37 @@ PyMODINIT_FUNC initdnet(void) { + if (PyObject_SetAttr(__pyx_m, __pyx_n___version__, __pyx_k13p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; goto __pyx_L1;} + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":75 */ +- __pyx_1 = PyInt_FromLong(6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_ADDR_LEN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":76 */ +- __pyx_1 = PyInt_FromLong(48); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(48); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_ADDR_BITS, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":77 */ +- __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_LEN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":78 */ +- __pyx_1 = PyInt_FromLong(4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_CRC_LEN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":79 */ +- __pyx_1 = PyInt_FromLong(14); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(14); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_HDR_LEN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":81 */ +- __pyx_1 = PyInt_FromLong(64); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(64); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_LEN_MIN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":82 */ +- __pyx_1 = PyInt_FromLong(1518); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(1518); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_LEN_MAX, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + +@@ -8339,67 +8341,67 @@ PyMODINIT_FUNC initdnet(void) { + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":87 */ +- __pyx_2 = PyInt_FromLong(512); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; goto __pyx_L1;} ++ __pyx_2 = PyLong_FromLong(512); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_PUP, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":88 */ +- __pyx_3 = PyInt_FromLong(2048); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; goto __pyx_L1;} ++ __pyx_3 = PyLong_FromLong(2048); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_IP, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":89 */ +- __pyx_1 = PyInt_FromLong(2054); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(2054); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_ARP, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":90 */ +- __pyx_2 = PyInt_FromLong(32821); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;} ++ __pyx_2 = PyLong_FromLong(32821); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_REVARP, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":91 */ +- __pyx_3 = PyInt_FromLong(33024); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; goto __pyx_L1;} ++ __pyx_3 = PyLong_FromLong(33024); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_8021Q, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":92 */ +- __pyx_1 = PyInt_FromLong(34525); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(34525); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_IPV6, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":93 */ +- __pyx_2 = PyInt_FromLong(34887); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; goto __pyx_L1;} ++ __pyx_2 = PyLong_FromLong(34887); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_MPLS, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":94 */ +- __pyx_3 = PyInt_FromLong(34888); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; goto __pyx_L1;} ++ __pyx_3 = PyLong_FromLong(34888); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_MPLS_MCAST, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":95 */ +- __pyx_1 = PyInt_FromLong(34915); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; goto __pyx_L1;} ++ __pyx_1 = PyLong_FromLong(34915); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_PPPOEDISC, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":96 */ +- __pyx_2 = PyInt_FromLong(34916); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; goto __pyx_L1;} ++ __pyx_2 = PyLong_FromLong(34916); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_PPPOE, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":97 */ +- __pyx_3 = PyInt_FromLong(36864); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;} ++ __pyx_3 = PyLong_FromLong(36864); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_LOOPBACK, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":99 */ +- __pyx_1 = PyString_FromStringAndSize(__pyx_k14,6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; goto __pyx_L1;} ++ __pyx_1 = PyBytes_FromStringAndSize(__pyx_k14,6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_ADDR_UNSPEC, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":100 */ +- __pyx_2 = PyString_FromStringAndSize(__pyx_k15,6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L1;} ++ __pyx_2 = PyBytes_FromStringAndSize(__pyx_k15,6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_ADDR_BROADCAST, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + +@@ -8415,27 +8417,27 @@ PyMODINIT_FUNC initdnet(void) { + __pyx_2 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":199 */ +- __pyx_4 = PyInt_FromLong(4); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;} ++ __pyx_4 = PyLong_FromLong(4); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_ADDR_LEN, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":200 */ +- __pyx_4 = PyInt_FromLong(32); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; goto __pyx_L1;} ++ __pyx_4 = PyLong_FromLong(32); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_ADDR_BITS, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":202 */ +- __pyx_4 = PyInt_FromLong(20); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; goto __pyx_L1;} ++ __pyx_4 = PyLong_FromLong(20); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_HDR_LEN, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":203 */ +- __pyx_4 = PyInt_FromLong(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; goto __pyx_L1;} ++ __pyx_4 = PyLong_FromLong(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_OPT_LEN, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":204 */ +- __pyx_4 = PyInt_FromLong(40); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;} ++ __pyx_4 = PyLong_FromLong(40); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_OPT_LEN_MAX, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + +@@ -8449,7 +8451,7 @@ PyMODINIT_FUNC initdnet(void) { + Py_DECREF(__pyx_6); __pyx_6 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":207 */ +- __pyx_4 = PyInt_FromLong(65535); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; goto __pyx_L1;} ++ __pyx_4 = PyLong_FromLong(65535); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_LEN_MAX, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + +@@ -8459,92 +8461,92 @@ PyMODINIT_FUNC initdnet(void) { + Py_DECREF(__pyx_5); __pyx_5 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":210 */ +- __pyx_6 = PyInt_FromLong(0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; goto __pyx_L1;} ++ __pyx_6 = PyLong_FromLong(0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_TOS_DEFAULT, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":212 */ +- __pyx_4 = PyInt_FromLong(32768); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; goto __pyx_L1;} ++ __pyx_4 = PyLong_FromLong(32768); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_RF, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":213 */ +- __pyx_5 = PyInt_FromLong(16384); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; goto __pyx_L1;} ++ __pyx_5 = PyLong_FromLong(16384); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_DF, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":214 */ +- __pyx_6 = PyInt_FromLong(8192); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; goto __pyx_L1;} ++ __pyx_6 = PyLong_FromLong(8192); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_MF, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":215 */ +- __pyx_4 = PyInt_FromLong(8191); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; goto __pyx_L1;} ++ __pyx_4 = PyLong_FromLong(8191); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_OFFMASK, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":217 */ +- __pyx_5 = PyInt_FromLong(64); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; goto __pyx_L1;} ++ __pyx_5 = PyLong_FromLong(64); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_TTL_DEFAULT, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":218 */ +- __pyx_6 = PyInt_FromLong(255); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; goto __pyx_L1;} ++ __pyx_6 = PyLong_FromLong(255); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_TTL_MAX, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":220 */ +- __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; goto __pyx_L1;} ++ __pyx_4 = PyLong_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_IP, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":221 */ +- __pyx_5 = PyInt_FromLong(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; goto __pyx_L1;} ++ __pyx_5 = PyLong_FromLong(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_ICMP, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":222 */ +- __pyx_6 = PyInt_FromLong(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; goto __pyx_L1;} ++ __pyx_6 = PyLong_FromLong(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_IGMP, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":223 */ +- __pyx_4 = PyInt_FromLong(6); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;} ++ __pyx_4 = PyLong_FromLong(6); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_TCP, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":224 */ +- __pyx_5 = PyInt_FromLong(17); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} ++ __pyx_5 = PyLong_FromLong(17); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_UDP, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":225 */ +- __pyx_6 = PyInt_FromLong(41); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;} ++ __pyx_6 = PyLong_FromLong(41); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_IPV6, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":226 */ +- __pyx_4 = PyInt_FromLong(47); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; goto __pyx_L1;} ++ __pyx_4 = PyLong_FromLong(47); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_GRE, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":227 */ +- __pyx_5 = PyInt_FromLong(50); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; goto __pyx_L1;} ++ __pyx_5 = PyLong_FromLong(50); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_ESP, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":228 */ +- __pyx_6 = PyInt_FromLong(51); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} ++ __pyx_6 = PyLong_FromLong(51); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_AH, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":229 */ +- __pyx_4 = PyInt_FromLong(58); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; goto __pyx_L1;} ++ __pyx_4 = PyLong_FromLong(58); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_ICMPV6, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":230 */ +- __pyx_5 = PyInt_FromLong(255); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; goto __pyx_L1;} ++ __pyx_5 = PyLong_FromLong(255); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_RAW, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + +@@ -8554,32 +8556,32 @@ PyMODINIT_FUNC initdnet(void) { + Py_DECREF(__pyx_6); __pyx_6 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":232 */ +- __pyx_4 = PyInt_FromLong(255); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; goto __pyx_L1;} ++ __pyx_4 = PyLong_FromLong(255); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_MAX, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":234 */ +- __pyx_5 = PyString_FromStringAndSize(__pyx_k19,4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; goto __pyx_L1;} ++ __pyx_5 = PyBytes_FromStringAndSize(__pyx_k19,4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_ADDR_ANY, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":235 */ +- __pyx_6 = PyString_FromStringAndSize(__pyx_k20,4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; goto __pyx_L1;} ++ __pyx_6 = PyBytes_FromStringAndSize(__pyx_k20,4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_ADDR_BROADCAST, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":236 */ +- __pyx_4 = PyString_FromStringAndSize(__pyx_k21,4); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; goto __pyx_L1;} ++ __pyx_4 = PyBytes_FromStringAndSize(__pyx_k21,4); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_ADDR_LOOPBACK, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":237 */ +- __pyx_5 = PyString_FromStringAndSize(__pyx_k22,4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; goto __pyx_L1;} ++ __pyx_5 = PyBytes_FromStringAndSize(__pyx_k22,4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_ADDR_MCAST_ALL, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":238 */ +- __pyx_6 = PyString_FromStringAndSize(__pyx_k23,4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; goto __pyx_L1;} ++ __pyx_6 = PyBytes_FromStringAndSize(__pyx_k23,4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_ADDR_MCAST_LOCAL, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; + +@@ -8590,10 +8592,10 @@ PyMODINIT_FUNC initdnet(void) { + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_IP_HDR_LEN); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; goto __pyx_L1;} + __pyx_k25 = __pyx_5; + __pyx_5 = 0; +- __pyx_6 = PyInt_FromLong(0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; goto __pyx_L1;} ++ __pyx_6 = PyLong_FromLong(0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; goto __pyx_L1;} + __pyx_k26 = __pyx_6; + __pyx_6 = 0; +- __pyx_7 = PyInt_FromLong(0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; goto __pyx_L1;} ++ __pyx_7 = PyLong_FromLong(0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; goto __pyx_L1;} + __pyx_k27 = __pyx_7; + __pyx_7 = 0; + __pyx_8 = __Pyx_GetName(__pyx_m, __pyx_n_IP_TTL_DEFAULT); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; goto __pyx_L1;} +@@ -8610,17 +8612,17 @@ PyMODINIT_FUNC initdnet(void) { + __pyx_11 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":355 */ +- __pyx_12 = PyInt_FromLong(16); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; goto __pyx_L1;} ++ __pyx_12 = PyLong_FromLong(16); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_ADDR_LEN, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; goto __pyx_L1;} + Py_DECREF(__pyx_12); __pyx_12 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":356 */ +- __pyx_12 = PyInt_FromLong(128); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; goto __pyx_L1;} ++ __pyx_12 = PyLong_FromLong(128); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_ADDR_BITS, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; goto __pyx_L1;} + Py_DECREF(__pyx_12); __pyx_12 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":358 */ +- __pyx_12 = PyInt_FromLong(40); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; goto __pyx_L1;} ++ __pyx_12 = PyLong_FromLong(40); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_HDR_LEN, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; goto __pyx_L1;} + Py_DECREF(__pyx_12); __pyx_12 = 0; + +@@ -8630,43 +8632,43 @@ PyMODINIT_FUNC initdnet(void) { + Py_DECREF(__pyx_12); __pyx_12 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":360 */ +- __pyx_12 = PyInt_FromLong(65535); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; goto __pyx_L1;} ++ __pyx_12 = PyLong_FromLong(65535); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_LEN_MAX, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; goto __pyx_L1;} + Py_DECREF(__pyx_12); __pyx_12 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":362 */ +- __pyx_12 = PyInt_FromLong(1280); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; goto __pyx_L1;} ++ __pyx_12 = PyLong_FromLong(1280); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_MTU_MIN, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; goto __pyx_L1;} + Py_DECREF(__pyx_12); __pyx_12 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":364 */ +- __pyx_12 = PyInt_FromLong(64); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; goto __pyx_L1;} ++ __pyx_12 = PyLong_FromLong(64); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_HLIM_DEFAULT, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; goto __pyx_L1;} + Py_DECREF(__pyx_12); __pyx_12 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":365 */ +- __pyx_12 = PyInt_FromLong(255); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;} ++ __pyx_12 = PyLong_FromLong(255); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_HLIM_MAX, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;} + Py_DECREF(__pyx_12); __pyx_12 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":367 */ +- __pyx_12 = PyString_FromStringAndSize(__pyx_k32,16); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;} ++ __pyx_12 = PyBytes_FromStringAndSize(__pyx_k32,16); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_ADDR_UNSPEC, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;} + Py_DECREF(__pyx_12); __pyx_12 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":368 */ +- __pyx_12 = PyString_FromStringAndSize(__pyx_k33,16); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; goto __pyx_L1;} ++ __pyx_12 = PyBytes_FromStringAndSize(__pyx_k33,16); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_ADDR_LOOPBACK, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; goto __pyx_L1;} + Py_DECREF(__pyx_12); __pyx_12 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":395 */ +- __pyx_12 = PyInt_FromLong(0); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L1;} ++ __pyx_12 = PyLong_FromLong(0); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L1;} + __pyx_k34 = __pyx_12; + __pyx_12 = 0; +- __pyx_13 = PyInt_FromLong(0); if (!__pyx_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L1;} ++ __pyx_13 = PyLong_FromLong(0); if (!__pyx_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L1;} + __pyx_k35 = __pyx_13; + __pyx_13 = 0; +- __pyx_14 = PyInt_FromLong(0); if (!__pyx_14) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L1;} ++ __pyx_14 = PyLong_FromLong(0); if (!__pyx_14) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L1;} + __pyx_k36 = __pyx_14; + __pyx_14 = 0; + __pyx_15 = __Pyx_GetName(__pyx_m, __pyx_n_IP_PROTO_IPV6); if (!__pyx_15) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L1;} +@@ -8683,22 +8685,22 @@ PyMODINIT_FUNC initdnet(void) { + __pyx_18 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":431 */ +- __pyx_19 = PyInt_FromLong(0); if (!__pyx_19) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; goto __pyx_L1;} ++ __pyx_19 = PyLong_FromLong(0); if (!__pyx_19) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ADDR_TYPE_NONE, __pyx_19) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; goto __pyx_L1;} + Py_DECREF(__pyx_19); __pyx_19 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":432 */ +- __pyx_19 = PyInt_FromLong(1); if (!__pyx_19) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; goto __pyx_L1;} ++ __pyx_19 = PyLong_FromLong(1); if (!__pyx_19) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ADDR_TYPE_ETH, __pyx_19) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; goto __pyx_L1;} + Py_DECREF(__pyx_19); __pyx_19 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":433 */ +- __pyx_19 = PyInt_FromLong(2); if (!__pyx_19) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; goto __pyx_L1;} ++ __pyx_19 = PyLong_FromLong(2); if (!__pyx_19) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ADDR_TYPE_IP, __pyx_19) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; goto __pyx_L1;} + Py_DECREF(__pyx_19); __pyx_19 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":434 */ +- __pyx_19 = PyInt_FromLong(3); if (!__pyx_19) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; goto __pyx_L1;} ++ __pyx_19 = PyLong_FromLong(3); if (!__pyx_19) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ADDR_TYPE_IP6, __pyx_19) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; goto __pyx_L1;} + Py_DECREF(__pyx_19); __pyx_19 = 0; + +@@ -8710,47 +8712,47 @@ PyMODINIT_FUNC initdnet(void) { + __pyx_19 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":666 */ +- __pyx_20 = PyInt_FromLong(8); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; goto __pyx_L1;} ++ __pyx_20 = PyLong_FromLong(8); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_HDR_LEN, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; goto __pyx_L1;} + Py_DECREF(__pyx_20); __pyx_20 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":667 */ +- __pyx_20 = PyInt_FromLong(20); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; goto __pyx_L1;} ++ __pyx_20 = PyLong_FromLong(20); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_ETHIP_LEN, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; goto __pyx_L1;} + Py_DECREF(__pyx_20); __pyx_20 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":669 */ +- __pyx_20 = PyInt_FromLong(1); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; goto __pyx_L1;} ++ __pyx_20 = PyLong_FromLong(1); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_HRD_ETH, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; goto __pyx_L1;} + Py_DECREF(__pyx_20); __pyx_20 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":670 */ +- __pyx_20 = PyInt_FromLong(6); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; goto __pyx_L1;} ++ __pyx_20 = PyLong_FromLong(6); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_HRD_IEEE802, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; goto __pyx_L1;} + Py_DECREF(__pyx_20); __pyx_20 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":672 */ +- __pyx_20 = PyInt_FromLong(2048); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; goto __pyx_L1;} ++ __pyx_20 = PyLong_FromLong(2048); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_PRO_IP, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; goto __pyx_L1;} + Py_DECREF(__pyx_20); __pyx_20 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":674 */ +- __pyx_20 = PyInt_FromLong(1); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; goto __pyx_L1;} ++ __pyx_20 = PyLong_FromLong(1); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_OP_REQUEST, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; goto __pyx_L1;} + Py_DECREF(__pyx_20); __pyx_20 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":675 */ +- __pyx_20 = PyInt_FromLong(2); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; goto __pyx_L1;} ++ __pyx_20 = PyLong_FromLong(2); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_OP_REPLY, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; goto __pyx_L1;} + Py_DECREF(__pyx_20); __pyx_20 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":676 */ +- __pyx_20 = PyInt_FromLong(3); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; goto __pyx_L1;} ++ __pyx_20 = PyLong_FromLong(3); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_OP_REVREQUEST, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; goto __pyx_L1;} + Py_DECREF(__pyx_20); __pyx_20 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":677 */ +- __pyx_20 = PyInt_FromLong(4); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; goto __pyx_L1;} ++ __pyx_20 = PyLong_FromLong(4); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_OP_REVREPLY, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; goto __pyx_L1;} + Py_DECREF(__pyx_20); __pyx_20 = 0; + +@@ -8776,200 +8778,200 @@ PyMODINIT_FUNC initdnet(void) { + __pyx_24 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":806 */ +- __pyx_25 = PyInt_FromLong(20); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(20); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_HDR_LEN, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":808 */ +- __pyx_25 = PyInt_FromLong(1); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(1); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_FIN, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":809 */ +- __pyx_25 = PyInt_FromLong(2); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(2); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_SYN, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":810 */ +- __pyx_25 = PyInt_FromLong(4); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(4); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_RST, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":811 */ +- __pyx_25 = PyInt_FromLong(8); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(8); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_PUSH, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":812 */ +- __pyx_25 = PyInt_FromLong(16); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(16); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_ACK, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":813 */ +- __pyx_25 = PyInt_FromLong(32); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(32); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_URG, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":814 */ +- __pyx_25 = PyInt_FromLong(64); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(64); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_ECE, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":815 */ +- __pyx_25 = PyInt_FromLong(128); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(128); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_CWR, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":817 */ +- __pyx_25 = PyInt_FromLong(65535); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(65535); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_PORT_MAX, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":818 */ +- __pyx_25 = PyInt_FromLong(65535); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(65535); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_WIN_MAX, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":820 */ +- __pyx_25 = PyInt_FromLong(0); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(0); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_EOL, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":821 */ +- __pyx_25 = PyInt_FromLong(1); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(1); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_NOP, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":822 */ +- __pyx_25 = PyInt_FromLong(2); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(2); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_MSS, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":823 */ +- __pyx_25 = PyInt_FromLong(3); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(3); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_WSCALE, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":824 */ +- __pyx_25 = PyInt_FromLong(4); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(4); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_SACKOK, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":825 */ +- __pyx_25 = PyInt_FromLong(5); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(5); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_SACK, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":826 */ +- __pyx_25 = PyInt_FromLong(6); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(6); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_ECHO, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":827 */ +- __pyx_25 = PyInt_FromLong(7); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(7); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_ECHOREPLY, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":828 */ +- __pyx_25 = PyInt_FromLong(8); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(8); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_TIMESTAMP, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":829 */ +- __pyx_25 = PyInt_FromLong(9); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(9); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_POCONN, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":830 */ +- __pyx_25 = PyInt_FromLong(10); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(10); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_POSVC, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":831 */ +- __pyx_25 = PyInt_FromLong(11); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(11); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_CC, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":832 */ +- __pyx_25 = PyInt_FromLong(12); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(12); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_CCNEW, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":833 */ +- __pyx_25 = PyInt_FromLong(13); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(13); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_CCECHO, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":834 */ +- __pyx_25 = PyInt_FromLong(14); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(14); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_ALTSUM, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":835 */ +- __pyx_25 = PyInt_FromLong(15); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(15); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_ALTSUMDATA, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":836 */ +- __pyx_25 = PyInt_FromLong(16); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(16); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_SKEETER, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":837 */ +- __pyx_25 = PyInt_FromLong(17); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(17); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_BUBBA, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":838 */ +- __pyx_25 = PyInt_FromLong(18); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(18); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_TRAILSUM, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":839 */ +- __pyx_25 = PyInt_FromLong(19); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(19); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_MD5, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":840 */ +- __pyx_25 = PyInt_FromLong(20); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(20); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_SCPS, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":841 */ +- __pyx_25 = PyInt_FromLong(21); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(21); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_SNACK, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":842 */ +- __pyx_25 = PyInt_FromLong(22); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(22); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_REC, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":843 */ +- __pyx_25 = PyInt_FromLong(23); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(23); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_CORRUPT, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":844 */ +- __pyx_25 = PyInt_FromLong(24); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(24); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_SNAP, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":845 */ +- __pyx_25 = PyInt_FromLong(26); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(26); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_TCPCOMP, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":846 */ +- __pyx_25 = PyInt_FromLong(27); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(27); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_MAX, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; goto __pyx_L1;} + Py_DECREF(__pyx_25); __pyx_25 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":848 */ +- __pyx_25 = PyInt_FromLong(1); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; goto __pyx_L1;} ++ __pyx_25 = PyLong_FromLong(1); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; goto __pyx_L1;} + __pyx_k49 = __pyx_25; + __pyx_25 = 0; +- __pyx_26 = PyInt_FromLong(0); if (!__pyx_26) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; goto __pyx_L1;} ++ __pyx_26 = PyLong_FromLong(0); if (!__pyx_26) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; goto __pyx_L1;} + __pyx_k50 = __pyx_26; + __pyx_26 = 0; + __pyx_27 = __Pyx_GetName(__pyx_m, __pyx_n_TH_SYN); if (!__pyx_27) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; goto __pyx_L1;} +@@ -8978,17 +8980,17 @@ PyMODINIT_FUNC initdnet(void) { + __pyx_28 = __Pyx_GetName(__pyx_m, __pyx_n_TCP_WIN_MAX); if (!__pyx_28) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; goto __pyx_L1;} + __pyx_k52 = __pyx_28; + __pyx_28 = 0; +- __pyx_29 = PyInt_FromLong(0); if (!__pyx_29) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; goto __pyx_L1;} ++ __pyx_29 = PyLong_FromLong(0); if (!__pyx_29) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; goto __pyx_L1;} + __pyx_k53 = __pyx_29; + __pyx_29 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":871 */ +- __pyx_30 = PyInt_FromLong(8); if (!__pyx_30) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;} ++ __pyx_30 = PyLong_FromLong(8); if (!__pyx_30) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_UDP_HDR_LEN, __pyx_30) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;} + Py_DECREF(__pyx_30); __pyx_30 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":872 */ +- __pyx_30 = PyInt_FromLong(65535); if (!__pyx_30) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; goto __pyx_L1;} ++ __pyx_30 = PyLong_FromLong(65535); if (!__pyx_30) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_UDP_PORT_MAX, __pyx_30) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; goto __pyx_L1;} + Py_DECREF(__pyx_30); __pyx_30 = 0; + +@@ -8998,52 +9000,52 @@ PyMODINIT_FUNC initdnet(void) { + __pyx_30 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":913 */ +- __pyx_31 = PyInt_FromLong(1); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; goto __pyx_L1;} ++ __pyx_31 = PyLong_FromLong(1); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_TYPE_OTHER, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; goto __pyx_L1;} + Py_DECREF(__pyx_31); __pyx_31 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":914 */ +- __pyx_31 = PyInt_FromLong(6); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; goto __pyx_L1;} ++ __pyx_31 = PyLong_FromLong(6); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_TYPE_ETH, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; goto __pyx_L1;} + Py_DECREF(__pyx_31); __pyx_31 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":915 */ +- __pyx_31 = PyInt_FromLong(24); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; goto __pyx_L1;} ++ __pyx_31 = PyLong_FromLong(24); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_TYPE_LOOPBACK, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; goto __pyx_L1;} + Py_DECREF(__pyx_31); __pyx_31 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":916 */ +- __pyx_31 = PyInt_FromLong(53); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; goto __pyx_L1;} ++ __pyx_31 = PyLong_FromLong(53); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_TYPE_TUN, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; goto __pyx_L1;} + Py_DECREF(__pyx_31); __pyx_31 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":918 */ +- __pyx_31 = PyInt_FromLong(1); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; goto __pyx_L1;} ++ __pyx_31 = PyLong_FromLong(1); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_FLAG_UP, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; goto __pyx_L1;} + Py_DECREF(__pyx_31); __pyx_31 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":919 */ +- __pyx_31 = PyInt_FromLong(2); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; goto __pyx_L1;} ++ __pyx_31 = PyLong_FromLong(2); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_FLAG_LOOPBACK, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; goto __pyx_L1;} + Py_DECREF(__pyx_31); __pyx_31 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":920 */ +- __pyx_31 = PyInt_FromLong(4); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; goto __pyx_L1;} ++ __pyx_31 = PyLong_FromLong(4); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_FLAG_POINTOPOINT, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; goto __pyx_L1;} + Py_DECREF(__pyx_31); __pyx_31 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":921 */ +- __pyx_31 = PyInt_FromLong(8); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; goto __pyx_L1;} ++ __pyx_31 = PyLong_FromLong(8); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_FLAG_NOARP, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; goto __pyx_L1;} + Py_DECREF(__pyx_31); __pyx_31 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":922 */ +- __pyx_31 = PyInt_FromLong(16); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;} ++ __pyx_31 = PyLong_FromLong(16); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_FLAG_BROADCAST, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;} + Py_DECREF(__pyx_31); __pyx_31 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":923 */ +- __pyx_31 = PyInt_FromLong(32); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; goto __pyx_L1;} ++ __pyx_31 = PyLong_FromLong(32); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_FLAG_MULTICAST, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; goto __pyx_L1;} + Py_DECREF(__pyx_31); __pyx_31 = 0; + +@@ -9056,22 +9058,22 @@ PyMODINIT_FUNC initdnet(void) { + __pyx_k56 = Py_None; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1183 */ +- __pyx_31 = PyInt_FromLong(1); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; goto __pyx_L1;} ++ __pyx_31 = PyLong_FromLong(1); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_FW_OP_ALLOW, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; goto __pyx_L1;} + Py_DECREF(__pyx_31); __pyx_31 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1184 */ +- __pyx_31 = PyInt_FromLong(2); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; goto __pyx_L1;} ++ __pyx_31 = PyLong_FromLong(2); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_FW_OP_BLOCK, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; goto __pyx_L1;} + Py_DECREF(__pyx_31); __pyx_31 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1186 */ +- __pyx_31 = PyInt_FromLong(1); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; goto __pyx_L1;} ++ __pyx_31 = PyLong_FromLong(1); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_FW_DIR_IN, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; goto __pyx_L1;} + Py_DECREF(__pyx_31); __pyx_31 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1187 */ +- __pyx_31 = PyInt_FromLong(2); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; goto __pyx_L1;} ++ __pyx_31 = PyLong_FromLong(2); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_FW_DIR_OUT, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; goto __pyx_L1;} + Py_DECREF(__pyx_31); __pyx_31 = 0; + +@@ -9084,12 +9086,12 @@ PyMODINIT_FUNC initdnet(void) { + __pyx_k58 = Py_None; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1490 */ +- __pyx_31 = PyInt_FromLong(1500); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; goto __pyx_L1;} ++ __pyx_31 = PyLong_FromLong(1500); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; goto __pyx_L1;} + __pyx_k59 = __pyx_31; + __pyx_31 = 0; + + /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1531 */ +- return; ++ return __pyx_m; + __pyx_L1:; + Py_XDECREF(__pyx_1); + Py_XDECREF(__pyx_2); +@@ -9123,6 +9125,7 @@ PyMODINIT_FUNC initdnet(void) { + Py_XDECREF(__pyx_30); + Py_XDECREF(__pyx_31); + __Pyx_AddTraceback("dnet"); ++ return NULL; + } + + static char *__pyx_filenames[] = { +@@ -9182,7 +9185,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { + Py_INCREF(type); + Py_DECREF(tmp); + } +- if (PyString_CheckExact(type)) { ++ if (PyBytes_CheckExact(type)) { + /* Raising builtin string is deprecated but still allowed -- + * do nothing. Raising an instance of a new-style str + * subclass is right out. */ +@@ -9190,39 +9193,39 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { + "raising a string exception is deprecated")) + goto raise_error; + } +- else if (PyType_Check(type) || PyClass_Check(type)) +- ; /* PyErr_NormalizeException(&type, &value, &tb); */ +- else if (PyInstance_Check(type)) { +- /* Raising an instance. The value should be a dummy. */ +- if (value != Py_None) { +- PyErr_SetString(PyExc_TypeError, +- "instance exception may not have a separate value"); +- goto raise_error; +- } +- else { +- /* Normalize to raise , */ +- Py_DECREF(value); +- value = type; +- type = (PyObject*) ((PyInstanceObject*)type)->in_class; +- Py_INCREF(type); +- } +- } +- else if (PyType_IsSubtype(type->ob_type, (PyTypeObject*)PyExc_Exception)) { +- /* Raising a new-style object (in Py2.5). +- The value should be a dummy. */ +- if (value != Py_None) { +- PyErr_SetString(PyExc_TypeError, +- "instance exception may not have a separate value"); +- goto raise_error; +- } +- else { +- /* Normalize to raise , */ +- Py_DECREF(value); +- value = type; +- type = (PyObject*) type->ob_type; +- Py_INCREF(type); +- } +- } ++ // else if (PyType_Check(type) || PyClass_Check(type)) ++ // ; /* PyErr_NormalizeException(&type, &value, &tb); */ ++ // else if (PyInstance_Check(type)) { ++ // /* Raising an instance. The value should be a dummy. */ ++ // if (value != Py_None) { ++ // PyErr_SetString(PyExc_TypeError, ++ // "instance exception may not have a separate value"); ++ // goto raise_error; ++ // } ++ // else { ++ // /* Normalize to raise , */ ++ // Py_DECREF(value); ++ // value = type; ++ // type = (PyObject*) ((PyInstanceObject*)type)->in_class; ++ // Py_INCREF(type); ++ // } ++ // } ++ // else if (PyType_IsSubtype(type->ob_type, (PyTypeObject*)PyExc_Exception)) { ++ // /* Raising a new-style object (in Py2.5). ++ // The value should be a dummy. */ ++ // if (value != Py_None) { ++ // PyErr_SetString(PyExc_TypeError, ++ // "instance exception may not have a separate value"); ++ // goto raise_error; ++ // } ++ // else { ++ // /* Normalize to raise , */ ++ // Py_DECREF(value); ++ // value = type; ++ // type = (PyObject*) type->ob_type; ++ // Py_INCREF(type); ++ // } ++ // } + else { + /* Not something you can raise. You get an exception + anyway, just not what you specified :-) */ +@@ -9261,7 +9264,7 @@ static PyObject *__Pyx_UnpackItem(PyObject *seq, Py_ssize_t i) { + PyObject *item; + if (!(item = PySequence_GetItem(seq, i))) { + if (PyErr_ExceptionMatches(PyExc_IndexError)) +- __Pyx_UnpackError(); ++ __Pyx_UnpackError(); + } + return item; + } +@@ -9279,7 +9282,7 @@ static int __Pyx_EndUnpack(PyObject *seq, Py_ssize_t i) { + + static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) { + while (t->p) { +- *t->p = PyString_InternFromString(t->s); ++ *t->p = PyUnicode_InternFromString(t->s); + if (!*t->p) + return -1; + ++t; +@@ -9289,7 +9292,7 @@ static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) { + + static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { + while (t->p) { +- *t->p = PyString_FromStringAndSize(t->s, t->n - 1); ++ *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); + if (!*t->p) + return -1; + ++t; +@@ -9310,18 +9313,19 @@ static void __Pyx_AddTraceback(char *funcname) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + +- py_srcfile = PyString_FromString(__pyx_filename); ++ py_srcfile = PyBytes_FromString(__pyx_filename); + if (!py_srcfile) goto bad; +- py_funcname = PyString_FromString(funcname); ++ py_funcname = PyBytes_FromString(funcname); + if (!py_funcname) goto bad; + py_globals = PyModule_GetDict(__pyx_m); + if (!py_globals) goto bad; + empty_tuple = PyTuple_New(0); + if (!empty_tuple) goto bad; +- empty_string = PyString_FromString(""); ++ empty_string = PyBytes_FromString(""); + if (!empty_string) goto bad; + py_code = PyCode_New( + 0, /*int argcount,*/ ++ 0, /*int kwonlyargcount*/ + 0, /*int nlocals,*/ + 0, /*int stacksize,*/ + 0, /*int flags,*/ +diff --git a/python/dnet.pyx b/python/dnet.pyx +index 777eb1f..96de5fa 100644 +--- a/python/dnet.pyx ++++ b/python/dnet.pyx +@@ -22,12 +22,12 @@ cdef extern from "dnet.h": + pass + + cdef extern from "Python.h": +- object PyString_FromStringAndSize(char *s, int len) +- int PyString_Size(object o) ++ object PyBytes_FromStringAndSize(char *s, int len) ++ int PyBytes_Size(object o) + int PyObject_AsReadBuffer(object o, char **pp, int *lenp) +- int PyInt_Check(object o) + int PyLong_Check(object o) +- long PyInt_AsLong(object o) ++ int PyLong_Check(object o) ++ long PyLong_AsLong(object o) + unsigned long PyLong_AsUnsignedLong(object o) + + cdef extern from *: +@@ -41,7 +41,7 @@ cdef extern from *: + unsigned long ntohl(unsigned long n) + + cdef __memcpy(char *dst, object src, int n): +- if PyString_Size(src) != n: ++ if PyBytes_Size(src) != n: + raise ValueError, "not a %d-byte binary string: %r" % (n, src) + memcpy(dst, src, n) + +@@ -96,8 +96,8 @@ ETH_TYPE_PPPOEDISC = 0x8863 # /* PPP Over Ethernet Discovery Stage */ + ETH_TYPE_PPPOE = 0x8864 # /* PPP Over Ethernet Session Stage */ + ETH_TYPE_LOOPBACK = 0x9000 # /* used to test interfaces */ + +-ETH_ADDR_UNSPEC = PyString_FromStringAndSize("\x00\x00\x00\x00\x00\x00", 6) +-ETH_ADDR_BROADCAST = PyString_FromStringAndSize("\xff\xff\xff\xff\xff\xff", 6) ++ETH_ADDR_UNSPEC = PyBytes_FromStringAndSize("\x00\x00\x00\x00\x00\x00", 6) ++ETH_ADDR_BROADCAST = PyBytes_FromStringAndSize("\xff\xff\xff\xff\xff\xff", 6) + + cdef class eth: + """eth(device) -> Ethernet device object +@@ -117,7 +117,7 @@ cdef class eth: + cdef eth_addr_t ea + if eth_get(self.eth, &ea) < 0: + raise OSError, __oserror() +- return PyString_FromStringAndSize(ea.data, 6) ++ return PyBytes_FromStringAndSize(ea.data, 6) + + def set(self, value): + """Set the MAC address for the device, returning 0 on success, +@@ -138,7 +138,7 @@ cdef class eth: + Arguments: + frame -- binary string representing an Ethernet frame + """ +- return eth_send(self.eth, frame, PyString_Size(frame)) ++ return eth_send(self.eth, frame, PyBytes_Size(frame)) + + def __dealloc__(self): + if self.eth: +@@ -157,7 +157,7 @@ def eth_aton(buf): + cdef eth_addr_t ea + if __eth_aton(buf, &ea) < 0: + raise ValueError, "invalid Ethernet address" +- return PyString_FromStringAndSize(ea.data, 6) ++ return PyBytes_FromStringAndSize(ea.data, 6) + + def eth_pack_hdr(dst=ETH_ADDR_BROADCAST, src=ETH_ADDR_BROADCAST, + type=ETH_TYPE_IP): +@@ -173,7 +173,7 @@ def eth_pack_hdr(dst=ETH_ADDR_BROADCAST, src=ETH_ADDR_BROADCAST, + __memcpy(s.data, src, 6) + __memcpy(d.data, dst, 6) + __eth_pack_hdr(hdr, d, s, type) +- return PyString_FromStringAndSize(hdr, 14) ++ return PyBytes_FromStringAndSize(hdr, 14) + + # + # ip.h +@@ -231,11 +231,11 @@ IP_PROTO_RAW = 255 # /* Raw IP packets */ + IP_PROTO_RESERVED = IP_PROTO_RAW # /* Reserved */ + IP_PROTO_MAX = 255 + +-IP_ADDR_ANY = PyString_FromStringAndSize("\x00\x00\x00\x00", 4) +-IP_ADDR_BROADCAST = PyString_FromStringAndSize("\xff\xff\xff\xff", 4) +-IP_ADDR_LOOPBACK = PyString_FromStringAndSize("\x7f\x00\x00\x01", 4) +-IP_ADDR_MCAST_ALL = PyString_FromStringAndSize("\xe0\x00\x00\x01", 4) +-IP_ADDR_MCAST_LOCAL = PyString_FromStringAndSize("\xe0\x00\x00\xff", 4) ++IP_ADDR_ANY = PyBytes_FromStringAndSize("\x00\x00\x00\x00", 4) ++IP_ADDR_BROADCAST = PyBytes_FromStringAndSize("\xff\xff\xff\xff", 4) ++IP_ADDR_LOOPBACK = PyBytes_FromStringAndSize("\x7f\x00\x00\x01", 4) ++IP_ADDR_MCAST_ALL = PyBytes_FromStringAndSize("\xe0\x00\x00\x01", 4) ++IP_ADDR_MCAST_LOCAL = PyBytes_FromStringAndSize("\xe0\x00\x00\xff", 4) + + cdef class ip: + """ip() -> Raw IP object +@@ -256,7 +256,7 @@ cdef class ip: + Arguments: + pkt -- binary string representing an IP packet + """ +- return ip_send(self.ip, pkt, PyString_Size(pkt)) ++ return ip_send(self.ip, pkt, PyBytes_Size(pkt)) + + def __dealloc__(self): + if self.ip: +@@ -268,7 +268,7 @@ def ip_ntoa(buf): + cdef ip_addr_t ia + cdef unsigned int i + +- if PyInt_Check(buf) or PyLong_Check(buf): ++ if PyLong_Check(buf) or PyLong_Check(buf): + i = ntohl(buf) + memcpy(&ia, &i, 4) + else: +@@ -281,7 +281,7 @@ def ip_aton(buf): + cdef ip_addr_t ia + if __ip_aton(buf, &ia) < 0: + raise ValueError, "invalid IP address" +- return PyString_FromStringAndSize(&ia, 4) ++ return PyBytes_FromStringAndSize(&ia, 4) + + def ip_checksum(pkt): + """Return packed binary string representing an IP packet +@@ -297,11 +297,11 @@ def ip_checksum(pkt): + if n < 2048: + memcpy(buf, p, n) + __ip_checksum(buf, n) +- return PyString_FromStringAndSize(buf, n) ++ return PyBytes_FromStringAndSize(buf, n) + p = malloc(n) + memcpy(p, pkt, n) + __ip_checksum(p, n) +- s = PyString_FromStringAndSize(p, n) ++ s = PyBytes_FromStringAndSize(p, n) + free(p) + return s + raise TypeError +@@ -337,7 +337,7 @@ def ip_pack_hdr(tos=IP_TOS_DEFAULT, len=IP_HDR_LEN, id=0, off=0, + __memcpy(&s, src, 4) + __memcpy(&d, dst, 4) + __ip_pack_hdr(hdr, tos, len, id, off, ttl, p, s, d) +- return PyString_FromStringAndSize(hdr, 20) ++ return PyBytes_FromStringAndSize(hdr, 20) + + # + # ip6.h +@@ -364,8 +364,8 @@ IP6_MTU_MIN = 1280 # /* minimum MTU (1024 + 256) */ + IP6_HLIM_DEFAULT=64 + IP6_HLIM_MAX = 255 + +-IP6_ADDR_UNSPEC = PyString_FromStringAndSize("\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 16) +-IP6_ADDR_LOOPBACK = PyString_FromStringAndSize("\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", 16) ++IP6_ADDR_UNSPEC = PyBytes_FromStringAndSize("\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 16) ++IP6_ADDR_LOOPBACK = PyBytes_FromStringAndSize("\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", 16) + + def ip6_ntoa(buf): + """Convert an IPv6 address from a 16-byte packed binary string to a +@@ -380,7 +380,7 @@ def ip6_aton(buf): + cdef ip6_addr_t ia + if __ip6_aton(buf, &ia) < 0: + raise ValueError, "invalid IPv6 address" +- return PyString_FromStringAndSize(&ia, 16) ++ return PyBytes_FromStringAndSize(&ia, 16) + + def ip6_checksum(buf): + """Return a packed binary string representing an IPv6 packet +@@ -389,7 +389,7 @@ def ip6_checksum(buf): + Arguments: + pkt -- binary string representing an IPv6 packet + """ +- __ip6_checksum(buf, PyString_Size(buf)) ++ __ip6_checksum(buf, PyBytes_Size(buf)) + return buf + + def ip6_pack_hdr(fc=0, fl=0, plen=0, nxt=IP_PROTO_IPV6, hlim=IP6_HLIM_DEFAULT, +@@ -410,7 +410,7 @@ def ip6_pack_hdr(fc=0, fl=0, plen=0, nxt=IP_PROTO_IPV6, hlim=IP6_HLIM_DEFAULT, + __memcpy(&s, src, 16) + __memcpy(&d, dst, 16) + __ip6_pack_hdr(hdr, fc, fl, plen, nxt, hlim, s, d) +- return PyString_FromStringAndSize(hdr, 40) ++ return PyBytes_FromStringAndSize(hdr, 40) + + # + # addr.h +@@ -443,7 +443,7 @@ cdef class addr: + + def __init__(self, addrtxt=None, type=ADDR_TYPE_NONE): + if addrtxt != None and addr_aton(addrtxt, &self._addr) < 0: +- if PyString_Size(addrtxt) == 4: ++ if PyBytes_Size(addrtxt) == 4: + self._addr.addr_type = ADDR_TYPE_IP + self._addr.addr_bits = IP_ADDR_BITS + self.ip = addrtxt +@@ -483,10 +483,10 @@ cdef class addr: + def __get__(self): + if self._addr.addr_type != ADDR_TYPE_ETH: + raise ValueError, "non-Ethernet address" +- return PyString_FromStringAndSize(self._addr.addr_data8, 6) ++ return PyBytes_FromStringAndSize(self._addr.addr_data8, 6) + + def __set__(self, value): +- if PyString_Size(value) != ETH_ADDR_LEN: ++ if PyBytes_Size(value) != ETH_ADDR_LEN: + raise ValueError, "not a 6-byte string" + __memcpy(self._addr.addr_data8, value, 6) + self._addr.addr_type = ADDR_TYPE_ETH +@@ -497,15 +497,15 @@ cdef class addr: + def __get__(self): + if self._addr.addr_type != ADDR_TYPE_IP: + raise ValueError, "non-IP address" +- return PyString_FromStringAndSize(self._addr.addr_data8, 4) ++ return PyBytes_FromStringAndSize(self._addr.addr_data8, 4) + + def __set__(self, value): +- # XXX - handle < 2.3, or else we'd use PyInt_AsUnsignedLongMask() +- if PyInt_Check(value): +- self._addr.addr_ip = htonl(PyInt_AsLong(value)) ++ # XXX - handle < 2.3, or else we'd use PyLong_AsUnsignedLongMask() ++ if PyLong_Check(value): ++ self._addr.addr_ip = htonl(PyLong_AsLong(value)) + elif PyLong_Check(value): + self._addr.addr_ip = htonl(PyLong_AsUnsignedLong(value)) +- elif PyString_Size(value) != IP_ADDR_LEN: ++ elif PyBytes_Size(value) != IP_ADDR_LEN: + raise ValueError, "not a 4-byte string" + else: + __memcpy(self._addr.addr_data8, value, 4) +@@ -517,10 +517,10 @@ cdef class addr: + def __get__(self): + if self._addr.addr_type != ADDR_TYPE_IP6: + raise ValueError, "non-IPv6 address" +- return PyString_FromStringAndSize(self._addr.addr_data8, 16) ++ return PyBytes_FromStringAndSize(self._addr.addr_data8, 16) + + def __set__(self, value): +- if PyString_Size(value) != IP6_ADDR_LEN: ++ if PyBytes_Size(value) != IP6_ADDR_LEN: + raise ValueError, "not a 16-byte string" + __memcpy(self._addr.addr_data8, value, 16) + self._addr.addr_type = ADDR_TYPE_IP6 +@@ -540,9 +540,9 @@ cdef class addr: + + def __add__(self, other): + # XXX - only handle IP for now... +- if PyInt_Check(self): ++ if PyLong_Check(self): + x, y = other, self +- elif PyInt_Check(other): ++ elif PyLong_Check(other): + x, y = self, other + else: + raise NotImplementedError +@@ -777,7 +777,7 @@ def arp_pack_hdr_ethip(op=ARP_OP_REQUEST, + __memcpy(&sp, spa, 4) + __memcpy(&dp, dpa, 4) + __arp_pack_hdr_ethip(buf, op, sh, sp, dh, dp) +- return PyString_FromStringAndSize(buf, 28) ++ return PyBytes_FromStringAndSize(buf, 28) + + # + # icmp.h +@@ -794,7 +794,7 @@ def icmp_pack_hdr(type, code): + """ + cdef char buf[4] + __icmp_pack_hdr(buf, type, code) +- return PyString_FromStringAndSize(buf, sizeof(buf)) ++ return PyBytes_FromStringAndSize(buf, sizeof(buf)) + + # + # tcp.h +@@ -860,7 +860,7 @@ def tcp_pack_hdr(sport, dport, seq=1, ack=0, flags=TH_SYN, + """ + cdef char buf[20] + __tcp_pack_hdr(buf, sport, dport, seq, ack, flags, win, urp) +- return PyString_FromStringAndSize(buf, sizeof(buf)) ++ return PyBytes_FromStringAndSize(buf, sizeof(buf)) + + # + # udp.h +@@ -881,7 +881,7 @@ def udp_pack_hdr(sport, dport, ulen=UDP_HDR_LEN): + """ + cdef char buf[8] + __udp_pack_hdr(buf, sport, dport, ulen) +- return PyString_FromStringAndSize(buf, sizeof(buf)) ++ return PyBytes_FromStringAndSize(buf, sizeof(buf)) + + # + # intf.h +@@ -1333,10 +1333,10 @@ cdef class rand: + cdef char *p + if len <= 1024: + rand_get(self.rand, buf, len) +- return PyString_FromStringAndSize(buf, len) ++ return PyBytes_FromStringAndSize(buf, len) + p = malloc(len) + rand_get(self.rand, p, len) +- s = PyString_FromStringAndSize(p, len) ++ s = PyBytes_FromStringAndSize(p, len) + free(p) + return s + +@@ -1346,7 +1346,7 @@ cdef class rand: + Arguments: + string -- binary string seed value + """ +- rand_set(self.rand, buf, PyString_Size(buf)) ++ rand_set(self.rand, buf, PyBytes_Size(buf)) + + def add(self, buf): + """Add additional entropy into the PRNG mix. +@@ -1354,7 +1354,7 @@ cdef class rand: + Arguments: + string -- binary string + """ +- rand_add(self.rand, buf, PyString_Size(buf)) ++ rand_add(self.rand, buf, PyBytes_Size(buf)) + + def uint8(self): + """Return a random 8-bit integer.""" +@@ -1400,15 +1400,15 @@ cdef class __rand_xrange: + cdef unsigned int bits + + self.rand = (r).rand +- if PyInt_Check(start): +- self.start = PyInt_AsLong(start) ++ if PyLong_Check(start): ++ self.start = PyLong_AsLong(start) + elif PyLong_Check(start): + self.start = PyLong_AsUnsignedLong(start) + else: + raise TypeError, 'start must be an integer' + +- if PyInt_Check(start): +- self.max = PyInt_AsLong(stop) - self.start ++ if PyLong_Check(start): ++ self.max = PyLong_AsLong(stop) - self.start + elif PyLong_Check(start): + self.max = PyLong_AsUnsignedLong(stop) - self.start + else: +@@ -1515,7 +1515,7 @@ cdef class tun: + Arguments: + pkt -- binary string representing an IP packet + """ +- return tun_send(self.tun, pkt, PyString_Size(pkt)) ++ return tun_send(self.tun, pkt, PyBytes_Size(pkt)) + + def recv(self): + """Return the next packet delivered to the tunnel interface.""" +@@ -1523,7 +1523,7 @@ cdef class tun: + n = tun_recv(self.tun, self.buf, self.mtu) + if n < 0: + raise OSError, __oserror() +- return PyString_FromStringAndSize(self.buf, n) ++ return PyBytes_FromStringAndSize(self.buf, n) + + def close(self): + self.tun = tun_close(self.tun) +-- +1.8.3.1 +