1 | /* ---------------------------------------------------------------------------- |
---|
2 | * This file was automatically generated by SWIG (http://www.swig.org). |
---|
3 | * Version 1.3.21 |
---|
4 | * |
---|
5 | * This file is not intended to be easily readable and contains a number of |
---|
6 | * coding conventions designed to improve portability and efficiency. Do not make |
---|
7 | * changes to this file unless you know what you are doing--modify the SWIG |
---|
8 | * interface file instead. |
---|
9 | * ----------------------------------------------------------------------------- */ |
---|
10 | |
---|
11 | #define SWIGPYTHON |
---|
12 | |
---|
13 | #include "Python.h" |
---|
14 | |
---|
15 | /*************************************************************** -*- c -*- |
---|
16 | * python/precommon.swg |
---|
17 | * |
---|
18 | * Rename all exported symbols from common.swg, to avoid symbol |
---|
19 | * clashes if multiple interpreters are included |
---|
20 | * |
---|
21 | ************************************************************************/ |
---|
22 | |
---|
23 | #define SWIG_TypeRegister SWIG_Python_TypeRegister |
---|
24 | #define SWIG_TypeCheck SWIG_Python_TypeCheck |
---|
25 | #define SWIG_TypeCast SWIG_Python_TypeCast |
---|
26 | #define SWIG_TypeDynamicCast SWIG_Python_TypeDynamicCast |
---|
27 | #define SWIG_TypeName SWIG_Python_TypeName |
---|
28 | #define SWIG_TypeQuery SWIG_Python_TypeQuery |
---|
29 | #define SWIG_TypeClientData SWIG_Python_TypeClientData |
---|
30 | #define SWIG_PackData SWIG_Python_PackData |
---|
31 | #define SWIG_UnpackData SWIG_Python_UnpackData |
---|
32 | |
---|
33 | |
---|
34 | /*********************************************************************** |
---|
35 | * common.swg |
---|
36 | * |
---|
37 | * This file contains generic SWIG runtime support for pointer |
---|
38 | * type checking as well as a few commonly used macros to control |
---|
39 | * external linkage. |
---|
40 | * |
---|
41 | * Author : David Beazley (beazley@cs.uchicago.edu) |
---|
42 | * |
---|
43 | * Copyright (c) 1999-2000, The University of Chicago |
---|
44 | * |
---|
45 | * This file may be freely redistributed without license or fee provided |
---|
46 | * this copyright message remains intact. |
---|
47 | ************************************************************************/ |
---|
48 | |
---|
49 | #include <string.h> |
---|
50 | |
---|
51 | #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) |
---|
52 | # if defined(_MSC_VER) || defined(__GNUC__) |
---|
53 | # if defined(STATIC_LINKED) |
---|
54 | # define SWIGEXPORT(a) a |
---|
55 | # define SWIGIMPORT(a) extern a |
---|
56 | # else |
---|
57 | # define SWIGEXPORT(a) __declspec(dllexport) a |
---|
58 | # define SWIGIMPORT(a) extern a |
---|
59 | # endif |
---|
60 | # else |
---|
61 | # if defined(__BORLANDC__) |
---|
62 | # define SWIGEXPORT(a) a _export |
---|
63 | # define SWIGIMPORT(a) a _export |
---|
64 | # else |
---|
65 | # define SWIGEXPORT(a) a |
---|
66 | # define SWIGIMPORT(a) a |
---|
67 | # endif |
---|
68 | # endif |
---|
69 | #else |
---|
70 | # define SWIGEXPORT(a) a |
---|
71 | # define SWIGIMPORT(a) a |
---|
72 | #endif |
---|
73 | |
---|
74 | #ifdef SWIG_GLOBAL |
---|
75 | # define SWIGRUNTIME(a) SWIGEXPORT(a) |
---|
76 | #else |
---|
77 | # define SWIGRUNTIME(a) static a |
---|
78 | #endif |
---|
79 | |
---|
80 | #ifdef __cplusplus |
---|
81 | extern "C" { |
---|
82 | #endif |
---|
83 | |
---|
84 | typedef void *(*swig_converter_func)(void *); |
---|
85 | typedef struct swig_type_info *(*swig_dycast_func)(void **); |
---|
86 | |
---|
87 | typedef struct swig_type_info { |
---|
88 | const char *name; |
---|
89 | swig_converter_func converter; |
---|
90 | const char *str; |
---|
91 | void *clientdata; |
---|
92 | swig_dycast_func dcast; |
---|
93 | struct swig_type_info *next; |
---|
94 | struct swig_type_info *prev; |
---|
95 | } swig_type_info; |
---|
96 | |
---|
97 | #ifdef SWIG_NOINCLUDE |
---|
98 | |
---|
99 | SWIGIMPORT(swig_type_info *) SWIG_TypeRegister(swig_type_info *); |
---|
100 | SWIGIMPORT(swig_type_info *) SWIG_TypeCheck(char *c, swig_type_info *); |
---|
101 | SWIGIMPORT(void *) SWIG_TypeCast(swig_type_info *, void *); |
---|
102 | SWIGIMPORT(swig_type_info *) SWIG_TypeDynamicCast(swig_type_info *, void **); |
---|
103 | SWIGIMPORT(const char *) SWIG_TypeName(const swig_type_info *); |
---|
104 | SWIGIMPORT(swig_type_info *) SWIG_TypeQuery(const char *); |
---|
105 | SWIGIMPORT(void) SWIG_TypeClientData(swig_type_info *, void *); |
---|
106 | SWIGIMPORT(char *) SWIG_PackData(char *, void *, int); |
---|
107 | SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int); |
---|
108 | |
---|
109 | #else |
---|
110 | |
---|
111 | static swig_type_info *swig_type_list = 0; |
---|
112 | |
---|
113 | /* Register a type mapping with the type-checking */ |
---|
114 | SWIGRUNTIME(swig_type_info *) |
---|
115 | SWIG_TypeRegister(swig_type_info *ti) { |
---|
116 | swig_type_info *tc, *head, *ret, *next; |
---|
117 | /* Check to see if this type has already been registered */ |
---|
118 | tc = swig_type_list; |
---|
119 | while (tc) { |
---|
120 | if (strcmp(tc->name, ti->name) == 0) { |
---|
121 | /* Already exists in the table. Just add additional types to the list */ |
---|
122 | if (tc->clientdata) ti->clientdata = tc->clientdata; |
---|
123 | head = tc; |
---|
124 | next = tc->next; |
---|
125 | goto l1; |
---|
126 | } |
---|
127 | tc = tc->prev; |
---|
128 | } |
---|
129 | head = ti; |
---|
130 | next = 0; |
---|
131 | |
---|
132 | /* Place in list */ |
---|
133 | ti->prev = swig_type_list; |
---|
134 | swig_type_list = ti; |
---|
135 | |
---|
136 | /* Build linked lists */ |
---|
137 | l1: |
---|
138 | ret = head; |
---|
139 | tc = ti + 1; |
---|
140 | /* Patch up the rest of the links */ |
---|
141 | while (tc->name) { |
---|
142 | head->next = tc; |
---|
143 | tc->prev = head; |
---|
144 | head = tc; |
---|
145 | tc++; |
---|
146 | } |
---|
147 | if (next) next->prev = head; |
---|
148 | head->next = next; |
---|
149 | return ret; |
---|
150 | } |
---|
151 | |
---|
152 | /* Check the typename */ |
---|
153 | SWIGRUNTIME(swig_type_info *) |
---|
154 | SWIG_TypeCheck(char *c, swig_type_info *ty) { |
---|
155 | swig_type_info *s; |
---|
156 | if (!ty) return 0; /* Void pointer */ |
---|
157 | s = ty->next; /* First element always just a name */ |
---|
158 | do { |
---|
159 | if (strcmp(s->name,c) == 0) { |
---|
160 | if (s == ty->next) return s; |
---|
161 | /* Move s to the top of the linked list */ |
---|
162 | s->prev->next = s->next; |
---|
163 | if (s->next) { |
---|
164 | s->next->prev = s->prev; |
---|
165 | } |
---|
166 | /* Insert s as second element in the list */ |
---|
167 | s->next = ty->next; |
---|
168 | if (ty->next) ty->next->prev = s; |
---|
169 | ty->next = s; |
---|
170 | s->prev = ty; |
---|
171 | return s; |
---|
172 | } |
---|
173 | s = s->next; |
---|
174 | } while (s && (s != ty->next)); |
---|
175 | return 0; |
---|
176 | } |
---|
177 | |
---|
178 | /* Cast a pointer up an inheritance hierarchy */ |
---|
179 | SWIGRUNTIME(void *) |
---|
180 | SWIG_TypeCast(swig_type_info *ty, void *ptr) { |
---|
181 | if ((!ty) || (!ty->converter)) return ptr; |
---|
182 | return (*ty->converter)(ptr); |
---|
183 | } |
---|
184 | |
---|
185 | /* Dynamic pointer casting. Down an inheritance hierarchy */ |
---|
186 | SWIGRUNTIME(swig_type_info *) |
---|
187 | SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { |
---|
188 | swig_type_info *lastty = ty; |
---|
189 | if (!ty || !ty->dcast) return ty; |
---|
190 | while (ty && (ty->dcast)) { |
---|
191 | ty = (*ty->dcast)(ptr); |
---|
192 | if (ty) lastty = ty; |
---|
193 | } |
---|
194 | return lastty; |
---|
195 | } |
---|
196 | |
---|
197 | /* Return the name associated with this type */ |
---|
198 | SWIGRUNTIME(const char *) |
---|
199 | SWIG_TypeName(const swig_type_info *ty) { |
---|
200 | return ty->name; |
---|
201 | } |
---|
202 | |
---|
203 | /* Search for a swig_type_info structure */ |
---|
204 | SWIGRUNTIME(swig_type_info *) |
---|
205 | SWIG_TypeQuery(const char *name) { |
---|
206 | swig_type_info *ty = swig_type_list; |
---|
207 | while (ty) { |
---|
208 | if (ty->str && (strcmp(name,ty->str) == 0)) return ty; |
---|
209 | if (ty->name && (strcmp(name,ty->name) == 0)) return ty; |
---|
210 | ty = ty->prev; |
---|
211 | } |
---|
212 | return 0; |
---|
213 | } |
---|
214 | |
---|
215 | /* Set the clientdata field for a type */ |
---|
216 | SWIGRUNTIME(void) |
---|
217 | SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { |
---|
218 | swig_type_info *tc, *equiv; |
---|
219 | if (ti->clientdata == clientdata) return; |
---|
220 | ti->clientdata = clientdata; |
---|
221 | equiv = ti->next; |
---|
222 | while (equiv) { |
---|
223 | if (!equiv->converter) { |
---|
224 | tc = swig_type_list; |
---|
225 | while (tc) { |
---|
226 | if ((strcmp(tc->name, equiv->name) == 0)) |
---|
227 | SWIG_TypeClientData(tc,clientdata); |
---|
228 | tc = tc->prev; |
---|
229 | } |
---|
230 | } |
---|
231 | equiv = equiv->next; |
---|
232 | } |
---|
233 | } |
---|
234 | |
---|
235 | /* Pack binary data into a string */ |
---|
236 | SWIGRUNTIME(char *) |
---|
237 | SWIG_PackData(char *c, void *ptr, int sz) { |
---|
238 | static char hex[17] = "0123456789abcdef"; |
---|
239 | int i; |
---|
240 | unsigned char *u = (unsigned char *) ptr; |
---|
241 | register unsigned char uu; |
---|
242 | for (i = 0; i < sz; i++,u++) { |
---|
243 | uu = *u; |
---|
244 | *(c++) = hex[(uu & 0xf0) >> 4]; |
---|
245 | *(c++) = hex[uu & 0xf]; |
---|
246 | } |
---|
247 | return c; |
---|
248 | } |
---|
249 | |
---|
250 | /* Unpack binary data from a string */ |
---|
251 | SWIGRUNTIME(char *) |
---|
252 | SWIG_UnpackData(char *c, void *ptr, int sz) { |
---|
253 | register unsigned char uu = 0; |
---|
254 | register int d; |
---|
255 | unsigned char *u = (unsigned char *) ptr; |
---|
256 | int i; |
---|
257 | for (i = 0; i < sz; i++, u++) { |
---|
258 | d = *(c++); |
---|
259 | if ((d >= '0') && (d <= '9')) |
---|
260 | uu = ((d - '0') << 4); |
---|
261 | else if ((d >= 'a') && (d <= 'f')) |
---|
262 | uu = ((d - ('a'-10)) << 4); |
---|
263 | d = *(c++); |
---|
264 | if ((d >= '0') && (d <= '9')) |
---|
265 | uu |= (d - '0'); |
---|
266 | else if ((d >= 'a') && (d <= 'f')) |
---|
267 | uu |= (d - ('a'-10)); |
---|
268 | *u = uu; |
---|
269 | } |
---|
270 | return c; |
---|
271 | } |
---|
272 | |
---|
273 | #endif |
---|
274 | |
---|
275 | #ifdef __cplusplus |
---|
276 | } |
---|
277 | #endif |
---|
278 | |
---|
279 | /*********************************************************************** |
---|
280 | * python.swg |
---|
281 | * |
---|
282 | * This file contains the runtime support for Python modules |
---|
283 | * and includes code for managing global variables and pointer |
---|
284 | * type checking. |
---|
285 | * |
---|
286 | * Author : David Beazley (beazley@cs.uchicago.edu) |
---|
287 | ************************************************************************/ |
---|
288 | |
---|
289 | #include "Python.h" |
---|
290 | |
---|
291 | #ifdef __cplusplus |
---|
292 | extern "C" { |
---|
293 | #endif |
---|
294 | |
---|
295 | #define SWIG_PY_INT 1 |
---|
296 | #define SWIG_PY_FLOAT 2 |
---|
297 | #define SWIG_PY_STRING 3 |
---|
298 | #define SWIG_PY_POINTER 4 |
---|
299 | #define SWIG_PY_BINARY 5 |
---|
300 | |
---|
301 | /* Flags for pointer conversion */ |
---|
302 | |
---|
303 | #define SWIG_POINTER_EXCEPTION 0x1 |
---|
304 | #define SWIG_POINTER_DISOWN 0x2 |
---|
305 | |
---|
306 | /* Exception handling in wrappers */ |
---|
307 | #define SWIG_fail goto fail |
---|
308 | |
---|
309 | /* Constant information structure */ |
---|
310 | typedef struct swig_const_info { |
---|
311 | int type; |
---|
312 | char *name; |
---|
313 | long lvalue; |
---|
314 | double dvalue; |
---|
315 | void *pvalue; |
---|
316 | swig_type_info **ptype; |
---|
317 | } swig_const_info; |
---|
318 | |
---|
319 | /* Common SWIG API */ |
---|
320 | #define SWIG_ConvertPtr(obj, pp, type, flags) \ |
---|
321 | SWIG_Python_ConvertPtr(obj, pp, type, flags) |
---|
322 | #define SWIG_NewPointerObj(p, type, flags) \ |
---|
323 | SWIG_Python_NewPointerObj(p, type, flags) |
---|
324 | #define SWIG_MustGetPtr(p, type, argnum, flags) \ |
---|
325 | SWIG_Python_MustGetPtr(p, type, argnum, flags) |
---|
326 | |
---|
327 | /* Python-specific SWIG API */ |
---|
328 | #define SWIG_newvarlink() \ |
---|
329 | SWIG_Python_newvarlink() |
---|
330 | #define SWIG_addvarlink(p, name, get_attr, set_attr) \ |
---|
331 | SWIG_Python_addvarlink(p, name, get_attr, set_attr) |
---|
332 | #define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) \ |
---|
333 | SWIG_Python_ConvertPacked(obj, ptr, sz, ty, flags) |
---|
334 | #define SWIG_NewPackedObj(ptr, sz, type) \ |
---|
335 | SWIG_Python_NewPackedObj(ptr, sz, type) |
---|
336 | #define SWIG_InstallConstants(d, constants) \ |
---|
337 | SWIG_Python_InstallConstants(d, constants) |
---|
338 | |
---|
339 | #ifdef SWIG_NOINCLUDE |
---|
340 | |
---|
341 | SWIGIMPORT(int) SWIG_Python_ConvertPtr(PyObject *, void **, swig_type_info *, int); |
---|
342 | SWIGIMPORT(PyObject *) SWIG_Python_NewPointerObj(void *, swig_type_info *,int own); |
---|
343 | SWIGIMPORT(void *) SWIG_Python_MustGetPtr(PyObject *, swig_type_info *, int, int); |
---|
344 | SWIGIMPORT(PyObject *) SWIG_Python_newvarlink(void); |
---|
345 | SWIGIMPORT(void) SWIG_Python_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); |
---|
346 | SWIGIMPORT(int) SWIG_Python_ConvertPacked(PyObject *, void *, int sz, swig_type_info *, int); |
---|
347 | SWIGIMPORT(PyObject *) SWIG_Python_NewPackedObj(void *, int sz, swig_type_info *); |
---|
348 | SWIGIMPORT(void) SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]); |
---|
349 | |
---|
350 | #else |
---|
351 | |
---|
352 | /* ----------------------------------------------------------------------------- |
---|
353 | * global variable support code. |
---|
354 | * ----------------------------------------------------------------------------- */ |
---|
355 | |
---|
356 | typedef struct swig_globalvar { |
---|
357 | char *name; /* Name of global variable */ |
---|
358 | PyObject *(*get_attr)(void); /* Return the current value */ |
---|
359 | int (*set_attr)(PyObject *); /* Set the value */ |
---|
360 | struct swig_globalvar *next; |
---|
361 | } swig_globalvar; |
---|
362 | |
---|
363 | typedef struct swig_varlinkobject { |
---|
364 | PyObject_HEAD |
---|
365 | swig_globalvar *vars; |
---|
366 | } swig_varlinkobject; |
---|
367 | |
---|
368 | static PyObject * |
---|
369 | swig_varlink_repr(swig_varlinkobject *v) { |
---|
370 | v = v; |
---|
371 | return PyString_FromString("<Global variables>"); |
---|
372 | } |
---|
373 | |
---|
374 | static int |
---|
375 | swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) { |
---|
376 | swig_globalvar *var; |
---|
377 | flags = flags; |
---|
378 | fprintf(fp,"Global variables { "); |
---|
379 | for (var = v->vars; var; var=var->next) { |
---|
380 | fprintf(fp,"%s", var->name); |
---|
381 | if (var->next) fprintf(fp,", "); |
---|
382 | } |
---|
383 | fprintf(fp," }\n"); |
---|
384 | return 0; |
---|
385 | } |
---|
386 | |
---|
387 | static PyObject * |
---|
388 | swig_varlink_getattr(swig_varlinkobject *v, char *n) { |
---|
389 | swig_globalvar *var = v->vars; |
---|
390 | while (var) { |
---|
391 | if (strcmp(var->name,n) == 0) { |
---|
392 | return (*var->get_attr)(); |
---|
393 | } |
---|
394 | var = var->next; |
---|
395 | } |
---|
396 | PyErr_SetString(PyExc_NameError,"Unknown C global variable"); |
---|
397 | return NULL; |
---|
398 | } |
---|
399 | |
---|
400 | static int |
---|
401 | swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { |
---|
402 | swig_globalvar *var = v->vars; |
---|
403 | while (var) { |
---|
404 | if (strcmp(var->name,n) == 0) { |
---|
405 | return (*var->set_attr)(p); |
---|
406 | } |
---|
407 | var = var->next; |
---|
408 | } |
---|
409 | PyErr_SetString(PyExc_NameError,"Unknown C global variable"); |
---|
410 | return 1; |
---|
411 | } |
---|
412 | |
---|
413 | statichere PyTypeObject varlinktype = { |
---|
414 | PyObject_HEAD_INIT(0) |
---|
415 | 0, |
---|
416 | (char *)"swigvarlink", /* Type name */ |
---|
417 | sizeof(swig_varlinkobject), /* Basic size */ |
---|
418 | 0, /* Itemsize */ |
---|
419 | 0, /* Deallocator */ |
---|
420 | (printfunc) swig_varlink_print, /* Print */ |
---|
421 | (getattrfunc) swig_varlink_getattr, /* get attr */ |
---|
422 | (setattrfunc) swig_varlink_setattr, /* Set attr */ |
---|
423 | 0, /* tp_compare */ |
---|
424 | (reprfunc) swig_varlink_repr, /* tp_repr */ |
---|
425 | 0, /* tp_as_number */ |
---|
426 | 0, /* tp_as_mapping*/ |
---|
427 | 0, /* tp_hash */ |
---|
428 | }; |
---|
429 | |
---|
430 | /* Create a variable linking object for use later */ |
---|
431 | SWIGRUNTIME(PyObject *) |
---|
432 | SWIG_Python_newvarlink(void) { |
---|
433 | swig_varlinkobject *result = 0; |
---|
434 | result = PyMem_NEW(swig_varlinkobject,1); |
---|
435 | varlinktype.ob_type = &PyType_Type; /* Patch varlinktype into a PyType */ |
---|
436 | result->ob_type = &varlinktype; |
---|
437 | result->vars = 0; |
---|
438 | result->ob_refcnt = 0; |
---|
439 | Py_XINCREF((PyObject *) result); |
---|
440 | return ((PyObject*) result); |
---|
441 | } |
---|
442 | |
---|
443 | SWIGRUNTIME(void) |
---|
444 | SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { |
---|
445 | swig_varlinkobject *v; |
---|
446 | swig_globalvar *gv; |
---|
447 | v= (swig_varlinkobject *) p; |
---|
448 | gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); |
---|
449 | gv->name = (char *) malloc(strlen(name)+1); |
---|
450 | strcpy(gv->name,name); |
---|
451 | gv->get_attr = get_attr; |
---|
452 | gv->set_attr = set_attr; |
---|
453 | gv->next = v->vars; |
---|
454 | v->vars = gv; |
---|
455 | } |
---|
456 | |
---|
457 | /* Convert a pointer value */ |
---|
458 | SWIGRUNTIME(int) |
---|
459 | SWIG_Python_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) { |
---|
460 | swig_type_info *tc; |
---|
461 | char *c = 0; |
---|
462 | static PyObject *SWIG_this = 0; |
---|
463 | int newref = 0; |
---|
464 | PyObject *pyobj = 0; |
---|
465 | |
---|
466 | if (!obj) return 0; |
---|
467 | if (obj == Py_None) { |
---|
468 | *ptr = 0; |
---|
469 | return 0; |
---|
470 | } |
---|
471 | #ifdef SWIG_COBJECT_TYPES |
---|
472 | if (!(PyCObject_Check(obj))) { |
---|
473 | if (!SWIG_this) |
---|
474 | SWIG_this = PyString_FromString("this"); |
---|
475 | pyobj = obj; |
---|
476 | obj = PyObject_GetAttr(obj,SWIG_this); |
---|
477 | newref = 1; |
---|
478 | if (!obj) goto type_error; |
---|
479 | if (!PyCObject_Check(obj)) { |
---|
480 | Py_DECREF(obj); |
---|
481 | goto type_error; |
---|
482 | } |
---|
483 | } |
---|
484 | *ptr = PyCObject_AsVoidPtr(obj); |
---|
485 | c = (char *) PyCObject_GetDesc(obj); |
---|
486 | if (newref) Py_DECREF(obj); |
---|
487 | goto cobject; |
---|
488 | #else |
---|
489 | if (!(PyString_Check(obj))) { |
---|
490 | if (!SWIG_this) |
---|
491 | SWIG_this = PyString_FromString("this"); |
---|
492 | pyobj = obj; |
---|
493 | obj = PyObject_GetAttr(obj,SWIG_this); |
---|
494 | newref = 1; |
---|
495 | if (!obj) goto type_error; |
---|
496 | if (!PyString_Check(obj)) { |
---|
497 | Py_DECREF(obj); |
---|
498 | goto type_error; |
---|
499 | } |
---|
500 | } |
---|
501 | c = PyString_AsString(obj); |
---|
502 | /* Pointer values must start with leading underscore */ |
---|
503 | if (*c != '_') { |
---|
504 | *ptr = (void *) 0; |
---|
505 | if (strcmp(c,"NULL") == 0) { |
---|
506 | if (newref) { Py_DECREF(obj); } |
---|
507 | return 0; |
---|
508 | } else { |
---|
509 | if (newref) { Py_DECREF(obj); } |
---|
510 | goto type_error; |
---|
511 | } |
---|
512 | } |
---|
513 | c++; |
---|
514 | c = SWIG_UnpackData(c,ptr,sizeof(void *)); |
---|
515 | if (newref) { Py_DECREF(obj); } |
---|
516 | #endif |
---|
517 | |
---|
518 | #ifdef SWIG_COBJECT_TYPES |
---|
519 | cobject: |
---|
520 | #endif |
---|
521 | |
---|
522 | if (ty) { |
---|
523 | tc = SWIG_TypeCheck(c,ty); |
---|
524 | if (!tc) goto type_error; |
---|
525 | *ptr = SWIG_TypeCast(tc,(void*) *ptr); |
---|
526 | } |
---|
527 | |
---|
528 | if ((pyobj) && (flags & SWIG_POINTER_DISOWN)) { |
---|
529 | PyObject *zero = PyInt_FromLong(0); |
---|
530 | PyObject_SetAttrString(pyobj,(char*)"thisown",zero); |
---|
531 | Py_DECREF(zero); |
---|
532 | } |
---|
533 | return 0; |
---|
534 | |
---|
535 | type_error: |
---|
536 | if (flags & SWIG_POINTER_EXCEPTION) { |
---|
537 | if (ty && c) { |
---|
538 | char *temp = (char *) malloc(64+strlen(ty->name)+strlen(c)); |
---|
539 | sprintf(temp,"Type error. Got %s, expected %s", c, ty->name); |
---|
540 | PyErr_SetString(PyExc_TypeError, temp); |
---|
541 | free((char *) temp); |
---|
542 | } else { |
---|
543 | PyErr_SetString(PyExc_TypeError,"Expected a pointer"); |
---|
544 | } |
---|
545 | } |
---|
546 | return -1; |
---|
547 | } |
---|
548 | |
---|
549 | /* Convert a pointer value, signal an exception on a type mismatch */ |
---|
550 | SWIGRUNTIME(void *) |
---|
551 | SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) { |
---|
552 | void *result; |
---|
553 | SWIG_Python_ConvertPtr(obj, &result, ty, flags | SWIG_POINTER_EXCEPTION); |
---|
554 | return result; |
---|
555 | } |
---|
556 | |
---|
557 | /* Convert a packed value value */ |
---|
558 | SWIGRUNTIME(int) |
---|
559 | SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, int sz, swig_type_info *ty, int flags) { |
---|
560 | swig_type_info *tc; |
---|
561 | char *c = 0; |
---|
562 | |
---|
563 | if ((!obj) || (!PyString_Check(obj))) goto type_error; |
---|
564 | c = PyString_AsString(obj); |
---|
565 | /* Pointer values must start with leading underscore */ |
---|
566 | if (*c != '_') goto type_error; |
---|
567 | c++; |
---|
568 | c = SWIG_UnpackData(c,ptr,sz); |
---|
569 | if (ty) { |
---|
570 | tc = SWIG_TypeCheck(c,ty); |
---|
571 | if (!tc) goto type_error; |
---|
572 | } |
---|
573 | return 0; |
---|
574 | |
---|
575 | type_error: |
---|
576 | |
---|
577 | if (flags) { |
---|
578 | if (ty && c) { |
---|
579 | char *temp = (char *) malloc(64+strlen(ty->name)+strlen(c)); |
---|
580 | sprintf(temp,"Type error. Got %s, expected %s", c, ty->name); |
---|
581 | PyErr_SetString(PyExc_TypeError, temp); |
---|
582 | free((char *) temp); |
---|
583 | } else { |
---|
584 | PyErr_SetString(PyExc_TypeError,"Expected a pointer"); |
---|
585 | } |
---|
586 | } |
---|
587 | return -1; |
---|
588 | } |
---|
589 | |
---|
590 | /* Create a new pointer object */ |
---|
591 | SWIGRUNTIME(PyObject *) |
---|
592 | SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int own) { |
---|
593 | PyObject *robj; |
---|
594 | if (!ptr) { |
---|
595 | Py_INCREF(Py_None); |
---|
596 | return Py_None; |
---|
597 | } |
---|
598 | #ifdef SWIG_COBJECT_TYPES |
---|
599 | robj = PyCObject_FromVoidPtrAndDesc((void *) ptr, (char *) type->name, NULL); |
---|
600 | #else |
---|
601 | { |
---|
602 | char result[1024]; |
---|
603 | char *r = result; |
---|
604 | *(r++) = '_'; |
---|
605 | r = SWIG_PackData(r,&ptr,sizeof(void *)); |
---|
606 | strcpy(r,type->name); |
---|
607 | robj = PyString_FromString(result); |
---|
608 | } |
---|
609 | #endif |
---|
610 | if (!robj || (robj == Py_None)) return robj; |
---|
611 | if (type->clientdata) { |
---|
612 | PyObject *inst; |
---|
613 | PyObject *args = Py_BuildValue((char*)"(O)", robj); |
---|
614 | Py_DECREF(robj); |
---|
615 | inst = PyObject_CallObject((PyObject *) type->clientdata, args); |
---|
616 | Py_DECREF(args); |
---|
617 | if (inst) { |
---|
618 | if (own) { |
---|
619 | PyObject *n = PyInt_FromLong(1); |
---|
620 | PyObject_SetAttrString(inst,(char*)"thisown",n); |
---|
621 | Py_DECREF(n); |
---|
622 | } |
---|
623 | robj = inst; |
---|
624 | } |
---|
625 | } |
---|
626 | return robj; |
---|
627 | } |
---|
628 | |
---|
629 | SWIGRUNTIME(PyObject *) |
---|
630 | SWIG_Python_NewPackedObj(void *ptr, int sz, swig_type_info *type) { |
---|
631 | char result[1024]; |
---|
632 | char *r = result; |
---|
633 | if ((2*sz + 1 + strlen(type->name)) > 1000) return 0; |
---|
634 | *(r++) = '_'; |
---|
635 | r = SWIG_PackData(r,ptr,sz); |
---|
636 | strcpy(r,type->name); |
---|
637 | return PyString_FromString(result); |
---|
638 | } |
---|
639 | |
---|
640 | /* Install Constants */ |
---|
641 | SWIGRUNTIME(void) |
---|
642 | SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { |
---|
643 | int i; |
---|
644 | PyObject *obj; |
---|
645 | for (i = 0; constants[i].type; i++) { |
---|
646 | switch(constants[i].type) { |
---|
647 | case SWIG_PY_INT: |
---|
648 | obj = PyInt_FromLong(constants[i].lvalue); |
---|
649 | break; |
---|
650 | case SWIG_PY_FLOAT: |
---|
651 | obj = PyFloat_FromDouble(constants[i].dvalue); |
---|
652 | break; |
---|
653 | case SWIG_PY_STRING: |
---|
654 | obj = PyString_FromString((char *) constants[i].pvalue); |
---|
655 | break; |
---|
656 | case SWIG_PY_POINTER: |
---|
657 | obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); |
---|
658 | break; |
---|
659 | case SWIG_PY_BINARY: |
---|
660 | obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); |
---|
661 | break; |
---|
662 | default: |
---|
663 | obj = 0; |
---|
664 | break; |
---|
665 | } |
---|
666 | if (obj) { |
---|
667 | PyDict_SetItemString(d,constants[i].name,obj); |
---|
668 | Py_DECREF(obj); |
---|
669 | } |
---|
670 | } |
---|
671 | } |
---|
672 | |
---|
673 | #endif |
---|
674 | |
---|
675 | /* Contract support */ |
---|
676 | |
---|
677 | #define SWIG_contract_assert(expr, msg) if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg ); goto fail; } else |
---|
678 | |
---|
679 | #ifdef __cplusplus |
---|
680 | } |
---|
681 | #endif |
---|
682 | |
---|
683 | |
---|
684 | /* -------- TYPES TABLE (BEGIN) -------- */ |
---|
685 | |
---|
686 | #define SWIGTYPE_p_in_addr swig_types[0] |
---|
687 | #define SWIGTYPE_p_libtrace_icmp swig_types[1] |
---|
688 | #define SWIGTYPE_p_libtrace_icmp_un_echo swig_types[2] |
---|
689 | #define SWIGTYPE_p_libtrace_packet_t swig_types[3] |
---|
690 | #define SWIGTYPE_p_libtrace_ip swig_types[4] |
---|
691 | #define SWIGTYPE_p_libtrace_icmp_un_frag swig_types[5] |
---|
692 | #define SWIGTYPE_p_libtrace_t swig_types[6] |
---|
693 | #define SWIGTYPE_p_libtrace_udp swig_types[7] |
---|
694 | #define SWIGTYPE_p_libtrace_tcp swig_types[8] |
---|
695 | #define SWIGTYPE_p_libtrace_icmp_un swig_types[9] |
---|
696 | static swig_type_info *swig_types[11]; |
---|
697 | |
---|
698 | /* -------- TYPES TABLE (END) -------- */ |
---|
699 | |
---|
700 | |
---|
701 | /*----------------------------------------------- |
---|
702 | @(target):= _libtrace.so |
---|
703 | ------------------------------------------------*/ |
---|
704 | #define SWIG_init init_libtrace |
---|
705 | |
---|
706 | #define SWIG_name "_libtrace" |
---|
707 | |
---|
708 | #include <arpa/inet.h> |
---|
709 | #include "libtrace.h" |
---|
710 | |
---|
711 | |
---|
712 | #include <stdlib.h> |
---|
713 | |
---|
714 | |
---|
715 | #define MAKE_NTOHS(class,member) \ |
---|
716 | uint16_t class ## _ ## member ## _get (struct class *self) { \ |
---|
717 | return ntohs(self->member); \ |
---|
718 | } |
---|
719 | |
---|
720 | #define MAKE_NTOHL(class,member) \ |
---|
721 | uint32_t class ## _ ## member ## _get (struct class *self) { \ |
---|
722 | return ntohl(self->member); \ |
---|
723 | } |
---|
724 | |
---|
725 | MAKE_NTOHS(libtrace_ip,ip_sum); |
---|
726 | MAKE_NTOHS(libtrace_ip,ip_len); |
---|
727 | MAKE_NTOHS(libtrace_ip,ip_id); |
---|
728 | MAKE_NTOHS(libtrace_ip,ip_off); |
---|
729 | char *libtrace_ip_ip_src_get(struct libtrace_ip *self) { |
---|
730 | return strdup(inet_ntoa(self->ip_src)); |
---|
731 | } |
---|
732 | char *libtrace_ip_ip_dst_get(struct libtrace_ip *self) { |
---|
733 | return strdup(inet_ntoa(self->ip_dst)); |
---|
734 | } |
---|
735 | |
---|
736 | |
---|
737 | MAKE_NTOHS(libtrace_tcp,source) |
---|
738 | MAKE_NTOHS(libtrace_tcp,dest) |
---|
739 | MAKE_NTOHS(libtrace_tcp,window) |
---|
740 | MAKE_NTOHS(libtrace_tcp,check) |
---|
741 | MAKE_NTOHS(libtrace_tcp,urg_ptr) |
---|
742 | |
---|
743 | MAKE_NTOHL(libtrace_tcp,seq) |
---|
744 | MAKE_NTOHL(libtrace_tcp,ack_seq) |
---|
745 | |
---|
746 | |
---|
747 | MAKE_NTOHS(libtrace_udp,source) |
---|
748 | MAKE_NTOHS(libtrace_udp,dest) |
---|
749 | MAKE_NTOHS(libtrace_udp,len) |
---|
750 | MAKE_NTOHS(libtrace_udp,check) |
---|
751 | |
---|
752 | |
---|
753 | typedef union { |
---|
754 | struct { |
---|
755 | uint16_t id; |
---|
756 | uint16_t sequence; |
---|
757 | } echo; /* echo datagram */ |
---|
758 | uint32_t gateway; /* gateway address */ |
---|
759 | struct { |
---|
760 | uint16_t __unused; |
---|
761 | uint16_t mtu; |
---|
762 | } frag; /* path mtu discovery */ |
---|
763 | } libtrace_icmp_un; |
---|
764 | |
---|
765 | |
---|
766 | |
---|
767 | typedef struct { |
---|
768 | uint16_t __unused; |
---|
769 | uint16_t mtu; |
---|
770 | } libtrace_icmp_un_frag; |
---|
771 | |
---|
772 | |
---|
773 | |
---|
774 | typedef struct { |
---|
775 | uint16_t id; |
---|
776 | uint16_t sequence; |
---|
777 | } libtrace_icmp_un_echo; |
---|
778 | |
---|
779 | |
---|
780 | struct libtrace_packet_t *new_libtrace_packet_t(){ |
---|
781 | struct libtrace_packet_t *packet = malloc(sizeof(struct libtrace_packet_t)); |
---|
782 | return packet; |
---|
783 | } |
---|
784 | void delete_libtrace_packet_t(struct libtrace_packet_t *self){ free(self);} |
---|
785 | struct libtrace_ip *libtrace_packet_t_trace_get_ip(struct libtrace_packet_t *self){ |
---|
786 | return trace_get_ip(self); |
---|
787 | } |
---|
788 | struct libtrace_tcp *libtrace_packet_t_trace_get_tcp(struct libtrace_packet_t *self){ |
---|
789 | return trace_get_tcp(self); |
---|
790 | } |
---|
791 | struct libtrace_udp *libtrace_packet_t_trace_get_udp(struct libtrace_packet_t *self){ |
---|
792 | return trace_get_udp(self); |
---|
793 | } |
---|
794 | struct libtrace_icmp *libtrace_packet_t_trace_get_icmp(struct libtrace_packet_t *self){ |
---|
795 | return trace_get_icmp(self); |
---|
796 | } |
---|
797 | double libtrace_packet_t_trace_get_seconds(struct libtrace_packet_t *self){ |
---|
798 | return trace_get_seconds(self); |
---|
799 | } |
---|
800 | struct libtrace_t *new_libtrace_t(char *uri){ return trace_create(uri); } |
---|
801 | void delete_libtrace_t(struct libtrace_t *self){ trace_destroy(self); } |
---|
802 | int libtrace_t_trace_read_packet(struct libtrace_t *self,struct libtrace_packet_t *packet){ |
---|
803 | return trace_read_packet(self,packet); |
---|
804 | } |
---|
805 | #ifdef __cplusplus |
---|
806 | extern "C" { |
---|
807 | #endif |
---|
808 | static PyObject *_wrap_in_addr_s_addr_set(PyObject *self, PyObject *args) { |
---|
809 | PyObject *resultobj; |
---|
810 | struct in_addr *arg1 = (struct in_addr *) 0 ; |
---|
811 | int arg2 ; |
---|
812 | PyObject * obj0 = 0 ; |
---|
813 | |
---|
814 | if(!PyArg_ParseTuple(args,(char *)"Oi:in_addr_s_addr_set",&obj0,&arg2)) goto fail; |
---|
815 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_in_addr,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
816 | if (arg1) (arg1)->s_addr = arg2; |
---|
817 | |
---|
818 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
819 | return resultobj; |
---|
820 | fail: |
---|
821 | return NULL; |
---|
822 | } |
---|
823 | |
---|
824 | |
---|
825 | static PyObject *_wrap_in_addr_s_addr_get(PyObject *self, PyObject *args) { |
---|
826 | PyObject *resultobj; |
---|
827 | struct in_addr *arg1 = (struct in_addr *) 0 ; |
---|
828 | int result; |
---|
829 | PyObject * obj0 = 0 ; |
---|
830 | |
---|
831 | if(!PyArg_ParseTuple(args,(char *)"O:in_addr_s_addr_get",&obj0)) goto fail; |
---|
832 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_in_addr,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
833 | result = (int) ((arg1)->s_addr); |
---|
834 | |
---|
835 | resultobj = PyInt_FromLong((long)result); |
---|
836 | return resultobj; |
---|
837 | fail: |
---|
838 | return NULL; |
---|
839 | } |
---|
840 | |
---|
841 | |
---|
842 | static PyObject * in_addr_swigregister(PyObject *self, PyObject *args) { |
---|
843 | PyObject *obj; |
---|
844 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
845 | SWIG_TypeClientData(SWIGTYPE_p_in_addr, obj); |
---|
846 | Py_INCREF(obj); |
---|
847 | return Py_BuildValue((char *)""); |
---|
848 | } |
---|
849 | static PyObject *_wrap_libtrace_ip_ip_hl_set(PyObject *self, PyObject *args) { |
---|
850 | PyObject *resultobj; |
---|
851 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
852 | unsigned int arg2 ; |
---|
853 | PyObject * obj0 = 0 ; |
---|
854 | PyObject * obj1 = 0 ; |
---|
855 | |
---|
856 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_ip_ip_hl_set",&obj0,&obj1)) goto fail; |
---|
857 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_ip,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
858 | arg2 = (unsigned int) PyInt_AsLong(obj1); |
---|
859 | if (PyErr_Occurred()) SWIG_fail; |
---|
860 | if (arg1) (arg1)->ip_hl = arg2; |
---|
861 | |
---|
862 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
863 | return resultobj; |
---|
864 | fail: |
---|
865 | return NULL; |
---|
866 | } |
---|
867 | |
---|
868 | |
---|
869 | static PyObject *_wrap_libtrace_ip_ip_hl_get(PyObject *self, PyObject *args) { |
---|
870 | PyObject *resultobj; |
---|
871 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
872 | unsigned int result; |
---|
873 | PyObject * obj0 = 0 ; |
---|
874 | |
---|
875 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_hl_get",&obj0)) goto fail; |
---|
876 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_ip,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
877 | result = (unsigned int) ((arg1)->ip_hl); |
---|
878 | |
---|
879 | resultobj = PyInt_FromLong((long)result); |
---|
880 | return resultobj; |
---|
881 | fail: |
---|
882 | return NULL; |
---|
883 | } |
---|
884 | |
---|
885 | |
---|
886 | static PyObject *_wrap_libtrace_ip_ip_v_set(PyObject *self, PyObject *args) { |
---|
887 | PyObject *resultobj; |
---|
888 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
889 | unsigned int arg2 ; |
---|
890 | PyObject * obj0 = 0 ; |
---|
891 | PyObject * obj1 = 0 ; |
---|
892 | |
---|
893 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_ip_ip_v_set",&obj0,&obj1)) goto fail; |
---|
894 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_ip,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
895 | arg2 = (unsigned int) PyInt_AsLong(obj1); |
---|
896 | if (PyErr_Occurred()) SWIG_fail; |
---|
897 | if (arg1) (arg1)->ip_v = arg2; |
---|
898 | |
---|
899 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
900 | return resultobj; |
---|
901 | fail: |
---|
902 | return NULL; |
---|
903 | } |
---|
904 | |
---|
905 | |
---|
906 | static PyObject *_wrap_libtrace_ip_ip_v_get(PyObject *self, PyObject *args) { |
---|
907 | PyObject *resultobj; |
---|
908 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
909 | unsigned int result; |
---|
910 | PyObject * obj0 = 0 ; |
---|
911 | |
---|
912 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_v_get",&obj0)) goto fail; |
---|
913 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_ip,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
914 | result = (unsigned int) ((arg1)->ip_v); |
---|
915 | |
---|
916 | resultobj = PyInt_FromLong((long)result); |
---|
917 | return resultobj; |
---|
918 | fail: |
---|
919 | return NULL; |
---|
920 | } |
---|
921 | |
---|
922 | |
---|
923 | static PyObject *_wrap_libtrace_ip_ip_tos_set(PyObject *self, PyObject *args) { |
---|
924 | PyObject *resultobj; |
---|
925 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
926 | uint8_t arg2 ; |
---|
927 | PyObject * obj0 = 0 ; |
---|
928 | PyObject * obj1 = 0 ; |
---|
929 | |
---|
930 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_ip_ip_tos_set",&obj0,&obj1)) goto fail; |
---|
931 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_ip,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
932 | arg2 = (uint8_t) PyInt_AsLong(obj1); |
---|
933 | if (PyErr_Occurred()) SWIG_fail; |
---|
934 | if (arg1) (arg1)->ip_tos = arg2; |
---|
935 | |
---|
936 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
937 | return resultobj; |
---|
938 | fail: |
---|
939 | return NULL; |
---|
940 | } |
---|
941 | |
---|
942 | |
---|
943 | static PyObject *_wrap_libtrace_ip_ip_tos_get(PyObject *self, PyObject *args) { |
---|
944 | PyObject *resultobj; |
---|
945 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
946 | uint8_t result; |
---|
947 | PyObject * obj0 = 0 ; |
---|
948 | |
---|
949 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_tos_get",&obj0)) goto fail; |
---|
950 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_ip,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
951 | result = (uint8_t) ((arg1)->ip_tos); |
---|
952 | |
---|
953 | resultobj = PyInt_FromLong((long)result); |
---|
954 | return resultobj; |
---|
955 | fail: |
---|
956 | return NULL; |
---|
957 | } |
---|
958 | |
---|
959 | |
---|
960 | static PyObject *_wrap_libtrace_ip_ip_ttl_set(PyObject *self, PyObject *args) { |
---|
961 | PyObject *resultobj; |
---|
962 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
963 | uint8_t arg2 ; |
---|
964 | PyObject * obj0 = 0 ; |
---|
965 | PyObject * obj1 = 0 ; |
---|
966 | |
---|
967 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_ip_ip_ttl_set",&obj0,&obj1)) goto fail; |
---|
968 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_ip,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
969 | arg2 = (uint8_t) PyInt_AsLong(obj1); |
---|
970 | if (PyErr_Occurred()) SWIG_fail; |
---|
971 | if (arg1) (arg1)->ip_ttl = arg2; |
---|
972 | |
---|
973 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
974 | return resultobj; |
---|
975 | fail: |
---|
976 | return NULL; |
---|
977 | } |
---|
978 | |
---|
979 | |
---|
980 | static PyObject *_wrap_libtrace_ip_ip_ttl_get(PyObject *self, PyObject *args) { |
---|
981 | PyObject *resultobj; |
---|
982 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
983 | uint8_t result; |
---|
984 | PyObject * obj0 = 0 ; |
---|
985 | |
---|
986 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_ttl_get",&obj0)) goto fail; |
---|
987 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_ip,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
988 | result = (uint8_t) ((arg1)->ip_ttl); |
---|
989 | |
---|
990 | resultobj = PyInt_FromLong((long)result); |
---|
991 | return resultobj; |
---|
992 | fail: |
---|
993 | return NULL; |
---|
994 | } |
---|
995 | |
---|
996 | |
---|
997 | static PyObject *_wrap_libtrace_ip_ip_p_set(PyObject *self, PyObject *args) { |
---|
998 | PyObject *resultobj; |
---|
999 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1000 | uint8_t arg2 ; |
---|
1001 | PyObject * obj0 = 0 ; |
---|
1002 | PyObject * obj1 = 0 ; |
---|
1003 | |
---|
1004 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_ip_ip_p_set",&obj0,&obj1)) goto fail; |
---|
1005 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_ip,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1006 | arg2 = (uint8_t) PyInt_AsLong(obj1); |
---|
1007 | if (PyErr_Occurred()) SWIG_fail; |
---|
1008 | if (arg1) (arg1)->ip_p = arg2; |
---|
1009 | |
---|
1010 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1011 | return resultobj; |
---|
1012 | fail: |
---|
1013 | return NULL; |
---|
1014 | } |
---|
1015 | |
---|
1016 | |
---|
1017 | static PyObject *_wrap_libtrace_ip_ip_p_get(PyObject *self, PyObject *args) { |
---|
1018 | PyObject *resultobj; |
---|
1019 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1020 | uint8_t result; |
---|
1021 | PyObject * obj0 = 0 ; |
---|
1022 | |
---|
1023 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_p_get",&obj0)) goto fail; |
---|
1024 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_ip,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1025 | result = (uint8_t) ((arg1)->ip_p); |
---|
1026 | |
---|
1027 | resultobj = PyInt_FromLong((long)result); |
---|
1028 | return resultobj; |
---|
1029 | fail: |
---|
1030 | return NULL; |
---|
1031 | } |
---|
1032 | |
---|
1033 | |
---|
1034 | static PyObject *_wrap_libtrace_ip_ip_sum_get(PyObject *self, PyObject *args) { |
---|
1035 | PyObject *resultobj; |
---|
1036 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1037 | uint16_t result; |
---|
1038 | PyObject * obj0 = 0 ; |
---|
1039 | |
---|
1040 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_sum_get",&obj0)) goto fail; |
---|
1041 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_ip,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1042 | result = (uint16_t)libtrace_ip_ip_sum_get(arg1); |
---|
1043 | |
---|
1044 | resultobj = PyInt_FromLong((long)result); |
---|
1045 | return resultobj; |
---|
1046 | fail: |
---|
1047 | return NULL; |
---|
1048 | } |
---|
1049 | |
---|
1050 | |
---|
1051 | static PyObject *_wrap_libtrace_ip_ip_len_get(PyObject *self, PyObject *args) { |
---|
1052 | PyObject *resultobj; |
---|
1053 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1054 | uint16_t result; |
---|
1055 | PyObject * obj0 = 0 ; |
---|
1056 | |
---|
1057 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_len_get",&obj0)) goto fail; |
---|
1058 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_ip,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1059 | result = (uint16_t)libtrace_ip_ip_len_get(arg1); |
---|
1060 | |
---|
1061 | resultobj = PyInt_FromLong((long)result); |
---|
1062 | return resultobj; |
---|
1063 | fail: |
---|
1064 | return NULL; |
---|
1065 | } |
---|
1066 | |
---|
1067 | |
---|
1068 | static PyObject *_wrap_libtrace_ip_ip_id_get(PyObject *self, PyObject *args) { |
---|
1069 | PyObject *resultobj; |
---|
1070 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1071 | uint16_t result; |
---|
1072 | PyObject * obj0 = 0 ; |
---|
1073 | |
---|
1074 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_id_get",&obj0)) goto fail; |
---|
1075 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_ip,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1076 | result = (uint16_t)libtrace_ip_ip_id_get(arg1); |
---|
1077 | |
---|
1078 | resultobj = PyInt_FromLong((long)result); |
---|
1079 | return resultobj; |
---|
1080 | fail: |
---|
1081 | return NULL; |
---|
1082 | } |
---|
1083 | |
---|
1084 | |
---|
1085 | static PyObject *_wrap_libtrace_ip_ip_off_get(PyObject *self, PyObject *args) { |
---|
1086 | PyObject *resultobj; |
---|
1087 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1088 | uint16_t result; |
---|
1089 | PyObject * obj0 = 0 ; |
---|
1090 | |
---|
1091 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_off_get",&obj0)) goto fail; |
---|
1092 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_ip,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1093 | result = (uint16_t)libtrace_ip_ip_off_get(arg1); |
---|
1094 | |
---|
1095 | resultobj = PyInt_FromLong((long)result); |
---|
1096 | return resultobj; |
---|
1097 | fail: |
---|
1098 | return NULL; |
---|
1099 | } |
---|
1100 | |
---|
1101 | |
---|
1102 | static PyObject *_wrap_libtrace_ip_ip_src_get(PyObject *self, PyObject *args) { |
---|
1103 | PyObject *resultobj; |
---|
1104 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1105 | char *result; |
---|
1106 | PyObject * obj0 = 0 ; |
---|
1107 | |
---|
1108 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_src_get",&obj0)) goto fail; |
---|
1109 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_ip,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1110 | result = (char *)libtrace_ip_ip_src_get(arg1); |
---|
1111 | |
---|
1112 | resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); |
---|
1113 | free(result); |
---|
1114 | return resultobj; |
---|
1115 | fail: |
---|
1116 | return NULL; |
---|
1117 | } |
---|
1118 | |
---|
1119 | |
---|
1120 | static PyObject *_wrap_libtrace_ip_ip_dst_get(PyObject *self, PyObject *args) { |
---|
1121 | PyObject *resultobj; |
---|
1122 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1123 | char *result; |
---|
1124 | PyObject * obj0 = 0 ; |
---|
1125 | |
---|
1126 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_dst_get",&obj0)) goto fail; |
---|
1127 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_ip,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1128 | result = (char *)libtrace_ip_ip_dst_get(arg1); |
---|
1129 | |
---|
1130 | resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)""); |
---|
1131 | free(result); |
---|
1132 | return resultobj; |
---|
1133 | fail: |
---|
1134 | return NULL; |
---|
1135 | } |
---|
1136 | |
---|
1137 | |
---|
1138 | static PyObject * libtrace_ip_swigregister(PyObject *self, PyObject *args) { |
---|
1139 | PyObject *obj; |
---|
1140 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
1141 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_ip, obj); |
---|
1142 | Py_INCREF(obj); |
---|
1143 | return Py_BuildValue((char *)""); |
---|
1144 | } |
---|
1145 | static PyObject *_wrap_libtrace_tcp_res1_set(PyObject *self, PyObject *args) { |
---|
1146 | PyObject *resultobj; |
---|
1147 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1148 | uint16_t arg2 ; |
---|
1149 | PyObject * obj0 = 0 ; |
---|
1150 | PyObject * obj1 = 0 ; |
---|
1151 | |
---|
1152 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_res1_set",&obj0,&obj1)) goto fail; |
---|
1153 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1154 | arg2 = (uint16_t) PyInt_AsLong(obj1); |
---|
1155 | if (PyErr_Occurred()) SWIG_fail; |
---|
1156 | if (arg1) (arg1)->res1 = arg2; |
---|
1157 | |
---|
1158 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1159 | return resultobj; |
---|
1160 | fail: |
---|
1161 | return NULL; |
---|
1162 | } |
---|
1163 | |
---|
1164 | |
---|
1165 | static PyObject *_wrap_libtrace_tcp_res1_get(PyObject *self, PyObject *args) { |
---|
1166 | PyObject *resultobj; |
---|
1167 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1168 | uint16_t result; |
---|
1169 | PyObject * obj0 = 0 ; |
---|
1170 | |
---|
1171 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_res1_get",&obj0)) goto fail; |
---|
1172 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1173 | result = (uint16_t) ((arg1)->res1); |
---|
1174 | |
---|
1175 | resultobj = PyInt_FromLong((long)result); |
---|
1176 | return resultobj; |
---|
1177 | fail: |
---|
1178 | return NULL; |
---|
1179 | } |
---|
1180 | |
---|
1181 | |
---|
1182 | static PyObject *_wrap_libtrace_tcp_doff_set(PyObject *self, PyObject *args) { |
---|
1183 | PyObject *resultobj; |
---|
1184 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1185 | uint16_t arg2 ; |
---|
1186 | PyObject * obj0 = 0 ; |
---|
1187 | PyObject * obj1 = 0 ; |
---|
1188 | |
---|
1189 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_doff_set",&obj0,&obj1)) goto fail; |
---|
1190 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1191 | arg2 = (uint16_t) PyInt_AsLong(obj1); |
---|
1192 | if (PyErr_Occurred()) SWIG_fail; |
---|
1193 | if (arg1) (arg1)->doff = arg2; |
---|
1194 | |
---|
1195 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1196 | return resultobj; |
---|
1197 | fail: |
---|
1198 | return NULL; |
---|
1199 | } |
---|
1200 | |
---|
1201 | |
---|
1202 | static PyObject *_wrap_libtrace_tcp_doff_get(PyObject *self, PyObject *args) { |
---|
1203 | PyObject *resultobj; |
---|
1204 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1205 | uint16_t result; |
---|
1206 | PyObject * obj0 = 0 ; |
---|
1207 | |
---|
1208 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_doff_get",&obj0)) goto fail; |
---|
1209 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1210 | result = (uint16_t) ((arg1)->doff); |
---|
1211 | |
---|
1212 | resultobj = PyInt_FromLong((long)result); |
---|
1213 | return resultobj; |
---|
1214 | fail: |
---|
1215 | return NULL; |
---|
1216 | } |
---|
1217 | |
---|
1218 | |
---|
1219 | static PyObject *_wrap_libtrace_tcp_fin_set(PyObject *self, PyObject *args) { |
---|
1220 | PyObject *resultobj; |
---|
1221 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1222 | uint16_t arg2 ; |
---|
1223 | PyObject * obj0 = 0 ; |
---|
1224 | PyObject * obj1 = 0 ; |
---|
1225 | |
---|
1226 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_fin_set",&obj0,&obj1)) goto fail; |
---|
1227 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1228 | arg2 = (uint16_t) PyInt_AsLong(obj1); |
---|
1229 | if (PyErr_Occurred()) SWIG_fail; |
---|
1230 | if (arg1) (arg1)->fin = arg2; |
---|
1231 | |
---|
1232 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1233 | return resultobj; |
---|
1234 | fail: |
---|
1235 | return NULL; |
---|
1236 | } |
---|
1237 | |
---|
1238 | |
---|
1239 | static PyObject *_wrap_libtrace_tcp_fin_get(PyObject *self, PyObject *args) { |
---|
1240 | PyObject *resultobj; |
---|
1241 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1242 | uint16_t result; |
---|
1243 | PyObject * obj0 = 0 ; |
---|
1244 | |
---|
1245 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_fin_get",&obj0)) goto fail; |
---|
1246 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1247 | result = (uint16_t) ((arg1)->fin); |
---|
1248 | |
---|
1249 | resultobj = PyInt_FromLong((long)result); |
---|
1250 | return resultobj; |
---|
1251 | fail: |
---|
1252 | return NULL; |
---|
1253 | } |
---|
1254 | |
---|
1255 | |
---|
1256 | static PyObject *_wrap_libtrace_tcp_syn_set(PyObject *self, PyObject *args) { |
---|
1257 | PyObject *resultobj; |
---|
1258 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1259 | uint16_t arg2 ; |
---|
1260 | PyObject * obj0 = 0 ; |
---|
1261 | PyObject * obj1 = 0 ; |
---|
1262 | |
---|
1263 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_syn_set",&obj0,&obj1)) goto fail; |
---|
1264 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1265 | arg2 = (uint16_t) PyInt_AsLong(obj1); |
---|
1266 | if (PyErr_Occurred()) SWIG_fail; |
---|
1267 | if (arg1) (arg1)->syn = arg2; |
---|
1268 | |
---|
1269 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1270 | return resultobj; |
---|
1271 | fail: |
---|
1272 | return NULL; |
---|
1273 | } |
---|
1274 | |
---|
1275 | |
---|
1276 | static PyObject *_wrap_libtrace_tcp_syn_get(PyObject *self, PyObject *args) { |
---|
1277 | PyObject *resultobj; |
---|
1278 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1279 | uint16_t result; |
---|
1280 | PyObject * obj0 = 0 ; |
---|
1281 | |
---|
1282 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_syn_get",&obj0)) goto fail; |
---|
1283 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1284 | result = (uint16_t) ((arg1)->syn); |
---|
1285 | |
---|
1286 | resultobj = PyInt_FromLong((long)result); |
---|
1287 | return resultobj; |
---|
1288 | fail: |
---|
1289 | return NULL; |
---|
1290 | } |
---|
1291 | |
---|
1292 | |
---|
1293 | static PyObject *_wrap_libtrace_tcp_rst_set(PyObject *self, PyObject *args) { |
---|
1294 | PyObject *resultobj; |
---|
1295 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1296 | uint16_t arg2 ; |
---|
1297 | PyObject * obj0 = 0 ; |
---|
1298 | PyObject * obj1 = 0 ; |
---|
1299 | |
---|
1300 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_rst_set",&obj0,&obj1)) goto fail; |
---|
1301 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1302 | arg2 = (uint16_t) PyInt_AsLong(obj1); |
---|
1303 | if (PyErr_Occurred()) SWIG_fail; |
---|
1304 | if (arg1) (arg1)->rst = arg2; |
---|
1305 | |
---|
1306 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1307 | return resultobj; |
---|
1308 | fail: |
---|
1309 | return NULL; |
---|
1310 | } |
---|
1311 | |
---|
1312 | |
---|
1313 | static PyObject *_wrap_libtrace_tcp_rst_get(PyObject *self, PyObject *args) { |
---|
1314 | PyObject *resultobj; |
---|
1315 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1316 | uint16_t result; |
---|
1317 | PyObject * obj0 = 0 ; |
---|
1318 | |
---|
1319 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_rst_get",&obj0)) goto fail; |
---|
1320 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1321 | result = (uint16_t) ((arg1)->rst); |
---|
1322 | |
---|
1323 | resultobj = PyInt_FromLong((long)result); |
---|
1324 | return resultobj; |
---|
1325 | fail: |
---|
1326 | return NULL; |
---|
1327 | } |
---|
1328 | |
---|
1329 | |
---|
1330 | static PyObject *_wrap_libtrace_tcp_psh_set(PyObject *self, PyObject *args) { |
---|
1331 | PyObject *resultobj; |
---|
1332 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1333 | uint16_t arg2 ; |
---|
1334 | PyObject * obj0 = 0 ; |
---|
1335 | PyObject * obj1 = 0 ; |
---|
1336 | |
---|
1337 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_psh_set",&obj0,&obj1)) goto fail; |
---|
1338 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1339 | arg2 = (uint16_t) PyInt_AsLong(obj1); |
---|
1340 | if (PyErr_Occurred()) SWIG_fail; |
---|
1341 | if (arg1) (arg1)->psh = arg2; |
---|
1342 | |
---|
1343 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1344 | return resultobj; |
---|
1345 | fail: |
---|
1346 | return NULL; |
---|
1347 | } |
---|
1348 | |
---|
1349 | |
---|
1350 | static PyObject *_wrap_libtrace_tcp_psh_get(PyObject *self, PyObject *args) { |
---|
1351 | PyObject *resultobj; |
---|
1352 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1353 | uint16_t result; |
---|
1354 | PyObject * obj0 = 0 ; |
---|
1355 | |
---|
1356 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_psh_get",&obj0)) goto fail; |
---|
1357 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1358 | result = (uint16_t) ((arg1)->psh); |
---|
1359 | |
---|
1360 | resultobj = PyInt_FromLong((long)result); |
---|
1361 | return resultobj; |
---|
1362 | fail: |
---|
1363 | return NULL; |
---|
1364 | } |
---|
1365 | |
---|
1366 | |
---|
1367 | static PyObject *_wrap_libtrace_tcp_ack_set(PyObject *self, PyObject *args) { |
---|
1368 | PyObject *resultobj; |
---|
1369 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1370 | uint16_t arg2 ; |
---|
1371 | PyObject * obj0 = 0 ; |
---|
1372 | PyObject * obj1 = 0 ; |
---|
1373 | |
---|
1374 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_ack_set",&obj0,&obj1)) goto fail; |
---|
1375 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1376 | arg2 = (uint16_t) PyInt_AsLong(obj1); |
---|
1377 | if (PyErr_Occurred()) SWIG_fail; |
---|
1378 | if (arg1) (arg1)->ack = arg2; |
---|
1379 | |
---|
1380 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1381 | return resultobj; |
---|
1382 | fail: |
---|
1383 | return NULL; |
---|
1384 | } |
---|
1385 | |
---|
1386 | |
---|
1387 | static PyObject *_wrap_libtrace_tcp_ack_get(PyObject *self, PyObject *args) { |
---|
1388 | PyObject *resultobj; |
---|
1389 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1390 | uint16_t result; |
---|
1391 | PyObject * obj0 = 0 ; |
---|
1392 | |
---|
1393 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_ack_get",&obj0)) goto fail; |
---|
1394 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1395 | result = (uint16_t) ((arg1)->ack); |
---|
1396 | |
---|
1397 | resultobj = PyInt_FromLong((long)result); |
---|
1398 | return resultobj; |
---|
1399 | fail: |
---|
1400 | return NULL; |
---|
1401 | } |
---|
1402 | |
---|
1403 | |
---|
1404 | static PyObject *_wrap_libtrace_tcp_urg_set(PyObject *self, PyObject *args) { |
---|
1405 | PyObject *resultobj; |
---|
1406 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1407 | uint16_t arg2 ; |
---|
1408 | PyObject * obj0 = 0 ; |
---|
1409 | PyObject * obj1 = 0 ; |
---|
1410 | |
---|
1411 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_urg_set",&obj0,&obj1)) goto fail; |
---|
1412 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1413 | arg2 = (uint16_t) PyInt_AsLong(obj1); |
---|
1414 | if (PyErr_Occurred()) SWIG_fail; |
---|
1415 | if (arg1) (arg1)->urg = arg2; |
---|
1416 | |
---|
1417 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1418 | return resultobj; |
---|
1419 | fail: |
---|
1420 | return NULL; |
---|
1421 | } |
---|
1422 | |
---|
1423 | |
---|
1424 | static PyObject *_wrap_libtrace_tcp_urg_get(PyObject *self, PyObject *args) { |
---|
1425 | PyObject *resultobj; |
---|
1426 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1427 | uint16_t result; |
---|
1428 | PyObject * obj0 = 0 ; |
---|
1429 | |
---|
1430 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_urg_get",&obj0)) goto fail; |
---|
1431 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1432 | result = (uint16_t) ((arg1)->urg); |
---|
1433 | |
---|
1434 | resultobj = PyInt_FromLong((long)result); |
---|
1435 | return resultobj; |
---|
1436 | fail: |
---|
1437 | return NULL; |
---|
1438 | } |
---|
1439 | |
---|
1440 | |
---|
1441 | static PyObject *_wrap_libtrace_tcp_res2_set(PyObject *self, PyObject *args) { |
---|
1442 | PyObject *resultobj; |
---|
1443 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1444 | uint16_t arg2 ; |
---|
1445 | PyObject * obj0 = 0 ; |
---|
1446 | PyObject * obj1 = 0 ; |
---|
1447 | |
---|
1448 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_res2_set",&obj0,&obj1)) goto fail; |
---|
1449 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1450 | arg2 = (uint16_t) PyInt_AsLong(obj1); |
---|
1451 | if (PyErr_Occurred()) SWIG_fail; |
---|
1452 | if (arg1) (arg1)->res2 = arg2; |
---|
1453 | |
---|
1454 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1455 | return resultobj; |
---|
1456 | fail: |
---|
1457 | return NULL; |
---|
1458 | } |
---|
1459 | |
---|
1460 | |
---|
1461 | static PyObject *_wrap_libtrace_tcp_res2_get(PyObject *self, PyObject *args) { |
---|
1462 | PyObject *resultobj; |
---|
1463 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1464 | uint16_t result; |
---|
1465 | PyObject * obj0 = 0 ; |
---|
1466 | |
---|
1467 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_res2_get",&obj0)) goto fail; |
---|
1468 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1469 | result = (uint16_t) ((arg1)->res2); |
---|
1470 | |
---|
1471 | resultobj = PyInt_FromLong((long)result); |
---|
1472 | return resultobj; |
---|
1473 | fail: |
---|
1474 | return NULL; |
---|
1475 | } |
---|
1476 | |
---|
1477 | |
---|
1478 | static PyObject *_wrap_libtrace_tcp_source_get(PyObject *self, PyObject *args) { |
---|
1479 | PyObject *resultobj; |
---|
1480 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1481 | uint16_t result; |
---|
1482 | PyObject * obj0 = 0 ; |
---|
1483 | |
---|
1484 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_source_get",&obj0)) goto fail; |
---|
1485 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1486 | result = (uint16_t)libtrace_tcp_source_get(arg1); |
---|
1487 | |
---|
1488 | resultobj = PyInt_FromLong((long)result); |
---|
1489 | return resultobj; |
---|
1490 | fail: |
---|
1491 | return NULL; |
---|
1492 | } |
---|
1493 | |
---|
1494 | |
---|
1495 | static PyObject *_wrap_libtrace_tcp_dest_get(PyObject *self, PyObject *args) { |
---|
1496 | PyObject *resultobj; |
---|
1497 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1498 | uint16_t result; |
---|
1499 | PyObject * obj0 = 0 ; |
---|
1500 | |
---|
1501 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_dest_get",&obj0)) goto fail; |
---|
1502 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1503 | result = (uint16_t)libtrace_tcp_dest_get(arg1); |
---|
1504 | |
---|
1505 | resultobj = PyInt_FromLong((long)result); |
---|
1506 | return resultobj; |
---|
1507 | fail: |
---|
1508 | return NULL; |
---|
1509 | } |
---|
1510 | |
---|
1511 | |
---|
1512 | static PyObject *_wrap_libtrace_tcp_window_get(PyObject *self, PyObject *args) { |
---|
1513 | PyObject *resultobj; |
---|
1514 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1515 | uint16_t result; |
---|
1516 | PyObject * obj0 = 0 ; |
---|
1517 | |
---|
1518 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_window_get",&obj0)) goto fail; |
---|
1519 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1520 | result = (uint16_t)libtrace_tcp_window_get(arg1); |
---|
1521 | |
---|
1522 | resultobj = PyInt_FromLong((long)result); |
---|
1523 | return resultobj; |
---|
1524 | fail: |
---|
1525 | return NULL; |
---|
1526 | } |
---|
1527 | |
---|
1528 | |
---|
1529 | static PyObject *_wrap_libtrace_tcp_check_get(PyObject *self, PyObject *args) { |
---|
1530 | PyObject *resultobj; |
---|
1531 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1532 | uint16_t result; |
---|
1533 | PyObject * obj0 = 0 ; |
---|
1534 | |
---|
1535 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_check_get",&obj0)) goto fail; |
---|
1536 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1537 | result = (uint16_t)libtrace_tcp_check_get(arg1); |
---|
1538 | |
---|
1539 | resultobj = PyInt_FromLong((long)result); |
---|
1540 | return resultobj; |
---|
1541 | fail: |
---|
1542 | return NULL; |
---|
1543 | } |
---|
1544 | |
---|
1545 | |
---|
1546 | static PyObject *_wrap_libtrace_tcp_urg_ptr_get(PyObject *self, PyObject *args) { |
---|
1547 | PyObject *resultobj; |
---|
1548 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1549 | uint16_t result; |
---|
1550 | PyObject * obj0 = 0 ; |
---|
1551 | |
---|
1552 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_urg_ptr_get",&obj0)) goto fail; |
---|
1553 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1554 | result = (uint16_t)libtrace_tcp_urg_ptr_get(arg1); |
---|
1555 | |
---|
1556 | resultobj = PyInt_FromLong((long)result); |
---|
1557 | return resultobj; |
---|
1558 | fail: |
---|
1559 | return NULL; |
---|
1560 | } |
---|
1561 | |
---|
1562 | |
---|
1563 | static PyObject *_wrap_libtrace_tcp_seq_get(PyObject *self, PyObject *args) { |
---|
1564 | PyObject *resultobj; |
---|
1565 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1566 | uint32_t result; |
---|
1567 | PyObject * obj0 = 0 ; |
---|
1568 | |
---|
1569 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_seq_get",&obj0)) goto fail; |
---|
1570 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1571 | result = (uint32_t)libtrace_tcp_seq_get(arg1); |
---|
1572 | |
---|
1573 | resultobj = PyInt_FromLong((long)result); |
---|
1574 | return resultobj; |
---|
1575 | fail: |
---|
1576 | return NULL; |
---|
1577 | } |
---|
1578 | |
---|
1579 | |
---|
1580 | static PyObject *_wrap_libtrace_tcp_ack_seq_get(PyObject *self, PyObject *args) { |
---|
1581 | PyObject *resultobj; |
---|
1582 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1583 | uint32_t result; |
---|
1584 | PyObject * obj0 = 0 ; |
---|
1585 | |
---|
1586 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_ack_seq_get",&obj0)) goto fail; |
---|
1587 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_tcp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1588 | result = (uint32_t)libtrace_tcp_ack_seq_get(arg1); |
---|
1589 | |
---|
1590 | resultobj = PyInt_FromLong((long)result); |
---|
1591 | return resultobj; |
---|
1592 | fail: |
---|
1593 | return NULL; |
---|
1594 | } |
---|
1595 | |
---|
1596 | |
---|
1597 | static PyObject * libtrace_tcp_swigregister(PyObject *self, PyObject *args) { |
---|
1598 | PyObject *obj; |
---|
1599 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
1600 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_tcp, obj); |
---|
1601 | Py_INCREF(obj); |
---|
1602 | return Py_BuildValue((char *)""); |
---|
1603 | } |
---|
1604 | static PyObject *_wrap_libtrace_udp_source_get(PyObject *self, PyObject *args) { |
---|
1605 | PyObject *resultobj; |
---|
1606 | struct libtrace_udp *arg1 = (struct libtrace_udp *) 0 ; |
---|
1607 | uint16_t result; |
---|
1608 | PyObject * obj0 = 0 ; |
---|
1609 | |
---|
1610 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_udp_source_get",&obj0)) goto fail; |
---|
1611 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_udp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1612 | result = (uint16_t)libtrace_udp_source_get(arg1); |
---|
1613 | |
---|
1614 | resultobj = PyInt_FromLong((long)result); |
---|
1615 | return resultobj; |
---|
1616 | fail: |
---|
1617 | return NULL; |
---|
1618 | } |
---|
1619 | |
---|
1620 | |
---|
1621 | static PyObject *_wrap_libtrace_udp_dest_get(PyObject *self, PyObject *args) { |
---|
1622 | PyObject *resultobj; |
---|
1623 | struct libtrace_udp *arg1 = (struct libtrace_udp *) 0 ; |
---|
1624 | uint16_t result; |
---|
1625 | PyObject * obj0 = 0 ; |
---|
1626 | |
---|
1627 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_udp_dest_get",&obj0)) goto fail; |
---|
1628 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_udp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1629 | result = (uint16_t)libtrace_udp_dest_get(arg1); |
---|
1630 | |
---|
1631 | resultobj = PyInt_FromLong((long)result); |
---|
1632 | return resultobj; |
---|
1633 | fail: |
---|
1634 | return NULL; |
---|
1635 | } |
---|
1636 | |
---|
1637 | |
---|
1638 | static PyObject *_wrap_libtrace_udp_len_get(PyObject *self, PyObject *args) { |
---|
1639 | PyObject *resultobj; |
---|
1640 | struct libtrace_udp *arg1 = (struct libtrace_udp *) 0 ; |
---|
1641 | uint16_t result; |
---|
1642 | PyObject * obj0 = 0 ; |
---|
1643 | |
---|
1644 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_udp_len_get",&obj0)) goto fail; |
---|
1645 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_udp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1646 | result = (uint16_t)libtrace_udp_len_get(arg1); |
---|
1647 | |
---|
1648 | resultobj = PyInt_FromLong((long)result); |
---|
1649 | return resultobj; |
---|
1650 | fail: |
---|
1651 | return NULL; |
---|
1652 | } |
---|
1653 | |
---|
1654 | |
---|
1655 | static PyObject *_wrap_libtrace_udp_check_get(PyObject *self, PyObject *args) { |
---|
1656 | PyObject *resultobj; |
---|
1657 | struct libtrace_udp *arg1 = (struct libtrace_udp *) 0 ; |
---|
1658 | uint16_t result; |
---|
1659 | PyObject * obj0 = 0 ; |
---|
1660 | |
---|
1661 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_udp_check_get",&obj0)) goto fail; |
---|
1662 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_udp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1663 | result = (uint16_t)libtrace_udp_check_get(arg1); |
---|
1664 | |
---|
1665 | resultobj = PyInt_FromLong((long)result); |
---|
1666 | return resultobj; |
---|
1667 | fail: |
---|
1668 | return NULL; |
---|
1669 | } |
---|
1670 | |
---|
1671 | |
---|
1672 | static PyObject * libtrace_udp_swigregister(PyObject *self, PyObject *args) { |
---|
1673 | PyObject *obj; |
---|
1674 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
1675 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_udp, obj); |
---|
1676 | Py_INCREF(obj); |
---|
1677 | return Py_BuildValue((char *)""); |
---|
1678 | } |
---|
1679 | static PyObject *_wrap_libtrace_icmp_type_set(PyObject *self, PyObject *args) { |
---|
1680 | PyObject *resultobj; |
---|
1681 | struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ; |
---|
1682 | uint8_t arg2 ; |
---|
1683 | PyObject * obj0 = 0 ; |
---|
1684 | PyObject * obj1 = 0 ; |
---|
1685 | |
---|
1686 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_type_set",&obj0,&obj1)) goto fail; |
---|
1687 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_icmp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1688 | arg2 = (uint8_t) PyInt_AsLong(obj1); |
---|
1689 | if (PyErr_Occurred()) SWIG_fail; |
---|
1690 | if (arg1) (arg1)->type = arg2; |
---|
1691 | |
---|
1692 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1693 | return resultobj; |
---|
1694 | fail: |
---|
1695 | return NULL; |
---|
1696 | } |
---|
1697 | |
---|
1698 | |
---|
1699 | static PyObject *_wrap_libtrace_icmp_type_get(PyObject *self, PyObject *args) { |
---|
1700 | PyObject *resultobj; |
---|
1701 | struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ; |
---|
1702 | uint8_t result; |
---|
1703 | PyObject * obj0 = 0 ; |
---|
1704 | |
---|
1705 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_type_get",&obj0)) goto fail; |
---|
1706 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_icmp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1707 | result = (uint8_t) ((arg1)->type); |
---|
1708 | |
---|
1709 | resultobj = PyInt_FromLong((long)result); |
---|
1710 | return resultobj; |
---|
1711 | fail: |
---|
1712 | return NULL; |
---|
1713 | } |
---|
1714 | |
---|
1715 | |
---|
1716 | static PyObject *_wrap_libtrace_icmp_code_set(PyObject *self, PyObject *args) { |
---|
1717 | PyObject *resultobj; |
---|
1718 | struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ; |
---|
1719 | uint8_t arg2 ; |
---|
1720 | PyObject * obj0 = 0 ; |
---|
1721 | PyObject * obj1 = 0 ; |
---|
1722 | |
---|
1723 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_code_set",&obj0,&obj1)) goto fail; |
---|
1724 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_icmp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1725 | arg2 = (uint8_t) PyInt_AsLong(obj1); |
---|
1726 | if (PyErr_Occurred()) SWIG_fail; |
---|
1727 | if (arg1) (arg1)->code = arg2; |
---|
1728 | |
---|
1729 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1730 | return resultobj; |
---|
1731 | fail: |
---|
1732 | return NULL; |
---|
1733 | } |
---|
1734 | |
---|
1735 | |
---|
1736 | static PyObject *_wrap_libtrace_icmp_code_get(PyObject *self, PyObject *args) { |
---|
1737 | PyObject *resultobj; |
---|
1738 | struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ; |
---|
1739 | uint8_t result; |
---|
1740 | PyObject * obj0 = 0 ; |
---|
1741 | |
---|
1742 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_code_get",&obj0)) goto fail; |
---|
1743 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_icmp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1744 | result = (uint8_t) ((arg1)->code); |
---|
1745 | |
---|
1746 | resultobj = PyInt_FromLong((long)result); |
---|
1747 | return resultobj; |
---|
1748 | fail: |
---|
1749 | return NULL; |
---|
1750 | } |
---|
1751 | |
---|
1752 | |
---|
1753 | static PyObject *_wrap_libtrace_icmp_checksum_set(PyObject *self, PyObject *args) { |
---|
1754 | PyObject *resultobj; |
---|
1755 | struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ; |
---|
1756 | uint16_t arg2 ; |
---|
1757 | PyObject * obj0 = 0 ; |
---|
1758 | PyObject * obj1 = 0 ; |
---|
1759 | |
---|
1760 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_checksum_set",&obj0,&obj1)) goto fail; |
---|
1761 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_icmp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1762 | arg2 = (uint16_t) PyInt_AsLong(obj1); |
---|
1763 | if (PyErr_Occurred()) SWIG_fail; |
---|
1764 | if (arg1) (arg1)->checksum = arg2; |
---|
1765 | |
---|
1766 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1767 | return resultobj; |
---|
1768 | fail: |
---|
1769 | return NULL; |
---|
1770 | } |
---|
1771 | |
---|
1772 | |
---|
1773 | static PyObject *_wrap_libtrace_icmp_checksum_get(PyObject *self, PyObject *args) { |
---|
1774 | PyObject *resultobj; |
---|
1775 | struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ; |
---|
1776 | uint16_t result; |
---|
1777 | PyObject * obj0 = 0 ; |
---|
1778 | |
---|
1779 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_checksum_get",&obj0)) goto fail; |
---|
1780 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_icmp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1781 | result = (uint16_t) ((arg1)->checksum); |
---|
1782 | |
---|
1783 | resultobj = PyInt_FromLong((long)result); |
---|
1784 | return resultobj; |
---|
1785 | fail: |
---|
1786 | return NULL; |
---|
1787 | } |
---|
1788 | |
---|
1789 | |
---|
1790 | static PyObject *_wrap_libtrace_icmp_un_get(PyObject *self, PyObject *args) { |
---|
1791 | PyObject *resultobj; |
---|
1792 | struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ; |
---|
1793 | libtrace_icmp_un *result; |
---|
1794 | PyObject * obj0 = 0 ; |
---|
1795 | |
---|
1796 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_get",&obj0)) goto fail; |
---|
1797 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_icmp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1798 | result = (libtrace_icmp_un *)& ((arg1)->un); |
---|
1799 | |
---|
1800 | resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_libtrace_icmp_un, 0); |
---|
1801 | return resultobj; |
---|
1802 | fail: |
---|
1803 | return NULL; |
---|
1804 | } |
---|
1805 | |
---|
1806 | |
---|
1807 | static PyObject * libtrace_icmp_swigregister(PyObject *self, PyObject *args) { |
---|
1808 | PyObject *obj; |
---|
1809 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
1810 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_icmp, obj); |
---|
1811 | Py_INCREF(obj); |
---|
1812 | return Py_BuildValue((char *)""); |
---|
1813 | } |
---|
1814 | static PyObject *_wrap_libtrace_icmp_un_gateway_set(PyObject *self, PyObject *args) { |
---|
1815 | PyObject *resultobj; |
---|
1816 | libtrace_icmp_un *arg1 = (libtrace_icmp_un *) 0 ; |
---|
1817 | uint32_t arg2 ; |
---|
1818 | PyObject * obj0 = 0 ; |
---|
1819 | PyObject * obj1 = 0 ; |
---|
1820 | |
---|
1821 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_un_gateway_set",&obj0,&obj1)) goto fail; |
---|
1822 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_icmp_un,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1823 | arg2 = (uint32_t) PyInt_AsLong(obj1); |
---|
1824 | if (PyErr_Occurred()) SWIG_fail; |
---|
1825 | if (arg1) (arg1)->gateway = arg2; |
---|
1826 | |
---|
1827 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1828 | return resultobj; |
---|
1829 | fail: |
---|
1830 | return NULL; |
---|
1831 | } |
---|
1832 | |
---|
1833 | |
---|
1834 | static PyObject *_wrap_libtrace_icmp_un_gateway_get(PyObject *self, PyObject *args) { |
---|
1835 | PyObject *resultobj; |
---|
1836 | libtrace_icmp_un *arg1 = (libtrace_icmp_un *) 0 ; |
---|
1837 | uint32_t result; |
---|
1838 | PyObject * obj0 = 0 ; |
---|
1839 | |
---|
1840 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_gateway_get",&obj0)) goto fail; |
---|
1841 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_icmp_un,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1842 | result = (uint32_t) ((arg1)->gateway); |
---|
1843 | |
---|
1844 | resultobj = PyInt_FromLong((long)result); |
---|
1845 | return resultobj; |
---|
1846 | fail: |
---|
1847 | return NULL; |
---|
1848 | } |
---|
1849 | |
---|
1850 | |
---|
1851 | static PyObject *_wrap_libtrace_icmp_un_frag_get(PyObject *self, PyObject *args) { |
---|
1852 | PyObject *resultobj; |
---|
1853 | libtrace_icmp_un *arg1 = (libtrace_icmp_un *) 0 ; |
---|
1854 | libtrace_icmp_un_frag *result; |
---|
1855 | PyObject * obj0 = 0 ; |
---|
1856 | |
---|
1857 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_frag_get",&obj0)) goto fail; |
---|
1858 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_icmp_un,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1859 | result = (libtrace_icmp_un_frag *)& ((arg1)->frag); |
---|
1860 | |
---|
1861 | resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_libtrace_icmp_un_frag, 0); |
---|
1862 | return resultobj; |
---|
1863 | fail: |
---|
1864 | return NULL; |
---|
1865 | } |
---|
1866 | |
---|
1867 | |
---|
1868 | static PyObject *_wrap_libtrace_icmp_un_echo_get(PyObject *self, PyObject *args) { |
---|
1869 | PyObject *resultobj; |
---|
1870 | libtrace_icmp_un *arg1 = (libtrace_icmp_un *) 0 ; |
---|
1871 | libtrace_icmp_un_echo *result; |
---|
1872 | PyObject * obj0 = 0 ; |
---|
1873 | |
---|
1874 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_echo_get",&obj0)) goto fail; |
---|
1875 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_icmp_un,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1876 | result = (libtrace_icmp_un_echo *)& ((arg1)->echo); |
---|
1877 | |
---|
1878 | resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_libtrace_icmp_un_echo, 0); |
---|
1879 | return resultobj; |
---|
1880 | fail: |
---|
1881 | return NULL; |
---|
1882 | } |
---|
1883 | |
---|
1884 | |
---|
1885 | static PyObject * libtrace_icmp_un_swigregister(PyObject *self, PyObject *args) { |
---|
1886 | PyObject *obj; |
---|
1887 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
1888 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_icmp_un, obj); |
---|
1889 | Py_INCREF(obj); |
---|
1890 | return Py_BuildValue((char *)""); |
---|
1891 | } |
---|
1892 | static PyObject *_wrap_libtrace_icmp_un_frag___unused_set(PyObject *self, PyObject *args) { |
---|
1893 | PyObject *resultobj; |
---|
1894 | libtrace_icmp_un_frag *arg1 = (libtrace_icmp_un_frag *) 0 ; |
---|
1895 | uint16_t arg2 ; |
---|
1896 | PyObject * obj0 = 0 ; |
---|
1897 | PyObject * obj1 = 0 ; |
---|
1898 | |
---|
1899 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_un_frag___unused_set",&obj0,&obj1)) goto fail; |
---|
1900 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_icmp_un_frag,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1901 | arg2 = (uint16_t) PyInt_AsLong(obj1); |
---|
1902 | if (PyErr_Occurred()) SWIG_fail; |
---|
1903 | if (arg1) (arg1)->__unused = arg2; |
---|
1904 | |
---|
1905 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1906 | return resultobj; |
---|
1907 | fail: |
---|
1908 | return NULL; |
---|
1909 | } |
---|
1910 | |
---|
1911 | |
---|
1912 | static PyObject *_wrap_libtrace_icmp_un_frag___unused_get(PyObject *self, PyObject *args) { |
---|
1913 | PyObject *resultobj; |
---|
1914 | libtrace_icmp_un_frag *arg1 = (libtrace_icmp_un_frag *) 0 ; |
---|
1915 | uint16_t result; |
---|
1916 | PyObject * obj0 = 0 ; |
---|
1917 | |
---|
1918 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_frag___unused_get",&obj0)) goto fail; |
---|
1919 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_icmp_un_frag,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1920 | result = (uint16_t) ((arg1)->__unused); |
---|
1921 | |
---|
1922 | resultobj = PyInt_FromLong((long)result); |
---|
1923 | return resultobj; |
---|
1924 | fail: |
---|
1925 | return NULL; |
---|
1926 | } |
---|
1927 | |
---|
1928 | |
---|
1929 | static PyObject *_wrap_libtrace_icmp_un_frag_mtu_set(PyObject *self, PyObject *args) { |
---|
1930 | PyObject *resultobj; |
---|
1931 | libtrace_icmp_un_frag *arg1 = (libtrace_icmp_un_frag *) 0 ; |
---|
1932 | uint16_t arg2 ; |
---|
1933 | PyObject * obj0 = 0 ; |
---|
1934 | PyObject * obj1 = 0 ; |
---|
1935 | |
---|
1936 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_un_frag_mtu_set",&obj0,&obj1)) goto fail; |
---|
1937 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_icmp_un_frag,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1938 | arg2 = (uint16_t) PyInt_AsLong(obj1); |
---|
1939 | if (PyErr_Occurred()) SWIG_fail; |
---|
1940 | if (arg1) (arg1)->mtu = arg2; |
---|
1941 | |
---|
1942 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1943 | return resultobj; |
---|
1944 | fail: |
---|
1945 | return NULL; |
---|
1946 | } |
---|
1947 | |
---|
1948 | |
---|
1949 | static PyObject *_wrap_libtrace_icmp_un_frag_mtu_get(PyObject *self, PyObject *args) { |
---|
1950 | PyObject *resultobj; |
---|
1951 | libtrace_icmp_un_frag *arg1 = (libtrace_icmp_un_frag *) 0 ; |
---|
1952 | uint16_t result; |
---|
1953 | PyObject * obj0 = 0 ; |
---|
1954 | |
---|
1955 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_frag_mtu_get",&obj0)) goto fail; |
---|
1956 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_icmp_un_frag,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1957 | result = (uint16_t) ((arg1)->mtu); |
---|
1958 | |
---|
1959 | resultobj = PyInt_FromLong((long)result); |
---|
1960 | return resultobj; |
---|
1961 | fail: |
---|
1962 | return NULL; |
---|
1963 | } |
---|
1964 | |
---|
1965 | |
---|
1966 | static PyObject * libtrace_icmp_un_frag_swigregister(PyObject *self, PyObject *args) { |
---|
1967 | PyObject *obj; |
---|
1968 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
1969 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_icmp_un_frag, obj); |
---|
1970 | Py_INCREF(obj); |
---|
1971 | return Py_BuildValue((char *)""); |
---|
1972 | } |
---|
1973 | static PyObject *_wrap_libtrace_icmp_un_echo_id_set(PyObject *self, PyObject *args) { |
---|
1974 | PyObject *resultobj; |
---|
1975 | libtrace_icmp_un_echo *arg1 = (libtrace_icmp_un_echo *) 0 ; |
---|
1976 | uint16_t arg2 ; |
---|
1977 | PyObject * obj0 = 0 ; |
---|
1978 | PyObject * obj1 = 0 ; |
---|
1979 | |
---|
1980 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_un_echo_id_set",&obj0,&obj1)) goto fail; |
---|
1981 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_icmp_un_echo,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
1982 | arg2 = (uint16_t) PyInt_AsLong(obj1); |
---|
1983 | if (PyErr_Occurred()) SWIG_fail; |
---|
1984 | if (arg1) (arg1)->id = arg2; |
---|
1985 | |
---|
1986 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1987 | return resultobj; |
---|
1988 | fail: |
---|
1989 | return NULL; |
---|
1990 | } |
---|
1991 | |
---|
1992 | |
---|
1993 | static PyObject *_wrap_libtrace_icmp_un_echo_id_get(PyObject *self, PyObject *args) { |
---|
1994 | PyObject *resultobj; |
---|
1995 | libtrace_icmp_un_echo *arg1 = (libtrace_icmp_un_echo *) 0 ; |
---|
1996 | uint16_t result; |
---|
1997 | PyObject * obj0 = 0 ; |
---|
1998 | |
---|
1999 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_echo_id_get",&obj0)) goto fail; |
---|
2000 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_icmp_un_echo,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
2001 | result = (uint16_t) ((arg1)->id); |
---|
2002 | |
---|
2003 | resultobj = PyInt_FromLong((long)result); |
---|
2004 | return resultobj; |
---|
2005 | fail: |
---|
2006 | return NULL; |
---|
2007 | } |
---|
2008 | |
---|
2009 | |
---|
2010 | static PyObject *_wrap_libtrace_icmp_un_echo_sequence_set(PyObject *self, PyObject *args) { |
---|
2011 | PyObject *resultobj; |
---|
2012 | libtrace_icmp_un_echo *arg1 = (libtrace_icmp_un_echo *) 0 ; |
---|
2013 | uint16_t arg2 ; |
---|
2014 | PyObject * obj0 = 0 ; |
---|
2015 | PyObject * obj1 = 0 ; |
---|
2016 | |
---|
2017 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_un_echo_sequence_set",&obj0,&obj1)) goto fail; |
---|
2018 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_icmp_un_echo,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
2019 | arg2 = (uint16_t) PyInt_AsLong(obj1); |
---|
2020 | if (PyErr_Occurred()) SWIG_fail; |
---|
2021 | if (arg1) (arg1)->sequence = arg2; |
---|
2022 | |
---|
2023 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2024 | return resultobj; |
---|
2025 | fail: |
---|
2026 | return NULL; |
---|
2027 | } |
---|
2028 | |
---|
2029 | |
---|
2030 | static PyObject *_wrap_libtrace_icmp_un_echo_sequence_get(PyObject *self, PyObject *args) { |
---|
2031 | PyObject *resultobj; |
---|
2032 | libtrace_icmp_un_echo *arg1 = (libtrace_icmp_un_echo *) 0 ; |
---|
2033 | uint16_t result; |
---|
2034 | PyObject * obj0 = 0 ; |
---|
2035 | |
---|
2036 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_echo_sequence_get",&obj0)) goto fail; |
---|
2037 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_icmp_un_echo,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
2038 | result = (uint16_t) ((arg1)->sequence); |
---|
2039 | |
---|
2040 | resultobj = PyInt_FromLong((long)result); |
---|
2041 | return resultobj; |
---|
2042 | fail: |
---|
2043 | return NULL; |
---|
2044 | } |
---|
2045 | |
---|
2046 | |
---|
2047 | static PyObject * libtrace_icmp_un_echo_swigregister(PyObject *self, PyObject *args) { |
---|
2048 | PyObject *obj; |
---|
2049 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
2050 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_icmp_un_echo, obj); |
---|
2051 | Py_INCREF(obj); |
---|
2052 | return Py_BuildValue((char *)""); |
---|
2053 | } |
---|
2054 | static PyObject *_wrap_new_Packet(PyObject *self, PyObject *args) { |
---|
2055 | PyObject *resultobj; |
---|
2056 | struct libtrace_packet_t *result; |
---|
2057 | |
---|
2058 | if(!PyArg_ParseTuple(args,(char *)":new_Packet")) goto fail; |
---|
2059 | result = (struct libtrace_packet_t *)new_libtrace_packet_t(); |
---|
2060 | |
---|
2061 | resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_libtrace_packet_t, 1); |
---|
2062 | return resultobj; |
---|
2063 | fail: |
---|
2064 | return NULL; |
---|
2065 | } |
---|
2066 | |
---|
2067 | |
---|
2068 | static PyObject *_wrap_delete_Packet(PyObject *self, PyObject *args) { |
---|
2069 | PyObject *resultobj; |
---|
2070 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
2071 | PyObject * obj0 = 0 ; |
---|
2072 | |
---|
2073 | if(!PyArg_ParseTuple(args,(char *)"O:delete_Packet",&obj0)) goto fail; |
---|
2074 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_packet_t,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
2075 | delete_libtrace_packet_t(arg1); |
---|
2076 | |
---|
2077 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2078 | return resultobj; |
---|
2079 | fail: |
---|
2080 | return NULL; |
---|
2081 | } |
---|
2082 | |
---|
2083 | |
---|
2084 | static PyObject *_wrap_Packet_trace_get_ip(PyObject *self, PyObject *args) { |
---|
2085 | PyObject *resultobj; |
---|
2086 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
2087 | struct libtrace_ip *result; |
---|
2088 | PyObject * obj0 = 0 ; |
---|
2089 | |
---|
2090 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_ip",&obj0)) goto fail; |
---|
2091 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_packet_t,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
2092 | result = (struct libtrace_ip *)libtrace_packet_t_trace_get_ip(arg1); |
---|
2093 | |
---|
2094 | resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_libtrace_ip, 0); |
---|
2095 | return resultobj; |
---|
2096 | fail: |
---|
2097 | return NULL; |
---|
2098 | } |
---|
2099 | |
---|
2100 | |
---|
2101 | static PyObject *_wrap_Packet_trace_get_tcp(PyObject *self, PyObject *args) { |
---|
2102 | PyObject *resultobj; |
---|
2103 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
2104 | struct libtrace_tcp *result; |
---|
2105 | PyObject * obj0 = 0 ; |
---|
2106 | |
---|
2107 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_tcp",&obj0)) goto fail; |
---|
2108 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_packet_t,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
2109 | result = (struct libtrace_tcp *)libtrace_packet_t_trace_get_tcp(arg1); |
---|
2110 | |
---|
2111 | resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_libtrace_tcp, 0); |
---|
2112 | return resultobj; |
---|
2113 | fail: |
---|
2114 | return NULL; |
---|
2115 | } |
---|
2116 | |
---|
2117 | |
---|
2118 | static PyObject *_wrap_Packet_trace_get_udp(PyObject *self, PyObject *args) { |
---|
2119 | PyObject *resultobj; |
---|
2120 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
2121 | struct libtrace_udp *result; |
---|
2122 | PyObject * obj0 = 0 ; |
---|
2123 | |
---|
2124 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_udp",&obj0)) goto fail; |
---|
2125 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_packet_t,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
2126 | result = (struct libtrace_udp *)libtrace_packet_t_trace_get_udp(arg1); |
---|
2127 | |
---|
2128 | resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_libtrace_udp, 0); |
---|
2129 | return resultobj; |
---|
2130 | fail: |
---|
2131 | return NULL; |
---|
2132 | } |
---|
2133 | |
---|
2134 | |
---|
2135 | static PyObject *_wrap_Packet_trace_get_icmp(PyObject *self, PyObject *args) { |
---|
2136 | PyObject *resultobj; |
---|
2137 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
2138 | struct libtrace_icmp *result; |
---|
2139 | PyObject * obj0 = 0 ; |
---|
2140 | |
---|
2141 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_icmp",&obj0)) goto fail; |
---|
2142 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_packet_t,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
2143 | result = (struct libtrace_icmp *)libtrace_packet_t_trace_get_icmp(arg1); |
---|
2144 | |
---|
2145 | resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_libtrace_icmp, 0); |
---|
2146 | return resultobj; |
---|
2147 | fail: |
---|
2148 | return NULL; |
---|
2149 | } |
---|
2150 | |
---|
2151 | |
---|
2152 | static PyObject *_wrap_Packet_trace_get_seconds(PyObject *self, PyObject *args) { |
---|
2153 | PyObject *resultobj; |
---|
2154 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
2155 | double result; |
---|
2156 | PyObject * obj0 = 0 ; |
---|
2157 | |
---|
2158 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_seconds",&obj0)) goto fail; |
---|
2159 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_packet_t,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
2160 | result = (double)libtrace_packet_t_trace_get_seconds(arg1); |
---|
2161 | |
---|
2162 | resultobj = PyFloat_FromDouble(result); |
---|
2163 | return resultobj; |
---|
2164 | fail: |
---|
2165 | return NULL; |
---|
2166 | } |
---|
2167 | |
---|
2168 | |
---|
2169 | static PyObject * Packet_swigregister(PyObject *self, PyObject *args) { |
---|
2170 | PyObject *obj; |
---|
2171 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
2172 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_packet_t, obj); |
---|
2173 | Py_INCREF(obj); |
---|
2174 | return Py_BuildValue((char *)""); |
---|
2175 | } |
---|
2176 | static PyObject *_wrap_new_Trace(PyObject *self, PyObject *args) { |
---|
2177 | PyObject *resultobj; |
---|
2178 | char *arg1 ; |
---|
2179 | struct libtrace_t *result; |
---|
2180 | |
---|
2181 | if(!PyArg_ParseTuple(args,(char *)"s:new_Trace",&arg1)) goto fail; |
---|
2182 | result = (struct libtrace_t *)new_libtrace_t(arg1); |
---|
2183 | |
---|
2184 | resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_libtrace_t, 1); |
---|
2185 | return resultobj; |
---|
2186 | fail: |
---|
2187 | return NULL; |
---|
2188 | } |
---|
2189 | |
---|
2190 | |
---|
2191 | static PyObject *_wrap_delete_Trace(PyObject *self, PyObject *args) { |
---|
2192 | PyObject *resultobj; |
---|
2193 | struct libtrace_t *arg1 = (struct libtrace_t *) 0 ; |
---|
2194 | PyObject * obj0 = 0 ; |
---|
2195 | |
---|
2196 | if(!PyArg_ParseTuple(args,(char *)"O:delete_Trace",&obj0)) goto fail; |
---|
2197 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_t,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
2198 | delete_libtrace_t(arg1); |
---|
2199 | |
---|
2200 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2201 | return resultobj; |
---|
2202 | fail: |
---|
2203 | return NULL; |
---|
2204 | } |
---|
2205 | |
---|
2206 | |
---|
2207 | static PyObject *_wrap_Trace_trace_read_packet(PyObject *self, PyObject *args) { |
---|
2208 | PyObject *resultobj; |
---|
2209 | struct libtrace_t *arg1 = (struct libtrace_t *) 0 ; |
---|
2210 | struct libtrace_packet_t *arg2 = (struct libtrace_packet_t *) 0 ; |
---|
2211 | int result; |
---|
2212 | PyObject * obj0 = 0 ; |
---|
2213 | PyObject * obj1 = 0 ; |
---|
2214 | |
---|
2215 | if(!PyArg_ParseTuple(args,(char *)"OO:Trace_trace_read_packet",&obj0,&obj1)) goto fail; |
---|
2216 | if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_libtrace_t,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
2217 | if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_libtrace_packet_t,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; |
---|
2218 | result = (int)libtrace_t_trace_read_packet(arg1,arg2); |
---|
2219 | |
---|
2220 | resultobj = PyInt_FromLong((long)result); |
---|
2221 | return resultobj; |
---|
2222 | fail: |
---|
2223 | return NULL; |
---|
2224 | } |
---|
2225 | |
---|
2226 | |
---|
2227 | static PyObject * Trace_swigregister(PyObject *self, PyObject *args) { |
---|
2228 | PyObject *obj; |
---|
2229 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
2230 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_t, obj); |
---|
2231 | Py_INCREF(obj); |
---|
2232 | return Py_BuildValue((char *)""); |
---|
2233 | } |
---|
2234 | static PyMethodDef SwigMethods[] = { |
---|
2235 | { (char *)"in_addr_s_addr_set", _wrap_in_addr_s_addr_set, METH_VARARGS }, |
---|
2236 | { (char *)"in_addr_s_addr_get", _wrap_in_addr_s_addr_get, METH_VARARGS }, |
---|
2237 | { (char *)"in_addr_swigregister", in_addr_swigregister, METH_VARARGS }, |
---|
2238 | { (char *)"libtrace_ip_ip_hl_set", _wrap_libtrace_ip_ip_hl_set, METH_VARARGS }, |
---|
2239 | { (char *)"libtrace_ip_ip_hl_get", _wrap_libtrace_ip_ip_hl_get, METH_VARARGS }, |
---|
2240 | { (char *)"libtrace_ip_ip_v_set", _wrap_libtrace_ip_ip_v_set, METH_VARARGS }, |
---|
2241 | { (char *)"libtrace_ip_ip_v_get", _wrap_libtrace_ip_ip_v_get, METH_VARARGS }, |
---|
2242 | { (char *)"libtrace_ip_ip_tos_set", _wrap_libtrace_ip_ip_tos_set, METH_VARARGS }, |
---|
2243 | { (char *)"libtrace_ip_ip_tos_get", _wrap_libtrace_ip_ip_tos_get, METH_VARARGS }, |
---|
2244 | { (char *)"libtrace_ip_ip_ttl_set", _wrap_libtrace_ip_ip_ttl_set, METH_VARARGS }, |
---|
2245 | { (char *)"libtrace_ip_ip_ttl_get", _wrap_libtrace_ip_ip_ttl_get, METH_VARARGS }, |
---|
2246 | { (char *)"libtrace_ip_ip_p_set", _wrap_libtrace_ip_ip_p_set, METH_VARARGS }, |
---|
2247 | { (char *)"libtrace_ip_ip_p_get", _wrap_libtrace_ip_ip_p_get, METH_VARARGS }, |
---|
2248 | { (char *)"libtrace_ip_ip_sum_get", _wrap_libtrace_ip_ip_sum_get, METH_VARARGS }, |
---|
2249 | { (char *)"libtrace_ip_ip_len_get", _wrap_libtrace_ip_ip_len_get, METH_VARARGS }, |
---|
2250 | { (char *)"libtrace_ip_ip_id_get", _wrap_libtrace_ip_ip_id_get, METH_VARARGS }, |
---|
2251 | { (char *)"libtrace_ip_ip_off_get", _wrap_libtrace_ip_ip_off_get, METH_VARARGS }, |
---|
2252 | { (char *)"libtrace_ip_ip_src_get", _wrap_libtrace_ip_ip_src_get, METH_VARARGS }, |
---|
2253 | { (char *)"libtrace_ip_ip_dst_get", _wrap_libtrace_ip_ip_dst_get, METH_VARARGS }, |
---|
2254 | { (char *)"libtrace_ip_swigregister", libtrace_ip_swigregister, METH_VARARGS }, |
---|
2255 | { (char *)"libtrace_tcp_res1_set", _wrap_libtrace_tcp_res1_set, METH_VARARGS }, |
---|
2256 | { (char *)"libtrace_tcp_res1_get", _wrap_libtrace_tcp_res1_get, METH_VARARGS }, |
---|
2257 | { (char *)"libtrace_tcp_doff_set", _wrap_libtrace_tcp_doff_set, METH_VARARGS }, |
---|
2258 | { (char *)"libtrace_tcp_doff_get", _wrap_libtrace_tcp_doff_get, METH_VARARGS }, |
---|
2259 | { (char *)"libtrace_tcp_fin_set", _wrap_libtrace_tcp_fin_set, METH_VARARGS }, |
---|
2260 | { (char *)"libtrace_tcp_fin_get", _wrap_libtrace_tcp_fin_get, METH_VARARGS }, |
---|
2261 | { (char *)"libtrace_tcp_syn_set", _wrap_libtrace_tcp_syn_set, METH_VARARGS }, |
---|
2262 | { (char *)"libtrace_tcp_syn_get", _wrap_libtrace_tcp_syn_get, METH_VARARGS }, |
---|
2263 | { (char *)"libtrace_tcp_rst_set", _wrap_libtrace_tcp_rst_set, METH_VARARGS }, |
---|
2264 | { (char *)"libtrace_tcp_rst_get", _wrap_libtrace_tcp_rst_get, METH_VARARGS }, |
---|
2265 | { (char *)"libtrace_tcp_psh_set", _wrap_libtrace_tcp_psh_set, METH_VARARGS }, |
---|
2266 | { (char *)"libtrace_tcp_psh_get", _wrap_libtrace_tcp_psh_get, METH_VARARGS }, |
---|
2267 | { (char *)"libtrace_tcp_ack_set", _wrap_libtrace_tcp_ack_set, METH_VARARGS }, |
---|
2268 | { (char *)"libtrace_tcp_ack_get", _wrap_libtrace_tcp_ack_get, METH_VARARGS }, |
---|
2269 | { (char *)"libtrace_tcp_urg_set", _wrap_libtrace_tcp_urg_set, METH_VARARGS }, |
---|
2270 | { (char *)"libtrace_tcp_urg_get", _wrap_libtrace_tcp_urg_get, METH_VARARGS }, |
---|
2271 | { (char *)"libtrace_tcp_res2_set", _wrap_libtrace_tcp_res2_set, METH_VARARGS }, |
---|
2272 | { (char *)"libtrace_tcp_res2_get", _wrap_libtrace_tcp_res2_get, METH_VARARGS }, |
---|
2273 | { (char *)"libtrace_tcp_source_get", _wrap_libtrace_tcp_source_get, METH_VARARGS }, |
---|
2274 | { (char *)"libtrace_tcp_dest_get", _wrap_libtrace_tcp_dest_get, METH_VARARGS }, |
---|
2275 | { (char *)"libtrace_tcp_window_get", _wrap_libtrace_tcp_window_get, METH_VARARGS }, |
---|
2276 | { (char *)"libtrace_tcp_check_get", _wrap_libtrace_tcp_check_get, METH_VARARGS }, |
---|
2277 | { (char *)"libtrace_tcp_urg_ptr_get", _wrap_libtrace_tcp_urg_ptr_get, METH_VARARGS }, |
---|
2278 | { (char *)"libtrace_tcp_seq_get", _wrap_libtrace_tcp_seq_get, METH_VARARGS }, |
---|
2279 | { (char *)"libtrace_tcp_ack_seq_get", _wrap_libtrace_tcp_ack_seq_get, METH_VARARGS }, |
---|
2280 | { (char *)"libtrace_tcp_swigregister", libtrace_tcp_swigregister, METH_VARARGS }, |
---|
2281 | { (char *)"libtrace_udp_source_get", _wrap_libtrace_udp_source_get, METH_VARARGS }, |
---|
2282 | { (char *)"libtrace_udp_dest_get", _wrap_libtrace_udp_dest_get, METH_VARARGS }, |
---|
2283 | { (char *)"libtrace_udp_len_get", _wrap_libtrace_udp_len_get, METH_VARARGS }, |
---|
2284 | { (char *)"libtrace_udp_check_get", _wrap_libtrace_udp_check_get, METH_VARARGS }, |
---|
2285 | { (char *)"libtrace_udp_swigregister", libtrace_udp_swigregister, METH_VARARGS }, |
---|
2286 | { (char *)"libtrace_icmp_type_set", _wrap_libtrace_icmp_type_set, METH_VARARGS }, |
---|
2287 | { (char *)"libtrace_icmp_type_get", _wrap_libtrace_icmp_type_get, METH_VARARGS }, |
---|
2288 | { (char *)"libtrace_icmp_code_set", _wrap_libtrace_icmp_code_set, METH_VARARGS }, |
---|
2289 | { (char *)"libtrace_icmp_code_get", _wrap_libtrace_icmp_code_get, METH_VARARGS }, |
---|
2290 | { (char *)"libtrace_icmp_checksum_set", _wrap_libtrace_icmp_checksum_set, METH_VARARGS }, |
---|
2291 | { (char *)"libtrace_icmp_checksum_get", _wrap_libtrace_icmp_checksum_get, METH_VARARGS }, |
---|
2292 | { (char *)"libtrace_icmp_un_get", _wrap_libtrace_icmp_un_get, METH_VARARGS }, |
---|
2293 | { (char *)"libtrace_icmp_swigregister", libtrace_icmp_swigregister, METH_VARARGS }, |
---|
2294 | { (char *)"libtrace_icmp_un_gateway_set", _wrap_libtrace_icmp_un_gateway_set, METH_VARARGS }, |
---|
2295 | { (char *)"libtrace_icmp_un_gateway_get", _wrap_libtrace_icmp_un_gateway_get, METH_VARARGS }, |
---|
2296 | { (char *)"libtrace_icmp_un_frag_get", _wrap_libtrace_icmp_un_frag_get, METH_VARARGS }, |
---|
2297 | { (char *)"libtrace_icmp_un_echo_get", _wrap_libtrace_icmp_un_echo_get, METH_VARARGS }, |
---|
2298 | { (char *)"libtrace_icmp_un_swigregister", libtrace_icmp_un_swigregister, METH_VARARGS }, |
---|
2299 | { (char *)"libtrace_icmp_un_frag___unused_set", _wrap_libtrace_icmp_un_frag___unused_set, METH_VARARGS }, |
---|
2300 | { (char *)"libtrace_icmp_un_frag___unused_get", _wrap_libtrace_icmp_un_frag___unused_get, METH_VARARGS }, |
---|
2301 | { (char *)"libtrace_icmp_un_frag_mtu_set", _wrap_libtrace_icmp_un_frag_mtu_set, METH_VARARGS }, |
---|
2302 | { (char *)"libtrace_icmp_un_frag_mtu_get", _wrap_libtrace_icmp_un_frag_mtu_get, METH_VARARGS }, |
---|
2303 | { (char *)"libtrace_icmp_un_frag_swigregister", libtrace_icmp_un_frag_swigregister, METH_VARARGS }, |
---|
2304 | { (char *)"libtrace_icmp_un_echo_id_set", _wrap_libtrace_icmp_un_echo_id_set, METH_VARARGS }, |
---|
2305 | { (char *)"libtrace_icmp_un_echo_id_get", _wrap_libtrace_icmp_un_echo_id_get, METH_VARARGS }, |
---|
2306 | { (char *)"libtrace_icmp_un_echo_sequence_set", _wrap_libtrace_icmp_un_echo_sequence_set, METH_VARARGS }, |
---|
2307 | { (char *)"libtrace_icmp_un_echo_sequence_get", _wrap_libtrace_icmp_un_echo_sequence_get, METH_VARARGS }, |
---|
2308 | { (char *)"libtrace_icmp_un_echo_swigregister", libtrace_icmp_un_echo_swigregister, METH_VARARGS }, |
---|
2309 | { (char *)"new_Packet", _wrap_new_Packet, METH_VARARGS }, |
---|
2310 | { (char *)"delete_Packet", _wrap_delete_Packet, METH_VARARGS }, |
---|
2311 | { (char *)"Packet_trace_get_ip", _wrap_Packet_trace_get_ip, METH_VARARGS }, |
---|
2312 | { (char *)"Packet_trace_get_tcp", _wrap_Packet_trace_get_tcp, METH_VARARGS }, |
---|
2313 | { (char *)"Packet_trace_get_udp", _wrap_Packet_trace_get_udp, METH_VARARGS }, |
---|
2314 | { (char *)"Packet_trace_get_icmp", _wrap_Packet_trace_get_icmp, METH_VARARGS }, |
---|
2315 | { (char *)"Packet_trace_get_seconds", _wrap_Packet_trace_get_seconds, METH_VARARGS }, |
---|
2316 | { (char *)"Packet_swigregister", Packet_swigregister, METH_VARARGS }, |
---|
2317 | { (char *)"new_Trace", _wrap_new_Trace, METH_VARARGS }, |
---|
2318 | { (char *)"delete_Trace", _wrap_delete_Trace, METH_VARARGS }, |
---|
2319 | { (char *)"Trace_trace_read_packet", _wrap_Trace_trace_read_packet, METH_VARARGS }, |
---|
2320 | { (char *)"Trace_swigregister", Trace_swigregister, METH_VARARGS }, |
---|
2321 | { NULL, NULL } |
---|
2322 | }; |
---|
2323 | |
---|
2324 | |
---|
2325 | /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ |
---|
2326 | |
---|
2327 | static swig_type_info _swigt__p_in_addr[] = {{"_p_in_addr", 0, "in_addr *", 0},{"_p_in_addr"},{0}}; |
---|
2328 | static swig_type_info _swigt__p_libtrace_icmp[] = {{"_p_libtrace_icmp", 0, "struct libtrace_icmp *", 0},{"_p_libtrace_icmp"},{0}}; |
---|
2329 | static swig_type_info _swigt__p_libtrace_icmp_un_echo[] = {{"_p_libtrace_icmp_un_echo", 0, "libtrace_icmp_un_echo *", 0},{"_p_libtrace_icmp_un_echo"},{0}}; |
---|
2330 | static swig_type_info _swigt__p_libtrace_packet_t[] = {{"_p_libtrace_packet_t", 0, "struct libtrace_packet_t *", 0},{"_p_libtrace_packet_t"},{0}}; |
---|
2331 | static swig_type_info _swigt__p_libtrace_ip[] = {{"_p_libtrace_ip", 0, "struct libtrace_ip *", 0},{"_p_libtrace_ip"},{0}}; |
---|
2332 | static swig_type_info _swigt__p_libtrace_icmp_un_frag[] = {{"_p_libtrace_icmp_un_frag", 0, "libtrace_icmp_un_frag *", 0},{"_p_libtrace_icmp_un_frag"},{0}}; |
---|
2333 | static swig_type_info _swigt__p_libtrace_t[] = {{"_p_libtrace_t", 0, "libtrace_t *", 0},{"_p_libtrace_t"},{0}}; |
---|
2334 | static swig_type_info _swigt__p_libtrace_udp[] = {{"_p_libtrace_udp", 0, "struct libtrace_udp *", 0},{"_p_libtrace_udp"},{0}}; |
---|
2335 | static swig_type_info _swigt__p_libtrace_tcp[] = {{"_p_libtrace_tcp", 0, "struct libtrace_tcp *", 0},{"_p_libtrace_tcp"},{0}}; |
---|
2336 | static swig_type_info _swigt__p_libtrace_icmp_un[] = {{"_p_libtrace_icmp_un", 0, "libtrace_icmp_un *", 0},{"_p_libtrace_icmp_un"},{0}}; |
---|
2337 | |
---|
2338 | static swig_type_info *swig_types_initial[] = { |
---|
2339 | _swigt__p_in_addr, |
---|
2340 | _swigt__p_libtrace_icmp, |
---|
2341 | _swigt__p_libtrace_icmp_un_echo, |
---|
2342 | _swigt__p_libtrace_packet_t, |
---|
2343 | _swigt__p_libtrace_ip, |
---|
2344 | _swigt__p_libtrace_icmp_un_frag, |
---|
2345 | _swigt__p_libtrace_t, |
---|
2346 | _swigt__p_libtrace_udp, |
---|
2347 | _swigt__p_libtrace_tcp, |
---|
2348 | _swigt__p_libtrace_icmp_un, |
---|
2349 | 0 |
---|
2350 | }; |
---|
2351 | |
---|
2352 | |
---|
2353 | /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ |
---|
2354 | |
---|
2355 | static swig_const_info swig_const_table[] = { |
---|
2356 | { SWIG_PY_INT, (char *)"IP_RF", (long) 0x8000, 0, 0, 0}, |
---|
2357 | { SWIG_PY_INT, (char *)"IP_DF", (long) 0x4000, 0, 0, 0}, |
---|
2358 | { SWIG_PY_INT, (char *)"IP_MF", (long) 0x2000, 0, 0, 0}, |
---|
2359 | { SWIG_PY_INT, (char *)"IP_OFFMASK", (long) 0x1fff, 0, 0, 0}, |
---|
2360 | {0}}; |
---|
2361 | |
---|
2362 | #ifdef __cplusplus |
---|
2363 | } |
---|
2364 | #endif |
---|
2365 | |
---|
2366 | #ifdef __cplusplus |
---|
2367 | extern "C" |
---|
2368 | #endif |
---|
2369 | SWIGEXPORT(void) SWIG_init(void) { |
---|
2370 | static PyObject *SWIG_globals = 0; |
---|
2371 | static int typeinit = 0; |
---|
2372 | PyObject *m, *d; |
---|
2373 | int i; |
---|
2374 | if (!SWIG_globals) SWIG_globals = SWIG_newvarlink(); |
---|
2375 | m = Py_InitModule((char *) SWIG_name, SwigMethods); |
---|
2376 | d = PyModule_GetDict(m); |
---|
2377 | |
---|
2378 | if (!typeinit) { |
---|
2379 | for (i = 0; swig_types_initial[i]; i++) { |
---|
2380 | swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]); |
---|
2381 | } |
---|
2382 | typeinit = 1; |
---|
2383 | } |
---|
2384 | SWIG_InstallConstants(d,swig_const_table); |
---|
2385 | |
---|
2386 | } |
---|
2387 | |
---|