Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 526418
Collapse All | Expand All

(-)python/dnet.c (-2395 / +1789 lines)
Lines 1-4 Link Here
1
/* Generated by Pyrex 0.9.4.1 on Sat Jan 20 06:39:10 2007 */
1
/* Generated by Pyrex 0.9.9 on Tue Oct 21 16:46:44 2014 */
2
2
3
#define PY_SSIZE_T_CLEAN
3
#define PY_SSIZE_T_CLEAN
4
#include "Python.h"
4
#include "Python.h"
Lines 11-52 Link Here
11
  #define PY_SSIZE_T_MAX INT_MAX
11
  #define PY_SSIZE_T_MAX INT_MAX
12
  #define PY_SSIZE_T_MIN INT_MIN
12
  #define PY_SSIZE_T_MIN INT_MIN
13
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
13
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
14
  #define PyInt_AsSsize_t(o)   PyInt_AsLong(o)
14
  #define PyInt_AsSsize_t(o)	PyInt_AsLong(o)
15
#endif
16
#if !defined(WIN32) && !defined(MS_WINDOWS)
17
  #ifndef __stdcall
18
    #define __stdcall
19
  #endif
20
  #ifndef __cdecl
21
    #define __cdecl
22
  #endif
15
#endif
23
#endif
16
#ifdef __cplusplus
24
#ifdef __cplusplus
17
#define __PYX_EXTERN_C extern "C"
25
#define __PYX_EXTERN_C extern "C"
18
#else
26
#else
19
#define __PYX_EXTERN_C extern
27
#define __PYX_EXTERN_C extern
20
#endif
28
#endif
21
__PYX_EXTERN_C double pow(double, double);
29
#include <math.h>
22
#include "dnet.h"
30
#include "dnet.h"
23
31
24
32
25
typedef struct {const char *s; const void **p;} __Pyx_CApiTabEntry; /*proto*/
33
typedef struct {PyObject **p; int i; char *s; long n;} __Pyx_StringTabEntry; /*proto*/
26
typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/
27
typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/
28
static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t); /*proto*/
29
static int __Pyx_EndUnpack(PyObject *, Py_ssize_t); /*proto*/
30
static int __Pyx_PrintItem(PyObject *); /*proto*/
31
static int __Pyx_PrintNewline(void); /*proto*/
32
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
33
static void __Pyx_ReRaise(void); /*proto*/
34
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
35
static PyObject *__Pyx_GetExcValue(void); /*proto*/
36
static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name); /*proto*/
37
static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
38
static int __Pyx_GetStarArgs(PyObject **args, PyObject **kwds, char *kwd_list[], Py_ssize_t nargs, PyObject **args2, PyObject **kwds2); /*proto*/
39
static void __Pyx_WriteUnraisable(char *name); /*proto*/
40
static void __Pyx_AddTraceback(char *funcname); /*proto*/
41
static PyTypeObject *__Pyx_ImportType(char *module_name, char *class_name, long size);  /*proto*/
42
static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
43
static int __Pyx_GetVtable(PyObject *dict, void *vtabptr); /*proto*/
44
static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, char *modname); /*proto*/
45
static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/
46
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
47
static int __Pyx_InitCApi(PyObject *module); /*proto*/
48
static int __Pyx_ImportModuleCApi(__Pyx_CApiTabEntry *t); /*proto*/
49
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
50
34
51
static PyObject *__pyx_m;
35
static PyObject *__pyx_m;
52
static PyObject *__pyx_b;
36
static PyObject *__pyx_b;
Lines 56-149 Link Here
56
40
57
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";
41
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";
58
42
43
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
44
45
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
46
47
static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name); /*proto*/
48
49
static PyObject *__Pyx_UnpackItem(PyObject *); /*proto*/
50
static int __Pyx_EndUnpack(PyObject *); /*proto*/
51
52
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
53
54
static void __Pyx_AddTraceback(char *funcname); /*proto*/
55
59
/* Declarations from dnet */
56
/* Declarations from dnet */
60
57
61
enum  {
62
  __pyx_e_4dnet_TEADELTA = 2654435769,
63
  __pyx_e_4dnet_TEAROUNDS = 32,
64
  __pyx_e_4dnet_TEASBOXSIZE = 128,
65
  __pyx_e_4dnet_TEASBOXSHIFT = 7,
66
};
67
58
59
/* Declarations from implementation of dnet */
68
60
69
struct __pyx_obj_4dnet_eth {
61
struct __pyx_obj_4dnet_eth {
70
  PyObject_HEAD
62
  PyObject_HEAD
71
  eth_t (*eth);
63
  eth_t *eth;
72
};
64
};
73
65
74
75
struct __pyx_obj_4dnet_ip {
66
struct __pyx_obj_4dnet_ip {
76
  PyObject_HEAD
67
  PyObject_HEAD
77
  ip_t (*ip);
68
  ip_t *ip;
78
};
69
};
79
70
80
81
struct __pyx_obj_4dnet_addr {
71
struct __pyx_obj_4dnet_addr {
82
  PyObject_HEAD
72
  PyObject_HEAD
83
  struct addr _addr;
73
  struct addr _addr;
84
};
74
};
85
75
86
87
struct __pyx_obj_4dnet___addr_ip4_iter {
76
struct __pyx_obj_4dnet___addr_ip4_iter {
88
  PyObject_HEAD
77
  PyObject_HEAD
89
  unsigned long cur;
78
  unsigned long cur;
90
  unsigned long max;
79
  unsigned long max;
91
};
80
};
92
81
93
94
struct __pyx_obj_4dnet_arp {
82
struct __pyx_obj_4dnet_arp {
95
  PyObject_HEAD
83
  PyObject_HEAD
96
  arp_t (*arp);
84
  arp_t *arp;
97
};
85
};
98
86
99
100
struct __pyx_obj_4dnet_intf {
87
struct __pyx_obj_4dnet_intf {
101
  PyObject_HEAD
88
  PyObject_HEAD
102
  intf_t (*intf);
89
  intf_t *intf;
103
};
90
};
104
91
105
106
struct __pyx_obj_4dnet_route {
92
struct __pyx_obj_4dnet_route {
107
  PyObject_HEAD
93
  PyObject_HEAD
108
  route_t (*route);
94
  route_t *route;
109
};
95
};
110
96
111
112
struct __pyx_obj_4dnet_fw {
97
struct __pyx_obj_4dnet_fw {
113
  PyObject_HEAD
98
  PyObject_HEAD
114
  fw_t (*fw);
99
  fw_t *fw;
115
};
100
};
116
101
117
118
struct __pyx_obj_4dnet_rand {
102
struct __pyx_obj_4dnet_rand {
119
  PyObject_HEAD
103
  PyObject_HEAD
120
  rand_t (*rand);
104
  rand_t *rand;
121
};
105
};
122
106
107
enum  {
108
  __pyx_e_4dnet_TEADELTA = 0x9e3779b9,
109
  __pyx_e_4dnet_TEAROUNDS = 32,
110
  __pyx_e_4dnet_TEASBOXSIZE = 128,
111
  __pyx_e_4dnet_TEASBOXSHIFT = 7
112
};
123
113
124
struct __pyx_obj_4dnet___rand_xrange {
114
struct __pyx_obj_4dnet___rand_xrange {
125
  PyObject_HEAD
115
  PyObject_HEAD
126
  rand_t (*rand);
116
  rand_t *rand;
127
  unsigned long cur;
117
  unsigned long cur;
128
  unsigned long enc;
118
  unsigned long enc;
129
  unsigned long max;
119
  unsigned long max;
130
  unsigned long mask;
120
  unsigned long mask;
131
  unsigned long start;
121
  unsigned long start;
132
  unsigned long sboxmask;
122
  unsigned long sboxmask;
133
  unsigned int (sbox[128]);
123
  unsigned int sbox[128];
134
  int left;
124
  int left;
135
  int right;
125
  int right;
136
  int kshift;
126
  int kshift;
137
};
127
};
138
128
139
140
struct __pyx_obj_4dnet_tun {
129
struct __pyx_obj_4dnet_tun {
141
  PyObject_HEAD
130
  PyObject_HEAD
142
  tun_t (*tun);
131
  tun_t *tun;
143
  char (*buf);
132
  char *buf;
144
  int mtu;
133
  int mtu;
145
};
134
};
146
135
136
137
138
139
140
141
142
143
144
145
146
147
static PyTypeObject *__pyx_ptype_4dnet_eth = 0;
147
static PyTypeObject *__pyx_ptype_4dnet_eth = 0;
148
static PyTypeObject *__pyx_ptype_4dnet_ip = 0;
148
static PyTypeObject *__pyx_ptype_4dnet_ip = 0;
149
static PyTypeObject *__pyx_ptype_4dnet_addr = 0;
149
static PyTypeObject *__pyx_ptype_4dnet_addr = 0;
Lines 155-441 Link Here
155
static PyTypeObject *__pyx_ptype_4dnet_rand = 0;
155
static PyTypeObject *__pyx_ptype_4dnet_rand = 0;
156
static PyTypeObject *__pyx_ptype_4dnet___rand_xrange = 0;
156
static PyTypeObject *__pyx_ptype_4dnet___rand_xrange = 0;
157
static PyTypeObject *__pyx_ptype_4dnet_tun = 0;
157
static PyTypeObject *__pyx_ptype_4dnet_tun = 0;
158
static PyObject *__pyx_k16;
158
static PyObject *__pyx_f_4dnet___memcpy(char *,PyObject *,int); /*proto*/
159
static PyObject *__pyx_k17;
159
static PyObject *__pyx_f_4dnet___oserror(void); /*proto*/
160
static PyObject *__pyx_k18;
160
static int __pyx_f_4dnet___arp_callback(struct arp_entry *,void *); /*proto*/
161
static PyObject *__pyx_k24;
161
static PyObject *__pyx_f_4dnet_ifent_to_dict(struct intf_entry *); /*proto*/
162
static PyObject *__pyx_k25;
162
static PyObject *__pyx_f_4dnet_dict_to_ifent(PyObject *,struct intf_entry *); /*proto*/
163
static PyObject *__pyx_k26;
163
static int __pyx_f_4dnet___intf_callback(struct intf_entry *,void *); /*proto*/
164
static PyObject *__pyx_k27;
164
static int __pyx_f_4dnet___route_callback(struct route_entry *,void *); /*proto*/
165
static PyObject *__pyx_k28;
165
static PyObject *__pyx_f_4dnet_rule_to_dict(struct fw_rule *); /*proto*/
166
static PyObject *__pyx_k29;
166
static PyObject *__pyx_f_4dnet_dict_to_rule(PyObject *,struct fw_rule *); /*proto*/
167
static PyObject *__pyx_k30;
167
static int __pyx_f_4dnet___fw_callback(struct fw_rule *,void *); /*proto*/
168
static PyObject *__pyx_k31;
168
169
static PyObject *__pyx_k34;
169
static char __pyx_k1[] = "not a %d-byte binary string: %r";
170
static PyObject *__pyx_k35;
170
static char __pyx_k2[] = "append";
171
static PyObject *__pyx_k36;
171
static char __pyx_k3[] = "invalid Ethernet address";
172
static PyObject *__pyx_k37;
172
static char __pyx_k4[] = "invalid IP address";
173
static PyObject *__pyx_k38;
173
static char __pyx_k5[] = "invalid IPv6 address";
174
static PyObject *__pyx_k39;
174
static char __pyx_k6[] = "ADDR_TYPE_IP";
175
static PyObject *__pyx_k40;
175
static char __pyx_k7[] = "IP_ADDR_BITS";
176
static PyObject *__pyx_k41;
176
static char __pyx_k8[] = "ip";
177
static PyObject *__pyx_k42;
177
static char __pyx_k9[] = "invalid network address";
178
static PyObject *__pyx_k43;
178
static char __pyx_k10[] = "ADDR_TYPE_ETH";
179
static PyObject *__pyx_k44;
179
static char __pyx_k11[] = "eth";
180
static PyObject *__pyx_k45;
180
static char __pyx_k12[] = "ADDR_TYPE_IP6";
181
static PyObject *__pyx_k46;
181
static char __pyx_k13[] = "ip6";
182
static PyObject *__pyx_k47;
182
static char __pyx_k14[] = "non-Ethernet address";
183
static PyObject *__pyx_k48;
183
static char __pyx_k15[] = "ETH_ADDR_LEN";
184
static PyObject *__pyx_k49;
184
static char __pyx_k16[] = "not a 6-byte string";
185
static PyObject *__pyx_k50;
185
static char __pyx_k17[] = "ETH_ADDR_BITS";
186
static PyObject *__pyx_k51;
186
static char __pyx_k18[] = "non-IP address";
187
static PyObject *__pyx_k52;
187
static char __pyx_k19[] = "IP_ADDR_LEN";
188
static PyObject *__pyx_k53;
188
static char __pyx_k20[] = "not a 4-byte string";
189
static PyObject *__pyx_k54;
189
static char __pyx_k21[] = "non-IPv6 address";
190
static PyObject *__pyx_k55;
190
static char __pyx_k22[] = "IP6_ADDR_LEN";
191
static PyObject *__pyx_k56;
191
static char __pyx_k23[] = "not a 16-byte string";
192
static PyObject *__pyx_k57;
192
static char __pyx_k24[] = "IP6_ADDR_BITS";
193
static PyObject *__pyx_k58;
193
static char __pyx_k25[] = "__copy__";
194
static PyObject *__pyx_k59;
194
static char __pyx_k26[] = "__int__";
195
static PyObject *(__pyx_f_4dnet___memcpy(char (*),PyObject *,int )); /*proto*/
195
static char __pyx_k27[] = "<invalid network address>";
196
static PyObject *(__pyx_f_4dnet___oserror(void)); /*proto*/
196
static char __pyx_k28[] = "loop";
197
static int (__pyx_f_4dnet___arp_callback(struct arp_entry (*),void (*))); /*proto*/
197
static char __pyx_k29[] = "__iter_append";
198
static PyObject *(__pyx_f_4dnet_ifent_to_dict(struct intf_entry (*))); /*proto*/
198
static char __pyx_k30[] = "name";
199
static PyObject *(__pyx_f_4dnet_dict_to_ifent(PyObject *,struct intf_entry (*))); /*proto*/
199
static char __pyx_k31[] = "type";
200
static int (__pyx_f_4dnet___intf_callback(struct intf_entry (*),void (*))); /*proto*/
200
static char __pyx_k32[] = "flags";
201
static int (__pyx_f_4dnet___route_callback(struct route_entry (*),void (*))); /*proto*/
201
static char __pyx_k33[] = "mtu";
202
static PyObject *(__pyx_f_4dnet_rule_to_dict(struct fw_rule (*))); /*proto*/
202
static char __pyx_k34[] = "ADDR_TYPE_NONE";
203
static PyObject *(__pyx_f_4dnet_dict_to_rule(PyObject *,struct fw_rule (*))); /*proto*/
203
static char __pyx_k35[] = "addr";
204
static int (__pyx_f_4dnet___fw_callback(struct fw_rule (*),void (*))); /*proto*/
204
static char __pyx_k36[] = "dst_addr";
205
static char __pyx_k37[] = "link_addr";
206
static char __pyx_k38[] = "alias_addrs";
207
static char __pyx_k39[] = "device";
208
static char __pyx_k40[] = "op";
209
static char __pyx_k41[] = "dir";
210
static char __pyx_k42[] = "proto";
211
static char __pyx_k43[] = "src";
212
static char __pyx_k44[] = "dst";
213
static char __pyx_k45[] = "sport";
214
static char __pyx_k46[] = "dport";
215
static char __pyx_k47[] = "IP_PROTO_TCP";
216
static char __pyx_k48[] = "IP_PROTO_UDP";
217
static char __pyx_k49[] = "start must be an integer";
218
static char __pyx_k50[] = "stop must be an integer";
219
static char __pyx_k51[] = "Address type (ADDR_TYPE_*) integer.";
220
static char __pyx_k52[] = "Address bitlength integer.";
221
static char __pyx_k53[] = "Raw address string.";
222
static char __pyx_k54[] = "Ethernet MAC address as binary string.";
223
static char __pyx_k55[] = "IPv4 address as binary string.";
224
static char __pyx_k56[] = "IPv6 address as binary string.";
225
static char __pyx_k57[] = "Tunnel interface name.";
226
static char __pyx_k58[] = "File descriptor for tunnel handle.";
227
static char __pyx_k59[] = "Dug Song <dugsong@monkey.org>";
228
static char __pyx_k60[] = "__author__";
229
static char __pyx_k61[] = "Copyright (c) 2003 Dug Song";
230
static char __pyx_k62[] = "__copyright__";
231
static char __pyx_k63[] = "BSD";
232
static char __pyx_k64[] = "__license__";
233
static char __pyx_k65[] = "http://libdnet.sourceforge.net/";
234
static char __pyx_k66[] = "__url__";
235
static char __pyx_k67[] = "1.12";
236
static char __pyx_k68[] = "__version__";
237
static char __pyx_k69[] = "ETH_TYPE_LEN";
238
static char __pyx_k70[] = "ETH_CRC_LEN";
239
static char __pyx_k71[] = "ETH_HDR_LEN";
240
static char __pyx_k72[] = "ETH_LEN_MIN";
241
static char __pyx_k73[] = "ETH_LEN_MAX";
242
static char __pyx_k74[] = "ETH_MTU";
243
static char __pyx_k75[] = "ETH_MIN";
244
static char __pyx_k76[] = "ETH_TYPE_PUP";
245
static char __pyx_k77[] = "ETH_TYPE_IP";
246
static char __pyx_k78[] = "ETH_TYPE_ARP";
247
static char __pyx_k79[] = "ETH_TYPE_REVARP";
248
static char __pyx_k80[] = "ETH_TYPE_8021Q";
249
static char __pyx_k81[] = "ETH_TYPE_IPV6";
250
static char __pyx_k82[] = "ETH_TYPE_MPLS";
251
static char __pyx_k83[] = "ETH_TYPE_MPLS_MCAST";
252
static char __pyx_k84[] = "ETH_TYPE_PPPOEDISC";
253
static char __pyx_k85[] = "ETH_TYPE_PPPOE";
254
static char __pyx_k86[] = "ETH_TYPE_LOOPBACK";
255
static char __pyx_k87[] = "\x000\x000\x000\x000\x000\x000";
256
static char __pyx_k88[] = "ETH_ADDR_UNSPEC";
257
static char __pyx_k89[] = "\x0ff\x0ff\x0ff\x0ff\x0ff\x0ff";
258
static char __pyx_k90[] = "ETH_ADDR_BROADCAST";
259
static char __pyx_k91[] = "IP_HDR_LEN";
260
static char __pyx_k92[] = "IP_OPT_LEN";
261
static char __pyx_k93[] = "IP_OPT_LEN_MAX";
262
static char __pyx_k94[] = "IP_HDR_LEN_MAX";
263
static char __pyx_k95[] = "IP_LEN_MAX";
264
static char __pyx_k96[] = "IP_LEN_MIN";
265
static char __pyx_k97[] = "IP_TOS_DEFAULT";
266
static char __pyx_k98[] = "IP_RF";
267
static char __pyx_k99[] = "IP_DF";
268
static char __pyx_k100[] = "IP_MF";
269
static char __pyx_k101[] = "IP_OFFMASK";
270
static char __pyx_k102[] = "IP_TTL_DEFAULT";
271
static char __pyx_k103[] = "IP_TTL_MAX";
272
static char __pyx_k104[] = "IP_PROTO_IP";
273
static char __pyx_k105[] = "IP_PROTO_ICMP";
274
static char __pyx_k106[] = "IP_PROTO_IGMP";
275
static char __pyx_k107[] = "IP_PROTO_IPV6";
276
static char __pyx_k108[] = "IP_PROTO_GRE";
277
static char __pyx_k109[] = "IP_PROTO_ESP";
278
static char __pyx_k110[] = "IP_PROTO_AH";
279
static char __pyx_k111[] = "IP_PROTO_ICMPV6";
280
static char __pyx_k112[] = "IP_PROTO_RAW";
281
static char __pyx_k113[] = "IP_PROTO_RESERVED";
282
static char __pyx_k114[] = "IP_PROTO_MAX";
283
static char __pyx_k115[] = "\x000\x000\x000\x000";
284
static char __pyx_k116[] = "IP_ADDR_ANY";
285
static char __pyx_k117[] = "\x0ff\x0ff\x0ff\x0ff";
286
static char __pyx_k118[] = "IP_ADDR_BROADCAST";
287
static char __pyx_k119[] = "\x07f\x000\x000\x001";
288
static char __pyx_k120[] = "IP_ADDR_LOOPBACK";
289
static char __pyx_k121[] = "\x0e0\x000\x000\x001";
290
static char __pyx_k122[] = "IP_ADDR_MCAST_ALL";
291
static char __pyx_k123[] = "\x0e0\x000\x000\x0ff";
292
static char __pyx_k124[] = "IP_ADDR_MCAST_LOCAL";
293
static char __pyx_k125[] = "IP6_HDR_LEN";
294
static char __pyx_k126[] = "IP6_LEN_MIN";
295
static char __pyx_k127[] = "IP6_LEN_MAX";
296
static char __pyx_k128[] = "IP6_MTU_MIN";
297
static char __pyx_k129[] = "IP6_HLIM_DEFAULT";
298
static char __pyx_k130[] = "IP6_HLIM_MAX";
299
static char __pyx_k131[] = "\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000";
300
static char __pyx_k132[] = "IP6_ADDR_UNSPEC";
301
static char __pyx_k133[] = "\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x001";
302
static char __pyx_k134[] = "IP6_ADDR_LOOPBACK";
303
static char __pyx_k135[] = "ARP_HDR_LEN";
304
static char __pyx_k136[] = "ARP_ETHIP_LEN";
305
static char __pyx_k137[] = "ARP_HRD_ETH";
306
static char __pyx_k138[] = "ARP_HRD_IEEE802";
307
static char __pyx_k139[] = "ARP_PRO_IP";
308
static char __pyx_k140[] = "ARP_OP_REQUEST";
309
static char __pyx_k141[] = "ARP_OP_REPLY";
310
static char __pyx_k142[] = "ARP_OP_REVREQUEST";
311
static char __pyx_k143[] = "ARP_OP_REVREPLY";
312
static char __pyx_k144[] = "TCP_HDR_LEN";
313
static char __pyx_k145[] = "TH_FIN";
314
static char __pyx_k146[] = "TH_SYN";
315
static char __pyx_k147[] = "TH_RST";
316
static char __pyx_k148[] = "TH_PUSH";
317
static char __pyx_k149[] = "TH_ACK";
318
static char __pyx_k150[] = "TH_URG";
319
static char __pyx_k151[] = "TH_ECE";
320
static char __pyx_k152[] = "TH_CWR";
321
static char __pyx_k153[] = "TCP_PORT_MAX";
322
static char __pyx_k154[] = "TCP_WIN_MAX";
323
static char __pyx_k155[] = "TCP_OPT_EOL";
324
static char __pyx_k156[] = "TCP_OPT_NOP";
325
static char __pyx_k157[] = "TCP_OPT_MSS";
326
static char __pyx_k158[] = "TCP_OPT_WSCALE";
327
static char __pyx_k159[] = "TCP_OPT_SACKOK";
328
static char __pyx_k160[] = "TCP_OPT_SACK";
329
static char __pyx_k161[] = "TCP_OPT_ECHO";
330
static char __pyx_k162[] = "TCP_OPT_ECHOREPLY";
331
static char __pyx_k163[] = "TCP_OPT_TIMESTAMP";
332
static char __pyx_k164[] = "TCP_OPT_POCONN";
333
static char __pyx_k165[] = "TCP_OPT_POSVC";
334
static char __pyx_k166[] = "TCP_OPT_CC";
335
static char __pyx_k167[] = "TCP_OPT_CCNEW";
336
static char __pyx_k168[] = "TCP_OPT_CCECHO";
337
static char __pyx_k169[] = "TCP_OPT_ALTSUM";
338
static char __pyx_k170[] = "TCP_OPT_ALTSUMDATA";
339
static char __pyx_k171[] = "TCP_OPT_SKEETER";
340
static char __pyx_k172[] = "TCP_OPT_BUBBA";
341
static char __pyx_k173[] = "TCP_OPT_TRAILSUM";
342
static char __pyx_k174[] = "TCP_OPT_MD5";
343
static char __pyx_k175[] = "TCP_OPT_SCPS";
344
static char __pyx_k176[] = "TCP_OPT_SNACK";
345
static char __pyx_k177[] = "TCP_OPT_REC";
346
static char __pyx_k178[] = "TCP_OPT_CORRUPT";
347
static char __pyx_k179[] = "TCP_OPT_SNAP";
348
static char __pyx_k180[] = "TCP_OPT_TCPCOMP";
349
static char __pyx_k181[] = "TCP_OPT_MAX";
350
static char __pyx_k182[] = "UDP_HDR_LEN";
351
static char __pyx_k183[] = "UDP_PORT_MAX";
352
static char __pyx_k184[] = "INTF_TYPE_OTHER";
353
static char __pyx_k185[] = "INTF_TYPE_ETH";
354
static char __pyx_k186[] = "INTF_TYPE_LOOPBACK";
355
static char __pyx_k187[] = "INTF_TYPE_TUN";
356
static char __pyx_k188[] = "INTF_FLAG_UP";
357
static char __pyx_k189[] = "INTF_FLAG_LOOPBACK";
358
static char __pyx_k190[] = "INTF_FLAG_POINTOPOINT";
359
static char __pyx_k191[] = "INTF_FLAG_NOARP";
360
static char __pyx_k192[] = "INTF_FLAG_BROADCAST";
361
static char __pyx_k193[] = "INTF_FLAG_MULTICAST";
362
static char __pyx_k194[] = "FW_OP_ALLOW";
363
static char __pyx_k195[] = "FW_OP_BLOCK";
364
static char __pyx_k196[] = "FW_DIR_IN";
365
static char __pyx_k197[] = "FW_DIR_OUT";
205
366
206
/* Implementation of dnet */
367
static PyObject *__pyx_n_ADDR_TYPE_ETH;
207
368
static PyObject *__pyx_n_ADDR_TYPE_IP;
208
static char (__pyx_k1[]) = "Address type (ADDR_TYPE_*) integer.";
369
static PyObject *__pyx_n_ADDR_TYPE_IP6;
209
static char (__pyx_k2[]) = "Address bitlength integer.";
370
static PyObject *__pyx_n_ADDR_TYPE_NONE;
210
static char (__pyx_k3[]) = "Raw address string.";
371
static PyObject *__pyx_n_ARP_ETHIP_LEN;
211
static char (__pyx_k4[]) = "Ethernet MAC address as binary string.";
372
static PyObject *__pyx_n_ARP_HDR_LEN;
212
static char (__pyx_k5[]) = "IPv4 address as binary string.";
373
static PyObject *__pyx_n_ARP_HRD_ETH;
213
static char (__pyx_k6[]) = "IPv6 address as binary string.";
374
static PyObject *__pyx_n_ARP_HRD_IEEE802;
214
static char (__pyx_k7[]) = "Tunnel interface name.";
375
static PyObject *__pyx_n_ARP_OP_REPLY;
215
static char (__pyx_k8[]) = "File descriptor for tunnel handle.";
376
static PyObject *__pyx_n_ARP_OP_REQUEST;
216
static char (__pyx_k9[]) = "Dug Song <dugsong@monkey.org>";
377
static PyObject *__pyx_n_ARP_OP_REVREPLY;
217
static char (__pyx_k10[]) = "Copyright (c) 2003 Dug Song";
378
static PyObject *__pyx_n_ARP_OP_REVREQUEST;
218
static char (__pyx_k12[]) = "http://libdnet.sourceforge.net/";
379
static PyObject *__pyx_n_ARP_PRO_IP;
219
static char (__pyx_k13[]) = "1.12";
380
static PyObject *__pyx_n_BSD;
220
static char (__pyx_k14[]) = "\x000\x000\x000\x000\x000\x000";
221
static char (__pyx_k15[]) = "\x0ff\x0ff\x0ff\x0ff\x0ff\x0ff";
222
static char (__pyx_k19[]) = "\x000\x000\x000\x000";
223
static char (__pyx_k20[]) = "\x0ff\x0ff\x0ff\x0ff";
224
static char (__pyx_k21[]) = "\x07f\x000\x000\x001";
225
static char (__pyx_k22[]) = "\x0e0\x000\x000\x001";
226
static char (__pyx_k23[]) = "\x0e0\x000\x000\x0ff";
227
static char (__pyx_k32[]) = "\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000";
228
static char (__pyx_k33[]) = "\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\x001";
229
230
static PyObject *__pyx_n___author__;
231
static PyObject *__pyx_n___copyright__;
232
static PyObject *__pyx_n___license__;
233
static PyObject *__pyx_n___url__;
234
static PyObject *__pyx_n___version__;
235
static PyObject *__pyx_n___iter_append;
236
static PyObject *__pyx_n_ETH_ADDR_LEN;
237
static PyObject *__pyx_n_ETH_ADDR_BITS;
381
static PyObject *__pyx_n_ETH_ADDR_BITS;
238
static PyObject *__pyx_n_ETH_TYPE_LEN;
382
static PyObject *__pyx_n_ETH_ADDR_BROADCAST;
383
static PyObject *__pyx_n_ETH_ADDR_LEN;
384
static PyObject *__pyx_n_ETH_ADDR_UNSPEC;
239
static PyObject *__pyx_n_ETH_CRC_LEN;
385
static PyObject *__pyx_n_ETH_CRC_LEN;
240
static PyObject *__pyx_n_ETH_HDR_LEN;
386
static PyObject *__pyx_n_ETH_HDR_LEN;
241
static PyObject *__pyx_n_ETH_LEN_MIN;
242
static PyObject *__pyx_n_ETH_LEN_MAX;
387
static PyObject *__pyx_n_ETH_LEN_MAX;
243
static PyObject *__pyx_n_ETH_MTU;
388
static PyObject *__pyx_n_ETH_LEN_MIN;
244
static PyObject *__pyx_n_ETH_MIN;
389
static PyObject *__pyx_n_ETH_MIN;
245
static PyObject *__pyx_n_ETH_TYPE_PUP;
390
static PyObject *__pyx_n_ETH_MTU;
246
static PyObject *__pyx_n_ETH_TYPE_IP;
247
static PyObject *__pyx_n_ETH_TYPE_ARP;
248
static PyObject *__pyx_n_ETH_TYPE_REVARP;
249
static PyObject *__pyx_n_ETH_TYPE_8021Q;
391
static PyObject *__pyx_n_ETH_TYPE_8021Q;
392
static PyObject *__pyx_n_ETH_TYPE_ARP;
393
static PyObject *__pyx_n_ETH_TYPE_IP;
250
static PyObject *__pyx_n_ETH_TYPE_IPV6;
394
static PyObject *__pyx_n_ETH_TYPE_IPV6;
395
static PyObject *__pyx_n_ETH_TYPE_LEN;
396
static PyObject *__pyx_n_ETH_TYPE_LOOPBACK;
251
static PyObject *__pyx_n_ETH_TYPE_MPLS;
397
static PyObject *__pyx_n_ETH_TYPE_MPLS;
252
static PyObject *__pyx_n_ETH_TYPE_MPLS_MCAST;
398
static PyObject *__pyx_n_ETH_TYPE_MPLS_MCAST;
253
static PyObject *__pyx_n_ETH_TYPE_PPPOEDISC;
254
static PyObject *__pyx_n_ETH_TYPE_PPPOE;
399
static PyObject *__pyx_n_ETH_TYPE_PPPOE;
255
static PyObject *__pyx_n_ETH_TYPE_LOOPBACK;
400
static PyObject *__pyx_n_ETH_TYPE_PPPOEDISC;
256
static PyObject *__pyx_n_ETH_ADDR_UNSPEC;
401
static PyObject *__pyx_n_ETH_TYPE_PUP;
257
static PyObject *__pyx_n_ETH_ADDR_BROADCAST;
402
static PyObject *__pyx_n_ETH_TYPE_REVARP;
258
static PyObject *__pyx_n_eth_ntoa;
403
static PyObject *__pyx_n_FW_DIR_IN;
259
static PyObject *__pyx_n_eth_aton;
404
static PyObject *__pyx_n_FW_DIR_OUT;
260
static PyObject *__pyx_n_eth_pack_hdr;
405
static PyObject *__pyx_n_FW_OP_ALLOW;
261
static PyObject *__pyx_n_IP_ADDR_LEN;
406
static PyObject *__pyx_n_FW_OP_BLOCK;
407
static PyObject *__pyx_n_INTF_FLAG_BROADCAST;
408
static PyObject *__pyx_n_INTF_FLAG_LOOPBACK;
409
static PyObject *__pyx_n_INTF_FLAG_MULTICAST;
410
static PyObject *__pyx_n_INTF_FLAG_NOARP;
411
static PyObject *__pyx_n_INTF_FLAG_POINTOPOINT;
412
static PyObject *__pyx_n_INTF_FLAG_UP;
413
static PyObject *__pyx_n_INTF_TYPE_ETH;
414
static PyObject *__pyx_n_INTF_TYPE_LOOPBACK;
415
static PyObject *__pyx_n_INTF_TYPE_OTHER;
416
static PyObject *__pyx_n_INTF_TYPE_TUN;
417
static PyObject *__pyx_n_IP6_ADDR_BITS;
418
static PyObject *__pyx_n_IP6_ADDR_LEN;
419
static PyObject *__pyx_n_IP6_ADDR_LOOPBACK;
420
static PyObject *__pyx_n_IP6_ADDR_UNSPEC;
421
static PyObject *__pyx_n_IP6_HDR_LEN;
422
static PyObject *__pyx_n_IP6_HLIM_DEFAULT;
423
static PyObject *__pyx_n_IP6_HLIM_MAX;
424
static PyObject *__pyx_n_IP6_LEN_MAX;
425
static PyObject *__pyx_n_IP6_LEN_MIN;
426
static PyObject *__pyx_n_IP6_MTU_MIN;
427
static PyObject *__pyx_n_IP_ADDR_ANY;
262
static PyObject *__pyx_n_IP_ADDR_BITS;
428
static PyObject *__pyx_n_IP_ADDR_BITS;
429
static PyObject *__pyx_n_IP_ADDR_BROADCAST;
430
static PyObject *__pyx_n_IP_ADDR_LEN;
431
static PyObject *__pyx_n_IP_ADDR_LOOPBACK;
432
static PyObject *__pyx_n_IP_ADDR_MCAST_ALL;
433
static PyObject *__pyx_n_IP_ADDR_MCAST_LOCAL;
434
static PyObject *__pyx_n_IP_DF;
263
static PyObject *__pyx_n_IP_HDR_LEN;
435
static PyObject *__pyx_n_IP_HDR_LEN;
264
static PyObject *__pyx_n_IP_OPT_LEN;
265
static PyObject *__pyx_n_IP_OPT_LEN_MAX;
266
static PyObject *__pyx_n_IP_HDR_LEN_MAX;
436
static PyObject *__pyx_n_IP_HDR_LEN_MAX;
267
static PyObject *__pyx_n_IP_LEN_MAX;
437
static PyObject *__pyx_n_IP_LEN_MAX;
268
static PyObject *__pyx_n_IP_LEN_MIN;
438
static PyObject *__pyx_n_IP_LEN_MIN;
269
static PyObject *__pyx_n_IP_TOS_DEFAULT;
270
static PyObject *__pyx_n_IP_RF;
271
static PyObject *__pyx_n_IP_DF;
272
static PyObject *__pyx_n_IP_MF;
439
static PyObject *__pyx_n_IP_MF;
273
static PyObject *__pyx_n_IP_OFFMASK;
440
static PyObject *__pyx_n_IP_OFFMASK;
274
static PyObject *__pyx_n_IP_TTL_DEFAULT;
441
static PyObject *__pyx_n_IP_OPT_LEN;
275
static PyObject *__pyx_n_IP_TTL_MAX;
442
static PyObject *__pyx_n_IP_OPT_LEN_MAX;
276
static PyObject *__pyx_n_IP_PROTO_IP;
443
static PyObject *__pyx_n_IP_PROTO_AH;
444
static PyObject *__pyx_n_IP_PROTO_ESP;
445
static PyObject *__pyx_n_IP_PROTO_GRE;
277
static PyObject *__pyx_n_IP_PROTO_ICMP;
446
static PyObject *__pyx_n_IP_PROTO_ICMP;
447
static PyObject *__pyx_n_IP_PROTO_ICMPV6;
278
static PyObject *__pyx_n_IP_PROTO_IGMP;
448
static PyObject *__pyx_n_IP_PROTO_IGMP;
279
static PyObject *__pyx_n_IP_PROTO_TCP;
449
static PyObject *__pyx_n_IP_PROTO_IP;
280
static PyObject *__pyx_n_IP_PROTO_UDP;
281
static PyObject *__pyx_n_IP_PROTO_IPV6;
450
static PyObject *__pyx_n_IP_PROTO_IPV6;
282
static PyObject *__pyx_n_IP_PROTO_GRE;
451
static PyObject *__pyx_n_IP_PROTO_MAX;
283
static PyObject *__pyx_n_IP_PROTO_ESP;
284
static PyObject *__pyx_n_IP_PROTO_AH;
285
static PyObject *__pyx_n_IP_PROTO_ICMPV6;
286
static PyObject *__pyx_n_IP_PROTO_RAW;
452
static PyObject *__pyx_n_IP_PROTO_RAW;
287
static PyObject *__pyx_n_IP_PROTO_RESERVED;
453
static PyObject *__pyx_n_IP_PROTO_RESERVED;
288
static PyObject *__pyx_n_IP_PROTO_MAX;
454
static PyObject *__pyx_n_IP_PROTO_TCP;
289
static PyObject *__pyx_n_IP_ADDR_ANY;
455
static PyObject *__pyx_n_IP_PROTO_UDP;
290
static PyObject *__pyx_n_IP_ADDR_BROADCAST;
456
static PyObject *__pyx_n_IP_RF;
291
static PyObject *__pyx_n_IP_ADDR_LOOPBACK;
457
static PyObject *__pyx_n_IP_TOS_DEFAULT;
292
static PyObject *__pyx_n_IP_ADDR_MCAST_ALL;
458
static PyObject *__pyx_n_IP_TTL_DEFAULT;
293
static PyObject *__pyx_n_IP_ADDR_MCAST_LOCAL;
459
static PyObject *__pyx_n_IP_TTL_MAX;
294
static PyObject *__pyx_n_ip_ntoa;
295
static PyObject *__pyx_n_ip_aton;
296
static PyObject *__pyx_n_ip_checksum;
297
static PyObject *__pyx_n_ip_cksum_add;
298
static PyObject *__pyx_n_ip_cksum_carry;
299
static PyObject *__pyx_n_ip_pack_hdr;
300
static PyObject *__pyx_n_IP6_ADDR_LEN;
301
static PyObject *__pyx_n_IP6_ADDR_BITS;
302
static PyObject *__pyx_n_IP6_HDR_LEN;
303
static PyObject *__pyx_n_IP6_LEN_MIN;
304
static PyObject *__pyx_n_IP6_LEN_MAX;
305
static PyObject *__pyx_n_IP6_MTU_MIN;
306
static PyObject *__pyx_n_IP6_HLIM_DEFAULT;
307
static PyObject *__pyx_n_IP6_HLIM_MAX;
308
static PyObject *__pyx_n_IP6_ADDR_UNSPEC;
309
static PyObject *__pyx_n_IP6_ADDR_LOOPBACK;
310
static PyObject *__pyx_n_ip6_ntoa;
311
static PyObject *__pyx_n_ip6_aton;
312
static PyObject *__pyx_n_ip6_checksum;
313
static PyObject *__pyx_n_ip6_pack_hdr;
314
static PyObject *__pyx_n_ADDR_TYPE_NONE;
315
static PyObject *__pyx_n_ADDR_TYPE_ETH;
316
static PyObject *__pyx_n_ADDR_TYPE_IP;
317
static PyObject *__pyx_n_ADDR_TYPE_IP6;
318
static PyObject *__pyx_n_ARP_HDR_LEN;
319
static PyObject *__pyx_n_ARP_ETHIP_LEN;
320
static PyObject *__pyx_n_ARP_HRD_ETH;
321
static PyObject *__pyx_n_ARP_HRD_IEEE802;
322
static PyObject *__pyx_n_ARP_PRO_IP;
323
static PyObject *__pyx_n_ARP_OP_REQUEST;
324
static PyObject *__pyx_n_ARP_OP_REPLY;
325
static PyObject *__pyx_n_ARP_OP_REVREQUEST;
326
static PyObject *__pyx_n_ARP_OP_REVREPLY;
327
static PyObject *__pyx_n_arp_pack_hdr_ethip;
328
static PyObject *__pyx_n_icmp_pack_hdr;
329
static PyObject *__pyx_n_TCP_HDR_LEN;
460
static PyObject *__pyx_n_TCP_HDR_LEN;
330
static PyObject *__pyx_n_TH_FIN;
331
static PyObject *__pyx_n_TH_SYN;
332
static PyObject *__pyx_n_TH_RST;
333
static PyObject *__pyx_n_TH_PUSH;
334
static PyObject *__pyx_n_TH_ACK;
335
static PyObject *__pyx_n_TH_URG;
336
static PyObject *__pyx_n_TH_ECE;
337
static PyObject *__pyx_n_TH_CWR;
338
static PyObject *__pyx_n_TCP_PORT_MAX;
339
static PyObject *__pyx_n_TCP_WIN_MAX;
340
static PyObject *__pyx_n_TCP_OPT_EOL;
341
static PyObject *__pyx_n_TCP_OPT_NOP;
342
static PyObject *__pyx_n_TCP_OPT_MSS;
343
static PyObject *__pyx_n_TCP_OPT_WSCALE;
344
static PyObject *__pyx_n_TCP_OPT_SACKOK;
345
static PyObject *__pyx_n_TCP_OPT_SACK;
346
static PyObject *__pyx_n_TCP_OPT_ECHO;
347
static PyObject *__pyx_n_TCP_OPT_ECHOREPLY;
348
static PyObject *__pyx_n_TCP_OPT_TIMESTAMP;
349
static PyObject *__pyx_n_TCP_OPT_POCONN;
350
static PyObject *__pyx_n_TCP_OPT_POSVC;
351
static PyObject *__pyx_n_TCP_OPT_CC;
352
static PyObject *__pyx_n_TCP_OPT_CCNEW;
353
static PyObject *__pyx_n_TCP_OPT_CCECHO;
354
static PyObject *__pyx_n_TCP_OPT_ALTSUM;
461
static PyObject *__pyx_n_TCP_OPT_ALTSUM;
355
static PyObject *__pyx_n_TCP_OPT_ALTSUMDATA;
462
static PyObject *__pyx_n_TCP_OPT_ALTSUMDATA;
356
static PyObject *__pyx_n_TCP_OPT_SKEETER;
357
static PyObject *__pyx_n_TCP_OPT_BUBBA;
463
static PyObject *__pyx_n_TCP_OPT_BUBBA;
358
static PyObject *__pyx_n_TCP_OPT_TRAILSUM;
464
static PyObject *__pyx_n_TCP_OPT_CC;
465
static PyObject *__pyx_n_TCP_OPT_CCECHO;
466
static PyObject *__pyx_n_TCP_OPT_CCNEW;
467
static PyObject *__pyx_n_TCP_OPT_CORRUPT;
468
static PyObject *__pyx_n_TCP_OPT_ECHO;
469
static PyObject *__pyx_n_TCP_OPT_ECHOREPLY;
470
static PyObject *__pyx_n_TCP_OPT_EOL;
471
static PyObject *__pyx_n_TCP_OPT_MAX;
359
static PyObject *__pyx_n_TCP_OPT_MD5;
472
static PyObject *__pyx_n_TCP_OPT_MD5;
473
static PyObject *__pyx_n_TCP_OPT_MSS;
474
static PyObject *__pyx_n_TCP_OPT_NOP;
475
static PyObject *__pyx_n_TCP_OPT_POCONN;
476
static PyObject *__pyx_n_TCP_OPT_POSVC;
477
static PyObject *__pyx_n_TCP_OPT_REC;
478
static PyObject *__pyx_n_TCP_OPT_SACK;
479
static PyObject *__pyx_n_TCP_OPT_SACKOK;
360
static PyObject *__pyx_n_TCP_OPT_SCPS;
480
static PyObject *__pyx_n_TCP_OPT_SCPS;
481
static PyObject *__pyx_n_TCP_OPT_SKEETER;
361
static PyObject *__pyx_n_TCP_OPT_SNACK;
482
static PyObject *__pyx_n_TCP_OPT_SNACK;
362
static PyObject *__pyx_n_TCP_OPT_REC;
363
static PyObject *__pyx_n_TCP_OPT_CORRUPT;
364
static PyObject *__pyx_n_TCP_OPT_SNAP;
483
static PyObject *__pyx_n_TCP_OPT_SNAP;
365
static PyObject *__pyx_n_TCP_OPT_TCPCOMP;
484
static PyObject *__pyx_n_TCP_OPT_TCPCOMP;
366
static PyObject *__pyx_n_TCP_OPT_MAX;
485
static PyObject *__pyx_n_TCP_OPT_TIMESTAMP;
367
static PyObject *__pyx_n_tcp_pack_hdr;
486
static PyObject *__pyx_n_TCP_OPT_TRAILSUM;
487
static PyObject *__pyx_n_TCP_OPT_WSCALE;
488
static PyObject *__pyx_n_TCP_PORT_MAX;
489
static PyObject *__pyx_n_TCP_WIN_MAX;
490
static PyObject *__pyx_n_TH_ACK;
491
static PyObject *__pyx_n_TH_CWR;
492
static PyObject *__pyx_n_TH_ECE;
493
static PyObject *__pyx_n_TH_FIN;
494
static PyObject *__pyx_n_TH_PUSH;
495
static PyObject *__pyx_n_TH_RST;
496
static PyObject *__pyx_n_TH_SYN;
497
static PyObject *__pyx_n_TH_URG;
368
static PyObject *__pyx_n_UDP_HDR_LEN;
498
static PyObject *__pyx_n_UDP_HDR_LEN;
369
static PyObject *__pyx_n_UDP_PORT_MAX;
499
static PyObject *__pyx_n_UDP_PORT_MAX;
370
static PyObject *__pyx_n_udp_pack_hdr;
500
static PyObject *__pyx_n___author__;
371
static PyObject *__pyx_n_INTF_TYPE_OTHER;
501
static PyObject *__pyx_n___copy__;
372
static PyObject *__pyx_n_INTF_TYPE_ETH;
502
static PyObject *__pyx_n___copyright__;
373
static PyObject *__pyx_n_INTF_TYPE_LOOPBACK;
503
static PyObject *__pyx_n___int__;
374
static PyObject *__pyx_n_INTF_TYPE_TUN;
504
static PyObject *__pyx_n___iter_append;
375
static PyObject *__pyx_n_INTF_FLAG_UP;
505
static PyObject *__pyx_n___license__;
376
static PyObject *__pyx_n_INTF_FLAG_LOOPBACK;
506
static PyObject *__pyx_n___url__;
377
static PyObject *__pyx_n_INTF_FLAG_POINTOPOINT;
507
static PyObject *__pyx_n___version__;
378
static PyObject *__pyx_n_INTF_FLAG_NOARP;
508
static PyObject *__pyx_n_addr;
379
static PyObject *__pyx_n_INTF_FLAG_BROADCAST;
509
static PyObject *__pyx_n_alias_addrs;
380
static PyObject *__pyx_n_INTF_FLAG_MULTICAST;
510
static PyObject *__pyx_n_append;
381
static PyObject *__pyx_n_FW_OP_ALLOW;
511
static PyObject *__pyx_n_device;
382
static PyObject *__pyx_n_FW_OP_BLOCK;
512
static PyObject *__pyx_n_dir;
383
static PyObject *__pyx_n_FW_DIR_IN;
513
static PyObject *__pyx_n_dport;
384
static PyObject *__pyx_n_FW_DIR_OUT;
514
static PyObject *__pyx_n_dst;
385
static PyObject *__pyx_n_BSD;
515
static PyObject *__pyx_n_dst_addr;
516
static PyObject *__pyx_n_eth;
517
static PyObject *__pyx_n_flags;
518
static PyObject *__pyx_n_ip;
519
static PyObject *__pyx_n_ip6;
520
static PyObject *__pyx_n_link_addr;
521
static PyObject *__pyx_n_loop;
522
static PyObject *__pyx_n_mtu;
523
static PyObject *__pyx_n_name;
524
static PyObject *__pyx_n_op;
525
static PyObject *__pyx_n_proto;
526
static PyObject *__pyx_n_sport;
527
static PyObject *__pyx_n_src;
528
static PyObject *__pyx_n_type;
386
529
530
static PyObject *__pyx_k1p;
531
static PyObject *__pyx_k3p;
532
static PyObject *__pyx_k4p;
533
static PyObject *__pyx_k5p;
387
static PyObject *__pyx_k9p;
534
static PyObject *__pyx_k9p;
388
static PyObject *__pyx_k10p;
535
static PyObject *__pyx_k14p;
389
static PyObject *__pyx_k12p;
536
static PyObject *__pyx_k16p;
390
static PyObject *__pyx_k13p;
537
static PyObject *__pyx_k18p;
538
static PyObject *__pyx_k20p;
539
static PyObject *__pyx_k21p;
540
static PyObject *__pyx_k23p;
541
static PyObject *__pyx_k27p;
542
static PyObject *__pyx_k49p;
543
static PyObject *__pyx_k50p;
544
static PyObject *__pyx_k59p;
545
static PyObject *__pyx_k61p;
546
static PyObject *__pyx_k65p;
547
static PyObject *__pyx_k67p;
391
548
392
static PyObject *__pyx_n_ValueError;
549
static __Pyx_StringTabEntry __pyx_string_tab[] = {
550
  {&__pyx_n_ADDR_TYPE_ETH, 1, __pyx_k10, sizeof(__pyx_k10)},
551
  {&__pyx_n_ADDR_TYPE_IP, 1, __pyx_k6, sizeof(__pyx_k6)},
552
  {&__pyx_n_ADDR_TYPE_IP6, 1, __pyx_k12, sizeof(__pyx_k12)},
553
  {&__pyx_n_ADDR_TYPE_NONE, 1, __pyx_k34, sizeof(__pyx_k34)},
554
  {&__pyx_n_ARP_ETHIP_LEN, 1, __pyx_k136, sizeof(__pyx_k136)},
555
  {&__pyx_n_ARP_HDR_LEN, 1, __pyx_k135, sizeof(__pyx_k135)},
556
  {&__pyx_n_ARP_HRD_ETH, 1, __pyx_k137, sizeof(__pyx_k137)},
557
  {&__pyx_n_ARP_HRD_IEEE802, 1, __pyx_k138, sizeof(__pyx_k138)},
558
  {&__pyx_n_ARP_OP_REPLY, 1, __pyx_k141, sizeof(__pyx_k141)},
559
  {&__pyx_n_ARP_OP_REQUEST, 1, __pyx_k140, sizeof(__pyx_k140)},
560
  {&__pyx_n_ARP_OP_REVREPLY, 1, __pyx_k143, sizeof(__pyx_k143)},
561
  {&__pyx_n_ARP_OP_REVREQUEST, 1, __pyx_k142, sizeof(__pyx_k142)},
562
  {&__pyx_n_ARP_PRO_IP, 1, __pyx_k139, sizeof(__pyx_k139)},
563
  {&__pyx_n_BSD, 1, __pyx_k63, sizeof(__pyx_k63)},
564
  {&__pyx_n_ETH_ADDR_BITS, 1, __pyx_k17, sizeof(__pyx_k17)},
565
  {&__pyx_n_ETH_ADDR_BROADCAST, 1, __pyx_k90, sizeof(__pyx_k90)},
566
  {&__pyx_n_ETH_ADDR_LEN, 1, __pyx_k15, sizeof(__pyx_k15)},
567
  {&__pyx_n_ETH_ADDR_UNSPEC, 1, __pyx_k88, sizeof(__pyx_k88)},
568
  {&__pyx_n_ETH_CRC_LEN, 1, __pyx_k70, sizeof(__pyx_k70)},
569
  {&__pyx_n_ETH_HDR_LEN, 1, __pyx_k71, sizeof(__pyx_k71)},
570
  {&__pyx_n_ETH_LEN_MAX, 1, __pyx_k73, sizeof(__pyx_k73)},
571
  {&__pyx_n_ETH_LEN_MIN, 1, __pyx_k72, sizeof(__pyx_k72)},
572
  {&__pyx_n_ETH_MIN, 1, __pyx_k75, sizeof(__pyx_k75)},
573
  {&__pyx_n_ETH_MTU, 1, __pyx_k74, sizeof(__pyx_k74)},
574
  {&__pyx_n_ETH_TYPE_8021Q, 1, __pyx_k80, sizeof(__pyx_k80)},
575
  {&__pyx_n_ETH_TYPE_ARP, 1, __pyx_k78, sizeof(__pyx_k78)},
576
  {&__pyx_n_ETH_TYPE_IP, 1, __pyx_k77, sizeof(__pyx_k77)},
577
  {&__pyx_n_ETH_TYPE_IPV6, 1, __pyx_k81, sizeof(__pyx_k81)},
578
  {&__pyx_n_ETH_TYPE_LEN, 1, __pyx_k69, sizeof(__pyx_k69)},
579
  {&__pyx_n_ETH_TYPE_LOOPBACK, 1, __pyx_k86, sizeof(__pyx_k86)},
580
  {&__pyx_n_ETH_TYPE_MPLS, 1, __pyx_k82, sizeof(__pyx_k82)},
581
  {&__pyx_n_ETH_TYPE_MPLS_MCAST, 1, __pyx_k83, sizeof(__pyx_k83)},
582
  {&__pyx_n_ETH_TYPE_PPPOE, 1, __pyx_k85, sizeof(__pyx_k85)},
583
  {&__pyx_n_ETH_TYPE_PPPOEDISC, 1, __pyx_k84, sizeof(__pyx_k84)},
584
  {&__pyx_n_ETH_TYPE_PUP, 1, __pyx_k76, sizeof(__pyx_k76)},
585
  {&__pyx_n_ETH_TYPE_REVARP, 1, __pyx_k79, sizeof(__pyx_k79)},
586
  {&__pyx_n_FW_DIR_IN, 1, __pyx_k196, sizeof(__pyx_k196)},
587
  {&__pyx_n_FW_DIR_OUT, 1, __pyx_k197, sizeof(__pyx_k197)},
588
  {&__pyx_n_FW_OP_ALLOW, 1, __pyx_k194, sizeof(__pyx_k194)},
589
  {&__pyx_n_FW_OP_BLOCK, 1, __pyx_k195, sizeof(__pyx_k195)},
590
  {&__pyx_n_INTF_FLAG_BROADCAST, 1, __pyx_k192, sizeof(__pyx_k192)},
591
  {&__pyx_n_INTF_FLAG_LOOPBACK, 1, __pyx_k189, sizeof(__pyx_k189)},
592
  {&__pyx_n_INTF_FLAG_MULTICAST, 1, __pyx_k193, sizeof(__pyx_k193)},
593
  {&__pyx_n_INTF_FLAG_NOARP, 1, __pyx_k191, sizeof(__pyx_k191)},
594
  {&__pyx_n_INTF_FLAG_POINTOPOINT, 1, __pyx_k190, sizeof(__pyx_k190)},
595
  {&__pyx_n_INTF_FLAG_UP, 1, __pyx_k188, sizeof(__pyx_k188)},
596
  {&__pyx_n_INTF_TYPE_ETH, 1, __pyx_k185, sizeof(__pyx_k185)},
597
  {&__pyx_n_INTF_TYPE_LOOPBACK, 1, __pyx_k186, sizeof(__pyx_k186)},
598
  {&__pyx_n_INTF_TYPE_OTHER, 1, __pyx_k184, sizeof(__pyx_k184)},
599
  {&__pyx_n_INTF_TYPE_TUN, 1, __pyx_k187, sizeof(__pyx_k187)},
600
  {&__pyx_n_IP6_ADDR_BITS, 1, __pyx_k24, sizeof(__pyx_k24)},
601
  {&__pyx_n_IP6_ADDR_LEN, 1, __pyx_k22, sizeof(__pyx_k22)},
602
  {&__pyx_n_IP6_ADDR_LOOPBACK, 1, __pyx_k134, sizeof(__pyx_k134)},
603
  {&__pyx_n_IP6_ADDR_UNSPEC, 1, __pyx_k132, sizeof(__pyx_k132)},
604
  {&__pyx_n_IP6_HDR_LEN, 1, __pyx_k125, sizeof(__pyx_k125)},
605
  {&__pyx_n_IP6_HLIM_DEFAULT, 1, __pyx_k129, sizeof(__pyx_k129)},
606
  {&__pyx_n_IP6_HLIM_MAX, 1, __pyx_k130, sizeof(__pyx_k130)},
607
  {&__pyx_n_IP6_LEN_MAX, 1, __pyx_k127, sizeof(__pyx_k127)},
608
  {&__pyx_n_IP6_LEN_MIN, 1, __pyx_k126, sizeof(__pyx_k126)},
609
  {&__pyx_n_IP6_MTU_MIN, 1, __pyx_k128, sizeof(__pyx_k128)},
610
  {&__pyx_n_IP_ADDR_ANY, 1, __pyx_k116, sizeof(__pyx_k116)},
611
  {&__pyx_n_IP_ADDR_BITS, 1, __pyx_k7, sizeof(__pyx_k7)},
612
  {&__pyx_n_IP_ADDR_BROADCAST, 1, __pyx_k118, sizeof(__pyx_k118)},
613
  {&__pyx_n_IP_ADDR_LEN, 1, __pyx_k19, sizeof(__pyx_k19)},
614
  {&__pyx_n_IP_ADDR_LOOPBACK, 1, __pyx_k120, sizeof(__pyx_k120)},
615
  {&__pyx_n_IP_ADDR_MCAST_ALL, 1, __pyx_k122, sizeof(__pyx_k122)},
616
  {&__pyx_n_IP_ADDR_MCAST_LOCAL, 1, __pyx_k124, sizeof(__pyx_k124)},
617
  {&__pyx_n_IP_DF, 1, __pyx_k99, sizeof(__pyx_k99)},
618
  {&__pyx_n_IP_HDR_LEN, 1, __pyx_k91, sizeof(__pyx_k91)},
619
  {&__pyx_n_IP_HDR_LEN_MAX, 1, __pyx_k94, sizeof(__pyx_k94)},
620
  {&__pyx_n_IP_LEN_MAX, 1, __pyx_k95, sizeof(__pyx_k95)},
621
  {&__pyx_n_IP_LEN_MIN, 1, __pyx_k96, sizeof(__pyx_k96)},
622
  {&__pyx_n_IP_MF, 1, __pyx_k100, sizeof(__pyx_k100)},
623
  {&__pyx_n_IP_OFFMASK, 1, __pyx_k101, sizeof(__pyx_k101)},
624
  {&__pyx_n_IP_OPT_LEN, 1, __pyx_k92, sizeof(__pyx_k92)},
625
  {&__pyx_n_IP_OPT_LEN_MAX, 1, __pyx_k93, sizeof(__pyx_k93)},
626
  {&__pyx_n_IP_PROTO_AH, 1, __pyx_k110, sizeof(__pyx_k110)},
627
  {&__pyx_n_IP_PROTO_ESP, 1, __pyx_k109, sizeof(__pyx_k109)},
628
  {&__pyx_n_IP_PROTO_GRE, 1, __pyx_k108, sizeof(__pyx_k108)},
629
  {&__pyx_n_IP_PROTO_ICMP, 1, __pyx_k105, sizeof(__pyx_k105)},
630
  {&__pyx_n_IP_PROTO_ICMPV6, 1, __pyx_k111, sizeof(__pyx_k111)},
631
  {&__pyx_n_IP_PROTO_IGMP, 1, __pyx_k106, sizeof(__pyx_k106)},
632
  {&__pyx_n_IP_PROTO_IP, 1, __pyx_k104, sizeof(__pyx_k104)},
633
  {&__pyx_n_IP_PROTO_IPV6, 1, __pyx_k107, sizeof(__pyx_k107)},
634
  {&__pyx_n_IP_PROTO_MAX, 1, __pyx_k114, sizeof(__pyx_k114)},
635
  {&__pyx_n_IP_PROTO_RAW, 1, __pyx_k112, sizeof(__pyx_k112)},
636
  {&__pyx_n_IP_PROTO_RESERVED, 1, __pyx_k113, sizeof(__pyx_k113)},
637
  {&__pyx_n_IP_PROTO_TCP, 1, __pyx_k47, sizeof(__pyx_k47)},
638
  {&__pyx_n_IP_PROTO_UDP, 1, __pyx_k48, sizeof(__pyx_k48)},
639
  {&__pyx_n_IP_RF, 1, __pyx_k98, sizeof(__pyx_k98)},
640
  {&__pyx_n_IP_TOS_DEFAULT, 1, __pyx_k97, sizeof(__pyx_k97)},
641
  {&__pyx_n_IP_TTL_DEFAULT, 1, __pyx_k102, sizeof(__pyx_k102)},
642
  {&__pyx_n_IP_TTL_MAX, 1, __pyx_k103, sizeof(__pyx_k103)},
643
  {&__pyx_n_TCP_HDR_LEN, 1, __pyx_k144, sizeof(__pyx_k144)},
644
  {&__pyx_n_TCP_OPT_ALTSUM, 1, __pyx_k169, sizeof(__pyx_k169)},
645
  {&__pyx_n_TCP_OPT_ALTSUMDATA, 1, __pyx_k170, sizeof(__pyx_k170)},
646
  {&__pyx_n_TCP_OPT_BUBBA, 1, __pyx_k172, sizeof(__pyx_k172)},
647
  {&__pyx_n_TCP_OPT_CC, 1, __pyx_k166, sizeof(__pyx_k166)},
648
  {&__pyx_n_TCP_OPT_CCECHO, 1, __pyx_k168, sizeof(__pyx_k168)},
649
  {&__pyx_n_TCP_OPT_CCNEW, 1, __pyx_k167, sizeof(__pyx_k167)},
650
  {&__pyx_n_TCP_OPT_CORRUPT, 1, __pyx_k178, sizeof(__pyx_k178)},
651
  {&__pyx_n_TCP_OPT_ECHO, 1, __pyx_k161, sizeof(__pyx_k161)},
652
  {&__pyx_n_TCP_OPT_ECHOREPLY, 1, __pyx_k162, sizeof(__pyx_k162)},
653
  {&__pyx_n_TCP_OPT_EOL, 1, __pyx_k155, sizeof(__pyx_k155)},
654
  {&__pyx_n_TCP_OPT_MAX, 1, __pyx_k181, sizeof(__pyx_k181)},
655
  {&__pyx_n_TCP_OPT_MD5, 1, __pyx_k174, sizeof(__pyx_k174)},
656
  {&__pyx_n_TCP_OPT_MSS, 1, __pyx_k157, sizeof(__pyx_k157)},
657
  {&__pyx_n_TCP_OPT_NOP, 1, __pyx_k156, sizeof(__pyx_k156)},
658
  {&__pyx_n_TCP_OPT_POCONN, 1, __pyx_k164, sizeof(__pyx_k164)},
659
  {&__pyx_n_TCP_OPT_POSVC, 1, __pyx_k165, sizeof(__pyx_k165)},
660
  {&__pyx_n_TCP_OPT_REC, 1, __pyx_k177, sizeof(__pyx_k177)},
661
  {&__pyx_n_TCP_OPT_SACK, 1, __pyx_k160, sizeof(__pyx_k160)},
662
  {&__pyx_n_TCP_OPT_SACKOK, 1, __pyx_k159, sizeof(__pyx_k159)},
663
  {&__pyx_n_TCP_OPT_SCPS, 1, __pyx_k175, sizeof(__pyx_k175)},
664
  {&__pyx_n_TCP_OPT_SKEETER, 1, __pyx_k171, sizeof(__pyx_k171)},
665
  {&__pyx_n_TCP_OPT_SNACK, 1, __pyx_k176, sizeof(__pyx_k176)},
666
  {&__pyx_n_TCP_OPT_SNAP, 1, __pyx_k179, sizeof(__pyx_k179)},
667
  {&__pyx_n_TCP_OPT_TCPCOMP, 1, __pyx_k180, sizeof(__pyx_k180)},
668
  {&__pyx_n_TCP_OPT_TIMESTAMP, 1, __pyx_k163, sizeof(__pyx_k163)},
669
  {&__pyx_n_TCP_OPT_TRAILSUM, 1, __pyx_k173, sizeof(__pyx_k173)},
670
  {&__pyx_n_TCP_OPT_WSCALE, 1, __pyx_k158, sizeof(__pyx_k158)},
671
  {&__pyx_n_TCP_PORT_MAX, 1, __pyx_k153, sizeof(__pyx_k153)},
672
  {&__pyx_n_TCP_WIN_MAX, 1, __pyx_k154, sizeof(__pyx_k154)},
673
  {&__pyx_n_TH_ACK, 1, __pyx_k149, sizeof(__pyx_k149)},
674
  {&__pyx_n_TH_CWR, 1, __pyx_k152, sizeof(__pyx_k152)},
675
  {&__pyx_n_TH_ECE, 1, __pyx_k151, sizeof(__pyx_k151)},
676
  {&__pyx_n_TH_FIN, 1, __pyx_k145, sizeof(__pyx_k145)},
677
  {&__pyx_n_TH_PUSH, 1, __pyx_k148, sizeof(__pyx_k148)},
678
  {&__pyx_n_TH_RST, 1, __pyx_k147, sizeof(__pyx_k147)},
679
  {&__pyx_n_TH_SYN, 1, __pyx_k146, sizeof(__pyx_k146)},
680
  {&__pyx_n_TH_URG, 1, __pyx_k150, sizeof(__pyx_k150)},
681
  {&__pyx_n_UDP_HDR_LEN, 1, __pyx_k182, sizeof(__pyx_k182)},
682
  {&__pyx_n_UDP_PORT_MAX, 1, __pyx_k183, sizeof(__pyx_k183)},
683
  {&__pyx_n___author__, 1, __pyx_k60, sizeof(__pyx_k60)},
684
  {&__pyx_n___copy__, 1, __pyx_k25, sizeof(__pyx_k25)},
685
  {&__pyx_n___copyright__, 1, __pyx_k62, sizeof(__pyx_k62)},
686
  {&__pyx_n___int__, 1, __pyx_k26, sizeof(__pyx_k26)},
687
  {&__pyx_n___iter_append, 1, __pyx_k29, sizeof(__pyx_k29)},
688
  {&__pyx_n___license__, 1, __pyx_k64, sizeof(__pyx_k64)},
689
  {&__pyx_n___url__, 1, __pyx_k66, sizeof(__pyx_k66)},
690
  {&__pyx_n___version__, 1, __pyx_k68, sizeof(__pyx_k68)},
691
  {&__pyx_n_addr, 1, __pyx_k35, sizeof(__pyx_k35)},
692
  {&__pyx_n_alias_addrs, 1, __pyx_k38, sizeof(__pyx_k38)},
693
  {&__pyx_n_append, 1, __pyx_k2, sizeof(__pyx_k2)},
694
  {&__pyx_n_device, 1, __pyx_k39, sizeof(__pyx_k39)},
695
  {&__pyx_n_dir, 1, __pyx_k41, sizeof(__pyx_k41)},
696
  {&__pyx_n_dport, 1, __pyx_k46, sizeof(__pyx_k46)},
697
  {&__pyx_n_dst, 1, __pyx_k44, sizeof(__pyx_k44)},
698
  {&__pyx_n_dst_addr, 1, __pyx_k36, sizeof(__pyx_k36)},
699
  {&__pyx_n_eth, 1, __pyx_k11, sizeof(__pyx_k11)},
700
  {&__pyx_n_flags, 1, __pyx_k32, sizeof(__pyx_k32)},
701
  {&__pyx_n_ip, 1, __pyx_k8, sizeof(__pyx_k8)},
702
  {&__pyx_n_ip6, 1, __pyx_k13, sizeof(__pyx_k13)},
703
  {&__pyx_n_link_addr, 1, __pyx_k37, sizeof(__pyx_k37)},
704
  {&__pyx_n_loop, 1, __pyx_k28, sizeof(__pyx_k28)},
705
  {&__pyx_n_mtu, 1, __pyx_k33, sizeof(__pyx_k33)},
706
  {&__pyx_n_name, 1, __pyx_k30, sizeof(__pyx_k30)},
707
  {&__pyx_n_op, 1, __pyx_k40, sizeof(__pyx_k40)},
708
  {&__pyx_n_proto, 1, __pyx_k42, sizeof(__pyx_k42)},
709
  {&__pyx_n_sport, 1, __pyx_k45, sizeof(__pyx_k45)},
710
  {&__pyx_n_src, 1, __pyx_k43, sizeof(__pyx_k43)},
711
  {&__pyx_n_type, 1, __pyx_k31, sizeof(__pyx_k31)},
712
  {&__pyx_k1p, 0, __pyx_k1, sizeof(__pyx_k1)},
713
  {&__pyx_k3p, 0, __pyx_k3, sizeof(__pyx_k3)},
714
  {&__pyx_k4p, 0, __pyx_k4, sizeof(__pyx_k4)},
715
  {&__pyx_k5p, 0, __pyx_k5, sizeof(__pyx_k5)},
716
  {&__pyx_k9p, 0, __pyx_k9, sizeof(__pyx_k9)},
717
  {&__pyx_k14p, 0, __pyx_k14, sizeof(__pyx_k14)},
718
  {&__pyx_k16p, 0, __pyx_k16, sizeof(__pyx_k16)},
719
  {&__pyx_k18p, 0, __pyx_k18, sizeof(__pyx_k18)},
720
  {&__pyx_k20p, 0, __pyx_k20, sizeof(__pyx_k20)},
721
  {&__pyx_k21p, 0, __pyx_k21, sizeof(__pyx_k21)},
722
  {&__pyx_k23p, 0, __pyx_k23, sizeof(__pyx_k23)},
723
  {&__pyx_k27p, 0, __pyx_k27, sizeof(__pyx_k27)},
724
  {&__pyx_k49p, 0, __pyx_k49, sizeof(__pyx_k49)},
725
  {&__pyx_k50p, 0, __pyx_k50, sizeof(__pyx_k50)},
726
  {&__pyx_k59p, 0, __pyx_k59, sizeof(__pyx_k59)},
727
  {&__pyx_k61p, 0, __pyx_k61, sizeof(__pyx_k61)},
728
  {&__pyx_k65p, 0, __pyx_k65, sizeof(__pyx_k65)},
729
  {&__pyx_k67p, 0, __pyx_k67, sizeof(__pyx_k67)},
730
  {0, 0, 0, 0}
731
};
732
733
static PyObject *__pyx_d1;
734
static PyObject *__pyx_d2;
735
static PyObject *__pyx_d3;
736
static PyObject *__pyx_d4;
737
static PyObject *__pyx_d5;
738
static PyObject *__pyx_d6;
739
static PyObject *__pyx_d7;
740
static PyObject *__pyx_d8;
741
static PyObject *__pyx_d9;
742
static PyObject *__pyx_d10;
743
static PyObject *__pyx_d11;
744
static PyObject *__pyx_d12;
745
static PyObject *__pyx_d13;
746
static PyObject *__pyx_d14;
747
static PyObject *__pyx_d15;
748
static PyObject *__pyx_d16;
749
static PyObject *__pyx_d17;
750
static PyObject *__pyx_d18;
751
static PyObject *__pyx_d19;
752
static PyObject *__pyx_d20;
753
static PyObject *__pyx_d21;
754
static PyObject *__pyx_d22;
755
static PyObject *__pyx_d23;
756
static PyObject *__pyx_d24;
757
static PyObject *__pyx_d25;
758
static PyObject *__pyx_d26;
759
static PyObject *__pyx_d27;
760
static PyObject *__pyx_d28;
761
static PyObject *__pyx_d29;
762
static PyObject *__pyx_d30;
763
static PyObject *__pyx_d31;
764
static PyObject *__pyx_d32;
765
static PyObject *__pyx_d33;
766
static PyObject *__pyx_d34;
767
static PyObject *__pyx_d35;
768
static PyObject *__pyx_d36;
769
static PyObject *__pyx_d37;
393
770
394
static PyObject *__pyx_k60p;
395
771
396
static char (__pyx_k60[]) = "not a %d-byte binary string: %r";
772
/* Implementation of dnet */
397
773
398
static PyObject *__pyx_f_4dnet___memcpy(char (*__pyx_v_dst),PyObject *__pyx_v_src,int __pyx_v_n) {
774
static PyObject *__pyx_f_4dnet___memcpy(char *__pyx_v_dst,PyObject *__pyx_v_src,int __pyx_v_n) {
399
  PyObject *__pyx_r;
775
  PyObject *__pyx_r;
400
  int __pyx_1;
776
  int __pyx_1;
401
  PyObject *__pyx_2 = 0;
777
  PyObject *__pyx_2 = 0;
402
  PyObject *__pyx_3 = 0;
778
  PyObject *__pyx_3 = 0;
403
  PyObject *__pyx_4 = 0;
779
  char *__pyx_4;
404
  char (*__pyx_5);
405
  Py_INCREF(__pyx_v_src);
780
  Py_INCREF(__pyx_v_src);
406
781
407
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":44 */
782
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":44 */
408
  __pyx_1 = (PyString_Size(__pyx_v_src) != __pyx_v_n);
783
  __pyx_1 = (PyString_Size(__pyx_v_src) != __pyx_v_n);
409
  if (__pyx_1) {
784
  if (__pyx_1) {
410
785
    __pyx_2 = PyInt_FromLong(__pyx_v_n); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;}
411
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":45 */
786
    __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;}
412
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;}
787
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
413
    __pyx_3 = PyInt_FromLong(__pyx_v_n); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;}
414
    __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;}
415
    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
416
    Py_INCREF(__pyx_v_src);
788
    Py_INCREF(__pyx_v_src);
417
    PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_src);
789
    PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_src);
418
    __pyx_3 = 0;
790
    __pyx_2 = 0;
419
    __pyx_3 = PyNumber_Remainder(__pyx_k60p, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;}
791
    __pyx_2 = PyNumber_Remainder(__pyx_k1p, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;}
420
    Py_DECREF(__pyx_4); __pyx_4 = 0;
421
    __Pyx_Raise(__pyx_2, __pyx_3, 0);
422
    Py_DECREF(__pyx_2); __pyx_2 = 0;
423
    Py_DECREF(__pyx_3); __pyx_3 = 0;
792
    Py_DECREF(__pyx_3); __pyx_3 = 0;
793
    __Pyx_Raise(PyExc_ValueError, __pyx_2, 0);
794
    Py_DECREF(__pyx_2); __pyx_2 = 0;
424
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;}
795
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;}
425
    goto __pyx_L2;
796
    goto __pyx_L2;
426
  }
797
  }
427
  __pyx_L2:;
798
  __pyx_L2:;
428
799
429
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":46 */
800
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":46 */
430
  __pyx_5 = PyString_AsString(__pyx_v_src); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; goto __pyx_L1;}
801
  __pyx_4 = PyString_AsString(__pyx_v_src); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; goto __pyx_L1;}
431
  memcpy(__pyx_v_dst,__pyx_5,__pyx_v_n);
802
  memcpy(__pyx_v_dst,__pyx_4,__pyx_v_n);
432
803
433
  __pyx_r = Py_None; Py_INCREF(Py_None);
804
  __pyx_r = Py_None; Py_INCREF(Py_None);
434
  goto __pyx_L0;
805
  goto __pyx_L0;
435
  __pyx_L1:;
806
  __pyx_L1:;
436
  Py_XDECREF(__pyx_2);
807
  Py_XDECREF(__pyx_2);
437
  Py_XDECREF(__pyx_3);
808
  Py_XDECREF(__pyx_3);
438
  Py_XDECREF(__pyx_4);
439
  __Pyx_AddTraceback("dnet.__memcpy");
809
  __Pyx_AddTraceback("dnet.__memcpy");
440
  __pyx_r = 0;
810
  __pyx_r = 0;
441
  __pyx_L0:;
811
  __pyx_L0:;
Lines 448-454 Link Here
448
  PyObject *__pyx_r;
818
  PyObject *__pyx_r;
449
  PyObject *__pyx_1 = 0;
819
  PyObject *__pyx_1 = 0;
450
820
451
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":50 */
821
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":50 */
452
  __pyx_1 = PyString_FromString(strerror(errno)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; goto __pyx_L1;}
822
  __pyx_1 = PyString_FromString(strerror(errno)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; goto __pyx_L1;}
453
  __pyx_r = __pyx_1;
823
  __pyx_r = __pyx_1;
454
  __pyx_1 = 0;
824
  __pyx_1 = 0;
Lines 464-471 Link Here
464
  return __pyx_r;
834
  return __pyx_r;
465
}
835
}
466
836
467
static PyObject *__pyx_n_append;
468
469
static PyObject *__pyx_f_4dnet___iter_append(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
837
static PyObject *__pyx_f_4dnet___iter_append(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
470
static PyObject *__pyx_f_4dnet___iter_append(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
838
static PyObject *__pyx_f_4dnet___iter_append(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
471
  PyObject *__pyx_v_entry = 0;
839
  PyObject *__pyx_v_entry = 0;
Lines 478-490 Link Here
478
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_entry, &__pyx_v_l)) return 0;
846
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_entry, &__pyx_v_l)) return 0;
479
  Py_INCREF(__pyx_v_entry);
847
  Py_INCREF(__pyx_v_entry);
480
  Py_INCREF(__pyx_v_l);
848
  Py_INCREF(__pyx_v_l);
481
482
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":53 */
483
  __pyx_1 = PyObject_GetAttr(__pyx_v_l, __pyx_n_append); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; goto __pyx_L1;}
849
  __pyx_1 = PyObject_GetAttr(__pyx_v_l, __pyx_n_append); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; goto __pyx_L1;}
484
  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; goto __pyx_L1;}
850
  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; goto __pyx_L1;}
485
  Py_INCREF(__pyx_v_entry);
851
  Py_INCREF(__pyx_v_entry);
486
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_entry);
852
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_entry);
487
  __pyx_3 = PyObject_Call(__pyx_1, __pyx_2, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; goto __pyx_L1;}
853
  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; goto __pyx_L1;}
488
  Py_DECREF(__pyx_1); __pyx_1 = 0;
854
  Py_DECREF(__pyx_1); __pyx_1 = 0;
489
  Py_DECREF(__pyx_2); __pyx_2 = 0;
855
  Py_DECREF(__pyx_2); __pyx_2 = 0;
490
  Py_DECREF(__pyx_3); __pyx_3 = 0;
856
  Py_DECREF(__pyx_3); __pyx_3 = 0;
Lines 503-537 Link Here
503
  return __pyx_r;
869
  return __pyx_r;
504
}
870
}
505
871
506
static PyObject *__pyx_n_OSError;
507
508
static int __pyx_f_4dnet_3eth___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
872
static int __pyx_f_4dnet_3eth___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
509
static int __pyx_f_4dnet_3eth___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
873
static int __pyx_f_4dnet_3eth___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
510
  PyObject *__pyx_v_device = 0;
874
  PyObject *__pyx_v_device = 0;
511
  int __pyx_r;
875
  int __pyx_r;
512
  char (*__pyx_1);
876
  char *__pyx_1;
513
  int __pyx_2;
877
  int __pyx_2;
514
  PyObject *__pyx_3 = 0;
878
  PyObject *__pyx_3 = 0;
515
  PyObject *__pyx_4 = 0;
516
  static char *__pyx_argnames[] = {"device",0};
879
  static char *__pyx_argnames[] = {"device",0};
517
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_device)) return -1;
880
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_device)) return -1;
518
  Py_INCREF(__pyx_v_self);
881
  Py_INCREF(__pyx_v_self);
519
  Py_INCREF(__pyx_v_device);
882
  Py_INCREF(__pyx_v_device);
520
883
521
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":110 */
884
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":110 */
522
  __pyx_1 = PyString_AsString(__pyx_v_device); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; goto __pyx_L1;}
885
  __pyx_1 = PyString_AsString(__pyx_v_device); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; goto __pyx_L1;}
523
  ((struct __pyx_obj_4dnet_eth *)__pyx_v_self)->eth = eth_open(__pyx_1);
886
  ((struct __pyx_obj_4dnet_eth *)__pyx_v_self)->eth = eth_open(__pyx_1);
524
887
525
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":111 */
888
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":111 */
526
  __pyx_2 = (!(((struct __pyx_obj_4dnet_eth *)__pyx_v_self)->eth != 0));
889
  __pyx_2 = (!(((struct __pyx_obj_4dnet_eth *)__pyx_v_self)->eth != 0));
527
  if (__pyx_2) {
890
  if (__pyx_2) {
528
891
    __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; goto __pyx_L1;}
529
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":112 */
892
    __Pyx_Raise(PyExc_OSError, __pyx_3, 0);
530
    __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; goto __pyx_L1;}
531
    __pyx_4 = __pyx_f_4dnet___oserror(); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; goto __pyx_L1;}
532
    __Pyx_Raise(__pyx_3, __pyx_4, 0);
533
    Py_DECREF(__pyx_3); __pyx_3 = 0;
893
    Py_DECREF(__pyx_3); __pyx_3 = 0;
534
    Py_DECREF(__pyx_4); __pyx_4 = 0;
535
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; goto __pyx_L1;}
894
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; goto __pyx_L1;}
536
    goto __pyx_L2;
895
    goto __pyx_L2;
537
  }
896
  }
Lines 541-547 Link Here
541
  goto __pyx_L0;
900
  goto __pyx_L0;
542
  __pyx_L1:;
901
  __pyx_L1:;
543
  Py_XDECREF(__pyx_3);
902
  Py_XDECREF(__pyx_3);
544
  Py_XDECREF(__pyx_4);
545
  __Pyx_AddTraceback("dnet.eth.__init__");
903
  __Pyx_AddTraceback("dnet.eth.__init__");
546
  __pyx_r = -1;
904
  __pyx_r = -1;
547
  __pyx_L0:;
905
  __pyx_L0:;
Lines 557-583 Link Here
557
  PyObject *__pyx_r;
915
  PyObject *__pyx_r;
558
  int __pyx_1;
916
  int __pyx_1;
559
  PyObject *__pyx_2 = 0;
917
  PyObject *__pyx_2 = 0;
560
  PyObject *__pyx_3 = 0;
561
  static char *__pyx_argnames[] = {0};
918
  static char *__pyx_argnames[] = {0};
562
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
919
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
563
  Py_INCREF(__pyx_v_self);
920
  Py_INCREF(__pyx_v_self);
564
921
565
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":118 */
922
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":118 */
566
  __pyx_1 = (eth_get(((struct __pyx_obj_4dnet_eth *)__pyx_v_self)->eth,(&__pyx_v_ea)) < 0);
923
  __pyx_1 = (eth_get(((struct __pyx_obj_4dnet_eth *)__pyx_v_self)->eth,(&__pyx_v_ea)) < 0);
567
  if (__pyx_1) {
924
  if (__pyx_1) {
568
925
    __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;}
569
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":119 */
926
    __Pyx_Raise(PyExc_OSError, __pyx_2, 0);
570
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;}
571
    __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;}
572
    __Pyx_Raise(__pyx_2, __pyx_3, 0);
573
    Py_DECREF(__pyx_2); __pyx_2 = 0;
927
    Py_DECREF(__pyx_2); __pyx_2 = 0;
574
    Py_DECREF(__pyx_3); __pyx_3 = 0;
575
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;}
928
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;}
576
    goto __pyx_L2;
929
    goto __pyx_L2;
577
  }
930
  }
578
  __pyx_L2:;
931
  __pyx_L2:;
579
932
580
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":120 */
933
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":120 */
581
  __pyx_2 = PyString_FromStringAndSize(__pyx_v_ea.data,6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;}
934
  __pyx_2 = PyString_FromStringAndSize(__pyx_v_ea.data,6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;}
582
  __pyx_r = __pyx_2;
935
  __pyx_r = __pyx_2;
583
  __pyx_2 = 0;
936
  __pyx_2 = 0;
Lines 587-593 Link Here
587
  goto __pyx_L0;
940
  goto __pyx_L0;
588
  __pyx_L1:;
941
  __pyx_L1:;
589
  Py_XDECREF(__pyx_2);
942
  Py_XDECREF(__pyx_2);
590
  Py_XDECREF(__pyx_3);
591
  __Pyx_AddTraceback("dnet.eth.get");
943
  __Pyx_AddTraceback("dnet.eth.get");
592
  __pyx_r = 0;
944
  __pyx_r = 0;
593
  __pyx_L0:;
945
  __pyx_L0:;
Lines 603-628 Link Here
603
  PyObject *__pyx_r;
955
  PyObject *__pyx_r;
604
  PyObject *__pyx_1 = 0;
956
  PyObject *__pyx_1 = 0;
605
  int __pyx_2;
957
  int __pyx_2;
606
  PyObject *__pyx_3 = 0;
607
  static char *__pyx_argnames[] = {"value",0};
958
  static char *__pyx_argnames[] = {"value",0};
608
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_value)) return 0;
959
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_value)) return 0;
609
  Py_INCREF(__pyx_v_self);
960
  Py_INCREF(__pyx_v_self);
610
  Py_INCREF(__pyx_v_value);
961
  Py_INCREF(__pyx_v_value);
611
962
612
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":130 */
963
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":130 */
613
  __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;}
964
  __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;}
614
  Py_DECREF(__pyx_1); __pyx_1 = 0;
965
  Py_DECREF(__pyx_1); __pyx_1 = 0;
615
966
616
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":131 */
967
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":131 */
617
  __pyx_2 = (eth_set(((struct __pyx_obj_4dnet_eth *)__pyx_v_self)->eth,(&__pyx_v_ea)) < 0);
968
  __pyx_2 = (eth_set(((struct __pyx_obj_4dnet_eth *)__pyx_v_self)->eth,(&__pyx_v_ea)) < 0);
618
  if (__pyx_2) {
969
  if (__pyx_2) {
619
970
    __pyx_1 = __pyx_f_4dnet___oserror(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; goto __pyx_L1;}
620
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":132 */
971
    __Pyx_Raise(PyExc_OSError, __pyx_1, 0);
621
    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; goto __pyx_L1;}
622
    __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; goto __pyx_L1;}
623
    __Pyx_Raise(__pyx_1, __pyx_3, 0);
624
    Py_DECREF(__pyx_1); __pyx_1 = 0;
972
    Py_DECREF(__pyx_1); __pyx_1 = 0;
625
    Py_DECREF(__pyx_3); __pyx_3 = 0;
626
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; goto __pyx_L1;}
973
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; goto __pyx_L1;}
627
    goto __pyx_L2;
974
    goto __pyx_L2;
628
  }
975
  }
Lines 632-638 Link Here
632
  goto __pyx_L0;
979
  goto __pyx_L0;
633
  __pyx_L1:;
980
  __pyx_L1:;
634
  Py_XDECREF(__pyx_1);
981
  Py_XDECREF(__pyx_1);
635
  Py_XDECREF(__pyx_3);
636
  __Pyx_AddTraceback("dnet.eth.set");
982
  __Pyx_AddTraceback("dnet.eth.set");
637
  __pyx_r = 0;
983
  __pyx_r = 0;
638
  __pyx_L0:;
984
  __pyx_L0:;
Lines 646-660 Link Here
646
static PyObject *__pyx_f_4dnet_3eth_send(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
992
static PyObject *__pyx_f_4dnet_3eth_send(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
647
  PyObject *__pyx_v_frame = 0;
993
  PyObject *__pyx_v_frame = 0;
648
  PyObject *__pyx_r;
994
  PyObject *__pyx_r;
649
  char (*__pyx_1);
995
  char *__pyx_1;
650
  PyObject *__pyx_2 = 0;
996
  PyObject *__pyx_2 = 0;
651
  static char *__pyx_argnames[] = {"frame",0};
997
  static char *__pyx_argnames[] = {"frame",0};
652
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_frame)) return 0;
998
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_frame)) return 0;
653
  Py_INCREF(__pyx_v_self);
999
  Py_INCREF(__pyx_v_self);
654
  Py_INCREF(__pyx_v_frame);
1000
  Py_INCREF(__pyx_v_frame);
655
1001
  __pyx_1 = PyString_AsString(__pyx_v_frame); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; goto __pyx_L1;}
656
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":141 */
657
  __pyx_1 = PyString_AsString(__pyx_v_frame); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; goto __pyx_L1;}
658
  __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;}
1002
  __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;}
659
  __pyx_r = __pyx_2;
1003
  __pyx_r = __pyx_2;
660
  __pyx_2 = 0;
1004
  __pyx_2 = 0;
Lines 676-696 Link Here
676
static void __pyx_f_4dnet_3eth___dealloc__(PyObject *__pyx_v_self) {
1020
static void __pyx_f_4dnet_3eth___dealloc__(PyObject *__pyx_v_self) {
677
  int __pyx_1;
1021
  int __pyx_1;
678
  Py_INCREF(__pyx_v_self);
1022
  Py_INCREF(__pyx_v_self);
679
680
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":144 */
681
  __pyx_1 = (((struct __pyx_obj_4dnet_eth *)__pyx_v_self)->eth != 0);
1023
  __pyx_1 = (((struct __pyx_obj_4dnet_eth *)__pyx_v_self)->eth != 0);
682
  if (__pyx_1) {
1024
  if (__pyx_1) {
683
684
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":145 */
685
    eth_close(((struct __pyx_obj_4dnet_eth *)__pyx_v_self)->eth);
1025
    eth_close(((struct __pyx_obj_4dnet_eth *)__pyx_v_self)->eth);
686
    goto __pyx_L2;
1026
    goto __pyx_L2;
687
  }
1027
  }
688
  __pyx_L2:;
1028
  __pyx_L2:;
689
1029
690
  goto __pyx_L0;
691
  __pyx_L1:;
692
  __Pyx_AddTraceback("dnet.eth.__dealloc__");
693
  __pyx_L0:;
694
  Py_DECREF(__pyx_v_self);
1030
  Py_DECREF(__pyx_v_self);
695
}
1031
}
696
1032
Lines 705-715 Link Here
705
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0;
1041
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0;
706
  Py_INCREF(__pyx_v_buf);
1042
  Py_INCREF(__pyx_v_buf);
707
1043
708
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":151 */
1044
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":151 */
709
  __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;}
1045
  __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;}
710
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1046
  Py_DECREF(__pyx_1); __pyx_1 = 0;
711
1047
712
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":152 */
1048
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":152 */
713
  __pyx_1 = PyString_FromString(eth_ntoa((&__pyx_v_ea))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; goto __pyx_L1;}
1049
  __pyx_1 = PyString_FromString(eth_ntoa((&__pyx_v_ea))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; goto __pyx_L1;}
714
  __pyx_r = __pyx_1;
1050
  __pyx_r = __pyx_1;
715
  __pyx_1 = 0;
1051
  __pyx_1 = 0;
Lines 726-763 Link Here
726
  return __pyx_r;
1062
  return __pyx_r;
727
}
1063
}
728
1064
729
static PyObject *__pyx_k61p;
730
731
static char (__pyx_k61[]) = "invalid Ethernet address";
732
733
static PyObject *__pyx_f_4dnet_eth_aton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1065
static PyObject *__pyx_f_4dnet_eth_aton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
734
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\').";
1066
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\').";
735
static PyObject *__pyx_f_4dnet_eth_aton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1067
static PyObject *__pyx_f_4dnet_eth_aton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
736
  PyObject *__pyx_v_buf = 0;
1068
  PyObject *__pyx_v_buf = 0;
737
  eth_addr_t __pyx_v_ea;
1069
  eth_addr_t __pyx_v_ea;
738
  PyObject *__pyx_r;
1070
  PyObject *__pyx_r;
739
  char (*__pyx_1);
1071
  char *__pyx_1;
740
  int __pyx_2;
1072
  int __pyx_2;
741
  PyObject *__pyx_3 = 0;
1073
  PyObject *__pyx_3 = 0;
742
  static char *__pyx_argnames[] = {"buf",0};
1074
  static char *__pyx_argnames[] = {"buf",0};
743
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0;
1075
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0;
744
  Py_INCREF(__pyx_v_buf);
1076
  Py_INCREF(__pyx_v_buf);
745
1077
746
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":158 */
1078
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":158 */
747
  __pyx_1 = PyString_AsString(__pyx_v_buf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; goto __pyx_L1;}
1079
  __pyx_1 = PyString_AsString(__pyx_v_buf); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; goto __pyx_L1;}
748
  __pyx_2 = (eth_aton(__pyx_1,(&__pyx_v_ea)) < 0);
1080
  __pyx_2 = (eth_aton(__pyx_1,(&__pyx_v_ea)) < 0);
749
  if (__pyx_2) {
1081
  if (__pyx_2) {
750
1082
    __Pyx_Raise(PyExc_ValueError, __pyx_k3p, 0);
751
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":159 */
752
    __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; goto __pyx_L1;}
753
    __Pyx_Raise(__pyx_3, __pyx_k61p, 0);
754
    Py_DECREF(__pyx_3); __pyx_3 = 0;
755
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; goto __pyx_L1;}
1083
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; goto __pyx_L1;}
756
    goto __pyx_L2;
1084
    goto __pyx_L2;
757
  }
1085
  }
758
  __pyx_L2:;
1086
  __pyx_L2:;
759
1087
760
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":160 */
1088
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":160 */
761
  __pyx_3 = PyString_FromStringAndSize(__pyx_v_ea.data,6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; goto __pyx_L1;}
1089
  __pyx_3 = PyString_FromStringAndSize(__pyx_v_ea.data,6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; goto __pyx_L1;}
762
  __pyx_r = __pyx_3;
1090
  __pyx_r = __pyx_3;
763
  __pyx_3 = 0;
1091
  __pyx_3 = 0;
Lines 779-813 Link Here
779
static PyObject *__pyx_f_4dnet_eth_pack_hdr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1107
static PyObject *__pyx_f_4dnet_eth_pack_hdr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
780
  PyObject *__pyx_v_dst = 0;
1108
  PyObject *__pyx_v_dst = 0;
781
  PyObject *__pyx_v_src = 0;
1109
  PyObject *__pyx_v_src = 0;
782
  PyObject *__pyx_v_type = 0;
1110
  PyObject *__pyx_v_type_ = 0;
783
  char (__pyx_v_hdr[14]);
1111
  char __pyx_v_hdr[14];
784
  eth_addr_t __pyx_v_s;
1112
  eth_addr_t __pyx_v_s;
785
  eth_addr_t __pyx_v_d;
1113
  eth_addr_t __pyx_v_d;
786
  PyObject *__pyx_r;
1114
  PyObject *__pyx_r;
787
  PyObject *__pyx_1 = 0;
1115
  PyObject *__pyx_1 = 0;
788
  int __pyx_2;
1116
  int __pyx_2;
789
  static char *__pyx_argnames[] = {"dst","src","type",0};
1117
  static char *__pyx_argnames[] = {"dst","src","type_",0};
790
  __pyx_v_dst = __pyx_k16;
1118
  __pyx_v_dst = __pyx_d1;
791
  __pyx_v_src = __pyx_k17;
1119
  __pyx_v_src = __pyx_d2;
792
  __pyx_v_type = __pyx_k18;
1120
  __pyx_v_type_ = __pyx_d3;
793
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OOO", __pyx_argnames, &__pyx_v_dst, &__pyx_v_src, &__pyx_v_type)) return 0;
1121
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OOO", __pyx_argnames, &__pyx_v_dst, &__pyx_v_src, &__pyx_v_type_)) return 0;
794
  Py_INCREF(__pyx_v_dst);
1122
  Py_INCREF(__pyx_v_dst);
795
  Py_INCREF(__pyx_v_src);
1123
  Py_INCREF(__pyx_v_src);
796
  Py_INCREF(__pyx_v_type);
1124
  Py_INCREF(__pyx_v_type_);
797
1125
798
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":173 */
1126
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":173 */
799
  __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;}
1127
  __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;}
800
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1128
  Py_DECREF(__pyx_1); __pyx_1 = 0;
801
1129
802
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":174 */
1130
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":174 */
803
  __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;}
1131
  __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;}
804
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1132
  Py_DECREF(__pyx_1); __pyx_1 = 0;
805
1133
806
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":175 */
1134
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":175 */
807
  __pyx_2 = PyInt_AsLong(__pyx_v_type); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; goto __pyx_L1;}
1135
  __pyx_2 = PyInt_AsLong(__pyx_v_type_); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; goto __pyx_L1;}
808
  eth_pack_hdr(__pyx_v_hdr,__pyx_v_d,__pyx_v_s,__pyx_2);
1136
  eth_pack_hdr(__pyx_v_hdr,__pyx_v_d,__pyx_v_s,__pyx_2);
809
1137
810
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":176 */
1138
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":176 */
811
  __pyx_1 = PyString_FromStringAndSize(__pyx_v_hdr,14); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; goto __pyx_L1;}
1139
  __pyx_1 = PyString_FromStringAndSize(__pyx_v_hdr,14); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; goto __pyx_L1;}
812
  __pyx_r = __pyx_1;
1140
  __pyx_r = __pyx_1;
813
  __pyx_1 = 0;
1141
  __pyx_1 = 0;
Lines 822-828 Link Here
822
  __pyx_L0:;
1150
  __pyx_L0:;
823
  Py_DECREF(__pyx_v_dst);
1151
  Py_DECREF(__pyx_v_dst);
824
  Py_DECREF(__pyx_v_src);
1152
  Py_DECREF(__pyx_v_src);
825
  Py_DECREF(__pyx_v_type);
1153
  Py_DECREF(__pyx_v_type_);
826
  return __pyx_r;
1154
  return __pyx_r;
827
}
1155
}
828
1156
Lines 831-854 Link Here
831
  int __pyx_r;
1159
  int __pyx_r;
832
  int __pyx_1;
1160
  int __pyx_1;
833
  PyObject *__pyx_2 = 0;
1161
  PyObject *__pyx_2 = 0;
834
  PyObject *__pyx_3 = 0;
835
  static char *__pyx_argnames[] = {0};
1162
  static char *__pyx_argnames[] = {0};
836
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1;
1163
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1;
837
  Py_INCREF(__pyx_v_self);
1164
  Py_INCREF(__pyx_v_self);
838
1165
839
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":248 */
1166
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":248 */
840
  ((struct __pyx_obj_4dnet_ip *)__pyx_v_self)->ip = ip_open();
1167
  ((struct __pyx_obj_4dnet_ip *)__pyx_v_self)->ip = ip_open();
841
1168
842
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":249 */
1169
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":249 */
843
  __pyx_1 = (!(((struct __pyx_obj_4dnet_ip *)__pyx_v_self)->ip != 0));
1170
  __pyx_1 = (!(((struct __pyx_obj_4dnet_ip *)__pyx_v_self)->ip != 0));
844
  if (__pyx_1) {
1171
  if (__pyx_1) {
845
1172
    __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; goto __pyx_L1;}
846
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":250 */
1173
    __Pyx_Raise(PyExc_OSError, __pyx_2, 0);
847
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; goto __pyx_L1;}
848
    __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; goto __pyx_L1;}
849
    __Pyx_Raise(__pyx_2, __pyx_3, 0);
850
    Py_DECREF(__pyx_2); __pyx_2 = 0;
1174
    Py_DECREF(__pyx_2); __pyx_2 = 0;
851
    Py_DECREF(__pyx_3); __pyx_3 = 0;
852
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; goto __pyx_L1;}
1175
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; goto __pyx_L1;}
853
    goto __pyx_L2;
1176
    goto __pyx_L2;
854
  }
1177
  }
Lines 858-864 Link Here
858
  goto __pyx_L0;
1181
  goto __pyx_L0;
859
  __pyx_L1:;
1182
  __pyx_L1:;
860
  Py_XDECREF(__pyx_2);
1183
  Py_XDECREF(__pyx_2);
861
  Py_XDECREF(__pyx_3);
862
  __Pyx_AddTraceback("dnet.ip.__init__");
1184
  __Pyx_AddTraceback("dnet.ip.__init__");
863
  __pyx_r = -1;
1185
  __pyx_r = -1;
864
  __pyx_L0:;
1186
  __pyx_L0:;
Lines 871-885 Link Here
871
static PyObject *__pyx_f_4dnet_2ip_send(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1193
static PyObject *__pyx_f_4dnet_2ip_send(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
872
  PyObject *__pyx_v_pkt = 0;
1194
  PyObject *__pyx_v_pkt = 0;
873
  PyObject *__pyx_r;
1195
  PyObject *__pyx_r;
874
  char (*__pyx_1);
1196
  char *__pyx_1;
875
  PyObject *__pyx_2 = 0;
1197
  PyObject *__pyx_2 = 0;
876
  static char *__pyx_argnames[] = {"pkt",0};
1198
  static char *__pyx_argnames[] = {"pkt",0};
877
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pkt)) return 0;
1199
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pkt)) return 0;
878
  Py_INCREF(__pyx_v_self);
1200
  Py_INCREF(__pyx_v_self);
879
  Py_INCREF(__pyx_v_pkt);
1201
  Py_INCREF(__pyx_v_pkt);
880
1202
  __pyx_1 = PyString_AsString(__pyx_v_pkt); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L1;}
881
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":259 */
882
  __pyx_1 = PyString_AsString(__pyx_v_pkt); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L1;}
883
  __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;}
1203
  __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;}
884
  __pyx_r = __pyx_2;
1204
  __pyx_r = __pyx_2;
885
  __pyx_2 = 0;
1205
  __pyx_2 = 0;
Lines 901-921 Link Here
901
static void __pyx_f_4dnet_2ip___dealloc__(PyObject *__pyx_v_self) {
1221
static void __pyx_f_4dnet_2ip___dealloc__(PyObject *__pyx_v_self) {
902
  int __pyx_1;
1222
  int __pyx_1;
903
  Py_INCREF(__pyx_v_self);
1223
  Py_INCREF(__pyx_v_self);
904
905
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":262 */
906
  __pyx_1 = (((struct __pyx_obj_4dnet_ip *)__pyx_v_self)->ip != 0);
1224
  __pyx_1 = (((struct __pyx_obj_4dnet_ip *)__pyx_v_self)->ip != 0);
907
  if (__pyx_1) {
1225
  if (__pyx_1) {
908
909
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":263 */
910
    ip_close(((struct __pyx_obj_4dnet_ip *)__pyx_v_self)->ip);
1226
    ip_close(((struct __pyx_obj_4dnet_ip *)__pyx_v_self)->ip);
911
    goto __pyx_L2;
1227
    goto __pyx_L2;
912
  }
1228
  }
913
  __pyx_L2:;
1229
  __pyx_L2:;
914
1230
915
  goto __pyx_L0;
916
  __pyx_L1:;
917
  __Pyx_AddTraceback("dnet.ip.__dealloc__");
918
  __pyx_L0:;
919
  Py_DECREF(__pyx_v_self);
1231
  Py_DECREF(__pyx_v_self);
920
}
1232
}
921
1233
Lines 933-962 Link Here
933
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0;
1245
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0;
934
  Py_INCREF(__pyx_v_buf);
1246
  Py_INCREF(__pyx_v_buf);
935
1247
936
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":271 */
1248
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":271 */
937
  __pyx_1 = PyInt_Check(__pyx_v_buf);
1249
  __pyx_1 = PyInt_Check(__pyx_v_buf);
938
  if (!__pyx_1) {
1250
  if (!__pyx_1) {
939
    __pyx_1 = PyLong_Check(__pyx_v_buf);
1251
    __pyx_1 = PyLong_Check(__pyx_v_buf);
940
  }
1252
  }
941
  if (__pyx_1) {
1253
  if (__pyx_1) {
942
1254
943
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":272 */
1255
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":272 */
944
    __pyx_2 = PyInt_AsUnsignedLongMask(__pyx_v_buf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; goto __pyx_L1;}
1256
    __pyx_2 = PyInt_AsUnsignedLongMask(__pyx_v_buf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; goto __pyx_L1;}
945
    __pyx_v_i = ntohl(__pyx_2);
1257
    __pyx_v_i = ntohl(__pyx_2);
946
1258
947
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":273 */
1259
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":273 */
948
    memcpy(((char (*))(&__pyx_v_ia)),((char (*))(&__pyx_v_i)),4);
1260
    memcpy(((char *)(&__pyx_v_ia)),((char *)(&__pyx_v_i)),4);
949
    goto __pyx_L2;
1261
    goto __pyx_L2;
950
  }
1262
  }
951
  /*else*/ {
1263
  /*else*/ {
952
1264
    __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;}
953
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":275 */
954
    __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;}
955
    Py_DECREF(__pyx_3); __pyx_3 = 0;
1265
    Py_DECREF(__pyx_3); __pyx_3 = 0;
956
  }
1266
  }
957
  __pyx_L2:;
1267
  __pyx_L2:;
958
1268
959
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":276 */
1269
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":276 */
960
  __pyx_3 = PyString_FromString(ip_ntoa((&__pyx_v_ia))); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;}
1270
  __pyx_3 = PyString_FromString(ip_ntoa((&__pyx_v_ia))); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;}
961
  __pyx_r = __pyx_3;
1271
  __pyx_r = __pyx_3;
962
  __pyx_3 = 0;
1272
  __pyx_3 = 0;
Lines 973-1011 Link Here
973
  return __pyx_r;
1283
  return __pyx_r;
974
}
1284
}
975
1285
976
static PyObject *__pyx_k62p;
977
978
static char (__pyx_k62[]) = "invalid IP address";
979
980
static PyObject *__pyx_f_4dnet_ip_aton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1286
static PyObject *__pyx_f_4dnet_ip_aton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
981
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\').";
1287
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\').";
982
static PyObject *__pyx_f_4dnet_ip_aton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1288
static PyObject *__pyx_f_4dnet_ip_aton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
983
  PyObject *__pyx_v_buf = 0;
1289
  PyObject *__pyx_v_buf = 0;
984
  ip_addr_t __pyx_v_ia;
1290
  ip_addr_t __pyx_v_ia;
985
  PyObject *__pyx_r;
1291
  PyObject *__pyx_r;
986
  char (*__pyx_1);
1292
  char *__pyx_1;
987
  int __pyx_2;
1293
  int __pyx_2;
988
  PyObject *__pyx_3 = 0;
1294
  PyObject *__pyx_3 = 0;
989
  static char *__pyx_argnames[] = {"buf",0};
1295
  static char *__pyx_argnames[] = {"buf",0};
990
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0;
1296
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0;
991
  Py_INCREF(__pyx_v_buf);
1297
  Py_INCREF(__pyx_v_buf);
992
1298
993
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":282 */
1299
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":282 */
994
  __pyx_1 = PyString_AsString(__pyx_v_buf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; goto __pyx_L1;}
1300
  __pyx_1 = PyString_AsString(__pyx_v_buf); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; goto __pyx_L1;}
995
  __pyx_2 = (ip_aton(__pyx_1,(&__pyx_v_ia)) < 0);
1301
  __pyx_2 = (ip_aton(__pyx_1,(&__pyx_v_ia)) < 0);
996
  if (__pyx_2) {
1302
  if (__pyx_2) {
997
1303
    __Pyx_Raise(PyExc_ValueError, __pyx_k4p, 0);
998
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":283 */
999
    __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; goto __pyx_L1;}
1000
    __Pyx_Raise(__pyx_3, __pyx_k62p, 0);
1001
    Py_DECREF(__pyx_3); __pyx_3 = 0;
1002
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; goto __pyx_L1;}
1304
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; goto __pyx_L1;}
1003
    goto __pyx_L2;
1305
    goto __pyx_L2;
1004
  }
1306
  }
1005
  __pyx_L2:;
1307
  __pyx_L2:;
1006
1308
1007
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":284 */
1309
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":284 */
1008
  __pyx_3 = PyString_FromStringAndSize(((char (*))(&__pyx_v_ia)),4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;}
1310
  __pyx_3 = PyString_FromStringAndSize(((char *)(&__pyx_v_ia)),4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;}
1009
  __pyx_r = __pyx_3;
1311
  __pyx_r = __pyx_3;
1010
  __pyx_3 = 0;
1312
  __pyx_3 = 0;
1011
  goto __pyx_L0;
1313
  goto __pyx_L0;
Lines 1021-1060 Link Here
1021
  return __pyx_r;
1323
  return __pyx_r;
1022
}
1324
}
1023
1325
1024
static PyObject *__pyx_n_TypeError;
1025
1026
static PyObject *__pyx_f_4dnet_ip_checksum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1326
static PyObject *__pyx_f_4dnet_ip_checksum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1027
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    ";
1327
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    ";
1028
static PyObject *__pyx_f_4dnet_ip_checksum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1328
static PyObject *__pyx_f_4dnet_ip_checksum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1029
  PyObject *__pyx_v_pkt = 0;
1329
  PyObject *__pyx_v_pkt = 0;
1030
  char (__pyx_v_buf[2048]);
1330
  char __pyx_v_buf[2048];
1031
  char (*__pyx_v_p);
1331
  char *__pyx_v_p;
1032
  int __pyx_v_n;
1332
  Py_ssize_t __pyx_v_n;
1033
  PyObject *__pyx_v_s;
1333
  PyObject *__pyx_v_s;
1034
  PyObject *__pyx_r;
1334
  PyObject *__pyx_r;
1035
  int __pyx_1;
1335
  int __pyx_1;
1036
  PyObject *__pyx_2 = 0;
1336
  PyObject *__pyx_2 = 0;
1037
  char (*__pyx_3);
1337
  char *__pyx_3;
1038
  static char *__pyx_argnames[] = {"pkt",0};
1338
  static char *__pyx_argnames[] = {"pkt",0};
1039
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pkt)) return 0;
1339
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pkt)) return 0;
1040
  Py_INCREF(__pyx_v_pkt);
1340
  Py_INCREF(__pyx_v_pkt);
1041
  __pyx_v_s = Py_None; Py_INCREF(Py_None);
1341
  __pyx_v_s = Py_None; Py_INCREF(Py_None);
1042
1342
1043
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":296 */
1343
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":296 */
1044
  __pyx_1 = (PyObject_AsReadBuffer(__pyx_v_pkt,(&__pyx_v_p),(&__pyx_v_n)) == 0);
1344
  __pyx_1 = (PyObject_AsReadBuffer(__pyx_v_pkt,(&__pyx_v_p),(&__pyx_v_n)) == 0);
1045
  if (__pyx_1) {
1345
  if (__pyx_1) {
1046
1346
1047
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":297 */
1347
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":297 */
1048
    __pyx_1 = (__pyx_v_n < 2048);
1348
    __pyx_1 = (__pyx_v_n < 2048);
1049
    if (__pyx_1) {
1349
    if (__pyx_1) {
1050
1350
1051
      /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":298 */
1351
      /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":298 */
1052
      memcpy(__pyx_v_buf,__pyx_v_p,__pyx_v_n);
1352
      memcpy(__pyx_v_buf,__pyx_v_p,__pyx_v_n);
1053
1353
1054
      /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":299 */
1354
      /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":299 */
1055
      ip_checksum(__pyx_v_buf,__pyx_v_n);
1355
      ip_checksum(__pyx_v_buf,__pyx_v_n);
1056
1356
1057
      /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":300 */
1357
      /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":300 */
1058
      __pyx_2 = PyString_FromStringAndSize(__pyx_v_buf,__pyx_v_n); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; goto __pyx_L1;}
1358
      __pyx_2 = PyString_FromStringAndSize(__pyx_v_buf,__pyx_v_n); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; goto __pyx_L1;}
1059
      __pyx_r = __pyx_2;
1359
      __pyx_r = __pyx_2;
1060
      __pyx_2 = 0;
1360
      __pyx_2 = 0;
Lines 1063-1088 Link Here
1063
    }
1363
    }
1064
    __pyx_L3:;
1364
    __pyx_L3:;
1065
1365
1066
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":301 */
1366
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":301 */
1067
    __pyx_v_p = malloc(__pyx_v_n);
1367
    __pyx_v_p = malloc(__pyx_v_n);
1068
1368
1069
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":302 */
1369
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":302 */
1070
    __pyx_3 = PyString_AsString(__pyx_v_pkt); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; goto __pyx_L1;}
1370
    __pyx_3 = PyString_AsString(__pyx_v_pkt); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; goto __pyx_L1;}
1071
    memcpy(__pyx_v_p,__pyx_3,__pyx_v_n);
1371
    memcpy(__pyx_v_p,__pyx_3,__pyx_v_n);
1072
1372
1073
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":303 */
1373
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":303 */
1074
    ip_checksum(__pyx_v_p,__pyx_v_n);
1374
    ip_checksum(__pyx_v_p,__pyx_v_n);
1075
1375
1076
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":304 */
1376
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":304 */
1077
    __pyx_2 = PyString_FromStringAndSize(__pyx_v_p,__pyx_v_n); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; goto __pyx_L1;}
1377
    __pyx_2 = PyString_FromStringAndSize(__pyx_v_p,__pyx_v_n); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; goto __pyx_L1;}
1078
    Py_DECREF(__pyx_v_s);
1378
    Py_DECREF(__pyx_v_s);
1079
    __pyx_v_s = __pyx_2;
1379
    __pyx_v_s = __pyx_2;
1080
    __pyx_2 = 0;
1380
    __pyx_2 = 0;
1081
1381
1082
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":305 */
1382
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":305 */
1083
    free(__pyx_v_p);
1383
    free(__pyx_v_p);
1084
1384
1085
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":306 */
1385
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":306 */
1086
    Py_INCREF(__pyx_v_s);
1386
    Py_INCREF(__pyx_v_s);
1087
    __pyx_r = __pyx_v_s;
1387
    __pyx_r = __pyx_v_s;
1088
    goto __pyx_L0;
1388
    goto __pyx_L0;
Lines 1090-1099 Link Here
1090
  }
1390
  }
1091
  __pyx_L2:;
1391
  __pyx_L2:;
1092
1392
1093
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":307 */
1393
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":307 */
1094
  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_TypeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; goto __pyx_L1;}
1394
  __Pyx_Raise(PyExc_TypeError, 0, 0);
1095
  __Pyx_Raise(__pyx_2, 0, 0);
1096
  Py_DECREF(__pyx_2); __pyx_2 = 0;
1097
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; goto __pyx_L1;}
1395
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; goto __pyx_L1;}
1098
1396
1099
  __pyx_r = Py_None; Py_INCREF(Py_None);
1397
  __pyx_r = Py_None; Py_INCREF(Py_None);
Lines 1112-1119 Link Here
1112
static PyObject *__pyx_f_4dnet_ip_cksum_add(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1410
static PyObject *__pyx_f_4dnet_ip_cksum_add(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1113
  PyObject *__pyx_v_buf = 0;
1411
  PyObject *__pyx_v_buf = 0;
1114
  int __pyx_v_sum;
1412
  int __pyx_v_sum;
1115
  char (*__pyx_v_p);
1413
  char *__pyx_v_p;
1116
  int __pyx_v_n;
1414
  Py_ssize_t __pyx_v_n;
1117
  PyObject *__pyx_r;
1415
  PyObject *__pyx_r;
1118
  int __pyx_1;
1416
  int __pyx_1;
1119
  PyObject *__pyx_2 = 0;
1417
  PyObject *__pyx_2 = 0;
Lines 1121-1131 Link Here
1121
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "Oi", __pyx_argnames, &__pyx_v_buf, &__pyx_v_sum)) return 0;
1419
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "Oi", __pyx_argnames, &__pyx_v_buf, &__pyx_v_sum)) return 0;
1122
  Py_INCREF(__pyx_v_buf);
1420
  Py_INCREF(__pyx_v_buf);
1123
1421
1124
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":312 */
1422
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":312 */
1125
  __pyx_1 = (PyObject_AsReadBuffer(__pyx_v_buf,(&__pyx_v_p),(&__pyx_v_n)) == 0);
1423
  __pyx_1 = (PyObject_AsReadBuffer(__pyx_v_buf,(&__pyx_v_p),(&__pyx_v_n)) == 0);
1126
  if (__pyx_1) {
1424
  if (__pyx_1) {
1127
1128
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":313 */
1129
    __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;}
1425
    __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;}
1130
    __pyx_r = __pyx_2;
1426
    __pyx_r = __pyx_2;
1131
    __pyx_2 = 0;
1427
    __pyx_2 = 0;
Lines 1133-1143 Link Here
1133
    goto __pyx_L2;
1429
    goto __pyx_L2;
1134
  }
1430
  }
1135
  /*else*/ {
1431
  /*else*/ {
1136
1432
    __Pyx_Raise(PyExc_TypeError, 0, 0);
1137
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":315 */
1138
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_TypeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; goto __pyx_L1;}
1139
    __Pyx_Raise(__pyx_2, 0, 0);
1140
    Py_DECREF(__pyx_2); __pyx_2 = 0;
1141
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; goto __pyx_L1;}
1433
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; goto __pyx_L1;}
1142
  }
1434
  }
1143
  __pyx_L2:;
1435
  __pyx_L2:;
Lines 1160-1167 Link Here
1160
  PyObject *__pyx_1 = 0;
1452
  PyObject *__pyx_1 = 0;
1161
  static char *__pyx_argnames[] = {"sum",0};
1453
  static char *__pyx_argnames[] = {"sum",0};
1162
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_sum)) return 0;
1454
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "i", __pyx_argnames, &__pyx_v_sum)) return 0;
1163
1164
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":318 */
1165
  __pyx_1 = PyInt_FromLong(ip_cksum_carry(__pyx_v_sum)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; goto __pyx_L1;}
1455
  __pyx_1 = PyInt_FromLong(ip_cksum_carry(__pyx_v_sum)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; goto __pyx_L1;}
1166
  __pyx_r = __pyx_1;
1456
  __pyx_r = __pyx_1;
1167
  __pyx_1 = 0;
1457
  __pyx_1 = 0;
Lines 1188-1194 Link Here
1188
  PyObject *__pyx_v_p = 0;
1478
  PyObject *__pyx_v_p = 0;
1189
  PyObject *__pyx_v_src = 0;
1479
  PyObject *__pyx_v_src = 0;
1190
  PyObject *__pyx_v_dst = 0;
1480
  PyObject *__pyx_v_dst = 0;
1191
  char (__pyx_v_hdr[20]);
1481
  char __pyx_v_hdr[20];
1192
  ip_addr_t __pyx_v_s;
1482
  ip_addr_t __pyx_v_s;
1193
  ip_addr_t __pyx_v_d;
1483
  ip_addr_t __pyx_v_d;
1194
  PyObject *__pyx_r;
1484
  PyObject *__pyx_r;
Lines 1200-1213 Link Here
1200
  int __pyx_6;
1490
  int __pyx_6;
1201
  int __pyx_7;
1491
  int __pyx_7;
1202
  static char *__pyx_argnames[] = {"tos","len","id","off","ttl","p","src","dst",0};
1492
  static char *__pyx_argnames[] = {"tos","len","id","off","ttl","p","src","dst",0};
1203
  __pyx_v_tos = __pyx_k24;
1493
  __pyx_v_tos = __pyx_d4;
1204
  __pyx_v_len = __pyx_k25;
1494
  __pyx_v_len = __pyx_d5;
1205
  __pyx_v_id = __pyx_k26;
1495
  __pyx_v_id = __pyx_d6;
1206
  __pyx_v_off = __pyx_k27;
1496
  __pyx_v_off = __pyx_d7;
1207
  __pyx_v_ttl = __pyx_k28;
1497
  __pyx_v_ttl = __pyx_d8;
1208
  __pyx_v_p = __pyx_k29;
1498
  __pyx_v_p = __pyx_d9;
1209
  __pyx_v_src = __pyx_k30;
1499
  __pyx_v_src = __pyx_d10;
1210
  __pyx_v_dst = __pyx_k31;
1500
  __pyx_v_dst = __pyx_d11;
1211
  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;
1501
  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;
1212
  Py_INCREF(__pyx_v_tos);
1502
  Py_INCREF(__pyx_v_tos);
1213
  Py_INCREF(__pyx_v_len);
1503
  Py_INCREF(__pyx_v_len);
Lines 1218-1232 Link Here
1218
  Py_INCREF(__pyx_v_src);
1508
  Py_INCREF(__pyx_v_src);
1219
  Py_INCREF(__pyx_v_dst);
1509
  Py_INCREF(__pyx_v_dst);
1220
1510
1221
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":337 */
1511
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":337 */
1222
  __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;}
1512
  __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;}
1223
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1513
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1224
1514
1225
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":338 */
1515
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":338 */
1226
  __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;}
1516
  __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;}
1227
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1517
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1228
1518
1229
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":339 */
1519
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":339 */
1230
  __pyx_2 = PyInt_AsLong(__pyx_v_tos); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;}
1520
  __pyx_2 = PyInt_AsLong(__pyx_v_tos); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;}
1231
  __pyx_3 = PyInt_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;}
1521
  __pyx_3 = PyInt_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;}
1232
  __pyx_4 = PyInt_AsLong(__pyx_v_id); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;}
1522
  __pyx_4 = PyInt_AsLong(__pyx_v_id); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;}
Lines 1235-1241 Link Here
1235
  __pyx_7 = PyInt_AsLong(__pyx_v_p); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;}
1525
  __pyx_7 = PyInt_AsLong(__pyx_v_p); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;}
1236
  ip_pack_hdr(__pyx_v_hdr,__pyx_2,__pyx_3,__pyx_4,__pyx_5,__pyx_6,__pyx_7,__pyx_v_s,__pyx_v_d);
1526
  ip_pack_hdr(__pyx_v_hdr,__pyx_2,__pyx_3,__pyx_4,__pyx_5,__pyx_6,__pyx_7,__pyx_v_s,__pyx_v_d);
1237
1527
1238
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":340 */
1528
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":340 */
1239
  __pyx_1 = PyString_FromStringAndSize(__pyx_v_hdr,20); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; goto __pyx_L1;}
1529
  __pyx_1 = PyString_FromStringAndSize(__pyx_v_hdr,20); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; goto __pyx_L1;}
1240
  __pyx_r = __pyx_1;
1530
  __pyx_r = __pyx_1;
1241
  __pyx_1 = 0;
1531
  __pyx_1 = 0;
Lines 1270-1280 Link Here
1270
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0;
1560
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0;
1271
  Py_INCREF(__pyx_v_buf);
1561
  Py_INCREF(__pyx_v_buf);
1272
1562
1273
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":374 */
1563
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":374 */
1274
  __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;}
1564
  __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;}
1275
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1565
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1276
1566
1277
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":375 */
1567
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":375 */
1278
  __pyx_1 = PyString_FromString(ip6_ntoa((&__pyx_v_ia))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; goto __pyx_L1;}
1568
  __pyx_1 = PyString_FromString(ip6_ntoa((&__pyx_v_ia))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; goto __pyx_L1;}
1279
  __pyx_r = __pyx_1;
1569
  __pyx_r = __pyx_1;
1280
  __pyx_1 = 0;
1570
  __pyx_1 = 0;
Lines 1291-1329 Link Here
1291
  return __pyx_r;
1581
  return __pyx_r;
1292
}
1582
}
1293
1583
1294
static PyObject *__pyx_k63p;
1295
1296
static char (__pyx_k63[]) = "invalid IPv6 address";
1297
1298
static PyObject *__pyx_f_4dnet_ip6_aton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1584
static PyObject *__pyx_f_4dnet_ip6_aton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1299
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\').";
1585
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\').";
1300
static PyObject *__pyx_f_4dnet_ip6_aton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1586
static PyObject *__pyx_f_4dnet_ip6_aton(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1301
  PyObject *__pyx_v_buf = 0;
1587
  PyObject *__pyx_v_buf = 0;
1302
  ip6_addr_t __pyx_v_ia;
1588
  ip6_addr_t __pyx_v_ia;
1303
  PyObject *__pyx_r;
1589
  PyObject *__pyx_r;
1304
  char (*__pyx_1);
1590
  char *__pyx_1;
1305
  int __pyx_2;
1591
  int __pyx_2;
1306
  PyObject *__pyx_3 = 0;
1592
  PyObject *__pyx_3 = 0;
1307
  static char *__pyx_argnames[] = {"buf",0};
1593
  static char *__pyx_argnames[] = {"buf",0};
1308
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0;
1594
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0;
1309
  Py_INCREF(__pyx_v_buf);
1595
  Py_INCREF(__pyx_v_buf);
1310
1596
1311
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":381 */
1597
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":381 */
1312
  __pyx_1 = PyString_AsString(__pyx_v_buf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; goto __pyx_L1;}
1598
  __pyx_1 = PyString_AsString(__pyx_v_buf); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; goto __pyx_L1;}
1313
  __pyx_2 = (ip6_aton(__pyx_1,(&__pyx_v_ia)) < 0);
1599
  __pyx_2 = (ip6_aton(__pyx_1,(&__pyx_v_ia)) < 0);
1314
  if (__pyx_2) {
1600
  if (__pyx_2) {
1315
1601
    __Pyx_Raise(PyExc_ValueError, __pyx_k5p, 0);
1316
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":382 */
1317
    __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; goto __pyx_L1;}
1318
    __Pyx_Raise(__pyx_3, __pyx_k63p, 0);
1319
    Py_DECREF(__pyx_3); __pyx_3 = 0;
1320
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; goto __pyx_L1;}
1602
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; goto __pyx_L1;}
1321
    goto __pyx_L2;
1603
    goto __pyx_L2;
1322
  }
1604
  }
1323
  __pyx_L2:;
1605
  __pyx_L2:;
1324
1606
1325
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":383 */
1607
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":383 */
1326
  __pyx_3 = PyString_FromStringAndSize(((char (*))(&__pyx_v_ia)),16); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; goto __pyx_L1;}
1608
  __pyx_3 = PyString_FromStringAndSize(((char *)(&__pyx_v_ia)),16); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; goto __pyx_L1;}
1327
  __pyx_r = __pyx_3;
1609
  __pyx_r = __pyx_3;
1328
  __pyx_3 = 0;
1610
  __pyx_3 = 0;
1329
  goto __pyx_L0;
1611
  goto __pyx_L0;
Lines 1344-1359 Link Here
1344
static PyObject *__pyx_f_4dnet_ip6_checksum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1626
static PyObject *__pyx_f_4dnet_ip6_checksum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1345
  PyObject *__pyx_v_buf = 0;
1627
  PyObject *__pyx_v_buf = 0;
1346
  PyObject *__pyx_r;
1628
  PyObject *__pyx_r;
1347
  char (*__pyx_1);
1629
  char *__pyx_1;
1348
  static char *__pyx_argnames[] = {"buf",0};
1630
  static char *__pyx_argnames[] = {"buf",0};
1349
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0;
1631
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0;
1350
  Py_INCREF(__pyx_v_buf);
1632
  Py_INCREF(__pyx_v_buf);
1351
1633
1352
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":392 */
1634
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":392 */
1353
  __pyx_1 = PyString_AsString(__pyx_v_buf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; goto __pyx_L1;}
1635
  __pyx_1 = PyString_AsString(__pyx_v_buf); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; goto __pyx_L1;}
1354
  ip6_checksum(__pyx_1,PyString_Size(__pyx_v_buf));
1636
  ip6_checksum(__pyx_1,PyString_Size(__pyx_v_buf));
1355
1637
1356
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":393 */
1638
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":393 */
1357
  Py_INCREF(__pyx_v_buf);
1639
  Py_INCREF(__pyx_v_buf);
1358
  __pyx_r = __pyx_v_buf;
1640
  __pyx_r = __pyx_v_buf;
1359
  goto __pyx_L0;
1641
  goto __pyx_L0;
Lines 1378-1384 Link Here
1378
  PyObject *__pyx_v_hlim = 0;
1660
  PyObject *__pyx_v_hlim = 0;
1379
  PyObject *__pyx_v_src = 0;
1661
  PyObject *__pyx_v_src = 0;
1380
  PyObject *__pyx_v_dst = 0;
1662
  PyObject *__pyx_v_dst = 0;
1381
  char (__pyx_v_hdr[40]);
1663
  char __pyx_v_hdr[40];
1382
  ip6_addr_t __pyx_v_s;
1664
  ip6_addr_t __pyx_v_s;
1383
  ip6_addr_t __pyx_v_d;
1665
  ip6_addr_t __pyx_v_d;
1384
  PyObject *__pyx_r;
1666
  PyObject *__pyx_r;
Lines 1389-1401 Link Here
1389
  int __pyx_5;
1671
  int __pyx_5;
1390
  int __pyx_6;
1672
  int __pyx_6;
1391
  static char *__pyx_argnames[] = {"fc","fl","plen","nxt","hlim","src","dst",0};
1673
  static char *__pyx_argnames[] = {"fc","fl","plen","nxt","hlim","src","dst",0};
1392
  __pyx_v_fc = __pyx_k34;
1674
  __pyx_v_fc = __pyx_d12;
1393
  __pyx_v_fl = __pyx_k35;
1675
  __pyx_v_fl = __pyx_d13;
1394
  __pyx_v_plen = __pyx_k36;
1676
  __pyx_v_plen = __pyx_d14;
1395
  __pyx_v_nxt = __pyx_k37;
1677
  __pyx_v_nxt = __pyx_d15;
1396
  __pyx_v_hlim = __pyx_k38;
1678
  __pyx_v_hlim = __pyx_d16;
1397
  __pyx_v_src = __pyx_k39;
1679
  __pyx_v_src = __pyx_d17;
1398
  __pyx_v_dst = __pyx_k40;
1680
  __pyx_v_dst = __pyx_d18;
1399
  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;
1681
  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;
1400
  Py_INCREF(__pyx_v_fc);
1682
  Py_INCREF(__pyx_v_fc);
1401
  Py_INCREF(__pyx_v_fl);
1683
  Py_INCREF(__pyx_v_fl);
Lines 1405-1419 Link Here
1405
  Py_INCREF(__pyx_v_src);
1687
  Py_INCREF(__pyx_v_src);
1406
  Py_INCREF(__pyx_v_dst);
1688
  Py_INCREF(__pyx_v_dst);
1407
1689
1408
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":410 */
1690
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":410 */
1409
  __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;}
1691
  __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;}
1410
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1692
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1411
1693
1412
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":411 */
1694
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":411 */
1413
  __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;}
1695
  __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;}
1414
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1696
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1415
1697
1416
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":412 */
1698
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":412 */
1417
  __pyx_2 = PyInt_AsLong(__pyx_v_fc); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;}
1699
  __pyx_2 = PyInt_AsLong(__pyx_v_fc); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;}
1418
  __pyx_3 = PyInt_AsLong(__pyx_v_fl); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;}
1700
  __pyx_3 = PyInt_AsLong(__pyx_v_fl); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;}
1419
  __pyx_4 = PyInt_AsLong(__pyx_v_plen); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;}
1701
  __pyx_4 = PyInt_AsLong(__pyx_v_plen); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;}
Lines 1421-1427 Link Here
1421
  __pyx_6 = PyInt_AsLong(__pyx_v_hlim); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;}
1703
  __pyx_6 = PyInt_AsLong(__pyx_v_hlim); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;}
1422
  ip6_pack_hdr(__pyx_v_hdr,__pyx_2,__pyx_3,__pyx_4,__pyx_5,__pyx_6,__pyx_v_s,__pyx_v_d);
1704
  ip6_pack_hdr(__pyx_v_hdr,__pyx_2,__pyx_3,__pyx_4,__pyx_5,__pyx_6,__pyx_v_s,__pyx_v_d);
1423
1705
1424
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":413 */
1706
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":413 */
1425
  __pyx_1 = PyString_FromStringAndSize(__pyx_v_hdr,40); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; goto __pyx_L1;}
1707
  __pyx_1 = PyString_FromStringAndSize(__pyx_v_hdr,40); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; goto __pyx_L1;}
1426
  __pyx_r = __pyx_1;
1708
  __pyx_r = __pyx_1;
1427
  __pyx_1 = 0;
1709
  __pyx_1 = 0;
Lines 1444-1507 Link Here
1444
  return __pyx_r;
1726
  return __pyx_r;
1445
}
1727
}
1446
1728
1447
static PyObject *__pyx_n_ip;
1448
1449
static PyObject *__pyx_k64p;
1450
1451
static char (__pyx_k64[]) = "invalid network address";
1452
1453
static int __pyx_f_4dnet_4addr___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1729
static int __pyx_f_4dnet_4addr___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1454
static int __pyx_f_4dnet_4addr___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1730
static int __pyx_f_4dnet_4addr___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1455
  PyObject *__pyx_v_addrtxt = 0;
1731
  PyObject *__pyx_v_addrtxt = 0;
1456
  PyObject *__pyx_v_type = 0;
1732
  PyObject *__pyx_v_type_ = 0;
1457
  int __pyx_r;
1733
  int __pyx_r;
1458
  int __pyx_1;
1734
  int __pyx_1;
1459
  char (*__pyx_2);
1735
  char *__pyx_2;
1460
  PyObject *__pyx_3 = 0;
1736
  PyObject *__pyx_3 = 0;
1461
  unsigned short __pyx_4;
1737
  unsigned short __pyx_4;
1462
  static char *__pyx_argnames[] = {"addrtxt","type",0};
1738
  static char *__pyx_argnames[] = {"addrtxt","type_",0};
1463
  __pyx_v_addrtxt = __pyx_k41;
1739
  __pyx_v_addrtxt = __pyx_d19;
1464
  __pyx_v_type = __pyx_k42;
1740
  __pyx_v_type_ = __pyx_d20;
1465
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OO", __pyx_argnames, &__pyx_v_addrtxt, &__pyx_v_type)) return -1;
1741
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OO", __pyx_argnames, &__pyx_v_addrtxt, &__pyx_v_type_)) return -1;
1466
  Py_INCREF(__pyx_v_self);
1742
  Py_INCREF(__pyx_v_self);
1467
  Py_INCREF(__pyx_v_addrtxt);
1743
  Py_INCREF(__pyx_v_addrtxt);
1468
  Py_INCREF(__pyx_v_type);
1744
  Py_INCREF(__pyx_v_type_);
1469
1470
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":445 */
1471
  if (PyObject_Cmp(__pyx_v_addrtxt, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; goto __pyx_L1;}
1745
  if (PyObject_Cmp(__pyx_v_addrtxt, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; goto __pyx_L1;}
1472
  __pyx_1 = __pyx_1 != 0;
1746
  __pyx_1 = __pyx_1 != 0;
1473
  if (__pyx_1) {
1747
  if (__pyx_1) {
1474
    __pyx_2 = PyString_AsString(__pyx_v_addrtxt); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; goto __pyx_L1;}
1748
    __pyx_2 = PyString_AsString(__pyx_v_addrtxt); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; goto __pyx_L1;}
1475
    __pyx_1 = (addr_aton(__pyx_2,(&((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr)) < 0);
1749
    __pyx_1 = (addr_aton(__pyx_2,(&((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr)) < 0);
1476
  }
1750
  }
1477
  if (__pyx_1) {
1751
  if (__pyx_1) {
1478
1479
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":446 */
1480
    __pyx_1 = (PyString_Size(__pyx_v_addrtxt) == 4);
1752
    __pyx_1 = (PyString_Size(__pyx_v_addrtxt) == 4);
1481
    if (__pyx_1) {
1753
    if (__pyx_1) {
1482
1754
1483
      /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":447 */
1755
      /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":447 */
1484
      __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;}
1756
      __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;}
1485
      __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; goto __pyx_L1;}
1757
      __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; goto __pyx_L1;}
1486
      Py_DECREF(__pyx_3); __pyx_3 = 0;
1758
      Py_DECREF(__pyx_3); __pyx_3 = 0;
1487
      ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type = __pyx_4;
1759
      ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type = __pyx_4;
1488
1760
1489
      /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":448 */
1761
      /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":448 */
1490
      __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;}
1762
      __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;}
1491
      __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; goto __pyx_L1;}
1763
      __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; goto __pyx_L1;}
1492
      Py_DECREF(__pyx_3); __pyx_3 = 0;
1764
      Py_DECREF(__pyx_3); __pyx_3 = 0;
1493
      ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits = __pyx_4;
1765
      ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits = __pyx_4;
1494
1766
1495
      /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":449 */
1767
      /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":449 */
1496
      if (PyObject_SetAttr(__pyx_v_self, __pyx_n_ip, __pyx_v_addrtxt) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; goto __pyx_L1;}
1768
      if (PyObject_SetAttr(__pyx_v_self, __pyx_n_ip, __pyx_v_addrtxt) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; goto __pyx_L1;}
1497
      goto __pyx_L3;
1769
      goto __pyx_L3;
1498
    }
1770
    }
1499
    /*else*/ {
1771
    /*else*/ {
1500
1772
      __Pyx_Raise(PyExc_ValueError, __pyx_k9p, 0);
1501
      /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":451 */
1502
      __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; goto __pyx_L1;}
1503
      __Pyx_Raise(__pyx_3, __pyx_k64p, 0);
1504
      Py_DECREF(__pyx_3); __pyx_3 = 0;
1505
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; goto __pyx_L1;}
1773
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; goto __pyx_L1;}
1506
    }
1774
    }
1507
    __pyx_L3:;
1775
    __pyx_L3:;
Lines 1518-1524 Link Here
1518
  __pyx_L0:;
1786
  __pyx_L0:;
1519
  Py_DECREF(__pyx_v_self);
1787
  Py_DECREF(__pyx_v_self);
1520
  Py_DECREF(__pyx_v_addrtxt);
1788
  Py_DECREF(__pyx_v_addrtxt);
1521
  Py_DECREF(__pyx_v_type);
1789
  Py_DECREF(__pyx_v_type_);
1522
  return __pyx_r;
1790
  return __pyx_r;
1523
}
1791
}
1524
1792
Lines 1527-1534 Link Here
1527
  PyObject *__pyx_r;
1795
  PyObject *__pyx_r;
1528
  PyObject *__pyx_1 = 0;
1796
  PyObject *__pyx_1 = 0;
1529
  Py_INCREF(__pyx_v_self);
1797
  Py_INCREF(__pyx_v_self);
1530
1531
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":456 */
1532
  __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;}
1798
  __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;}
1533
  __pyx_r = __pyx_1;
1799
  __pyx_r = __pyx_1;
1534
  __pyx_1 = 0;
1800
  __pyx_1 = 0;
Lines 1545-1579 Link Here
1545
  return __pyx_r;
1811
  return __pyx_r;
1546
}
1812
}
1547
1813
1548
static PyObject *__pyx_n_OverflowError;
1549
1550
static int __pyx_f_4dnet_4addr_4type___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
1814
static int __pyx_f_4dnet_4addr_4type___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
1551
static int __pyx_f_4dnet_4addr_4type___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
1815
static int __pyx_f_4dnet_4addr_4type___set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
1552
  unsigned int __pyx_v_value;
1816
  unsigned int __pyx_v_value;
1553
  int __pyx_r;
1817
  int __pyx_r;
1554
  int __pyx_1;
1818
  int __pyx_1;
1555
  PyObject *__pyx_2 = 0;
1556
  Py_INCREF(__pyx_v_self);
1819
  Py_INCREF(__pyx_v_self);
1557
  __pyx_v_value = PyInt_AsUnsignedLongMask(__pyx_arg_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; goto __pyx_L1;}
1820
  __pyx_v_value = PyInt_AsUnsignedLongMask(__pyx_arg_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; goto __pyx_L1;}
1558
1821
1559
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":458 */
1822
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":458 */
1560
  __pyx_1 = (__pyx_v_value > 65535);
1823
  __pyx_1 = (__pyx_v_value > 0xffff);
1561
  if (__pyx_1) {
1824
  if (__pyx_1) {
1562
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OverflowError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; goto __pyx_L1;}
1825
    __Pyx_Raise(PyExc_OverflowError, 0, 0);
1563
    __Pyx_Raise(__pyx_2, 0, 0);
1564
    Py_DECREF(__pyx_2); __pyx_2 = 0;
1565
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; goto __pyx_L1;}
1826
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; goto __pyx_L1;}
1566
    goto __pyx_L2;
1827
    goto __pyx_L2;
1567
  }
1828
  }
1568
  __pyx_L2:;
1829
  __pyx_L2:;
1569
1830
1570
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":459 */
1831
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":459 */
1571
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type = __pyx_v_value;
1832
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type = __pyx_v_value;
1572
1833
1573
  __pyx_r = 0;
1834
  __pyx_r = 0;
1574
  goto __pyx_L0;
1835
  goto __pyx_L0;
1575
  __pyx_L1:;
1836
  __pyx_L1:;
1576
  Py_XDECREF(__pyx_2);
1577
  __Pyx_AddTraceback("dnet.addr.type.__set__");
1837
  __Pyx_AddTraceback("dnet.addr.type.__set__");
1578
  __pyx_r = -1;
1838
  __pyx_r = -1;
1579
  __pyx_L0:;
1839
  __pyx_L0:;
Lines 1586-1593 Link Here
1586
  PyObject *__pyx_r;
1846
  PyObject *__pyx_r;
1587
  PyObject *__pyx_1 = 0;
1847
  PyObject *__pyx_1 = 0;
1588
  Py_INCREF(__pyx_v_self);
1848
  Py_INCREF(__pyx_v_self);
1589
1590
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":464 */
1591
  __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;}
1849
  __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;}
1592
  __pyx_r = __pyx_1;
1850
  __pyx_r = __pyx_1;
1593
  __pyx_1 = 0;
1851
  __pyx_1 = 0;
Lines 1609-1636 Link Here
1609
  unsigned int __pyx_v_value;
1867
  unsigned int __pyx_v_value;
1610
  int __pyx_r;
1868
  int __pyx_r;
1611
  int __pyx_1;
1869
  int __pyx_1;
1612
  PyObject *__pyx_2 = 0;
1613
  Py_INCREF(__pyx_v_self);
1870
  Py_INCREF(__pyx_v_self);
1614
  __pyx_v_value = PyInt_AsUnsignedLongMask(__pyx_arg_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; goto __pyx_L1;}
1871
  __pyx_v_value = PyInt_AsUnsignedLongMask(__pyx_arg_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; goto __pyx_L1;}
1615
1872
1616
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":466 */
1873
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":466 */
1617
  __pyx_1 = (__pyx_v_value > 65535);
1874
  __pyx_1 = (__pyx_v_value > 0xffff);
1618
  if (__pyx_1) {
1875
  if (__pyx_1) {
1619
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OverflowError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; goto __pyx_L1;}
1876
    __Pyx_Raise(PyExc_OverflowError, 0, 0);
1620
    __Pyx_Raise(__pyx_2, 0, 0);
1621
    Py_DECREF(__pyx_2); __pyx_2 = 0;
1622
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; goto __pyx_L1;}
1877
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; goto __pyx_L1;}
1623
    goto __pyx_L2;
1878
    goto __pyx_L2;
1624
  }
1879
  }
1625
  __pyx_L2:;
1880
  __pyx_L2:;
1626
1881
1627
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":467 */
1882
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":467 */
1628
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits = __pyx_v_value;
1883
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits = __pyx_v_value;
1629
1884
1630
  __pyx_r = 0;
1885
  __pyx_r = 0;
1631
  goto __pyx_L0;
1886
  goto __pyx_L0;
1632
  __pyx_L1:;
1887
  __pyx_L1:;
1633
  Py_XDECREF(__pyx_2);
1634
  __Pyx_AddTraceback("dnet.addr.bits.__set__");
1888
  __Pyx_AddTraceback("dnet.addr.bits.__set__");
1635
  __pyx_r = -1;
1889
  __pyx_r = -1;
1636
  __pyx_L0:;
1890
  __pyx_L0:;
Lines 1638-1650 Link Here
1638
  return __pyx_r;
1892
  return __pyx_r;
1639
}
1893
}
1640
1894
1641
static PyObject *__pyx_n_eth;
1642
static PyObject *__pyx_n_ip6;
1643
1644
static PyObject *__pyx_k65p;
1645
1646
static char (__pyx_k65[]) = "invalid network address";
1647
1648
static PyObject *__pyx_f_4dnet_4addr_4data___get__(PyObject *__pyx_v_self); /*proto*/
1895
static PyObject *__pyx_f_4dnet_4addr_4data___get__(PyObject *__pyx_v_self); /*proto*/
1649
static PyObject *__pyx_f_4dnet_4addr_4data___get__(PyObject *__pyx_v_self) {
1896
static PyObject *__pyx_f_4dnet_4addr_4data___get__(PyObject *__pyx_v_self) {
1650
  PyObject *__pyx_r;
1897
  PyObject *__pyx_r;
Lines 1652-1659 Link Here
1652
  PyObject *__pyx_2 = 0;
1899
  PyObject *__pyx_2 = 0;
1653
  int __pyx_3;
1900
  int __pyx_3;
1654
  Py_INCREF(__pyx_v_self);
1901
  Py_INCREF(__pyx_v_self);
1655
1656
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":472 */
1657
  __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;}
1902
  __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;}
1658
  __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;}
1903
  __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;}
1659
  if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; goto __pyx_L1;}
1904
  if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; goto __pyx_L1;}
Lines 1661-1668 Link Here
1661
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1906
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1662
  Py_DECREF(__pyx_2); __pyx_2 = 0;
1907
  Py_DECREF(__pyx_2); __pyx_2 = 0;
1663
  if (__pyx_3) {
1908
  if (__pyx_3) {
1664
1665
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":473 */
1666
    __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_eth); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; goto __pyx_L1;}
1909
    __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_eth); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; goto __pyx_L1;}
1667
    __pyx_r = __pyx_1;
1910
    __pyx_r = __pyx_1;
1668
    __pyx_1 = 0;
1911
    __pyx_1 = 0;
Lines 1676-1683 Link Here
1676
  Py_DECREF(__pyx_2); __pyx_2 = 0;
1919
  Py_DECREF(__pyx_2); __pyx_2 = 0;
1677
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1920
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1678
  if (__pyx_3) {
1921
  if (__pyx_3) {
1679
1680
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":475 */
1681
    __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_ip); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; goto __pyx_L1;}
1922
    __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_ip); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; goto __pyx_L1;}
1682
    __pyx_r = __pyx_2;
1923
    __pyx_r = __pyx_2;
1683
    __pyx_2 = 0;
1924
    __pyx_2 = 0;
Lines 1691-1698 Link Here
1691
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1932
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1692
  Py_DECREF(__pyx_2); __pyx_2 = 0;
1933
  Py_DECREF(__pyx_2); __pyx_2 = 0;
1693
  if (__pyx_3) {
1934
  if (__pyx_3) {
1694
1695
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":477 */
1696
    __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_ip6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; goto __pyx_L1;}
1935
    __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_ip6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; goto __pyx_L1;}
1697
    __pyx_r = __pyx_1;
1936
    __pyx_r = __pyx_1;
1698
    __pyx_1 = 0;
1937
    __pyx_1 = 0;
Lines 1700-1710 Link Here
1700
    goto __pyx_L2;
1939
    goto __pyx_L2;
1701
  }
1940
  }
1702
  /*else*/ {
1941
  /*else*/ {
1703
1942
    __Pyx_Raise(PyExc_ValueError, __pyx_k9p, 0);
1704
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":479 */
1705
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; goto __pyx_L1;}
1706
    __Pyx_Raise(__pyx_2, __pyx_k65p, 0);
1707
    Py_DECREF(__pyx_2); __pyx_2 = 0;
1708
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; goto __pyx_L1;}
1943
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; goto __pyx_L1;}
1709
  }
1944
  }
1710
  __pyx_L2:;
1945
  __pyx_L2:;
Lines 1721-1730 Link Here
1721
  return __pyx_r;
1956
  return __pyx_r;
1722
}
1957
}
1723
1958
1724
static PyObject *__pyx_k66p;
1725
1726
static char (__pyx_k66[]) = "non-Ethernet address";
1727
1728
static PyObject *__pyx_f_4dnet_4addr_3eth___get__(PyObject *__pyx_v_self); /*proto*/
1959
static PyObject *__pyx_f_4dnet_4addr_3eth___get__(PyObject *__pyx_v_self); /*proto*/
1729
static PyObject *__pyx_f_4dnet_4addr_3eth___get__(PyObject *__pyx_v_self) {
1960
static PyObject *__pyx_f_4dnet_4addr_3eth___get__(PyObject *__pyx_v_self) {
1730
  PyObject *__pyx_r;
1961
  PyObject *__pyx_r;
Lines 1733-1739 Link Here
1733
  int __pyx_3;
1964
  int __pyx_3;
1734
  Py_INCREF(__pyx_v_self);
1965
  Py_INCREF(__pyx_v_self);
1735
1966
1736
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":484 */
1967
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":484 */
1737
  __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;}
1968
  __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;}
1738
  __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;}
1969
  __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;}
1739
  if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; goto __pyx_L1;}
1970
  if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; goto __pyx_L1;}
Lines 1741-1760 Link Here
1741
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1972
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1742
  Py_DECREF(__pyx_2); __pyx_2 = 0;
1973
  Py_DECREF(__pyx_2); __pyx_2 = 0;
1743
  if (__pyx_3) {
1974
  if (__pyx_3) {
1744
1975
    __Pyx_Raise(PyExc_ValueError, __pyx_k14p, 0);
1745
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":485 */
1746
    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; goto __pyx_L1;}
1747
    __Pyx_Raise(__pyx_1, __pyx_k66p, 0);
1748
    Py_DECREF(__pyx_1); __pyx_1 = 0;
1749
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; goto __pyx_L1;}
1976
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; goto __pyx_L1;}
1750
    goto __pyx_L2;
1977
    goto __pyx_L2;
1751
  }
1978
  }
1752
  __pyx_L2:;
1979
  __pyx_L2:;
1753
1980
1754
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":486 */
1981
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":486 */
1755
  __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;}
1982
  __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;}
1756
  __pyx_r = __pyx_2;
1983
  __pyx_r = __pyx_1;
1757
  __pyx_2 = 0;
1984
  __pyx_1 = 0;
1758
  goto __pyx_L0;
1985
  goto __pyx_L0;
1759
1986
1760
  __pyx_r = Py_None; Py_INCREF(Py_None);
1987
  __pyx_r = Py_None; Py_INCREF(Py_None);
Lines 1769-1778 Link Here
1769
  return __pyx_r;
1996
  return __pyx_r;
1770
}
1997
}
1771
1998
1772
static PyObject *__pyx_k67p;
1773
1774
static char (__pyx_k67[]) = "not a 6-byte string";
1775
1776
static int __pyx_f_4dnet_4addr_3eth___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
1999
static int __pyx_f_4dnet_4addr_3eth___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
1777
static int __pyx_f_4dnet_4addr_3eth___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
2000
static int __pyx_f_4dnet_4addr_3eth___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
1778
  int __pyx_r;
2001
  int __pyx_r;
Lines 1783-1789 Link Here
1783
  Py_INCREF(__pyx_v_self);
2006
  Py_INCREF(__pyx_v_self);
1784
  Py_INCREF(__pyx_v_value);
2007
  Py_INCREF(__pyx_v_value);
1785
2008
1786
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":489 */
2009
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":489 */
1787
  __pyx_1 = PyInt_FromLong(PyString_Size(__pyx_v_value)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; goto __pyx_L1;}
2010
  __pyx_1 = PyInt_FromLong(PyString_Size(__pyx_v_value)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; goto __pyx_L1;}
1788
  __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;}
2011
  __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;}
1789
  if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; goto __pyx_L1;}
2012
  if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; goto __pyx_L1;}
Lines 1791-1820 Link Here
1791
  Py_DECREF(__pyx_1); __pyx_1 = 0;
2014
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1792
  Py_DECREF(__pyx_2); __pyx_2 = 0;
2015
  Py_DECREF(__pyx_2); __pyx_2 = 0;
1793
  if (__pyx_3) {
2016
  if (__pyx_3) {
1794
2017
    __Pyx_Raise(PyExc_ValueError, __pyx_k16p, 0);
1795
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":490 */
1796
    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; goto __pyx_L1;}
1797
    __Pyx_Raise(__pyx_1, __pyx_k67p, 0);
1798
    Py_DECREF(__pyx_1); __pyx_1 = 0;
1799
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; goto __pyx_L1;}
2018
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; goto __pyx_L1;}
1800
    goto __pyx_L2;
2019
    goto __pyx_L2;
1801
  }
2020
  }
1802
  __pyx_L2:;
2021
  __pyx_L2:;
1803
2022
1804
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":491 */
2023
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":491 */
1805
  __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;}
2024
  __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;}
1806
  Py_DECREF(__pyx_2); __pyx_2 = 0;
1807
1808
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":492 */
1809
  __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;}
1810
  __pyx_4 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; goto __pyx_L1;}
1811
  Py_DECREF(__pyx_1); __pyx_1 = 0;
2025
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1812
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type = __pyx_4;
1813
2026
1814
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":493 */
2027
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":492 */
1815
  __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;}
2028
  __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;}
1816
  __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; goto __pyx_L1;}
2029
  __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; goto __pyx_L1;}
1817
  Py_DECREF(__pyx_2); __pyx_2 = 0;
2030
  Py_DECREF(__pyx_2); __pyx_2 = 0;
2031
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type = __pyx_4;
2032
2033
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":493 */
2034
  __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;}
2035
  __pyx_4 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; goto __pyx_L1;}
2036
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1818
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits = __pyx_4;
2037
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits = __pyx_4;
1819
2038
1820
  __pyx_r = 0;
2039
  __pyx_r = 0;
Lines 1830-1839 Link Here
1830
  return __pyx_r;
2049
  return __pyx_r;
1831
}
2050
}
1832
2051
1833
static PyObject *__pyx_k68p;
1834
1835
static char (__pyx_k68[]) = "non-IP address";
1836
1837
static PyObject *__pyx_f_4dnet_4addr_2ip___get__(PyObject *__pyx_v_self); /*proto*/
2052
static PyObject *__pyx_f_4dnet_4addr_2ip___get__(PyObject *__pyx_v_self); /*proto*/
1838
static PyObject *__pyx_f_4dnet_4addr_2ip___get__(PyObject *__pyx_v_self) {
2053
static PyObject *__pyx_f_4dnet_4addr_2ip___get__(PyObject *__pyx_v_self) {
1839
  PyObject *__pyx_r;
2054
  PyObject *__pyx_r;
Lines 1842-1848 Link Here
1842
  int __pyx_3;
2057
  int __pyx_3;
1843
  Py_INCREF(__pyx_v_self);
2058
  Py_INCREF(__pyx_v_self);
1844
2059
1845
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":498 */
2060
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":498 */
1846
  __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;}
2061
  __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;}
1847
  __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;}
2062
  __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;}
1848
  if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; goto __pyx_L1;}
2063
  if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; goto __pyx_L1;}
Lines 1850-1869 Link Here
1850
  Py_DECREF(__pyx_1); __pyx_1 = 0;
2065
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1851
  Py_DECREF(__pyx_2); __pyx_2 = 0;
2066
  Py_DECREF(__pyx_2); __pyx_2 = 0;
1852
  if (__pyx_3) {
2067
  if (__pyx_3) {
1853
2068
    __Pyx_Raise(PyExc_ValueError, __pyx_k18p, 0);
1854
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":499 */
1855
    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; goto __pyx_L1;}
1856
    __Pyx_Raise(__pyx_1, __pyx_k68p, 0);
1857
    Py_DECREF(__pyx_1); __pyx_1 = 0;
1858
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; goto __pyx_L1;}
2069
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; goto __pyx_L1;}
1859
    goto __pyx_L2;
2070
    goto __pyx_L2;
1860
  }
2071
  }
1861
  __pyx_L2:;
2072
  __pyx_L2:;
1862
2073
1863
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":500 */
2074
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":500 */
1864
  __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;}
2075
  __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;}
1865
  __pyx_r = __pyx_2;
2076
  __pyx_r = __pyx_1;
1866
  __pyx_2 = 0;
2077
  __pyx_1 = 0;
1867
  goto __pyx_L0;
2078
  goto __pyx_L0;
1868
2079
1869
  __pyx_r = Py_None; Py_INCREF(Py_None);
2080
  __pyx_r = Py_None; Py_INCREF(Py_None);
Lines 1878-1887 Link Here
1878
  return __pyx_r;
2089
  return __pyx_r;
1879
}
2090
}
1880
2091
1881
static PyObject *__pyx_k69p;
1882
1883
static char (__pyx_k69[]) = "not a 4-byte string";
1884
1885
static int __pyx_f_4dnet_4addr_2ip___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
2092
static int __pyx_f_4dnet_4addr_2ip___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
1886
static int __pyx_f_4dnet_4addr_2ip___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
2093
static int __pyx_f_4dnet_4addr_2ip___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
1887
  int __pyx_r;
2094
  int __pyx_r;
Lines 1892-1909 Link Here
1892
  Py_INCREF(__pyx_v_self);
2099
  Py_INCREF(__pyx_v_self);
1893
  Py_INCREF(__pyx_v_value);
2100
  Py_INCREF(__pyx_v_value);
1894
2101
1895
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":504 */
2102
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":504 */
1896
  __pyx_1 = PyInt_Check(__pyx_v_value);
2103
  __pyx_1 = PyInt_Check(__pyx_v_value);
1897
  if (__pyx_1) {
2104
  if (__pyx_1) {
1898
1899
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":505 */
1900
    ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_ip = htonl(PyInt_AsLong(__pyx_v_value));
2105
    ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_ip = htonl(PyInt_AsLong(__pyx_v_value));
1901
    goto __pyx_L2;
2106
    goto __pyx_L2;
1902
  }
2107
  }
1903
  __pyx_1 = PyLong_Check(__pyx_v_value);
2108
  __pyx_1 = PyLong_Check(__pyx_v_value);
1904
  if (__pyx_1) {
2109
  if (__pyx_1) {
1905
1906
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":507 */
1907
    ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_ip = htonl(PyLong_AsUnsignedLong(__pyx_v_value));
2110
    ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_ip = htonl(PyLong_AsUnsignedLong(__pyx_v_value));
1908
    goto __pyx_L2;
2111
    goto __pyx_L2;
1909
  }
2112
  }
Lines 1914-1945 Link Here
1914
  Py_DECREF(__pyx_2); __pyx_2 = 0;
2117
  Py_DECREF(__pyx_2); __pyx_2 = 0;
1915
  Py_DECREF(__pyx_3); __pyx_3 = 0;
2118
  Py_DECREF(__pyx_3); __pyx_3 = 0;
1916
  if (__pyx_1) {
2119
  if (__pyx_1) {
1917
2120
    __Pyx_Raise(PyExc_ValueError, __pyx_k20p, 0);
1918
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":509 */
1919
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; goto __pyx_L1;}
1920
    __Pyx_Raise(__pyx_2, __pyx_k69p, 0);
1921
    Py_DECREF(__pyx_2); __pyx_2 = 0;
1922
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; goto __pyx_L1;}
2121
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; goto __pyx_L1;}
1923
    goto __pyx_L2;
2122
    goto __pyx_L2;
1924
  }
2123
  }
1925
  /*else*/ {
2124
  /*else*/ {
1926
2125
    __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;}
1927
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":511 */
2126
    Py_DECREF(__pyx_2); __pyx_2 = 0;
1928
    __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;}
1929
    Py_DECREF(__pyx_3); __pyx_3 = 0;
1930
  }
2127
  }
1931
  __pyx_L2:;
2128
  __pyx_L2:;
1932
2129
1933
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":512 */
2130
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":512 */
1934
  __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;}
2131
  __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;}
1935
  __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;}
2132
  __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;}
1936
  Py_DECREF(__pyx_2); __pyx_2 = 0;
2133
  Py_DECREF(__pyx_3); __pyx_3 = 0;
1937
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type = __pyx_4;
2134
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type = __pyx_4;
1938
2135
1939
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":513 */
2136
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":513 */
1940
  __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;}
2137
  __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;}
1941
  __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;}
2138
  __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;}
1942
  Py_DECREF(__pyx_3); __pyx_3 = 0;
2139
  Py_DECREF(__pyx_2); __pyx_2 = 0;
1943
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits = __pyx_4;
2140
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits = __pyx_4;
1944
2141
1945
  __pyx_r = 0;
2142
  __pyx_r = 0;
Lines 1955-1964 Link Here
1955
  return __pyx_r;
2152
  return __pyx_r;
1956
}
2153
}
1957
2154
1958
static PyObject *__pyx_k70p;
1959
1960
static char (__pyx_k70[]) = "non-IPv6 address";
1961
1962
static PyObject *__pyx_f_4dnet_4addr_3ip6___get__(PyObject *__pyx_v_self); /*proto*/
2155
static PyObject *__pyx_f_4dnet_4addr_3ip6___get__(PyObject *__pyx_v_self); /*proto*/
1963
static PyObject *__pyx_f_4dnet_4addr_3ip6___get__(PyObject *__pyx_v_self) {
2156
static PyObject *__pyx_f_4dnet_4addr_3ip6___get__(PyObject *__pyx_v_self) {
1964
  PyObject *__pyx_r;
2157
  PyObject *__pyx_r;
Lines 1967-1973 Link Here
1967
  int __pyx_3;
2160
  int __pyx_3;
1968
  Py_INCREF(__pyx_v_self);
2161
  Py_INCREF(__pyx_v_self);
1969
2162
1970
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":518 */
2163
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":518 */
1971
  __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;}
2164
  __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;}
1972
  __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;}
2165
  __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;}
1973
  if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; goto __pyx_L1;}
2166
  if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; goto __pyx_L1;}
Lines 1975-1994 Link Here
1975
  Py_DECREF(__pyx_1); __pyx_1 = 0;
2168
  Py_DECREF(__pyx_1); __pyx_1 = 0;
1976
  Py_DECREF(__pyx_2); __pyx_2 = 0;
2169
  Py_DECREF(__pyx_2); __pyx_2 = 0;
1977
  if (__pyx_3) {
2170
  if (__pyx_3) {
1978
2171
    __Pyx_Raise(PyExc_ValueError, __pyx_k21p, 0);
1979
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":519 */
1980
    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; goto __pyx_L1;}
1981
    __Pyx_Raise(__pyx_1, __pyx_k70p, 0);
1982
    Py_DECREF(__pyx_1); __pyx_1 = 0;
1983
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; goto __pyx_L1;}
2172
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; goto __pyx_L1;}
1984
    goto __pyx_L2;
2173
    goto __pyx_L2;
1985
  }
2174
  }
1986
  __pyx_L2:;
2175
  __pyx_L2:;
1987
2176
1988
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":520 */
2177
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":520 */
1989
  __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;}
2178
  __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;}
1990
  __pyx_r = __pyx_2;
2179
  __pyx_r = __pyx_1;
1991
  __pyx_2 = 0;
2180
  __pyx_1 = 0;
1992
  goto __pyx_L0;
2181
  goto __pyx_L0;
1993
2182
1994
  __pyx_r = Py_None; Py_INCREF(Py_None);
2183
  __pyx_r = Py_None; Py_INCREF(Py_None);
Lines 2003-2012 Link Here
2003
  return __pyx_r;
2192
  return __pyx_r;
2004
}
2193
}
2005
2194
2006
static PyObject *__pyx_k71p;
2007
2008
static char (__pyx_k71[]) = "not a 16-byte string";
2009
2010
static int __pyx_f_4dnet_4addr_3ip6___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
2195
static int __pyx_f_4dnet_4addr_3ip6___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
2011
static int __pyx_f_4dnet_4addr_3ip6___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
2196
static int __pyx_f_4dnet_4addr_3ip6___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
2012
  int __pyx_r;
2197
  int __pyx_r;
Lines 2017-2023 Link Here
2017
  Py_INCREF(__pyx_v_self);
2202
  Py_INCREF(__pyx_v_self);
2018
  Py_INCREF(__pyx_v_value);
2203
  Py_INCREF(__pyx_v_value);
2019
2204
2020
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":523 */
2205
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":523 */
2021
  __pyx_1 = PyInt_FromLong(PyString_Size(__pyx_v_value)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; goto __pyx_L1;}
2206
  __pyx_1 = PyInt_FromLong(PyString_Size(__pyx_v_value)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; goto __pyx_L1;}
2022
  __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;}
2207
  __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;}
2023
  if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; goto __pyx_L1;}
2208
  if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; goto __pyx_L1;}
Lines 2025-2054 Link Here
2025
  Py_DECREF(__pyx_1); __pyx_1 = 0;
2210
  Py_DECREF(__pyx_1); __pyx_1 = 0;
2026
  Py_DECREF(__pyx_2); __pyx_2 = 0;
2211
  Py_DECREF(__pyx_2); __pyx_2 = 0;
2027
  if (__pyx_3) {
2212
  if (__pyx_3) {
2028
2213
    __Pyx_Raise(PyExc_ValueError, __pyx_k23p, 0);
2029
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":524 */
2030
    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; goto __pyx_L1;}
2031
    __Pyx_Raise(__pyx_1, __pyx_k71p, 0);
2032
    Py_DECREF(__pyx_1); __pyx_1 = 0;
2033
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; goto __pyx_L1;}
2214
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; goto __pyx_L1;}
2034
    goto __pyx_L2;
2215
    goto __pyx_L2;
2035
  }
2216
  }
2036
  __pyx_L2:;
2217
  __pyx_L2:;
2037
2218
2038
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":525 */
2219
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":525 */
2039
  __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;}
2220
  __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;}
2040
  Py_DECREF(__pyx_2); __pyx_2 = 0;
2041
2042
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":526 */
2043
  __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;}
2044
  __pyx_4 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; goto __pyx_L1;}
2045
  Py_DECREF(__pyx_1); __pyx_1 = 0;
2221
  Py_DECREF(__pyx_1); __pyx_1 = 0;
2046
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type = __pyx_4;
2047
2222
2048
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":527 */
2223
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":526 */
2049
  __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;}
2224
  __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;}
2050
  __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; goto __pyx_L1;}
2225
  __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; goto __pyx_L1;}
2051
  Py_DECREF(__pyx_2); __pyx_2 = 0;
2226
  Py_DECREF(__pyx_2); __pyx_2 = 0;
2227
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type = __pyx_4;
2228
2229
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":527 */
2230
  __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;}
2231
  __pyx_4 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; goto __pyx_L1;}
2232
  Py_DECREF(__pyx_1); __pyx_1 = 0;
2052
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits = __pyx_4;
2233
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits = __pyx_4;
2053
2234
2054
  __pyx_r = 0;
2235
  __pyx_r = 0;
Lines 2070-2093 Link Here
2070
  PyObject *__pyx_v_bcast;
2251
  PyObject *__pyx_v_bcast;
2071
  PyObject *__pyx_r;
2252
  PyObject *__pyx_r;
2072
  PyObject *__pyx_1 = 0;
2253
  PyObject *__pyx_1 = 0;
2073
  PyObject *__pyx_2 = 0;
2074
  static char *__pyx_argnames[] = {0};
2254
  static char *__pyx_argnames[] = {0};
2075
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
2255
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
2076
  Py_INCREF(__pyx_v_self);
2256
  Py_INCREF(__pyx_v_self);
2077
  __pyx_v_bcast = Py_None; Py_INCREF(Py_None);
2257
  __pyx_v_bcast = Py_None; Py_INCREF(Py_None);
2078
2258
2079
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":531 */
2259
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":531 */
2080
  __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; goto __pyx_L1;}
2260
  __pyx_1 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; goto __pyx_L1;}
2081
  __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;}
2082
  Py_DECREF(__pyx_1); __pyx_1 = 0;
2083
  Py_DECREF(__pyx_v_bcast);
2261
  Py_DECREF(__pyx_v_bcast);
2084
  __pyx_v_bcast = __pyx_2;
2262
  __pyx_v_bcast = __pyx_1;
2085
  __pyx_2 = 0;
2263
  __pyx_1 = 0;
2086
2264
2087
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":532 */
2265
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":532 */
2088
  addr_bcast((&((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr),(&((struct __pyx_obj_4dnet_addr *)__pyx_v_bcast)->_addr));
2266
  addr_bcast((&((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr),(&((struct __pyx_obj_4dnet_addr *)__pyx_v_bcast)->_addr));
2089
2267
2090
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":533 */
2268
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":533 */
2091
  Py_INCREF(__pyx_v_bcast);
2269
  Py_INCREF(__pyx_v_bcast);
2092
  __pyx_r = __pyx_v_bcast;
2270
  __pyx_r = __pyx_v_bcast;
2093
  goto __pyx_L0;
2271
  goto __pyx_L0;
Lines 2096-2102 Link Here
2096
  goto __pyx_L0;
2274
  goto __pyx_L0;
2097
  __pyx_L1:;
2275
  __pyx_L1:;
2098
  Py_XDECREF(__pyx_1);
2276
  Py_XDECREF(__pyx_1);
2099
  Py_XDECREF(__pyx_2);
2100
  __Pyx_AddTraceback("dnet.addr.bcast");
2277
  __Pyx_AddTraceback("dnet.addr.bcast");
2101
  __pyx_r = 0;
2278
  __pyx_r = 0;
2102
  __pyx_L0:;
2279
  __pyx_L0:;
Lines 2111-2134 Link Here
2111
  PyObject *__pyx_v_net;
2288
  PyObject *__pyx_v_net;
2112
  PyObject *__pyx_r;
2289
  PyObject *__pyx_r;
2113
  PyObject *__pyx_1 = 0;
2290
  PyObject *__pyx_1 = 0;
2114
  PyObject *__pyx_2 = 0;
2115
  static char *__pyx_argnames[] = {0};
2291
  static char *__pyx_argnames[] = {0};
2116
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
2292
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
2117
  Py_INCREF(__pyx_v_self);
2293
  Py_INCREF(__pyx_v_self);
2118
  __pyx_v_net = Py_None; Py_INCREF(Py_None);
2294
  __pyx_v_net = Py_None; Py_INCREF(Py_None);
2119
2295
2120
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":537 */
2296
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":537 */
2121
  __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; goto __pyx_L1;}
2297
  __pyx_1 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; goto __pyx_L1;}
2122
  __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;}
2123
  Py_DECREF(__pyx_1); __pyx_1 = 0;
2124
  Py_DECREF(__pyx_v_net);
2298
  Py_DECREF(__pyx_v_net);
2125
  __pyx_v_net = __pyx_2;
2299
  __pyx_v_net = __pyx_1;
2126
  __pyx_2 = 0;
2300
  __pyx_1 = 0;
2127
2301
2128
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":538 */
2302
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":538 */
2129
  addr_net((&((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr),(&((struct __pyx_obj_4dnet_addr *)__pyx_v_net)->_addr));
2303
  addr_net((&((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr),(&((struct __pyx_obj_4dnet_addr *)__pyx_v_net)->_addr));
2130
2304
2131
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":539 */
2305
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":539 */
2132
  Py_INCREF(__pyx_v_net);
2306
  Py_INCREF(__pyx_v_net);
2133
  __pyx_r = __pyx_v_net;
2307
  __pyx_r = __pyx_v_net;
2134
  goto __pyx_L0;
2308
  goto __pyx_L0;
Lines 2137-2143 Link Here
2137
  goto __pyx_L0;
2311
  goto __pyx_L0;
2138
  __pyx_L1:;
2312
  __pyx_L1:;
2139
  Py_XDECREF(__pyx_1);
2313
  Py_XDECREF(__pyx_1);
2140
  Py_XDECREF(__pyx_2);
2141
  __Pyx_AddTraceback("dnet.addr.net");
2314
  __Pyx_AddTraceback("dnet.addr.net");
2142
  __pyx_r = 0;
2315
  __pyx_r = 0;
2143
  __pyx_L0:;
2316
  __pyx_L0:;
Lines 2146-2154 Link Here
2146
  return __pyx_r;
2319
  return __pyx_r;
2147
}
2320
}
2148
2321
2149
static PyObject *__pyx_n_NotImplementedError;
2150
static PyObject *__pyx_n___copy__;
2151
2152
static PyObject *__pyx_f_4dnet_4addr___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
2322
static PyObject *__pyx_f_4dnet_4addr___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
2153
static PyObject *__pyx_f_4dnet_4addr___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
2323
static PyObject *__pyx_f_4dnet_4addr___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
2154
  PyObject *__pyx_v_x;
2324
  PyObject *__pyx_v_x;
Lines 2158-2176 Link Here
2158
  int __pyx_1;
2328
  int __pyx_1;
2159
  PyObject *__pyx_2 = 0;
2329
  PyObject *__pyx_2 = 0;
2160
  PyObject *__pyx_3 = 0;
2330
  PyObject *__pyx_3 = 0;
2161
  PyObject *__pyx_4 = 0;
2331
  unsigned long __pyx_4;
2162
  unsigned long __pyx_5;
2163
  Py_INCREF(__pyx_v_self);
2332
  Py_INCREF(__pyx_v_self);
2164
  Py_INCREF(__pyx_v_other);
2333
  Py_INCREF(__pyx_v_other);
2165
  __pyx_v_x = Py_None; Py_INCREF(Py_None);
2334
  __pyx_v_x = Py_None; Py_INCREF(Py_None);
2166
  __pyx_v_y = Py_None; Py_INCREF(Py_None);
2335
  __pyx_v_y = Py_None; Py_INCREF(Py_None);
2167
  __pyx_v_z = Py_None; Py_INCREF(Py_None);
2336
  __pyx_v_z = Py_None; Py_INCREF(Py_None);
2168
2337
2169
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":543 */
2338
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":543 */
2170
  __pyx_1 = PyInt_Check(__pyx_v_self);
2339
  __pyx_1 = PyInt_Check(__pyx_v_self);
2171
  if (__pyx_1) {
2340
  if (__pyx_1) {
2172
2173
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":544 */
2174
    __pyx_2 = __pyx_v_other;
2341
    __pyx_2 = __pyx_v_other;
2175
    Py_INCREF(__pyx_2);
2342
    Py_INCREF(__pyx_2);
2176
    __pyx_3 = __pyx_v_self;
2343
    __pyx_3 = __pyx_v_self;
Lines 2185-2192 Link Here
2185
  }
2352
  }
2186
  __pyx_1 = PyInt_Check(__pyx_v_other);
2353
  __pyx_1 = PyInt_Check(__pyx_v_other);
2187
  if (__pyx_1) {
2354
  if (__pyx_1) {
2188
2189
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":546 */
2190
    __pyx_2 = __pyx_v_self;
2355
    __pyx_2 = __pyx_v_self;
2191
    Py_INCREF(__pyx_2);
2356
    Py_INCREF(__pyx_2);
2192
    __pyx_3 = __pyx_v_other;
2357
    __pyx_3 = __pyx_v_other;
Lines 2200-2233 Link Here
2200
    goto __pyx_L2;
2365
    goto __pyx_L2;
2201
  }
2366
  }
2202
  /*else*/ {
2367
  /*else*/ {
2203
2368
    __Pyx_Raise(PyExc_NotImplementedError, 0, 0);
2204
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":548 */
2205
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_NotImplementedError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; goto __pyx_L1;}
2206
    __Pyx_Raise(__pyx_2, 0, 0);
2207
    Py_DECREF(__pyx_2); __pyx_2 = 0;
2208
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; goto __pyx_L1;}
2369
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; goto __pyx_L1;}
2209
  }
2370
  }
2210
  __pyx_L2:;
2371
  __pyx_L2:;
2211
2372
2212
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":549 */
2373
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":549 */
2213
  __pyx_3 = PyObject_GetAttr(__pyx_v_x, __pyx_n___copy__); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; goto __pyx_L1;}
2374
  __pyx_2 = PyObject_GetAttr(__pyx_v_x, __pyx_n___copy__); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; goto __pyx_L1;}
2214
  __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; goto __pyx_L1;}
2375
  __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; goto __pyx_L1;}
2215
  __pyx_4 = PyObject_Call(__pyx_3, __pyx_2, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; goto __pyx_L1;}
2216
  Py_DECREF(__pyx_3); __pyx_3 = 0;
2217
  Py_DECREF(__pyx_2); __pyx_2 = 0;
2376
  Py_DECREF(__pyx_2); __pyx_2 = 0;
2218
  Py_DECREF(__pyx_v_z);
2377
  Py_DECREF(__pyx_v_z);
2219
  __pyx_v_z = __pyx_4;
2378
  __pyx_v_z = __pyx_3;
2220
  __pyx_4 = 0;
2379
  __pyx_3 = 0;
2221
2380
2222
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":550 */
2381
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":550 */
2223
  __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;}
2382
  __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;}
2224
  __pyx_2 = PyNumber_Add(__pyx_3, __pyx_v_y); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;}
2383
  __pyx_3 = PyNumber_Add(__pyx_2, __pyx_v_y); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;}
2225
  Py_DECREF(__pyx_3); __pyx_3 = 0;
2226
  __pyx_5 = PyInt_AsUnsignedLongMask(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;}
2227
  Py_DECREF(__pyx_2); __pyx_2 = 0;
2384
  Py_DECREF(__pyx_2); __pyx_2 = 0;
2228
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_z)->_addr.addr_ip = htonl(__pyx_5);
2385
  __pyx_4 = PyInt_AsUnsignedLongMask(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;}
2386
  Py_DECREF(__pyx_3); __pyx_3 = 0;
2387
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_z)->_addr.addr_ip = htonl(__pyx_4);
2229
2388
2230
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":551 */
2389
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":551 */
2231
  Py_INCREF(__pyx_v_z);
2390
  Py_INCREF(__pyx_v_z);
2232
  __pyx_r = __pyx_v_z;
2391
  __pyx_r = __pyx_v_z;
2233
  goto __pyx_L0;
2392
  goto __pyx_L0;
Lines 2237-2243 Link Here
2237
  __pyx_L1:;
2396
  __pyx_L1:;
2238
  Py_XDECREF(__pyx_2);
2397
  Py_XDECREF(__pyx_2);
2239
  Py_XDECREF(__pyx_3);
2398
  Py_XDECREF(__pyx_3);
2240
  Py_XDECREF(__pyx_4);
2241
  __Pyx_AddTraceback("dnet.addr.__add__");
2399
  __Pyx_AddTraceback("dnet.addr.__add__");
2242
  __pyx_r = 0;
2400
  __pyx_r = 0;
2243
  __pyx_L0:;
2401
  __pyx_L0:;
Lines 2254-2277 Link Here
2254
  PyObject *__pyx_v_a;
2412
  PyObject *__pyx_v_a;
2255
  PyObject *__pyx_r;
2413
  PyObject *__pyx_r;
2256
  PyObject *__pyx_1 = 0;
2414
  PyObject *__pyx_1 = 0;
2257
  PyObject *__pyx_2 = 0;
2258
  static char *__pyx_argnames[] = {0};
2415
  static char *__pyx_argnames[] = {0};
2259
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
2416
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
2260
  Py_INCREF(__pyx_v_self);
2417
  Py_INCREF(__pyx_v_self);
2261
  __pyx_v_a = Py_None; Py_INCREF(Py_None);
2418
  __pyx_v_a = Py_None; Py_INCREF(Py_None);
2262
2419
2263
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":554 */
2420
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":554 */
2264
  __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; goto __pyx_L1;}
2421
  __pyx_1 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; goto __pyx_L1;}
2265
  __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;}
2266
  Py_DECREF(__pyx_1); __pyx_1 = 0;
2267
  Py_DECREF(__pyx_v_a);
2422
  Py_DECREF(__pyx_v_a);
2268
  __pyx_v_a = __pyx_2;
2423
  __pyx_v_a = __pyx_1;
2269
  __pyx_2 = 0;
2424
  __pyx_1 = 0;
2270
2425
2271
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":555 */
2426
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":555 */
2272
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_a)->_addr = ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr;
2427
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_a)->_addr = ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr;
2273
2428
2274
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":556 */
2429
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":556 */
2275
  Py_INCREF(__pyx_v_a);
2430
  Py_INCREF(__pyx_v_a);
2276
  __pyx_r = __pyx_v_a;
2431
  __pyx_r = __pyx_v_a;
2277
  goto __pyx_L0;
2432
  goto __pyx_L0;
Lines 2280-2286 Link Here
2280
  goto __pyx_L0;
2435
  goto __pyx_L0;
2281
  __pyx_L1:;
2436
  __pyx_L1:;
2282
  Py_XDECREF(__pyx_1);
2437
  Py_XDECREF(__pyx_1);
2283
  Py_XDECREF(__pyx_2);
2284
  __Pyx_AddTraceback("dnet.addr.__copy__");
2438
  __Pyx_AddTraceback("dnet.addr.__copy__");
2285
  __pyx_r = 0;
2439
  __pyx_r = 0;
2286
  __pyx_L0:;
2440
  __pyx_L0:;
Lines 2298-2329 Link Here
2298
  Py_INCREF(__pyx_v_y);
2452
  Py_INCREF(__pyx_v_y);
2299
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_4dnet_addr, 1, "y")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; goto __pyx_L1;}
2453
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_4dnet_addr, 1, "y")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; goto __pyx_L1;}
2300
2454
2301
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":560 */
2455
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":560 */
2302
  __pyx_v_i = addr_cmp((&((struct __pyx_obj_4dnet_addr *)__pyx_v_x)->_addr),(&((struct __pyx_obj_4dnet_addr *)__pyx_v_y)->_addr));
2456
  __pyx_v_i = addr_cmp((&((struct __pyx_obj_4dnet_addr *)__pyx_v_x)->_addr),(&((struct __pyx_obj_4dnet_addr *)__pyx_v_y)->_addr));
2303
2457
2304
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":561 */
2458
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":561 */
2305
  __pyx_1 = (__pyx_v_i < 0);
2459
  __pyx_1 = (__pyx_v_i < 0);
2306
  if (__pyx_1) {
2460
  if (__pyx_1) {
2307
2308
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":562 */
2309
    __pyx_r = (-1);
2461
    __pyx_r = (-1);
2310
    goto __pyx_L0;
2462
    goto __pyx_L0;
2311
    goto __pyx_L2;
2463
    goto __pyx_L2;
2312
  }
2464
  }
2313
  __pyx_L2:;
2465
  __pyx_L2:;
2314
2466
2315
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":563 */
2467
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":563 */
2316
  __pyx_1 = (__pyx_v_i > 0);
2468
  __pyx_1 = (__pyx_v_i > 0);
2317
  if (__pyx_1) {
2469
  if (__pyx_1) {
2318
2319
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":564 */
2320
    __pyx_r = 1;
2470
    __pyx_r = 1;
2321
    goto __pyx_L0;
2471
    goto __pyx_L0;
2322
    goto __pyx_L3;
2472
    goto __pyx_L3;
2323
  }
2473
  }
2324
  __pyx_L3:;
2474
  __pyx_L3:;
2325
2475
2326
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":565 */
2476
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":565 */
2327
  __pyx_r = 0;
2477
  __pyx_r = 0;
2328
  goto __pyx_L0;
2478
  goto __pyx_L0;
2329
2479
Lines 2350-2356 Link Here
2350
  Py_INCREF(__pyx_v_other);
2500
  Py_INCREF(__pyx_v_other);
2351
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_4dnet_addr, 1, "other")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; goto __pyx_L1;}
2501
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_4dnet_addr, 1, "other")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; goto __pyx_L1;}
2352
2502
2353
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":569 */
2503
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":569 */
2354
  __pyx_1 = (addr_net((&((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr),(&__pyx_v_s1)) != 0);
2504
  __pyx_1 = (addr_net((&((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr),(&__pyx_v_s1)) != 0);
2355
  if (!__pyx_1) {
2505
  if (!__pyx_1) {
2356
    __pyx_1 = (addr_bcast((&((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr),(&__pyx_v_s2)) != 0);
2506
    __pyx_1 = (addr_bcast((&((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr),(&__pyx_v_s2)) != 0);
Lines 2362-2376 Link Here
2362
    }
2512
    }
2363
  }
2513
  }
2364
  if (__pyx_1) {
2514
  if (__pyx_1) {
2365
2366
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":573 */
2367
    __pyx_r = 0;
2515
    __pyx_r = 0;
2368
    goto __pyx_L0;
2516
    goto __pyx_L0;
2369
    goto __pyx_L2;
2517
    goto __pyx_L2;
2370
  }
2518
  }
2371
  __pyx_L2:;
2519
  __pyx_L2:;
2372
2520
2373
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":574 */
2521
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":574 */
2374
  __pyx_1 = (addr_cmp((&__pyx_v_o1),(&__pyx_v_s1)) >= 0);
2522
  __pyx_1 = (addr_cmp((&__pyx_v_o1),(&__pyx_v_s1)) >= 0);
2375
  if (__pyx_1) {
2523
  if (__pyx_1) {
2376
    __pyx_1 = (addr_cmp((&__pyx_v_o2),(&__pyx_v_s2)) <= 0);
2524
    __pyx_1 = (addr_cmp((&__pyx_v_o2),(&__pyx_v_s2)) <= 0);
Lines 2404-2410 Link Here
2404
  Py_INCREF(__pyx_v_self);
2552
  Py_INCREF(__pyx_v_self);
2405
  __pyx_v_i = Py_None; Py_INCREF(Py_None);
2553
  __pyx_v_i = Py_None; Py_INCREF(Py_None);
2406
2554
2407
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":578 */
2555
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":578 */
2408
  __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;}
2556
  __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;}
2409
  __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;}
2557
  __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;}
2410
  if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; goto __pyx_L1;}
2558
  if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; goto __pyx_L1;}
Lines 2437-2472 Link Here
2437
  }
2585
  }
2438
  __pyx_L2:;
2586
  __pyx_L2:;
2439
2587
2440
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":581 */
2588
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":581 */
2441
  __pyx_v_x = 3430008;
2589
  __pyx_v_x = 0x345678;
2442
2590
2443
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":582 */
2591
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":582 */
2444
  __pyx_v_x = (__pyx_v_x ^ ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type);
2592
  __pyx_v_x = (__pyx_v_x ^ ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_type);
2445
2593
2446
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":583 */
2594
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":583 */
2447
  __pyx_v_x = (__pyx_v_x ^ ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits);
2595
  __pyx_v_x = (__pyx_v_x ^ ((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_bits);
2448
2596
2449
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":584 */
2597
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":584 */
2450
  __pyx_v_y = ((((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_data8[0]) << 7);
2598
  __pyx_v_y = ((((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_data8[0]) << 7);
2451
2599
2452
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":585 */
2600
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":585 */
2453
  for (__pyx_4 = 0+1; __pyx_4 < __pyx_v_size; ++__pyx_4) {
2601
  for (__pyx_4 = 0+1; __pyx_4 < __pyx_v_size; ++__pyx_4) {
2454
    __pyx_1 = PyInt_FromLong(__pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; goto __pyx_L1;}
2602
    __pyx_1 = PyInt_FromLong(__pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; goto __pyx_L1;}
2455
    Py_DECREF(__pyx_v_i);
2603
    Py_DECREF(__pyx_v_i);
2456
    __pyx_v_i = __pyx_1;
2604
    __pyx_v_i = __pyx_1;
2457
    __pyx_1 = 0;
2605
    __pyx_1 = 0;
2458
2459
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":586 */
2460
    __pyx_5 = PyInt_AsSsize_t(__pyx_v_i); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; goto __pyx_L1;}
2606
    __pyx_5 = PyInt_AsSsize_t(__pyx_v_i); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; goto __pyx_L1;}
2461
    __pyx_v_y = ((1000003 * __pyx_v_y) ^ (((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_data8[__pyx_5]));
2607
    __pyx_v_y = ((1000003 * __pyx_v_y) ^ (((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr.addr_data8[__pyx_5]));
2462
    __pyx_L3:;
2463
  }
2608
  }
2464
  __pyx_L4:;
2465
2609
2466
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":587 */
2610
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":587 */
2467
  __pyx_v_y = (__pyx_v_y ^ __pyx_v_size);
2611
  __pyx_v_y = (__pyx_v_y ^ __pyx_v_size);
2468
2612
2469
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":588 */
2613
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":588 */
2470
  __pyx_3 = (__pyx_v_y == (-1));
2614
  __pyx_3 = (__pyx_v_y == (-1));
2471
  if (__pyx_3) {
2615
  if (__pyx_3) {
2472
    __pyx_v_y = (-2);
2616
    __pyx_v_y = (-2);
Lines 2474-2483 Link Here
2474
  }
2618
  }
2475
  __pyx_L5:;
2619
  __pyx_L5:;
2476
2620
2477
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":589 */
2621
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":589 */
2478
  __pyx_v_x = (__pyx_v_x ^ __pyx_v_y);
2622
  __pyx_v_x = (__pyx_v_x ^ __pyx_v_y);
2479
2623
2480
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":590 */
2624
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":590 */
2481
  __pyx_3 = (__pyx_v_x == (-1));
2625
  __pyx_3 = (__pyx_v_x == (-1));
2482
  if (__pyx_3) {
2626
  if (__pyx_3) {
2483
    __pyx_v_x = (-2);
2627
    __pyx_v_x = (-2);
Lines 2485-2491 Link Here
2485
  }
2629
  }
2486
  __pyx_L6:;
2630
  __pyx_L6:;
2487
2631
2488
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":591 */
2632
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":591 */
2489
  __pyx_r = __pyx_v_x;
2633
  __pyx_r = __pyx_v_x;
2490
  goto __pyx_L0;
2634
  goto __pyx_L0;
2491
2635
Lines 2510-2516 Link Here
2510
  int __pyx_3;
2654
  int __pyx_3;
2511
  Py_INCREF(__pyx_v_self);
2655
  Py_INCREF(__pyx_v_self);
2512
2656
2513
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":594 */
2657
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":594 */
2514
  __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;}
2658
  __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;}
2515
  __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;}
2659
  __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;}
2516
  if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; goto __pyx_L1;}
2660
  if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; goto __pyx_L1;}
Lines 2518-2537 Link Here
2518
  Py_DECREF(__pyx_1); __pyx_1 = 0;
2662
  Py_DECREF(__pyx_1); __pyx_1 = 0;
2519
  Py_DECREF(__pyx_2); __pyx_2 = 0;
2663
  Py_DECREF(__pyx_2); __pyx_2 = 0;
2520
  if (__pyx_3) {
2664
  if (__pyx_3) {
2521
2665
    __Pyx_Raise(PyExc_NotImplementedError, 0, 0);
2522
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":595 */
2523
    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_NotImplementedError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; goto __pyx_L1;}
2524
    __Pyx_Raise(__pyx_1, 0, 0);
2525
    Py_DECREF(__pyx_1); __pyx_1 = 0;
2526
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; goto __pyx_L1;}
2666
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; goto __pyx_L1;}
2527
    goto __pyx_L2;
2667
    goto __pyx_L2;
2528
  }
2668
  }
2529
  __pyx_L2:;
2669
  __pyx_L2:;
2530
2670
2531
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":596 */
2671
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":596 */
2532
  __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;}
2672
  __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;}
2533
  __pyx_r = __pyx_2;
2673
  __pyx_r = __pyx_1;
2534
  __pyx_2 = 0;
2674
  __pyx_1 = 0;
2535
  goto __pyx_L0;
2675
  goto __pyx_L0;
2536
2676
2537
  __pyx_r = Py_None; Py_INCREF(Py_None);
2677
  __pyx_r = Py_None; Py_INCREF(Py_None);
Lines 2546-2569 Link Here
2546
  return __pyx_r;
2686
  return __pyx_r;
2547
}
2687
}
2548
2688
2549
static PyObject *__pyx_n___int__;
2550
2551
static PyObject *__pyx_f_4dnet_4addr___long__(PyObject *__pyx_v_self); /*proto*/
2689
static PyObject *__pyx_f_4dnet_4addr___long__(PyObject *__pyx_v_self); /*proto*/
2552
static PyObject *__pyx_f_4dnet_4addr___long__(PyObject *__pyx_v_self) {
2690
static PyObject *__pyx_f_4dnet_4addr___long__(PyObject *__pyx_v_self) {
2553
  PyObject *__pyx_r;
2691
  PyObject *__pyx_r;
2554
  PyObject *__pyx_1 = 0;
2692
  PyObject *__pyx_1 = 0;
2555
  PyObject *__pyx_2 = 0;
2693
  PyObject *__pyx_2 = 0;
2556
  PyObject *__pyx_3 = 0;
2557
  Py_INCREF(__pyx_v_self);
2694
  Py_INCREF(__pyx_v_self);
2558
2559
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":599 */
2560
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n___int__); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; goto __pyx_L1;}
2695
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n___int__); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; goto __pyx_L1;}
2561
  __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; goto __pyx_L1;}
2696
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; goto __pyx_L1;}
2562
  __pyx_3 = PyObject_Call(__pyx_1, __pyx_2, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; goto __pyx_L1;}
2563
  Py_DECREF(__pyx_1); __pyx_1 = 0;
2697
  Py_DECREF(__pyx_1); __pyx_1 = 0;
2564
  Py_DECREF(__pyx_2); __pyx_2 = 0;
2698
  __pyx_r = __pyx_2;
2565
  __pyx_r = __pyx_3;
2699
  __pyx_2 = 0;
2566
  __pyx_3 = 0;
2567
  goto __pyx_L0;
2700
  goto __pyx_L0;
2568
2701
2569
  __pyx_r = Py_None; Py_INCREF(Py_None);
2702
  __pyx_r = Py_None; Py_INCREF(Py_None);
Lines 2571-2577 Link Here
2571
  __pyx_L1:;
2704
  __pyx_L1:;
2572
  Py_XDECREF(__pyx_1);
2705
  Py_XDECREF(__pyx_1);
2573
  Py_XDECREF(__pyx_2);
2706
  Py_XDECREF(__pyx_2);
2574
  Py_XDECREF(__pyx_3);
2575
  __Pyx_AddTraceback("dnet.addr.__long__");
2707
  __Pyx_AddTraceback("dnet.addr.__long__");
2576
  __pyx_r = 0;
2708
  __pyx_r = 0;
2577
  __pyx_L0:;
2709
  __pyx_L0:;
Lines 2590-2596 Link Here
2590
  PyObject *__pyx_4 = 0;
2722
  PyObject *__pyx_4 = 0;
2591
  Py_INCREF(__pyx_v_self);
2723
  Py_INCREF(__pyx_v_self);
2592
2724
2593
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":603 */
2725
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":603 */
2594
  __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;}
2726
  __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;}
2595
  __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;}
2727
  __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;}
2596
  if (PyObject_Cmp(__pyx_2, __pyx_3, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; goto __pyx_L1;}
2728
  if (PyObject_Cmp(__pyx_2, __pyx_3, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; goto __pyx_L1;}
Lines 2604-2631 Link Here
2604
    }
2736
    }
2605
  }
2737
  }
2606
  if (__pyx_1) {
2738
  if (__pyx_1) {
2607
2739
    __Pyx_Raise(PyExc_ValueError, 0, 0);
2608
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":606 */
2609
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; goto __pyx_L1;}
2610
    __Pyx_Raise(__pyx_2, 0, 0);
2611
    Py_DECREF(__pyx_2); __pyx_2 = 0;
2612
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; goto __pyx_L1;}
2740
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; goto __pyx_L1;}
2613
    goto __pyx_L2;
2741
    goto __pyx_L2;
2614
  }
2742
  }
2615
  __pyx_L2:;
2743
  __pyx_L2:;
2616
2744
2617
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":615 */
2745
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":615 */
2618
  __pyx_3 = PyLong_FromUnsignedLong(__pyx_v_a.addr_ip); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; goto __pyx_L1;}
2746
  __pyx_2 = PyLong_FromUnsignedLong(__pyx_v_a.addr_ip); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; goto __pyx_L1;}
2619
  __pyx_2 = PyLong_FromUnsignedLong(__pyx_v_b.addr_ip); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; goto __pyx_L1;}
2747
  __pyx_3 = PyLong_FromUnsignedLong(__pyx_v_b.addr_ip); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; goto __pyx_L1;}
2620
  __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; goto __pyx_L1;}
2748
  __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; goto __pyx_L1;}
2621
  PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
2749
  PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2);
2622
  PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2);
2750
  PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3);
2623
  __pyx_3 = 0;
2624
  __pyx_2 = 0;
2751
  __pyx_2 = 0;
2625
  __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;}
2626
  Py_DECREF(__pyx_4); __pyx_4 = 0;
2627
  __pyx_r = __pyx_3;
2628
  __pyx_3 = 0;
2752
  __pyx_3 = 0;
2753
  __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;}
2754
  Py_DECREF(__pyx_4); __pyx_4 = 0;
2755
  __pyx_r = __pyx_2;
2756
  __pyx_2 = 0;
2629
  goto __pyx_L0;
2757
  goto __pyx_L0;
2630
2758
2631
  __pyx_r = Py_None; Py_INCREF(Py_None);
2759
  __pyx_r = Py_None; Py_INCREF(Py_None);
Lines 2641-2674 Link Here
2641
  return __pyx_r;
2769
  return __pyx_r;
2642
}
2770
}
2643
2771
2644
static PyObject *__pyx_k72p;
2645
2646
static char (__pyx_k72[]) = "<invalid network address>";
2647
2648
static PyObject *__pyx_f_4dnet_4addr___repr__(PyObject *__pyx_v_self); /*proto*/
2772
static PyObject *__pyx_f_4dnet_4addr___repr__(PyObject *__pyx_v_self); /*proto*/
2649
static PyObject *__pyx_f_4dnet_4addr___repr__(PyObject *__pyx_v_self) {
2773
static PyObject *__pyx_f_4dnet_4addr___repr__(PyObject *__pyx_v_self) {
2650
  char (*__pyx_v_p);
2774
  char *__pyx_v_p;
2651
  PyObject *__pyx_r;
2775
  PyObject *__pyx_r;
2652
  int __pyx_1;
2776
  int __pyx_1;
2653
  PyObject *__pyx_2 = 0;
2777
  PyObject *__pyx_2 = 0;
2654
  Py_INCREF(__pyx_v_self);
2778
  Py_INCREF(__pyx_v_self);
2655
2779
2656
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":619 */
2780
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":619 */
2657
  __pyx_v_p = addr_ntoa((&((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr));
2781
  __pyx_v_p = addr_ntoa((&((struct __pyx_obj_4dnet_addr *)__pyx_v_self)->_addr));
2658
2782
2659
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":620 */
2783
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":620 */
2660
  __pyx_1 = (!(__pyx_v_p != 0));
2784
  __pyx_1 = (!(__pyx_v_p != 0));
2661
  if (__pyx_1) {
2785
  if (__pyx_1) {
2662
2786
    Py_INCREF(__pyx_k27p);
2663
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":621 */
2787
    __pyx_r = __pyx_k27p;
2664
    Py_INCREF(__pyx_k72p);
2665
    __pyx_r = __pyx_k72p;
2666
    goto __pyx_L0;
2788
    goto __pyx_L0;
2667
    goto __pyx_L2;
2789
    goto __pyx_L2;
2668
  }
2790
  }
2669
  __pyx_L2:;
2791
  __pyx_L2:;
2670
2792
2671
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":622 */
2793
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":622 */
2672
  __pyx_2 = PyString_FromString(__pyx_v_p); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; goto __pyx_L1;}
2794
  __pyx_2 = PyString_FromString(__pyx_v_p); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; goto __pyx_L1;}
2673
  __pyx_r = __pyx_2;
2795
  __pyx_r = __pyx_2;
2674
  __pyx_2 = 0;
2796
  __pyx_2 = 0;
Lines 2697-2707 Link Here
2697
  Py_INCREF(__pyx_v_cur);
2819
  Py_INCREF(__pyx_v_cur);
2698
  Py_INCREF(__pyx_v_max);
2820
  Py_INCREF(__pyx_v_max);
2699
2821
2700
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":629 */
2822
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":629 */
2701
  __pyx_1 = PyInt_AsUnsignedLongMask(__pyx_v_cur); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; goto __pyx_L1;}
2823
  __pyx_1 = PyInt_AsUnsignedLongMask(__pyx_v_cur); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; goto __pyx_L1;}
2702
  ((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->cur = ntohl(__pyx_1);
2824
  ((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->cur = ntohl(__pyx_1);
2703
2825
2704
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":630 */
2826
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":630 */
2705
  __pyx_1 = PyInt_AsUnsignedLongMask(__pyx_v_max); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; goto __pyx_L1;}
2827
  __pyx_1 = PyInt_AsUnsignedLongMask(__pyx_v_max); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; goto __pyx_L1;}
2706
  ((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->max = ntohl(__pyx_1);
2828
  ((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->max = ntohl(__pyx_1);
2707
2829
Lines 2717-2778 Link Here
2717
  return __pyx_r;
2839
  return __pyx_r;
2718
}
2840
}
2719
2841
2720
static PyObject *__pyx_n_StopIteration;
2721
2722
static PyObject *__pyx_f_4dnet_15__addr_ip4_iter___next__(PyObject *__pyx_v_self); /*proto*/
2842
static PyObject *__pyx_f_4dnet_15__addr_ip4_iter___next__(PyObject *__pyx_v_self); /*proto*/
2723
static PyObject *__pyx_f_4dnet_15__addr_ip4_iter___next__(PyObject *__pyx_v_self) {
2843
static PyObject *__pyx_f_4dnet_15__addr_ip4_iter___next__(PyObject *__pyx_v_self) {
2724
  struct __pyx_obj_4dnet_addr *__pyx_v_next;
2844
  struct __pyx_obj_4dnet_addr *__pyx_v_next;
2725
  PyObject *__pyx_r;
2845
  PyObject *__pyx_r;
2726
  int __pyx_1;
2846
  int __pyx_1;
2727
  PyObject *__pyx_2 = 0;
2847
  PyObject *__pyx_2 = 0;
2728
  PyObject *__pyx_3 = 0;
2848
  unsigned short __pyx_3;
2729
  unsigned short __pyx_4;
2730
  Py_INCREF(__pyx_v_self);
2849
  Py_INCREF(__pyx_v_self);
2731
  __pyx_v_next = ((struct __pyx_obj_4dnet_addr *)Py_None); Py_INCREF(Py_None);
2850
  __pyx_v_next = ((struct __pyx_obj_4dnet_addr *)Py_None); Py_INCREF(Py_None);
2732
2851
2733
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":634 */
2852
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":634 */
2734
  __pyx_1 = (((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->cur <= ((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->max);
2853
  __pyx_1 = (((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->cur <= ((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->max);
2735
  if (__pyx_1) {
2854
  if (__pyx_1) {
2736
2855
2737
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":635 */
2856
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":635 */
2738
    __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;}
2857
    __pyx_2 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;}
2739
    __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;}
2740
    Py_DECREF(__pyx_2); __pyx_2 = 0;
2741
    if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_4dnet_addr)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;}
2742
    Py_DECREF(((PyObject *)__pyx_v_next));
2858
    Py_DECREF(((PyObject *)__pyx_v_next));
2743
    __pyx_v_next = ((struct __pyx_obj_4dnet_addr *)__pyx_3);
2859
    __pyx_v_next = ((struct __pyx_obj_4dnet_addr *)__pyx_2);
2744
    __pyx_3 = 0;
2860
    __pyx_2 = 0;
2745
2861
2746
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":636 */
2862
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":636 */
2747
    __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;}
2863
    __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;}
2748
    __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; goto __pyx_L1;}
2864
    __pyx_3 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; goto __pyx_L1;}
2749
    Py_DECREF(__pyx_2); __pyx_2 = 0;
2865
    Py_DECREF(__pyx_2); __pyx_2 = 0;
2750
    __pyx_v_next->_addr.addr_type = __pyx_4;
2866
    __pyx_v_next->_addr.addr_type = __pyx_3;
2751
2867
2752
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":637 */
2868
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":637 */
2753
    __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;}
2869
    __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;}
2754
    __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; goto __pyx_L1;}
2870
    __pyx_3 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; goto __pyx_L1;}
2755
    Py_DECREF(__pyx_3); __pyx_3 = 0;
2871
    Py_DECREF(__pyx_2); __pyx_2 = 0;
2756
    __pyx_v_next->_addr.addr_bits = __pyx_4;
2872
    __pyx_v_next->_addr.addr_bits = __pyx_3;
2757
2873
2758
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":638 */
2874
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":638 */
2759
    __pyx_v_next->_addr.addr_ip = htonl(((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->cur);
2875
    __pyx_v_next->_addr.addr_ip = htonl(((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->cur);
2760
2876
2761
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":639 */
2877
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":639 */
2762
    ((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->cur = (((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->cur + 1);
2878
    ((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->cur = (((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->cur + 1);
2763
2879
2764
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":640 */
2880
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":640 */
2765
    Py_INCREF(((PyObject *)__pyx_v_next));
2881
    Py_INCREF(((PyObject *)__pyx_v_next));
2766
    __pyx_r = ((PyObject *)__pyx_v_next);
2882
    __pyx_r = ((PyObject *)__pyx_v_next);
2767
    goto __pyx_L0;
2883
    goto __pyx_L0;
2768
    goto __pyx_L2;
2884
    goto __pyx_L2;
2769
  }
2885
  }
2770
  /*else*/ {
2886
  /*else*/ {
2771
2887
    __Pyx_Raise(PyExc_StopIteration, 0, 0);
2772
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":642 */
2773
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_StopIteration); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; goto __pyx_L1;}
2774
    __Pyx_Raise(__pyx_2, 0, 0);
2775
    Py_DECREF(__pyx_2); __pyx_2 = 0;
2776
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; goto __pyx_L1;}
2888
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; goto __pyx_L1;}
2777
  }
2889
  }
2778
  __pyx_L2:;
2890
  __pyx_L2:;
Lines 2781-2787 Link Here
2781
  goto __pyx_L0;
2893
  goto __pyx_L0;
2782
  __pyx_L1:;
2894
  __pyx_L1:;
2783
  Py_XDECREF(__pyx_2);
2895
  Py_XDECREF(__pyx_2);
2784
  Py_XDECREF(__pyx_3);
2785
  __Pyx_AddTraceback("dnet.__addr_ip4_iter.__next__");
2896
  __Pyx_AddTraceback("dnet.__addr_ip4_iter.__next__");
2786
  __pyx_r = 0;
2897
  __pyx_r = 0;
2787
  __pyx_L0:;
2898
  __pyx_L0:;
Lines 2790-2796 Link Here
2790
  return __pyx_r;
2901
  return __pyx_r;
2791
}
2902
}
2792
2903
2793
static int __pyx_f_4dnet___arp_callback(struct arp_entry (*__pyx_v_entry),void (*__pyx_v_arg)) {
2904
static int __pyx_f_4dnet___arp_callback(struct arp_entry *__pyx_v_entry,void *__pyx_v_arg) {
2794
  PyObject *__pyx_v_f;
2905
  PyObject *__pyx_v_f;
2795
  PyObject *__pyx_v_a;
2906
  PyObject *__pyx_v_a;
2796
  PyObject *__pyx_v_pa;
2907
  PyObject *__pyx_v_pa;
Lines 2799-2870 Link Here
2799
  int __pyx_r;
2910
  int __pyx_r;
2800
  PyObject *__pyx_1 = 0;
2911
  PyObject *__pyx_1 = 0;
2801
  PyObject *__pyx_2 = 0;
2912
  PyObject *__pyx_2 = 0;
2802
  PyObject *__pyx_3 = 0;
2913
  int __pyx_3;
2803
  int __pyx_4;
2914
  int __pyx_4;
2804
  int __pyx_5;
2805
  __pyx_v_f = Py_None; Py_INCREF(Py_None);
2915
  __pyx_v_f = Py_None; Py_INCREF(Py_None);
2806
  __pyx_v_a = Py_None; Py_INCREF(Py_None);
2916
  __pyx_v_a = Py_None; Py_INCREF(Py_None);
2807
  __pyx_v_pa = Py_None; Py_INCREF(Py_None);
2917
  __pyx_v_pa = Py_None; Py_INCREF(Py_None);
2808
  __pyx_v_ha = Py_None; Py_INCREF(Py_None);
2918
  __pyx_v_ha = Py_None; Py_INCREF(Py_None);
2809
  __pyx_v_ret = Py_None; Py_INCREF(Py_None);
2919
  __pyx_v_ret = Py_None; Py_INCREF(Py_None);
2810
2920
2811
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":680 */
2921
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":680 */
2812
  __pyx_1 = (PyObject *)__pyx_v_arg;
2922
  __pyx_1 = PyObject_GetIter(((PyObject *)__pyx_v_arg)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; goto __pyx_L1;}
2813
  Py_INCREF(__pyx_1);
2923
  __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; goto __pyx_L1;}
2814
  __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; goto __pyx_L1;}
2815
  Py_DECREF(__pyx_v_f);
2924
  Py_DECREF(__pyx_v_f);
2816
  __pyx_v_f = __pyx_2;
2925
  __pyx_v_f = __pyx_2;
2817
  __pyx_2 = 0;
2926
  __pyx_2 = 0;
2818
  __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; goto __pyx_L1;}
2927
  __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; goto __pyx_L1;}
2819
  Py_DECREF(__pyx_v_a);
2928
  Py_DECREF(__pyx_v_a);
2820
  __pyx_v_a = __pyx_3;
2929
  __pyx_v_a = __pyx_2;
2821
  __pyx_3 = 0;
2930
  __pyx_2 = 0;
2822
  if (__Pyx_EndUnpack(__pyx_1, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; goto __pyx_L1;}
2931
  if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; goto __pyx_L1;}
2823
  Py_DECREF(__pyx_1); __pyx_1 = 0;
2932
  Py_DECREF(__pyx_1); __pyx_1 = 0;
2824
2933
2825
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":681 */
2934
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":681 */
2826
  __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; goto __pyx_L1;}
2935
  __pyx_2 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; goto __pyx_L1;}
2827
  __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;}
2936
  __pyx_1 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; goto __pyx_L1;}
2828
  Py_DECREF(__pyx_2); __pyx_2 = 0;
2829
  __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; goto __pyx_L1;}
2830
  __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;}
2831
  Py_DECREF(__pyx_1); __pyx_1 = 0;
2832
  Py_DECREF(__pyx_v_pa);
2937
  Py_DECREF(__pyx_v_pa);
2833
  __pyx_v_pa = __pyx_3;
2938
  __pyx_v_pa = __pyx_2;
2834
  __pyx_3 = 0;
2835
  Py_DECREF(__pyx_v_ha);
2836
  __pyx_v_ha = __pyx_2;
2837
  __pyx_2 = 0;
2939
  __pyx_2 = 0;
2940
  Py_DECREF(__pyx_v_ha);
2941
  __pyx_v_ha = __pyx_1;
2942
  __pyx_1 = 0;
2838
2943
2839
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":682 */
2944
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":682 */
2840
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_pa)->_addr = __pyx_v_entry->arp_pa;
2945
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_pa)->_addr = __pyx_v_entry->arp_pa;
2841
2946
2842
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":683 */
2947
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":683 */
2843
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_ha)->_addr = __pyx_v_entry->arp_ha;
2948
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_ha)->_addr = __pyx_v_entry->arp_ha;
2844
2949
2845
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":684 */
2950
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":684 */
2846
  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;}
2951
  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;}
2847
  Py_INCREF(__pyx_v_pa);
2952
  Py_INCREF(__pyx_v_pa);
2848
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_pa);
2953
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_pa);
2849
  Py_INCREF(__pyx_v_ha);
2954
  Py_INCREF(__pyx_v_ha);
2850
  PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_ha);
2955
  PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_ha);
2851
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;}
2956
  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;}
2852
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
2957
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2);
2853
  Py_INCREF(__pyx_v_a);
2958
  Py_INCREF(__pyx_v_a);
2854
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_a);
2959
  PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_a);
2855
  __pyx_1 = 0;
2960
  __pyx_2 = 0;
2856
  __pyx_2 = PyObject_Call(__pyx_v_f, __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;}
2961
  __pyx_2 = PyObject_CallObject(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;}
2857
  Py_DECREF(__pyx_3); __pyx_3 = 0;
2962
  Py_DECREF(__pyx_1); __pyx_1 = 0;
2858
  Py_DECREF(__pyx_v_ret);
2963
  Py_DECREF(__pyx_v_ret);
2859
  __pyx_v_ret = __pyx_2;
2964
  __pyx_v_ret = __pyx_2;
2860
  __pyx_2 = 0;
2965
  __pyx_2 = 0;
2861
2966
2862
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":685 */
2967
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":685 */
2863
  __pyx_4 = PyObject_IsTrue(__pyx_v_ret); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; goto __pyx_L1;}
2968
  __pyx_3 = PyObject_IsTrue(__pyx_v_ret); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; goto __pyx_L1;}
2864
  __pyx_5 = (!__pyx_4);
2969
  __pyx_4 = (!__pyx_3);
2865
  if (__pyx_5) {
2970
  if (__pyx_4) {
2866
2867
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":686 */
2868
    __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; goto __pyx_L1;}
2971
    __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; goto __pyx_L1;}
2869
    Py_DECREF(__pyx_v_ret);
2972
    Py_DECREF(__pyx_v_ret);
2870
    __pyx_v_ret = __pyx_1;
2973
    __pyx_v_ret = __pyx_1;
Lines 2873-2881 Link Here
2873
  }
2976
  }
2874
  __pyx_L2:;
2977
  __pyx_L2:;
2875
2978
2876
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":687 */
2979
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":687 */
2877
  __pyx_4 = PyInt_AsLong(__pyx_v_ret); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; goto __pyx_L1;}
2980
  __pyx_3 = PyInt_AsLong(__pyx_v_ret); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; goto __pyx_L1;}
2878
  __pyx_r = __pyx_4;
2981
  __pyx_r = __pyx_3;
2879
  goto __pyx_L0;
2982
  goto __pyx_L0;
2880
2983
2881
  __pyx_r = 0;
2984
  __pyx_r = 0;
Lines 2883-2891 Link Here
2883
  __pyx_L1:;
2986
  __pyx_L1:;
2884
  Py_XDECREF(__pyx_1);
2987
  Py_XDECREF(__pyx_1);
2885
  Py_XDECREF(__pyx_2);
2988
  Py_XDECREF(__pyx_2);
2886
  Py_XDECREF(__pyx_3);
2887
  __Pyx_AddTraceback("dnet.__arp_callback");
2989
  __Pyx_AddTraceback("dnet.__arp_callback");
2888
  __pyx_r = -1;
2990
  __pyx_r = (-1);
2889
  __pyx_L0:;
2991
  __pyx_L0:;
2890
  Py_DECREF(__pyx_v_f);
2992
  Py_DECREF(__pyx_v_f);
2891
  Py_DECREF(__pyx_v_a);
2993
  Py_DECREF(__pyx_v_a);
Lines 2900-2923 Link Here
2900
  int __pyx_r;
3002
  int __pyx_r;
2901
  int __pyx_1;
3003
  int __pyx_1;
2902
  PyObject *__pyx_2 = 0;
3004
  PyObject *__pyx_2 = 0;
2903
  PyObject *__pyx_3 = 0;
2904
  static char *__pyx_argnames[] = {0};
3005
  static char *__pyx_argnames[] = {0};
2905
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1;
3006
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1;
2906
  Py_INCREF(__pyx_v_self);
3007
  Py_INCREF(__pyx_v_self);
2907
3008
2908
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":697 */
3009
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":697 */
2909
  ((struct __pyx_obj_4dnet_arp *)__pyx_v_self)->arp = arp_open();
3010
  ((struct __pyx_obj_4dnet_arp *)__pyx_v_self)->arp = arp_open();
2910
3011
2911
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":698 */
3012
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":698 */
2912
  __pyx_1 = (!(((struct __pyx_obj_4dnet_arp *)__pyx_v_self)->arp != 0));
3013
  __pyx_1 = (!(((struct __pyx_obj_4dnet_arp *)__pyx_v_self)->arp != 0));
2913
  if (__pyx_1) {
3014
  if (__pyx_1) {
2914
3015
    __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; goto __pyx_L1;}
2915
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":699 */
3016
    __Pyx_Raise(PyExc_OSError, __pyx_2, 0);
2916
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; goto __pyx_L1;}
2917
    __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; goto __pyx_L1;}
2918
    __Pyx_Raise(__pyx_2, __pyx_3, 0);
2919
    Py_DECREF(__pyx_2); __pyx_2 = 0;
3017
    Py_DECREF(__pyx_2); __pyx_2 = 0;
2920
    Py_DECREF(__pyx_3); __pyx_3 = 0;
2921
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; goto __pyx_L1;}
3018
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; goto __pyx_L1;}
2922
    goto __pyx_L2;
3019
    goto __pyx_L2;
2923
  }
3020
  }
Lines 2927-2933 Link Here
2927
  goto __pyx_L0;
3024
  goto __pyx_L0;
2928
  __pyx_L1:;
3025
  __pyx_L1:;
2929
  Py_XDECREF(__pyx_2);
3026
  Py_XDECREF(__pyx_2);
2930
  Py_XDECREF(__pyx_3);
2931
  __Pyx_AddTraceback("dnet.arp.__init__");
3027
  __Pyx_AddTraceback("dnet.arp.__init__");
2932
  __pyx_r = -1;
3028
  __pyx_r = -1;
2933
  __pyx_L0:;
3029
  __pyx_L0:;
Lines 2944-2950 Link Here
2944
  PyObject *__pyx_r;
3040
  PyObject *__pyx_r;
2945
  int __pyx_1;
3041
  int __pyx_1;
2946
  PyObject *__pyx_2 = 0;
3042
  PyObject *__pyx_2 = 0;
2947
  PyObject *__pyx_3 = 0;
2948
  static char *__pyx_argnames[] = {"pa","ha",0};
3043
  static char *__pyx_argnames[] = {"pa","ha",0};
2949
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_pa, &__pyx_v_ha)) return 0;
3044
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_pa, &__pyx_v_ha)) return 0;
2950
  Py_INCREF(__pyx_v_self);
3045
  Py_INCREF(__pyx_v_self);
Lines 2953-2974 Link Here
2953
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pa), __pyx_ptype_4dnet_addr, 1, "pa")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; goto __pyx_L1;}
3048
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pa), __pyx_ptype_4dnet_addr, 1, "pa")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; goto __pyx_L1;}
2954
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ha), __pyx_ptype_4dnet_addr, 1, "ha")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; goto __pyx_L1;}
3049
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ha), __pyx_ptype_4dnet_addr, 1, "ha")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; goto __pyx_L1;}
2955
3050
2956
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":709 */
3051
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":709 */
2957
  __pyx_v_entry.arp_pa = __pyx_v_pa->_addr;
3052
  __pyx_v_entry.arp_pa = __pyx_v_pa->_addr;
2958
3053
2959
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":710 */
3054
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":710 */
2960
  __pyx_v_entry.arp_ha = __pyx_v_ha->_addr;
3055
  __pyx_v_entry.arp_ha = __pyx_v_ha->_addr;
2961
3056
2962
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":711 */
3057
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":711 */
2963
  __pyx_1 = (arp_add(((struct __pyx_obj_4dnet_arp *)__pyx_v_self)->arp,(&__pyx_v_entry)) < 0);
3058
  __pyx_1 = (arp_add(((struct __pyx_obj_4dnet_arp *)__pyx_v_self)->arp,(&__pyx_v_entry)) < 0);
2964
  if (__pyx_1) {
3059
  if (__pyx_1) {
2965
3060
    __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; goto __pyx_L1;}
2966
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":712 */
3061
    __Pyx_Raise(PyExc_OSError, __pyx_2, 0);
2967
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; goto __pyx_L1;}
2968
    __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; goto __pyx_L1;}
2969
    __Pyx_Raise(__pyx_2, __pyx_3, 0);
2970
    Py_DECREF(__pyx_2); __pyx_2 = 0;
3062
    Py_DECREF(__pyx_2); __pyx_2 = 0;
2971
    Py_DECREF(__pyx_3); __pyx_3 = 0;
2972
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; goto __pyx_L1;}
3063
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; goto __pyx_L1;}
2973
    goto __pyx_L2;
3064
    goto __pyx_L2;
2974
  }
3065
  }
Lines 2978-2984 Link Here
2978
  goto __pyx_L0;
3069
  goto __pyx_L0;
2979
  __pyx_L1:;
3070
  __pyx_L1:;
2980
  Py_XDECREF(__pyx_2);
3071
  Py_XDECREF(__pyx_2);
2981
  Py_XDECREF(__pyx_3);
2982
  __Pyx_AddTraceback("dnet.arp.add");
3072
  __Pyx_AddTraceback("dnet.arp.add");
2983
  __pyx_r = 0;
3073
  __pyx_r = 0;
2984
  __pyx_L0:;
3074
  __pyx_L0:;
Lines 2996-3021 Link Here
2996
  PyObject *__pyx_r;
3086
  PyObject *__pyx_r;
2997
  int __pyx_1;
3087
  int __pyx_1;
2998
  PyObject *__pyx_2 = 0;
3088
  PyObject *__pyx_2 = 0;
2999
  PyObject *__pyx_3 = 0;
3000
  static char *__pyx_argnames[] = {"pa",0};
3089
  static char *__pyx_argnames[] = {"pa",0};
3001
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pa)) return 0;
3090
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pa)) return 0;
3002
  Py_INCREF(__pyx_v_self);
3091
  Py_INCREF(__pyx_v_self);
3003
  Py_INCREF(__pyx_v_pa);
3092
  Py_INCREF(__pyx_v_pa);
3004
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pa), __pyx_ptype_4dnet_addr, 1, "pa")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; goto __pyx_L1;}
3093
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pa), __pyx_ptype_4dnet_addr, 1, "pa")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; goto __pyx_L1;}
3005
3094
3006
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":721 */
3095
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":721 */
3007
  __pyx_v_entry.arp_pa = __pyx_v_pa->_addr;
3096
  __pyx_v_entry.arp_pa = __pyx_v_pa->_addr;
3008
3097
3009
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":722 */
3098
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":722 */
3010
  __pyx_1 = (arp_delete(((struct __pyx_obj_4dnet_arp *)__pyx_v_self)->arp,(&__pyx_v_entry)) < 0);
3099
  __pyx_1 = (arp_delete(((struct __pyx_obj_4dnet_arp *)__pyx_v_self)->arp,(&__pyx_v_entry)) < 0);
3011
  if (__pyx_1) {
3100
  if (__pyx_1) {
3012
3101
    __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; goto __pyx_L1;}
3013
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":723 */
3102
    __Pyx_Raise(PyExc_OSError, __pyx_2, 0);
3014
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; goto __pyx_L1;}
3015
    __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; goto __pyx_L1;}
3016
    __Pyx_Raise(__pyx_2, __pyx_3, 0);
3017
    Py_DECREF(__pyx_2); __pyx_2 = 0;
3103
    Py_DECREF(__pyx_2); __pyx_2 = 0;
3018
    Py_DECREF(__pyx_3); __pyx_3 = 0;
3019
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; goto __pyx_L1;}
3104
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; goto __pyx_L1;}
3020
    goto __pyx_L2;
3105
    goto __pyx_L2;
3021
  }
3106
  }
Lines 3025-3031 Link Here
3025
  goto __pyx_L0;
3110
  goto __pyx_L0;
3026
  __pyx_L1:;
3111
  __pyx_L1:;
3027
  Py_XDECREF(__pyx_2);
3112
  Py_XDECREF(__pyx_2);
3028
  Py_XDECREF(__pyx_3);
3029
  __Pyx_AddTraceback("dnet.arp.delete");
3113
  __Pyx_AddTraceback("dnet.arp.delete");
3030
  __pyx_r = 0;
3114
  __pyx_r = 0;
3031
  __pyx_L0:;
3115
  __pyx_L0:;
Lines 3049-3067 Link Here
3049
  Py_INCREF(__pyx_v_pa);
3133
  Py_INCREF(__pyx_v_pa);
3050
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pa), __pyx_ptype_4dnet_addr, 1, "pa")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; goto __pyx_L1;}
3134
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pa), __pyx_ptype_4dnet_addr, 1, "pa")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; goto __pyx_L1;}
3051
3135
3052
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":733 */
3136
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":733 */
3053
  __pyx_v_entry.arp_pa = __pyx_v_pa->_addr;
3137
  __pyx_v_entry.arp_pa = __pyx_v_pa->_addr;
3054
3138
3055
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":734 */
3139
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":734 */
3056
  __pyx_1 = (arp_get(((struct __pyx_obj_4dnet_arp *)__pyx_v_self)->arp,(&__pyx_v_entry)) == 0);
3140
  __pyx_1 = (arp_get(((struct __pyx_obj_4dnet_arp *)__pyx_v_self)->arp,(&__pyx_v_entry)) == 0);
3057
  if (__pyx_1) {
3141
  if (__pyx_1) {
3058
3059
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":735 */
3060
    __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;}
3142
    __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;}
3061
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; goto __pyx_L1;}
3143
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; goto __pyx_L1;}
3062
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
3144
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
3063
    __pyx_2 = 0;
3145
    __pyx_2 = 0;
3064
    __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;}
3146
    __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;}
3065
    Py_DECREF(__pyx_3); __pyx_3 = 0;
3147
    Py_DECREF(__pyx_3); __pyx_3 = 0;
3066
    __pyx_r = __pyx_2;
3148
    __pyx_r = __pyx_2;
3067
    __pyx_2 = 0;
3149
    __pyx_2 = 0;
Lines 3070-3076 Link Here
3070
  }
3152
  }
3071
  __pyx_L2:;
3153
  __pyx_L2:;
3072
3154
3073
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":736 */
3155
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":736 */
3074
  Py_INCREF(Py_None);
3156
  Py_INCREF(Py_None);
3075
  __pyx_r = Py_None;
3157
  __pyx_r = Py_None;
3076
  goto __pyx_L0;
3158
  goto __pyx_L0;
Lines 3097-3110 Link Here
3097
  PyObject *__pyx_r;
3179
  PyObject *__pyx_r;
3098
  PyObject *__pyx_1 = 0;
3180
  PyObject *__pyx_1 = 0;
3099
  static char *__pyx_argnames[] = {"callback","arg",0};
3181
  static char *__pyx_argnames[] = {"callback","arg",0};
3100
  __pyx_v_arg = __pyx_k43;
3182
  __pyx_v_arg = __pyx_d21;
3101
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_callback, &__pyx_v_arg)) return 0;
3183
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_callback, &__pyx_v_arg)) return 0;
3102
  Py_INCREF(__pyx_v_self);
3184
  Py_INCREF(__pyx_v_self);
3103
  Py_INCREF(__pyx_v_callback);
3185
  Py_INCREF(__pyx_v_callback);
3104
  Py_INCREF(__pyx_v_arg);
3186
  Py_INCREF(__pyx_v_arg);
3105
  __pyx_v__arg = Py_None; Py_INCREF(Py_None);
3187
  __pyx_v__arg = Py_None; Py_INCREF(Py_None);
3106
3188
3107
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":748 */
3189
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":748 */
3108
  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; goto __pyx_L1;}
3190
  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; goto __pyx_L1;}
3109
  Py_INCREF(__pyx_v_callback);
3191
  Py_INCREF(__pyx_v_callback);
3110
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_callback);
3192
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_callback);
Lines 3114-3121 Link Here
3114
  __pyx_v__arg = __pyx_1;
3196
  __pyx_v__arg = __pyx_1;
3115
  __pyx_1 = 0;
3197
  __pyx_1 = 0;
3116
3198
3117
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":749 */
3199
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":749 */
3118
  __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;}
3200
  __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;}
3119
  __pyx_r = __pyx_1;
3201
  __pyx_r = __pyx_1;
3120
  __pyx_1 = 0;
3202
  __pyx_1 = 0;
3121
  goto __pyx_L0;
3203
  goto __pyx_L0;
Lines 3134-3142 Link Here
3134
  return __pyx_r;
3216
  return __pyx_r;
3135
}
3217
}
3136
3218
3137
static PyObject *__pyx_n_loop;
3138
static PyObject *__pyx_n_iter;
3139
3140
static PyObject *__pyx_f_4dnet_3arp___iter__(PyObject *__pyx_v_self); /*proto*/
3219
static PyObject *__pyx_f_4dnet_3arp___iter__(PyObject *__pyx_v_self); /*proto*/
3141
static PyObject *__pyx_f_4dnet_3arp___iter__(PyObject *__pyx_v_self) {
3220
static PyObject *__pyx_f_4dnet_3arp___iter__(PyObject *__pyx_v_self) {
3142
  PyObject *__pyx_v_l;
3221
  PyObject *__pyx_v_l;
Lines 3147-3159 Link Here
3147
  Py_INCREF(__pyx_v_self);
3226
  Py_INCREF(__pyx_v_self);
3148
  __pyx_v_l = Py_None; Py_INCREF(Py_None);
3227
  __pyx_v_l = Py_None; Py_INCREF(Py_None);
3149
3228
3150
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":752 */
3229
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":752 */
3151
  __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; goto __pyx_L1;}
3230
  __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; goto __pyx_L1;}
3152
  Py_DECREF(__pyx_v_l);
3231
  Py_DECREF(__pyx_v_l);
3153
  __pyx_v_l = __pyx_1;
3232
  __pyx_v_l = __pyx_1;
3154
  __pyx_1 = 0;
3233
  __pyx_1 = 0;
3155
3234
3156
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":753 */
3235
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":753 */
3157
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_loop); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; goto __pyx_L1;}
3236
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_loop); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; goto __pyx_L1;}
3158
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n___iter_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; goto __pyx_L1;}
3237
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n___iter_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; goto __pyx_L1;}
3159
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; goto __pyx_L1;}
3238
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; goto __pyx_L1;}
Lines 3161-3181 Link Here
3161
  Py_INCREF(__pyx_v_l);
3240
  Py_INCREF(__pyx_v_l);
3162
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_l);
3241
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_l);
3163
  __pyx_2 = 0;
3242
  __pyx_2 = 0;
3164
  __pyx_2 = PyObject_Call(__pyx_1, __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; goto __pyx_L1;}
3243
  __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; goto __pyx_L1;}
3165
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3244
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3166
  Py_DECREF(__pyx_3); __pyx_3 = 0;
3245
  Py_DECREF(__pyx_3); __pyx_3 = 0;
3167
  Py_DECREF(__pyx_2); __pyx_2 = 0;
3246
  Py_DECREF(__pyx_2); __pyx_2 = 0;
3168
3247
3169
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":754 */
3248
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":754 */
3170
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_iter); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; goto __pyx_L1;}
3249
  __pyx_1 = PyObject_GetIter(__pyx_v_l); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; goto __pyx_L1;}
3171
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; goto __pyx_L1;}
3250
  __pyx_r = __pyx_1;
3172
  Py_INCREF(__pyx_v_l);
3251
  __pyx_1 = 0;
3173
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_l);
3174
  __pyx_2 = PyObject_Call(__pyx_1, __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; goto __pyx_L1;}
3175
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3176
  Py_DECREF(__pyx_3); __pyx_3 = 0;
3177
  __pyx_r = __pyx_2;
3178
  __pyx_2 = 0;
3179
  goto __pyx_L0;
3252
  goto __pyx_L0;
3180
3253
3181
  __pyx_r = Py_None; Py_INCREF(Py_None);
3254
  __pyx_r = Py_None; Py_INCREF(Py_None);
Lines 3196-3216 Link Here
3196
static void __pyx_f_4dnet_3arp___dealloc__(PyObject *__pyx_v_self) {
3269
static void __pyx_f_4dnet_3arp___dealloc__(PyObject *__pyx_v_self) {
3197
  int __pyx_1;
3270
  int __pyx_1;
3198
  Py_INCREF(__pyx_v_self);
3271
  Py_INCREF(__pyx_v_self);
3199
3200
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":757 */
3201
  __pyx_1 = (((struct __pyx_obj_4dnet_arp *)__pyx_v_self)->arp != 0);
3272
  __pyx_1 = (((struct __pyx_obj_4dnet_arp *)__pyx_v_self)->arp != 0);
3202
  if (__pyx_1) {
3273
  if (__pyx_1) {
3203
3204
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":758 */
3205
    arp_close(((struct __pyx_obj_4dnet_arp *)__pyx_v_self)->arp);
3274
    arp_close(((struct __pyx_obj_4dnet_arp *)__pyx_v_self)->arp);
3206
    goto __pyx_L2;
3275
    goto __pyx_L2;
3207
  }
3276
  }
3208
  __pyx_L2:;
3277
  __pyx_L2:;
3209
3278
3210
  goto __pyx_L0;
3211
  __pyx_L1:;
3212
  __Pyx_AddTraceback("dnet.arp.__dealloc__");
3213
  __pyx_L0:;
3214
  Py_DECREF(__pyx_v_self);
3279
  Py_DECREF(__pyx_v_self);
3215
}
3280
}
3216
3281
Lines 3222-3228 Link Here
3222
  PyObject *__pyx_v_spa = 0;
3287
  PyObject *__pyx_v_spa = 0;
3223
  PyObject *__pyx_v_dha = 0;
3288
  PyObject *__pyx_v_dha = 0;
3224
  PyObject *__pyx_v_dpa = 0;
3289
  PyObject *__pyx_v_dpa = 0;
3225
  char (__pyx_v_buf[28]);
3290
  char __pyx_v_buf[28];
3226
  eth_addr_t __pyx_v_sh;
3291
  eth_addr_t __pyx_v_sh;
3227
  eth_addr_t __pyx_v_dh;
3292
  eth_addr_t __pyx_v_dh;
3228
  ip_addr_t __pyx_v_sp;
3293
  ip_addr_t __pyx_v_sp;
Lines 3231-3241 Link Here
3231
  PyObject *__pyx_1 = 0;
3296
  PyObject *__pyx_1 = 0;
3232
  int __pyx_2;
3297
  int __pyx_2;
3233
  static char *__pyx_argnames[] = {"op","sha","spa","dha","dpa",0};
3298
  static char *__pyx_argnames[] = {"op","sha","spa","dha","dpa",0};
3234
  __pyx_v_op = __pyx_k44;
3299
  __pyx_v_op = __pyx_d22;
3235
  __pyx_v_sha = __pyx_k45;
3300
  __pyx_v_sha = __pyx_d23;
3236
  __pyx_v_spa = __pyx_k46;
3301
  __pyx_v_spa = __pyx_d24;
3237
  __pyx_v_dha = __pyx_k47;
3302
  __pyx_v_dha = __pyx_d25;
3238
  __pyx_v_dpa = __pyx_k48;
3303
  __pyx_v_dpa = __pyx_d26;
3239
  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;
3304
  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;
3240
  Py_INCREF(__pyx_v_op);
3305
  Py_INCREF(__pyx_v_op);
3241
  Py_INCREF(__pyx_v_sha);
3306
  Py_INCREF(__pyx_v_sha);
Lines 3243-3269 Link Here
3243
  Py_INCREF(__pyx_v_dha);
3308
  Py_INCREF(__pyx_v_dha);
3244
  Py_INCREF(__pyx_v_dpa);
3309
  Py_INCREF(__pyx_v_dpa);
3245
3310
3246
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":775 */
3311
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":775 */
3247
  __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;}
3312
  __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;}
3248
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3313
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3249
3314
3250
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":776 */
3315
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":776 */
3251
  __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;}
3316
  __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;}
3252
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3317
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3253
3318
3254
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":777 */
3319
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":777 */
3255
  __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;}
3320
  __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;}
3256
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3321
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3257
3322
3258
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":778 */
3323
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":778 */
3259
  __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;}
3324
  __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;}
3260
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3325
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3261
3326
3262
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":779 */
3327
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":779 */
3263
  __pyx_2 = PyInt_AsLong(__pyx_v_op); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;}
3328
  __pyx_2 = PyInt_AsLong(__pyx_v_op); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;}
3264
  arp_pack_hdr_ethip(__pyx_v_buf,__pyx_2,__pyx_v_sh,__pyx_v_sp,__pyx_v_dh,__pyx_v_dp);
3329
  arp_pack_hdr_ethip(__pyx_v_buf,__pyx_2,__pyx_v_sh,__pyx_v_sp,__pyx_v_dh,__pyx_v_dp);
3265
3330
3266
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":780 */
3331
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":780 */
3267
  __pyx_1 = PyString_FromStringAndSize(__pyx_v_buf,28); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; goto __pyx_L1;}
3332
  __pyx_1 = PyString_FromStringAndSize(__pyx_v_buf,28); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; goto __pyx_L1;}
3268
  __pyx_r = __pyx_1;
3333
  __pyx_r = __pyx_1;
3269
  __pyx_1 = 0;
3334
  __pyx_1 = 0;
Lines 3287-3310 Link Here
3287
static PyObject *__pyx_f_4dnet_icmp_pack_hdr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3352
static PyObject *__pyx_f_4dnet_icmp_pack_hdr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3288
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    ";
3353
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    ";
3289
static PyObject *__pyx_f_4dnet_icmp_pack_hdr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3354
static PyObject *__pyx_f_4dnet_icmp_pack_hdr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3290
  PyObject *__pyx_v_type = 0;
3355
  PyObject *__pyx_v_type_ = 0;
3291
  PyObject *__pyx_v_code = 0;
3356
  PyObject *__pyx_v_code = 0;
3292
  char (__pyx_v_buf[4]);
3357
  char __pyx_v_buf[4];
3293
  PyObject *__pyx_r;
3358
  PyObject *__pyx_r;
3294
  int __pyx_1;
3359
  int __pyx_1;
3295
  int __pyx_2;
3360
  int __pyx_2;
3296
  PyObject *__pyx_3 = 0;
3361
  PyObject *__pyx_3 = 0;
3297
  static char *__pyx_argnames[] = {"type","code",0};
3362
  static char *__pyx_argnames[] = {"type_","code",0};
3298
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_type, &__pyx_v_code)) return 0;
3363
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_type_, &__pyx_v_code)) return 0;
3299
  Py_INCREF(__pyx_v_type);
3364
  Py_INCREF(__pyx_v_type_);
3300
  Py_INCREF(__pyx_v_code);
3365
  Py_INCREF(__pyx_v_code);
3301
3366
3302
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":796 */
3367
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":796 */
3303
  __pyx_1 = PyInt_AsLong(__pyx_v_type); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; goto __pyx_L1;}
3368
  __pyx_1 = PyInt_AsLong(__pyx_v_type_); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; goto __pyx_L1;}
3304
  __pyx_2 = PyInt_AsLong(__pyx_v_code); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; goto __pyx_L1;}
3369
  __pyx_2 = PyInt_AsLong(__pyx_v_code); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; goto __pyx_L1;}
3305
  icmp_pack_hdr(__pyx_v_buf,__pyx_1,__pyx_2);
3370
  icmp_pack_hdr(__pyx_v_buf,__pyx_1,__pyx_2);
3306
3371
3307
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":797 */
3372
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":797 */
3308
  __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;}
3373
  __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;}
3309
  __pyx_r = __pyx_3;
3374
  __pyx_r = __pyx_3;
3310
  __pyx_3 = 0;
3375
  __pyx_3 = 0;
Lines 3317-3323 Link Here
3317
  __Pyx_AddTraceback("dnet.icmp_pack_hdr");
3382
  __Pyx_AddTraceback("dnet.icmp_pack_hdr");
3318
  __pyx_r = 0;
3383
  __pyx_r = 0;
3319
  __pyx_L0:;
3384
  __pyx_L0:;
3320
  Py_DECREF(__pyx_v_type);
3385
  Py_DECREF(__pyx_v_type_);
3321
  Py_DECREF(__pyx_v_code);
3386
  Py_DECREF(__pyx_v_code);
3322
  return __pyx_r;
3387
  return __pyx_r;
3323
}
3388
}
Lines 3332-3338 Link Here
3332
  PyObject *__pyx_v_flags = 0;
3397
  PyObject *__pyx_v_flags = 0;
3333
  PyObject *__pyx_v_win = 0;
3398
  PyObject *__pyx_v_win = 0;
3334
  PyObject *__pyx_v_urp = 0;
3399
  PyObject *__pyx_v_urp = 0;
3335
  char (__pyx_v_buf[20]);
3400
  char __pyx_v_buf[20];
3336
  PyObject *__pyx_r;
3401
  PyObject *__pyx_r;
3337
  int __pyx_1;
3402
  int __pyx_1;
3338
  int __pyx_2;
3403
  int __pyx_2;
Lines 3343-3353 Link Here
3343
  int __pyx_7;
3408
  int __pyx_7;
3344
  PyObject *__pyx_8 = 0;
3409
  PyObject *__pyx_8 = 0;
3345
  static char *__pyx_argnames[] = {"sport","dport","seq","ack","flags","win","urp",0};
3410
  static char *__pyx_argnames[] = {"sport","dport","seq","ack","flags","win","urp",0};
3346
  __pyx_v_seq = __pyx_k49;
3411
  __pyx_v_seq = __pyx_d27;
3347
  __pyx_v_ack = __pyx_k50;
3412
  __pyx_v_ack = __pyx_d28;
3348
  __pyx_v_flags = __pyx_k51;
3413
  __pyx_v_flags = __pyx_d29;
3349
  __pyx_v_win = __pyx_k52;
3414
  __pyx_v_win = __pyx_d30;
3350
  __pyx_v_urp = __pyx_k53;
3415
  __pyx_v_urp = __pyx_d31;
3351
  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;
3416
  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;
3352
  Py_INCREF(__pyx_v_sport);
3417
  Py_INCREF(__pyx_v_sport);
3353
  Py_INCREF(__pyx_v_dport);
3418
  Py_INCREF(__pyx_v_dport);
Lines 3357-3363 Link Here
3357
  Py_INCREF(__pyx_v_win);
3422
  Py_INCREF(__pyx_v_win);
3358
  Py_INCREF(__pyx_v_urp);
3423
  Py_INCREF(__pyx_v_urp);
3359
3424
3360
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":862 */
3425
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":862 */
3361
  __pyx_1 = PyInt_AsLong(__pyx_v_sport); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;}
3426
  __pyx_1 = PyInt_AsLong(__pyx_v_sport); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;}
3362
  __pyx_2 = PyInt_AsLong(__pyx_v_dport); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;}
3427
  __pyx_2 = PyInt_AsLong(__pyx_v_dport); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;}
3363
  __pyx_3 = PyInt_AsUnsignedLongMask(__pyx_v_seq); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;}
3428
  __pyx_3 = PyInt_AsUnsignedLongMask(__pyx_v_seq); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;}
Lines 3367-3373 Link Here
3367
  __pyx_7 = PyInt_AsLong(__pyx_v_urp); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;}
3432
  __pyx_7 = PyInt_AsLong(__pyx_v_urp); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;}
3368
  tcp_pack_hdr(__pyx_v_buf,__pyx_1,__pyx_2,__pyx_3,__pyx_4,__pyx_5,__pyx_6,__pyx_7);
3433
  tcp_pack_hdr(__pyx_v_buf,__pyx_1,__pyx_2,__pyx_3,__pyx_4,__pyx_5,__pyx_6,__pyx_7);
3369
3434
3370
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":863 */
3435
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":863 */
3371
  __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;}
3436
  __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;}
3372
  __pyx_r = __pyx_8;
3437
  __pyx_r = __pyx_8;
3373
  __pyx_8 = 0;
3438
  __pyx_8 = 0;
Lines 3396-3421 Link Here
3396
  PyObject *__pyx_v_sport = 0;
3461
  PyObject *__pyx_v_sport = 0;
3397
  PyObject *__pyx_v_dport = 0;
3462
  PyObject *__pyx_v_dport = 0;
3398
  PyObject *__pyx_v_ulen = 0;
3463
  PyObject *__pyx_v_ulen = 0;
3399
  char (__pyx_v_buf[8]);
3464
  char __pyx_v_buf[8];
3400
  PyObject *__pyx_r;
3465
  PyObject *__pyx_r;
3401
  int __pyx_1;
3466
  int __pyx_1;
3402
  int __pyx_2;
3467
  int __pyx_2;
3403
  int __pyx_3;
3468
  int __pyx_3;
3404
  PyObject *__pyx_4 = 0;
3469
  PyObject *__pyx_4 = 0;
3405
  static char *__pyx_argnames[] = {"sport","dport","ulen",0};
3470
  static char *__pyx_argnames[] = {"sport","dport","ulen",0};
3406
  __pyx_v_ulen = __pyx_k54;
3471
  __pyx_v_ulen = __pyx_d32;
3407
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_sport, &__pyx_v_dport, &__pyx_v_ulen)) return 0;
3472
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_sport, &__pyx_v_dport, &__pyx_v_ulen)) return 0;
3408
  Py_INCREF(__pyx_v_sport);
3473
  Py_INCREF(__pyx_v_sport);
3409
  Py_INCREF(__pyx_v_dport);
3474
  Py_INCREF(__pyx_v_dport);
3410
  Py_INCREF(__pyx_v_ulen);
3475
  Py_INCREF(__pyx_v_ulen);
3411
3476
3412
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":883 */
3477
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":883 */
3413
  __pyx_1 = PyInt_AsLong(__pyx_v_sport); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; goto __pyx_L1;}
3478
  __pyx_1 = PyInt_AsLong(__pyx_v_sport); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; goto __pyx_L1;}
3414
  __pyx_2 = PyInt_AsLong(__pyx_v_dport); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; goto __pyx_L1;}
3479
  __pyx_2 = PyInt_AsLong(__pyx_v_dport); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; goto __pyx_L1;}
3415
  __pyx_3 = PyInt_AsLong(__pyx_v_ulen); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; goto __pyx_L1;}
3480
  __pyx_3 = PyInt_AsLong(__pyx_v_ulen); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; goto __pyx_L1;}
3416
  udp_pack_hdr(__pyx_v_buf,__pyx_1,__pyx_2,__pyx_3);
3481
  udp_pack_hdr(__pyx_v_buf,__pyx_1,__pyx_2,__pyx_3);
3417
3482
3418
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":884 */
3483
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":884 */
3419
  __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;}
3484
  __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;}
3420
  __pyx_r = __pyx_4;
3485
  __pyx_r = __pyx_4;
3421
  __pyx_4 = 0;
3486
  __pyx_4 = 0;
Lines 3434-3450 Link Here
3434
  return __pyx_r;
3499
  return __pyx_r;
3435
}
3500
}
3436
3501
3437
static PyObject *__pyx_n_name;
3502
static PyObject *__pyx_f_4dnet_ifent_to_dict(struct intf_entry *__pyx_v_entry) {
3438
static PyObject *__pyx_n_type;
3439
static PyObject *__pyx_n_flags;
3440
static PyObject *__pyx_n_mtu;
3441
static PyObject *__pyx_n_addr;
3442
static PyObject *__pyx_n_dst_addr;
3443
static PyObject *__pyx_n_link_addr;
3444
static PyObject *__pyx_n_alias_addrs;
3445
3446
3447
static PyObject *__pyx_f_4dnet_ifent_to_dict(struct intf_entry (*__pyx_v_entry)) {
3448
  PyObject *__pyx_v_d;
3503
  PyObject *__pyx_v_d;
3449
  PyObject *__pyx_v_l;
3504
  PyObject *__pyx_v_l;
3450
  PyObject *__pyx_v_i;
3505
  PyObject *__pyx_v_i;
Lines 3460-3492 Link Here
3460
  __pyx_v_l = Py_None; Py_INCREF(Py_None);
3515
  __pyx_v_l = Py_None; Py_INCREF(Py_None);
3461
  __pyx_v_i = Py_None; Py_INCREF(Py_None);
3516
  __pyx_v_i = Py_None; Py_INCREF(Py_None);
3462
3517
3463
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":926 */
3518
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":926 */
3464
  __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; goto __pyx_L1;}
3519
  __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; goto __pyx_L1;}
3465
  Py_DECREF(__pyx_v_d);
3520
  Py_DECREF(__pyx_v_d);
3466
  __pyx_v_d = __pyx_1;
3521
  __pyx_v_d = __pyx_1;
3467
  __pyx_1 = 0;
3522
  __pyx_1 = 0;
3468
3523
3469
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":927 */
3524
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":927 */
3470
  __pyx_1 = PyString_FromString(__pyx_v_entry->intf_name); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; goto __pyx_L1;}
3525
  __pyx_1 = PyString_FromString(__pyx_v_entry->intf_name); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; goto __pyx_L1;}
3471
  if (PyObject_SetItem(__pyx_v_d, __pyx_n_name, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; goto __pyx_L1;}
3526
  if (PyObject_SetItem(__pyx_v_d, __pyx_n_name, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; goto __pyx_L1;}
3472
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3527
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3473
3528
3474
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":928 */
3529
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":928 */
3475
  __pyx_1 = PyInt_FromLong(__pyx_v_entry->intf_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; goto __pyx_L1;}
3530
  __pyx_1 = PyInt_FromLong(__pyx_v_entry->intf_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; goto __pyx_L1;}
3476
  if (PyObject_SetItem(__pyx_v_d, __pyx_n_type, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; goto __pyx_L1;}
3531
  if (PyObject_SetItem(__pyx_v_d, __pyx_n_type, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; goto __pyx_L1;}
3477
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3532
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3478
3533
3479
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":929 */
3534
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":929 */
3480
  __pyx_1 = PyInt_FromLong(__pyx_v_entry->intf_flags); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; goto __pyx_L1;}
3535
  __pyx_1 = PyInt_FromLong(__pyx_v_entry->intf_flags); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; goto __pyx_L1;}
3481
  if (PyObject_SetItem(__pyx_v_d, __pyx_n_flags, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; goto __pyx_L1;}
3536
  if (PyObject_SetItem(__pyx_v_d, __pyx_n_flags, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; goto __pyx_L1;}
3482
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3537
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3483
3538
3484
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":930 */
3539
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":930 */
3485
  __pyx_1 = PyLong_FromUnsignedLong(__pyx_v_entry->intf_mtu); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; goto __pyx_L1;}
3540
  __pyx_1 = PyLong_FromUnsignedLong(__pyx_v_entry->intf_mtu); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; goto __pyx_L1;}
3486
  if (PyObject_SetItem(__pyx_v_d, __pyx_n_mtu, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; goto __pyx_L1;}
3541
  if (PyObject_SetItem(__pyx_v_d, __pyx_n_mtu, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; goto __pyx_L1;}
3487
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3542
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3488
3543
3489
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":931 */
3544
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":931 */
3490
  __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;}
3545
  __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;}
3491
  __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;}
3546
  __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;}
3492
  if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; goto __pyx_L1;}
3547
  if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; goto __pyx_L1;}
Lines 3494-3506 Link Here
3494
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3549
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3495
  Py_DECREF(__pyx_2); __pyx_2 = 0;
3550
  Py_DECREF(__pyx_2); __pyx_2 = 0;
3496
  if (__pyx_3) {
3551
  if (__pyx_3) {
3497
3498
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":932 */
3499
    __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;}
3552
    __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;}
3500
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; goto __pyx_L1;}
3553
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; goto __pyx_L1;}
3501
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
3554
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
3502
    __pyx_1 = 0;
3555
    __pyx_1 = 0;
3503
    __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;}
3556
    __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;}
3504
    Py_DECREF(__pyx_2); __pyx_2 = 0;
3557
    Py_DECREF(__pyx_2); __pyx_2 = 0;
3505
    if (PyObject_SetItem(__pyx_v_d, __pyx_n_addr, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; goto __pyx_L1;}
3558
    if (PyObject_SetItem(__pyx_v_d, __pyx_n_addr, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; goto __pyx_L1;}
3506
    Py_DECREF(__pyx_1); __pyx_1 = 0;
3559
    Py_DECREF(__pyx_1); __pyx_1 = 0;
Lines 3508-3514 Link Here
3508
  }
3561
  }
3509
  __pyx_L2:;
3562
  __pyx_L2:;
3510
3563
3511
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":933 */
3564
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":933 */
3512
  __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;}
3565
  __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;}
3513
  __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;}
3566
  __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;}
3514
  if (PyObject_Cmp(__pyx_2, __pyx_1, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; goto __pyx_L1;}
3567
  if (PyObject_Cmp(__pyx_2, __pyx_1, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; goto __pyx_L1;}
Lines 3516-3528 Link Here
3516
  Py_DECREF(__pyx_2); __pyx_2 = 0;
3569
  Py_DECREF(__pyx_2); __pyx_2 = 0;
3517
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3570
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3518
  if (__pyx_3) {
3571
  if (__pyx_3) {
3519
3520
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":934 */
3521
    __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;}
3572
    __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;}
3522
    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; goto __pyx_L1;}
3573
    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; goto __pyx_L1;}
3523
    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2);
3574
    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2);
3524
    __pyx_2 = 0;
3575
    __pyx_2 = 0;
3525
    __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;}
3576
    __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;}
3526
    Py_DECREF(__pyx_1); __pyx_1 = 0;
3577
    Py_DECREF(__pyx_1); __pyx_1 = 0;
3527
    if (PyObject_SetItem(__pyx_v_d, __pyx_n_dst_addr, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; goto __pyx_L1;}
3578
    if (PyObject_SetItem(__pyx_v_d, __pyx_n_dst_addr, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; goto __pyx_L1;}
3528
    Py_DECREF(__pyx_2); __pyx_2 = 0;
3579
    Py_DECREF(__pyx_2); __pyx_2 = 0;
Lines 3530-3536 Link Here
3530
  }
3581
  }
3531
  __pyx_L3:;
3582
  __pyx_L3:;
3532
3583
3533
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":935 */
3584
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":935 */
3534
  __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;}
3585
  __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;}
3535
  __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;}
3586
  __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;}
3536
  if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; goto __pyx_L1;}
3587
  if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; goto __pyx_L1;}
Lines 3538-3550 Link Here
3538
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3589
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3539
  Py_DECREF(__pyx_2); __pyx_2 = 0;
3590
  Py_DECREF(__pyx_2); __pyx_2 = 0;
3540
  if (__pyx_3) {
3591
  if (__pyx_3) {
3541
3542
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":936 */
3543
    __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;}
3592
    __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;}
3544
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; goto __pyx_L1;}
3593
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; goto __pyx_L1;}
3545
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
3594
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
3546
    __pyx_1 = 0;
3595
    __pyx_1 = 0;
3547
    __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;}
3596
    __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;}
3548
    Py_DECREF(__pyx_2); __pyx_2 = 0;
3597
    Py_DECREF(__pyx_2); __pyx_2 = 0;
3549
    if (PyObject_SetItem(__pyx_v_d, __pyx_n_link_addr, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; goto __pyx_L1;}
3598
    if (PyObject_SetItem(__pyx_v_d, __pyx_n_link_addr, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; goto __pyx_L1;}
3550
    Py_DECREF(__pyx_1); __pyx_1 = 0;
3599
    Py_DECREF(__pyx_1); __pyx_1 = 0;
Lines 3552-3602 Link Here
3552
  }
3601
  }
3553
  __pyx_L4:;
3602
  __pyx_L4:;
3554
3603
3555
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":937 */
3604
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":937 */
3556
  __pyx_3 = (__pyx_v_entry->intf_alias_num > 0);
3605
  __pyx_3 = (__pyx_v_entry->intf_alias_num > 0);
3557
  if (__pyx_3) {
3606
  if (__pyx_3) {
3558
3607
3559
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":938 */
3608
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":938 */
3560
    __pyx_2 = PyList_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; goto __pyx_L1;}
3609
    __pyx_2 = PyList_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; goto __pyx_L1;}
3561
    Py_DECREF(__pyx_v_l);
3610
    Py_DECREF(__pyx_v_l);
3562
    __pyx_v_l = __pyx_2;
3611
    __pyx_v_l = __pyx_2;
3563
    __pyx_2 = 0;
3612
    __pyx_2 = 0;
3564
3613
3565
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":939 */
3614
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":939 */
3566
    __pyx_5 = __pyx_v_entry->intf_alias_num;
3615
    __pyx_5 = __pyx_v_entry->intf_alias_num;
3567
    for (__pyx_4 = 0; __pyx_4 < __pyx_5; ++__pyx_4) {
3616
    for (__pyx_4 = 0; __pyx_4 < __pyx_5; ++__pyx_4) {
3568
      __pyx_1 = PyInt_FromLong(__pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; goto __pyx_L1;}
3617
      __pyx_1 = PyInt_FromLong(__pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; goto __pyx_L1;}
3569
      Py_DECREF(__pyx_v_i);
3618
      Py_DECREF(__pyx_v_i);
3570
      __pyx_v_i = __pyx_1;
3619
      __pyx_v_i = __pyx_1;
3571
      __pyx_1 = 0;
3620
      __pyx_1 = 0;
3572
3573
      /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":940 */
3574
      __pyx_2 = PyObject_GetAttr(__pyx_v_l, __pyx_n_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;}
3621
      __pyx_2 = PyObject_GetAttr(__pyx_v_l, __pyx_n_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;}
3575
      __pyx_6 = PyInt_AsSsize_t(__pyx_v_i); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;}
3622
      __pyx_6 = PyInt_AsSsize_t(__pyx_v_i); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;}
3576
      __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;}
3623
      __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;}
3577
      __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;}
3624
      __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;}
3578
      PyTuple_SET_ITEM(__pyx_7, 0, __pyx_1);
3625
      PyTuple_SET_ITEM(__pyx_7, 0, __pyx_1);
3579
      __pyx_1 = 0;
3626
      __pyx_1 = 0;
3580
      __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;}
3627
      __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;}
3581
      Py_DECREF(__pyx_7); __pyx_7 = 0;
3628
      Py_DECREF(__pyx_7); __pyx_7 = 0;
3582
      __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;}
3629
      __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;}
3583
      PyTuple_SET_ITEM(__pyx_7, 0, __pyx_1);
3630
      PyTuple_SET_ITEM(__pyx_7, 0, __pyx_1);
3584
      __pyx_1 = 0;
3631
      __pyx_1 = 0;
3585
      __pyx_1 = PyObject_Call(__pyx_2, __pyx_7, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;}
3632
      __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_7); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;}
3586
      Py_DECREF(__pyx_2); __pyx_2 = 0;
3633
      Py_DECREF(__pyx_2); __pyx_2 = 0;
3587
      Py_DECREF(__pyx_7); __pyx_7 = 0;
3634
      Py_DECREF(__pyx_7); __pyx_7 = 0;
3588
      Py_DECREF(__pyx_1); __pyx_1 = 0;
3635
      Py_DECREF(__pyx_1); __pyx_1 = 0;
3589
      __pyx_L6:;
3590
    }
3636
    }
3591
    __pyx_L7:;
3592
3637
3593
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":941 */
3638
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":941 */
3594
    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;}
3639
    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;}
3595
    goto __pyx_L5;
3640
    goto __pyx_L5;
3596
  }
3641
  }
3597
  __pyx_L5:;
3642
  __pyx_L5:;
3598
3643
3599
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":942 */
3644
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":942 */
3600
  Py_INCREF(__pyx_v_d);
3645
  Py_INCREF(__pyx_v_d);
3601
  __pyx_r = __pyx_v_d;
3646
  __pyx_r = __pyx_v_d;
3602
  goto __pyx_L0;
3647
  goto __pyx_L0;
Lines 3616-3656 Link Here
3616
  return __pyx_r;
3661
  return __pyx_r;
3617
}
3662
}
3618
3663
3619
static PyObject *__pyx_n_len;
3664
static PyObject *__pyx_f_4dnet_dict_to_ifent(PyObject *__pyx_v_d,struct intf_entry *__pyx_v_entry) {
3620
3621
3622
static PyObject *__pyx_f_4dnet_dict_to_ifent(PyObject *__pyx_v_d,struct intf_entry (*__pyx_v_entry)) {
3623
  PyObject *__pyx_v_s;
3665
  PyObject *__pyx_v_s;
3624
  PyObject *__pyx_v_i;
3666
  PyObject *__pyx_v_i;
3625
  PyObject *__pyx_r;
3667
  PyObject *__pyx_r;
3626
  PyObject *__pyx_1 = 0;
3668
  PyObject *__pyx_1 = 0;
3627
  char (*__pyx_2);
3669
  char *__pyx_2;
3628
  int __pyx_3;
3670
  int __pyx_3;
3629
  unsigned short __pyx_4;
3671
  unsigned short __pyx_4;
3630
  unsigned int __pyx_5;
3672
  unsigned int __pyx_5;
3631
  PyObject *__pyx_6 = 0;
3673
  Py_ssize_t __pyx_6;
3632
  PyObject *__pyx_7 = 0;
3674
  long __pyx_7;
3633
  long __pyx_8;
3675
  PyObject *__pyx_8 = 0;
3634
  Py_ssize_t __pyx_9;
3635
  Py_INCREF(__pyx_v_d);
3676
  Py_INCREF(__pyx_v_d);
3636
  __pyx_v_s = Py_None; Py_INCREF(Py_None);
3677
  __pyx_v_s = Py_None; Py_INCREF(Py_None);
3637
  __pyx_v_i = Py_None; Py_INCREF(Py_None);
3678
  __pyx_v_i = Py_None; Py_INCREF(Py_None);
3638
3679
3639
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":945 */
3680
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":945 */
3640
  __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_name); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; goto __pyx_L1;}
3681
  __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_name); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; goto __pyx_L1;}
3641
  Py_DECREF(__pyx_v_s);
3682
  Py_DECREF(__pyx_v_s);
3642
  __pyx_v_s = __pyx_1;
3683
  __pyx_v_s = __pyx_1;
3643
  __pyx_1 = 0;
3684
  __pyx_1 = 0;
3644
3685
3645
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":946 */
3686
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":946 */
3646
  __pyx_2 = PyString_AsString(__pyx_v_s); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; goto __pyx_L1;}
3687
  __pyx_2 = PyString_AsString(__pyx_v_s); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; goto __pyx_L1;}
3647
  strlcpy(__pyx_v_entry->intf_name,__pyx_2,16);
3688
  strlcpy(__pyx_v_entry->intf_name,__pyx_2,16);
3648
3689
3649
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":947 */
3690
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":947 */
3650
  __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;}
3691
  __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;}
3651
  if (__pyx_3) {
3692
  if (__pyx_3) {
3652
3653
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":948 */
3654
    __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_flags); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; goto __pyx_L1;}
3693
    __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_flags); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; goto __pyx_L1;}
3655
    __pyx_4 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; goto __pyx_L1;}
3694
    __pyx_4 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; goto __pyx_L1;}
3656
    Py_DECREF(__pyx_1); __pyx_1 = 0;
3695
    Py_DECREF(__pyx_1); __pyx_1 = 0;
Lines 3659-3669 Link Here
3659
  }
3698
  }
3660
  __pyx_L2:;
3699
  __pyx_L2:;
3661
3700
3662
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":949 */
3701
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":949 */
3663
  __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;}
3702
  __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;}
3664
  if (__pyx_3) {
3703
  if (__pyx_3) {
3665
3666
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":950 */
3667
    __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_mtu); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; goto __pyx_L1;}
3704
    __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_mtu); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; goto __pyx_L1;}
3668
    __pyx_5 = PyInt_AsUnsignedLongMask(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; goto __pyx_L1;}
3705
    __pyx_5 = PyInt_AsUnsignedLongMask(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; goto __pyx_L1;}
3669
    Py_DECREF(__pyx_1); __pyx_1 = 0;
3706
    Py_DECREF(__pyx_1); __pyx_1 = 0;
Lines 3672-3682 Link Here
3672
  }
3709
  }
3673
  __pyx_L3:;
3710
  __pyx_L3:;
3674
3711
3675
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":951 */
3712
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":951 */
3676
  __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;}
3713
  __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;}
3677
  if (__pyx_3) {
3714
  if (__pyx_3) {
3678
3679
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":952 */
3680
    __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_addr); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; goto __pyx_L1;}
3715
    __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_addr); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; goto __pyx_L1;}
3681
    __pyx_v_entry->intf_addr = ((struct __pyx_obj_4dnet_addr *)__pyx_1)->_addr;
3716
    __pyx_v_entry->intf_addr = ((struct __pyx_obj_4dnet_addr *)__pyx_1)->_addr;
3682
    Py_DECREF(__pyx_1); __pyx_1 = 0;
3717
    Py_DECREF(__pyx_1); __pyx_1 = 0;
Lines 3684-3694 Link Here
3684
  }
3719
  }
3685
  __pyx_L4:;
3720
  __pyx_L4:;
3686
3721
3687
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":953 */
3722
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":953 */
3688
  __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;}
3723
  __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;}
3689
  if (__pyx_3) {
3724
  if (__pyx_3) {
3690
3691
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":954 */
3692
    __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;}
3725
    __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;}
3693
    __pyx_v_entry->intf_dst_addr = ((struct __pyx_obj_4dnet_addr *)__pyx_1)->_addr;
3726
    __pyx_v_entry->intf_dst_addr = ((struct __pyx_obj_4dnet_addr *)__pyx_1)->_addr;
3694
    Py_DECREF(__pyx_1); __pyx_1 = 0;
3727
    Py_DECREF(__pyx_1); __pyx_1 = 0;
Lines 3696-3706 Link Here
3696
  }
3729
  }
3697
  __pyx_L5:;
3730
  __pyx_L5:;
3698
3731
3699
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":955 */
3732
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":955 */
3700
  __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;}
3733
  __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;}
3701
  if (__pyx_3) {
3734
  if (__pyx_3) {
3702
3703
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":956 */
3704
    __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;}
3735
    __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;}
3705
    __pyx_v_entry->intf_link_addr = ((struct __pyx_obj_4dnet_addr *)__pyx_1)->_addr;
3736
    __pyx_v_entry->intf_link_addr = ((struct __pyx_obj_4dnet_addr *)__pyx_1)->_addr;
3706
    Py_DECREF(__pyx_1); __pyx_1 = 0;
3737
    Py_DECREF(__pyx_1); __pyx_1 = 0;
Lines 3708-3748 Link Here
3708
  }
3739
  }
3709
  __pyx_L6:;
3740
  __pyx_L6:;
3710
3741
3711
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":957 */
3742
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":957 */
3712
  __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;}
3743
  __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;}
3713
  if (__pyx_3) {
3744
  if (__pyx_3) {
3714
3745
3715
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":958 */
3746
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":958 */
3716
    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; goto __pyx_L1;}
3747
    __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;}
3717
    __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;}
3748
    __pyx_6 = PyObject_Length(__pyx_1); if (__pyx_6 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; goto __pyx_L1;}
3718
    __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; goto __pyx_L1;}
3719
    PyTuple_SET_ITEM(__pyx_7, 0, __pyx_6);
3720
    __pyx_6 = 0;
3721
    __pyx_6 = PyObject_Call(__pyx_1, __pyx_7, 0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; goto __pyx_L1;}
3722
    Py_DECREF(__pyx_1); __pyx_1 = 0;
3749
    Py_DECREF(__pyx_1); __pyx_1 = 0;
3723
    Py_DECREF(__pyx_7); __pyx_7 = 0;
3750
    __pyx_v_entry->intf_alias_num = __pyx_6;
3724
    __pyx_5 = PyInt_AsUnsignedLongMask(__pyx_6); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; goto __pyx_L1;}
3725
    Py_DECREF(__pyx_6); __pyx_6 = 0;
3726
    __pyx_v_entry->intf_alias_num = __pyx_5;
3727
3751
3728
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":959 */
3752
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":959 */
3729
    __pyx_5 = __pyx_v_entry->intf_alias_num;
3753
    __pyx_5 = __pyx_v_entry->intf_alias_num;
3730
    for (__pyx_8 = 0; __pyx_8 < __pyx_5; ++__pyx_8) {
3754
    for (__pyx_7 = 0; __pyx_7 < __pyx_5; ++__pyx_7) {
3731
      __pyx_1 = PyInt_FromLong(__pyx_8); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; goto __pyx_L1;}
3755
      __pyx_1 = PyInt_FromLong(__pyx_7); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; goto __pyx_L1;}
3732
      Py_DECREF(__pyx_v_i);
3756
      Py_DECREF(__pyx_v_i);
3733
      __pyx_v_i = __pyx_1;
3757
      __pyx_v_i = __pyx_1;
3734
      __pyx_1 = 0;
3758
      __pyx_1 = 0;
3735
3759
      __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;}
3736
      /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":960 */
3760
      __pyx_8 = PyObject_GetItem(__pyx_1, __pyx_v_i); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; goto __pyx_L1;}
3737
      __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;}
3761
      Py_DECREF(__pyx_1); __pyx_1 = 0;
3738
      __pyx_6 = PyObject_GetItem(__pyx_7, __pyx_v_i); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; goto __pyx_L1;}
3762
      __pyx_6 = PyInt_AsSsize_t(__pyx_v_i); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; goto __pyx_L1;}
3739
      Py_DECREF(__pyx_7); __pyx_7 = 0;
3763
      (__pyx_v_entry->intf_alias_addrs[__pyx_6]) = ((struct __pyx_obj_4dnet_addr *)__pyx_8)->_addr;
3740
      __pyx_9 = PyInt_AsSsize_t(__pyx_v_i); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; goto __pyx_L1;}
3764
      Py_DECREF(__pyx_8); __pyx_8 = 0;
3741
      (__pyx_v_entry->intf_alias_addrs[__pyx_9]) = ((struct __pyx_obj_4dnet_addr *)__pyx_6)->_addr;
3742
      Py_DECREF(__pyx_6); __pyx_6 = 0;
3743
      __pyx_L8:;
3744
    }
3765
    }
3745
    __pyx_L9:;
3746
    goto __pyx_L7;
3766
    goto __pyx_L7;
3747
  }
3767
  }
3748
  __pyx_L7:;
3768
  __pyx_L7:;
Lines 3751-3758 Link Here
3751
  goto __pyx_L0;
3771
  goto __pyx_L0;
3752
  __pyx_L1:;
3772
  __pyx_L1:;
3753
  Py_XDECREF(__pyx_1);
3773
  Py_XDECREF(__pyx_1);
3754
  Py_XDECREF(__pyx_6);
3774
  Py_XDECREF(__pyx_8);
3755
  Py_XDECREF(__pyx_7);
3756
  __Pyx_AddTraceback("dnet.dict_to_ifent");
3775
  __Pyx_AddTraceback("dnet.dict_to_ifent");
3757
  __pyx_r = 0;
3776
  __pyx_r = 0;
3758
  __pyx_L0:;
3777
  __pyx_L0:;
Lines 3762-3825 Link Here
3762
  return __pyx_r;
3781
  return __pyx_r;
3763
}
3782
}
3764
3783
3765
static int __pyx_f_4dnet___intf_callback(struct intf_entry (*__pyx_v_entry),void (*__pyx_v_arg)) {
3784
static int __pyx_f_4dnet___intf_callback(struct intf_entry *__pyx_v_entry,void *__pyx_v_arg) {
3766
  PyObject *__pyx_v_f;
3785
  PyObject *__pyx_v_f;
3767
  PyObject *__pyx_v_a;
3786
  PyObject *__pyx_v_a;
3768
  PyObject *__pyx_v_ret;
3787
  PyObject *__pyx_v_ret;
3769
  int __pyx_r;
3788
  int __pyx_r;
3770
  PyObject *__pyx_1 = 0;
3789
  PyObject *__pyx_1 = 0;
3771
  PyObject *__pyx_2 = 0;
3790
  PyObject *__pyx_2 = 0;
3772
  PyObject *__pyx_3 = 0;
3791
  int __pyx_3;
3773
  int __pyx_4;
3792
  int __pyx_4;
3774
  int __pyx_5;
3775
  __pyx_v_f = Py_None; Py_INCREF(Py_None);
3793
  __pyx_v_f = Py_None; Py_INCREF(Py_None);
3776
  __pyx_v_a = Py_None; Py_INCREF(Py_None);
3794
  __pyx_v_a = Py_None; Py_INCREF(Py_None);
3777
  __pyx_v_ret = Py_None; Py_INCREF(Py_None);
3795
  __pyx_v_ret = Py_None; Py_INCREF(Py_None);
3778
3796
3779
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":963 */
3797
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":963 */
3780
  __pyx_1 = (PyObject *)__pyx_v_arg;
3798
  __pyx_1 = PyObject_GetIter(((PyObject *)__pyx_v_arg)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; goto __pyx_L1;}
3781
  Py_INCREF(__pyx_1);
3799
  __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; goto __pyx_L1;}
3782
  __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; goto __pyx_L1;}
3783
  Py_DECREF(__pyx_v_f);
3800
  Py_DECREF(__pyx_v_f);
3784
  __pyx_v_f = __pyx_2;
3801
  __pyx_v_f = __pyx_2;
3785
  __pyx_2 = 0;
3802
  __pyx_2 = 0;
3786
  __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; goto __pyx_L1;}
3803
  __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; goto __pyx_L1;}
3787
  Py_DECREF(__pyx_v_a);
3804
  Py_DECREF(__pyx_v_a);
3788
  __pyx_v_a = __pyx_3;
3805
  __pyx_v_a = __pyx_2;
3789
  __pyx_3 = 0;
3806
  __pyx_2 = 0;
3790
  if (__Pyx_EndUnpack(__pyx_1, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; goto __pyx_L1;}
3807
  if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; goto __pyx_L1;}
3791
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3808
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3792
3809
3793
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":964 */
3810
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":964 */
3794
  __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;}
3811
  __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;}
3795
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; goto __pyx_L1;}
3812
  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; goto __pyx_L1;}
3796
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
3813
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2);
3797
  Py_INCREF(__pyx_v_a);
3814
  Py_INCREF(__pyx_v_a);
3798
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_a);
3815
  PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_a);
3799
  __pyx_2 = 0;
3816
  __pyx_2 = 0;
3800
  __pyx_1 = PyObject_Call(__pyx_v_f, __pyx_3, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; goto __pyx_L1;}
3817
  __pyx_2 = PyObject_CallObject(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; goto __pyx_L1;}
3801
  Py_DECREF(__pyx_3); __pyx_3 = 0;
3818
  Py_DECREF(__pyx_1); __pyx_1 = 0;
3802
  Py_DECREF(__pyx_v_ret);
3819
  Py_DECREF(__pyx_v_ret);
3803
  __pyx_v_ret = __pyx_1;
3820
  __pyx_v_ret = __pyx_2;
3804
  __pyx_1 = 0;
3821
  __pyx_2 = 0;
3805
3806
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":965 */
3807
  __pyx_4 = PyObject_IsTrue(__pyx_v_ret); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; goto __pyx_L1;}
3808
  __pyx_5 = (!__pyx_4);
3809
  if (__pyx_5) {
3810
3822
3811
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":966 */
3823
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":965 */
3812
    __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; goto __pyx_L1;}
3824
  __pyx_3 = PyObject_IsTrue(__pyx_v_ret); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; goto __pyx_L1;}
3825
  __pyx_4 = (!__pyx_3);
3826
  if (__pyx_4) {
3827
    __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; goto __pyx_L1;}
3813
    Py_DECREF(__pyx_v_ret);
3828
    Py_DECREF(__pyx_v_ret);
3814
    __pyx_v_ret = __pyx_2;
3829
    __pyx_v_ret = __pyx_1;
3815
    __pyx_2 = 0;
3830
    __pyx_1 = 0;
3816
    goto __pyx_L2;
3831
    goto __pyx_L2;
3817
  }
3832
  }
3818
  __pyx_L2:;
3833
  __pyx_L2:;
3819
3834
3820
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":967 */
3835
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":967 */
3821
  __pyx_4 = PyInt_AsLong(__pyx_v_ret); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; goto __pyx_L1;}
3836
  __pyx_3 = PyInt_AsLong(__pyx_v_ret); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; goto __pyx_L1;}
3822
  __pyx_r = __pyx_4;
3837
  __pyx_r = __pyx_3;
3823
  goto __pyx_L0;
3838
  goto __pyx_L0;
3824
3839
3825
  __pyx_r = 0;
3840
  __pyx_r = 0;
Lines 3827-3835 Link Here
3827
  __pyx_L1:;
3842
  __pyx_L1:;
3828
  Py_XDECREF(__pyx_1);
3843
  Py_XDECREF(__pyx_1);
3829
  Py_XDECREF(__pyx_2);
3844
  Py_XDECREF(__pyx_2);
3830
  Py_XDECREF(__pyx_3);
3831
  __Pyx_AddTraceback("dnet.__intf_callback");
3845
  __Pyx_AddTraceback("dnet.__intf_callback");
3832
  __pyx_r = -1;
3846
  __pyx_r = (-1);
3833
  __pyx_L0:;
3847
  __pyx_L0:;
3834
  Py_DECREF(__pyx_v_f);
3848
  Py_DECREF(__pyx_v_f);
3835
  Py_DECREF(__pyx_v_a);
3849
  Py_DECREF(__pyx_v_a);
Lines 3842-3865 Link Here
3842
  int __pyx_r;
3856
  int __pyx_r;
3843
  int __pyx_1;
3857
  int __pyx_1;
3844
  PyObject *__pyx_2 = 0;
3858
  PyObject *__pyx_2 = 0;
3845
  PyObject *__pyx_3 = 0;
3846
  static char *__pyx_argnames[] = {0};
3859
  static char *__pyx_argnames[] = {0};
3847
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1;
3860
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1;
3848
  Py_INCREF(__pyx_v_self);
3861
  Py_INCREF(__pyx_v_self);
3849
3862
3850
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":977 */
3863
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":977 */
3851
  ((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf = intf_open();
3864
  ((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf = intf_open();
3852
3865
3853
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":978 */
3866
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":978 */
3854
  __pyx_1 = (!(((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf != 0));
3867
  __pyx_1 = (!(((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf != 0));
3855
  if (__pyx_1) {
3868
  if (__pyx_1) {
3856
3869
    __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; goto __pyx_L1;}
3857
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":979 */
3870
    __Pyx_Raise(PyExc_OSError, __pyx_2, 0);
3858
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; goto __pyx_L1;}
3859
    __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; goto __pyx_L1;}
3860
    __Pyx_Raise(__pyx_2, __pyx_3, 0);
3861
    Py_DECREF(__pyx_2); __pyx_2 = 0;
3871
    Py_DECREF(__pyx_2); __pyx_2 = 0;
3862
    Py_DECREF(__pyx_3); __pyx_3 = 0;
3863
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; goto __pyx_L1;}
3872
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; goto __pyx_L1;}
3864
    goto __pyx_L2;
3873
    goto __pyx_L2;
3865
  }
3874
  }
Lines 3869-3875 Link Here
3869
  goto __pyx_L0;
3878
  goto __pyx_L0;
3870
  __pyx_L1:;
3879
  __pyx_L1:;
3871
  Py_XDECREF(__pyx_2);
3880
  Py_XDECREF(__pyx_2);
3872
  Py_XDECREF(__pyx_3);
3873
  __Pyx_AddTraceback("dnet.intf.__init__");
3881
  __Pyx_AddTraceback("dnet.intf.__init__");
3874
  __pyx_r = -1;
3882
  __pyx_r = -1;
3875
  __pyx_L0:;
3883
  __pyx_L0:;
Lines 3881-3924 Link Here
3881
static char __pyx_doc_4dnet_4intf_get[] = "Return the configuration for a network interface as a dict.\n        ";
3889
static char __pyx_doc_4dnet_4intf_get[] = "Return the configuration for a network interface as a dict.\n        ";
3882
static PyObject *__pyx_f_4dnet_4intf_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3890
static PyObject *__pyx_f_4dnet_4intf_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3883
  PyObject *__pyx_v_name = 0;
3891
  PyObject *__pyx_v_name = 0;
3884
  struct intf_entry (*__pyx_v_ifent);
3892
  struct intf_entry *__pyx_v_ifent;
3885
  char (__pyx_v_buf[1024]);
3893
  char __pyx_v_buf[1024];
3886
  PyObject *__pyx_r;
3894
  PyObject *__pyx_r;
3887
  char (*__pyx_1);
3895
  char *__pyx_1;
3888
  int __pyx_2;
3896
  int __pyx_2;
3889
  PyObject *__pyx_3 = 0;
3897
  PyObject *__pyx_3 = 0;
3890
  PyObject *__pyx_4 = 0;
3891
  static char *__pyx_argnames[] = {"name",0};
3898
  static char *__pyx_argnames[] = {"name",0};
3892
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_name)) return 0;
3899
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_name)) return 0;
3893
  Py_INCREF(__pyx_v_self);
3900
  Py_INCREF(__pyx_v_self);
3894
  Py_INCREF(__pyx_v_name);
3901
  Py_INCREF(__pyx_v_name);
3895
3902
3896
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":986 */
3903
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":986 */
3897
  __pyx_v_ifent = ((struct intf_entry (*))__pyx_v_buf);
3904
  __pyx_v_ifent = ((struct intf_entry *)__pyx_v_buf);
3898
3905
3899
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":987 */
3906
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":987 */
3900
  __pyx_v_ifent->intf_len = 1024;
3907
  __pyx_v_ifent->intf_len = 1024;
3901
3908
3902
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":988 */
3909
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":988 */
3903
  __pyx_1 = PyString_AsString(__pyx_v_name); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; goto __pyx_L1;}
3910
  __pyx_1 = PyString_AsString(__pyx_v_name); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; goto __pyx_L1;}
3904
  strlcpy(__pyx_v_ifent->intf_name,__pyx_1,16);
3911
  strlcpy(__pyx_v_ifent->intf_name,__pyx_1,16);
3905
3912
3906
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":989 */
3913
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":989 */
3907
  __pyx_2 = (intf_get(((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf,__pyx_v_ifent) < 0);
3914
  __pyx_2 = (intf_get(((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf,__pyx_v_ifent) < 0);
3908
  if (__pyx_2) {
3915
  if (__pyx_2) {
3909
3916
    __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; goto __pyx_L1;}
3910
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":990 */
3917
    __Pyx_Raise(PyExc_OSError, __pyx_3, 0);
3911
    __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; goto __pyx_L1;}
3912
    __pyx_4 = __pyx_f_4dnet___oserror(); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; goto __pyx_L1;}
3913
    __Pyx_Raise(__pyx_3, __pyx_4, 0);
3914
    Py_DECREF(__pyx_3); __pyx_3 = 0;
3918
    Py_DECREF(__pyx_3); __pyx_3 = 0;
3915
    Py_DECREF(__pyx_4); __pyx_4 = 0;
3916
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; goto __pyx_L1;}
3919
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; goto __pyx_L1;}
3917
    goto __pyx_L2;
3920
    goto __pyx_L2;
3918
  }
3921
  }
3919
  __pyx_L2:;
3922
  __pyx_L2:;
3920
3923
3921
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":991 */
3924
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":991 */
3922
  __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;}
3925
  __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;}
3923
  __pyx_r = __pyx_3;
3926
  __pyx_r = __pyx_3;
3924
  __pyx_3 = 0;
3927
  __pyx_3 = 0;
Lines 3928-3934 Link Here
3928
  goto __pyx_L0;
3931
  goto __pyx_L0;
3929
  __pyx_L1:;
3932
  __pyx_L1:;
3930
  Py_XDECREF(__pyx_3);
3933
  Py_XDECREF(__pyx_3);
3931
  Py_XDECREF(__pyx_4);
3932
  __Pyx_AddTraceback("dnet.intf.get");
3934
  __Pyx_AddTraceback("dnet.intf.get");
3933
  __pyx_r = 0;
3935
  __pyx_r = 0;
3934
  __pyx_L0:;
3936
  __pyx_L0:;
Lines 3941-3980 Link Here
3941
static char __pyx_doc_4dnet_4intf_get_src[] = "Return the configuration for the interface whose primary address\n        matches the specified source address.\n        ";
3943
static char __pyx_doc_4dnet_4intf_get_src[] = "Return the configuration for the interface whose primary address\n        matches the specified source address.\n        ";
3942
static PyObject *__pyx_f_4dnet_4intf_get_src(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3944
static PyObject *__pyx_f_4dnet_4intf_get_src(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3943
  struct __pyx_obj_4dnet_addr *__pyx_v_src = 0;
3945
  struct __pyx_obj_4dnet_addr *__pyx_v_src = 0;
3944
  struct intf_entry (*__pyx_v_ifent);
3946
  struct intf_entry *__pyx_v_ifent;
3945
  char (__pyx_v_buf[1024]);
3947
  char __pyx_v_buf[1024];
3946
  PyObject *__pyx_r;
3948
  PyObject *__pyx_r;
3947
  int __pyx_1;
3949
  int __pyx_1;
3948
  PyObject *__pyx_2 = 0;
3950
  PyObject *__pyx_2 = 0;
3949
  PyObject *__pyx_3 = 0;
3950
  static char *__pyx_argnames[] = {"src",0};
3951
  static char *__pyx_argnames[] = {"src",0};
3951
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_src)) return 0;
3952
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_src)) return 0;
3952
  Py_INCREF(__pyx_v_self);
3953
  Py_INCREF(__pyx_v_self);
3953
  Py_INCREF(__pyx_v_src);
3954
  Py_INCREF(__pyx_v_src);
3954
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_4dnet_addr, 1, "src")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;}
3955
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_4dnet_addr, 1, "src")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;}
3955
3956
3956
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":999 */
3957
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":999 */
3957
  __pyx_v_ifent = ((struct intf_entry (*))__pyx_v_buf);
3958
  __pyx_v_ifent = ((struct intf_entry *)__pyx_v_buf);
3958
3959
3959
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1000 */
3960
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1000 */
3960
  __pyx_v_ifent->intf_len = 1024;
3961
  __pyx_v_ifent->intf_len = 1024;
3961
3962
3962
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1001 */
3963
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1001 */
3963
  __pyx_1 = (intf_get_src(((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf,__pyx_v_ifent,(&__pyx_v_src->_addr)) < 0);
3964
  __pyx_1 = (intf_get_src(((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf,__pyx_v_ifent,(&__pyx_v_src->_addr)) < 0);
3964
  if (__pyx_1) {
3965
  if (__pyx_1) {
3965
3966
    __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; goto __pyx_L1;}
3966
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1002 */
3967
    __Pyx_Raise(PyExc_OSError, __pyx_2, 0);
3967
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; goto __pyx_L1;}
3968
    __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; goto __pyx_L1;}
3969
    __Pyx_Raise(__pyx_2, __pyx_3, 0);
3970
    Py_DECREF(__pyx_2); __pyx_2 = 0;
3968
    Py_DECREF(__pyx_2); __pyx_2 = 0;
3971
    Py_DECREF(__pyx_3); __pyx_3 = 0;
3972
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; goto __pyx_L1;}
3969
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; goto __pyx_L1;}
3973
    goto __pyx_L2;
3970
    goto __pyx_L2;
3974
  }
3971
  }
3975
  __pyx_L2:;
3972
  __pyx_L2:;
3976
3973
3977
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1003 */
3974
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1003 */
3978
  __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;}
3975
  __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;}
3979
  __pyx_r = __pyx_2;
3976
  __pyx_r = __pyx_2;
3980
  __pyx_2 = 0;
3977
  __pyx_2 = 0;
Lines 3984-3990 Link Here
3984
  goto __pyx_L0;
3981
  goto __pyx_L0;
3985
  __pyx_L1:;
3982
  __pyx_L1:;
3986
  Py_XDECREF(__pyx_2);
3983
  Py_XDECREF(__pyx_2);
3987
  Py_XDECREF(__pyx_3);
3988
  __Pyx_AddTraceback("dnet.intf.get_src");
3984
  __Pyx_AddTraceback("dnet.intf.get_src");
3989
  __pyx_r = 0;
3985
  __pyx_r = 0;
3990
  __pyx_L0:;
3986
  __pyx_L0:;
Lines 3997-4036 Link Here
3997
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        ";
3993
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        ";
3998
static PyObject *__pyx_f_4dnet_4intf_get_dst(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3994
static PyObject *__pyx_f_4dnet_4intf_get_dst(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3999
  struct __pyx_obj_4dnet_addr *__pyx_v_dst = 0;
3995
  struct __pyx_obj_4dnet_addr *__pyx_v_dst = 0;
4000
  struct intf_entry (*__pyx_v_ifent);
3996
  struct intf_entry *__pyx_v_ifent;
4001
  char (__pyx_v_buf[1024]);
3997
  char __pyx_v_buf[1024];
4002
  PyObject *__pyx_r;
3998
  PyObject *__pyx_r;
4003
  int __pyx_1;
3999
  int __pyx_1;
4004
  PyObject *__pyx_2 = 0;
4000
  PyObject *__pyx_2 = 0;
4005
  PyObject *__pyx_3 = 0;
4006
  static char *__pyx_argnames[] = {"dst",0};
4001
  static char *__pyx_argnames[] = {"dst",0};
4007
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_dst)) return 0;
4002
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_dst)) return 0;
4008
  Py_INCREF(__pyx_v_self);
4003
  Py_INCREF(__pyx_v_self);
4009
  Py_INCREF(__pyx_v_dst);
4004
  Py_INCREF(__pyx_v_dst);
4010
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dst), __pyx_ptype_4dnet_addr, 1, "dst")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; goto __pyx_L1;}
4005
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dst), __pyx_ptype_4dnet_addr, 1, "dst")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; goto __pyx_L1;}
4011
4006
4012
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1011 */
4007
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1011 */
4013
  __pyx_v_ifent = ((struct intf_entry (*))__pyx_v_buf);
4008
  __pyx_v_ifent = ((struct intf_entry *)__pyx_v_buf);
4014
4009
4015
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1012 */
4010
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1012 */
4016
  __pyx_v_ifent->intf_len = 1024;
4011
  __pyx_v_ifent->intf_len = 1024;
4017
4012
4018
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1013 */
4013
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1013 */
4019
  __pyx_1 = (intf_get_dst(((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf,__pyx_v_ifent,(&__pyx_v_dst->_addr)) < 0);
4014
  __pyx_1 = (intf_get_dst(((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf,__pyx_v_ifent,(&__pyx_v_dst->_addr)) < 0);
4020
  if (__pyx_1) {
4015
  if (__pyx_1) {
4021
4016
    __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; goto __pyx_L1;}
4022
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1014 */
4017
    __Pyx_Raise(PyExc_OSError, __pyx_2, 0);
4023
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; goto __pyx_L1;}
4024
    __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; goto __pyx_L1;}
4025
    __Pyx_Raise(__pyx_2, __pyx_3, 0);
4026
    Py_DECREF(__pyx_2); __pyx_2 = 0;
4018
    Py_DECREF(__pyx_2); __pyx_2 = 0;
4027
    Py_DECREF(__pyx_3); __pyx_3 = 0;
4028
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; goto __pyx_L1;}
4019
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; goto __pyx_L1;}
4029
    goto __pyx_L2;
4020
    goto __pyx_L2;
4030
  }
4021
  }
4031
  __pyx_L2:;
4022
  __pyx_L2:;
4032
4023
4033
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1015 */
4024
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1015 */
4034
  __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;}
4025
  __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;}
4035
  __pyx_r = __pyx_2;
4026
  __pyx_r = __pyx_2;
4036
  __pyx_2 = 0;
4027
  __pyx_2 = 0;
Lines 4040-4046 Link Here
4040
  goto __pyx_L0;
4031
  goto __pyx_L0;
4041
  __pyx_L1:;
4032
  __pyx_L1:;
4042
  Py_XDECREF(__pyx_2);
4033
  Py_XDECREF(__pyx_2);
4043
  Py_XDECREF(__pyx_3);
4044
  __Pyx_AddTraceback("dnet.intf.get_dst");
4034
  __Pyx_AddTraceback("dnet.intf.get_dst");
4045
  __pyx_r = 0;
4035
  __pyx_r = 0;
4046
  __pyx_L0:;
4036
  __pyx_L0:;
Lines 4053-4092 Link Here
4053
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        ";
4043
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        ";
4054
static PyObject *__pyx_f_4dnet_4intf_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4044
static PyObject *__pyx_f_4dnet_4intf_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4055
  PyObject *__pyx_v_d = 0;
4045
  PyObject *__pyx_v_d = 0;
4056
  struct intf_entry (*__pyx_v_ifent);
4046
  struct intf_entry *__pyx_v_ifent;
4057
  char (__pyx_v_buf[1024]);
4047
  char __pyx_v_buf[1024];
4058
  PyObject *__pyx_r;
4048
  PyObject *__pyx_r;
4059
  PyObject *__pyx_1 = 0;
4049
  PyObject *__pyx_1 = 0;
4060
  int __pyx_2;
4050
  int __pyx_2;
4061
  PyObject *__pyx_3 = 0;
4062
  static char *__pyx_argnames[] = {"d",0};
4051
  static char *__pyx_argnames[] = {"d",0};
4063
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_d)) return 0;
4052
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_d)) return 0;
4064
  Py_INCREF(__pyx_v_self);
4053
  Py_INCREF(__pyx_v_self);
4065
  Py_INCREF(__pyx_v_d);
4054
  Py_INCREF(__pyx_v_d);
4066
4055
4067
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1031 */
4056
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1031 */
4068
  memset(__pyx_v_buf,0,(sizeof(__pyx_v_buf)));
4057
  memset(__pyx_v_buf,0,(sizeof(__pyx_v_buf)));
4069
4058
4070
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1032 */
4059
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1032 */
4071
  __pyx_v_ifent = ((struct intf_entry (*))__pyx_v_buf);
4060
  __pyx_v_ifent = ((struct intf_entry *)__pyx_v_buf);
4072
4061
4073
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1033 */
4062
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1033 */
4074
  __pyx_v_ifent->intf_len = 1024;
4063
  __pyx_v_ifent->intf_len = 1024;
4075
4064
4076
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1034 */
4065
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1034 */
4077
  __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;}
4066
  __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;}
4078
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4067
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4079
4068
4080
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1035 */
4069
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1035 */
4081
  __pyx_2 = (intf_set(((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf,__pyx_v_ifent) < 0);
4070
  __pyx_2 = (intf_set(((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf,__pyx_v_ifent) < 0);
4082
  if (__pyx_2) {
4071
  if (__pyx_2) {
4083
4072
    __pyx_1 = __pyx_f_4dnet___oserror(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; goto __pyx_L1;}
4084
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1036 */
4073
    __Pyx_Raise(PyExc_OSError, __pyx_1, 0);
4085
    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; goto __pyx_L1;}
4086
    __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; goto __pyx_L1;}
4087
    __Pyx_Raise(__pyx_1, __pyx_3, 0);
4088
    Py_DECREF(__pyx_1); __pyx_1 = 0;
4074
    Py_DECREF(__pyx_1); __pyx_1 = 0;
4089
    Py_DECREF(__pyx_3); __pyx_3 = 0;
4090
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; goto __pyx_L1;}
4075
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; goto __pyx_L1;}
4091
    goto __pyx_L2;
4076
    goto __pyx_L2;
4092
  }
4077
  }
Lines 4096-4102 Link Here
4096
  goto __pyx_L0;
4081
  goto __pyx_L0;
4097
  __pyx_L1:;
4082
  __pyx_L1:;
4098
  Py_XDECREF(__pyx_1);
4083
  Py_XDECREF(__pyx_1);
4099
  Py_XDECREF(__pyx_3);
4100
  __Pyx_AddTraceback("dnet.intf.set");
4084
  __Pyx_AddTraceback("dnet.intf.set");
4101
  __pyx_r = 0;
4085
  __pyx_r = 0;
4102
  __pyx_L0:;
4086
  __pyx_L0:;
Lines 4114-4127 Link Here
4114
  PyObject *__pyx_r;
4098
  PyObject *__pyx_r;
4115
  PyObject *__pyx_1 = 0;
4099
  PyObject *__pyx_1 = 0;
4116
  static char *__pyx_argnames[] = {"callback","arg",0};
4100
  static char *__pyx_argnames[] = {"callback","arg",0};
4117
  __pyx_v_arg = __pyx_k55;
4101
  __pyx_v_arg = __pyx_d33;
4118
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_callback, &__pyx_v_arg)) return 0;
4102
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_callback, &__pyx_v_arg)) return 0;
4119
  Py_INCREF(__pyx_v_self);
4103
  Py_INCREF(__pyx_v_self);
4120
  Py_INCREF(__pyx_v_callback);
4104
  Py_INCREF(__pyx_v_callback);
4121
  Py_INCREF(__pyx_v_arg);
4105
  Py_INCREF(__pyx_v_arg);
4122
  __pyx_v__arg = Py_None; Py_INCREF(Py_None);
4106
  __pyx_v__arg = Py_None; Py_INCREF(Py_None);
4123
4107
4124
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1048 */
4108
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1048 */
4125
  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; goto __pyx_L1;}
4109
  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; goto __pyx_L1;}
4126
  Py_INCREF(__pyx_v_callback);
4110
  Py_INCREF(__pyx_v_callback);
4127
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_callback);
4111
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_callback);
Lines 4131-4138 Link Here
4131
  __pyx_v__arg = __pyx_1;
4115
  __pyx_v__arg = __pyx_1;
4132
  __pyx_1 = 0;
4116
  __pyx_1 = 0;
4133
4117
4134
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1049 */
4118
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1049 */
4135
  __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;}
4119
  __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;}
4136
  __pyx_r = __pyx_1;
4120
  __pyx_r = __pyx_1;
4137
  __pyx_1 = 0;
4121
  __pyx_1 = 0;
4138
  goto __pyx_L0;
4122
  goto __pyx_L0;
Lines 4161-4173 Link Here
4161
  Py_INCREF(__pyx_v_self);
4145
  Py_INCREF(__pyx_v_self);
4162
  __pyx_v_l = Py_None; Py_INCREF(Py_None);
4146
  __pyx_v_l = Py_None; Py_INCREF(Py_None);
4163
4147
4164
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1052 */
4148
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1052 */
4165
  __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; goto __pyx_L1;}
4149
  __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; goto __pyx_L1;}
4166
  Py_DECREF(__pyx_v_l);
4150
  Py_DECREF(__pyx_v_l);
4167
  __pyx_v_l = __pyx_1;
4151
  __pyx_v_l = __pyx_1;
4168
  __pyx_1 = 0;
4152
  __pyx_1 = 0;
4169
4153
4170
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1053 */
4154
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1053 */
4171
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_loop); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; goto __pyx_L1;}
4155
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_loop); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; goto __pyx_L1;}
4172
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n___iter_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; goto __pyx_L1;}
4156
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n___iter_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; goto __pyx_L1;}
4173
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; goto __pyx_L1;}
4157
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; goto __pyx_L1;}
Lines 4175-4195 Link Here
4175
  Py_INCREF(__pyx_v_l);
4159
  Py_INCREF(__pyx_v_l);
4176
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_l);
4160
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_l);
4177
  __pyx_2 = 0;
4161
  __pyx_2 = 0;
4178
  __pyx_2 = PyObject_Call(__pyx_1, __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; goto __pyx_L1;}
4162
  __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; goto __pyx_L1;}
4179
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4163
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4180
  Py_DECREF(__pyx_3); __pyx_3 = 0;
4164
  Py_DECREF(__pyx_3); __pyx_3 = 0;
4181
  Py_DECREF(__pyx_2); __pyx_2 = 0;
4165
  Py_DECREF(__pyx_2); __pyx_2 = 0;
4182
4166
4183
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1054 */
4167
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1054 */
4184
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_iter); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; goto __pyx_L1;}
4168
  __pyx_1 = PyObject_GetIter(__pyx_v_l); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; goto __pyx_L1;}
4185
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; goto __pyx_L1;}
4169
  __pyx_r = __pyx_1;
4186
  Py_INCREF(__pyx_v_l);
4170
  __pyx_1 = 0;
4187
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_l);
4188
  __pyx_2 = PyObject_Call(__pyx_1, __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; goto __pyx_L1;}
4189
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4190
  Py_DECREF(__pyx_3); __pyx_3 = 0;
4191
  __pyx_r = __pyx_2;
4192
  __pyx_2 = 0;
4193
  goto __pyx_L0;
4171
  goto __pyx_L0;
4194
4172
4195
  __pyx_r = Py_None; Py_INCREF(Py_None);
4173
  __pyx_r = Py_None; Py_INCREF(Py_None);
Lines 4210-4234 Link Here
4210
static void __pyx_f_4dnet_4intf___dealloc__(PyObject *__pyx_v_self) {
4188
static void __pyx_f_4dnet_4intf___dealloc__(PyObject *__pyx_v_self) {
4211
  int __pyx_1;
4189
  int __pyx_1;
4212
  Py_INCREF(__pyx_v_self);
4190
  Py_INCREF(__pyx_v_self);
4213
4214
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1057 */
4215
  __pyx_1 = (((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf != 0);
4191
  __pyx_1 = (((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf != 0);
4216
  if (__pyx_1) {
4192
  if (__pyx_1) {
4217
4218
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1058 */
4219
    intf_close(((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf);
4193
    intf_close(((struct __pyx_obj_4dnet_intf *)__pyx_v_self)->intf);
4220
    goto __pyx_L2;
4194
    goto __pyx_L2;
4221
  }
4195
  }
4222
  __pyx_L2:;
4196
  __pyx_L2:;
4223
4197
4224
  goto __pyx_L0;
4225
  __pyx_L1:;
4226
  __Pyx_AddTraceback("dnet.intf.__dealloc__");
4227
  __pyx_L0:;
4228
  Py_DECREF(__pyx_v_self);
4198
  Py_DECREF(__pyx_v_self);
4229
}
4199
}
4230
4200
4231
static int __pyx_f_4dnet___route_callback(struct route_entry (*__pyx_v_entry),void (*__pyx_v_arg)) {
4201
static int __pyx_f_4dnet___route_callback(struct route_entry *__pyx_v_entry,void *__pyx_v_arg) {
4232
  PyObject *__pyx_v_f;
4202
  PyObject *__pyx_v_f;
4233
  PyObject *__pyx_v_a;
4203
  PyObject *__pyx_v_a;
4234
  PyObject *__pyx_v_dst;
4204
  PyObject *__pyx_v_dst;
Lines 4237-4308 Link Here
4237
  int __pyx_r;
4207
  int __pyx_r;
4238
  PyObject *__pyx_1 = 0;
4208
  PyObject *__pyx_1 = 0;
4239
  PyObject *__pyx_2 = 0;
4209
  PyObject *__pyx_2 = 0;
4240
  PyObject *__pyx_3 = 0;
4210
  int __pyx_3;
4241
  int __pyx_4;
4211
  int __pyx_4;
4242
  int __pyx_5;
4243
  __pyx_v_f = Py_None; Py_INCREF(Py_None);
4212
  __pyx_v_f = Py_None; Py_INCREF(Py_None);
4244
  __pyx_v_a = Py_None; Py_INCREF(Py_None);
4213
  __pyx_v_a = Py_None; Py_INCREF(Py_None);
4245
  __pyx_v_dst = Py_None; Py_INCREF(Py_None);
4214
  __pyx_v_dst = Py_None; Py_INCREF(Py_None);
4246
  __pyx_v_gw = Py_None; Py_INCREF(Py_None);
4215
  __pyx_v_gw = Py_None; Py_INCREF(Py_None);
4247
  __pyx_v_ret = Py_None; Py_INCREF(Py_None);
4216
  __pyx_v_ret = Py_None; Py_INCREF(Py_None);
4248
4217
4249
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1079 */
4218
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1079 */
4250
  __pyx_1 = (PyObject *)__pyx_v_arg;
4219
  __pyx_1 = PyObject_GetIter(((PyObject *)__pyx_v_arg)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; goto __pyx_L1;}
4251
  Py_INCREF(__pyx_1);
4220
  __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; goto __pyx_L1;}
4252
  __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; goto __pyx_L1;}
4253
  Py_DECREF(__pyx_v_f);
4221
  Py_DECREF(__pyx_v_f);
4254
  __pyx_v_f = __pyx_2;
4222
  __pyx_v_f = __pyx_2;
4255
  __pyx_2 = 0;
4223
  __pyx_2 = 0;
4256
  __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; goto __pyx_L1;}
4224
  __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; goto __pyx_L1;}
4257
  Py_DECREF(__pyx_v_a);
4225
  Py_DECREF(__pyx_v_a);
4258
  __pyx_v_a = __pyx_3;
4226
  __pyx_v_a = __pyx_2;
4259
  __pyx_3 = 0;
4227
  __pyx_2 = 0;
4260
  if (__Pyx_EndUnpack(__pyx_1, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; goto __pyx_L1;}
4228
  if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; goto __pyx_L1;}
4261
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4229
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4262
4230
4263
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1080 */
4231
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1080 */
4264
  __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; goto __pyx_L1;}
4232
  __pyx_2 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; goto __pyx_L1;}
4265
  __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;}
4233
  __pyx_1 = PyObject_CallObject(((PyObject *)__pyx_ptype_4dnet_addr), 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; goto __pyx_L1;}
4266
  Py_DECREF(__pyx_2); __pyx_2 = 0;
4267
  __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; goto __pyx_L1;}
4268
  __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;}
4269
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4270
  Py_DECREF(__pyx_v_dst);
4234
  Py_DECREF(__pyx_v_dst);
4271
  __pyx_v_dst = __pyx_3;
4235
  __pyx_v_dst = __pyx_2;
4272
  __pyx_3 = 0;
4273
  Py_DECREF(__pyx_v_gw);
4274
  __pyx_v_gw = __pyx_2;
4275
  __pyx_2 = 0;
4236
  __pyx_2 = 0;
4237
  Py_DECREF(__pyx_v_gw);
4238
  __pyx_v_gw = __pyx_1;
4239
  __pyx_1 = 0;
4276
4240
4277
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1081 */
4241
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1081 */
4278
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_dst)->_addr = __pyx_v_entry->route_dst;
4242
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_dst)->_addr = __pyx_v_entry->route_dst;
4279
4243
4280
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1082 */
4244
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1082 */
4281
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_gw)->_addr = __pyx_v_entry->route_gw;
4245
  ((struct __pyx_obj_4dnet_addr *)__pyx_v_gw)->_addr = __pyx_v_entry->route_gw;
4282
4246
4283
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1083 */
4247
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1083 */
4284
  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; goto __pyx_L1;}
4248
  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; goto __pyx_L1;}
4285
  Py_INCREF(__pyx_v_dst);
4249
  Py_INCREF(__pyx_v_dst);
4286
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_dst);
4250
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_dst);
4287
  Py_INCREF(__pyx_v_gw);
4251
  Py_INCREF(__pyx_v_gw);
4288
  PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_gw);
4252
  PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_gw);
4289
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; goto __pyx_L1;}
4253
  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; goto __pyx_L1;}
4290
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
4254
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2);
4291
  Py_INCREF(__pyx_v_a);
4255
  Py_INCREF(__pyx_v_a);
4292
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_a);
4256
  PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_a);
4293
  __pyx_1 = 0;
4257
  __pyx_2 = 0;
4294
  __pyx_2 = PyObject_Call(__pyx_v_f, __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; goto __pyx_L1;}
4258
  __pyx_2 = PyObject_CallObject(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; goto __pyx_L1;}
4295
  Py_DECREF(__pyx_3); __pyx_3 = 0;
4259
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4296
  Py_DECREF(__pyx_v_ret);
4260
  Py_DECREF(__pyx_v_ret);
4297
  __pyx_v_ret = __pyx_2;
4261
  __pyx_v_ret = __pyx_2;
4298
  __pyx_2 = 0;
4262
  __pyx_2 = 0;
4299
4263
4300
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1084 */
4264
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1084 */
4301
  __pyx_4 = PyObject_IsTrue(__pyx_v_ret); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; goto __pyx_L1;}
4265
  __pyx_3 = PyObject_IsTrue(__pyx_v_ret); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; goto __pyx_L1;}
4302
  __pyx_5 = (!__pyx_4);
4266
  __pyx_4 = (!__pyx_3);
4303
  if (__pyx_5) {
4267
  if (__pyx_4) {
4304
4305
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1085 */
4306
    __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; goto __pyx_L1;}
4268
    __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; goto __pyx_L1;}
4307
    Py_DECREF(__pyx_v_ret);
4269
    Py_DECREF(__pyx_v_ret);
4308
    __pyx_v_ret = __pyx_1;
4270
    __pyx_v_ret = __pyx_1;
Lines 4311-4319 Link Here
4311
  }
4273
  }
4312
  __pyx_L2:;
4274
  __pyx_L2:;
4313
4275
4314
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1086 */
4276
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1086 */
4315
  __pyx_4 = PyInt_AsLong(__pyx_v_ret); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; goto __pyx_L1;}
4277
  __pyx_3 = PyInt_AsLong(__pyx_v_ret); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; goto __pyx_L1;}
4316
  __pyx_r = __pyx_4;
4278
  __pyx_r = __pyx_3;
4317
  goto __pyx_L0;
4279
  goto __pyx_L0;
4318
4280
4319
  __pyx_r = 0;
4281
  __pyx_r = 0;
Lines 4321-4329 Link Here
4321
  __pyx_L1:;
4283
  __pyx_L1:;
4322
  Py_XDECREF(__pyx_1);
4284
  Py_XDECREF(__pyx_1);
4323
  Py_XDECREF(__pyx_2);
4285
  Py_XDECREF(__pyx_2);
4324
  Py_XDECREF(__pyx_3);
4325
  __Pyx_AddTraceback("dnet.__route_callback");
4286
  __Pyx_AddTraceback("dnet.__route_callback");
4326
  __pyx_r = -1;
4287
  __pyx_r = (-1);
4327
  __pyx_L0:;
4288
  __pyx_L0:;
4328
  Py_DECREF(__pyx_v_f);
4289
  Py_DECREF(__pyx_v_f);
4329
  Py_DECREF(__pyx_v_a);
4290
  Py_DECREF(__pyx_v_a);
Lines 4338-4361 Link Here
4338
  int __pyx_r;
4299
  int __pyx_r;
4339
  int __pyx_1;
4300
  int __pyx_1;
4340
  PyObject *__pyx_2 = 0;
4301
  PyObject *__pyx_2 = 0;
4341
  PyObject *__pyx_3 = 0;
4342
  static char *__pyx_argnames[] = {0};
4302
  static char *__pyx_argnames[] = {0};
4343
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1;
4303
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1;
4344
  Py_INCREF(__pyx_v_self);
4304
  Py_INCREF(__pyx_v_self);
4345
4305
4346
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1096 */
4306
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1096 */
4347
  ((struct __pyx_obj_4dnet_route *)__pyx_v_self)->route = route_open();
4307
  ((struct __pyx_obj_4dnet_route *)__pyx_v_self)->route = route_open();
4348
4308
4349
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1097 */
4309
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1097 */
4350
  __pyx_1 = (!(((struct __pyx_obj_4dnet_route *)__pyx_v_self)->route != 0));
4310
  __pyx_1 = (!(((struct __pyx_obj_4dnet_route *)__pyx_v_self)->route != 0));
4351
  if (__pyx_1) {
4311
  if (__pyx_1) {
4352
4312
    __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; goto __pyx_L1;}
4353
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1098 */
4313
    __Pyx_Raise(PyExc_OSError, __pyx_2, 0);
4354
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; goto __pyx_L1;}
4355
    __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; goto __pyx_L1;}
4356
    __Pyx_Raise(__pyx_2, __pyx_3, 0);
4357
    Py_DECREF(__pyx_2); __pyx_2 = 0;
4314
    Py_DECREF(__pyx_2); __pyx_2 = 0;
4358
    Py_DECREF(__pyx_3); __pyx_3 = 0;
4359
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; goto __pyx_L1;}
4315
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; goto __pyx_L1;}
4360
    goto __pyx_L2;
4316
    goto __pyx_L2;
4361
  }
4317
  }
Lines 4365-4371 Link Here
4365
  goto __pyx_L0;
4321
  goto __pyx_L0;
4366
  __pyx_L1:;
4322
  __pyx_L1:;
4367
  Py_XDECREF(__pyx_2);
4323
  Py_XDECREF(__pyx_2);
4368
  Py_XDECREF(__pyx_3);
4369
  __Pyx_AddTraceback("dnet.route.__init__");
4324
  __Pyx_AddTraceback("dnet.route.__init__");
4370
  __pyx_r = -1;
4325
  __pyx_r = -1;
4371
  __pyx_L0:;
4326
  __pyx_L0:;
Lines 4382-4388 Link Here
4382
  PyObject *__pyx_r;
4337
  PyObject *__pyx_r;
4383
  int __pyx_1;
4338
  int __pyx_1;
4384
  PyObject *__pyx_2 = 0;
4339
  PyObject *__pyx_2 = 0;
4385
  PyObject *__pyx_3 = 0;
4386
  static char *__pyx_argnames[] = {"dst","gw",0};
4340
  static char *__pyx_argnames[] = {"dst","gw",0};
4387
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_dst, &__pyx_v_gw)) return 0;
4341
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_dst, &__pyx_v_gw)) return 0;
4388
  Py_INCREF(__pyx_v_self);
4342
  Py_INCREF(__pyx_v_self);
Lines 4391-4412 Link Here
4391
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dst), __pyx_ptype_4dnet_addr, 1, "dst")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; goto __pyx_L1;}
4345
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dst), __pyx_ptype_4dnet_addr, 1, "dst")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; goto __pyx_L1;}
4392
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gw), __pyx_ptype_4dnet_addr, 1, "gw")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; goto __pyx_L1;}
4346
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gw), __pyx_ptype_4dnet_addr, 1, "gw")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; goto __pyx_L1;}
4393
4347
4394
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1108 */
4348
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1108 */
4395
  __pyx_v_entry.route_dst = __pyx_v_dst->_addr;
4349
  __pyx_v_entry.route_dst = __pyx_v_dst->_addr;
4396
4350
4397
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1109 */
4351
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1109 */
4398
  __pyx_v_entry.route_gw = __pyx_v_gw->_addr;
4352
  __pyx_v_entry.route_gw = __pyx_v_gw->_addr;
4399
4353
4400
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1110 */
4354
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1110 */
4401
  __pyx_1 = (route_add(((struct __pyx_obj_4dnet_route *)__pyx_v_self)->route,(&__pyx_v_entry)) < 0);
4355
  __pyx_1 = (route_add(((struct __pyx_obj_4dnet_route *)__pyx_v_self)->route,(&__pyx_v_entry)) < 0);
4402
  if (__pyx_1) {
4356
  if (__pyx_1) {
4403
4357
    __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1111; goto __pyx_L1;}
4404
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1111 */
4358
    __Pyx_Raise(PyExc_OSError, __pyx_2, 0);
4405
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1111; goto __pyx_L1;}
4406
    __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1111; goto __pyx_L1;}
4407
    __Pyx_Raise(__pyx_2, __pyx_3, 0);
4408
    Py_DECREF(__pyx_2); __pyx_2 = 0;
4359
    Py_DECREF(__pyx_2); __pyx_2 = 0;
4409
    Py_DECREF(__pyx_3); __pyx_3 = 0;
4410
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1111; goto __pyx_L1;}
4360
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1111; goto __pyx_L1;}
4411
    goto __pyx_L2;
4361
    goto __pyx_L2;
4412
  }
4362
  }
Lines 4416-4422 Link Here
4416
  goto __pyx_L0;
4366
  goto __pyx_L0;
4417
  __pyx_L1:;
4367
  __pyx_L1:;
4418
  Py_XDECREF(__pyx_2);
4368
  Py_XDECREF(__pyx_2);
4419
  Py_XDECREF(__pyx_3);
4420
  __Pyx_AddTraceback("dnet.route.add");
4369
  __Pyx_AddTraceback("dnet.route.add");
4421
  __pyx_r = 0;
4370
  __pyx_r = 0;
4422
  __pyx_L0:;
4371
  __pyx_L0:;
Lines 4434-4459 Link Here
4434
  PyObject *__pyx_r;
4383
  PyObject *__pyx_r;
4435
  int __pyx_1;
4384
  int __pyx_1;
4436
  PyObject *__pyx_2 = 0;
4385
  PyObject *__pyx_2 = 0;
4437
  PyObject *__pyx_3 = 0;
4438
  static char *__pyx_argnames[] = {"dst",0};
4386
  static char *__pyx_argnames[] = {"dst",0};
4439
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_dst)) return 0;
4387
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_dst)) return 0;
4440
  Py_INCREF(__pyx_v_self);
4388
  Py_INCREF(__pyx_v_self);
4441
  Py_INCREF(__pyx_v_dst);
4389
  Py_INCREF(__pyx_v_dst);
4442
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dst), __pyx_ptype_4dnet_addr, 1, "dst")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; goto __pyx_L1;}
4390
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dst), __pyx_ptype_4dnet_addr, 1, "dst")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; goto __pyx_L1;}
4443
4391
4444
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1120 */
4392
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1120 */
4445
  __pyx_v_entry.route_dst = __pyx_v_dst->_addr;
4393
  __pyx_v_entry.route_dst = __pyx_v_dst->_addr;
4446
4394
4447
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1121 */
4395
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1121 */
4448
  __pyx_1 = (route_delete(((struct __pyx_obj_4dnet_route *)__pyx_v_self)->route,(&__pyx_v_entry)) < 0);
4396
  __pyx_1 = (route_delete(((struct __pyx_obj_4dnet_route *)__pyx_v_self)->route,(&__pyx_v_entry)) < 0);
4449
  if (__pyx_1) {
4397
  if (__pyx_1) {
4450
4398
    __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; goto __pyx_L1;}
4451
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1122 */
4399
    __Pyx_Raise(PyExc_OSError, __pyx_2, 0);
4452
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; goto __pyx_L1;}
4453
    __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; goto __pyx_L1;}
4454
    __Pyx_Raise(__pyx_2, __pyx_3, 0);
4455
    Py_DECREF(__pyx_2); __pyx_2 = 0;
4400
    Py_DECREF(__pyx_2); __pyx_2 = 0;
4456
    Py_DECREF(__pyx_3); __pyx_3 = 0;
4457
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; goto __pyx_L1;}
4401
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; goto __pyx_L1;}
4458
    goto __pyx_L2;
4402
    goto __pyx_L2;
4459
  }
4403
  }
Lines 4463-4469 Link Here
4463
  goto __pyx_L0;
4407
  goto __pyx_L0;
4464
  __pyx_L1:;
4408
  __pyx_L1:;
4465
  Py_XDECREF(__pyx_2);
4409
  Py_XDECREF(__pyx_2);
4466
  Py_XDECREF(__pyx_3);
4467
  __Pyx_AddTraceback("dnet.route.delete");
4410
  __Pyx_AddTraceback("dnet.route.delete");
4468
  __pyx_r = 0;
4411
  __pyx_r = 0;
4469
  __pyx_L0:;
4412
  __pyx_L0:;
Lines 4487-4505 Link Here
4487
  Py_INCREF(__pyx_v_dst);
4430
  Py_INCREF(__pyx_v_dst);
4488
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dst), __pyx_ptype_4dnet_addr, 1, "dst")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; goto __pyx_L1;}
4431
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dst), __pyx_ptype_4dnet_addr, 1, "dst")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; goto __pyx_L1;}
4489
4432
4490
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1132 */
4433
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1132 */
4491
  __pyx_v_entry.route_dst = __pyx_v_dst->_addr;
4434
  __pyx_v_entry.route_dst = __pyx_v_dst->_addr;
4492
4435
4493
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1133 */
4436
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1133 */
4494
  __pyx_1 = (route_get(((struct __pyx_obj_4dnet_route *)__pyx_v_self)->route,(&__pyx_v_entry)) == 0);
4437
  __pyx_1 = (route_get(((struct __pyx_obj_4dnet_route *)__pyx_v_self)->route,(&__pyx_v_entry)) == 0);
4495
  if (__pyx_1) {
4438
  if (__pyx_1) {
4496
4497
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1134 */
4498
    __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;}
4439
    __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;}
4499
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;}
4440
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;}
4500
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
4441
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
4501
    __pyx_2 = 0;
4442
    __pyx_2 = 0;
4502
    __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;}
4443
    __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;}
4503
    Py_DECREF(__pyx_3); __pyx_3 = 0;
4444
    Py_DECREF(__pyx_3); __pyx_3 = 0;
4504
    __pyx_r = __pyx_2;
4445
    __pyx_r = __pyx_2;
4505
    __pyx_2 = 0;
4446
    __pyx_2 = 0;
Lines 4508-4514 Link Here
4508
  }
4449
  }
4509
  __pyx_L2:;
4450
  __pyx_L2:;
4510
4451
4511
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1135 */
4452
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1135 */
4512
  Py_INCREF(Py_None);
4453
  Py_INCREF(Py_None);
4513
  __pyx_r = Py_None;
4454
  __pyx_r = Py_None;
4514
  goto __pyx_L0;
4455
  goto __pyx_L0;
Lines 4535-4548 Link Here
4535
  PyObject *__pyx_r;
4476
  PyObject *__pyx_r;
4536
  PyObject *__pyx_1 = 0;
4477
  PyObject *__pyx_1 = 0;
4537
  static char *__pyx_argnames[] = {"callback","arg",0};
4478
  static char *__pyx_argnames[] = {"callback","arg",0};
4538
  __pyx_v_arg = __pyx_k56;
4479
  __pyx_v_arg = __pyx_d34;
4539
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_callback, &__pyx_v_arg)) return 0;
4480
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_callback, &__pyx_v_arg)) return 0;
4540
  Py_INCREF(__pyx_v_self);
4481
  Py_INCREF(__pyx_v_self);
4541
  Py_INCREF(__pyx_v_callback);
4482
  Py_INCREF(__pyx_v_callback);
4542
  Py_INCREF(__pyx_v_arg);
4483
  Py_INCREF(__pyx_v_arg);
4543
  __pyx_v__arg = Py_None; Py_INCREF(Py_None);
4484
  __pyx_v__arg = Py_None; Py_INCREF(Py_None);
4544
4485
4545
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1147 */
4486
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1147 */
4546
  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; goto __pyx_L1;}
4487
  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; goto __pyx_L1;}
4547
  Py_INCREF(__pyx_v_callback);
4488
  Py_INCREF(__pyx_v_callback);
4548
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_callback);
4489
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_callback);
Lines 4552-4559 Link Here
4552
  __pyx_v__arg = __pyx_1;
4493
  __pyx_v__arg = __pyx_1;
4553
  __pyx_1 = 0;
4494
  __pyx_1 = 0;
4554
4495
4555
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1148 */
4496
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1148 */
4556
  __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;}
4497
  __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;}
4557
  __pyx_r = __pyx_1;
4498
  __pyx_r = __pyx_1;
4558
  __pyx_1 = 0;
4499
  __pyx_1 = 0;
4559
  goto __pyx_L0;
4500
  goto __pyx_L0;
Lines 4582-4594 Link Here
4582
  Py_INCREF(__pyx_v_self);
4523
  Py_INCREF(__pyx_v_self);
4583
  __pyx_v_l = Py_None; Py_INCREF(Py_None);
4524
  __pyx_v_l = Py_None; Py_INCREF(Py_None);
4584
4525
4585
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1151 */
4526
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1151 */
4586
  __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; goto __pyx_L1;}
4527
  __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; goto __pyx_L1;}
4587
  Py_DECREF(__pyx_v_l);
4528
  Py_DECREF(__pyx_v_l);
4588
  __pyx_v_l = __pyx_1;
4529
  __pyx_v_l = __pyx_1;
4589
  __pyx_1 = 0;
4530
  __pyx_1 = 0;
4590
4531
4591
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1152 */
4532
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1152 */
4592
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_loop); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; goto __pyx_L1;}
4533
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_loop); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; goto __pyx_L1;}
4593
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n___iter_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; goto __pyx_L1;}
4534
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n___iter_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; goto __pyx_L1;}
4594
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; goto __pyx_L1;}
4535
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; goto __pyx_L1;}
Lines 4596-4616 Link Here
4596
  Py_INCREF(__pyx_v_l);
4537
  Py_INCREF(__pyx_v_l);
4597
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_l);
4538
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_l);
4598
  __pyx_2 = 0;
4539
  __pyx_2 = 0;
4599
  __pyx_2 = PyObject_Call(__pyx_1, __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; goto __pyx_L1;}
4540
  __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; goto __pyx_L1;}
4600
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4601
  Py_DECREF(__pyx_3); __pyx_3 = 0;
4602
  Py_DECREF(__pyx_2); __pyx_2 = 0;
4603
4604
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1153 */
4605
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_iter); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; goto __pyx_L1;}
4606
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; goto __pyx_L1;}
4607
  Py_INCREF(__pyx_v_l);
4608
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_l);
4609
  __pyx_2 = PyObject_Call(__pyx_1, __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; goto __pyx_L1;}
4610
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4541
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4611
  Py_DECREF(__pyx_3); __pyx_3 = 0;
4542
  Py_DECREF(__pyx_3); __pyx_3 = 0;
4612
  __pyx_r = __pyx_2;
4543
  Py_DECREF(__pyx_2); __pyx_2 = 0;
4613
  __pyx_2 = 0;
4544
4545
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1153 */
4546
  __pyx_1 = PyObject_GetIter(__pyx_v_l); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; goto __pyx_L1;}
4547
  __pyx_r = __pyx_1;
4548
  __pyx_1 = 0;
4614
  goto __pyx_L0;
4549
  goto __pyx_L0;
4615
4550
4616
  __pyx_r = Py_None; Py_INCREF(Py_None);
4551
  __pyx_r = Py_None; Py_INCREF(Py_None);
Lines 4631-4665 Link Here
4631
static void __pyx_f_4dnet_5route___dealloc__(PyObject *__pyx_v_self) {
4566
static void __pyx_f_4dnet_5route___dealloc__(PyObject *__pyx_v_self) {
4632
  int __pyx_1;
4567
  int __pyx_1;
4633
  Py_INCREF(__pyx_v_self);
4568
  Py_INCREF(__pyx_v_self);
4634
4635
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1156 */
4636
  __pyx_1 = (((struct __pyx_obj_4dnet_route *)__pyx_v_self)->route != 0);
4569
  __pyx_1 = (((struct __pyx_obj_4dnet_route *)__pyx_v_self)->route != 0);
4637
  if (__pyx_1) {
4570
  if (__pyx_1) {
4638
4639
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1157 */
4640
    route_close(((struct __pyx_obj_4dnet_route *)__pyx_v_self)->route);
4571
    route_close(((struct __pyx_obj_4dnet_route *)__pyx_v_self)->route);
4641
    goto __pyx_L2;
4572
    goto __pyx_L2;
4642
  }
4573
  }
4643
  __pyx_L2:;
4574
  __pyx_L2:;
4644
4575
4645
  goto __pyx_L0;
4646
  __pyx_L1:;
4647
  __Pyx_AddTraceback("dnet.route.__dealloc__");
4648
  __pyx_L0:;
4649
  Py_DECREF(__pyx_v_self);
4576
  Py_DECREF(__pyx_v_self);
4650
}
4577
}
4651
4578
4652
static PyObject *__pyx_n_device;
4579
static PyObject *__pyx_f_4dnet_rule_to_dict(struct fw_rule *__pyx_v_rule) {
4653
static PyObject *__pyx_n_op;
4654
static PyObject *__pyx_n_dir;
4655
static PyObject *__pyx_n_proto;
4656
static PyObject *__pyx_n_src;
4657
static PyObject *__pyx_n_dst;
4658
static PyObject *__pyx_n_sport;
4659
static PyObject *__pyx_n_dport;
4660
4661
4662
static PyObject *__pyx_f_4dnet_rule_to_dict(struct fw_rule (*__pyx_v_rule)) {
4663
  PyObject *__pyx_v_d;
4580
  PyObject *__pyx_v_d;
4664
  PyObject *__pyx_r;
4581
  PyObject *__pyx_r;
4665
  PyObject *__pyx_1 = 0;
4582
  PyObject *__pyx_1 = 0;
Lines 4669-4700 Link Here
4669
  PyObject *__pyx_5 = 0;
4586
  PyObject *__pyx_5 = 0;
4670
  __pyx_v_d = Py_None; Py_INCREF(Py_None);
4587
  __pyx_v_d = Py_None; Py_INCREF(Py_None);
4671
4588
4672
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1190 */
4589
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1190 */
4673
  __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; goto __pyx_L1;}
4590
  __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; goto __pyx_L1;}
4674
  Py_DECREF(__pyx_v_d);
4591
  Py_DECREF(__pyx_v_d);
4675
  __pyx_v_d = __pyx_1;
4592
  __pyx_v_d = __pyx_1;
4676
  __pyx_1 = 0;
4593
  __pyx_1 = 0;
4677
4594
4678
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1191 */
4595
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1191 */
4679
  __pyx_1 = PyString_FromString(__pyx_v_rule->fw_device); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; goto __pyx_L1;}
4596
  __pyx_1 = PyString_FromString(__pyx_v_rule->fw_device); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; goto __pyx_L1;}
4680
  if (PyObject_SetItem(__pyx_v_d, __pyx_n_device, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; goto __pyx_L1;}
4597
  if (PyObject_SetItem(__pyx_v_d, __pyx_n_device, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; goto __pyx_L1;}
4681
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4598
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4682
4599
4683
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1192 */
4600
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1192 */
4684
  __pyx_1 = PyInt_FromLong(__pyx_v_rule->fw_op); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; goto __pyx_L1;}
4601
  __pyx_1 = PyInt_FromLong(__pyx_v_rule->fw_op); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; goto __pyx_L1;}
4685
  if (PyObject_SetItem(__pyx_v_d, __pyx_n_op, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; goto __pyx_L1;}
4602
  if (PyObject_SetItem(__pyx_v_d, __pyx_n_op, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; goto __pyx_L1;}
4686
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4603
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4687
4604
4688
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1193 */
4605
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1193 */
4689
  __pyx_1 = PyInt_FromLong(__pyx_v_rule->fw_dir); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; goto __pyx_L1;}
4606
  __pyx_1 = PyInt_FromLong(__pyx_v_rule->fw_dir); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; goto __pyx_L1;}
4690
  if (PyObject_SetItem(__pyx_v_d, __pyx_n_dir, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; goto __pyx_L1;}
4607
  if (PyObject_SetItem(__pyx_v_d, __pyx_n_dir, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; goto __pyx_L1;}
4691
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4608
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4692
4609
4693
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1194 */
4610
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1194 */
4694
  __pyx_2 = (__pyx_v_rule->fw_proto != 0);
4611
  __pyx_2 = (__pyx_v_rule->fw_proto != 0);
4695
  if (__pyx_2) {
4612
  if (__pyx_2) {
4696
4697
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1195 */
4698
    __pyx_1 = PyInt_FromLong(__pyx_v_rule->fw_proto); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; goto __pyx_L1;}
4613
    __pyx_1 = PyInt_FromLong(__pyx_v_rule->fw_proto); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; goto __pyx_L1;}
4699
    if (PyObject_SetItem(__pyx_v_d, __pyx_n_proto, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; goto __pyx_L1;}
4614
    if (PyObject_SetItem(__pyx_v_d, __pyx_n_proto, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; goto __pyx_L1;}
4700
    Py_DECREF(__pyx_1); __pyx_1 = 0;
4615
    Py_DECREF(__pyx_1); __pyx_1 = 0;
Lines 4702-4708 Link Here
4702
  }
4617
  }
4703
  __pyx_L2:;
4618
  __pyx_L2:;
4704
4619
4705
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1196 */
4620
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1196 */
4706
  __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;}
4621
  __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;}
4707
  __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;}
4622
  __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;}
4708
  if (PyObject_Cmp(__pyx_1, __pyx_3, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; goto __pyx_L1;}
4623
  if (PyObject_Cmp(__pyx_1, __pyx_3, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; goto __pyx_L1;}
Lines 4710-4722 Link Here
4710
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4625
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4711
  Py_DECREF(__pyx_3); __pyx_3 = 0;
4626
  Py_DECREF(__pyx_3); __pyx_3 = 0;
4712
  if (__pyx_2) {
4627
  if (__pyx_2) {
4713
4714
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1197 */
4715
    __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;}
4628
    __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;}
4716
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; goto __pyx_L1;}
4629
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; goto __pyx_L1;}
4717
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
4630
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
4718
    __pyx_1 = 0;
4631
    __pyx_1 = 0;
4719
    __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;}
4632
    __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;}
4720
    Py_DECREF(__pyx_3); __pyx_3 = 0;
4633
    Py_DECREF(__pyx_3); __pyx_3 = 0;
4721
    if (PyObject_SetItem(__pyx_v_d, __pyx_n_src, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; goto __pyx_L1;}
4634
    if (PyObject_SetItem(__pyx_v_d, __pyx_n_src, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; goto __pyx_L1;}
4722
    Py_DECREF(__pyx_1); __pyx_1 = 0;
4635
    Py_DECREF(__pyx_1); __pyx_1 = 0;
Lines 4724-4730 Link Here
4724
  }
4637
  }
4725
  __pyx_L3:;
4638
  __pyx_L3:;
4726
4639
4727
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1198 */
4640
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1198 */
4728
  __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;}
4641
  __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;}
4729
  __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;}
4642
  __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;}
4730
  if (PyObject_Cmp(__pyx_3, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1198; goto __pyx_L1;}
4643
  if (PyObject_Cmp(__pyx_3, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1198; goto __pyx_L1;}
Lines 4732-4744 Link Here
4732
  Py_DECREF(__pyx_3); __pyx_3 = 0;
4645
  Py_DECREF(__pyx_3); __pyx_3 = 0;
4733
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4646
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4734
  if (__pyx_2) {
4647
  if (__pyx_2) {
4735
4736
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1199 */
4737
    __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;}
4648
    __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;}
4738
    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; goto __pyx_L1;}
4649
    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; goto __pyx_L1;}
4739
    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3);
4650
    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3);
4740
    __pyx_3 = 0;
4651
    __pyx_3 = 0;
4741
    __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;}
4652
    __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;}
4742
    Py_DECREF(__pyx_1); __pyx_1 = 0;
4653
    Py_DECREF(__pyx_1); __pyx_1 = 0;
4743
    if (PyObject_SetItem(__pyx_v_d, __pyx_n_dst, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; goto __pyx_L1;}
4654
    if (PyObject_SetItem(__pyx_v_d, __pyx_n_dst, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; goto __pyx_L1;}
4744
    Py_DECREF(__pyx_3); __pyx_3 = 0;
4655
    Py_DECREF(__pyx_3); __pyx_3 = 0;
Lines 4746-4760 Link Here
4746
  }
4657
  }
4747
  __pyx_L4:;
4658
  __pyx_L4:;
4748
4659
4749
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1200 */
4660
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1200 */
4750
  __pyx_2 = ((__pyx_v_rule->fw_sport[0]) == 0);
4661
  __pyx_2 = ((__pyx_v_rule->fw_sport[0]) == 0);
4751
  if (__pyx_2) {
4662
  if (__pyx_2) {
4752
    __pyx_2 = ((__pyx_v_rule->fw_sport[1]) == 0);
4663
    __pyx_2 = ((__pyx_v_rule->fw_sport[1]) == 0);
4753
  }
4664
  }
4754
  __pyx_4 = (!__pyx_2);
4665
  __pyx_4 = (!__pyx_2);
4755
  if (__pyx_4) {
4666
  if (__pyx_4) {
4756
4757
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1201 */
4758
    __pyx_1 = PyInt_FromLong((__pyx_v_rule->fw_sport[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; goto __pyx_L1;}
4667
    __pyx_1 = PyInt_FromLong((__pyx_v_rule->fw_sport[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; goto __pyx_L1;}
4759
    __pyx_3 = PyInt_FromLong((__pyx_v_rule->fw_sport[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; goto __pyx_L1;}
4668
    __pyx_3 = PyInt_FromLong((__pyx_v_rule->fw_sport[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; goto __pyx_L1;}
4760
    __pyx_5 = PyList_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; goto __pyx_L1;}
4669
    __pyx_5 = PyList_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; goto __pyx_L1;}
Lines 4768-4782 Link Here
4768
  }
4677
  }
4769
  __pyx_L5:;
4678
  __pyx_L5:;
4770
4679
4771
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1202 */
4680
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1202 */
4772
  __pyx_2 = ((__pyx_v_rule->fw_dport[0]) == 0);
4681
  __pyx_2 = ((__pyx_v_rule->fw_dport[0]) == 0);
4773
  if (__pyx_2) {
4682
  if (__pyx_2) {
4774
    __pyx_2 = ((__pyx_v_rule->fw_dport[1]) == 0);
4683
    __pyx_2 = ((__pyx_v_rule->fw_dport[1]) == 0);
4775
  }
4684
  }
4776
  __pyx_4 = (!__pyx_2);
4685
  __pyx_4 = (!__pyx_2);
4777
  if (__pyx_4) {
4686
  if (__pyx_4) {
4778
4779
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1203 */
4780
    __pyx_1 = PyInt_FromLong((__pyx_v_rule->fw_dport[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; goto __pyx_L1;}
4687
    __pyx_1 = PyInt_FromLong((__pyx_v_rule->fw_dport[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; goto __pyx_L1;}
4781
    __pyx_3 = PyInt_FromLong((__pyx_v_rule->fw_dport[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; goto __pyx_L1;}
4688
    __pyx_3 = PyInt_FromLong((__pyx_v_rule->fw_dport[1])); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; goto __pyx_L1;}
4782
    __pyx_5 = PyList_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; goto __pyx_L1;}
4689
    __pyx_5 = PyList_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; goto __pyx_L1;}
Lines 4790-4796 Link Here
4790
  }
4697
  }
4791
  __pyx_L6:;
4698
  __pyx_L6:;
4792
4699
4793
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1204 */
4700
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1204 */
4794
  Py_INCREF(__pyx_v_d);
4701
  Py_INCREF(__pyx_v_d);
4795
  __pyx_r = __pyx_v_d;
4702
  __pyx_r = __pyx_v_d;
4796
  goto __pyx_L0;
4703
  goto __pyx_L0;
Lines 4808-4858 Link Here
4808
  return __pyx_r;
4715
  return __pyx_r;
4809
}
4716
}
4810
4717
4811
4718
static PyObject *__pyx_f_4dnet_dict_to_rule(PyObject *__pyx_v_d,struct fw_rule *__pyx_v_rule) {
4812
static PyObject *__pyx_f_4dnet_dict_to_rule(PyObject *__pyx_v_d,struct fw_rule (*__pyx_v_rule)) {
4813
  PyObject *__pyx_v_s;
4719
  PyObject *__pyx_v_s;
4814
  PyObject *__pyx_r;
4720
  PyObject *__pyx_r;
4815
  PyObject *__pyx_1 = 0;
4721
  PyObject *__pyx_1 = 0;
4816
  char (*__pyx_2);
4722
  char *__pyx_2;
4817
  int __pyx_3;
4723
  int __pyx_3;
4818
  PyObject *__pyx_4 = 0;
4724
  PyObject *__pyx_4 = 0;
4819
  PyObject *__pyx_5 = 0;
4725
  PyObject *__pyx_5 = 0;
4820
  Py_INCREF(__pyx_v_d);
4726
  Py_INCREF(__pyx_v_d);
4821
  __pyx_v_s = Py_None; Py_INCREF(Py_None);
4727
  __pyx_v_s = Py_None; Py_INCREF(Py_None);
4822
4728
4823
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1207 */
4729
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1207 */
4824
  __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_device); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; goto __pyx_L1;}
4730
  __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_device); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; goto __pyx_L1;}
4825
  Py_DECREF(__pyx_v_s);
4731
  Py_DECREF(__pyx_v_s);
4826
  __pyx_v_s = __pyx_1;
4732
  __pyx_v_s = __pyx_1;
4827
  __pyx_1 = 0;
4733
  __pyx_1 = 0;
4828
4734
4829
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1208 */
4735
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1208 */
4830
  __pyx_2 = PyString_AsString(__pyx_v_s); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; goto __pyx_L1;}
4736
  __pyx_2 = PyString_AsString(__pyx_v_s); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; goto __pyx_L1;}
4831
  strlcpy(__pyx_v_rule->fw_device,__pyx_2,16);
4737
  strlcpy(__pyx_v_rule->fw_device,__pyx_2,16);
4832
4738
4833
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1209 */
4739
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1209 */
4834
  __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_op); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; goto __pyx_L1;}
4740
  __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_op); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; goto __pyx_L1;}
4835
  __pyx_3 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; goto __pyx_L1;}
4741
  __pyx_3 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; goto __pyx_L1;}
4836
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4742
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4837
  __pyx_v_rule->fw_op = __pyx_3;
4743
  __pyx_v_rule->fw_op = __pyx_3;
4838
4744
4839
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1210 */
4745
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1210 */
4840
  __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_dir); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; goto __pyx_L1;}
4746
  __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_dir); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; goto __pyx_L1;}
4841
  __pyx_3 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; goto __pyx_L1;}
4747
  __pyx_3 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; goto __pyx_L1;}
4842
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4748
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4843
  __pyx_v_rule->fw_dir = __pyx_3;
4749
  __pyx_v_rule->fw_dir = __pyx_3;
4844
4750
4845
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1211 */
4751
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1211 */
4846
  __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;}
4752
  __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;}
4847
  if (__pyx_3) {
4753
  if (__pyx_3) {
4848
4754
4849
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1212 */
4755
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1212 */
4850
    __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_proto); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; goto __pyx_L1;}
4756
    __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_proto); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; goto __pyx_L1;}
4851
    __pyx_3 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; goto __pyx_L1;}
4757
    __pyx_3 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; goto __pyx_L1;}
4852
    Py_DECREF(__pyx_1); __pyx_1 = 0;
4758
    Py_DECREF(__pyx_1); __pyx_1 = 0;
4853
    __pyx_v_rule->fw_proto = __pyx_3;
4759
    __pyx_v_rule->fw_proto = __pyx_3;
4854
4760
4855
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1213 */
4761
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1213 */
4856
    __pyx_1 = PyInt_FromLong(__pyx_v_rule->fw_proto); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; goto __pyx_L1;}
4762
    __pyx_1 = PyInt_FromLong(__pyx_v_rule->fw_proto); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; goto __pyx_L1;}
4857
    __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;}
4763
    __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;}
4858
    if (PyObject_Cmp(__pyx_1, __pyx_4, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; goto __pyx_L1;}
4764
    if (PyObject_Cmp(__pyx_1, __pyx_4, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; goto __pyx_L1;}
Lines 4869-4878 Link Here
4869
    }
4775
    }
4870
    if (__pyx_3) {
4776
    if (__pyx_3) {
4871
4777
4872
      /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1214 */
4778
      /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1214 */
4873
      (__pyx_v_rule->fw_sport[1]) = 65535;
4779
      (__pyx_v_rule->fw_sport[1]) = 65535;
4874
4780
4875
      /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1215 */
4781
      /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1215 */
4876
      (__pyx_v_rule->fw_dport[1]) = 65535;
4782
      (__pyx_v_rule->fw_dport[1]) = 65535;
4877
      goto __pyx_L3;
4783
      goto __pyx_L3;
4878
    }
4784
    }
Lines 4881-4891 Link Here
4881
  }
4787
  }
4882
  __pyx_L2:;
4788
  __pyx_L2:;
4883
4789
4884
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1216 */
4790
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1216 */
4885
  __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;}
4791
  __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;}
4886
  if (__pyx_3) {
4792
  if (__pyx_3) {
4887
4888
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1217 */
4889
    __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_src); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; goto __pyx_L1;}
4793
    __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_src); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; goto __pyx_L1;}
4890
    __pyx_v_rule->fw_src = ((struct __pyx_obj_4dnet_addr *)__pyx_1)->_addr;
4794
    __pyx_v_rule->fw_src = ((struct __pyx_obj_4dnet_addr *)__pyx_1)->_addr;
4891
    Py_DECREF(__pyx_1); __pyx_1 = 0;
4795
    Py_DECREF(__pyx_1); __pyx_1 = 0;
Lines 4893-4903 Link Here
4893
  }
4797
  }
4894
  __pyx_L4:;
4798
  __pyx_L4:;
4895
4799
4896
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1218 */
4800
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1218 */
4897
  __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;}
4801
  __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;}
4898
  if (__pyx_3) {
4802
  if (__pyx_3) {
4899
4900
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1219 */
4901
    __pyx_4 = PyObject_GetItem(__pyx_v_d, __pyx_n_dst); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; goto __pyx_L1;}
4803
    __pyx_4 = PyObject_GetItem(__pyx_v_d, __pyx_n_dst); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; goto __pyx_L1;}
4902
    __pyx_v_rule->fw_dst = ((struct __pyx_obj_4dnet_addr *)__pyx_4)->_addr;
4804
    __pyx_v_rule->fw_dst = ((struct __pyx_obj_4dnet_addr *)__pyx_4)->_addr;
4903
    Py_DECREF(__pyx_4); __pyx_4 = 0;
4805
    Py_DECREF(__pyx_4); __pyx_4 = 0;
Lines 4905-4915 Link Here
4905
  }
4807
  }
4906
  __pyx_L5:;
4808
  __pyx_L5:;
4907
4809
4908
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1220 */
4810
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1220 */
4909
  __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;}
4811
  __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;}
4910
  if (__pyx_3) {
4812
  if (__pyx_3) {
4911
4813
4912
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1221 */
4814
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1221 */
4913
    __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_sport); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; goto __pyx_L1;}
4815
    __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_sport); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; goto __pyx_L1;}
4914
    __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; goto __pyx_L1;}
4816
    __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; goto __pyx_L1;}
4915
    __pyx_5 = PyObject_GetItem(__pyx_1, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; goto __pyx_L1;}
4817
    __pyx_5 = PyObject_GetItem(__pyx_1, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; goto __pyx_L1;}
Lines 4919-4925 Link Here
4919
    Py_DECREF(__pyx_5); __pyx_5 = 0;
4821
    Py_DECREF(__pyx_5); __pyx_5 = 0;
4920
    (__pyx_v_rule->fw_sport[0]) = __pyx_3;
4822
    (__pyx_v_rule->fw_sport[0]) = __pyx_3;
4921
4823
4922
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1222 */
4824
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1222 */
4923
    __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_sport); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; goto __pyx_L1;}
4825
    __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_sport); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; goto __pyx_L1;}
4924
    __pyx_4 = PyInt_FromLong(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; goto __pyx_L1;}
4826
    __pyx_4 = PyInt_FromLong(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; goto __pyx_L1;}
4925
    __pyx_5 = PyObject_GetItem(__pyx_1, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; goto __pyx_L1;}
4827
    __pyx_5 = PyObject_GetItem(__pyx_1, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; goto __pyx_L1;}
Lines 4932-4942 Link Here
4932
  }
4834
  }
4933
  __pyx_L6:;
4835
  __pyx_L6:;
4934
4836
4935
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1223 */
4837
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1223 */
4936
  __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;}
4838
  __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;}
4937
  if (__pyx_3) {
4839
  if (__pyx_3) {
4938
4840
4939
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1224 */
4841
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1224 */
4940
    __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_dport); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; goto __pyx_L1;}
4842
    __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_dport); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; goto __pyx_L1;}
4941
    __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; goto __pyx_L1;}
4843
    __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; goto __pyx_L1;}
4942
    __pyx_5 = PyObject_GetItem(__pyx_1, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; goto __pyx_L1;}
4844
    __pyx_5 = PyObject_GetItem(__pyx_1, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; goto __pyx_L1;}
Lines 4946-4952 Link Here
4946
    Py_DECREF(__pyx_5); __pyx_5 = 0;
4848
    Py_DECREF(__pyx_5); __pyx_5 = 0;
4947
    (__pyx_v_rule->fw_dport[0]) = __pyx_3;
4849
    (__pyx_v_rule->fw_dport[0]) = __pyx_3;
4948
4850
4949
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1225 */
4851
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1225 */
4950
    __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_dport); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; goto __pyx_L1;}
4852
    __pyx_1 = PyObject_GetItem(__pyx_v_d, __pyx_n_dport); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; goto __pyx_L1;}
4951
    __pyx_4 = PyInt_FromLong(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; goto __pyx_L1;}
4853
    __pyx_4 = PyInt_FromLong(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; goto __pyx_L1;}
4952
    __pyx_5 = PyObject_GetItem(__pyx_1, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; goto __pyx_L1;}
4854
    __pyx_5 = PyObject_GetItem(__pyx_1, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; goto __pyx_L1;}
Lines 4973-5036 Link Here
4973
  return __pyx_r;
4875
  return __pyx_r;
4974
}
4876
}
4975
4877
4976
static int __pyx_f_4dnet___fw_callback(struct fw_rule (*__pyx_v_rule),void (*__pyx_v_arg)) {
4878
static int __pyx_f_4dnet___fw_callback(struct fw_rule *__pyx_v_rule,void *__pyx_v_arg) {
4977
  PyObject *__pyx_v_f;
4879
  PyObject *__pyx_v_f;
4978
  PyObject *__pyx_v_a;
4880
  PyObject *__pyx_v_a;
4979
  PyObject *__pyx_v_ret;
4881
  PyObject *__pyx_v_ret;
4980
  int __pyx_r;
4882
  int __pyx_r;
4981
  PyObject *__pyx_1 = 0;
4883
  PyObject *__pyx_1 = 0;
4982
  PyObject *__pyx_2 = 0;
4884
  PyObject *__pyx_2 = 0;
4983
  PyObject *__pyx_3 = 0;
4885
  int __pyx_3;
4984
  int __pyx_4;
4886
  int __pyx_4;
4985
  int __pyx_5;
4986
  __pyx_v_f = Py_None; Py_INCREF(Py_None);
4887
  __pyx_v_f = Py_None; Py_INCREF(Py_None);
4987
  __pyx_v_a = Py_None; Py_INCREF(Py_None);
4888
  __pyx_v_a = Py_None; Py_INCREF(Py_None);
4988
  __pyx_v_ret = Py_None; Py_INCREF(Py_None);
4889
  __pyx_v_ret = Py_None; Py_INCREF(Py_None);
4989
4890
4990
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1228 */
4891
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1228 */
4991
  __pyx_1 = (PyObject *)__pyx_v_arg;
4892
  __pyx_1 = PyObject_GetIter(((PyObject *)__pyx_v_arg)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; goto __pyx_L1;}
4992
  Py_INCREF(__pyx_1);
4893
  __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; goto __pyx_L1;}
4993
  __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; goto __pyx_L1;}
4994
  Py_DECREF(__pyx_v_f);
4894
  Py_DECREF(__pyx_v_f);
4995
  __pyx_v_f = __pyx_2;
4895
  __pyx_v_f = __pyx_2;
4996
  __pyx_2 = 0;
4896
  __pyx_2 = 0;
4997
  __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; goto __pyx_L1;}
4897
  __pyx_2 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; goto __pyx_L1;}
4998
  Py_DECREF(__pyx_v_a);
4898
  Py_DECREF(__pyx_v_a);
4999
  __pyx_v_a = __pyx_3;
4899
  __pyx_v_a = __pyx_2;
5000
  __pyx_3 = 0;
4900
  __pyx_2 = 0;
5001
  if (__Pyx_EndUnpack(__pyx_1, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; goto __pyx_L1;}
4901
  if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; goto __pyx_L1;}
5002
  Py_DECREF(__pyx_1); __pyx_1 = 0;
4902
  Py_DECREF(__pyx_1); __pyx_1 = 0;
5003
4903
5004
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1229 */
4904
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1229 */
5005
  __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;}
4905
  __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;}
5006
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; goto __pyx_L1;}
4906
  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; goto __pyx_L1;}
5007
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
4907
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2);
5008
  Py_INCREF(__pyx_v_a);
4908
  Py_INCREF(__pyx_v_a);
5009
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_a);
4909
  PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_a);
5010
  __pyx_2 = 0;
4910
  __pyx_2 = 0;
5011
  __pyx_1 = PyObject_Call(__pyx_v_f, __pyx_3, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; goto __pyx_L1;}
4911
  __pyx_2 = PyObject_CallObject(__pyx_v_f, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; goto __pyx_L1;}
5012
  Py_DECREF(__pyx_3); __pyx_3 = 0;
4912
  Py_DECREF(__pyx_1); __pyx_1 = 0;
5013
  Py_DECREF(__pyx_v_ret);
4913
  Py_DECREF(__pyx_v_ret);
5014
  __pyx_v_ret = __pyx_1;
4914
  __pyx_v_ret = __pyx_2;
5015
  __pyx_1 = 0;
4915
  __pyx_2 = 0;
5016
5017
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1230 */
5018
  __pyx_4 = PyObject_IsTrue(__pyx_v_ret); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1230; goto __pyx_L1;}
5019
  __pyx_5 = (!__pyx_4);
5020
  if (__pyx_5) {
5021
4916
5022
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1231 */
4917
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1230 */
5023
    __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; goto __pyx_L1;}
4918
  __pyx_3 = PyObject_IsTrue(__pyx_v_ret); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1230; goto __pyx_L1;}
4919
  __pyx_4 = (!__pyx_3);
4920
  if (__pyx_4) {
4921
    __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; goto __pyx_L1;}
5024
    Py_DECREF(__pyx_v_ret);
4922
    Py_DECREF(__pyx_v_ret);
5025
    __pyx_v_ret = __pyx_2;
4923
    __pyx_v_ret = __pyx_1;
5026
    __pyx_2 = 0;
4924
    __pyx_1 = 0;
5027
    goto __pyx_L2;
4925
    goto __pyx_L2;
5028
  }
4926
  }
5029
  __pyx_L2:;
4927
  __pyx_L2:;
5030
4928
5031
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1232 */
4929
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1232 */
5032
  __pyx_4 = PyInt_AsLong(__pyx_v_ret); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; goto __pyx_L1;}
4930
  __pyx_3 = PyInt_AsLong(__pyx_v_ret); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; goto __pyx_L1;}
5033
  __pyx_r = __pyx_4;
4931
  __pyx_r = __pyx_3;
5034
  goto __pyx_L0;
4932
  goto __pyx_L0;
5035
4933
5036
  __pyx_r = 0;
4934
  __pyx_r = 0;
Lines 5038-5046 Link Here
5038
  __pyx_L1:;
4936
  __pyx_L1:;
5039
  Py_XDECREF(__pyx_1);
4937
  Py_XDECREF(__pyx_1);
5040
  Py_XDECREF(__pyx_2);
4938
  Py_XDECREF(__pyx_2);
5041
  Py_XDECREF(__pyx_3);
5042
  __Pyx_AddTraceback("dnet.__fw_callback");
4939
  __Pyx_AddTraceback("dnet.__fw_callback");
5043
  __pyx_r = -1;
4940
  __pyx_r = (-1);
5044
  __pyx_L0:;
4941
  __pyx_L0:;
5045
  Py_DECREF(__pyx_v_f);
4942
  Py_DECREF(__pyx_v_f);
5046
  Py_DECREF(__pyx_v_a);
4943
  Py_DECREF(__pyx_v_a);
Lines 5053-5076 Link Here
5053
  int __pyx_r;
4950
  int __pyx_r;
5054
  int __pyx_1;
4951
  int __pyx_1;
5055
  PyObject *__pyx_2 = 0;
4952
  PyObject *__pyx_2 = 0;
5056
  PyObject *__pyx_3 = 0;
5057
  static char *__pyx_argnames[] = {0};
4953
  static char *__pyx_argnames[] = {0};
5058
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1;
4954
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1;
5059
  Py_INCREF(__pyx_v_self);
4955
  Py_INCREF(__pyx_v_self);
5060
4956
5061
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1242 */
4957
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1242 */
5062
  ((struct __pyx_obj_4dnet_fw *)__pyx_v_self)->fw = fw_open();
4958
  ((struct __pyx_obj_4dnet_fw *)__pyx_v_self)->fw = fw_open();
5063
4959
5064
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1243 */
4960
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1243 */
5065
  __pyx_1 = (!(((struct __pyx_obj_4dnet_fw *)__pyx_v_self)->fw != 0));
4961
  __pyx_1 = (!(((struct __pyx_obj_4dnet_fw *)__pyx_v_self)->fw != 0));
5066
  if (__pyx_1) {
4962
  if (__pyx_1) {
5067
4963
    __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; goto __pyx_L1;}
5068
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1244 */
4964
    __Pyx_Raise(PyExc_OSError, __pyx_2, 0);
5069
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; goto __pyx_L1;}
5070
    __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; goto __pyx_L1;}
5071
    __Pyx_Raise(__pyx_2, __pyx_3, 0);
5072
    Py_DECREF(__pyx_2); __pyx_2 = 0;
4965
    Py_DECREF(__pyx_2); __pyx_2 = 0;
5073
    Py_DECREF(__pyx_3); __pyx_3 = 0;
5074
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; goto __pyx_L1;}
4966
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; goto __pyx_L1;}
5075
    goto __pyx_L2;
4967
    goto __pyx_L2;
5076
  }
4968
  }
Lines 5080-5086 Link Here
5080
  goto __pyx_L0;
4972
  goto __pyx_L0;
5081
  __pyx_L1:;
4973
  __pyx_L1:;
5082
  Py_XDECREF(__pyx_2);
4974
  Py_XDECREF(__pyx_2);
5083
  Py_XDECREF(__pyx_3);
5084
  __Pyx_AddTraceback("dnet.fw.__init__");
4975
  __Pyx_AddTraceback("dnet.fw.__init__");
5085
  __pyx_r = -1;
4976
  __pyx_r = -1;
5086
  __pyx_L0:;
4977
  __pyx_L0:;
Lines 5096-5124 Link Here
5096
  PyObject *__pyx_r;
4987
  PyObject *__pyx_r;
5097
  PyObject *__pyx_1 = 0;
4988
  PyObject *__pyx_1 = 0;
5098
  int __pyx_2;
4989
  int __pyx_2;
5099
  PyObject *__pyx_3 = 0;
5100
  static char *__pyx_argnames[] = {"d",0};
4990
  static char *__pyx_argnames[] = {"d",0};
5101
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_d)) return 0;
4991
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_d)) return 0;
5102
  Py_INCREF(__pyx_v_self);
4992
  Py_INCREF(__pyx_v_self);
5103
  Py_INCREF(__pyx_v_d);
4993
  Py_INCREF(__pyx_v_d);
5104
4994
5105
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1260 */
4995
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1260 */
5106
  memset(((char (*))(&__pyx_v_rule)),0,(sizeof(__pyx_v_rule)));
4996
  memset(((char *)(&__pyx_v_rule)),0,(sizeof(__pyx_v_rule)));
5107
4997
5108
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1261 */
4998
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1261 */
5109
  __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;}
4999
  __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;}
5110
  Py_DECREF(__pyx_1); __pyx_1 = 0;
5000
  Py_DECREF(__pyx_1); __pyx_1 = 0;
5111
5001
5112
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1262 */
5002
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1262 */
5113
  __pyx_2 = (fw_add(((struct __pyx_obj_4dnet_fw *)__pyx_v_self)->fw,(&__pyx_v_rule)) < 0);
5003
  __pyx_2 = (fw_add(((struct __pyx_obj_4dnet_fw *)__pyx_v_self)->fw,(&__pyx_v_rule)) < 0);
5114
  if (__pyx_2) {
5004
  if (__pyx_2) {
5115
5005
    __pyx_1 = __pyx_f_4dnet___oserror(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; goto __pyx_L1;}
5116
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1263 */
5006
    __Pyx_Raise(PyExc_OSError, __pyx_1, 0);
5117
    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; goto __pyx_L1;}
5118
    __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; goto __pyx_L1;}
5119
    __Pyx_Raise(__pyx_1, __pyx_3, 0);
5120
    Py_DECREF(__pyx_1); __pyx_1 = 0;
5007
    Py_DECREF(__pyx_1); __pyx_1 = 0;
5121
    Py_DECREF(__pyx_3); __pyx_3 = 0;
5122
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; goto __pyx_L1;}
5008
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; goto __pyx_L1;}
5123
    goto __pyx_L2;
5009
    goto __pyx_L2;
5124
  }
5010
  }
Lines 5128-5134 Link Here
5128
  goto __pyx_L0;
5014
  goto __pyx_L0;
5129
  __pyx_L1:;
5015
  __pyx_L1:;
5130
  Py_XDECREF(__pyx_1);
5016
  Py_XDECREF(__pyx_1);
5131
  Py_XDECREF(__pyx_3);
5132
  __Pyx_AddTraceback("dnet.fw.add");
5017
  __Pyx_AddTraceback("dnet.fw.add");
5133
  __pyx_r = 0;
5018
  __pyx_r = 0;
5134
  __pyx_L0:;
5019
  __pyx_L0:;
Lines 5145-5173 Link Here
5145
  PyObject *__pyx_r;
5030
  PyObject *__pyx_r;
5146
  PyObject *__pyx_1 = 0;
5031
  PyObject *__pyx_1 = 0;
5147
  int __pyx_2;
5032
  int __pyx_2;
5148
  PyObject *__pyx_3 = 0;
5149
  static char *__pyx_argnames[] = {"d",0};
5033
  static char *__pyx_argnames[] = {"d",0};
5150
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_d)) return 0;
5034
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_d)) return 0;
5151
  Py_INCREF(__pyx_v_self);
5035
  Py_INCREF(__pyx_v_self);
5152
  Py_INCREF(__pyx_v_d);
5036
  Py_INCREF(__pyx_v_d);
5153
5037
5154
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1268 */
5038
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1268 */
5155
  memset(((char (*))(&__pyx_v_rule)),0,(sizeof(__pyx_v_rule)));
5039
  memset(((char *)(&__pyx_v_rule)),0,(sizeof(__pyx_v_rule)));
5156
5040
5157
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1269 */
5041
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1269 */
5158
  __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;}
5042
  __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;}
5159
  Py_DECREF(__pyx_1); __pyx_1 = 0;
5043
  Py_DECREF(__pyx_1); __pyx_1 = 0;
5160
5044
5161
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1270 */
5045
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1270 */
5162
  __pyx_2 = (fw_delete(((struct __pyx_obj_4dnet_fw *)__pyx_v_self)->fw,(&__pyx_v_rule)) < 0);
5046
  __pyx_2 = (fw_delete(((struct __pyx_obj_4dnet_fw *)__pyx_v_self)->fw,(&__pyx_v_rule)) < 0);
5163
  if (__pyx_2) {
5047
  if (__pyx_2) {
5164
5048
    __pyx_1 = __pyx_f_4dnet___oserror(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; goto __pyx_L1;}
5165
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1271 */
5049
    __Pyx_Raise(PyExc_OSError, __pyx_1, 0);
5166
    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; goto __pyx_L1;}
5167
    __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; goto __pyx_L1;}
5168
    __Pyx_Raise(__pyx_1, __pyx_3, 0);
5169
    Py_DECREF(__pyx_1); __pyx_1 = 0;
5050
    Py_DECREF(__pyx_1); __pyx_1 = 0;
5170
    Py_DECREF(__pyx_3); __pyx_3 = 0;
5171
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; goto __pyx_L1;}
5051
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; goto __pyx_L1;}
5172
    goto __pyx_L2;
5052
    goto __pyx_L2;
5173
  }
5053
  }
Lines 5177-5183 Link Here
5177
  goto __pyx_L0;
5057
  goto __pyx_L0;
5178
  __pyx_L1:;
5058
  __pyx_L1:;
5179
  Py_XDECREF(__pyx_1);
5059
  Py_XDECREF(__pyx_1);
5180
  Py_XDECREF(__pyx_3);
5181
  __Pyx_AddTraceback("dnet.fw.delete");
5060
  __Pyx_AddTraceback("dnet.fw.delete");
5182
  __pyx_r = 0;
5061
  __pyx_r = 0;
5183
  __pyx_L0:;
5062
  __pyx_L0:;
Lines 5195-5208 Link Here
5195
  PyObject *__pyx_r;
5074
  PyObject *__pyx_r;
5196
  PyObject *__pyx_1 = 0;
5075
  PyObject *__pyx_1 = 0;
5197
  static char *__pyx_argnames[] = {"callback","arg",0};
5076
  static char *__pyx_argnames[] = {"callback","arg",0};
5198
  __pyx_v_arg = __pyx_k57;
5077
  __pyx_v_arg = __pyx_d35;
5199
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_callback, &__pyx_v_arg)) return 0;
5078
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_callback, &__pyx_v_arg)) return 0;
5200
  Py_INCREF(__pyx_v_self);
5079
  Py_INCREF(__pyx_v_self);
5201
  Py_INCREF(__pyx_v_callback);
5080
  Py_INCREF(__pyx_v_callback);
5202
  Py_INCREF(__pyx_v_arg);
5081
  Py_INCREF(__pyx_v_arg);
5203
  __pyx_v__arg = Py_None; Py_INCREF(Py_None);
5082
  __pyx_v__arg = Py_None; Py_INCREF(Py_None);
5204
5083
5205
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1283 */
5084
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1283 */
5206
  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1283; goto __pyx_L1;}
5085
  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1283; goto __pyx_L1;}
5207
  Py_INCREF(__pyx_v_callback);
5086
  Py_INCREF(__pyx_v_callback);
5208
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_callback);
5087
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_callback);
Lines 5212-5219 Link Here
5212
  __pyx_v__arg = __pyx_1;
5091
  __pyx_v__arg = __pyx_1;
5213
  __pyx_1 = 0;
5092
  __pyx_1 = 0;
5214
5093
5215
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1284 */
5094
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1284 */
5216
  __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;}
5095
  __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;}
5217
  __pyx_r = __pyx_1;
5096
  __pyx_r = __pyx_1;
5218
  __pyx_1 = 0;
5097
  __pyx_1 = 0;
5219
  goto __pyx_L0;
5098
  goto __pyx_L0;
Lines 5242-5254 Link Here
5242
  Py_INCREF(__pyx_v_self);
5121
  Py_INCREF(__pyx_v_self);
5243
  __pyx_v_l = Py_None; Py_INCREF(Py_None);
5122
  __pyx_v_l = Py_None; Py_INCREF(Py_None);
5244
5123
5245
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1287 */
5124
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1287 */
5246
  __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; goto __pyx_L1;}
5125
  __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; goto __pyx_L1;}
5247
  Py_DECREF(__pyx_v_l);
5126
  Py_DECREF(__pyx_v_l);
5248
  __pyx_v_l = __pyx_1;
5127
  __pyx_v_l = __pyx_1;
5249
  __pyx_1 = 0;
5128
  __pyx_1 = 0;
5250
5129
5251
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1288 */
5130
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1288 */
5252
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_loop); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; goto __pyx_L1;}
5131
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_loop); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; goto __pyx_L1;}
5253
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n___iter_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; goto __pyx_L1;}
5132
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n___iter_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; goto __pyx_L1;}
5254
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; goto __pyx_L1;}
5133
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; goto __pyx_L1;}
Lines 5256-5276 Link Here
5256
  Py_INCREF(__pyx_v_l);
5135
  Py_INCREF(__pyx_v_l);
5257
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_l);
5136
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_l);
5258
  __pyx_2 = 0;
5137
  __pyx_2 = 0;
5259
  __pyx_2 = PyObject_Call(__pyx_1, __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; goto __pyx_L1;}
5138
  __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; goto __pyx_L1;}
5260
  Py_DECREF(__pyx_1); __pyx_1 = 0;
5139
  Py_DECREF(__pyx_1); __pyx_1 = 0;
5261
  Py_DECREF(__pyx_3); __pyx_3 = 0;
5140
  Py_DECREF(__pyx_3); __pyx_3 = 0;
5262
  Py_DECREF(__pyx_2); __pyx_2 = 0;
5141
  Py_DECREF(__pyx_2); __pyx_2 = 0;
5263
5142
5264
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1289 */
5143
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1289 */
5265
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_iter); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; goto __pyx_L1;}
5144
  __pyx_1 = PyObject_GetIter(__pyx_v_l); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; goto __pyx_L1;}
5266
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; goto __pyx_L1;}
5145
  __pyx_r = __pyx_1;
5267
  Py_INCREF(__pyx_v_l);
5146
  __pyx_1 = 0;
5268
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_l);
5269
  __pyx_2 = PyObject_Call(__pyx_1, __pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; goto __pyx_L1;}
5270
  Py_DECREF(__pyx_1); __pyx_1 = 0;
5271
  Py_DECREF(__pyx_3); __pyx_3 = 0;
5272
  __pyx_r = __pyx_2;
5273
  __pyx_2 = 0;
5274
  goto __pyx_L0;
5147
  goto __pyx_L0;
5275
5148
5276
  __pyx_r = Py_None; Py_INCREF(Py_None);
5149
  __pyx_r = Py_None; Py_INCREF(Py_None);
Lines 5291-5311 Link Here
5291
static void __pyx_f_4dnet_2fw___dealloc__(PyObject *__pyx_v_self) {
5164
static void __pyx_f_4dnet_2fw___dealloc__(PyObject *__pyx_v_self) {
5292
  int __pyx_1;
5165
  int __pyx_1;
5293
  Py_INCREF(__pyx_v_self);
5166
  Py_INCREF(__pyx_v_self);
5294
5295
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1292 */
5296
  __pyx_1 = (((struct __pyx_obj_4dnet_fw *)__pyx_v_self)->fw != 0);
5167
  __pyx_1 = (((struct __pyx_obj_4dnet_fw *)__pyx_v_self)->fw != 0);
5297
  if (__pyx_1) {
5168
  if (__pyx_1) {
5298
5299
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1293 */
5300
    fw_close(((struct __pyx_obj_4dnet_fw *)__pyx_v_self)->fw);
5169
    fw_close(((struct __pyx_obj_4dnet_fw *)__pyx_v_self)->fw);
5301
    goto __pyx_L2;
5170
    goto __pyx_L2;
5302
  }
5171
  }
5303
  __pyx_L2:;
5172
  __pyx_L2:;
5304
5173
5305
  goto __pyx_L0;
5306
  __pyx_L1:;
5307
  __Pyx_AddTraceback("dnet.fw.__dealloc__");
5308
  __pyx_L0:;
5309
  Py_DECREF(__pyx_v_self);
5174
  Py_DECREF(__pyx_v_self);
5310
}
5175
}
5311
5176
Lines 5314-5337 Link Here
5314
  int __pyx_r;
5179
  int __pyx_r;
5315
  int __pyx_1;
5180
  int __pyx_1;
5316
  PyObject *__pyx_2 = 0;
5181
  PyObject *__pyx_2 = 0;
5317
  PyObject *__pyx_3 = 0;
5318
  static char *__pyx_argnames[] = {0};
5182
  static char *__pyx_argnames[] = {0};
5319
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1;
5183
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1;
5320
  Py_INCREF(__pyx_v_self);
5184
  Py_INCREF(__pyx_v_self);
5321
5185
5322
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1322 */
5186
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1322 */
5323
  ((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand = rand_open();
5187
  ((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand = rand_open();
5324
5188
5325
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1323 */
5189
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1323 */
5326
  __pyx_1 = (!(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand != 0));
5190
  __pyx_1 = (!(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand != 0));
5327
  if (__pyx_1) {
5191
  if (__pyx_1) {
5328
5192
    __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; goto __pyx_L1;}
5329
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1324 */
5193
    __Pyx_Raise(PyExc_OSError, __pyx_2, 0);
5330
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; goto __pyx_L1;}
5331
    __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; goto __pyx_L1;}
5332
    __Pyx_Raise(__pyx_2, __pyx_3, 0);
5333
    Py_DECREF(__pyx_2); __pyx_2 = 0;
5194
    Py_DECREF(__pyx_2); __pyx_2 = 0;
5334
    Py_DECREF(__pyx_3); __pyx_3 = 0;
5335
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; goto __pyx_L1;}
5195
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; goto __pyx_L1;}
5336
    goto __pyx_L2;
5196
    goto __pyx_L2;
5337
  }
5197
  }
Lines 5341-5347 Link Here
5341
  goto __pyx_L0;
5201
  goto __pyx_L0;
5342
  __pyx_L1:;
5202
  __pyx_L1:;
5343
  Py_XDECREF(__pyx_2);
5203
  Py_XDECREF(__pyx_2);
5344
  Py_XDECREF(__pyx_3);
5345
  __Pyx_AddTraceback("dnet.rand.__init__");
5204
  __Pyx_AddTraceback("dnet.rand.__init__");
5346
  __pyx_r = -1;
5205
  __pyx_r = -1;
5347
  __pyx_L0:;
5206
  __pyx_L0:;
Lines 5353-5360 Link Here
5353
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        ";
5212
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        ";
5354
static PyObject *__pyx_f_4dnet_4rand_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5213
static PyObject *__pyx_f_4dnet_4rand_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5355
  PyObject *__pyx_v_len = 0;
5214
  PyObject *__pyx_v_len = 0;
5356
  char (__pyx_v_buf[1024]);
5215
  char __pyx_v_buf[1024];
5357
  char (*__pyx_v_p);
5216
  char *__pyx_v_p;
5358
  PyObject *__pyx_v_s;
5217
  PyObject *__pyx_v_s;
5359
  PyObject *__pyx_r;
5218
  PyObject *__pyx_r;
5360
  PyObject *__pyx_1 = 0;
5219
  PyObject *__pyx_1 = 0;
Lines 5365-5382 Link Here
5365
  Py_INCREF(__pyx_v_len);
5224
  Py_INCREF(__pyx_v_len);
5366
  __pyx_v_s = Py_None; Py_INCREF(Py_None);
5225
  __pyx_v_s = Py_None; Py_INCREF(Py_None);
5367
5226
5368
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1334 */
5227
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1334 */
5369
  __pyx_1 = PyInt_FromLong(1024); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; goto __pyx_L1;}
5228
  __pyx_1 = PyInt_FromLong(1024); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; goto __pyx_L1;}
5370
  if (PyObject_Cmp(__pyx_v_len, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; goto __pyx_L1;}
5229
  if (PyObject_Cmp(__pyx_v_len, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; goto __pyx_L1;}
5371
  __pyx_2 = __pyx_2 <= 0;
5230
  __pyx_2 = __pyx_2 <= 0;
5372
  Py_DECREF(__pyx_1); __pyx_1 = 0;
5231
  Py_DECREF(__pyx_1); __pyx_1 = 0;
5373
  if (__pyx_2) {
5232
  if (__pyx_2) {
5374
5233
5375
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1335 */
5234
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1335 */
5376
    __pyx_2 = PyInt_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; goto __pyx_L1;}
5235
    __pyx_2 = PyInt_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; goto __pyx_L1;}
5377
    rand_get(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand,__pyx_v_buf,__pyx_2);
5236
    rand_get(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand,__pyx_v_buf,__pyx_2);
5378
5237
5379
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1336 */
5238
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1336 */
5380
    __pyx_2 = PyInt_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; goto __pyx_L1;}
5239
    __pyx_2 = PyInt_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; goto __pyx_L1;}
5381
    __pyx_1 = PyString_FromStringAndSize(__pyx_v_buf,__pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; goto __pyx_L1;}
5240
    __pyx_1 = PyString_FromStringAndSize(__pyx_v_buf,__pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; goto __pyx_L1;}
5382
    __pyx_r = __pyx_1;
5241
    __pyx_r = __pyx_1;
Lines 5386-5410 Link Here
5386
  }
5245
  }
5387
  __pyx_L2:;
5246
  __pyx_L2:;
5388
5247
5389
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1337 */
5248
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1337 */
5390
  __pyx_2 = PyInt_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; goto __pyx_L1;}
5249
  __pyx_2 = PyInt_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; goto __pyx_L1;}
5391
  __pyx_v_p = malloc(__pyx_2);
5250
  __pyx_v_p = malloc(__pyx_2);
5392
5251
5393
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1338 */
5252
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1338 */
5394
  __pyx_2 = PyInt_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; goto __pyx_L1;}
5253
  __pyx_2 = PyInt_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; goto __pyx_L1;}
5395
  rand_get(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand,__pyx_v_p,__pyx_2);
5254
  rand_get(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand,__pyx_v_p,__pyx_2);
5396
5255
5397
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1339 */
5256
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1339 */
5398
  __pyx_2 = PyInt_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; goto __pyx_L1;}
5257
  __pyx_2 = PyInt_AsLong(__pyx_v_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; goto __pyx_L1;}
5399
  __pyx_1 = PyString_FromStringAndSize(__pyx_v_p,__pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; goto __pyx_L1;}
5258
  __pyx_1 = PyString_FromStringAndSize(__pyx_v_p,__pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; goto __pyx_L1;}
5400
  Py_DECREF(__pyx_v_s);
5259
  Py_DECREF(__pyx_v_s);
5401
  __pyx_v_s = __pyx_1;
5260
  __pyx_v_s = __pyx_1;
5402
  __pyx_1 = 0;
5261
  __pyx_1 = 0;
5403
5262
5404
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1340 */
5263
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1340 */
5405
  free(__pyx_v_p);
5264
  free(__pyx_v_p);
5406
5265
5407
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1341 */
5266
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1341 */
5408
  Py_INCREF(__pyx_v_s);
5267
  Py_INCREF(__pyx_v_s);
5409
  __pyx_r = __pyx_v_s;
5268
  __pyx_r = __pyx_v_s;
5410
  goto __pyx_L0;
5269
  goto __pyx_L0;
Lines 5427-5440 Link Here
5427
static PyObject *__pyx_f_4dnet_4rand_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5286
static PyObject *__pyx_f_4dnet_4rand_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5428
  PyObject *__pyx_v_buf = 0;
5287
  PyObject *__pyx_v_buf = 0;
5429
  PyObject *__pyx_r;
5288
  PyObject *__pyx_r;
5430
  char (*__pyx_1);
5289
  char *__pyx_1;
5431
  static char *__pyx_argnames[] = {"buf",0};
5290
  static char *__pyx_argnames[] = {"buf",0};
5432
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0;
5291
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0;
5433
  Py_INCREF(__pyx_v_self);
5292
  Py_INCREF(__pyx_v_self);
5434
  Py_INCREF(__pyx_v_buf);
5293
  Py_INCREF(__pyx_v_buf);
5435
5294
  __pyx_1 = PyString_AsString(__pyx_v_buf); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; goto __pyx_L1;}
5436
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1349 */
5437
  __pyx_1 = PyString_AsString(__pyx_v_buf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; goto __pyx_L1;}
5438
  rand_set(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand,__pyx_1,PyString_Size(__pyx_v_buf));
5295
  rand_set(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand,__pyx_1,PyString_Size(__pyx_v_buf));
5439
5296
5440
  __pyx_r = Py_None; Py_INCREF(Py_None);
5297
  __pyx_r = Py_None; Py_INCREF(Py_None);
Lines 5453-5466 Link Here
5453
static PyObject *__pyx_f_4dnet_4rand_add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5310
static PyObject *__pyx_f_4dnet_4rand_add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5454
  PyObject *__pyx_v_buf = 0;
5311
  PyObject *__pyx_v_buf = 0;
5455
  PyObject *__pyx_r;
5312
  PyObject *__pyx_r;
5456
  char (*__pyx_1);
5313
  char *__pyx_1;
5457
  static char *__pyx_argnames[] = {"buf",0};
5314
  static char *__pyx_argnames[] = {"buf",0};
5458
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0;
5315
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_buf)) return 0;
5459
  Py_INCREF(__pyx_v_self);
5316
  Py_INCREF(__pyx_v_self);
5460
  Py_INCREF(__pyx_v_buf);
5317
  Py_INCREF(__pyx_v_buf);
5461
5318
  __pyx_1 = PyString_AsString(__pyx_v_buf); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; goto __pyx_L1;}
5462
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1357 */
5463
  __pyx_1 = PyString_AsString(__pyx_v_buf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; goto __pyx_L1;}
5464
  rand_add(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand,__pyx_1,PyString_Size(__pyx_v_buf));
5319
  rand_add(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand,__pyx_1,PyString_Size(__pyx_v_buf));
5465
5320
5466
  __pyx_r = Py_None; Py_INCREF(Py_None);
5321
  __pyx_r = Py_None; Py_INCREF(Py_None);
Lines 5482-5489 Link Here
5482
  static char *__pyx_argnames[] = {0};
5337
  static char *__pyx_argnames[] = {0};
5483
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
5338
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
5484
  Py_INCREF(__pyx_v_self);
5339
  Py_INCREF(__pyx_v_self);
5485
5486
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1361 */
5487
  __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;}
5340
  __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;}
5488
  __pyx_r = __pyx_1;
5341
  __pyx_r = __pyx_1;
5489
  __pyx_1 = 0;
5342
  __pyx_1 = 0;
Lines 5508-5515 Link Here
5508
  static char *__pyx_argnames[] = {0};
5361
  static char *__pyx_argnames[] = {0};
5509
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
5362
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
5510
  Py_INCREF(__pyx_v_self);
5363
  Py_INCREF(__pyx_v_self);
5511
5512
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1365 */
5513
  __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;}
5364
  __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;}
5514
  __pyx_r = __pyx_1;
5365
  __pyx_r = __pyx_1;
5515
  __pyx_1 = 0;
5366
  __pyx_1 = 0;
Lines 5534-5541 Link Here
5534
  static char *__pyx_argnames[] = {0};
5385
  static char *__pyx_argnames[] = {0};
5535
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
5386
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
5536
  Py_INCREF(__pyx_v_self);
5387
  Py_INCREF(__pyx_v_self);
5537
5538
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1369 */
5539
  __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;}
5388
  __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;}
5540
  __pyx_r = __pyx_1;
5389
  __pyx_r = __pyx_1;
5541
  __pyx_1 = 0;
5390
  __pyx_1 = 0;
Lines 5562-5579 Link Here
5562
  PyObject *__pyx_2 = 0;
5411
  PyObject *__pyx_2 = 0;
5563
  PyObject *__pyx_3 = 0;
5412
  PyObject *__pyx_3 = 0;
5564
  static char *__pyx_argnames[] = {"start","stop",0};
5413
  static char *__pyx_argnames[] = {"start","stop",0};
5565
  __pyx_v_stop = __pyx_k58;
5414
  __pyx_v_stop = __pyx_d36;
5566
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_start, &__pyx_v_stop)) return 0;
5415
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_start, &__pyx_v_stop)) return 0;
5567
  Py_INCREF(__pyx_v_self);
5416
  Py_INCREF(__pyx_v_self);
5568
  Py_INCREF(__pyx_v_start);
5417
  Py_INCREF(__pyx_v_start);
5569
  Py_INCREF(__pyx_v_stop);
5418
  Py_INCREF(__pyx_v_stop);
5570
5571
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1377 */
5572
  if (PyObject_Cmp(__pyx_v_stop, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; goto __pyx_L1;}
5419
  if (PyObject_Cmp(__pyx_v_stop, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; goto __pyx_L1;}
5573
  __pyx_1 = __pyx_1 == 0;
5420
  __pyx_1 = __pyx_1 == 0;
5574
  if (__pyx_1) {
5421
  if (__pyx_1) {
5575
5576
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1378 */
5577
    __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; goto __pyx_L1;}
5422
    __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; goto __pyx_L1;}
5578
    __pyx_3 = PyTuple_New(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; goto __pyx_L1;}
5423
    __pyx_3 = PyTuple_New(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; goto __pyx_L1;}
5579
    Py_INCREF(__pyx_v_self);
5424
    Py_INCREF(__pyx_v_self);
Lines 5582-5588 Link Here
5582
    Py_INCREF(__pyx_v_start);
5427
    Py_INCREF(__pyx_v_start);
5583
    PyTuple_SET_ITEM(__pyx_3, 2, __pyx_v_start);
5428
    PyTuple_SET_ITEM(__pyx_3, 2, __pyx_v_start);
5584
    __pyx_2 = 0;
5429
    __pyx_2 = 0;
5585
    __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;}
5430
    __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;}
5586
    Py_DECREF(__pyx_3); __pyx_3 = 0;
5431
    Py_DECREF(__pyx_3); __pyx_3 = 0;
5587
    __pyx_r = __pyx_2;
5432
    __pyx_r = __pyx_2;
5588
    __pyx_2 = 0;
5433
    __pyx_2 = 0;
Lines 5590-5597 Link Here
5590
    goto __pyx_L2;
5435
    goto __pyx_L2;
5591
  }
5436
  }
5592
  /*else*/ {
5437
  /*else*/ {
5593
5594
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1380 */
5595
    __pyx_3 = PyTuple_New(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; goto __pyx_L1;}
5438
    __pyx_3 = PyTuple_New(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; goto __pyx_L1;}
5596
    Py_INCREF(__pyx_v_self);
5439
    Py_INCREF(__pyx_v_self);
5597
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self);
5440
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self);
Lines 5599-5605 Link Here
5599
    PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_start);
5442
    PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_start);
5600
    Py_INCREF(__pyx_v_stop);
5443
    Py_INCREF(__pyx_v_stop);
5601
    PyTuple_SET_ITEM(__pyx_3, 2, __pyx_v_stop);
5444
    PyTuple_SET_ITEM(__pyx_3, 2, __pyx_v_stop);
5602
    __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;}
5445
    __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;}
5603
    Py_DECREF(__pyx_3); __pyx_3 = 0;
5446
    Py_DECREF(__pyx_3); __pyx_3 = 0;
5604
    __pyx_r = __pyx_2;
5447
    __pyx_r = __pyx_2;
5605
    __pyx_2 = 0;
5448
    __pyx_2 = 0;
Lines 5625-5654 Link Here
5625
static void __pyx_f_4dnet_4rand___dealloc__(PyObject *__pyx_v_self) {
5468
static void __pyx_f_4dnet_4rand___dealloc__(PyObject *__pyx_v_self) {
5626
  int __pyx_1;
5469
  int __pyx_1;
5627
  Py_INCREF(__pyx_v_self);
5470
  Py_INCREF(__pyx_v_self);
5628
5629
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1383 */
5630
  __pyx_1 = (((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand != 0);
5471
  __pyx_1 = (((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand != 0);
5631
  if (__pyx_1) {
5472
  if (__pyx_1) {
5632
5633
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1384 */
5634
    rand_close(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand);
5473
    rand_close(((struct __pyx_obj_4dnet_rand *)__pyx_v_self)->rand);
5635
    goto __pyx_L2;
5474
    goto __pyx_L2;
5636
  }
5475
  }
5637
  __pyx_L2:;
5476
  __pyx_L2:;
5638
5477
5639
  goto __pyx_L0;
5640
  __pyx_L1:;
5641
  __Pyx_AddTraceback("dnet.rand.__dealloc__");
5642
  __pyx_L0:;
5643
  Py_DECREF(__pyx_v_self);
5478
  Py_DECREF(__pyx_v_self);
5644
}
5479
}
5645
5480
5646
static PyObject *__pyx_k118p;
5647
static PyObject *__pyx_k119p;
5648
5649
static char (__pyx_k118[]) = "start must be an integer";
5650
static char (__pyx_k119[]) = "stop must be an integer";
5651
5652
static int __pyx_f_4dnet_13__rand_xrange___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5481
static int __pyx_f_4dnet_13__rand_xrange___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5653
static int __pyx_f_4dnet_13__rand_xrange___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5482
static int __pyx_f_4dnet_13__rand_xrange___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5654
  PyObject *__pyx_v_r = 0;
5483
  PyObject *__pyx_v_r = 0;
Lines 5657-5663 Link Here
5657
  unsigned int __pyx_v_bits;
5486
  unsigned int __pyx_v_bits;
5658
  int __pyx_r;
5487
  int __pyx_r;
5659
  int __pyx_1;
5488
  int __pyx_1;
5660
  PyObject *__pyx_2 = 0;
5661
  static char *__pyx_argnames[] = {"r","start","stop",0};
5489
  static char *__pyx_argnames[] = {"r","start","stop",0};
5662
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO", __pyx_argnames, &__pyx_v_r, &__pyx_v_start, &__pyx_v_stop)) return -1;
5490
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO", __pyx_argnames, &__pyx_v_r, &__pyx_v_start, &__pyx_v_stop)) return -1;
5663
  Py_INCREF(__pyx_v_self);
5491
  Py_INCREF(__pyx_v_self);
Lines 5665-5766 Link Here
5665
  Py_INCREF(__pyx_v_start);
5493
  Py_INCREF(__pyx_v_start);
5666
  Py_INCREF(__pyx_v_stop);
5494
  Py_INCREF(__pyx_v_stop);
5667
5495
5668
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1402 */
5496
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1402 */
5669
  ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->rand = ((struct __pyx_obj_4dnet_rand *)__pyx_v_r)->rand;
5497
  ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->rand = ((struct __pyx_obj_4dnet_rand *)__pyx_v_r)->rand;
5670
5498
5671
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1403 */
5499
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1403 */
5672
  __pyx_1 = PyInt_Check(__pyx_v_start);
5500
  __pyx_1 = PyInt_Check(__pyx_v_start);
5673
  if (__pyx_1) {
5501
  if (__pyx_1) {
5674
5675
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1404 */
5676
    ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->start = PyInt_AsLong(__pyx_v_start);
5502
    ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->start = PyInt_AsLong(__pyx_v_start);
5677
    goto __pyx_L2;
5503
    goto __pyx_L2;
5678
  }
5504
  }
5679
  __pyx_1 = PyLong_Check(__pyx_v_start);
5505
  __pyx_1 = PyLong_Check(__pyx_v_start);
5680
  if (__pyx_1) {
5506
  if (__pyx_1) {
5681
5682
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1406 */
5683
    ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->start = PyLong_AsUnsignedLong(__pyx_v_start);
5507
    ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->start = PyLong_AsUnsignedLong(__pyx_v_start);
5684
    goto __pyx_L2;
5508
    goto __pyx_L2;
5685
  }
5509
  }
5686
  /*else*/ {
5510
  /*else*/ {
5687
5511
    __Pyx_Raise(PyExc_TypeError, __pyx_k49p, 0);
5688
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1408 */
5689
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_TypeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; goto __pyx_L1;}
5690
    __Pyx_Raise(__pyx_2, __pyx_k118p, 0);
5691
    Py_DECREF(__pyx_2); __pyx_2 = 0;
5692
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; goto __pyx_L1;}
5512
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; goto __pyx_L1;}
5693
  }
5513
  }
5694
  __pyx_L2:;
5514
  __pyx_L2:;
5695
5515
5696
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1410 */
5516
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1410 */
5697
  __pyx_1 = PyInt_Check(__pyx_v_start);
5517
  __pyx_1 = PyInt_Check(__pyx_v_start);
5698
  if (__pyx_1) {
5518
  if (__pyx_1) {
5699
5700
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1411 */
5701
    ((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);
5519
    ((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);
5702
    goto __pyx_L3;
5520
    goto __pyx_L3;
5703
  }
5521
  }
5704
  __pyx_1 = PyLong_Check(__pyx_v_start);
5522
  __pyx_1 = PyLong_Check(__pyx_v_start);
5705
  if (__pyx_1) {
5523
  if (__pyx_1) {
5706
5707
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1413 */
5708
    ((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);
5524
    ((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);
5709
    goto __pyx_L3;
5525
    goto __pyx_L3;
5710
  }
5526
  }
5711
  /*else*/ {
5527
  /*else*/ {
5712
5528
    __Pyx_Raise(PyExc_TypeError, __pyx_k50p, 0);
5713
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1415 */
5714
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_TypeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1415; goto __pyx_L1;}
5715
    __Pyx_Raise(__pyx_2, __pyx_k119p, 0);
5716
    Py_DECREF(__pyx_2); __pyx_2 = 0;
5717
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1415; goto __pyx_L1;}
5529
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1415; goto __pyx_L1;}
5718
  }
5530
  }
5719
  __pyx_L3:;
5531
  __pyx_L3:;
5720
5532
5721
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1418 */
5533
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1418 */
5722
  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)));
5534
  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)));
5723
5535
5724
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1420 */
5536
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1420 */
5725
  __pyx_v_bits = 0;
5537
  __pyx_v_bits = 0;
5726
5538
5727
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1421 */
5539
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1421 */
5728
  while (1) {
5540
  while (1) {
5729
    __pyx_L4:;
5730
    __pyx_1 = (((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->max > (1 << __pyx_v_bits));
5541
    __pyx_1 = (((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->max > (1 << __pyx_v_bits));
5731
    if (!__pyx_1) break;
5542
    if (!__pyx_1) break;
5732
5733
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1422 */
5734
    __pyx_v_bits = (__pyx_v_bits + 1);
5543
    __pyx_v_bits = (__pyx_v_bits + 1);
5735
  }
5544
  }
5736
  __pyx_L5:;
5737
5545
5738
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1424 */
5546
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1424 */
5739
  ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->left = (__pyx_v_bits / 2);
5547
  ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->left = (__pyx_v_bits / 2);
5740
5548
5741
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1425 */
5549
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1425 */
5742
  ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->right = (__pyx_v_bits - ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->left);
5550
  ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->right = (__pyx_v_bits - ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->left);
5743
5551
5744
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1426 */
5552
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1426 */
5745
  ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->mask = ((1 << __pyx_v_bits) - 1);
5553
  ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->mask = ((1 << __pyx_v_bits) - 1);
5746
5554
5747
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1428 */
5555
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1428 */
5748
  __pyx_1 = (__pyx_e_4dnet_TEASBOXSIZE < (1 << ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->left));
5556
  __pyx_1 = (__pyx_e_4dnet_TEASBOXSIZE < (1 << ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->left));
5749
  if (__pyx_1) {
5557
  if (__pyx_1) {
5750
5558
5751
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1429 */
5559
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1429 */
5752
    ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->sboxmask = (__pyx_e_4dnet_TEASBOXSIZE - 1);
5560
    ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->sboxmask = (__pyx_e_4dnet_TEASBOXSIZE - 1);
5753
5561
5754
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1430 */
5562
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1430 */
5755
    ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->kshift = __pyx_e_4dnet_TEASBOXSHIFT;
5563
    ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->kshift = __pyx_e_4dnet_TEASBOXSHIFT;
5756
    goto __pyx_L6;
5564
    goto __pyx_L6;
5757
  }
5565
  }
5758
  /*else*/ {
5566
  /*else*/ {
5759
5567
5760
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1432 */
5568
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1432 */
5761
    ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->sboxmask = ((1 << ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->left) - 1);
5569
    ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->sboxmask = ((1 << ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->left) - 1);
5762
5570
5763
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1433 */
5571
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1433 */
5764
    ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->kshift = ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->left;
5572
    ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->kshift = ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->left;
5765
  }
5573
  }
5766
  __pyx_L6:;
5574
  __pyx_L6:;
Lines 5768-5774 Link Here
5768
  __pyx_r = 0;
5576
  __pyx_r = 0;
5769
  goto __pyx_L0;
5577
  goto __pyx_L0;
5770
  __pyx_L1:;
5578
  __pyx_L1:;
5771
  Py_XDECREF(__pyx_2);
5772
  __Pyx_AddTraceback("dnet.__rand_xrange.__init__");
5579
  __Pyx_AddTraceback("dnet.__rand_xrange.__init__");
5773
  __pyx_r = -1;
5580
  __pyx_r = -1;
5774
  __pyx_L0:;
5581
  __pyx_L0:;
Lines 5784-5803 Link Here
5784
  PyObject *__pyx_r;
5591
  PyObject *__pyx_r;
5785
  Py_INCREF(__pyx_v_self);
5592
  Py_INCREF(__pyx_v_self);
5786
5593
5787
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1436 */
5594
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1436 */
5788
  ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->cur = 0;
5595
  ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->cur = 0;
5789
  ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->enc = 0;
5596
  ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->enc = 0;
5790
5597
5791
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1438 */
5598
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1438 */
5792
  Py_INCREF(__pyx_v_self);
5599
  Py_INCREF(__pyx_v_self);
5793
  __pyx_r = __pyx_v_self;
5600
  __pyx_r = __pyx_v_self;
5794
  goto __pyx_L0;
5601
  goto __pyx_L0;
5795
5602
5796
  __pyx_r = Py_None; Py_INCREF(Py_None);
5603
  __pyx_r = Py_None; Py_INCREF(Py_None);
5797
  goto __pyx_L0;
5798
  __pyx_L1:;
5799
  __Pyx_AddTraceback("dnet.__rand_xrange.__iter__");
5800
  __pyx_r = 0;
5801
  __pyx_L0:;
5604
  __pyx_L0:;
5802
  Py_DECREF(__pyx_v_self);
5605
  Py_DECREF(__pyx_v_self);
5803
  return __pyx_r;
5606
  return __pyx_r;
Lines 5807-5821 Link Here
5807
static Py_ssize_t __pyx_f_4dnet_13__rand_xrange___len__(PyObject *__pyx_v_self) {
5610
static Py_ssize_t __pyx_f_4dnet_13__rand_xrange___len__(PyObject *__pyx_v_self) {
5808
  Py_ssize_t __pyx_r;
5611
  Py_ssize_t __pyx_r;
5809
  Py_INCREF(__pyx_v_self);
5612
  Py_INCREF(__pyx_v_self);
5810
5811
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1441 */
5812
  __pyx_r = ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->max;
5613
  __pyx_r = ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->max;
5813
  goto __pyx_L0;
5614
  goto __pyx_L0;
5814
5615
5815
  __pyx_r = 0;
5616
  __pyx_r = 0;
5816
  goto __pyx_L0;
5817
  __pyx_L1:;
5818
  __Pyx_AddTraceback("dnet.__rand_xrange.__len__");
5819
  __pyx_L0:;
5617
  __pyx_L0:;
5820
  Py_DECREF(__pyx_v_self);
5618
  Py_DECREF(__pyx_v_self);
5821
  return __pyx_r;
5619
  return __pyx_r;
Lines 5828-5899 Link Here
5828
  PyObject *__pyx_v_i;
5626
  PyObject *__pyx_v_i;
5829
  PyObject *__pyx_r;
5627
  PyObject *__pyx_r;
5830
  int __pyx_1;
5628
  int __pyx_1;
5831
  PyObject *__pyx_2 = 0;
5629
  long __pyx_2;
5832
  long __pyx_3;
5630
  PyObject *__pyx_3 = 0;
5833
  Py_INCREF(__pyx_v_self);
5631
  Py_INCREF(__pyx_v_self);
5834
  __pyx_v_i = Py_None; Py_INCREF(Py_None);
5632
  __pyx_v_i = Py_None; Py_INCREF(Py_None);
5835
5633
5836
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1446 */
5634
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1446 */
5837
  __pyx_1 = (((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->cur == ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->max);
5635
  __pyx_1 = (((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->cur == ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->max);
5838
  if (__pyx_1) {
5636
  if (__pyx_1) {
5839
5637
    __Pyx_Raise(PyExc_StopIteration, 0, 0);
5840
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1447 */
5841
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_StopIteration); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; goto __pyx_L1;}
5842
    __Pyx_Raise(__pyx_2, 0, 0);
5843
    Py_DECREF(__pyx_2); __pyx_2 = 0;
5844
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; goto __pyx_L1;}
5638
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1447; goto __pyx_L1;}
5845
    goto __pyx_L2;
5639
    goto __pyx_L2;
5846
  }
5640
  }
5847
  __pyx_L2:;
5641
  __pyx_L2:;
5848
5642
5849
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1448 */
5643
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1448 */
5850
  ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->cur = (((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->cur + 1);
5644
  ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->cur = (((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->cur + 1);
5851
5645
5852
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1449 */
5646
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1449 */
5853
  while (1) {
5647
  while (1) {
5854
    __pyx_L3:;
5648
    __pyx_2 = 1;
5855
    __pyx_3 = 1;
5649
    if (!__pyx_2) break;
5856
    if (!__pyx_3) break;
5857
5650
5858
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1450 */
5651
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1450 */
5859
    __pyx_v_c = ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->enc;
5652
    __pyx_v_c = ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->enc;
5860
5653
5861
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1451 */
5654
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1451 */
5862
    ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->enc = (((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->enc + 1);
5655
    ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->enc = (((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->enc + 1);
5863
5656
5864
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1452 */
5657
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1452 */
5865
    __pyx_v_sum = 0;
5658
    __pyx_v_sum = 0;
5866
5659
5867
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1453 */
5660
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1453 */
5868
    for (__pyx_3 = 0+1; __pyx_3 < __pyx_e_4dnet_TEAROUNDS; ++__pyx_3) {
5661
    for (__pyx_2 = 0+1; __pyx_2 < __pyx_e_4dnet_TEAROUNDS; ++__pyx_2) {
5869
      __pyx_2 = PyInt_FromLong(__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1453; goto __pyx_L1;}
5662
      __pyx_3 = PyInt_FromLong(__pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1453; goto __pyx_L1;}
5870
      Py_DECREF(__pyx_v_i);
5663
      Py_DECREF(__pyx_v_i);
5871
      __pyx_v_i = __pyx_2;
5664
      __pyx_v_i = __pyx_3;
5872
      __pyx_2 = 0;
5665
      __pyx_3 = 0;
5873
5666
5874
      /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1454 */
5667
      /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1454 */
5875
      __pyx_v_sum = (__pyx_v_sum + __pyx_e_4dnet_TEADELTA);
5668
      __pyx_v_sum = (__pyx_v_sum + __pyx_e_4dnet_TEADELTA);
5876
5669
5877
      /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1455 */
5670
      /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1455 */
5878
      __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));
5671
      __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));
5879
5672
5880
      /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1456 */
5673
      /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1456 */
5881
      __pyx_v_c = (__pyx_v_c + __pyx_v_sum);
5674
      __pyx_v_c = (__pyx_v_c + __pyx_v_sum);
5882
5675
5883
      /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1457 */
5676
      /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1457 */
5884
      __pyx_v_c = (__pyx_v_c & ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->mask);
5677
      __pyx_v_c = (__pyx_v_c & ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->mask);
5885
5678
5886
      /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1458 */
5679
      /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1458 */
5887
      __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);
5680
      __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);
5888
      __pyx_L5:;
5889
    }
5681
    }
5890
    __pyx_L6:;
5891
5682
5892
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1459 */
5683
    /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1459 */
5893
    __pyx_1 = (__pyx_v_c < ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->max);
5684
    __pyx_1 = (__pyx_v_c < ((struct __pyx_obj_4dnet___rand_xrange *)__pyx_v_self)->max);
5894
    if (__pyx_1) {
5685
    if (__pyx_1) {
5895
5896
      /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1460 */
5897
      goto __pyx_L4;
5686
      goto __pyx_L4;
5898
      goto __pyx_L7;
5687
      goto __pyx_L7;
5899
    }
5688
    }
Lines 5901-5916 Link Here
5901
  }
5690
  }
5902
  __pyx_L4:;
5691
  __pyx_L4:;
5903
5692
5904
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1461 */
5693
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1461 */
5905
  __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;}
5694
  __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;}
5906
  __pyx_r = __pyx_2;
5695
  __pyx_r = __pyx_3;
5907
  __pyx_2 = 0;
5696
  __pyx_3 = 0;
5908
  goto __pyx_L0;
5697
  goto __pyx_L0;
5909
5698
5910
  __pyx_r = Py_None; Py_INCREF(Py_None);
5699
  __pyx_r = Py_None; Py_INCREF(Py_None);
5911
  goto __pyx_L0;
5700
  goto __pyx_L0;
5912
  __pyx_L1:;
5701
  __pyx_L1:;
5913
  Py_XDECREF(__pyx_2);
5702
  Py_XDECREF(__pyx_3);
5914
  __Pyx_AddTraceback("dnet.__rand_xrange.__next__");
5703
  __Pyx_AddTraceback("dnet.__rand_xrange.__next__");
5915
  __pyx_r = 0;
5704
  __pyx_r = 0;
5916
  __pyx_L0:;
5705
  __pyx_L0:;
Lines 5927-5935 Link Here
5927
  int __pyx_r;
5716
  int __pyx_r;
5928
  int __pyx_1;
5717
  int __pyx_1;
5929
  PyObject *__pyx_2 = 0;
5718
  PyObject *__pyx_2 = 0;
5930
  PyObject *__pyx_3 = 0;
5931
  static char *__pyx_argnames[] = {"src","dst","mtu",0};
5719
  static char *__pyx_argnames[] = {"src","dst","mtu",0};
5932
  __pyx_v_mtu = __pyx_k59;
5720
  __pyx_v_mtu = __pyx_d37;
5933
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_src, &__pyx_v_dst, &__pyx_v_mtu)) return -1;
5721
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_src, &__pyx_v_dst, &__pyx_v_mtu)) return -1;
5934
  Py_INCREF(__pyx_v_self);
5722
  Py_INCREF(__pyx_v_self);
5935
  Py_INCREF(__pyx_v_src);
5723
  Py_INCREF(__pyx_v_src);
Lines 5938-5967 Link Here
5938
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_4dnet_addr, 1, "src")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; goto __pyx_L1;}
5726
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_4dnet_addr, 1, "src")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; goto __pyx_L1;}
5939
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dst), __pyx_ptype_4dnet_addr, 1, "dst")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; goto __pyx_L1;}
5727
  if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dst), __pyx_ptype_4dnet_addr, 1, "dst")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; goto __pyx_L1;}
5940
5728
5941
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1491 */
5729
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1491 */
5942
  __pyx_1 = PyInt_AsLong(__pyx_v_mtu); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1491; goto __pyx_L1;}
5730
  __pyx_1 = PyInt_AsLong(__pyx_v_mtu); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1491; goto __pyx_L1;}
5943
  ((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun = tun_open((&__pyx_v_src->_addr),(&__pyx_v_dst->_addr),__pyx_1);
5731
  ((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun = tun_open((&__pyx_v_src->_addr),(&__pyx_v_dst->_addr),__pyx_1);
5944
5732
5945
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1492 */
5733
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1492 */
5946
  __pyx_1 = PyInt_AsLong(__pyx_v_mtu); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; goto __pyx_L1;}
5734
  __pyx_1 = PyInt_AsLong(__pyx_v_mtu); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; goto __pyx_L1;}
5947
  ((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->mtu = __pyx_1;
5735
  ((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->mtu = __pyx_1;
5948
5736
5949
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1493 */
5737
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1493 */
5950
  __pyx_1 = (!(((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun != 0));
5738
  __pyx_1 = (!(((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun != 0));
5951
  if (__pyx_1) {
5739
  if (__pyx_1) {
5952
5740
    __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; goto __pyx_L1;}
5953
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1494 */
5741
    __Pyx_Raise(PyExc_OSError, __pyx_2, 0);
5954
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; goto __pyx_L1;}
5955
    __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; goto __pyx_L1;}
5956
    __Pyx_Raise(__pyx_2, __pyx_3, 0);
5957
    Py_DECREF(__pyx_2); __pyx_2 = 0;
5742
    Py_DECREF(__pyx_2); __pyx_2 = 0;
5958
    Py_DECREF(__pyx_3); __pyx_3 = 0;
5959
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; goto __pyx_L1;}
5743
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; goto __pyx_L1;}
5960
    goto __pyx_L2;
5744
    goto __pyx_L2;
5961
  }
5745
  }
5962
  __pyx_L2:;
5746
  __pyx_L2:;
5963
5747
5964
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1495 */
5748
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1495 */
5965
  __pyx_1 = PyInt_AsLong(__pyx_v_mtu); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; goto __pyx_L1;}
5749
  __pyx_1 = PyInt_AsLong(__pyx_v_mtu); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; goto __pyx_L1;}
5966
  ((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->buf = malloc(__pyx_1);
5750
  ((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->buf = malloc(__pyx_1);
5967
5751
Lines 5969-5975 Link Here
5969
  goto __pyx_L0;
5753
  goto __pyx_L0;
5970
  __pyx_L1:;
5754
  __pyx_L1:;
5971
  Py_XDECREF(__pyx_2);
5755
  Py_XDECREF(__pyx_2);
5972
  Py_XDECREF(__pyx_3);
5973
  __Pyx_AddTraceback("dnet.tun.__init__");
5756
  __Pyx_AddTraceback("dnet.tun.__init__");
5974
  __pyx_r = -1;
5757
  __pyx_r = -1;
5975
  __pyx_L0:;
5758
  __pyx_L0:;
Lines 5985-5992 Link Here
5985
  PyObject *__pyx_r;
5768
  PyObject *__pyx_r;
5986
  PyObject *__pyx_1 = 0;
5769
  PyObject *__pyx_1 = 0;
5987
  Py_INCREF(__pyx_v_self);
5770
  Py_INCREF(__pyx_v_self);
5988
5989
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1500 */
5990
  __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;}
5771
  __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;}
5991
  __pyx_r = __pyx_1;
5772
  __pyx_r = __pyx_1;
5992
  __pyx_1 = 0;
5773
  __pyx_1 = 0;
Lines 6008-6015 Link Here
6008
  PyObject *__pyx_r;
5789
  PyObject *__pyx_r;
6009
  PyObject *__pyx_1 = 0;
5790
  PyObject *__pyx_1 = 0;
6010
  Py_INCREF(__pyx_v_self);
5791
  Py_INCREF(__pyx_v_self);
6011
6012
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1505 */
6013
  __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;}
5792
  __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;}
6014
  __pyx_r = __pyx_1;
5793
  __pyx_r = __pyx_1;
6015
  __pyx_1 = 0;
5794
  __pyx_1 = 0;
Lines 6034-6041 Link Here
6034
  static char *__pyx_argnames[] = {0};
5813
  static char *__pyx_argnames[] = {0};
6035
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
5814
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
6036
  Py_INCREF(__pyx_v_self);
5815
  Py_INCREF(__pyx_v_self);
6037
6038
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1509 */
6039
  __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;}
5816
  __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;}
6040
  __pyx_r = __pyx_1;
5817
  __pyx_r = __pyx_1;
6041
  __pyx_1 = 0;
5818
  __pyx_1 = 0;
Lines 6057-6071 Link Here
6057
static PyObject *__pyx_f_4dnet_3tun_send(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5834
static PyObject *__pyx_f_4dnet_3tun_send(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6058
  PyObject *__pyx_v_pkt = 0;
5835
  PyObject *__pyx_v_pkt = 0;
6059
  PyObject *__pyx_r;
5836
  PyObject *__pyx_r;
6060
  char (*__pyx_1);
5837
  char *__pyx_1;
6061
  PyObject *__pyx_2 = 0;
5838
  PyObject *__pyx_2 = 0;
6062
  static char *__pyx_argnames[] = {"pkt",0};
5839
  static char *__pyx_argnames[] = {"pkt",0};
6063
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pkt)) return 0;
5840
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pkt)) return 0;
6064
  Py_INCREF(__pyx_v_self);
5841
  Py_INCREF(__pyx_v_self);
6065
  Py_INCREF(__pyx_v_pkt);
5842
  Py_INCREF(__pyx_v_pkt);
6066
5843
  __pyx_1 = PyString_AsString(__pyx_v_pkt); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; goto __pyx_L1;}
6067
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1518 */
6068
  __pyx_1 = PyString_AsString(__pyx_v_pkt); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; goto __pyx_L1;}
6069
  __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;}
5844
  __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;}
6070
  __pyx_r = __pyx_2;
5845
  __pyx_r = __pyx_2;
6071
  __pyx_2 = 0;
5846
  __pyx_2 = 0;
Lines 6090-6119 Link Here
6090
  PyObject *__pyx_r;
5865
  PyObject *__pyx_r;
6091
  int __pyx_1;
5866
  int __pyx_1;
6092
  PyObject *__pyx_2 = 0;
5867
  PyObject *__pyx_2 = 0;
6093
  PyObject *__pyx_3 = 0;
6094
  static char *__pyx_argnames[] = {0};
5868
  static char *__pyx_argnames[] = {0};
6095
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
5869
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
6096
  Py_INCREF(__pyx_v_self);
5870
  Py_INCREF(__pyx_v_self);
6097
5871
6098
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1523 */
5872
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1523 */
6099
  __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);
5873
  __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);
6100
5874
6101
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1524 */
5875
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1524 */
6102
  __pyx_1 = (__pyx_v_n < 0);
5876
  __pyx_1 = (__pyx_v_n < 0);
6103
  if (__pyx_1) {
5877
  if (__pyx_1) {
6104
5878
    __pyx_2 = __pyx_f_4dnet___oserror(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; goto __pyx_L1;}
6105
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1525 */
5879
    __Pyx_Raise(PyExc_OSError, __pyx_2, 0);
6106
    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_OSError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; goto __pyx_L1;}
6107
    __pyx_3 = __pyx_f_4dnet___oserror(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; goto __pyx_L1;}
6108
    __Pyx_Raise(__pyx_2, __pyx_3, 0);
6109
    Py_DECREF(__pyx_2); __pyx_2 = 0;
5880
    Py_DECREF(__pyx_2); __pyx_2 = 0;
6110
    Py_DECREF(__pyx_3); __pyx_3 = 0;
6111
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; goto __pyx_L1;}
5881
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; goto __pyx_L1;}
6112
    goto __pyx_L2;
5882
    goto __pyx_L2;
6113
  }
5883
  }
6114
  __pyx_L2:;
5884
  __pyx_L2:;
6115
5885
6116
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1526 */
5886
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1526 */
6117
  __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;}
5887
  __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;}
6118
  __pyx_r = __pyx_2;
5888
  __pyx_r = __pyx_2;
6119
  __pyx_2 = 0;
5889
  __pyx_2 = 0;
Lines 6123-6129 Link Here
6123
  goto __pyx_L0;
5893
  goto __pyx_L0;
6124
  __pyx_L1:;
5894
  __pyx_L1:;
6125
  Py_XDECREF(__pyx_2);
5895
  Py_XDECREF(__pyx_2);
6126
  Py_XDECREF(__pyx_3);
6127
  __Pyx_AddTraceback("dnet.tun.recv");
5896
  __Pyx_AddTraceback("dnet.tun.recv");
6128
  __pyx_r = 0;
5897
  __pyx_r = 0;
6129
  __pyx_L0:;
5898
  __pyx_L0:;
Lines 6137-6152 Link Here
6137
  static char *__pyx_argnames[] = {0};
5906
  static char *__pyx_argnames[] = {0};
6138
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
5907
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
6139
  Py_INCREF(__pyx_v_self);
5908
  Py_INCREF(__pyx_v_self);
6140
6141
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1529 */
6142
  ((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun = tun_close(((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun);
5909
  ((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun = tun_close(((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun);
6143
5910
6144
  __pyx_r = Py_None; Py_INCREF(Py_None);
5911
  __pyx_r = Py_None; Py_INCREF(Py_None);
6145
  goto __pyx_L0;
6146
  __pyx_L1:;
6147
  __Pyx_AddTraceback("dnet.tun.close");
6148
  __pyx_r = 0;
6149
  __pyx_L0:;
6150
  Py_DECREF(__pyx_v_self);
5912
  Py_DECREF(__pyx_v_self);
6151
  return __pyx_r;
5913
  return __pyx_r;
6152
}
5914
}
Lines 6156-6410 Link Here
6156
  int __pyx_1;
5918
  int __pyx_1;
6157
  Py_INCREF(__pyx_v_self);
5919
  Py_INCREF(__pyx_v_self);
6158
5920
6159
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1532 */
5921
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1532 */
6160
  __pyx_1 = (((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->buf != 0);
5922
  __pyx_1 = (((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->buf != 0);
6161
  if (__pyx_1) {
5923
  if (__pyx_1) {
6162
6163
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1533 */
6164
    free(((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->buf);
5924
    free(((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->buf);
6165
    goto __pyx_L2;
5925
    goto __pyx_L2;
6166
  }
5926
  }
6167
  __pyx_L2:;
5927
  __pyx_L2:;
6168
5928
6169
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1534 */
5929
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1534 */
6170
  __pyx_1 = (((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun != 0);
5930
  __pyx_1 = (((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun != 0);
6171
  if (__pyx_1) {
5931
  if (__pyx_1) {
6172
6173
    /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1535 */
6174
    tun_close(((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun);
5932
    tun_close(((struct __pyx_obj_4dnet_tun *)__pyx_v_self)->tun);
6175
    goto __pyx_L3;
5933
    goto __pyx_L3;
6176
  }
5934
  }
6177
  __pyx_L3:;
5935
  __pyx_L3:;
6178
5936
6179
  goto __pyx_L0;
6180
  __pyx_L1:;
6181
  __Pyx_AddTraceback("dnet.tun.__dealloc__");
6182
  __pyx_L0:;
6183
  Py_DECREF(__pyx_v_self);
5937
  Py_DECREF(__pyx_v_self);
6184
}
5938
}
6185
5939
6186
static __Pyx_InternTabEntry __pyx_intern_tab[] = {
6187
  {&__pyx_n_ADDR_TYPE_ETH, "ADDR_TYPE_ETH"},
6188
  {&__pyx_n_ADDR_TYPE_IP, "ADDR_TYPE_IP"},
6189
  {&__pyx_n_ADDR_TYPE_IP6, "ADDR_TYPE_IP6"},
6190
  {&__pyx_n_ADDR_TYPE_NONE, "ADDR_TYPE_NONE"},
6191
  {&__pyx_n_ARP_ETHIP_LEN, "ARP_ETHIP_LEN"},
6192
  {&__pyx_n_ARP_HDR_LEN, "ARP_HDR_LEN"},
6193
  {&__pyx_n_ARP_HRD_ETH, "ARP_HRD_ETH"},
6194
  {&__pyx_n_ARP_HRD_IEEE802, "ARP_HRD_IEEE802"},
6195
  {&__pyx_n_ARP_OP_REPLY, "ARP_OP_REPLY"},
6196
  {&__pyx_n_ARP_OP_REQUEST, "ARP_OP_REQUEST"},
6197
  {&__pyx_n_ARP_OP_REVREPLY, "ARP_OP_REVREPLY"},
6198
  {&__pyx_n_ARP_OP_REVREQUEST, "ARP_OP_REVREQUEST"},
6199
  {&__pyx_n_ARP_PRO_IP, "ARP_PRO_IP"},
6200
  {&__pyx_n_BSD, "BSD"},
6201
  {&__pyx_n_ETH_ADDR_BITS, "ETH_ADDR_BITS"},
6202
  {&__pyx_n_ETH_ADDR_BROADCAST, "ETH_ADDR_BROADCAST"},
6203
  {&__pyx_n_ETH_ADDR_LEN, "ETH_ADDR_LEN"},
6204
  {&__pyx_n_ETH_ADDR_UNSPEC, "ETH_ADDR_UNSPEC"},
6205
  {&__pyx_n_ETH_CRC_LEN, "ETH_CRC_LEN"},
6206
  {&__pyx_n_ETH_HDR_LEN, "ETH_HDR_LEN"},
6207
  {&__pyx_n_ETH_LEN_MAX, "ETH_LEN_MAX"},
6208
  {&__pyx_n_ETH_LEN_MIN, "ETH_LEN_MIN"},
6209
  {&__pyx_n_ETH_MIN, "ETH_MIN"},
6210
  {&__pyx_n_ETH_MTU, "ETH_MTU"},
6211
  {&__pyx_n_ETH_TYPE_8021Q, "ETH_TYPE_8021Q"},
6212
  {&__pyx_n_ETH_TYPE_ARP, "ETH_TYPE_ARP"},
6213
  {&__pyx_n_ETH_TYPE_IP, "ETH_TYPE_IP"},
6214
  {&__pyx_n_ETH_TYPE_IPV6, "ETH_TYPE_IPV6"},
6215
  {&__pyx_n_ETH_TYPE_LEN, "ETH_TYPE_LEN"},
6216
  {&__pyx_n_ETH_TYPE_LOOPBACK, "ETH_TYPE_LOOPBACK"},
6217
  {&__pyx_n_ETH_TYPE_MPLS, "ETH_TYPE_MPLS"},
6218
  {&__pyx_n_ETH_TYPE_MPLS_MCAST, "ETH_TYPE_MPLS_MCAST"},
6219
  {&__pyx_n_ETH_TYPE_PPPOE, "ETH_TYPE_PPPOE"},
6220
  {&__pyx_n_ETH_TYPE_PPPOEDISC, "ETH_TYPE_PPPOEDISC"},
6221
  {&__pyx_n_ETH_TYPE_PUP, "ETH_TYPE_PUP"},
6222
  {&__pyx_n_ETH_TYPE_REVARP, "ETH_TYPE_REVARP"},
6223
  {&__pyx_n_FW_DIR_IN, "FW_DIR_IN"},
6224
  {&__pyx_n_FW_DIR_OUT, "FW_DIR_OUT"},
6225
  {&__pyx_n_FW_OP_ALLOW, "FW_OP_ALLOW"},
6226
  {&__pyx_n_FW_OP_BLOCK, "FW_OP_BLOCK"},
6227
  {&__pyx_n_INTF_FLAG_BROADCAST, "INTF_FLAG_BROADCAST"},
6228
  {&__pyx_n_INTF_FLAG_LOOPBACK, "INTF_FLAG_LOOPBACK"},
6229
  {&__pyx_n_INTF_FLAG_MULTICAST, "INTF_FLAG_MULTICAST"},
6230
  {&__pyx_n_INTF_FLAG_NOARP, "INTF_FLAG_NOARP"},
6231
  {&__pyx_n_INTF_FLAG_POINTOPOINT, "INTF_FLAG_POINTOPOINT"},
6232
  {&__pyx_n_INTF_FLAG_UP, "INTF_FLAG_UP"},
6233
  {&__pyx_n_INTF_TYPE_ETH, "INTF_TYPE_ETH"},
6234
  {&__pyx_n_INTF_TYPE_LOOPBACK, "INTF_TYPE_LOOPBACK"},
6235
  {&__pyx_n_INTF_TYPE_OTHER, "INTF_TYPE_OTHER"},
6236
  {&__pyx_n_INTF_TYPE_TUN, "INTF_TYPE_TUN"},
6237
  {&__pyx_n_IP6_ADDR_BITS, "IP6_ADDR_BITS"},
6238
  {&__pyx_n_IP6_ADDR_LEN, "IP6_ADDR_LEN"},
6239
  {&__pyx_n_IP6_ADDR_LOOPBACK, "IP6_ADDR_LOOPBACK"},
6240
  {&__pyx_n_IP6_ADDR_UNSPEC, "IP6_ADDR_UNSPEC"},
6241
  {&__pyx_n_IP6_HDR_LEN, "IP6_HDR_LEN"},
6242
  {&__pyx_n_IP6_HLIM_DEFAULT, "IP6_HLIM_DEFAULT"},
6243
  {&__pyx_n_IP6_HLIM_MAX, "IP6_HLIM_MAX"},
6244
  {&__pyx_n_IP6_LEN_MAX, "IP6_LEN_MAX"},
6245
  {&__pyx_n_IP6_LEN_MIN, "IP6_LEN_MIN"},
6246
  {&__pyx_n_IP6_MTU_MIN, "IP6_MTU_MIN"},
6247
  {&__pyx_n_IP_ADDR_ANY, "IP_ADDR_ANY"},
6248
  {&__pyx_n_IP_ADDR_BITS, "IP_ADDR_BITS"},
6249
  {&__pyx_n_IP_ADDR_BROADCAST, "IP_ADDR_BROADCAST"},
6250
  {&__pyx_n_IP_ADDR_LEN, "IP_ADDR_LEN"},
6251
  {&__pyx_n_IP_ADDR_LOOPBACK, "IP_ADDR_LOOPBACK"},
6252
  {&__pyx_n_IP_ADDR_MCAST_ALL, "IP_ADDR_MCAST_ALL"},
6253
  {&__pyx_n_IP_ADDR_MCAST_LOCAL, "IP_ADDR_MCAST_LOCAL"},
6254
  {&__pyx_n_IP_DF, "IP_DF"},
6255
  {&__pyx_n_IP_HDR_LEN, "IP_HDR_LEN"},
6256
  {&__pyx_n_IP_HDR_LEN_MAX, "IP_HDR_LEN_MAX"},
6257
  {&__pyx_n_IP_LEN_MAX, "IP_LEN_MAX"},
6258
  {&__pyx_n_IP_LEN_MIN, "IP_LEN_MIN"},
6259
  {&__pyx_n_IP_MF, "IP_MF"},
6260
  {&__pyx_n_IP_OFFMASK, "IP_OFFMASK"},
6261
  {&__pyx_n_IP_OPT_LEN, "IP_OPT_LEN"},
6262
  {&__pyx_n_IP_OPT_LEN_MAX, "IP_OPT_LEN_MAX"},
6263
  {&__pyx_n_IP_PROTO_AH, "IP_PROTO_AH"},
6264
  {&__pyx_n_IP_PROTO_ESP, "IP_PROTO_ESP"},
6265
  {&__pyx_n_IP_PROTO_GRE, "IP_PROTO_GRE"},
6266
  {&__pyx_n_IP_PROTO_ICMP, "IP_PROTO_ICMP"},
6267
  {&__pyx_n_IP_PROTO_ICMPV6, "IP_PROTO_ICMPV6"},
6268
  {&__pyx_n_IP_PROTO_IGMP, "IP_PROTO_IGMP"},
6269
  {&__pyx_n_IP_PROTO_IP, "IP_PROTO_IP"},
6270
  {&__pyx_n_IP_PROTO_IPV6, "IP_PROTO_IPV6"},
6271
  {&__pyx_n_IP_PROTO_MAX, "IP_PROTO_MAX"},
6272
  {&__pyx_n_IP_PROTO_RAW, "IP_PROTO_RAW"},
6273
  {&__pyx_n_IP_PROTO_RESERVED, "IP_PROTO_RESERVED"},
6274
  {&__pyx_n_IP_PROTO_TCP, "IP_PROTO_TCP"},
6275
  {&__pyx_n_IP_PROTO_UDP, "IP_PROTO_UDP"},
6276
  {&__pyx_n_IP_RF, "IP_RF"},
6277
  {&__pyx_n_IP_TOS_DEFAULT, "IP_TOS_DEFAULT"},
6278
  {&__pyx_n_IP_TTL_DEFAULT, "IP_TTL_DEFAULT"},
6279
  {&__pyx_n_IP_TTL_MAX, "IP_TTL_MAX"},
6280
  {&__pyx_n_NotImplementedError, "NotImplementedError"},
6281
  {&__pyx_n_OSError, "OSError"},
6282
  {&__pyx_n_OverflowError, "OverflowError"},
6283
  {&__pyx_n_StopIteration, "StopIteration"},
6284
  {&__pyx_n_TCP_HDR_LEN, "TCP_HDR_LEN"},
6285
  {&__pyx_n_TCP_OPT_ALTSUM, "TCP_OPT_ALTSUM"},
6286
  {&__pyx_n_TCP_OPT_ALTSUMDATA, "TCP_OPT_ALTSUMDATA"},
6287
  {&__pyx_n_TCP_OPT_BUBBA, "TCP_OPT_BUBBA"},
6288
  {&__pyx_n_TCP_OPT_CC, "TCP_OPT_CC"},
6289
  {&__pyx_n_TCP_OPT_CCECHO, "TCP_OPT_CCECHO"},
6290
  {&__pyx_n_TCP_OPT_CCNEW, "TCP_OPT_CCNEW"},
6291
  {&__pyx_n_TCP_OPT_CORRUPT, "TCP_OPT_CORRUPT"},
6292
  {&__pyx_n_TCP_OPT_ECHO, "TCP_OPT_ECHO"},
6293
  {&__pyx_n_TCP_OPT_ECHOREPLY, "TCP_OPT_ECHOREPLY"},
6294
  {&__pyx_n_TCP_OPT_EOL, "TCP_OPT_EOL"},
6295
  {&__pyx_n_TCP_OPT_MAX, "TCP_OPT_MAX"},
6296
  {&__pyx_n_TCP_OPT_MD5, "TCP_OPT_MD5"},
6297
  {&__pyx_n_TCP_OPT_MSS, "TCP_OPT_MSS"},
6298
  {&__pyx_n_TCP_OPT_NOP, "TCP_OPT_NOP"},
6299
  {&__pyx_n_TCP_OPT_POCONN, "TCP_OPT_POCONN"},
6300
  {&__pyx_n_TCP_OPT_POSVC, "TCP_OPT_POSVC"},
6301
  {&__pyx_n_TCP_OPT_REC, "TCP_OPT_REC"},
6302
  {&__pyx_n_TCP_OPT_SACK, "TCP_OPT_SACK"},
6303
  {&__pyx_n_TCP_OPT_SACKOK, "TCP_OPT_SACKOK"},
6304
  {&__pyx_n_TCP_OPT_SCPS, "TCP_OPT_SCPS"},
6305
  {&__pyx_n_TCP_OPT_SKEETER, "TCP_OPT_SKEETER"},
6306
  {&__pyx_n_TCP_OPT_SNACK, "TCP_OPT_SNACK"},
6307
  {&__pyx_n_TCP_OPT_SNAP, "TCP_OPT_SNAP"},
6308
  {&__pyx_n_TCP_OPT_TCPCOMP, "TCP_OPT_TCPCOMP"},
6309
  {&__pyx_n_TCP_OPT_TIMESTAMP, "TCP_OPT_TIMESTAMP"},
6310
  {&__pyx_n_TCP_OPT_TRAILSUM, "TCP_OPT_TRAILSUM"},
6311
  {&__pyx_n_TCP_OPT_WSCALE, "TCP_OPT_WSCALE"},
6312
  {&__pyx_n_TCP_PORT_MAX, "TCP_PORT_MAX"},
6313
  {&__pyx_n_TCP_WIN_MAX, "TCP_WIN_MAX"},
6314
  {&__pyx_n_TH_ACK, "TH_ACK"},
6315
  {&__pyx_n_TH_CWR, "TH_CWR"},
6316
  {&__pyx_n_TH_ECE, "TH_ECE"},
6317
  {&__pyx_n_TH_FIN, "TH_FIN"},
6318
  {&__pyx_n_TH_PUSH, "TH_PUSH"},
6319
  {&__pyx_n_TH_RST, "TH_RST"},
6320
  {&__pyx_n_TH_SYN, "TH_SYN"},
6321
  {&__pyx_n_TH_URG, "TH_URG"},
6322
  {&__pyx_n_TypeError, "TypeError"},
6323
  {&__pyx_n_UDP_HDR_LEN, "UDP_HDR_LEN"},
6324
  {&__pyx_n_UDP_PORT_MAX, "UDP_PORT_MAX"},
6325
  {&__pyx_n_ValueError, "ValueError"},
6326
  {&__pyx_n___author__, "__author__"},
6327
  {&__pyx_n___copy__, "__copy__"},
6328
  {&__pyx_n___copyright__, "__copyright__"},
6329
  {&__pyx_n___int__, "__int__"},
6330
  {&__pyx_n___iter_append, "__iter_append"},
6331
  {&__pyx_n___license__, "__license__"},
6332
  {&__pyx_n___url__, "__url__"},
6333
  {&__pyx_n___version__, "__version__"},
6334
  {&__pyx_n_addr, "addr"},
6335
  {&__pyx_n_alias_addrs, "alias_addrs"},
6336
  {&__pyx_n_append, "append"},
6337
  {&__pyx_n_arp_pack_hdr_ethip, "arp_pack_hdr_ethip"},
6338
  {&__pyx_n_device, "device"},
6339
  {&__pyx_n_dir, "dir"},
6340
  {&__pyx_n_dport, "dport"},
6341
  {&__pyx_n_dst, "dst"},
6342
  {&__pyx_n_dst_addr, "dst_addr"},
6343
  {&__pyx_n_eth, "eth"},
6344
  {&__pyx_n_eth_aton, "eth_aton"},
6345
  {&__pyx_n_eth_ntoa, "eth_ntoa"},
6346
  {&__pyx_n_eth_pack_hdr, "eth_pack_hdr"},
6347
  {&__pyx_n_flags, "flags"},
6348
  {&__pyx_n_icmp_pack_hdr, "icmp_pack_hdr"},
6349
  {&__pyx_n_ip, "ip"},
6350
  {&__pyx_n_ip6, "ip6"},
6351
  {&__pyx_n_ip6_aton, "ip6_aton"},
6352
  {&__pyx_n_ip6_checksum, "ip6_checksum"},
6353
  {&__pyx_n_ip6_ntoa, "ip6_ntoa"},
6354
  {&__pyx_n_ip6_pack_hdr, "ip6_pack_hdr"},
6355
  {&__pyx_n_ip_aton, "ip_aton"},
6356
  {&__pyx_n_ip_checksum, "ip_checksum"},
6357
  {&__pyx_n_ip_cksum_add, "ip_cksum_add"},
6358
  {&__pyx_n_ip_cksum_carry, "ip_cksum_carry"},
6359
  {&__pyx_n_ip_ntoa, "ip_ntoa"},
6360
  {&__pyx_n_ip_pack_hdr, "ip_pack_hdr"},
6361
  {&__pyx_n_iter, "iter"},
6362
  {&__pyx_n_len, "len"},
6363
  {&__pyx_n_link_addr, "link_addr"},
6364
  {&__pyx_n_loop, "loop"},
6365
  {&__pyx_n_mtu, "mtu"},
6366
  {&__pyx_n_name, "name"},
6367
  {&__pyx_n_op, "op"},
6368
  {&__pyx_n_proto, "proto"},
6369
  {&__pyx_n_sport, "sport"},
6370
  {&__pyx_n_src, "src"},
6371
  {&__pyx_n_tcp_pack_hdr, "tcp_pack_hdr"},
6372
  {&__pyx_n_type, "type"},
6373
  {&__pyx_n_udp_pack_hdr, "udp_pack_hdr"},
6374
  {0, 0}
6375
};
6376
6377
static __Pyx_StringTabEntry __pyx_string_tab[] = {
6378
  {&__pyx_k9p, __pyx_k9, sizeof(__pyx_k9)},
6379
  {&__pyx_k10p, __pyx_k10, sizeof(__pyx_k10)},
6380
  {&__pyx_k12p, __pyx_k12, sizeof(__pyx_k12)},
6381
  {&__pyx_k13p, __pyx_k13, sizeof(__pyx_k13)},
6382
  {&__pyx_k60p, __pyx_k60, sizeof(__pyx_k60)},
6383
  {&__pyx_k61p, __pyx_k61, sizeof(__pyx_k61)},
6384
  {&__pyx_k62p, __pyx_k62, sizeof(__pyx_k62)},
6385
  {&__pyx_k63p, __pyx_k63, sizeof(__pyx_k63)},
6386
  {&__pyx_k64p, __pyx_k64, sizeof(__pyx_k64)},
6387
  {&__pyx_k65p, __pyx_k65, sizeof(__pyx_k65)},
6388
  {&__pyx_k66p, __pyx_k66, sizeof(__pyx_k66)},
6389
  {&__pyx_k67p, __pyx_k67, sizeof(__pyx_k67)},
6390
  {&__pyx_k68p, __pyx_k68, sizeof(__pyx_k68)},
6391
  {&__pyx_k69p, __pyx_k69, sizeof(__pyx_k69)},
6392
  {&__pyx_k70p, __pyx_k70, sizeof(__pyx_k70)},
6393
  {&__pyx_k71p, __pyx_k71, sizeof(__pyx_k71)},
6394
  {&__pyx_k72p, __pyx_k72, sizeof(__pyx_k72)},
6395
  {&__pyx_k118p, __pyx_k118, sizeof(__pyx_k118)},
6396
  {&__pyx_k119p, __pyx_k119, sizeof(__pyx_k119)},
6397
  {0, 0, 0}
6398
};
6399
6400
static PyObject *__pyx_tp_new_4dnet_eth(PyTypeObject *t, PyObject *a, PyObject *k) {
5940
static PyObject *__pyx_tp_new_4dnet_eth(PyTypeObject *t, PyObject *a, PyObject *k) {
6401
  PyObject *o = (*t->tp_alloc)(t, 0);
5941
  PyObject *o = (*t->tp_alloc)(t, 0);
6402
  struct __pyx_obj_4dnet_eth *p = (struct __pyx_obj_4dnet_eth *)o;
5942
  if (!o) return 0;
6403
  return o;
5943
  return o;
6404
}
5944
}
6405
5945
6406
static void __pyx_tp_dealloc_4dnet_eth(PyObject *o) {
5946
static void __pyx_tp_dealloc_4dnet_eth(PyObject *o) {
6407
  struct __pyx_obj_4dnet_eth *p = (struct __pyx_obj_4dnet_eth *)o;
6408
  {
5947
  {
6409
    PyObject *etype, *eval, *etb;
5948
    PyObject *etype, *eval, *etb;
6410
    PyErr_Fetch(&etype, &eval, &etb);
5949
    PyErr_Fetch(&etype, &eval, &etb);
Lines 6417-6433 Link Here
6417
  (*o->ob_type->tp_free)(o);
5956
  (*o->ob_type->tp_free)(o);
6418
}
5957
}
6419
5958
6420
static int __pyx_tp_traverse_4dnet_eth(PyObject *o, visitproc v, void *a) {
6421
  int e;
6422
  struct __pyx_obj_4dnet_eth *p = (struct __pyx_obj_4dnet_eth *)o;
6423
  return 0;
6424
}
6425
6426
static int __pyx_tp_clear_4dnet_eth(PyObject *o) {
6427
  struct __pyx_obj_4dnet_eth *p = (struct __pyx_obj_4dnet_eth *)o;
6428
  return 0;
6429
}
6430
6431
static struct PyMethodDef __pyx_methods_4dnet_eth[] = {
5959
static struct PyMethodDef __pyx_methods_4dnet_eth[] = {
6432
  {"get", (PyCFunction)__pyx_f_4dnet_3eth_get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_3eth_get},
5960
  {"get", (PyCFunction)__pyx_f_4dnet_3eth_get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_3eth_get},
6433
  {"set", (PyCFunction)__pyx_f_4dnet_3eth_set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_3eth_set},
5961
  {"set", (PyCFunction)__pyx_f_4dnet_3eth_set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_3eth_set},
Lines 6474-6479 Link Here
6474
  0, /*nb_true_divide*/
6002
  0, /*nb_true_divide*/
6475
  0, /*nb_inplace_floor_divide*/
6003
  0, /*nb_inplace_floor_divide*/
6476
  0, /*nb_inplace_true_divide*/
6004
  0, /*nb_inplace_true_divide*/
6005
  #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
6006
  0, /*nb_index*/
6007
  #endif
6477
};
6008
};
6478
6009
6479
static PySequenceMethods __pyx_tp_as_sequence_eth = {
6010
static PySequenceMethods __pyx_tp_as_sequence_eth = {
Lines 6523-6532 Link Here
6523
  0, /*tp_getattro*/
6054
  0, /*tp_getattro*/
6524
  0, /*tp_setattro*/
6055
  0, /*tp_setattro*/
6525
  &__pyx_tp_as_buffer_eth, /*tp_as_buffer*/
6056
  &__pyx_tp_as_buffer_eth, /*tp_as_buffer*/
6526
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
6057
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/
6527
  "eth(device) -> Ethernet device object\n\n    Open the specified Ethernet device for sending.\n    ", /*tp_doc*/
6058
  "eth(device) -> Ethernet device object\n\n    Open the specified Ethernet device for sending.\n    ", /*tp_doc*/
6528
  __pyx_tp_traverse_4dnet_eth, /*tp_traverse*/
6059
  0, /*tp_traverse*/
6529
  __pyx_tp_clear_4dnet_eth, /*tp_clear*/
6060
  0, /*tp_clear*/
6530
  0, /*tp_richcompare*/
6061
  0, /*tp_richcompare*/
6531
  0, /*tp_weaklistoffset*/
6062
  0, /*tp_weaklistoffset*/
6532
  0, /*tp_iter*/
6063
  0, /*tp_iter*/
Lines 6553-6564 Link Here
6553
6084
6554
static PyObject *__pyx_tp_new_4dnet_ip(PyTypeObject *t, PyObject *a, PyObject *k) {
6085
static PyObject *__pyx_tp_new_4dnet_ip(PyTypeObject *t, PyObject *a, PyObject *k) {
6555
  PyObject *o = (*t->tp_alloc)(t, 0);
6086
  PyObject *o = (*t->tp_alloc)(t, 0);
6556
  struct __pyx_obj_4dnet_ip *p = (struct __pyx_obj_4dnet_ip *)o;
6087
  if (!o) return 0;
6557
  return o;
6088
  return o;
6558
}
6089
}
6559
6090
6560
static void __pyx_tp_dealloc_4dnet_ip(PyObject *o) {
6091
static void __pyx_tp_dealloc_4dnet_ip(PyObject *o) {
6561
  struct __pyx_obj_4dnet_ip *p = (struct __pyx_obj_4dnet_ip *)o;
6562
  {
6092
  {
6563
    PyObject *etype, *eval, *etb;
6093
    PyObject *etype, *eval, *etb;
6564
    PyErr_Fetch(&etype, &eval, &etb);
6094
    PyErr_Fetch(&etype, &eval, &etb);
Lines 6571-6587 Link Here
6571
  (*o->ob_type->tp_free)(o);
6101
  (*o->ob_type->tp_free)(o);
6572
}
6102
}
6573
6103
6574
static int __pyx_tp_traverse_4dnet_ip(PyObject *o, visitproc v, void *a) {
6575
  int e;
6576
  struct __pyx_obj_4dnet_ip *p = (struct __pyx_obj_4dnet_ip *)o;
6577
  return 0;
6578
}
6579
6580
static int __pyx_tp_clear_4dnet_ip(PyObject *o) {
6581
  struct __pyx_obj_4dnet_ip *p = (struct __pyx_obj_4dnet_ip *)o;
6582
  return 0;
6583
}
6584
6585
static struct PyMethodDef __pyx_methods_4dnet_ip[] = {
6104
static struct PyMethodDef __pyx_methods_4dnet_ip[] = {
6586
  {"send", (PyCFunction)__pyx_f_4dnet_2ip_send, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_2ip_send},
6105
  {"send", (PyCFunction)__pyx_f_4dnet_2ip_send, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_2ip_send},
6587
  {0, 0, 0, 0}
6106
  {0, 0, 0, 0}
Lines 6626-6631 Link Here
6626
  0, /*nb_true_divide*/
6145
  0, /*nb_true_divide*/
6627
  0, /*nb_inplace_floor_divide*/
6146
  0, /*nb_inplace_floor_divide*/
6628
  0, /*nb_inplace_true_divide*/
6147
  0, /*nb_inplace_true_divide*/
6148
  #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
6149
  0, /*nb_index*/
6150
  #endif
6629
};
6151
};
6630
6152
6631
static PySequenceMethods __pyx_tp_as_sequence_ip = {
6153
static PySequenceMethods __pyx_tp_as_sequence_ip = {
Lines 6675-6684 Link Here
6675
  0, /*tp_getattro*/
6197
  0, /*tp_getattro*/
6676
  0, /*tp_setattro*/
6198
  0, /*tp_setattro*/
6677
  &__pyx_tp_as_buffer_ip, /*tp_as_buffer*/
6199
  &__pyx_tp_as_buffer_ip, /*tp_as_buffer*/
6678
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
6200
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/
6679
  "ip() -> Raw IP object\n\n    Open a raw IP socket for sending.\n    ", /*tp_doc*/
6201
  "ip() -> Raw IP object\n\n    Open a raw IP socket for sending.\n    ", /*tp_doc*/
6680
  __pyx_tp_traverse_4dnet_ip, /*tp_traverse*/
6202
  0, /*tp_traverse*/
6681
  __pyx_tp_clear_4dnet_ip, /*tp_clear*/
6203
  0, /*tp_clear*/
6682
  0, /*tp_richcompare*/
6204
  0, /*tp_richcompare*/
6683
  0, /*tp_weaklistoffset*/
6205
  0, /*tp_weaklistoffset*/
6684
  0, /*tp_iter*/
6206
  0, /*tp_iter*/
Lines 6705-6730 Link Here
6705
6227
6706
static PyObject *__pyx_tp_new_4dnet_addr(PyTypeObject *t, PyObject *a, PyObject *k) {
6228
static PyObject *__pyx_tp_new_4dnet_addr(PyTypeObject *t, PyObject *a, PyObject *k) {
6707
  PyObject *o = (*t->tp_alloc)(t, 0);
6229
  PyObject *o = (*t->tp_alloc)(t, 0);
6708
  struct __pyx_obj_4dnet_addr *p = (struct __pyx_obj_4dnet_addr *)o;
6230
  if (!o) return 0;
6709
  return o;
6231
  return o;
6710
}
6232
}
6711
6233
6712
static void __pyx_tp_dealloc_4dnet_addr(PyObject *o) {
6234
static void __pyx_tp_dealloc_4dnet_addr(PyObject *o) {
6713
  struct __pyx_obj_4dnet_addr *p = (struct __pyx_obj_4dnet_addr *)o;
6714
  (*o->ob_type->tp_free)(o);
6235
  (*o->ob_type->tp_free)(o);
6715
}
6236
}
6716
6237
6717
static int __pyx_tp_traverse_4dnet_addr(PyObject *o, visitproc v, void *a) {
6718
  int e;
6719
  struct __pyx_obj_4dnet_addr *p = (struct __pyx_obj_4dnet_addr *)o;
6720
  return 0;
6721
}
6722
6723
static int __pyx_tp_clear_4dnet_addr(PyObject *o) {
6724
  struct __pyx_obj_4dnet_addr *p = (struct __pyx_obj_4dnet_addr *)o;
6725
  return 0;
6726
}
6727
6728
static PyObject *__pyx_getprop_4dnet_4addr_type(PyObject *o, void *x) {
6238
static PyObject *__pyx_getprop_4dnet_4addr_type(PyObject *o, void *x) {
6729
  return __pyx_f_4dnet_4addr_4type___get__(o);
6239
  return __pyx_f_4dnet_4addr_4type___get__(o);
6730
}
6240
}
Lines 6807-6818 Link Here
6807
};
6317
};
6808
6318
6809
static struct PyGetSetDef __pyx_getsets_4dnet_addr[] = {
6319
static struct PyGetSetDef __pyx_getsets_4dnet_addr[] = {
6810
  {"type", __pyx_getprop_4dnet_4addr_type, __pyx_setprop_4dnet_4addr_type, __pyx_k1, 0},
6320
  {"type", __pyx_getprop_4dnet_4addr_type, __pyx_setprop_4dnet_4addr_type, __pyx_k51, 0},
6811
  {"bits", __pyx_getprop_4dnet_4addr_bits, __pyx_setprop_4dnet_4addr_bits, __pyx_k2, 0},
6321
  {"bits", __pyx_getprop_4dnet_4addr_bits, __pyx_setprop_4dnet_4addr_bits, __pyx_k52, 0},
6812
  {"data", __pyx_getprop_4dnet_4addr_data, 0, __pyx_k3, 0},
6322
  {"data", __pyx_getprop_4dnet_4addr_data, 0, __pyx_k53, 0},
6813
  {"eth", __pyx_getprop_4dnet_4addr_eth, __pyx_setprop_4dnet_4addr_eth, __pyx_k4, 0},
6323
  {"eth", __pyx_getprop_4dnet_4addr_eth, __pyx_setprop_4dnet_4addr_eth, __pyx_k54, 0},
6814
  {"ip", __pyx_getprop_4dnet_4addr_ip, __pyx_setprop_4dnet_4addr_ip, __pyx_k5, 0},
6324
  {"ip", __pyx_getprop_4dnet_4addr_ip, __pyx_setprop_4dnet_4addr_ip, __pyx_k55, 0},
6815
  {"ip6", __pyx_getprop_4dnet_4addr_ip6, __pyx_setprop_4dnet_4addr_ip6, __pyx_k6, 0},
6325
  {"ip6", __pyx_getprop_4dnet_4addr_ip6, __pyx_setprop_4dnet_4addr_ip6, __pyx_k56, 0},
6816
  {0, 0, 0, 0, 0}
6326
  {0, 0, 0, 0, 0}
6817
};
6327
};
6818
6328
Lines 6855-6860 Link Here
6855
  0, /*nb_true_divide*/
6365
  0, /*nb_true_divide*/
6856
  0, /*nb_inplace_floor_divide*/
6366
  0, /*nb_inplace_floor_divide*/
6857
  0, /*nb_inplace_true_divide*/
6367
  0, /*nb_inplace_true_divide*/
6368
  #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
6369
  0, /*nb_index*/
6370
  #endif
6858
};
6371
};
6859
6372
6860
static PySequenceMethods __pyx_tp_as_sequence_addr = {
6373
static PySequenceMethods __pyx_tp_as_sequence_addr = {
Lines 6904-6913 Link Here
6904
  0, /*tp_getattro*/
6417
  0, /*tp_getattro*/
6905
  0, /*tp_setattro*/
6418
  0, /*tp_setattro*/
6906
  &__pyx_tp_as_buffer_addr, /*tp_as_buffer*/
6419
  &__pyx_tp_as_buffer_addr, /*tp_as_buffer*/
6907
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
6420
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/
6908
  "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*/
6421
  "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*/
6909
  __pyx_tp_traverse_4dnet_addr, /*tp_traverse*/
6422
  0, /*tp_traverse*/
6910
  __pyx_tp_clear_4dnet_addr, /*tp_clear*/
6423
  0, /*tp_clear*/
6911
  0, /*tp_richcompare*/
6424
  0, /*tp_richcompare*/
6912
  0, /*tp_weaklistoffset*/
6425
  0, /*tp_weaklistoffset*/
6913
  __pyx_f_4dnet_4addr___iter__, /*tp_iter*/
6426
  __pyx_f_4dnet_4addr___iter__, /*tp_iter*/
Lines 6934-6959 Link Here
6934
6447
6935
static PyObject *__pyx_tp_new_4dnet___addr_ip4_iter(PyTypeObject *t, PyObject *a, PyObject *k) {
6448
static PyObject *__pyx_tp_new_4dnet___addr_ip4_iter(PyTypeObject *t, PyObject *a, PyObject *k) {
6936
  PyObject *o = (*t->tp_alloc)(t, 0);
6449
  PyObject *o = (*t->tp_alloc)(t, 0);
6937
  struct __pyx_obj_4dnet___addr_ip4_iter *p = (struct __pyx_obj_4dnet___addr_ip4_iter *)o;
6450
  if (!o) return 0;
6938
  return o;
6451
  return o;
6939
}
6452
}
6940
6453
6941
static void __pyx_tp_dealloc_4dnet___addr_ip4_iter(PyObject *o) {
6454
static void __pyx_tp_dealloc_4dnet___addr_ip4_iter(PyObject *o) {
6942
  struct __pyx_obj_4dnet___addr_ip4_iter *p = (struct __pyx_obj_4dnet___addr_ip4_iter *)o;
6943
  (*o->ob_type->tp_free)(o);
6455
  (*o->ob_type->tp_free)(o);
6944
}
6456
}
6945
6457
6946
static int __pyx_tp_traverse_4dnet___addr_ip4_iter(PyObject *o, visitproc v, void *a) {
6947
  int e;
6948
  struct __pyx_obj_4dnet___addr_ip4_iter *p = (struct __pyx_obj_4dnet___addr_ip4_iter *)o;
6949
  return 0;
6950
}
6951
6952
static int __pyx_tp_clear_4dnet___addr_ip4_iter(PyObject *o) {
6953
  struct __pyx_obj_4dnet___addr_ip4_iter *p = (struct __pyx_obj_4dnet___addr_ip4_iter *)o;
6954
  return 0;
6955
}
6956
6957
static struct PyMethodDef __pyx_methods_4dnet___addr_ip4_iter[] = {
6458
static struct PyMethodDef __pyx_methods_4dnet___addr_ip4_iter[] = {
6958
  {0, 0, 0, 0}
6459
  {0, 0, 0, 0}
6959
};
6460
};
Lines 6997-7002 Link Here
6997
  0, /*nb_true_divide*/
6498
  0, /*nb_true_divide*/
6998
  0, /*nb_inplace_floor_divide*/
6499
  0, /*nb_inplace_floor_divide*/
6999
  0, /*nb_inplace_true_divide*/
6500
  0, /*nb_inplace_true_divide*/
6501
  #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
6502
  0, /*nb_index*/
6503
  #endif
7000
};
6504
};
7001
6505
7002
static PySequenceMethods __pyx_tp_as_sequence___addr_ip4_iter = {
6506
static PySequenceMethods __pyx_tp_as_sequence___addr_ip4_iter = {
Lines 7046-7055 Link Here
7046
  0, /*tp_getattro*/
6550
  0, /*tp_getattro*/
7047
  0, /*tp_setattro*/
6551
  0, /*tp_setattro*/
7048
  &__pyx_tp_as_buffer___addr_ip4_iter, /*tp_as_buffer*/
6552
  &__pyx_tp_as_buffer___addr_ip4_iter, /*tp_as_buffer*/
7049
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
6553
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/
7050
  0, /*tp_doc*/
6554
  0, /*tp_doc*/
7051
  __pyx_tp_traverse_4dnet___addr_ip4_iter, /*tp_traverse*/
6555
  0, /*tp_traverse*/
7052
  __pyx_tp_clear_4dnet___addr_ip4_iter, /*tp_clear*/
6556
  0, /*tp_clear*/
7053
  0, /*tp_richcompare*/
6557
  0, /*tp_richcompare*/
7054
  0, /*tp_weaklistoffset*/
6558
  0, /*tp_weaklistoffset*/
7055
  0, /*tp_iter*/
6559
  0, /*tp_iter*/
Lines 7076-7087 Link Here
7076
6580
7077
static PyObject *__pyx_tp_new_4dnet_arp(PyTypeObject *t, PyObject *a, PyObject *k) {
6581
static PyObject *__pyx_tp_new_4dnet_arp(PyTypeObject *t, PyObject *a, PyObject *k) {
7078
  PyObject *o = (*t->tp_alloc)(t, 0);
6582
  PyObject *o = (*t->tp_alloc)(t, 0);
7079
  struct __pyx_obj_4dnet_arp *p = (struct __pyx_obj_4dnet_arp *)o;
6583
  if (!o) return 0;
7080
  return o;
6584
  return o;
7081
}
6585
}
7082
6586
7083
static void __pyx_tp_dealloc_4dnet_arp(PyObject *o) {
6587
static void __pyx_tp_dealloc_4dnet_arp(PyObject *o) {
7084
  struct __pyx_obj_4dnet_arp *p = (struct __pyx_obj_4dnet_arp *)o;
7085
  {
6588
  {
7086
    PyObject *etype, *eval, *etb;
6589
    PyObject *etype, *eval, *etb;
7087
    PyErr_Fetch(&etype, &eval, &etb);
6590
    PyErr_Fetch(&etype, &eval, &etb);
Lines 7094-7110 Link Here
7094
  (*o->ob_type->tp_free)(o);
6597
  (*o->ob_type->tp_free)(o);
7095
}
6598
}
7096
6599
7097
static int __pyx_tp_traverse_4dnet_arp(PyObject *o, visitproc v, void *a) {
7098
  int e;
7099
  struct __pyx_obj_4dnet_arp *p = (struct __pyx_obj_4dnet_arp *)o;
7100
  return 0;
7101
}
7102
7103
static int __pyx_tp_clear_4dnet_arp(PyObject *o) {
7104
  struct __pyx_obj_4dnet_arp *p = (struct __pyx_obj_4dnet_arp *)o;
7105
  return 0;
7106
}
7107
7108
static struct PyMethodDef __pyx_methods_4dnet_arp[] = {
6600
static struct PyMethodDef __pyx_methods_4dnet_arp[] = {
7109
  {"add", (PyCFunction)__pyx_f_4dnet_3arp_add, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_3arp_add},
6601
  {"add", (PyCFunction)__pyx_f_4dnet_3arp_add, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_3arp_add},
7110
  {"delete", (PyCFunction)__pyx_f_4dnet_3arp_delete, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_3arp_delete},
6602
  {"delete", (PyCFunction)__pyx_f_4dnet_3arp_delete, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_3arp_delete},
Lines 7152-7157 Link Here
7152
  0, /*nb_true_divide*/
6644
  0, /*nb_true_divide*/
7153
  0, /*nb_inplace_floor_divide*/
6645
  0, /*nb_inplace_floor_divide*/
7154
  0, /*nb_inplace_true_divide*/
6646
  0, /*nb_inplace_true_divide*/
6647
  #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
6648
  0, /*nb_index*/
6649
  #endif
7155
};
6650
};
7156
6651
7157
static PySequenceMethods __pyx_tp_as_sequence_arp = {
6652
static PySequenceMethods __pyx_tp_as_sequence_arp = {
Lines 7201-7210 Link Here
7201
  0, /*tp_getattro*/
6696
  0, /*tp_getattro*/
7202
  0, /*tp_setattro*/
6697
  0, /*tp_setattro*/
7203
  &__pyx_tp_as_buffer_arp, /*tp_as_buffer*/
6698
  &__pyx_tp_as_buffer_arp, /*tp_as_buffer*/
7204
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
6699
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/
7205
  "arp() -> ARP table object\n\n    Open a handle to the system ARP table.\n    ", /*tp_doc*/
6700
  "arp() -> ARP table object\n\n    Open a handle to the system ARP table.\n    ", /*tp_doc*/
7206
  __pyx_tp_traverse_4dnet_arp, /*tp_traverse*/
6701
  0, /*tp_traverse*/
7207
  __pyx_tp_clear_4dnet_arp, /*tp_clear*/
6702
  0, /*tp_clear*/
7208
  0, /*tp_richcompare*/
6703
  0, /*tp_richcompare*/
7209
  0, /*tp_weaklistoffset*/
6704
  0, /*tp_weaklistoffset*/
7210
  __pyx_f_4dnet_3arp___iter__, /*tp_iter*/
6705
  __pyx_f_4dnet_3arp___iter__, /*tp_iter*/
Lines 7231-7242 Link Here
7231
6726
7232
static PyObject *__pyx_tp_new_4dnet_intf(PyTypeObject *t, PyObject *a, PyObject *k) {
6727
static PyObject *__pyx_tp_new_4dnet_intf(PyTypeObject *t, PyObject *a, PyObject *k) {
7233
  PyObject *o = (*t->tp_alloc)(t, 0);
6728
  PyObject *o = (*t->tp_alloc)(t, 0);
7234
  struct __pyx_obj_4dnet_intf *p = (struct __pyx_obj_4dnet_intf *)o;
6729
  if (!o) return 0;
7235
  return o;
6730
  return o;
7236
}
6731
}
7237
6732
7238
static void __pyx_tp_dealloc_4dnet_intf(PyObject *o) {
6733
static void __pyx_tp_dealloc_4dnet_intf(PyObject *o) {
7239
  struct __pyx_obj_4dnet_intf *p = (struct __pyx_obj_4dnet_intf *)o;
7240
  {
6734
  {
7241
    PyObject *etype, *eval, *etb;
6735
    PyObject *etype, *eval, *etb;
7242
    PyErr_Fetch(&etype, &eval, &etb);
6736
    PyErr_Fetch(&etype, &eval, &etb);
Lines 7249-7265 Link Here
7249
  (*o->ob_type->tp_free)(o);
6743
  (*o->ob_type->tp_free)(o);
7250
}
6744
}
7251
6745
7252
static int __pyx_tp_traverse_4dnet_intf(PyObject *o, visitproc v, void *a) {
7253
  int e;
7254
  struct __pyx_obj_4dnet_intf *p = (struct __pyx_obj_4dnet_intf *)o;
7255
  return 0;
7256
}
7257
7258
static int __pyx_tp_clear_4dnet_intf(PyObject *o) {
7259
  struct __pyx_obj_4dnet_intf *p = (struct __pyx_obj_4dnet_intf *)o;
7260
  return 0;
7261
}
7262
7263
static struct PyMethodDef __pyx_methods_4dnet_intf[] = {
6746
static struct PyMethodDef __pyx_methods_4dnet_intf[] = {
7264
  {"get", (PyCFunction)__pyx_f_4dnet_4intf_get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_4intf_get},
6747
  {"get", (PyCFunction)__pyx_f_4dnet_4intf_get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_4intf_get},
7265
  {"get_src", (PyCFunction)__pyx_f_4dnet_4intf_get_src, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_4intf_get_src},
6748
  {"get_src", (PyCFunction)__pyx_f_4dnet_4intf_get_src, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_4intf_get_src},
Lines 7308-7313 Link Here
7308
  0, /*nb_true_divide*/
6791
  0, /*nb_true_divide*/
7309
  0, /*nb_inplace_floor_divide*/
6792
  0, /*nb_inplace_floor_divide*/
7310
  0, /*nb_inplace_true_divide*/
6793
  0, /*nb_inplace_true_divide*/
6794
  #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
6795
  0, /*nb_index*/
6796
  #endif
7311
};
6797
};
7312
6798
7313
static PySequenceMethods __pyx_tp_as_sequence_intf = {
6799
static PySequenceMethods __pyx_tp_as_sequence_intf = {
Lines 7357-7366 Link Here
7357
  0, /*tp_getattro*/
6843
  0, /*tp_getattro*/
7358
  0, /*tp_setattro*/
6844
  0, /*tp_setattro*/
7359
  &__pyx_tp_as_buffer_intf, /*tp_as_buffer*/
6845
  &__pyx_tp_as_buffer_intf, /*tp_as_buffer*/
7360
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
6846
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/
7361
  "intf() -> Interface table object\n\n    Open a handle to the system network interface table.\n    ", /*tp_doc*/
6847
  "intf() -> Interface table object\n\n    Open a handle to the system network interface table.\n    ", /*tp_doc*/
7362
  __pyx_tp_traverse_4dnet_intf, /*tp_traverse*/
6848
  0, /*tp_traverse*/
7363
  __pyx_tp_clear_4dnet_intf, /*tp_clear*/
6849
  0, /*tp_clear*/
7364
  0, /*tp_richcompare*/
6850
  0, /*tp_richcompare*/
7365
  0, /*tp_weaklistoffset*/
6851
  0, /*tp_weaklistoffset*/
7366
  __pyx_f_4dnet_4intf___iter__, /*tp_iter*/
6852
  __pyx_f_4dnet_4intf___iter__, /*tp_iter*/
Lines 7387-7398 Link Here
7387
6873
7388
static PyObject *__pyx_tp_new_4dnet_route(PyTypeObject *t, PyObject *a, PyObject *k) {
6874
static PyObject *__pyx_tp_new_4dnet_route(PyTypeObject *t, PyObject *a, PyObject *k) {
7389
  PyObject *o = (*t->tp_alloc)(t, 0);
6875
  PyObject *o = (*t->tp_alloc)(t, 0);
7390
  struct __pyx_obj_4dnet_route *p = (struct __pyx_obj_4dnet_route *)o;
6876
  if (!o) return 0;
7391
  return o;
6877
  return o;
7392
}
6878
}
7393
6879
7394
static void __pyx_tp_dealloc_4dnet_route(PyObject *o) {
6880
static void __pyx_tp_dealloc_4dnet_route(PyObject *o) {
7395
  struct __pyx_obj_4dnet_route *p = (struct __pyx_obj_4dnet_route *)o;
7396
  {
6881
  {
7397
    PyObject *etype, *eval, *etb;
6882
    PyObject *etype, *eval, *etb;
7398
    PyErr_Fetch(&etype, &eval, &etb);
6883
    PyErr_Fetch(&etype, &eval, &etb);
Lines 7405-7421 Link Here
7405
  (*o->ob_type->tp_free)(o);
6890
  (*o->ob_type->tp_free)(o);
7406
}
6891
}
7407
6892
7408
static int __pyx_tp_traverse_4dnet_route(PyObject *o, visitproc v, void *a) {
7409
  int e;
7410
  struct __pyx_obj_4dnet_route *p = (struct __pyx_obj_4dnet_route *)o;
7411
  return 0;
7412
}
7413
7414
static int __pyx_tp_clear_4dnet_route(PyObject *o) {
7415
  struct __pyx_obj_4dnet_route *p = (struct __pyx_obj_4dnet_route *)o;
7416
  return 0;
7417
}
7418
7419
static struct PyMethodDef __pyx_methods_4dnet_route[] = {
6893
static struct PyMethodDef __pyx_methods_4dnet_route[] = {
7420
  {"add", (PyCFunction)__pyx_f_4dnet_5route_add, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_5route_add},
6894
  {"add", (PyCFunction)__pyx_f_4dnet_5route_add, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_5route_add},
7421
  {"delete", (PyCFunction)__pyx_f_4dnet_5route_delete, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_5route_delete},
6895
  {"delete", (PyCFunction)__pyx_f_4dnet_5route_delete, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_5route_delete},
Lines 7463-7468 Link Here
7463
  0, /*nb_true_divide*/
6937
  0, /*nb_true_divide*/
7464
  0, /*nb_inplace_floor_divide*/
6938
  0, /*nb_inplace_floor_divide*/
7465
  0, /*nb_inplace_true_divide*/
6939
  0, /*nb_inplace_true_divide*/
6940
  #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
6941
  0, /*nb_index*/
6942
  #endif
7466
};
6943
};
7467
6944
7468
static PySequenceMethods __pyx_tp_as_sequence_route = {
6945
static PySequenceMethods __pyx_tp_as_sequence_route = {
Lines 7512-7521 Link Here
7512
  0, /*tp_getattro*/
6989
  0, /*tp_getattro*/
7513
  0, /*tp_setattro*/
6990
  0, /*tp_setattro*/
7514
  &__pyx_tp_as_buffer_route, /*tp_as_buffer*/
6991
  &__pyx_tp_as_buffer_route, /*tp_as_buffer*/
7515
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
6992
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/
7516
  "route() -> Routing table object\n\n    Open a handle to the system routing table.\n    ", /*tp_doc*/
6993
  "route() -> Routing table object\n\n    Open a handle to the system routing table.\n    ", /*tp_doc*/
7517
  __pyx_tp_traverse_4dnet_route, /*tp_traverse*/
6994
  0, /*tp_traverse*/
7518
  __pyx_tp_clear_4dnet_route, /*tp_clear*/
6995
  0, /*tp_clear*/
7519
  0, /*tp_richcompare*/
6996
  0, /*tp_richcompare*/
7520
  0, /*tp_weaklistoffset*/
6997
  0, /*tp_weaklistoffset*/
7521
  __pyx_f_4dnet_5route___iter__, /*tp_iter*/
6998
  __pyx_f_4dnet_5route___iter__, /*tp_iter*/
Lines 7542-7553 Link Here
7542
7019
7543
static PyObject *__pyx_tp_new_4dnet_fw(PyTypeObject *t, PyObject *a, PyObject *k) {
7020
static PyObject *__pyx_tp_new_4dnet_fw(PyTypeObject *t, PyObject *a, PyObject *k) {
7544
  PyObject *o = (*t->tp_alloc)(t, 0);
7021
  PyObject *o = (*t->tp_alloc)(t, 0);
7545
  struct __pyx_obj_4dnet_fw *p = (struct __pyx_obj_4dnet_fw *)o;
7022
  if (!o) return 0;
7546
  return o;
7023
  return o;
7547
}
7024
}
7548
7025
7549
static void __pyx_tp_dealloc_4dnet_fw(PyObject *o) {
7026
static void __pyx_tp_dealloc_4dnet_fw(PyObject *o) {
7550
  struct __pyx_obj_4dnet_fw *p = (struct __pyx_obj_4dnet_fw *)o;
7551
  {
7027
  {
7552
    PyObject *etype, *eval, *etb;
7028
    PyObject *etype, *eval, *etb;
7553
    PyErr_Fetch(&etype, &eval, &etb);
7029
    PyErr_Fetch(&etype, &eval, &etb);
Lines 7560-7576 Link Here
7560
  (*o->ob_type->tp_free)(o);
7036
  (*o->ob_type->tp_free)(o);
7561
}
7037
}
7562
7038
7563
static int __pyx_tp_traverse_4dnet_fw(PyObject *o, visitproc v, void *a) {
7564
  int e;
7565
  struct __pyx_obj_4dnet_fw *p = (struct __pyx_obj_4dnet_fw *)o;
7566
  return 0;
7567
}
7568
7569
static int __pyx_tp_clear_4dnet_fw(PyObject *o) {
7570
  struct __pyx_obj_4dnet_fw *p = (struct __pyx_obj_4dnet_fw *)o;
7571
  return 0;
7572
}
7573
7574
static struct PyMethodDef __pyx_methods_4dnet_fw[] = {
7039
static struct PyMethodDef __pyx_methods_4dnet_fw[] = {
7575
  {"add", (PyCFunction)__pyx_f_4dnet_2fw_add, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_2fw_add},
7040
  {"add", (PyCFunction)__pyx_f_4dnet_2fw_add, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_2fw_add},
7576
  {"delete", (PyCFunction)__pyx_f_4dnet_2fw_delete, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_2fw_delete},
7041
  {"delete", (PyCFunction)__pyx_f_4dnet_2fw_delete, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_2fw_delete},
Lines 7617-7622 Link Here
7617
  0, /*nb_true_divide*/
7082
  0, /*nb_true_divide*/
7618
  0, /*nb_inplace_floor_divide*/
7083
  0, /*nb_inplace_floor_divide*/
7619
  0, /*nb_inplace_true_divide*/
7084
  0, /*nb_inplace_true_divide*/
7085
  #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
7086
  0, /*nb_index*/
7087
  #endif
7620
};
7088
};
7621
7089
7622
static PySequenceMethods __pyx_tp_as_sequence_fw = {
7090
static PySequenceMethods __pyx_tp_as_sequence_fw = {
Lines 7666-7675 Link Here
7666
  0, /*tp_getattro*/
7134
  0, /*tp_getattro*/
7667
  0, /*tp_setattro*/
7135
  0, /*tp_setattro*/
7668
  &__pyx_tp_as_buffer_fw, /*tp_as_buffer*/
7136
  &__pyx_tp_as_buffer_fw, /*tp_as_buffer*/
7669
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
7137
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/
7670
  "fw() -> Firewall ruleset object\n    \n    Open a handle to the local network firewall configuration.\n    ", /*tp_doc*/
7138
  "fw() -> Firewall ruleset object\n    \n    Open a handle to the local network firewall configuration.\n    ", /*tp_doc*/
7671
  __pyx_tp_traverse_4dnet_fw, /*tp_traverse*/
7139
  0, /*tp_traverse*/
7672
  __pyx_tp_clear_4dnet_fw, /*tp_clear*/
7140
  0, /*tp_clear*/
7673
  0, /*tp_richcompare*/
7141
  0, /*tp_richcompare*/
7674
  0, /*tp_weaklistoffset*/
7142
  0, /*tp_weaklistoffset*/
7675
  __pyx_f_4dnet_2fw___iter__, /*tp_iter*/
7143
  __pyx_f_4dnet_2fw___iter__, /*tp_iter*/
Lines 7696-7707 Link Here
7696
7164
7697
static PyObject *__pyx_tp_new_4dnet_rand(PyTypeObject *t, PyObject *a, PyObject *k) {
7165
static PyObject *__pyx_tp_new_4dnet_rand(PyTypeObject *t, PyObject *a, PyObject *k) {
7698
  PyObject *o = (*t->tp_alloc)(t, 0);
7166
  PyObject *o = (*t->tp_alloc)(t, 0);
7699
  struct __pyx_obj_4dnet_rand *p = (struct __pyx_obj_4dnet_rand *)o;
7167
  if (!o) return 0;
7700
  return o;
7168
  return o;
7701
}
7169
}
7702
7170
7703
static void __pyx_tp_dealloc_4dnet_rand(PyObject *o) {
7171
static void __pyx_tp_dealloc_4dnet_rand(PyObject *o) {
7704
  struct __pyx_obj_4dnet_rand *p = (struct __pyx_obj_4dnet_rand *)o;
7705
  {
7172
  {
7706
    PyObject *etype, *eval, *etb;
7173
    PyObject *etype, *eval, *etb;
7707
    PyErr_Fetch(&etype, &eval, &etb);
7174
    PyErr_Fetch(&etype, &eval, &etb);
Lines 7714-7730 Link Here
7714
  (*o->ob_type->tp_free)(o);
7181
  (*o->ob_type->tp_free)(o);
7715
}
7182
}
7716
7183
7717
static int __pyx_tp_traverse_4dnet_rand(PyObject *o, visitproc v, void *a) {
7718
  int e;
7719
  struct __pyx_obj_4dnet_rand *p = (struct __pyx_obj_4dnet_rand *)o;
7720
  return 0;
7721
}
7722
7723
static int __pyx_tp_clear_4dnet_rand(PyObject *o) {
7724
  struct __pyx_obj_4dnet_rand *p = (struct __pyx_obj_4dnet_rand *)o;
7725
  return 0;
7726
}
7727
7728
static struct PyMethodDef __pyx_methods_4dnet_rand[] = {
7184
static struct PyMethodDef __pyx_methods_4dnet_rand[] = {
7729
  {"get", (PyCFunction)__pyx_f_4dnet_4rand_get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_4rand_get},
7185
  {"get", (PyCFunction)__pyx_f_4dnet_4rand_get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_4rand_get},
7730
  {"set", (PyCFunction)__pyx_f_4dnet_4rand_set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_4rand_set},
7186
  {"set", (PyCFunction)__pyx_f_4dnet_4rand_set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4dnet_4rand_set},
Lines 7775-7780 Link Here
7775
  0, /*nb_true_divide*/
7231
  0, /*nb_true_divide*/
7776
  0, /*nb_inplace_floor_divide*/
7232
  0, /*nb_inplace_floor_divide*/
7777
  0, /*nb_inplace_true_divide*/
7233
  0, /*nb_inplace_true_divide*/
7234
  #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
7235
  0, /*nb_index*/
7236
  #endif
7778
};
7237
};
7779
7238
7780
static PySequenceMethods __pyx_tp_as_sequence_rand = {
7239
static PySequenceMethods __pyx_tp_as_sequence_rand = {
Lines 7824-7833 Link Here
7824
  0, /*tp_getattro*/
7283
  0, /*tp_getattro*/
7825
  0, /*tp_setattro*/
7284
  0, /*tp_setattro*/
7826
  &__pyx_tp_as_buffer_rand, /*tp_as_buffer*/
7285
  &__pyx_tp_as_buffer_rand, /*tp_as_buffer*/
7827
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
7286
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/
7828
  "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*/
7287
  "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*/
7829
  __pyx_tp_traverse_4dnet_rand, /*tp_traverse*/
7288
  0, /*tp_traverse*/
7830
  __pyx_tp_clear_4dnet_rand, /*tp_clear*/
7289
  0, /*tp_clear*/
7831
  0, /*tp_richcompare*/
7290
  0, /*tp_richcompare*/
7832
  0, /*tp_weaklistoffset*/
7291
  0, /*tp_weaklistoffset*/
7833
  0, /*tp_iter*/
7292
  0, /*tp_iter*/
Lines 7854-7879 Link Here
7854
7313
7855
static PyObject *__pyx_tp_new_4dnet___rand_xrange(PyTypeObject *t, PyObject *a, PyObject *k) {
7314
static PyObject *__pyx_tp_new_4dnet___rand_xrange(PyTypeObject *t, PyObject *a, PyObject *k) {
7856
  PyObject *o = (*t->tp_alloc)(t, 0);
7315
  PyObject *o = (*t->tp_alloc)(t, 0);
7857
  struct __pyx_obj_4dnet___rand_xrange *p = (struct __pyx_obj_4dnet___rand_xrange *)o;
7316
  if (!o) return 0;
7858
  return o;
7317
  return o;
7859
}
7318
}
7860
7319
7861
static void __pyx_tp_dealloc_4dnet___rand_xrange(PyObject *o) {
7320
static void __pyx_tp_dealloc_4dnet___rand_xrange(PyObject *o) {
7862
  struct __pyx_obj_4dnet___rand_xrange *p = (struct __pyx_obj_4dnet___rand_xrange *)o;
7863
  (*o->ob_type->tp_free)(o);
7321
  (*o->ob_type->tp_free)(o);
7864
}
7322
}
7865
7323
7866
static int __pyx_tp_traverse_4dnet___rand_xrange(PyObject *o, visitproc v, void *a) {
7867
  int e;
7868
  struct __pyx_obj_4dnet___rand_xrange *p = (struct __pyx_obj_4dnet___rand_xrange *)o;
7869
  return 0;
7870
}
7871
7872
static int __pyx_tp_clear_4dnet___rand_xrange(PyObject *o) {
7873
  struct __pyx_obj_4dnet___rand_xrange *p = (struct __pyx_obj_4dnet___rand_xrange *)o;
7874
  return 0;
7875
}
7876
7877
static struct PyMethodDef __pyx_methods_4dnet___rand_xrange[] = {
7324
static struct PyMethodDef __pyx_methods_4dnet___rand_xrange[] = {
7878
  {0, 0, 0, 0}
7325
  {0, 0, 0, 0}
7879
};
7326
};
Lines 7917-7922 Link Here
7917
  0, /*nb_true_divide*/
7364
  0, /*nb_true_divide*/
7918
  0, /*nb_inplace_floor_divide*/
7365
  0, /*nb_inplace_floor_divide*/
7919
  0, /*nb_inplace_true_divide*/
7366
  0, /*nb_inplace_true_divide*/
7367
  #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
7368
  0, /*nb_index*/
7369
  #endif
7920
};
7370
};
7921
7371
7922
static PySequenceMethods __pyx_tp_as_sequence___rand_xrange = {
7372
static PySequenceMethods __pyx_tp_as_sequence___rand_xrange = {
Lines 7966-7975 Link Here
7966
  0, /*tp_getattro*/
7416
  0, /*tp_getattro*/
7967
  0, /*tp_setattro*/
7417
  0, /*tp_setattro*/
7968
  &__pyx_tp_as_buffer___rand_xrange, /*tp_as_buffer*/
7418
  &__pyx_tp_as_buffer___rand_xrange, /*tp_as_buffer*/
7969
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
7419
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/
7970
  0, /*tp_doc*/
7420
  0, /*tp_doc*/
7971
  __pyx_tp_traverse_4dnet___rand_xrange, /*tp_traverse*/
7421
  0, /*tp_traverse*/
7972
  __pyx_tp_clear_4dnet___rand_xrange, /*tp_clear*/
7422
  0, /*tp_clear*/
7973
  0, /*tp_richcompare*/
7423
  0, /*tp_richcompare*/
7974
  0, /*tp_weaklistoffset*/
7424
  0, /*tp_weaklistoffset*/
7975
  __pyx_f_4dnet_13__rand_xrange___iter__, /*tp_iter*/
7425
  __pyx_f_4dnet_13__rand_xrange___iter__, /*tp_iter*/
Lines 7996-8007 Link Here
7996
7446
7997
static PyObject *__pyx_tp_new_4dnet_tun(PyTypeObject *t, PyObject *a, PyObject *k) {
7447
static PyObject *__pyx_tp_new_4dnet_tun(PyTypeObject *t, PyObject *a, PyObject *k) {
7998
  PyObject *o = (*t->tp_alloc)(t, 0);
7448
  PyObject *o = (*t->tp_alloc)(t, 0);
7999
  struct __pyx_obj_4dnet_tun *p = (struct __pyx_obj_4dnet_tun *)o;
7449
  if (!o) return 0;
8000
  return o;
7450
  return o;
8001
}
7451
}
8002
7452
8003
static void __pyx_tp_dealloc_4dnet_tun(PyObject *o) {
7453
static void __pyx_tp_dealloc_4dnet_tun(PyObject *o) {
8004
  struct __pyx_obj_4dnet_tun *p = (struct __pyx_obj_4dnet_tun *)o;
8005
  {
7454
  {
8006
    PyObject *etype, *eval, *etb;
7455
    PyObject *etype, *eval, *etb;
8007
    PyErr_Fetch(&etype, &eval, &etb);
7456
    PyErr_Fetch(&etype, &eval, &etb);
Lines 8014-8030 Link Here
8014
  (*o->ob_type->tp_free)(o);
7463
  (*o->ob_type->tp_free)(o);
8015
}
7464
}
8016
7465
8017
static int __pyx_tp_traverse_4dnet_tun(PyObject *o, visitproc v, void *a) {
8018
  int e;
8019
  struct __pyx_obj_4dnet_tun *p = (struct __pyx_obj_4dnet_tun *)o;
8020
  return 0;
8021
}
8022
8023
static int __pyx_tp_clear_4dnet_tun(PyObject *o) {
8024
  struct __pyx_obj_4dnet_tun *p = (struct __pyx_obj_4dnet_tun *)o;
8025
  return 0;
8026
}
8027
8028
static PyObject *__pyx_getprop_4dnet_3tun_name(PyObject *o, void *x) {
7466
static PyObject *__pyx_getprop_4dnet_3tun_name(PyObject *o, void *x) {
8029
  return __pyx_f_4dnet_3tun_4name___get__(o);
7467
  return __pyx_f_4dnet_3tun_4name___get__(o);
8030
}
7468
}
Lines 8042-8049 Link Here
8042
};
7480
};
8043
7481
8044
static struct PyGetSetDef __pyx_getsets_4dnet_tun[] = {
7482
static struct PyGetSetDef __pyx_getsets_4dnet_tun[] = {
8045
  {"name", __pyx_getprop_4dnet_3tun_name, 0, __pyx_k7, 0},
7483
  {"name", __pyx_getprop_4dnet_3tun_name, 0, __pyx_k57, 0},
8046
  {"fd", __pyx_getprop_4dnet_3tun_fd, 0, __pyx_k8, 0},
7484
  {"fd", __pyx_getprop_4dnet_3tun_fd, 0, __pyx_k58, 0},
8047
  {0, 0, 0, 0, 0}
7485
  {0, 0, 0, 0, 0}
8048
};
7486
};
8049
7487
Lines 8086-8091 Link Here
8086
  0, /*nb_true_divide*/
7524
  0, /*nb_true_divide*/
8087
  0, /*nb_inplace_floor_divide*/
7525
  0, /*nb_inplace_floor_divide*/
8088
  0, /*nb_inplace_true_divide*/
7526
  0, /*nb_inplace_true_divide*/
7527
  #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
7528
  0, /*nb_index*/
7529
  #endif
8089
};
7530
};
8090
7531
8091
static PySequenceMethods __pyx_tp_as_sequence_tun = {
7532
static PySequenceMethods __pyx_tp_as_sequence_tun = {
Lines 8135-8144 Link Here
8135
  0, /*tp_getattro*/
7576
  0, /*tp_getattro*/
8136
  0, /*tp_setattro*/
7577
  0, /*tp_setattro*/
8137
  &__pyx_tp_as_buffer_tun, /*tp_as_buffer*/
7578
  &__pyx_tp_as_buffer_tun, /*tp_as_buffer*/
8138
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
7579
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/
8139
  "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*/
7580
  "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*/
8140
  __pyx_tp_traverse_4dnet_tun, /*tp_traverse*/
7581
  0, /*tp_traverse*/
8141
  __pyx_tp_clear_4dnet_tun, /*tp_clear*/
7582
  0, /*tp_clear*/
8142
  0, /*tp_richcompare*/
7583
  0, /*tp_richcompare*/
8143
  0, /*tp_weaklistoffset*/
7584
  0, /*tp_weaklistoffset*/
8144
  0, /*tp_iter*/
7585
  0, /*tp_iter*/
Lines 8223-8232 Link Here
8223
  __pyx_init_filenames();
7664
  __pyx_init_filenames();
8224
  __pyx_m = Py_InitModule4("dnet", __pyx_methods, __pyx_mdoc, 0, PYTHON_API_VERSION);
7665
  __pyx_m = Py_InitModule4("dnet", __pyx_methods, __pyx_mdoc, 0, PYTHON_API_VERSION);
8225
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; goto __pyx_L1;};
7666
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; goto __pyx_L1;};
7667
  Py_INCREF(__pyx_m);
8226
  __pyx_b = PyImport_AddModule("__builtin__");
7668
  __pyx_b = PyImport_AddModule("__builtin__");
8227
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; goto __pyx_L1;};
7669
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; goto __pyx_L1;};
8228
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; goto __pyx_L1;};
7670
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; goto __pyx_L1;};
8229
  if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; goto __pyx_L1;};
8230
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; goto __pyx_L1;};
7671
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; goto __pyx_L1;};
8231
  if (PyType_Ready(&__pyx_type_4dnet_eth) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
7672
  if (PyType_Ready(&__pyx_type_4dnet_eth) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
8232
  if (PyObject_SetAttrString(__pyx_m, "eth", (PyObject *)&__pyx_type_4dnet_eth) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
7673
  if (PyObject_SetAttrString(__pyx_m, "eth", (PyObject *)&__pyx_type_4dnet_eth) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
Lines 8262-8318 Link Here
8262
  if (PyObject_SetAttrString(__pyx_m, "tun", (PyObject *)&__pyx_type_4dnet_tun) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1477; goto __pyx_L1;}
7703
  if (PyObject_SetAttrString(__pyx_m, "tun", (PyObject *)&__pyx_type_4dnet_tun) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1477; goto __pyx_L1;}
8263
  __pyx_ptype_4dnet_tun = &__pyx_type_4dnet_tun;
7704
  __pyx_ptype_4dnet_tun = &__pyx_type_4dnet_tun;
8264
7705
8265
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":15 */
7706
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":15 */
8266
  if (PyObject_SetAttr(__pyx_m, __pyx_n___author__, __pyx_k9p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; goto __pyx_L1;}
7707
  if (PyObject_SetAttr(__pyx_m, __pyx_n___author__, __pyx_k59p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; goto __pyx_L1;}
8267
7708
8268
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":16 */
7709
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":16 */
8269
  if (PyObject_SetAttr(__pyx_m, __pyx_n___copyright__, __pyx_k10p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;}
7710
  if (PyObject_SetAttr(__pyx_m, __pyx_n___copyright__, __pyx_k61p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;}
8270
7711
8271
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":17 */
7712
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":17 */
8272
  if (PyObject_SetAttr(__pyx_m, __pyx_n___license__, __pyx_n_BSD) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;}
7713
  if (PyObject_SetAttr(__pyx_m, __pyx_n___license__, __pyx_n_BSD) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;}
8273
7714
8274
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":18 */
7715
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":18 */
8275
  if (PyObject_SetAttr(__pyx_m, __pyx_n___url__, __pyx_k12p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;}
7716
  if (PyObject_SetAttr(__pyx_m, __pyx_n___url__, __pyx_k65p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;}
8276
7717
8277
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":19 */
7718
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":19 */
8278
  if (PyObject_SetAttr(__pyx_m, __pyx_n___version__, __pyx_k13p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; goto __pyx_L1;}
7719
  if (PyObject_SetAttr(__pyx_m, __pyx_n___version__, __pyx_k67p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; goto __pyx_L1;}
8279
7720
8280
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":75 */
7721
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":75 */
8281
  __pyx_1 = PyInt_FromLong(6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; goto __pyx_L1;}
7722
  __pyx_1 = PyInt_FromLong(6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; goto __pyx_L1;}
8282
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_ADDR_LEN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; goto __pyx_L1;}
7723
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_ADDR_LEN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; goto __pyx_L1;}
8283
  Py_DECREF(__pyx_1); __pyx_1 = 0;
7724
  Py_DECREF(__pyx_1); __pyx_1 = 0;
8284
7725
8285
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":76 */
7726
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":76 */
8286
  __pyx_1 = PyInt_FromLong(48); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; goto __pyx_L1;}
7727
  __pyx_1 = PyInt_FromLong(48); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; goto __pyx_L1;}
8287
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_ADDR_BITS, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; goto __pyx_L1;}
7728
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_ADDR_BITS, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; goto __pyx_L1;}
8288
  Py_DECREF(__pyx_1); __pyx_1 = 0;
7729
  Py_DECREF(__pyx_1); __pyx_1 = 0;
8289
7730
8290
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":77 */
7731
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":77 */
8291
  __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; goto __pyx_L1;}
7732
  __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; goto __pyx_L1;}
8292
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_LEN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; goto __pyx_L1;}
7733
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_LEN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; goto __pyx_L1;}
8293
  Py_DECREF(__pyx_1); __pyx_1 = 0;
7734
  Py_DECREF(__pyx_1); __pyx_1 = 0;
8294
7735
8295
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":78 */
7736
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":78 */
8296
  __pyx_1 = PyInt_FromLong(4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;}
7737
  __pyx_1 = PyInt_FromLong(4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;}
8297
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_CRC_LEN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;}
7738
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_CRC_LEN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;}
8298
  Py_DECREF(__pyx_1); __pyx_1 = 0;
7739
  Py_DECREF(__pyx_1); __pyx_1 = 0;
8299
7740
8300
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":79 */
7741
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":79 */
8301
  __pyx_1 = PyInt_FromLong(14); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; goto __pyx_L1;}
7742
  __pyx_1 = PyInt_FromLong(14); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; goto __pyx_L1;}
8302
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_HDR_LEN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; goto __pyx_L1;}
7743
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_HDR_LEN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; goto __pyx_L1;}
8303
  Py_DECREF(__pyx_1); __pyx_1 = 0;
7744
  Py_DECREF(__pyx_1); __pyx_1 = 0;
8304
7745
8305
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":81 */
7746
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":81 */
8306
  __pyx_1 = PyInt_FromLong(64); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;}
7747
  __pyx_1 = PyInt_FromLong(64); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;}
8307
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_LEN_MIN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;}
7748
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_LEN_MIN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;}
8308
  Py_DECREF(__pyx_1); __pyx_1 = 0;
7749
  Py_DECREF(__pyx_1); __pyx_1 = 0;
8309
7750
8310
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":82 */
7751
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":82 */
8311
  __pyx_1 = PyInt_FromLong(1518); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; goto __pyx_L1;}
7752
  __pyx_1 = PyInt_FromLong(1518); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; goto __pyx_L1;}
8312
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_LEN_MAX, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; goto __pyx_L1;}
7753
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_LEN_MAX, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; goto __pyx_L1;}
8313
  Py_DECREF(__pyx_1); __pyx_1 = 0;
7754
  Py_DECREF(__pyx_1); __pyx_1 = 0;
8314
7755
8315
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":84 */
7756
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":84 */
8316
  __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;}
7757
  __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;}
8317
  __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;}
7758
  __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;}
8318
  __pyx_3 = PyNumber_Subtract(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; goto __pyx_L1;}
7759
  __pyx_3 = PyNumber_Subtract(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; goto __pyx_L1;}
Lines 8325-8331 Link Here
8325
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_MTU, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; goto __pyx_L1;}
7766
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_MTU, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; goto __pyx_L1;}
8326
  Py_DECREF(__pyx_2); __pyx_2 = 0;
7767
  Py_DECREF(__pyx_2); __pyx_2 = 0;
8327
7768
8328
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":85 */
7769
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":85 */
8329
  __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;}
7770
  __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;}
8330
  __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;}
7771
  __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;}
8331
  __pyx_2 = PyNumber_Subtract(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;}
7772
  __pyx_2 = PyNumber_Subtract(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;}
Lines 8338-8445 Link Here
8338
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_MIN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;}
7779
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_MIN, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;}
8339
  Py_DECREF(__pyx_1); __pyx_1 = 0;
7780
  Py_DECREF(__pyx_1); __pyx_1 = 0;
8340
7781
8341
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":87 */
7782
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":87 */
8342
  __pyx_2 = PyInt_FromLong(512); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; goto __pyx_L1;}
7783
  __pyx_2 = PyInt_FromLong(0x0200); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; goto __pyx_L1;}
8343
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_PUP, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; goto __pyx_L1;}
7784
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_PUP, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; goto __pyx_L1;}
8344
  Py_DECREF(__pyx_2); __pyx_2 = 0;
7785
  Py_DECREF(__pyx_2); __pyx_2 = 0;
8345
7786
8346
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":88 */
7787
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":88 */
8347
  __pyx_3 = PyInt_FromLong(2048); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; goto __pyx_L1;}
7788
  __pyx_3 = PyInt_FromLong(0x0800); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; goto __pyx_L1;}
8348
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_IP, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; goto __pyx_L1;}
7789
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_IP, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; goto __pyx_L1;}
8349
  Py_DECREF(__pyx_3); __pyx_3 = 0;
7790
  Py_DECREF(__pyx_3); __pyx_3 = 0;
8350
7791
8351
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":89 */
7792
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":89 */
8352
  __pyx_1 = PyInt_FromLong(2054); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;}
7793
  __pyx_1 = PyInt_FromLong(0x0806); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;}
8353
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_ARP, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;}
7794
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_ARP, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;}
8354
  Py_DECREF(__pyx_1); __pyx_1 = 0;
7795
  Py_DECREF(__pyx_1); __pyx_1 = 0;
8355
7796
8356
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":90 */
7797
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":90 */
8357
  __pyx_2 = PyInt_FromLong(32821); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;}
7798
  __pyx_2 = PyInt_FromLong(0x8035); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;}
8358
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_REVARP, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;}
7799
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_REVARP, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;}
8359
  Py_DECREF(__pyx_2); __pyx_2 = 0;
7800
  Py_DECREF(__pyx_2); __pyx_2 = 0;
8360
7801
8361
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":91 */
7802
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":91 */
8362
  __pyx_3 = PyInt_FromLong(33024); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; goto __pyx_L1;}
7803
  __pyx_3 = PyInt_FromLong(0x8100); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; goto __pyx_L1;}
8363
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_8021Q, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; goto __pyx_L1;}
7804
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_8021Q, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; goto __pyx_L1;}
8364
  Py_DECREF(__pyx_3); __pyx_3 = 0;
7805
  Py_DECREF(__pyx_3); __pyx_3 = 0;
8365
7806
8366
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":92 */
7807
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":92 */
8367
  __pyx_1 = PyInt_FromLong(34525); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
7808
  __pyx_1 = PyInt_FromLong(0x86DD); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
8368
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_IPV6, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
7809
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_IPV6, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
8369
  Py_DECREF(__pyx_1); __pyx_1 = 0;
7810
  Py_DECREF(__pyx_1); __pyx_1 = 0;
8370
7811
8371
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":93 */
7812
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":93 */
8372
  __pyx_2 = PyInt_FromLong(34887); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; goto __pyx_L1;}
7813
  __pyx_2 = PyInt_FromLong(0x8847); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; goto __pyx_L1;}
8373
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_MPLS, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; goto __pyx_L1;}
7814
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_MPLS, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; goto __pyx_L1;}
8374
  Py_DECREF(__pyx_2); __pyx_2 = 0;
7815
  Py_DECREF(__pyx_2); __pyx_2 = 0;
8375
7816
8376
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":94 */
7817
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":94 */
8377
  __pyx_3 = PyInt_FromLong(34888); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; goto __pyx_L1;}
7818
  __pyx_3 = PyInt_FromLong(0x8848); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; goto __pyx_L1;}
8378
  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;}
7819
  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;}
8379
  Py_DECREF(__pyx_3); __pyx_3 = 0;
7820
  Py_DECREF(__pyx_3); __pyx_3 = 0;
8380
7821
8381
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":95 */
7822
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":95 */
8382
  __pyx_1 = PyInt_FromLong(34915); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; goto __pyx_L1;}
7823
  __pyx_1 = PyInt_FromLong(0x8863); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; goto __pyx_L1;}
8383
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_PPPOEDISC, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; goto __pyx_L1;}
7824
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_PPPOEDISC, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; goto __pyx_L1;}
8384
  Py_DECREF(__pyx_1); __pyx_1 = 0;
7825
  Py_DECREF(__pyx_1); __pyx_1 = 0;
8385
7826
8386
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":96 */
7827
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":96 */
8387
  __pyx_2 = PyInt_FromLong(34916); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; goto __pyx_L1;}
7828
  __pyx_2 = PyInt_FromLong(0x8864); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; goto __pyx_L1;}
8388
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_PPPOE, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; goto __pyx_L1;}
7829
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_PPPOE, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; goto __pyx_L1;}
8389
  Py_DECREF(__pyx_2); __pyx_2 = 0;
7830
  Py_DECREF(__pyx_2); __pyx_2 = 0;
8390
7831
8391
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":97 */
7832
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":97 */
8392
  __pyx_3 = PyInt_FromLong(36864); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
7833
  __pyx_3 = PyInt_FromLong(0x9000); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
8393
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_LOOPBACK, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
7834
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_TYPE_LOOPBACK, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
8394
  Py_DECREF(__pyx_3); __pyx_3 = 0;
7835
  Py_DECREF(__pyx_3); __pyx_3 = 0;
8395
7836
8396
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":99 */
7837
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":99 */
8397
  __pyx_1 = PyString_FromStringAndSize(__pyx_k14,6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; goto __pyx_L1;}
7838
  __pyx_1 = PyString_FromStringAndSize(__pyx_k87,6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; goto __pyx_L1;}
8398
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_ADDR_UNSPEC, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; goto __pyx_L1;}
7839
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_ADDR_UNSPEC, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; goto __pyx_L1;}
8399
  Py_DECREF(__pyx_1); __pyx_1 = 0;
7840
  Py_DECREF(__pyx_1); __pyx_1 = 0;
8400
7841
8401
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":100 */
7842
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":100 */
8402
  __pyx_2 = PyString_FromStringAndSize(__pyx_k15,6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L1;}
7843
  __pyx_2 = PyString_FromStringAndSize(__pyx_k89,6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L1;}
8403
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_ADDR_BROADCAST, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L1;}
7844
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ETH_ADDR_BROADCAST, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L1;}
8404
  Py_DECREF(__pyx_2); __pyx_2 = 0;
7845
  Py_DECREF(__pyx_2); __pyx_2 = 0;
8405
7846
8406
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":162 */
7847
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":162 */
8407
  __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;}
7848
  __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;}
8408
  __pyx_k16 = __pyx_3;
7849
  __pyx_d1 = __pyx_3;
8409
  __pyx_3 = 0;
7850
  __pyx_3 = 0;
8410
  __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;}
7851
  __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;}
8411
  __pyx_k17 = __pyx_1;
7852
  __pyx_d2 = __pyx_1;
8412
  __pyx_1 = 0;
7853
  __pyx_1 = 0;
8413
  __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;}
7854
  __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;}
8414
  __pyx_k18 = __pyx_2;
7855
  __pyx_d3 = __pyx_2;
8415
  __pyx_2 = 0;
7856
  __pyx_2 = 0;
8416
7857
8417
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":199 */
7858
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":199 */
8418
  __pyx_4 = PyInt_FromLong(4); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;}
7859
  __pyx_4 = PyInt_FromLong(4); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;}
8419
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_ADDR_LEN, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;}
7860
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_ADDR_LEN, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;}
8420
  Py_DECREF(__pyx_4); __pyx_4 = 0;
7861
  Py_DECREF(__pyx_4); __pyx_4 = 0;
8421
7862
8422
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":200 */
7863
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":200 */
8423
  __pyx_4 = PyInt_FromLong(32); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; goto __pyx_L1;}
7864
  __pyx_4 = PyInt_FromLong(32); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; goto __pyx_L1;}
8424
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_ADDR_BITS, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; goto __pyx_L1;}
7865
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_ADDR_BITS, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; goto __pyx_L1;}
8425
  Py_DECREF(__pyx_4); __pyx_4 = 0;
7866
  Py_DECREF(__pyx_4); __pyx_4 = 0;
8426
7867
8427
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":202 */
7868
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":202 */
8428
  __pyx_4 = PyInt_FromLong(20); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; goto __pyx_L1;}
7869
  __pyx_4 = PyInt_FromLong(20); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; goto __pyx_L1;}
8429
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_HDR_LEN, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; goto __pyx_L1;}
7870
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_HDR_LEN, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; goto __pyx_L1;}
8430
  Py_DECREF(__pyx_4); __pyx_4 = 0;
7871
  Py_DECREF(__pyx_4); __pyx_4 = 0;
8431
7872
8432
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":203 */
7873
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":203 */
8433
  __pyx_4 = PyInt_FromLong(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; goto __pyx_L1;}
7874
  __pyx_4 = PyInt_FromLong(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; goto __pyx_L1;}
8434
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_OPT_LEN, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; goto __pyx_L1;}
7875
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_OPT_LEN, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; goto __pyx_L1;}
8435
  Py_DECREF(__pyx_4); __pyx_4 = 0;
7876
  Py_DECREF(__pyx_4); __pyx_4 = 0;
8436
7877
8437
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":204 */
7878
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":204 */
8438
  __pyx_4 = PyInt_FromLong(40); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;}
7879
  __pyx_4 = PyInt_FromLong(40); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;}
8439
  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;}
7880
  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;}
8440
  Py_DECREF(__pyx_4); __pyx_4 = 0;
7881
  Py_DECREF(__pyx_4); __pyx_4 = 0;
8441
7882
8442
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":205 */
7883
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":205 */
8443
  __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;}
7884
  __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;}
8444
  __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;}
7885
  __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;}
8445
  __pyx_6 = PyNumber_Add(__pyx_4, __pyx_5); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;}
7886
  __pyx_6 = PyNumber_Add(__pyx_4, __pyx_5); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;}
Lines 8448-9094 Link Here
8448
  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;}
7889
  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;}
8449
  Py_DECREF(__pyx_6); __pyx_6 = 0;
7890
  Py_DECREF(__pyx_6); __pyx_6 = 0;
8450
7891
8451
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":207 */
7892
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":207 */
8452
  __pyx_4 = PyInt_FromLong(65535); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; goto __pyx_L1;}
7893
  __pyx_4 = PyInt_FromLong(65535); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; goto __pyx_L1;}
8453
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_LEN_MAX, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; goto __pyx_L1;}
7894
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_LEN_MAX, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; goto __pyx_L1;}
8454
  Py_DECREF(__pyx_4); __pyx_4 = 0;
7895
  Py_DECREF(__pyx_4); __pyx_4 = 0;
8455
7896
8456
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":208 */
7897
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":208 */
8457
  __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;}
7898
  __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;}
8458
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_LEN_MIN, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; goto __pyx_L1;}
7899
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_LEN_MIN, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; goto __pyx_L1;}
8459
  Py_DECREF(__pyx_5); __pyx_5 = 0;
7900
  Py_DECREF(__pyx_5); __pyx_5 = 0;
8460
7901
8461
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":210 */
7902
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":210 */
8462
  __pyx_6 = PyInt_FromLong(0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; goto __pyx_L1;}
7903
  __pyx_6 = PyInt_FromLong(0x00); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; goto __pyx_L1;}
8463
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_TOS_DEFAULT, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; goto __pyx_L1;}
7904
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_TOS_DEFAULT, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; goto __pyx_L1;}
8464
  Py_DECREF(__pyx_6); __pyx_6 = 0;
7905
  Py_DECREF(__pyx_6); __pyx_6 = 0;
8465
7906
8466
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":212 */
7907
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":212 */
8467
  __pyx_4 = PyInt_FromLong(32768); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; goto __pyx_L1;}
7908
  __pyx_4 = PyInt_FromLong(0x8000); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; goto __pyx_L1;}
8468
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_RF, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; goto __pyx_L1;}
7909
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_RF, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; goto __pyx_L1;}
8469
  Py_DECREF(__pyx_4); __pyx_4 = 0;
7910
  Py_DECREF(__pyx_4); __pyx_4 = 0;
8470
7911
8471
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":213 */
7912
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":213 */
8472
  __pyx_5 = PyInt_FromLong(16384); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; goto __pyx_L1;}
7913
  __pyx_5 = PyInt_FromLong(0x4000); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; goto __pyx_L1;}
8473
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_DF, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; goto __pyx_L1;}
7914
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_DF, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; goto __pyx_L1;}
8474
  Py_DECREF(__pyx_5); __pyx_5 = 0;
7915
  Py_DECREF(__pyx_5); __pyx_5 = 0;
8475
7916
8476
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":214 */
7917
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":214 */
8477
  __pyx_6 = PyInt_FromLong(8192); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; goto __pyx_L1;}
7918
  __pyx_6 = PyInt_FromLong(0x2000); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; goto __pyx_L1;}
8478
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_MF, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; goto __pyx_L1;}
7919
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_MF, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; goto __pyx_L1;}
8479
  Py_DECREF(__pyx_6); __pyx_6 = 0;
7920
  Py_DECREF(__pyx_6); __pyx_6 = 0;
8480
7921
8481
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":215 */
7922
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":215 */
8482
  __pyx_4 = PyInt_FromLong(8191); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; goto __pyx_L1;}
7923
  __pyx_4 = PyInt_FromLong(0x1fff); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; goto __pyx_L1;}
8483
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_OFFMASK, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; goto __pyx_L1;}
7924
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_OFFMASK, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; goto __pyx_L1;}
8484
  Py_DECREF(__pyx_4); __pyx_4 = 0;
7925
  Py_DECREF(__pyx_4); __pyx_4 = 0;
8485
7926
8486
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":217 */
7927
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":217 */
8487
  __pyx_5 = PyInt_FromLong(64); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; goto __pyx_L1;}
7928
  __pyx_5 = PyInt_FromLong(64); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; goto __pyx_L1;}
8488
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_TTL_DEFAULT, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; goto __pyx_L1;}
7929
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_TTL_DEFAULT, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; goto __pyx_L1;}
8489
  Py_DECREF(__pyx_5); __pyx_5 = 0;
7930
  Py_DECREF(__pyx_5); __pyx_5 = 0;
8490
7931
8491
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":218 */
7932
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":218 */
8492
  __pyx_6 = PyInt_FromLong(255); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; goto __pyx_L1;}
7933
  __pyx_6 = PyInt_FromLong(255); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; goto __pyx_L1;}
8493
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_TTL_MAX, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; goto __pyx_L1;}
7934
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_TTL_MAX, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; goto __pyx_L1;}
8494
  Py_DECREF(__pyx_6); __pyx_6 = 0;
7935
  Py_DECREF(__pyx_6); __pyx_6 = 0;
8495
7936
8496
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":220 */
7937
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":220 */
8497
  __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; goto __pyx_L1;}
7938
  __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; goto __pyx_L1;}
8498
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_IP, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; goto __pyx_L1;}
7939
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_IP, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; goto __pyx_L1;}
8499
  Py_DECREF(__pyx_4); __pyx_4 = 0;
7940
  Py_DECREF(__pyx_4); __pyx_4 = 0;
8500
7941
8501
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":221 */
7942
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":221 */
8502
  __pyx_5 = PyInt_FromLong(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; goto __pyx_L1;}
7943
  __pyx_5 = PyInt_FromLong(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; goto __pyx_L1;}
8503
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_ICMP, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; goto __pyx_L1;}
7944
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_ICMP, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; goto __pyx_L1;}
8504
  Py_DECREF(__pyx_5); __pyx_5 = 0;
7945
  Py_DECREF(__pyx_5); __pyx_5 = 0;
8505
7946
8506
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":222 */
7947
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":222 */
8507
  __pyx_6 = PyInt_FromLong(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; goto __pyx_L1;}
7948
  __pyx_6 = PyInt_FromLong(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; goto __pyx_L1;}
8508
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_IGMP, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; goto __pyx_L1;}
7949
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_IGMP, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; goto __pyx_L1;}
8509
  Py_DECREF(__pyx_6); __pyx_6 = 0;
7950
  Py_DECREF(__pyx_6); __pyx_6 = 0;
8510
7951
8511
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":223 */
7952
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":223 */
8512
  __pyx_4 = PyInt_FromLong(6); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;}
7953
  __pyx_4 = PyInt_FromLong(6); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;}
8513
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_TCP, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;}
7954
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_TCP, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;}
8514
  Py_DECREF(__pyx_4); __pyx_4 = 0;
7955
  Py_DECREF(__pyx_4); __pyx_4 = 0;
8515
7956
8516
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":224 */
7957
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":224 */
8517
  __pyx_5 = PyInt_FromLong(17); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;}
7958
  __pyx_5 = PyInt_FromLong(17); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;}
8518
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_UDP, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;}
7959
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_UDP, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;}
8519
  Py_DECREF(__pyx_5); __pyx_5 = 0;
7960
  Py_DECREF(__pyx_5); __pyx_5 = 0;
8520
7961
8521
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":225 */
7962
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":225 */
8522
  __pyx_6 = PyInt_FromLong(41); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;}
7963
  __pyx_6 = PyInt_FromLong(41); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;}
8523
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_IPV6, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;}
7964
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_IPV6, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;}
8524
  Py_DECREF(__pyx_6); __pyx_6 = 0;
7965
  Py_DECREF(__pyx_6); __pyx_6 = 0;
8525
7966
8526
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":226 */
7967
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":226 */
8527
  __pyx_4 = PyInt_FromLong(47); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; goto __pyx_L1;}
7968
  __pyx_4 = PyInt_FromLong(47); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; goto __pyx_L1;}
8528
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_GRE, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; goto __pyx_L1;}
7969
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_GRE, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; goto __pyx_L1;}
8529
  Py_DECREF(__pyx_4); __pyx_4 = 0;
7970
  Py_DECREF(__pyx_4); __pyx_4 = 0;
8530
7971
8531
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":227 */
7972
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":227 */
8532
  __pyx_5 = PyInt_FromLong(50); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; goto __pyx_L1;}
7973
  __pyx_5 = PyInt_FromLong(50); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; goto __pyx_L1;}
8533
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_ESP, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; goto __pyx_L1;}
7974
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_ESP, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; goto __pyx_L1;}
8534
  Py_DECREF(__pyx_5); __pyx_5 = 0;
7975
  Py_DECREF(__pyx_5); __pyx_5 = 0;
8535
7976
8536
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":228 */
7977
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":228 */
8537
  __pyx_6 = PyInt_FromLong(51); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;}
7978
  __pyx_6 = PyInt_FromLong(51); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;}
8538
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_AH, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;}
7979
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_AH, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;}
8539
  Py_DECREF(__pyx_6); __pyx_6 = 0;
7980
  Py_DECREF(__pyx_6); __pyx_6 = 0;
8540
7981
8541
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":229 */
7982
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":229 */
8542
  __pyx_4 = PyInt_FromLong(58); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; goto __pyx_L1;}
7983
  __pyx_4 = PyInt_FromLong(58); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; goto __pyx_L1;}
8543
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_ICMPV6, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; goto __pyx_L1;}
7984
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_ICMPV6, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; goto __pyx_L1;}
8544
  Py_DECREF(__pyx_4); __pyx_4 = 0;
7985
  Py_DECREF(__pyx_4); __pyx_4 = 0;
8545
7986
8546
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":230 */
7987
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":230 */
8547
  __pyx_5 = PyInt_FromLong(255); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; goto __pyx_L1;}
7988
  __pyx_5 = PyInt_FromLong(255); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; goto __pyx_L1;}
8548
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_RAW, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; goto __pyx_L1;}
7989
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_RAW, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; goto __pyx_L1;}
8549
  Py_DECREF(__pyx_5); __pyx_5 = 0;
7990
  Py_DECREF(__pyx_5); __pyx_5 = 0;
8550
7991
8551
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":231 */
7992
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":231 */
8552
  __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;}
7993
  __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;}
8553
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_RESERVED, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;}
7994
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_RESERVED, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;}
8554
  Py_DECREF(__pyx_6); __pyx_6 = 0;
7995
  Py_DECREF(__pyx_6); __pyx_6 = 0;
8555
7996
8556
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":232 */
7997
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":232 */
8557
  __pyx_4 = PyInt_FromLong(255); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; goto __pyx_L1;}
7998
  __pyx_4 = PyInt_FromLong(255); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; goto __pyx_L1;}
8558
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_MAX, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; goto __pyx_L1;}
7999
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_PROTO_MAX, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; goto __pyx_L1;}
8559
  Py_DECREF(__pyx_4); __pyx_4 = 0;
8000
  Py_DECREF(__pyx_4); __pyx_4 = 0;
8560
8001
8561
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":234 */
8002
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":234 */
8562
  __pyx_5 = PyString_FromStringAndSize(__pyx_k19,4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; goto __pyx_L1;}
8003
  __pyx_5 = PyString_FromStringAndSize(__pyx_k115,4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; goto __pyx_L1;}
8563
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_ADDR_ANY, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; goto __pyx_L1;}
8004
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_ADDR_ANY, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; goto __pyx_L1;}
8564
  Py_DECREF(__pyx_5); __pyx_5 = 0;
8005
  Py_DECREF(__pyx_5); __pyx_5 = 0;
8565
8006
8566
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":235 */
8007
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":235 */
8567
  __pyx_6 = PyString_FromStringAndSize(__pyx_k20,4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; goto __pyx_L1;}
8008
  __pyx_6 = PyString_FromStringAndSize(__pyx_k117,4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; goto __pyx_L1;}
8568
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_ADDR_BROADCAST, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; goto __pyx_L1;}
8009
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_ADDR_BROADCAST, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; goto __pyx_L1;}
8569
  Py_DECREF(__pyx_6); __pyx_6 = 0;
8010
  Py_DECREF(__pyx_6); __pyx_6 = 0;
8570
8011
8571
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":236 */
8012
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":236 */
8572
  __pyx_4 = PyString_FromStringAndSize(__pyx_k21,4); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; goto __pyx_L1;}
8013
  __pyx_4 = PyString_FromStringAndSize(__pyx_k119,4); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; goto __pyx_L1;}
8573
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_ADDR_LOOPBACK, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; goto __pyx_L1;}
8014
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP_ADDR_LOOPBACK, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; goto __pyx_L1;}
8574
  Py_DECREF(__pyx_4); __pyx_4 = 0;
8015
  Py_DECREF(__pyx_4); __pyx_4 = 0;
8575
8016
8576
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":237 */
8017
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":237 */
8577
  __pyx_5 = PyString_FromStringAndSize(__pyx_k22,4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; goto __pyx_L1;}
8018
  __pyx_5 = PyString_FromStringAndSize(__pyx_k121,4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; goto __pyx_L1;}
8578
  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;}
8019
  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;}
8579
  Py_DECREF(__pyx_5); __pyx_5 = 0;
8020
  Py_DECREF(__pyx_5); __pyx_5 = 0;
8580
8021
8581
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":238 */
8022
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":238 */
8582
  __pyx_6 = PyString_FromStringAndSize(__pyx_k23,4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; goto __pyx_L1;}
8023
  __pyx_6 = PyString_FromStringAndSize(__pyx_k123,4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; goto __pyx_L1;}
8583
  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;}
8024
  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;}
8584
  Py_DECREF(__pyx_6); __pyx_6 = 0;
8025
  Py_DECREF(__pyx_6); __pyx_6 = 0;
8585
8026
8586
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":320 */
8027
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":320 */
8587
  __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;}
8028
  __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;}
8588
  __pyx_k24 = __pyx_4;
8029
  __pyx_d4 = __pyx_4;
8589
  __pyx_4 = 0;
8030
  __pyx_4 = 0;
8590
  __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;}
8031
  __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;}
8591
  __pyx_k25 = __pyx_5;
8032
  __pyx_d5 = __pyx_5;
8592
  __pyx_5 = 0;
8033
  __pyx_5 = 0;
8593
  __pyx_6 = PyInt_FromLong(0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; goto __pyx_L1;}
8034
  __pyx_6 = PyInt_FromLong(0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; goto __pyx_L1;}
8594
  __pyx_k26 = __pyx_6;
8035
  __pyx_d6 = __pyx_6;
8595
  __pyx_6 = 0;
8036
  __pyx_6 = 0;
8596
  __pyx_7 = PyInt_FromLong(0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; goto __pyx_L1;}
8037
  __pyx_7 = PyInt_FromLong(0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; goto __pyx_L1;}
8597
  __pyx_k27 = __pyx_7;
8038
  __pyx_d7 = __pyx_7;
8598
  __pyx_7 = 0;
8039
  __pyx_7 = 0;
8599
  __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;}
8040
  __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;}
8600
  __pyx_k28 = __pyx_8;
8041
  __pyx_d8 = __pyx_8;
8601
  __pyx_8 = 0;
8042
  __pyx_8 = 0;
8602
  __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;}
8043
  __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;}
8603
  __pyx_k29 = __pyx_9;
8044
  __pyx_d9 = __pyx_9;
8604
  __pyx_9 = 0;
8045
  __pyx_9 = 0;
8605
  __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;}
8046
  __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;}
8606
  __pyx_k30 = __pyx_10;
8047
  __pyx_d10 = __pyx_10;
8607
  __pyx_10 = 0;
8048
  __pyx_10 = 0;
8608
  __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;}
8049
  __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;}
8609
  __pyx_k31 = __pyx_11;
8050
  __pyx_d11 = __pyx_11;
8610
  __pyx_11 = 0;
8051
  __pyx_11 = 0;
8611
8052
8612
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":355 */
8053
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":355 */
8613
  __pyx_12 = PyInt_FromLong(16); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; goto __pyx_L1;}
8054
  __pyx_12 = PyInt_FromLong(16); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; goto __pyx_L1;}
8614
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_ADDR_LEN, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; goto __pyx_L1;}
8055
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_ADDR_LEN, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; goto __pyx_L1;}
8615
  Py_DECREF(__pyx_12); __pyx_12 = 0;
8056
  Py_DECREF(__pyx_12); __pyx_12 = 0;
8616
8057
8617
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":356 */
8058
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":356 */
8618
  __pyx_12 = PyInt_FromLong(128); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; goto __pyx_L1;}
8059
  __pyx_12 = PyInt_FromLong(128); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; goto __pyx_L1;}
8619
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_ADDR_BITS, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; goto __pyx_L1;}
8060
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_ADDR_BITS, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; goto __pyx_L1;}
8620
  Py_DECREF(__pyx_12); __pyx_12 = 0;
8061
  Py_DECREF(__pyx_12); __pyx_12 = 0;
8621
8062
8622
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":358 */
8063
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":358 */
8623
  __pyx_12 = PyInt_FromLong(40); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; goto __pyx_L1;}
8064
  __pyx_12 = PyInt_FromLong(40); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; goto __pyx_L1;}
8624
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_HDR_LEN, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; goto __pyx_L1;}
8065
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_HDR_LEN, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; goto __pyx_L1;}
8625
  Py_DECREF(__pyx_12); __pyx_12 = 0;
8066
  Py_DECREF(__pyx_12); __pyx_12 = 0;
8626
8067
8627
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":359 */
8068
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":359 */
8628
  __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;}
8069
  __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;}
8629
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_LEN_MIN, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; goto __pyx_L1;}
8070
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_LEN_MIN, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; goto __pyx_L1;}
8630
  Py_DECREF(__pyx_12); __pyx_12 = 0;
8071
  Py_DECREF(__pyx_12); __pyx_12 = 0;
8631
8072
8632
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":360 */
8073
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":360 */
8633
  __pyx_12 = PyInt_FromLong(65535); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; goto __pyx_L1;}
8074
  __pyx_12 = PyInt_FromLong(65535); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; goto __pyx_L1;}
8634
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_LEN_MAX, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; goto __pyx_L1;}
8075
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_LEN_MAX, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; goto __pyx_L1;}
8635
  Py_DECREF(__pyx_12); __pyx_12 = 0;
8076
  Py_DECREF(__pyx_12); __pyx_12 = 0;
8636
8077
8637
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":362 */
8078
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":362 */
8638
  __pyx_12 = PyInt_FromLong(1280); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; goto __pyx_L1;}
8079
  __pyx_12 = PyInt_FromLong(1280); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; goto __pyx_L1;}
8639
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_MTU_MIN, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; goto __pyx_L1;}
8080
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_MTU_MIN, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; goto __pyx_L1;}
8640
  Py_DECREF(__pyx_12); __pyx_12 = 0;
8081
  Py_DECREF(__pyx_12); __pyx_12 = 0;
8641
8082
8642
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":364 */
8083
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":364 */
8643
  __pyx_12 = PyInt_FromLong(64); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; goto __pyx_L1;}
8084
  __pyx_12 = PyInt_FromLong(64); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; goto __pyx_L1;}
8644
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_HLIM_DEFAULT, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; goto __pyx_L1;}
8085
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_HLIM_DEFAULT, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; goto __pyx_L1;}
8645
  Py_DECREF(__pyx_12); __pyx_12 = 0;
8086
  Py_DECREF(__pyx_12); __pyx_12 = 0;
8646
8087
8647
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":365 */
8088
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":365 */
8648
  __pyx_12 = PyInt_FromLong(255); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
8089
  __pyx_12 = PyInt_FromLong(255); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
8649
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_HLIM_MAX, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
8090
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_HLIM_MAX, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
8650
  Py_DECREF(__pyx_12); __pyx_12 = 0;
8091
  Py_DECREF(__pyx_12); __pyx_12 = 0;
8651
8092
8652
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":367 */
8093
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":367 */
8653
  __pyx_12 = PyString_FromStringAndSize(__pyx_k32,16); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
8094
  __pyx_12 = PyString_FromStringAndSize(__pyx_k131,16); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
8654
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_ADDR_UNSPEC, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
8095
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_ADDR_UNSPEC, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
8655
  Py_DECREF(__pyx_12); __pyx_12 = 0;
8096
  Py_DECREF(__pyx_12); __pyx_12 = 0;
8656
8097
8657
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":368 */
8098
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":368 */
8658
  __pyx_12 = PyString_FromStringAndSize(__pyx_k33,16); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; goto __pyx_L1;}
8099
  __pyx_12 = PyString_FromStringAndSize(__pyx_k133,16); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; goto __pyx_L1;}
8659
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_ADDR_LOOPBACK, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; goto __pyx_L1;}
8100
  if (PyObject_SetAttr(__pyx_m, __pyx_n_IP6_ADDR_LOOPBACK, __pyx_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; goto __pyx_L1;}
8660
  Py_DECREF(__pyx_12); __pyx_12 = 0;
8101
  Py_DECREF(__pyx_12); __pyx_12 = 0;
8661
8102
8662
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":395 */
8103
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":395 */
8663
  __pyx_12 = PyInt_FromLong(0); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L1;}
8104
  __pyx_12 = PyInt_FromLong(0); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L1;}
8664
  __pyx_k34 = __pyx_12;
8105
  __pyx_d12 = __pyx_12;
8665
  __pyx_12 = 0;
8106
  __pyx_12 = 0;
8666
  __pyx_13 = PyInt_FromLong(0); if (!__pyx_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L1;}
8107
  __pyx_13 = PyInt_FromLong(0); if (!__pyx_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L1;}
8667
  __pyx_k35 = __pyx_13;
8108
  __pyx_d13 = __pyx_13;
8668
  __pyx_13 = 0;
8109
  __pyx_13 = 0;
8669
  __pyx_14 = PyInt_FromLong(0); if (!__pyx_14) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L1;}
8110
  __pyx_14 = PyInt_FromLong(0); if (!__pyx_14) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L1;}
8670
  __pyx_k36 = __pyx_14;
8111
  __pyx_d14 = __pyx_14;
8671
  __pyx_14 = 0;
8112
  __pyx_14 = 0;
8672
  __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;}
8113
  __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;}
8673
  __pyx_k37 = __pyx_15;
8114
  __pyx_d15 = __pyx_15;
8674
  __pyx_15 = 0;
8115
  __pyx_15 = 0;
8675
  __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;}
8116
  __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;}
8676
  __pyx_k38 = __pyx_16;
8117
  __pyx_d16 = __pyx_16;
8677
  __pyx_16 = 0;
8118
  __pyx_16 = 0;
8678
  __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;}
8119
  __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;}
8679
  __pyx_k39 = __pyx_17;
8120
  __pyx_d17 = __pyx_17;
8680
  __pyx_17 = 0;
8121
  __pyx_17 = 0;
8681
  __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;}
8122
  __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;}
8682
  __pyx_k40 = __pyx_18;
8123
  __pyx_d18 = __pyx_18;
8683
  __pyx_18 = 0;
8124
  __pyx_18 = 0;
8684
8125
8685
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":431 */
8126
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":431 */
8686
  __pyx_19 = PyInt_FromLong(0); if (!__pyx_19) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; goto __pyx_L1;}
8127
  __pyx_19 = PyInt_FromLong(0); if (!__pyx_19) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; goto __pyx_L1;}
8687
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ADDR_TYPE_NONE, __pyx_19) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; goto __pyx_L1;}
8128
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ADDR_TYPE_NONE, __pyx_19) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; goto __pyx_L1;}
8688
  Py_DECREF(__pyx_19); __pyx_19 = 0;
8129
  Py_DECREF(__pyx_19); __pyx_19 = 0;
8689
8130
8690
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":432 */
8131
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":432 */
8691
  __pyx_19 = PyInt_FromLong(1); if (!__pyx_19) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; goto __pyx_L1;}
8132
  __pyx_19 = PyInt_FromLong(1); if (!__pyx_19) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; goto __pyx_L1;}
8692
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ADDR_TYPE_ETH, __pyx_19) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; goto __pyx_L1;}
8133
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ADDR_TYPE_ETH, __pyx_19) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; goto __pyx_L1;}
8693
  Py_DECREF(__pyx_19); __pyx_19 = 0;
8134
  Py_DECREF(__pyx_19); __pyx_19 = 0;
8694
8135
8695
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":433 */
8136
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":433 */
8696
  __pyx_19 = PyInt_FromLong(2); if (!__pyx_19) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; goto __pyx_L1;}
8137
  __pyx_19 = PyInt_FromLong(2); if (!__pyx_19) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; goto __pyx_L1;}
8697
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ADDR_TYPE_IP, __pyx_19) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; goto __pyx_L1;}
8138
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ADDR_TYPE_IP, __pyx_19) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; goto __pyx_L1;}
8698
  Py_DECREF(__pyx_19); __pyx_19 = 0;
8139
  Py_DECREF(__pyx_19); __pyx_19 = 0;
8699
8140
8700
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":434 */
8141
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":434 */
8701
  __pyx_19 = PyInt_FromLong(3); if (!__pyx_19) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; goto __pyx_L1;}
8142
  __pyx_19 = PyInt_FromLong(3); if (!__pyx_19) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; goto __pyx_L1;}
8702
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ADDR_TYPE_IP6, __pyx_19) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; goto __pyx_L1;}
8143
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ADDR_TYPE_IP6, __pyx_19) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; goto __pyx_L1;}
8703
  Py_DECREF(__pyx_19); __pyx_19 = 0;
8144
  Py_DECREF(__pyx_19); __pyx_19 = 0;
8704
8145
8705
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":444 */
8146
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":444 */
8706
  Py_INCREF(Py_None);
8147
  Py_INCREF(Py_None);
8707
  __pyx_k41 = Py_None;
8148
  __pyx_d19 = Py_None;
8708
  __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;}
8149
  __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;}
8709
  __pyx_k42 = __pyx_19;
8150
  __pyx_d20 = __pyx_19;
8710
  __pyx_19 = 0;
8151
  __pyx_19 = 0;
8711
8152
8712
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":666 */
8153
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":666 */
8713
  __pyx_20 = PyInt_FromLong(8); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; goto __pyx_L1;}
8154
  __pyx_20 = PyInt_FromLong(8); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; goto __pyx_L1;}
8714
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_HDR_LEN, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; goto __pyx_L1;}
8155
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_HDR_LEN, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; goto __pyx_L1;}
8715
  Py_DECREF(__pyx_20); __pyx_20 = 0;
8156
  Py_DECREF(__pyx_20); __pyx_20 = 0;
8716
8157
8717
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":667 */
8158
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":667 */
8718
  __pyx_20 = PyInt_FromLong(20); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; goto __pyx_L1;}
8159
  __pyx_20 = PyInt_FromLong(20); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; goto __pyx_L1;}
8719
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_ETHIP_LEN, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; goto __pyx_L1;}
8160
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_ETHIP_LEN, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; goto __pyx_L1;}
8720
  Py_DECREF(__pyx_20); __pyx_20 = 0;
8161
  Py_DECREF(__pyx_20); __pyx_20 = 0;
8721
8162
8722
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":669 */
8163
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":669 */
8723
  __pyx_20 = PyInt_FromLong(1); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; goto __pyx_L1;}
8164
  __pyx_20 = PyInt_FromLong(0x0001); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; goto __pyx_L1;}
8724
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_HRD_ETH, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; goto __pyx_L1;}
8165
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_HRD_ETH, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; goto __pyx_L1;}
8725
  Py_DECREF(__pyx_20); __pyx_20 = 0;
8166
  Py_DECREF(__pyx_20); __pyx_20 = 0;
8726
8167
8727
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":670 */
8168
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":670 */
8728
  __pyx_20 = PyInt_FromLong(6); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; goto __pyx_L1;}
8169
  __pyx_20 = PyInt_FromLong(0x0006); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; goto __pyx_L1;}
8729
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_HRD_IEEE802, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; goto __pyx_L1;}
8170
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_HRD_IEEE802, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; goto __pyx_L1;}
8730
  Py_DECREF(__pyx_20); __pyx_20 = 0;
8171
  Py_DECREF(__pyx_20); __pyx_20 = 0;
8731
8172
8732
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":672 */
8173
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":672 */
8733
  __pyx_20 = PyInt_FromLong(2048); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; goto __pyx_L1;}
8174
  __pyx_20 = PyInt_FromLong(0x0800); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; goto __pyx_L1;}
8734
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_PRO_IP, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; goto __pyx_L1;}
8175
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_PRO_IP, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; goto __pyx_L1;}
8735
  Py_DECREF(__pyx_20); __pyx_20 = 0;
8176
  Py_DECREF(__pyx_20); __pyx_20 = 0;
8736
8177
8737
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":674 */
8178
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":674 */
8738
  __pyx_20 = PyInt_FromLong(1); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; goto __pyx_L1;}
8179
  __pyx_20 = PyInt_FromLong(1); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; goto __pyx_L1;}
8739
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_OP_REQUEST, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; goto __pyx_L1;}
8180
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_OP_REQUEST, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; goto __pyx_L1;}
8740
  Py_DECREF(__pyx_20); __pyx_20 = 0;
8181
  Py_DECREF(__pyx_20); __pyx_20 = 0;
8741
8182
8742
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":675 */
8183
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":675 */
8743
  __pyx_20 = PyInt_FromLong(2); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; goto __pyx_L1;}
8184
  __pyx_20 = PyInt_FromLong(2); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; goto __pyx_L1;}
8744
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_OP_REPLY, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; goto __pyx_L1;}
8185
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_OP_REPLY, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; goto __pyx_L1;}
8745
  Py_DECREF(__pyx_20); __pyx_20 = 0;
8186
  Py_DECREF(__pyx_20); __pyx_20 = 0;
8746
8187
8747
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":676 */
8188
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":676 */
8748
  __pyx_20 = PyInt_FromLong(3); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; goto __pyx_L1;}
8189
  __pyx_20 = PyInt_FromLong(3); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; goto __pyx_L1;}
8749
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_OP_REVREQUEST, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; goto __pyx_L1;}
8190
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_OP_REVREQUEST, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; goto __pyx_L1;}
8750
  Py_DECREF(__pyx_20); __pyx_20 = 0;
8191
  Py_DECREF(__pyx_20); __pyx_20 = 0;
8751
8192
8752
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":677 */
8193
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":677 */
8753
  __pyx_20 = PyInt_FromLong(4); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; goto __pyx_L1;}
8194
  __pyx_20 = PyInt_FromLong(4); if (!__pyx_20) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; goto __pyx_L1;}
8754
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_OP_REVREPLY, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; goto __pyx_L1;}
8195
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ARP_OP_REVREPLY, __pyx_20) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; goto __pyx_L1;}
8755
  Py_DECREF(__pyx_20); __pyx_20 = 0;
8196
  Py_DECREF(__pyx_20); __pyx_20 = 0;
8756
8197
8757
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":738 */
8198
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":738 */
8758
  Py_INCREF(Py_None);
8199
  Py_INCREF(Py_None);
8759
  __pyx_k43 = Py_None;
8200
  __pyx_d21 = Py_None;
8760
8201
8761
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":760 */
8202
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":760 */
8762
  __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;}
8203
  __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;}
8763
  __pyx_k44 = __pyx_20;
8204
  __pyx_d22 = __pyx_20;
8764
  __pyx_20 = 0;
8205
  __pyx_20 = 0;
8765
  __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;}
8206
  __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;}
8766
  __pyx_k45 = __pyx_21;
8207
  __pyx_d23 = __pyx_21;
8767
  __pyx_21 = 0;
8208
  __pyx_21 = 0;
8768
  __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;}
8209
  __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;}
8769
  __pyx_k46 = __pyx_22;
8210
  __pyx_d24 = __pyx_22;
8770
  __pyx_22 = 0;
8211
  __pyx_22 = 0;
8771
  __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;}
8212
  __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;}
8772
  __pyx_k47 = __pyx_23;
8213
  __pyx_d25 = __pyx_23;
8773
  __pyx_23 = 0;
8214
  __pyx_23 = 0;
8774
  __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;}
8215
  __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;}
8775
  __pyx_k48 = __pyx_24;
8216
  __pyx_d26 = __pyx_24;
8776
  __pyx_24 = 0;
8217
  __pyx_24 = 0;
8777
8218
8778
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":806 */
8219
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":806 */
8779
  __pyx_25 = PyInt_FromLong(20); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; goto __pyx_L1;}
8220
  __pyx_25 = PyInt_FromLong(20); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; goto __pyx_L1;}
8780
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_HDR_LEN, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; goto __pyx_L1;}
8221
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_HDR_LEN, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; goto __pyx_L1;}
8781
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8222
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8782
8223
8783
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":808 */
8224
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":808 */
8784
  __pyx_25 = PyInt_FromLong(1); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; goto __pyx_L1;}
8225
  __pyx_25 = PyInt_FromLong(0x01); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; goto __pyx_L1;}
8785
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_FIN, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; goto __pyx_L1;}
8226
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_FIN, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; goto __pyx_L1;}
8786
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8227
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8787
8228
8788
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":809 */
8229
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":809 */
8789
  __pyx_25 = PyInt_FromLong(2); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;}
8230
  __pyx_25 = PyInt_FromLong(0x02); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;}
8790
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_SYN, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;}
8231
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_SYN, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;}
8791
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8232
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8792
8233
8793
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":810 */
8234
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":810 */
8794
  __pyx_25 = PyInt_FromLong(4); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; goto __pyx_L1;}
8235
  __pyx_25 = PyInt_FromLong(0x04); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; goto __pyx_L1;}
8795
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_RST, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; goto __pyx_L1;}
8236
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_RST, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; goto __pyx_L1;}
8796
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8237
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8797
8238
8798
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":811 */
8239
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":811 */
8799
  __pyx_25 = PyInt_FromLong(8); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; goto __pyx_L1;}
8240
  __pyx_25 = PyInt_FromLong(0x08); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; goto __pyx_L1;}
8800
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_PUSH, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; goto __pyx_L1;}
8241
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_PUSH, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; goto __pyx_L1;}
8801
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8242
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8802
8243
8803
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":812 */
8244
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":812 */
8804
  __pyx_25 = PyInt_FromLong(16); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; goto __pyx_L1;}
8245
  __pyx_25 = PyInt_FromLong(0x10); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; goto __pyx_L1;}
8805
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_ACK, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; goto __pyx_L1;}
8246
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_ACK, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; goto __pyx_L1;}
8806
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8247
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8807
8248
8808
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":813 */
8249
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":813 */
8809
  __pyx_25 = PyInt_FromLong(32); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; goto __pyx_L1;}
8250
  __pyx_25 = PyInt_FromLong(0x20); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; goto __pyx_L1;}
8810
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_URG, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; goto __pyx_L1;}
8251
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_URG, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; goto __pyx_L1;}
8811
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8252
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8812
8253
8813
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":814 */
8254
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":814 */
8814
  __pyx_25 = PyInt_FromLong(64); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; goto __pyx_L1;}
8255
  __pyx_25 = PyInt_FromLong(0x40); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; goto __pyx_L1;}
8815
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_ECE, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; goto __pyx_L1;}
8256
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_ECE, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; goto __pyx_L1;}
8816
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8257
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8817
8258
8818
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":815 */
8259
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":815 */
8819
  __pyx_25 = PyInt_FromLong(128); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; goto __pyx_L1;}
8260
  __pyx_25 = PyInt_FromLong(0x80); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; goto __pyx_L1;}
8820
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_CWR, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; goto __pyx_L1;}
8261
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TH_CWR, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; goto __pyx_L1;}
8821
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8262
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8822
8263
8823
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":817 */
8264
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":817 */
8824
  __pyx_25 = PyInt_FromLong(65535); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; goto __pyx_L1;}
8265
  __pyx_25 = PyInt_FromLong(65535); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; goto __pyx_L1;}
8825
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_PORT_MAX, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; goto __pyx_L1;}
8266
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_PORT_MAX, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; goto __pyx_L1;}
8826
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8267
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8827
8268
8828
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":818 */
8269
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":818 */
8829
  __pyx_25 = PyInt_FromLong(65535); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; goto __pyx_L1;}
8270
  __pyx_25 = PyInt_FromLong(65535); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; goto __pyx_L1;}
8830
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_WIN_MAX, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; goto __pyx_L1;}
8271
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_WIN_MAX, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; goto __pyx_L1;}
8831
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8272
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8832
8273
8833
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":820 */
8274
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":820 */
8834
  __pyx_25 = PyInt_FromLong(0); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; goto __pyx_L1;}
8275
  __pyx_25 = PyInt_FromLong(0); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; goto __pyx_L1;}
8835
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_EOL, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; goto __pyx_L1;}
8276
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_EOL, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; goto __pyx_L1;}
8836
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8277
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8837
8278
8838
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":821 */
8279
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":821 */
8839
  __pyx_25 = PyInt_FromLong(1); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; goto __pyx_L1;}
8280
  __pyx_25 = PyInt_FromLong(1); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; goto __pyx_L1;}
8840
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_NOP, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; goto __pyx_L1;}
8281
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_NOP, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; goto __pyx_L1;}
8841
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8282
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8842
8283
8843
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":822 */
8284
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":822 */
8844
  __pyx_25 = PyInt_FromLong(2); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; goto __pyx_L1;}
8285
  __pyx_25 = PyInt_FromLong(2); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; goto __pyx_L1;}
8845
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_MSS, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; goto __pyx_L1;}
8286
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_MSS, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; goto __pyx_L1;}
8846
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8287
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8847
8288
8848
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":823 */
8289
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":823 */
8849
  __pyx_25 = PyInt_FromLong(3); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;}
8290
  __pyx_25 = PyInt_FromLong(3); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;}
8850
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_WSCALE, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;}
8291
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_WSCALE, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;}
8851
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8292
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8852
8293
8853
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":824 */
8294
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":824 */
8854
  __pyx_25 = PyInt_FromLong(4); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; goto __pyx_L1;}
8295
  __pyx_25 = PyInt_FromLong(4); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; goto __pyx_L1;}
8855
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_SACKOK, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; goto __pyx_L1;}
8296
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_SACKOK, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; goto __pyx_L1;}
8856
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8297
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8857
8298
8858
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":825 */
8299
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":825 */
8859
  __pyx_25 = PyInt_FromLong(5); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; goto __pyx_L1;}
8300
  __pyx_25 = PyInt_FromLong(5); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; goto __pyx_L1;}
8860
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_SACK, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; goto __pyx_L1;}
8301
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_SACK, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; goto __pyx_L1;}
8861
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8302
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8862
8303
8863
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":826 */
8304
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":826 */
8864
  __pyx_25 = PyInt_FromLong(6); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; goto __pyx_L1;}
8305
  __pyx_25 = PyInt_FromLong(6); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; goto __pyx_L1;}
8865
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_ECHO, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; goto __pyx_L1;}
8306
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_ECHO, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; goto __pyx_L1;}
8866
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8307
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8867
8308
8868
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":827 */
8309
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":827 */
8869
  __pyx_25 = PyInt_FromLong(7); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; goto __pyx_L1;}
8310
  __pyx_25 = PyInt_FromLong(7); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; goto __pyx_L1;}
8870
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_ECHOREPLY, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; goto __pyx_L1;}
8311
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_ECHOREPLY, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; goto __pyx_L1;}
8871
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8312
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8872
8313
8873
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":828 */
8314
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":828 */
8874
  __pyx_25 = PyInt_FromLong(8); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; goto __pyx_L1;}
8315
  __pyx_25 = PyInt_FromLong(8); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; goto __pyx_L1;}
8875
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_TIMESTAMP, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; goto __pyx_L1;}
8316
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_TIMESTAMP, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; goto __pyx_L1;}
8876
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8317
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8877
8318
8878
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":829 */
8319
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":829 */
8879
  __pyx_25 = PyInt_FromLong(9); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; goto __pyx_L1;}
8320
  __pyx_25 = PyInt_FromLong(9); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; goto __pyx_L1;}
8880
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_POCONN, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; goto __pyx_L1;}
8321
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_POCONN, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; goto __pyx_L1;}
8881
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8322
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8882
8323
8883
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":830 */
8324
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":830 */
8884
  __pyx_25 = PyInt_FromLong(10); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; goto __pyx_L1;}
8325
  __pyx_25 = PyInt_FromLong(10); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; goto __pyx_L1;}
8885
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_POSVC, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; goto __pyx_L1;}
8326
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_POSVC, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; goto __pyx_L1;}
8886
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8327
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8887
8328
8888
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":831 */
8329
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":831 */
8889
  __pyx_25 = PyInt_FromLong(11); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; goto __pyx_L1;}
8330
  __pyx_25 = PyInt_FromLong(11); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; goto __pyx_L1;}
8890
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_CC, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; goto __pyx_L1;}
8331
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_CC, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; goto __pyx_L1;}
8891
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8332
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8892
8333
8893
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":832 */
8334
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":832 */
8894
  __pyx_25 = PyInt_FromLong(12); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; goto __pyx_L1;}
8335
  __pyx_25 = PyInt_FromLong(12); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; goto __pyx_L1;}
8895
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_CCNEW, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; goto __pyx_L1;}
8336
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_CCNEW, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; goto __pyx_L1;}
8896
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8337
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8897
8338
8898
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":833 */
8339
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":833 */
8899
  __pyx_25 = PyInt_FromLong(13); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; goto __pyx_L1;}
8340
  __pyx_25 = PyInt_FromLong(13); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; goto __pyx_L1;}
8900
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_CCECHO, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; goto __pyx_L1;}
8341
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_CCECHO, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; goto __pyx_L1;}
8901
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8342
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8902
8343
8903
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":834 */
8344
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":834 */
8904
  __pyx_25 = PyInt_FromLong(14); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; goto __pyx_L1;}
8345
  __pyx_25 = PyInt_FromLong(14); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; goto __pyx_L1;}
8905
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_ALTSUM, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; goto __pyx_L1;}
8346
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_ALTSUM, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; goto __pyx_L1;}
8906
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8347
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8907
8348
8908
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":835 */
8349
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":835 */
8909
  __pyx_25 = PyInt_FromLong(15); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; goto __pyx_L1;}
8350
  __pyx_25 = PyInt_FromLong(15); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; goto __pyx_L1;}
8910
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_ALTSUMDATA, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; goto __pyx_L1;}
8351
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_ALTSUMDATA, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; goto __pyx_L1;}
8911
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8352
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8912
8353
8913
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":836 */
8354
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":836 */
8914
  __pyx_25 = PyInt_FromLong(16); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; goto __pyx_L1;}
8355
  __pyx_25 = PyInt_FromLong(16); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; goto __pyx_L1;}
8915
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_SKEETER, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; goto __pyx_L1;}
8356
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_SKEETER, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; goto __pyx_L1;}
8916
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8357
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8917
8358
8918
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":837 */
8359
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":837 */
8919
  __pyx_25 = PyInt_FromLong(17); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; goto __pyx_L1;}
8360
  __pyx_25 = PyInt_FromLong(17); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; goto __pyx_L1;}
8920
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_BUBBA, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; goto __pyx_L1;}
8361
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_BUBBA, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; goto __pyx_L1;}
8921
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8362
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8922
8363
8923
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":838 */
8364
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":838 */
8924
  __pyx_25 = PyInt_FromLong(18); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; goto __pyx_L1;}
8365
  __pyx_25 = PyInt_FromLong(18); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; goto __pyx_L1;}
8925
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_TRAILSUM, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; goto __pyx_L1;}
8366
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_TRAILSUM, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; goto __pyx_L1;}
8926
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8367
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8927
8368
8928
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":839 */
8369
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":839 */
8929
  __pyx_25 = PyInt_FromLong(19); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; goto __pyx_L1;}
8370
  __pyx_25 = PyInt_FromLong(19); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; goto __pyx_L1;}
8930
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_MD5, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; goto __pyx_L1;}
8371
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_MD5, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; goto __pyx_L1;}
8931
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8372
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8932
8373
8933
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":840 */
8374
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":840 */
8934
  __pyx_25 = PyInt_FromLong(20); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; goto __pyx_L1;}
8375
  __pyx_25 = PyInt_FromLong(20); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; goto __pyx_L1;}
8935
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_SCPS, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; goto __pyx_L1;}
8376
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_SCPS, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; goto __pyx_L1;}
8936
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8377
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8937
8378
8938
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":841 */
8379
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":841 */
8939
  __pyx_25 = PyInt_FromLong(21); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; goto __pyx_L1;}
8380
  __pyx_25 = PyInt_FromLong(21); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; goto __pyx_L1;}
8940
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_SNACK, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; goto __pyx_L1;}
8381
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_SNACK, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; goto __pyx_L1;}
8941
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8382
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8942
8383
8943
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":842 */
8384
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":842 */
8944
  __pyx_25 = PyInt_FromLong(22); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; goto __pyx_L1;}
8385
  __pyx_25 = PyInt_FromLong(22); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; goto __pyx_L1;}
8945
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_REC, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; goto __pyx_L1;}
8386
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_REC, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; goto __pyx_L1;}
8946
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8387
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8947
8388
8948
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":843 */
8389
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":843 */
8949
  __pyx_25 = PyInt_FromLong(23); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; goto __pyx_L1;}
8390
  __pyx_25 = PyInt_FromLong(23); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; goto __pyx_L1;}
8950
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_CORRUPT, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; goto __pyx_L1;}
8391
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_CORRUPT, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; goto __pyx_L1;}
8951
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8392
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8952
8393
8953
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":844 */
8394
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":844 */
8954
  __pyx_25 = PyInt_FromLong(24); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; goto __pyx_L1;}
8395
  __pyx_25 = PyInt_FromLong(24); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; goto __pyx_L1;}
8955
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_SNAP, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; goto __pyx_L1;}
8396
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_SNAP, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; goto __pyx_L1;}
8956
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8397
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8957
8398
8958
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":845 */
8399
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":845 */
8959
  __pyx_25 = PyInt_FromLong(26); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; goto __pyx_L1;}
8400
  __pyx_25 = PyInt_FromLong(26); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; goto __pyx_L1;}
8960
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_TCPCOMP, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; goto __pyx_L1;}
8401
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_TCPCOMP, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; goto __pyx_L1;}
8961
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8402
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8962
8403
8963
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":846 */
8404
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":846 */
8964
  __pyx_25 = PyInt_FromLong(27); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; goto __pyx_L1;}
8405
  __pyx_25 = PyInt_FromLong(27); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; goto __pyx_L1;}
8965
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_MAX, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; goto __pyx_L1;}
8406
  if (PyObject_SetAttr(__pyx_m, __pyx_n_TCP_OPT_MAX, __pyx_25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; goto __pyx_L1;}
8966
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8407
  Py_DECREF(__pyx_25); __pyx_25 = 0;
8967
8408
8968
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":848 */
8409
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":848 */
8969
  __pyx_25 = PyInt_FromLong(1); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; goto __pyx_L1;}
8410
  __pyx_25 = PyInt_FromLong(1); if (!__pyx_25) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; goto __pyx_L1;}
8970
  __pyx_k49 = __pyx_25;
8411
  __pyx_d27 = __pyx_25;
8971
  __pyx_25 = 0;
8412
  __pyx_25 = 0;
8972
  __pyx_26 = PyInt_FromLong(0); if (!__pyx_26) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; goto __pyx_L1;}
8413
  __pyx_26 = PyInt_FromLong(0); if (!__pyx_26) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; goto __pyx_L1;}
8973
  __pyx_k50 = __pyx_26;
8414
  __pyx_d28 = __pyx_26;
8974
  __pyx_26 = 0;
8415
  __pyx_26 = 0;
8975
  __pyx_27 = __Pyx_GetName(__pyx_m, __pyx_n_TH_SYN); if (!__pyx_27) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; goto __pyx_L1;}
8416
  __pyx_27 = __Pyx_GetName(__pyx_m, __pyx_n_TH_SYN); if (!__pyx_27) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; goto __pyx_L1;}
8976
  __pyx_k51 = __pyx_27;
8417
  __pyx_d29 = __pyx_27;
8977
  __pyx_27 = 0;
8418
  __pyx_27 = 0;
8978
  __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;}
8419
  __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;}
8979
  __pyx_k52 = __pyx_28;
8420
  __pyx_d30 = __pyx_28;
8980
  __pyx_28 = 0;
8421
  __pyx_28 = 0;
8981
  __pyx_29 = PyInt_FromLong(0); if (!__pyx_29) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; goto __pyx_L1;}
8422
  __pyx_29 = PyInt_FromLong(0); if (!__pyx_29) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; goto __pyx_L1;}
8982
  __pyx_k53 = __pyx_29;
8423
  __pyx_d31 = __pyx_29;
8983
  __pyx_29 = 0;
8424
  __pyx_29 = 0;
8984
8425
8985
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":871 */
8426
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":871 */
8986
  __pyx_30 = PyInt_FromLong(8); if (!__pyx_30) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;}
8427
  __pyx_30 = PyInt_FromLong(8); if (!__pyx_30) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;}
8987
  if (PyObject_SetAttr(__pyx_m, __pyx_n_UDP_HDR_LEN, __pyx_30) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;}
8428
  if (PyObject_SetAttr(__pyx_m, __pyx_n_UDP_HDR_LEN, __pyx_30) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;}
8988
  Py_DECREF(__pyx_30); __pyx_30 = 0;
8429
  Py_DECREF(__pyx_30); __pyx_30 = 0;
8989
8430
8990
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":872 */
8431
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":872 */
8991
  __pyx_30 = PyInt_FromLong(65535); if (!__pyx_30) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; goto __pyx_L1;}
8432
  __pyx_30 = PyInt_FromLong(65535); if (!__pyx_30) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; goto __pyx_L1;}
8992
  if (PyObject_SetAttr(__pyx_m, __pyx_n_UDP_PORT_MAX, __pyx_30) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; goto __pyx_L1;}
8433
  if (PyObject_SetAttr(__pyx_m, __pyx_n_UDP_PORT_MAX, __pyx_30) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; goto __pyx_L1;}
8993
  Py_DECREF(__pyx_30); __pyx_30 = 0;
8434
  Py_DECREF(__pyx_30); __pyx_30 = 0;
8994
8435
8995
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":874 */
8436
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":874 */
8996
  __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;}
8437
  __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;}
8997
  __pyx_k54 = __pyx_30;
8438
  __pyx_d32 = __pyx_30;
8998
  __pyx_30 = 0;
8439
  __pyx_30 = 0;
8999
8440
9000
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":913 */
8441
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":913 */
9001
  __pyx_31 = PyInt_FromLong(1); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; goto __pyx_L1;}
8442
  __pyx_31 = PyInt_FromLong(1); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; goto __pyx_L1;}
9002
  if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_TYPE_OTHER, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; goto __pyx_L1;}
8443
  if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_TYPE_OTHER, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; goto __pyx_L1;}
9003
  Py_DECREF(__pyx_31); __pyx_31 = 0;
8444
  Py_DECREF(__pyx_31); __pyx_31 = 0;
9004
8445
9005
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":914 */
8446
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":914 */
9006
  __pyx_31 = PyInt_FromLong(6); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; goto __pyx_L1;}
8447
  __pyx_31 = PyInt_FromLong(6); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; goto __pyx_L1;}
9007
  if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_TYPE_ETH, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; goto __pyx_L1;}
8448
  if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_TYPE_ETH, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; goto __pyx_L1;}
9008
  Py_DECREF(__pyx_31); __pyx_31 = 0;
8449
  Py_DECREF(__pyx_31); __pyx_31 = 0;
9009
8450
9010
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":915 */
8451
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":915 */
9011
  __pyx_31 = PyInt_FromLong(24); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; goto __pyx_L1;}
8452
  __pyx_31 = PyInt_FromLong(24); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; goto __pyx_L1;}
9012
  if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_TYPE_LOOPBACK, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; goto __pyx_L1;}
8453
  if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_TYPE_LOOPBACK, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; goto __pyx_L1;}
9013
  Py_DECREF(__pyx_31); __pyx_31 = 0;
8454
  Py_DECREF(__pyx_31); __pyx_31 = 0;
9014
8455
9015
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":916 */
8456
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":916 */
9016
  __pyx_31 = PyInt_FromLong(53); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; goto __pyx_L1;}
8457
  __pyx_31 = PyInt_FromLong(53); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; goto __pyx_L1;}
9017
  if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_TYPE_TUN, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; goto __pyx_L1;}
8458
  if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_TYPE_TUN, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; goto __pyx_L1;}
9018
  Py_DECREF(__pyx_31); __pyx_31 = 0;
8459
  Py_DECREF(__pyx_31); __pyx_31 = 0;
9019
8460
9020
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":918 */
8461
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":918 */
9021
  __pyx_31 = PyInt_FromLong(1); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; goto __pyx_L1;}
8462
  __pyx_31 = PyInt_FromLong(0x01); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; goto __pyx_L1;}
9022
  if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_FLAG_UP, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; goto __pyx_L1;}
8463
  if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_FLAG_UP, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; goto __pyx_L1;}
9023
  Py_DECREF(__pyx_31); __pyx_31 = 0;
8464
  Py_DECREF(__pyx_31); __pyx_31 = 0;
9024
8465
9025
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":919 */
8466
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":919 */
9026
  __pyx_31 = PyInt_FromLong(2); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; goto __pyx_L1;}
8467
  __pyx_31 = PyInt_FromLong(0x02); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; goto __pyx_L1;}
9027
  if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_FLAG_LOOPBACK, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; goto __pyx_L1;}
8468
  if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_FLAG_LOOPBACK, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; goto __pyx_L1;}
9028
  Py_DECREF(__pyx_31); __pyx_31 = 0;
8469
  Py_DECREF(__pyx_31); __pyx_31 = 0;
9029
8470
9030
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":920 */
8471
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":920 */
9031
  __pyx_31 = PyInt_FromLong(4); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; goto __pyx_L1;}
8472
  __pyx_31 = PyInt_FromLong(0x04); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; goto __pyx_L1;}
9032
  if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_FLAG_POINTOPOINT, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; goto __pyx_L1;}
8473
  if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_FLAG_POINTOPOINT, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; goto __pyx_L1;}
9033
  Py_DECREF(__pyx_31); __pyx_31 = 0;
8474
  Py_DECREF(__pyx_31); __pyx_31 = 0;
9034
8475
9035
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":921 */
8476
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":921 */
9036
  __pyx_31 = PyInt_FromLong(8); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; goto __pyx_L1;}
8477
  __pyx_31 = PyInt_FromLong(0x08); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; goto __pyx_L1;}
9037
  if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_FLAG_NOARP, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; goto __pyx_L1;}
8478
  if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_FLAG_NOARP, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; goto __pyx_L1;}
9038
  Py_DECREF(__pyx_31); __pyx_31 = 0;
8479
  Py_DECREF(__pyx_31); __pyx_31 = 0;
9039
8480
9040
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":922 */
8481
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":922 */
9041
  __pyx_31 = PyInt_FromLong(16); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;}
8482
  __pyx_31 = PyInt_FromLong(0x10); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;}
9042
  if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_FLAG_BROADCAST, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;}
8483
  if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_FLAG_BROADCAST, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;}
9043
  Py_DECREF(__pyx_31); __pyx_31 = 0;
8484
  Py_DECREF(__pyx_31); __pyx_31 = 0;
9044
8485
9045
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":923 */
8486
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":923 */
9046
  __pyx_31 = PyInt_FromLong(32); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; goto __pyx_L1;}
8487
  __pyx_31 = PyInt_FromLong(0x20); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; goto __pyx_L1;}
9047
  if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_FLAG_MULTICAST, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; goto __pyx_L1;}
8488
  if (PyObject_SetAttr(__pyx_m, __pyx_n_INTF_FLAG_MULTICAST, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; goto __pyx_L1;}
9048
  Py_DECREF(__pyx_31); __pyx_31 = 0;
8489
  Py_DECREF(__pyx_31); __pyx_31 = 0;
9049
8490
9050
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1038 */
8491
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1038 */
9051
  Py_INCREF(Py_None);
8492
  Py_INCREF(Py_None);
9052
  __pyx_k55 = Py_None;
8493
  __pyx_d33 = Py_None;
9053
8494
9054
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1137 */
8495
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1137 */
9055
  Py_INCREF(Py_None);
8496
  Py_INCREF(Py_None);
9056
  __pyx_k56 = Py_None;
8497
  __pyx_d34 = Py_None;
9057
8498
9058
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1183 */
8499
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1183 */
9059
  __pyx_31 = PyInt_FromLong(1); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; goto __pyx_L1;}
8500
  __pyx_31 = PyInt_FromLong(1); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; goto __pyx_L1;}
9060
  if (PyObject_SetAttr(__pyx_m, __pyx_n_FW_OP_ALLOW, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; goto __pyx_L1;}
8501
  if (PyObject_SetAttr(__pyx_m, __pyx_n_FW_OP_ALLOW, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; goto __pyx_L1;}
9061
  Py_DECREF(__pyx_31); __pyx_31 = 0;
8502
  Py_DECREF(__pyx_31); __pyx_31 = 0;
9062
8503
9063
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1184 */
8504
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1184 */
9064
  __pyx_31 = PyInt_FromLong(2); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; goto __pyx_L1;}
8505
  __pyx_31 = PyInt_FromLong(2); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; goto __pyx_L1;}
9065
  if (PyObject_SetAttr(__pyx_m, __pyx_n_FW_OP_BLOCK, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; goto __pyx_L1;}
8506
  if (PyObject_SetAttr(__pyx_m, __pyx_n_FW_OP_BLOCK, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; goto __pyx_L1;}
9066
  Py_DECREF(__pyx_31); __pyx_31 = 0;
8507
  Py_DECREF(__pyx_31); __pyx_31 = 0;
9067
8508
9068
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1186 */
8509
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1186 */
9069
  __pyx_31 = PyInt_FromLong(1); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; goto __pyx_L1;}
8510
  __pyx_31 = PyInt_FromLong(1); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; goto __pyx_L1;}
9070
  if (PyObject_SetAttr(__pyx_m, __pyx_n_FW_DIR_IN, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; goto __pyx_L1;}
8511
  if (PyObject_SetAttr(__pyx_m, __pyx_n_FW_DIR_IN, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; goto __pyx_L1;}
9071
  Py_DECREF(__pyx_31); __pyx_31 = 0;
8512
  Py_DECREF(__pyx_31); __pyx_31 = 0;
9072
8513
9073
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1187 */
8514
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1187 */
9074
  __pyx_31 = PyInt_FromLong(2); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; goto __pyx_L1;}
8515
  __pyx_31 = PyInt_FromLong(2); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; goto __pyx_L1;}
9075
  if (PyObject_SetAttr(__pyx_m, __pyx_n_FW_DIR_OUT, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; goto __pyx_L1;}
8516
  if (PyObject_SetAttr(__pyx_m, __pyx_n_FW_DIR_OUT, __pyx_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; goto __pyx_L1;}
9076
  Py_DECREF(__pyx_31); __pyx_31 = 0;
8517
  Py_DECREF(__pyx_31); __pyx_31 = 0;
9077
8518
9078
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1273 */
8519
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1273 */
9079
  Py_INCREF(Py_None);
8520
  Py_INCREF(Py_None);
9080
  __pyx_k57 = Py_None;
8521
  __pyx_d35 = Py_None;
9081
8522
9082
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1371 */
8523
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1371 */
9083
  Py_INCREF(Py_None);
8524
  Py_INCREF(Py_None);
9084
  __pyx_k58 = Py_None;
8525
  __pyx_d36 = Py_None;
9085
8526
9086
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1490 */
8527
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1490 */
9087
  __pyx_31 = PyInt_FromLong(1500); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; goto __pyx_L1;}
8528
  __pyx_31 = PyInt_FromLong(1500); if (!__pyx_31) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; goto __pyx_L1;}
9088
  __pyx_k59 = __pyx_31;
8529
  __pyx_d37 = __pyx_31;
9089
  __pyx_31 = 0;
8530
  __pyx_31 = 0;
9090
8531
9091
  /* "/Users/dugsong/projects/libdnet/python/dnet.pyx":1531 */
8532
  /* "/tmp/portage/dev-libs/libdnet-1.12/work/libdnet-1.12/python/dnet.pyx":1531 */
9092
  return;
8533
  return;
9093
  __pyx_L1:;
8534
  __pyx_L1:;
9094
  Py_XDECREF(__pyx_1);
8535
  Py_XDECREF(__pyx_1);
Lines 9135-9236 Link Here
9135
  __pyx_f = __pyx_filenames;
8576
  __pyx_f = __pyx_filenames;
9136
}
8577
}
9137
8578
9138
static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name) {
9139
    if (!type) {
9140
        PyErr_Format(PyExc_SystemError, "Missing type object");
9141
        return 0;
9142
    }
9143
    if ((none_allowed && obj == Py_None) || PyObject_TypeCheck(obj, type))
9144
        return 1;
9145
    PyErr_Format(PyExc_TypeError,
9146
        "Argument '%s' has incorrect type (expected %s, got %s)",
9147
        name, type->tp_name, obj->ob_type->tp_name);
9148
    return 0;
9149
}
9150
9151
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
9152
    PyObject *result;
9153
    result = PyObject_GetAttr(dict, name);
9154
    if (!result)
9155
        PyErr_SetObject(PyExc_NameError, name);
9156
    return result;
9157
}
9158
9159
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
8579
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
8580
    if (value == Py_None)
8581
        value = NULL;
8582
    if (tb == Py_None)
8583
        tb = NULL;
9160
    Py_XINCREF(type);
8584
    Py_XINCREF(type);
9161
    Py_XINCREF(value);
8585
    Py_XINCREF(value);
9162
    Py_XINCREF(tb);
8586
    Py_XINCREF(tb);
9163
    /* First, check the traceback argument, replacing None with NULL. */
8587
    if (tb && !PyTraceBack_Check(tb)) {
9164
    if (tb == Py_None) {
9165
        Py_DECREF(tb);
9166
        tb = 0;
9167
    }
9168
    else if (tb != NULL && !PyTraceBack_Check(tb)) {
9169
        PyErr_SetString(PyExc_TypeError,
8588
        PyErr_SetString(PyExc_TypeError,
9170
            "raise: arg 3 must be a traceback or None");
8589
            "raise: arg 3 must be a traceback or None");
9171
        goto raise_error;
8590
        goto raise_error;
9172
    }
8591
    }
9173
    /* Next, replace a missing value with None */
8592
    #if PY_VERSION_HEX < 0x02050000
9174
    if (value == NULL) {
8593
    if (!PyClass_Check(type))
9175
        value = Py_None;
8594
    #else
9176
        Py_INCREF(value);
8595
    if (!PyType_Check(type))
9177
    }
8596
    #endif
9178
    /* Next, repeatedly, replace a tuple exception with its first item */
8597
    {
9179
    while (PyTuple_Check(type) && PyTuple_Size(type) > 0) {
9180
        PyObject *tmp = type;
9181
        type = PyTuple_GET_ITEM(type, 0);
9182
        Py_INCREF(type);
9183
        Py_DECREF(tmp);
9184
    }
9185
    if (PyString_CheckExact(type)) {
9186
        /* Raising builtin string is deprecated but still allowed --
9187
         * do nothing.  Raising an instance of a new-style str
9188
         * subclass is right out. */
9189
        if (PyErr_Warn(PyExc_DeprecationWarning,
9190
                   "raising a string exception is deprecated"))
9191
                goto raise_error;
9192
    }
9193
    else if (PyType_Check(type) || PyClass_Check(type))
9194
        ; /* PyErr_NormalizeException(&type, &value, &tb); */
9195
    else if (PyInstance_Check(type)) {
9196
        /* Raising an instance.  The value should be a dummy. */
8598
        /* Raising an instance.  The value should be a dummy. */
9197
        if (value != Py_None) {
8599
        if (value) {
9198
            PyErr_SetString(PyExc_TypeError,
8600
            PyErr_SetString(PyExc_TypeError,
9199
              "instance exception may not have a separate value");
8601
                "instance exception may not have a separate value");
9200
            goto raise_error;
8602
            goto raise_error;
9201
        }
8603
        }
9202
        else {
8604
        /* Normalize to raise <class>, <instance> */
9203
            /* Normalize to raise <class>, <instance> */
8605
        value = type;
9204
            Py_DECREF(value);
8606
        #if PY_VERSION_HEX < 0x02050000
9205
            value = type;
8607
            if (PyInstance_Check(type)) {
9206
            type = (PyObject*) ((PyInstanceObject*)type)->in_class;
8608
                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
8609
                Py_INCREF(type);
8610
            }
8611
            else {
8612
                PyErr_SetString(PyExc_TypeError,
8613
                    "raise: exception must be an old-style class or instance");
8614
                goto raise_error;
8615
            }
8616
        #else
8617
            type = (PyObject*) type->ob_type;
9207
            Py_INCREF(type);
8618
            Py_INCREF(type);
9208
        }
8619
            if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
9209
    }
9210
    else if (PyType_IsSubtype(type->ob_type, (PyTypeObject*)PyExc_Exception)) {
9211
        /* Raising a new-style object (in Py2.5).
9212
           The value should be a dummy. */
9213
        if (value != Py_None) {
9214
                PyErr_SetString(PyExc_TypeError,
8620
                PyErr_SetString(PyExc_TypeError,
9215
                  "instance exception may not have a separate value");
8621
                    "raise: exception class must be a subclass of BaseException");
9216
                goto raise_error;
8622
                goto raise_error;
9217
        }
8623
            }
9218
        else {
8624
        #endif
9219
                /* Normalize to raise <class>, <instance> */
9220
                Py_DECREF(value);
9221
                value = type;
9222
                type = (PyObject*) type->ob_type;
9223
                Py_INCREF(type);
9224
        }
9225
    }
9226
    else {
9227
        /* Not something you can raise.  You get an exception
9228
           anyway, just not what you specified :-) */
9229
        PyErr_Format(PyExc_TypeError,
9230
                     "exceptions must be classes, instances, or "
9231
                     "strings (deprecated), not %s",
9232
                     type->ob_type->tp_name);
9233
        goto raise_error;
9234
    }
8625
    }
9235
    PyErr_Restore(type, value, tb);
8626
    PyErr_Restore(type, value, tb);
9236
    return;
8627
    return;
Lines 9241-9255 Link Here
9241
    return;
8632
    return;
9242
}
8633
}
9243
8634
9244
static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
8635
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
8636
    PyObject *result;
8637
    result = PyObject_GetAttr(dict, name);
8638
    if (!result)
8639
        PyErr_SetObject(PyExc_NameError, name);
8640
    return result;
8641
}
8642
8643
static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name) {
9245
    if (!type) {
8644
    if (!type) {
9246
        PyErr_Format(PyExc_SystemError, "Missing type object");
8645
        PyErr_Format(PyExc_SystemError, "Missing type object");
9247
        return 0;
8646
        return 0;
9248
    }
8647
    }
9249
    if (obj == Py_None || PyObject_TypeCheck(obj, type))
8648
    if ((none_allowed && obj == Py_None) || PyObject_TypeCheck(obj, type))
9250
        return 1;
8649
        return 1;
9251
    PyErr_Format(PyExc_TypeError, "Cannot convert %s to %s",
8650
    PyErr_Format(PyExc_TypeError,
9252
        obj->ob_type->tp_name, type->tp_name);
8651
        "Argument '%s' has incorrect type (expected %s, got %s)",
8652
        name, type->tp_name, obj->ob_type->tp_name);
9253
    return 0;
8653
    return 0;
9254
}
8654
}
9255
8655
Lines 9257-9290 Link Here
9257
    PyErr_SetString(PyExc_ValueError, "unpack sequence of wrong size");
8657
    PyErr_SetString(PyExc_ValueError, "unpack sequence of wrong size");
9258
}
8658
}
9259
8659
9260
static PyObject *__Pyx_UnpackItem(PyObject *seq, Py_ssize_t i) {
8660
static PyObject *__Pyx_UnpackItem(PyObject *iter) {
9261
  PyObject *item;
8661
    PyObject *item;
9262
  if (!(item = PySequence_GetItem(seq, i))) {
8662
    if (!(item = PyIter_Next(iter))) {
9263
    if (PyErr_ExceptionMatches(PyExc_IndexError))
8663
        if (!PyErr_Occurred())
9264
    	__Pyx_UnpackError();
8664
            __Pyx_UnpackError();
9265
  }
8665
    }
9266
  return item;
8666
    return item;
9267
}
9268
9269
static int __Pyx_EndUnpack(PyObject *seq, Py_ssize_t i) {
9270
  PyObject *item;
9271
  if (item = PySequence_GetItem(seq, i)) {
9272
    Py_DECREF(item);
9273
    __Pyx_UnpackError();
9274
    return -1;
9275
  }
9276
  PyErr_Clear();
9277
    return 0;
9278
}
8667
}
9279
8668
9280
static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) {
8669
static int __Pyx_EndUnpack(PyObject *iter) {
9281
    while (t->p) {
8670
    PyObject *item;
9282
        *t->p = PyString_InternFromString(t->s);
8671
    if ((item = PyIter_Next(iter))) {
9283
        if (!*t->p)
8672
        Py_DECREF(item);
9284
            return -1;
8673
        __Pyx_UnpackError();
9285
        ++t;
8674
        return -1;
9286
    }
8675
    }
9287
    return 0;
8676
    else if (!PyErr_Occurred())
8677
        return 0;
8678
    else
8679
        return -1;
9288
}
8680
}
9289
8681
9290
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
8682
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
Lines 9292-9297 Link Here
9292
        *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
8684
        *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
9293
        if (!*t->p)
8685
        if (!*t->p)
9294
            return -1;
8686
            return -1;
8687
        if (t->i)
8688
            PyString_InternInPlace(t->p);
9295
        ++t;
8689
        ++t;
9296
    }
8690
    }
9297
    return 0;
8691
    return 0;
(-)python/dnet.pyx (-8 / +8 lines)
Lines 24-30 Link Here
24
cdef extern from "Python.h":
24
cdef extern from "Python.h":
25
    object  PyString_FromStringAndSize(char *s, int len)
25
    object  PyString_FromStringAndSize(char *s, int len)
26
    int     PyString_Size(object o)
26
    int     PyString_Size(object o)
27
    int     PyObject_AsReadBuffer(object o, char **pp, int *lenp)
27
    int     PyObject_AsReadBuffer(object o, char **pp, Py_ssize_t *lenp)
28
    int     PyInt_Check(object o)
28
    int     PyInt_Check(object o)
29
    int     PyLong_Check(object o)
29
    int     PyLong_Check(object o)
30
    long    PyInt_AsLong(object o)
30
    long    PyInt_AsLong(object o)
Lines 160-166 Link Here
160
    return PyString_FromStringAndSize(ea.data, 6)
160
    return PyString_FromStringAndSize(ea.data, 6)
161
161
162
def eth_pack_hdr(dst=ETH_ADDR_BROADCAST, src=ETH_ADDR_BROADCAST,
162
def eth_pack_hdr(dst=ETH_ADDR_BROADCAST, src=ETH_ADDR_BROADCAST,
163
                 type=ETH_TYPE_IP):
163
                 type_=ETH_TYPE_IP):
164
    """Return a packed binary string representing an Ethernet header.
164
    """Return a packed binary string representing an Ethernet header.
165
	
165
	
166
    Keyword arguments:
166
    Keyword arguments:
Lines 172-178 Link Here
172
    cdef eth_addr_t s, d
172
    cdef eth_addr_t s, d
173
    __memcpy(s.data, src, 6)
173
    __memcpy(s.data, src, 6)
174
    __memcpy(d.data, dst, 6)
174
    __memcpy(d.data, dst, 6)
175
    __eth_pack_hdr(hdr, d, s, type)
175
    __eth_pack_hdr(hdr, d, s, type_)
176
    return PyString_FromStringAndSize(hdr, 14)
176
    return PyString_FromStringAndSize(hdr, 14)
177
177
178
#
178
#
Lines 292-298 Link Here
292
    """
292
    """
293
    cdef char buf[2048]
293
    cdef char buf[2048]
294
    cdef char *p
294
    cdef char *p
295
    cdef int n
295
    cdef Py_ssize_t n
296
    if PyObject_AsReadBuffer(pkt, &p, &n) == 0:
296
    if PyObject_AsReadBuffer(pkt, &p, &n) == 0:
297
        if n < 2048:
297
        if n < 2048:
298
            memcpy(buf, p, n)
298
            memcpy(buf, p, n)
Lines 308-314 Link Here
308
308
309
def ip_cksum_add(buf, int sum):
309
def ip_cksum_add(buf, int sum):
310
    cdef char *p
310
    cdef char *p
311
    cdef int n
311
    cdef Py_ssize_t n
312
    if PyObject_AsReadBuffer(buf, &p, &n) == 0:
312
    if PyObject_AsReadBuffer(buf, &p, &n) == 0:
313
        return __ip_cksum_add(p, n, sum)
313
        return __ip_cksum_add(p, n, sum)
314
    else:
314
    else:
Lines 441-447 Link Here
441
    """
441
    """
442
    cdef addr_t _addr
442
    cdef addr_t _addr
443
    
443
    
444
    def __init__(self, addrtxt=None, type=ADDR_TYPE_NONE):
444
    def __init__(self, addrtxt=None, type_=ADDR_TYPE_NONE):
445
        if addrtxt != None and addr_aton(addrtxt, &self._addr) < 0:
445
        if addrtxt != None and addr_aton(addrtxt, &self._addr) < 0:
446
            if PyString_Size(addrtxt) == 4:
446
            if PyString_Size(addrtxt) == 4:
447
                self._addr.addr_type = ADDR_TYPE_IP
447
                self._addr.addr_type = ADDR_TYPE_IP
Lines 785-791 Link Here
785
cdef extern from *:
785
cdef extern from *:
786
    void __icmp_pack_hdr "icmp_pack_hdr" (char *hdr, int type, int code)
786
    void __icmp_pack_hdr "icmp_pack_hdr" (char *hdr, int type, int code)
787
    
787
    
788
def icmp_pack_hdr(type, code):
788
def icmp_pack_hdr(type_, code):
789
    """Return a packed binary string representing an ICMP header.
789
    """Return a packed binary string representing an ICMP header.
790
790
791
    Keyword arguments:
791
    Keyword arguments:
Lines 793-799 Link Here
793
    code -- ICMP code		(8-bit integer)
793
    code -- ICMP code		(8-bit integer)
794
    """
794
    """
795
    cdef char buf[4]
795
    cdef char buf[4]
796
    __icmp_pack_hdr(buf, type, code)
796
    __icmp_pack_hdr(buf, type_, code)
797
    return PyString_FromStringAndSize(buf, sizeof(buf))
797
    return PyString_FromStringAndSize(buf, sizeof(buf))
798
798
799
#
799
#

Return to bug 526418