--- python/dnet.c 2007-01-20 12:39:54.000000000 +0100 +++ python/dnet.c 2014-10-21 16:46:56.566358683 +0200 @@ -1,4 +1,4 @@ -/* Generated by Pyrex 0.9.4.1 on Sat Jan 20 06:39:10 2007 */ +/* Generated by Pyrex 0.9.9 on Tue Oct 21 16:46:44 2014 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -11,42 +11,26 @@ #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 PyInt_AsSsize_t(o) PyInt_AsLong(o) +#endif +#if !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif #endif #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif -__PYX_EXTERN_C double pow(double, double); +#include #include "dnet.h" -typedef struct {const char *s; const void **p;} __Pyx_CApiTabEntry; /*proto*/ -typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/ -typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/ -static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t); /*proto*/ -static int __Pyx_EndUnpack(PyObject *, Py_ssize_t); /*proto*/ -static int __Pyx_PrintItem(PyObject *); /*proto*/ -static int __Pyx_PrintNewline(void); /*proto*/ -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ -static void __Pyx_ReRaise(void); /*proto*/ -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/ -static PyObject *__Pyx_GetExcValue(void); /*proto*/ -static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name); /*proto*/ -static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ -static int __Pyx_GetStarArgs(PyObject **args, PyObject **kwds, char *kwd_list[], Py_ssize_t nargs, PyObject **args2, PyObject **kwds2); /*proto*/ -static void __Pyx_WriteUnraisable(char *name); /*proto*/ -static void __Pyx_AddTraceback(char *funcname); /*proto*/ -static PyTypeObject *__Pyx_ImportType(char *module_name, char *class_name, long size); /*proto*/ -static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ -static int __Pyx_GetVtable(PyObject *dict, void *vtabptr); /*proto*/ -static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, char *modname); /*proto*/ -static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/ -static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ -static int __Pyx_InitCApi(PyObject *module); /*proto*/ -static int __Pyx_ImportModuleCApi(__Pyx_CApiTabEntry *t); /*proto*/ -static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ +typedef struct {PyObject **p; int i; char *s; long n;} __Pyx_StringTabEntry; /*proto*/ static PyObject *__pyx_m; static PyObject *__pyx_b; @@ -56,94 +40,110 @@ static char __pyx_mdoc[] = "dumb networking library\n\nThis module provides a simplified interface to several low-level\nnetworking routines, including network address manipulation, kernel\narp(4) cache and route(4) table lookup and manipulation, network\nfirewalling, network interface lookup and manipulation, IP tunnelling,\nand raw IP packet and Ethernet frame transmission.\n"; +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ + +static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ + +static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name); /*proto*/ + +static PyObject *__Pyx_UnpackItem(PyObject *); /*proto*/ +static int __Pyx_EndUnpack(PyObject *); /*proto*/ + +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ + +static void __Pyx_AddTraceback(char *funcname); /*proto*/ + /* Declarations from dnet */ -enum { - __pyx_e_4dnet_TEADELTA = 2654435769, - __pyx_e_4dnet_TEAROUNDS = 32, - __pyx_e_4dnet_TEASBOXSIZE = 128, - __pyx_e_4dnet_TEASBOXSHIFT = 7, -}; +/* Declarations from implementation of dnet */ struct __pyx_obj_4dnet_eth { PyObject_HEAD - eth_t (*eth); + eth_t *eth; }; - struct __pyx_obj_4dnet_ip { PyObject_HEAD - ip_t (*ip); + ip_t *ip; }; - struct __pyx_obj_4dnet_addr { PyObject_HEAD struct addr _addr; }; - struct __pyx_obj_4dnet___addr_ip4_iter { PyObject_HEAD unsigned long cur; unsigned long max; }; - struct __pyx_obj_4dnet_arp { PyObject_HEAD - arp_t (*arp); + arp_t *arp; }; - struct __pyx_obj_4dnet_intf { PyObject_HEAD - intf_t (*intf); + intf_t *intf; }; - struct __pyx_obj_4dnet_route { PyObject_HEAD - route_t (*route); + route_t *route; }; - struct __pyx_obj_4dnet_fw { PyObject_HEAD - fw_t (*fw); + fw_t *fw; }; - struct __pyx_obj_4dnet_rand { PyObject_HEAD - rand_t (*rand); + rand_t *rand; }; +enum { + __pyx_e_4dnet_TEADELTA = 0x9e3779b9, + __pyx_e_4dnet_TEAROUNDS = 32, + __pyx_e_4dnet_TEASBOXSIZE = 128, + __pyx_e_4dnet_TEASBOXSHIFT = 7 +}; struct __pyx_obj_4dnet___rand_xrange { PyObject_HEAD - rand_t (*rand); + rand_t *rand; unsigned long cur; unsigned long enc; unsigned long max; unsigned long mask; unsigned long start; unsigned long sboxmask; - unsigned int (sbox[128]); + unsigned int sbox[128]; int left; int right; int kshift; }; - struct __pyx_obj_4dnet_tun { PyObject_HEAD - tun_t (*tun); - char (*buf); + tun_t *tun; + char *buf; int mtu; }; + + + + + + + + + + + static PyTypeObject *__pyx_ptype_4dnet_eth = 0; static PyTypeObject *__pyx_ptype_4dnet_ip = 0; static PyTypeObject *__pyx_ptype_4dnet_addr = 0; @@ -155,287 +155,657 @@ static PyTypeObject *__pyx_ptype_4dnet_rand = 0; static PyTypeObject *__pyx_ptype_4dnet___rand_xrange = 0; static PyTypeObject *__pyx_ptype_4dnet_tun = 0; -static PyObject *__pyx_k16; -static PyObject *__pyx_k17; -static PyObject *__pyx_k18; -static PyObject *__pyx_k24; -static PyObject *__pyx_k25; -static PyObject *__pyx_k26; -static PyObject *__pyx_k27; -static PyObject *__pyx_k28; -static PyObject *__pyx_k29; -static PyObject *__pyx_k30; -static PyObject *__pyx_k31; -static PyObject *__pyx_k34; -static PyObject *__pyx_k35; -static PyObject *__pyx_k36; -static PyObject *__pyx_k37; -static PyObject *__pyx_k38; -static PyObject *__pyx_k39; -static PyObject *__pyx_k40; -static PyObject *__pyx_k41; -static PyObject *__pyx_k42; -static PyObject *__pyx_k43; -static PyObject *__pyx_k44; -static PyObject *__pyx_k45; -static PyObject *__pyx_k46; -static PyObject *__pyx_k47; -static PyObject *__pyx_k48; -static PyObject *__pyx_k49; -static PyObject *__pyx_k50; -static PyObject *__pyx_k51; -static PyObject *__pyx_k52; -static PyObject *__pyx_k53; -static PyObject *__pyx_k54; -static PyObject *__pyx_k55; -static PyObject *__pyx_k56; -static PyObject *__pyx_k57; -static PyObject *__pyx_k58; -static PyObject *__pyx_k59; -static PyObject *(__pyx_f_4dnet___memcpy(char (*),PyObject *,int )); /*proto*/ -static PyObject *(__pyx_f_4dnet___oserror(void)); /*proto*/ -static int (__pyx_f_4dnet___arp_callback(struct arp_entry (*),void (*))); /*proto*/ -static PyObject *(__pyx_f_4dnet_ifent_to_dict(struct intf_entry (*))); /*proto*/ -static PyObject *(__pyx_f_4dnet_dict_to_ifent(PyObject *,struct intf_entry (*))); /*proto*/ -static int (__pyx_f_4dnet___intf_callback(struct intf_entry (*),void (*))); /*proto*/ -static int (__pyx_f_4dnet___route_callback(struct route_entry (*),void (*))); /*proto*/ -static PyObject *(__pyx_f_4dnet_rule_to_dict(struct fw_rule (*))); /*proto*/ -static PyObject *(__pyx_f_4dnet_dict_to_rule(PyObject *,struct fw_rule (*))); /*proto*/ -static int (__pyx_f_4dnet___fw_callback(struct fw_rule (*),void (*))); /*proto*/ +static PyObject *__pyx_f_4dnet___memcpy(char *,PyObject *,int); /*proto*/ +static PyObject *__pyx_f_4dnet___oserror(void); /*proto*/ +static int __pyx_f_4dnet___arp_callback(struct arp_entry *,void *); /*proto*/ +static PyObject *__pyx_f_4dnet_ifent_to_dict(struct intf_entry *); /*proto*/ +static PyObject *__pyx_f_4dnet_dict_to_ifent(PyObject *,struct intf_entry *); /*proto*/ +static int __pyx_f_4dnet___intf_callback(struct intf_entry *,void *); /*proto*/ +static int __pyx_f_4dnet___route_callback(struct route_entry *,void *); /*proto*/ +static PyObject *__pyx_f_4dnet_rule_to_dict(struct fw_rule *); /*proto*/ +static PyObject *__pyx_f_4dnet_dict_to_rule(PyObject *,struct fw_rule *); /*proto*/ +static int __pyx_f_4dnet___fw_callback(struct fw_rule *,void *); /*proto*/ + +static char __pyx_k1[] = "not a %d-byte binary string: %r"; +static char __pyx_k2[] = "append"; +static char __pyx_k3[] = "invalid Ethernet address"; +static char __pyx_k4[] = "invalid IP address"; +static char __pyx_k5[] = "invalid IPv6 address"; +static char __pyx_k6[] = "ADDR_TYPE_IP"; +static char __pyx_k7[] = "IP_ADDR_BITS"; +static char __pyx_k8[] = "ip"; +static char __pyx_k9[] = "invalid network address"; +static char __pyx_k10[] = "ADDR_TYPE_ETH"; +static char __pyx_k11[] = "eth"; +static char __pyx_k12[] = "ADDR_TYPE_IP6"; +static char __pyx_k13[] = "ip6"; +static char __pyx_k14[] = "non-Ethernet address"; +static char __pyx_k15[] = "ETH_ADDR_LEN"; +static char __pyx_k16[] = "not a 6-byte string"; +static char __pyx_k17[] = "ETH_ADDR_BITS"; +static char __pyx_k18[] = "non-IP address"; +static char __pyx_k19[] = "IP_ADDR_LEN"; +static char __pyx_k20[] = "not a 4-byte string"; +static char __pyx_k21[] = "non-IPv6 address"; +static char __pyx_k22[] = "IP6_ADDR_LEN"; +static char __pyx_k23[] = "not a 16-byte string"; +static char __pyx_k24[] = "IP6_ADDR_BITS"; +static char __pyx_k25[] = "__copy__"; +static char __pyx_k26[] = "__int__"; +static char __pyx_k27[] = ""; +static char __pyx_k28[] = "loop"; +static char __pyx_k29[] = "__iter_append"; +static char __pyx_k30[] = "name"; +static char __pyx_k31[] = "type"; +static char __pyx_k32[] = "flags"; +static char __pyx_k33[] = "mtu"; +static char __pyx_k34[] = "ADDR_TYPE_NONE"; +static char __pyx_k35[] = "addr"; +static char __pyx_k36[] = "dst_addr"; +static char __pyx_k37[] = "link_addr"; +static char __pyx_k38[] = "alias_addrs"; +static char __pyx_k39[] = "device"; +static char __pyx_k40[] = "op"; +static char __pyx_k41[] = "dir"; +static char __pyx_k42[] = "proto"; +static char __pyx_k43[] = "src"; +static char __pyx_k44[] = "dst"; +static char __pyx_k45[] = "sport"; +static char __pyx_k46[] = "dport"; +static char __pyx_k47[] = "IP_PROTO_TCP"; +static char __pyx_k48[] = "IP_PROTO_UDP"; +static char __pyx_k49[] = "start must be an integer"; +static char __pyx_k50[] = "stop must be an integer"; +static char __pyx_k51[] = "Address type (ADDR_TYPE_*) integer."; +static char __pyx_k52[] = "Address bitlength integer."; +static char __pyx_k53[] = "Raw address string."; +static char __pyx_k54[] = "Ethernet MAC address as binary string."; +static char __pyx_k55[] = "IPv4 address as binary string."; +static char __pyx_k56[] = "IPv6 address as binary string."; +static char __pyx_k57[] = "Tunnel interface name."; +static char __pyx_k58[] = "File descriptor for tunnel handle."; +static char __pyx_k59[] = "Dug Song "; +static char __pyx_k60[] = "__author__"; +static char __pyx_k61[] = "Copyright (c) 2003 Dug Song"; +static char __pyx_k62[] = "__copyright__"; +static char __pyx_k63[] = "BSD"; +static char __pyx_k64[] = "__license__"; +static char __pyx_k65[] = "http://libdnet.sourceforge.net/"; +static char __pyx_k66[] = "__url__"; +static char __pyx_k67[] = "1.12"; +static char __pyx_k68[] = "__version__"; +static char __pyx_k69[] = "ETH_TYPE_LEN"; +static char __pyx_k70[] = "ETH_CRC_LEN"; +static char __pyx_k71[] = "ETH_HDR_LEN"; +static char __pyx_k72[] = "ETH_LEN_MIN"; +static char __pyx_k73[] = "ETH_LEN_MAX"; +static char __pyx_k74[] = "ETH_MTU"; +static char __pyx_k75[] = "ETH_MIN"; +static char __pyx_k76[] = "ETH_TYPE_PUP"; +static char __pyx_k77[] = "ETH_TYPE_IP"; +static char __pyx_k78[] = "ETH_TYPE_ARP"; +static char __pyx_k79[] = "ETH_TYPE_REVARP"; +static char __pyx_k80[] = "ETH_TYPE_8021Q"; +static char __pyx_k81[] = "ETH_TYPE_IPV6"; +static char __pyx_k82[] = "ETH_TYPE_MPLS"; +static char __pyx_k83[] = "ETH_TYPE_MPLS_MCAST"; +static char __pyx_k84[] = "ETH_TYPE_PPPOEDISC"; +static char __pyx_k85[] = "ETH_TYPE_PPPOE"; +static char __pyx_k86[] = "ETH_TYPE_LOOPBACK"; +static char __pyx_k87[] = "\x000\x000\x000\x000\x000\x000"; +static char __pyx_k88[] = "ETH_ADDR_UNSPEC"; +static char __pyx_k89[] = "\x0ff\x0ff\x0ff\x0ff\x0ff\x0ff"; +static char __pyx_k90[] = "ETH_ADDR_BROADCAST"; +static char __pyx_k91[] = "IP_HDR_LEN"; +static char __pyx_k92[] = "IP_OPT_LEN"; +static char __pyx_k93[] = "IP_OPT_LEN_MAX"; +static char __pyx_k94[] = "IP_HDR_LEN_MAX"; +static char __pyx_k95[] = "IP_LEN_MAX"; +static char __pyx_k96[] = "IP_LEN_MIN"; +static char __pyx_k97[] = "IP_TOS_DEFAULT"; +static char __pyx_k98[] = "IP_RF"; +static char __pyx_k99[] = "IP_DF"; +static char __pyx_k100[] = "IP_MF"; +static char __pyx_k101[] = "IP_OFFMASK"; +static char __pyx_k102[] = "IP_TTL_DEFAULT"; +static char __pyx_k103[] = "IP_TTL_MAX"; +static char __pyx_k104[] = "IP_PROTO_IP"; +static char __pyx_k105[] = "IP_PROTO_ICMP"; +static char __pyx_k106[] = "IP_PROTO_IGMP"; +static char __pyx_k107[] = "IP_PROTO_IPV6"; +static char __pyx_k108[] = "IP_PROTO_GRE"; +static char __pyx_k109[] = "IP_PROTO_ESP"; +static char __pyx_k110[] = "IP_PROTO_AH"; +static char __pyx_k111[] = "IP_PROTO_ICMPV6"; +static char __pyx_k112[] = "IP_PROTO_RAW"; +static char __pyx_k113[] = "IP_PROTO_RESERVED"; +static char __pyx_k114[] = "IP_PROTO_MAX"; +static char __pyx_k115[] = "\x000\x000\x000\x000"; +static char __pyx_k116[] = "IP_ADDR_ANY"; +static char __pyx_k117[] = "\x0ff\x0ff\x0ff\x0ff"; +static char __pyx_k118[] = "IP_ADDR_BROADCAST"; +static char __pyx_k119[] = "\x07f\x000\x000\x001"; +static char __pyx_k120[] = "IP_ADDR_LOOPBACK"; +static char __pyx_k121[] = "\x0e0\x000\x000\x001"; +static char __pyx_k122[] = "IP_ADDR_MCAST_ALL"; +static char __pyx_k123[] = "\x0e0\x000\x000\x0ff"; +static char __pyx_k124[] = "IP_ADDR_MCAST_LOCAL"; +static char __pyx_k125[] = "IP6_HDR_LEN"; +static char __pyx_k126[] = "IP6_LEN_MIN"; +static char __pyx_k127[] = "IP6_LEN_MAX"; +static char __pyx_k128[] = "IP6_MTU_MIN"; +static char __pyx_k129[] = "IP6_HLIM_DEFAULT"; +static char __pyx_k130[] = "IP6_HLIM_MAX"; +static char __pyx_k131[] = "\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000"; +static char __pyx_k132[] = "IP6_ADDR_UNSPEC"; +static char __pyx_k133[] = "\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x001"; +static char __pyx_k134[] = "IP6_ADDR_LOOPBACK"; +static char __pyx_k135[] = "ARP_HDR_LEN"; +static char __pyx_k136[] = "ARP_ETHIP_LEN"; +static char __pyx_k137[] = "ARP_HRD_ETH"; +static char __pyx_k138[] = "ARP_HRD_IEEE802"; +static char __pyx_k139[] = "ARP_PRO_IP"; +static char __pyx_k140[] = "ARP_OP_REQUEST"; +static char __pyx_k141[] = "ARP_OP_REPLY"; +static char __pyx_k142[] = "ARP_OP_REVREQUEST"; +static char __pyx_k143[] = "ARP_OP_REVREPLY"; +static char __pyx_k144[] = "TCP_HDR_LEN"; +static char __pyx_k145[] = "TH_FIN"; +static char __pyx_k146[] = "TH_SYN"; +static char __pyx_k147[] = "TH_RST"; +static char __pyx_k148[] = "TH_PUSH"; +static char __pyx_k149[] = "TH_ACK"; +static char __pyx_k150[] = "TH_URG"; +static char __pyx_k151[] = "TH_ECE"; +static char __pyx_k152[] = "TH_CWR"; +static char __pyx_k153[] = "TCP_PORT_MAX"; +static char __pyx_k154[] = "TCP_WIN_MAX"; +static char __pyx_k155[] = "TCP_OPT_EOL"; +static char __pyx_k156[] = "TCP_OPT_NOP"; +static char __pyx_k157[] = "TCP_OPT_MSS"; +static char __pyx_k158[] = "TCP_OPT_WSCALE"; +static char __pyx_k159[] = "TCP_OPT_SACKOK"; +static char __pyx_k160[] = "TCP_OPT_SACK"; +static char __pyx_k161[] = "TCP_OPT_ECHO"; +static char __pyx_k162[] = "TCP_OPT_ECHOREPLY"; +static char __pyx_k163[] = "TCP_OPT_TIMESTAMP"; +static char __pyx_k164[] = "TCP_OPT_POCONN"; +static char __pyx_k165[] = "TCP_OPT_POSVC"; +static char __pyx_k166[] = "TCP_OPT_CC"; +static char __pyx_k167[] = "TCP_OPT_CCNEW"; +static char __pyx_k168[] = "TCP_OPT_CCECHO"; +static char __pyx_k169[] = "TCP_OPT_ALTSUM"; +static char __pyx_k170[] = "TCP_OPT_ALTSUMDATA"; +static char __pyx_k171[] = "TCP_OPT_SKEETER"; +static char __pyx_k172[] = "TCP_OPT_BUBBA"; +static char __pyx_k173[] = "TCP_OPT_TRAILSUM"; +static char __pyx_k174[] = "TCP_OPT_MD5"; +static char __pyx_k175[] = "TCP_OPT_SCPS"; +static char __pyx_k176[] = "TCP_OPT_SNACK"; +static char __pyx_k177[] = "TCP_OPT_REC"; +static char __pyx_k178[] = "TCP_OPT_CORRUPT"; +static char __pyx_k179[] = "TCP_OPT_SNAP"; +static char __pyx_k180[] = "TCP_OPT_TCPCOMP"; +static char __pyx_k181[] = "TCP_OPT_MAX"; +static char __pyx_k182[] = "UDP_HDR_LEN"; +static char __pyx_k183[] = "UDP_PORT_MAX"; +static char __pyx_k184[] = "INTF_TYPE_OTHER"; +static char __pyx_k185[] = "INTF_TYPE_ETH"; +static char __pyx_k186[] = "INTF_TYPE_LOOPBACK"; +static char __pyx_k187[] = "INTF_TYPE_TUN"; +static char __pyx_k188[] = "INTF_FLAG_UP"; +static char __pyx_k189[] = "INTF_FLAG_LOOPBACK"; +static char __pyx_k190[] = "INTF_FLAG_POINTOPOINT"; +static char __pyx_k191[] = "INTF_FLAG_NOARP"; +static char __pyx_k192[] = "INTF_FLAG_BROADCAST"; +static char __pyx_k193[] = "INTF_FLAG_MULTICAST"; +static char __pyx_k194[] = "FW_OP_ALLOW"; +static char __pyx_k195[] = "FW_OP_BLOCK"; +static char __pyx_k196[] = "FW_DIR_IN"; +static char __pyx_k197[] = "FW_DIR_OUT"; -/* Implementation of dnet */ - -static char (__pyx_k1[]) = "Address type (ADDR_TYPE_*) integer."; -static char (__pyx_k2[]) = "Address bitlength integer."; -static char (__pyx_k3[]) = "Raw address string."; -static char (__pyx_k4[]) = "Ethernet MAC address as binary string."; -static char (__pyx_k5[]) = "IPv4 address as binary string."; -static char (__pyx_k6[]) = "IPv6 address as binary string."; -static char (__pyx_k7[]) = "Tunnel interface name."; -static char (__pyx_k8[]) = "File descriptor for tunnel handle."; -static char (__pyx_k9[]) = "Dug Song "; -static char (__pyx_k10[]) = "Copyright (c) 2003 Dug Song"; -static char (__pyx_k12[]) = "http://libdnet.sourceforge.net/"; -static char (__pyx_k13[]) = "1.12"; -static char (__pyx_k14[]) = "\x000\x000\x000\x000\x000\x000"; -static char (__pyx_k15[]) = "\x0ff\x0ff\x0ff\x0ff\x0ff\x0ff"; -static char (__pyx_k19[]) = "\x000\x000\x000\x000"; -static char (__pyx_k20[]) = "\x0ff\x0ff\x0ff\x0ff"; -static char (__pyx_k21[]) = "\x07f\x000\x000\x001"; -static char (__pyx_k22[]) = "\x0e0\x000\x000\x001"; -static char (__pyx_k23[]) = "\x0e0\x000\x000\x0ff"; -static char (__pyx_k32[]) = "\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000"; -static char (__pyx_k33[]) = "\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x001"; - -static PyObject *__pyx_n___author__; -static PyObject *__pyx_n___copyright__; -static PyObject *__pyx_n___license__; -static PyObject *__pyx_n___url__; -static PyObject *__pyx_n___version__; -static PyObject *__pyx_n___iter_append; -static PyObject *__pyx_n_ETH_ADDR_LEN; +static PyObject *__pyx_n_ADDR_TYPE_ETH; +static PyObject *__pyx_n_ADDR_TYPE_IP; +static PyObject *__pyx_n_ADDR_TYPE_IP6; +static PyObject *__pyx_n_ADDR_TYPE_NONE; +static PyObject *__pyx_n_ARP_ETHIP_LEN; +static PyObject *__pyx_n_ARP_HDR_LEN; +static PyObject *__pyx_n_ARP_HRD_ETH; +static PyObject *__pyx_n_ARP_HRD_IEEE802; +static PyObject *__pyx_n_ARP_OP_REPLY; +static PyObject *__pyx_n_ARP_OP_REQUEST; +static PyObject *__pyx_n_ARP_OP_REVREPLY; +static PyObject *__pyx_n_ARP_OP_REVREQUEST; +static PyObject *__pyx_n_ARP_PRO_IP; +static PyObject *__pyx_n_BSD; static PyObject *__pyx_n_ETH_ADDR_BITS; -static PyObject *__pyx_n_ETH_TYPE_LEN; +static PyObject *__pyx_n_ETH_ADDR_BROADCAST; +static PyObject *__pyx_n_ETH_ADDR_LEN; +static PyObject *__pyx_n_ETH_ADDR_UNSPEC; static PyObject *__pyx_n_ETH_CRC_LEN; static PyObject *__pyx_n_ETH_HDR_LEN; -static PyObject *__pyx_n_ETH_LEN_MIN; static PyObject *__pyx_n_ETH_LEN_MAX; -static PyObject *__pyx_n_ETH_MTU; +static PyObject *__pyx_n_ETH_LEN_MIN; static PyObject *__pyx_n_ETH_MIN; -static PyObject *__pyx_n_ETH_TYPE_PUP; -static PyObject *__pyx_n_ETH_TYPE_IP; -static PyObject *__pyx_n_ETH_TYPE_ARP; -static PyObject *__pyx_n_ETH_TYPE_REVARP; +static PyObject *__pyx_n_ETH_MTU; static PyObject *__pyx_n_ETH_TYPE_8021Q; +static PyObject *__pyx_n_ETH_TYPE_ARP; +static PyObject *__pyx_n_ETH_TYPE_IP; static PyObject *__pyx_n_ETH_TYPE_IPV6; +static PyObject *__pyx_n_ETH_TYPE_LEN; +static PyObject *__pyx_n_ETH_TYPE_LOOPBACK; static PyObject *__pyx_n_ETH_TYPE_MPLS; static PyObject *__pyx_n_ETH_TYPE_MPLS_MCAST; -static PyObject *__pyx_n_ETH_TYPE_PPPOEDISC; static PyObject *__pyx_n_ETH_TYPE_PPPOE; -static PyObject *__pyx_n_ETH_TYPE_LOOPBACK; -static PyObject *__pyx_n_ETH_ADDR_UNSPEC; -static PyObject *__pyx_n_ETH_ADDR_BROADCAST; -static PyObject *__pyx_n_eth_ntoa; -static PyObject *__pyx_n_eth_aton; -static PyObject *__pyx_n_eth_pack_hdr; -static PyObject *__pyx_n_IP_ADDR_LEN; +static PyObject *__pyx_n_ETH_TYPE_PPPOEDISC; +static PyObject *__pyx_n_ETH_TYPE_PUP; +static PyObject *__pyx_n_ETH_TYPE_REVARP; +static PyObject *__pyx_n_FW_DIR_IN; +static PyObject *__pyx_n_FW_DIR_OUT; +static PyObject *__pyx_n_FW_OP_ALLOW; +static PyObject *__pyx_n_FW_OP_BLOCK; +static PyObject *__pyx_n_INTF_FLAG_BROADCAST; +static PyObject *__pyx_n_INTF_FLAG_LOOPBACK; +static PyObject *__pyx_n_INTF_FLAG_MULTICAST; +static PyObject *__pyx_n_INTF_FLAG_NOARP; +static PyObject *__pyx_n_INTF_FLAG_POINTOPOINT; +static PyObject *__pyx_n_INTF_FLAG_UP; +static PyObject *__pyx_n_INTF_TYPE_ETH; +static PyObject *__pyx_n_INTF_TYPE_LOOPBACK; +static PyObject *__pyx_n_INTF_TYPE_OTHER; +static PyObject *__pyx_n_INTF_TYPE_TUN; +static PyObject *__pyx_n_IP6_ADDR_BITS; +static PyObject *__pyx_n_IP6_ADDR_LEN; +static PyObject *__pyx_n_IP6_ADDR_LOOPBACK; +static PyObject *__pyx_n_IP6_ADDR_UNSPEC; +static PyObject *__pyx_n_IP6_HDR_LEN; +static PyObject *__pyx_n_IP6_HLIM_DEFAULT; +static PyObject *__pyx_n_IP6_HLIM_MAX; +static PyObject *__pyx_n_IP6_LEN_MAX; +static PyObject *__pyx_n_IP6_LEN_MIN; +static PyObject *__pyx_n_IP6_MTU_MIN; +static PyObject *__pyx_n_IP_ADDR_ANY; static PyObject *__pyx_n_IP_ADDR_BITS; +static PyObject *__pyx_n_IP_ADDR_BROADCAST; +static PyObject *__pyx_n_IP_ADDR_LEN; +static PyObject *__pyx_n_IP_ADDR_LOOPBACK; +static PyObject *__pyx_n_IP_ADDR_MCAST_ALL; +static PyObject *__pyx_n_IP_ADDR_MCAST_LOCAL; +static PyObject *__pyx_n_IP_DF; static PyObject *__pyx_n_IP_HDR_LEN; -static PyObject *__pyx_n_IP_OPT_LEN; -static PyObject *__pyx_n_IP_OPT_LEN_MAX; static PyObject *__pyx_n_IP_HDR_LEN_MAX; static PyObject *__pyx_n_IP_LEN_MAX; static PyObject *__pyx_n_IP_LEN_MIN; -static PyObject *__pyx_n_IP_TOS_DEFAULT; -static PyObject *__pyx_n_IP_RF; -static PyObject *__pyx_n_IP_DF; static PyObject *__pyx_n_IP_MF; static PyObject *__pyx_n_IP_OFFMASK; -static PyObject *__pyx_n_IP_TTL_DEFAULT; -static PyObject *__pyx_n_IP_TTL_MAX; -static PyObject *__pyx_n_IP_PROTO_IP; +static PyObject *__pyx_n_IP_OPT_LEN; +static PyObject *__pyx_n_IP_OPT_LEN_MAX; +static PyObject *__pyx_n_IP_PROTO_AH; +static PyObject *__pyx_n_IP_PROTO_ESP; +static PyObject *__pyx_n_IP_PROTO_GRE; static PyObject *__pyx_n_IP_PROTO_ICMP; +static PyObject *__pyx_n_IP_PROTO_ICMPV6; static PyObject *__pyx_n_IP_PROTO_IGMP; -static PyObject *__pyx_n_IP_PROTO_TCP; -static PyObject *__pyx_n_IP_PROTO_UDP; +static PyObject *__pyx_n_IP_PROTO_IP; static PyObject *__pyx_n_IP_PROTO_IPV6; -static PyObject *__pyx_n_IP_PROTO_GRE; -static PyObject *__pyx_n_IP_PROTO_ESP; -static PyObject *__pyx_n_IP_PROTO_AH; -static PyObject *__pyx_n_IP_PROTO_ICMPV6; +static PyObject *__pyx_n_IP_PROTO_MAX; static PyObject *__pyx_n_IP_PROTO_RAW; static PyObject *__pyx_n_IP_PROTO_RESERVED; -static PyObject *__pyx_n_IP_PROTO_MAX; -static PyObject *__pyx_n_IP_ADDR_ANY; -static PyObject *__pyx_n_IP_ADDR_BROADCAST; -static PyObject *__pyx_n_IP_ADDR_LOOPBACK; -static PyObject *__pyx_n_IP_ADDR_MCAST_ALL; -static PyObject *__pyx_n_IP_ADDR_MCAST_LOCAL; -static PyObject *__pyx_n_ip_ntoa; -static PyObject *__pyx_n_ip_aton; -static PyObject *__pyx_n_ip_checksum; -static PyObject *__pyx_n_ip_cksum_add; -static PyObject *__pyx_n_ip_cksum_carry; -static PyObject *__pyx_n_ip_pack_hdr; -static PyObject *__pyx_n_IP6_ADDR_LEN; -static PyObject *__pyx_n_IP6_ADDR_BITS; -static PyObject *__pyx_n_IP6_HDR_LEN; -static PyObject *__pyx_n_IP6_LEN_MIN; -static PyObject *__pyx_n_IP6_LEN_MAX; -static PyObject *__pyx_n_IP6_MTU_MIN; -static PyObject *__pyx_n_IP6_HLIM_DEFAULT; -static PyObject *__pyx_n_IP6_HLIM_MAX; -static PyObject *__pyx_n_IP6_ADDR_UNSPEC; -static PyObject *__pyx_n_IP6_ADDR_LOOPBACK; -static PyObject *__pyx_n_ip6_ntoa; -static PyObject *__pyx_n_ip6_aton; -static PyObject *__pyx_n_ip6_checksum; -static PyObject *__pyx_n_ip6_pack_hdr; -static PyObject *__pyx_n_ADDR_TYPE_NONE; -static PyObject *__pyx_n_ADDR_TYPE_ETH; -static PyObject *__pyx_n_ADDR_TYPE_IP; -static PyObject *__pyx_n_ADDR_TYPE_IP6; -static PyObject *__pyx_n_ARP_HDR_LEN; -static PyObject *__pyx_n_ARP_ETHIP_LEN; -static PyObject *__pyx_n_ARP_HRD_ETH; -static PyObject *__pyx_n_ARP_HRD_IEEE802; -static PyObject *__pyx_n_ARP_PRO_IP; -static PyObject *__pyx_n_ARP_OP_REQUEST; -static PyObject *__pyx_n_ARP_OP_REPLY; -static PyObject *__pyx_n_ARP_OP_REVREQUEST; -static PyObject *__pyx_n_ARP_OP_REVREPLY; -static PyObject *__pyx_n_arp_pack_hdr_ethip; -static PyObject *__pyx_n_icmp_pack_hdr; +static PyObject *__pyx_n_IP_PROTO_TCP; +static PyObject *__pyx_n_IP_PROTO_UDP; +static PyObject *__pyx_n_IP_RF; +static PyObject *__pyx_n_IP_TOS_DEFAULT; +static PyObject *__pyx_n_IP_TTL_DEFAULT; +static PyObject *__pyx_n_IP_TTL_MAX; static PyObject *__pyx_n_TCP_HDR_LEN; -static PyObject *__pyx_n_TH_FIN; -static PyObject *__pyx_n_TH_SYN; -static PyObject *__pyx_n_TH_RST; -static PyObject *__pyx_n_TH_PUSH; -static PyObject *__pyx_n_TH_ACK; -static PyObject *__pyx_n_TH_URG; -static PyObject *__pyx_n_TH_ECE; -static PyObject *__pyx_n_TH_CWR; -static PyObject *__pyx_n_TCP_PORT_MAX; -static PyObject *__pyx_n_TCP_WIN_MAX; -static PyObject *__pyx_n_TCP_OPT_EOL; -static PyObject *__pyx_n_TCP_OPT_NOP; -static PyObject *__pyx_n_TCP_OPT_MSS; -static PyObject *__pyx_n_TCP_OPT_WSCALE; -static PyObject *__pyx_n_TCP_OPT_SACKOK; -static PyObject *__pyx_n_TCP_OPT_SACK; -static PyObject *__pyx_n_TCP_OPT_ECHO; -static PyObject *__pyx_n_TCP_OPT_ECHOREPLY; -static PyObject *__pyx_n_TCP_OPT_TIMESTAMP; -static PyObject *__pyx_n_TCP_OPT_POCONN; -static PyObject *__pyx_n_TCP_OPT_POSVC; -static PyObject *__pyx_n_TCP_OPT_CC; -static PyObject *__pyx_n_TCP_OPT_CCNEW; -static PyObject *__pyx_n_TCP_OPT_CCECHO; static PyObject *__pyx_n_TCP_OPT_ALTSUM; static PyObject *__pyx_n_TCP_OPT_ALTSUMDATA; -static PyObject *__pyx_n_TCP_OPT_SKEETER; static PyObject *__pyx_n_TCP_OPT_BUBBA; -static PyObject *__pyx_n_TCP_OPT_TRAILSUM; +static PyObject *__pyx_n_TCP_OPT_CC; +static PyObject *__pyx_n_TCP_OPT_CCECHO; +static PyObject *__pyx_n_TCP_OPT_CCNEW; +static PyObject *__pyx_n_TCP_OPT_CORRUPT; +static PyObject *__pyx_n_TCP_OPT_ECHO; +static PyObject *__pyx_n_TCP_OPT_ECHOREPLY; +static PyObject *__pyx_n_TCP_OPT_EOL; +static PyObject *__pyx_n_TCP_OPT_MAX; static PyObject *__pyx_n_TCP_OPT_MD5; +static PyObject *__pyx_n_TCP_OPT_MSS; +static PyObject *__pyx_n_TCP_OPT_NOP; +static PyObject *__pyx_n_TCP_OPT_POCONN; +static PyObject *__pyx_n_TCP_OPT_POSVC; +static PyObject *__pyx_n_TCP_OPT_REC; +static PyObject *__pyx_n_TCP_OPT_SACK; +static PyObject *__pyx_n_TCP_OPT_SACKOK; static PyObject *__pyx_n_TCP_OPT_SCPS; +static PyObject *__pyx_n_TCP_OPT_SKEETER; static PyObject *__pyx_n_TCP_OPT_SNACK; -static PyObject *__pyx_n_TCP_OPT_REC; -static PyObject *__pyx_n_TCP_OPT_CORRUPT; static PyObject *__pyx_n_TCP_OPT_SNAP; static PyObject *__pyx_n_TCP_OPT_TCPCOMP; -static PyObject *__pyx_n_TCP_OPT_MAX; -static PyObject *__pyx_n_tcp_pack_hdr; +static PyObject *__pyx_n_TCP_OPT_TIMESTAMP; +static PyObject *__pyx_n_TCP_OPT_TRAILSUM; +static PyObject *__pyx_n_TCP_OPT_WSCALE; +static PyObject *__pyx_n_TCP_PORT_MAX; +static PyObject *__pyx_n_TCP_WIN_MAX; +static PyObject *__pyx_n_TH_ACK; +static PyObject *__pyx_n_TH_CWR; +static PyObject *__pyx_n_TH_ECE; +static PyObject *__pyx_n_TH_FIN; +static PyObject *__pyx_n_TH_PUSH; +static PyObject *__pyx_n_TH_RST; +static PyObject *__pyx_n_TH_SYN; +static PyObject *__pyx_n_TH_URG; static PyObject *__pyx_n_UDP_HDR_LEN; static PyObject *__pyx_n_UDP_PORT_MAX; -static PyObject *__pyx_n_udp_pack_hdr; -static PyObject *__pyx_n_INTF_TYPE_OTHER; -static PyObject *__pyx_n_INTF_TYPE_ETH; -static PyObject *__pyx_n_INTF_TYPE_LOOPBACK; -static PyObject *__pyx_n_INTF_TYPE_TUN; -static PyObject *__pyx_n_INTF_FLAG_UP; -static PyObject *__pyx_n_INTF_FLAG_LOOPBACK; -static PyObject *__pyx_n_INTF_FLAG_POINTOPOINT; -static PyObject *__pyx_n_INTF_FLAG_NOARP; -static PyObject *__pyx_n_INTF_FLAG_BROADCAST; -static PyObject *__pyx_n_INTF_FLAG_MULTICAST; -static PyObject *__pyx_n_FW_OP_ALLOW; -static PyObject *__pyx_n_FW_OP_BLOCK; -static PyObject *__pyx_n_FW_DIR_IN; -static PyObject *__pyx_n_FW_DIR_OUT; -static PyObject *__pyx_n_BSD; +static PyObject *__pyx_n___author__; +static PyObject *__pyx_n___copy__; +static PyObject *__pyx_n___copyright__; +static PyObject *__pyx_n___int__; +static PyObject *__pyx_n___iter_append; +static PyObject *__pyx_n___license__; +static PyObject *__pyx_n___url__; +static PyObject *__pyx_n___version__; +static PyObject *__pyx_n_addr; +static PyObject *__pyx_n_alias_addrs; +static PyObject *__pyx_n_append; +static PyObject *__pyx_n_device; +static PyObject *__pyx_n_dir; +static PyObject *__pyx_n_dport; +static PyObject *__pyx_n_dst; +static PyObject *__pyx_n_dst_addr; +static PyObject *__pyx_n_eth; +static PyObject *__pyx_n_flags; +static PyObject *__pyx_n_ip; +static PyObject *__pyx_n_ip6; +static PyObject *__pyx_n_link_addr; +static PyObject *__pyx_n_loop; +static PyObject *__pyx_n_mtu; +static PyObject *__pyx_n_name; +static PyObject *__pyx_n_op; +static PyObject *__pyx_n_proto; +static PyObject *__pyx_n_sport; +static PyObject *__pyx_n_src; +static PyObject *__pyx_n_type; +static PyObject *__pyx_k1p; +static PyObject *__pyx_k3p; +static PyObject *__pyx_k4p; +static PyObject *__pyx_k5p; static PyObject *__pyx_k9p; -static PyObject *__pyx_k10p; -static PyObject *__pyx_k12p; -static PyObject *__pyx_k13p; +static PyObject *__pyx_k14p; +static PyObject *__pyx_k16p; +static PyObject *__pyx_k18p; +static PyObject *__pyx_k20p; +static PyObject *__pyx_k21p; +static PyObject *__pyx_k23p; +static PyObject *__pyx_k27p; +static PyObject *__pyx_k49p; +static PyObject *__pyx_k50p; +static PyObject *__pyx_k59p; +static PyObject *__pyx_k61p; +static PyObject *__pyx_k65p; +static PyObject *__pyx_k67p; -static PyObject *__pyx_n_ValueError; +static __Pyx_StringTabEntry __pyx_string_tab[] = { + {&__pyx_n_ADDR_TYPE_ETH, 1, __pyx_k10, sizeof(__pyx_k10)}, + {&__pyx_n_ADDR_TYPE_IP, 1, __pyx_k6, sizeof(__pyx_k6)}, + {&__pyx_n_ADDR_TYPE_IP6, 1, __pyx_k12, sizeof(__pyx_k12)}, + {&__pyx_n_ADDR_TYPE_NONE, 1, __pyx_k34, sizeof(__pyx_k34)}, + {&__pyx_n_ARP_ETHIP_LEN, 1, __pyx_k136, sizeof(__pyx_k136)}, + {&__pyx_n_ARP_HDR_LEN, 1, __pyx_k135, sizeof(__pyx_k135)}, + {&__pyx_n_ARP_HRD_ETH, 1, __pyx_k137, sizeof(__pyx_k137)}, + {&__pyx_n_ARP_HRD_IEEE802, 1, __pyx_k138, sizeof(__pyx_k138)}, + {&__pyx_n_ARP_OP_REPLY, 1, __pyx_k141, sizeof(__pyx_k141)}, + {&__pyx_n_ARP_OP_REQUEST, 1, __pyx_k140, sizeof(__pyx_k140)}, + {&__pyx_n_ARP_OP_REVREPLY, 1, __pyx_k143, sizeof(__pyx_k143)}, + {&__pyx_n_ARP_OP_REVREQUEST, 1, __pyx_k142, sizeof(__pyx_k142)}, + {&__pyx_n_ARP_PRO_IP, 1, __pyx_k139, sizeof(__pyx_k139)}, + {&__pyx_n_BSD, 1, __pyx_k63, sizeof(__pyx_k63)}, + {&__pyx_n_ETH_ADDR_BITS, 1, __pyx_k17, sizeof(__pyx_k17)}, + {&__pyx_n_ETH_ADDR_BROADCAST, 1, __pyx_k90, sizeof(__pyx_k90)}, + {&__pyx_n_ETH_ADDR_LEN, 1, __pyx_k15, sizeof(__pyx_k15)}, + {&__pyx_n_ETH_ADDR_UNSPEC, 1, __pyx_k88, sizeof(__pyx_k88)}, + {&__pyx_n_ETH_CRC_LEN, 1, __pyx_k70, sizeof(__pyx_k70)}, + {&__pyx_n_ETH_HDR_LEN, 1, __pyx_k71, sizeof(__pyx_k71)}, + {&__pyx_n_ETH_LEN_MAX, 1, __pyx_k73, sizeof(__pyx_k73)}, + {&__pyx_n_ETH_LEN_MIN, 1, __pyx_k72, sizeof(__pyx_k72)}, + {&__pyx_n_ETH_MIN, 1, __pyx_k75, sizeof(__pyx_k75)}, + {&__pyx_n_ETH_MTU, 1, __pyx_k74, sizeof(__pyx_k74)}, + {&__pyx_n_ETH_TYPE_8021Q, 1, __pyx_k80, sizeof(__pyx_k80)}, + {&__pyx_n_ETH_TYPE_ARP, 1, __pyx_k78, sizeof(__pyx_k78)}, + {&__pyx_n_ETH_TYPE_IP, 1, __pyx_k77, sizeof(__pyx_k77)}, + {&__pyx_n_ETH_TYPE_IPV6, 1, __pyx_k81, sizeof(__pyx_k81)}, + {&__pyx_n_ETH_TYPE_LEN, 1, __pyx_k69, sizeof(__pyx_k69)}, + {&__pyx_n_ETH_TYPE_LOOPBACK, 1, __pyx_k86, sizeof(__pyx_k86)}, + {&__pyx_n_ETH_TYPE_MPLS, 1, __pyx_k82, sizeof(__pyx_k82)}, + {&__pyx_n_ETH_TYPE_MPLS_MCAST, 1, __pyx_k83, sizeof(__pyx_k83)}, + {&__pyx_n_ETH_TYPE_PPPOE, 1, __pyx_k85, sizeof(__pyx_k85)}, + {&__pyx_n_ETH_TYPE_PPPOEDISC, 1, __pyx_k84, sizeof(__pyx_k84)}, + {&__pyx_n_ETH_TYPE_PUP, 1, __pyx_k76, sizeof(__pyx_k76)}, + {&__pyx_n_ETH_TYPE_REVARP, 1, __pyx_k79, sizeof(__pyx_k79)}, + {&__pyx_n_FW_DIR_IN, 1, __pyx_k196, sizeof(__pyx_k196)}, + {&__pyx_n_FW_DIR_OUT, 1, __pyx_k197, sizeof(__pyx_k197)}, + {&__pyx_n_FW_OP_ALLOW, 1, __pyx_k194, sizeof(__pyx_k194)}, + {&__pyx_n_FW_OP_BLOCK, 1, __pyx_k195, sizeof(__pyx_k195)}, + {&__pyx_n_INTF_FLAG_BROADCAST, 1, __pyx_k192, sizeof(__pyx_k192)}, + {&__pyx_n_INTF_FLAG_LOOPBACK, 1, __pyx_k189, sizeof(__pyx_k189)}, + {&__pyx_n_INTF_FLAG_MULTICAST, 1, __pyx_k193, sizeof(__pyx_k193)}, + {&__pyx_n_INTF_FLAG_NOARP, 1, __pyx_k191, sizeof(__pyx_k191)}, + {&__pyx_n_INTF_FLAG_POINTOPOINT, 1, __pyx_k190, sizeof(__pyx_k190)}, + {&__pyx_n_INTF_FLAG_UP, 1, __pyx_k188, sizeof(__pyx_k188)}, + {&__pyx_n_INTF_TYPE_ETH, 1, __pyx_k185, sizeof(__pyx_k185)}, + {&__pyx_n_INTF_TYPE_LOOPBACK, 1, __pyx_k186, sizeof(__pyx_k186)}, + {&__pyx_n_INTF_TYPE_OTHER, 1, __pyx_k184, sizeof(__pyx_k184)}, + {&__pyx_n_INTF_TYPE_TUN, 1, __pyx_k187, sizeof(__pyx_k187)}, + {&__pyx_n_IP6_ADDR_BITS, 1, __pyx_k24, sizeof(__pyx_k24)}, + {&__pyx_n_IP6_ADDR_LEN, 1, __pyx_k22, sizeof(__pyx_k22)}, + {&__pyx_n_IP6_ADDR_LOOPBACK, 1, __pyx_k134, sizeof(__pyx_k134)}, + {&__pyx_n_IP6_ADDR_UNSPEC, 1, __pyx_k132, sizeof(__pyx_k132)}, + {&__pyx_n_IP6_HDR_LEN, 1, __pyx_k125, sizeof(__pyx_k125)}, + {&__pyx_n_IP6_HLIM_DEFAULT, 1, __pyx_k129, sizeof(__pyx_k129)}, + {&__pyx_n_IP6_HLIM_MAX, 1, __pyx_k130, sizeof(__pyx_k130)}, + {&__pyx_n_IP6_LEN_MAX, 1, __pyx_k127, sizeof(__pyx_k127)}, + {&__pyx_n_IP6_LEN_MIN, 1, __pyx_k126, sizeof(__pyx_k126)}, + {&__pyx_n_IP6_MTU_MIN, 1, __pyx_k128, sizeof(__pyx_k128)}, + {&__pyx_n_IP_ADDR_ANY, 1, __pyx_k116, sizeof(__pyx_k116)}, + {&__pyx_n_IP_ADDR_BITS, 1, __pyx_k7, sizeof(__pyx_k7)}, + {&__pyx_n_IP_ADDR_BROADCAST, 1, __pyx_k118, sizeof(__pyx_k118)}, + {&__pyx_n_IP_ADDR_LEN, 1, __pyx_k19, sizeof(__pyx_k19)}, + {&__pyx_n_IP_ADDR_LOOPBACK, 1, __pyx_k120, sizeof(__pyx_k120)}, + {&__pyx_n_IP_ADDR_MCAST_ALL, 1, __pyx_k122, sizeof(__pyx_k122)}, + {&__pyx_n_IP_ADDR_MCAST_LOCAL, 1, __pyx_k124, sizeof(__pyx_k124)}, + {&__pyx_n_IP_DF, 1, __pyx_k99, sizeof(__pyx_k99)}, + {&__pyx_n_IP_HDR_LEN, 1, __pyx_k91, sizeof(__pyx_k91)}, + {&__pyx_n_IP_HDR_LEN_MAX, 1, __pyx_k94, sizeof(__pyx_k94)}, + {&__pyx_n_IP_LEN_MAX, 1, __pyx_k95, sizeof(__pyx_k95)}, + {&__pyx_n_IP_LEN_MIN, 1, __pyx_k96, sizeof(__pyx_k96)}, + {&__pyx_n_IP_MF, 1, __pyx_k100, sizeof(__pyx_k100)}, + {&__pyx_n_IP_OFFMASK, 1, __pyx_k101, sizeof(__pyx_k101)}, + {&__pyx_n_IP_OPT_LEN, 1, __pyx_k92, sizeof(__pyx_k92)}, + {&__pyx_n_IP_OPT_LEN_MAX, 1, __pyx_k93, sizeof(__pyx_k93)}, + {&__pyx_n_IP_PROTO_AH, 1, __pyx_k110, sizeof(__pyx_k110)}, + {&__pyx_n_IP_PROTO_ESP, 1, __pyx_k109, sizeof(__pyx_k109)}, + {&__pyx_n_IP_PROTO_GRE, 1, __pyx_k108, sizeof(__pyx_k108)}, + {&__pyx_n_IP_PROTO_ICMP, 1, __pyx_k105, sizeof(__pyx_k105)}, + {&__pyx_n_IP_PROTO_ICMPV6, 1, __pyx_k111, sizeof(__pyx_k111)}, + {&__pyx_n_IP_PROTO_IGMP, 1, __pyx_k106, sizeof(__pyx_k106)}, + {&__pyx_n_IP_PROTO_IP, 1, __pyx_k104, sizeof(__pyx_k104)}, + {&__pyx_n_IP_PROTO_IPV6, 1, __pyx_k107, sizeof(__pyx_k107)}, + {&__pyx_n_IP_PROTO_MAX, 1, __pyx_k114, sizeof(__pyx_k114)}, + {&__pyx_n_IP_PROTO_RAW, 1, __pyx_k112, sizeof(__pyx_k112)}, + {&__pyx_n_IP_PROTO_RESERVED, 1, __pyx_k113, sizeof(__pyx_k113)}, + {&__pyx_n_IP_PROTO_TCP, 1, __pyx_k47, sizeof(__pyx_k47)}, + {&__pyx_n_IP_PROTO_UDP, 1, __pyx_k48, sizeof(__pyx_k48)}, + {&__pyx_n_IP_RF, 1, __pyx_k98, sizeof(__pyx_k98)}, + {&__pyx_n_IP_TOS_DEFAULT, 1, __pyx_k97, sizeof(__pyx_k97)}, + {&__pyx_n_IP_TTL_DEFAULT, 1, __pyx_k102, sizeof(__pyx_k102)}, + {&__pyx_n_IP_TTL_MAX, 1, __pyx_k103, sizeof(__pyx_k103)}, + {&__pyx_n_TCP_HDR_LEN, 1, __pyx_k144, sizeof(__pyx_k144)}, + {&__pyx_n_TCP_OPT_ALTSUM, 1, __pyx_k169, sizeof(__pyx_k169)}, + {&__pyx_n_TCP_OPT_ALTSUMDATA, 1, __pyx_k170, sizeof(__pyx_k170)}, + {&__pyx_n_TCP_OPT_BUBBA, 1, __pyx_k172, sizeof(__pyx_k172)}, + {&__pyx_n_TCP_OPT_CC, 1, __pyx_k166, sizeof(__pyx_k166)}, + {&__pyx_n_TCP_OPT_CCECHO, 1, __pyx_k168, sizeof(__pyx_k168)}, + {&__pyx_n_TCP_OPT_CCNEW, 1, __pyx_k167, sizeof(__pyx_k167)}, + {&__pyx_n_TCP_OPT_CORRUPT, 1, __pyx_k178, sizeof(__pyx_k178)}, + {&__pyx_n_TCP_OPT_ECHO, 1, __pyx_k161, sizeof(__pyx_k161)}, + {&__pyx_n_TCP_OPT_ECHOREPLY, 1, __pyx_k162, sizeof(__pyx_k162)}, + {&__pyx_n_TCP_OPT_EOL, 1, __pyx_k155, sizeof(__pyx_k155)}, + {&__pyx_n_TCP_OPT_MAX, 1, __pyx_k181, sizeof(__pyx_k181)}, + {&__pyx_n_TCP_OPT_MD5, 1, __pyx_k174, sizeof(__pyx_k174)}, + {&__pyx_n_TCP_OPT_MSS, 1, __pyx_k157, sizeof(__pyx_k157)}, + {&__pyx_n_TCP_OPT_NOP, 1, __pyx_k156, sizeof(__pyx_k156)}, + {&__pyx_n_TCP_OPT_POCONN, 1, __pyx_k164, sizeof(__pyx_k164)}, + {&__pyx_n_TCP_OPT_POSVC, 1, __pyx_k165, sizeof(__pyx_k165)}, + {&__pyx_n_TCP_OPT_REC, 1, __pyx_k177, sizeof(__pyx_k177)}, + {&__pyx_n_TCP_OPT_SACK, 1, __pyx_k160, sizeof(__pyx_k160)}, + {&__pyx_n_TCP_OPT_SACKOK, 1, __pyx_k159, sizeof(__pyx_k159)}, + {&__pyx_n_TCP_OPT_SCPS, 1, __pyx_k175, sizeof(__pyx_k175)}, + {&__pyx_n_TCP_OPT_SKEETER, 1, __pyx_k171, sizeof(__pyx_k171)}, + {&__pyx_n_TCP_OPT_SNACK, 1, __pyx_k176, sizeof(__pyx_k176)}, + {&__pyx_n_TCP_OPT_SNAP, 1, __pyx_k179, sizeof(__pyx_k179)}, + {&__pyx_n_TCP_OPT_TCPCOMP, 1, __pyx_k180, sizeof(__pyx_k180)}, + {&__pyx_n_TCP_OPT_TIMESTAMP, 1, __pyx_k163, sizeof(__pyx_k163)}, + {&__pyx_n_TCP_OPT_TRAILSUM, 1, __pyx_k173, sizeof(__pyx_k173)}, + {&__pyx_n_TCP_OPT_WSCALE, 1, __pyx_k158, sizeof(__pyx_k158)}, + {&__pyx_n_TCP_PORT_MAX, 1, __pyx_k153, sizeof(__pyx_k153)}, + {&__pyx_n_TCP_WIN_MAX, 1, __pyx_k154, sizeof(__pyx_k154)}, + {&__pyx_n_TH_ACK, 1, __pyx_k149, sizeof(__pyx_k149)}, + {&__pyx_n_TH_CWR, 1, __pyx_k152, sizeof(__pyx_k152)}, + {&__pyx_n_TH_ECE, 1, __pyx_k151, sizeof(__pyx_k151)}, + {&__pyx_n_TH_FIN, 1, __pyx_k145, sizeof(__pyx_k145)}, + {&__pyx_n_TH_PUSH, 1, __pyx_k148, sizeof(__pyx_k148)}, + {&__pyx_n_TH_RST, 1, __pyx_k147, sizeof(__pyx_k147)}, + {&__pyx_n_TH_SYN, 1, __pyx_k146, sizeof(__pyx_k146)}, + {&__pyx_n_TH_URG, 1, __pyx_k150, sizeof(__pyx_k150)}, + {&__pyx_n_UDP_HDR_LEN, 1, __pyx_k182, sizeof(__pyx_k182)}, + {&__pyx_n_UDP_PORT_MAX, 1, __pyx_k183, sizeof(__pyx_k183)}, + {&__pyx_n___author__, 1, __pyx_k60, sizeof(__pyx_k60)}, + {&__pyx_n___copy__, 1, __pyx_k25, sizeof(__pyx_k25)}, + {&__pyx_n___copyright__, 1, __pyx_k62, sizeof(__pyx_k62)}, + {&__pyx_n___int__, 1, __pyx_k26, sizeof(__pyx_k26)}, + {&__pyx_n___iter_append, 1, __pyx_k29, sizeof(__pyx_k29)}, + {&__pyx_n___license__, 1, __pyx_k64, sizeof(__pyx_k64)}, + {&__pyx_n___url__, 1, __pyx_k66, sizeof(__pyx_k66)}, + {&__pyx_n___version__, 1, __pyx_k68, sizeof(__pyx_k68)}, + {&__pyx_n_addr, 1, __pyx_k35, sizeof(__pyx_k35)}, + {&__pyx_n_alias_addrs, 1, __pyx_k38, sizeof(__pyx_k38)}, + {&__pyx_n_append, 1, __pyx_k2, sizeof(__pyx_k2)}, + {&__pyx_n_device, 1, __pyx_k39, sizeof(__pyx_k39)}, + {&__pyx_n_dir, 1, __pyx_k41, sizeof(__pyx_k41)}, + {&__pyx_n_dport, 1, __pyx_k46, sizeof(__pyx_k46)}, + {&__pyx_n_dst, 1, __pyx_k44, sizeof(__pyx_k44)}, + {&__pyx_n_dst_addr, 1, __pyx_k36, sizeof(__pyx_k36)}, + {&__pyx_n_eth, 1, __pyx_k11, sizeof(__pyx_k11)}, + {&__pyx_n_flags, 1, __pyx_k32, sizeof(__pyx_k32)}, + {&__pyx_n_ip, 1, __pyx_k8, sizeof(__pyx_k8)}, + {&__pyx_n_ip6, 1, __pyx_k13, sizeof(__pyx_k13)}, + {&__pyx_n_link_addr, 1, __pyx_k37, sizeof(__pyx_k37)}, + {&__pyx_n_loop, 1, __pyx_k28, sizeof(__pyx_k28)}, + {&__pyx_n_mtu, 1, __pyx_k33, sizeof(__pyx_k33)}, + {&__pyx_n_name, 1, __pyx_k30, sizeof(__pyx_k30)}, + {&__pyx_n_op, 1, __pyx_k40, sizeof(__pyx_k40)}, + {&__pyx_n_proto, 1, __pyx_k42, sizeof(__pyx_k42)}, + {&__pyx_n_sport, 1, __pyx_k45, sizeof(__pyx_k45)}, + {&__pyx_n_src, 1, __pyx_k43, sizeof(__pyx_k43)}, + {&__pyx_n_type, 1, __pyx_k31, sizeof(__pyx_k31)}, + {&__pyx_k1p, 0, __pyx_k1, sizeof(__pyx_k1)}, + {&__pyx_k3p, 0, __pyx_k3, sizeof(__pyx_k3)}, + {&__pyx_k4p, 0, __pyx_k4, sizeof(__pyx_k4)}, + {&__pyx_k5p, 0, __pyx_k5, sizeof(__pyx_k5)}, + {&__pyx_k9p, 0, __pyx_k9, sizeof(__pyx_k9)}, + {&__pyx_k14p, 0, __pyx_k14, sizeof(__pyx_k14)}, + {&__pyx_k16p, 0, __pyx_k16, sizeof(__pyx_k16)}, + {&__pyx_k18p, 0, __pyx_k18, sizeof(__pyx_k18)}, + {&__pyx_k20p, 0, __pyx_k20, sizeof(__pyx_k20)}, + {&__pyx_k21p, 0, __pyx_k21, sizeof(__pyx_k21)}, + {&__pyx_k23p, 0, __pyx_k23, sizeof(__pyx_k23)}, + {&__pyx_k27p, 0, __pyx_k27, sizeof(__pyx_k27)}, + {&__pyx_k49p, 0, __pyx_k49, sizeof(__pyx_k49)}, + {&__pyx_k50p, 0, __pyx_k50, sizeof(__pyx_k50)}, + {&__pyx_k59p, 0, __pyx_k59, sizeof(__pyx_k59)}, + {&__pyx_k61p, 0, __pyx_k61, sizeof(__pyx_k61)}, + {&__pyx_k65p, 0, __pyx_k65, sizeof(__pyx_k65)}, + {&__pyx_k67p, 0, __pyx_k67, sizeof(__pyx_k67)}, + {0, 0, 0, 0} +}; + +static PyObject *__pyx_d1; +static PyObject *__pyx_d2; +static PyObject *__pyx_d3; +static PyObject *__pyx_d4; +static PyObject *__pyx_d5; +static PyObject *__pyx_d6; +static PyObject *__pyx_d7; +static PyObject *__pyx_d8; +static PyObject *__pyx_d9; +static PyObject *__pyx_d10; +static PyObject *__pyx_d11; +static PyObject *__pyx_d12; +static PyObject *__pyx_d13; +static PyObject *__pyx_d14; +static PyObject *__pyx_d15; +static PyObject *__pyx_d16; +static PyObject *__pyx_d17; +static PyObject *__pyx_d18; +static PyObject *__pyx_d19; +static PyObject *__pyx_d20; +static PyObject *__pyx_d21; +static PyObject *__pyx_d22; +static PyObject *__pyx_d23; +static PyObject *__pyx_d24; +static PyObject *__pyx_d25; +static PyObject *__pyx_d26; +static PyObject *__pyx_d27; +static PyObject *__pyx_d28; +static PyObject *__pyx_d29; +static PyObject *__pyx_d30; +static PyObject *__pyx_d31; +static PyObject *__pyx_d32; +static PyObject *__pyx_d33; +static PyObject *__pyx_d34; +static PyObject *__pyx_d35; +static PyObject *__pyx_d36; +static PyObject *__pyx_d37; -static PyObject *__pyx_k60p; -static char (__pyx_k60[]) = "not a %d-byte binary string: %r"; +/* Implementation of dnet */ -static PyObject *__pyx_f_4dnet___memcpy(char (*__pyx_v_dst),PyObject *__pyx_v_src,int __pyx_v_n) { +static PyObject *__pyx_f_4dnet___memcpy(char *__pyx_v_dst,PyObject *__pyx_v_src,int __pyx_v_n) { PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; - char (*__pyx_5); + char *__pyx_4; Py_INCREF(__pyx_v_src); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":44 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":44 */ __pyx_1 = (PyString_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_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); + __pyx_2 = PyInt_FromLong(__pyx_v_n); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); Py_INCREF(__pyx_v_src); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_src); - __pyx_3 = 0; - __pyx_3 = PyNumber_Remainder(__pyx_k60p, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - __Pyx_Raise(__pyx_2, __pyx_3, 0); - Py_DECREF(__pyx_2); __pyx_2 = 0; + PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_src); + __pyx_2 = 0; + __pyx_2 = PyNumber_Remainder(__pyx_k1p, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(PyExc_ValueError, __pyx_2, 0); + Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;} goto __pyx_L2; } __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;} - memcpy(__pyx_v_dst,__pyx_5,__pyx_v_n); + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":46 */ + __pyx_4 = PyString_AsString(__pyx_v_src); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; goto __pyx_L1;} + memcpy(__pyx_v_dst,__pyx_4,__pyx_v_n); __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); - Py_XDECREF(__pyx_4); __Pyx_AddTraceback("dnet.__memcpy"); __pyx_r = 0; __pyx_L0:; @@ -448,7 +818,7 @@ PyObject *__pyx_r; PyObject *__pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":50 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_r = __pyx_1; __pyx_1 = 0; @@ -464,8 +834,6 @@ return __pyx_r; } -static PyObject *__pyx_n_append; - static PyObject *__pyx_f_4dnet___iter_append(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_4dnet___iter_append(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_entry = 0; @@ -478,13 +846,11 @@ if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_entry, &__pyx_v_l)) return 0; Py_INCREF(__pyx_v_entry); Py_INCREF(__pyx_v_l); - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":53 */ __pyx_1 = PyObject_GetAttr(__pyx_v_l, __pyx_n_append); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; goto __pyx_L1;} Py_INCREF(__pyx_v_entry); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_entry); - __pyx_3 = PyObject_Call(__pyx_1, __pyx_2, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; @@ -503,35 +869,28 @@ return __pyx_r; } -static PyObject *__pyx_n_OSError; - static int __pyx_f_4dnet_3eth___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_4dnet_3eth___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_device = 0; int __pyx_r; - char (*__pyx_1); + char *__pyx_1; int __pyx_2; PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"device",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_device)) return -1; Py_INCREF(__pyx_v_self); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":110 */ + __pyx_1 = PyString_AsString(__pyx_v_device); if (!__pyx_1) {__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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":111 */ __pyx_2 = (!(((struct __pyx_obj_4dnet_eth *)__pyx_v_self)->eth != 0)); if (__pyx_2) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":112 */ - __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; goto __pyx_L1;} - __pyx_4 = __pyx_f_4dnet___oserror(); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; goto __pyx_L1;} - __Pyx_Raise(__pyx_3, __pyx_4, 0); + __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; goto __pyx_L1;} + __Pyx_Raise(PyExc_OSError, __pyx_3, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; goto __pyx_L1;} goto __pyx_L2; } @@ -541,7 +900,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_3); - Py_XDECREF(__pyx_4); __Pyx_AddTraceback("dnet.eth.__init__"); __pyx_r = -1; __pyx_L0:; @@ -557,27 +915,22 @@ PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":118 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":118 */ __pyx_1 = (eth_get(((struct __pyx_obj_4dnet_eth *)__pyx_v_self)->eth,(&__pyx_v_ea)) < 0); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":119 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;} - __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, __pyx_3, 0); + __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;} + __Pyx_Raise(PyExc_OSError, __pyx_2, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":120 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_r = __pyx_2; __pyx_2 = 0; @@ -587,7 +940,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.eth.get"); __pyx_r = 0; __pyx_L0:; @@ -603,26 +955,21 @@ PyObject *__pyx_r; PyObject *__pyx_1 = 0; int __pyx_2; - PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"value",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_value)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_value); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":130 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":130 */ __pyx_1 = __pyx_f_4dnet___memcpy(__pyx_v_ea.data,__pyx_v_value,6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":131 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":131 */ __pyx_2 = (eth_set(((struct __pyx_obj_4dnet_eth *)__pyx_v_self)->eth,(&__pyx_v_ea)) < 0); if (__pyx_2) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":132 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; goto __pyx_L1;} - __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; goto __pyx_L1;} - __Pyx_Raise(__pyx_1, __pyx_3, 0); + __pyx_1 = __pyx_f_4dnet___oserror(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; goto __pyx_L1;} + __Pyx_Raise(PyExc_OSError, __pyx_1, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; goto __pyx_L1;} goto __pyx_L2; } @@ -632,7 +979,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.eth.set"); __pyx_r = 0; __pyx_L0:; @@ -646,15 +992,13 @@ static PyObject *__pyx_f_4dnet_3eth_send(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_frame = 0; PyObject *__pyx_r; - char (*__pyx_1); + char *__pyx_1; PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {"frame",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_frame)) return 0; Py_INCREF(__pyx_v_self); 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_1 = PyString_AsString(__pyx_v_frame); if (!__pyx_1) {__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_r = __pyx_2; __pyx_2 = 0; @@ -676,21 +1020,13 @@ static void __pyx_f_4dnet_3eth___dealloc__(PyObject *__pyx_v_self) { int __pyx_1; Py_INCREF(__pyx_v_self); - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":144 */ __pyx_1 = (((struct __pyx_obj_4dnet_eth *)__pyx_v_self)->eth != 0); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":145 */ eth_close(((struct __pyx_obj_4dnet_eth *)__pyx_v_self)->eth); goto __pyx_L2; } __pyx_L2:; - goto __pyx_L0; - __pyx_L1:; - __Pyx_AddTraceback("dnet.eth.__dealloc__"); - __pyx_L0:; Py_DECREF(__pyx_v_self); } @@ -705,11 +1041,11 @@ if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0; Py_INCREF(__pyx_v_buf); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":151 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":151 */ __pyx_1 = __pyx_f_4dnet___memcpy(__pyx_v_ea.data,__pyx_v_buf,6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":152 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_r = __pyx_1; __pyx_1 = 0; @@ -726,38 +1062,30 @@ return __pyx_r; } -static PyObject *__pyx_k61p; - -static char (__pyx_k61[]) = "invalid Ethernet address"; - static PyObject *__pyx_f_4dnet_eth_aton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4dnet_eth_aton[] = "Convert an Ethernet MAC address from a printable string to a\n packed binary string (\'\\x00\\xde\\xad\\xbe\\xef\\x00\')."; static PyObject *__pyx_f_4dnet_eth_aton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; eth_addr_t __pyx_v_ea; PyObject *__pyx_r; - char (*__pyx_1); + char *__pyx_1; int __pyx_2; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"buf",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0; 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":158 */ + __pyx_1 = PyString_AsString(__pyx_v_buf); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; goto __pyx_L1;} __pyx_2 = (eth_aton(__pyx_1,(&__pyx_v_ea)) < 0); if (__pyx_2) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":159 */ - __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; goto __pyx_L1;} - __Pyx_Raise(__pyx_3, __pyx_k61p, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(PyExc_ValueError, __pyx_k3p, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":160 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_r = __pyx_3; __pyx_3 = 0; @@ -779,35 +1107,35 @@ 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; - PyObject *__pyx_v_type = 0; - char (__pyx_v_hdr[14]); + PyObject *__pyx_v_type_ = 0; + char __pyx_v_hdr[14]; eth_addr_t __pyx_v_s; eth_addr_t __pyx_v_d; PyObject *__pyx_r; PyObject *__pyx_1 = 0; int __pyx_2; - static char *__pyx_argnames[] = {"dst","src","type",0}; - __pyx_v_dst = __pyx_k16; - __pyx_v_src = __pyx_k17; - __pyx_v_type = __pyx_k18; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OOO", __pyx_argnames, &__pyx_v_dst, &__pyx_v_src, &__pyx_v_type)) return 0; + static char *__pyx_argnames[] = {"dst","src","type_",0}; + __pyx_v_dst = __pyx_d1; + __pyx_v_src = __pyx_d2; + __pyx_v_type_ = __pyx_d3; + if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OOO", __pyx_argnames, &__pyx_v_dst, &__pyx_v_src, &__pyx_v_type_)) return 0; Py_INCREF(__pyx_v_dst); Py_INCREF(__pyx_v_src); - Py_INCREF(__pyx_v_type); + Py_INCREF(__pyx_v_type_); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":173 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":173 */ __pyx_1 = __pyx_f_4dnet___memcpy(__pyx_v_s.data,__pyx_v_src,6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":174 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":174 */ __pyx_1 = __pyx_f_4dnet___memcpy(__pyx_v_d.data,__pyx_v_dst,6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; goto __pyx_L1;} 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} eth_pack_hdr(__pyx_v_hdr,__pyx_v_d,__pyx_v_s,__pyx_2); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":176 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_r = __pyx_1; __pyx_1 = 0; @@ -822,7 +1150,7 @@ __pyx_L0:; Py_DECREF(__pyx_v_dst); Py_DECREF(__pyx_v_src); - Py_DECREF(__pyx_v_type); + Py_DECREF(__pyx_v_type_); return __pyx_r; } @@ -831,24 +1159,19 @@ int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; Py_INCREF(__pyx_v_self); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":248 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":248 */ ((struct __pyx_obj_4dnet_ip *)__pyx_v_self)->ip = ip_open(); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":249 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":249 */ __pyx_1 = (!(((struct __pyx_obj_4dnet_ip *)__pyx_v_self)->ip != 0)); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":250 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; goto __pyx_L1;} - __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, __pyx_3, 0); + __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; goto __pyx_L1;} + __Pyx_Raise(PyExc_OSError, __pyx_2, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; goto __pyx_L1;} goto __pyx_L2; } @@ -858,7 +1181,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.ip.__init__"); __pyx_r = -1; __pyx_L0:; @@ -871,15 +1193,13 @@ static PyObject *__pyx_f_4dnet_2ip_send(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_pkt = 0; PyObject *__pyx_r; - char (*__pyx_1); + char *__pyx_1; PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {"pkt",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pkt)) return 0; Py_INCREF(__pyx_v_self); 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_1 = PyString_AsString(__pyx_v_pkt); if (!__pyx_1) {__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_r = __pyx_2; __pyx_2 = 0; @@ -901,21 +1221,13 @@ static void __pyx_f_4dnet_2ip___dealloc__(PyObject *__pyx_v_self) { int __pyx_1; Py_INCREF(__pyx_v_self); - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":262 */ __pyx_1 = (((struct __pyx_obj_4dnet_ip *)__pyx_v_self)->ip != 0); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":263 */ ip_close(((struct __pyx_obj_4dnet_ip *)__pyx_v_self)->ip); goto __pyx_L2; } __pyx_L2:; - goto __pyx_L0; - __pyx_L1:; - __Pyx_AddTraceback("dnet.ip.__dealloc__"); - __pyx_L0:; Py_DECREF(__pyx_v_self); } @@ -933,30 +1245,28 @@ if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0; Py_INCREF(__pyx_v_buf); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":271 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":271 */ __pyx_1 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_v_i = ntohl(__pyx_2); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":273 */ - memcpy(((char (*))(&__pyx_v_ia)),((char (*))(&__pyx_v_i)),4); + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":273 */ + memcpy(((char *)(&__pyx_v_ia)),((char *)(&__pyx_v_i)),4); goto __pyx_L2; } /*else*/ { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":275 */ - __pyx_3 = __pyx_f_4dnet___memcpy(((char (*))(&__pyx_v_ia)),__pyx_v_buf,4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} + __pyx_3 = __pyx_f_4dnet___memcpy(((char *)(&__pyx_v_ia)),__pyx_v_buf,4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":276 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_r = __pyx_3; __pyx_3 = 0; @@ -973,39 +1283,31 @@ return __pyx_r; } -static PyObject *__pyx_k62p; - -static char (__pyx_k62[]) = "invalid IP address"; - static PyObject *__pyx_f_4dnet_ip_aton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4dnet_ip_aton[] = "Convert an IP address from a printable string to a\n packed binary string (\'\\x0a\\x00\\x00\\x01\')."; static PyObject *__pyx_f_4dnet_ip_aton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; ip_addr_t __pyx_v_ia; PyObject *__pyx_r; - char (*__pyx_1); + char *__pyx_1; int __pyx_2; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"buf",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0; 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":282 */ + __pyx_1 = PyString_AsString(__pyx_v_buf); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; goto __pyx_L1;} __pyx_2 = (ip_aton(__pyx_1,(&__pyx_v_ia)) < 0); if (__pyx_2) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":283 */ - __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; goto __pyx_L1;} - __Pyx_Raise(__pyx_3, __pyx_k62p, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(PyExc_ValueError, __pyx_k4p, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; goto __pyx_L1;} goto __pyx_L2; } __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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; @@ -1021,40 +1323,38 @@ return __pyx_r; } -static PyObject *__pyx_n_TypeError; - static PyObject *__pyx_f_4dnet_ip_checksum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4dnet_ip_checksum[] = "Return packed binary string representing an IP packet \n with the IP and transport-layer checksums set.\n \n Arguments:\n pkt -- binary string representing an IP packet\n "; static PyObject *__pyx_f_4dnet_ip_checksum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_pkt = 0; - char (__pyx_v_buf[2048]); - char (*__pyx_v_p); - int __pyx_v_n; + char __pyx_v_buf[2048]; + char *__pyx_v_p; + Py_ssize_t __pyx_v_n; PyObject *__pyx_v_s; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; - char (*__pyx_3); + char *__pyx_3; static char *__pyx_argnames[] = {"pkt",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pkt)) return 0; Py_INCREF(__pyx_v_pkt); __pyx_v_s = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":296 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":296 */ __pyx_1 = (PyObject_AsReadBuffer(__pyx_v_pkt,(&__pyx_v_p),(&__pyx_v_n)) == 0); if (__pyx_1) { - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":297 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":297 */ __pyx_1 = (__pyx_v_n < 2048); if (__pyx_1) { - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":298 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":298 */ memcpy(__pyx_v_buf,__pyx_v_p,__pyx_v_n); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":299 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":299 */ ip_checksum(__pyx_v_buf,__pyx_v_n); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":300 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_r = __pyx_2; __pyx_2 = 0; @@ -1063,26 +1363,26 @@ } __pyx_L3:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":301 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":301 */ __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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":302 */ + __pyx_3 = PyString_AsString(__pyx_v_pkt); if (!__pyx_3) {__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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":303 */ ip_checksum(__pyx_v_p,__pyx_v_n); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":304 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} Py_DECREF(__pyx_v_s); __pyx_v_s = __pyx_2; __pyx_2 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":305 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":305 */ free(__pyx_v_p); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":306 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":306 */ Py_INCREF(__pyx_v_s); __pyx_r = __pyx_v_s; goto __pyx_L0; @@ -1090,10 +1390,8 @@ } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":307 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_TypeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, 0, 0); - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":307 */ + __Pyx_Raise(PyExc_TypeError, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; goto __pyx_L1;} __pyx_r = Py_None; Py_INCREF(Py_None); @@ -1112,8 +1410,8 @@ static PyObject *__pyx_f_4dnet_ip_cksum_add(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; int __pyx_v_sum; - char (*__pyx_v_p); - int __pyx_v_n; + char *__pyx_v_p; + Py_ssize_t __pyx_v_n; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; @@ -1121,11 +1419,9 @@ if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "Oi", __pyx_argnames, &__pyx_v_buf, &__pyx_v_sum)) return 0; Py_INCREF(__pyx_v_buf); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":312 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":312 */ __pyx_1 = (PyObject_AsReadBuffer(__pyx_v_buf,(&__pyx_v_p),(&__pyx_v_n)) == 0); 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_r = __pyx_2; __pyx_2 = 0; @@ -1133,11 +1429,7 @@ goto __pyx_L2; } /*else*/ { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":315 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_TypeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, 0, 0); - Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(PyExc_TypeError, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; goto __pyx_L1;} } __pyx_L2:; @@ -1160,8 +1452,6 @@ PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"sum",0}; 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_r = __pyx_1; __pyx_1 = 0; @@ -1188,7 +1478,7 @@ PyObject *__pyx_v_p = 0; PyObject *__pyx_v_src = 0; PyObject *__pyx_v_dst = 0; - char (__pyx_v_hdr[20]); + char __pyx_v_hdr[20]; ip_addr_t __pyx_v_s; ip_addr_t __pyx_v_d; PyObject *__pyx_r; @@ -1200,14 +1490,14 @@ int __pyx_6; int __pyx_7; static char *__pyx_argnames[] = {"tos","len","id","off","ttl","p","src","dst",0}; - __pyx_v_tos = __pyx_k24; - __pyx_v_len = __pyx_k25; - __pyx_v_id = __pyx_k26; - __pyx_v_off = __pyx_k27; - __pyx_v_ttl = __pyx_k28; - __pyx_v_p = __pyx_k29; - __pyx_v_src = __pyx_k30; - __pyx_v_dst = __pyx_k31; + __pyx_v_tos = __pyx_d4; + __pyx_v_len = __pyx_d5; + __pyx_v_id = __pyx_d6; + __pyx_v_off = __pyx_d7; + __pyx_v_ttl = __pyx_d8; + __pyx_v_p = __pyx_d9; + __pyx_v_src = __pyx_d10; + __pyx_v_dst = __pyx_d11; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OOOOOOOO", __pyx_argnames, &__pyx_v_tos, &__pyx_v_len, &__pyx_v_id, &__pyx_v_off, &__pyx_v_ttl, &__pyx_v_p, &__pyx_v_src, &__pyx_v_dst)) return 0; Py_INCREF(__pyx_v_tos); Py_INCREF(__pyx_v_len); @@ -1218,15 +1508,15 @@ Py_INCREF(__pyx_v_src); Py_INCREF(__pyx_v_dst); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":337 */ - __pyx_1 = __pyx_f_4dnet___memcpy(((char (*))(&__pyx_v_s)),__pyx_v_src,4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; goto __pyx_L1;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":337 */ + __pyx_1 = __pyx_f_4dnet___memcpy(((char *)(&__pyx_v_s)),__pyx_v_src,4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":338 */ - __pyx_1 = __pyx_f_4dnet___memcpy(((char (*))(&__pyx_v_d)),__pyx_v_dst,4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; goto __pyx_L1;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":338 */ + __pyx_1 = __pyx_f_4dnet___memcpy(((char *)(&__pyx_v_d)),__pyx_v_dst,4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":339 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} @@ -1235,7 +1525,7 @@ __pyx_7 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_r = __pyx_1; __pyx_1 = 0; @@ -1270,11 +1560,11 @@ if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0; Py_INCREF(__pyx_v_buf); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":374 */ - __pyx_1 = __pyx_f_4dnet___memcpy(((char (*))(&__pyx_v_ia)),__pyx_v_buf,16); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; goto __pyx_L1;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":374 */ + __pyx_1 = __pyx_f_4dnet___memcpy(((char *)(&__pyx_v_ia)),__pyx_v_buf,16); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":375 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_r = __pyx_1; __pyx_1 = 0; @@ -1291,39 +1581,31 @@ return __pyx_r; } -static PyObject *__pyx_k63p; - -static char (__pyx_k63[]) = "invalid IPv6 address"; - static PyObject *__pyx_f_4dnet_ip6_aton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4dnet_ip6_aton[] = "Convert an IPv6 address from a printable string to a\n packed binary string (\'\\x0a\\x00\\x00\\x01\')."; static PyObject *__pyx_f_4dnet_ip6_aton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; ip6_addr_t __pyx_v_ia; PyObject *__pyx_r; - char (*__pyx_1); + char *__pyx_1; int __pyx_2; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"buf",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0; 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":381 */ + __pyx_1 = PyString_AsString(__pyx_v_buf); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; goto __pyx_L1;} __pyx_2 = (ip6_aton(__pyx_1,(&__pyx_v_ia)) < 0); if (__pyx_2) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":382 */ - __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; goto __pyx_L1;} - __Pyx_Raise(__pyx_3, __pyx_k63p, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(PyExc_ValueError, __pyx_k5p, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; goto __pyx_L1;} goto __pyx_L2; } __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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; @@ -1344,16 +1626,16 @@ static PyObject *__pyx_f_4dnet_ip6_checksum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; PyObject *__pyx_r; - char (*__pyx_1); + char *__pyx_1; static char *__pyx_argnames[] = {"buf",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0; 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":392 */ + __pyx_1 = PyString_AsString(__pyx_v_buf); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; goto __pyx_L1;} ip6_checksum(__pyx_1,PyString_Size(__pyx_v_buf)); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":393 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":393 */ Py_INCREF(__pyx_v_buf); __pyx_r = __pyx_v_buf; goto __pyx_L0; @@ -1378,7 +1660,7 @@ PyObject *__pyx_v_hlim = 0; PyObject *__pyx_v_src = 0; PyObject *__pyx_v_dst = 0; - char (__pyx_v_hdr[40]); + char __pyx_v_hdr[40]; ip6_addr_t __pyx_v_s; ip6_addr_t __pyx_v_d; PyObject *__pyx_r; @@ -1389,13 +1671,13 @@ int __pyx_5; int __pyx_6; static char *__pyx_argnames[] = {"fc","fl","plen","nxt","hlim","src","dst",0}; - __pyx_v_fc = __pyx_k34; - __pyx_v_fl = __pyx_k35; - __pyx_v_plen = __pyx_k36; - __pyx_v_nxt = __pyx_k37; - __pyx_v_hlim = __pyx_k38; - __pyx_v_src = __pyx_k39; - __pyx_v_dst = __pyx_k40; + __pyx_v_fc = __pyx_d12; + __pyx_v_fl = __pyx_d13; + __pyx_v_plen = __pyx_d14; + __pyx_v_nxt = __pyx_d15; + __pyx_v_hlim = __pyx_d16; + __pyx_v_src = __pyx_d17; + __pyx_v_dst = __pyx_d18; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OOOOOOO", __pyx_argnames, &__pyx_v_fc, &__pyx_v_fl, &__pyx_v_plen, &__pyx_v_nxt, &__pyx_v_hlim, &__pyx_v_src, &__pyx_v_dst)) return 0; Py_INCREF(__pyx_v_fc); Py_INCREF(__pyx_v_fl); @@ -1405,15 +1687,15 @@ Py_INCREF(__pyx_v_src); Py_INCREF(__pyx_v_dst); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":410 */ - __pyx_1 = __pyx_f_4dnet___memcpy(((char (*))(&__pyx_v_s)),__pyx_v_src,16); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; goto __pyx_L1;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":410 */ + __pyx_1 = __pyx_f_4dnet___memcpy(((char *)(&__pyx_v_s)),__pyx_v_src,16); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":411 */ - __pyx_1 = __pyx_f_4dnet___memcpy(((char (*))(&__pyx_v_d)),__pyx_v_dst,16); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; goto __pyx_L1;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":411 */ + __pyx_1 = __pyx_f_4dnet___memcpy(((char *)(&__pyx_v_d)),__pyx_v_dst,16); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":412 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} @@ -1421,7 +1703,7 @@ __pyx_6 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_r = __pyx_1; __pyx_1 = 0; @@ -1444,64 +1726,50 @@ return __pyx_r; } -static PyObject *__pyx_n_ip; - -static PyObject *__pyx_k64p; - -static char (__pyx_k64[]) = "invalid network address"; - static int __pyx_f_4dnet_4addr___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_4dnet_4addr___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_addrtxt = 0; - PyObject *__pyx_v_type = 0; + PyObject *__pyx_v_type_ = 0; int __pyx_r; int __pyx_1; - char (*__pyx_2); + char *__pyx_2; PyObject *__pyx_3 = 0; unsigned short __pyx_4; - static char *__pyx_argnames[] = {"addrtxt","type",0}; - __pyx_v_addrtxt = __pyx_k41; - __pyx_v_type = __pyx_k42; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OO", __pyx_argnames, &__pyx_v_addrtxt, &__pyx_v_type)) return -1; + static char *__pyx_argnames[] = {"addrtxt","type_",0}; + __pyx_v_addrtxt = __pyx_d19; + __pyx_v_type_ = __pyx_d20; + if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OO", __pyx_argnames, &__pyx_v_addrtxt, &__pyx_v_type_)) return -1; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_addrtxt); - Py_INCREF(__pyx_v_type); - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":445 */ + Py_INCREF(__pyx_v_type_); if (PyObject_Cmp(__pyx_v_addrtxt, Py_None, &__pyx_1) < 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 = PyString_AsString(__pyx_v_addrtxt); if (!__pyx_2) {__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); if (__pyx_1) { - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":447 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} 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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} Py_DECREF(__pyx_3); __pyx_3 = 0; ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits = __pyx_4; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":449 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":449 */ if (PyObject_SetAttr(__pyx_v_self, __pyx_n_ip, __pyx_v_addrtxt) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; goto __pyx_L1;} goto __pyx_L3; } /*else*/ { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":451 */ - __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; goto __pyx_L1;} - __Pyx_Raise(__pyx_3, __pyx_k64p, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(PyExc_ValueError, __pyx_k9p, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; goto __pyx_L1;} } __pyx_L3:; @@ -1518,7 +1786,7 @@ __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_addrtxt); - Py_DECREF(__pyx_v_type); + Py_DECREF(__pyx_v_type_); return __pyx_r; } @@ -1527,8 +1795,6 @@ PyObject *__pyx_r; PyObject *__pyx_1 = 0; 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_r = __pyx_1; __pyx_1 = 0; @@ -1545,35 +1811,29 @@ return __pyx_r; } -static PyObject *__pyx_n_OverflowError; - static int __pyx_f_4dnet_4addr_4type___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/ static int __pyx_f_4dnet_4addr_4type___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) { unsigned int __pyx_v_value; int __pyx_r; 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;} - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":458 */ - __pyx_1 = (__pyx_v_value > 65535); + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":458 */ + __pyx_1 = (__pyx_v_value > 0xffff); if (__pyx_1) { - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OverflowError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, 0, 0); - Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(PyExc_OverflowError, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":459 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":459 */ ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type = __pyx_v_value; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_2); __Pyx_AddTraceback("dnet.addr.type.__set__"); __pyx_r = -1; __pyx_L0:; @@ -1586,8 +1846,6 @@ PyObject *__pyx_r; PyObject *__pyx_1 = 0; 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_r = __pyx_1; __pyx_1 = 0; @@ -1609,28 +1867,24 @@ unsigned int __pyx_v_value; int __pyx_r; 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;} - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":466 */ - __pyx_1 = (__pyx_v_value > 65535); + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":466 */ + __pyx_1 = (__pyx_v_value > 0xffff); if (__pyx_1) { - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OverflowError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, 0, 0); - Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(PyExc_OverflowError, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":467 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":467 */ ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits = __pyx_v_value; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_2); __Pyx_AddTraceback("dnet.addr.bits.__set__"); __pyx_r = -1; __pyx_L0:; @@ -1638,13 +1892,6 @@ return __pyx_r; } -static PyObject *__pyx_n_eth; -static PyObject *__pyx_n_ip6; - -static PyObject *__pyx_k65p; - -static char (__pyx_k65[]) = "invalid network address"; - static PyObject *__pyx_f_4dnet_4addr_4data___get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_f_4dnet_4addr_4data___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r; @@ -1652,8 +1899,6 @@ PyObject *__pyx_2 = 0; int __pyx_3; 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_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;} @@ -1661,8 +1906,6 @@ Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; if (__pyx_3) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":473 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_eth); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; @@ -1676,8 +1919,6 @@ Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_3) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":475 */ __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_ip); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; @@ -1691,8 +1932,6 @@ Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; if (__pyx_3) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":477 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_ip6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; @@ -1700,11 +1939,7 @@ goto __pyx_L2; } /*else*/ { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":479 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, __pyx_k65p, 0); - Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(PyExc_ValueError, __pyx_k9p, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; goto __pyx_L1;} } __pyx_L2:; @@ -1721,10 +1956,6 @@ return __pyx_r; } -static PyObject *__pyx_k66p; - -static char (__pyx_k66[]) = "non-Ethernet address"; - static PyObject *__pyx_f_4dnet_4addr_3eth___get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_f_4dnet_4addr_3eth___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r; @@ -1733,7 +1964,7 @@ int __pyx_3; Py_INCREF(__pyx_v_self); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":484 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_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;} @@ -1741,20 +1972,16 @@ Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; if (__pyx_3) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":485 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; goto __pyx_L1;} - __Pyx_Raise(__pyx_1, __pyx_k66p, 0); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __Pyx_Raise(PyExc_ValueError, __pyx_k14p, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; goto __pyx_L1;} goto __pyx_L2; } __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_r = __pyx_2; - __pyx_2 = 0; + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":486 */ + __pyx_1 = PyString_FromStringAndSize(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_data8,6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); @@ -1769,10 +1996,6 @@ return __pyx_r; } -static PyObject *__pyx_k67p; - -static char (__pyx_k67[]) = "not a 6-byte string"; - static int __pyx_f_4dnet_4addr_3eth___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_f_4dnet_4addr_3eth___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; @@ -1783,7 +2006,7 @@ Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_value); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":489 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_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;} @@ -1791,30 +2014,26 @@ Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; if (__pyx_3) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":490 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; goto __pyx_L1;} - __Pyx_Raise(__pyx_1, __pyx_k67p, 0); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __Pyx_Raise(PyExc_ValueError, __pyx_k16p, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":491 */ - __pyx_2 = __pyx_f_4dnet___memcpy(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_data8,__pyx_v_value,6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - - /* "/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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":491 */ + __pyx_1 = __pyx_f_4dnet___memcpy(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_data8,__pyx_v_value,6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":492 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_ETH); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; goto __pyx_L1;} + __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; + ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type = __pyx_4; + + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":493 */ + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_ETH_ADDR_BITS); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; goto __pyx_L1;} + __pyx_4 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits = __pyx_4; __pyx_r = 0; @@ -1830,10 +2049,6 @@ return __pyx_r; } -static PyObject *__pyx_k68p; - -static char (__pyx_k68[]) = "non-IP address"; - static PyObject *__pyx_f_4dnet_4addr_2ip___get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_f_4dnet_4addr_2ip___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r; @@ -1842,7 +2057,7 @@ int __pyx_3; Py_INCREF(__pyx_v_self); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":498 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_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;} @@ -1850,20 +2065,16 @@ Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; if (__pyx_3) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":499 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; goto __pyx_L1;} - __Pyx_Raise(__pyx_1, __pyx_k68p, 0); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __Pyx_Raise(PyExc_ValueError, __pyx_k18p, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; goto __pyx_L1;} goto __pyx_L2; } __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_r = __pyx_2; - __pyx_2 = 0; + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":500 */ + __pyx_1 = PyString_FromStringAndSize(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_data8,4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); @@ -1878,10 +2089,6 @@ return __pyx_r; } -static PyObject *__pyx_k69p; - -static char (__pyx_k69[]) = "not a 4-byte string"; - static int __pyx_f_4dnet_4addr_2ip___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_f_4dnet_4addr_2ip___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; @@ -1892,18 +2099,14 @@ Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_value); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":504 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":504 */ __pyx_1 = PyInt_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)); goto __pyx_L2; } __pyx_1 = PyLong_Check(__pyx_v_value); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":507 */ ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_ip = htonl(PyLong_AsUnsignedLong(__pyx_v_value)); goto __pyx_L2; } @@ -1914,32 +2117,26 @@ Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":509 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, __pyx_k69p, 0); - Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(PyExc_ValueError, __pyx_k20p, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; goto __pyx_L1;} goto __pyx_L2; } /*else*/ { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":511 */ - __pyx_3 = __pyx_f_4dnet___memcpy(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_data8,__pyx_v_value,4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_2 = __pyx_f_4dnet___memcpy(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_data8,__pyx_v_value,4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; } __pyx_L2:; - /* "/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;} - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":512 */ + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_IP); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;} + __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; 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":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;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":513 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_IP_ADDR_BITS); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;} + __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits = __pyx_4; __pyx_r = 0; @@ -1955,10 +2152,6 @@ return __pyx_r; } -static PyObject *__pyx_k70p; - -static char (__pyx_k70[]) = "non-IPv6 address"; - static PyObject *__pyx_f_4dnet_4addr_3ip6___get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_f_4dnet_4addr_3ip6___get__(PyObject *__pyx_v_self) { PyObject *__pyx_r; @@ -1967,7 +2160,7 @@ int __pyx_3; Py_INCREF(__pyx_v_self); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":518 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_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;} @@ -1975,20 +2168,16 @@ Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; if (__pyx_3) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":519 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; goto __pyx_L1;} - __Pyx_Raise(__pyx_1, __pyx_k70p, 0); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __Pyx_Raise(PyExc_ValueError, __pyx_k21p, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; goto __pyx_L1;} goto __pyx_L2; } __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_r = __pyx_2; - __pyx_2 = 0; + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":520 */ + __pyx_1 = PyString_FromStringAndSize(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_data8,16); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); @@ -2003,10 +2192,6 @@ return __pyx_r; } -static PyObject *__pyx_k71p; - -static char (__pyx_k71[]) = "not a 16-byte string"; - static int __pyx_f_4dnet_4addr_3ip6___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_f_4dnet_4addr_3ip6___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; @@ -2017,7 +2202,7 @@ Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_value); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":523 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_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;} @@ -2025,30 +2210,26 @@ Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; if (__pyx_3) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":524 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; goto __pyx_L1;} - __Pyx_Raise(__pyx_1, __pyx_k71p, 0); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __Pyx_Raise(PyExc_ValueError, __pyx_k23p, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":525 */ - __pyx_2 = __pyx_f_4dnet___memcpy(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_data8,__pyx_v_value,16); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - - /* "/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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":525 */ + __pyx_1 = __pyx_f_4dnet___memcpy(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_data8,__pyx_v_value,16); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":526 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_IP6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; goto __pyx_L1;} + __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; + ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type = __pyx_4; + + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":527 */ + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_IP6_ADDR_BITS); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; goto __pyx_L1;} + __pyx_4 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits = __pyx_4; __pyx_r = 0; @@ -2070,24 +2251,21 @@ PyObject *__pyx_v_bcast; PyObject *__pyx_r; PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); __pyx_v_bcast = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":531 */ - __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; goto __pyx_L1;} - __pyx_2 = PyObject_Call(((PyObject*)__pyx_ptype_4dnet_addr), __pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":531 */ + __pyx_1 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; goto __pyx_L1;} Py_DECREF(__pyx_v_bcast); - __pyx_v_bcast = __pyx_2; - __pyx_2 = 0; + __pyx_v_bcast = __pyx_1; + __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":532 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":532 */ addr_bcast((&((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr),(&((struct __pyx_obj_4dnet_addr *)__pyx_v_bcast)->_addr)); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":533 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":533 */ Py_INCREF(__pyx_v_bcast); __pyx_r = __pyx_v_bcast; goto __pyx_L0; @@ -2096,7 +2274,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); __Pyx_AddTraceback("dnet.addr.bcast"); __pyx_r = 0; __pyx_L0:; @@ -2111,24 +2288,21 @@ PyObject *__pyx_v_net; PyObject *__pyx_r; PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); __pyx_v_net = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":537 */ - __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; goto __pyx_L1;} - __pyx_2 = PyObject_Call(((PyObject*)__pyx_ptype_4dnet_addr), __pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":537 */ + __pyx_1 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; goto __pyx_L1;} Py_DECREF(__pyx_v_net); - __pyx_v_net = __pyx_2; - __pyx_2 = 0; + __pyx_v_net = __pyx_1; + __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":538 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":538 */ addr_net((&((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr),(&((struct __pyx_obj_4dnet_addr *)__pyx_v_net)->_addr)); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":539 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":539 */ Py_INCREF(__pyx_v_net); __pyx_r = __pyx_v_net; goto __pyx_L0; @@ -2137,7 +2311,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); __Pyx_AddTraceback("dnet.addr.net"); __pyx_r = 0; __pyx_L0:; @@ -2146,9 +2319,6 @@ return __pyx_r; } -static PyObject *__pyx_n_NotImplementedError; -static PyObject *__pyx_n___copy__; - static PyObject *__pyx_f_4dnet_4addr___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_f_4dnet_4addr___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_v_x; @@ -2158,19 +2328,16 @@ int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; - unsigned long __pyx_5; + unsigned long __pyx_4; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_other); __pyx_v_x = Py_None; Py_INCREF(Py_None); __pyx_v_y = Py_None; Py_INCREF(Py_None); __pyx_v_z = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":543 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":543 */ __pyx_1 = PyInt_Check(__pyx_v_self); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":544 */ __pyx_2 = __pyx_v_other; Py_INCREF(__pyx_2); __pyx_3 = __pyx_v_self; @@ -2185,8 +2352,6 @@ } __pyx_1 = PyInt_Check(__pyx_v_other); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":546 */ __pyx_2 = __pyx_v_self; Py_INCREF(__pyx_2); __pyx_3 = __pyx_v_other; @@ -2200,34 +2365,28 @@ goto __pyx_L2; } /*else*/ { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":548 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_NotImplementedError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, 0, 0); - Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(PyExc_NotImplementedError, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; goto __pyx_L1;} } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":549 */ - __pyx_3 = PyObject_GetAttr(__pyx_v_x, __pyx_n___copy__); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; goto __pyx_L1;} - __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; goto __pyx_L1;} - __pyx_4 = PyObject_Call(__pyx_3, __pyx_2, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":549 */ + __pyx_2 = PyObject_GetAttr(__pyx_v_x, __pyx_n___copy__); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_z); - __pyx_v_z = __pyx_4; - __pyx_4 = 0; + __pyx_v_z = __pyx_3; + __pyx_3 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":550 */ - __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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":550 */ + __pyx_2 = PyLong_FromUnsignedLong(ntohl(((struct __pyx_obj_4dnet_addr *)__pyx_v_x)->_addr.addr_ip)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;} + __pyx_3 = PyNumber_Add(__pyx_2, __pyx_v_y); if (!__pyx_3) {__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); + __pyx_4 = PyInt_AsUnsignedLongMask(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + ((struct __pyx_obj_4dnet_addr *)__pyx_v_z)->_addr.addr_ip = htonl(__pyx_4); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":551 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":551 */ Py_INCREF(__pyx_v_z); __pyx_r = __pyx_v_z; goto __pyx_L0; @@ -2237,7 +2396,6 @@ __pyx_L1:; Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); - Py_XDECREF(__pyx_4); __Pyx_AddTraceback("dnet.addr.__add__"); __pyx_r = 0; __pyx_L0:; @@ -2254,24 +2412,21 @@ PyObject *__pyx_v_a; PyObject *__pyx_r; PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); __pyx_v_a = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":554 */ - __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; goto __pyx_L1;} - __pyx_2 = PyObject_Call(((PyObject*)__pyx_ptype_4dnet_addr), __pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":554 */ + __pyx_1 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; goto __pyx_L1;} Py_DECREF(__pyx_v_a); - __pyx_v_a = __pyx_2; - __pyx_2 = 0; + __pyx_v_a = __pyx_1; + __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":555 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":555 */ ((struct __pyx_obj_4dnet_addr *)__pyx_v_a)->_addr = ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":556 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":556 */ Py_INCREF(__pyx_v_a); __pyx_r = __pyx_v_a; goto __pyx_L0; @@ -2280,7 +2435,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); __Pyx_AddTraceback("dnet.addr.__copy__"); __pyx_r = 0; __pyx_L0:; @@ -2298,32 +2452,28 @@ Py_INCREF(__pyx_v_y); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_4dnet_addr, 1, "y")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; goto __pyx_L1;} - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":560 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":560 */ __pyx_v_i = addr_cmp((&((struct __pyx_obj_4dnet_addr *)__pyx_v_x)->_addr),(&((struct __pyx_obj_4dnet_addr *)__pyx_v_y)->_addr)); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":561 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":561 */ __pyx_1 = (__pyx_v_i < 0); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":562 */ __pyx_r = (-1); goto __pyx_L0; goto __pyx_L2; } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":563 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":563 */ __pyx_1 = (__pyx_v_i > 0); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":564 */ __pyx_r = 1; goto __pyx_L0; goto __pyx_L3; } __pyx_L3:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":565 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":565 */ __pyx_r = 0; goto __pyx_L0; @@ -2350,7 +2500,7 @@ Py_INCREF(__pyx_v_other); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_4dnet_addr, 1, "other")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; goto __pyx_L1;} - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":569 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":569 */ __pyx_1 = (addr_net((&((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr),(&__pyx_v_s1)) != 0); if (!__pyx_1) { __pyx_1 = (addr_bcast((&((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr),(&__pyx_v_s2)) != 0); @@ -2362,15 +2512,13 @@ } } if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":573 */ __pyx_r = 0; goto __pyx_L0; goto __pyx_L2; } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":574 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":574 */ __pyx_1 = (addr_cmp((&__pyx_v_o1),(&__pyx_v_s1)) >= 0); if (__pyx_1) { __pyx_1 = (addr_cmp((&__pyx_v_o2),(&__pyx_v_s2)) <= 0); @@ -2404,7 +2552,7 @@ Py_INCREF(__pyx_v_self); __pyx_v_i = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":578 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_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;} @@ -2437,36 +2585,32 @@ } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":581 */ - __pyx_v_x = 3430008; + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":581 */ + __pyx_v_x = 0x345678; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":582 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":582 */ __pyx_v_x = (__pyx_v_x ^ ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":583 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":583 */ __pyx_v_x = (__pyx_v_x ^ ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":584 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":584 */ __pyx_v_y = ((((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_data8[0]) << 7); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":585 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} 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_v_y = ((1000003 * __pyx_v_y) ^ (((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_data8[__pyx_5])); - __pyx_L3:; } - __pyx_L4:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":587 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":587 */ __pyx_v_y = (__pyx_v_y ^ __pyx_v_size); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":588 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":588 */ __pyx_3 = (__pyx_v_y == (-1)); if (__pyx_3) { __pyx_v_y = (-2); @@ -2474,10 +2618,10 @@ } __pyx_L5:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":589 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":589 */ __pyx_v_x = (__pyx_v_x ^ __pyx_v_y); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":590 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":590 */ __pyx_3 = (__pyx_v_x == (-1)); if (__pyx_3) { __pyx_v_x = (-2); @@ -2485,7 +2629,7 @@ } __pyx_L6:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":591 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":591 */ __pyx_r = __pyx_v_x; goto __pyx_L0; @@ -2510,7 +2654,7 @@ int __pyx_3; Py_INCREF(__pyx_v_self); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":594 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_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;} @@ -2518,20 +2662,16 @@ Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; if (__pyx_3) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":595 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_NotImplementedError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; goto __pyx_L1;} - __Pyx_Raise(__pyx_1, 0, 0); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __Pyx_Raise(PyExc_NotImplementedError, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":596 */ - __pyx_2 = PyLong_FromUnsignedLong(ntohl(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_ip)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; goto __pyx_L1;} - __pyx_r = __pyx_2; - __pyx_2 = 0; + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":596 */ + __pyx_1 = PyLong_FromUnsignedLong(ntohl(((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_ip)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); @@ -2546,24 +2686,17 @@ return __pyx_r; } -static PyObject *__pyx_n___int__; - static PyObject *__pyx_f_4dnet_4addr___long__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_f_4dnet_4addr___long__(PyObject *__pyx_v_self) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; Py_INCREF(__pyx_v_self); - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":599 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n___int__); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; goto __pyx_L1;} - __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; goto __pyx_L1;} - __pyx_3 = PyObject_Call(__pyx_1, __pyx_2, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_r = __pyx_3; - __pyx_3 = 0; + __pyx_r = __pyx_2; + __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); @@ -2571,7 +2704,6 @@ __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.addr.__long__"); __pyx_r = 0; __pyx_L0:; @@ -2590,7 +2722,7 @@ PyObject *__pyx_4 = 0; Py_INCREF(__pyx_v_self); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":603 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_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;} @@ -2604,28 +2736,24 @@ } } if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":606 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, 0, 0); - Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(PyExc_ValueError, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":615 */ - __pyx_3 = PyLong_FromUnsignedLong(__pyx_v_a.addr_ip); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; goto __pyx_L1;} - __pyx_2 = PyLong_FromUnsignedLong(__pyx_v_b.addr_ip); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; goto __pyx_L1;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":615 */ + __pyx_2 = PyLong_FromUnsignedLong(__pyx_v_a.addr_ip); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; goto __pyx_L1;} + __pyx_3 = PyLong_FromUnsignedLong(__pyx_v_b.addr_ip); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; goto __pyx_L1;} __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); - __pyx_3 = 0; + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2); + PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3); __pyx_2 = 0; - __pyx_3 = PyObject_Call(((PyObject*)__pyx_ptype_4dnet___addr_ip4_iter), __pyx_4, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_r = __pyx_3; __pyx_3 = 0; + __pyx_2 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet___addr_ip4_iter), __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_r = __pyx_2; + __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); @@ -2641,34 +2769,28 @@ return __pyx_r; } -static PyObject *__pyx_k72p; - -static char (__pyx_k72[]) = ""; - static PyObject *__pyx_f_4dnet_4addr___repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_f_4dnet_4addr___repr__(PyObject *__pyx_v_self) { - char (*__pyx_v_p); + char *__pyx_v_p; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; Py_INCREF(__pyx_v_self); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":619 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":619 */ __pyx_v_p = addr_ntoa((&((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr)); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":620 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":620 */ __pyx_1 = (!(__pyx_v_p != 0)); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":621 */ - Py_INCREF(__pyx_k72p); - __pyx_r = __pyx_k72p; + Py_INCREF(__pyx_k27p); + __pyx_r = __pyx_k27p; goto __pyx_L0; goto __pyx_L2; } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":622 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_r = __pyx_2; __pyx_2 = 0; @@ -2697,11 +2819,11 @@ Py_INCREF(__pyx_v_cur); Py_INCREF(__pyx_v_max); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":629 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} ((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->cur = ntohl(__pyx_1); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":630 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} ((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->max = ntohl(__pyx_1); @@ -2717,62 +2839,52 @@ return __pyx_r; } -static PyObject *__pyx_n_StopIteration; - static PyObject *__pyx_f_4dnet_15__addr_ip4_iter___next__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_f_4dnet_15__addr_ip4_iter___next__(PyObject *__pyx_v_self) { struct __pyx_obj_4dnet_addr *__pyx_v_next; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; - unsigned short __pyx_4; + unsigned short __pyx_3; Py_INCREF(__pyx_v_self); __pyx_v_next = ((struct __pyx_obj_4dnet_addr *)Py_None); Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":634 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":634 */ __pyx_1 = (((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->cur <= ((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->max); if (__pyx_1) { - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":635 */ - __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;} - __pyx_3 = PyObject_Call(((PyObject*)__pyx_ptype_4dnet_addr), __pyx_2, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_4dnet_addr)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":635 */ + __pyx_2 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_next)); - __pyx_v_next = ((struct __pyx_obj_4dnet_addr *)__pyx_3); - __pyx_3 = 0; + __pyx_v_next = ((struct __pyx_obj_4dnet_addr *)__pyx_2); + __pyx_2 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":636 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_3 = PyInt_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; + __pyx_v_next->_addr.addr_type = __pyx_3; - /* "/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;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_v_next->_addr.addr_bits = __pyx_4; + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":637 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_IP_ADDR_BITS); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; goto __pyx_L1;} + __pyx_3 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_v_next->_addr.addr_bits = __pyx_3; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":638 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":638 */ __pyx_v_next->_addr.addr_ip = htonl(((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->cur); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":639 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":639 */ ((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->cur = (((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->cur + 1); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":640 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":640 */ Py_INCREF(((PyObject *)__pyx_v_next)); __pyx_r = ((PyObject *)__pyx_v_next); goto __pyx_L0; goto __pyx_L2; } /*else*/ { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":642 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_StopIteration); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, 0, 0); - Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(PyExc_StopIteration, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; goto __pyx_L1;} } __pyx_L2:; @@ -2781,7 +2893,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.__addr_ip4_iter.__next__"); __pyx_r = 0; __pyx_L0:; @@ -2790,7 +2901,7 @@ return __pyx_r; } -static int __pyx_f_4dnet___arp_callback(struct arp_entry (*__pyx_v_entry),void (*__pyx_v_arg)) { +static int __pyx_f_4dnet___arp_callback(struct arp_entry *__pyx_v_entry,void *__pyx_v_arg) { PyObject *__pyx_v_f; PyObject *__pyx_v_a; PyObject *__pyx_v_pa; @@ -2799,72 +2910,64 @@ int __pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; + int __pyx_3; int __pyx_4; - int __pyx_5; __pyx_v_f = Py_None; Py_INCREF(Py_None); __pyx_v_a = Py_None; Py_INCREF(Py_None); __pyx_v_pa = Py_None; Py_INCREF(Py_None); __pyx_v_ha = Py_None; Py_INCREF(Py_None); __pyx_v_ret = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":680 */ - __pyx_1 = (PyObject *)__pyx_v_arg; - Py_INCREF(__pyx_1); - __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; goto __pyx_L1;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":680 */ + __pyx_1 = PyObject_GetIter(((PyObject *)__pyx_v_arg)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; goto __pyx_L1;} + __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; goto __pyx_L1;} Py_DECREF(__pyx_v_f); __pyx_v_f = __pyx_2; __pyx_2 = 0; - __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; goto __pyx_L1;} + __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; goto __pyx_L1;} Py_DECREF(__pyx_v_a); - __pyx_v_a = __pyx_3; - __pyx_3 = 0; - if (__Pyx_EndUnpack(__pyx_1, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; goto __pyx_L1;} + __pyx_v_a = __pyx_2; + __pyx_2 = 0; + if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":681 */ - __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; goto __pyx_L1;} - __pyx_3 = PyObject_Call(((PyObject*)__pyx_ptype_4dnet_addr), __pyx_2, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; goto __pyx_L1;} - __pyx_2 = PyObject_Call(((PyObject*)__pyx_ptype_4dnet_addr), __pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":681 */ + __pyx_2 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; goto __pyx_L1;} + __pyx_1 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; goto __pyx_L1;} Py_DECREF(__pyx_v_pa); - __pyx_v_pa = __pyx_3; - __pyx_3 = 0; - Py_DECREF(__pyx_v_ha); - __pyx_v_ha = __pyx_2; + __pyx_v_pa = __pyx_2; __pyx_2 = 0; + Py_DECREF(__pyx_v_ha); + __pyx_v_ha = __pyx_1; + __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":682 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":682 */ ((struct __pyx_obj_4dnet_addr *)__pyx_v_pa)->_addr = __pyx_v_entry->arp_pa; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":683 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":683 */ ((struct __pyx_obj_4dnet_addr *)__pyx_v_ha)->_addr = __pyx_v_entry->arp_ha; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":684 */ - __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":684 */ + __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;} Py_INCREF(__pyx_v_pa); - PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_pa); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_pa); Py_INCREF(__pyx_v_ha); - PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_ha); - __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); + PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_ha); + __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2); Py_INCREF(__pyx_v_a); - PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_a); - __pyx_1 = 0; - __pyx_2 = PyObject_Call(__pyx_v_f, __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_a); + __pyx_2 = 0; + __pyx_2 = PyObject_CallObject(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_v_ret); __pyx_v_ret = __pyx_2; __pyx_2 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":685 */ - __pyx_4 = PyObject_IsTrue(__pyx_v_ret); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; goto __pyx_L1;} - __pyx_5 = (!__pyx_4); - if (__pyx_5) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":686 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":685 */ + __pyx_3 = PyObject_IsTrue(__pyx_v_ret); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; goto __pyx_L1;} + __pyx_4 = (!__pyx_3); + if (__pyx_4) { __pyx_1 = PyInt_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; @@ -2873,9 +2976,9 @@ } __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_r = __pyx_4; + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":687 */ + __pyx_3 = PyInt_AsLong(__pyx_v_ret); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; goto __pyx_L1;} + __pyx_r = __pyx_3; goto __pyx_L0; __pyx_r = 0; @@ -2883,9 +2986,8 @@ __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.__arp_callback"); - __pyx_r = -1; + __pyx_r = (-1); __pyx_L0:; Py_DECREF(__pyx_v_f); Py_DECREF(__pyx_v_a); @@ -2900,24 +3002,19 @@ int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; Py_INCREF(__pyx_v_self); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":697 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":697 */ ((struct __pyx_obj_4dnet_arp *)__pyx_v_self)->arp = arp_open(); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":698 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":698 */ __pyx_1 = (!(((struct __pyx_obj_4dnet_arp *)__pyx_v_self)->arp != 0)); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":699 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; goto __pyx_L1;} - __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, __pyx_3, 0); + __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; goto __pyx_L1;} + __Pyx_Raise(PyExc_OSError, __pyx_2, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; goto __pyx_L1;} goto __pyx_L2; } @@ -2927,7 +3024,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.arp.__init__"); __pyx_r = -1; __pyx_L0:; @@ -2944,7 +3040,6 @@ PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"pa","ha",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_pa, &__pyx_v_ha)) return 0; Py_INCREF(__pyx_v_self); @@ -2953,22 +3048,18 @@ if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pa), __pyx_ptype_4dnet_addr, 1, "pa")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; goto __pyx_L1;} if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ha), __pyx_ptype_4dnet_addr, 1, "ha")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; goto __pyx_L1;} - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":709 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":709 */ __pyx_v_entry.arp_pa = __pyx_v_pa->_addr; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":710 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":710 */ __pyx_v_entry.arp_ha = __pyx_v_ha->_addr; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":711 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":711 */ __pyx_1 = (arp_add(((struct __pyx_obj_4dnet_arp *)__pyx_v_self)->arp,(&__pyx_v_entry)) < 0); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":712 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; goto __pyx_L1;} - __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, __pyx_3, 0); + __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; goto __pyx_L1;} + __Pyx_Raise(PyExc_OSError, __pyx_2, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; goto __pyx_L1;} goto __pyx_L2; } @@ -2978,7 +3069,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.arp.add"); __pyx_r = 0; __pyx_L0:; @@ -2996,26 +3086,21 @@ PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"pa",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pa)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_pa); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pa), __pyx_ptype_4dnet_addr, 1, "pa")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; goto __pyx_L1;} - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":721 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":721 */ __pyx_v_entry.arp_pa = __pyx_v_pa->_addr; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":722 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":722 */ __pyx_1 = (arp_delete(((struct __pyx_obj_4dnet_arp *)__pyx_v_self)->arp,(&__pyx_v_entry)) < 0); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":723 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; goto __pyx_L1;} - __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, __pyx_3, 0); + __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; goto __pyx_L1;} + __Pyx_Raise(PyExc_OSError, __pyx_2, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; goto __pyx_L1;} goto __pyx_L2; } @@ -3025,7 +3110,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.arp.delete"); __pyx_r = 0; __pyx_L0:; @@ -3049,19 +3133,17 @@ Py_INCREF(__pyx_v_pa); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pa), __pyx_ptype_4dnet_addr, 1, "pa")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; goto __pyx_L1;} - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":733 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":733 */ __pyx_v_entry.arp_pa = __pyx_v_pa->_addr; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":734 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":734 */ __pyx_1 = (arp_get(((struct __pyx_obj_4dnet_arp *)__pyx_v_self)->arp,(&__pyx_v_entry)) == 0); 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_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; - __pyx_2 = PyObject_Call(((PyObject*)__pyx_ptype_4dnet_addr), __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = __pyx_2; __pyx_2 = 0; @@ -3070,7 +3152,7 @@ } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":736 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":736 */ Py_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; @@ -3097,14 +3179,14 @@ PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"callback","arg",0}; - __pyx_v_arg = __pyx_k43; + __pyx_v_arg = __pyx_d21; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_callback, &__pyx_v_arg)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_callback); Py_INCREF(__pyx_v_arg); __pyx_v__arg = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":748 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":748 */ __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; goto __pyx_L1;} Py_INCREF(__pyx_v_callback); PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_callback); @@ -3114,8 +3196,8 @@ __pyx_v__arg = __pyx_1; __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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; @@ -3134,9 +3216,6 @@ return __pyx_r; } -static PyObject *__pyx_n_loop; -static PyObject *__pyx_n_iter; - static PyObject *__pyx_f_4dnet_3arp___iter__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_f_4dnet_3arp___iter__(PyObject *__pyx_v_self) { PyObject *__pyx_v_l; @@ -3147,13 +3226,13 @@ Py_INCREF(__pyx_v_self); __pyx_v_l = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":752 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":752 */ __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; goto __pyx_L1;} Py_DECREF(__pyx_v_l); __pyx_v_l = __pyx_1; __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":753 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":753 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_loop); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; goto __pyx_L1;} __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n___iter_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; goto __pyx_L1;} __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; goto __pyx_L1;} @@ -3161,21 +3240,15 @@ Py_INCREF(__pyx_v_l); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_l); __pyx_2 = 0; - __pyx_2 = PyObject_Call(__pyx_1, __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":754 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_iter); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; goto __pyx_L1;} - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; goto __pyx_L1;} - Py_INCREF(__pyx_v_l); - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_l); - __pyx_2 = PyObject_Call(__pyx_1, __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_r = __pyx_2; - __pyx_2 = 0; + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":754 */ + __pyx_1 = PyObject_GetIter(__pyx_v_l); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); @@ -3196,21 +3269,13 @@ static void __pyx_f_4dnet_3arp___dealloc__(PyObject *__pyx_v_self) { int __pyx_1; Py_INCREF(__pyx_v_self); - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":757 */ __pyx_1 = (((struct __pyx_obj_4dnet_arp *)__pyx_v_self)->arp != 0); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":758 */ arp_close(((struct __pyx_obj_4dnet_arp *)__pyx_v_self)->arp); goto __pyx_L2; } __pyx_L2:; - goto __pyx_L0; - __pyx_L1:; - __Pyx_AddTraceback("dnet.arp.__dealloc__"); - __pyx_L0:; Py_DECREF(__pyx_v_self); } @@ -3222,7 +3287,7 @@ PyObject *__pyx_v_spa = 0; PyObject *__pyx_v_dha = 0; PyObject *__pyx_v_dpa = 0; - char (__pyx_v_buf[28]); + char __pyx_v_buf[28]; eth_addr_t __pyx_v_sh; eth_addr_t __pyx_v_dh; ip_addr_t __pyx_v_sp; @@ -3231,11 +3296,11 @@ PyObject *__pyx_1 = 0; int __pyx_2; static char *__pyx_argnames[] = {"op","sha","spa","dha","dpa",0}; - __pyx_v_op = __pyx_k44; - __pyx_v_sha = __pyx_k45; - __pyx_v_spa = __pyx_k46; - __pyx_v_dha = __pyx_k47; - __pyx_v_dpa = __pyx_k48; + __pyx_v_op = __pyx_d22; + __pyx_v_sha = __pyx_d23; + __pyx_v_spa = __pyx_d24; + __pyx_v_dha = __pyx_d25; + __pyx_v_dpa = __pyx_d26; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OOOOO", __pyx_argnames, &__pyx_v_op, &__pyx_v_sha, &__pyx_v_spa, &__pyx_v_dha, &__pyx_v_dpa)) return 0; Py_INCREF(__pyx_v_op); Py_INCREF(__pyx_v_sha); @@ -3243,27 +3308,27 @@ Py_INCREF(__pyx_v_dha); Py_INCREF(__pyx_v_dpa); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":775 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":775 */ __pyx_1 = __pyx_f_4dnet___memcpy(__pyx_v_sh.data,__pyx_v_sha,6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":776 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":776 */ __pyx_1 = __pyx_f_4dnet___memcpy(__pyx_v_dh.data,__pyx_v_dha,6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":777 */ - __pyx_1 = __pyx_f_4dnet___memcpy(((char (*))(&__pyx_v_sp)),__pyx_v_spa,4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; goto __pyx_L1;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":777 */ + __pyx_1 = __pyx_f_4dnet___memcpy(((char *)(&__pyx_v_sp)),__pyx_v_spa,4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":778 */ - __pyx_1 = __pyx_f_4dnet___memcpy(((char (*))(&__pyx_v_dp)),__pyx_v_dpa,4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; goto __pyx_L1;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":778 */ + __pyx_1 = __pyx_f_4dnet___memcpy(((char *)(&__pyx_v_dp)),__pyx_v_dpa,4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":779 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} 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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_r = __pyx_1; __pyx_1 = 0; @@ -3287,24 +3352,24 @@ 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 PyObject *__pyx_f_4dnet_icmp_pack_hdr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_type = 0; + PyObject *__pyx_v_type_ = 0; PyObject *__pyx_v_code = 0; - char (__pyx_v_buf[4]); + char __pyx_v_buf[4]; PyObject *__pyx_r; int __pyx_1; int __pyx_2; PyObject *__pyx_3 = 0; - static char *__pyx_argnames[] = {"type","code",0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_type, &__pyx_v_code)) return 0; - Py_INCREF(__pyx_v_type); + static char *__pyx_argnames[] = {"type_","code",0}; + if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_type_, &__pyx_v_code)) return 0; + Py_INCREF(__pyx_v_type_); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} icmp_pack_hdr(__pyx_v_buf,__pyx_1,__pyx_2); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":797 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_r = __pyx_3; __pyx_3 = 0; @@ -3317,7 +3382,7 @@ __Pyx_AddTraceback("dnet.icmp_pack_hdr"); __pyx_r = 0; __pyx_L0:; - Py_DECREF(__pyx_v_type); + Py_DECREF(__pyx_v_type_); Py_DECREF(__pyx_v_code); return __pyx_r; } @@ -3332,7 +3397,7 @@ PyObject *__pyx_v_flags = 0; PyObject *__pyx_v_win = 0; PyObject *__pyx_v_urp = 0; - char (__pyx_v_buf[20]); + char __pyx_v_buf[20]; PyObject *__pyx_r; int __pyx_1; int __pyx_2; @@ -3343,11 +3408,11 @@ int __pyx_7; PyObject *__pyx_8 = 0; static char *__pyx_argnames[] = {"sport","dport","seq","ack","flags","win","urp",0}; - __pyx_v_seq = __pyx_k49; - __pyx_v_ack = __pyx_k50; - __pyx_v_flags = __pyx_k51; - __pyx_v_win = __pyx_k52; - __pyx_v_urp = __pyx_k53; + __pyx_v_seq = __pyx_d27; + __pyx_v_ack = __pyx_d28; + __pyx_v_flags = __pyx_d29; + __pyx_v_win = __pyx_d30; + __pyx_v_urp = __pyx_d31; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|OOOOO", __pyx_argnames, &__pyx_v_sport, &__pyx_v_dport, &__pyx_v_seq, &__pyx_v_ack, &__pyx_v_flags, &__pyx_v_win, &__pyx_v_urp)) return 0; Py_INCREF(__pyx_v_sport); Py_INCREF(__pyx_v_dport); @@ -3357,7 +3422,7 @@ Py_INCREF(__pyx_v_win); Py_INCREF(__pyx_v_urp); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":862 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} @@ -3367,7 +3432,7 @@ __pyx_7 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_r = __pyx_8; __pyx_8 = 0; @@ -3396,26 +3461,26 @@ PyObject *__pyx_v_sport = 0; PyObject *__pyx_v_dport = 0; PyObject *__pyx_v_ulen = 0; - char (__pyx_v_buf[8]); + char __pyx_v_buf[8]; PyObject *__pyx_r; int __pyx_1; int __pyx_2; int __pyx_3; PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"sport","dport","ulen",0}; - __pyx_v_ulen = __pyx_k54; + __pyx_v_ulen = __pyx_d32; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_sport, &__pyx_v_dport, &__pyx_v_ulen)) return 0; Py_INCREF(__pyx_v_sport); Py_INCREF(__pyx_v_dport); Py_INCREF(__pyx_v_ulen); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":883 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} udp_pack_hdr(__pyx_v_buf,__pyx_1,__pyx_2,__pyx_3); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":884 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_r = __pyx_4; __pyx_4 = 0; @@ -3434,17 +3499,7 @@ return __pyx_r; } -static PyObject *__pyx_n_name; -static PyObject *__pyx_n_type; -static PyObject *__pyx_n_flags; -static PyObject *__pyx_n_mtu; -static PyObject *__pyx_n_addr; -static PyObject *__pyx_n_dst_addr; -static PyObject *__pyx_n_link_addr; -static PyObject *__pyx_n_alias_addrs; - - -static PyObject *__pyx_f_4dnet_ifent_to_dict(struct intf_entry (*__pyx_v_entry)) { +static PyObject *__pyx_f_4dnet_ifent_to_dict(struct intf_entry *__pyx_v_entry) { PyObject *__pyx_v_d; PyObject *__pyx_v_l; PyObject *__pyx_v_i; @@ -3460,33 +3515,33 @@ __pyx_v_l = Py_None; Py_INCREF(Py_None); __pyx_v_i = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":926 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":926 */ __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; goto __pyx_L1;} Py_DECREF(__pyx_v_d); __pyx_v_d = __pyx_1; __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":927 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} 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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} 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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} 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; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":930 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":930 */ __pyx_1 = PyLong_FromUnsignedLong(__pyx_v_entry->intf_mtu); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; goto __pyx_L1;} if (PyObject_SetItem(__pyx_v_d, __pyx_n_mtu, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":931 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_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;} @@ -3494,13 +3549,11 @@ 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_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; - __pyx_1 = PyObject_Call(((PyObject*)__pyx_ptype_4dnet_addr), __pyx_2, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; goto __pyx_L1;} + __pyx_1 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; if (PyObject_SetItem(__pyx_v_d, __pyx_n_addr, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; @@ -3508,7 +3561,7 @@ } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":933 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_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;} @@ -3516,13 +3569,11 @@ 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_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; - __pyx_2 = PyObject_Call(((PyObject*)__pyx_ptype_4dnet_addr), __pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; if (PyObject_SetItem(__pyx_v_d, __pyx_n_dst_addr, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; @@ -3530,7 +3581,7 @@ } __pyx_L3:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":935 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_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;} @@ -3538,13 +3589,11 @@ 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_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; - __pyx_1 = PyObject_Call(((PyObject*)__pyx_ptype_4dnet_addr), __pyx_2, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; goto __pyx_L1;} + __pyx_1 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; if (PyObject_SetItem(__pyx_v_d, __pyx_n_link_addr, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; @@ -3552,51 +3601,47 @@ } __pyx_L4:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":937 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":937 */ __pyx_3 = (__pyx_v_entry->intf_alias_num > 0); if (__pyx_3) { - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":938 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":938 */ __pyx_2 = PyList_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; goto __pyx_L1;} Py_DECREF(__pyx_v_l); __pyx_v_l = __pyx_2; __pyx_2 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":939 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} 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_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; - __pyx_1 = PyObject_Call(((PyObject*)__pyx_ptype_4dnet_addr), __pyx_7, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;} + __pyx_1 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), __pyx_7); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;} Py_DECREF(__pyx_7); __pyx_7 = 0; __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; - __pyx_1 = PyObject_Call(__pyx_2, __pyx_7, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;} + __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_7); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_7); __pyx_7 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_L6:; } - __pyx_L7:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":941 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":941 */ if (PyObject_SetItem(__pyx_v_d, __pyx_n_alias_addrs, __pyx_v_l) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; goto __pyx_L1;} goto __pyx_L5; } __pyx_L5:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":942 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":942 */ Py_INCREF(__pyx_v_d); __pyx_r = __pyx_v_d; goto __pyx_L0; @@ -3616,41 +3661,35 @@ return __pyx_r; } -static PyObject *__pyx_n_len; - - -static PyObject *__pyx_f_4dnet_dict_to_ifent(PyObject *__pyx_v_d,struct intf_entry (*__pyx_v_entry)) { +static PyObject *__pyx_f_4dnet_dict_to_ifent(PyObject *__pyx_v_d,struct intf_entry *__pyx_v_entry) { PyObject *__pyx_v_s; PyObject *__pyx_v_i; PyObject *__pyx_r; PyObject *__pyx_1 = 0; - char (*__pyx_2); + char *__pyx_2; int __pyx_3; unsigned short __pyx_4; unsigned int __pyx_5; - PyObject *__pyx_6 = 0; - PyObject *__pyx_7 = 0; - long __pyx_8; - Py_ssize_t __pyx_9; + Py_ssize_t __pyx_6; + long __pyx_7; + PyObject *__pyx_8 = 0; Py_INCREF(__pyx_v_d); __pyx_v_s = Py_None; Py_INCREF(Py_None); __pyx_v_i = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":945 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":945 */ __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_name); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; goto __pyx_L1;} Py_DECREF(__pyx_v_s); __pyx_v_s = __pyx_1; __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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":946 */ + __pyx_2 = PyString_AsString(__pyx_v_s); if (!__pyx_2) {__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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":947 */ __pyx_3 = PySequence_Contains(__pyx_v_d, __pyx_n_flags); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; goto __pyx_L1;} if (__pyx_3) { - - /* "/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;} Py_DECREF(__pyx_1); __pyx_1 = 0; @@ -3659,11 +3698,9 @@ } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":949 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":949 */ __pyx_3 = PySequence_Contains(__pyx_v_d, __pyx_n_mtu); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; goto __pyx_L1;} if (__pyx_3) { - - /* "/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;} Py_DECREF(__pyx_1); __pyx_1 = 0; @@ -3672,11 +3709,9 @@ } __pyx_L3:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":951 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":951 */ __pyx_3 = PySequence_Contains(__pyx_v_d, __pyx_n_addr); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;} if (__pyx_3) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":952 */ __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_addr); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; goto __pyx_L1;} __pyx_v_entry->intf_addr = ((struct __pyx_obj_4dnet_addr *)__pyx_1)->_addr; Py_DECREF(__pyx_1); __pyx_1 = 0; @@ -3684,11 +3719,9 @@ } __pyx_L4:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":953 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":953 */ __pyx_3 = PySequence_Contains(__pyx_v_d, __pyx_n_dst_addr); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; goto __pyx_L1;} if (__pyx_3) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":954 */ __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_dst_addr); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; goto __pyx_L1;} __pyx_v_entry->intf_dst_addr = ((struct __pyx_obj_4dnet_addr *)__pyx_1)->_addr; Py_DECREF(__pyx_1); __pyx_1 = 0; @@ -3696,11 +3729,9 @@ } __pyx_L5:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":955 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":955 */ __pyx_3 = PySequence_Contains(__pyx_v_d, __pyx_n_link_addr); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; goto __pyx_L1;} if (__pyx_3) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":956 */ __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_link_addr); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; goto __pyx_L1;} __pyx_v_entry->intf_link_addr = ((struct __pyx_obj_4dnet_addr *)__pyx_1)->_addr; Py_DECREF(__pyx_1); __pyx_1 = 0; @@ -3708,41 +3739,30 @@ } __pyx_L6:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":957 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":957 */ __pyx_3 = PySequence_Contains(__pyx_v_d, __pyx_n_alias_addrs); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; goto __pyx_L1;} if (__pyx_3) { - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":958 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; goto __pyx_L1;} - __pyx_6 = PyObject_GetItem(__pyx_v_d, __pyx_n_alias_addrs); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; goto __pyx_L1;} - __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_7, 0, __pyx_6); - __pyx_6 = 0; - __pyx_6 = PyObject_Call(__pyx_1, __pyx_7, 0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; goto __pyx_L1;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":958 */ + __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_alias_addrs); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; goto __pyx_L1;} + __pyx_6 = PyObject_Length(__pyx_1); if (__pyx_6 == -1) {__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;} - Py_DECREF(__pyx_6); __pyx_6 = 0; - __pyx_v_entry->intf_alias_num = __pyx_5; + __pyx_v_entry->intf_alias_num = __pyx_6; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":959 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} + for (__pyx_7 = 0; __pyx_7 < __pyx_5; ++__pyx_7) { + __pyx_1 = PyInt_FromLong(__pyx_7); 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; - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":960 */ - __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_v_entry->intf_alias_addrs[__pyx_9]) = ((struct __pyx_obj_4dnet_addr *)__pyx_6)->_addr; - Py_DECREF(__pyx_6); __pyx_6 = 0; - __pyx_L8:; + __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_alias_addrs); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; goto __pyx_L1;} + __pyx_8 = PyObject_GetItem(__pyx_1, __pyx_v_i); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_6 = PyInt_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_6]) = ((struct __pyx_obj_4dnet_addr *)__pyx_8)->_addr; + Py_DECREF(__pyx_8); __pyx_8 = 0; } - __pyx_L9:; goto __pyx_L7; } __pyx_L7:; @@ -3751,8 +3771,7 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_6); - Py_XDECREF(__pyx_7); + Py_XDECREF(__pyx_8); __Pyx_AddTraceback("dnet.dict_to_ifent"); __pyx_r = 0; __pyx_L0:; @@ -3762,64 +3781,60 @@ return __pyx_r; } -static int __pyx_f_4dnet___intf_callback(struct intf_entry (*__pyx_v_entry),void (*__pyx_v_arg)) { +static int __pyx_f_4dnet___intf_callback(struct intf_entry *__pyx_v_entry,void *__pyx_v_arg) { PyObject *__pyx_v_f; PyObject *__pyx_v_a; PyObject *__pyx_v_ret; int __pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; + int __pyx_3; int __pyx_4; - int __pyx_5; __pyx_v_f = Py_None; Py_INCREF(Py_None); __pyx_v_a = Py_None; Py_INCREF(Py_None); __pyx_v_ret = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":963 */ - __pyx_1 = (PyObject *)__pyx_v_arg; - Py_INCREF(__pyx_1); - __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; goto __pyx_L1;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":963 */ + __pyx_1 = PyObject_GetIter(((PyObject *)__pyx_v_arg)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; goto __pyx_L1;} + __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; goto __pyx_L1;} Py_DECREF(__pyx_v_f); __pyx_v_f = __pyx_2; __pyx_2 = 0; - __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; goto __pyx_L1;} + __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; goto __pyx_L1;} Py_DECREF(__pyx_v_a); - __pyx_v_a = __pyx_3; - __pyx_3 = 0; - if (__Pyx_EndUnpack(__pyx_1, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; goto __pyx_L1;} + __pyx_v_a = __pyx_2; + __pyx_2 = 0; + if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":964 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":964 */ __pyx_2 = __pyx_f_4dnet_ifent_to_dict(__pyx_v_entry); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; goto __pyx_L1;} - __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); + __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2); Py_INCREF(__pyx_v_a); - PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_a); + PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_a); __pyx_2 = 0; - __pyx_1 = PyObject_Call(__pyx_v_f, __pyx_3, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_2 = PyObject_CallObject(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_v_ret); - __pyx_v_ret = __pyx_1; - __pyx_1 = 0; - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":965 */ - __pyx_4 = PyObject_IsTrue(__pyx_v_ret); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; goto __pyx_L1;} - __pyx_5 = (!__pyx_4); - if (__pyx_5) { + __pyx_v_ret = __pyx_2; + __pyx_2 = 0; - /* "/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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":965 */ + __pyx_3 = PyObject_IsTrue(__pyx_v_ret); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; goto __pyx_L1;} + __pyx_4 = (!__pyx_3); + if (__pyx_4) { + __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; goto __pyx_L1;} Py_DECREF(__pyx_v_ret); - __pyx_v_ret = __pyx_2; - __pyx_2 = 0; + __pyx_v_ret = __pyx_1; + __pyx_1 = 0; goto __pyx_L2; } __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_r = __pyx_4; + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":967 */ + __pyx_3 = PyInt_AsLong(__pyx_v_ret); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; goto __pyx_L1;} + __pyx_r = __pyx_3; goto __pyx_L0; __pyx_r = 0; @@ -3827,9 +3842,8 @@ __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.__intf_callback"); - __pyx_r = -1; + __pyx_r = (-1); __pyx_L0:; Py_DECREF(__pyx_v_f); Py_DECREF(__pyx_v_a); @@ -3842,24 +3856,19 @@ int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; Py_INCREF(__pyx_v_self); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":977 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":977 */ ((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf = intf_open(); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":978 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":978 */ __pyx_1 = (!(((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf != 0)); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":979 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; goto __pyx_L1;} - __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, __pyx_3, 0); + __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; goto __pyx_L1;} + __Pyx_Raise(PyExc_OSError, __pyx_2, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; goto __pyx_L1;} goto __pyx_L2; } @@ -3869,7 +3878,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.intf.__init__"); __pyx_r = -1; __pyx_L0:; @@ -3881,44 +3889,39 @@ static char __pyx_doc_4dnet_4intf_get[] = "Return the configuration for a network interface as a dict.\n "; static PyObject *__pyx_f_4dnet_4intf_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; - struct intf_entry (*__pyx_v_ifent); - char (__pyx_v_buf[1024]); + struct intf_entry *__pyx_v_ifent; + char __pyx_v_buf[1024]; PyObject *__pyx_r; - char (*__pyx_1); + char *__pyx_1; int __pyx_2; PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"name",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_name)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_name); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":986 */ - __pyx_v_ifent = ((struct intf_entry (*))__pyx_v_buf); + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":986 */ + __pyx_v_ifent = ((struct intf_entry *)__pyx_v_buf); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":987 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":987 */ __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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":988 */ + __pyx_1 = PyString_AsString(__pyx_v_name); if (!__pyx_1) {__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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":989 */ __pyx_2 = (intf_get(((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf,__pyx_v_ifent) < 0); if (__pyx_2) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":990 */ - __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; goto __pyx_L1;} - __pyx_4 = __pyx_f_4dnet___oserror(); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; goto __pyx_L1;} - __Pyx_Raise(__pyx_3, __pyx_4, 0); + __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; goto __pyx_L1;} + __Pyx_Raise(PyExc_OSError, __pyx_3, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":991 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":991 */ __pyx_3 = __pyx_f_4dnet_ifent_to_dict(__pyx_v_ifent); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; goto __pyx_L1;} __pyx_r = __pyx_3; __pyx_3 = 0; @@ -3928,7 +3931,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_3); - Py_XDECREF(__pyx_4); __Pyx_AddTraceback("dnet.intf.get"); __pyx_r = 0; __pyx_L0:; @@ -3941,40 +3943,35 @@ static char __pyx_doc_4dnet_4intf_get_src[] = "Return the configuration for the interface whose primary address\n matches the specified source address.\n "; static PyObject *__pyx_f_4dnet_4intf_get_src(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_4dnet_addr *__pyx_v_src = 0; - struct intf_entry (*__pyx_v_ifent); - char (__pyx_v_buf[1024]); + struct intf_entry *__pyx_v_ifent; + char __pyx_v_buf[1024]; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"src",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_src)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_src); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_4dnet_addr, 1, "src")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;} - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":999 */ - __pyx_v_ifent = ((struct intf_entry (*))__pyx_v_buf); + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":999 */ + __pyx_v_ifent = ((struct intf_entry *)__pyx_v_buf); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1000 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1000 */ __pyx_v_ifent->intf_len = 1024; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1001 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1001 */ __pyx_1 = (intf_get_src(((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf,__pyx_v_ifent,(&__pyx_v_src->_addr)) < 0); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1002 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; goto __pyx_L1;} - __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, __pyx_3, 0); + __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; goto __pyx_L1;} + __Pyx_Raise(PyExc_OSError, __pyx_2, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1003 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1003 */ __pyx_2 = __pyx_f_4dnet_ifent_to_dict(__pyx_v_ifent); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; @@ -3984,7 +3981,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.intf.get_src"); __pyx_r = 0; __pyx_L0:; @@ -3997,40 +3993,35 @@ static char __pyx_doc_4dnet_4intf_get_dst[] = "Return the configuration for the best interface with which to\n reach the specified dst address.\n "; static PyObject *__pyx_f_4dnet_4intf_get_dst(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_4dnet_addr *__pyx_v_dst = 0; - struct intf_entry (*__pyx_v_ifent); - char (__pyx_v_buf[1024]); + struct intf_entry *__pyx_v_ifent; + char __pyx_v_buf[1024]; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"dst",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_dst)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_dst); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dst), __pyx_ptype_4dnet_addr, 1, "dst")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; goto __pyx_L1;} - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1011 */ - __pyx_v_ifent = ((struct intf_entry (*))__pyx_v_buf); + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1011 */ + __pyx_v_ifent = ((struct intf_entry *)__pyx_v_buf); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1012 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1012 */ __pyx_v_ifent->intf_len = 1024; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1013 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1013 */ __pyx_1 = (intf_get_dst(((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf,__pyx_v_ifent,(&__pyx_v_dst->_addr)) < 0); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1014 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; goto __pyx_L1;} - __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, __pyx_3, 0); + __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; goto __pyx_L1;} + __Pyx_Raise(PyExc_OSError, __pyx_2, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1015 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1015 */ __pyx_2 = __pyx_f_4dnet_ifent_to_dict(__pyx_v_ifent); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; @@ -4040,7 +4031,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.intf.get_dst"); __pyx_r = 0; __pyx_L0:; @@ -4053,40 +4043,35 @@ 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); - char (__pyx_v_buf[1024]); + struct intf_entry *__pyx_v_ifent; + char __pyx_v_buf[1024]; PyObject *__pyx_r; PyObject *__pyx_1 = 0; int __pyx_2; - PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"d",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_d)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_d); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1031 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1031 */ memset(__pyx_v_buf,0,(sizeof(__pyx_v_buf))); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1032 */ - __pyx_v_ifent = ((struct intf_entry (*))__pyx_v_buf); + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1032 */ + __pyx_v_ifent = ((struct intf_entry *)__pyx_v_buf); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1033 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1033 */ __pyx_v_ifent->intf_len = 1024; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1034 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1034 */ __pyx_1 = __pyx_f_4dnet_dict_to_ifent(__pyx_v_d,__pyx_v_ifent); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1035 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1035 */ __pyx_2 = (intf_set(((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf,__pyx_v_ifent) < 0); if (__pyx_2) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1036 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; goto __pyx_L1;} - __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; goto __pyx_L1;} - __Pyx_Raise(__pyx_1, __pyx_3, 0); + __pyx_1 = __pyx_f_4dnet___oserror(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; goto __pyx_L1;} + __Pyx_Raise(PyExc_OSError, __pyx_1, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; goto __pyx_L1;} goto __pyx_L2; } @@ -4096,7 +4081,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.intf.set"); __pyx_r = 0; __pyx_L0:; @@ -4114,14 +4098,14 @@ PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"callback","arg",0}; - __pyx_v_arg = __pyx_k55; + __pyx_v_arg = __pyx_d33; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_callback, &__pyx_v_arg)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_callback); Py_INCREF(__pyx_v_arg); __pyx_v__arg = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1048 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1048 */ __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; goto __pyx_L1;} Py_INCREF(__pyx_v_callback); PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_callback); @@ -4131,8 +4115,8 @@ __pyx_v__arg = __pyx_1; __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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; @@ -4161,13 +4145,13 @@ Py_INCREF(__pyx_v_self); __pyx_v_l = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1052 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1052 */ __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; goto __pyx_L1;} Py_DECREF(__pyx_v_l); __pyx_v_l = __pyx_1; __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1053 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1053 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_loop); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; goto __pyx_L1;} __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n___iter_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; goto __pyx_L1;} __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; goto __pyx_L1;} @@ -4175,21 +4159,15 @@ Py_INCREF(__pyx_v_l); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_l); __pyx_2 = 0; - __pyx_2 = PyObject_Call(__pyx_1, __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1054 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_iter); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; goto __pyx_L1;} - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; goto __pyx_L1;} - Py_INCREF(__pyx_v_l); - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_l); - __pyx_2 = PyObject_Call(__pyx_1, __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_r = __pyx_2; - __pyx_2 = 0; + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1054 */ + __pyx_1 = PyObject_GetIter(__pyx_v_l); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); @@ -4210,25 +4188,17 @@ static void __pyx_f_4dnet_4intf___dealloc__(PyObject *__pyx_v_self) { int __pyx_1; Py_INCREF(__pyx_v_self); - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1057 */ __pyx_1 = (((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf != 0); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1058 */ intf_close(((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf); goto __pyx_L2; } __pyx_L2:; - goto __pyx_L0; - __pyx_L1:; - __Pyx_AddTraceback("dnet.intf.__dealloc__"); - __pyx_L0:; Py_DECREF(__pyx_v_self); } -static int __pyx_f_4dnet___route_callback(struct route_entry (*__pyx_v_entry),void (*__pyx_v_arg)) { +static int __pyx_f_4dnet___route_callback(struct route_entry *__pyx_v_entry,void *__pyx_v_arg) { PyObject *__pyx_v_f; PyObject *__pyx_v_a; PyObject *__pyx_v_dst; @@ -4237,72 +4207,64 @@ int __pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; + int __pyx_3; int __pyx_4; - int __pyx_5; __pyx_v_f = Py_None; Py_INCREF(Py_None); __pyx_v_a = Py_None; Py_INCREF(Py_None); __pyx_v_dst = Py_None; Py_INCREF(Py_None); __pyx_v_gw = Py_None; Py_INCREF(Py_None); __pyx_v_ret = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1079 */ - __pyx_1 = (PyObject *)__pyx_v_arg; - Py_INCREF(__pyx_1); - __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; goto __pyx_L1;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1079 */ + __pyx_1 = PyObject_GetIter(((PyObject *)__pyx_v_arg)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; goto __pyx_L1;} + __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; goto __pyx_L1;} Py_DECREF(__pyx_v_f); __pyx_v_f = __pyx_2; __pyx_2 = 0; - __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; goto __pyx_L1;} + __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; goto __pyx_L1;} Py_DECREF(__pyx_v_a); - __pyx_v_a = __pyx_3; - __pyx_3 = 0; - if (__Pyx_EndUnpack(__pyx_1, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; goto __pyx_L1;} + __pyx_v_a = __pyx_2; + __pyx_2 = 0; + if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1080 */ - __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; goto __pyx_L1;} - __pyx_3 = PyObject_Call(((PyObject*)__pyx_ptype_4dnet_addr), __pyx_2, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; goto __pyx_L1;} - __pyx_2 = PyObject_Call(((PyObject*)__pyx_ptype_4dnet_addr), __pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1080 */ + __pyx_2 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; goto __pyx_L1;} + __pyx_1 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; goto __pyx_L1;} Py_DECREF(__pyx_v_dst); - __pyx_v_dst = __pyx_3; - __pyx_3 = 0; - Py_DECREF(__pyx_v_gw); - __pyx_v_gw = __pyx_2; + __pyx_v_dst = __pyx_2; __pyx_2 = 0; + Py_DECREF(__pyx_v_gw); + __pyx_v_gw = __pyx_1; + __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1081 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1081 */ ((struct __pyx_obj_4dnet_addr *)__pyx_v_dst)->_addr = __pyx_v_entry->route_dst; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1082 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1082 */ ((struct __pyx_obj_4dnet_addr *)__pyx_v_gw)->_addr = __pyx_v_entry->route_gw; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1083 */ - __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; goto __pyx_L1;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1083 */ + __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; goto __pyx_L1;} Py_INCREF(__pyx_v_dst); - PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_dst); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_dst); Py_INCREF(__pyx_v_gw); - PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_gw); - __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); + PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_gw); + __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2); Py_INCREF(__pyx_v_a); - PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_a); - __pyx_1 = 0; - __pyx_2 = PyObject_Call(__pyx_v_f, __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_a); + __pyx_2 = 0; + __pyx_2 = PyObject_CallObject(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_v_ret); __pyx_v_ret = __pyx_2; __pyx_2 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1084 */ - __pyx_4 = PyObject_IsTrue(__pyx_v_ret); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; goto __pyx_L1;} - __pyx_5 = (!__pyx_4); - if (__pyx_5) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1085 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1084 */ + __pyx_3 = PyObject_IsTrue(__pyx_v_ret); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; goto __pyx_L1;} + __pyx_4 = (!__pyx_3); + if (__pyx_4) { __pyx_1 = PyInt_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; @@ -4311,9 +4273,9 @@ } __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_r = __pyx_4; + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1086 */ + __pyx_3 = PyInt_AsLong(__pyx_v_ret); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; goto __pyx_L1;} + __pyx_r = __pyx_3; goto __pyx_L0; __pyx_r = 0; @@ -4321,9 +4283,8 @@ __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.__route_callback"); - __pyx_r = -1; + __pyx_r = (-1); __pyx_L0:; Py_DECREF(__pyx_v_f); Py_DECREF(__pyx_v_a); @@ -4338,24 +4299,19 @@ int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; Py_INCREF(__pyx_v_self); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1096 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1096 */ ((struct __pyx_obj_4dnet_route *)__pyx_v_self)->route = route_open(); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1097 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1097 */ __pyx_1 = (!(((struct __pyx_obj_4dnet_route *)__pyx_v_self)->route != 0)); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1098 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; goto __pyx_L1;} - __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, __pyx_3, 0); + __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; goto __pyx_L1;} + __Pyx_Raise(PyExc_OSError, __pyx_2, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; goto __pyx_L1;} goto __pyx_L2; } @@ -4365,7 +4321,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.route.__init__"); __pyx_r = -1; __pyx_L0:; @@ -4382,7 +4337,6 @@ PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"dst","gw",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_dst, &__pyx_v_gw)) return 0; Py_INCREF(__pyx_v_self); @@ -4391,22 +4345,18 @@ if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dst), __pyx_ptype_4dnet_addr, 1, "dst")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; goto __pyx_L1;} if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gw), __pyx_ptype_4dnet_addr, 1, "gw")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; goto __pyx_L1;} - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1108 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1108 */ __pyx_v_entry.route_dst = __pyx_v_dst->_addr; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1109 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1109 */ __pyx_v_entry.route_gw = __pyx_v_gw->_addr; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1110 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1110 */ __pyx_1 = (route_add(((struct __pyx_obj_4dnet_route *)__pyx_v_self)->route,(&__pyx_v_entry)) < 0); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1111 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1111; goto __pyx_L1;} - __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1111; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, __pyx_3, 0); + __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1111; goto __pyx_L1;} + __Pyx_Raise(PyExc_OSError, __pyx_2, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1111; goto __pyx_L1;} goto __pyx_L2; } @@ -4416,7 +4366,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.route.add"); __pyx_r = 0; __pyx_L0:; @@ -4434,26 +4383,21 @@ PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"dst",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_dst)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_dst); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dst), __pyx_ptype_4dnet_addr, 1, "dst")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; goto __pyx_L1;} - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1120 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1120 */ __pyx_v_entry.route_dst = __pyx_v_dst->_addr; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1121 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1121 */ __pyx_1 = (route_delete(((struct __pyx_obj_4dnet_route *)__pyx_v_self)->route,(&__pyx_v_entry)) < 0); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1122 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; goto __pyx_L1;} - __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, __pyx_3, 0); + __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; goto __pyx_L1;} + __Pyx_Raise(PyExc_OSError, __pyx_2, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; goto __pyx_L1;} goto __pyx_L2; } @@ -4463,7 +4407,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.route.delete"); __pyx_r = 0; __pyx_L0:; @@ -4487,19 +4430,17 @@ Py_INCREF(__pyx_v_dst); if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dst), __pyx_ptype_4dnet_addr, 1, "dst")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; goto __pyx_L1;} - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1132 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1132 */ __pyx_v_entry.route_dst = __pyx_v_dst->_addr; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1133 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1133 */ __pyx_1 = (route_get(((struct __pyx_obj_4dnet_route *)__pyx_v_self)->route,(&__pyx_v_entry)) == 0); 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_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; - __pyx_2 = PyObject_Call(((PyObject*)__pyx_ptype_4dnet_addr), __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = __pyx_2; __pyx_2 = 0; @@ -4508,7 +4449,7 @@ } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1135 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1135 */ Py_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; @@ -4535,14 +4476,14 @@ PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"callback","arg",0}; - __pyx_v_arg = __pyx_k56; + __pyx_v_arg = __pyx_d34; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_callback, &__pyx_v_arg)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_callback); Py_INCREF(__pyx_v_arg); __pyx_v__arg = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1147 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1147 */ __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; goto __pyx_L1;} Py_INCREF(__pyx_v_callback); PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_callback); @@ -4552,8 +4493,8 @@ __pyx_v__arg = __pyx_1; __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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; @@ -4582,13 +4523,13 @@ Py_INCREF(__pyx_v_self); __pyx_v_l = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1151 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1151 */ __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; goto __pyx_L1;} Py_DECREF(__pyx_v_l); __pyx_v_l = __pyx_1; __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1152 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1152 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_loop); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; goto __pyx_L1;} __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n___iter_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; goto __pyx_L1;} __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; goto __pyx_L1;} @@ -4596,21 +4537,15 @@ Py_INCREF(__pyx_v_l); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_l); __pyx_2 = 0; - __pyx_2 = PyObject_Call(__pyx_1, __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1153 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_iter); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; goto __pyx_L1;} - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; goto __pyx_L1;} - Py_INCREF(__pyx_v_l); - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_l); - __pyx_2 = PyObject_Call(__pyx_1, __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_r = __pyx_2; - __pyx_2 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1153 */ + __pyx_1 = PyObject_GetIter(__pyx_v_l); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); @@ -4631,35 +4566,17 @@ static void __pyx_f_4dnet_5route___dealloc__(PyObject *__pyx_v_self) { int __pyx_1; Py_INCREF(__pyx_v_self); - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1156 */ __pyx_1 = (((struct __pyx_obj_4dnet_route *)__pyx_v_self)->route != 0); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1157 */ route_close(((struct __pyx_obj_4dnet_route *)__pyx_v_self)->route); goto __pyx_L2; } __pyx_L2:; - goto __pyx_L0; - __pyx_L1:; - __Pyx_AddTraceback("dnet.route.__dealloc__"); - __pyx_L0:; Py_DECREF(__pyx_v_self); } -static PyObject *__pyx_n_device; -static PyObject *__pyx_n_op; -static PyObject *__pyx_n_dir; -static PyObject *__pyx_n_proto; -static PyObject *__pyx_n_src; -static PyObject *__pyx_n_dst; -static PyObject *__pyx_n_sport; -static PyObject *__pyx_n_dport; - - -static PyObject *__pyx_f_4dnet_rule_to_dict(struct fw_rule (*__pyx_v_rule)) { +static PyObject *__pyx_f_4dnet_rule_to_dict(struct fw_rule *__pyx_v_rule) { PyObject *__pyx_v_d; PyObject *__pyx_r; PyObject *__pyx_1 = 0; @@ -4669,32 +4586,30 @@ PyObject *__pyx_5 = 0; __pyx_v_d = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1190 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1190 */ __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; goto __pyx_L1;} Py_DECREF(__pyx_v_d); __pyx_v_d = __pyx_1; __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1191 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} 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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} 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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} 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; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1194 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1194 */ __pyx_2 = (__pyx_v_rule->fw_proto != 0); 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;} 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; @@ -4702,7 +4617,7 @@ } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1196 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_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;} @@ -4710,13 +4625,11 @@ 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_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; - __pyx_1 = PyObject_Call(((PyObject*)__pyx_ptype_4dnet_addr), __pyx_3, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; goto __pyx_L1;} + __pyx_1 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; if (PyObject_SetItem(__pyx_v_d, __pyx_n_src, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; @@ -4724,7 +4637,7 @@ } __pyx_L3:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1198 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_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;} @@ -4732,13 +4645,11 @@ 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_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; - __pyx_3 = PyObject_Call(((PyObject*)__pyx_ptype_4dnet_addr), __pyx_1, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; if (PyObject_SetItem(__pyx_v_d, __pyx_n_dst, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; @@ -4746,15 +4657,13 @@ } __pyx_L4:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1200 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1200 */ __pyx_2 = ((__pyx_v_rule->fw_sport[0]) == 0); if (__pyx_2) { __pyx_2 = ((__pyx_v_rule->fw_sport[1]) == 0); } __pyx_4 = (!__pyx_2); 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_5 = PyList_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; goto __pyx_L1;} @@ -4768,15 +4677,13 @@ } __pyx_L5:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1202 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1202 */ __pyx_2 = ((__pyx_v_rule->fw_dport[0]) == 0); if (__pyx_2) { __pyx_2 = ((__pyx_v_rule->fw_dport[1]) == 0); } __pyx_4 = (!__pyx_2); 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_5 = PyList_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; goto __pyx_L1;} @@ -4790,7 +4697,7 @@ } __pyx_L6:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1204 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1204 */ Py_INCREF(__pyx_v_d); __pyx_r = __pyx_v_d; goto __pyx_L0; @@ -4808,51 +4715,50 @@ return __pyx_r; } - -static PyObject *__pyx_f_4dnet_dict_to_rule(PyObject *__pyx_v_d,struct fw_rule (*__pyx_v_rule)) { +static PyObject *__pyx_f_4dnet_dict_to_rule(PyObject *__pyx_v_d,struct fw_rule *__pyx_v_rule) { PyObject *__pyx_v_s; PyObject *__pyx_r; PyObject *__pyx_1 = 0; - char (*__pyx_2); + char *__pyx_2; int __pyx_3; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; Py_INCREF(__pyx_v_d); __pyx_v_s = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1207 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1207 */ __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_device); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; goto __pyx_L1;} Py_DECREF(__pyx_v_s); __pyx_v_s = __pyx_1; __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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1208 */ + __pyx_2 = PyString_AsString(__pyx_v_s); if (!__pyx_2) {__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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_v_rule->fw_op = __pyx_3; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1210 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_v_rule->fw_dir = __pyx_3; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1211 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1211 */ __pyx_3 = PySequence_Contains(__pyx_v_d, __pyx_n_proto); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; goto __pyx_L1;} if (__pyx_3) { - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1212 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_v_rule->fw_proto = __pyx_3; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1213 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_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;} @@ -4869,10 +4775,10 @@ } if (__pyx_3) { - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1214 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1214 */ (__pyx_v_rule->fw_sport[1]) = 65535; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1215 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1215 */ (__pyx_v_rule->fw_dport[1]) = 65535; goto __pyx_L3; } @@ -4881,11 +4787,9 @@ } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1216 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1216 */ __pyx_3 = PySequence_Contains(__pyx_v_d, __pyx_n_src); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; goto __pyx_L1;} if (__pyx_3) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1217 */ __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_src); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; goto __pyx_L1;} __pyx_v_rule->fw_src = ((struct __pyx_obj_4dnet_addr *)__pyx_1)->_addr; Py_DECREF(__pyx_1); __pyx_1 = 0; @@ -4893,11 +4797,9 @@ } __pyx_L4:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1218 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1218 */ __pyx_3 = PySequence_Contains(__pyx_v_d, __pyx_n_dst); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; goto __pyx_L1;} if (__pyx_3) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1219 */ __pyx_4 = PyObject_GetItem(__pyx_v_d, __pyx_n_dst); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; goto __pyx_L1;} __pyx_v_rule->fw_dst = ((struct __pyx_obj_4dnet_addr *)__pyx_4)->_addr; Py_DECREF(__pyx_4); __pyx_4 = 0; @@ -4905,11 +4807,11 @@ } __pyx_L5:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1220 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1220 */ __pyx_3 = PySequence_Contains(__pyx_v_d, __pyx_n_sport); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1220; goto __pyx_L1;} if (__pyx_3) { - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1221 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_5 = PyObject_GetItem(__pyx_1, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; goto __pyx_L1;} @@ -4919,7 +4821,7 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; (__pyx_v_rule->fw_sport[0]) = __pyx_3; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1222 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_5 = PyObject_GetItem(__pyx_1, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; goto __pyx_L1;} @@ -4932,11 +4834,11 @@ } __pyx_L6:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1223 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1223 */ __pyx_3 = PySequence_Contains(__pyx_v_d, __pyx_n_dport); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; goto __pyx_L1;} if (__pyx_3) { - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1224 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_5 = PyObject_GetItem(__pyx_1, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; goto __pyx_L1;} @@ -4946,7 +4848,7 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; (__pyx_v_rule->fw_dport[0]) = __pyx_3; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1225 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_5 = PyObject_GetItem(__pyx_1, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; goto __pyx_L1;} @@ -4973,64 +4875,60 @@ return __pyx_r; } -static int __pyx_f_4dnet___fw_callback(struct fw_rule (*__pyx_v_rule),void (*__pyx_v_arg)) { +static int __pyx_f_4dnet___fw_callback(struct fw_rule *__pyx_v_rule,void *__pyx_v_arg) { PyObject *__pyx_v_f; PyObject *__pyx_v_a; PyObject *__pyx_v_ret; int __pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; + int __pyx_3; int __pyx_4; - int __pyx_5; __pyx_v_f = Py_None; Py_INCREF(Py_None); __pyx_v_a = Py_None; Py_INCREF(Py_None); __pyx_v_ret = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1228 */ - __pyx_1 = (PyObject *)__pyx_v_arg; - Py_INCREF(__pyx_1); - __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; goto __pyx_L1;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1228 */ + __pyx_1 = PyObject_GetIter(((PyObject *)__pyx_v_arg)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; goto __pyx_L1;} + __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; goto __pyx_L1;} Py_DECREF(__pyx_v_f); __pyx_v_f = __pyx_2; __pyx_2 = 0; - __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; goto __pyx_L1;} + __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; goto __pyx_L1;} Py_DECREF(__pyx_v_a); - __pyx_v_a = __pyx_3; - __pyx_3 = 0; - if (__Pyx_EndUnpack(__pyx_1, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; goto __pyx_L1;} + __pyx_v_a = __pyx_2; + __pyx_2 = 0; + if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1229 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1229 */ __pyx_2 = __pyx_f_4dnet_rule_to_dict(__pyx_v_rule); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; goto __pyx_L1;} - __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); + __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2); Py_INCREF(__pyx_v_a); - PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_a); + PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_a); __pyx_2 = 0; - __pyx_1 = PyObject_Call(__pyx_v_f, __pyx_3, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_2 = PyObject_CallObject(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_v_ret); - __pyx_v_ret = __pyx_1; - __pyx_1 = 0; - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1230 */ - __pyx_4 = PyObject_IsTrue(__pyx_v_ret); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1230; goto __pyx_L1;} - __pyx_5 = (!__pyx_4); - if (__pyx_5) { + __pyx_v_ret = __pyx_2; + __pyx_2 = 0; - /* "/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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1230 */ + __pyx_3 = PyObject_IsTrue(__pyx_v_ret); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1230; goto __pyx_L1;} + __pyx_4 = (!__pyx_3); + if (__pyx_4) { + __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; goto __pyx_L1;} Py_DECREF(__pyx_v_ret); - __pyx_v_ret = __pyx_2; - __pyx_2 = 0; + __pyx_v_ret = __pyx_1; + __pyx_1 = 0; goto __pyx_L2; } __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_r = __pyx_4; + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1232 */ + __pyx_3 = PyInt_AsLong(__pyx_v_ret); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; goto __pyx_L1;} + __pyx_r = __pyx_3; goto __pyx_L0; __pyx_r = 0; @@ -5038,9 +4936,8 @@ __pyx_L1:; Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.__fw_callback"); - __pyx_r = -1; + __pyx_r = (-1); __pyx_L0:; Py_DECREF(__pyx_v_f); Py_DECREF(__pyx_v_a); @@ -5053,24 +4950,19 @@ int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; Py_INCREF(__pyx_v_self); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1242 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1242 */ ((struct __pyx_obj_4dnet_fw *)__pyx_v_self)->fw = fw_open(); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1243 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1243 */ __pyx_1 = (!(((struct __pyx_obj_4dnet_fw *)__pyx_v_self)->fw != 0)); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1244 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; goto __pyx_L1;} - __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, __pyx_3, 0); + __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; goto __pyx_L1;} + __Pyx_Raise(PyExc_OSError, __pyx_2, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; goto __pyx_L1;} goto __pyx_L2; } @@ -5080,7 +4972,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.fw.__init__"); __pyx_r = -1; __pyx_L0:; @@ -5096,29 +4987,24 @@ PyObject *__pyx_r; PyObject *__pyx_1 = 0; int __pyx_2; - PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"d",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_d)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_d); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1260 */ - memset(((char (*))(&__pyx_v_rule)),0,(sizeof(__pyx_v_rule))); + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1260 */ + memset(((char *)(&__pyx_v_rule)),0,(sizeof(__pyx_v_rule))); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1261 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1261 */ __pyx_1 = __pyx_f_4dnet_dict_to_rule(__pyx_v_d,(&__pyx_v_rule)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1262 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1262 */ __pyx_2 = (fw_add(((struct __pyx_obj_4dnet_fw *)__pyx_v_self)->fw,(&__pyx_v_rule)) < 0); if (__pyx_2) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1263 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; goto __pyx_L1;} - __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; goto __pyx_L1;} - __Pyx_Raise(__pyx_1, __pyx_3, 0); + __pyx_1 = __pyx_f_4dnet___oserror(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; goto __pyx_L1;} + __Pyx_Raise(PyExc_OSError, __pyx_1, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; goto __pyx_L1;} goto __pyx_L2; } @@ -5128,7 +5014,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.fw.add"); __pyx_r = 0; __pyx_L0:; @@ -5145,29 +5030,24 @@ PyObject *__pyx_r; PyObject *__pyx_1 = 0; int __pyx_2; - PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"d",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_d)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_d); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1268 */ - memset(((char (*))(&__pyx_v_rule)),0,(sizeof(__pyx_v_rule))); + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1268 */ + memset(((char *)(&__pyx_v_rule)),0,(sizeof(__pyx_v_rule))); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1269 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1269 */ __pyx_1 = __pyx_f_4dnet_dict_to_rule(__pyx_v_d,(&__pyx_v_rule)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1270 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1270 */ __pyx_2 = (fw_delete(((struct __pyx_obj_4dnet_fw *)__pyx_v_self)->fw,(&__pyx_v_rule)) < 0); if (__pyx_2) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1271 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; goto __pyx_L1;} - __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; goto __pyx_L1;} - __Pyx_Raise(__pyx_1, __pyx_3, 0); + __pyx_1 = __pyx_f_4dnet___oserror(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; goto __pyx_L1;} + __Pyx_Raise(PyExc_OSError, __pyx_1, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; goto __pyx_L1;} goto __pyx_L2; } @@ -5177,7 +5057,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.fw.delete"); __pyx_r = 0; __pyx_L0:; @@ -5195,14 +5074,14 @@ PyObject *__pyx_r; PyObject *__pyx_1 = 0; static char *__pyx_argnames[] = {"callback","arg",0}; - __pyx_v_arg = __pyx_k57; + __pyx_v_arg = __pyx_d35; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_callback, &__pyx_v_arg)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_callback); Py_INCREF(__pyx_v_arg); __pyx_v__arg = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1283 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1283 */ __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1283; goto __pyx_L1;} Py_INCREF(__pyx_v_callback); PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_callback); @@ -5212,8 +5091,8 @@ __pyx_v__arg = __pyx_1; __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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; @@ -5242,13 +5121,13 @@ Py_INCREF(__pyx_v_self); __pyx_v_l = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1287 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1287 */ __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; goto __pyx_L1;} Py_DECREF(__pyx_v_l); __pyx_v_l = __pyx_1; __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1288 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1288 */ __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_loop); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; goto __pyx_L1;} __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n___iter_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; goto __pyx_L1;} __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; goto __pyx_L1;} @@ -5256,21 +5135,15 @@ Py_INCREF(__pyx_v_l); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_l); __pyx_2 = 0; - __pyx_2 = PyObject_Call(__pyx_1, __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1289 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_iter); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; goto __pyx_L1;} - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; goto __pyx_L1;} - Py_INCREF(__pyx_v_l); - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_l); - __pyx_2 = PyObject_Call(__pyx_1, __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_r = __pyx_2; - __pyx_2 = 0; + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1289 */ + __pyx_1 = PyObject_GetIter(__pyx_v_l); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); @@ -5291,21 +5164,13 @@ static void __pyx_f_4dnet_2fw___dealloc__(PyObject *__pyx_v_self) { int __pyx_1; Py_INCREF(__pyx_v_self); - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1292 */ __pyx_1 = (((struct __pyx_obj_4dnet_fw *)__pyx_v_self)->fw != 0); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1293 */ fw_close(((struct __pyx_obj_4dnet_fw *)__pyx_v_self)->fw); goto __pyx_L2; } __pyx_L2:; - goto __pyx_L0; - __pyx_L1:; - __Pyx_AddTraceback("dnet.fw.__dealloc__"); - __pyx_L0:; Py_DECREF(__pyx_v_self); } @@ -5314,24 +5179,19 @@ int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; Py_INCREF(__pyx_v_self); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1322 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1322 */ ((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand = rand_open(); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1323 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1323 */ __pyx_1 = (!(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand != 0)); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1324 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; goto __pyx_L1;} - __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, __pyx_3, 0); + __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; goto __pyx_L1;} + __Pyx_Raise(PyExc_OSError, __pyx_2, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; goto __pyx_L1;} goto __pyx_L2; } @@ -5341,7 +5201,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.rand.__init__"); __pyx_r = -1; __pyx_L0:; @@ -5353,8 +5212,8 @@ static char __pyx_doc_4dnet_4rand_get[] = "Return a string of random bytes.\n \n Arguments:\n len -- number of random bytes to generate\n "; static PyObject *__pyx_f_4dnet_4rand_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_len = 0; - char (__pyx_v_buf[1024]); - char (*__pyx_v_p); + char __pyx_v_buf[1024]; + char *__pyx_v_p; PyObject *__pyx_v_s; PyObject *__pyx_r; PyObject *__pyx_1 = 0; @@ -5365,18 +5224,18 @@ Py_INCREF(__pyx_v_len); __pyx_v_s = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1334 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_2 = __pyx_2 <= 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_2) { - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1335 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} rand_get(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand,__pyx_v_buf,__pyx_2); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1336 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_r = __pyx_1; @@ -5386,25 +5245,25 @@ } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1337 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_v_p = malloc(__pyx_2); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1338 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} rand_get(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand,__pyx_v_p,__pyx_2); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1339 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} Py_DECREF(__pyx_v_s); __pyx_v_s = __pyx_1; __pyx_1 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1340 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1340 */ free(__pyx_v_p); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1341 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1341 */ Py_INCREF(__pyx_v_s); __pyx_r = __pyx_v_s; goto __pyx_L0; @@ -5427,14 +5286,12 @@ static PyObject *__pyx_f_4dnet_4rand_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; PyObject *__pyx_r; - char (*__pyx_1); + char *__pyx_1; static char *__pyx_argnames[] = {"buf",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0; Py_INCREF(__pyx_v_self); 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;} + __pyx_1 = PyString_AsString(__pyx_v_buf); if (!__pyx_1) {__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_r = Py_None; Py_INCREF(Py_None); @@ -5453,14 +5310,12 @@ static PyObject *__pyx_f_4dnet_4rand_add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; PyObject *__pyx_r; - char (*__pyx_1); + char *__pyx_1; static char *__pyx_argnames[] = {"buf",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0; Py_INCREF(__pyx_v_self); 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;} + __pyx_1 = PyString_AsString(__pyx_v_buf); if (!__pyx_1) {__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_r = Py_None; Py_INCREF(Py_None); @@ -5482,8 +5337,6 @@ static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1361 */ __pyx_1 = PyLong_FromUnsignedLong(rand_uint8(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; @@ -5508,8 +5361,6 @@ static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1365 */ __pyx_1 = PyLong_FromUnsignedLong(rand_uint16(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; @@ -5534,8 +5385,6 @@ static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1369 */ __pyx_1 = PyLong_FromUnsignedLong(rand_uint32(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1369; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; @@ -5562,18 +5411,14 @@ PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"start","stop",0}; - __pyx_v_stop = __pyx_k58; + __pyx_v_stop = __pyx_d36; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_start, &__pyx_v_stop)) return 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_start); 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;} __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_3 = PyTuple_New(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; goto __pyx_L1;} Py_INCREF(__pyx_v_self); @@ -5582,7 +5427,7 @@ Py_INCREF(__pyx_v_start); PyTuple_SET_ITEM(__pyx_3, 2, __pyx_v_start); __pyx_2 = 0; - __pyx_2 = PyObject_Call(((PyObject*)__pyx_ptype_4dnet___rand_xrange), __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet___rand_xrange), __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = __pyx_2; __pyx_2 = 0; @@ -5590,8 +5435,6 @@ goto __pyx_L2; } /*else*/ { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1380 */ __pyx_3 = PyTuple_New(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; goto __pyx_L1;} Py_INCREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self); @@ -5599,7 +5442,7 @@ PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_start); Py_INCREF(__pyx_v_stop); PyTuple_SET_ITEM(__pyx_3, 2, __pyx_v_stop); - __pyx_2 = PyObject_Call(((PyObject*)__pyx_ptype_4dnet___rand_xrange), __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet___rand_xrange), __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = __pyx_2; __pyx_2 = 0; @@ -5625,30 +5468,16 @@ static void __pyx_f_4dnet_4rand___dealloc__(PyObject *__pyx_v_self) { int __pyx_1; Py_INCREF(__pyx_v_self); - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1383 */ __pyx_1 = (((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand != 0); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1384 */ rand_close(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand); goto __pyx_L2; } __pyx_L2:; - goto __pyx_L0; - __pyx_L1:; - __Pyx_AddTraceback("dnet.rand.__dealloc__"); - __pyx_L0:; Py_DECREF(__pyx_v_self); } -static PyObject *__pyx_k118p; -static PyObject *__pyx_k119p; - -static char (__pyx_k118[]) = "start must be an integer"; -static char (__pyx_k119[]) = "stop must be an integer"; - static int __pyx_f_4dnet_13__rand_xrange___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_4dnet_13__rand_xrange___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_r = 0; @@ -5657,7 +5486,6 @@ unsigned int __pyx_v_bits; int __pyx_r; int __pyx_1; - PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {"r","start","stop",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO", __pyx_argnames, &__pyx_v_r, &__pyx_v_start, &__pyx_v_stop)) return -1; Py_INCREF(__pyx_v_self); @@ -5665,102 +5493,82 @@ Py_INCREF(__pyx_v_start); Py_INCREF(__pyx_v_stop); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1402 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1402 */ ((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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1403 */ __pyx_1 = PyInt_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); goto __pyx_L2; } __pyx_1 = PyLong_Check(__pyx_v_start); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1406 */ ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->start = PyLong_AsUnsignedLong(__pyx_v_start); goto __pyx_L2; } /*else*/ { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1408 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_TypeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, __pyx_k118p, 0); - Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(PyExc_TypeError, __pyx_k49p, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; goto __pyx_L1;} } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1410 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1410 */ __pyx_1 = PyInt_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); goto __pyx_L3; } __pyx_1 = PyLong_Check(__pyx_v_start); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1413 */ ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->max = (PyLong_AsUnsignedLong(__pyx_v_stop) - ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->start); goto __pyx_L3; } /*else*/ { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1415 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_TypeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1415; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, __pyx_k119p, 0); - Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(PyExc_TypeError, __pyx_k50p, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1415; goto __pyx_L1;} } __pyx_L3:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1418 */ - rand_get(((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->rand,((char (*))((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->sbox),(sizeof(((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->sbox))); + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1418 */ + rand_get(((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->rand,((char *)((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->sbox),(sizeof(((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->sbox))); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1420 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1420 */ __pyx_v_bits = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1421 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1421 */ while (1) { - __pyx_L4:; __pyx_1 = (((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->max > (1 << __pyx_v_bits)); if (!__pyx_1) break; - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1422 */ __pyx_v_bits = (__pyx_v_bits + 1); } - __pyx_L5:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1424 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1424 */ ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->left = (__pyx_v_bits / 2); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1425 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1425 */ ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->right = (__pyx_v_bits - ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->left); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1426 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1426 */ ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->mask = ((1 << __pyx_v_bits) - 1); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1428 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1428 */ __pyx_1 = (__pyx_e_4dnet_TEASBOXSIZE < (1 << ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->left)); if (__pyx_1) { - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1429 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1429 */ ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->sboxmask = (__pyx_e_4dnet_TEASBOXSIZE - 1); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1430 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1430 */ ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->kshift = __pyx_e_4dnet_TEASBOXSHIFT; goto __pyx_L6; } /*else*/ { - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1432 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1432 */ ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->sboxmask = ((1 << ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->left) - 1); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1433 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1433 */ ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->kshift = ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->left; } __pyx_L6:; @@ -5768,7 +5576,6 @@ __pyx_r = 0; goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_2); __Pyx_AddTraceback("dnet.__rand_xrange.__init__"); __pyx_r = -1; __pyx_L0:; @@ -5784,20 +5591,16 @@ PyObject *__pyx_r; Py_INCREF(__pyx_v_self); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1436 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1436 */ ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->cur = 0; ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->enc = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1438 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1438 */ Py_INCREF(__pyx_v_self); __pyx_r = __pyx_v_self; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1:; - __Pyx_AddTraceback("dnet.__rand_xrange.__iter__"); - __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; @@ -5807,15 +5610,10 @@ static Py_ssize_t __pyx_f_4dnet_13__rand_xrange___len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; Py_INCREF(__pyx_v_self); - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1441 */ __pyx_r = ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->max; goto __pyx_L0; __pyx_r = 0; - goto __pyx_L0; - __pyx_L1:; - __Pyx_AddTraceback("dnet.__rand_xrange.__len__"); __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; @@ -5828,72 +5626,63 @@ PyObject *__pyx_v_i; PyObject *__pyx_r; int __pyx_1; - PyObject *__pyx_2 = 0; - long __pyx_3; + long __pyx_2; + PyObject *__pyx_3 = 0; Py_INCREF(__pyx_v_self); __pyx_v_i = Py_None; Py_INCREF(Py_None); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1446 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1446 */ __pyx_1 = (((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->cur == ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->max); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1447 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_StopIteration); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, 0, 0); - Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(PyExc_StopIteration, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1448 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1448 */ ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->cur = (((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->cur + 1); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1449 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1449 */ while (1) { - __pyx_L3:; - __pyx_3 = 1; - if (!__pyx_3) break; + __pyx_2 = 1; + if (!__pyx_2) break; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1450 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1450 */ __pyx_v_c = ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->enc; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1451 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1451 */ ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->enc = (((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->enc + 1); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1452 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1452 */ __pyx_v_sum = 0; - /* "/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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1453 */ + for (__pyx_2 = 0+1; __pyx_2 < __pyx_e_4dnet_TEAROUNDS; ++__pyx_2) { + __pyx_3 = PyInt_FromLong(__pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1453; goto __pyx_L1;} Py_DECREF(__pyx_v_i); - __pyx_v_i = __pyx_2; - __pyx_2 = 0; + __pyx_v_i = __pyx_3; + __pyx_3 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1454 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1454 */ __pyx_v_sum = (__pyx_v_sum + __pyx_e_4dnet_TEADELTA); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1455 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1455 */ __pyx_v_c = (__pyx_v_c ^ ((((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->sbox[((__pyx_v_c ^ __pyx_v_sum) & ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->sboxmask)]) << ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->kshift)); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1456 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1456 */ __pyx_v_c = (__pyx_v_c + __pyx_v_sum); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1457 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1457 */ __pyx_v_c = (__pyx_v_c & ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->mask); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1458 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1458 */ __pyx_v_c = (((__pyx_v_c << ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->left) | (__pyx_v_c >> ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->right)) & ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->mask); - __pyx_L5:; } - __pyx_L6:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1459 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1459 */ __pyx_1 = (__pyx_v_c < ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->max); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1460 */ goto __pyx_L4; goto __pyx_L7; } @@ -5901,16 +5690,16 @@ } __pyx_L4:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1461 */ - __pyx_2 = PyLong_FromUnsignedLong((((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->start + __pyx_v_c)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1461; goto __pyx_L1;} - __pyx_r = __pyx_2; - __pyx_2 = 0; + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1461 */ + __pyx_3 = PyLong_FromUnsignedLong((((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->start + __pyx_v_c)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1461; goto __pyx_L1;} + __pyx_r = __pyx_3; + __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_2); + Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.__rand_xrange.__next__"); __pyx_r = 0; __pyx_L0:; @@ -5927,9 +5716,8 @@ int __pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {"src","dst","mtu",0}; - __pyx_v_mtu = __pyx_k59; + __pyx_v_mtu = __pyx_d37; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_src, &__pyx_v_dst, &__pyx_v_mtu)) return -1; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_src); @@ -5938,30 +5726,26 @@ if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_4dnet_addr, 1, "src")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; goto __pyx_L1;} 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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} ((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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} ((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->mtu = __pyx_1; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1493 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1493 */ __pyx_1 = (!(((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun != 0)); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1494 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; goto __pyx_L1;} - __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, __pyx_3, 0); + __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; goto __pyx_L1;} + __Pyx_Raise(PyExc_OSError, __pyx_2, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1495 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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;} ((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->buf = malloc(__pyx_1); @@ -5969,7 +5753,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.tun.__init__"); __pyx_r = -1; __pyx_L0:; @@ -5985,8 +5768,6 @@ PyObject *__pyx_r; PyObject *__pyx_1 = 0; 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_r = __pyx_1; __pyx_1 = 0; @@ -6008,8 +5789,6 @@ PyObject *__pyx_r; PyObject *__pyx_1 = 0; 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_r = __pyx_1; __pyx_1 = 0; @@ -6034,8 +5813,6 @@ static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; 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_r = __pyx_1; __pyx_1 = 0; @@ -6057,15 +5834,13 @@ static PyObject *__pyx_f_4dnet_3tun_send(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_pkt = 0; PyObject *__pyx_r; - char (*__pyx_1); + char *__pyx_1; PyObject *__pyx_2 = 0; static char *__pyx_argnames[] = {"pkt",0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pkt)) return 0; Py_INCREF(__pyx_v_self); 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_1 = PyString_AsString(__pyx_v_pkt); if (!__pyx_1) {__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_r = __pyx_2; __pyx_2 = 0; @@ -6090,30 +5865,25 @@ PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1523 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1523 */ __pyx_v_n = tun_recv(((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun,((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->buf,((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->mtu); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1524 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1524 */ __pyx_1 = (__pyx_v_n < 0); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1525 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; goto __pyx_L1;} - __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, __pyx_3, 0); + __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; goto __pyx_L1;} + __Pyx_Raise(PyExc_OSError, __pyx_2, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1526 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/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_r = __pyx_2; __pyx_2 = 0; @@ -6123,7 +5893,6 @@ goto __pyx_L0; __pyx_L1:; Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); __Pyx_AddTraceback("dnet.tun.recv"); __pyx_r = 0; __pyx_L0:; @@ -6137,16 +5906,9 @@ static char *__pyx_argnames[] = {0}; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1529 */ ((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun = tun_close(((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun); __pyx_r = Py_None; Py_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1:; - __Pyx_AddTraceback("dnet.tun.close"); - __pyx_r = 0; - __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; } @@ -6156,255 +5918,32 @@ int __pyx_1; Py_INCREF(__pyx_v_self); - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1532 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1532 */ __pyx_1 = (((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->buf != 0); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1533 */ free(((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->buf); goto __pyx_L2; } __pyx_L2:; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1534 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1534 */ __pyx_1 = (((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun != 0); if (__pyx_1) { - - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1535 */ tun_close(((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun); goto __pyx_L3; } __pyx_L3:; - goto __pyx_L0; - __pyx_L1:; - __Pyx_AddTraceback("dnet.tun.__dealloc__"); - __pyx_L0:; Py_DECREF(__pyx_v_self); } -static __Pyx_InternTabEntry __pyx_intern_tab[] = { - {&__pyx_n_ADDR_TYPE_ETH, "ADDR_TYPE_ETH"}, - {&__pyx_n_ADDR_TYPE_IP, "ADDR_TYPE_IP"}, - {&__pyx_n_ADDR_TYPE_IP6, "ADDR_TYPE_IP6"}, - {&__pyx_n_ADDR_TYPE_NONE, "ADDR_TYPE_NONE"}, - {&__pyx_n_ARP_ETHIP_LEN, "ARP_ETHIP_LEN"}, - {&__pyx_n_ARP_HDR_LEN, "ARP_HDR_LEN"}, - {&__pyx_n_ARP_HRD_ETH, "ARP_HRD_ETH"}, - {&__pyx_n_ARP_HRD_IEEE802, "ARP_HRD_IEEE802"}, - {&__pyx_n_ARP_OP_REPLY, "ARP_OP_REPLY"}, - {&__pyx_n_ARP_OP_REQUEST, "ARP_OP_REQUEST"}, - {&__pyx_n_ARP_OP_REVREPLY, "ARP_OP_REVREPLY"}, - {&__pyx_n_ARP_OP_REVREQUEST, "ARP_OP_REVREQUEST"}, - {&__pyx_n_ARP_PRO_IP, "ARP_PRO_IP"}, - {&__pyx_n_BSD, "BSD"}, - {&__pyx_n_ETH_ADDR_BITS, "ETH_ADDR_BITS"}, - {&__pyx_n_ETH_ADDR_BROADCAST, "ETH_ADDR_BROADCAST"}, - {&__pyx_n_ETH_ADDR_LEN, "ETH_ADDR_LEN"}, - {&__pyx_n_ETH_ADDR_UNSPEC, "ETH_ADDR_UNSPEC"}, - {&__pyx_n_ETH_CRC_LEN, "ETH_CRC_LEN"}, - {&__pyx_n_ETH_HDR_LEN, "ETH_HDR_LEN"}, - {&__pyx_n_ETH_LEN_MAX, "ETH_LEN_MAX"}, - {&__pyx_n_ETH_LEN_MIN, "ETH_LEN_MIN"}, - {&__pyx_n_ETH_MIN, "ETH_MIN"}, - {&__pyx_n_ETH_MTU, "ETH_MTU"}, - {&__pyx_n_ETH_TYPE_8021Q, "ETH_TYPE_8021Q"}, - {&__pyx_n_ETH_TYPE_ARP, "ETH_TYPE_ARP"}, - {&__pyx_n_ETH_TYPE_IP, "ETH_TYPE_IP"}, - {&__pyx_n_ETH_TYPE_IPV6, "ETH_TYPE_IPV6"}, - {&__pyx_n_ETH_TYPE_LEN, "ETH_TYPE_LEN"}, - {&__pyx_n_ETH_TYPE_LOOPBACK, "ETH_TYPE_LOOPBACK"}, - {&__pyx_n_ETH_TYPE_MPLS, "ETH_TYPE_MPLS"}, - {&__pyx_n_ETH_TYPE_MPLS_MCAST, "ETH_TYPE_MPLS_MCAST"}, - {&__pyx_n_ETH_TYPE_PPPOE, "ETH_TYPE_PPPOE"}, - {&__pyx_n_ETH_TYPE_PPPOEDISC, "ETH_TYPE_PPPOEDISC"}, - {&__pyx_n_ETH_TYPE_PUP, "ETH_TYPE_PUP"}, - {&__pyx_n_ETH_TYPE_REVARP, "ETH_TYPE_REVARP"}, - {&__pyx_n_FW_DIR_IN, "FW_DIR_IN"}, - {&__pyx_n_FW_DIR_OUT, "FW_DIR_OUT"}, - {&__pyx_n_FW_OP_ALLOW, "FW_OP_ALLOW"}, - {&__pyx_n_FW_OP_BLOCK, "FW_OP_BLOCK"}, - {&__pyx_n_INTF_FLAG_BROADCAST, "INTF_FLAG_BROADCAST"}, - {&__pyx_n_INTF_FLAG_LOOPBACK, "INTF_FLAG_LOOPBACK"}, - {&__pyx_n_INTF_FLAG_MULTICAST, "INTF_FLAG_MULTICAST"}, - {&__pyx_n_INTF_FLAG_NOARP, "INTF_FLAG_NOARP"}, - {&__pyx_n_INTF_FLAG_POINTOPOINT, "INTF_FLAG_POINTOPOINT"}, - {&__pyx_n_INTF_FLAG_UP, "INTF_FLAG_UP"}, - {&__pyx_n_INTF_TYPE_ETH, "INTF_TYPE_ETH"}, - {&__pyx_n_INTF_TYPE_LOOPBACK, "INTF_TYPE_LOOPBACK"}, - {&__pyx_n_INTF_TYPE_OTHER, "INTF_TYPE_OTHER"}, - {&__pyx_n_INTF_TYPE_TUN, "INTF_TYPE_TUN"}, - {&__pyx_n_IP6_ADDR_BITS, "IP6_ADDR_BITS"}, - {&__pyx_n_IP6_ADDR_LEN, "IP6_ADDR_LEN"}, - {&__pyx_n_IP6_ADDR_LOOPBACK, "IP6_ADDR_LOOPBACK"}, - {&__pyx_n_IP6_ADDR_UNSPEC, "IP6_ADDR_UNSPEC"}, - {&__pyx_n_IP6_HDR_LEN, "IP6_HDR_LEN"}, - {&__pyx_n_IP6_HLIM_DEFAULT, "IP6_HLIM_DEFAULT"}, - {&__pyx_n_IP6_HLIM_MAX, "IP6_HLIM_MAX"}, - {&__pyx_n_IP6_LEN_MAX, "IP6_LEN_MAX"}, - {&__pyx_n_IP6_LEN_MIN, "IP6_LEN_MIN"}, - {&__pyx_n_IP6_MTU_MIN, "IP6_MTU_MIN"}, - {&__pyx_n_IP_ADDR_ANY, "IP_ADDR_ANY"}, - {&__pyx_n_IP_ADDR_BITS, "IP_ADDR_BITS"}, - {&__pyx_n_IP_ADDR_BROADCAST, "IP_ADDR_BROADCAST"}, - {&__pyx_n_IP_ADDR_LEN, "IP_ADDR_LEN"}, - {&__pyx_n_IP_ADDR_LOOPBACK, "IP_ADDR_LOOPBACK"}, - {&__pyx_n_IP_ADDR_MCAST_ALL, "IP_ADDR_MCAST_ALL"}, - {&__pyx_n_IP_ADDR_MCAST_LOCAL, "IP_ADDR_MCAST_LOCAL"}, - {&__pyx_n_IP_DF, "IP_DF"}, - {&__pyx_n_IP_HDR_LEN, "IP_HDR_LEN"}, - {&__pyx_n_IP_HDR_LEN_MAX, "IP_HDR_LEN_MAX"}, - {&__pyx_n_IP_LEN_MAX, "IP_LEN_MAX"}, - {&__pyx_n_IP_LEN_MIN, "IP_LEN_MIN"}, - {&__pyx_n_IP_MF, "IP_MF"}, - {&__pyx_n_IP_OFFMASK, "IP_OFFMASK"}, - {&__pyx_n_IP_OPT_LEN, "IP_OPT_LEN"}, - {&__pyx_n_IP_OPT_LEN_MAX, "IP_OPT_LEN_MAX"}, - {&__pyx_n_IP_PROTO_AH, "IP_PROTO_AH"}, - {&__pyx_n_IP_PROTO_ESP, "IP_PROTO_ESP"}, - {&__pyx_n_IP_PROTO_GRE, "IP_PROTO_GRE"}, - {&__pyx_n_IP_PROTO_ICMP, "IP_PROTO_ICMP"}, - {&__pyx_n_IP_PROTO_ICMPV6, "IP_PROTO_ICMPV6"}, - {&__pyx_n_IP_PROTO_IGMP, "IP_PROTO_IGMP"}, - {&__pyx_n_IP_PROTO_IP, "IP_PROTO_IP"}, - {&__pyx_n_IP_PROTO_IPV6, "IP_PROTO_IPV6"}, - {&__pyx_n_IP_PROTO_MAX, "IP_PROTO_MAX"}, - {&__pyx_n_IP_PROTO_RAW, "IP_PROTO_RAW"}, - {&__pyx_n_IP_PROTO_RESERVED, "IP_PROTO_RESERVED"}, - {&__pyx_n_IP_PROTO_TCP, "IP_PROTO_TCP"}, - {&__pyx_n_IP_PROTO_UDP, "IP_PROTO_UDP"}, - {&__pyx_n_IP_RF, "IP_RF"}, - {&__pyx_n_IP_TOS_DEFAULT, "IP_TOS_DEFAULT"}, - {&__pyx_n_IP_TTL_DEFAULT, "IP_TTL_DEFAULT"}, - {&__pyx_n_IP_TTL_MAX, "IP_TTL_MAX"}, - {&__pyx_n_NotImplementedError, "NotImplementedError"}, - {&__pyx_n_OSError, "OSError"}, - {&__pyx_n_OverflowError, "OverflowError"}, - {&__pyx_n_StopIteration, "StopIteration"}, - {&__pyx_n_TCP_HDR_LEN, "TCP_HDR_LEN"}, - {&__pyx_n_TCP_OPT_ALTSUM, "TCP_OPT_ALTSUM"}, - {&__pyx_n_TCP_OPT_ALTSUMDATA, "TCP_OPT_ALTSUMDATA"}, - {&__pyx_n_TCP_OPT_BUBBA, "TCP_OPT_BUBBA"}, - {&__pyx_n_TCP_OPT_CC, "TCP_OPT_CC"}, - {&__pyx_n_TCP_OPT_CCECHO, "TCP_OPT_CCECHO"}, - {&__pyx_n_TCP_OPT_CCNEW, "TCP_OPT_CCNEW"}, - {&__pyx_n_TCP_OPT_CORRUPT, "TCP_OPT_CORRUPT"}, - {&__pyx_n_TCP_OPT_ECHO, "TCP_OPT_ECHO"}, - {&__pyx_n_TCP_OPT_ECHOREPLY, "TCP_OPT_ECHOREPLY"}, - {&__pyx_n_TCP_OPT_EOL, "TCP_OPT_EOL"}, - {&__pyx_n_TCP_OPT_MAX, "TCP_OPT_MAX"}, - {&__pyx_n_TCP_OPT_MD5, "TCP_OPT_MD5"}, - {&__pyx_n_TCP_OPT_MSS, "TCP_OPT_MSS"}, - {&__pyx_n_TCP_OPT_NOP, "TCP_OPT_NOP"}, - {&__pyx_n_TCP_OPT_POCONN, "TCP_OPT_POCONN"}, - {&__pyx_n_TCP_OPT_POSVC, "TCP_OPT_POSVC"}, - {&__pyx_n_TCP_OPT_REC, "TCP_OPT_REC"}, - {&__pyx_n_TCP_OPT_SACK, "TCP_OPT_SACK"}, - {&__pyx_n_TCP_OPT_SACKOK, "TCP_OPT_SACKOK"}, - {&__pyx_n_TCP_OPT_SCPS, "TCP_OPT_SCPS"}, - {&__pyx_n_TCP_OPT_SKEETER, "TCP_OPT_SKEETER"}, - {&__pyx_n_TCP_OPT_SNACK, "TCP_OPT_SNACK"}, - {&__pyx_n_TCP_OPT_SNAP, "TCP_OPT_SNAP"}, - {&__pyx_n_TCP_OPT_TCPCOMP, "TCP_OPT_TCPCOMP"}, - {&__pyx_n_TCP_OPT_TIMESTAMP, "TCP_OPT_TIMESTAMP"}, - {&__pyx_n_TCP_OPT_TRAILSUM, "TCP_OPT_TRAILSUM"}, - {&__pyx_n_TCP_OPT_WSCALE, "TCP_OPT_WSCALE"}, - {&__pyx_n_TCP_PORT_MAX, "TCP_PORT_MAX"}, - {&__pyx_n_TCP_WIN_MAX, "TCP_WIN_MAX"}, - {&__pyx_n_TH_ACK, "TH_ACK"}, - {&__pyx_n_TH_CWR, "TH_CWR"}, - {&__pyx_n_TH_ECE, "TH_ECE"}, - {&__pyx_n_TH_FIN, "TH_FIN"}, - {&__pyx_n_TH_PUSH, "TH_PUSH"}, - {&__pyx_n_TH_RST, "TH_RST"}, - {&__pyx_n_TH_SYN, "TH_SYN"}, - {&__pyx_n_TH_URG, "TH_URG"}, - {&__pyx_n_TypeError, "TypeError"}, - {&__pyx_n_UDP_HDR_LEN, "UDP_HDR_LEN"}, - {&__pyx_n_UDP_PORT_MAX, "UDP_PORT_MAX"}, - {&__pyx_n_ValueError, "ValueError"}, - {&__pyx_n___author__, "__author__"}, - {&__pyx_n___copy__, "__copy__"}, - {&__pyx_n___copyright__, "__copyright__"}, - {&__pyx_n___int__, "__int__"}, - {&__pyx_n___iter_append, "__iter_append"}, - {&__pyx_n___license__, "__license__"}, - {&__pyx_n___url__, "__url__"}, - {&__pyx_n___version__, "__version__"}, - {&__pyx_n_addr, "addr"}, - {&__pyx_n_alias_addrs, "alias_addrs"}, - {&__pyx_n_append, "append"}, - {&__pyx_n_arp_pack_hdr_ethip, "arp_pack_hdr_ethip"}, - {&__pyx_n_device, "device"}, - {&__pyx_n_dir, "dir"}, - {&__pyx_n_dport, "dport"}, - {&__pyx_n_dst, "dst"}, - {&__pyx_n_dst_addr, "dst_addr"}, - {&__pyx_n_eth, "eth"}, - {&__pyx_n_eth_aton, "eth_aton"}, - {&__pyx_n_eth_ntoa, "eth_ntoa"}, - {&__pyx_n_eth_pack_hdr, "eth_pack_hdr"}, - {&__pyx_n_flags, "flags"}, - {&__pyx_n_icmp_pack_hdr, "icmp_pack_hdr"}, - {&__pyx_n_ip, "ip"}, - {&__pyx_n_ip6, "ip6"}, - {&__pyx_n_ip6_aton, "ip6_aton"}, - {&__pyx_n_ip6_checksum, "ip6_checksum"}, - {&__pyx_n_ip6_ntoa, "ip6_ntoa"}, - {&__pyx_n_ip6_pack_hdr, "ip6_pack_hdr"}, - {&__pyx_n_ip_aton, "ip_aton"}, - {&__pyx_n_ip_checksum, "ip_checksum"}, - {&__pyx_n_ip_cksum_add, "ip_cksum_add"}, - {&__pyx_n_ip_cksum_carry, "ip_cksum_carry"}, - {&__pyx_n_ip_ntoa, "ip_ntoa"}, - {&__pyx_n_ip_pack_hdr, "ip_pack_hdr"}, - {&__pyx_n_iter, "iter"}, - {&__pyx_n_len, "len"}, - {&__pyx_n_link_addr, "link_addr"}, - {&__pyx_n_loop, "loop"}, - {&__pyx_n_mtu, "mtu"}, - {&__pyx_n_name, "name"}, - {&__pyx_n_op, "op"}, - {&__pyx_n_proto, "proto"}, - {&__pyx_n_sport, "sport"}, - {&__pyx_n_src, "src"}, - {&__pyx_n_tcp_pack_hdr, "tcp_pack_hdr"}, - {&__pyx_n_type, "type"}, - {&__pyx_n_udp_pack_hdr, "udp_pack_hdr"}, - {0, 0} -}; - -static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_k9p, __pyx_k9, sizeof(__pyx_k9)}, - {&__pyx_k10p, __pyx_k10, sizeof(__pyx_k10)}, - {&__pyx_k12p, __pyx_k12, sizeof(__pyx_k12)}, - {&__pyx_k13p, __pyx_k13, sizeof(__pyx_k13)}, - {&__pyx_k60p, __pyx_k60, sizeof(__pyx_k60)}, - {&__pyx_k61p, __pyx_k61, sizeof(__pyx_k61)}, - {&__pyx_k62p, __pyx_k62, sizeof(__pyx_k62)}, - {&__pyx_k63p, __pyx_k63, sizeof(__pyx_k63)}, - {&__pyx_k64p, __pyx_k64, sizeof(__pyx_k64)}, - {&__pyx_k65p, __pyx_k65, sizeof(__pyx_k65)}, - {&__pyx_k66p, __pyx_k66, sizeof(__pyx_k66)}, - {&__pyx_k67p, __pyx_k67, sizeof(__pyx_k67)}, - {&__pyx_k68p, __pyx_k68, sizeof(__pyx_k68)}, - {&__pyx_k69p, __pyx_k69, sizeof(__pyx_k69)}, - {&__pyx_k70p, __pyx_k70, sizeof(__pyx_k70)}, - {&__pyx_k71p, __pyx_k71, sizeof(__pyx_k71)}, - {&__pyx_k72p, __pyx_k72, sizeof(__pyx_k72)}, - {&__pyx_k118p, __pyx_k118, sizeof(__pyx_k118)}, - {&__pyx_k119p, __pyx_k119, sizeof(__pyx_k119)}, - {0, 0, 0} -}; - static PyObject *__pyx_tp_new_4dnet_eth(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); - struct __pyx_obj_4dnet_eth *p = (struct __pyx_obj_4dnet_eth *)o; + if (!o) return 0; return o; } static void __pyx_tp_dealloc_4dnet_eth(PyObject *o) { - struct __pyx_obj_4dnet_eth *p = (struct __pyx_obj_4dnet_eth *)o; { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); @@ -6417,17 +5956,6 @@ (*o->ob_type->tp_free)(o); } -static int __pyx_tp_traverse_4dnet_eth(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4dnet_eth *p = (struct __pyx_obj_4dnet_eth *)o; - return 0; -} - -static int __pyx_tp_clear_4dnet_eth(PyObject *o) { - struct __pyx_obj_4dnet_eth *p = (struct __pyx_obj_4dnet_eth *)o; - return 0; -} - static struct PyMethodDef __pyx_methods_4dnet_eth[] = { {"get", (PyCFunction)__pyx_f_4dnet_3eth_get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_3eth_get}, {"set", (PyCFunction)__pyx_f_4dnet_3eth_set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_3eth_set}, @@ -6474,6 +6002,9 @@ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ + #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX + 0, /*nb_index*/ + #endif }; static PySequenceMethods __pyx_tp_as_sequence_eth = { @@ -6523,10 +6054,10 @@ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_eth, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "eth(device) -> Ethernet device object\n\n Open the specified Ethernet device for sending.\n ", /*tp_doc*/ - __pyx_tp_traverse_4dnet_eth, /*tp_traverse*/ - __pyx_tp_clear_4dnet_eth, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ @@ -6553,12 +6084,11 @@ static PyObject *__pyx_tp_new_4dnet_ip(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); - struct __pyx_obj_4dnet_ip *p = (struct __pyx_obj_4dnet_ip *)o; + if (!o) return 0; return o; } static void __pyx_tp_dealloc_4dnet_ip(PyObject *o) { - struct __pyx_obj_4dnet_ip *p = (struct __pyx_obj_4dnet_ip *)o; { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); @@ -6571,17 +6101,6 @@ (*o->ob_type->tp_free)(o); } -static int __pyx_tp_traverse_4dnet_ip(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4dnet_ip *p = (struct __pyx_obj_4dnet_ip *)o; - return 0; -} - -static int __pyx_tp_clear_4dnet_ip(PyObject *o) { - struct __pyx_obj_4dnet_ip *p = (struct __pyx_obj_4dnet_ip *)o; - return 0; -} - static struct PyMethodDef __pyx_methods_4dnet_ip[] = { {"send", (PyCFunction)__pyx_f_4dnet_2ip_send, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_2ip_send}, {0, 0, 0, 0} @@ -6626,6 +6145,9 @@ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ + #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX + 0, /*nb_index*/ + #endif }; static PySequenceMethods __pyx_tp_as_sequence_ip = { @@ -6675,10 +6197,10 @@ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_ip, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "ip() -> Raw IP object\n\n Open a raw IP socket for sending.\n ", /*tp_doc*/ - __pyx_tp_traverse_4dnet_ip, /*tp_traverse*/ - __pyx_tp_clear_4dnet_ip, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ @@ -6705,26 +6227,14 @@ static PyObject *__pyx_tp_new_4dnet_addr(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); - struct __pyx_obj_4dnet_addr *p = (struct __pyx_obj_4dnet_addr *)o; + if (!o) return 0; return o; } static void __pyx_tp_dealloc_4dnet_addr(PyObject *o) { - struct __pyx_obj_4dnet_addr *p = (struct __pyx_obj_4dnet_addr *)o; (*o->ob_type->tp_free)(o); } -static int __pyx_tp_traverse_4dnet_addr(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4dnet_addr *p = (struct __pyx_obj_4dnet_addr *)o; - return 0; -} - -static int __pyx_tp_clear_4dnet_addr(PyObject *o) { - struct __pyx_obj_4dnet_addr *p = (struct __pyx_obj_4dnet_addr *)o; - return 0; -} - static PyObject *__pyx_getprop_4dnet_4addr_type(PyObject *o, void *x) { return __pyx_f_4dnet_4addr_4type___get__(o); } @@ -6807,12 +6317,12 @@ }; static struct PyGetSetDef __pyx_getsets_4dnet_addr[] = { - {"type", __pyx_getprop_4dnet_4addr_type, __pyx_setprop_4dnet_4addr_type, __pyx_k1, 0}, - {"bits", __pyx_getprop_4dnet_4addr_bits, __pyx_setprop_4dnet_4addr_bits, __pyx_k2, 0}, - {"data", __pyx_getprop_4dnet_4addr_data, 0, __pyx_k3, 0}, - {"eth", __pyx_getprop_4dnet_4addr_eth, __pyx_setprop_4dnet_4addr_eth, __pyx_k4, 0}, - {"ip", __pyx_getprop_4dnet_4addr_ip, __pyx_setprop_4dnet_4addr_ip, __pyx_k5, 0}, - {"ip6", __pyx_getprop_4dnet_4addr_ip6, __pyx_setprop_4dnet_4addr_ip6, __pyx_k6, 0}, + {"type", __pyx_getprop_4dnet_4addr_type, __pyx_setprop_4dnet_4addr_type, __pyx_k51, 0}, + {"bits", __pyx_getprop_4dnet_4addr_bits, __pyx_setprop_4dnet_4addr_bits, __pyx_k52, 0}, + {"data", __pyx_getprop_4dnet_4addr_data, 0, __pyx_k53, 0}, + {"eth", __pyx_getprop_4dnet_4addr_eth, __pyx_setprop_4dnet_4addr_eth, __pyx_k54, 0}, + {"ip", __pyx_getprop_4dnet_4addr_ip, __pyx_setprop_4dnet_4addr_ip, __pyx_k55, 0}, + {"ip6", __pyx_getprop_4dnet_4addr_ip6, __pyx_setprop_4dnet_4addr_ip6, __pyx_k56, 0}, {0, 0, 0, 0, 0} }; @@ -6855,6 +6365,9 @@ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ + #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX + 0, /*nb_index*/ + #endif }; static PySequenceMethods __pyx_tp_as_sequence_addr = { @@ -6904,10 +6417,10 @@ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_addr, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "addr(addrtxt=None, type=ADDR_TYPE_NONE) -> network address object\n\n Create a network address object, optionally initialized from a\n human-readable Ethernet, IP, or IPv6 address string.\n ", /*tp_doc*/ - __pyx_tp_traverse_4dnet_addr, /*tp_traverse*/ - __pyx_tp_clear_4dnet_addr, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ __pyx_f_4dnet_4addr___iter__, /*tp_iter*/ @@ -6934,26 +6447,14 @@ static PyObject *__pyx_tp_new_4dnet___addr_ip4_iter(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); - struct __pyx_obj_4dnet___addr_ip4_iter *p = (struct __pyx_obj_4dnet___addr_ip4_iter *)o; + if (!o) return 0; return o; } static void __pyx_tp_dealloc_4dnet___addr_ip4_iter(PyObject *o) { - struct __pyx_obj_4dnet___addr_ip4_iter *p = (struct __pyx_obj_4dnet___addr_ip4_iter *)o; (*o->ob_type->tp_free)(o); } -static int __pyx_tp_traverse_4dnet___addr_ip4_iter(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4dnet___addr_ip4_iter *p = (struct __pyx_obj_4dnet___addr_ip4_iter *)o; - return 0; -} - -static int __pyx_tp_clear_4dnet___addr_ip4_iter(PyObject *o) { - struct __pyx_obj_4dnet___addr_ip4_iter *p = (struct __pyx_obj_4dnet___addr_ip4_iter *)o; - return 0; -} - static struct PyMethodDef __pyx_methods_4dnet___addr_ip4_iter[] = { {0, 0, 0, 0} }; @@ -6997,6 +6498,9 @@ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ + #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX + 0, /*nb_index*/ + #endif }; static PySequenceMethods __pyx_tp_as_sequence___addr_ip4_iter = { @@ -7046,10 +6550,10 @@ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer___addr_ip4_iter, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_4dnet___addr_ip4_iter, /*tp_traverse*/ - __pyx_tp_clear_4dnet___addr_ip4_iter, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ @@ -7076,12 +6580,11 @@ static PyObject *__pyx_tp_new_4dnet_arp(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); - struct __pyx_obj_4dnet_arp *p = (struct __pyx_obj_4dnet_arp *)o; + if (!o) return 0; return o; } static void __pyx_tp_dealloc_4dnet_arp(PyObject *o) { - struct __pyx_obj_4dnet_arp *p = (struct __pyx_obj_4dnet_arp *)o; { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); @@ -7094,17 +6597,6 @@ (*o->ob_type->tp_free)(o); } -static int __pyx_tp_traverse_4dnet_arp(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4dnet_arp *p = (struct __pyx_obj_4dnet_arp *)o; - return 0; -} - -static int __pyx_tp_clear_4dnet_arp(PyObject *o) { - struct __pyx_obj_4dnet_arp *p = (struct __pyx_obj_4dnet_arp *)o; - return 0; -} - static struct PyMethodDef __pyx_methods_4dnet_arp[] = { {"add", (PyCFunction)__pyx_f_4dnet_3arp_add, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_3arp_add}, {"delete", (PyCFunction)__pyx_f_4dnet_3arp_delete, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_3arp_delete}, @@ -7152,6 +6644,9 @@ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ + #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX + 0, /*nb_index*/ + #endif }; static PySequenceMethods __pyx_tp_as_sequence_arp = { @@ -7201,10 +6696,10 @@ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_arp, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "arp() -> ARP table object\n\n Open a handle to the system ARP table.\n ", /*tp_doc*/ - __pyx_tp_traverse_4dnet_arp, /*tp_traverse*/ - __pyx_tp_clear_4dnet_arp, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ __pyx_f_4dnet_3arp___iter__, /*tp_iter*/ @@ -7231,12 +6726,11 @@ static PyObject *__pyx_tp_new_4dnet_intf(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); - struct __pyx_obj_4dnet_intf *p = (struct __pyx_obj_4dnet_intf *)o; + if (!o) return 0; return o; } static void __pyx_tp_dealloc_4dnet_intf(PyObject *o) { - struct __pyx_obj_4dnet_intf *p = (struct __pyx_obj_4dnet_intf *)o; { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); @@ -7249,17 +6743,6 @@ (*o->ob_type->tp_free)(o); } -static int __pyx_tp_traverse_4dnet_intf(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4dnet_intf *p = (struct __pyx_obj_4dnet_intf *)o; - return 0; -} - -static int __pyx_tp_clear_4dnet_intf(PyObject *o) { - struct __pyx_obj_4dnet_intf *p = (struct __pyx_obj_4dnet_intf *)o; - return 0; -} - static struct PyMethodDef __pyx_methods_4dnet_intf[] = { {"get", (PyCFunction)__pyx_f_4dnet_4intf_get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_4intf_get}, {"get_src", (PyCFunction)__pyx_f_4dnet_4intf_get_src, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_4intf_get_src}, @@ -7308,6 +6791,9 @@ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ + #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX + 0, /*nb_index*/ + #endif }; static PySequenceMethods __pyx_tp_as_sequence_intf = { @@ -7357,10 +6843,10 @@ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_intf, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "intf() -> Interface table object\n\n Open a handle to the system network interface table.\n ", /*tp_doc*/ - __pyx_tp_traverse_4dnet_intf, /*tp_traverse*/ - __pyx_tp_clear_4dnet_intf, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ __pyx_f_4dnet_4intf___iter__, /*tp_iter*/ @@ -7387,12 +6873,11 @@ static PyObject *__pyx_tp_new_4dnet_route(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); - struct __pyx_obj_4dnet_route *p = (struct __pyx_obj_4dnet_route *)o; + if (!o) return 0; return o; } static void __pyx_tp_dealloc_4dnet_route(PyObject *o) { - struct __pyx_obj_4dnet_route *p = (struct __pyx_obj_4dnet_route *)o; { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); @@ -7405,17 +6890,6 @@ (*o->ob_type->tp_free)(o); } -static int __pyx_tp_traverse_4dnet_route(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4dnet_route *p = (struct __pyx_obj_4dnet_route *)o; - return 0; -} - -static int __pyx_tp_clear_4dnet_route(PyObject *o) { - struct __pyx_obj_4dnet_route *p = (struct __pyx_obj_4dnet_route *)o; - return 0; -} - static struct PyMethodDef __pyx_methods_4dnet_route[] = { {"add", (PyCFunction)__pyx_f_4dnet_5route_add, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_5route_add}, {"delete", (PyCFunction)__pyx_f_4dnet_5route_delete, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_5route_delete}, @@ -7463,6 +6937,9 @@ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ + #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX + 0, /*nb_index*/ + #endif }; static PySequenceMethods __pyx_tp_as_sequence_route = { @@ -7512,10 +6989,10 @@ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_route, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "route() -> Routing table object\n\n Open a handle to the system routing table.\n ", /*tp_doc*/ - __pyx_tp_traverse_4dnet_route, /*tp_traverse*/ - __pyx_tp_clear_4dnet_route, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ __pyx_f_4dnet_5route___iter__, /*tp_iter*/ @@ -7542,12 +7019,11 @@ static PyObject *__pyx_tp_new_4dnet_fw(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); - struct __pyx_obj_4dnet_fw *p = (struct __pyx_obj_4dnet_fw *)o; + if (!o) return 0; return o; } static void __pyx_tp_dealloc_4dnet_fw(PyObject *o) { - struct __pyx_obj_4dnet_fw *p = (struct __pyx_obj_4dnet_fw *)o; { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); @@ -7560,17 +7036,6 @@ (*o->ob_type->tp_free)(o); } -static int __pyx_tp_traverse_4dnet_fw(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4dnet_fw *p = (struct __pyx_obj_4dnet_fw *)o; - return 0; -} - -static int __pyx_tp_clear_4dnet_fw(PyObject *o) { - struct __pyx_obj_4dnet_fw *p = (struct __pyx_obj_4dnet_fw *)o; - return 0; -} - static struct PyMethodDef __pyx_methods_4dnet_fw[] = { {"add", (PyCFunction)__pyx_f_4dnet_2fw_add, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_2fw_add}, {"delete", (PyCFunction)__pyx_f_4dnet_2fw_delete, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_2fw_delete}, @@ -7617,6 +7082,9 @@ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ + #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX + 0, /*nb_index*/ + #endif }; static PySequenceMethods __pyx_tp_as_sequence_fw = { @@ -7666,10 +7134,10 @@ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_fw, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "fw() -> Firewall ruleset object\n \n Open a handle to the local network firewall configuration.\n ", /*tp_doc*/ - __pyx_tp_traverse_4dnet_fw, /*tp_traverse*/ - __pyx_tp_clear_4dnet_fw, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ __pyx_f_4dnet_2fw___iter__, /*tp_iter*/ @@ -7696,12 +7164,11 @@ static PyObject *__pyx_tp_new_4dnet_rand(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); - struct __pyx_obj_4dnet_rand *p = (struct __pyx_obj_4dnet_rand *)o; + if (!o) return 0; return o; } static void __pyx_tp_dealloc_4dnet_rand(PyObject *o) { - struct __pyx_obj_4dnet_rand *p = (struct __pyx_obj_4dnet_rand *)o; { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); @@ -7714,17 +7181,6 @@ (*o->ob_type->tp_free)(o); } -static int __pyx_tp_traverse_4dnet_rand(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4dnet_rand *p = (struct __pyx_obj_4dnet_rand *)o; - return 0; -} - -static int __pyx_tp_clear_4dnet_rand(PyObject *o) { - struct __pyx_obj_4dnet_rand *p = (struct __pyx_obj_4dnet_rand *)o; - return 0; -} - static struct PyMethodDef __pyx_methods_4dnet_rand[] = { {"get", (PyCFunction)__pyx_f_4dnet_4rand_get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_4rand_get}, {"set", (PyCFunction)__pyx_f_4dnet_4rand_set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_4rand_set}, @@ -7775,6 +7231,9 @@ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ + #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX + 0, /*nb_index*/ + #endif }; static PySequenceMethods __pyx_tp_as_sequence_rand = { @@ -7824,10 +7283,10 @@ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_rand, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "rand() -> Pseudo-random number generator\n\n Obtain a handle for fast, cryptographically strong pseudo-random\n number generation. The starting seed is derived from the system\n random data source device (if one exists), or from the current time\n and random stack contents.\n ", /*tp_doc*/ - __pyx_tp_traverse_4dnet_rand, /*tp_traverse*/ - __pyx_tp_clear_4dnet_rand, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ @@ -7854,26 +7313,14 @@ static PyObject *__pyx_tp_new_4dnet___rand_xrange(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); - struct __pyx_obj_4dnet___rand_xrange *p = (struct __pyx_obj_4dnet___rand_xrange *)o; + if (!o) return 0; return o; } static void __pyx_tp_dealloc_4dnet___rand_xrange(PyObject *o) { - struct __pyx_obj_4dnet___rand_xrange *p = (struct __pyx_obj_4dnet___rand_xrange *)o; (*o->ob_type->tp_free)(o); } -static int __pyx_tp_traverse_4dnet___rand_xrange(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4dnet___rand_xrange *p = (struct __pyx_obj_4dnet___rand_xrange *)o; - return 0; -} - -static int __pyx_tp_clear_4dnet___rand_xrange(PyObject *o) { - struct __pyx_obj_4dnet___rand_xrange *p = (struct __pyx_obj_4dnet___rand_xrange *)o; - return 0; -} - static struct PyMethodDef __pyx_methods_4dnet___rand_xrange[] = { {0, 0, 0, 0} }; @@ -7917,6 +7364,9 @@ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ + #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX + 0, /*nb_index*/ + #endif }; static PySequenceMethods __pyx_tp_as_sequence___rand_xrange = { @@ -7966,10 +7416,10 @@ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer___rand_xrange, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_4dnet___rand_xrange, /*tp_traverse*/ - __pyx_tp_clear_4dnet___rand_xrange, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ __pyx_f_4dnet_13__rand_xrange___iter__, /*tp_iter*/ @@ -7996,12 +7446,11 @@ static PyObject *__pyx_tp_new_4dnet_tun(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (*t->tp_alloc)(t, 0); - struct __pyx_obj_4dnet_tun *p = (struct __pyx_obj_4dnet_tun *)o; + if (!o) return 0; return o; } static void __pyx_tp_dealloc_4dnet_tun(PyObject *o) { - struct __pyx_obj_4dnet_tun *p = (struct __pyx_obj_4dnet_tun *)o; { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); @@ -8014,17 +7463,6 @@ (*o->ob_type->tp_free)(o); } -static int __pyx_tp_traverse_4dnet_tun(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4dnet_tun *p = (struct __pyx_obj_4dnet_tun *)o; - return 0; -} - -static int __pyx_tp_clear_4dnet_tun(PyObject *o) { - struct __pyx_obj_4dnet_tun *p = (struct __pyx_obj_4dnet_tun *)o; - return 0; -} - static PyObject *__pyx_getprop_4dnet_3tun_name(PyObject *o, void *x) { return __pyx_f_4dnet_3tun_4name___get__(o); } @@ -8042,8 +7480,8 @@ }; static struct PyGetSetDef __pyx_getsets_4dnet_tun[] = { - {"name", __pyx_getprop_4dnet_3tun_name, 0, __pyx_k7, 0}, - {"fd", __pyx_getprop_4dnet_3tun_fd, 0, __pyx_k8, 0}, + {"name", __pyx_getprop_4dnet_3tun_name, 0, __pyx_k57, 0}, + {"fd", __pyx_getprop_4dnet_3tun_fd, 0, __pyx_k58, 0}, {0, 0, 0, 0, 0} }; @@ -8086,6 +7524,9 @@ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ + #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX + 0, /*nb_index*/ + #endif }; static PySequenceMethods __pyx_tp_as_sequence_tun = { @@ -8135,10 +7576,10 @@ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_tun, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "tun(src, dst[, mtu]) -> Network tunnel interface handle\n \n Obtain a handle to a network tunnel interface, to which packets\n destined for dst are delivered (with source addresses rewritten to\n src), where they may be read by a userland process and processed\n as desired. Packets written back to the handle are injected into\n the kernel networking subsystem.\n ", /*tp_doc*/ - __pyx_tp_traverse_4dnet_tun, /*tp_traverse*/ - __pyx_tp_clear_4dnet_tun, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ @@ -8223,10 +7664,10 @@ __pyx_init_filenames(); __pyx_m = Py_InitModule4("dnet", __pyx_methods, __pyx_mdoc, 0, PYTHON_API_VERSION); if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; goto __pyx_L1;}; + Py_INCREF(__pyx_m); __pyx_b = PyImport_AddModule("__builtin__"); if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; goto __pyx_L1;}; if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; goto __pyx_L1;}; - if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; goto __pyx_L1;}; if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; goto __pyx_L1;}; if (PyType_Ready(&__pyx_type_4dnet_eth) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;} if (PyObject_SetAttrString(__pyx_m, "eth", (PyObject *)&__pyx_type_4dnet_eth) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;} @@ -8262,57 +7703,57 @@ if (PyObject_SetAttrString(__pyx_m, "tun", (PyObject *)&__pyx_type_4dnet_tun) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1477; goto __pyx_L1;} __pyx_ptype_4dnet_tun = &__pyx_type_4dnet_tun; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":15 */ - if (PyObject_SetAttr(__pyx_m, __pyx_n___author__, __pyx_k9p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; goto __pyx_L1;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":15 */ + if (PyObject_SetAttr(__pyx_m, __pyx_n___author__, __pyx_k59p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; goto __pyx_L1;} - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":16 */ - if (PyObject_SetAttr(__pyx_m, __pyx_n___copyright__, __pyx_k10p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":16 */ + if (PyObject_SetAttr(__pyx_m, __pyx_n___copyright__, __pyx_k61p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":17 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":17 */ if (PyObject_SetAttr(__pyx_m, __pyx_n___license__, __pyx_n_BSD) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":18 */ - if (PyObject_SetAttr(__pyx_m, __pyx_n___url__, __pyx_k12p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":18 */ + if (PyObject_SetAttr(__pyx_m, __pyx_n___url__, __pyx_k65p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;} - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":19 */ - if (PyObject_SetAttr(__pyx_m, __pyx_n___version__, __pyx_k13p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; goto __pyx_L1;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":19 */ + if (PyObject_SetAttr(__pyx_m, __pyx_n___version__, __pyx_k67p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; goto __pyx_L1;} - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":75 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":75 */ __pyx_1 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":76 */ __pyx_1 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":77 */ __pyx_1 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":78 */ __pyx_1 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":79 */ __pyx_1 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":81 */ __pyx_1 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":82 */ __pyx_1 = PyInt_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; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":84 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":84 */ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_ETH_LEN_MAX); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; goto __pyx_L1;} __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_ETH_HDR_LEN); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; goto __pyx_L1;} __pyx_3 = PyNumber_Subtract(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; goto __pyx_L1;} @@ -8325,7 +7766,7 @@ if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_MTU, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":85 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":85 */ __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_ETH_LEN_MIN); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;} __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_ETH_HDR_LEN); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;} __pyx_2 = PyNumber_Subtract(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;} @@ -8338,108 +7779,108 @@ if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_MIN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;} 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":87 */ + __pyx_2 = PyInt_FromLong(0x0200); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":88 */ + __pyx_3 = PyInt_FromLong(0x0800); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":89 */ + __pyx_1 = PyInt_FromLong(0x0806); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":90 */ + __pyx_2 = PyInt_FromLong(0x8035); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":91 */ + __pyx_3 = PyInt_FromLong(0x8100); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":92 */ + __pyx_1 = PyInt_FromLong(0x86DD); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":93 */ + __pyx_2 = PyInt_FromLong(0x8847); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":94 */ + __pyx_3 = PyInt_FromLong(0x8848); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":95 */ + __pyx_1 = PyInt_FromLong(0x8863); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":96 */ + __pyx_2 = PyInt_FromLong(0x8864); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":97 */ + __pyx_3 = PyInt_FromLong(0x9000); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":99 */ + __pyx_1 = PyString_FromStringAndSize(__pyx_k87,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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":100 */ + __pyx_2 = PyString_FromStringAndSize(__pyx_k89,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; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":162 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":162 */ __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_ETH_ADDR_BROADCAST); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; goto __pyx_L1;} - __pyx_k16 = __pyx_3; + __pyx_d1 = __pyx_3; __pyx_3 = 0; __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_ETH_ADDR_BROADCAST); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; goto __pyx_L1;} - __pyx_k17 = __pyx_1; + __pyx_d2 = __pyx_1; __pyx_1 = 0; __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_ETH_TYPE_IP); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; goto __pyx_L1;} - __pyx_k18 = __pyx_2; + __pyx_d3 = __pyx_2; __pyx_2 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":199 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":199 */ __pyx_4 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":200 */ __pyx_4 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":202 */ __pyx_4 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":203 */ __pyx_4 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":204 */ __pyx_4 = PyInt_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; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":205 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":205 */ __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_IP_HDR_LEN); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;} __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_IP_OPT_LEN_MAX); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;} __pyx_6 = PyNumber_Add(__pyx_4, __pyx_5); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;} @@ -8448,647 +7889,647 @@ if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_HDR_LEN_MAX, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":207 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":207 */ __pyx_4 = PyInt_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; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":208 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":208 */ __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_IP_HDR_LEN); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_LEN_MIN, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; goto __pyx_L1;} 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":210 */ + __pyx_6 = PyInt_FromLong(0x00); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":212 */ + __pyx_4 = PyInt_FromLong(0x8000); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":213 */ + __pyx_5 = PyInt_FromLong(0x4000); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":214 */ + __pyx_6 = PyInt_FromLong(0x2000); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":215 */ + __pyx_4 = PyInt_FromLong(0x1fff); 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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":217 */ __pyx_5 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":218 */ __pyx_6 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":220 */ __pyx_4 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":221 */ __pyx_5 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":222 */ __pyx_6 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":223 */ __pyx_4 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":224 */ __pyx_5 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":225 */ __pyx_6 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":226 */ __pyx_4 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":227 */ __pyx_5 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":228 */ __pyx_6 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":229 */ __pyx_4 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":230 */ __pyx_5 = PyInt_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; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":231 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":231 */ __pyx_6 = __Pyx_GetName(__pyx_m, __pyx_n_IP_PROTO_RAW); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_RESERVED, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":232 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":232 */ __pyx_4 = PyInt_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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":234 */ + __pyx_5 = PyString_FromStringAndSize(__pyx_k115,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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":235 */ + __pyx_6 = PyString_FromStringAndSize(__pyx_k117,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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":236 */ + __pyx_4 = PyString_FromStringAndSize(__pyx_k119,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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":237 */ + __pyx_5 = PyString_FromStringAndSize(__pyx_k121,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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":238 */ + __pyx_6 = PyString_FromStringAndSize(__pyx_k123,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; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":320 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":320 */ __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_IP_TOS_DEFAULT); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; goto __pyx_L1;} - __pyx_k24 = __pyx_4; + __pyx_d4 = __pyx_4; __pyx_4 = 0; __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_d5 = __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_k26 = __pyx_6; + __pyx_d6 = __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_k27 = __pyx_7; + __pyx_d7 = __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;} - __pyx_k28 = __pyx_8; + __pyx_d8 = __pyx_8; __pyx_8 = 0; __pyx_9 = __Pyx_GetName(__pyx_m, __pyx_n_IP_PROTO_IP); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; goto __pyx_L1;} - __pyx_k29 = __pyx_9; + __pyx_d9 = __pyx_9; __pyx_9 = 0; __pyx_10 = __Pyx_GetName(__pyx_m, __pyx_n_IP_ADDR_ANY); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; goto __pyx_L1;} - __pyx_k30 = __pyx_10; + __pyx_d10 = __pyx_10; __pyx_10 = 0; __pyx_11 = __Pyx_GetName(__pyx_m, __pyx_n_IP_ADDR_ANY); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; goto __pyx_L1;} - __pyx_k31 = __pyx_11; + __pyx_d11 = __pyx_11; __pyx_11 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":355 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":355 */ __pyx_12 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":356 */ __pyx_12 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":358 */ __pyx_12 = PyInt_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; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":359 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":359 */ __pyx_12 = __Pyx_GetName(__pyx_m, __pyx_n_IP6_HDR_LEN); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; goto __pyx_L1;} if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_LEN_MIN, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; goto __pyx_L1;} Py_DECREF(__pyx_12); __pyx_12 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":360 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":360 */ __pyx_12 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":362 */ __pyx_12 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":364 */ __pyx_12 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":365 */ __pyx_12 = PyInt_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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":367 */ + __pyx_12 = PyString_FromStringAndSize(__pyx_k131,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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":368 */ + __pyx_12 = PyString_FromStringAndSize(__pyx_k133,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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":395 */ __pyx_12 = PyInt_FromLong(0); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L1;} - __pyx_k34 = __pyx_12; + __pyx_d12 = __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_k35 = __pyx_13; + __pyx_d13 = __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_k36 = __pyx_14; + __pyx_d14 = __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;} - __pyx_k37 = __pyx_15; + __pyx_d15 = __pyx_15; __pyx_15 = 0; __pyx_16 = __Pyx_GetName(__pyx_m, __pyx_n_IP6_HLIM_DEFAULT); if (!__pyx_16) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L1;} - __pyx_k38 = __pyx_16; + __pyx_d16 = __pyx_16; __pyx_16 = 0; __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n_IP6_ADDR_UNSPEC); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; goto __pyx_L1;} - __pyx_k39 = __pyx_17; + __pyx_d17 = __pyx_17; __pyx_17 = 0; __pyx_18 = __Pyx_GetName(__pyx_m, __pyx_n_IP6_ADDR_UNSPEC); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; goto __pyx_L1;} - __pyx_k40 = __pyx_18; + __pyx_d18 = __pyx_18; __pyx_18 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":431 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":431 */ __pyx_19 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":432 */ __pyx_19 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":433 */ __pyx_19 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":434 */ __pyx_19 = PyInt_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; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":444 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":444 */ Py_INCREF(Py_None); - __pyx_k41 = Py_None; + __pyx_d19 = Py_None; __pyx_19 = __Pyx_GetName(__pyx_m, __pyx_n_ADDR_TYPE_NONE); if (!__pyx_19) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; goto __pyx_L1;} - __pyx_k42 = __pyx_19; + __pyx_d20 = __pyx_19; __pyx_19 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":666 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":666 */ __pyx_20 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":667 */ __pyx_20 = PyInt_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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":669 */ + __pyx_20 = PyInt_FromLong(0x0001); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":670 */ + __pyx_20 = PyInt_FromLong(0x0006); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":672 */ + __pyx_20 = PyInt_FromLong(0x0800); 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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":674 */ __pyx_20 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":675 */ __pyx_20 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":676 */ __pyx_20 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":677 */ __pyx_20 = PyInt_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; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":738 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":738 */ Py_INCREF(Py_None); - __pyx_k43 = Py_None; + __pyx_d21 = Py_None; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":760 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":760 */ __pyx_20 = __Pyx_GetName(__pyx_m, __pyx_n_ARP_OP_REQUEST); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; goto __pyx_L1;} - __pyx_k44 = __pyx_20; + __pyx_d22 = __pyx_20; __pyx_20 = 0; __pyx_21 = __Pyx_GetName(__pyx_m, __pyx_n_ETH_ADDR_UNSPEC); if (!__pyx_21) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; goto __pyx_L1;} - __pyx_k45 = __pyx_21; + __pyx_d23 = __pyx_21; __pyx_21 = 0; __pyx_22 = __Pyx_GetName(__pyx_m, __pyx_n_IP_ADDR_ANY); if (!__pyx_22) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; goto __pyx_L1;} - __pyx_k46 = __pyx_22; + __pyx_d24 = __pyx_22; __pyx_22 = 0; __pyx_23 = __Pyx_GetName(__pyx_m, __pyx_n_ETH_ADDR_UNSPEC); if (!__pyx_23) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; goto __pyx_L1;} - __pyx_k47 = __pyx_23; + __pyx_d25 = __pyx_23; __pyx_23 = 0; __pyx_24 = __Pyx_GetName(__pyx_m, __pyx_n_IP_ADDR_ANY); if (!__pyx_24) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; goto __pyx_L1;} - __pyx_k48 = __pyx_24; + __pyx_d26 = __pyx_24; __pyx_24 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":806 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":806 */ __pyx_25 = PyInt_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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":808 */ + __pyx_25 = PyInt_FromLong(0x01); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":809 */ + __pyx_25 = PyInt_FromLong(0x02); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":810 */ + __pyx_25 = PyInt_FromLong(0x04); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":811 */ + __pyx_25 = PyInt_FromLong(0x08); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":812 */ + __pyx_25 = PyInt_FromLong(0x10); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":813 */ + __pyx_25 = PyInt_FromLong(0x20); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":814 */ + __pyx_25 = PyInt_FromLong(0x40); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":815 */ + __pyx_25 = PyInt_FromLong(0x80); 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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":817 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":818 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":820 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":821 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":822 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":823 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":824 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":825 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":826 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":827 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":828 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":829 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":830 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":831 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":832 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":833 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":834 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":835 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":836 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":837 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":838 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":839 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":840 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":841 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":842 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":843 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":844 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":845 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":846 */ __pyx_25 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":848 */ __pyx_25 = PyInt_FromLong(1); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; goto __pyx_L1;} - __pyx_k49 = __pyx_25; + __pyx_d27 = __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_k50 = __pyx_26; + __pyx_d28 = __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;} - __pyx_k51 = __pyx_27; + __pyx_d29 = __pyx_27; __pyx_27 = 0; __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_d30 = __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_k53 = __pyx_29; + __pyx_d31 = __pyx_29; __pyx_29 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":871 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":871 */ __pyx_30 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":872 */ __pyx_30 = PyInt_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; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":874 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":874 */ __pyx_30 = __Pyx_GetName(__pyx_m, __pyx_n_UDP_HDR_LEN); if (!__pyx_30) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; goto __pyx_L1;} - __pyx_k54 = __pyx_30; + __pyx_d32 = __pyx_30; __pyx_30 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":913 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":913 */ __pyx_31 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":914 */ __pyx_31 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":915 */ __pyx_31 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":916 */ __pyx_31 = PyInt_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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":918 */ + __pyx_31 = PyInt_FromLong(0x01); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":919 */ + __pyx_31 = PyInt_FromLong(0x02); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":920 */ + __pyx_31 = PyInt_FromLong(0x04); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":921 */ + __pyx_31 = PyInt_FromLong(0x08); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":922 */ + __pyx_31 = PyInt_FromLong(0x10); 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;} + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":923 */ + __pyx_31 = PyInt_FromLong(0x20); 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; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1038 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1038 */ Py_INCREF(Py_None); - __pyx_k55 = Py_None; + __pyx_d33 = Py_None; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1137 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1137 */ Py_INCREF(Py_None); - __pyx_k56 = Py_None; + __pyx_d34 = Py_None; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1183 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1183 */ __pyx_31 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1184 */ __pyx_31 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1186 */ __pyx_31 = PyInt_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 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1187 */ __pyx_31 = PyInt_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; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1273 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1273 */ Py_INCREF(Py_None); - __pyx_k57 = Py_None; + __pyx_d35 = Py_None; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1371 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1371 */ Py_INCREF(Py_None); - __pyx_k58 = Py_None; + __pyx_d36 = Py_None; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1490 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1490 */ __pyx_31 = PyInt_FromLong(1500); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; goto __pyx_L1;} - __pyx_k59 = __pyx_31; + __pyx_d37 = __pyx_31; __pyx_31 = 0; - /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1531 */ + /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1531 */ return; __pyx_L1:; Py_XDECREF(__pyx_1); @@ -9135,102 +8576,52 @@ __pyx_f = __pyx_filenames; } -static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name) { - if (!type) { - PyErr_Format(PyExc_SystemError, "Missing type object"); - return 0; - } - if ((none_allowed && obj == Py_None) || PyObject_TypeCheck(obj, type)) - return 1; - PyErr_Format(PyExc_TypeError, - "Argument '%s' has incorrect type (expected %s, got %s)", - name, type->tp_name, obj->ob_type->tp_name); - return 0; -} - -static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) { - PyObject *result; - result = PyObject_GetAttr(dict, name); - if (!result) - PyErr_SetObject(PyExc_NameError, name); - return result; -} - static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { + if (value == Py_None) + value = NULL; + if (tb == Py_None) + tb = NULL; Py_XINCREF(type); Py_XINCREF(value); Py_XINCREF(tb); - /* First, check the traceback argument, replacing None with NULL. */ - if (tb == Py_None) { - Py_DECREF(tb); - tb = 0; - } - else if (tb != NULL && !PyTraceBack_Check(tb)) { + if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } - /* Next, replace a missing value with None */ - if (value == NULL) { - value = Py_None; - Py_INCREF(value); - } - /* Next, repeatedly, replace a tuple exception with its first item */ - while (PyTuple_Check(type) && PyTuple_Size(type) > 0) { - PyObject *tmp = type; - type = PyTuple_GET_ITEM(type, 0); - Py_INCREF(type); - Py_DECREF(tmp); - } - if (PyString_CheckExact(type)) { - /* Raising builtin string is deprecated but still allowed -- - * do nothing. Raising an instance of a new-style str - * subclass is right out. */ - if (PyErr_Warn(PyExc_DeprecationWarning, - "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)) { + #if PY_VERSION_HEX < 0x02050000 + if (!PyClass_Check(type)) + #else + if (!PyType_Check(type)) + #endif + { /* Raising an instance. The value should be a dummy. */ - if (value != Py_None) { + if (value) { PyErr_SetString(PyExc_TypeError, - "instance exception may not have a separate value"); + "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; + /* Normalize to raise , */ + value = type; + #if PY_VERSION_HEX < 0x02050000 + if (PyInstance_Check(type)) { + type = (PyObject*) ((PyInstanceObject*)type)->in_class; + Py_INCREF(type); + } + else { + PyErr_SetString(PyExc_TypeError, + "raise: exception must be an old-style class or instance"); + goto raise_error; + } + #else + type = (PyObject*) type->ob_type; 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) { + if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, - "instance exception may not have a separate value"); + "raise: exception class must be a subclass of BaseException"); 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 :-) */ - PyErr_Format(PyExc_TypeError, - "exceptions must be classes, instances, or " - "strings (deprecated), not %s", - type->ob_type->tp_name); - goto raise_error; + } + #endif } PyErr_Restore(type, value, tb); return; @@ -9241,15 +8632,24 @@ return; } -static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { +static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) { + PyObject *result; + result = PyObject_GetAttr(dict, name); + if (!result) + PyErr_SetObject(PyExc_NameError, name); + return result; +} + +static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name) { if (!type) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } - if (obj == Py_None || PyObject_TypeCheck(obj, type)) + if ((none_allowed && obj == Py_None) || PyObject_TypeCheck(obj, type)) return 1; - PyErr_Format(PyExc_TypeError, "Cannot convert %s to %s", - obj->ob_type->tp_name, type->tp_name); + PyErr_Format(PyExc_TypeError, + "Argument '%s' has incorrect type (expected %s, got %s)", + name, type->tp_name, obj->ob_type->tp_name); return 0; } @@ -9257,34 +8657,26 @@ PyErr_SetString(PyExc_ValueError, "unpack sequence of wrong size"); } -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(); - } - return item; -} - -static int __Pyx_EndUnpack(PyObject *seq, Py_ssize_t i) { - PyObject *item; - if (item = PySequence_GetItem(seq, i)) { - Py_DECREF(item); - __Pyx_UnpackError(); - return -1; - } - PyErr_Clear(); - return 0; +static PyObject *__Pyx_UnpackItem(PyObject *iter) { + PyObject *item; + if (!(item = PyIter_Next(iter))) { + if (!PyErr_Occurred()) + __Pyx_UnpackError(); + } + return item; } -static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) { - while (t->p) { - *t->p = PyString_InternFromString(t->s); - if (!*t->p) - return -1; - ++t; +static int __Pyx_EndUnpack(PyObject *iter) { + PyObject *item; + if ((item = PyIter_Next(iter))) { + Py_DECREF(item); + __Pyx_UnpackError(); + return -1; } - return 0; + else if (!PyErr_Occurred()) + return 0; + else + return -1; } static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { @@ -9292,6 +8684,8 @@ *t->p = PyString_FromStringAndSize(t->s, t->n - 1); if (!*t->p) return -1; + if (t->i) + PyString_InternInPlace(t->p); ++t; } return 0; --- python/dnet.pyx 2007-01-20 12:39:21.000000000 +0100 +++ python/dnet.pyx 2014-10-21 17:23:52.719665497 +0200 @@ -24,7 +24,7 @@ cdef extern from "Python.h": object PyString_FromStringAndSize(char *s, int len) int PyString_Size(object o) - int PyObject_AsReadBuffer(object o, char **pp, int *lenp) + int PyObject_AsReadBuffer(object o, char **pp, Py_ssize_t *lenp) int PyInt_Check(object o) int PyLong_Check(object o) long PyInt_AsLong(object o) @@ -160,7 +160,7 @@ return PyString_FromStringAndSize(ea.data, 6) def eth_pack_hdr(dst=ETH_ADDR_BROADCAST, src=ETH_ADDR_BROADCAST, - type=ETH_TYPE_IP): + type_=ETH_TYPE_IP): """Return a packed binary string representing an Ethernet header. Keyword arguments: @@ -172,7 +172,7 @@ cdef eth_addr_t s, d __memcpy(s.data, src, 6) __memcpy(d.data, dst, 6) - __eth_pack_hdr(hdr, d, s, type) + __eth_pack_hdr(hdr, d, s, type_) return PyString_FromStringAndSize(hdr, 14) # @@ -292,7 +292,7 @@ """ cdef char buf[2048] cdef char *p - cdef int n + cdef Py_ssize_t n if PyObject_AsReadBuffer(pkt, &p, &n) == 0: if n < 2048: memcpy(buf, p, n) @@ -308,7 +308,7 @@ def ip_cksum_add(buf, int sum): cdef char *p - cdef int n + cdef Py_ssize_t n if PyObject_AsReadBuffer(buf, &p, &n) == 0: return __ip_cksum_add(p, n, sum) else: @@ -441,7 +441,7 @@ """ cdef addr_t _addr - def __init__(self, addrtxt=None, type=ADDR_TYPE_NONE): + def __init__(self, addrtxt=None, type_=ADDR_TYPE_NONE): if addrtxt != None and addr_aton(addrtxt, &self._addr) < 0: if PyString_Size(addrtxt) == 4: self._addr.addr_type = ADDR_TYPE_IP @@ -785,7 +785,7 @@ cdef extern from *: void __icmp_pack_hdr "icmp_pack_hdr" (char *hdr, int type, int code) -def icmp_pack_hdr(type, code): +def icmp_pack_hdr(type_, code): """Return a packed binary string representing an ICMP header. Keyword arguments: @@ -793,7 +793,7 @@ code -- ICMP code (8-bit integer) """ cdef char buf[4] - __icmp_pack_hdr(buf, type, code) + __icmp_pack_hdr(buf, type_, code) return PyString_FromStringAndSize(buf, sizeof(buf)) #