1 | /* ---------------------------------------------------------------------------- |
---|
2 | * This file was automatically generated by SWIG (http://www.swig.org). |
---|
3 | * Version 1.3.27 |
---|
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 | * |
---|
14 | * This section contains generic SWIG labels for method/variable |
---|
15 | * declarations/attributes, and other compiler dependent labels. |
---|
16 | * |
---|
17 | ************************************************************************/ |
---|
18 | |
---|
19 | /* template workaround for compilers that cannot correctly implement the C++ standard */ |
---|
20 | #ifndef SWIGTEMPLATEDISAMBIGUATOR |
---|
21 | # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) |
---|
22 | # define SWIGTEMPLATEDISAMBIGUATOR template |
---|
23 | # else |
---|
24 | # define SWIGTEMPLATEDISAMBIGUATOR |
---|
25 | # endif |
---|
26 | #endif |
---|
27 | |
---|
28 | /* inline attribute */ |
---|
29 | #ifndef SWIGINLINE |
---|
30 | # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) |
---|
31 | # define SWIGINLINE inline |
---|
32 | # else |
---|
33 | # define SWIGINLINE |
---|
34 | # endif |
---|
35 | #endif |
---|
36 | |
---|
37 | /* attribute recognised by some compilers to avoid 'unused' warnings */ |
---|
38 | #ifndef SWIGUNUSED |
---|
39 | # if defined(__GNUC__) || defined(__ICC) |
---|
40 | # define SWIGUNUSED __attribute__ ((unused)) |
---|
41 | # else |
---|
42 | # define SWIGUNUSED |
---|
43 | # endif |
---|
44 | #endif |
---|
45 | |
---|
46 | /* internal SWIG method */ |
---|
47 | #ifndef SWIGINTERN |
---|
48 | # define SWIGINTERN static SWIGUNUSED |
---|
49 | #endif |
---|
50 | |
---|
51 | /* internal inline SWIG method */ |
---|
52 | #ifndef SWIGINTERNINLINE |
---|
53 | # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE |
---|
54 | #endif |
---|
55 | |
---|
56 | /* exporting methods for Windows DLLs */ |
---|
57 | #ifndef SWIGEXPORT |
---|
58 | # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) |
---|
59 | # if defined(STATIC_LINKED) |
---|
60 | # define SWIGEXPORT |
---|
61 | # else |
---|
62 | # define SWIGEXPORT __declspec(dllexport) |
---|
63 | # endif |
---|
64 | # else |
---|
65 | # define SWIGEXPORT |
---|
66 | # endif |
---|
67 | #endif |
---|
68 | |
---|
69 | /* calling conventions for Windows */ |
---|
70 | #ifndef SWIGSTDCALL |
---|
71 | # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) |
---|
72 | # define SWIGSTDCALL __stdcall |
---|
73 | # else |
---|
74 | # define SWIGSTDCALL |
---|
75 | # endif |
---|
76 | #endif |
---|
77 | |
---|
78 | |
---|
79 | |
---|
80 | #include <Python.h> |
---|
81 | |
---|
82 | /*********************************************************************** |
---|
83 | * swigrun.swg |
---|
84 | * |
---|
85 | * This file contains generic CAPI SWIG runtime support for pointer |
---|
86 | * type checking. |
---|
87 | * |
---|
88 | ************************************************************************/ |
---|
89 | |
---|
90 | /* This should only be incremented when either the layout of swig_type_info changes, |
---|
91 | or for whatever reason, the runtime changes incompatibly */ |
---|
92 | #define SWIG_RUNTIME_VERSION "2" |
---|
93 | |
---|
94 | /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ |
---|
95 | #ifdef SWIG_TYPE_TABLE |
---|
96 | # define SWIG_QUOTE_STRING(x) #x |
---|
97 | # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) |
---|
98 | # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) |
---|
99 | #else |
---|
100 | # define SWIG_TYPE_TABLE_NAME |
---|
101 | #endif |
---|
102 | |
---|
103 | /* |
---|
104 | You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for |
---|
105 | creating a static or dynamic library from the swig runtime code. |
---|
106 | In 99.9% of the cases, swig just needs to declare them as 'static'. |
---|
107 | |
---|
108 | But only do this if is strictly necessary, ie, if you have problems |
---|
109 | with your compiler or so. |
---|
110 | */ |
---|
111 | |
---|
112 | #ifndef SWIGRUNTIME |
---|
113 | # define SWIGRUNTIME SWIGINTERN |
---|
114 | #endif |
---|
115 | |
---|
116 | #ifndef SWIGRUNTIMEINLINE |
---|
117 | # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE |
---|
118 | #endif |
---|
119 | |
---|
120 | #include <string.h> |
---|
121 | |
---|
122 | #ifdef __cplusplus |
---|
123 | extern "C" { |
---|
124 | #endif |
---|
125 | |
---|
126 | typedef void *(*swig_converter_func)(void *); |
---|
127 | typedef struct swig_type_info *(*swig_dycast_func)(void **); |
---|
128 | |
---|
129 | /* Structure to store inforomation on one type */ |
---|
130 | typedef struct swig_type_info { |
---|
131 | const char *name; /* mangled name of this type */ |
---|
132 | const char *str; /* human readable name of this type */ |
---|
133 | swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ |
---|
134 | struct swig_cast_info *cast; /* linked list of types that can cast into this type */ |
---|
135 | void *clientdata; /* language specific type data */ |
---|
136 | } swig_type_info; |
---|
137 | |
---|
138 | /* Structure to store a type and conversion function used for casting */ |
---|
139 | typedef struct swig_cast_info { |
---|
140 | swig_type_info *type; /* pointer to type that is equivalent to this type */ |
---|
141 | swig_converter_func converter; /* function to cast the void pointers */ |
---|
142 | struct swig_cast_info *next; /* pointer to next cast in linked list */ |
---|
143 | struct swig_cast_info *prev; /* pointer to the previous cast */ |
---|
144 | } swig_cast_info; |
---|
145 | |
---|
146 | /* Structure used to store module information |
---|
147 | * Each module generates one structure like this, and the runtime collects |
---|
148 | * all of these structures and stores them in a circularly linked list.*/ |
---|
149 | typedef struct swig_module_info { |
---|
150 | swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ |
---|
151 | size_t size; /* Number of types in this module */ |
---|
152 | struct swig_module_info *next; /* Pointer to next element in circularly linked list */ |
---|
153 | swig_type_info **type_initial; /* Array of initially generated type structures */ |
---|
154 | swig_cast_info **cast_initial; /* Array of initially generated casting structures */ |
---|
155 | void *clientdata; /* Language specific module data */ |
---|
156 | } swig_module_info; |
---|
157 | |
---|
158 | |
---|
159 | /* |
---|
160 | Compare two type names skipping the space characters, therefore |
---|
161 | "char*" == "char *" and "Class<int>" == "Class<int >", etc. |
---|
162 | |
---|
163 | Return 0 when the two name types are equivalent, as in |
---|
164 | strncmp, but skipping ' '. |
---|
165 | */ |
---|
166 | SWIGRUNTIME int |
---|
167 | SWIG_TypeNameComp(const char *f1, const char *l1, |
---|
168 | const char *f2, const char *l2) { |
---|
169 | for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { |
---|
170 | while ((*f1 == ' ') && (f1 != l1)) ++f1; |
---|
171 | while ((*f2 == ' ') && (f2 != l2)) ++f2; |
---|
172 | if (*f1 != *f2) return (int)(*f1 - *f2); |
---|
173 | } |
---|
174 | return (l1 - f1) - (l2 - f2); |
---|
175 | } |
---|
176 | |
---|
177 | /* |
---|
178 | Check type equivalence in a name list like <name1>|<name2>|... |
---|
179 | Return 0 if not equal, 1 if equal |
---|
180 | */ |
---|
181 | SWIGRUNTIME int |
---|
182 | SWIG_TypeEquiv(const char *nb, const char *tb) { |
---|
183 | int equiv = 0; |
---|
184 | const char* te = tb + strlen(tb); |
---|
185 | const char* ne = nb; |
---|
186 | while (!equiv && *ne) { |
---|
187 | for (nb = ne; *ne; ++ne) { |
---|
188 | if (*ne == '|') break; |
---|
189 | } |
---|
190 | equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; |
---|
191 | if (*ne) ++ne; |
---|
192 | } |
---|
193 | return equiv; |
---|
194 | } |
---|
195 | |
---|
196 | /* |
---|
197 | Check type equivalence in a name list like <name1>|<name2>|... |
---|
198 | Return 0 if equal, -1 if nb < tb, 1 if nb > tb |
---|
199 | */ |
---|
200 | SWIGRUNTIME int |
---|
201 | SWIG_TypeCompare(const char *nb, const char *tb) { |
---|
202 | int equiv = 0; |
---|
203 | const char* te = tb + strlen(tb); |
---|
204 | const char* ne = nb; |
---|
205 | while (!equiv && *ne) { |
---|
206 | for (nb = ne; *ne; ++ne) { |
---|
207 | if (*ne == '|') break; |
---|
208 | } |
---|
209 | equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; |
---|
210 | if (*ne) ++ne; |
---|
211 | } |
---|
212 | return equiv; |
---|
213 | } |
---|
214 | |
---|
215 | |
---|
216 | /* think of this as a c++ template<> or a scheme macro */ |
---|
217 | #define SWIG_TypeCheck_Template(comparison, ty) \ |
---|
218 | if (ty) { \ |
---|
219 | swig_cast_info *iter = ty->cast; \ |
---|
220 | while (iter) { \ |
---|
221 | if (comparison) { \ |
---|
222 | if (iter == ty->cast) return iter; \ |
---|
223 | /* Move iter to the top of the linked list */ \ |
---|
224 | iter->prev->next = iter->next; \ |
---|
225 | if (iter->next) \ |
---|
226 | iter->next->prev = iter->prev; \ |
---|
227 | iter->next = ty->cast; \ |
---|
228 | iter->prev = 0; \ |
---|
229 | if (ty->cast) ty->cast->prev = iter; \ |
---|
230 | ty->cast = iter; \ |
---|
231 | return iter; \ |
---|
232 | } \ |
---|
233 | iter = iter->next; \ |
---|
234 | } \ |
---|
235 | } \ |
---|
236 | return 0 |
---|
237 | |
---|
238 | /* |
---|
239 | Check the typename |
---|
240 | */ |
---|
241 | SWIGRUNTIME swig_cast_info * |
---|
242 | SWIG_TypeCheck(const char *c, swig_type_info *ty) { |
---|
243 | SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty); |
---|
244 | } |
---|
245 | |
---|
246 | /* Same as previous function, except strcmp is replaced with a pointer comparison */ |
---|
247 | SWIGRUNTIME swig_cast_info * |
---|
248 | SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) { |
---|
249 | SWIG_TypeCheck_Template(iter->type == from, into); |
---|
250 | } |
---|
251 | |
---|
252 | /* |
---|
253 | Cast a pointer up an inheritance hierarchy |
---|
254 | */ |
---|
255 | SWIGRUNTIMEINLINE void * |
---|
256 | SWIG_TypeCast(swig_cast_info *ty, void *ptr) { |
---|
257 | return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr); |
---|
258 | } |
---|
259 | |
---|
260 | /* |
---|
261 | Dynamic pointer casting. Down an inheritance hierarchy |
---|
262 | */ |
---|
263 | SWIGRUNTIME swig_type_info * |
---|
264 | SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { |
---|
265 | swig_type_info *lastty = ty; |
---|
266 | if (!ty || !ty->dcast) return ty; |
---|
267 | while (ty && (ty->dcast)) { |
---|
268 | ty = (*ty->dcast)(ptr); |
---|
269 | if (ty) lastty = ty; |
---|
270 | } |
---|
271 | return lastty; |
---|
272 | } |
---|
273 | |
---|
274 | /* |
---|
275 | Return the name associated with this type |
---|
276 | */ |
---|
277 | SWIGRUNTIMEINLINE const char * |
---|
278 | SWIG_TypeName(const swig_type_info *ty) { |
---|
279 | return ty->name; |
---|
280 | } |
---|
281 | |
---|
282 | /* |
---|
283 | Return the pretty name associated with this type, |
---|
284 | that is an unmangled type name in a form presentable to the user. |
---|
285 | */ |
---|
286 | SWIGRUNTIME const char * |
---|
287 | SWIG_TypePrettyName(const swig_type_info *type) { |
---|
288 | /* The "str" field contains the equivalent pretty names of the |
---|
289 | type, separated by vertical-bar characters. We choose |
---|
290 | to print the last name, as it is often (?) the most |
---|
291 | specific. */ |
---|
292 | if (type->str != NULL) { |
---|
293 | const char *last_name = type->str; |
---|
294 | const char *s; |
---|
295 | for (s = type->str; *s; s++) |
---|
296 | if (*s == '|') last_name = s+1; |
---|
297 | return last_name; |
---|
298 | } |
---|
299 | else |
---|
300 | return type->name; |
---|
301 | } |
---|
302 | |
---|
303 | /* |
---|
304 | Set the clientdata field for a type |
---|
305 | */ |
---|
306 | SWIGRUNTIME void |
---|
307 | SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { |
---|
308 | swig_cast_info *cast = ti->cast; |
---|
309 | /* if (ti->clientdata == clientdata) return; */ |
---|
310 | ti->clientdata = clientdata; |
---|
311 | |
---|
312 | while (cast) { |
---|
313 | if (!cast->converter) { |
---|
314 | swig_type_info *tc = cast->type; |
---|
315 | if (!tc->clientdata) { |
---|
316 | SWIG_TypeClientData(tc, clientdata); |
---|
317 | } |
---|
318 | } |
---|
319 | cast = cast->next; |
---|
320 | } |
---|
321 | } |
---|
322 | |
---|
323 | /* |
---|
324 | Search for a swig_type_info structure only by mangled name |
---|
325 | Search is a O(log #types) |
---|
326 | |
---|
327 | We start searching at module start, and finish searching when start == end. |
---|
328 | Note: if start == end at the beginning of the function, we go all the way around |
---|
329 | the circular list. |
---|
330 | */ |
---|
331 | SWIGRUNTIME swig_type_info * |
---|
332 | SWIG_MangledTypeQueryModule(swig_module_info *start, |
---|
333 | swig_module_info *end, |
---|
334 | const char *name) { |
---|
335 | swig_module_info *iter = start; |
---|
336 | do { |
---|
337 | if (iter->size) { |
---|
338 | register size_t l = 0; |
---|
339 | register size_t r = iter->size - 1; |
---|
340 | do { |
---|
341 | /* since l+r >= 0, we can (>> 1) instead (/ 2) */ |
---|
342 | register size_t i = (l + r) >> 1; |
---|
343 | const char *iname = iter->types[i]->name; |
---|
344 | if (iname) { |
---|
345 | register int compare = strcmp(name, iname); |
---|
346 | if (compare == 0) { |
---|
347 | return iter->types[i]; |
---|
348 | } else if (compare < 0) { |
---|
349 | if (i) { |
---|
350 | r = i - 1; |
---|
351 | } else { |
---|
352 | break; |
---|
353 | } |
---|
354 | } else if (compare > 0) { |
---|
355 | l = i + 1; |
---|
356 | } |
---|
357 | } else { |
---|
358 | break; /* should never happen */ |
---|
359 | } |
---|
360 | } while (l <= r); |
---|
361 | } |
---|
362 | iter = iter->next; |
---|
363 | } while (iter != end); |
---|
364 | return 0; |
---|
365 | } |
---|
366 | |
---|
367 | /* |
---|
368 | Search for a swig_type_info structure for either a mangled name or a human readable name. |
---|
369 | It first searches the mangled names of the types, which is a O(log #types) |
---|
370 | If a type is not found it then searches the human readable names, which is O(#types). |
---|
371 | |
---|
372 | We start searching at module start, and finish searching when start == end. |
---|
373 | Note: if start == end at the beginning of the function, we go all the way around |
---|
374 | the circular list. |
---|
375 | */ |
---|
376 | SWIGRUNTIME swig_type_info * |
---|
377 | SWIG_TypeQueryModule(swig_module_info *start, |
---|
378 | swig_module_info *end, |
---|
379 | const char *name) { |
---|
380 | /* STEP 1: Search the name field using binary search */ |
---|
381 | swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); |
---|
382 | if (ret) { |
---|
383 | return ret; |
---|
384 | } else { |
---|
385 | /* STEP 2: If the type hasn't been found, do a complete search |
---|
386 | of the str field (the human readable name) */ |
---|
387 | swig_module_info *iter = start; |
---|
388 | do { |
---|
389 | register size_t i = 0; |
---|
390 | for (; i < iter->size; ++i) { |
---|
391 | if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) |
---|
392 | return iter->types[i]; |
---|
393 | } |
---|
394 | iter = iter->next; |
---|
395 | } while (iter != end); |
---|
396 | } |
---|
397 | |
---|
398 | /* neither found a match */ |
---|
399 | return 0; |
---|
400 | } |
---|
401 | |
---|
402 | |
---|
403 | /* |
---|
404 | Pack binary data into a string |
---|
405 | */ |
---|
406 | SWIGRUNTIME char * |
---|
407 | SWIG_PackData(char *c, void *ptr, size_t sz) { |
---|
408 | static const char hex[17] = "0123456789abcdef"; |
---|
409 | register const unsigned char *u = (unsigned char *) ptr; |
---|
410 | register const unsigned char *eu = u + sz; |
---|
411 | for (; u != eu; ++u) { |
---|
412 | register unsigned char uu = *u; |
---|
413 | *(c++) = hex[(uu & 0xf0) >> 4]; |
---|
414 | *(c++) = hex[uu & 0xf]; |
---|
415 | } |
---|
416 | return c; |
---|
417 | } |
---|
418 | |
---|
419 | /* |
---|
420 | Unpack binary data from a string |
---|
421 | */ |
---|
422 | SWIGRUNTIME const char * |
---|
423 | SWIG_UnpackData(const char *c, void *ptr, size_t sz) { |
---|
424 | register unsigned char *u = (unsigned char *) ptr; |
---|
425 | register const unsigned char *eu = u + sz; |
---|
426 | for (; u != eu; ++u) { |
---|
427 | register char d = *(c++); |
---|
428 | register unsigned char uu = 0; |
---|
429 | if ((d >= '0') && (d <= '9')) |
---|
430 | uu = ((d - '0') << 4); |
---|
431 | else if ((d >= 'a') && (d <= 'f')) |
---|
432 | uu = ((d - ('a'-10)) << 4); |
---|
433 | else |
---|
434 | return (char *) 0; |
---|
435 | d = *(c++); |
---|
436 | if ((d >= '0') && (d <= '9')) |
---|
437 | uu |= (d - '0'); |
---|
438 | else if ((d >= 'a') && (d <= 'f')) |
---|
439 | uu |= (d - ('a'-10)); |
---|
440 | else |
---|
441 | return (char *) 0; |
---|
442 | *u = uu; |
---|
443 | } |
---|
444 | return c; |
---|
445 | } |
---|
446 | |
---|
447 | /* |
---|
448 | Pack 'void *' into a string buffer. |
---|
449 | */ |
---|
450 | SWIGRUNTIME char * |
---|
451 | SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { |
---|
452 | char *r = buff; |
---|
453 | if ((2*sizeof(void *) + 2) > bsz) return 0; |
---|
454 | *(r++) = '_'; |
---|
455 | r = SWIG_PackData(r,&ptr,sizeof(void *)); |
---|
456 | if (strlen(name) + 1 > (bsz - (r - buff))) return 0; |
---|
457 | strcpy(r,name); |
---|
458 | return buff; |
---|
459 | } |
---|
460 | |
---|
461 | SWIGRUNTIME const char * |
---|
462 | SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { |
---|
463 | if (*c != '_') { |
---|
464 | if (strcmp(c,"NULL") == 0) { |
---|
465 | *ptr = (void *) 0; |
---|
466 | return name; |
---|
467 | } else { |
---|
468 | return 0; |
---|
469 | } |
---|
470 | } |
---|
471 | return SWIG_UnpackData(++c,ptr,sizeof(void *)); |
---|
472 | } |
---|
473 | |
---|
474 | SWIGRUNTIME char * |
---|
475 | SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { |
---|
476 | char *r = buff; |
---|
477 | size_t lname = (name ? strlen(name) : 0); |
---|
478 | if ((2*sz + 2 + lname) > bsz) return 0; |
---|
479 | *(r++) = '_'; |
---|
480 | r = SWIG_PackData(r,ptr,sz); |
---|
481 | if (lname) { |
---|
482 | strncpy(r,name,lname+1); |
---|
483 | } else { |
---|
484 | *r = 0; |
---|
485 | } |
---|
486 | return buff; |
---|
487 | } |
---|
488 | |
---|
489 | SWIGRUNTIME const char * |
---|
490 | SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { |
---|
491 | if (*c != '_') { |
---|
492 | if (strcmp(c,"NULL") == 0) { |
---|
493 | memset(ptr,0,sz); |
---|
494 | return name; |
---|
495 | } else { |
---|
496 | return 0; |
---|
497 | } |
---|
498 | } |
---|
499 | return SWIG_UnpackData(++c,ptr,sz); |
---|
500 | } |
---|
501 | |
---|
502 | #ifdef __cplusplus |
---|
503 | } |
---|
504 | #endif |
---|
505 | |
---|
506 | /* ----------------------------------------------------------------------------- |
---|
507 | * SWIG API. Portion that goes into the runtime |
---|
508 | * ----------------------------------------------------------------------------- */ |
---|
509 | |
---|
510 | #ifdef __cplusplus |
---|
511 | extern "C" { |
---|
512 | #endif |
---|
513 | |
---|
514 | /* ----------------------------------------------------------------------------- |
---|
515 | * for internal method declarations |
---|
516 | * ----------------------------------------------------------------------------- */ |
---|
517 | |
---|
518 | #ifndef SWIGINTERN |
---|
519 | # define SWIGINTERN static SWIGUNUSED |
---|
520 | #endif |
---|
521 | |
---|
522 | #ifndef SWIGINTERNINLINE |
---|
523 | # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE |
---|
524 | #endif |
---|
525 | |
---|
526 | /* |
---|
527 | Exception handling in wrappers |
---|
528 | */ |
---|
529 | #define SWIG_fail goto fail |
---|
530 | #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) |
---|
531 | #define SWIG_append_errmsg(msg) SWIG_Python_AddErrMesg(msg,0) |
---|
532 | #define SWIG_preppend_errmsg(msg) SWIG_Python_AddErrMesg(msg,1) |
---|
533 | #define SWIG_type_error(type,obj) SWIG_Python_TypeError(type,obj) |
---|
534 | #define SWIG_null_ref(type) SWIG_Python_NullRef(type) |
---|
535 | |
---|
536 | /* |
---|
537 | Contract support |
---|
538 | */ |
---|
539 | #define SWIG_contract_assert(expr, msg) \ |
---|
540 | if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg ); goto fail; } else |
---|
541 | |
---|
542 | /* ----------------------------------------------------------------------------- |
---|
543 | * Constant declarations |
---|
544 | * ----------------------------------------------------------------------------- */ |
---|
545 | |
---|
546 | /* Constant Types */ |
---|
547 | #define SWIG_PY_INT 1 |
---|
548 | #define SWIG_PY_FLOAT 2 |
---|
549 | #define SWIG_PY_STRING 3 |
---|
550 | #define SWIG_PY_POINTER 4 |
---|
551 | #define SWIG_PY_BINARY 5 |
---|
552 | |
---|
553 | /* Constant information structure */ |
---|
554 | typedef struct swig_const_info { |
---|
555 | int type; |
---|
556 | char *name; |
---|
557 | long lvalue; |
---|
558 | double dvalue; |
---|
559 | void *pvalue; |
---|
560 | swig_type_info **ptype; |
---|
561 | } swig_const_info; |
---|
562 | |
---|
563 | |
---|
564 | /* ----------------------------------------------------------------------------- |
---|
565 | * Alloc. memory flags |
---|
566 | * ----------------------------------------------------------------------------- */ |
---|
567 | #define SWIG_OLDOBJ 1 |
---|
568 | #define SWIG_NEWOBJ SWIG_OLDOBJ + 1 |
---|
569 | #define SWIG_PYSTR SWIG_NEWOBJ + 1 |
---|
570 | |
---|
571 | #ifdef __cplusplus |
---|
572 | } |
---|
573 | #endif |
---|
574 | |
---|
575 | |
---|
576 | /*********************************************************************** |
---|
577 | * pyrun.swg |
---|
578 | * |
---|
579 | * This file contains the runtime support for Python modules |
---|
580 | * and includes code for managing global variables and pointer |
---|
581 | * type checking. |
---|
582 | * |
---|
583 | * Author : David Beazley (beazley@cs.uchicago.edu) |
---|
584 | ************************************************************************/ |
---|
585 | |
---|
586 | /* Common SWIG API */ |
---|
587 | #define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Python_ConvertPtr(obj, pp, type, flags) |
---|
588 | #define SWIG_NewPointerObj(p, type, flags) SWIG_Python_NewPointerObj(p, type, flags) |
---|
589 | #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) |
---|
590 | |
---|
591 | |
---|
592 | /* Python-specific SWIG API */ |
---|
593 | #define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) SWIG_Python_ConvertPacked(obj, ptr, sz, ty, flags) |
---|
594 | #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) |
---|
595 | |
---|
596 | /* Runtime API */ |
---|
597 | #define SWIG_GetModule(clientdata) SWIG_Python_GetModule() |
---|
598 | #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) |
---|
599 | |
---|
600 | /* ----------------------------------------------------------------------------- |
---|
601 | * Pointer declarations |
---|
602 | * ----------------------------------------------------------------------------- */ |
---|
603 | /* |
---|
604 | Use SWIG_NO_COBJECT_TYPES to force the use of strings to represent |
---|
605 | C/C++ pointers in the python side. Very useful for debugging, but |
---|
606 | not always safe. |
---|
607 | */ |
---|
608 | #if !defined(SWIG_NO_COBJECT_TYPES) && !defined(SWIG_COBJECT_TYPES) |
---|
609 | # define SWIG_COBJECT_TYPES |
---|
610 | #endif |
---|
611 | |
---|
612 | /* Flags for pointer conversion */ |
---|
613 | #define SWIG_POINTER_EXCEPTION 0x1 |
---|
614 | #define SWIG_POINTER_DISOWN 0x2 |
---|
615 | |
---|
616 | |
---|
617 | /* Add PyOS_snprintf for old Pythons */ |
---|
618 | #if PY_VERSION_HEX < 0x02020000 |
---|
619 | #define PyOS_snprintf snprintf |
---|
620 | #endif |
---|
621 | |
---|
622 | #ifdef __cplusplus |
---|
623 | extern "C" { |
---|
624 | #endif |
---|
625 | |
---|
626 | /* ----------------------------------------------------------------------------- |
---|
627 | * Create a new pointer string |
---|
628 | * ----------------------------------------------------------------------------- */ |
---|
629 | #ifndef SWIG_BUFFER_SIZE |
---|
630 | #define SWIG_BUFFER_SIZE 1024 |
---|
631 | #endif |
---|
632 | |
---|
633 | /* A crude PyString_FromFormat implementation for old Pythons */ |
---|
634 | #if PY_VERSION_HEX < 0x02020000 |
---|
635 | static PyObject * |
---|
636 | PyString_FromFormat(const char *fmt, ...) { |
---|
637 | va_list ap; |
---|
638 | char buf[SWIG_BUFFER_SIZE * 2]; |
---|
639 | int res; |
---|
640 | va_start(ap, fmt); |
---|
641 | res = vsnprintf(buf, sizeof(buf), fmt, ap); |
---|
642 | va_end(ap); |
---|
643 | return (res < 0 || res >= sizeof(buf)) ? 0 : PyString_FromString(buf); |
---|
644 | } |
---|
645 | #endif |
---|
646 | |
---|
647 | #if PY_VERSION_HEX < 0x01060000 |
---|
648 | #define PyObject_Del(op) PyMem_DEL((op)) |
---|
649 | #endif |
---|
650 | |
---|
651 | #if defined(SWIG_COBJECT_TYPES) |
---|
652 | #if !defined(SWIG_COBJECT_PYTHON) |
---|
653 | /* ----------------------------------------------------------------------------- |
---|
654 | * Implements a simple Swig Object type, and use it instead of PyCObject |
---|
655 | * ----------------------------------------------------------------------------- */ |
---|
656 | |
---|
657 | typedef struct { |
---|
658 | PyObject_HEAD |
---|
659 | void *ptr; |
---|
660 | const char *desc; |
---|
661 | } PySwigObject; |
---|
662 | |
---|
663 | /* Declarations for objects of type PySwigObject */ |
---|
664 | |
---|
665 | SWIGRUNTIME int |
---|
666 | PySwigObject_print(PySwigObject *v, FILE *fp, int flags) |
---|
667 | { |
---|
668 | char result[SWIG_BUFFER_SIZE]; |
---|
669 | flags = flags; |
---|
670 | if (SWIG_PackVoidPtr(result, v->ptr, v->desc, sizeof(result))) { |
---|
671 | fputs("<Swig Object at ", fp); fputs(result, fp); fputs(">", fp); |
---|
672 | return 0; |
---|
673 | } else { |
---|
674 | return 1; |
---|
675 | } |
---|
676 | } |
---|
677 | |
---|
678 | SWIGRUNTIME PyObject * |
---|
679 | PySwigObject_repr(PySwigObject *v) |
---|
680 | { |
---|
681 | char result[SWIG_BUFFER_SIZE]; |
---|
682 | return SWIG_PackVoidPtr(result, v->ptr, v->desc, sizeof(result)) ? |
---|
683 | PyString_FromFormat("<Swig Object at %s>", result) : 0; |
---|
684 | } |
---|
685 | |
---|
686 | SWIGRUNTIME PyObject * |
---|
687 | PySwigObject_str(PySwigObject *v) |
---|
688 | { |
---|
689 | char result[SWIG_BUFFER_SIZE]; |
---|
690 | return SWIG_PackVoidPtr(result, v->ptr, v->desc, sizeof(result)) ? |
---|
691 | PyString_FromString(result) : 0; |
---|
692 | } |
---|
693 | |
---|
694 | SWIGRUNTIME PyObject * |
---|
695 | PySwigObject_long(PySwigObject *v) |
---|
696 | { |
---|
697 | return PyLong_FromVoidPtr(v->ptr); |
---|
698 | } |
---|
699 | |
---|
700 | SWIGRUNTIME PyObject * |
---|
701 | PySwigObject_format(const char* fmt, PySwigObject *v) |
---|
702 | { |
---|
703 | PyObject *res = NULL; |
---|
704 | PyObject *args = PyTuple_New(1); |
---|
705 | if (args && (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0)) { |
---|
706 | PyObject *ofmt = PyString_FromString(fmt); |
---|
707 | if (ofmt) { |
---|
708 | res = PyString_Format(ofmt,args); |
---|
709 | Py_DECREF(ofmt); |
---|
710 | } |
---|
711 | Py_DECREF(args); |
---|
712 | } |
---|
713 | return res; |
---|
714 | } |
---|
715 | |
---|
716 | SWIGRUNTIME PyObject * |
---|
717 | PySwigObject_oct(PySwigObject *v) |
---|
718 | { |
---|
719 | return PySwigObject_format("%o",v); |
---|
720 | } |
---|
721 | |
---|
722 | SWIGRUNTIME PyObject * |
---|
723 | PySwigObject_hex(PySwigObject *v) |
---|
724 | { |
---|
725 | return PySwigObject_format("%x",v); |
---|
726 | } |
---|
727 | |
---|
728 | SWIGRUNTIME int |
---|
729 | PySwigObject_compare(PySwigObject *v, PySwigObject *w) |
---|
730 | { |
---|
731 | int c = strcmp(v->desc, w->desc); |
---|
732 | if (c) { |
---|
733 | return (c > 0) ? 1 : -1; |
---|
734 | } else { |
---|
735 | void *i = v->ptr; |
---|
736 | void *j = w->ptr; |
---|
737 | return (i < j) ? -1 : ((i > j) ? 1 : 0); |
---|
738 | } |
---|
739 | } |
---|
740 | |
---|
741 | SWIGRUNTIME void |
---|
742 | PySwigObject_dealloc(PySwigObject *self) |
---|
743 | { |
---|
744 | PyObject_Del(self); |
---|
745 | } |
---|
746 | |
---|
747 | SWIGRUNTIME PyTypeObject* |
---|
748 | PySwigObject_type(void) { |
---|
749 | static char pyswigobject_type__doc__[] = |
---|
750 | "Swig object carries a C/C++ instance pointer"; |
---|
751 | |
---|
752 | static PyNumberMethods PySwigObject_as_number = { |
---|
753 | (binaryfunc)0, /*nb_add*/ |
---|
754 | (binaryfunc)0, /*nb_subtract*/ |
---|
755 | (binaryfunc)0, /*nb_multiply*/ |
---|
756 | (binaryfunc)0, /*nb_divide*/ |
---|
757 | (binaryfunc)0, /*nb_remainder*/ |
---|
758 | (binaryfunc)0, /*nb_divmod*/ |
---|
759 | (ternaryfunc)0,/*nb_power*/ |
---|
760 | (unaryfunc)0, /*nb_negative*/ |
---|
761 | (unaryfunc)0, /*nb_positive*/ |
---|
762 | (unaryfunc)0, /*nb_absolute*/ |
---|
763 | (inquiry)0, /*nb_nonzero*/ |
---|
764 | 0, /*nb_invert*/ |
---|
765 | 0, /*nb_lshift*/ |
---|
766 | 0, /*nb_rshift*/ |
---|
767 | 0, /*nb_and*/ |
---|
768 | 0, /*nb_xor*/ |
---|
769 | 0, /*nb_or*/ |
---|
770 | (coercion)0, /*nb_coerce*/ |
---|
771 | (unaryfunc)PySwigObject_long, /*nb_int*/ |
---|
772 | (unaryfunc)PySwigObject_long, /*nb_long*/ |
---|
773 | (unaryfunc)0, /*nb_float*/ |
---|
774 | (unaryfunc)PySwigObject_oct, /*nb_oct*/ |
---|
775 | (unaryfunc)PySwigObject_hex, /*nb_hex*/ |
---|
776 | #if PY_VERSION_HEX >= 0x02020000 |
---|
777 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ |
---|
778 | #elif PY_VERSION_HEX >= 0x02000000 |
---|
779 | 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ |
---|
780 | #endif |
---|
781 | }; |
---|
782 | |
---|
783 | static PyTypeObject pyswigobject_type |
---|
784 | #if !defined(__cplusplus) |
---|
785 | ; |
---|
786 | static int type_init = 0; |
---|
787 | if (!type_init) { |
---|
788 | PyTypeObject tmp |
---|
789 | #endif |
---|
790 | = { |
---|
791 | PyObject_HEAD_INIT(&PyType_Type) |
---|
792 | 0, /*ob_size*/ |
---|
793 | (char *)"PySwigObject", /*tp_name*/ |
---|
794 | sizeof(PySwigObject), /*tp_basicsize*/ |
---|
795 | 0, /*tp_itemsize*/ |
---|
796 | /* methods */ |
---|
797 | (destructor)PySwigObject_dealloc, /*tp_dealloc*/ |
---|
798 | (printfunc)PySwigObject_print, /*tp_print*/ |
---|
799 | (getattrfunc)0, /*tp_getattr*/ |
---|
800 | (setattrfunc)0, /*tp_setattr*/ |
---|
801 | (cmpfunc)PySwigObject_compare, /*tp_compare*/ |
---|
802 | (reprfunc)PySwigObject_repr, /*tp_repr*/ |
---|
803 | &PySwigObject_as_number, /*tp_as_number*/ |
---|
804 | 0, /*tp_as_sequence*/ |
---|
805 | 0, /*tp_as_mapping*/ |
---|
806 | (hashfunc)0, /*tp_hash*/ |
---|
807 | (ternaryfunc)0, /*tp_call*/ |
---|
808 | (reprfunc)PySwigObject_str, /*tp_str*/ |
---|
809 | /* Space for future expansion */ |
---|
810 | 0,0,0,0, |
---|
811 | pyswigobject_type__doc__, /* Documentation string */ |
---|
812 | #if PY_VERSION_HEX >= 0x02000000 |
---|
813 | 0, /* tp_traverse */ |
---|
814 | 0, /* tp_clear */ |
---|
815 | #endif |
---|
816 | #if PY_VERSION_HEX >= 0x02010000 |
---|
817 | 0, /* tp_richcompare */ |
---|
818 | 0, /* tp_weaklistoffset */ |
---|
819 | #endif |
---|
820 | #if PY_VERSION_HEX >= 0x02020000 |
---|
821 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ |
---|
822 | #endif |
---|
823 | #if PY_VERSION_HEX >= 0x02030000 |
---|
824 | 0, /* tp_del */ |
---|
825 | #endif |
---|
826 | #ifdef COUNT_ALLOCS |
---|
827 | 0,0,0,0 /* tp_alloc -> tp_next */ |
---|
828 | #endif |
---|
829 | }; |
---|
830 | #if !defined(__cplusplus) |
---|
831 | pyswigobject_type = tmp; |
---|
832 | type_init = 1; |
---|
833 | } |
---|
834 | #endif |
---|
835 | return &pyswigobject_type; |
---|
836 | } |
---|
837 | |
---|
838 | SWIGRUNTIME PyObject * |
---|
839 | PySwigObject_FromVoidPtrAndDesc(void *ptr, const char *desc) |
---|
840 | { |
---|
841 | PySwigObject *self = PyObject_NEW(PySwigObject, PySwigObject_type()); |
---|
842 | if (self) { |
---|
843 | self->ptr = ptr; |
---|
844 | self->desc = desc; |
---|
845 | } |
---|
846 | return (PyObject *)self; |
---|
847 | } |
---|
848 | |
---|
849 | SWIGRUNTIMEINLINE void * |
---|
850 | PySwigObject_AsVoidPtr(PyObject *self) |
---|
851 | { |
---|
852 | return ((PySwigObject *)self)->ptr; |
---|
853 | } |
---|
854 | |
---|
855 | SWIGRUNTIMEINLINE const char * |
---|
856 | PySwigObject_GetDesc(PyObject *self) |
---|
857 | { |
---|
858 | return ((PySwigObject *)self)->desc; |
---|
859 | } |
---|
860 | |
---|
861 | SWIGRUNTIMEINLINE int |
---|
862 | PySwigObject_Check(PyObject *op) { |
---|
863 | return ((op)->ob_type == PySwigObject_type()) |
---|
864 | || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0); |
---|
865 | } |
---|
866 | |
---|
867 | /* ----------------------------------------------------------------------------- |
---|
868 | * Implements a simple Swig Packed type, and use it instead of string |
---|
869 | * ----------------------------------------------------------------------------- */ |
---|
870 | |
---|
871 | typedef struct { |
---|
872 | PyObject_HEAD |
---|
873 | void *pack; |
---|
874 | const char *desc; |
---|
875 | size_t size; |
---|
876 | } PySwigPacked; |
---|
877 | |
---|
878 | SWIGRUNTIME int |
---|
879 | PySwigPacked_print(PySwigPacked *v, FILE *fp, int flags) |
---|
880 | { |
---|
881 | char result[SWIG_BUFFER_SIZE]; |
---|
882 | flags = flags; |
---|
883 | fputs("<Swig Packed ", fp); |
---|
884 | if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { |
---|
885 | fputs("at ", fp); |
---|
886 | fputs(result, fp); |
---|
887 | } |
---|
888 | fputs(v->desc,fp); |
---|
889 | fputs(">", fp); |
---|
890 | return 0; |
---|
891 | } |
---|
892 | |
---|
893 | SWIGRUNTIME PyObject * |
---|
894 | PySwigPacked_repr(PySwigPacked *v) |
---|
895 | { |
---|
896 | char result[SWIG_BUFFER_SIZE]; |
---|
897 | if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { |
---|
898 | return PyString_FromFormat("<Swig Packed at %s%s>", result, v->desc); |
---|
899 | } else { |
---|
900 | return PyString_FromFormat("<Swig Packed %s>", v->desc); |
---|
901 | } |
---|
902 | } |
---|
903 | |
---|
904 | SWIGRUNTIME PyObject * |
---|
905 | PySwigPacked_str(PySwigPacked *v) |
---|
906 | { |
---|
907 | char result[SWIG_BUFFER_SIZE]; |
---|
908 | if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ |
---|
909 | return PyString_FromFormat("%s%s", result, v->desc); |
---|
910 | } else { |
---|
911 | return PyString_FromString(v->desc); |
---|
912 | } |
---|
913 | } |
---|
914 | |
---|
915 | SWIGRUNTIME int |
---|
916 | PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w) |
---|
917 | { |
---|
918 | int c = strcmp(v->desc, w->desc); |
---|
919 | if (c) { |
---|
920 | return (c > 0) ? 1 : -1; |
---|
921 | } else { |
---|
922 | size_t i = v->size; |
---|
923 | size_t j = w->size; |
---|
924 | int s = (i < j) ? -1 : ((i > j) ? 1 : 0); |
---|
925 | return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); |
---|
926 | } |
---|
927 | } |
---|
928 | |
---|
929 | SWIGRUNTIME void |
---|
930 | PySwigPacked_dealloc(PySwigPacked *self) |
---|
931 | { |
---|
932 | free(self->pack); |
---|
933 | PyObject_Del(self); |
---|
934 | } |
---|
935 | |
---|
936 | SWIGRUNTIME PyTypeObject* |
---|
937 | PySwigPacked_type(void) { |
---|
938 | static char pyswigpacked_type__doc__[] = |
---|
939 | "Swig object carries a C/C++ instance pointer"; |
---|
940 | static PyTypeObject pyswigpacked_type |
---|
941 | #if !defined(__cplusplus) |
---|
942 | ; |
---|
943 | static int type_init = 0; |
---|
944 | if (!type_init) { |
---|
945 | PyTypeObject tmp |
---|
946 | #endif |
---|
947 | = { |
---|
948 | PyObject_HEAD_INIT(&PyType_Type) |
---|
949 | 0, /*ob_size*/ |
---|
950 | (char *)"PySwigPacked", /*tp_name*/ |
---|
951 | sizeof(PySwigPacked), /*tp_basicsize*/ |
---|
952 | 0, /*tp_itemsize*/ |
---|
953 | /* methods */ |
---|
954 | (destructor)PySwigPacked_dealloc, /*tp_dealloc*/ |
---|
955 | (printfunc)PySwigPacked_print, /*tp_print*/ |
---|
956 | (getattrfunc)0, /*tp_getattr*/ |
---|
957 | (setattrfunc)0, /*tp_setattr*/ |
---|
958 | (cmpfunc)PySwigPacked_compare, /*tp_compare*/ |
---|
959 | (reprfunc)PySwigPacked_repr, /*tp_repr*/ |
---|
960 | 0, /*tp_as_number*/ |
---|
961 | 0, /*tp_as_sequence*/ |
---|
962 | 0, /*tp_as_mapping*/ |
---|
963 | (hashfunc)0, /*tp_hash*/ |
---|
964 | (ternaryfunc)0, /*tp_call*/ |
---|
965 | (reprfunc)PySwigPacked_str, /*tp_str*/ |
---|
966 | /* Space for future expansion */ |
---|
967 | 0,0,0,0, |
---|
968 | pyswigpacked_type__doc__, /* Documentation string */ |
---|
969 | #if PY_VERSION_HEX >= 0x02000000 |
---|
970 | 0, /* tp_traverse */ |
---|
971 | 0, /* tp_clear */ |
---|
972 | #endif |
---|
973 | #if PY_VERSION_HEX >= 0x02010000 |
---|
974 | 0, /* tp_richcompare */ |
---|
975 | 0, /* tp_weaklistoffset */ |
---|
976 | #endif |
---|
977 | #if PY_VERSION_HEX >= 0x02020000 |
---|
978 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ |
---|
979 | #endif |
---|
980 | #if PY_VERSION_HEX >= 0x02030000 |
---|
981 | 0, /* tp_del */ |
---|
982 | #endif |
---|
983 | #ifdef COUNT_ALLOCS |
---|
984 | 0,0,0,0 /* tp_alloc -> tp_next */ |
---|
985 | #endif |
---|
986 | }; |
---|
987 | #if !defined(__cplusplus) |
---|
988 | pyswigpacked_type = tmp; |
---|
989 | type_init = 1; |
---|
990 | } |
---|
991 | #endif |
---|
992 | return &pyswigpacked_type; |
---|
993 | } |
---|
994 | |
---|
995 | SWIGRUNTIME PyObject * |
---|
996 | PySwigPacked_FromDataAndDesc(void *ptr, size_t size, const char *desc) |
---|
997 | { |
---|
998 | PySwigPacked *self = PyObject_NEW(PySwigPacked, PySwigPacked_type()); |
---|
999 | if (self == NULL) { |
---|
1000 | return NULL; |
---|
1001 | } else { |
---|
1002 | void *pack = malloc(size); |
---|
1003 | if (pack) { |
---|
1004 | memcpy(pack, ptr, size); |
---|
1005 | self->pack = pack; |
---|
1006 | self->desc = desc; |
---|
1007 | self->size = size; |
---|
1008 | return (PyObject *) self; |
---|
1009 | } |
---|
1010 | return NULL; |
---|
1011 | } |
---|
1012 | } |
---|
1013 | |
---|
1014 | SWIGRUNTIMEINLINE const char * |
---|
1015 | PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size) |
---|
1016 | { |
---|
1017 | PySwigPacked *self = (PySwigPacked *)obj; |
---|
1018 | if (self->size != size) return 0; |
---|
1019 | memcpy(ptr, self->pack, size); |
---|
1020 | return self->desc; |
---|
1021 | } |
---|
1022 | |
---|
1023 | SWIGRUNTIMEINLINE const char * |
---|
1024 | PySwigPacked_GetDesc(PyObject *self) |
---|
1025 | { |
---|
1026 | return ((PySwigPacked *)self)->desc; |
---|
1027 | } |
---|
1028 | |
---|
1029 | SWIGRUNTIMEINLINE int |
---|
1030 | PySwigPacked_Check(PyObject *op) { |
---|
1031 | return ((op)->ob_type == PySwigPacked_type()) |
---|
1032 | || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0); |
---|
1033 | } |
---|
1034 | |
---|
1035 | #else |
---|
1036 | /* ----------------------------------------------------------------------------- |
---|
1037 | * Use the old Python PyCObject instead of PySwigObject |
---|
1038 | * ----------------------------------------------------------------------------- */ |
---|
1039 | |
---|
1040 | #define PySwigObject_GetDesc(obj) PyCObject_GetDesc(obj) |
---|
1041 | #define PySwigObject_Check(obj) PyCObject_Check(obj) |
---|
1042 | #define PySwigObject_AsVoidPtr(obj) PyCObject_AsVoidPtr(obj) |
---|
1043 | #define PySwigObject_FromVoidPtrAndDesc(p, d) PyCObject_FromVoidPtrAndDesc(p, d, NULL) |
---|
1044 | |
---|
1045 | #endif |
---|
1046 | |
---|
1047 | #endif |
---|
1048 | |
---|
1049 | /* ----------------------------------------------------------------------------- |
---|
1050 | * errors manipulation |
---|
1051 | * ----------------------------------------------------------------------------- */ |
---|
1052 | |
---|
1053 | SWIGRUNTIME void |
---|
1054 | SWIG_Python_TypeError(const char *type, PyObject *obj) |
---|
1055 | { |
---|
1056 | if (type) { |
---|
1057 | #if defined(SWIG_COBJECT_TYPES) |
---|
1058 | if (obj && PySwigObject_Check(obj)) { |
---|
1059 | const char *otype = (const char *) PySwigObject_GetDesc(obj); |
---|
1060 | if (otype) { |
---|
1061 | PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received", |
---|
1062 | type, otype); |
---|
1063 | return; |
---|
1064 | } |
---|
1065 | } else |
---|
1066 | #endif |
---|
1067 | { |
---|
1068 | const char *otype = (obj ? obj->ob_type->tp_name : 0); |
---|
1069 | if (otype) { |
---|
1070 | PyObject *str = PyObject_Str(obj); |
---|
1071 | const char *cstr = str ? PyString_AsString(str) : 0; |
---|
1072 | if (cstr) { |
---|
1073 | PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", |
---|
1074 | type, otype, cstr); |
---|
1075 | } else { |
---|
1076 | PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", |
---|
1077 | type, otype); |
---|
1078 | } |
---|
1079 | Py_XDECREF(str); |
---|
1080 | return; |
---|
1081 | } |
---|
1082 | } |
---|
1083 | PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); |
---|
1084 | } else { |
---|
1085 | PyErr_Format(PyExc_TypeError, "unexpected type is received"); |
---|
1086 | } |
---|
1087 | } |
---|
1088 | |
---|
1089 | SWIGRUNTIMEINLINE void |
---|
1090 | SWIG_Python_NullRef(const char *type) |
---|
1091 | { |
---|
1092 | if (type) { |
---|
1093 | PyErr_Format(PyExc_TypeError, "null reference of type '%s' was received",type); |
---|
1094 | } else { |
---|
1095 | PyErr_Format(PyExc_TypeError, "null reference was received"); |
---|
1096 | } |
---|
1097 | } |
---|
1098 | |
---|
1099 | SWIGRUNTIME int |
---|
1100 | SWIG_Python_AddErrMesg(const char* mesg, int infront) |
---|
1101 | { |
---|
1102 | if (PyErr_Occurred()) { |
---|
1103 | PyObject *type = 0; |
---|
1104 | PyObject *value = 0; |
---|
1105 | PyObject *traceback = 0; |
---|
1106 | PyErr_Fetch(&type, &value, &traceback); |
---|
1107 | if (value) { |
---|
1108 | PyObject *old_str = PyObject_Str(value); |
---|
1109 | Py_XINCREF(type); |
---|
1110 | PyErr_Clear(); |
---|
1111 | if (infront) { |
---|
1112 | PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str)); |
---|
1113 | } else { |
---|
1114 | PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg); |
---|
1115 | } |
---|
1116 | Py_DECREF(old_str); |
---|
1117 | } |
---|
1118 | return 1; |
---|
1119 | } else { |
---|
1120 | return 0; |
---|
1121 | } |
---|
1122 | } |
---|
1123 | |
---|
1124 | SWIGRUNTIME int |
---|
1125 | SWIG_Python_ArgFail(int argnum) |
---|
1126 | { |
---|
1127 | if (PyErr_Occurred()) { |
---|
1128 | /* add information about failing argument */ |
---|
1129 | char mesg[256]; |
---|
1130 | PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); |
---|
1131 | return SWIG_Python_AddErrMesg(mesg, 1); |
---|
1132 | } else { |
---|
1133 | return 0; |
---|
1134 | } |
---|
1135 | } |
---|
1136 | |
---|
1137 | |
---|
1138 | /* ----------------------------------------------------------------------------- |
---|
1139 | * pointers/data manipulation |
---|
1140 | * ----------------------------------------------------------------------------- */ |
---|
1141 | |
---|
1142 | /* Convert a pointer value */ |
---|
1143 | SWIGRUNTIME int |
---|
1144 | SWIG_Python_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) { |
---|
1145 | swig_cast_info *tc; |
---|
1146 | const char *c = 0; |
---|
1147 | static PyObject *SWIG_this = 0; |
---|
1148 | int newref = 0; |
---|
1149 | PyObject *pyobj = 0; |
---|
1150 | void *vptr; |
---|
1151 | |
---|
1152 | if (!obj) return 0; |
---|
1153 | if (obj == Py_None) { |
---|
1154 | *ptr = 0; |
---|
1155 | return 0; |
---|
1156 | } |
---|
1157 | |
---|
1158 | #ifdef SWIG_COBJECT_TYPES |
---|
1159 | if (!(PySwigObject_Check(obj))) { |
---|
1160 | if (!SWIG_this) |
---|
1161 | SWIG_this = PyString_FromString("this"); |
---|
1162 | pyobj = obj; |
---|
1163 | obj = PyObject_GetAttr(obj,SWIG_this); |
---|
1164 | newref = 1; |
---|
1165 | if (!obj) goto type_error; |
---|
1166 | if (!PySwigObject_Check(obj)) { |
---|
1167 | Py_DECREF(obj); |
---|
1168 | goto type_error; |
---|
1169 | } |
---|
1170 | } |
---|
1171 | vptr = PySwigObject_AsVoidPtr(obj); |
---|
1172 | c = (const char *) PySwigObject_GetDesc(obj); |
---|
1173 | if (newref) { Py_DECREF(obj); } |
---|
1174 | goto type_check; |
---|
1175 | #else |
---|
1176 | if (!(PyString_Check(obj))) { |
---|
1177 | if (!SWIG_this) |
---|
1178 | SWIG_this = PyString_FromString("this"); |
---|
1179 | pyobj = obj; |
---|
1180 | obj = PyObject_GetAttr(obj,SWIG_this); |
---|
1181 | newref = 1; |
---|
1182 | if (!obj) goto type_error; |
---|
1183 | if (!PyString_Check(obj)) { |
---|
1184 | Py_DECREF(obj); |
---|
1185 | goto type_error; |
---|
1186 | } |
---|
1187 | } |
---|
1188 | c = PyString_AsString(obj); |
---|
1189 | /* Pointer values must start with leading underscore */ |
---|
1190 | c = SWIG_UnpackVoidPtr(c, &vptr, ty->name); |
---|
1191 | if (newref) { Py_DECREF(obj); } |
---|
1192 | if (!c) goto type_error; |
---|
1193 | #endif |
---|
1194 | |
---|
1195 | type_check: |
---|
1196 | if (ty) { |
---|
1197 | tc = SWIG_TypeCheck(c,ty); |
---|
1198 | if (!tc) goto type_error; |
---|
1199 | *ptr = SWIG_TypeCast(tc,vptr); |
---|
1200 | } else { |
---|
1201 | *ptr = vptr; |
---|
1202 | } |
---|
1203 | if ((pyobj) && (flags & SWIG_POINTER_DISOWN)) { |
---|
1204 | PyObject_SetAttrString(pyobj,(char*)"thisown",Py_False); |
---|
1205 | } |
---|
1206 | return 0; |
---|
1207 | |
---|
1208 | type_error: |
---|
1209 | PyErr_Clear(); |
---|
1210 | if (pyobj && !obj) { |
---|
1211 | obj = pyobj; |
---|
1212 | if (PyCFunction_Check(obj)) { |
---|
1213 | /* here we get the method pointer for callbacks */ |
---|
1214 | char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); |
---|
1215 | c = doc ? strstr(doc, "swig_ptr: ") : 0; |
---|
1216 | if (c) { |
---|
1217 | c = ty ? SWIG_UnpackVoidPtr(c + 10, &vptr, ty->name) : 0; |
---|
1218 | if (!c) goto type_error; |
---|
1219 | goto type_check; |
---|
1220 | } |
---|
1221 | } |
---|
1222 | } |
---|
1223 | if (flags & SWIG_POINTER_EXCEPTION) { |
---|
1224 | if (ty) { |
---|
1225 | SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); |
---|
1226 | } else { |
---|
1227 | SWIG_Python_TypeError("C/C++ pointer", obj); |
---|
1228 | } |
---|
1229 | } |
---|
1230 | return -1; |
---|
1231 | } |
---|
1232 | |
---|
1233 | /* Convert a pointer value, signal an exception on a type mismatch */ |
---|
1234 | SWIGRUNTIME void * |
---|
1235 | SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) { |
---|
1236 | void *result; |
---|
1237 | if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { |
---|
1238 | PyErr_Clear(); |
---|
1239 | if (flags & SWIG_POINTER_EXCEPTION) { |
---|
1240 | SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); |
---|
1241 | SWIG_Python_ArgFail(argnum); |
---|
1242 | } |
---|
1243 | } |
---|
1244 | return result; |
---|
1245 | } |
---|
1246 | |
---|
1247 | /* Convert a packed value value */ |
---|
1248 | SWIGRUNTIME int |
---|
1249 | SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty, int flags) { |
---|
1250 | swig_cast_info *tc; |
---|
1251 | const char *c = 0; |
---|
1252 | |
---|
1253 | #if defined(SWIG_COBJECT_TYPES) && !defined(SWIG_COBJECT_PYTHON) |
---|
1254 | c = PySwigPacked_UnpackData(obj, ptr, sz); |
---|
1255 | #else |
---|
1256 | if ((!obj) || (!PyString_Check(obj))) goto type_error; |
---|
1257 | c = PyString_AsString(obj); |
---|
1258 | /* Pointer values must start with leading underscore */ |
---|
1259 | c = SWIG_UnpackDataName(c, ptr, sz, ty->name); |
---|
1260 | #endif |
---|
1261 | if (!c) goto type_error; |
---|
1262 | if (ty) { |
---|
1263 | tc = SWIG_TypeCheck(c,ty); |
---|
1264 | if (!tc) goto type_error; |
---|
1265 | } |
---|
1266 | return 0; |
---|
1267 | |
---|
1268 | type_error: |
---|
1269 | PyErr_Clear(); |
---|
1270 | if (flags & SWIG_POINTER_EXCEPTION) { |
---|
1271 | if (ty) { |
---|
1272 | SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); |
---|
1273 | } else { |
---|
1274 | SWIG_Python_TypeError("C/C++ packed data", obj); |
---|
1275 | } |
---|
1276 | } |
---|
1277 | return -1; |
---|
1278 | } |
---|
1279 | |
---|
1280 | /* Create a new array object */ |
---|
1281 | SWIGRUNTIME PyObject * |
---|
1282 | SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int own) { |
---|
1283 | PyObject *robj = 0; |
---|
1284 | if (!type) { |
---|
1285 | if (!PyErr_Occurred()) { |
---|
1286 | PyErr_Format(PyExc_TypeError, "Swig: null type passed to NewPointerObj"); |
---|
1287 | } |
---|
1288 | return robj; |
---|
1289 | } |
---|
1290 | if (!ptr) { |
---|
1291 | Py_INCREF(Py_None); |
---|
1292 | return Py_None; |
---|
1293 | } |
---|
1294 | #ifdef SWIG_COBJECT_TYPES |
---|
1295 | robj = PySwigObject_FromVoidPtrAndDesc((void *) ptr, (char *)type->name); |
---|
1296 | #else |
---|
1297 | { |
---|
1298 | char result[SWIG_BUFFER_SIZE]; |
---|
1299 | robj = SWIG_PackVoidPtr(result, ptr, type->name, sizeof(result)) ? |
---|
1300 | PyString_FromString(result) : 0; |
---|
1301 | } |
---|
1302 | #endif |
---|
1303 | if (!robj || (robj == Py_None)) return robj; |
---|
1304 | if (type->clientdata) { |
---|
1305 | PyObject *inst; |
---|
1306 | PyObject *args = Py_BuildValue((char*)"(O)", robj); |
---|
1307 | Py_DECREF(robj); |
---|
1308 | inst = PyObject_CallObject((PyObject *) type->clientdata, args); |
---|
1309 | Py_DECREF(args); |
---|
1310 | if (inst) { |
---|
1311 | if (own) { |
---|
1312 | PyObject_SetAttrString(inst,(char*)"thisown",Py_True); |
---|
1313 | } |
---|
1314 | robj = inst; |
---|
1315 | } |
---|
1316 | } |
---|
1317 | return robj; |
---|
1318 | } |
---|
1319 | |
---|
1320 | SWIGRUNTIME PyObject * |
---|
1321 | SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { |
---|
1322 | PyObject *robj = 0; |
---|
1323 | if (!ptr) { |
---|
1324 | Py_INCREF(Py_None); |
---|
1325 | return Py_None; |
---|
1326 | } |
---|
1327 | #if defined(SWIG_COBJECT_TYPES) && !defined(SWIG_COBJECT_PYTHON) |
---|
1328 | robj = PySwigPacked_FromDataAndDesc((void *) ptr, sz, (char *)type->name); |
---|
1329 | #else |
---|
1330 | { |
---|
1331 | char result[SWIG_BUFFER_SIZE]; |
---|
1332 | robj = SWIG_PackDataName(result, ptr, sz, type->name, sizeof(result)) ? |
---|
1333 | PyString_FromString(result) : 0; |
---|
1334 | } |
---|
1335 | #endif |
---|
1336 | return robj; |
---|
1337 | } |
---|
1338 | |
---|
1339 | /* -----------------------------------------------------------------------------* |
---|
1340 | * Get type list |
---|
1341 | * -----------------------------------------------------------------------------*/ |
---|
1342 | |
---|
1343 | #ifdef SWIG_LINK_RUNTIME |
---|
1344 | void *SWIG_ReturnGlobalTypeList(void *); |
---|
1345 | #endif |
---|
1346 | |
---|
1347 | SWIGRUNTIME swig_module_info * |
---|
1348 | SWIG_Python_GetModule(void) { |
---|
1349 | static void *type_pointer = (void *)0; |
---|
1350 | /* first check if module already created */ |
---|
1351 | if (!type_pointer) { |
---|
1352 | #ifdef SWIG_LINK_RUNTIME |
---|
1353 | type_pointer = SWIG_ReturnGlobalTypeList((void *)0); |
---|
1354 | #else |
---|
1355 | type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, |
---|
1356 | (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); |
---|
1357 | if (PyErr_Occurred()) { |
---|
1358 | PyErr_Clear(); |
---|
1359 | type_pointer = (void *)0; |
---|
1360 | } |
---|
1361 | #endif |
---|
1362 | } |
---|
1363 | return (swig_module_info *) type_pointer; |
---|
1364 | } |
---|
1365 | |
---|
1366 | #if PY_MAJOR_VERSION < 2 |
---|
1367 | /* PyModule_AddObject function was introduced in Python 2.0. The following function |
---|
1368 | is copied out of Python/modsupport.c in python version 2.3.4 */ |
---|
1369 | SWIGINTERN int |
---|
1370 | PyModule_AddObject(PyObject *m, char *name, PyObject *o) |
---|
1371 | { |
---|
1372 | PyObject *dict; |
---|
1373 | if (!PyModule_Check(m)) { |
---|
1374 | PyErr_SetString(PyExc_TypeError, |
---|
1375 | "PyModule_AddObject() needs module as first arg"); |
---|
1376 | return -1; |
---|
1377 | } |
---|
1378 | if (!o) { |
---|
1379 | PyErr_SetString(PyExc_TypeError, |
---|
1380 | "PyModule_AddObject() needs non-NULL value"); |
---|
1381 | return -1; |
---|
1382 | } |
---|
1383 | |
---|
1384 | dict = PyModule_GetDict(m); |
---|
1385 | if (dict == NULL) { |
---|
1386 | /* Internal error -- modules must have a dict! */ |
---|
1387 | PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", |
---|
1388 | PyModule_GetName(m)); |
---|
1389 | return -1; |
---|
1390 | } |
---|
1391 | if (PyDict_SetItemString(dict, name, o)) |
---|
1392 | return -1; |
---|
1393 | Py_DECREF(o); |
---|
1394 | return 0; |
---|
1395 | } |
---|
1396 | #endif |
---|
1397 | |
---|
1398 | SWIGRUNTIME void |
---|
1399 | SWIG_Python_SetModule(swig_module_info *swig_module) { |
---|
1400 | static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */ |
---|
1401 | |
---|
1402 | PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, |
---|
1403 | swig_empty_runtime_method_table); |
---|
1404 | PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, NULL); |
---|
1405 | if (pointer && module) { |
---|
1406 | PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); |
---|
1407 | } |
---|
1408 | } |
---|
1409 | |
---|
1410 | #ifdef __cplusplus |
---|
1411 | } |
---|
1412 | #endif |
---|
1413 | |
---|
1414 | |
---|
1415 | /* -------- TYPES TABLE (BEGIN) -------- */ |
---|
1416 | |
---|
1417 | #define SWIGTYPE_p_char swig_types[0] |
---|
1418 | #define SWIGTYPE_p_in_addr swig_types[1] |
---|
1419 | #define SWIGTYPE_p_int8_t swig_types[2] |
---|
1420 | #define SWIGTYPE_p_libtrace_err_t swig_types[3] |
---|
1421 | #define SWIGTYPE_p_libtrace_filter_t swig_types[4] |
---|
1422 | #define SWIGTYPE_p_libtrace_icmp swig_types[5] |
---|
1423 | #define SWIGTYPE_p_libtrace_icmp_un swig_types[6] |
---|
1424 | #define SWIGTYPE_p_libtrace_icmp_un_echo swig_types[7] |
---|
1425 | #define SWIGTYPE_p_libtrace_icmp_un_frag swig_types[8] |
---|
1426 | #define SWIGTYPE_p_libtrace_ip swig_types[9] |
---|
1427 | #define SWIGTYPE_p_libtrace_linktype_t swig_types[10] |
---|
1428 | #define SWIGTYPE_p_libtrace_out_t swig_types[11] |
---|
1429 | #define SWIGTYPE_p_libtrace_packet_t swig_types[12] |
---|
1430 | #define SWIGTYPE_p_libtrace_t swig_types[13] |
---|
1431 | #define SWIGTYPE_p_libtrace_tcp swig_types[14] |
---|
1432 | #define SWIGTYPE_p_libtrace_udp swig_types[15] |
---|
1433 | #define SWIGTYPE_p_timeval swig_types[16] |
---|
1434 | #define SWIGTYPE_p_trace_option_output_t swig_types[17] |
---|
1435 | #define SWIGTYPE_p_trace_option_t swig_types[18] |
---|
1436 | #define SWIGTYPE_p_uint64_t swig_types[19] |
---|
1437 | #define SWIGTYPE_p_unsigned_char swig_types[20] |
---|
1438 | #define SWIGTYPE_p_unsigned_int swig_types[21] |
---|
1439 | #define SWIGTYPE_p_unsigned_short swig_types[22] |
---|
1440 | #define SWIGTYPE_p_void swig_types[23] |
---|
1441 | #define SWIGTYPE_ptrdiff_t swig_types[24] |
---|
1442 | #define SWIGTYPE_size_t swig_types[25] |
---|
1443 | static swig_type_info *swig_types[27]; |
---|
1444 | static swig_module_info swig_module = {swig_types, 26, 0, 0, 0, 0}; |
---|
1445 | #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) |
---|
1446 | #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) |
---|
1447 | |
---|
1448 | /* -------- TYPES TABLE (END) -------- */ |
---|
1449 | |
---|
1450 | |
---|
1451 | /*----------------------------------------------- |
---|
1452 | @(target):= _libtrace.so |
---|
1453 | ------------------------------------------------*/ |
---|
1454 | #define SWIG_init init_libtrace |
---|
1455 | |
---|
1456 | #define SWIG_name "_libtrace" |
---|
1457 | |
---|
1458 | #include <arpa/inet.h> |
---|
1459 | #include "libtrace.h" |
---|
1460 | |
---|
1461 | |
---|
1462 | #include <stdlib.h> |
---|
1463 | |
---|
1464 | |
---|
1465 | #include <limits.h> |
---|
1466 | |
---|
1467 | |
---|
1468 | SWIGINTERN int |
---|
1469 | SWIG_CheckLongInRange(long value, long min_value, long max_value, |
---|
1470 | const char *errmsg) |
---|
1471 | { |
---|
1472 | if (value < min_value) { |
---|
1473 | if (errmsg) { |
---|
1474 | PyErr_Format(PyExc_OverflowError, |
---|
1475 | "value %ld is less than '%s' minimum %ld", |
---|
1476 | value, errmsg, min_value); |
---|
1477 | } |
---|
1478 | return 0; |
---|
1479 | } else if (value > max_value) { |
---|
1480 | if (errmsg) { |
---|
1481 | PyErr_Format(PyExc_OverflowError, |
---|
1482 | "value %ld is greater than '%s' maximum %ld", |
---|
1483 | value, errmsg, max_value); |
---|
1484 | } |
---|
1485 | return 0; |
---|
1486 | } |
---|
1487 | return 1; |
---|
1488 | } |
---|
1489 | |
---|
1490 | |
---|
1491 | SWIGINTERN int |
---|
1492 | SWIG_AsVal_long(PyObject * obj, long* val) |
---|
1493 | { |
---|
1494 | if (PyLong_Check(obj)) { |
---|
1495 | long v = PyLong_AsLong(obj); |
---|
1496 | if (!PyErr_Occurred()) { |
---|
1497 | if (val) *val = v; |
---|
1498 | return 1; |
---|
1499 | } else { |
---|
1500 | if (!val) PyErr_Clear(); |
---|
1501 | return 0; |
---|
1502 | } |
---|
1503 | } |
---|
1504 | if (PyInt_Check(obj)) { |
---|
1505 | if (val) *val = PyInt_AsLong(obj); |
---|
1506 | return 1; |
---|
1507 | } |
---|
1508 | if (val) { |
---|
1509 | SWIG_type_error("long", obj); |
---|
1510 | } |
---|
1511 | return 0; |
---|
1512 | } |
---|
1513 | |
---|
1514 | |
---|
1515 | #if INT_MAX != LONG_MAX |
---|
1516 | SWIGINTERN int |
---|
1517 | SWIG_AsVal_int(PyObject *obj, int *val) |
---|
1518 | { |
---|
1519 | const char* errmsg = val ? "int" : (char*)0; |
---|
1520 | long v; |
---|
1521 | if (SWIG_AsVal_long(obj, &v)) { |
---|
1522 | if (SWIG_CheckLongInRange(v, INT_MIN,INT_MAX, errmsg)) { |
---|
1523 | if (val) *val = (int)(v); |
---|
1524 | return 1; |
---|
1525 | } else { |
---|
1526 | return 0; |
---|
1527 | } |
---|
1528 | } else { |
---|
1529 | PyErr_Clear(); |
---|
1530 | } |
---|
1531 | if (val) { |
---|
1532 | SWIG_type_error(errmsg, obj); |
---|
1533 | } |
---|
1534 | return 0; |
---|
1535 | } |
---|
1536 | #else |
---|
1537 | SWIGINTERNINLINE int |
---|
1538 | SWIG_AsVal_int(PyObject *obj, int *val) |
---|
1539 | { |
---|
1540 | return SWIG_AsVal_long(obj,(long*)val); |
---|
1541 | } |
---|
1542 | #endif |
---|
1543 | |
---|
1544 | |
---|
1545 | SWIGINTERNINLINE int |
---|
1546 | SWIG_As_int(PyObject* obj) |
---|
1547 | { |
---|
1548 | int v; |
---|
1549 | if (!SWIG_AsVal_int(obj, &v)) { |
---|
1550 | /* |
---|
1551 | this is needed to make valgrind/purify happier. |
---|
1552 | */ |
---|
1553 | memset((void*)&v, 0, sizeof(int)); |
---|
1554 | } |
---|
1555 | return v; |
---|
1556 | } |
---|
1557 | |
---|
1558 | |
---|
1559 | SWIGINTERNINLINE int |
---|
1560 | SWIG_Check_int(PyObject* obj) |
---|
1561 | { |
---|
1562 | return SWIG_AsVal_int(obj, (int*)0); |
---|
1563 | } |
---|
1564 | |
---|
1565 | |
---|
1566 | /*@/usr/share/swig1.3/python/pymacros.swg,72,SWIG_define@*/ |
---|
1567 | #define SWIG_From_int PyInt_FromLong |
---|
1568 | /*@@*/ |
---|
1569 | |
---|
1570 | |
---|
1571 | SWIGINTERNINLINE int |
---|
1572 | SWIG_CheckUnsignedLongInRange(unsigned long value, |
---|
1573 | unsigned long max_value, |
---|
1574 | const char *errmsg) |
---|
1575 | { |
---|
1576 | if (value > max_value) { |
---|
1577 | if (errmsg) { |
---|
1578 | PyErr_Format(PyExc_OverflowError, |
---|
1579 | "value %lu is greater than '%s' minimum %lu", |
---|
1580 | value, errmsg, max_value); |
---|
1581 | } |
---|
1582 | return 0; |
---|
1583 | } |
---|
1584 | return 1; |
---|
1585 | } |
---|
1586 | |
---|
1587 | |
---|
1588 | SWIGINTERN int |
---|
1589 | SWIG_AsVal_unsigned_SS_long(PyObject *obj, unsigned long *val) |
---|
1590 | { |
---|
1591 | if (PyLong_Check(obj)) { |
---|
1592 | unsigned long v = PyLong_AsUnsignedLong(obj); |
---|
1593 | if (!PyErr_Occurred()) { |
---|
1594 | if (val) *val = v; |
---|
1595 | return 1; |
---|
1596 | } else { |
---|
1597 | if (!val) PyErr_Clear(); |
---|
1598 | return 0; |
---|
1599 | } |
---|
1600 | } |
---|
1601 | if (PyInt_Check(obj)) { |
---|
1602 | long v = PyInt_AsLong(obj); |
---|
1603 | if (v >= 0) { |
---|
1604 | if (val) *val = v; |
---|
1605 | return 1; |
---|
1606 | } |
---|
1607 | } |
---|
1608 | if (val) { |
---|
1609 | SWIG_type_error("unsigned long", obj); |
---|
1610 | } |
---|
1611 | return 0; |
---|
1612 | } |
---|
1613 | |
---|
1614 | |
---|
1615 | #if UINT_MAX != ULONG_MAX |
---|
1616 | SWIGINTERN int |
---|
1617 | SWIG_AsVal_unsigned_SS_int(PyObject *obj, unsigned int *val) |
---|
1618 | { |
---|
1619 | const char* errmsg = val ? "unsigned int" : (char*)0; |
---|
1620 | unsigned long v; |
---|
1621 | if (SWIG_AsVal_unsigned_SS_long(obj, &v)) { |
---|
1622 | if (SWIG_CheckUnsignedLongInRange(v, INT_MAX, errmsg)) { |
---|
1623 | if (val) *val = (unsigned int)(v); |
---|
1624 | return 1; |
---|
1625 | } |
---|
1626 | } else { |
---|
1627 | PyErr_Clear(); |
---|
1628 | } |
---|
1629 | if (val) { |
---|
1630 | SWIG_type_error(errmsg, obj); |
---|
1631 | } |
---|
1632 | return 0; |
---|
1633 | } |
---|
1634 | #else |
---|
1635 | SWIGINTERNINLINE unsigned int |
---|
1636 | SWIG_AsVal_unsigned_SS_int(PyObject *obj, unsigned int *val) |
---|
1637 | { |
---|
1638 | return SWIG_AsVal_unsigned_SS_long(obj,(unsigned long *)val); |
---|
1639 | } |
---|
1640 | #endif |
---|
1641 | |
---|
1642 | |
---|
1643 | SWIGINTERNINLINE unsigned int |
---|
1644 | SWIG_As_unsigned_SS_int(PyObject* obj) |
---|
1645 | { |
---|
1646 | unsigned int v; |
---|
1647 | if (!SWIG_AsVal_unsigned_SS_int(obj, &v)) { |
---|
1648 | /* |
---|
1649 | this is needed to make valgrind/purify happier. |
---|
1650 | */ |
---|
1651 | memset((void*)&v, 0, sizeof(unsigned int)); |
---|
1652 | } |
---|
1653 | return v; |
---|
1654 | } |
---|
1655 | |
---|
1656 | |
---|
1657 | SWIGINTERNINLINE int |
---|
1658 | SWIG_Check_unsigned_SS_int(PyObject* obj) |
---|
1659 | { |
---|
1660 | return SWIG_AsVal_unsigned_SS_int(obj, (unsigned int*)0); |
---|
1661 | } |
---|
1662 | |
---|
1663 | |
---|
1664 | /*@/usr/share/swig1.3/python/pymacros.swg,72,SWIG_define@*/ |
---|
1665 | #define SWIG_From_long PyInt_FromLong |
---|
1666 | /*@@*/ |
---|
1667 | |
---|
1668 | |
---|
1669 | SWIGINTERNINLINE PyObject* |
---|
1670 | SWIG_From_unsigned_SS_long(unsigned long value) |
---|
1671 | { |
---|
1672 | return (value > LONG_MAX) ? |
---|
1673 | PyLong_FromUnsignedLong(value) |
---|
1674 | : PyInt_FromLong((long)(value)); |
---|
1675 | } |
---|
1676 | |
---|
1677 | |
---|
1678 | #if UINT_MAX < LONG_MAX |
---|
1679 | /*@/usr/share/swig1.3/python/pymacros.swg,72,SWIG_define@*/ |
---|
1680 | #define SWIG_From_unsigned_SS_int SWIG_From_long |
---|
1681 | /*@@*/ |
---|
1682 | #else |
---|
1683 | /*@/usr/share/swig1.3/python/pymacros.swg,72,SWIG_define@*/ |
---|
1684 | #define SWIG_From_unsigned_SS_int SWIG_From_unsigned_SS_long |
---|
1685 | /*@@*/ |
---|
1686 | #endif |
---|
1687 | |
---|
1688 | |
---|
1689 | SWIGINTERN int |
---|
1690 | SWIG_AsVal_unsigned_SS_char(PyObject *obj, unsigned char *val) |
---|
1691 | { |
---|
1692 | const char* errmsg = val ? "unsigned char" : (char*)0; |
---|
1693 | unsigned long v; |
---|
1694 | if (SWIG_AsVal_unsigned_SS_long(obj, &v)) { |
---|
1695 | if (SWIG_CheckUnsignedLongInRange(v, UCHAR_MAX,errmsg)) { |
---|
1696 | if (val) *val = (unsigned char)(v); |
---|
1697 | return 1; |
---|
1698 | } else { |
---|
1699 | return 0; |
---|
1700 | } |
---|
1701 | } else { |
---|
1702 | PyErr_Clear(); |
---|
1703 | } |
---|
1704 | if (val) { |
---|
1705 | SWIG_type_error(errmsg, obj); |
---|
1706 | } |
---|
1707 | return 0; |
---|
1708 | } |
---|
1709 | |
---|
1710 | |
---|
1711 | SWIGINTERNINLINE unsigned char |
---|
1712 | SWIG_As_unsigned_SS_char(PyObject* obj) |
---|
1713 | { |
---|
1714 | unsigned char v; |
---|
1715 | if (!SWIG_AsVal_unsigned_SS_char(obj, &v)) { |
---|
1716 | /* |
---|
1717 | this is needed to make valgrind/purify happier. |
---|
1718 | */ |
---|
1719 | memset((void*)&v, 0, sizeof(unsigned char)); |
---|
1720 | } |
---|
1721 | return v; |
---|
1722 | } |
---|
1723 | |
---|
1724 | |
---|
1725 | SWIGINTERNINLINE int |
---|
1726 | SWIG_Check_unsigned_SS_char(PyObject* obj) |
---|
1727 | { |
---|
1728 | return SWIG_AsVal_unsigned_SS_char(obj, (unsigned char*)0); |
---|
1729 | } |
---|
1730 | |
---|
1731 | |
---|
1732 | /*@/usr/share/swig1.3/python/pymacros.swg,72,SWIG_define@*/ |
---|
1733 | #define SWIG_From_unsigned_SS_char PyInt_FromLong |
---|
1734 | /*@@*/ |
---|
1735 | |
---|
1736 | |
---|
1737 | /*@/usr/share/swig1.3/python/pymacros.swg,72,SWIG_define@*/ |
---|
1738 | #define SWIG_From_unsigned_SS_short PyInt_FromLong |
---|
1739 | /*@@*/ |
---|
1740 | |
---|
1741 | |
---|
1742 | SWIGINTERN PyObject * |
---|
1743 | SWIG_FromCharPtr(const char* cptr) |
---|
1744 | { |
---|
1745 | if (cptr) { |
---|
1746 | size_t size = strlen(cptr); |
---|
1747 | if (size > INT_MAX) { |
---|
1748 | return SWIG_NewPointerObj((char*)(cptr), |
---|
1749 | SWIG_TypeQuery("char *"), 0); |
---|
1750 | } else { |
---|
1751 | if (size != 0) { |
---|
1752 | return PyString_FromStringAndSize(cptr, size); |
---|
1753 | } else { |
---|
1754 | return PyString_FromString(cptr); |
---|
1755 | } |
---|
1756 | } |
---|
1757 | } |
---|
1758 | Py_INCREF(Py_None); |
---|
1759 | return Py_None; |
---|
1760 | } |
---|
1761 | |
---|
1762 | |
---|
1763 | #define MAKE_NTOHS(class,member) \ |
---|
1764 | uint16_t class ## _ ## member ## _get (struct class *self) { \ |
---|
1765 | return ntohs(self->member); \ |
---|
1766 | } |
---|
1767 | |
---|
1768 | #define MAKE_NTOHL(class,member) \ |
---|
1769 | uint32_t class ## _ ## member ## _get (struct class *self) { \ |
---|
1770 | return ntohl(self->member); \ |
---|
1771 | } |
---|
1772 | |
---|
1773 | MAKE_NTOHS(libtrace_ip,ip_sum); |
---|
1774 | MAKE_NTOHS(libtrace_ip,ip_len); |
---|
1775 | MAKE_NTOHS(libtrace_ip,ip_id); |
---|
1776 | MAKE_NTOHS(libtrace_ip,ip_off); |
---|
1777 | char *libtrace_ip_ip_src_get(struct libtrace_ip *self) { |
---|
1778 | return strdup(inet_ntoa(self->ip_src)); |
---|
1779 | } |
---|
1780 | char *libtrace_ip_ip_dst_get(struct libtrace_ip *self) { |
---|
1781 | return strdup(inet_ntoa(self->ip_dst)); |
---|
1782 | } |
---|
1783 | |
---|
1784 | |
---|
1785 | SWIGINTERN int |
---|
1786 | SWIG_AsVal_unsigned_SS_short(PyObject *obj, unsigned short *val) |
---|
1787 | { |
---|
1788 | const char* errmsg = val ? "unsigned short" : (char*)0; |
---|
1789 | unsigned long v; |
---|
1790 | if (SWIG_AsVal_unsigned_SS_long(obj, &v)) { |
---|
1791 | if (SWIG_CheckUnsignedLongInRange(v, USHRT_MAX, errmsg)) { |
---|
1792 | if (val) *val = (unsigned short)(v); |
---|
1793 | return 1; |
---|
1794 | } else { |
---|
1795 | return 0; |
---|
1796 | } |
---|
1797 | } else { |
---|
1798 | PyErr_Clear(); |
---|
1799 | } |
---|
1800 | if (val) { |
---|
1801 | SWIG_type_error(errmsg, obj); |
---|
1802 | } |
---|
1803 | return 0; |
---|
1804 | } |
---|
1805 | |
---|
1806 | |
---|
1807 | SWIGINTERNINLINE unsigned short |
---|
1808 | SWIG_As_unsigned_SS_short(PyObject* obj) |
---|
1809 | { |
---|
1810 | unsigned short v; |
---|
1811 | if (!SWIG_AsVal_unsigned_SS_short(obj, &v)) { |
---|
1812 | /* |
---|
1813 | this is needed to make valgrind/purify happier. |
---|
1814 | */ |
---|
1815 | memset((void*)&v, 0, sizeof(unsigned short)); |
---|
1816 | } |
---|
1817 | return v; |
---|
1818 | } |
---|
1819 | |
---|
1820 | |
---|
1821 | SWIGINTERNINLINE int |
---|
1822 | SWIG_Check_unsigned_SS_short(PyObject* obj) |
---|
1823 | { |
---|
1824 | return SWIG_AsVal_unsigned_SS_short(obj, (unsigned short*)0); |
---|
1825 | } |
---|
1826 | |
---|
1827 | |
---|
1828 | MAKE_NTOHS(libtrace_tcp,source) |
---|
1829 | MAKE_NTOHS(libtrace_tcp,dest) |
---|
1830 | MAKE_NTOHS(libtrace_tcp,window) |
---|
1831 | MAKE_NTOHS(libtrace_tcp,check) |
---|
1832 | MAKE_NTOHS(libtrace_tcp,urg_ptr) |
---|
1833 | |
---|
1834 | MAKE_NTOHL(libtrace_tcp,seq) |
---|
1835 | MAKE_NTOHL(libtrace_tcp,ack_seq) |
---|
1836 | |
---|
1837 | |
---|
1838 | MAKE_NTOHS(libtrace_udp,source) |
---|
1839 | MAKE_NTOHS(libtrace_udp,dest) |
---|
1840 | MAKE_NTOHS(libtrace_udp,len) |
---|
1841 | MAKE_NTOHS(libtrace_udp,check) |
---|
1842 | |
---|
1843 | |
---|
1844 | typedef union { |
---|
1845 | struct { |
---|
1846 | uint16_t id; |
---|
1847 | uint16_t sequence; |
---|
1848 | } echo; /* echo datagram */ |
---|
1849 | uint32_t gateway; /* gateway address */ |
---|
1850 | struct { |
---|
1851 | uint16_t __unused; |
---|
1852 | uint16_t mtu; |
---|
1853 | } frag; /* path mtu discovery */ |
---|
1854 | } libtrace_icmp_un; |
---|
1855 | |
---|
1856 | |
---|
1857 | |
---|
1858 | typedef struct { |
---|
1859 | uint16_t __unused; |
---|
1860 | uint16_t mtu; |
---|
1861 | } libtrace_icmp_un_frag; |
---|
1862 | |
---|
1863 | |
---|
1864 | |
---|
1865 | typedef struct { |
---|
1866 | uint16_t id; |
---|
1867 | uint16_t sequence; |
---|
1868 | } libtrace_icmp_un_echo; |
---|
1869 | |
---|
1870 | |
---|
1871 | static struct libtrace_packet_t *new_libtrace_packet_t(){ |
---|
1872 | struct libtrace_packet_t *packet = trace_create_packet(); |
---|
1873 | return packet; |
---|
1874 | } |
---|
1875 | static void delete_libtrace_packet_t(struct libtrace_packet_t *self){ |
---|
1876 | trace_destroy_packet(self); |
---|
1877 | } |
---|
1878 | static libtrace_packet_t *libtrace_packet_t_trace_copy_packet(struct libtrace_packet_t *self){ |
---|
1879 | return trace_copy_packet(self); |
---|
1880 | } |
---|
1881 | static void *libtrace_packet_t_trace_get_link(struct libtrace_packet_t *self){ |
---|
1882 | return trace_get_link(self); |
---|
1883 | } |
---|
1884 | static void *libtrace_packet_t_trace_get_transport(struct libtrace_packet_t *self,uint8_t *proto,uint32_t *remaining){ |
---|
1885 | return trace_get_transport(self, proto, remaining); |
---|
1886 | } |
---|
1887 | static struct libtrace_ip *libtrace_packet_t_trace_get_ip(struct libtrace_packet_t *self){ |
---|
1888 | return trace_get_ip(self); |
---|
1889 | } |
---|
1890 | static struct libtrace_tcp *libtrace_packet_t_trace_get_tcp(struct libtrace_packet_t *self){ |
---|
1891 | return trace_get_tcp(self); |
---|
1892 | } |
---|
1893 | static struct libtrace_udp *libtrace_packet_t_trace_get_udp(struct libtrace_packet_t *self){ |
---|
1894 | return trace_get_udp(self); |
---|
1895 | } |
---|
1896 | static struct libtrace_icmp *libtrace_packet_t_trace_get_icmp(struct libtrace_packet_t *self){ |
---|
1897 | return trace_get_icmp(self); |
---|
1898 | } |
---|
1899 | static char *libtrace_packet_t_trace_get_destination_mac(struct libtrace_packet_t *self){ |
---|
1900 | return trace_ether_ntoa(trace_get_destination_mac(self),0); |
---|
1901 | } |
---|
1902 | static char *libtrace_packet_t_trace_get_source_mac(struct libtrace_packet_t *self){ |
---|
1903 | return trace_ether_ntoa(trace_get_source_mac(self),0); |
---|
1904 | } |
---|
1905 | static char *libtrace_packet_t_trace_ether_ntoa(struct libtrace_packet_t *self,uint8_t *mac){ |
---|
1906 | return trace_ether_ntoa(mac, 0); |
---|
1907 | } |
---|
1908 | static uint16_t libtrace_packet_t_trace_get_source_port(struct libtrace_packet_t *self){ |
---|
1909 | return trace_get_source_port(self); |
---|
1910 | } |
---|
1911 | static uint16_t libtrace_packet_t_trace_get_destination_port(struct libtrace_packet_t *self){ |
---|
1912 | return trace_get_destination_port(self); |
---|
1913 | } |
---|
1914 | static double libtrace_packet_t_trace_get_seconds(struct libtrace_packet_t *self){ |
---|
1915 | return trace_get_seconds(self); |
---|
1916 | } |
---|
1917 | |
---|
1918 | /*@/usr/share/swig1.3/python/pymacros.swg,72,SWIG_define@*/ |
---|
1919 | #define SWIG_From_double PyFloat_FromDouble |
---|
1920 | /*@@*/ |
---|
1921 | |
---|
1922 | static uint64_t libtrace_packet_t_trace_get_erf_timestamp(struct libtrace_packet_t *self){ |
---|
1923 | return trace_get_erf_timestamp(self); |
---|
1924 | } |
---|
1925 | static struct timeval libtrace_packet_t_trace_get_timeval(struct libtrace_packet_t *self){ |
---|
1926 | return trace_get_timeval(self); |
---|
1927 | } |
---|
1928 | static int libtrace_packet_t_trace_get_capture_length(struct libtrace_packet_t *self){ |
---|
1929 | return trace_get_capture_length(self); |
---|
1930 | } |
---|
1931 | |
---|
1932 | SWIGINTERNINLINE unsigned long |
---|
1933 | SWIG_As_unsigned_SS_long(PyObject* obj) |
---|
1934 | { |
---|
1935 | unsigned long v; |
---|
1936 | if (!SWIG_AsVal_unsigned_SS_long(obj, &v)) { |
---|
1937 | /* |
---|
1938 | this is needed to make valgrind/purify happier. |
---|
1939 | */ |
---|
1940 | memset((void*)&v, 0, sizeof(unsigned long)); |
---|
1941 | } |
---|
1942 | return v; |
---|
1943 | } |
---|
1944 | |
---|
1945 | |
---|
1946 | SWIGINTERNINLINE int |
---|
1947 | SWIG_Check_unsigned_SS_long(PyObject* obj) |
---|
1948 | { |
---|
1949 | return SWIG_AsVal_unsigned_SS_long(obj, (unsigned long*)0); |
---|
1950 | } |
---|
1951 | |
---|
1952 | static size_t libtrace_packet_t_trace_set_capture_length(struct libtrace_packet_t *self,size_t size){ |
---|
1953 | return trace_set_capture_length(self,size); |
---|
1954 | } |
---|
1955 | static int libtrace_packet_t_trace_get_wire_lenth(struct libtrace_packet_t *self){ |
---|
1956 | return trace_get_wire_length(self); |
---|
1957 | } |
---|
1958 | static int libtrace_packet_t_trace_get_framing_length(struct libtrace_packet_t *self){ |
---|
1959 | return trace_get_framing_length(self); |
---|
1960 | } |
---|
1961 | static libtrace_linktype_t libtrace_packet_t_trace_get_link_type(struct libtrace_packet_t *self){ |
---|
1962 | return trace_get_link_type(self); |
---|
1963 | } |
---|
1964 | static int8_t libtrace_packet_t_trace_get_direction(struct libtrace_packet_t *self){ |
---|
1965 | return trace_get_direction(self); |
---|
1966 | } |
---|
1967 | static int8_t libtrace_packet_t_trace_set_direction(struct libtrace_packet_t *self,int8_t direction){ |
---|
1968 | return trace_set_direction(self,direction); |
---|
1969 | } |
---|
1970 | static int libtrace_packet_t_trace_apply_filter(struct libtrace_packet_t *self,struct libtrace_filter_t *filter){ |
---|
1971 | return trace_apply_filter(filter,self); |
---|
1972 | } |
---|
1973 | static uint8_t libtrace_packet_t_trace_get_server_port(struct libtrace_packet_t *self,uint8_t protocol,uint16_t source,uint16_t dest){ |
---|
1974 | return trace_get_server_port(protocol,source,dest); |
---|
1975 | } |
---|
1976 | |
---|
1977 | /* returns SWIG_OLDOBJ if the input is a raw char*, SWIG_PYSTR if is a PyString */ |
---|
1978 | SWIGINTERN int |
---|
1979 | SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize) |
---|
1980 | { |
---|
1981 | static swig_type_info* pchar_info = 0; |
---|
1982 | char* vptr = 0; |
---|
1983 | if (!pchar_info) pchar_info = SWIG_TypeQuery("char *"); |
---|
1984 | if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_info, 0) != -1) { |
---|
1985 | if (cptr) *cptr = vptr; |
---|
1986 | if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0; |
---|
1987 | return SWIG_OLDOBJ; |
---|
1988 | } else { |
---|
1989 | PyErr_Clear(); |
---|
1990 | if (PyString_Check(obj)) { |
---|
1991 | if (cptr) { |
---|
1992 | *cptr = PyString_AS_STRING(obj); |
---|
1993 | if (psize) { |
---|
1994 | *psize = PyString_GET_SIZE(obj) + 1; |
---|
1995 | } |
---|
1996 | } |
---|
1997 | return SWIG_PYSTR; |
---|
1998 | } |
---|
1999 | } |
---|
2000 | if (cptr) { |
---|
2001 | SWIG_type_error("char *", obj); |
---|
2002 | } |
---|
2003 | return 0; |
---|
2004 | } |
---|
2005 | |
---|
2006 | |
---|
2007 | SWIGINTERNINLINE int |
---|
2008 | SWIG_AsCharPtr(PyObject *obj, char **val) |
---|
2009 | { |
---|
2010 | if (SWIG_AsCharPtrAndSize(obj, val, (size_t*)(0))) { |
---|
2011 | return 1; |
---|
2012 | } |
---|
2013 | if (val) { |
---|
2014 | PyErr_Clear(); |
---|
2015 | SWIG_type_error("char *", obj); |
---|
2016 | } |
---|
2017 | return 0; |
---|
2018 | } |
---|
2019 | |
---|
2020 | static struct libtrace_filter_t *new_libtrace_filter_t(char *filterstring){ |
---|
2021 | return trace_create_filter(filterstring); |
---|
2022 | } |
---|
2023 | static void delete_libtrace_filter_t(struct libtrace_filter_t *self){ |
---|
2024 | trace_destroy_filter(self); |
---|
2025 | } |
---|
2026 | static int libtrace_filter_t_trace_apply_filter(struct libtrace_filter_t *self,struct libtrace_packet_t *packet){ |
---|
2027 | return trace_apply_filter(self,packet); |
---|
2028 | } |
---|
2029 | static struct libtrace_t *new_libtrace_t(char *uri){ return trace_create(uri); } |
---|
2030 | static void delete_libtrace_t(struct libtrace_t *self){ trace_destroy(self); } |
---|
2031 | static int libtrace_t_trace_read_packet(struct libtrace_t *self,struct libtrace_packet_t *packet){ |
---|
2032 | return trace_read_packet(self,packet); |
---|
2033 | } |
---|
2034 | static int libtrace_t_trace_start(struct libtrace_t *self){ |
---|
2035 | return trace_start(self); |
---|
2036 | } |
---|
2037 | static int libtrace_t_trace_pause(struct libtrace_t *self){ |
---|
2038 | return trace_pause(self); |
---|
2039 | } |
---|
2040 | static void libtrace_t_trace_help(struct libtrace_t *self){ |
---|
2041 | trace_help(); |
---|
2042 | } |
---|
2043 | static int libtrace_t_trace_config(struct libtrace_t *self,trace_option_t option,void *value){ |
---|
2044 | return trace_config(self, option, value); |
---|
2045 | } |
---|
2046 | static libtrace_err_t libtrace_t_trace_get_err(struct libtrace_t *self){ |
---|
2047 | return trace_get_err(self); |
---|
2048 | } |
---|
2049 | static bool libtrace_t_trace_is_err(struct libtrace_t *self){ |
---|
2050 | return trace_is_err(self); |
---|
2051 | } |
---|
2052 | |
---|
2053 | SWIGINTERNINLINE PyObject* |
---|
2054 | SWIG_From_bool(bool value) |
---|
2055 | { |
---|
2056 | PyObject *obj = value ? Py_True : Py_False; |
---|
2057 | Py_INCREF(obj); |
---|
2058 | return obj; |
---|
2059 | } |
---|
2060 | |
---|
2061 | static struct libtrace_out_t *new_libtrace_out_t(char *uri){ return trace_create_output(uri); } |
---|
2062 | static void delete_libtrace_out_t(struct libtrace_out_t *self){ trace_destroy_output(self); } |
---|
2063 | static int libtrace_out_t_trace_start_output(struct libtrace_out_t *self){ |
---|
2064 | return trace_start_output(self); |
---|
2065 | } |
---|
2066 | static int libtrace_out_t_trace_config_output(struct libtrace_out_t *self,trace_option_output_t option,void *value){ |
---|
2067 | return trace_config_output(self, option, value); |
---|
2068 | } |
---|
2069 | static libtrace_err_t libtrace_out_t_trace_get_err_output(struct libtrace_out_t *self){ |
---|
2070 | return trace_get_err_output(self); |
---|
2071 | } |
---|
2072 | static bool libtrace_out_t_trace_is_err_output(struct libtrace_out_t *self){ |
---|
2073 | return trace_is_err_output(self); |
---|
2074 | } |
---|
2075 | static int libtrace_out_t_trace_write_packet(struct libtrace_out_t *self,libtrace_packet_t *packet){ |
---|
2076 | return trace_write_packet(self, packet); |
---|
2077 | } |
---|
2078 | #ifdef __cplusplus |
---|
2079 | extern "C" { |
---|
2080 | #endif |
---|
2081 | static PyObject *_wrap_in_addr_s_addr_set(PyObject *self, PyObject *args) { |
---|
2082 | PyObject *resultobj = NULL; |
---|
2083 | struct in_addr *arg1 = (struct in_addr *) 0 ; |
---|
2084 | int arg2 ; |
---|
2085 | PyObject * obj0 = 0 ; |
---|
2086 | PyObject * obj1 = 0 ; |
---|
2087 | |
---|
2088 | if(!PyArg_ParseTuple(args,(char *)"OO:in_addr_s_addr_set",&obj0,&obj1)) goto fail; |
---|
2089 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_in_addr, SWIG_POINTER_EXCEPTION | 0); |
---|
2090 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2091 | { |
---|
2092 | arg2 = (int)(SWIG_As_int(obj1)); |
---|
2093 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
2094 | } |
---|
2095 | if (arg1) (arg1)->s_addr = arg2; |
---|
2096 | |
---|
2097 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2098 | return resultobj; |
---|
2099 | fail: |
---|
2100 | return NULL; |
---|
2101 | } |
---|
2102 | |
---|
2103 | |
---|
2104 | static PyObject *_wrap_in_addr_s_addr_get(PyObject *self, PyObject *args) { |
---|
2105 | PyObject *resultobj = NULL; |
---|
2106 | struct in_addr *arg1 = (struct in_addr *) 0 ; |
---|
2107 | int result; |
---|
2108 | PyObject * obj0 = 0 ; |
---|
2109 | |
---|
2110 | if(!PyArg_ParseTuple(args,(char *)"O:in_addr_s_addr_get",&obj0)) goto fail; |
---|
2111 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_in_addr, SWIG_POINTER_EXCEPTION | 0); |
---|
2112 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2113 | result = (int) ((arg1)->s_addr); |
---|
2114 | |
---|
2115 | { |
---|
2116 | resultobj = SWIG_From_int((int)(result)); |
---|
2117 | } |
---|
2118 | return resultobj; |
---|
2119 | fail: |
---|
2120 | return NULL; |
---|
2121 | } |
---|
2122 | |
---|
2123 | |
---|
2124 | static PyObject * in_addr_swigregister(PyObject *self, PyObject *args) { |
---|
2125 | PyObject *obj; |
---|
2126 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
2127 | SWIG_TypeClientData(SWIGTYPE_p_in_addr, obj); |
---|
2128 | Py_INCREF(obj); |
---|
2129 | return Py_BuildValue((char *)""); |
---|
2130 | } |
---|
2131 | static PyObject *_wrap_libtrace_ip_ip_hl_set(PyObject *self, PyObject *args) { |
---|
2132 | PyObject *resultobj = NULL; |
---|
2133 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
2134 | unsigned int arg2 ; |
---|
2135 | PyObject * obj0 = 0 ; |
---|
2136 | PyObject * obj1 = 0 ; |
---|
2137 | |
---|
2138 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_ip_ip_hl_set",&obj0,&obj1)) goto fail; |
---|
2139 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0); |
---|
2140 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2141 | { |
---|
2142 | arg2 = (unsigned int)(SWIG_As_unsigned_SS_int(obj1)); |
---|
2143 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
2144 | } |
---|
2145 | if (arg1) (arg1)->ip_hl = arg2; |
---|
2146 | |
---|
2147 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2148 | return resultobj; |
---|
2149 | fail: |
---|
2150 | return NULL; |
---|
2151 | } |
---|
2152 | |
---|
2153 | |
---|
2154 | static PyObject *_wrap_libtrace_ip_ip_hl_get(PyObject *self, PyObject *args) { |
---|
2155 | PyObject *resultobj = NULL; |
---|
2156 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
2157 | unsigned int result; |
---|
2158 | PyObject * obj0 = 0 ; |
---|
2159 | |
---|
2160 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_hl_get",&obj0)) goto fail; |
---|
2161 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0); |
---|
2162 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2163 | result = (unsigned int) ((arg1)->ip_hl); |
---|
2164 | |
---|
2165 | { |
---|
2166 | resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); |
---|
2167 | } |
---|
2168 | return resultobj; |
---|
2169 | fail: |
---|
2170 | return NULL; |
---|
2171 | } |
---|
2172 | |
---|
2173 | |
---|
2174 | static PyObject *_wrap_libtrace_ip_ip_v_set(PyObject *self, PyObject *args) { |
---|
2175 | PyObject *resultobj = NULL; |
---|
2176 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
2177 | unsigned int arg2 ; |
---|
2178 | PyObject * obj0 = 0 ; |
---|
2179 | PyObject * obj1 = 0 ; |
---|
2180 | |
---|
2181 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_ip_ip_v_set",&obj0,&obj1)) goto fail; |
---|
2182 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0); |
---|
2183 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2184 | { |
---|
2185 | arg2 = (unsigned int)(SWIG_As_unsigned_SS_int(obj1)); |
---|
2186 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
2187 | } |
---|
2188 | if (arg1) (arg1)->ip_v = arg2; |
---|
2189 | |
---|
2190 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2191 | return resultobj; |
---|
2192 | fail: |
---|
2193 | return NULL; |
---|
2194 | } |
---|
2195 | |
---|
2196 | |
---|
2197 | static PyObject *_wrap_libtrace_ip_ip_v_get(PyObject *self, PyObject *args) { |
---|
2198 | PyObject *resultobj = NULL; |
---|
2199 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
2200 | unsigned int result; |
---|
2201 | PyObject * obj0 = 0 ; |
---|
2202 | |
---|
2203 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_v_get",&obj0)) goto fail; |
---|
2204 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0); |
---|
2205 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2206 | result = (unsigned int) ((arg1)->ip_v); |
---|
2207 | |
---|
2208 | { |
---|
2209 | resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); |
---|
2210 | } |
---|
2211 | return resultobj; |
---|
2212 | fail: |
---|
2213 | return NULL; |
---|
2214 | } |
---|
2215 | |
---|
2216 | |
---|
2217 | static PyObject *_wrap_libtrace_ip_ip_tos_set(PyObject *self, PyObject *args) { |
---|
2218 | PyObject *resultobj = NULL; |
---|
2219 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
2220 | uint8_t arg2 ; |
---|
2221 | PyObject * obj0 = 0 ; |
---|
2222 | PyObject * obj1 = 0 ; |
---|
2223 | |
---|
2224 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_ip_ip_tos_set",&obj0,&obj1)) goto fail; |
---|
2225 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0); |
---|
2226 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2227 | { |
---|
2228 | arg2 = (uint8_t)(SWIG_As_unsigned_SS_char(obj1)); |
---|
2229 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
2230 | } |
---|
2231 | if (arg1) (arg1)->ip_tos = arg2; |
---|
2232 | |
---|
2233 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2234 | return resultobj; |
---|
2235 | fail: |
---|
2236 | return NULL; |
---|
2237 | } |
---|
2238 | |
---|
2239 | |
---|
2240 | static PyObject *_wrap_libtrace_ip_ip_tos_get(PyObject *self, PyObject *args) { |
---|
2241 | PyObject *resultobj = NULL; |
---|
2242 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
2243 | uint8_t result; |
---|
2244 | PyObject * obj0 = 0 ; |
---|
2245 | |
---|
2246 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_tos_get",&obj0)) goto fail; |
---|
2247 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0); |
---|
2248 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2249 | result = (uint8_t) ((arg1)->ip_tos); |
---|
2250 | |
---|
2251 | { |
---|
2252 | resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result)); |
---|
2253 | } |
---|
2254 | return resultobj; |
---|
2255 | fail: |
---|
2256 | return NULL; |
---|
2257 | } |
---|
2258 | |
---|
2259 | |
---|
2260 | static PyObject *_wrap_libtrace_ip_ip_ttl_set(PyObject *self, PyObject *args) { |
---|
2261 | PyObject *resultobj = NULL; |
---|
2262 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
2263 | uint8_t arg2 ; |
---|
2264 | PyObject * obj0 = 0 ; |
---|
2265 | PyObject * obj1 = 0 ; |
---|
2266 | |
---|
2267 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_ip_ip_ttl_set",&obj0,&obj1)) goto fail; |
---|
2268 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0); |
---|
2269 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2270 | { |
---|
2271 | arg2 = (uint8_t)(SWIG_As_unsigned_SS_char(obj1)); |
---|
2272 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
2273 | } |
---|
2274 | if (arg1) (arg1)->ip_ttl = arg2; |
---|
2275 | |
---|
2276 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2277 | return resultobj; |
---|
2278 | fail: |
---|
2279 | return NULL; |
---|
2280 | } |
---|
2281 | |
---|
2282 | |
---|
2283 | static PyObject *_wrap_libtrace_ip_ip_ttl_get(PyObject *self, PyObject *args) { |
---|
2284 | PyObject *resultobj = NULL; |
---|
2285 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
2286 | uint8_t result; |
---|
2287 | PyObject * obj0 = 0 ; |
---|
2288 | |
---|
2289 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_ttl_get",&obj0)) goto fail; |
---|
2290 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0); |
---|
2291 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2292 | result = (uint8_t) ((arg1)->ip_ttl); |
---|
2293 | |
---|
2294 | { |
---|
2295 | resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result)); |
---|
2296 | } |
---|
2297 | return resultobj; |
---|
2298 | fail: |
---|
2299 | return NULL; |
---|
2300 | } |
---|
2301 | |
---|
2302 | |
---|
2303 | static PyObject *_wrap_libtrace_ip_ip_p_set(PyObject *self, PyObject *args) { |
---|
2304 | PyObject *resultobj = NULL; |
---|
2305 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
2306 | uint8_t arg2 ; |
---|
2307 | PyObject * obj0 = 0 ; |
---|
2308 | PyObject * obj1 = 0 ; |
---|
2309 | |
---|
2310 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_ip_ip_p_set",&obj0,&obj1)) goto fail; |
---|
2311 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0); |
---|
2312 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2313 | { |
---|
2314 | arg2 = (uint8_t)(SWIG_As_unsigned_SS_char(obj1)); |
---|
2315 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
2316 | } |
---|
2317 | if (arg1) (arg1)->ip_p = arg2; |
---|
2318 | |
---|
2319 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2320 | return resultobj; |
---|
2321 | fail: |
---|
2322 | return NULL; |
---|
2323 | } |
---|
2324 | |
---|
2325 | |
---|
2326 | static PyObject *_wrap_libtrace_ip_ip_p_get(PyObject *self, PyObject *args) { |
---|
2327 | PyObject *resultobj = NULL; |
---|
2328 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
2329 | uint8_t result; |
---|
2330 | PyObject * obj0 = 0 ; |
---|
2331 | |
---|
2332 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_p_get",&obj0)) goto fail; |
---|
2333 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0); |
---|
2334 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2335 | result = (uint8_t) ((arg1)->ip_p); |
---|
2336 | |
---|
2337 | { |
---|
2338 | resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result)); |
---|
2339 | } |
---|
2340 | return resultobj; |
---|
2341 | fail: |
---|
2342 | return NULL; |
---|
2343 | } |
---|
2344 | |
---|
2345 | |
---|
2346 | static PyObject *_wrap_libtrace_ip_ip_sum_get(PyObject *self, PyObject *args) { |
---|
2347 | PyObject *resultobj = NULL; |
---|
2348 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
2349 | uint16_t result; |
---|
2350 | PyObject * obj0 = 0 ; |
---|
2351 | |
---|
2352 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_sum_get",&obj0)) goto fail; |
---|
2353 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0); |
---|
2354 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2355 | result = (uint16_t)libtrace_ip_ip_sum_get(arg1); |
---|
2356 | |
---|
2357 | { |
---|
2358 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
2359 | } |
---|
2360 | return resultobj; |
---|
2361 | fail: |
---|
2362 | return NULL; |
---|
2363 | } |
---|
2364 | |
---|
2365 | |
---|
2366 | static PyObject *_wrap_libtrace_ip_ip_len_get(PyObject *self, PyObject *args) { |
---|
2367 | PyObject *resultobj = NULL; |
---|
2368 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
2369 | uint16_t result; |
---|
2370 | PyObject * obj0 = 0 ; |
---|
2371 | |
---|
2372 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_len_get",&obj0)) goto fail; |
---|
2373 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0); |
---|
2374 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2375 | result = (uint16_t)libtrace_ip_ip_len_get(arg1); |
---|
2376 | |
---|
2377 | { |
---|
2378 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
2379 | } |
---|
2380 | return resultobj; |
---|
2381 | fail: |
---|
2382 | return NULL; |
---|
2383 | } |
---|
2384 | |
---|
2385 | |
---|
2386 | static PyObject *_wrap_libtrace_ip_ip_id_get(PyObject *self, PyObject *args) { |
---|
2387 | PyObject *resultobj = NULL; |
---|
2388 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
2389 | uint16_t result; |
---|
2390 | PyObject * obj0 = 0 ; |
---|
2391 | |
---|
2392 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_id_get",&obj0)) goto fail; |
---|
2393 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0); |
---|
2394 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2395 | result = (uint16_t)libtrace_ip_ip_id_get(arg1); |
---|
2396 | |
---|
2397 | { |
---|
2398 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
2399 | } |
---|
2400 | return resultobj; |
---|
2401 | fail: |
---|
2402 | return NULL; |
---|
2403 | } |
---|
2404 | |
---|
2405 | |
---|
2406 | static PyObject *_wrap_libtrace_ip_ip_off_get(PyObject *self, PyObject *args) { |
---|
2407 | PyObject *resultobj = NULL; |
---|
2408 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
2409 | uint16_t result; |
---|
2410 | PyObject * obj0 = 0 ; |
---|
2411 | |
---|
2412 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_off_get",&obj0)) goto fail; |
---|
2413 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0); |
---|
2414 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2415 | result = (uint16_t)libtrace_ip_ip_off_get(arg1); |
---|
2416 | |
---|
2417 | { |
---|
2418 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
2419 | } |
---|
2420 | return resultobj; |
---|
2421 | fail: |
---|
2422 | return NULL; |
---|
2423 | } |
---|
2424 | |
---|
2425 | |
---|
2426 | static PyObject *_wrap_libtrace_ip_ip_src_get(PyObject *self, PyObject *args) { |
---|
2427 | PyObject *resultobj = NULL; |
---|
2428 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
2429 | char *result; |
---|
2430 | PyObject * obj0 = 0 ; |
---|
2431 | |
---|
2432 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_src_get",&obj0)) goto fail; |
---|
2433 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0); |
---|
2434 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2435 | result = (char *)libtrace_ip_ip_src_get(arg1); |
---|
2436 | |
---|
2437 | resultobj = SWIG_FromCharPtr(result); |
---|
2438 | free(result); |
---|
2439 | return resultobj; |
---|
2440 | fail: |
---|
2441 | return NULL; |
---|
2442 | } |
---|
2443 | |
---|
2444 | |
---|
2445 | static PyObject *_wrap_libtrace_ip_ip_dst_get(PyObject *self, PyObject *args) { |
---|
2446 | PyObject *resultobj = NULL; |
---|
2447 | struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ; |
---|
2448 | char *result; |
---|
2449 | PyObject * obj0 = 0 ; |
---|
2450 | |
---|
2451 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_dst_get",&obj0)) goto fail; |
---|
2452 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0); |
---|
2453 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2454 | result = (char *)libtrace_ip_ip_dst_get(arg1); |
---|
2455 | |
---|
2456 | resultobj = SWIG_FromCharPtr(result); |
---|
2457 | free(result); |
---|
2458 | return resultobj; |
---|
2459 | fail: |
---|
2460 | return NULL; |
---|
2461 | } |
---|
2462 | |
---|
2463 | |
---|
2464 | static PyObject * libtrace_ip_swigregister(PyObject *self, PyObject *args) { |
---|
2465 | PyObject *obj; |
---|
2466 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
2467 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_ip, obj); |
---|
2468 | Py_INCREF(obj); |
---|
2469 | return Py_BuildValue((char *)""); |
---|
2470 | } |
---|
2471 | static PyObject *_wrap_libtrace_tcp_res1_set(PyObject *self, PyObject *args) { |
---|
2472 | PyObject *resultobj = NULL; |
---|
2473 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2474 | uint16_t arg2 ; |
---|
2475 | PyObject * obj0 = 0 ; |
---|
2476 | PyObject * obj1 = 0 ; |
---|
2477 | |
---|
2478 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_res1_set",&obj0,&obj1)) goto fail; |
---|
2479 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2480 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2481 | { |
---|
2482 | arg2 = (uint16_t)(SWIG_As_unsigned_SS_short(obj1)); |
---|
2483 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
2484 | } |
---|
2485 | if (arg1) (arg1)->res1 = arg2; |
---|
2486 | |
---|
2487 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2488 | return resultobj; |
---|
2489 | fail: |
---|
2490 | return NULL; |
---|
2491 | } |
---|
2492 | |
---|
2493 | |
---|
2494 | static PyObject *_wrap_libtrace_tcp_res1_get(PyObject *self, PyObject *args) { |
---|
2495 | PyObject *resultobj = NULL; |
---|
2496 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2497 | uint16_t result; |
---|
2498 | PyObject * obj0 = 0 ; |
---|
2499 | |
---|
2500 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_res1_get",&obj0)) goto fail; |
---|
2501 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2502 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2503 | result = (uint16_t) ((arg1)->res1); |
---|
2504 | |
---|
2505 | { |
---|
2506 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
2507 | } |
---|
2508 | return resultobj; |
---|
2509 | fail: |
---|
2510 | return NULL; |
---|
2511 | } |
---|
2512 | |
---|
2513 | |
---|
2514 | static PyObject *_wrap_libtrace_tcp_doff_set(PyObject *self, PyObject *args) { |
---|
2515 | PyObject *resultobj = NULL; |
---|
2516 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2517 | uint16_t arg2 ; |
---|
2518 | PyObject * obj0 = 0 ; |
---|
2519 | PyObject * obj1 = 0 ; |
---|
2520 | |
---|
2521 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_doff_set",&obj0,&obj1)) goto fail; |
---|
2522 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2523 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2524 | { |
---|
2525 | arg2 = (uint16_t)(SWIG_As_unsigned_SS_short(obj1)); |
---|
2526 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
2527 | } |
---|
2528 | if (arg1) (arg1)->doff = arg2; |
---|
2529 | |
---|
2530 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2531 | return resultobj; |
---|
2532 | fail: |
---|
2533 | return NULL; |
---|
2534 | } |
---|
2535 | |
---|
2536 | |
---|
2537 | static PyObject *_wrap_libtrace_tcp_doff_get(PyObject *self, PyObject *args) { |
---|
2538 | PyObject *resultobj = NULL; |
---|
2539 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2540 | uint16_t result; |
---|
2541 | PyObject * obj0 = 0 ; |
---|
2542 | |
---|
2543 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_doff_get",&obj0)) goto fail; |
---|
2544 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2545 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2546 | result = (uint16_t) ((arg1)->doff); |
---|
2547 | |
---|
2548 | { |
---|
2549 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
2550 | } |
---|
2551 | return resultobj; |
---|
2552 | fail: |
---|
2553 | return NULL; |
---|
2554 | } |
---|
2555 | |
---|
2556 | |
---|
2557 | static PyObject *_wrap_libtrace_tcp_fin_set(PyObject *self, PyObject *args) { |
---|
2558 | PyObject *resultobj = NULL; |
---|
2559 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2560 | uint16_t arg2 ; |
---|
2561 | PyObject * obj0 = 0 ; |
---|
2562 | PyObject * obj1 = 0 ; |
---|
2563 | |
---|
2564 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_fin_set",&obj0,&obj1)) goto fail; |
---|
2565 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2566 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2567 | { |
---|
2568 | arg2 = (uint16_t)(SWIG_As_unsigned_SS_short(obj1)); |
---|
2569 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
2570 | } |
---|
2571 | if (arg1) (arg1)->fin = arg2; |
---|
2572 | |
---|
2573 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2574 | return resultobj; |
---|
2575 | fail: |
---|
2576 | return NULL; |
---|
2577 | } |
---|
2578 | |
---|
2579 | |
---|
2580 | static PyObject *_wrap_libtrace_tcp_fin_get(PyObject *self, PyObject *args) { |
---|
2581 | PyObject *resultobj = NULL; |
---|
2582 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2583 | uint16_t result; |
---|
2584 | PyObject * obj0 = 0 ; |
---|
2585 | |
---|
2586 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_fin_get",&obj0)) goto fail; |
---|
2587 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2588 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2589 | result = (uint16_t) ((arg1)->fin); |
---|
2590 | |
---|
2591 | { |
---|
2592 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
2593 | } |
---|
2594 | return resultobj; |
---|
2595 | fail: |
---|
2596 | return NULL; |
---|
2597 | } |
---|
2598 | |
---|
2599 | |
---|
2600 | static PyObject *_wrap_libtrace_tcp_syn_set(PyObject *self, PyObject *args) { |
---|
2601 | PyObject *resultobj = NULL; |
---|
2602 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2603 | uint16_t arg2 ; |
---|
2604 | PyObject * obj0 = 0 ; |
---|
2605 | PyObject * obj1 = 0 ; |
---|
2606 | |
---|
2607 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_syn_set",&obj0,&obj1)) goto fail; |
---|
2608 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2609 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2610 | { |
---|
2611 | arg2 = (uint16_t)(SWIG_As_unsigned_SS_short(obj1)); |
---|
2612 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
2613 | } |
---|
2614 | if (arg1) (arg1)->syn = arg2; |
---|
2615 | |
---|
2616 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2617 | return resultobj; |
---|
2618 | fail: |
---|
2619 | return NULL; |
---|
2620 | } |
---|
2621 | |
---|
2622 | |
---|
2623 | static PyObject *_wrap_libtrace_tcp_syn_get(PyObject *self, PyObject *args) { |
---|
2624 | PyObject *resultobj = NULL; |
---|
2625 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2626 | uint16_t result; |
---|
2627 | PyObject * obj0 = 0 ; |
---|
2628 | |
---|
2629 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_syn_get",&obj0)) goto fail; |
---|
2630 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2631 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2632 | result = (uint16_t) ((arg1)->syn); |
---|
2633 | |
---|
2634 | { |
---|
2635 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
2636 | } |
---|
2637 | return resultobj; |
---|
2638 | fail: |
---|
2639 | return NULL; |
---|
2640 | } |
---|
2641 | |
---|
2642 | |
---|
2643 | static PyObject *_wrap_libtrace_tcp_rst_set(PyObject *self, PyObject *args) { |
---|
2644 | PyObject *resultobj = NULL; |
---|
2645 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2646 | uint16_t arg2 ; |
---|
2647 | PyObject * obj0 = 0 ; |
---|
2648 | PyObject * obj1 = 0 ; |
---|
2649 | |
---|
2650 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_rst_set",&obj0,&obj1)) goto fail; |
---|
2651 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2652 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2653 | { |
---|
2654 | arg2 = (uint16_t)(SWIG_As_unsigned_SS_short(obj1)); |
---|
2655 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
2656 | } |
---|
2657 | if (arg1) (arg1)->rst = arg2; |
---|
2658 | |
---|
2659 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2660 | return resultobj; |
---|
2661 | fail: |
---|
2662 | return NULL; |
---|
2663 | } |
---|
2664 | |
---|
2665 | |
---|
2666 | static PyObject *_wrap_libtrace_tcp_rst_get(PyObject *self, PyObject *args) { |
---|
2667 | PyObject *resultobj = NULL; |
---|
2668 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2669 | uint16_t result; |
---|
2670 | PyObject * obj0 = 0 ; |
---|
2671 | |
---|
2672 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_rst_get",&obj0)) goto fail; |
---|
2673 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2674 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2675 | result = (uint16_t) ((arg1)->rst); |
---|
2676 | |
---|
2677 | { |
---|
2678 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
2679 | } |
---|
2680 | return resultobj; |
---|
2681 | fail: |
---|
2682 | return NULL; |
---|
2683 | } |
---|
2684 | |
---|
2685 | |
---|
2686 | static PyObject *_wrap_libtrace_tcp_psh_set(PyObject *self, PyObject *args) { |
---|
2687 | PyObject *resultobj = NULL; |
---|
2688 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2689 | uint16_t arg2 ; |
---|
2690 | PyObject * obj0 = 0 ; |
---|
2691 | PyObject * obj1 = 0 ; |
---|
2692 | |
---|
2693 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_psh_set",&obj0,&obj1)) goto fail; |
---|
2694 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2695 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2696 | { |
---|
2697 | arg2 = (uint16_t)(SWIG_As_unsigned_SS_short(obj1)); |
---|
2698 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
2699 | } |
---|
2700 | if (arg1) (arg1)->psh = arg2; |
---|
2701 | |
---|
2702 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2703 | return resultobj; |
---|
2704 | fail: |
---|
2705 | return NULL; |
---|
2706 | } |
---|
2707 | |
---|
2708 | |
---|
2709 | static PyObject *_wrap_libtrace_tcp_psh_get(PyObject *self, PyObject *args) { |
---|
2710 | PyObject *resultobj = NULL; |
---|
2711 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2712 | uint16_t result; |
---|
2713 | PyObject * obj0 = 0 ; |
---|
2714 | |
---|
2715 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_psh_get",&obj0)) goto fail; |
---|
2716 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2717 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2718 | result = (uint16_t) ((arg1)->psh); |
---|
2719 | |
---|
2720 | { |
---|
2721 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
2722 | } |
---|
2723 | return resultobj; |
---|
2724 | fail: |
---|
2725 | return NULL; |
---|
2726 | } |
---|
2727 | |
---|
2728 | |
---|
2729 | static PyObject *_wrap_libtrace_tcp_ack_set(PyObject *self, PyObject *args) { |
---|
2730 | PyObject *resultobj = NULL; |
---|
2731 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2732 | uint16_t arg2 ; |
---|
2733 | PyObject * obj0 = 0 ; |
---|
2734 | PyObject * obj1 = 0 ; |
---|
2735 | |
---|
2736 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_ack_set",&obj0,&obj1)) goto fail; |
---|
2737 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2738 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2739 | { |
---|
2740 | arg2 = (uint16_t)(SWIG_As_unsigned_SS_short(obj1)); |
---|
2741 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
2742 | } |
---|
2743 | if (arg1) (arg1)->ack = arg2; |
---|
2744 | |
---|
2745 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2746 | return resultobj; |
---|
2747 | fail: |
---|
2748 | return NULL; |
---|
2749 | } |
---|
2750 | |
---|
2751 | |
---|
2752 | static PyObject *_wrap_libtrace_tcp_ack_get(PyObject *self, PyObject *args) { |
---|
2753 | PyObject *resultobj = NULL; |
---|
2754 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2755 | uint16_t result; |
---|
2756 | PyObject * obj0 = 0 ; |
---|
2757 | |
---|
2758 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_ack_get",&obj0)) goto fail; |
---|
2759 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2760 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2761 | result = (uint16_t) ((arg1)->ack); |
---|
2762 | |
---|
2763 | { |
---|
2764 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
2765 | } |
---|
2766 | return resultobj; |
---|
2767 | fail: |
---|
2768 | return NULL; |
---|
2769 | } |
---|
2770 | |
---|
2771 | |
---|
2772 | static PyObject *_wrap_libtrace_tcp_urg_set(PyObject *self, PyObject *args) { |
---|
2773 | PyObject *resultobj = NULL; |
---|
2774 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2775 | uint16_t arg2 ; |
---|
2776 | PyObject * obj0 = 0 ; |
---|
2777 | PyObject * obj1 = 0 ; |
---|
2778 | |
---|
2779 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_urg_set",&obj0,&obj1)) goto fail; |
---|
2780 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2781 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2782 | { |
---|
2783 | arg2 = (uint16_t)(SWIG_As_unsigned_SS_short(obj1)); |
---|
2784 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
2785 | } |
---|
2786 | if (arg1) (arg1)->urg = arg2; |
---|
2787 | |
---|
2788 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2789 | return resultobj; |
---|
2790 | fail: |
---|
2791 | return NULL; |
---|
2792 | } |
---|
2793 | |
---|
2794 | |
---|
2795 | static PyObject *_wrap_libtrace_tcp_urg_get(PyObject *self, PyObject *args) { |
---|
2796 | PyObject *resultobj = NULL; |
---|
2797 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2798 | uint16_t result; |
---|
2799 | PyObject * obj0 = 0 ; |
---|
2800 | |
---|
2801 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_urg_get",&obj0)) goto fail; |
---|
2802 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2803 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2804 | result = (uint16_t) ((arg1)->urg); |
---|
2805 | |
---|
2806 | { |
---|
2807 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
2808 | } |
---|
2809 | return resultobj; |
---|
2810 | fail: |
---|
2811 | return NULL; |
---|
2812 | } |
---|
2813 | |
---|
2814 | |
---|
2815 | static PyObject *_wrap_libtrace_tcp_res2_set(PyObject *self, PyObject *args) { |
---|
2816 | PyObject *resultobj = NULL; |
---|
2817 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2818 | uint16_t arg2 ; |
---|
2819 | PyObject * obj0 = 0 ; |
---|
2820 | PyObject * obj1 = 0 ; |
---|
2821 | |
---|
2822 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_res2_set",&obj0,&obj1)) goto fail; |
---|
2823 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2824 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2825 | { |
---|
2826 | arg2 = (uint16_t)(SWIG_As_unsigned_SS_short(obj1)); |
---|
2827 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
2828 | } |
---|
2829 | if (arg1) (arg1)->res2 = arg2; |
---|
2830 | |
---|
2831 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
2832 | return resultobj; |
---|
2833 | fail: |
---|
2834 | return NULL; |
---|
2835 | } |
---|
2836 | |
---|
2837 | |
---|
2838 | static PyObject *_wrap_libtrace_tcp_res2_get(PyObject *self, PyObject *args) { |
---|
2839 | PyObject *resultobj = NULL; |
---|
2840 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2841 | uint16_t result; |
---|
2842 | PyObject * obj0 = 0 ; |
---|
2843 | |
---|
2844 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_res2_get",&obj0)) goto fail; |
---|
2845 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2846 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2847 | result = (uint16_t) ((arg1)->res2); |
---|
2848 | |
---|
2849 | { |
---|
2850 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
2851 | } |
---|
2852 | return resultobj; |
---|
2853 | fail: |
---|
2854 | return NULL; |
---|
2855 | } |
---|
2856 | |
---|
2857 | |
---|
2858 | static PyObject *_wrap_libtrace_tcp_source_get(PyObject *self, PyObject *args) { |
---|
2859 | PyObject *resultobj = NULL; |
---|
2860 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2861 | uint16_t result; |
---|
2862 | PyObject * obj0 = 0 ; |
---|
2863 | |
---|
2864 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_source_get",&obj0)) goto fail; |
---|
2865 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2866 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2867 | result = (uint16_t)libtrace_tcp_source_get(arg1); |
---|
2868 | |
---|
2869 | { |
---|
2870 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
2871 | } |
---|
2872 | return resultobj; |
---|
2873 | fail: |
---|
2874 | return NULL; |
---|
2875 | } |
---|
2876 | |
---|
2877 | |
---|
2878 | static PyObject *_wrap_libtrace_tcp_dest_get(PyObject *self, PyObject *args) { |
---|
2879 | PyObject *resultobj = NULL; |
---|
2880 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2881 | uint16_t result; |
---|
2882 | PyObject * obj0 = 0 ; |
---|
2883 | |
---|
2884 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_dest_get",&obj0)) goto fail; |
---|
2885 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2886 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2887 | result = (uint16_t)libtrace_tcp_dest_get(arg1); |
---|
2888 | |
---|
2889 | { |
---|
2890 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
2891 | } |
---|
2892 | return resultobj; |
---|
2893 | fail: |
---|
2894 | return NULL; |
---|
2895 | } |
---|
2896 | |
---|
2897 | |
---|
2898 | static PyObject *_wrap_libtrace_tcp_window_get(PyObject *self, PyObject *args) { |
---|
2899 | PyObject *resultobj = NULL; |
---|
2900 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2901 | uint16_t result; |
---|
2902 | PyObject * obj0 = 0 ; |
---|
2903 | |
---|
2904 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_window_get",&obj0)) goto fail; |
---|
2905 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2906 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2907 | result = (uint16_t)libtrace_tcp_window_get(arg1); |
---|
2908 | |
---|
2909 | { |
---|
2910 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
2911 | } |
---|
2912 | return resultobj; |
---|
2913 | fail: |
---|
2914 | return NULL; |
---|
2915 | } |
---|
2916 | |
---|
2917 | |
---|
2918 | static PyObject *_wrap_libtrace_tcp_check_get(PyObject *self, PyObject *args) { |
---|
2919 | PyObject *resultobj = NULL; |
---|
2920 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2921 | uint16_t result; |
---|
2922 | PyObject * obj0 = 0 ; |
---|
2923 | |
---|
2924 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_check_get",&obj0)) goto fail; |
---|
2925 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2926 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2927 | result = (uint16_t)libtrace_tcp_check_get(arg1); |
---|
2928 | |
---|
2929 | { |
---|
2930 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
2931 | } |
---|
2932 | return resultobj; |
---|
2933 | fail: |
---|
2934 | return NULL; |
---|
2935 | } |
---|
2936 | |
---|
2937 | |
---|
2938 | static PyObject *_wrap_libtrace_tcp_urg_ptr_get(PyObject *self, PyObject *args) { |
---|
2939 | PyObject *resultobj = NULL; |
---|
2940 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2941 | uint16_t result; |
---|
2942 | PyObject * obj0 = 0 ; |
---|
2943 | |
---|
2944 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_urg_ptr_get",&obj0)) goto fail; |
---|
2945 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2946 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2947 | result = (uint16_t)libtrace_tcp_urg_ptr_get(arg1); |
---|
2948 | |
---|
2949 | { |
---|
2950 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
2951 | } |
---|
2952 | return resultobj; |
---|
2953 | fail: |
---|
2954 | return NULL; |
---|
2955 | } |
---|
2956 | |
---|
2957 | |
---|
2958 | static PyObject *_wrap_libtrace_tcp_seq_get(PyObject *self, PyObject *args) { |
---|
2959 | PyObject *resultobj = NULL; |
---|
2960 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2961 | uint32_t result; |
---|
2962 | PyObject * obj0 = 0 ; |
---|
2963 | |
---|
2964 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_seq_get",&obj0)) goto fail; |
---|
2965 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2966 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2967 | result = (uint32_t)libtrace_tcp_seq_get(arg1); |
---|
2968 | |
---|
2969 | { |
---|
2970 | resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); |
---|
2971 | } |
---|
2972 | return resultobj; |
---|
2973 | fail: |
---|
2974 | return NULL; |
---|
2975 | } |
---|
2976 | |
---|
2977 | |
---|
2978 | static PyObject *_wrap_libtrace_tcp_ack_seq_get(PyObject *self, PyObject *args) { |
---|
2979 | PyObject *resultobj = NULL; |
---|
2980 | struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ; |
---|
2981 | uint32_t result; |
---|
2982 | PyObject * obj0 = 0 ; |
---|
2983 | |
---|
2984 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_ack_seq_get",&obj0)) goto fail; |
---|
2985 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0); |
---|
2986 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
2987 | result = (uint32_t)libtrace_tcp_ack_seq_get(arg1); |
---|
2988 | |
---|
2989 | { |
---|
2990 | resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); |
---|
2991 | } |
---|
2992 | return resultobj; |
---|
2993 | fail: |
---|
2994 | return NULL; |
---|
2995 | } |
---|
2996 | |
---|
2997 | |
---|
2998 | static PyObject * libtrace_tcp_swigregister(PyObject *self, PyObject *args) { |
---|
2999 | PyObject *obj; |
---|
3000 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
3001 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_tcp, obj); |
---|
3002 | Py_INCREF(obj); |
---|
3003 | return Py_BuildValue((char *)""); |
---|
3004 | } |
---|
3005 | static PyObject *_wrap_libtrace_udp_source_get(PyObject *self, PyObject *args) { |
---|
3006 | PyObject *resultobj = NULL; |
---|
3007 | struct libtrace_udp *arg1 = (struct libtrace_udp *) 0 ; |
---|
3008 | uint16_t result; |
---|
3009 | PyObject * obj0 = 0 ; |
---|
3010 | |
---|
3011 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_udp_source_get",&obj0)) goto fail; |
---|
3012 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_udp, SWIG_POINTER_EXCEPTION | 0); |
---|
3013 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3014 | result = (uint16_t)libtrace_udp_source_get(arg1); |
---|
3015 | |
---|
3016 | { |
---|
3017 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
3018 | } |
---|
3019 | return resultobj; |
---|
3020 | fail: |
---|
3021 | return NULL; |
---|
3022 | } |
---|
3023 | |
---|
3024 | |
---|
3025 | static PyObject *_wrap_libtrace_udp_dest_get(PyObject *self, PyObject *args) { |
---|
3026 | PyObject *resultobj = NULL; |
---|
3027 | struct libtrace_udp *arg1 = (struct libtrace_udp *) 0 ; |
---|
3028 | uint16_t result; |
---|
3029 | PyObject * obj0 = 0 ; |
---|
3030 | |
---|
3031 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_udp_dest_get",&obj0)) goto fail; |
---|
3032 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_udp, SWIG_POINTER_EXCEPTION | 0); |
---|
3033 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3034 | result = (uint16_t)libtrace_udp_dest_get(arg1); |
---|
3035 | |
---|
3036 | { |
---|
3037 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
3038 | } |
---|
3039 | return resultobj; |
---|
3040 | fail: |
---|
3041 | return NULL; |
---|
3042 | } |
---|
3043 | |
---|
3044 | |
---|
3045 | static PyObject *_wrap_libtrace_udp_len_get(PyObject *self, PyObject *args) { |
---|
3046 | PyObject *resultobj = NULL; |
---|
3047 | struct libtrace_udp *arg1 = (struct libtrace_udp *) 0 ; |
---|
3048 | uint16_t result; |
---|
3049 | PyObject * obj0 = 0 ; |
---|
3050 | |
---|
3051 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_udp_len_get",&obj0)) goto fail; |
---|
3052 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_udp, SWIG_POINTER_EXCEPTION | 0); |
---|
3053 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3054 | result = (uint16_t)libtrace_udp_len_get(arg1); |
---|
3055 | |
---|
3056 | { |
---|
3057 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
3058 | } |
---|
3059 | return resultobj; |
---|
3060 | fail: |
---|
3061 | return NULL; |
---|
3062 | } |
---|
3063 | |
---|
3064 | |
---|
3065 | static PyObject *_wrap_libtrace_udp_check_get(PyObject *self, PyObject *args) { |
---|
3066 | PyObject *resultobj = NULL; |
---|
3067 | struct libtrace_udp *arg1 = (struct libtrace_udp *) 0 ; |
---|
3068 | uint16_t result; |
---|
3069 | PyObject * obj0 = 0 ; |
---|
3070 | |
---|
3071 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_udp_check_get",&obj0)) goto fail; |
---|
3072 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_udp, SWIG_POINTER_EXCEPTION | 0); |
---|
3073 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3074 | result = (uint16_t)libtrace_udp_check_get(arg1); |
---|
3075 | |
---|
3076 | { |
---|
3077 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
3078 | } |
---|
3079 | return resultobj; |
---|
3080 | fail: |
---|
3081 | return NULL; |
---|
3082 | } |
---|
3083 | |
---|
3084 | |
---|
3085 | static PyObject * libtrace_udp_swigregister(PyObject *self, PyObject *args) { |
---|
3086 | PyObject *obj; |
---|
3087 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
3088 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_udp, obj); |
---|
3089 | Py_INCREF(obj); |
---|
3090 | return Py_BuildValue((char *)""); |
---|
3091 | } |
---|
3092 | static PyObject *_wrap_libtrace_icmp_type_set(PyObject *self, PyObject *args) { |
---|
3093 | PyObject *resultobj = NULL; |
---|
3094 | struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ; |
---|
3095 | uint8_t arg2 ; |
---|
3096 | PyObject * obj0 = 0 ; |
---|
3097 | PyObject * obj1 = 0 ; |
---|
3098 | |
---|
3099 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_type_set",&obj0,&obj1)) goto fail; |
---|
3100 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp, SWIG_POINTER_EXCEPTION | 0); |
---|
3101 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3102 | { |
---|
3103 | arg2 = (uint8_t)(SWIG_As_unsigned_SS_char(obj1)); |
---|
3104 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
3105 | } |
---|
3106 | if (arg1) (arg1)->type = arg2; |
---|
3107 | |
---|
3108 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
3109 | return resultobj; |
---|
3110 | fail: |
---|
3111 | return NULL; |
---|
3112 | } |
---|
3113 | |
---|
3114 | |
---|
3115 | static PyObject *_wrap_libtrace_icmp_type_get(PyObject *self, PyObject *args) { |
---|
3116 | PyObject *resultobj = NULL; |
---|
3117 | struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ; |
---|
3118 | uint8_t result; |
---|
3119 | PyObject * obj0 = 0 ; |
---|
3120 | |
---|
3121 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_type_get",&obj0)) goto fail; |
---|
3122 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp, SWIG_POINTER_EXCEPTION | 0); |
---|
3123 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3124 | result = (uint8_t) ((arg1)->type); |
---|
3125 | |
---|
3126 | { |
---|
3127 | resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result)); |
---|
3128 | } |
---|
3129 | return resultobj; |
---|
3130 | fail: |
---|
3131 | return NULL; |
---|
3132 | } |
---|
3133 | |
---|
3134 | |
---|
3135 | static PyObject *_wrap_libtrace_icmp_code_set(PyObject *self, PyObject *args) { |
---|
3136 | PyObject *resultobj = NULL; |
---|
3137 | struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ; |
---|
3138 | uint8_t arg2 ; |
---|
3139 | PyObject * obj0 = 0 ; |
---|
3140 | PyObject * obj1 = 0 ; |
---|
3141 | |
---|
3142 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_code_set",&obj0,&obj1)) goto fail; |
---|
3143 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp, SWIG_POINTER_EXCEPTION | 0); |
---|
3144 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3145 | { |
---|
3146 | arg2 = (uint8_t)(SWIG_As_unsigned_SS_char(obj1)); |
---|
3147 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
3148 | } |
---|
3149 | if (arg1) (arg1)->code = arg2; |
---|
3150 | |
---|
3151 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
3152 | return resultobj; |
---|
3153 | fail: |
---|
3154 | return NULL; |
---|
3155 | } |
---|
3156 | |
---|
3157 | |
---|
3158 | static PyObject *_wrap_libtrace_icmp_code_get(PyObject *self, PyObject *args) { |
---|
3159 | PyObject *resultobj = NULL; |
---|
3160 | struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ; |
---|
3161 | uint8_t result; |
---|
3162 | PyObject * obj0 = 0 ; |
---|
3163 | |
---|
3164 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_code_get",&obj0)) goto fail; |
---|
3165 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp, SWIG_POINTER_EXCEPTION | 0); |
---|
3166 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3167 | result = (uint8_t) ((arg1)->code); |
---|
3168 | |
---|
3169 | { |
---|
3170 | resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result)); |
---|
3171 | } |
---|
3172 | return resultobj; |
---|
3173 | fail: |
---|
3174 | return NULL; |
---|
3175 | } |
---|
3176 | |
---|
3177 | |
---|
3178 | static PyObject *_wrap_libtrace_icmp_checksum_set(PyObject *self, PyObject *args) { |
---|
3179 | PyObject *resultobj = NULL; |
---|
3180 | struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ; |
---|
3181 | uint16_t arg2 ; |
---|
3182 | PyObject * obj0 = 0 ; |
---|
3183 | PyObject * obj1 = 0 ; |
---|
3184 | |
---|
3185 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_checksum_set",&obj0,&obj1)) goto fail; |
---|
3186 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp, SWIG_POINTER_EXCEPTION | 0); |
---|
3187 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3188 | { |
---|
3189 | arg2 = (uint16_t)(SWIG_As_unsigned_SS_short(obj1)); |
---|
3190 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
3191 | } |
---|
3192 | if (arg1) (arg1)->checksum = arg2; |
---|
3193 | |
---|
3194 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
3195 | return resultobj; |
---|
3196 | fail: |
---|
3197 | return NULL; |
---|
3198 | } |
---|
3199 | |
---|
3200 | |
---|
3201 | static PyObject *_wrap_libtrace_icmp_checksum_get(PyObject *self, PyObject *args) { |
---|
3202 | PyObject *resultobj = NULL; |
---|
3203 | struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ; |
---|
3204 | uint16_t result; |
---|
3205 | PyObject * obj0 = 0 ; |
---|
3206 | |
---|
3207 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_checksum_get",&obj0)) goto fail; |
---|
3208 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp, SWIG_POINTER_EXCEPTION | 0); |
---|
3209 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3210 | result = (uint16_t) ((arg1)->checksum); |
---|
3211 | |
---|
3212 | { |
---|
3213 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
3214 | } |
---|
3215 | return resultobj; |
---|
3216 | fail: |
---|
3217 | return NULL; |
---|
3218 | } |
---|
3219 | |
---|
3220 | |
---|
3221 | static PyObject *_wrap_libtrace_icmp_un_get(PyObject *self, PyObject *args) { |
---|
3222 | PyObject *resultobj = NULL; |
---|
3223 | struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ; |
---|
3224 | libtrace_icmp_un *result; |
---|
3225 | PyObject * obj0 = 0 ; |
---|
3226 | |
---|
3227 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_get",&obj0)) goto fail; |
---|
3228 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp, SWIG_POINTER_EXCEPTION | 0); |
---|
3229 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3230 | result = (libtrace_icmp_un *)& ((arg1)->un); |
---|
3231 | |
---|
3232 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_libtrace_icmp_un, 0); |
---|
3233 | return resultobj; |
---|
3234 | fail: |
---|
3235 | return NULL; |
---|
3236 | } |
---|
3237 | |
---|
3238 | |
---|
3239 | static PyObject * libtrace_icmp_swigregister(PyObject *self, PyObject *args) { |
---|
3240 | PyObject *obj; |
---|
3241 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
3242 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_icmp, obj); |
---|
3243 | Py_INCREF(obj); |
---|
3244 | return Py_BuildValue((char *)""); |
---|
3245 | } |
---|
3246 | static PyObject *_wrap_libtrace_icmp_un_gateway_set(PyObject *self, PyObject *args) { |
---|
3247 | PyObject *resultobj = NULL; |
---|
3248 | libtrace_icmp_un *arg1 = (libtrace_icmp_un *) 0 ; |
---|
3249 | uint32_t arg2 ; |
---|
3250 | PyObject * obj0 = 0 ; |
---|
3251 | PyObject * obj1 = 0 ; |
---|
3252 | |
---|
3253 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_un_gateway_set",&obj0,&obj1)) goto fail; |
---|
3254 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp_un, SWIG_POINTER_EXCEPTION | 0); |
---|
3255 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3256 | { |
---|
3257 | arg2 = (uint32_t)(SWIG_As_unsigned_SS_int(obj1)); |
---|
3258 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
3259 | } |
---|
3260 | if (arg1) (arg1)->gateway = arg2; |
---|
3261 | |
---|
3262 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
3263 | return resultobj; |
---|
3264 | fail: |
---|
3265 | return NULL; |
---|
3266 | } |
---|
3267 | |
---|
3268 | |
---|
3269 | static PyObject *_wrap_libtrace_icmp_un_gateway_get(PyObject *self, PyObject *args) { |
---|
3270 | PyObject *resultobj = NULL; |
---|
3271 | libtrace_icmp_un *arg1 = (libtrace_icmp_un *) 0 ; |
---|
3272 | uint32_t result; |
---|
3273 | PyObject * obj0 = 0 ; |
---|
3274 | |
---|
3275 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_gateway_get",&obj0)) goto fail; |
---|
3276 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp_un, SWIG_POINTER_EXCEPTION | 0); |
---|
3277 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3278 | result = (uint32_t) ((arg1)->gateway); |
---|
3279 | |
---|
3280 | { |
---|
3281 | resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); |
---|
3282 | } |
---|
3283 | return resultobj; |
---|
3284 | fail: |
---|
3285 | return NULL; |
---|
3286 | } |
---|
3287 | |
---|
3288 | |
---|
3289 | static PyObject *_wrap_libtrace_icmp_un_frag_get(PyObject *self, PyObject *args) { |
---|
3290 | PyObject *resultobj = NULL; |
---|
3291 | libtrace_icmp_un *arg1 = (libtrace_icmp_un *) 0 ; |
---|
3292 | libtrace_icmp_un_frag *result; |
---|
3293 | PyObject * obj0 = 0 ; |
---|
3294 | |
---|
3295 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_frag_get",&obj0)) goto fail; |
---|
3296 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp_un, SWIG_POINTER_EXCEPTION | 0); |
---|
3297 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3298 | result = (libtrace_icmp_un_frag *)& ((arg1)->frag); |
---|
3299 | |
---|
3300 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_libtrace_icmp_un_frag, 0); |
---|
3301 | return resultobj; |
---|
3302 | fail: |
---|
3303 | return NULL; |
---|
3304 | } |
---|
3305 | |
---|
3306 | |
---|
3307 | static PyObject *_wrap_libtrace_icmp_un_echo_get(PyObject *self, PyObject *args) { |
---|
3308 | PyObject *resultobj = NULL; |
---|
3309 | libtrace_icmp_un *arg1 = (libtrace_icmp_un *) 0 ; |
---|
3310 | libtrace_icmp_un_echo *result; |
---|
3311 | PyObject * obj0 = 0 ; |
---|
3312 | |
---|
3313 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_echo_get",&obj0)) goto fail; |
---|
3314 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp_un, SWIG_POINTER_EXCEPTION | 0); |
---|
3315 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3316 | result = (libtrace_icmp_un_echo *)& ((arg1)->echo); |
---|
3317 | |
---|
3318 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_libtrace_icmp_un_echo, 0); |
---|
3319 | return resultobj; |
---|
3320 | fail: |
---|
3321 | return NULL; |
---|
3322 | } |
---|
3323 | |
---|
3324 | |
---|
3325 | static PyObject * libtrace_icmp_un_swigregister(PyObject *self, PyObject *args) { |
---|
3326 | PyObject *obj; |
---|
3327 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
3328 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_icmp_un, obj); |
---|
3329 | Py_INCREF(obj); |
---|
3330 | return Py_BuildValue((char *)""); |
---|
3331 | } |
---|
3332 | static PyObject *_wrap_libtrace_icmp_un_frag___unused_set(PyObject *self, PyObject *args) { |
---|
3333 | PyObject *resultobj = NULL; |
---|
3334 | libtrace_icmp_un_frag *arg1 = (libtrace_icmp_un_frag *) 0 ; |
---|
3335 | uint16_t arg2 ; |
---|
3336 | PyObject * obj0 = 0 ; |
---|
3337 | PyObject * obj1 = 0 ; |
---|
3338 | |
---|
3339 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_un_frag___unused_set",&obj0,&obj1)) goto fail; |
---|
3340 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp_un_frag, SWIG_POINTER_EXCEPTION | 0); |
---|
3341 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3342 | { |
---|
3343 | arg2 = (uint16_t)(SWIG_As_unsigned_SS_short(obj1)); |
---|
3344 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
3345 | } |
---|
3346 | if (arg1) (arg1)->__unused = arg2; |
---|
3347 | |
---|
3348 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
3349 | return resultobj; |
---|
3350 | fail: |
---|
3351 | return NULL; |
---|
3352 | } |
---|
3353 | |
---|
3354 | |
---|
3355 | static PyObject *_wrap_libtrace_icmp_un_frag___unused_get(PyObject *self, PyObject *args) { |
---|
3356 | PyObject *resultobj = NULL; |
---|
3357 | libtrace_icmp_un_frag *arg1 = (libtrace_icmp_un_frag *) 0 ; |
---|
3358 | uint16_t result; |
---|
3359 | PyObject * obj0 = 0 ; |
---|
3360 | |
---|
3361 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_frag___unused_get",&obj0)) goto fail; |
---|
3362 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp_un_frag, SWIG_POINTER_EXCEPTION | 0); |
---|
3363 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3364 | result = (uint16_t) ((arg1)->__unused); |
---|
3365 | |
---|
3366 | { |
---|
3367 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
3368 | } |
---|
3369 | return resultobj; |
---|
3370 | fail: |
---|
3371 | return NULL; |
---|
3372 | } |
---|
3373 | |
---|
3374 | |
---|
3375 | static PyObject *_wrap_libtrace_icmp_un_frag_mtu_set(PyObject *self, PyObject *args) { |
---|
3376 | PyObject *resultobj = NULL; |
---|
3377 | libtrace_icmp_un_frag *arg1 = (libtrace_icmp_un_frag *) 0 ; |
---|
3378 | uint16_t arg2 ; |
---|
3379 | PyObject * obj0 = 0 ; |
---|
3380 | PyObject * obj1 = 0 ; |
---|
3381 | |
---|
3382 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_un_frag_mtu_set",&obj0,&obj1)) goto fail; |
---|
3383 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp_un_frag, SWIG_POINTER_EXCEPTION | 0); |
---|
3384 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3385 | { |
---|
3386 | arg2 = (uint16_t)(SWIG_As_unsigned_SS_short(obj1)); |
---|
3387 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
3388 | } |
---|
3389 | if (arg1) (arg1)->mtu = arg2; |
---|
3390 | |
---|
3391 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
3392 | return resultobj; |
---|
3393 | fail: |
---|
3394 | return NULL; |
---|
3395 | } |
---|
3396 | |
---|
3397 | |
---|
3398 | static PyObject *_wrap_libtrace_icmp_un_frag_mtu_get(PyObject *self, PyObject *args) { |
---|
3399 | PyObject *resultobj = NULL; |
---|
3400 | libtrace_icmp_un_frag *arg1 = (libtrace_icmp_un_frag *) 0 ; |
---|
3401 | uint16_t result; |
---|
3402 | PyObject * obj0 = 0 ; |
---|
3403 | |
---|
3404 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_frag_mtu_get",&obj0)) goto fail; |
---|
3405 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp_un_frag, SWIG_POINTER_EXCEPTION | 0); |
---|
3406 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3407 | result = (uint16_t) ((arg1)->mtu); |
---|
3408 | |
---|
3409 | { |
---|
3410 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
3411 | } |
---|
3412 | return resultobj; |
---|
3413 | fail: |
---|
3414 | return NULL; |
---|
3415 | } |
---|
3416 | |
---|
3417 | |
---|
3418 | static PyObject * libtrace_icmp_un_frag_swigregister(PyObject *self, PyObject *args) { |
---|
3419 | PyObject *obj; |
---|
3420 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
3421 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_icmp_un_frag, obj); |
---|
3422 | Py_INCREF(obj); |
---|
3423 | return Py_BuildValue((char *)""); |
---|
3424 | } |
---|
3425 | static PyObject *_wrap_libtrace_icmp_un_echo_id_set(PyObject *self, PyObject *args) { |
---|
3426 | PyObject *resultobj = NULL; |
---|
3427 | libtrace_icmp_un_echo *arg1 = (libtrace_icmp_un_echo *) 0 ; |
---|
3428 | uint16_t arg2 ; |
---|
3429 | PyObject * obj0 = 0 ; |
---|
3430 | PyObject * obj1 = 0 ; |
---|
3431 | |
---|
3432 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_un_echo_id_set",&obj0,&obj1)) goto fail; |
---|
3433 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp_un_echo, SWIG_POINTER_EXCEPTION | 0); |
---|
3434 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3435 | { |
---|
3436 | arg2 = (uint16_t)(SWIG_As_unsigned_SS_short(obj1)); |
---|
3437 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
3438 | } |
---|
3439 | if (arg1) (arg1)->id = arg2; |
---|
3440 | |
---|
3441 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
3442 | return resultobj; |
---|
3443 | fail: |
---|
3444 | return NULL; |
---|
3445 | } |
---|
3446 | |
---|
3447 | |
---|
3448 | static PyObject *_wrap_libtrace_icmp_un_echo_id_get(PyObject *self, PyObject *args) { |
---|
3449 | PyObject *resultobj = NULL; |
---|
3450 | libtrace_icmp_un_echo *arg1 = (libtrace_icmp_un_echo *) 0 ; |
---|
3451 | uint16_t result; |
---|
3452 | PyObject * obj0 = 0 ; |
---|
3453 | |
---|
3454 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_echo_id_get",&obj0)) goto fail; |
---|
3455 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp_un_echo, SWIG_POINTER_EXCEPTION | 0); |
---|
3456 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3457 | result = (uint16_t) ((arg1)->id); |
---|
3458 | |
---|
3459 | { |
---|
3460 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
3461 | } |
---|
3462 | return resultobj; |
---|
3463 | fail: |
---|
3464 | return NULL; |
---|
3465 | } |
---|
3466 | |
---|
3467 | |
---|
3468 | static PyObject *_wrap_libtrace_icmp_un_echo_sequence_set(PyObject *self, PyObject *args) { |
---|
3469 | PyObject *resultobj = NULL; |
---|
3470 | libtrace_icmp_un_echo *arg1 = (libtrace_icmp_un_echo *) 0 ; |
---|
3471 | uint16_t arg2 ; |
---|
3472 | PyObject * obj0 = 0 ; |
---|
3473 | PyObject * obj1 = 0 ; |
---|
3474 | |
---|
3475 | if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_un_echo_sequence_set",&obj0,&obj1)) goto fail; |
---|
3476 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp_un_echo, SWIG_POINTER_EXCEPTION | 0); |
---|
3477 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3478 | { |
---|
3479 | arg2 = (uint16_t)(SWIG_As_unsigned_SS_short(obj1)); |
---|
3480 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
3481 | } |
---|
3482 | if (arg1) (arg1)->sequence = arg2; |
---|
3483 | |
---|
3484 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
3485 | return resultobj; |
---|
3486 | fail: |
---|
3487 | return NULL; |
---|
3488 | } |
---|
3489 | |
---|
3490 | |
---|
3491 | static PyObject *_wrap_libtrace_icmp_un_echo_sequence_get(PyObject *self, PyObject *args) { |
---|
3492 | PyObject *resultobj = NULL; |
---|
3493 | libtrace_icmp_un_echo *arg1 = (libtrace_icmp_un_echo *) 0 ; |
---|
3494 | uint16_t result; |
---|
3495 | PyObject * obj0 = 0 ; |
---|
3496 | |
---|
3497 | if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_echo_sequence_get",&obj0)) goto fail; |
---|
3498 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp_un_echo, SWIG_POINTER_EXCEPTION | 0); |
---|
3499 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3500 | result = (uint16_t) ((arg1)->sequence); |
---|
3501 | |
---|
3502 | { |
---|
3503 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
3504 | } |
---|
3505 | return resultobj; |
---|
3506 | fail: |
---|
3507 | return NULL; |
---|
3508 | } |
---|
3509 | |
---|
3510 | |
---|
3511 | static PyObject * libtrace_icmp_un_echo_swigregister(PyObject *self, PyObject *args) { |
---|
3512 | PyObject *obj; |
---|
3513 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
3514 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_icmp_un_echo, obj); |
---|
3515 | Py_INCREF(obj); |
---|
3516 | return Py_BuildValue((char *)""); |
---|
3517 | } |
---|
3518 | static PyObject *_wrap_new_Packet(PyObject *self, PyObject *args) { |
---|
3519 | PyObject *resultobj = NULL; |
---|
3520 | struct libtrace_packet_t *result; |
---|
3521 | |
---|
3522 | if(!PyArg_ParseTuple(args,(char *)":new_Packet")) goto fail; |
---|
3523 | result = (struct libtrace_packet_t *)new_libtrace_packet_t(); |
---|
3524 | |
---|
3525 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_libtrace_packet_t, 1); |
---|
3526 | return resultobj; |
---|
3527 | fail: |
---|
3528 | return NULL; |
---|
3529 | } |
---|
3530 | |
---|
3531 | |
---|
3532 | static PyObject *_wrap_delete_Packet(PyObject *self, PyObject *args) { |
---|
3533 | PyObject *resultobj = NULL; |
---|
3534 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3535 | PyObject * obj0 = 0 ; |
---|
3536 | |
---|
3537 | if(!PyArg_ParseTuple(args,(char *)"O:delete_Packet",&obj0)) goto fail; |
---|
3538 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
3539 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3540 | delete_libtrace_packet_t(arg1); |
---|
3541 | |
---|
3542 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
3543 | return resultobj; |
---|
3544 | fail: |
---|
3545 | return NULL; |
---|
3546 | } |
---|
3547 | |
---|
3548 | |
---|
3549 | static PyObject *_wrap_Packet_trace_copy_packet(PyObject *self, PyObject *args) { |
---|
3550 | PyObject *resultobj = NULL; |
---|
3551 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3552 | libtrace_packet_t *result; |
---|
3553 | PyObject * obj0 = 0 ; |
---|
3554 | |
---|
3555 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_copy_packet",&obj0)) goto fail; |
---|
3556 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
3557 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3558 | result = (libtrace_packet_t *)libtrace_packet_t_trace_copy_packet(arg1); |
---|
3559 | |
---|
3560 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_libtrace_packet_t, 0); |
---|
3561 | return resultobj; |
---|
3562 | fail: |
---|
3563 | return NULL; |
---|
3564 | } |
---|
3565 | |
---|
3566 | |
---|
3567 | static PyObject *_wrap_Packet_trace_get_link(PyObject *self, PyObject *args) { |
---|
3568 | PyObject *resultobj = NULL; |
---|
3569 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3570 | void *result; |
---|
3571 | PyObject * obj0 = 0 ; |
---|
3572 | |
---|
3573 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_link",&obj0)) goto fail; |
---|
3574 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
3575 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3576 | result = (void *)libtrace_packet_t_trace_get_link(arg1); |
---|
3577 | |
---|
3578 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_void, 0); |
---|
3579 | return resultobj; |
---|
3580 | fail: |
---|
3581 | return NULL; |
---|
3582 | } |
---|
3583 | |
---|
3584 | |
---|
3585 | static PyObject *_wrap_Packet_trace_get_transport(PyObject *self, PyObject *args) { |
---|
3586 | PyObject *resultobj = NULL; |
---|
3587 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3588 | uint8_t *arg2 = (uint8_t *) 0 ; |
---|
3589 | uint32_t *arg3 = (uint32_t *) 0 ; |
---|
3590 | void *result; |
---|
3591 | PyObject * obj0 = 0 ; |
---|
3592 | PyObject * obj1 = 0 ; |
---|
3593 | PyObject * obj2 = 0 ; |
---|
3594 | |
---|
3595 | if(!PyArg_ParseTuple(args,(char *)"OOO:Packet_trace_get_transport",&obj0,&obj1,&obj2)) goto fail; |
---|
3596 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
3597 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3598 | SWIG_Python_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_unsigned_char, SWIG_POINTER_EXCEPTION | 0); |
---|
3599 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
3600 | SWIG_Python_ConvertPtr(obj2, (void **)&arg3, SWIGTYPE_p_unsigned_int, SWIG_POINTER_EXCEPTION | 0); |
---|
3601 | if (SWIG_arg_fail(3)) SWIG_fail; |
---|
3602 | result = (void *)libtrace_packet_t_trace_get_transport(arg1,arg2,arg3); |
---|
3603 | |
---|
3604 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_void, 0); |
---|
3605 | return resultobj; |
---|
3606 | fail: |
---|
3607 | return NULL; |
---|
3608 | } |
---|
3609 | |
---|
3610 | |
---|
3611 | static PyObject *_wrap_Packet_trace_get_ip(PyObject *self, PyObject *args) { |
---|
3612 | PyObject *resultobj = NULL; |
---|
3613 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3614 | struct libtrace_ip *result; |
---|
3615 | PyObject * obj0 = 0 ; |
---|
3616 | |
---|
3617 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_ip",&obj0)) goto fail; |
---|
3618 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
3619 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3620 | result = (struct libtrace_ip *)libtrace_packet_t_trace_get_ip(arg1); |
---|
3621 | |
---|
3622 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_libtrace_ip, 0); |
---|
3623 | return resultobj; |
---|
3624 | fail: |
---|
3625 | return NULL; |
---|
3626 | } |
---|
3627 | |
---|
3628 | |
---|
3629 | static PyObject *_wrap_Packet_trace_get_tcp(PyObject *self, PyObject *args) { |
---|
3630 | PyObject *resultobj = NULL; |
---|
3631 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3632 | struct libtrace_tcp *result; |
---|
3633 | PyObject * obj0 = 0 ; |
---|
3634 | |
---|
3635 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_tcp",&obj0)) goto fail; |
---|
3636 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
3637 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3638 | result = (struct libtrace_tcp *)libtrace_packet_t_trace_get_tcp(arg1); |
---|
3639 | |
---|
3640 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_libtrace_tcp, 0); |
---|
3641 | return resultobj; |
---|
3642 | fail: |
---|
3643 | return NULL; |
---|
3644 | } |
---|
3645 | |
---|
3646 | |
---|
3647 | static PyObject *_wrap_Packet_trace_get_udp(PyObject *self, PyObject *args) { |
---|
3648 | PyObject *resultobj = NULL; |
---|
3649 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3650 | struct libtrace_udp *result; |
---|
3651 | PyObject * obj0 = 0 ; |
---|
3652 | |
---|
3653 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_udp",&obj0)) goto fail; |
---|
3654 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
3655 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3656 | result = (struct libtrace_udp *)libtrace_packet_t_trace_get_udp(arg1); |
---|
3657 | |
---|
3658 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_libtrace_udp, 0); |
---|
3659 | return resultobj; |
---|
3660 | fail: |
---|
3661 | return NULL; |
---|
3662 | } |
---|
3663 | |
---|
3664 | |
---|
3665 | static PyObject *_wrap_Packet_trace_get_icmp(PyObject *self, PyObject *args) { |
---|
3666 | PyObject *resultobj = NULL; |
---|
3667 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3668 | struct libtrace_icmp *result; |
---|
3669 | PyObject * obj0 = 0 ; |
---|
3670 | |
---|
3671 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_icmp",&obj0)) goto fail; |
---|
3672 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
3673 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3674 | result = (struct libtrace_icmp *)libtrace_packet_t_trace_get_icmp(arg1); |
---|
3675 | |
---|
3676 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_libtrace_icmp, 0); |
---|
3677 | return resultobj; |
---|
3678 | fail: |
---|
3679 | return NULL; |
---|
3680 | } |
---|
3681 | |
---|
3682 | |
---|
3683 | static PyObject *_wrap_Packet_trace_get_destination_mac(PyObject *self, PyObject *args) { |
---|
3684 | PyObject *resultobj = NULL; |
---|
3685 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3686 | char *result; |
---|
3687 | PyObject * obj0 = 0 ; |
---|
3688 | |
---|
3689 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_destination_mac",&obj0)) goto fail; |
---|
3690 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
3691 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3692 | result = (char *)libtrace_packet_t_trace_get_destination_mac(arg1); |
---|
3693 | |
---|
3694 | resultobj = SWIG_FromCharPtr(result); |
---|
3695 | return resultobj; |
---|
3696 | fail: |
---|
3697 | return NULL; |
---|
3698 | } |
---|
3699 | |
---|
3700 | |
---|
3701 | static PyObject *_wrap_Packet_trace_get_source_mac(PyObject *self, PyObject *args) { |
---|
3702 | PyObject *resultobj = NULL; |
---|
3703 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3704 | char *result; |
---|
3705 | PyObject * obj0 = 0 ; |
---|
3706 | |
---|
3707 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_source_mac",&obj0)) goto fail; |
---|
3708 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
3709 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3710 | result = (char *)libtrace_packet_t_trace_get_source_mac(arg1); |
---|
3711 | |
---|
3712 | resultobj = SWIG_FromCharPtr(result); |
---|
3713 | return resultobj; |
---|
3714 | fail: |
---|
3715 | return NULL; |
---|
3716 | } |
---|
3717 | |
---|
3718 | |
---|
3719 | static PyObject *_wrap_Packet_trace_ether_ntoa(PyObject *self, PyObject *args) { |
---|
3720 | PyObject *resultobj = NULL; |
---|
3721 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3722 | uint8_t *arg2 = (uint8_t *) 0 ; |
---|
3723 | char *result; |
---|
3724 | PyObject * obj0 = 0 ; |
---|
3725 | PyObject * obj1 = 0 ; |
---|
3726 | |
---|
3727 | if(!PyArg_ParseTuple(args,(char *)"OO:Packet_trace_ether_ntoa",&obj0,&obj1)) goto fail; |
---|
3728 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
3729 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3730 | SWIG_Python_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_unsigned_char, SWIG_POINTER_EXCEPTION | 0); |
---|
3731 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
3732 | result = (char *)libtrace_packet_t_trace_ether_ntoa(arg1,arg2); |
---|
3733 | |
---|
3734 | resultobj = SWIG_FromCharPtr(result); |
---|
3735 | return resultobj; |
---|
3736 | fail: |
---|
3737 | return NULL; |
---|
3738 | } |
---|
3739 | |
---|
3740 | |
---|
3741 | static PyObject *_wrap_Packet_trace_get_source_port(PyObject *self, PyObject *args) { |
---|
3742 | PyObject *resultobj = NULL; |
---|
3743 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3744 | uint16_t result; |
---|
3745 | PyObject * obj0 = 0 ; |
---|
3746 | |
---|
3747 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_source_port",&obj0)) goto fail; |
---|
3748 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
3749 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3750 | result = (uint16_t)libtrace_packet_t_trace_get_source_port(arg1); |
---|
3751 | |
---|
3752 | { |
---|
3753 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
3754 | } |
---|
3755 | return resultobj; |
---|
3756 | fail: |
---|
3757 | return NULL; |
---|
3758 | } |
---|
3759 | |
---|
3760 | |
---|
3761 | static PyObject *_wrap_Packet_trace_get_destination_port(PyObject *self, PyObject *args) { |
---|
3762 | PyObject *resultobj = NULL; |
---|
3763 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3764 | uint16_t result; |
---|
3765 | PyObject * obj0 = 0 ; |
---|
3766 | |
---|
3767 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_destination_port",&obj0)) goto fail; |
---|
3768 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
3769 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3770 | result = (uint16_t)libtrace_packet_t_trace_get_destination_port(arg1); |
---|
3771 | |
---|
3772 | { |
---|
3773 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); |
---|
3774 | } |
---|
3775 | return resultobj; |
---|
3776 | fail: |
---|
3777 | return NULL; |
---|
3778 | } |
---|
3779 | |
---|
3780 | |
---|
3781 | static PyObject *_wrap_Packet_trace_get_seconds(PyObject *self, PyObject *args) { |
---|
3782 | PyObject *resultobj = NULL; |
---|
3783 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3784 | double result; |
---|
3785 | PyObject * obj0 = 0 ; |
---|
3786 | |
---|
3787 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_seconds",&obj0)) goto fail; |
---|
3788 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
3789 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3790 | result = (double)libtrace_packet_t_trace_get_seconds(arg1); |
---|
3791 | |
---|
3792 | { |
---|
3793 | resultobj = SWIG_From_double((double)(result)); |
---|
3794 | } |
---|
3795 | return resultobj; |
---|
3796 | fail: |
---|
3797 | return NULL; |
---|
3798 | } |
---|
3799 | |
---|
3800 | |
---|
3801 | static PyObject *_wrap_Packet_trace_get_erf_timestamp(PyObject *self, PyObject *args) { |
---|
3802 | PyObject *resultobj = NULL; |
---|
3803 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3804 | uint64_t result; |
---|
3805 | PyObject * obj0 = 0 ; |
---|
3806 | |
---|
3807 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_erf_timestamp",&obj0)) goto fail; |
---|
3808 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
3809 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3810 | result = libtrace_packet_t_trace_get_erf_timestamp(arg1); |
---|
3811 | |
---|
3812 | { |
---|
3813 | uint64_t * resultptr; |
---|
3814 | resultptr = (uint64_t *) malloc(sizeof(uint64_t)); |
---|
3815 | if (resultptr) memcpy(resultptr, &result, sizeof(uint64_t)); |
---|
3816 | resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_uint64_t, 1); |
---|
3817 | } |
---|
3818 | return resultobj; |
---|
3819 | fail: |
---|
3820 | return NULL; |
---|
3821 | } |
---|
3822 | |
---|
3823 | |
---|
3824 | static PyObject *_wrap_Packet_trace_get_timeval(PyObject *self, PyObject *args) { |
---|
3825 | PyObject *resultobj = NULL; |
---|
3826 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3827 | struct timeval result; |
---|
3828 | PyObject * obj0 = 0 ; |
---|
3829 | |
---|
3830 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_timeval",&obj0)) goto fail; |
---|
3831 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
3832 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3833 | result = libtrace_packet_t_trace_get_timeval(arg1); |
---|
3834 | |
---|
3835 | { |
---|
3836 | struct timeval * resultptr; |
---|
3837 | resultptr = (struct timeval *) malloc(sizeof(struct timeval)); |
---|
3838 | if (resultptr) memcpy(resultptr, &result, sizeof(struct timeval)); |
---|
3839 | resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_timeval, 1); |
---|
3840 | } |
---|
3841 | return resultobj; |
---|
3842 | fail: |
---|
3843 | return NULL; |
---|
3844 | } |
---|
3845 | |
---|
3846 | |
---|
3847 | static PyObject *_wrap_Packet_trace_get_capture_length(PyObject *self, PyObject *args) { |
---|
3848 | PyObject *resultobj = NULL; |
---|
3849 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3850 | int result; |
---|
3851 | PyObject * obj0 = 0 ; |
---|
3852 | |
---|
3853 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_capture_length",&obj0)) goto fail; |
---|
3854 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
3855 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3856 | result = (int)libtrace_packet_t_trace_get_capture_length(arg1); |
---|
3857 | |
---|
3858 | { |
---|
3859 | resultobj = SWIG_From_int((int)(result)); |
---|
3860 | } |
---|
3861 | return resultobj; |
---|
3862 | fail: |
---|
3863 | return NULL; |
---|
3864 | } |
---|
3865 | |
---|
3866 | |
---|
3867 | static PyObject *_wrap_Packet_trace_set_capture_length(PyObject *self, PyObject *args) { |
---|
3868 | PyObject *resultobj = NULL; |
---|
3869 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3870 | size_t arg2 ; |
---|
3871 | size_t result; |
---|
3872 | PyObject * obj0 = 0 ; |
---|
3873 | PyObject * obj1 = 0 ; |
---|
3874 | |
---|
3875 | if(!PyArg_ParseTuple(args,(char *)"OO:Packet_trace_set_capture_length",&obj0,&obj1)) goto fail; |
---|
3876 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
3877 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3878 | { |
---|
3879 | arg2 = (size_t)(SWIG_As_unsigned_SS_long(obj1)); |
---|
3880 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
3881 | } |
---|
3882 | result = libtrace_packet_t_trace_set_capture_length(arg1,arg2); |
---|
3883 | |
---|
3884 | { |
---|
3885 | resultobj = SWIG_From_unsigned_SS_long((unsigned long)(result)); |
---|
3886 | } |
---|
3887 | return resultobj; |
---|
3888 | fail: |
---|
3889 | return NULL; |
---|
3890 | } |
---|
3891 | |
---|
3892 | |
---|
3893 | static PyObject *_wrap_Packet_trace_get_wire_lenth(PyObject *self, PyObject *args) { |
---|
3894 | PyObject *resultobj = NULL; |
---|
3895 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3896 | int result; |
---|
3897 | PyObject * obj0 = 0 ; |
---|
3898 | |
---|
3899 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_wire_lenth",&obj0)) goto fail; |
---|
3900 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
3901 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3902 | result = (int)libtrace_packet_t_trace_get_wire_lenth(arg1); |
---|
3903 | |
---|
3904 | { |
---|
3905 | resultobj = SWIG_From_int((int)(result)); |
---|
3906 | } |
---|
3907 | return resultobj; |
---|
3908 | fail: |
---|
3909 | return NULL; |
---|
3910 | } |
---|
3911 | |
---|
3912 | |
---|
3913 | static PyObject *_wrap_Packet_trace_get_framing_length(PyObject *self, PyObject *args) { |
---|
3914 | PyObject *resultobj = NULL; |
---|
3915 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3916 | int result; |
---|
3917 | PyObject * obj0 = 0 ; |
---|
3918 | |
---|
3919 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_framing_length",&obj0)) goto fail; |
---|
3920 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
3921 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3922 | result = (int)libtrace_packet_t_trace_get_framing_length(arg1); |
---|
3923 | |
---|
3924 | { |
---|
3925 | resultobj = SWIG_From_int((int)(result)); |
---|
3926 | } |
---|
3927 | return resultobj; |
---|
3928 | fail: |
---|
3929 | return NULL; |
---|
3930 | } |
---|
3931 | |
---|
3932 | |
---|
3933 | static PyObject *_wrap_Packet_trace_get_link_type(PyObject *self, PyObject *args) { |
---|
3934 | PyObject *resultobj = NULL; |
---|
3935 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3936 | libtrace_linktype_t result; |
---|
3937 | PyObject * obj0 = 0 ; |
---|
3938 | |
---|
3939 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_link_type",&obj0)) goto fail; |
---|
3940 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
3941 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3942 | result = libtrace_packet_t_trace_get_link_type(arg1); |
---|
3943 | |
---|
3944 | { |
---|
3945 | libtrace_linktype_t * resultptr; |
---|
3946 | resultptr = (libtrace_linktype_t *) malloc(sizeof(libtrace_linktype_t)); |
---|
3947 | if (resultptr) memcpy(resultptr, &result, sizeof(libtrace_linktype_t)); |
---|
3948 | resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_libtrace_linktype_t, 1); |
---|
3949 | } |
---|
3950 | return resultobj; |
---|
3951 | fail: |
---|
3952 | return NULL; |
---|
3953 | } |
---|
3954 | |
---|
3955 | |
---|
3956 | static PyObject *_wrap_Packet_trace_get_direction(PyObject *self, PyObject *args) { |
---|
3957 | PyObject *resultobj = NULL; |
---|
3958 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3959 | int8_t result; |
---|
3960 | PyObject * obj0 = 0 ; |
---|
3961 | |
---|
3962 | if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_direction",&obj0)) goto fail; |
---|
3963 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
3964 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3965 | result = libtrace_packet_t_trace_get_direction(arg1); |
---|
3966 | |
---|
3967 | { |
---|
3968 | int8_t * resultptr; |
---|
3969 | resultptr = (int8_t *) malloc(sizeof(int8_t)); |
---|
3970 | if (resultptr) memcpy(resultptr, &result, sizeof(int8_t)); |
---|
3971 | resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_int8_t, 1); |
---|
3972 | } |
---|
3973 | return resultobj; |
---|
3974 | fail: |
---|
3975 | return NULL; |
---|
3976 | } |
---|
3977 | |
---|
3978 | |
---|
3979 | static PyObject *_wrap_Packet_trace_set_direction(PyObject *self, PyObject *args) { |
---|
3980 | PyObject *resultobj = NULL; |
---|
3981 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
3982 | int8_t arg2 ; |
---|
3983 | int8_t result; |
---|
3984 | PyObject * obj0 = 0 ; |
---|
3985 | PyObject * obj1 = 0 ; |
---|
3986 | |
---|
3987 | if(!PyArg_ParseTuple(args,(char *)"OO:Packet_trace_set_direction",&obj0,&obj1)) goto fail; |
---|
3988 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
3989 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
3990 | { |
---|
3991 | int8_t * argp; |
---|
3992 | SWIG_Python_ConvertPtr(obj1, (void **)&argp, SWIGTYPE_p_int8_t, SWIG_POINTER_EXCEPTION); |
---|
3993 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
3994 | if (argp == NULL) { |
---|
3995 | SWIG_null_ref("int8_t"); |
---|
3996 | } |
---|
3997 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
3998 | arg2 = *argp; |
---|
3999 | } |
---|
4000 | result = libtrace_packet_t_trace_set_direction(arg1,arg2); |
---|
4001 | |
---|
4002 | { |
---|
4003 | int8_t * resultptr; |
---|
4004 | resultptr = (int8_t *) malloc(sizeof(int8_t)); |
---|
4005 | if (resultptr) memcpy(resultptr, &result, sizeof(int8_t)); |
---|
4006 | resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_int8_t, 1); |
---|
4007 | } |
---|
4008 | return resultobj; |
---|
4009 | fail: |
---|
4010 | return NULL; |
---|
4011 | } |
---|
4012 | |
---|
4013 | |
---|
4014 | static PyObject *_wrap_Packet_trace_apply_filter(PyObject *self, PyObject *args) { |
---|
4015 | PyObject *resultobj = NULL; |
---|
4016 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
4017 | struct libtrace_filter_t *arg2 = (struct libtrace_filter_t *) 0 ; |
---|
4018 | int result; |
---|
4019 | PyObject * obj0 = 0 ; |
---|
4020 | PyObject * obj1 = 0 ; |
---|
4021 | |
---|
4022 | if(!PyArg_ParseTuple(args,(char *)"OO:Packet_trace_apply_filter",&obj0,&obj1)) goto fail; |
---|
4023 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
4024 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
4025 | SWIG_Python_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_libtrace_filter_t, SWIG_POINTER_EXCEPTION | 0); |
---|
4026 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
4027 | result = (int)libtrace_packet_t_trace_apply_filter(arg1,arg2); |
---|
4028 | |
---|
4029 | { |
---|
4030 | resultobj = SWIG_From_int((int)(result)); |
---|
4031 | } |
---|
4032 | return resultobj; |
---|
4033 | fail: |
---|
4034 | return NULL; |
---|
4035 | } |
---|
4036 | |
---|
4037 | |
---|
4038 | static PyObject *_wrap_Packet_trace_get_server_port(PyObject *self, PyObject *args) { |
---|
4039 | PyObject *resultobj = NULL; |
---|
4040 | struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ; |
---|
4041 | uint8_t arg2 ; |
---|
4042 | uint16_t arg3 ; |
---|
4043 | uint16_t arg4 ; |
---|
4044 | uint8_t result; |
---|
4045 | PyObject * obj0 = 0 ; |
---|
4046 | PyObject * obj1 = 0 ; |
---|
4047 | PyObject * obj2 = 0 ; |
---|
4048 | PyObject * obj3 = 0 ; |
---|
4049 | |
---|
4050 | if(!PyArg_ParseTuple(args,(char *)"OOOO:Packet_trace_get_server_port",&obj0,&obj1,&obj2,&obj3)) goto fail; |
---|
4051 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
4052 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
4053 | { |
---|
4054 | arg2 = (uint8_t)(SWIG_As_unsigned_SS_char(obj1)); |
---|
4055 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
4056 | } |
---|
4057 | { |
---|
4058 | arg3 = (uint16_t)(SWIG_As_unsigned_SS_short(obj2)); |
---|
4059 | if (SWIG_arg_fail(3)) SWIG_fail; |
---|
4060 | } |
---|
4061 | { |
---|
4062 | arg4 = (uint16_t)(SWIG_As_unsigned_SS_short(obj3)); |
---|
4063 | if (SWIG_arg_fail(4)) SWIG_fail; |
---|
4064 | } |
---|
4065 | result = (uint8_t)libtrace_packet_t_trace_get_server_port(arg1,arg2,arg3,arg4); |
---|
4066 | |
---|
4067 | { |
---|
4068 | resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result)); |
---|
4069 | } |
---|
4070 | return resultobj; |
---|
4071 | fail: |
---|
4072 | return NULL; |
---|
4073 | } |
---|
4074 | |
---|
4075 | |
---|
4076 | static PyObject * Packet_swigregister(PyObject *self, PyObject *args) { |
---|
4077 | PyObject *obj; |
---|
4078 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
4079 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_packet_t, obj); |
---|
4080 | Py_INCREF(obj); |
---|
4081 | return Py_BuildValue((char *)""); |
---|
4082 | } |
---|
4083 | static PyObject *_wrap_new_Filter(PyObject *self, PyObject *args) { |
---|
4084 | PyObject *resultobj = NULL; |
---|
4085 | char *arg1 = (char *) 0 ; |
---|
4086 | struct libtrace_filter_t *result; |
---|
4087 | PyObject * obj0 = 0 ; |
---|
4088 | |
---|
4089 | if(!PyArg_ParseTuple(args,(char *)"O:new_Filter",&obj0)) goto fail; |
---|
4090 | if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) { |
---|
4091 | SWIG_arg_fail(1);SWIG_fail; |
---|
4092 | } |
---|
4093 | result = (struct libtrace_filter_t *)new_libtrace_filter_t(arg1); |
---|
4094 | |
---|
4095 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_libtrace_filter_t, 1); |
---|
4096 | return resultobj; |
---|
4097 | fail: |
---|
4098 | return NULL; |
---|
4099 | } |
---|
4100 | |
---|
4101 | |
---|
4102 | static PyObject *_wrap_delete_Filter(PyObject *self, PyObject *args) { |
---|
4103 | PyObject *resultobj = NULL; |
---|
4104 | struct libtrace_filter_t *arg1 = (struct libtrace_filter_t *) 0 ; |
---|
4105 | PyObject * obj0 = 0 ; |
---|
4106 | |
---|
4107 | if(!PyArg_ParseTuple(args,(char *)"O:delete_Filter",&obj0)) goto fail; |
---|
4108 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_filter_t, SWIG_POINTER_EXCEPTION | 0); |
---|
4109 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
4110 | delete_libtrace_filter_t(arg1); |
---|
4111 | |
---|
4112 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
4113 | return resultobj; |
---|
4114 | fail: |
---|
4115 | return NULL; |
---|
4116 | } |
---|
4117 | |
---|
4118 | |
---|
4119 | static PyObject *_wrap_Filter_trace_apply_filter(PyObject *self, PyObject *args) { |
---|
4120 | PyObject *resultobj = NULL; |
---|
4121 | struct libtrace_filter_t *arg1 = (struct libtrace_filter_t *) 0 ; |
---|
4122 | struct libtrace_packet_t *arg2 = (struct libtrace_packet_t *) 0 ; |
---|
4123 | int result; |
---|
4124 | PyObject * obj0 = 0 ; |
---|
4125 | PyObject * obj1 = 0 ; |
---|
4126 | |
---|
4127 | if(!PyArg_ParseTuple(args,(char *)"OO:Filter_trace_apply_filter",&obj0,&obj1)) goto fail; |
---|
4128 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_filter_t, SWIG_POINTER_EXCEPTION | 0); |
---|
4129 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
4130 | SWIG_Python_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
4131 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
4132 | result = (int)libtrace_filter_t_trace_apply_filter(arg1,arg2); |
---|
4133 | |
---|
4134 | { |
---|
4135 | resultobj = SWIG_From_int((int)(result)); |
---|
4136 | } |
---|
4137 | return resultobj; |
---|
4138 | fail: |
---|
4139 | return NULL; |
---|
4140 | } |
---|
4141 | |
---|
4142 | |
---|
4143 | static PyObject * Filter_swigregister(PyObject *self, PyObject *args) { |
---|
4144 | PyObject *obj; |
---|
4145 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
4146 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_filter_t, obj); |
---|
4147 | Py_INCREF(obj); |
---|
4148 | return Py_BuildValue((char *)""); |
---|
4149 | } |
---|
4150 | static PyObject *_wrap_new_Trace(PyObject *self, PyObject *args) { |
---|
4151 | PyObject *resultobj = NULL; |
---|
4152 | char *arg1 = (char *) 0 ; |
---|
4153 | struct libtrace_t *result; |
---|
4154 | PyObject * obj0 = 0 ; |
---|
4155 | |
---|
4156 | if(!PyArg_ParseTuple(args,(char *)"O:new_Trace",&obj0)) goto fail; |
---|
4157 | if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) { |
---|
4158 | SWIG_arg_fail(1);SWIG_fail; |
---|
4159 | } |
---|
4160 | result = (struct libtrace_t *)new_libtrace_t(arg1); |
---|
4161 | |
---|
4162 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_libtrace_t, 1); |
---|
4163 | return resultobj; |
---|
4164 | fail: |
---|
4165 | return NULL; |
---|
4166 | } |
---|
4167 | |
---|
4168 | |
---|
4169 | static PyObject *_wrap_delete_Trace(PyObject *self, PyObject *args) { |
---|
4170 | PyObject *resultobj = NULL; |
---|
4171 | struct libtrace_t *arg1 = (struct libtrace_t *) 0 ; |
---|
4172 | PyObject * obj0 = 0 ; |
---|
4173 | |
---|
4174 | if(!PyArg_ParseTuple(args,(char *)"O:delete_Trace",&obj0)) goto fail; |
---|
4175 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_t, SWIG_POINTER_EXCEPTION | 0); |
---|
4176 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
4177 | delete_libtrace_t(arg1); |
---|
4178 | |
---|
4179 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
4180 | return resultobj; |
---|
4181 | fail: |
---|
4182 | return NULL; |
---|
4183 | } |
---|
4184 | |
---|
4185 | |
---|
4186 | static PyObject *_wrap_Trace_trace_read_packet(PyObject *self, PyObject *args) { |
---|
4187 | PyObject *resultobj = NULL; |
---|
4188 | struct libtrace_t *arg1 = (struct libtrace_t *) 0 ; |
---|
4189 | struct libtrace_packet_t *arg2 = (struct libtrace_packet_t *) 0 ; |
---|
4190 | int result; |
---|
4191 | PyObject * obj0 = 0 ; |
---|
4192 | PyObject * obj1 = 0 ; |
---|
4193 | |
---|
4194 | if(!PyArg_ParseTuple(args,(char *)"OO:Trace_trace_read_packet",&obj0,&obj1)) goto fail; |
---|
4195 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_t, SWIG_POINTER_EXCEPTION | 0); |
---|
4196 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
4197 | SWIG_Python_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
4198 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
4199 | result = (int)libtrace_t_trace_read_packet(arg1,arg2); |
---|
4200 | |
---|
4201 | { |
---|
4202 | resultobj = SWIG_From_int((int)(result)); |
---|
4203 | } |
---|
4204 | return resultobj; |
---|
4205 | fail: |
---|
4206 | return NULL; |
---|
4207 | } |
---|
4208 | |
---|
4209 | |
---|
4210 | static PyObject *_wrap_Trace_trace_start(PyObject *self, PyObject *args) { |
---|
4211 | PyObject *resultobj = NULL; |
---|
4212 | struct libtrace_t *arg1 = (struct libtrace_t *) 0 ; |
---|
4213 | int result; |
---|
4214 | PyObject * obj0 = 0 ; |
---|
4215 | |
---|
4216 | if(!PyArg_ParseTuple(args,(char *)"O:Trace_trace_start",&obj0)) goto fail; |
---|
4217 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_t, SWIG_POINTER_EXCEPTION | 0); |
---|
4218 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
4219 | result = (int)libtrace_t_trace_start(arg1); |
---|
4220 | |
---|
4221 | { |
---|
4222 | resultobj = SWIG_From_int((int)(result)); |
---|
4223 | } |
---|
4224 | return resultobj; |
---|
4225 | fail: |
---|
4226 | return NULL; |
---|
4227 | } |
---|
4228 | |
---|
4229 | |
---|
4230 | static PyObject *_wrap_Trace_trace_pause(PyObject *self, PyObject *args) { |
---|
4231 | PyObject *resultobj = NULL; |
---|
4232 | struct libtrace_t *arg1 = (struct libtrace_t *) 0 ; |
---|
4233 | int result; |
---|
4234 | PyObject * obj0 = 0 ; |
---|
4235 | |
---|
4236 | if(!PyArg_ParseTuple(args,(char *)"O:Trace_trace_pause",&obj0)) goto fail; |
---|
4237 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_t, SWIG_POINTER_EXCEPTION | 0); |
---|
4238 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
4239 | result = (int)libtrace_t_trace_pause(arg1); |
---|
4240 | |
---|
4241 | { |
---|
4242 | resultobj = SWIG_From_int((int)(result)); |
---|
4243 | } |
---|
4244 | return resultobj; |
---|
4245 | fail: |
---|
4246 | return NULL; |
---|
4247 | } |
---|
4248 | |
---|
4249 | |
---|
4250 | static PyObject *_wrap_Trace_trace_help(PyObject *self, PyObject *args) { |
---|
4251 | PyObject *resultobj = NULL; |
---|
4252 | struct libtrace_t *arg1 = (struct libtrace_t *) 0 ; |
---|
4253 | PyObject * obj0 = 0 ; |
---|
4254 | |
---|
4255 | if(!PyArg_ParseTuple(args,(char *)"O:Trace_trace_help",&obj0)) goto fail; |
---|
4256 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_t, SWIG_POINTER_EXCEPTION | 0); |
---|
4257 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
4258 | libtrace_t_trace_help(arg1); |
---|
4259 | |
---|
4260 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
4261 | return resultobj; |
---|
4262 | fail: |
---|
4263 | return NULL; |
---|
4264 | } |
---|
4265 | |
---|
4266 | |
---|
4267 | static PyObject *_wrap_Trace_trace_config(PyObject *self, PyObject *args) { |
---|
4268 | PyObject *resultobj = NULL; |
---|
4269 | struct libtrace_t *arg1 = (struct libtrace_t *) 0 ; |
---|
4270 | trace_option_t arg2 ; |
---|
4271 | void *arg3 = (void *) 0 ; |
---|
4272 | int result; |
---|
4273 | PyObject * obj0 = 0 ; |
---|
4274 | PyObject * obj1 = 0 ; |
---|
4275 | PyObject * obj2 = 0 ; |
---|
4276 | |
---|
4277 | if(!PyArg_ParseTuple(args,(char *)"OOO:Trace_trace_config",&obj0,&obj1,&obj2)) goto fail; |
---|
4278 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_t, SWIG_POINTER_EXCEPTION | 0); |
---|
4279 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
4280 | { |
---|
4281 | trace_option_t * argp; |
---|
4282 | SWIG_Python_ConvertPtr(obj1, (void **)&argp, SWIGTYPE_p_trace_option_t, SWIG_POINTER_EXCEPTION); |
---|
4283 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
4284 | if (argp == NULL) { |
---|
4285 | SWIG_null_ref("trace_option_t"); |
---|
4286 | } |
---|
4287 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
4288 | arg2 = *argp; |
---|
4289 | } |
---|
4290 | { |
---|
4291 | if ((SWIG_ConvertPtr(obj2,(void **)(&arg3),0,SWIG_POINTER_EXCEPTION|0))== -1) { |
---|
4292 | SWIG_arg_fail(3);SWIG_fail; |
---|
4293 | } |
---|
4294 | } |
---|
4295 | result = (int)libtrace_t_trace_config(arg1,arg2,arg3); |
---|
4296 | |
---|
4297 | { |
---|
4298 | resultobj = SWIG_From_int((int)(result)); |
---|
4299 | } |
---|
4300 | return resultobj; |
---|
4301 | fail: |
---|
4302 | return NULL; |
---|
4303 | } |
---|
4304 | |
---|
4305 | |
---|
4306 | static PyObject *_wrap_Trace_trace_get_err(PyObject *self, PyObject *args) { |
---|
4307 | PyObject *resultobj = NULL; |
---|
4308 | struct libtrace_t *arg1 = (struct libtrace_t *) 0 ; |
---|
4309 | libtrace_err_t result; |
---|
4310 | PyObject * obj0 = 0 ; |
---|
4311 | |
---|
4312 | if(!PyArg_ParseTuple(args,(char *)"O:Trace_trace_get_err",&obj0)) goto fail; |
---|
4313 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_t, SWIG_POINTER_EXCEPTION | 0); |
---|
4314 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
4315 | result = libtrace_t_trace_get_err(arg1); |
---|
4316 | |
---|
4317 | { |
---|
4318 | libtrace_err_t * resultptr; |
---|
4319 | resultptr = (libtrace_err_t *) malloc(sizeof(libtrace_err_t)); |
---|
4320 | if (resultptr) memcpy(resultptr, &result, sizeof(libtrace_err_t)); |
---|
4321 | resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_libtrace_err_t, 1); |
---|
4322 | } |
---|
4323 | return resultobj; |
---|
4324 | fail: |
---|
4325 | return NULL; |
---|
4326 | } |
---|
4327 | |
---|
4328 | |
---|
4329 | static PyObject *_wrap_Trace_trace_is_err(PyObject *self, PyObject *args) { |
---|
4330 | PyObject *resultobj = NULL; |
---|
4331 | struct libtrace_t *arg1 = (struct libtrace_t *) 0 ; |
---|
4332 | bool result; |
---|
4333 | PyObject * obj0 = 0 ; |
---|
4334 | |
---|
4335 | if(!PyArg_ParseTuple(args,(char *)"O:Trace_trace_is_err",&obj0)) goto fail; |
---|
4336 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_t, SWIG_POINTER_EXCEPTION | 0); |
---|
4337 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
4338 | result = (bool)libtrace_t_trace_is_err(arg1); |
---|
4339 | |
---|
4340 | { |
---|
4341 | resultobj = SWIG_From_bool((bool)(result)); |
---|
4342 | } |
---|
4343 | return resultobj; |
---|
4344 | fail: |
---|
4345 | return NULL; |
---|
4346 | } |
---|
4347 | |
---|
4348 | |
---|
4349 | static PyObject * Trace_swigregister(PyObject *self, PyObject *args) { |
---|
4350 | PyObject *obj; |
---|
4351 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
4352 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_t, obj); |
---|
4353 | Py_INCREF(obj); |
---|
4354 | return Py_BuildValue((char *)""); |
---|
4355 | } |
---|
4356 | static PyObject *_wrap_new_OutputTrace(PyObject *self, PyObject *args) { |
---|
4357 | PyObject *resultobj = NULL; |
---|
4358 | char *arg1 = (char *) 0 ; |
---|
4359 | struct libtrace_out_t *result; |
---|
4360 | PyObject * obj0 = 0 ; |
---|
4361 | |
---|
4362 | if(!PyArg_ParseTuple(args,(char *)"O:new_OutputTrace",&obj0)) goto fail; |
---|
4363 | if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) { |
---|
4364 | SWIG_arg_fail(1);SWIG_fail; |
---|
4365 | } |
---|
4366 | result = (struct libtrace_out_t *)new_libtrace_out_t(arg1); |
---|
4367 | |
---|
4368 | resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_libtrace_out_t, 1); |
---|
4369 | return resultobj; |
---|
4370 | fail: |
---|
4371 | return NULL; |
---|
4372 | } |
---|
4373 | |
---|
4374 | |
---|
4375 | static PyObject *_wrap_delete_OutputTrace(PyObject *self, PyObject *args) { |
---|
4376 | PyObject *resultobj = NULL; |
---|
4377 | struct libtrace_out_t *arg1 = (struct libtrace_out_t *) 0 ; |
---|
4378 | PyObject * obj0 = 0 ; |
---|
4379 | |
---|
4380 | if(!PyArg_ParseTuple(args,(char *)"O:delete_OutputTrace",&obj0)) goto fail; |
---|
4381 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_out_t, SWIG_POINTER_EXCEPTION | 0); |
---|
4382 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
4383 | delete_libtrace_out_t(arg1); |
---|
4384 | |
---|
4385 | Py_INCREF(Py_None); resultobj = Py_None; |
---|
4386 | return resultobj; |
---|
4387 | fail: |
---|
4388 | return NULL; |
---|
4389 | } |
---|
4390 | |
---|
4391 | |
---|
4392 | static PyObject *_wrap_OutputTrace_trace_start_output(PyObject *self, PyObject *args) { |
---|
4393 | PyObject *resultobj = NULL; |
---|
4394 | struct libtrace_out_t *arg1 = (struct libtrace_out_t *) 0 ; |
---|
4395 | int result; |
---|
4396 | PyObject * obj0 = 0 ; |
---|
4397 | |
---|
4398 | if(!PyArg_ParseTuple(args,(char *)"O:OutputTrace_trace_start_output",&obj0)) goto fail; |
---|
4399 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_out_t, SWIG_POINTER_EXCEPTION | 0); |
---|
4400 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
4401 | result = (int)libtrace_out_t_trace_start_output(arg1); |
---|
4402 | |
---|
4403 | { |
---|
4404 | resultobj = SWIG_From_int((int)(result)); |
---|
4405 | } |
---|
4406 | return resultobj; |
---|
4407 | fail: |
---|
4408 | return NULL; |
---|
4409 | } |
---|
4410 | |
---|
4411 | |
---|
4412 | static PyObject *_wrap_OutputTrace_trace_config_output(PyObject *self, PyObject *args) { |
---|
4413 | PyObject *resultobj = NULL; |
---|
4414 | struct libtrace_out_t *arg1 = (struct libtrace_out_t *) 0 ; |
---|
4415 | trace_option_output_t arg2 ; |
---|
4416 | void *arg3 = (void *) 0 ; |
---|
4417 | int result; |
---|
4418 | PyObject * obj0 = 0 ; |
---|
4419 | PyObject * obj1 = 0 ; |
---|
4420 | PyObject * obj2 = 0 ; |
---|
4421 | |
---|
4422 | if(!PyArg_ParseTuple(args,(char *)"OOO:OutputTrace_trace_config_output",&obj0,&obj1,&obj2)) goto fail; |
---|
4423 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_out_t, SWIG_POINTER_EXCEPTION | 0); |
---|
4424 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
4425 | { |
---|
4426 | trace_option_output_t * argp; |
---|
4427 | SWIG_Python_ConvertPtr(obj1, (void **)&argp, SWIGTYPE_p_trace_option_output_t, SWIG_POINTER_EXCEPTION); |
---|
4428 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
4429 | if (argp == NULL) { |
---|
4430 | SWIG_null_ref("trace_option_output_t"); |
---|
4431 | } |
---|
4432 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
4433 | arg2 = *argp; |
---|
4434 | } |
---|
4435 | { |
---|
4436 | if ((SWIG_ConvertPtr(obj2,(void **)(&arg3),0,SWIG_POINTER_EXCEPTION|0))== -1) { |
---|
4437 | SWIG_arg_fail(3);SWIG_fail; |
---|
4438 | } |
---|
4439 | } |
---|
4440 | result = (int)libtrace_out_t_trace_config_output(arg1,arg2,arg3); |
---|
4441 | |
---|
4442 | { |
---|
4443 | resultobj = SWIG_From_int((int)(result)); |
---|
4444 | } |
---|
4445 | return resultobj; |
---|
4446 | fail: |
---|
4447 | return NULL; |
---|
4448 | } |
---|
4449 | |
---|
4450 | |
---|
4451 | static PyObject *_wrap_OutputTrace_trace_get_err_output(PyObject *self, PyObject *args) { |
---|
4452 | PyObject *resultobj = NULL; |
---|
4453 | struct libtrace_out_t *arg1 = (struct libtrace_out_t *) 0 ; |
---|
4454 | libtrace_err_t result; |
---|
4455 | PyObject * obj0 = 0 ; |
---|
4456 | |
---|
4457 | if(!PyArg_ParseTuple(args,(char *)"O:OutputTrace_trace_get_err_output",&obj0)) goto fail; |
---|
4458 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_out_t, SWIG_POINTER_EXCEPTION | 0); |
---|
4459 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
4460 | result = libtrace_out_t_trace_get_err_output(arg1); |
---|
4461 | |
---|
4462 | { |
---|
4463 | libtrace_err_t * resultptr; |
---|
4464 | resultptr = (libtrace_err_t *) malloc(sizeof(libtrace_err_t)); |
---|
4465 | if (resultptr) memcpy(resultptr, &result, sizeof(libtrace_err_t)); |
---|
4466 | resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_libtrace_err_t, 1); |
---|
4467 | } |
---|
4468 | return resultobj; |
---|
4469 | fail: |
---|
4470 | return NULL; |
---|
4471 | } |
---|
4472 | |
---|
4473 | |
---|
4474 | static PyObject *_wrap_OutputTrace_trace_is_err_output(PyObject *self, PyObject *args) { |
---|
4475 | PyObject *resultobj = NULL; |
---|
4476 | struct libtrace_out_t *arg1 = (struct libtrace_out_t *) 0 ; |
---|
4477 | bool result; |
---|
4478 | PyObject * obj0 = 0 ; |
---|
4479 | |
---|
4480 | if(!PyArg_ParseTuple(args,(char *)"O:OutputTrace_trace_is_err_output",&obj0)) goto fail; |
---|
4481 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_out_t, SWIG_POINTER_EXCEPTION | 0); |
---|
4482 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
4483 | result = (bool)libtrace_out_t_trace_is_err_output(arg1); |
---|
4484 | |
---|
4485 | { |
---|
4486 | resultobj = SWIG_From_bool((bool)(result)); |
---|
4487 | } |
---|
4488 | return resultobj; |
---|
4489 | fail: |
---|
4490 | return NULL; |
---|
4491 | } |
---|
4492 | |
---|
4493 | |
---|
4494 | static PyObject *_wrap_OutputTrace_trace_write_packet(PyObject *self, PyObject *args) { |
---|
4495 | PyObject *resultobj = NULL; |
---|
4496 | struct libtrace_out_t *arg1 = (struct libtrace_out_t *) 0 ; |
---|
4497 | libtrace_packet_t *arg2 = (libtrace_packet_t *) 0 ; |
---|
4498 | int result; |
---|
4499 | PyObject * obj0 = 0 ; |
---|
4500 | PyObject * obj1 = 0 ; |
---|
4501 | |
---|
4502 | if(!PyArg_ParseTuple(args,(char *)"OO:OutputTrace_trace_write_packet",&obj0,&obj1)) goto fail; |
---|
4503 | SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_out_t, SWIG_POINTER_EXCEPTION | 0); |
---|
4504 | if (SWIG_arg_fail(1)) SWIG_fail; |
---|
4505 | SWIG_Python_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0); |
---|
4506 | if (SWIG_arg_fail(2)) SWIG_fail; |
---|
4507 | result = (int)libtrace_out_t_trace_write_packet(arg1,arg2); |
---|
4508 | |
---|
4509 | { |
---|
4510 | resultobj = SWIG_From_int((int)(result)); |
---|
4511 | } |
---|
4512 | return resultobj; |
---|
4513 | fail: |
---|
4514 | return NULL; |
---|
4515 | } |
---|
4516 | |
---|
4517 | |
---|
4518 | static PyObject * OutputTrace_swigregister(PyObject *self, PyObject *args) { |
---|
4519 | PyObject *obj; |
---|
4520 | if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; |
---|
4521 | SWIG_TypeClientData(SWIGTYPE_p_libtrace_out_t, obj); |
---|
4522 | Py_INCREF(obj); |
---|
4523 | return Py_BuildValue((char *)""); |
---|
4524 | } |
---|
4525 | static PyMethodDef SwigMethods[] = { |
---|
4526 | { (char *)"in_addr_s_addr_set", _wrap_in_addr_s_addr_set, METH_VARARGS, NULL}, |
---|
4527 | { (char *)"in_addr_s_addr_get", _wrap_in_addr_s_addr_get, METH_VARARGS, NULL}, |
---|
4528 | { (char *)"in_addr_swigregister", in_addr_swigregister, METH_VARARGS, NULL}, |
---|
4529 | { (char *)"libtrace_ip_ip_hl_set", _wrap_libtrace_ip_ip_hl_set, METH_VARARGS, NULL}, |
---|
4530 | { (char *)"libtrace_ip_ip_hl_get", _wrap_libtrace_ip_ip_hl_get, METH_VARARGS, NULL}, |
---|
4531 | { (char *)"libtrace_ip_ip_v_set", _wrap_libtrace_ip_ip_v_set, METH_VARARGS, NULL}, |
---|
4532 | { (char *)"libtrace_ip_ip_v_get", _wrap_libtrace_ip_ip_v_get, METH_VARARGS, NULL}, |
---|
4533 | { (char *)"libtrace_ip_ip_tos_set", _wrap_libtrace_ip_ip_tos_set, METH_VARARGS, NULL}, |
---|
4534 | { (char *)"libtrace_ip_ip_tos_get", _wrap_libtrace_ip_ip_tos_get, METH_VARARGS, NULL}, |
---|
4535 | { (char *)"libtrace_ip_ip_ttl_set", _wrap_libtrace_ip_ip_ttl_set, METH_VARARGS, NULL}, |
---|
4536 | { (char *)"libtrace_ip_ip_ttl_get", _wrap_libtrace_ip_ip_ttl_get, METH_VARARGS, NULL}, |
---|
4537 | { (char *)"libtrace_ip_ip_p_set", _wrap_libtrace_ip_ip_p_set, METH_VARARGS, NULL}, |
---|
4538 | { (char *)"libtrace_ip_ip_p_get", _wrap_libtrace_ip_ip_p_get, METH_VARARGS, NULL}, |
---|
4539 | { (char *)"libtrace_ip_ip_sum_get", _wrap_libtrace_ip_ip_sum_get, METH_VARARGS, NULL}, |
---|
4540 | { (char *)"libtrace_ip_ip_len_get", _wrap_libtrace_ip_ip_len_get, METH_VARARGS, NULL}, |
---|
4541 | { (char *)"libtrace_ip_ip_id_get", _wrap_libtrace_ip_ip_id_get, METH_VARARGS, NULL}, |
---|
4542 | { (char *)"libtrace_ip_ip_off_get", _wrap_libtrace_ip_ip_off_get, METH_VARARGS, NULL}, |
---|
4543 | { (char *)"libtrace_ip_ip_src_get", _wrap_libtrace_ip_ip_src_get, METH_VARARGS, NULL}, |
---|
4544 | { (char *)"libtrace_ip_ip_dst_get", _wrap_libtrace_ip_ip_dst_get, METH_VARARGS, NULL}, |
---|
4545 | { (char *)"libtrace_ip_swigregister", libtrace_ip_swigregister, METH_VARARGS, NULL}, |
---|
4546 | { (char *)"libtrace_tcp_res1_set", _wrap_libtrace_tcp_res1_set, METH_VARARGS, NULL}, |
---|
4547 | { (char *)"libtrace_tcp_res1_get", _wrap_libtrace_tcp_res1_get, METH_VARARGS, NULL}, |
---|
4548 | { (char *)"libtrace_tcp_doff_set", _wrap_libtrace_tcp_doff_set, METH_VARARGS, NULL}, |
---|
4549 | { (char *)"libtrace_tcp_doff_get", _wrap_libtrace_tcp_doff_get, METH_VARARGS, NULL}, |
---|
4550 | { (char *)"libtrace_tcp_fin_set", _wrap_libtrace_tcp_fin_set, METH_VARARGS, NULL}, |
---|
4551 | { (char *)"libtrace_tcp_fin_get", _wrap_libtrace_tcp_fin_get, METH_VARARGS, NULL}, |
---|
4552 | { (char *)"libtrace_tcp_syn_set", _wrap_libtrace_tcp_syn_set, METH_VARARGS, NULL}, |
---|
4553 | { (char *)"libtrace_tcp_syn_get", _wrap_libtrace_tcp_syn_get, METH_VARARGS, NULL}, |
---|
4554 | { (char *)"libtrace_tcp_rst_set", _wrap_libtrace_tcp_rst_set, METH_VARARGS, NULL}, |
---|
4555 | { (char *)"libtrace_tcp_rst_get", _wrap_libtrace_tcp_rst_get, METH_VARARGS, NULL}, |
---|
4556 | { (char *)"libtrace_tcp_psh_set", _wrap_libtrace_tcp_psh_set, METH_VARARGS, NULL}, |
---|
4557 | { (char *)"libtrace_tcp_psh_get", _wrap_libtrace_tcp_psh_get, METH_VARARGS, NULL}, |
---|
4558 | { (char *)"libtrace_tcp_ack_set", _wrap_libtrace_tcp_ack_set, METH_VARARGS, NULL}, |
---|
4559 | { (char *)"libtrace_tcp_ack_get", _wrap_libtrace_tcp_ack_get, METH_VARARGS, NULL}, |
---|
4560 | { (char *)"libtrace_tcp_urg_set", _wrap_libtrace_tcp_urg_set, METH_VARARGS, NULL}, |
---|
4561 | { (char *)"libtrace_tcp_urg_get", _wrap_libtrace_tcp_urg_get, METH_VARARGS, NULL}, |
---|
4562 | { (char *)"libtrace_tcp_res2_set", _wrap_libtrace_tcp_res2_set, METH_VARARGS, NULL}, |
---|
4563 | { (char *)"libtrace_tcp_res2_get", _wrap_libtrace_tcp_res2_get, METH_VARARGS, NULL}, |
---|
4564 | { (char *)"libtrace_tcp_source_get", _wrap_libtrace_tcp_source_get, METH_VARARGS, NULL}, |
---|
4565 | { (char *)"libtrace_tcp_dest_get", _wrap_libtrace_tcp_dest_get, METH_VARARGS, NULL}, |
---|
4566 | { (char *)"libtrace_tcp_window_get", _wrap_libtrace_tcp_window_get, METH_VARARGS, NULL}, |
---|
4567 | { (char *)"libtrace_tcp_check_get", _wrap_libtrace_tcp_check_get, METH_VARARGS, NULL}, |
---|
4568 | { (char *)"libtrace_tcp_urg_ptr_get", _wrap_libtrace_tcp_urg_ptr_get, METH_VARARGS, NULL}, |
---|
4569 | { (char *)"libtrace_tcp_seq_get", _wrap_libtrace_tcp_seq_get, METH_VARARGS, NULL}, |
---|
4570 | { (char *)"libtrace_tcp_ack_seq_get", _wrap_libtrace_tcp_ack_seq_get, METH_VARARGS, NULL}, |
---|
4571 | { (char *)"libtrace_tcp_swigregister", libtrace_tcp_swigregister, METH_VARARGS, NULL}, |
---|
4572 | { (char *)"libtrace_udp_source_get", _wrap_libtrace_udp_source_get, METH_VARARGS, NULL}, |
---|
4573 | { (char *)"libtrace_udp_dest_get", _wrap_libtrace_udp_dest_get, METH_VARARGS, NULL}, |
---|
4574 | { (char *)"libtrace_udp_len_get", _wrap_libtrace_udp_len_get, METH_VARARGS, NULL}, |
---|
4575 | { (char *)"libtrace_udp_check_get", _wrap_libtrace_udp_check_get, METH_VARARGS, NULL}, |
---|
4576 | { (char *)"libtrace_udp_swigregister", libtrace_udp_swigregister, METH_VARARGS, NULL}, |
---|
4577 | { (char *)"libtrace_icmp_type_set", _wrap_libtrace_icmp_type_set, METH_VARARGS, NULL}, |
---|
4578 | { (char *)"libtrace_icmp_type_get", _wrap_libtrace_icmp_type_get, METH_VARARGS, NULL}, |
---|
4579 | { (char *)"libtrace_icmp_code_set", _wrap_libtrace_icmp_code_set, METH_VARARGS, NULL}, |
---|
4580 | { (char *)"libtrace_icmp_code_get", _wrap_libtrace_icmp_code_get, METH_VARARGS, NULL}, |
---|
4581 | { (char *)"libtrace_icmp_checksum_set", _wrap_libtrace_icmp_checksum_set, METH_VARARGS, NULL}, |
---|
4582 | { (char *)"libtrace_icmp_checksum_get", _wrap_libtrace_icmp_checksum_get, METH_VARARGS, NULL}, |
---|
4583 | { (char *)"libtrace_icmp_un_get", _wrap_libtrace_icmp_un_get, METH_VARARGS, NULL}, |
---|
4584 | { (char *)"libtrace_icmp_swigregister", libtrace_icmp_swigregister, METH_VARARGS, NULL}, |
---|
4585 | { (char *)"libtrace_icmp_un_gateway_set", _wrap_libtrace_icmp_un_gateway_set, METH_VARARGS, NULL}, |
---|
4586 | { (char *)"libtrace_icmp_un_gateway_get", _wrap_libtrace_icmp_un_gateway_get, METH_VARARGS, NULL}, |
---|
4587 | { (char *)"libtrace_icmp_un_frag_get", _wrap_libtrace_icmp_un_frag_get, METH_VARARGS, NULL}, |
---|
4588 | { (char *)"libtrace_icmp_un_echo_get", _wrap_libtrace_icmp_un_echo_get, METH_VARARGS, NULL}, |
---|
4589 | { (char *)"libtrace_icmp_un_swigregister", libtrace_icmp_un_swigregister, METH_VARARGS, NULL}, |
---|
4590 | { (char *)"libtrace_icmp_un_frag___unused_set", _wrap_libtrace_icmp_un_frag___unused_set, METH_VARARGS, NULL}, |
---|
4591 | { (char *)"libtrace_icmp_un_frag___unused_get", _wrap_libtrace_icmp_un_frag___unused_get, METH_VARARGS, NULL}, |
---|
4592 | { (char *)"libtrace_icmp_un_frag_mtu_set", _wrap_libtrace_icmp_un_frag_mtu_set, METH_VARARGS, NULL}, |
---|
4593 | { (char *)"libtrace_icmp_un_frag_mtu_get", _wrap_libtrace_icmp_un_frag_mtu_get, METH_VARARGS, NULL}, |
---|
4594 | { (char *)"libtrace_icmp_un_frag_swigregister", libtrace_icmp_un_frag_swigregister, METH_VARARGS, NULL}, |
---|
4595 | { (char *)"libtrace_icmp_un_echo_id_set", _wrap_libtrace_icmp_un_echo_id_set, METH_VARARGS, NULL}, |
---|
4596 | { (char *)"libtrace_icmp_un_echo_id_get", _wrap_libtrace_icmp_un_echo_id_get, METH_VARARGS, NULL}, |
---|
4597 | { (char *)"libtrace_icmp_un_echo_sequence_set", _wrap_libtrace_icmp_un_echo_sequence_set, METH_VARARGS, NULL}, |
---|
4598 | { (char *)"libtrace_icmp_un_echo_sequence_get", _wrap_libtrace_icmp_un_echo_sequence_get, METH_VARARGS, NULL}, |
---|
4599 | { (char *)"libtrace_icmp_un_echo_swigregister", libtrace_icmp_un_echo_swigregister, METH_VARARGS, NULL}, |
---|
4600 | { (char *)"new_Packet", _wrap_new_Packet, METH_VARARGS, NULL}, |
---|
4601 | { (char *)"delete_Packet", _wrap_delete_Packet, METH_VARARGS, NULL}, |
---|
4602 | { (char *)"Packet_trace_copy_packet", _wrap_Packet_trace_copy_packet, METH_VARARGS, NULL}, |
---|
4603 | { (char *)"Packet_trace_get_link", _wrap_Packet_trace_get_link, METH_VARARGS, NULL}, |
---|
4604 | { (char *)"Packet_trace_get_transport", _wrap_Packet_trace_get_transport, METH_VARARGS, NULL}, |
---|
4605 | { (char *)"Packet_trace_get_ip", _wrap_Packet_trace_get_ip, METH_VARARGS, NULL}, |
---|
4606 | { (char *)"Packet_trace_get_tcp", _wrap_Packet_trace_get_tcp, METH_VARARGS, NULL}, |
---|
4607 | { (char *)"Packet_trace_get_udp", _wrap_Packet_trace_get_udp, METH_VARARGS, NULL}, |
---|
4608 | { (char *)"Packet_trace_get_icmp", _wrap_Packet_trace_get_icmp, METH_VARARGS, NULL}, |
---|
4609 | { (char *)"Packet_trace_get_destination_mac", _wrap_Packet_trace_get_destination_mac, METH_VARARGS, NULL}, |
---|
4610 | { (char *)"Packet_trace_get_source_mac", _wrap_Packet_trace_get_source_mac, METH_VARARGS, NULL}, |
---|
4611 | { (char *)"Packet_trace_ether_ntoa", _wrap_Packet_trace_ether_ntoa, METH_VARARGS, NULL}, |
---|
4612 | { (char *)"Packet_trace_get_source_port", _wrap_Packet_trace_get_source_port, METH_VARARGS, NULL}, |
---|
4613 | { (char *)"Packet_trace_get_destination_port", _wrap_Packet_trace_get_destination_port, METH_VARARGS, NULL}, |
---|
4614 | { (char *)"Packet_trace_get_seconds", _wrap_Packet_trace_get_seconds, METH_VARARGS, NULL}, |
---|
4615 | { (char *)"Packet_trace_get_erf_timestamp", _wrap_Packet_trace_get_erf_timestamp, METH_VARARGS, NULL}, |
---|
4616 | { (char *)"Packet_trace_get_timeval", _wrap_Packet_trace_get_timeval, METH_VARARGS, NULL}, |
---|
4617 | { (char *)"Packet_trace_get_capture_length", _wrap_Packet_trace_get_capture_length, METH_VARARGS, NULL}, |
---|
4618 | { (char *)"Packet_trace_set_capture_length", _wrap_Packet_trace_set_capture_length, METH_VARARGS, NULL}, |
---|
4619 | { (char *)"Packet_trace_get_wire_lenth", _wrap_Packet_trace_get_wire_lenth, METH_VARARGS, NULL}, |
---|
4620 | { (char *)"Packet_trace_get_framing_length", _wrap_Packet_trace_get_framing_length, METH_VARARGS, NULL}, |
---|
4621 | { (char *)"Packet_trace_get_link_type", _wrap_Packet_trace_get_link_type, METH_VARARGS, NULL}, |
---|
4622 | { (char *)"Packet_trace_get_direction", _wrap_Packet_trace_get_direction, METH_VARARGS, NULL}, |
---|
4623 | { (char *)"Packet_trace_set_direction", _wrap_Packet_trace_set_direction, METH_VARARGS, NULL}, |
---|
4624 | { (char *)"Packet_trace_apply_filter", _wrap_Packet_trace_apply_filter, METH_VARARGS, NULL}, |
---|
4625 | { (char *)"Packet_trace_get_server_port", _wrap_Packet_trace_get_server_port, METH_VARARGS, NULL}, |
---|
4626 | { (char *)"Packet_swigregister", Packet_swigregister, METH_VARARGS, NULL}, |
---|
4627 | { (char *)"new_Filter", _wrap_new_Filter, METH_VARARGS, NULL}, |
---|
4628 | { (char *)"delete_Filter", _wrap_delete_Filter, METH_VARARGS, NULL}, |
---|
4629 | { (char *)"Filter_trace_apply_filter", _wrap_Filter_trace_apply_filter, METH_VARARGS, NULL}, |
---|
4630 | { (char *)"Filter_swigregister", Filter_swigregister, METH_VARARGS, NULL}, |
---|
4631 | { (char *)"new_Trace", _wrap_new_Trace, METH_VARARGS, NULL}, |
---|
4632 | { (char *)"delete_Trace", _wrap_delete_Trace, METH_VARARGS, NULL}, |
---|
4633 | { (char *)"Trace_trace_read_packet", _wrap_Trace_trace_read_packet, METH_VARARGS, NULL}, |
---|
4634 | { (char *)"Trace_trace_start", _wrap_Trace_trace_start, METH_VARARGS, NULL}, |
---|
4635 | { (char *)"Trace_trace_pause", _wrap_Trace_trace_pause, METH_VARARGS, NULL}, |
---|
4636 | { (char *)"Trace_trace_help", _wrap_Trace_trace_help, METH_VARARGS, NULL}, |
---|
4637 | { (char *)"Trace_trace_config", _wrap_Trace_trace_config, METH_VARARGS, NULL}, |
---|
4638 | { (char *)"Trace_trace_get_err", _wrap_Trace_trace_get_err, METH_VARARGS, NULL}, |
---|
4639 | { (char *)"Trace_trace_is_err", _wrap_Trace_trace_is_err, METH_VARARGS, NULL}, |
---|
4640 | { (char *)"Trace_swigregister", Trace_swigregister, METH_VARARGS, NULL}, |
---|
4641 | { (char *)"new_OutputTrace", _wrap_new_OutputTrace, METH_VARARGS, NULL}, |
---|
4642 | { (char *)"delete_OutputTrace", _wrap_delete_OutputTrace, METH_VARARGS, NULL}, |
---|
4643 | { (char *)"OutputTrace_trace_start_output", _wrap_OutputTrace_trace_start_output, METH_VARARGS, NULL}, |
---|
4644 | { (char *)"OutputTrace_trace_config_output", _wrap_OutputTrace_trace_config_output, METH_VARARGS, NULL}, |
---|
4645 | { (char *)"OutputTrace_trace_get_err_output", _wrap_OutputTrace_trace_get_err_output, METH_VARARGS, NULL}, |
---|
4646 | { (char *)"OutputTrace_trace_is_err_output", _wrap_OutputTrace_trace_is_err_output, METH_VARARGS, NULL}, |
---|
4647 | { (char *)"OutputTrace_trace_write_packet", _wrap_OutputTrace_trace_write_packet, METH_VARARGS, NULL}, |
---|
4648 | { (char *)"OutputTrace_swigregister", OutputTrace_swigregister, METH_VARARGS, NULL}, |
---|
4649 | { NULL, NULL, 0, NULL } |
---|
4650 | }; |
---|
4651 | |
---|
4652 | |
---|
4653 | /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ |
---|
4654 | |
---|
4655 | static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, 0}; |
---|
4656 | static swig_type_info _swigt__p_in_addr = {"_p_in_addr", "in_addr *", 0, 0, 0}; |
---|
4657 | static swig_type_info _swigt__p_int8_t = {"_p_int8_t", "int8_t *", 0, 0, 0}; |
---|
4658 | static swig_type_info _swigt__p_libtrace_err_t = {"_p_libtrace_err_t", "libtrace_err_t *", 0, 0, 0}; |
---|
4659 | static swig_type_info _swigt__p_libtrace_filter_t = {"_p_libtrace_filter_t", "libtrace_filter_t *", 0, 0, 0}; |
---|
4660 | static swig_type_info _swigt__p_libtrace_icmp = {"_p_libtrace_icmp", "struct libtrace_icmp *", 0, 0, 0}; |
---|
4661 | static swig_type_info _swigt__p_libtrace_icmp_un = {"_p_libtrace_icmp_un", "libtrace_icmp_un *", 0, 0, 0}; |
---|
4662 | static swig_type_info _swigt__p_libtrace_icmp_un_echo = {"_p_libtrace_icmp_un_echo", "libtrace_icmp_un_echo *", 0, 0, 0}; |
---|
4663 | static swig_type_info _swigt__p_libtrace_icmp_un_frag = {"_p_libtrace_icmp_un_frag", "libtrace_icmp_un_frag *", 0, 0, 0}; |
---|
4664 | static swig_type_info _swigt__p_libtrace_ip = {"_p_libtrace_ip", "struct libtrace_ip *", 0, 0, 0}; |
---|
4665 | static swig_type_info _swigt__p_libtrace_linktype_t = {"_p_libtrace_linktype_t", "libtrace_linktype_t *", 0, 0, 0}; |
---|
4666 | static swig_type_info _swigt__p_libtrace_out_t = {"_p_libtrace_out_t", "libtrace_out_t *", 0, 0, 0}; |
---|
4667 | static swig_type_info _swigt__p_libtrace_packet_t = {"_p_libtrace_packet_t", "libtrace_packet_t *", 0, 0, 0}; |
---|
4668 | static swig_type_info _swigt__p_libtrace_t = {"_p_libtrace_t", "libtrace_t *", 0, 0, 0}; |
---|
4669 | static swig_type_info _swigt__p_libtrace_tcp = {"_p_libtrace_tcp", "struct libtrace_tcp *", 0, 0, 0}; |
---|
4670 | static swig_type_info _swigt__p_libtrace_udp = {"_p_libtrace_udp", "struct libtrace_udp *", 0, 0, 0}; |
---|
4671 | static swig_type_info _swigt__p_timeval = {"_p_timeval", "struct timeval *", 0, 0, 0}; |
---|
4672 | static swig_type_info _swigt__p_trace_option_output_t = {"_p_trace_option_output_t", "trace_option_output_t *", 0, 0, 0}; |
---|
4673 | static swig_type_info _swigt__p_trace_option_t = {"_p_trace_option_t", "trace_option_t *", 0, 0, 0}; |
---|
4674 | static swig_type_info _swigt__p_uint64_t = {"_p_uint64_t", "uint64_t *", 0, 0, 0}; |
---|
4675 | static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint8_t *", 0, 0, 0}; |
---|
4676 | static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|uint32_t *", 0, 0, 0}; |
---|
4677 | static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|uint16_t *", 0, 0, 0}; |
---|
4678 | static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, 0}; |
---|
4679 | static swig_type_info _swigt__ptrdiff_t = {"_ptrdiff_t", "ptrdiff_t", 0, 0, 0}; |
---|
4680 | static swig_type_info _swigt__size_t = {"_size_t", "size_t", 0, 0, 0}; |
---|
4681 | |
---|
4682 | static swig_type_info *swig_type_initial[] = { |
---|
4683 | &_swigt__p_char, |
---|
4684 | &_swigt__p_in_addr, |
---|
4685 | &_swigt__p_int8_t, |
---|
4686 | &_swigt__p_libtrace_err_t, |
---|
4687 | &_swigt__p_libtrace_filter_t, |
---|
4688 | &_swigt__p_libtrace_icmp, |
---|
4689 | &_swigt__p_libtrace_icmp_un, |
---|
4690 | &_swigt__p_libtrace_icmp_un_echo, |
---|
4691 | &_swigt__p_libtrace_icmp_un_frag, |
---|
4692 | &_swigt__p_libtrace_ip, |
---|
4693 | &_swigt__p_libtrace_linktype_t, |
---|
4694 | &_swigt__p_libtrace_out_t, |
---|
4695 | &_swigt__p_libtrace_packet_t, |
---|
4696 | &_swigt__p_libtrace_t, |
---|
4697 | &_swigt__p_libtrace_tcp, |
---|
4698 | &_swigt__p_libtrace_udp, |
---|
4699 | &_swigt__p_timeval, |
---|
4700 | &_swigt__p_trace_option_output_t, |
---|
4701 | &_swigt__p_trace_option_t, |
---|
4702 | &_swigt__p_uint64_t, |
---|
4703 | &_swigt__p_unsigned_char, |
---|
4704 | &_swigt__p_unsigned_int, |
---|
4705 | &_swigt__p_unsigned_short, |
---|
4706 | &_swigt__p_void, |
---|
4707 | &_swigt__ptrdiff_t, |
---|
4708 | &_swigt__size_t, |
---|
4709 | }; |
---|
4710 | |
---|
4711 | static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4712 | static swig_cast_info _swigc__p_in_addr[] = { {&_swigt__p_in_addr, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4713 | static swig_cast_info _swigc__p_int8_t[] = { {&_swigt__p_int8_t, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4714 | static swig_cast_info _swigc__p_libtrace_err_t[] = { {&_swigt__p_libtrace_err_t, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4715 | static swig_cast_info _swigc__p_libtrace_filter_t[] = { {&_swigt__p_libtrace_filter_t, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4716 | static swig_cast_info _swigc__p_libtrace_icmp[] = { {&_swigt__p_libtrace_icmp, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4717 | static swig_cast_info _swigc__p_libtrace_icmp_un[] = { {&_swigt__p_libtrace_icmp_un, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4718 | static swig_cast_info _swigc__p_libtrace_icmp_un_echo[] = { {&_swigt__p_libtrace_icmp_un_echo, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4719 | static swig_cast_info _swigc__p_libtrace_icmp_un_frag[] = { {&_swigt__p_libtrace_icmp_un_frag, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4720 | static swig_cast_info _swigc__p_libtrace_ip[] = { {&_swigt__p_libtrace_ip, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4721 | static swig_cast_info _swigc__p_libtrace_linktype_t[] = { {&_swigt__p_libtrace_linktype_t, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4722 | static swig_cast_info _swigc__p_libtrace_out_t[] = { {&_swigt__p_libtrace_out_t, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4723 | static swig_cast_info _swigc__p_libtrace_packet_t[] = { {&_swigt__p_libtrace_packet_t, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4724 | static swig_cast_info _swigc__p_libtrace_t[] = { {&_swigt__p_libtrace_t, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4725 | static swig_cast_info _swigc__p_libtrace_tcp[] = { {&_swigt__p_libtrace_tcp, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4726 | static swig_cast_info _swigc__p_libtrace_udp[] = { {&_swigt__p_libtrace_udp, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4727 | static swig_cast_info _swigc__p_timeval[] = { {&_swigt__p_timeval, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4728 | static swig_cast_info _swigc__p_trace_option_output_t[] = { {&_swigt__p_trace_option_output_t, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4729 | static swig_cast_info _swigc__p_trace_option_t[] = { {&_swigt__p_trace_option_t, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4730 | static swig_cast_info _swigc__p_uint64_t[] = { {&_swigt__p_uint64_t, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4731 | static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4732 | static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4733 | static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4734 | static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4735 | static swig_cast_info _swigc__ptrdiff_t[] = { {&_swigt__ptrdiff_t, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4736 | static swig_cast_info _swigc__size_t[] = { {&_swigt__size_t, 0, 0, 0},{0, 0, 0, 0}}; |
---|
4737 | |
---|
4738 | static swig_cast_info *swig_cast_initial[] = { |
---|
4739 | _swigc__p_char, |
---|
4740 | _swigc__p_in_addr, |
---|
4741 | _swigc__p_int8_t, |
---|
4742 | _swigc__p_libtrace_err_t, |
---|
4743 | _swigc__p_libtrace_filter_t, |
---|
4744 | _swigc__p_libtrace_icmp, |
---|
4745 | _swigc__p_libtrace_icmp_un, |
---|
4746 | _swigc__p_libtrace_icmp_un_echo, |
---|
4747 | _swigc__p_libtrace_icmp_un_frag, |
---|
4748 | _swigc__p_libtrace_ip, |
---|
4749 | _swigc__p_libtrace_linktype_t, |
---|
4750 | _swigc__p_libtrace_out_t, |
---|
4751 | _swigc__p_libtrace_packet_t, |
---|
4752 | _swigc__p_libtrace_t, |
---|
4753 | _swigc__p_libtrace_tcp, |
---|
4754 | _swigc__p_libtrace_udp, |
---|
4755 | _swigc__p_timeval, |
---|
4756 | _swigc__p_trace_option_output_t, |
---|
4757 | _swigc__p_trace_option_t, |
---|
4758 | _swigc__p_uint64_t, |
---|
4759 | _swigc__p_unsigned_char, |
---|
4760 | _swigc__p_unsigned_int, |
---|
4761 | _swigc__p_unsigned_short, |
---|
4762 | _swigc__p_void, |
---|
4763 | _swigc__ptrdiff_t, |
---|
4764 | _swigc__size_t, |
---|
4765 | }; |
---|
4766 | |
---|
4767 | |
---|
4768 | /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ |
---|
4769 | |
---|
4770 | static swig_const_info swig_const_table[] = { |
---|
4771 | {0, 0, 0, 0.0, 0, 0}}; |
---|
4772 | |
---|
4773 | #ifdef __cplusplus |
---|
4774 | } |
---|
4775 | #endif |
---|
4776 | /************************************************************************* |
---|
4777 | * Type initialization: |
---|
4778 | * This problem is tough by the requirement that no dynamic |
---|
4779 | * memory is used. Also, since swig_type_info structures store pointers to |
---|
4780 | * swig_cast_info structures and swig_cast_info structures store pointers back |
---|
4781 | * to swig_type_info structures, we need some lookup code at initialization. |
---|
4782 | * The idea is that swig generates all the structures that are needed. |
---|
4783 | * The runtime then collects these partially filled structures. |
---|
4784 | * The SWIG_InitializeModule function takes these initial arrays out of |
---|
4785 | * swig_module, and does all the lookup, filling in the swig_module.types |
---|
4786 | * array with the correct data and linking the correct swig_cast_info |
---|
4787 | * structures together. |
---|
4788 | |
---|
4789 | * The generated swig_type_info structures are assigned staticly to an initial |
---|
4790 | * array. We just loop though that array, and handle each type individually. |
---|
4791 | * First we lookup if this type has been already loaded, and if so, use the |
---|
4792 | * loaded structure instead of the generated one. Then we have to fill in the |
---|
4793 | * cast linked list. The cast data is initially stored in something like a |
---|
4794 | * two-dimensional array. Each row corresponds to a type (there are the same |
---|
4795 | * number of rows as there are in the swig_type_initial array). Each entry in |
---|
4796 | * a column is one of the swig_cast_info structures for that type. |
---|
4797 | * The cast_initial array is actually an array of arrays, because each row has |
---|
4798 | * a variable number of columns. So to actually build the cast linked list, |
---|
4799 | * we find the array of casts associated with the type, and loop through it |
---|
4800 | * adding the casts to the list. The one last trick we need to do is making |
---|
4801 | * sure the type pointer in the swig_cast_info struct is correct. |
---|
4802 | |
---|
4803 | * First off, we lookup the cast->type name to see if it is already loaded. |
---|
4804 | * There are three cases to handle: |
---|
4805 | * 1) If the cast->type has already been loaded AND the type we are adding |
---|
4806 | * casting info to has not been loaded (it is in this module), THEN we |
---|
4807 | * replace the cast->type pointer with the type pointer that has already |
---|
4808 | * been loaded. |
---|
4809 | * 2) If BOTH types (the one we are adding casting info to, and the |
---|
4810 | * cast->type) are loaded, THEN the cast info has already been loaded by |
---|
4811 | * the previous module so we just ignore it. |
---|
4812 | * 3) Finally, if cast->type has not already been loaded, then we add that |
---|
4813 | * swig_cast_info to the linked list (because the cast->type) pointer will |
---|
4814 | * be correct. |
---|
4815 | **/ |
---|
4816 | |
---|
4817 | #ifdef __cplusplus |
---|
4818 | extern "C" { |
---|
4819 | #endif |
---|
4820 | |
---|
4821 | SWIGRUNTIME void |
---|
4822 | SWIG_InitializeModule(void *clientdata) { |
---|
4823 | swig_type_info *type, *ret; |
---|
4824 | swig_cast_info *cast; |
---|
4825 | size_t i; |
---|
4826 | swig_module_info *module_head; |
---|
4827 | static int init_run = 0; |
---|
4828 | |
---|
4829 | clientdata = clientdata; |
---|
4830 | |
---|
4831 | if (init_run) return; |
---|
4832 | init_run = 1; |
---|
4833 | |
---|
4834 | /* Initialize the swig_module */ |
---|
4835 | swig_module.type_initial = swig_type_initial; |
---|
4836 | swig_module.cast_initial = swig_cast_initial; |
---|
4837 | |
---|
4838 | /* Try and load any already created modules */ |
---|
4839 | module_head = SWIG_GetModule(clientdata); |
---|
4840 | if (module_head) { |
---|
4841 | swig_module.next = module_head->next; |
---|
4842 | module_head->next = &swig_module; |
---|
4843 | } else { |
---|
4844 | /* This is the first module loaded */ |
---|
4845 | swig_module.next = &swig_module; |
---|
4846 | SWIG_SetModule(clientdata, &swig_module); |
---|
4847 | } |
---|
4848 | |
---|
4849 | /* Now work on filling in swig_module.types */ |
---|
4850 | for (i = 0; i < swig_module.size; ++i) { |
---|
4851 | type = 0; |
---|
4852 | |
---|
4853 | /* if there is another module already loaded */ |
---|
4854 | if (swig_module.next != &swig_module) { |
---|
4855 | type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); |
---|
4856 | } |
---|
4857 | if (type) { |
---|
4858 | /* Overwrite clientdata field */ |
---|
4859 | if (swig_module.type_initial[i]->clientdata) type->clientdata = swig_module.type_initial[i]->clientdata; |
---|
4860 | } else { |
---|
4861 | type = swig_module.type_initial[i]; |
---|
4862 | } |
---|
4863 | |
---|
4864 | /* Insert casting types */ |
---|
4865 | cast = swig_module.cast_initial[i]; |
---|
4866 | while (cast->type) { |
---|
4867 | /* Don't need to add information already in the list */ |
---|
4868 | ret = 0; |
---|
4869 | if (swig_module.next != &swig_module) { |
---|
4870 | ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); |
---|
4871 | } |
---|
4872 | if (ret && type == swig_module.type_initial[i]) { |
---|
4873 | cast->type = ret; |
---|
4874 | ret = 0; |
---|
4875 | } |
---|
4876 | |
---|
4877 | if (!ret) { |
---|
4878 | if (type->cast) { |
---|
4879 | type->cast->prev = cast; |
---|
4880 | cast->next = type->cast; |
---|
4881 | } |
---|
4882 | type->cast = cast; |
---|
4883 | } |
---|
4884 | |
---|
4885 | cast++; |
---|
4886 | } |
---|
4887 | |
---|
4888 | /* Set entry in modules->types array equal to the type */ |
---|
4889 | swig_module.types[i] = type; |
---|
4890 | } |
---|
4891 | swig_module.types[i] = 0; |
---|
4892 | } |
---|
4893 | |
---|
4894 | /* This function will propagate the clientdata field of type to |
---|
4895 | * any new swig_type_info structures that have been added into the list |
---|
4896 | * of equivalent types. It is like calling |
---|
4897 | * SWIG_TypeClientData(type, clientdata) a second time. |
---|
4898 | */ |
---|
4899 | SWIGRUNTIME void |
---|
4900 | SWIG_PropagateClientData(void) { |
---|
4901 | size_t i; |
---|
4902 | swig_cast_info *equiv; |
---|
4903 | static int init_run = 0; |
---|
4904 | |
---|
4905 | if (init_run) return; |
---|
4906 | init_run = 1; |
---|
4907 | |
---|
4908 | for (i = 0; i < swig_module.size; i++) { |
---|
4909 | if (swig_module.types[i]->clientdata) { |
---|
4910 | equiv = swig_module.types[i]->cast; |
---|
4911 | while (equiv) { |
---|
4912 | if (!equiv->converter) { |
---|
4913 | if (equiv->type && !equiv->type->clientdata) |
---|
4914 | SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); |
---|
4915 | } |
---|
4916 | equiv = equiv->next; |
---|
4917 | } |
---|
4918 | } |
---|
4919 | } |
---|
4920 | } |
---|
4921 | |
---|
4922 | #ifdef __cplusplus |
---|
4923 | } |
---|
4924 | #endif |
---|
4925 | |
---|
4926 | |
---|
4927 | |
---|
4928 | #ifdef __cplusplus |
---|
4929 | extern "C" { |
---|
4930 | #endif |
---|
4931 | |
---|
4932 | /* Python-specific SWIG API */ |
---|
4933 | #define SWIG_newvarlink() SWIG_Python_newvarlink() |
---|
4934 | #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) |
---|
4935 | #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) |
---|
4936 | |
---|
4937 | /* ----------------------------------------------------------------------------- |
---|
4938 | * global variable support code. |
---|
4939 | * ----------------------------------------------------------------------------- */ |
---|
4940 | |
---|
4941 | typedef struct swig_globalvar { |
---|
4942 | char *name; /* Name of global variable */ |
---|
4943 | PyObject *(*get_attr)(void); /* Return the current value */ |
---|
4944 | int (*set_attr)(PyObject *); /* Set the value */ |
---|
4945 | struct swig_globalvar *next; |
---|
4946 | } swig_globalvar; |
---|
4947 | |
---|
4948 | typedef struct swig_varlinkobject { |
---|
4949 | PyObject_HEAD |
---|
4950 | swig_globalvar *vars; |
---|
4951 | } swig_varlinkobject; |
---|
4952 | |
---|
4953 | SWIGINTERN PyObject * |
---|
4954 | swig_varlink_repr(swig_varlinkobject *v) { |
---|
4955 | v = v; |
---|
4956 | return PyString_FromString("<Swig global variables>"); |
---|
4957 | } |
---|
4958 | |
---|
4959 | SWIGINTERN int |
---|
4960 | swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) { |
---|
4961 | swig_globalvar *var; |
---|
4962 | flags = flags; |
---|
4963 | fprintf(fp,"Swig global variables { "); |
---|
4964 | for (var = v->vars; var; var=var->next) { |
---|
4965 | fprintf(fp,"%s", var->name); |
---|
4966 | if (var->next) fprintf(fp,", "); |
---|
4967 | } |
---|
4968 | fprintf(fp," }\n"); |
---|
4969 | return 0; |
---|
4970 | } |
---|
4971 | |
---|
4972 | SWIGINTERN PyObject * |
---|
4973 | swig_varlink_getattr(swig_varlinkobject *v, char *n) { |
---|
4974 | swig_globalvar *var = v->vars; |
---|
4975 | while (var) { |
---|
4976 | if (strcmp(var->name,n) == 0) { |
---|
4977 | return (*var->get_attr)(); |
---|
4978 | } |
---|
4979 | var = var->next; |
---|
4980 | } |
---|
4981 | PyErr_SetString(PyExc_NameError,"Unknown C global variable"); |
---|
4982 | return NULL; |
---|
4983 | } |
---|
4984 | |
---|
4985 | SWIGINTERN int |
---|
4986 | swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { |
---|
4987 | swig_globalvar *var = v->vars; |
---|
4988 | while (var) { |
---|
4989 | if (strcmp(var->name,n) == 0) { |
---|
4990 | return (*var->set_attr)(p); |
---|
4991 | } |
---|
4992 | var = var->next; |
---|
4993 | } |
---|
4994 | PyErr_SetString(PyExc_NameError,"Unknown C global variable"); |
---|
4995 | return 1; |
---|
4996 | } |
---|
4997 | |
---|
4998 | SWIGINTERN PyTypeObject* |
---|
4999 | swig_varlink_type(void) { |
---|
5000 | static char varlink__doc__[] = "Swig var link object"; |
---|
5001 | static PyTypeObject varlink_type |
---|
5002 | #if !defined(__cplusplus) |
---|
5003 | ; |
---|
5004 | static int type_init = 0; |
---|
5005 | if (!type_init) { |
---|
5006 | PyTypeObject tmp |
---|
5007 | #endif |
---|
5008 | = { |
---|
5009 | PyObject_HEAD_INIT(&PyType_Type) |
---|
5010 | 0, /* Number of items in variable part (ob_size) */ |
---|
5011 | (char *)"swigvarlink", /* Type name (tp_name) */ |
---|
5012 | sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */ |
---|
5013 | 0, /* Itemsize (tp_itemsize) */ |
---|
5014 | 0, /* Deallocator (tp_dealloc) */ |
---|
5015 | (printfunc) swig_varlink_print, /* Print (tp_print) */ |
---|
5016 | (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */ |
---|
5017 | (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */ |
---|
5018 | 0, /* tp_compare */ |
---|
5019 | (reprfunc) swig_varlink_repr, /* tp_repr */ |
---|
5020 | 0, /* tp_as_number */ |
---|
5021 | 0, /* tp_as_sequence */ |
---|
5022 | 0, /* tp_as_mapping */ |
---|
5023 | 0, /* tp_hash */ |
---|
5024 | 0, /* tp_call */ |
---|
5025 | 0, /* tp_str */ |
---|
5026 | 0, /* tp_getattro */ |
---|
5027 | 0, /* tp_setattro */ |
---|
5028 | 0, /* tp_as_buffer */ |
---|
5029 | 0, /* tp_flags */ |
---|
5030 | varlink__doc__, /* tp_doc */ |
---|
5031 | #if PY_VERSION_HEX >= 0x02000000 |
---|
5032 | 0, /* tp_traverse */ |
---|
5033 | 0, /* tp_clear */ |
---|
5034 | #endif |
---|
5035 | #if PY_VERSION_HEX >= 0x02010000 |
---|
5036 | 0, /* tp_richcompare */ |
---|
5037 | 0, /* tp_weaklistoffset */ |
---|
5038 | #endif |
---|
5039 | #if PY_VERSION_HEX >= 0x02020000 |
---|
5040 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ |
---|
5041 | #endif |
---|
5042 | #if PY_VERSION_HEX >= 0x02030000 |
---|
5043 | 0, /* tp_del */ |
---|
5044 | #endif |
---|
5045 | #ifdef COUNT_ALLOCS |
---|
5046 | 0,0,0,0 /* tp_alloc -> tp_next */ |
---|
5047 | #endif |
---|
5048 | }; |
---|
5049 | #if !defined(__cplusplus) |
---|
5050 | varlink_type = tmp; |
---|
5051 | type_init = 1; |
---|
5052 | } |
---|
5053 | #endif |
---|
5054 | return &varlink_type; |
---|
5055 | } |
---|
5056 | |
---|
5057 | /* Create a variable linking object for use later */ |
---|
5058 | SWIGINTERN PyObject * |
---|
5059 | SWIG_Python_newvarlink(void) { |
---|
5060 | swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); |
---|
5061 | if (result) { |
---|
5062 | result->vars = 0; |
---|
5063 | } |
---|
5064 | return ((PyObject*) result); |
---|
5065 | } |
---|
5066 | |
---|
5067 | SWIGINTERN void |
---|
5068 | SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { |
---|
5069 | swig_varlinkobject *v = (swig_varlinkobject *) p; |
---|
5070 | swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); |
---|
5071 | if (gv) { |
---|
5072 | size_t size = strlen(name)+1; |
---|
5073 | gv->name = (char *)malloc(size); |
---|
5074 | if (gv->name) { |
---|
5075 | strncpy(gv->name,name,size); |
---|
5076 | gv->get_attr = get_attr; |
---|
5077 | gv->set_attr = set_attr; |
---|
5078 | gv->next = v->vars; |
---|
5079 | } |
---|
5080 | } |
---|
5081 | v->vars = gv; |
---|
5082 | } |
---|
5083 | |
---|
5084 | /* ----------------------------------------------------------------------------- |
---|
5085 | * constants/methods manipulation |
---|
5086 | * ----------------------------------------------------------------------------- */ |
---|
5087 | |
---|
5088 | /* Install Constants */ |
---|
5089 | SWIGINTERN void |
---|
5090 | SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { |
---|
5091 | PyObject *obj = 0; |
---|
5092 | size_t i; |
---|
5093 | for (i = 0; constants[i].type; ++i) { |
---|
5094 | switch(constants[i].type) { |
---|
5095 | case SWIG_PY_INT: |
---|
5096 | obj = PyInt_FromLong(constants[i].lvalue); |
---|
5097 | break; |
---|
5098 | case SWIG_PY_FLOAT: |
---|
5099 | obj = PyFloat_FromDouble(constants[i].dvalue); |
---|
5100 | break; |
---|
5101 | case SWIG_PY_STRING: |
---|
5102 | if (constants[i].pvalue) { |
---|
5103 | obj = PyString_FromString((char *) constants[i].pvalue); |
---|
5104 | } else { |
---|
5105 | Py_INCREF(Py_None); |
---|
5106 | obj = Py_None; |
---|
5107 | } |
---|
5108 | break; |
---|
5109 | case SWIG_PY_POINTER: |
---|
5110 | obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); |
---|
5111 | break; |
---|
5112 | case SWIG_PY_BINARY: |
---|
5113 | obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); |
---|
5114 | break; |
---|
5115 | default: |
---|
5116 | obj = 0; |
---|
5117 | break; |
---|
5118 | } |
---|
5119 | if (obj) { |
---|
5120 | PyDict_SetItemString(d,constants[i].name,obj); |
---|
5121 | Py_DECREF(obj); |
---|
5122 | } |
---|
5123 | } |
---|
5124 | } |
---|
5125 | |
---|
5126 | /* -----------------------------------------------------------------------------*/ |
---|
5127 | /* Fix SwigMethods to carry the callback ptrs when needed */ |
---|
5128 | /* -----------------------------------------------------------------------------*/ |
---|
5129 | |
---|
5130 | SWIGINTERN void |
---|
5131 | SWIG_Python_FixMethods(PyMethodDef *methods, |
---|
5132 | swig_const_info *const_table, |
---|
5133 | swig_type_info **types, |
---|
5134 | swig_type_info **types_initial) { |
---|
5135 | size_t i; |
---|
5136 | for (i = 0; methods[i].ml_name; ++i) { |
---|
5137 | char *c = methods[i].ml_doc; |
---|
5138 | if (c && (c = strstr(c, "swig_ptr: "))) { |
---|
5139 | int j; |
---|
5140 | swig_const_info *ci = 0; |
---|
5141 | char *name = c + 10; |
---|
5142 | for (j = 0; const_table[j].type; ++j) { |
---|
5143 | if (strncmp(const_table[j].name, name, |
---|
5144 | strlen(const_table[j].name)) == 0) { |
---|
5145 | ci = &(const_table[j]); |
---|
5146 | break; |
---|
5147 | } |
---|
5148 | } |
---|
5149 | if (ci) { |
---|
5150 | size_t shift = (ci->ptype) - types; |
---|
5151 | swig_type_info *ty = types_initial[shift]; |
---|
5152 | size_t ldoc = (c - methods[i].ml_doc); |
---|
5153 | size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; |
---|
5154 | char *ndoc = (char*)malloc(ldoc + lptr + 10); |
---|
5155 | if (ndoc) { |
---|
5156 | char *buff = ndoc; |
---|
5157 | void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; |
---|
5158 | if (ptr) { |
---|
5159 | strncpy(buff, methods[i].ml_doc, ldoc); |
---|
5160 | buff += ldoc; |
---|
5161 | strncpy(buff, "swig_ptr: ", 10); |
---|
5162 | buff += 10; |
---|
5163 | SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); |
---|
5164 | methods[i].ml_doc = ndoc; |
---|
5165 | } |
---|
5166 | } |
---|
5167 | } |
---|
5168 | } |
---|
5169 | } |
---|
5170 | } |
---|
5171 | |
---|
5172 | /* -----------------------------------------------------------------------------* |
---|
5173 | * Initialize type list |
---|
5174 | * -----------------------------------------------------------------------------*/ |
---|
5175 | |
---|
5176 | #ifdef __cplusplus |
---|
5177 | } |
---|
5178 | #endif |
---|
5179 | |
---|
5180 | /* -----------------------------------------------------------------------------* |
---|
5181 | * Partial Init method |
---|
5182 | * -----------------------------------------------------------------------------*/ |
---|
5183 | |
---|
5184 | #ifdef __cplusplus |
---|
5185 | extern "C" |
---|
5186 | #endif |
---|
5187 | SWIGEXPORT void SWIG_init(void) { |
---|
5188 | static PyObject *SWIG_globals = 0; |
---|
5189 | PyObject *m, *d; |
---|
5190 | if (!SWIG_globals) SWIG_globals = SWIG_newvarlink(); |
---|
5191 | |
---|
5192 | /* Fix SwigMethods to carry the callback ptrs when needed */ |
---|
5193 | SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); |
---|
5194 | |
---|
5195 | m = Py_InitModule((char *) SWIG_name, SwigMethods); |
---|
5196 | d = PyModule_GetDict(m); |
---|
5197 | |
---|
5198 | SWIG_InitializeModule(0); |
---|
5199 | SWIG_InstallConstants(d,swig_const_table); |
---|
5200 | |
---|
5201 | { |
---|
5202 | PyDict_SetItemString(d,"IP_RF", SWIG_From_int((int)(0x8000))); |
---|
5203 | } |
---|
5204 | { |
---|
5205 | PyDict_SetItemString(d,"IP_DF", SWIG_From_int((int)(0x4000))); |
---|
5206 | } |
---|
5207 | { |
---|
5208 | PyDict_SetItemString(d,"IP_MF", SWIG_From_int((int)(0x2000))); |
---|
5209 | } |
---|
5210 | { |
---|
5211 | PyDict_SetItemString(d,"IP_OFFMASK", SWIG_From_int((int)(0x1fff))); |
---|
5212 | } |
---|
5213 | } |
---|
5214 | |
---|