1 | /* ---------------------------------------------------------------------------- |
---|
2 | * This file was automatically generated by SWIG (http://www.swig.org). |
---|
3 | * Version 1.3.22 |
---|
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_TypePrettyName SWIG_Python_TypePrettyName |
---|
29 | #define SWIG_TypeQuery SWIG_Python_TypeQuery |
---|
30 | #define SWIG_TypeClientData SWIG_Python_TypeClientData |
---|
31 | #define SWIG_PackData SWIG_Python_PackData |
---|
32 | #define SWIG_UnpackData SWIG_Python_UnpackData |
---|
33 | |
---|
34 | |
---|
35 | /*********************************************************************** |
---|
36 | * common.swg |
---|
37 | * |
---|
38 | * This file contains generic SWIG runtime support for pointer |
---|
39 | * type checking as well as a few commonly used macros to control |
---|
40 | * external linkage. |
---|
41 | * |
---|
42 | * Author : David Beazley (beazley@cs.uchicago.edu) |
---|
43 | * |
---|
44 | * Copyright (c) 1999-2000, The University of Chicago |
---|
45 | * |
---|
46 | * This file may be freely redistributed without license or fee provided |
---|
47 | * this copyright message remains intact. |
---|
48 | ************************************************************************/ |
---|
49 | |
---|
50 | #include <string.h> |
---|
51 | |
---|
52 | #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) |
---|
53 | # if defined(_MSC_VER) || defined(__GNUC__) |
---|
54 | # if defined(STATIC_LINKED) |
---|
55 | # define SWIGEXPORT(a) a |
---|
56 | # define SWIGIMPORT(a) extern a |
---|
57 | # else |
---|
58 | # define SWIGEXPORT(a) __declspec(dllexport) a |
---|
59 | # define SWIGIMPORT(a) extern a |
---|
60 | # endif |
---|
61 | # else |
---|
62 | # if defined(__BORLANDC__) |
---|
63 | # define SWIGEXPORT(a) a _export |
---|
64 | # define SWIGIMPORT(a) a _export |
---|
65 | # else |
---|
66 | # define SWIGEXPORT(a) a |
---|
67 | # define SWIGIMPORT(a) a |
---|
68 | # endif |
---|
69 | # endif |
---|
70 | #else |
---|
71 | # define SWIGEXPORT(a) a |
---|
72 | # define SWIGIMPORT(a) a |
---|
73 | #endif |
---|
74 | |
---|
75 | #ifdef SWIG_GLOBAL |
---|
76 | # define SWIGRUNTIME(a) SWIGEXPORT(a) |
---|
77 | #else |
---|
78 | # define SWIGRUNTIME(a) static a |
---|
79 | #endif |
---|
80 | |
---|
81 | #ifdef __cplusplus |
---|
82 | extern "C" { |
---|
83 | #endif |
---|
84 | |
---|
85 | typedef void *(*swig_converter_func)(void *); |
---|
86 | typedef struct swig_type_info *(*swig_dycast_func)(void **); |
---|
87 | |
---|
88 | typedef struct swig_type_info { |
---|
89 | const char *name; |
---|
90 | swig_converter_func converter; |
---|
91 | const char *str; |
---|
92 | void *clientdata; |
---|
93 | swig_dycast_func dcast; |
---|
94 | struct swig_type_info *next; |
---|
95 | struct swig_type_info *prev; |
---|
96 | } swig_type_info; |
---|
97 | |
---|
98 | #ifdef SWIG_NOINCLUDE |
---|
99 | |
---|
100 | SWIGIMPORT(swig_type_info *) SWIG_TypeRegister(swig_type_info *); |
---|
101 | SWIGIMPORT(swig_type_info *) SWIG_TypeCheck(char *c, swig_type_info *); |
---|
102 | SWIGIMPORT(void *) SWIG_TypeCast(swig_type_info *, void *); |
---|
103 | SWIGIMPORT(swig_type_info *) SWIG_TypeDynamicCast(swig_type_info *, void **); |
---|
104 | SWIGIMPORT(const char *) SWIG_TypeName(const swig_type_info *); |
---|
105 | SWIGIMPORT(const char *) SWIG_TypePrettyName(const swig_type_info *); |
---|
106 | SWIGIMPORT(swig_type_info *) SWIG_TypeQuery(const char *); |
---|
107 | SWIGIMPORT(void) SWIG_TypeClientData(swig_type_info *, void *); |
---|
108 | SWIGIMPORT(char *) SWIG_PackData(char *, void *, int); |
---|
109 | SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int); |
---|
110 | |
---|
111 | #else |
---|
112 | |
---|
113 | static swig_type_info *swig_type_list = 0; |
---|
114 | static swig_type_info **swig_type_list_handle = &swig_type_list; |
---|
115 | |
---|
116 | /* Register a type mapping with the type-checking */ |
---|
117 | SWIGRUNTIME(swig_type_info *) |
---|
118 | SWIG_TypeRegister(swig_type_info *ti) { |
---|
119 | swig_type_info *tc, *head, *ret, *next; |
---|
120 | /* Check to see if this type has already been registered */ |
---|
121 | tc = *swig_type_list_handle; |
---|
122 | while (tc) { |
---|
123 | if (strcmp(tc->name, ti->name) == 0) { |
---|
124 | /* Already exists in the table. Just add additional types to the list */ |
---|
125 | if (tc->clientdata) ti->clientdata = tc->clientdata; |
---|
126 | head = tc; |
---|
127 | next = tc->next; |
---|
128 | goto l1; |
---|
129 | } |
---|
130 | tc = tc->prev; |
---|
131 | } |
---|
132 | head = ti; |
---|
133 | next = 0; |
---|
134 | |
---|
135 | /* Place in list */ |
---|
136 | ti->prev = *swig_type_list_handle; |
---|
137 | *swig_type_list_handle = ti; |
---|
138 | |
---|
139 | /* Build linked lists */ |
---|
140 | l1: |
---|
141 | ret = head; |
---|
142 | tc = ti + 1; |
---|
143 | /* Patch up the rest of the links */ |
---|
144 | while (tc->name) { |
---|
145 | head->next = tc; |
---|
146 | tc->prev = head; |
---|
147 | head = tc; |
---|
148 | tc++; |
---|
149 | } |
---|
150 | if (next) next->prev = head; |
---|
151 | head->next = next; |
---|
152 | return ret; |
---|
153 | } |
---|
154 | |
---|
155 | /* Check the typename */ |
---|
156 | SWIGRUNTIME(swig_type_info *) |
---|
157 | SWIG_TypeCheck(char *c, swig_type_info *ty) { |
---|
158 | swig_type_info *s; |
---|
159 | if (!ty) return 0; /* Void pointer */ |
---|
160 | s = ty->next; /* First element always just a name */ |
---|
161 | do { |
---|
162 | if (strcmp(s->name,c) == 0) { |
---|
163 | if (s == ty->next) return s; |
---|
164 | /* Move s to the top of the linked list */ |
---|
165 | s->prev->next = s->next; |
---|
166 | if (s->next) { |
---|
167 | s->next->prev = s->prev; |
---|
168 | } |
---|
169 | /* Insert s as second element in the list */ |
---|
170 | s->next = ty->next; |
---|
171 | if (ty->next) ty->next->prev = s; |
---|
172 | ty->next = s; |
---|
173 | s->prev = ty; |
---|
174 | return s; |
---|
175 | } |
---|
176 | s = s->next; |
---|
177 | } while (s && (s != ty->next)); |
---|
178 | return 0; |
---|
179 | } |
---|
180 | |
---|
181 | /* Cast a pointer up an inheritance hierarchy */ |
---|
182 | SWIGRUNTIME(void *) |
---|
183 | SWIG_TypeCast(swig_type_info *ty, void *ptr) { |
---|
184 | if ((!ty) || (!ty->converter)) return ptr; |
---|
185 | return (*ty->converter)(ptr); |
---|
186 | } |
---|
187 | |
---|
188 | /* Dynamic pointer casting. Down an inheritance hierarchy */ |
---|
189 | SWIGRUNTIME(swig_type_info *) |
---|
190 | SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { |
---|
191 | swig_type_info *lastty = ty; |
---|
192 | if (!ty || !ty->dcast) return ty; |
---|
193 | while (ty && (ty->dcast)) { |
---|
194 | ty = (*ty->dcast)(ptr); |
---|
195 | if (ty) lastty = ty; |
---|
196 | } |
---|
197 | return lastty; |
---|
198 | } |
---|
199 | |
---|
200 | /* Return the name associated with this type */ |
---|
201 | SWIGRUNTIME(const char *) |
---|
202 | SWIG_TypeName(const swig_type_info *ty) { |
---|
203 | return ty->name; |
---|
204 | } |
---|
205 | |
---|
206 | /* Return the pretty name associated with this type, |
---|
207 | that is an unmangled type name in a form presentable to the user. |
---|
208 | */ |
---|
209 | SWIGRUNTIME(const char *) |
---|
210 | SWIG_TypePrettyName(const swig_type_info *type) { |
---|
211 | /* The "str" field contains the equivalent pretty names of the |
---|
212 | type, separated by vertical-bar characters. We choose |
---|
213 | to print the last name, as it is often (?) the most |
---|
214 | specific. */ |
---|
215 | if (type->str != NULL) { |
---|
216 | const char *last_name = type->str; |
---|
217 | const char *s; |
---|
218 | for (s = type->str; *s; s++) |
---|
219 | if (*s == '|') last_name = s+1; |
---|
220 | return last_name; |
---|
221 | } |
---|
222 | else |
---|
223 | return type->name; |
---|
224 | } |
---|
225 | |
---|
226 | /* |
---|
227 | Compare two type names skipping the space characters, therefore |
---|
228 | "char*" == "char *" and "Class<int>" == "Class<int >", etc. |
---|
229 | |
---|
230 | Return 0 when the two name types are equivalent, as in |
---|
231 | strncmp, but skipping ' '. |
---|
232 | */ |
---|
233 | static int |
---|
234 | SWIG_TypeNameComp(const char *f1, const char *l1, |
---|
235 | const char *f2, const char *l2) { |
---|
236 | for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { |
---|
237 | while ((*f1 == ' ') && (f1 != l1)) ++f1; |
---|
238 | while ((*f2 == ' ') && (f2 != l2)) ++f2; |
---|
239 | if (*f1 != *f2) return *f1 - *f2; |
---|
240 | } |
---|
241 | return (l1 - f1) - (l2 - f2); |
---|
242 | } |
---|
243 | |
---|
244 | /* |
---|
245 | Check type equivalence in a name list like <name1>|<name2>|... |
---|
246 | */ |
---|
247 | static int |
---|
248 | SWIG_TypeEquiv(const char *nb, const char *tb) { |
---|
249 | int equiv = 0; |
---|
250 | const char* te = tb + strlen(tb); |
---|
251 | const char* ne = nb; |
---|
252 | while (!equiv && *ne) { |
---|
253 | for (nb = ne; *ne; ++ne) { |
---|
254 | if (*ne == '|') break; |
---|
255 | } |
---|
256 | equiv = SWIG_TypeNameComp(nb, ne, tb, te) == 0; |
---|
257 | if (*ne) ++ne; |
---|
258 | } |
---|
259 | return equiv; |
---|
260 | } |
---|
261 | |
---|
262 | |
---|
263 | /* Search for a swig_type_info structure */ |
---|
264 | SWIGRUNTIME(swig_type_info *) |
---|
265 | SWIG_TypeQuery(const char *name) { |
---|
266 | swig_type_info *ty = *swig_type_list_handle; |
---|
267 | while (ty) { |
---|
268 | if (ty->str && (SWIG_TypeEquiv(ty->str,name))) return ty; |
---|
269 | if (ty->name && (strcmp(name,ty->name) == 0)) return ty; |
---|
270 | ty = ty->prev; |
---|
271 | } |
---|
272 | return 0; |
---|
273 | } |
---|
274 | |
---|
275 | /* Set the clientdata field for a type */ |
---|
276 | SWIGRUNTIME(void) |
---|
277 | SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { |
---|
278 | swig_type_info *tc, *equiv; |
---|
279 | if (ti->clientdata == clientdata) return; |
---|
280 | ti->clientdata = clientdata; |
---|
281 | equiv = ti->next; |
---|
282 | while (equiv) { |
---|
283 | if (!equiv->converter) { |
---|
284 | tc = *swig_type_list_handle; |
---|
285 | while (tc) { |
---|
286 | if ((strcmp(tc->name, equiv->name) == 0)) |
---|
287 | SWIG_TypeClientData(tc,clientdata); |
---|
288 | tc = tc->prev; |
---|
289 | } |
---|
290 | } |
---|
291 | equiv = equiv->next; |
---|
292 | } |
---|
293 | } |
---|
294 | |
---|
295 | /* Pack binary data into a string */ |
---|
296 | SWIGRUNTIME(char *) |
---|
297 | SWIG_PackData(char *c, void *ptr, int sz) { |
---|
298 | static char hex[17] = "0123456789abcdef"; |
---|
299 | unsigned char *u = (unsigned char *) ptr; |
---|
300 | const unsigned char *eu = u + sz; |
---|
301 | register unsigned char uu; |
---|
302 | for (; u != eu; ++u) { |
---|
303 | uu = *u; |
---|
304 | *(c++) = hex[(uu & 0xf0) >> 4]; |
---|
305 | *(c++) = hex[uu & 0xf]; |
---|
306 | } |
---|
307 | return c; |
---|
308 | } |
---|
309 | |
---|
310 | /* Unpack binary data from a string */ |
---|
311 | SWIGRUNTIME(char *) |
---|
312 | SWIG_UnpackData(char *c, void *ptr, int sz) { |
---|
313 | register unsigned char uu = 0; |
---|
314 | register int d; |
---|
315 | unsigned char *u = (unsigned char *) ptr; |
---|
316 | const unsigned char *eu = u + sz; |
---|
317 | for (; u != eu; ++u) { |
---|
318 | d = *(c++); |
---|
319 | if ((d >= '0') && (d <= '9')) |
---|
320 | uu = ((d - '0') << 4); |
---|
321 | else if ((d >= 'a') && (d <= 'f')) |
---|
322 | uu = ((d - ('a'-10)) << 4); |
---|
323 | d = *(c++); |
---|
324 | if ((d >= '0') && (d <= '9')) |
---|
325 | uu |= (d - '0'); |
---|
326 | else if ((d >= 'a') && (d <= 'f')) |
---|
327 | uu |= (d - ('a'-10)); |
---|
328 | *u = uu; |
---|
329 | } |
---|
330 | return c; |
---|
331 | } |
---|
332 | |
---|
333 | #endif |
---|
334 | |
---|
335 | #ifdef __cplusplus |
---|
336 | } |
---|
337 | #endif |
---|
338 | |
---|
339 | /*********************************************************************** |
---|
340 | * pyrun.swg |
---|
341 | * |
---|
342 | * This file contains the runtime support for Python modules |
---|
343 | * and includes code for managing global variables and pointer |
---|
344 | * type checking. |
---|
345 | * |
---|
346 | * Author : David Beazley (beazley@cs.uchicago.edu) |
---|
347 | ************************************************************************/ |
---|
348 | |
---|
349 | #ifdef __cplusplus |
---|
350 | extern "C" { |
---|
351 | #endif |
---|
352 | |
---|
353 | #define SWIG_PY_INT 1 |
---|
354 | #define SWIG_PY_FLOAT 2 |
---|
355 | #define SWIG_PY_STRING 3 |
---|
356 | #define SWIG_PY_POINTER 4 |
---|
357 | #define SWIG_PY_BINARY 5 |
---|
358 | |
---|
359 | /* Flags for pointer conversion */ |
---|
360 | |
---|
361 | #define SWIG_POINTER_EXCEPTION 0x1 |
---|
362 | #define SWIG_POINTER_DISOWN 0x2 |
---|
363 | |
---|
364 | /* Exception handling in wrappers */ |
---|
365 | #define SWIG_fail goto fail |
---|
366 | |
---|
367 | /* Constant information structure */ |
---|
368 | typedef struct swig_const_info { |
---|
369 | int type; |
---|
370 | char *name; |
---|
371 | long lvalue; |
---|
372 | double dvalue; |
---|
373 | void *pvalue; |
---|
374 | swig_type_info **ptype; |
---|
375 | } swig_const_info; |
---|
376 | |
---|
377 | /* Common SWIG API */ |
---|
378 | #define SWIG_ConvertPtr(obj, pp, type, flags) \ |
---|
379 | SWIG_Python_ConvertPtr(obj, pp, type, flags) |
---|
380 | #define SWIG_NewPointerObj(p, type, flags) \ |
---|
381 | SWIG_Python_NewPointerObj(p, type, flags) |
---|
382 | #define SWIG_MustGetPtr(p, type, argnum, flags) \ |
---|
383 | SWIG_Python_MustGetPtr(p, type, argnum, flags) |
---|
384 | |
---|
385 | /* Python-specific SWIG API */ |
---|
386 | #define SWIG_newvarlink() \ |
---|
387 | SWIG_Python_newvarlink() |
---|
388 | #define SWIG_addvarlink(p, name, get_attr, set_attr) \ |
---|
389 | SWIG_Python_addvarlink(p, name, get_attr, set_attr) |
---|
390 | #define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) \ |
---|
391 | SWIG_Python_ConvertPacked(obj, ptr, sz, ty, flags) |
---|
392 | #define SWIG_NewPackedObj(ptr, sz, type) \ |
---|
393 | SWIG_Python_NewPackedObj(ptr, sz, type) |
---|
394 | #define SWIG_InstallConstants(d, constants) \ |
---|
395 | SWIG_Python_InstallConstants(d, constants) |
---|
396 | |
---|
397 | typedef double (*py_objasdbl_conv)(PyObject *obj); |
---|
398 | |
---|
399 | #ifdef SWIG_NOINCLUDE |
---|
400 | |
---|
401 | SWIGIMPORT(int) SWIG_Python_ConvertPtr(PyObject *, void **, swig_type_info *, int); |
---|
402 | SWIGIMPORT(PyObject *) SWIG_Python_NewPointerObj(void *, swig_type_info *,int own); |
---|
403 | SWIGIMPORT(void *) SWIG_Python_MustGetPtr(PyObject *, swig_type_info *, int, int); |
---|
404 | SWIGIMPORT(PyObject *) SWIG_Python_newvarlink(void); |
---|
405 | SWIGIMPORT(void) SWIG_Python_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); |
---|
406 | SWIGIMPORT(int) SWIG_Python_ConvertPacked(PyObject *, void *, int sz, swig_type_info *, int); |
---|
407 | SWIGIMPORT(PyObject *) SWIG_Python_NewPackedObj(void *, int sz, swig_type_info *); |
---|
408 | SWIGIMPORT(void) SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]); |
---|
409 | |
---|
410 | |
---|
411 | #else |
---|
412 | |
---|
413 | |
---|
414 | /* ----------------------------------------------------------------------------- |
---|
415 | * global variable support code. |
---|
416 | * ----------------------------------------------------------------------------- */ |
---|
417 | |
---|
418 | typedef struct swig_globalvar { |
---|
419 | char *name; /* Name of global variable */ |
---|
420 | PyObject *(*get_attr)(void); /* Return the current value */ |
---|
421 | int (*set_attr)(PyObject *); /* Set the value */ |
---|
422 | struct swig_globalvar *next; |
---|
423 | } swig_globalvar; |
---|
424 | |
---|
425 | typedef struct swig_varlinkobject { |
---|
426 | PyObject_HEAD |
---|
427 | swig_globalvar *vars; |
---|
428 | } swig_varlinkobject; |
---|
429 | |
---|
430 | static PyObject * |
---|
431 | swig_varlink_repr(swig_varlinkobject *v) { |
---|
432 | v = v; |
---|
433 | return PyString_FromString("<Global variables>"); |
---|
434 | } |
---|
435 | |
---|
436 | static int |
---|
437 | swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) { |
---|
438 | swig_globalvar *var; |
---|
439 | flags = flags; |
---|
440 | fprintf(fp,"Global variables { "); |
---|
441 | for (var = v->vars; var; var=var->next) { |
---|
442 | fprintf(fp,"%s", var->name); |
---|
443 | if (var->next) fprintf(fp,", "); |
---|
444 | } |
---|
445 | fprintf(fp," }\n"); |
---|
446 | return 0; |
---|
447 | } |
---|
448 | |
---|
449 | static PyObject * |
---|
450 | swig_varlink_getattr(swig_varlinkobject *v, char *n) { |
---|
451 | swig_globalvar *var = v->vars; |
---|
452 | while (var) { |
---|
453 | if (strcmp(var->name,n) == 0) { |
---|
454 | return (*var->get_attr)(); |
---|
455 | } |
---|
456 | var = var->next; |
---|
457 | } |
---|
458 | PyErr_SetString(PyExc_NameError,"Unknown C global variable"); |
---|
459 | return NULL; |
---|
460 | } |
---|
461 | |
---|
462 | static int |
---|
463 | swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { |
---|
464 | swig_globalvar *var = v->vars; |
---|
465 | while (var) { |
---|
466 | if (strcmp(var->name,n) == 0) { |
---|
467 | return (*var->set_attr)(p); |
---|
468 | } |
---|
469 | var = var->next; |
---|
470 | } |
---|
471 | PyErr_SetString(PyExc_NameError,"Unknown C global variable"); |
---|
472 | return 1; |
---|
473 | } |
---|
474 | |
---|
475 | statichere PyTypeObject varlinktype = { |
---|
476 | PyObject_HEAD_INIT(0) |
---|
477 | 0, /* Number of items in variable part (ob_size) */ |
---|
478 | (char *)"swigvarlink", /* Type name (tp_name) */ |
---|
479 | sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */ |
---|
480 | 0, /* Itemsize (tp_itemsize) */ |
---|
481 | 0, /* Deallocator (tp_dealloc) */ |
---|
482 | (printfunc) swig_varlink_print, /* Print (tp_print) */ |
---|
483 | (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */ |
---|
484 | (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */ |
---|
485 | 0, /* tp_compare */ |
---|
486 | (reprfunc) swig_varlink_repr, /* tp_repr */ |
---|
487 | 0, /* tp_as_number */ |
---|
488 | 0, /* tp_as_sequence */ |
---|
489 | 0, /* tp_as_mapping */ |
---|
490 | 0, /* tp_hash */ |
---|
491 | 0, /* tp_call */ |
---|
492 | 0, /* tp_str */ |
---|
493 | 0, /* tp_getattro */ |
---|
494 | 0, /* tp_setattro */ |
---|
495 | 0, /* tp_as_buffer */ |
---|
496 | 0, /* tp_flags */ |
---|
497 | 0, /* tp_doc */ |
---|
498 | 0, /* tp_traverse */ |
---|
499 | 0, /* tp_clear */ |
---|
500 | 0, /* tp_richcompare */ |
---|
501 | 0, /* tp_weaklistoffset */ |
---|
502 | #if PY_VERSION_HEX >= 0x02020000 |
---|
503 | 0, /* tp_iter */ |
---|
504 | 0, /* tp_iternext */ |
---|
505 | 0, /* tp_methods */ |
---|
506 | 0, /* tp_members */ |
---|
507 | 0, /* tp_getset */ |
---|
508 | 0, /* tp_base */ |
---|
509 | 0, /* tp_dict */ |
---|
510 | 0, /* tp_descr_get */ |
---|
511 | 0, /* tp_descr_set */ |
---|
512 | 0, /* tp_dictoffset */ |
---|
513 | 0, /* tp_init */ |
---|
514 | 0, /* tp_alloc */ |
---|
515 | 0, /* tp_new */ |
---|
516 | 0, /* tp_free */ |
---|
517 | 0, /* tp_is_gc */ |
---|
518 | 0, /* tp_bases */ |
---|
519 | 0, /* tp_mro */ |
---|
520 | 0, /* tp_cache */ |
---|
521 | 0, /* tp_subclasses */ |
---|
522 | 0, /* tp_weaklist */ |
---|
523 | #endif |
---|
524 | #if PY_VERSION_HEX >= 0x02030200 |
---|
525 | 0, /* tp_del */ |
---|
526 | #endif |
---|
527 | #ifdef COUNT_ALLOCS |
---|
528 | /* these must be last */ |
---|
529 | 0, /* tp_alloc */ |
---|
530 | 0, /* tp_free */ |
---|
531 | 0, /* tp_maxalloc */ |
---|
532 | 0, /* tp_next */ |
---|
533 | #endif |
---|
534 | }; |
---|
535 | |
---|
536 | /* Create a variable linking object for use later */ |
---|
537 | SWIGRUNTIME(PyObject *) |
---|
538 | SWIG_Python_newvarlink(void) { |
---|
539 | swig_varlinkobject *result = 0; |
---|
540 | result = PyMem_NEW(swig_varlinkobject,1); |
---|
541 | varlinktype.ob_type = &PyType_Type; /* Patch varlinktype into a PyType */ |
---|
542 | result->ob_type = &varlinktype; |
---|
543 | result->vars = 0; |
---|
544 | result->ob_refcnt = 0; |
---|
545 | Py_XINCREF((PyObject *) result); |
---|
546 | return ((PyObject*) result); |
---|
547 | } |
---|
548 | |
---|
549 | SWIGRUNTIME(void) |
---|
550 | SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { |
---|
551 | swig_varlinkobject *v; |
---|
552 | swig_globalvar *gv; |
---|
553 | v= (swig_varlinkobject *) p; |
---|
554 | gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); |
---|
555 | gv->name = (char *) malloc(strlen(name)+1); |
---|
556 | strcpy(gv->name,name); |
---|
557 | gv->get_attr = get_attr; |
---|
558 | gv->set_attr = set_attr; |
---|
559 | gv->next = v->vars; |
---|
560 | v->vars = gv; |
---|
561 | } |
---|
562 | |
---|
563 | /* Convert a pointer value */ |
---|
564 | SWIGRUNTIME(int) |
---|
565 | SWIG_Python_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) { |
---|
566 | swig_type_info *tc; |
---|
567 | char *c = 0; |
---|
568 | static PyObject *SWIG_this = 0; |
---|
569 | int newref = 0; |
---|
570 | PyObject *pyobj = 0; |
---|
571 | |
---|
572 | if (!obj) return 0; |
---|
573 | if (obj == Py_None) { |
---|
574 | *ptr = 0; |
---|
575 | return 0; |
---|
576 | } |
---|
577 | #ifdef SWIG_COBJECT_TYPES |
---|
578 | if (!(PyCObject_Check(obj))) { |
---|
579 | if (!SWIG_this) |
---|
580 | SWIG_this = PyString_FromString("this"); |
---|
581 | pyobj = obj; |
---|
582 | obj = PyObject_GetAttr(obj,SWIG_this); |
---|
583 | newref = 1; |
---|
584 | if (!obj) goto type_error; |
---|
585 | if (!PyCObject_Check(obj)) { |
---|
586 | Py_DECREF(obj); |
---|
587 | goto type_error; |
---|
588 | } |
---|
589 | } |
---|
590 | *ptr = PyCObject_AsVoidPtr(obj); |
---|
591 | c = (char *) PyCObject_GetDesc(obj); |
---|
592 | if (newref) Py_DECREF(obj); |
---|
593 | goto cobject; |
---|
594 | #else |
---|
595 | if (!(PyString_Check(obj))) { |
---|
596 | if (!SWIG_this) |
---|
597 | SWIG_this = PyString_FromString("this"); |
---|
598 | pyobj = obj; |
---|
599 | obj = PyObject_GetAttr(obj,SWIG_this); |
---|
600 | newref = 1; |
---|
601 | if (!obj) goto type_error; |
---|
602 | if (!PyString_Check(obj)) { |
---|
603 | Py_DECREF(obj); |
---|
604 | goto type_error; |
---|
605 | } |
---|
606 | } |
---|
607 | c = PyString_AS_STRING(obj); |
---|
608 | /* Pointer values must start with leading underscore */ |
---|
609 | if (*c != '_') { |
---|
610 | *ptr = (void *) 0; |
---|
611 | if (strcmp(c,"NULL") == 0) { |
---|
612 | if (newref) { Py_DECREF(obj); } |
---|
613 | return 0; |
---|
614 | } else { |
---|
615 | if (newref) { Py_DECREF(obj); } |
---|
616 | goto type_error; |
---|
617 | } |
---|
618 | } |
---|
619 | c++; |
---|
620 | c = SWIG_UnpackData(c,ptr,sizeof(void *)); |
---|
621 | if (newref) { Py_DECREF(obj); } |
---|
622 | #endif |
---|
623 | |
---|
624 | #ifdef SWIG_COBJECT_TYPES |
---|
625 | cobject: |
---|
626 | #endif |
---|
627 | |
---|
628 | if (ty) { |
---|
629 | tc = SWIG_TypeCheck(c,ty); |
---|
630 | if (!tc) goto type_error; |
---|
631 | *ptr = SWIG_TypeCast(tc,(void*) *ptr); |
---|
632 | } |
---|
633 | |
---|
634 | if ((pyobj) && (flags & SWIG_POINTER_DISOWN)) { |
---|
635 | PyObject_SetAttrString(pyobj,(char*)"thisown",Py_False); |
---|
636 | } |
---|
637 | return 0; |
---|
638 | |
---|
639 | type_error: |
---|
640 | PyErr_Clear(); |
---|
641 | if (flags & SWIG_POINTER_EXCEPTION) { |
---|
642 | if (ty && c) { |
---|
643 | PyErr_Format(PyExc_TypeError, |
---|
644 | "Type error. Got %s, expected %s", |
---|
645 | c, ty->name); |
---|
646 | } else { |
---|
647 | PyErr_SetString(PyExc_TypeError,"Expected a pointer"); |
---|
648 | } |
---|
649 | } |
---|
650 | return -1; |
---|
651 | } |
---|
652 | |
---|
653 | /* Convert a pointer value, signal an exception on a type mismatch */ |
---|
654 | SWIGRUNTIME(void *) |
---|
655 | SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) { |
---|
656 | void *result; |
---|
657 | SWIG_Python_ConvertPtr(obj, &result, ty, flags | SWIG_POINTER_EXCEPTION); |
---|
658 | return result; |
---|
659 | } |
---|
660 | |
---|
661 | /* Convert a packed value value */ |
---|
662 | SWIGRUNTIME(int) |
---|
663 | SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, int sz, swig_type_info *ty, int flags) { |
---|
664 | swig_type_info *tc; |
---|
665 | char *c = 0; |
---|
666 | |
---|
667 | if ((!obj) || (!PyString_Check(obj))) goto type_error; |
---|
668 | c = PyString_AS_STRING(obj); |
---|
669 | /* Pointer values must start with leading underscore */ |
---|
670 | if (*c != '_') goto type_error; |
---|
671 | c++; |
---|
672 | c = SWIG_UnpackData(c,ptr,sz); |
---|
673 | if (ty) { |
---|
674 | tc = SWIG_TypeCheck(c,ty); |
---|
675 | if (!tc) goto type_error; |
---|
676 | } |
---|
677 | return 0; |
---|
678 | |
---|
679 | type_error: |
---|
680 | |
---|
681 | if (flags) { |
---|
682 | if (ty && c) { |
---|
683 | PyErr_Format(PyExc_TypeError, |
---|
684 | "Type error. Got %s, expected %s", |
---|
685 | c, ty->name); |
---|
686 | } else { |
---|
687 | PyErr_SetString(PyExc_TypeError,"Expected a pointer"); |
---|
688 | } |
---|
689 | } |
---|
690 | return -1; |
---|
691 | } |
---|
692 | |
---|
693 | /* Create a new pointer object */ |
---|
694 | SWIGRUNTIME(PyObject *) |
---|
695 | SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int own) { |
---|
696 | PyObject *robj; |
---|
697 | if (!ptr) { |
---|
698 | Py_INCREF(Py_None); |
---|
699 | return Py_None; |
---|
700 | } |
---|
701 | #ifdef SWIG_COBJECT_TYPES |
---|
702 | robj = PyCObject_FromVoidPtrAndDesc((void *) ptr, (char *) type->name, NULL); |
---|
703 | #else |
---|
704 | { |
---|
705 | char result[1024]; |
---|
706 | char *r = result; |
---|
707 | *(r++) = '_'; |
---|
708 | r = SWIG_PackData(r,&ptr,sizeof(void *)); |
---|
709 | strcpy(r,type->name); |
---|
710 | robj = PyString_FromString(result); |
---|
711 | } |
---|
712 | #endif |
---|
713 | if (!robj || (robj == Py_None)) return robj; |
---|
714 | if (type->clientdata) { |
---|
715 | PyObject *inst; |
---|
716 | PyObject *args = Py_BuildValue((char*)"(O)", robj); |
---|
717 | Py_DECREF(robj); |
---|
718 | inst = PyObject_CallObject((PyObject *) type->clientdata, args); |
---|
719 | Py_DECREF(args); |
---|
720 | if (inst) { |
---|
721 | if (own) { |
---|
722 | PyObject_SetAttrString(inst,(char*)"thisown",Py_True); |
---|
723 | } |
---|
724 | robj = inst; |
---|
725 | } |
---|
726 | } |
---|
727 | return robj; |
---|
728 | } |
---|
729 | |
---|
730 | SWIGRUNTIME(PyObject *) |
---|
731 | SWIG_Python_NewPackedObj(void *ptr, int sz, swig_type_info *type) { |
---|
732 | char result[1024]; |
---|
733 | char *r = result; |
---|
734 | if ((2*sz + 1 + strlen(type->name)) > 1000) return 0; |
---|
735 | *(r++) = '_'; |
---|
736 | r = SWIG_PackData(r,ptr,sz); |
---|
737 | strcpy(r,type->name); |
---|
738 | return PyString_FromString(result); |
---|
739 | } |
---|
740 | |
---|
741 | /* Install Constants */ |
---|
742 | SWIGRUNTIME(void) |
---|
743 | SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { |
---|
744 | int i; |
---|
745 | PyObject *obj; |
---|
746 | for (i = 0; constants[i].type; i++) { |
---|
747 | switch(constants[i].type) { |
---|
748 | case SWIG_PY_INT: |
---|
749 | obj = PyInt_FromLong(constants[i].lvalue); |
---|
750 | break; |
---|
751 | case SWIG_PY_FLOAT: |
---|
752 | obj = PyFloat_FromDouble(constants[i].dvalue); |
---|
753 | break; |
---|
754 | case SWIG_PY_STRING: |
---|
755 | if (constants[i].pvalue) { |
---|
756 | obj = PyString_FromString((char *) constants[i].pvalue); |
---|
757 | } else { |
---|
758 | Py_INCREF(Py_None); |
---|
759 | obj = Py_None; |
---|
760 | } |
---|
761 | break; |
---|
762 | case SWIG_PY_POINTER: |
---|
763 | obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); |
---|
764 | break; |
---|
765 | case SWIG_PY_BINARY: |
---|
766 | obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); |
---|
767 | break; |
---|
768 | default: |
---|
769 | obj = 0; |
---|
770 | break; |
---|
771 | } |
---|
772 | if (obj) { |
---|
773 | PyDict_SetItemString(d,constants[i].name,obj); |
---|
774 | Py_DECREF(obj); |
---|
775 | } |
---|
776 | } |
---|
777 | } |
---|
778 | |
---|
779 | #endif |
---|
780 | |
---|
781 | /* Contract support */ |
---|
782 | |
---|
783 | #define SWIG_contract_assert(expr, msg) if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg ); goto fail; } else |
---|
784 | |
---|
785 | #ifdef __cplusplus |
---|
786 | } |
---|
787 | #endif |
---|
788 | |
---|
789 | |
---|
790 | /* -------- TYPES TABLE (BEGIN) -------- */ |
---|
791 | |
---|
792 | #define SWIGTYPE_p_libtrace_t swig_types[0] |
---|
793 | #define SWIGTYPE_p_libtrace_udp swig_types[1] |
---|
794 | #define SWIGTYPE_p_libtrace_ip swig_types[2] |
---|
795 | #define SWIGTYPE_p_libtrace_icmp_un_echo swig_types[3] |
---|
796 | #define SWIGTYPE_p_libtrace_icmp_un swig_types[4] |
---|
797 | #define SWIGTYPE_p_uint64_t swig_types[5] |
---|
798 | #define SWIGTYPE_p_void swig_types[6] |
---|
799 | #define SWIGTYPE_p_libtrace_packet_t swig_types[7] |
---|
800 | #define SWIGTYPE_p_char swig_types[8] |
---|
801 | #define SWIGTYPE_p_libtrace_icmp_un_frag swig_types[9] |
---|
802 | #define SWIGTYPE_p_libtrace_filter_t swig_types[10] |
---|
803 | #define SWIGTYPE_p_timeval swig_types[11] |
---|
804 | #define SWIGTYPE_p_libtrace_icmp swig_types[12] |
---|
805 | #define SWIGTYPE_p_int8_t swig_types[13] |
---|
806 | #define SWIGTYPE_p_in_addr swig_types[14] |
---|
807 | #define SWIGTYPE_p_libtrace_tcp swig_types[15] |
---|
808 | #define SWIGTYPE_p_libtrace_linktype_t swig_types[16] |
---|
809 | static swig_type_info *swig_types[18]; |
---|
810 | |
---|
811 | /* -------- TYPES TABLE (END) -------- */ |
---|
812 | |
---|
813 | |
---|
814 | /*----------------------------------------------- |
---|
815 | @(target):= _libtrace.so |
---|
816 | ------------------------------------------------*/ |
---|
817 | #define SWIG_init init_libtrace |
---|
818 | |
---|
819 | #define SWIG_name "_libtrace" |
---|
820 | |
---|
821 | /* Auxiliar swig macros that appear in the header */ |
---|
822 | |
---|
823 | #define SWIG_OLDOBJ 1 |
---|
824 | #define SWIG_NEWOBJ SWIG_OLDOBJ + 1 |
---|
825 | #define SWIG_PYSTR SWIG_NEWOBJ + 1 |
---|
826 | |
---|
827 | #ifdef __cplusplus |
---|
828 | #define SWIGSTATICINLINE(a) static inline a |
---|
829 | #define SWIGSTATIC(a) static a |
---|
830 | #define swig_new_array(size,Type) (new Type[(size)]) |
---|
831 | #define swig_delete(cptr) delete cptr |
---|
832 | #define swig_delete_array(cptr) delete[] cptr |
---|
833 | #define swig_const_cast(a,Type) const_cast<Type >(a) |
---|
834 | #define swig_static_cast(a,Type) static_cast<Type >(a) |
---|
835 | #define swig_reinterpret_cast(a,Type) reinterpret_cast<Type >(a) |
---|
836 | #define swig_new_copy(ptr,Type) (new Type(*ptr)) |
---|
837 | #define swig_numeric_cast(a,Type) static_cast<Type >(a) |
---|
838 | |
---|
839 | #else /* C case */ |
---|
840 | |
---|
841 | #define SWIGSTATICINLINE(a) static a |
---|
842 | #define SWIGSTATIC(a) static a |
---|
843 | #define swig_new_array(size,Type) ((Type*) malloc((size)*sizeof(Type))) |
---|
844 | #define swig_delete(cptr) free((char*)cptr) |
---|
845 | #define swig_delete_array(cptr) free((char*)cptr) |
---|
846 | #define swig_const_cast(a,Type) (Type)(a) |
---|
847 | #define swig_static_cast(a,Type) (Type)(a) |
---|
848 | #define swig_reinterpret_cast(a,Type) (Type)(a) |
---|
849 | #define swig_numeric_cast(a,Type) (Type)(a) |
---|
850 | #define swig_new_copy(ptr,Type) ((Type*)memcpy(malloc(sizeof(Type)),ptr,sizeof(Type))) |
---|
851 | |
---|
852 | #endif /* __cplusplus */ |
---|
853 | |
---|
854 | |
---|
855 | /*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/ |
---|
856 | #define SWIG_From_signed_SS_char PyInt_FromLong |
---|
857 | /*@@*/ |
---|
858 | /*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/ |
---|
859 | #define SWIG_From_unsigned_SS_char PyInt_FromLong |
---|
860 | /*@@*/ |
---|
861 | /*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/ |
---|
862 | #define SWIG_From_short PyInt_FromLong |
---|
863 | /*@@*/ |
---|
864 | /*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/ |
---|
865 | #define SWIG_From_unsigned_SS_short PyInt_FromLong |
---|
866 | /*@@*/ |
---|
867 | /*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/ |
---|
868 | #define SWIG_From_int PyInt_FromLong |
---|
869 | /*@@*/ |
---|
870 | /*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/ |
---|
871 | #define SWIG_From_long PyInt_FromLong |
---|
872 | /*@@*/ |
---|
873 | /*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/ |
---|
874 | #define SWIG_From_float PyFloat_FromDouble |
---|
875 | /*@@*/ |
---|
876 | /*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/ |
---|
877 | #define SWIG_From_double PyFloat_FromDouble |
---|
878 | /*@@*/ |
---|
879 | |
---|
880 | |
---|
881 | #include <arpa/inet.h> |
---|
882 | #include "libtrace.h" |
---|
883 | |
---|
884 | |
---|
885 | #include <stdlib.h> |
---|
886 | |
---|
887 | |
---|
888 | #include <limits.h> |
---|
889 | |
---|
890 | |
---|
891 | SWIGSTATICINLINE(int) |
---|
892 | SWIG_CheckLongInRange(long value, long min_value, long max_value, |
---|
893 | const char *errmsg) |
---|
894 | { |
---|
895 | if (value < min_value) { |
---|
896 | if (errmsg) { |
---|
897 | PyErr_Format(PyExc_OverflowError, |
---|
898 | "value %ld is less than '%s' minimum %ld", |
---|
899 | value, errmsg, min_value); |
---|
900 | } |
---|
901 | return 0; |
---|
902 | } else if (value > max_value) { |
---|
903 | if (errmsg) { |
---|
904 | PyErr_Format(PyExc_OverflowError, |
---|
905 | "value %ld is greater than '%s' maximum %ld", |
---|
906 | value, errmsg, max_value); |
---|
907 | } |
---|
908 | return 0; |
---|
909 | } |
---|
910 | return 1; |
---|
911 | } |
---|
912 | |
---|
913 | |
---|
914 | SWIGSTATICINLINE(int) |
---|
915 | SWIG_AsVal_long(PyObject * obj, long* val) |
---|
916 | { |
---|
917 | if (PyInt_Check(obj)) { |
---|
918 | if (val) *val = PyInt_AS_LONG(obj); |
---|
919 | return 1; |
---|
920 | } |
---|
921 | if (PyLong_Check(obj)) { |
---|
922 | long v = PyLong_AsLong(obj); |
---|
923 | if (!PyErr_Occurred()) { |
---|
924 | if (val) *val = v; |
---|
925 | return 1; |
---|
926 | } else { |
---|
927 | if (!val) PyErr_Clear(); |
---|
928 | return 0; |
---|
929 | } |
---|
930 | } |
---|
931 | if (val) { |
---|
932 | PyErr_SetString(PyExc_TypeError, "a long is expected"); |
---|
933 | } |
---|
934 | return 0; |
---|
935 | } |
---|
936 | |
---|
937 | |
---|
938 | #if INT_MAX != LONG_MAX |
---|
939 | SWIGSTATICINLINE(int) |
---|
940 | SWIG_AsVal_int(PyObject *obj, int *val) |
---|
941 | { |
---|
942 | const char* errmsg = val ? "int" : 0; |
---|
943 | long v; |
---|
944 | if (SWIG_AsVal_long(obj, &v)) { |
---|
945 | if (SWIG_CheckLongInRange(v, INT_MIN,INT_MAX, errmsg)) { |
---|
946 | if (val) *val = swig_numeric_cast(v, int); |
---|
947 | return 1; |
---|
948 | } else { |
---|
949 | return 0; |
---|
950 | } |
---|
951 | } else { |
---|
952 | PyErr_Clear(); |
---|
953 | } |
---|
954 | if (val) { |
---|
955 | PyErr_SetString(PyExc_TypeError, "an int is expected"); |
---|
956 | } |
---|
957 | return 0; |
---|
958 | } |
---|
959 | #else |
---|
960 | SWIGSTATICINLINE(int) |
---|
961 | SWIG_AsVal_int(PyObject *obj, int *val) |
---|
962 | { |
---|
963 | return SWIG_AsVal_long(obj,(long*)val); |
---|
964 | } |
---|
965 | #endif |
---|
966 | |
---|
967 | |
---|
968 | SWIGSTATICINLINE(int) |
---|
969 | SWIG_As_int(PyObject* obj) |
---|
970 | { |
---|
971 | int v; |
---|
972 | if (!SWIG_AsVal_int(obj, &v)) { |
---|
973 | /* |
---|
974 | this is needed to make valgrind/purify happier. the other |
---|
975 | solution is throw an exception, but since this code should work |
---|
976 | with plain C .... |
---|
977 | */ |
---|
978 | memset((void*)&v, 0, sizeof(int)); |
---|
979 | } |
---|
980 | return v; |
---|
981 | } |
---|
982 | |
---|
983 | |
---|
984 | SWIGSTATICINLINE(int) |
---|
985 | SWIG_Check_int(PyObject* obj) |
---|
986 | { |
---|
987 | return SWIG_AsVal_int(obj, (int*)0); |
---|
988 | } |
---|
989 | |
---|
990 | |
---|
991 | SWIGSTATICINLINE(int) |
---|
992 | SWIG_CheckUnsignedLongInRange(unsigned long value, |
---|
993 | unsigned long max_value, |
---|
994 | const char *errmsg) |
---|
995 | { |
---|
996 | if (value > max_value) { |
---|
997 | if (errmsg) { |
---|
998 | PyErr_Format(PyExc_OverflowError, |
---|
999 | "value %ld is greater than '%s' minimum %ld", |
---|
1000 | value, errmsg, max_value); |
---|
1001 | } |
---|
1002 | return 0; |
---|
1003 | } |
---|
1004 | return 1; |
---|
1005 | } |
---|
1006 | |
---|
1007 | |
---|
1008 | SWIGSTATICINLINE(int) |
---|
1009 | SWIG_AsVal_unsigned_SS_long(PyObject * obj, unsigned long *val) |
---|
1010 | { |
---|
1011 | if (PyInt_Check(obj)) { |
---|
1012 | long v = PyInt_AS_LONG(obj); |
---|
1013 | if (v >= 0) { |
---|
1014 | if (val) *val = v; |
---|
1015 | return 1; |
---|
1016 | } |
---|
1017 | } |
---|
1018 | if (PyLong_Check(obj)) { |
---|
1019 | unsigned long v = PyLong_AsUnsignedLong(obj); |
---|
1020 | if (!PyErr_Occurred()) { |
---|
1021 | if (val) *val = v; |
---|
1022 | return 1; |
---|
1023 | } else { |
---|
1024 | if (!val) PyErr_Clear(); |
---|
1025 | return 0; |
---|
1026 | } |
---|
1027 | } |
---|
1028 | if (val) { |
---|
1029 | PyErr_SetString(PyExc_TypeError, "an unsigned long is expected"); |
---|
1030 | } |
---|
1031 | return 0; |
---|
1032 | } |
---|
1033 | |
---|
1034 | |
---|
1035 | #if UINT_MAX != ULONG_MAX |
---|
1036 | SWIGSTATICINLINE(int) |
---|
1037 | SWIG_AsVal_unsigned_SS_int(PyObject *obj, unsigned int *val) |
---|
1038 | { |
---|
1039 | const char* errmsg = val ? "unsigned int" : 0; |
---|
1040 | unsigned long v; |
---|
1041 | if (SWIG_AsVal_unsigned_SS_long(obj, &v)) { |
---|
1042 | if (SWIG_CheckUnsignedLongInRange(v, INT_MAX, errmsg)) { |
---|
1043 | if (val) *val = swig_numeric_cast(v, unsigned int); |
---|
1044 | return 1; |
---|
1045 | } |
---|
1046 | } else { |
---|
1047 | PyErr_Clear(); |
---|
1048 | } |
---|
1049 | if (val) { |
---|
1050 | PyErr_SetString(PyExc_TypeError, "an unsigned int is expected"); |
---|
1051 | } |
---|
1052 | return 0; |
---|
1053 | } |
---|
1054 | #else |
---|
1055 | SWIGSTATICINLINE(unsigned int) |
---|
1056 | SWIG_AsVal_unsigned_SS_int(PyObject *obj, unsigned int *val) |
---|
1057 | { |
---|
1058 | return SWIG_AsVal_unsigned_SS_long(obj,(unsigned long *)val); |
---|
1059 | } |
---|
1060 | #endif |
---|
1061 | |
---|
1062 | |
---|
1063 | SWIGSTATICINLINE(unsigned int) |
---|
1064 | SWIG_As_unsigned_SS_int(PyObject* obj) |
---|
1065 | { |
---|
1066 | unsigned int v; |
---|
1067 | if (!SWIG_AsVal_unsigned_SS_int(obj, &v)) { |
---|
1068 | /* |
---|
1069 | this is needed to make valgrind/purify happier. the other |
---|
1070 | solution is throw an exception, but since this code should work |
---|
1071 | with plain C .... |
---|
1072 | */ |
---|
1073 | memset((void*)&v, 0, sizeof(unsigned int)); |
---|
1074 | } |
---|
1075 | return v; |
---|
1076 | } |
---|
1077 | |
---|
1078 | |
---|
1079 | SWIGSTATICINLINE(int) |
---|
1080 | SWIG_Check_unsigned_SS_int(PyObject* obj) |
---|
1081 | { |
---|
1082 | return SWIG_AsVal_unsigned_SS_int(obj, (unsigned int*)0); |
---|
1083 | } |
---|
1084 | |
---|
1085 | |
---|
1086 | SWIGSTATICINLINE(PyObject* ) |
---|
1087 | SWIG_From_unsigned_SS_long(unsigned long value) |
---|
1088 | { |
---|
1089 | return (value > LONG_MAX) ? |
---|
1090 | PyLong_FromUnsignedLong(value) |
---|
1091 | : PyInt_FromLong(swig_numeric_cast(value,long)); |
---|
1092 | } |
---|
1093 | |
---|
1094 | |
---|
1095 | #if UINT_MAX < LONG_MAX |
---|
1096 | /*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/ |
---|
1097 | #define SWIG_From_unsigned_SS_int SWIG_From_long |
---|
1098 | /*@@*/ |
---|
1099 | #else |
---|
1100 | /*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/ |
---|
1101 | #define SWIG_From_unsigned_SS_int SWIG_From_unsigned_SS_long |
---|
1102 | /*@@*/ |
---|
1103 | #endif |
---|
1104 | |
---|
1105 | |
---|
1106 | SWIGSTATICINLINE(int) |
---|
1107 | SWIG_AsVal_unsigned_SS_char(PyObject *obj, unsigned char *val) |
---|
1108 | { |
---|
1109 | const char* errmsg = val ? "unsigned char" : 0; |
---|
1110 | unsigned long v; |
---|
1111 | if (SWIG_AsVal_unsigned_SS_long(obj, &v)) { |
---|
1112 | if (SWIG_CheckUnsignedLongInRange(v, UCHAR_MAX,errmsg)) { |
---|
1113 | if (val) *val = swig_numeric_cast(v, unsigned char); |
---|
1114 | return 1; |
---|
1115 | } else { |
---|
1116 | return 0; |
---|
1117 | } |
---|
1118 | } else { |
---|
1119 | PyErr_Clear(); |
---|
1120 | } |
---|
1121 | if (val) { |
---|
1122 | PyErr_SetString(PyExc_TypeError, "an unsigned char is expected"); |
---|
1123 | } |
---|
1124 | return 0; |
---|
1125 | } |
---|
1126 | |
---|
1127 | |
---|
1128 | SWIGSTATICINLINE(unsigned char) |
---|
1129 | SWIG_As_unsigned_SS_char(PyObject* obj) |
---|
1130 | { |
---|
1131 | unsigned char v; |
---|
1132 | if (!SWIG_AsVal_unsigned_SS_char(obj, &v)) { |
---|
1133 | /* |
---|
1134 | this is needed to make valgrind/purify happier. the other |
---|
1135 | solution is throw an exception, but since this code should work |
---|
1136 | with plain C .... |
---|
1137 | */ |
---|
1138 | memset((void*)&v, 0, sizeof(unsigned char)); |
---|
1139 | } |
---|
1140 | return v; |
---|
1141 | } |
---|
1142 | |
---|
1143 | |
---|
1144 | SWIGSTATICINLINE(int) |
---|
1145 | SWIG_Check_unsigned_SS_char(PyObject* obj) |
---|
1146 | { |
---|
1147 | return SWIG_AsVal_unsigned_SS_char(obj, (unsigned char*)0); |
---|
1148 | } |
---|
1149 | |
---|
1150 | |
---|
1151 | SWIGSTATICINLINE(PyObject *) |
---|
1152 | SWIG_FromCharPtr(const char* cptr) |
---|
1153 | { |
---|
1154 | if (cptr) { |
---|
1155 | size_t size = strlen(cptr); |
---|
1156 | if (size > INT_MAX) { |
---|
1157 | return SWIG_NewPointerObj(swig_const_cast(cptr,char*), |
---|
1158 | SWIG_TypeQuery("char *"), 0); |
---|
1159 | } else { |
---|
1160 | if (size != 0) { |
---|
1161 | return PyString_FromStringAndSize(cptr, size); |
---|
1162 | } else { |
---|
1163 | return PyString_FromString(cptr); |
---|
1164 | } |
---|
1165 | } |
---|
1166 | } |
---|
1167 | Py_INCREF(Py_None); |
---|
1168 | return Py_None; |
---|
1169 | } |
---|
1170 | |
---|
1171 | |
---|
1172 | #define MAKE_NTOHS(class,member) \ |
---|
1173 | uint16_t class ## _ ## member ## _get (struct class *self) { \ |
---|
1174 | return ntohs(self->member); \ |
---|
1175 | } |
---|
1176 | |
---|
1177 | #define MAKE_NTOHL(class,member) \ |
---|
1178 | uint32_t class ## _ ## member ## _get (struct class *self) { \ |
---|
1179 | return ntohl(self->member); \ |
---|
1180 | } |
---|
1181 | |
---|
1182 | MAKE_NTOHS(libtrace_ip,ip_sum); |
---|
1183 | MAKE_NTOHS(libtrace_ip,ip_len); |
---|
1184 | MAKE_NTOHS(libtrace_ip,ip_id); |
---|
1185 | MAKE_NTOHS(libtrace_ip,ip_off); |
---|
1186 | char *libtrace_ip_ip_src_get(struct libtrace_ip *self) { |
---|
1187 | return strdup(inet_ntoa(self->ip_src)); |
---|
1188 | } |
---|
1189 | char *libtrace_ip_ip_dst_get(struct libtrace_ip *self) { |
---|
1190 | return strdup(inet_ntoa(self->ip_dst)); |
---|
1191 | } |
---|
1192 | |
---|
1193 | |
---|
1194 | SWIGSTATICINLINE(int) |
---|
1195 | SWIG_AsVal_unsigned_SS_short(PyObject *obj, unsigned short *val) |
---|
1196 | { |
---|
1197 | const char* errmsg = val ? "unsigned short" : 0; |
---|
1198 | unsigned long v; |
---|
1199 | if (SWIG_AsVal_unsigned_SS_long(obj, &v)) { |
---|
1200 | if (SWIG_CheckUnsignedLongInRange(v, USHRT_MAX, errmsg)) { |
---|
1201 | if (val) *val = swig_numeric_cast(v, unsigned short); |
---|
1202 | return 1; |
---|
1203 | } else { |
---|
1204 | return 0; |
---|
1205 | } |
---|
1206 | } else { |
---|
1207 | PyErr_Clear(); |
---|
1208 | } |
---|
1209 | if (val) { |
---|
1210 | PyErr_SetString(PyExc_TypeError, "an unsigned short is expected"); |
---|
1211 | } |
---|
1212 | return 0; |
---|
1213 | } |
---|
1214 | |
---|
1215 | |
---|
1216 | SWIGSTATICINLINE(unsigned short) |
---|
1217 | SWIG_As_unsigned_SS_short(PyObject* obj) |
---|
1218 | { |
---|
1219 | unsigned short v; |
---|
1220 | if (!SWIG_AsVal_unsigned_SS_short(obj, &v)) { |
---|
1221 | /* |
---|
1222 | this is needed to make valgrind/purify happier. the other |
---|
1223 | solution is throw an exception, but since this code should work |
---|
1224 | with plain C .... |
---|
1225 | */ |
---|
1226 | memset((void*)&v, 0, sizeof(unsigned short)); |
---|
1227 | } |
---|
1228 | return v; |
---|
1229 | } |
---|
1230 | |
---|
1231 | |
---|
1232 | SWIGSTATICINLINE(int) |
---|
1233 | SWIG_Check_unsigned_SS_short(PyObject* obj) |
---|
1234 | { |
---|
1235 | return SWIG_AsVal_unsigned_SS_short(obj, (unsigned short*)0); |
---|
1236 | } |
---|
1237 | |
---|
1238 | |
---|
1239 | MAKE_NTOHS(libtrace_tcp,source) |
---|
1240 | MAKE_NTOHS(libtrace_tcp,dest) |
---|
1241 | MAKE_NTOHS(libtrace_tcp,window) |
---|
1242 | MAKE_NTOHS(libtrace_tcp,check) |
---|
1243 | MAKE_NTOHS(libtrace_tcp,urg_ptr) |
---|
1244 | |
---|
1245 | MAKE_NTOHL(libtrace_tcp,seq) |
---|
1246 | MAKE_NTOHL(libtrace_tcp,ack_seq) |
---|
1247 | |
---|
1248 | |
---|
1249 | MAKE_NTOHS(libtrace_udp,source) |
---|
1250 | MAKE_NTOHS(libtrace_udp,dest) |
---|
1251 | MAKE_NTOHS(libtrace_udp,len) |
---|
1252 | MAKE_NTOHS(libtrace_udp,check) |
---|
1253 | |
---|
1254 | |
---|
1255 | typedef union { |
---|
1256 | struct { |
---|
1257 | uint16_t id; |
---|
1258 | uint16_t sequence; |
---|
1259 | } echo; /* echo datagram */ |
---|
1260 | uint32_t gateway; /* gateway address */ |
---|
1261 | struct { |
---|
1262 | uint16_t __unused; |
---|
1263 | uint16_t mtu; |
---|
1264 | } frag; /* path mtu discovery */ |
---|
1265 | } libtrace_icmp_un; |
---|
1266 | |
---|
1267 | |
---|
1268 | |
---|
1269 | typedef struct { |
---|
1270 | uint16_t __unused; |
---|
1271 | uint16_t mtu; |
---|
1272 | } libtrace_icmp_un_frag; |
---|
1273 | |
---|
1274 | |
---|
1275 | |
---|
1276 | typedef struct { |
---|
1277 | uint16_t id; |
---|
1278 | uint16_t sequence; |
---|
1279 | } libtrace_icmp_un_echo; |
---|
1280 | |
---|
1281 | |
---|
1282 | struct libtrace_packet_t *new_libtrace_packet_t(){ |
---|
1283 | struct libtrace_packet_t *packet = malloc(sizeof(struct libtrace_packet_t)); |
---|
1284 | return packet; |
---|
1285 | } |
---|
1286 | void delete_libtrace_packet_t(struct libtrace_packet_t *self){ free(self);} |
---|
1287 | struct libtrace_ip *libtrace_packet_t_trace_get_ip(struct libtrace_packet_t *self){ |
---|
1288 | return trace_get_ip(self); |
---|
1289 | } |
---|
1290 | struct libtrace_tcp *libtrace_packet_t_trace_get_tcp(struct libtrace_packet_t *self){ |
---|
1291 | return trace_get_tcp(self); |
---|
1292 | } |
---|
1293 | struct libtrace_udp *libtrace_packet_t_trace_get_udp(struct libtrace_packet_t *self){ |
---|
1294 | return trace_get_udp(self); |
---|
1295 | } |
---|
1296 | struct libtrace_icmp *libtrace_packet_t_trace_get_icmp(struct libtrace_packet_t *self){ |
---|
1297 | return trace_get_icmp(self); |
---|
1298 | } |
---|
1299 | void *libtrace_packet_t_trace_get_link(struct libtrace_packet_t *self){ |
---|
1300 | return trace_get_link(self); |
---|
1301 | } |
---|
1302 | double libtrace_packet_t_trace_get_seconds(struct libtrace_packet_t *self){ |
---|
1303 | return trace_get_seconds(self); |
---|
1304 | } |
---|
1305 | uint64_t libtrace_packet_t_trace_get_erf_timestamp(struct libtrace_packet_t *self){ |
---|
1306 | return trace_get_erf_timestamp(self); |
---|
1307 | } |
---|
1308 | struct timeval libtrace_packet_t_trace_get_timeval(struct libtrace_packet_t *self){ |
---|
1309 | return trace_get_timeval(self); |
---|
1310 | } |
---|
1311 | int libtrace_packet_t_trace_get_capture_length(struct libtrace_packet_t *self){ |
---|
1312 | return trace_get_capture_length(self); |
---|
1313 | } |
---|
1314 | int libtrace_packet_t_trace_get_wire_lenth(struct libtrace_packet_t *self){ |
---|
1315 | return trace_get_wire_length(self); |
---|
1316 | } |
---|
1317 | libtrace_linktype_t libtrace_packet_t_trace_get_link_type(struct libtrace_packet_t *self){ |
---|
1318 | return trace_get_link_type(self); |
---|
1319 | } |
---|
1320 | int8_t libtrace_packet_t_trace_get_direction(struct libtrace_packet_t *self){ |
---|
1321 | return trace_get_direction(self); |
---|
1322 | } |
---|
1323 | int8_t libtrace_packet_t_trace_set_direction(struct libtrace_packet_t *self,int8_t direction){ |
---|
1324 | return trace_set_direction(self,direction); |
---|
1325 | } |
---|
1326 | int libtrace_packet_t_trace_bpf_filter(struct libtrace_packet_t *self,struct libtrace_filter_t *filter){ |
---|
1327 | return trace_bpf_filter(filter,self); |
---|
1328 | } |
---|
1329 | uint8_t libtrace_packet_t_trace_get_server_port(struct libtrace_packet_t *self,uint8_t protocol,uint16_t source,uint16_t dest){ |
---|
1330 | return trace_get_server_port(protocol,source,dest); |
---|
1331 | } |
---|
1332 | |
---|
1333 | /* returns SWIG_OLDOBJ if the input is a raw char*, SWIG_PYSTR if is a PyString */ |
---|
1334 | SWIGSTATIC(int) |
---|
1335 | SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize) |
---|
1336 | { |
---|
1337 | static swig_type_info* pchar_info = 0; |
---|
1338 | char* vptr = 0; |
---|
1339 | if (!pchar_info) pchar_info = SWIG_TypeQuery("char *"); |
---|
1340 | if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_info, 0) != -1) { |
---|
1341 | if (cptr) *cptr = vptr; |
---|
1342 | if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0; |
---|
1343 | return SWIG_OLDOBJ; |
---|
1344 | } else { |
---|
1345 | if (PyString_Check(obj)) { |
---|
1346 | if (cptr) { |
---|
1347 | *cptr = PyString_AS_STRING(obj); |
---|
1348 | if (psize) { |
---|
1349 | *psize = PyString_GET_SIZE(obj) + 1; |
---|
1350 | } |
---|
1351 | } |
---|
1352 | return SWIG_PYSTR; |
---|
1353 | } |
---|
1354 | } |
---|
1355 | if (cptr) { |
---|
1356 | PyErr_SetString(PyExc_TypeError, "a string is expected"); |
---|
1357 | } |
---|
1358 | return 0; |
---|
1359 | } |
---|
1360 | |
---|
1361 | |
---|
1362 | SWIGSTATICINLINE(int) |
---|
1363 | SWIG_AsCharPtr(PyObject *obj, char **val) |
---|
1364 | { |
---|
1365 | char* cptr = 0; |
---|
1366 | if (SWIG_AsCharPtrAndSize(obj, &cptr, (size_t*)(0))) { |
---|
1367 | if (val) *val = cptr; |
---|
1368 | return 1; |
---|
1369 | } |
---|
1370 | if (val) { |
---|
1371 | PyErr_SetString(PyExc_TypeError, "a char* is expected"); |
---|
1372 | } |
---|
1373 | return 0; |
---|
1374 | } |
---|
1375 | |
---|
1376 | struct libtrace_filter_t *new_libtrace_filter_t(char *filterstring){ |
---|
1377 | return trace_bpf_setfilter(filterstring); |
---|
1378 | } |
---|
1379 | int libtrace_filter_t_trace_bpf_filter(struct libtrace_filter_t *self,struct libtrace_packet_t *packet){ |
---|
1380 | return trace_bpf_filter(self,packet); |
---|
1381 | } |
---|
1382 | struct libtrace_t *new_libtrace_t(char *uri){ return trace_create(uri); } |
---|
1383 | void delete_libtrace_t(struct libtrace_t *self){ trace_destroy(self); } |
---|
1384 | int libtrace_t_trace_read_packet(struct libtrace_t *self,struct libtrace_packet_t *packet){ |
---|
1385 | return trace_read_packet(self,packet); |
---|
1386 | } |
---|
1387 | #ifdef __cplusplus |
---|
1388 | extern "C" { |
---|
1389 | #endif |
---|
1390 | static PyObject *_wrap_in_addr_s_addr_set(PyObject *self, PyObject *args) { |
---|
1391 | PyObject *resultobj; |
---|
1392 | struct in_addr *arg1 = (struct in_addr *) 0 ; |
---|
1393 | int arg2 ; |
---|
1394 | PyObject * obj0 = 0 ; |
---|
1395 | PyObject * obj1 = 0 ; |
---|
1396 | |
---|
1397 | if(!PyArg_ParseTuple(args,(char *)"OO:in_addr_s_addr_set",&obj0,&obj1)) goto fail; |
---|
1398 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_in_addr, |
---|
1399 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1400 | arg2 = (int)SWIG_As_int(obj1); |
---|
1401 | if (PyErr_Occurred()) SWIG_fail; |
---|
1402 | if (arg1) (arg1)->s_addr = arg2; |
---|
1403 | |
---|
1404 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1405 | return resultobj; |
---|
1406 | fail: |
---|
1407 | return NULL; |
---|
1408 | } |
---|
1409 | |
---|
1410 | |
---|
1411 | static PyObject *_wrap_in_addr_s_addr_get(PyObject *self, PyObject *args) { |
---|
1412 | PyObject *resultobj; |
---|
1413 | struct in_addr *arg1 = (struct in_addr *) 0 ; |
---|
1414 | int result; |
---|
1415 | PyObject * obj0 = 0 ; |
---|
1416 | |
---|
1417 | if(!PyArg_ParseTuple(args,(char *)"O:in_addr_s_addr_get",&obj0)) goto fail; |
---|
1418 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_in_addr, |
---|
1419 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1420 | result = (int) ((arg1)->s_addr); |
---|
1421 | |
---|
1422 | resultobj = SWIG_From_int((int)result); |
---|
1423 | return resultobj; |
---|
1424 | fail: |
---|
1425 | return NULL; |
---|
1426 | } |
---|
1427 | |
---|
1428 | |
---|
1429 | static PyObject * in_addr_swigregister(PyObject *self, PyObject *args) { |
---|
1430 | PyObject *obj; |
---|
1431 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
1432 | SWIG_TypeClientData(SWIGTYPE_p_in_addr, obj); |
---|
1433 | Py_INCREF(obj); |
---|
1434 | return Py_BuildValue((char *)""); |
---|
1435 | } |
---|
1436 | static PyObject *_wrap_libtrace_ip_ip_hl_set(PyObject *self, PyObject *args) { |
---|
1437 | PyObject *resultobj; |
---|
1438 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1439 | unsigned int arg2 ; |
---|
1440 | PyObject * obj0 = 0 ; |
---|
1441 | PyObject * obj1 = 0 ; |
---|
1442 | |
---|
1443 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_ip_ip_hl_set",&obj0,&obj1)) goto fail; |
---|
1444 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip, |
---|
1445 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1446 | arg2 = (unsigned int)SWIG_As_unsigned_SS_int(obj1); |
---|
1447 | if (PyErr_Occurred()) SWIG_fail; |
---|
1448 | if (arg1) (arg1)->ip_hl = arg2; |
---|
1449 | |
---|
1450 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1451 | return resultobj; |
---|
1452 | fail: |
---|
1453 | return NULL; |
---|
1454 | } |
---|
1455 | |
---|
1456 | |
---|
1457 | static PyObject *_wrap_libtrace_ip_ip_hl_get(PyObject *self, PyObject *args) { |
---|
1458 | PyObject *resultobj; |
---|
1459 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1460 | unsigned int result; |
---|
1461 | PyObject * obj0 = 0 ; |
---|
1462 | |
---|
1463 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_hl_get",&obj0)) goto fail; |
---|
1464 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip, |
---|
1465 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1466 | result = (unsigned int) ((arg1)->ip_hl); |
---|
1467 | |
---|
1468 | resultobj = SWIG_From_unsigned_SS_int((unsigned int)result); |
---|
1469 | return resultobj; |
---|
1470 | fail: |
---|
1471 | return NULL; |
---|
1472 | } |
---|
1473 | |
---|
1474 | |
---|
1475 | static PyObject *_wrap_libtrace_ip_ip_v_set(PyObject *self, PyObject *args) { |
---|
1476 | PyObject *resultobj; |
---|
1477 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1478 | unsigned int arg2 ; |
---|
1479 | PyObject * obj0 = 0 ; |
---|
1480 | PyObject * obj1 = 0 ; |
---|
1481 | |
---|
1482 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_ip_ip_v_set",&obj0,&obj1)) goto fail; |
---|
1483 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip, |
---|
1484 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1485 | arg2 = (unsigned int)SWIG_As_unsigned_SS_int(obj1); |
---|
1486 | if (PyErr_Occurred()) SWIG_fail; |
---|
1487 | if (arg1) (arg1)->ip_v = arg2; |
---|
1488 | |
---|
1489 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1490 | return resultobj; |
---|
1491 | fail: |
---|
1492 | return NULL; |
---|
1493 | } |
---|
1494 | |
---|
1495 | |
---|
1496 | static PyObject *_wrap_libtrace_ip_ip_v_get(PyObject *self, PyObject *args) { |
---|
1497 | PyObject *resultobj; |
---|
1498 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1499 | unsigned int result; |
---|
1500 | PyObject * obj0 = 0 ; |
---|
1501 | |
---|
1502 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_v_get",&obj0)) goto fail; |
---|
1503 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip, |
---|
1504 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1505 | result = (unsigned int) ((arg1)->ip_v); |
---|
1506 | |
---|
1507 | resultobj = SWIG_From_unsigned_SS_int((unsigned int)result); |
---|
1508 | return resultobj; |
---|
1509 | fail: |
---|
1510 | return NULL; |
---|
1511 | } |
---|
1512 | |
---|
1513 | |
---|
1514 | static PyObject *_wrap_libtrace_ip_ip_tos_set(PyObject *self, PyObject *args) { |
---|
1515 | PyObject *resultobj; |
---|
1516 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1517 | uint8_t arg2 ; |
---|
1518 | PyObject * obj0 = 0 ; |
---|
1519 | PyObject * obj1 = 0 ; |
---|
1520 | |
---|
1521 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_ip_ip_tos_set",&obj0,&obj1)) goto fail; |
---|
1522 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip, |
---|
1523 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1524 | arg2 = (uint8_t)SWIG_As_unsigned_SS_char(obj1); |
---|
1525 | if (PyErr_Occurred()) SWIG_fail; |
---|
1526 | if (arg1) (arg1)->ip_tos = arg2; |
---|
1527 | |
---|
1528 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1529 | return resultobj; |
---|
1530 | fail: |
---|
1531 | return NULL; |
---|
1532 | } |
---|
1533 | |
---|
1534 | |
---|
1535 | static PyObject *_wrap_libtrace_ip_ip_tos_get(PyObject *self, PyObject *args) { |
---|
1536 | PyObject *resultobj; |
---|
1537 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1538 | uint8_t result; |
---|
1539 | PyObject * obj0 = 0 ; |
---|
1540 | |
---|
1541 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_tos_get",&obj0)) goto fail; |
---|
1542 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip, |
---|
1543 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1544 | result = (uint8_t) ((arg1)->ip_tos); |
---|
1545 | |
---|
1546 | resultobj = SWIG_From_unsigned_SS_char((unsigned char)result); |
---|
1547 | return resultobj; |
---|
1548 | fail: |
---|
1549 | return NULL; |
---|
1550 | } |
---|
1551 | |
---|
1552 | |
---|
1553 | static PyObject *_wrap_libtrace_ip_ip_ttl_set(PyObject *self, PyObject *args) { |
---|
1554 | PyObject *resultobj; |
---|
1555 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1556 | uint8_t arg2 ; |
---|
1557 | PyObject * obj0 = 0 ; |
---|
1558 | PyObject * obj1 = 0 ; |
---|
1559 | |
---|
1560 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_ip_ip_ttl_set",&obj0,&obj1)) goto fail; |
---|
1561 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip, |
---|
1562 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1563 | arg2 = (uint8_t)SWIG_As_unsigned_SS_char(obj1); |
---|
1564 | if (PyErr_Occurred()) SWIG_fail; |
---|
1565 | if (arg1) (arg1)->ip_ttl = arg2; |
---|
1566 | |
---|
1567 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1568 | return resultobj; |
---|
1569 | fail: |
---|
1570 | return NULL; |
---|
1571 | } |
---|
1572 | |
---|
1573 | |
---|
1574 | static PyObject *_wrap_libtrace_ip_ip_ttl_get(PyObject *self, PyObject *args) { |
---|
1575 | PyObject *resultobj; |
---|
1576 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1577 | uint8_t result; |
---|
1578 | PyObject * obj0 = 0 ; |
---|
1579 | |
---|
1580 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_ttl_get",&obj0)) goto fail; |
---|
1581 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip, |
---|
1582 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1583 | result = (uint8_t) ((arg1)->ip_ttl); |
---|
1584 | |
---|
1585 | resultobj = SWIG_From_unsigned_SS_char((unsigned char)result); |
---|
1586 | return resultobj; |
---|
1587 | fail: |
---|
1588 | return NULL; |
---|
1589 | } |
---|
1590 | |
---|
1591 | |
---|
1592 | static PyObject *_wrap_libtrace_ip_ip_p_set(PyObject *self, PyObject *args) { |
---|
1593 | PyObject *resultobj; |
---|
1594 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1595 | uint8_t arg2 ; |
---|
1596 | PyObject * obj0 = 0 ; |
---|
1597 | PyObject * obj1 = 0 ; |
---|
1598 | |
---|
1599 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_ip_ip_p_set",&obj0,&obj1)) goto fail; |
---|
1600 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip, |
---|
1601 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1602 | arg2 = (uint8_t)SWIG_As_unsigned_SS_char(obj1); |
---|
1603 | if (PyErr_Occurred()) SWIG_fail; |
---|
1604 | if (arg1) (arg1)->ip_p = arg2; |
---|
1605 | |
---|
1606 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1607 | return resultobj; |
---|
1608 | fail: |
---|
1609 | return NULL; |
---|
1610 | } |
---|
1611 | |
---|
1612 | |
---|
1613 | static PyObject *_wrap_libtrace_ip_ip_p_get(PyObject *self, PyObject *args) { |
---|
1614 | PyObject *resultobj; |
---|
1615 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1616 | uint8_t result; |
---|
1617 | PyObject * obj0 = 0 ; |
---|
1618 | |
---|
1619 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_p_get",&obj0)) goto fail; |
---|
1620 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip, |
---|
1621 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1622 | result = (uint8_t) ((arg1)->ip_p); |
---|
1623 | |
---|
1624 | resultobj = SWIG_From_unsigned_SS_char((unsigned char)result); |
---|
1625 | return resultobj; |
---|
1626 | fail: |
---|
1627 | return NULL; |
---|
1628 | } |
---|
1629 | |
---|
1630 | |
---|
1631 | static PyObject *_wrap_libtrace_ip_ip_sum_get(PyObject *self, PyObject *args) { |
---|
1632 | PyObject *resultobj; |
---|
1633 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1634 | uint16_t result; |
---|
1635 | PyObject * obj0 = 0 ; |
---|
1636 | |
---|
1637 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_sum_get",&obj0)) goto fail; |
---|
1638 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip, |
---|
1639 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1640 | result = (uint16_t)libtrace_ip_ip_sum_get(arg1); |
---|
1641 | |
---|
1642 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
1643 | return resultobj; |
---|
1644 | fail: |
---|
1645 | return NULL; |
---|
1646 | } |
---|
1647 | |
---|
1648 | |
---|
1649 | static PyObject *_wrap_libtrace_ip_ip_len_get(PyObject *self, PyObject *args) { |
---|
1650 | PyObject *resultobj; |
---|
1651 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1652 | uint16_t result; |
---|
1653 | PyObject * obj0 = 0 ; |
---|
1654 | |
---|
1655 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_len_get",&obj0)) goto fail; |
---|
1656 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip, |
---|
1657 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1658 | result = (uint16_t)libtrace_ip_ip_len_get(arg1); |
---|
1659 | |
---|
1660 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
1661 | return resultobj; |
---|
1662 | fail: |
---|
1663 | return NULL; |
---|
1664 | } |
---|
1665 | |
---|
1666 | |
---|
1667 | static PyObject *_wrap_libtrace_ip_ip_id_get(PyObject *self, PyObject *args) { |
---|
1668 | PyObject *resultobj; |
---|
1669 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1670 | uint16_t result; |
---|
1671 | PyObject * obj0 = 0 ; |
---|
1672 | |
---|
1673 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_id_get",&obj0)) goto fail; |
---|
1674 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip, |
---|
1675 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1676 | result = (uint16_t)libtrace_ip_ip_id_get(arg1); |
---|
1677 | |
---|
1678 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
1679 | return resultobj; |
---|
1680 | fail: |
---|
1681 | return NULL; |
---|
1682 | } |
---|
1683 | |
---|
1684 | |
---|
1685 | static PyObject *_wrap_libtrace_ip_ip_off_get(PyObject *self, PyObject *args) { |
---|
1686 | PyObject *resultobj; |
---|
1687 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1688 | uint16_t result; |
---|
1689 | PyObject * obj0 = 0 ; |
---|
1690 | |
---|
1691 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_off_get",&obj0)) goto fail; |
---|
1692 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip, |
---|
1693 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1694 | result = (uint16_t)libtrace_ip_ip_off_get(arg1); |
---|
1695 | |
---|
1696 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
1697 | return resultobj; |
---|
1698 | fail: |
---|
1699 | return NULL; |
---|
1700 | } |
---|
1701 | |
---|
1702 | |
---|
1703 | static PyObject *_wrap_libtrace_ip_ip_src_get(PyObject *self, PyObject *args) { |
---|
1704 | PyObject *resultobj; |
---|
1705 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1706 | char *result; |
---|
1707 | PyObject * obj0 = 0 ; |
---|
1708 | |
---|
1709 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_src_get",&obj0)) goto fail; |
---|
1710 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip, |
---|
1711 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1712 | result = (char *)libtrace_ip_ip_src_get(arg1); |
---|
1713 | |
---|
1714 | resultobj = SWIG_FromCharPtr(result); |
---|
1715 | free(result); |
---|
1716 | return resultobj; |
---|
1717 | fail: |
---|
1718 | return NULL; |
---|
1719 | } |
---|
1720 | |
---|
1721 | |
---|
1722 | static PyObject *_wrap_libtrace_ip_ip_dst_get(PyObject *self, PyObject *args) { |
---|
1723 | PyObject *resultobj; |
---|
1724 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
1725 | char *result; |
---|
1726 | PyObject * obj0 = 0 ; |
---|
1727 | |
---|
1728 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_dst_get",&obj0)) goto fail; |
---|
1729 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip, |
---|
1730 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1731 | result = (char *)libtrace_ip_ip_dst_get(arg1); |
---|
1732 | |
---|
1733 | resultobj = SWIG_FromCharPtr(result); |
---|
1734 | free(result); |
---|
1735 | return resultobj; |
---|
1736 | fail: |
---|
1737 | return NULL; |
---|
1738 | } |
---|
1739 | |
---|
1740 | |
---|
1741 | static PyObject * libtrace_ip_swigregister(PyObject *self, PyObject *args) { |
---|
1742 | PyObject *obj; |
---|
1743 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
1744 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_ip, obj); |
---|
1745 | Py_INCREF(obj); |
---|
1746 | return Py_BuildValue((char *)""); |
---|
1747 | } |
---|
1748 | static PyObject *_wrap_libtrace_tcp_res1_set(PyObject *self, PyObject *args) { |
---|
1749 | PyObject *resultobj; |
---|
1750 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1751 | uint16_t arg2 ; |
---|
1752 | PyObject * obj0 = 0 ; |
---|
1753 | PyObject * obj1 = 0 ; |
---|
1754 | |
---|
1755 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_res1_set",&obj0,&obj1)) goto fail; |
---|
1756 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
1757 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1758 | arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1); |
---|
1759 | if (PyErr_Occurred()) SWIG_fail; |
---|
1760 | if (arg1) (arg1)->res1 = arg2; |
---|
1761 | |
---|
1762 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1763 | return resultobj; |
---|
1764 | fail: |
---|
1765 | return NULL; |
---|
1766 | } |
---|
1767 | |
---|
1768 | |
---|
1769 | static PyObject *_wrap_libtrace_tcp_res1_get(PyObject *self, PyObject *args) { |
---|
1770 | PyObject *resultobj; |
---|
1771 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1772 | uint16_t result; |
---|
1773 | PyObject * obj0 = 0 ; |
---|
1774 | |
---|
1775 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_res1_get",&obj0)) goto fail; |
---|
1776 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
1777 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1778 | result = (uint16_t) ((arg1)->res1); |
---|
1779 | |
---|
1780 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
1781 | return resultobj; |
---|
1782 | fail: |
---|
1783 | return NULL; |
---|
1784 | } |
---|
1785 | |
---|
1786 | |
---|
1787 | static PyObject *_wrap_libtrace_tcp_doff_set(PyObject *self, PyObject *args) { |
---|
1788 | PyObject *resultobj; |
---|
1789 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1790 | uint16_t arg2 ; |
---|
1791 | PyObject * obj0 = 0 ; |
---|
1792 | PyObject * obj1 = 0 ; |
---|
1793 | |
---|
1794 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_doff_set",&obj0,&obj1)) goto fail; |
---|
1795 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
1796 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1797 | arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1); |
---|
1798 | if (PyErr_Occurred()) SWIG_fail; |
---|
1799 | if (arg1) (arg1)->doff = arg2; |
---|
1800 | |
---|
1801 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1802 | return resultobj; |
---|
1803 | fail: |
---|
1804 | return NULL; |
---|
1805 | } |
---|
1806 | |
---|
1807 | |
---|
1808 | static PyObject *_wrap_libtrace_tcp_doff_get(PyObject *self, PyObject *args) { |
---|
1809 | PyObject *resultobj; |
---|
1810 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1811 | uint16_t result; |
---|
1812 | PyObject * obj0 = 0 ; |
---|
1813 | |
---|
1814 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_doff_get",&obj0)) goto fail; |
---|
1815 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
1816 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1817 | result = (uint16_t) ((arg1)->doff); |
---|
1818 | |
---|
1819 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
1820 | return resultobj; |
---|
1821 | fail: |
---|
1822 | return NULL; |
---|
1823 | } |
---|
1824 | |
---|
1825 | |
---|
1826 | static PyObject *_wrap_libtrace_tcp_fin_set(PyObject *self, PyObject *args) { |
---|
1827 | PyObject *resultobj; |
---|
1828 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1829 | uint16_t arg2 ; |
---|
1830 | PyObject * obj0 = 0 ; |
---|
1831 | PyObject * obj1 = 0 ; |
---|
1832 | |
---|
1833 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_fin_set",&obj0,&obj1)) goto fail; |
---|
1834 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
1835 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1836 | arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1); |
---|
1837 | if (PyErr_Occurred()) SWIG_fail; |
---|
1838 | if (arg1) (arg1)->fin = arg2; |
---|
1839 | |
---|
1840 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1841 | return resultobj; |
---|
1842 | fail: |
---|
1843 | return NULL; |
---|
1844 | } |
---|
1845 | |
---|
1846 | |
---|
1847 | static PyObject *_wrap_libtrace_tcp_fin_get(PyObject *self, PyObject *args) { |
---|
1848 | PyObject *resultobj; |
---|
1849 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1850 | uint16_t result; |
---|
1851 | PyObject * obj0 = 0 ; |
---|
1852 | |
---|
1853 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_fin_get",&obj0)) goto fail; |
---|
1854 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
1855 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1856 | result = (uint16_t) ((arg1)->fin); |
---|
1857 | |
---|
1858 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
1859 | return resultobj; |
---|
1860 | fail: |
---|
1861 | return NULL; |
---|
1862 | } |
---|
1863 | |
---|
1864 | |
---|
1865 | static PyObject *_wrap_libtrace_tcp_syn_set(PyObject *self, PyObject *args) { |
---|
1866 | PyObject *resultobj; |
---|
1867 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1868 | uint16_t arg2 ; |
---|
1869 | PyObject * obj0 = 0 ; |
---|
1870 | PyObject * obj1 = 0 ; |
---|
1871 | |
---|
1872 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_syn_set",&obj0,&obj1)) goto fail; |
---|
1873 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
1874 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1875 | arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1); |
---|
1876 | if (PyErr_Occurred()) SWIG_fail; |
---|
1877 | if (arg1) (arg1)->syn = arg2; |
---|
1878 | |
---|
1879 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1880 | return resultobj; |
---|
1881 | fail: |
---|
1882 | return NULL; |
---|
1883 | } |
---|
1884 | |
---|
1885 | |
---|
1886 | static PyObject *_wrap_libtrace_tcp_syn_get(PyObject *self, PyObject *args) { |
---|
1887 | PyObject *resultobj; |
---|
1888 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1889 | uint16_t result; |
---|
1890 | PyObject * obj0 = 0 ; |
---|
1891 | |
---|
1892 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_syn_get",&obj0)) goto fail; |
---|
1893 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
1894 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1895 | result = (uint16_t) ((arg1)->syn); |
---|
1896 | |
---|
1897 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
1898 | return resultobj; |
---|
1899 | fail: |
---|
1900 | return NULL; |
---|
1901 | } |
---|
1902 | |
---|
1903 | |
---|
1904 | static PyObject *_wrap_libtrace_tcp_rst_set(PyObject *self, PyObject *args) { |
---|
1905 | PyObject *resultobj; |
---|
1906 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1907 | uint16_t arg2 ; |
---|
1908 | PyObject * obj0 = 0 ; |
---|
1909 | PyObject * obj1 = 0 ; |
---|
1910 | |
---|
1911 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_rst_set",&obj0,&obj1)) goto fail; |
---|
1912 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
1913 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1914 | arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1); |
---|
1915 | if (PyErr_Occurred()) SWIG_fail; |
---|
1916 | if (arg1) (arg1)->rst = arg2; |
---|
1917 | |
---|
1918 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1919 | return resultobj; |
---|
1920 | fail: |
---|
1921 | return NULL; |
---|
1922 | } |
---|
1923 | |
---|
1924 | |
---|
1925 | static PyObject *_wrap_libtrace_tcp_rst_get(PyObject *self, PyObject *args) { |
---|
1926 | PyObject *resultobj; |
---|
1927 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1928 | uint16_t result; |
---|
1929 | PyObject * obj0 = 0 ; |
---|
1930 | |
---|
1931 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_rst_get",&obj0)) goto fail; |
---|
1932 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
1933 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1934 | result = (uint16_t) ((arg1)->rst); |
---|
1935 | |
---|
1936 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
1937 | return resultobj; |
---|
1938 | fail: |
---|
1939 | return NULL; |
---|
1940 | } |
---|
1941 | |
---|
1942 | |
---|
1943 | static PyObject *_wrap_libtrace_tcp_psh_set(PyObject *self, PyObject *args) { |
---|
1944 | PyObject *resultobj; |
---|
1945 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1946 | uint16_t arg2 ; |
---|
1947 | PyObject * obj0 = 0 ; |
---|
1948 | PyObject * obj1 = 0 ; |
---|
1949 | |
---|
1950 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_psh_set",&obj0,&obj1)) goto fail; |
---|
1951 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
1952 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1953 | arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1); |
---|
1954 | if (PyErr_Occurred()) SWIG_fail; |
---|
1955 | if (arg1) (arg1)->psh = arg2; |
---|
1956 | |
---|
1957 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1958 | return resultobj; |
---|
1959 | fail: |
---|
1960 | return NULL; |
---|
1961 | } |
---|
1962 | |
---|
1963 | |
---|
1964 | static PyObject *_wrap_libtrace_tcp_psh_get(PyObject *self, PyObject *args) { |
---|
1965 | PyObject *resultobj; |
---|
1966 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1967 | uint16_t result; |
---|
1968 | PyObject * obj0 = 0 ; |
---|
1969 | |
---|
1970 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_psh_get",&obj0)) goto fail; |
---|
1971 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
1972 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1973 | result = (uint16_t) ((arg1)->psh); |
---|
1974 | |
---|
1975 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
1976 | return resultobj; |
---|
1977 | fail: |
---|
1978 | return NULL; |
---|
1979 | } |
---|
1980 | |
---|
1981 | |
---|
1982 | static PyObject *_wrap_libtrace_tcp_ack_set(PyObject *self, PyObject *args) { |
---|
1983 | PyObject *resultobj; |
---|
1984 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
1985 | uint16_t arg2 ; |
---|
1986 | PyObject * obj0 = 0 ; |
---|
1987 | PyObject * obj1 = 0 ; |
---|
1988 | |
---|
1989 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_ack_set",&obj0,&obj1)) goto fail; |
---|
1990 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
1991 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
1992 | arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1); |
---|
1993 | if (PyErr_Occurred()) SWIG_fail; |
---|
1994 | if (arg1) (arg1)->ack = arg2; |
---|
1995 | |
---|
1996 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
1997 | return resultobj; |
---|
1998 | fail: |
---|
1999 | return NULL; |
---|
2000 | } |
---|
2001 | |
---|
2002 | |
---|
2003 | static PyObject *_wrap_libtrace_tcp_ack_get(PyObject *self, PyObject *args) { |
---|
2004 | PyObject *resultobj; |
---|
2005 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2006 | uint16_t result; |
---|
2007 | PyObject * obj0 = 0 ; |
---|
2008 | |
---|
2009 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_ack_get",&obj0)) goto fail; |
---|
2010 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
2011 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2012 | result = (uint16_t) ((arg1)->ack); |
---|
2013 | |
---|
2014 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
2015 | return resultobj; |
---|
2016 | fail: |
---|
2017 | return NULL; |
---|
2018 | } |
---|
2019 | |
---|
2020 | |
---|
2021 | static PyObject *_wrap_libtrace_tcp_urg_set(PyObject *self, PyObject *args) { |
---|
2022 | PyObject *resultobj; |
---|
2023 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2024 | uint16_t arg2 ; |
---|
2025 | PyObject * obj0 = 0 ; |
---|
2026 | PyObject * obj1 = 0 ; |
---|
2027 | |
---|
2028 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_urg_set",&obj0,&obj1)) goto fail; |
---|
2029 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
2030 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2031 | arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1); |
---|
2032 | if (PyErr_Occurred()) SWIG_fail; |
---|
2033 | if (arg1) (arg1)->urg = arg2; |
---|
2034 | |
---|
2035 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2036 | return resultobj; |
---|
2037 | fail: |
---|
2038 | return NULL; |
---|
2039 | } |
---|
2040 | |
---|
2041 | |
---|
2042 | static PyObject *_wrap_libtrace_tcp_urg_get(PyObject *self, PyObject *args) { |
---|
2043 | PyObject *resultobj; |
---|
2044 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2045 | uint16_t result; |
---|
2046 | PyObject * obj0 = 0 ; |
---|
2047 | |
---|
2048 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_urg_get",&obj0)) goto fail; |
---|
2049 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
2050 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2051 | result = (uint16_t) ((arg1)->urg); |
---|
2052 | |
---|
2053 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
2054 | return resultobj; |
---|
2055 | fail: |
---|
2056 | return NULL; |
---|
2057 | } |
---|
2058 | |
---|
2059 | |
---|
2060 | static PyObject *_wrap_libtrace_tcp_res2_set(PyObject *self, PyObject *args) { |
---|
2061 | PyObject *resultobj; |
---|
2062 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2063 | uint16_t arg2 ; |
---|
2064 | PyObject * obj0 = 0 ; |
---|
2065 | PyObject * obj1 = 0 ; |
---|
2066 | |
---|
2067 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_res2_set",&obj0,&obj1)) goto fail; |
---|
2068 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
2069 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2070 | arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1); |
---|
2071 | if (PyErr_Occurred()) SWIG_fail; |
---|
2072 | if (arg1) (arg1)->res2 = arg2; |
---|
2073 | |
---|
2074 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2075 | return resultobj; |
---|
2076 | fail: |
---|
2077 | return NULL; |
---|
2078 | } |
---|
2079 | |
---|
2080 | |
---|
2081 | static PyObject *_wrap_libtrace_tcp_res2_get(PyObject *self, PyObject *args) { |
---|
2082 | PyObject *resultobj; |
---|
2083 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2084 | uint16_t result; |
---|
2085 | PyObject * obj0 = 0 ; |
---|
2086 | |
---|
2087 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_res2_get",&obj0)) goto fail; |
---|
2088 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
2089 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2090 | result = (uint16_t) ((arg1)->res2); |
---|
2091 | |
---|
2092 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
2093 | return resultobj; |
---|
2094 | fail: |
---|
2095 | return NULL; |
---|
2096 | } |
---|
2097 | |
---|
2098 | |
---|
2099 | static PyObject *_wrap_libtrace_tcp_source_get(PyObject *self, PyObject *args) { |
---|
2100 | PyObject *resultobj; |
---|
2101 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2102 | uint16_t result; |
---|
2103 | PyObject * obj0 = 0 ; |
---|
2104 | |
---|
2105 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_source_get",&obj0)) goto fail; |
---|
2106 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
2107 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2108 | result = (uint16_t)libtrace_tcp_source_get(arg1); |
---|
2109 | |
---|
2110 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
2111 | return resultobj; |
---|
2112 | fail: |
---|
2113 | return NULL; |
---|
2114 | } |
---|
2115 | |
---|
2116 | |
---|
2117 | static PyObject *_wrap_libtrace_tcp_dest_get(PyObject *self, PyObject *args) { |
---|
2118 | PyObject *resultobj; |
---|
2119 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2120 | uint16_t result; |
---|
2121 | PyObject * obj0 = 0 ; |
---|
2122 | |
---|
2123 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_dest_get",&obj0)) goto fail; |
---|
2124 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
2125 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2126 | result = (uint16_t)libtrace_tcp_dest_get(arg1); |
---|
2127 | |
---|
2128 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
2129 | return resultobj; |
---|
2130 | fail: |
---|
2131 | return NULL; |
---|
2132 | } |
---|
2133 | |
---|
2134 | |
---|
2135 | static PyObject *_wrap_libtrace_tcp_window_get(PyObject *self, PyObject *args) { |
---|
2136 | PyObject *resultobj; |
---|
2137 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2138 | uint16_t result; |
---|
2139 | PyObject * obj0 = 0 ; |
---|
2140 | |
---|
2141 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_window_get",&obj0)) goto fail; |
---|
2142 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
2143 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2144 | result = (uint16_t)libtrace_tcp_window_get(arg1); |
---|
2145 | |
---|
2146 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
2147 | return resultobj; |
---|
2148 | fail: |
---|
2149 | return NULL; |
---|
2150 | } |
---|
2151 | |
---|
2152 | |
---|
2153 | static PyObject *_wrap_libtrace_tcp_check_get(PyObject *self, PyObject *args) { |
---|
2154 | PyObject *resultobj; |
---|
2155 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2156 | uint16_t result; |
---|
2157 | PyObject * obj0 = 0 ; |
---|
2158 | |
---|
2159 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_check_get",&obj0)) goto fail; |
---|
2160 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
2161 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2162 | result = (uint16_t)libtrace_tcp_check_get(arg1); |
---|
2163 | |
---|
2164 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
2165 | return resultobj; |
---|
2166 | fail: |
---|
2167 | return NULL; |
---|
2168 | } |
---|
2169 | |
---|
2170 | |
---|
2171 | static PyObject *_wrap_libtrace_tcp_urg_ptr_get(PyObject *self, PyObject *args) { |
---|
2172 | PyObject *resultobj; |
---|
2173 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2174 | uint16_t result; |
---|
2175 | PyObject * obj0 = 0 ; |
---|
2176 | |
---|
2177 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_urg_ptr_get",&obj0)) goto fail; |
---|
2178 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
2179 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2180 | result = (uint16_t)libtrace_tcp_urg_ptr_get(arg1); |
---|
2181 | |
---|
2182 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
2183 | return resultobj; |
---|
2184 | fail: |
---|
2185 | return NULL; |
---|
2186 | } |
---|
2187 | |
---|
2188 | |
---|
2189 | static PyObject *_wrap_libtrace_tcp_seq_get(PyObject *self, PyObject *args) { |
---|
2190 | PyObject *resultobj; |
---|
2191 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2192 | uint32_t result; |
---|
2193 | PyObject * obj0 = 0 ; |
---|
2194 | |
---|
2195 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_seq_get",&obj0)) goto fail; |
---|
2196 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
2197 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2198 | result = (uint32_t)libtrace_tcp_seq_get(arg1); |
---|
2199 | |
---|
2200 | resultobj = SWIG_From_unsigned_SS_int((unsigned int)result); |
---|
2201 | return resultobj; |
---|
2202 | fail: |
---|
2203 | return NULL; |
---|
2204 | } |
---|
2205 | |
---|
2206 | |
---|
2207 | static PyObject *_wrap_libtrace_tcp_ack_seq_get(PyObject *self, PyObject *args) { |
---|
2208 | PyObject *resultobj; |
---|
2209 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2210 | uint32_t result; |
---|
2211 | PyObject * obj0 = 0 ; |
---|
2212 | |
---|
2213 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_ack_seq_get",&obj0)) goto fail; |
---|
2214 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp, |
---|
2215 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2216 | result = (uint32_t)libtrace_tcp_ack_seq_get(arg1); |
---|
2217 | |
---|
2218 | resultobj = SWIG_From_unsigned_SS_int((unsigned int)result); |
---|
2219 | return resultobj; |
---|
2220 | fail: |
---|
2221 | return NULL; |
---|
2222 | } |
---|
2223 | |
---|
2224 | |
---|
2225 | static PyObject * libtrace_tcp_swigregister(PyObject *self, PyObject *args) { |
---|
2226 | PyObject *obj; |
---|
2227 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
2228 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_tcp, obj); |
---|
2229 | Py_INCREF(obj); |
---|
2230 | return Py_BuildValue((char *)""); |
---|
2231 | } |
---|
2232 | static PyObject *_wrap_libtrace_udp_source_get(PyObject *self, PyObject *args) { |
---|
2233 | PyObject *resultobj; |
---|
2234 | struct libtrace_udp *arg1 = (struct libtrace_udp *) 0 ; |
---|
2235 | uint16_t result; |
---|
2236 | PyObject * obj0 = 0 ; |
---|
2237 | |
---|
2238 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_udp_source_get",&obj0)) goto fail; |
---|
2239 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_udp, |
---|
2240 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2241 | result = (uint16_t)libtrace_udp_source_get(arg1); |
---|
2242 | |
---|
2243 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
2244 | return resultobj; |
---|
2245 | fail: |
---|
2246 | return NULL; |
---|
2247 | } |
---|
2248 | |
---|
2249 | |
---|
2250 | static PyObject *_wrap_libtrace_udp_dest_get(PyObject *self, PyObject *args) { |
---|
2251 | PyObject *resultobj; |
---|
2252 | struct libtrace_udp *arg1 = (struct libtrace_udp *) 0 ; |
---|
2253 | uint16_t result; |
---|
2254 | PyObject * obj0 = 0 ; |
---|
2255 | |
---|
2256 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_udp_dest_get",&obj0)) goto fail; |
---|
2257 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_udp, |
---|
2258 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2259 | result = (uint16_t)libtrace_udp_dest_get(arg1); |
---|
2260 | |
---|
2261 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
2262 | return resultobj; |
---|
2263 | fail: |
---|
2264 | return NULL; |
---|
2265 | } |
---|
2266 | |
---|
2267 | |
---|
2268 | static PyObject *_wrap_libtrace_udp_len_get(PyObject *self, PyObject *args) { |
---|
2269 | PyObject *resultobj; |
---|
2270 | struct libtrace_udp *arg1 = (struct libtrace_udp *) 0 ; |
---|
2271 | uint16_t result; |
---|
2272 | PyObject * obj0 = 0 ; |
---|
2273 | |
---|
2274 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_udp_len_get",&obj0)) goto fail; |
---|
2275 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_udp, |
---|
2276 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2277 | result = (uint16_t)libtrace_udp_len_get(arg1); |
---|
2278 | |
---|
2279 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
2280 | return resultobj; |
---|
2281 | fail: |
---|
2282 | return NULL; |
---|
2283 | } |
---|
2284 | |
---|
2285 | |
---|
2286 | static PyObject *_wrap_libtrace_udp_check_get(PyObject *self, PyObject *args) { |
---|
2287 | PyObject *resultobj; |
---|
2288 | struct libtrace_udp *arg1 = (struct libtrace_udp *) 0 ; |
---|
2289 | uint16_t result; |
---|
2290 | PyObject * obj0 = 0 ; |
---|
2291 | |
---|
2292 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_udp_check_get",&obj0)) goto fail; |
---|
2293 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_udp, |
---|
2294 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2295 | result = (uint16_t)libtrace_udp_check_get(arg1); |
---|
2296 | |
---|
2297 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
2298 | return resultobj; |
---|
2299 | fail: |
---|
2300 | return NULL; |
---|
2301 | } |
---|
2302 | |
---|
2303 | |
---|
2304 | static PyObject * libtrace_udp_swigregister(PyObject *self, PyObject *args) { |
---|
2305 | PyObject *obj; |
---|
2306 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
2307 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_udp, obj); |
---|
2308 | Py_INCREF(obj); |
---|
2309 | return Py_BuildValue((char *)""); |
---|
2310 | } |
---|
2311 | static PyObject *_wrap_libtrace_icmp_type_set(PyObject *self, PyObject *args) { |
---|
2312 | PyObject *resultobj; |
---|
2313 | struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ; |
---|
2314 | uint8_t arg2 ; |
---|
2315 | PyObject * obj0 = 0 ; |
---|
2316 | PyObject * obj1 = 0 ; |
---|
2317 | |
---|
2318 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_type_set",&obj0,&obj1)) goto fail; |
---|
2319 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp, |
---|
2320 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2321 | arg2 = (uint8_t)SWIG_As_unsigned_SS_char(obj1); |
---|
2322 | if (PyErr_Occurred()) SWIG_fail; |
---|
2323 | if (arg1) (arg1)->type = arg2; |
---|
2324 | |
---|
2325 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2326 | return resultobj; |
---|
2327 | fail: |
---|
2328 | return NULL; |
---|
2329 | } |
---|
2330 | |
---|
2331 | |
---|
2332 | static PyObject *_wrap_libtrace_icmp_type_get(PyObject *self, PyObject *args) { |
---|
2333 | PyObject *resultobj; |
---|
2334 | struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ; |
---|
2335 | uint8_t result; |
---|
2336 | PyObject * obj0 = 0 ; |
---|
2337 | |
---|
2338 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_type_get",&obj0)) goto fail; |
---|
2339 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp, |
---|
2340 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2341 | result = (uint8_t) ((arg1)->type); |
---|
2342 | |
---|
2343 | resultobj = SWIG_From_unsigned_SS_char((unsigned char)result); |
---|
2344 | return resultobj; |
---|
2345 | fail: |
---|
2346 | return NULL; |
---|
2347 | } |
---|
2348 | |
---|
2349 | |
---|
2350 | static PyObject *_wrap_libtrace_icmp_code_set(PyObject *self, PyObject *args) { |
---|
2351 | PyObject *resultobj; |
---|
2352 | struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ; |
---|
2353 | uint8_t arg2 ; |
---|
2354 | PyObject * obj0 = 0 ; |
---|
2355 | PyObject * obj1 = 0 ; |
---|
2356 | |
---|
2357 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_code_set",&obj0,&obj1)) goto fail; |
---|
2358 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp, |
---|
2359 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2360 | arg2 = (uint8_t)SWIG_As_unsigned_SS_char(obj1); |
---|
2361 | if (PyErr_Occurred()) SWIG_fail; |
---|
2362 | if (arg1) (arg1)->code = arg2; |
---|
2363 | |
---|
2364 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2365 | return resultobj; |
---|
2366 | fail: |
---|
2367 | return NULL; |
---|
2368 | } |
---|
2369 | |
---|
2370 | |
---|
2371 | static PyObject *_wrap_libtrace_icmp_code_get(PyObject *self, PyObject *args) { |
---|
2372 | PyObject *resultobj; |
---|
2373 | struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ; |
---|
2374 | uint8_t result; |
---|
2375 | PyObject * obj0 = 0 ; |
---|
2376 | |
---|
2377 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_code_get",&obj0)) goto fail; |
---|
2378 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp, |
---|
2379 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2380 | result = (uint8_t) ((arg1)->code); |
---|
2381 | |
---|
2382 | resultobj = SWIG_From_unsigned_SS_char((unsigned char)result); |
---|
2383 | return resultobj; |
---|
2384 | fail: |
---|
2385 | return NULL; |
---|
2386 | } |
---|
2387 | |
---|
2388 | |
---|
2389 | static PyObject *_wrap_libtrace_icmp_checksum_set(PyObject *self, PyObject *args) { |
---|
2390 | PyObject *resultobj; |
---|
2391 | struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ; |
---|
2392 | uint16_t arg2 ; |
---|
2393 | PyObject * obj0 = 0 ; |
---|
2394 | PyObject * obj1 = 0 ; |
---|
2395 | |
---|
2396 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_checksum_set",&obj0,&obj1)) goto fail; |
---|
2397 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp, |
---|
2398 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2399 | arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1); |
---|
2400 | if (PyErr_Occurred()) SWIG_fail; |
---|
2401 | if (arg1) (arg1)->checksum = arg2; |
---|
2402 | |
---|
2403 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2404 | return resultobj; |
---|
2405 | fail: |
---|
2406 | return NULL; |
---|
2407 | } |
---|
2408 | |
---|
2409 | |
---|
2410 | static PyObject *_wrap_libtrace_icmp_checksum_get(PyObject *self, PyObject *args) { |
---|
2411 | PyObject *resultobj; |
---|
2412 | struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ; |
---|
2413 | uint16_t result; |
---|
2414 | PyObject * obj0 = 0 ; |
---|
2415 | |
---|
2416 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_checksum_get",&obj0)) goto fail; |
---|
2417 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp, |
---|
2418 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2419 | result = (uint16_t) ((arg1)->checksum); |
---|
2420 | |
---|
2421 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
2422 | return resultobj; |
---|
2423 | fail: |
---|
2424 | return NULL; |
---|
2425 | } |
---|
2426 | |
---|
2427 | |
---|
2428 | static PyObject *_wrap_libtrace_icmp_un_get(PyObject *self, PyObject *args) { |
---|
2429 | PyObject *resultobj; |
---|
2430 | struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ; |
---|
2431 | libtrace_icmp_un *result; |
---|
2432 | PyObject * obj0 = 0 ; |
---|
2433 | |
---|
2434 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_get",&obj0)) goto fail; |
---|
2435 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp, |
---|
2436 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2437 | result = (libtrace_icmp_un *)& ((arg1)->un); |
---|
2438 | |
---|
2439 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_libtrace_icmp_un, 0); |
---|
2440 | return resultobj; |
---|
2441 | fail: |
---|
2442 | return NULL; |
---|
2443 | } |
---|
2444 | |
---|
2445 | |
---|
2446 | static PyObject * libtrace_icmp_swigregister(PyObject *self, PyObject *args) { |
---|
2447 | PyObject *obj; |
---|
2448 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
2449 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_icmp, obj); |
---|
2450 | Py_INCREF(obj); |
---|
2451 | return Py_BuildValue((char *)""); |
---|
2452 | } |
---|
2453 | static PyObject *_wrap_libtrace_icmp_un_gateway_set(PyObject *self, PyObject *args) { |
---|
2454 | PyObject *resultobj; |
---|
2455 | libtrace_icmp_un *arg1 = (libtrace_icmp_un *) 0 ; |
---|
2456 | uint32_t arg2 ; |
---|
2457 | PyObject * obj0 = 0 ; |
---|
2458 | PyObject * obj1 = 0 ; |
---|
2459 | |
---|
2460 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_un_gateway_set",&obj0,&obj1)) goto fail; |
---|
2461 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un, |
---|
2462 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2463 | arg2 = (uint32_t)SWIG_As_unsigned_SS_int(obj1); |
---|
2464 | if (PyErr_Occurred()) SWIG_fail; |
---|
2465 | if (arg1) (arg1)->gateway = arg2; |
---|
2466 | |
---|
2467 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2468 | return resultobj; |
---|
2469 | fail: |
---|
2470 | return NULL; |
---|
2471 | } |
---|
2472 | |
---|
2473 | |
---|
2474 | static PyObject *_wrap_libtrace_icmp_un_gateway_get(PyObject *self, PyObject *args) { |
---|
2475 | PyObject *resultobj; |
---|
2476 | libtrace_icmp_un *arg1 = (libtrace_icmp_un *) 0 ; |
---|
2477 | uint32_t result; |
---|
2478 | PyObject * obj0 = 0 ; |
---|
2479 | |
---|
2480 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_gateway_get",&obj0)) goto fail; |
---|
2481 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un, |
---|
2482 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2483 | result = (uint32_t) ((arg1)->gateway); |
---|
2484 | |
---|
2485 | resultobj = SWIG_From_unsigned_SS_int((unsigned int)result); |
---|
2486 | return resultobj; |
---|
2487 | fail: |
---|
2488 | return NULL; |
---|
2489 | } |
---|
2490 | |
---|
2491 | |
---|
2492 | static PyObject *_wrap_libtrace_icmp_un_frag_get(PyObject *self, PyObject *args) { |
---|
2493 | PyObject *resultobj; |
---|
2494 | libtrace_icmp_un *arg1 = (libtrace_icmp_un *) 0 ; |
---|
2495 | libtrace_icmp_un_frag *result; |
---|
2496 | PyObject * obj0 = 0 ; |
---|
2497 | |
---|
2498 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_frag_get",&obj0)) goto fail; |
---|
2499 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un, |
---|
2500 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2501 | result = (libtrace_icmp_un_frag *)& ((arg1)->frag); |
---|
2502 | |
---|
2503 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_libtrace_icmp_un_frag, 0); |
---|
2504 | return resultobj; |
---|
2505 | fail: |
---|
2506 | return NULL; |
---|
2507 | } |
---|
2508 | |
---|
2509 | |
---|
2510 | static PyObject *_wrap_libtrace_icmp_un_echo_get(PyObject *self, PyObject *args) { |
---|
2511 | PyObject *resultobj; |
---|
2512 | libtrace_icmp_un *arg1 = (libtrace_icmp_un *) 0 ; |
---|
2513 | libtrace_icmp_un_echo *result; |
---|
2514 | PyObject * obj0 = 0 ; |
---|
2515 | |
---|
2516 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_echo_get",&obj0)) goto fail; |
---|
2517 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un, |
---|
2518 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2519 | result = (libtrace_icmp_un_echo *)& ((arg1)->echo); |
---|
2520 | |
---|
2521 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_libtrace_icmp_un_echo, 0); |
---|
2522 | return resultobj; |
---|
2523 | fail: |
---|
2524 | return NULL; |
---|
2525 | } |
---|
2526 | |
---|
2527 | |
---|
2528 | static PyObject * libtrace_icmp_un_swigregister(PyObject *self, PyObject *args) { |
---|
2529 | PyObject *obj; |
---|
2530 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
2531 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_icmp_un, obj); |
---|
2532 | Py_INCREF(obj); |
---|
2533 | return Py_BuildValue((char *)""); |
---|
2534 | } |
---|
2535 | static PyObject *_wrap_libtrace_icmp_un_frag___unused_set(PyObject *self, PyObject *args) { |
---|
2536 | PyObject *resultobj; |
---|
2537 | libtrace_icmp_un_frag *arg1 = (libtrace_icmp_un_frag *) 0 ; |
---|
2538 | uint16_t arg2 ; |
---|
2539 | PyObject * obj0 = 0 ; |
---|
2540 | PyObject * obj1 = 0 ; |
---|
2541 | |
---|
2542 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_un_frag___unused_set",&obj0,&obj1)) goto fail; |
---|
2543 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un_frag, |
---|
2544 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2545 | arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1); |
---|
2546 | if (PyErr_Occurred()) SWIG_fail; |
---|
2547 | if (arg1) (arg1)->__unused = arg2; |
---|
2548 | |
---|
2549 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2550 | return resultobj; |
---|
2551 | fail: |
---|
2552 | return NULL; |
---|
2553 | } |
---|
2554 | |
---|
2555 | |
---|
2556 | static PyObject *_wrap_libtrace_icmp_un_frag___unused_get(PyObject *self, PyObject *args) { |
---|
2557 | PyObject *resultobj; |
---|
2558 | libtrace_icmp_un_frag *arg1 = (libtrace_icmp_un_frag *) 0 ; |
---|
2559 | uint16_t result; |
---|
2560 | PyObject * obj0 = 0 ; |
---|
2561 | |
---|
2562 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_frag___unused_get",&obj0)) goto fail; |
---|
2563 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un_frag, |
---|
2564 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2565 | result = (uint16_t) ((arg1)->__unused); |
---|
2566 | |
---|
2567 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
2568 | return resultobj; |
---|
2569 | fail: |
---|
2570 | return NULL; |
---|
2571 | } |
---|
2572 | |
---|
2573 | |
---|
2574 | static PyObject *_wrap_libtrace_icmp_un_frag_mtu_set(PyObject *self, PyObject *args) { |
---|
2575 | PyObject *resultobj; |
---|
2576 | libtrace_icmp_un_frag *arg1 = (libtrace_icmp_un_frag *) 0 ; |
---|
2577 | uint16_t arg2 ; |
---|
2578 | PyObject * obj0 = 0 ; |
---|
2579 | PyObject * obj1 = 0 ; |
---|
2580 | |
---|
2581 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_un_frag_mtu_set",&obj0,&obj1)) goto fail; |
---|
2582 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un_frag, |
---|
2583 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2584 | arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1); |
---|
2585 | if (PyErr_Occurred()) SWIG_fail; |
---|
2586 | if (arg1) (arg1)->mtu = arg2; |
---|
2587 | |
---|
2588 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2589 | return resultobj; |
---|
2590 | fail: |
---|
2591 | return NULL; |
---|
2592 | } |
---|
2593 | |
---|
2594 | |
---|
2595 | static PyObject *_wrap_libtrace_icmp_un_frag_mtu_get(PyObject *self, PyObject *args) { |
---|
2596 | PyObject *resultobj; |
---|
2597 | libtrace_icmp_un_frag *arg1 = (libtrace_icmp_un_frag *) 0 ; |
---|
2598 | uint16_t result; |
---|
2599 | PyObject * obj0 = 0 ; |
---|
2600 | |
---|
2601 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_frag_mtu_get",&obj0)) goto fail; |
---|
2602 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un_frag, |
---|
2603 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2604 | result = (uint16_t) ((arg1)->mtu); |
---|
2605 | |
---|
2606 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
2607 | return resultobj; |
---|
2608 | fail: |
---|
2609 | return NULL; |
---|
2610 | } |
---|
2611 | |
---|
2612 | |
---|
2613 | static PyObject * libtrace_icmp_un_frag_swigregister(PyObject *self, PyObject *args) { |
---|
2614 | PyObject *obj; |
---|
2615 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
2616 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_icmp_un_frag, obj); |
---|
2617 | Py_INCREF(obj); |
---|
2618 | return Py_BuildValue((char *)""); |
---|
2619 | } |
---|
2620 | static PyObject *_wrap_libtrace_icmp_un_echo_id_set(PyObject *self, PyObject *args) { |
---|
2621 | PyObject *resultobj; |
---|
2622 | libtrace_icmp_un_echo *arg1 = (libtrace_icmp_un_echo *) 0 ; |
---|
2623 | uint16_t arg2 ; |
---|
2624 | PyObject * obj0 = 0 ; |
---|
2625 | PyObject * obj1 = 0 ; |
---|
2626 | |
---|
2627 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_un_echo_id_set",&obj0,&obj1)) goto fail; |
---|
2628 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un_echo, |
---|
2629 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2630 | arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1); |
---|
2631 | if (PyErr_Occurred()) SWIG_fail; |
---|
2632 | if (arg1) (arg1)->id = arg2; |
---|
2633 | |
---|
2634 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2635 | return resultobj; |
---|
2636 | fail: |
---|
2637 | return NULL; |
---|
2638 | } |
---|
2639 | |
---|
2640 | |
---|
2641 | static PyObject *_wrap_libtrace_icmp_un_echo_id_get(PyObject *self, PyObject *args) { |
---|
2642 | PyObject *resultobj; |
---|
2643 | libtrace_icmp_un_echo *arg1 = (libtrace_icmp_un_echo *) 0 ; |
---|
2644 | uint16_t result; |
---|
2645 | PyObject * obj0 = 0 ; |
---|
2646 | |
---|
2647 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_echo_id_get",&obj0)) goto fail; |
---|
2648 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un_echo, |
---|
2649 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2650 | result = (uint16_t) ((arg1)->id); |
---|
2651 | |
---|
2652 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
2653 | return resultobj; |
---|
2654 | fail: |
---|
2655 | return NULL; |
---|
2656 | } |
---|
2657 | |
---|
2658 | |
---|
2659 | static PyObject *_wrap_libtrace_icmp_un_echo_sequence_set(PyObject *self, PyObject *args) { |
---|
2660 | PyObject *resultobj; |
---|
2661 | libtrace_icmp_un_echo *arg1 = (libtrace_icmp_un_echo *) 0 ; |
---|
2662 | uint16_t arg2 ; |
---|
2663 | PyObject * obj0 = 0 ; |
---|
2664 | PyObject * obj1 = 0 ; |
---|
2665 | |
---|
2666 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_un_echo_sequence_set",&obj0,&obj1)) goto fail; |
---|
2667 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un_echo, |
---|
2668 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2669 | arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1); |
---|
2670 | if (PyErr_Occurred()) SWIG_fail; |
---|
2671 | if (arg1) (arg1)->sequence = arg2; |
---|
2672 | |
---|
2673 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2674 | return resultobj; |
---|
2675 | fail: |
---|
2676 | return NULL; |
---|
2677 | } |
---|
2678 | |
---|
2679 | |
---|
2680 | static PyObject *_wrap_libtrace_icmp_un_echo_sequence_get(PyObject *self, PyObject *args) { |
---|
2681 | PyObject *resultobj; |
---|
2682 | libtrace_icmp_un_echo *arg1 = (libtrace_icmp_un_echo *) 0 ; |
---|
2683 | uint16_t result; |
---|
2684 | PyObject * obj0 = 0 ; |
---|
2685 | |
---|
2686 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_echo_sequence_get",&obj0)) goto fail; |
---|
2687 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un_echo, |
---|
2688 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2689 | result = (uint16_t) ((arg1)->sequence); |
---|
2690 | |
---|
2691 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)result); |
---|
2692 | return resultobj; |
---|
2693 | fail: |
---|
2694 | return NULL; |
---|
2695 | } |
---|
2696 | |
---|
2697 | |
---|
2698 | static PyObject * libtrace_icmp_un_echo_swigregister(PyObject *self, PyObject *args) { |
---|
2699 | PyObject *obj; |
---|
2700 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
2701 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_icmp_un_echo, obj); |
---|
2702 | Py_INCREF(obj); |
---|
2703 | return Py_BuildValue((char *)""); |
---|
2704 | } |
---|
2705 | static PyObject *_wrap_new_Packet(PyObject *self, PyObject *args) { |
---|
2706 | PyObject *resultobj; |
---|
2707 | struct libtrace_packet_t *result; |
---|
2708 | |
---|
2709 | if(!PyArg_ParseTuple(args,(char *)":new_Packet")) goto fail; |
---|
2710 | result = (struct libtrace_packet_t *)new_libtrace_packet_t(); |
---|
2711 | |
---|
2712 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_libtrace_packet_t, 1); |
---|
2713 | return resultobj; |
---|
2714 | fail: |
---|
2715 | return NULL; |
---|
2716 | } |
---|
2717 | |
---|
2718 | |
---|
2719 | static PyObject *_wrap_delete_Packet(PyObject *self, PyObject *args) { |
---|
2720 | PyObject *resultobj; |
---|
2721 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
2722 | PyObject * obj0 = 0 ; |
---|
2723 | |
---|
2724 | if(!PyArg_ParseTuple(args,(char *)"O:delete_Packet",&obj0)) goto fail; |
---|
2725 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t, |
---|
2726 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2727 | delete_libtrace_packet_t(arg1); |
---|
2728 | |
---|
2729 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2730 | return resultobj; |
---|
2731 | fail: |
---|
2732 | return NULL; |
---|
2733 | } |
---|
2734 | |
---|
2735 | |
---|
2736 | static PyObject *_wrap_Packet_trace_get_ip(PyObject *self, PyObject *args) { |
---|
2737 | PyObject *resultobj; |
---|
2738 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
2739 | struct libtrace_ip *result; |
---|
2740 | PyObject * obj0 = 0 ; |
---|
2741 | |
---|
2742 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_ip",&obj0)) goto fail; |
---|
2743 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t, |
---|
2744 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2745 | result = (struct libtrace_ip *)libtrace_packet_t_trace_get_ip(arg1); |
---|
2746 | |
---|
2747 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_libtrace_ip, 0); |
---|
2748 | return resultobj; |
---|
2749 | fail: |
---|
2750 | return NULL; |
---|
2751 | } |
---|
2752 | |
---|
2753 | |
---|
2754 | static PyObject *_wrap_Packet_trace_get_tcp(PyObject *self, PyObject *args) { |
---|
2755 | PyObject *resultobj; |
---|
2756 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
2757 | struct libtrace_tcp *result; |
---|
2758 | PyObject * obj0 = 0 ; |
---|
2759 | |
---|
2760 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_tcp",&obj0)) goto fail; |
---|
2761 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t, |
---|
2762 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2763 | result = (struct libtrace_tcp *)libtrace_packet_t_trace_get_tcp(arg1); |
---|
2764 | |
---|
2765 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_libtrace_tcp, 0); |
---|
2766 | return resultobj; |
---|
2767 | fail: |
---|
2768 | return NULL; |
---|
2769 | } |
---|
2770 | |
---|
2771 | |
---|
2772 | static PyObject *_wrap_Packet_trace_get_udp(PyObject *self, PyObject *args) { |
---|
2773 | PyObject *resultobj; |
---|
2774 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
2775 | struct libtrace_udp *result; |
---|
2776 | PyObject * obj0 = 0 ; |
---|
2777 | |
---|
2778 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_udp",&obj0)) goto fail; |
---|
2779 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t, |
---|
2780 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2781 | result = (struct libtrace_udp *)libtrace_packet_t_trace_get_udp(arg1); |
---|
2782 | |
---|
2783 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_libtrace_udp, 0); |
---|
2784 | return resultobj; |
---|
2785 | fail: |
---|
2786 | return NULL; |
---|
2787 | } |
---|
2788 | |
---|
2789 | |
---|
2790 | static PyObject *_wrap_Packet_trace_get_icmp(PyObject *self, PyObject *args) { |
---|
2791 | PyObject *resultobj; |
---|
2792 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
2793 | struct libtrace_icmp *result; |
---|
2794 | PyObject * obj0 = 0 ; |
---|
2795 | |
---|
2796 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_icmp",&obj0)) goto fail; |
---|
2797 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t, |
---|
2798 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2799 | result = (struct libtrace_icmp *)libtrace_packet_t_trace_get_icmp(arg1); |
---|
2800 | |
---|
2801 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_libtrace_icmp, 0); |
---|
2802 | return resultobj; |
---|
2803 | fail: |
---|
2804 | return NULL; |
---|
2805 | } |
---|
2806 | |
---|
2807 | |
---|
2808 | static PyObject *_wrap_Packet_trace_get_link(PyObject *self, PyObject *args) { |
---|
2809 | PyObject *resultobj; |
---|
2810 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
2811 | void *result; |
---|
2812 | PyObject * obj0 = 0 ; |
---|
2813 | |
---|
2814 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_link",&obj0)) goto fail; |
---|
2815 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t, |
---|
2816 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2817 | result = (void *)libtrace_packet_t_trace_get_link(arg1); |
---|
2818 | |
---|
2819 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_void, 0); |
---|
2820 | return resultobj; |
---|
2821 | fail: |
---|
2822 | return NULL; |
---|
2823 | } |
---|
2824 | |
---|
2825 | |
---|
2826 | static PyObject *_wrap_Packet_trace_get_seconds(PyObject *self, PyObject *args) { |
---|
2827 | PyObject *resultobj; |
---|
2828 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
2829 | double result; |
---|
2830 | PyObject * obj0 = 0 ; |
---|
2831 | |
---|
2832 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_seconds",&obj0)) goto fail; |
---|
2833 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t, |
---|
2834 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2835 | result = (double)libtrace_packet_t_trace_get_seconds(arg1); |
---|
2836 | |
---|
2837 | resultobj = SWIG_From_double((double)result); |
---|
2838 | return resultobj; |
---|
2839 | fail: |
---|
2840 | return NULL; |
---|
2841 | } |
---|
2842 | |
---|
2843 | |
---|
2844 | static PyObject *_wrap_Packet_trace_get_erf_timestamp(PyObject *self, PyObject *args) { |
---|
2845 | PyObject *resultobj; |
---|
2846 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
2847 | uint64_t result; |
---|
2848 | PyObject * obj0 = 0 ; |
---|
2849 | |
---|
2850 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_erf_timestamp",&obj0)) goto fail; |
---|
2851 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t, |
---|
2852 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2853 | result = libtrace_packet_t_trace_get_erf_timestamp(arg1); |
---|
2854 | |
---|
2855 | { |
---|
2856 | uint64_t * resultptr; |
---|
2857 | resultptr = (uint64_t *) malloc(sizeof(uint64_t)); |
---|
2858 | memmove(resultptr, &result, sizeof(uint64_t)); |
---|
2859 | resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_uint64_t, 1); |
---|
2860 | } |
---|
2861 | return resultobj; |
---|
2862 | fail: |
---|
2863 | return NULL; |
---|
2864 | } |
---|
2865 | |
---|
2866 | |
---|
2867 | static PyObject *_wrap_Packet_trace_get_timeval(PyObject *self, PyObject *args) { |
---|
2868 | PyObject *resultobj; |
---|
2869 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
2870 | struct timeval result; |
---|
2871 | PyObject * obj0 = 0 ; |
---|
2872 | |
---|
2873 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_timeval",&obj0)) goto fail; |
---|
2874 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t, |
---|
2875 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2876 | result = libtrace_packet_t_trace_get_timeval(arg1); |
---|
2877 | |
---|
2878 | { |
---|
2879 | struct timeval * resultptr; |
---|
2880 | resultptr = (struct timeval *) malloc(sizeof(struct timeval)); |
---|
2881 | memmove(resultptr, &result, sizeof(struct timeval)); |
---|
2882 | resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_timeval, 1); |
---|
2883 | } |
---|
2884 | return resultobj; |
---|
2885 | fail: |
---|
2886 | return NULL; |
---|
2887 | } |
---|
2888 | |
---|
2889 | |
---|
2890 | static PyObject *_wrap_Packet_trace_get_capture_length(PyObject *self, PyObject *args) { |
---|
2891 | PyObject *resultobj; |
---|
2892 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
2893 | int result; |
---|
2894 | PyObject * obj0 = 0 ; |
---|
2895 | |
---|
2896 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_capture_length",&obj0)) goto fail; |
---|
2897 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t, |
---|
2898 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2899 | result = (int)libtrace_packet_t_trace_get_capture_length(arg1); |
---|
2900 | |
---|
2901 | resultobj = SWIG_From_int((int)result); |
---|
2902 | return resultobj; |
---|
2903 | fail: |
---|
2904 | return NULL; |
---|
2905 | } |
---|
2906 | |
---|
2907 | |
---|
2908 | static PyObject *_wrap_Packet_trace_get_wire_lenth(PyObject *self, PyObject *args) { |
---|
2909 | PyObject *resultobj; |
---|
2910 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
2911 | int result; |
---|
2912 | PyObject * obj0 = 0 ; |
---|
2913 | |
---|
2914 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_wire_lenth",&obj0)) goto fail; |
---|
2915 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t, |
---|
2916 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2917 | result = (int)libtrace_packet_t_trace_get_wire_lenth(arg1); |
---|
2918 | |
---|
2919 | resultobj = SWIG_From_int((int)result); |
---|
2920 | return resultobj; |
---|
2921 | fail: |
---|
2922 | return NULL; |
---|
2923 | } |
---|
2924 | |
---|
2925 | |
---|
2926 | static PyObject *_wrap_Packet_trace_get_link_type(PyObject *self, PyObject *args) { |
---|
2927 | PyObject *resultobj; |
---|
2928 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
2929 | libtrace_linktype_t result; |
---|
2930 | PyObject * obj0 = 0 ; |
---|
2931 | |
---|
2932 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_link_type",&obj0)) goto fail; |
---|
2933 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t, |
---|
2934 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2935 | result = libtrace_packet_t_trace_get_link_type(arg1); |
---|
2936 | |
---|
2937 | { |
---|
2938 | libtrace_linktype_t * resultptr; |
---|
2939 | resultptr = (libtrace_linktype_t *) malloc(sizeof(libtrace_linktype_t)); |
---|
2940 | memmove(resultptr, &result, sizeof(libtrace_linktype_t)); |
---|
2941 | resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_libtrace_linktype_t, 1); |
---|
2942 | } |
---|
2943 | return resultobj; |
---|
2944 | fail: |
---|
2945 | return NULL; |
---|
2946 | } |
---|
2947 | |
---|
2948 | |
---|
2949 | static PyObject *_wrap_Packet_trace_get_direction(PyObject *self, PyObject *args) { |
---|
2950 | PyObject *resultobj; |
---|
2951 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
2952 | int8_t result; |
---|
2953 | PyObject * obj0 = 0 ; |
---|
2954 | |
---|
2955 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_direction",&obj0)) goto fail; |
---|
2956 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t, |
---|
2957 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2958 | result = libtrace_packet_t_trace_get_direction(arg1); |
---|
2959 | |
---|
2960 | { |
---|
2961 | int8_t * resultptr; |
---|
2962 | resultptr = (int8_t *) malloc(sizeof(int8_t)); |
---|
2963 | memmove(resultptr, &result, sizeof(int8_t)); |
---|
2964 | resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_int8_t, 1); |
---|
2965 | } |
---|
2966 | return resultobj; |
---|
2967 | fail: |
---|
2968 | return NULL; |
---|
2969 | } |
---|
2970 | |
---|
2971 | |
---|
2972 | static PyObject *_wrap_Packet_trace_set_direction(PyObject *self, PyObject *args) { |
---|
2973 | PyObject *resultobj; |
---|
2974 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
2975 | int8_t arg2 ; |
---|
2976 | int8_t result; |
---|
2977 | int8_t *argp2 ; |
---|
2978 | PyObject * obj0 = 0 ; |
---|
2979 | PyObject * obj1 = 0 ; |
---|
2980 | |
---|
2981 | if(!PyArg_ParseTuple(args,(char *)"OO:Packet_trace_set_direction",&obj0,&obj1)) goto fail; |
---|
2982 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t, |
---|
2983 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
2984 | if ((SWIG_ConvertPtr(obj1,(void **)(&argp2),SWIGTYPE_p_int8_t, |
---|
2985 | SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; |
---|
2986 | arg2 = *argp2; |
---|
2987 | result = libtrace_packet_t_trace_set_direction(arg1,arg2); |
---|
2988 | |
---|
2989 | { |
---|
2990 | int8_t * resultptr; |
---|
2991 | resultptr = (int8_t *) malloc(sizeof(int8_t)); |
---|
2992 | memmove(resultptr, &result, sizeof(int8_t)); |
---|
2993 | resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_int8_t, 1); |
---|
2994 | } |
---|
2995 | return resultobj; |
---|
2996 | fail: |
---|
2997 | return NULL; |
---|
2998 | } |
---|
2999 | |
---|
3000 | |
---|
3001 | static PyObject *_wrap_Packet_trace_bpf_filter(PyObject *self, PyObject *args) { |
---|
3002 | PyObject *resultobj; |
---|
3003 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3004 | struct libtrace_filter_t *arg2 = (struct libtrace_filter_t *) 0 ; |
---|
3005 | int result; |
---|
3006 | PyObject * obj0 = 0 ; |
---|
3007 | PyObject * obj1 = 0 ; |
---|
3008 | |
---|
3009 | if(!PyArg_ParseTuple(args,(char *)"OO:Packet_trace_bpf_filter",&obj0,&obj1)) goto fail; |
---|
3010 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t, |
---|
3011 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
3012 | if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_libtrace_filter_t, |
---|
3013 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
3014 | result = (int)libtrace_packet_t_trace_bpf_filter(arg1,arg2); |
---|
3015 | |
---|
3016 | resultobj = SWIG_From_int((int)result); |
---|
3017 | return resultobj; |
---|
3018 | fail: |
---|
3019 | return NULL; |
---|
3020 | } |
---|
3021 | |
---|
3022 | |
---|
3023 | static PyObject *_wrap_Packet_trace_get_server_port(PyObject *self, PyObject *args) { |
---|
3024 | PyObject *resultobj; |
---|
3025 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3026 | uint8_t arg2 ; |
---|
3027 | uint16_t arg3 ; |
---|
3028 | uint16_t arg4 ; |
---|
3029 | uint8_t result; |
---|
3030 | PyObject * obj0 = 0 ; |
---|
3031 | PyObject * obj1 = 0 ; |
---|
3032 | PyObject * obj2 = 0 ; |
---|
3033 | PyObject * obj3 = 0 ; |
---|
3034 | |
---|
3035 | if(!PyArg_ParseTuple(args,(char *)"OOOO:Packet_trace_get_server_port",&obj0,&obj1,&obj2,&obj3)) goto fail; |
---|
3036 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t, |
---|
3037 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
3038 | arg2 = (uint8_t)SWIG_As_unsigned_SS_char(obj1); |
---|
3039 | if (PyErr_Occurred()) SWIG_fail; |
---|
3040 | arg3 = (uint16_t)SWIG_As_unsigned_SS_short(obj2); |
---|
3041 | if (PyErr_Occurred()) SWIG_fail; |
---|
3042 | arg4 = (uint16_t)SWIG_As_unsigned_SS_short(obj3); |
---|
3043 | if (PyErr_Occurred()) SWIG_fail; |
---|
3044 | result = (uint8_t)libtrace_packet_t_trace_get_server_port(arg1,arg2,arg3,arg4); |
---|
3045 | |
---|
3046 | resultobj = SWIG_From_unsigned_SS_char((unsigned char)result); |
---|
3047 | return resultobj; |
---|
3048 | fail: |
---|
3049 | return NULL; |
---|
3050 | } |
---|
3051 | |
---|
3052 | |
---|
3053 | static PyObject * Packet_swigregister(PyObject *self, PyObject *args) { |
---|
3054 | PyObject *obj; |
---|
3055 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
3056 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_packet_t, obj); |
---|
3057 | Py_INCREF(obj); |
---|
3058 | return Py_BuildValue((char *)""); |
---|
3059 | } |
---|
3060 | static PyObject *_wrap_new_Filter(PyObject *self, PyObject *args) { |
---|
3061 | PyObject *resultobj; |
---|
3062 | char *arg1 ; |
---|
3063 | struct libtrace_filter_t *result; |
---|
3064 | PyObject * obj0 = 0 ; |
---|
3065 | |
---|
3066 | if(!PyArg_ParseTuple(args,(char *)"O:new_Filter",&obj0)) goto fail; |
---|
3067 | if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) SWIG_fail; |
---|
3068 | result = (struct libtrace_filter_t *)new_libtrace_filter_t(arg1); |
---|
3069 | |
---|
3070 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_libtrace_filter_t, 1); |
---|
3071 | return resultobj; |
---|
3072 | fail: |
---|
3073 | return NULL; |
---|
3074 | } |
---|
3075 | |
---|
3076 | |
---|
3077 | static PyObject *_wrap_Filter_trace_bpf_filter(PyObject *self, PyObject *args) { |
---|
3078 | PyObject *resultobj; |
---|
3079 | struct libtrace_filter_t *arg1 = (struct libtrace_filter_t *) 0 ; |
---|
3080 | struct libtrace_packet_t *arg2 = (struct libtrace_packet_t *) 0 ; |
---|
3081 | int result; |
---|
3082 | PyObject * obj0 = 0 ; |
---|
3083 | PyObject * obj1 = 0 ; |
---|
3084 | |
---|
3085 | if(!PyArg_ParseTuple(args,(char *)"OO:Filter_trace_bpf_filter",&obj0,&obj1)) goto fail; |
---|
3086 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_filter_t, |
---|
3087 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
3088 | if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_libtrace_packet_t, |
---|
3089 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
3090 | result = (int)libtrace_filter_t_trace_bpf_filter(arg1,arg2); |
---|
3091 | |
---|
3092 | resultobj = SWIG_From_int((int)result); |
---|
3093 | return resultobj; |
---|
3094 | fail: |
---|
3095 | return NULL; |
---|
3096 | } |
---|
3097 | |
---|
3098 | |
---|
3099 | static PyObject * Filter_swigregister(PyObject *self, PyObject *args) { |
---|
3100 | PyObject *obj; |
---|
3101 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
3102 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_filter_t, obj); |
---|
3103 | Py_INCREF(obj); |
---|
3104 | return Py_BuildValue((char *)""); |
---|
3105 | } |
---|
3106 | static PyObject *_wrap_new_Trace(PyObject *self, PyObject *args) { |
---|
3107 | PyObject *resultobj; |
---|
3108 | char *arg1 ; |
---|
3109 | struct libtrace_t *result; |
---|
3110 | PyObject * obj0 = 0 ; |
---|
3111 | |
---|
3112 | if(!PyArg_ParseTuple(args,(char *)"O:new_Trace",&obj0)) goto fail; |
---|
3113 | if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) SWIG_fail; |
---|
3114 | result = (struct libtrace_t *)new_libtrace_t(arg1); |
---|
3115 | |
---|
3116 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_libtrace_t, 1); |
---|
3117 | return resultobj; |
---|
3118 | fail: |
---|
3119 | return NULL; |
---|
3120 | } |
---|
3121 | |
---|
3122 | |
---|
3123 | static PyObject *_wrap_delete_Trace(PyObject *self, PyObject *args) { |
---|
3124 | PyObject *resultobj; |
---|
3125 | struct libtrace_t *arg1 = (struct libtrace_t *) 0 ; |
---|
3126 | PyObject * obj0 = 0 ; |
---|
3127 | |
---|
3128 | if(!PyArg_ParseTuple(args,(char *)"O:delete_Trace",&obj0)) goto fail; |
---|
3129 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_t, |
---|
3130 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
3131 | delete_libtrace_t(arg1); |
---|
3132 | |
---|
3133 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
3134 | return resultobj; |
---|
3135 | fail: |
---|
3136 | return NULL; |
---|
3137 | } |
---|
3138 | |
---|
3139 | |
---|
3140 | static PyObject *_wrap_Trace_trace_read_packet(PyObject *self, PyObject *args) { |
---|
3141 | PyObject *resultobj; |
---|
3142 | struct libtrace_t *arg1 = (struct libtrace_t *) 0 ; |
---|
3143 | struct libtrace_packet_t *arg2 = (struct libtrace_packet_t *) 0 ; |
---|
3144 | int result; |
---|
3145 | PyObject * obj0 = 0 ; |
---|
3146 | PyObject * obj1 = 0 ; |
---|
3147 | |
---|
3148 | if(!PyArg_ParseTuple(args,(char *)"OO:Trace_trace_read_packet",&obj0,&obj1)) goto fail; |
---|
3149 | if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_t, |
---|
3150 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
3151 | if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_libtrace_packet_t, |
---|
3152 | SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; |
---|
3153 | result = (int)libtrace_t_trace_read_packet(arg1,arg2); |
---|
3154 | |
---|
3155 | resultobj = SWIG_From_int((int)result); |
---|
3156 | return resultobj; |
---|
3157 | fail: |
---|
3158 | return NULL; |
---|
3159 | } |
---|
3160 | |
---|
3161 | |
---|
3162 | static PyObject * Trace_swigregister(PyObject *self, PyObject *args) { |
---|
3163 | PyObject *obj; |
---|
3164 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
3165 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_t, obj); |
---|
3166 | Py_INCREF(obj); |
---|
3167 | return Py_BuildValue((char *)""); |
---|
3168 | } |
---|
3169 | static PyMethodDef SwigMethods[] = { |
---|
3170 | { (char *)"in_addr_s_addr_set", _wrap_in_addr_s_addr_set, METH_VARARGS, NULL }, |
---|
3171 | { (char *)"in_addr_s_addr_get", _wrap_in_addr_s_addr_get, METH_VARARGS, NULL }, |
---|
3172 | { (char *)"in_addr_swigregister", in_addr_swigregister, METH_VARARGS, NULL }, |
---|
3173 | { (char *)"libtrace_ip_ip_hl_set", _wrap_libtrace_ip_ip_hl_set, METH_VARARGS, NULL }, |
---|
3174 | { (char *)"libtrace_ip_ip_hl_get", _wrap_libtrace_ip_ip_hl_get, METH_VARARGS, NULL }, |
---|
3175 | { (char *)"libtrace_ip_ip_v_set", _wrap_libtrace_ip_ip_v_set, METH_VARARGS, NULL }, |
---|
3176 | { (char *)"libtrace_ip_ip_v_get", _wrap_libtrace_ip_ip_v_get, METH_VARARGS, NULL }, |
---|
3177 | { (char *)"libtrace_ip_ip_tos_set", _wrap_libtrace_ip_ip_tos_set, METH_VARARGS, NULL }, |
---|
3178 | { (char *)"libtrace_ip_ip_tos_get", _wrap_libtrace_ip_ip_tos_get, METH_VARARGS, NULL }, |
---|
3179 | { (char *)"libtrace_ip_ip_ttl_set", _wrap_libtrace_ip_ip_ttl_set, METH_VARARGS, NULL }, |
---|
3180 | { (char *)"libtrace_ip_ip_ttl_get", _wrap_libtrace_ip_ip_ttl_get, METH_VARARGS, NULL }, |
---|
3181 | { (char *)"libtrace_ip_ip_p_set", _wrap_libtrace_ip_ip_p_set, METH_VARARGS, NULL }, |
---|
3182 | { (char *)"libtrace_ip_ip_p_get", _wrap_libtrace_ip_ip_p_get, METH_VARARGS, NULL }, |
---|
3183 | { (char *)"libtrace_ip_ip_sum_get", _wrap_libtrace_ip_ip_sum_get, METH_VARARGS, NULL }, |
---|
3184 | { (char *)"libtrace_ip_ip_len_get", _wrap_libtrace_ip_ip_len_get, METH_VARARGS, NULL }, |
---|
3185 | { (char *)"libtrace_ip_ip_id_get", _wrap_libtrace_ip_ip_id_get, METH_VARARGS, NULL }, |
---|
3186 | { (char *)"libtrace_ip_ip_off_get", _wrap_libtrace_ip_ip_off_get, METH_VARARGS, NULL }, |
---|
3187 | { (char *)"libtrace_ip_ip_src_get", _wrap_libtrace_ip_ip_src_get, METH_VARARGS, NULL }, |
---|
3188 | { (char *)"libtrace_ip_ip_dst_get", _wrap_libtrace_ip_ip_dst_get, METH_VARARGS, NULL }, |
---|
3189 | { (char *)"libtrace_ip_swigregister", libtrace_ip_swigregister, METH_VARARGS, NULL }, |
---|
3190 | { (char *)"libtrace_tcp_res1_set", _wrap_libtrace_tcp_res1_set, METH_VARARGS, NULL }, |
---|
3191 | { (char *)"libtrace_tcp_res1_get", _wrap_libtrace_tcp_res1_get, METH_VARARGS, NULL }, |
---|
3192 | { (char *)"libtrace_tcp_doff_set", _wrap_libtrace_tcp_doff_set, METH_VARARGS, NULL }, |
---|
3193 | { (char *)"libtrace_tcp_doff_get", _wrap_libtrace_tcp_doff_get, METH_VARARGS, NULL }, |
---|
3194 | { (char *)"libtrace_tcp_fin_set", _wrap_libtrace_tcp_fin_set, METH_VARARGS, NULL }, |
---|
3195 | { (char *)"libtrace_tcp_fin_get", _wrap_libtrace_tcp_fin_get, METH_VARARGS, NULL }, |
---|
3196 | { (char *)"libtrace_tcp_syn_set", _wrap_libtrace_tcp_syn_set, METH_VARARGS, NULL }, |
---|
3197 | { (char *)"libtrace_tcp_syn_get", _wrap_libtrace_tcp_syn_get, METH_VARARGS, NULL }, |
---|
3198 | { (char *)"libtrace_tcp_rst_set", _wrap_libtrace_tcp_rst_set, METH_VARARGS, NULL }, |
---|
3199 | { (char *)"libtrace_tcp_rst_get", _wrap_libtrace_tcp_rst_get, METH_VARARGS, NULL }, |
---|
3200 | { (char *)"libtrace_tcp_psh_set", _wrap_libtrace_tcp_psh_set, METH_VARARGS, NULL }, |
---|
3201 | { (char *)"libtrace_tcp_psh_get", _wrap_libtrace_tcp_psh_get, METH_VARARGS, NULL }, |
---|
3202 | { (char *)"libtrace_tcp_ack_set", _wrap_libtrace_tcp_ack_set, METH_VARARGS, NULL }, |
---|
3203 | { (char *)"libtrace_tcp_ack_get", _wrap_libtrace_tcp_ack_get, METH_VARARGS, NULL }, |
---|
3204 | { (char *)"libtrace_tcp_urg_set", _wrap_libtrace_tcp_urg_set, METH_VARARGS, NULL }, |
---|
3205 | { (char *)"libtrace_tcp_urg_get", _wrap_libtrace_tcp_urg_get, METH_VARARGS, NULL }, |
---|
3206 | { (char *)"libtrace_tcp_res2_set", _wrap_libtrace_tcp_res2_set, METH_VARARGS, NULL }, |
---|
3207 | { (char *)"libtrace_tcp_res2_get", _wrap_libtrace_tcp_res2_get, METH_VARARGS, NULL }, |
---|
3208 | { (char *)"libtrace_tcp_source_get", _wrap_libtrace_tcp_source_get, METH_VARARGS, NULL }, |
---|
3209 | { (char *)"libtrace_tcp_dest_get", _wrap_libtrace_tcp_dest_get, METH_VARARGS, NULL }, |
---|
3210 | { (char *)"libtrace_tcp_window_get", _wrap_libtrace_tcp_window_get, METH_VARARGS, NULL }, |
---|
3211 | { (char *)"libtrace_tcp_check_get", _wrap_libtrace_tcp_check_get, METH_VARARGS, NULL }, |
---|
3212 | { (char *)"libtrace_tcp_urg_ptr_get", _wrap_libtrace_tcp_urg_ptr_get, METH_VARARGS, NULL }, |
---|
3213 | { (char *)"libtrace_tcp_seq_get", _wrap_libtrace_tcp_seq_get, METH_VARARGS, NULL }, |
---|
3214 | { (char *)"libtrace_tcp_ack_seq_get", _wrap_libtrace_tcp_ack_seq_get, METH_VARARGS, NULL }, |
---|
3215 | { (char *)"libtrace_tcp_swigregister", libtrace_tcp_swigregister, METH_VARARGS, NULL }, |
---|
3216 | { (char *)"libtrace_udp_source_get", _wrap_libtrace_udp_source_get, METH_VARARGS, NULL }, |
---|
3217 | { (char *)"libtrace_udp_dest_get", _wrap_libtrace_udp_dest_get, METH_VARARGS, NULL }, |
---|
3218 | { (char *)"libtrace_udp_len_get", _wrap_libtrace_udp_len_get, METH_VARARGS, NULL }, |
---|
3219 | { (char *)"libtrace_udp_check_get", _wrap_libtrace_udp_check_get, METH_VARARGS, NULL }, |
---|
3220 | { (char *)"libtrace_udp_swigregister", libtrace_udp_swigregister, METH_VARARGS, NULL }, |
---|
3221 | { (char *)"libtrace_icmp_type_set", _wrap_libtrace_icmp_type_set, METH_VARARGS, NULL }, |
---|
3222 | { (char *)"libtrace_icmp_type_get", _wrap_libtrace_icmp_type_get, METH_VARARGS, NULL }, |
---|
3223 | { (char *)"libtrace_icmp_code_set", _wrap_libtrace_icmp_code_set, METH_VARARGS, NULL }, |
---|
3224 | { (char *)"libtrace_icmp_code_get", _wrap_libtrace_icmp_code_get, METH_VARARGS, NULL }, |
---|
3225 | { (char *)"libtrace_icmp_checksum_set", _wrap_libtrace_icmp_checksum_set, METH_VARARGS, NULL }, |
---|
3226 | { (char *)"libtrace_icmp_checksum_get", _wrap_libtrace_icmp_checksum_get, METH_VARARGS, NULL }, |
---|
3227 | { (char *)"libtrace_icmp_un_get", _wrap_libtrace_icmp_un_get, METH_VARARGS, NULL }, |
---|
3228 | { (char *)"libtrace_icmp_swigregister", libtrace_icmp_swigregister, METH_VARARGS, NULL }, |
---|
3229 | { (char *)"libtrace_icmp_un_gateway_set", _wrap_libtrace_icmp_un_gateway_set, METH_VARARGS, NULL }, |
---|
3230 | { (char *)"libtrace_icmp_un_gateway_get", _wrap_libtrace_icmp_un_gateway_get, METH_VARARGS, NULL }, |
---|
3231 | { (char *)"libtrace_icmp_un_frag_get", _wrap_libtrace_icmp_un_frag_get, METH_VARARGS, NULL }, |
---|
3232 | { (char *)"libtrace_icmp_un_echo_get", _wrap_libtrace_icmp_un_echo_get, METH_VARARGS, NULL }, |
---|
3233 | { (char *)"libtrace_icmp_un_swigregister", libtrace_icmp_un_swigregister, METH_VARARGS, NULL }, |
---|
3234 | { (char *)"libtrace_icmp_un_frag___unused_set", _wrap_libtrace_icmp_un_frag___unused_set, METH_VARARGS, NULL }, |
---|
3235 | { (char *)"libtrace_icmp_un_frag___unused_get", _wrap_libtrace_icmp_un_frag___unused_get, METH_VARARGS, NULL }, |
---|
3236 | { (char *)"libtrace_icmp_un_frag_mtu_set", _wrap_libtrace_icmp_un_frag_mtu_set, METH_VARARGS, NULL }, |
---|
3237 | { (char *)"libtrace_icmp_un_frag_mtu_get", _wrap_libtrace_icmp_un_frag_mtu_get, METH_VARARGS, NULL }, |
---|
3238 | { (char *)"libtrace_icmp_un_frag_swigregister", libtrace_icmp_un_frag_swigregister, METH_VARARGS, NULL }, |
---|
3239 | { (char *)"libtrace_icmp_un_echo_id_set", _wrap_libtrace_icmp_un_echo_id_set, METH_VARARGS, NULL }, |
---|
3240 | { (char *)"libtrace_icmp_un_echo_id_get", _wrap_libtrace_icmp_un_echo_id_get, METH_VARARGS, NULL }, |
---|
3241 | { (char *)"libtrace_icmp_un_echo_sequence_set", _wrap_libtrace_icmp_un_echo_sequence_set, METH_VARARGS, NULL }, |
---|
3242 | { (char *)"libtrace_icmp_un_echo_sequence_get", _wrap_libtrace_icmp_un_echo_sequence_get, METH_VARARGS, NULL }, |
---|
3243 | { (char *)"libtrace_icmp_un_echo_swigregister", libtrace_icmp_un_echo_swigregister, METH_VARARGS, NULL }, |
---|
3244 | { (char *)"new_Packet", _wrap_new_Packet, METH_VARARGS, NULL }, |
---|
3245 | { (char *)"delete_Packet", _wrap_delete_Packet, METH_VARARGS, NULL }, |
---|
3246 | { (char *)"Packet_trace_get_ip", _wrap_Packet_trace_get_ip, METH_VARARGS, NULL }, |
---|
3247 | { (char *)"Packet_trace_get_tcp", _wrap_Packet_trace_get_tcp, METH_VARARGS, NULL }, |
---|
3248 | { (char *)"Packet_trace_get_udp", _wrap_Packet_trace_get_udp, METH_VARARGS, NULL }, |
---|
3249 | { (char *)"Packet_trace_get_icmp", _wrap_Packet_trace_get_icmp, METH_VARARGS, NULL }, |
---|
3250 | { (char *)"Packet_trace_get_link", _wrap_Packet_trace_get_link, METH_VARARGS, NULL }, |
---|
3251 | { (char *)"Packet_trace_get_seconds", _wrap_Packet_trace_get_seconds, METH_VARARGS, NULL }, |
---|
3252 | { (char *)"Packet_trace_get_erf_timestamp", _wrap_Packet_trace_get_erf_timestamp, METH_VARARGS, NULL }, |
---|
3253 | { (char *)"Packet_trace_get_timeval", _wrap_Packet_trace_get_timeval, METH_VARARGS, NULL }, |
---|
3254 | { (char *)"Packet_trace_get_capture_length", _wrap_Packet_trace_get_capture_length, METH_VARARGS, NULL }, |
---|
3255 | { (char *)"Packet_trace_get_wire_lenth", _wrap_Packet_trace_get_wire_lenth, METH_VARARGS, NULL }, |
---|
3256 | { (char *)"Packet_trace_get_link_type", _wrap_Packet_trace_get_link_type, METH_VARARGS, NULL }, |
---|
3257 | { (char *)"Packet_trace_get_direction", _wrap_Packet_trace_get_direction, METH_VARARGS, NULL }, |
---|
3258 | { (char *)"Packet_trace_set_direction", _wrap_Packet_trace_set_direction, METH_VARARGS, NULL }, |
---|
3259 | { (char *)"Packet_trace_bpf_filter", _wrap_Packet_trace_bpf_filter, METH_VARARGS, NULL }, |
---|
3260 | { (char *)"Packet_trace_get_server_port", _wrap_Packet_trace_get_server_port, METH_VARARGS, NULL }, |
---|
3261 | { (char *)"Packet_swigregister", Packet_swigregister, METH_VARARGS, NULL }, |
---|
3262 | { (char *)"new_Filter", _wrap_new_Filter, METH_VARARGS, NULL }, |
---|
3263 | { (char *)"Filter_trace_bpf_filter", _wrap_Filter_trace_bpf_filter, METH_VARARGS, NULL }, |
---|
3264 | { (char *)"Filter_swigregister", Filter_swigregister, METH_VARARGS, NULL }, |
---|
3265 | { (char *)"new_Trace", _wrap_new_Trace, METH_VARARGS, NULL }, |
---|
3266 | { (char *)"delete_Trace", _wrap_delete_Trace, METH_VARARGS, NULL }, |
---|
3267 | { (char *)"Trace_trace_read_packet", _wrap_Trace_trace_read_packet, METH_VARARGS, NULL }, |
---|
3268 | { (char *)"Trace_swigregister", Trace_swigregister, METH_VARARGS, NULL }, |
---|
3269 | { NULL, NULL, 0, NULL } |
---|
3270 | }; |
---|
3271 | |
---|
3272 | |
---|
3273 | /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ |
---|
3274 | |
---|
3275 | static swig_type_info _swigt__p_libtrace_t[] = {{"_p_libtrace_t", 0, "libtrace_t *", 0, 0, 0, 0},{"_p_libtrace_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; |
---|
3276 | static swig_type_info _swigt__p_libtrace_udp[] = {{"_p_libtrace_udp", 0, "struct libtrace_udp *", 0, 0, 0, 0},{"_p_libtrace_udp", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; |
---|
3277 | static swig_type_info _swigt__p_libtrace_ip[] = {{"_p_libtrace_ip", 0, "struct libtrace_ip *", 0, 0, 0, 0},{"_p_libtrace_ip", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; |
---|
3278 | static swig_type_info _swigt__p_libtrace_icmp_un_echo[] = {{"_p_libtrace_icmp_un_echo", 0, "libtrace_icmp_un_echo *", 0, 0, 0, 0},{"_p_libtrace_icmp_un_echo", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; |
---|
3279 | static swig_type_info _swigt__p_libtrace_icmp_un[] = {{"_p_libtrace_icmp_un", 0, "libtrace_icmp_un *", 0, 0, 0, 0},{"_p_libtrace_icmp_un", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; |
---|
3280 | static swig_type_info _swigt__p_uint64_t[] = {{"_p_uint64_t", 0, "uint64_t *", 0, 0, 0, 0},{"_p_uint64_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; |
---|
3281 | static swig_type_info _swigt__p_void[] = {{"_p_void", 0, "void *", 0, 0, 0, 0},{"_p_void", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; |
---|
3282 | static swig_type_info _swigt__p_libtrace_packet_t[] = {{"_p_libtrace_packet_t", 0, "struct libtrace_packet_t *", 0, 0, 0, 0},{"_p_libtrace_packet_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; |
---|
3283 | static swig_type_info _swigt__p_char[] = {{"_p_char", 0, "char *", 0, 0, 0, 0},{"_p_char", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; |
---|
3284 | static swig_type_info _swigt__p_libtrace_icmp_un_frag[] = {{"_p_libtrace_icmp_un_frag", 0, "libtrace_icmp_un_frag *", 0, 0, 0, 0},{"_p_libtrace_icmp_un_frag", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; |
---|
3285 | static swig_type_info _swigt__p_libtrace_filter_t[] = {{"_p_libtrace_filter_t", 0, "libtrace_filter_t *", 0, 0, 0, 0},{"_p_libtrace_filter_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; |
---|
3286 | static swig_type_info _swigt__p_timeval[] = {{"_p_timeval", 0, "struct timeval *", 0, 0, 0, 0},{"_p_timeval", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; |
---|
3287 | static swig_type_info _swigt__p_libtrace_icmp[] = {{"_p_libtrace_icmp", 0, "struct libtrace_icmp *", 0, 0, 0, 0},{"_p_libtrace_icmp", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; |
---|
3288 | static swig_type_info _swigt__p_int8_t[] = {{"_p_int8_t", 0, "int8_t *", 0, 0, 0, 0},{"_p_int8_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; |
---|
3289 | static swig_type_info _swigt__p_in_addr[] = {{"_p_in_addr", 0, "in_addr *", 0, 0, 0, 0},{"_p_in_addr", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; |
---|
3290 | static swig_type_info _swigt__p_libtrace_tcp[] = {{"_p_libtrace_tcp", 0, "struct libtrace_tcp *", 0, 0, 0, 0},{"_p_libtrace_tcp", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; |
---|
3291 | static swig_type_info _swigt__p_libtrace_linktype_t[] = {{"_p_libtrace_linktype_t", 0, "libtrace_linktype_t *", 0, 0, 0, 0},{"_p_libtrace_linktype_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; |
---|
3292 | |
---|
3293 | static swig_type_info *swig_types_initial[] = { |
---|
3294 | _swigt__p_libtrace_t, |
---|
3295 | _swigt__p_libtrace_udp, |
---|
3296 | _swigt__p_libtrace_ip, |
---|
3297 | _swigt__p_libtrace_icmp_un_echo, |
---|
3298 | _swigt__p_libtrace_icmp_un, |
---|
3299 | _swigt__p_uint64_t, |
---|
3300 | _swigt__p_void, |
---|
3301 | _swigt__p_libtrace_packet_t, |
---|
3302 | _swigt__p_char, |
---|
3303 | _swigt__p_libtrace_icmp_un_frag, |
---|
3304 | _swigt__p_libtrace_filter_t, |
---|
3305 | _swigt__p_timeval, |
---|
3306 | _swigt__p_libtrace_icmp, |
---|
3307 | _swigt__p_int8_t, |
---|
3308 | _swigt__p_in_addr, |
---|
3309 | _swigt__p_libtrace_tcp, |
---|
3310 | _swigt__p_libtrace_linktype_t, |
---|
3311 | 0 |
---|
3312 | }; |
---|
3313 | |
---|
3314 | |
---|
3315 | /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ |
---|
3316 | |
---|
3317 | static swig_const_info swig_const_table[] = { |
---|
3318 | {0, 0, 0, 0.0, 0, 0}}; |
---|
3319 | |
---|
3320 | #ifdef __cplusplus |
---|
3321 | } |
---|
3322 | #endif |
---|
3323 | |
---|
3324 | #ifdef __cplusplus |
---|
3325 | extern "C" |
---|
3326 | #endif |
---|
3327 | SWIGEXPORT(void) SWIG_init(void) { |
---|
3328 | static PyObject *SWIG_globals = 0; |
---|
3329 | static int typeinit = 0; |
---|
3330 | PyObject *m, *d; |
---|
3331 | int i; |
---|
3332 | if (!SWIG_globals) SWIG_globals = SWIG_newvarlink(); |
---|
3333 | m = Py_InitModule((char *) SWIG_name, SwigMethods); |
---|
3334 | d = PyModule_GetDict(m); |
---|
3335 | |
---|
3336 | if (!typeinit) { |
---|
3337 | for (i = 0; swig_types_initial[i]; i++) { |
---|
3338 | swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]); |
---|
3339 | } |
---|
3340 | typeinit = 1; |
---|
3341 | } |
---|
3342 | SWIG_InstallConstants(d,swig_const_table); |
---|
3343 | |
---|
3344 | PyDict_SetItemString(d,"IP_RF", SWIG_From_int((int)0x8000)); |
---|
3345 | PyDict_SetItemString(d,"IP_DF", SWIG_From_int((int)0x4000)); |
---|
3346 | PyDict_SetItemString(d,"IP_MF", SWIG_From_int((int)0x2000)); |
---|
3347 | PyDict_SetItemString(d,"IP_OFFMASK", SWIG_From_int((int)0x1fff)); |
---|
3348 | } |
---|
3349 | |
---|