Changeset 47de0aa


Ignore:
Timestamp:
06/29/06 21:07:50 (14 years ago)
Author:
Daniel Lawson <dlawson@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
2553732
Parents:
66caf4b
Message:
  • Cosmetic changes to trace_help() output
  • inclusion of some m4 handlers to deal with swig and python, lifted from http://autoconf-archive.cryp.to/. These are GPLd, which needs to be taken into account if libtrace licensing changes!
  • updated the swig bindings for python. Mostly api compliant now. Still possibly a memory leak to do with displaying ip addresses - I haven't touched this particular part of the code yet.
Files:
3 added
2 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • Makefile.am

    r306f91c r47de0aa  
    11LIBPACKETDUMP_DIR = libpacketdump
    22TOOLS_DIR = tools
    3 SUBDIRS = lib docs $(LIBPACKETDUMP_DIR) $(TOOLS_DIR)
     3if LIBTRACE_SWIG
     4SWIG_DIR = swig
     5endif
     6SUBDIRS = lib docs $(LIBPACKETDUMP_DIR) $(TOOLS_DIR) $(SWIG_DIR)
    47
     8ACLOCAL_AMFLAGS = -I m4
    59AUTOMAKE_OPTIONS = 1.5
    610
  • bootstrap.sh

    r1c124a8 r47de0aa  
    22
    33set -x
    4 aclocal-1.9 ||
    5         aclocal
     4aclocal-1.9 -I m4 ||
     5        aclocal  -I m4
    66libtoolize --force --copy
    77autoheader
  • configure.in

    r306f91c r47de0aa  
    2222        tools/tracemerge/Makefile tools/tracereport/Makefile
    2323        tools/tracertstats/Makefile tools/tracesplit/Makefile
    24         tools/tracestats/Makefile docs/libtrace.doxygen lib/libtrace.h])
     24        tools/tracestats/Makefile
     25        docs/libtrace.doxygen
     26        lib/libtrace.h
     27        swig/Makefile])
    2528dnl GNU C library
    2629dnl AC_GNU_SOURCE
     
    4649AC_HEADER_TIME
    4750AC_SYS_LARGEFILE
     51
     52AC_PROG_LIBTOOL
     53AM_PATH_PYTHON(2.3)
     54AC_PROG_SWIG(1.3.21)
     55SWIG_PYTHON
    4856
    4957# Checks for library functions.
     
    209217AC_CHECK_LIB(z, gzopen)
    210218
     219libtrace_swig=false;
     220if test -n $SWIG; then
     221        libtrace_swig=true;
     222fi
     223libtrace_python=false;
     224if test -n "$PYTHON"; then
     225        libtrace_python=true;
     226fi
     227
    211228AM_CONDITIONAL([HAVE_DAG], [test "$libtrace_dag" = true])
    212229AM_CONDITIONAL([DAG2_4], [test "$libtrace_dag2_4" = true])
     
    214231AM_CONDITIONAL([HAVE_NETPACKET_PACKET_H], [test "$libtrace_netpacket_packet_h" = true])
    215232AM_CONDITIONAL([LIBGDC], [test "$ac_cv_header_gdc_h" = yes])
     233AM_CONDITIONAL([LIBTRACE_SWIG], [test "$libtrace_swig" = true])
     234#AM_CONDITIONAL([HAVE_PYTHON], [test "$libtrace_python" = true])
    216235
    217236# Check for miscellaneous programs
     
    257276reportopt "Building man pages/documentation" $libtrace_doxygen
    258277
     278if test x"$libtrace_swig" = xtrue; then
     279        if test x"$libtrace_python"; then
     280                AC_MSG_NOTICE([Building swig bindings for: python])
     281        fi
     282else
     283        AC_MSG_NOTICE([Building swig bindings for: Nothing])
     284fi
  • lib/trace.c

    re5c2bc4 r47de0aa  
    245245        struct libtrace_format_t *tmp;
    246246        trace_init();
    247         printf("libtrace %s\n",PACKAGE_VERSION);
     247        printf("libtrace %s\n\n",PACKAGE_VERSION);
     248        printf("Following this are a list of the format modules supported in this build of libtrace\n\n");
    248249        for(tmp=formats_list;tmp;tmp=tmp->next) {
    249250                if (tmp->help)
  • swig/libtrace.i

    r3fe7937 r47de0aa  
    147147%extend libtrace_packet_t {
    148148        libtrace_packet_t() {
    149                 struct libtrace_packet_t *packet = malloc(sizeof(struct libtrace_packet_t));
     149                struct libtrace_packet_t *packet = trace_create_packet();
    150150                return packet;
    151151                }
    152         ~libtrace_packet_t() { free(self);}
     152        ~libtrace_packet_t() {
     153                trace_destroy_packet(self);
     154                }
     155        libtrace_packet_t *trace_copy_packet() {
     156                return trace_copy_packet(self);
     157        }
     158        void *trace_get_link() {
     159                return trace_get_link(self);
     160        }
     161        void *trace_get_transport(uint8_t *proto, uint32_t *remaining) {
     162                return trace_get_transport(self, proto, remaining);
     163        }
    153164        struct libtrace_ip *trace_get_ip() {
    154165                return trace_get_ip(self);
     
    163174                return trace_get_icmp(self);
    164175        }
    165         void *trace_get_link() {
    166                 return trace_get_link(self);
     176        char *trace_get_destination_mac() {
     177                return trace_ether_ntoa(trace_get_destination_mac(self),0);
     178        }
     179        char *trace_get_source_mac() {
     180                return trace_ether_ntoa(trace_get_source_mac(self),0);
     181        }
     182        char *trace_ether_ntoa(uint8_t *mac) {
     183                return trace_ether_ntoa(mac, 0);
     184        }
     185        uint16_t trace_get_source_port() {
     186                return trace_get_source_port(self);
     187        }
     188        uint16_t trace_get_destination_port() {
     189                return trace_get_destination_port(self);
    167190        }
    168191        double trace_get_seconds() {
     
    178201                return trace_get_capture_length(self);
    179202        }
     203        size_t trace_set_capture_length(size_t size) {
     204                return trace_set_capture_length(self,size);
     205        }
    180206        int trace_get_wire_lenth() {
    181207                return trace_get_wire_length(self);
    182208        }
     209        int trace_get_framing_length() {
     210                return trace_get_framing_length(self);
     211        }
    183212        libtrace_linktype_t trace_get_link_type() {
    184213                return trace_get_link_type(self);
     
    190219                return trace_set_direction(self,direction);
    191220        }
    192         int trace_bpf_filter(struct libtrace_filter_t *filter) {
    193                 return trace_bpf_filter(filter,self);
     221        int trace_apply_filter(struct libtrace_filter_t *filter) {
     222                return trace_apply_filter(filter,self);
    194223        }
    195224        uint8_t trace_get_server_port(uint8_t protocol, uint16_t source,
     
    205234%extend libtrace_filter_t {
    206235        libtrace_filter_t(char *filterstring) {
    207                 return trace_bpf_setfilter(filterstring);
     236                return trace_create_filter(filterstring);
    208237        };
    209         int trace_bpf_filter(struct libtrace_packet_t *packet) {
    210                 return trace_bpf_filter(self,packet);
     238        ~libtrace_filter_t() {
     239                trace_destroy_filter(self);
     240        };
     241        int trace_apply_filter(struct libtrace_packet_t *packet) {
     242                return trace_apply_filter(self,packet);
    211243        }
    212244};
     
    221253                return trace_read_packet(self,packet);
    222254        }
     255        int trace_start() {
     256                return trace_start(self);
     257        }
     258        int trace_pause() {
     259                return trace_pause(self);
     260        }
     261        void trace_help() {
     262                trace_help();
     263        }
     264        int trace_config(trace_option_t option, void *value) {
     265                return trace_config(self, option, value);
     266        }
     267        libtrace_err_t trace_get_err() {
     268                return trace_get_err(self);
     269        }
     270        bool trace_is_err() {
     271                return trace_is_err(self);
     272        }
    223273};
    224274
     275%rename (OutputTrace) libtrace_out_t;
     276struct libtrace_out_t {};
     277
     278%extend libtrace_out_t {
     279        libtrace_out_t(char *uri) { return trace_create_output(uri); };
     280        ~libtrace_t() { trace_destroy_output(self); }
     281        int trace_start_output() {
     282                return trace_start_output(self);
     283        }
     284        int trace_config_output(trace_option_output_t option, void *value) {
     285                return trace_config_output(self, option, value);
     286        }
     287        libtrace_err_t trace_get_err_output() {
     288                return trace_get_err_output(self);
     289        }
     290        bool trace_is_err_output() {
     291                return trace_is_err_output(self);
     292        }
     293        int trace_write_packet(libtrace_packet_t *packet) {
     294                return trace_write_packet(self, packet);
     295        }
     296};
     297
  • swig/libtrace_wrap.c

    r3fe7937 r47de0aa  
    11/* ----------------------------------------------------------------------------
    22 * This file was automatically generated by SWIG (http://www.swig.org).
    3  * Version 1.3.22
     3 * Version 1.3.27
    44 *
    55 * This file is not intended to be easily readable and contains a number of
     
    1010
    1111#define SWIGPYTHON
    12 
    13 #include "Python.h"
    14 
    15 /*************************************************************** -*- c -*-
    16  * python/precommon.swg
     12/***********************************************************************
    1713 *
    18  * Rename all exported symbols from common.swg, to avoid symbol
    19  * clashes if multiple interpreters are included
     14 *  This section contains generic SWIG labels for method/variable
     15 *  declarations/attributes, and other compiler dependent labels.
    2016 *
    2117 ************************************************************************/
    2218
    23 #define SWIG_TypeRegister    SWIG_Python_TypeRegister
    24 #define SWIG_TypeCheck       SWIG_Python_TypeCheck
    25 #define SWIG_TypeCast        SWIG_Python_TypeCast
    26 #define SWIG_TypeDynamicCast SWIG_Python_TypeDynamicCast
    27 #define SWIG_TypeName        SWIG_Python_TypeName
    28 #define SWIG_TypePrettyName  SWIG_Python_TypePrettyName
    29 #define SWIG_TypeQuery       SWIG_Python_TypeQuery
    30 #define SWIG_TypeClientData  SWIG_Python_TypeClientData
    31 #define SWIG_PackData        SWIG_Python_PackData
    32 #define SWIG_UnpackData      SWIG_Python_UnpackData
    33 
     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>
    3481
    3582/***********************************************************************
    36  * common.swg
     83 * swigrun.swg
    3784 *
    38  *     This file contains generic SWIG runtime support for pointer
    39  *     type checking as well as a few commonly used macros to control
    40  *     external linkage.
     85 *     This file contains generic CAPI SWIG runtime support for pointer
     86 *     type checking.
    4187 *
    42  * Author : David Beazley (beazley@cs.uchicago.edu)
    43  *
    44  * Copyright (c) 1999-2000, The University of Chicago
    45  *
    46  * This file may be freely redistributed without license or fee provided
    47  * this copyright message remains intact.
    4888 ************************************************************************/
    4989
     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
    50120#include <string.h>
    51 
    52 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
    53 #  if defined(_MSC_VER) || defined(__GNUC__)
    54 #    if defined(STATIC_LINKED)
    55 #      define SWIGEXPORT(a) a
    56 #      define SWIGIMPORT(a) extern a
    57 #    else
    58 #      define SWIGEXPORT(a) __declspec(dllexport) a
    59 #      define SWIGIMPORT(a) extern a
    60 #    endif
    61 #  else
    62 #    if defined(__BORLANDC__)
    63 #      define SWIGEXPORT(a) a _export
    64 #      define SWIGIMPORT(a) a _export
    65 #    else
    66 #      define SWIGEXPORT(a) a
    67 #      define SWIGIMPORT(a) a
    68 #    endif
    69 #  endif
    70 #else
    71 #  define SWIGEXPORT(a) a
    72 #  define SWIGIMPORT(a) a
    73 #endif
    74 
    75 #ifdef SWIG_GLOBAL
    76 #  define SWIGRUNTIME(a) SWIGEXPORT(a)
    77 #else
    78 #  define SWIGRUNTIME(a) static a
    79 #endif
    80121
    81122#ifdef __cplusplus
     
    86127typedef struct swig_type_info *(*swig_dycast_func)(void **);
    87128
     129/* Structure to store inforomation on one type */
    88130typedef struct swig_type_info {
    89   const char             *name;
    90   swig_converter_func     converter;
    91   const char             *str;
    92   void                   *clientdata;
    93   swig_dycast_func        dcast;
    94   struct swig_type_info  *next;
    95   struct swig_type_info  *prev;
     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 */
    96136} swig_type_info;
    97137
    98 #ifdef SWIG_NOINCLUDE
    99 
    100 SWIGIMPORT(swig_type_info *) SWIG_TypeRegister(swig_type_info *);
    101 SWIGIMPORT(swig_type_info *) SWIG_TypeCheck(char *c, swig_type_info *);
    102 SWIGIMPORT(void *)           SWIG_TypeCast(swig_type_info *, void *);
    103 SWIGIMPORT(swig_type_info *) SWIG_TypeDynamicCast(swig_type_info *, void **);
    104 SWIGIMPORT(const char *)     SWIG_TypeName(const swig_type_info *);
    105 SWIGIMPORT(const char *)     SWIG_TypePrettyName(const swig_type_info *);
    106 SWIGIMPORT(swig_type_info *) SWIG_TypeQuery(const char *);
    107 SWIGIMPORT(void)             SWIG_TypeClientData(swig_type_info *, void *);
    108 SWIGIMPORT(char *)           SWIG_PackData(char *, void *, int);
    109 SWIGIMPORT(char *)           SWIG_UnpackData(char *, void *, int);
    110 
    111 #else
    112 
    113 static swig_type_info *swig_type_list = 0;
    114 static swig_type_info **swig_type_list_handle = &swig_type_list;
    115 
    116 /* Register a type mapping with the type-checking */
    117 SWIGRUNTIME(swig_type_info *)
    118 SWIG_TypeRegister(swig_type_info *ti) {
    119   swig_type_info *tc, *head, *ret, *next;
    120   /* Check to see if this type has already been registered */
    121   tc = *swig_type_list_handle;
    122   while (tc) {
    123     if (strcmp(tc->name, ti->name) == 0) {
    124       /* Already exists in the table.  Just add additional types to the list */
    125       if (tc->clientdata) ti->clientdata = tc->clientdata;
    126       head = tc;
    127       next = tc->next;
    128       goto l1;
    129     }
    130     tc = tc->prev;
    131   }
    132   head = ti;
    133   next = 0;
    134 
    135   /* Place in list */
    136   ti->prev = *swig_type_list_handle;
    137   *swig_type_list_handle = ti;
    138 
    139   /* Build linked lists */
    140   l1:
    141   ret = head;
    142   tc = ti + 1;
    143   /* Patch up the rest of the links */
    144   while (tc->name) {
    145     head->next = tc;
    146     tc->prev = head;
    147     head = tc;
    148     tc++;
    149   }
    150   if (next) next->prev = head;
    151   head->next = next;
    152   return ret;
    153 }
    154 
    155 /* Check the typename */
    156 SWIGRUNTIME(swig_type_info *)
    157 SWIG_TypeCheck(char *c, swig_type_info *ty) {
    158   swig_type_info *s;
    159   if (!ty) return 0;        /* Void pointer */
    160   s = ty->next;             /* First element always just a name */
    161   do {
    162     if (strcmp(s->name,c) == 0) {
    163       if (s == ty->next) return s;
    164       /* Move s to the top of the linked list */
    165       s->prev->next = s->next;
    166       if (s->next) {
    167         s->next->prev = s->prev;
    168       }
    169       /* Insert s as second element in the list */
    170       s->next = ty->next;
    171       if (ty->next) ty->next->prev = s;
    172       ty->next = s;
    173       s->prev = ty;
    174       return s;
    175     }
    176     s = s->next;
    177   } while (s && (s != ty->next));
    178   return 0;
    179 }
    180 
    181 /* Cast a pointer up an inheritance hierarchy */
    182 SWIGRUNTIME(void *)
    183 SWIG_TypeCast(swig_type_info *ty, void *ptr) {
    184   if ((!ty) || (!ty->converter)) return ptr;
    185   return (*ty->converter)(ptr);
    186 }
    187 
    188 /* Dynamic pointer casting. Down an inheritance hierarchy */
    189 SWIGRUNTIME(swig_type_info *)
     138/* Structure to store a type and conversion function used for casting */
     139typedef 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.*/
     149typedef 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*/
     166SWIGRUNTIME int
     167SWIG_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*/
     181SWIGRUNTIME int
     182SWIG_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*/
     200SWIGRUNTIME int
     201SWIG_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*/
     241SWIGRUNTIME swig_cast_info *
     242SWIG_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 */
     247SWIGRUNTIME swig_cast_info *
     248SWIG_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*/
     255SWIGRUNTIMEINLINE void *
     256SWIG_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*/
     263SWIGRUNTIME swig_type_info *
    190264SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
    191265  swig_type_info *lastty = ty;
     
    198272}
    199273
    200 /* Return the name associated with this type */
    201 SWIGRUNTIME(const char *)
     274/*
     275  Return the name associated with this type
     276*/
     277SWIGRUNTIMEINLINE const char *
    202278SWIG_TypeName(const swig_type_info *ty) {
    203279  return ty->name;
    204280}
    205281
    206 /* Return the pretty name associated with this type,
    207    that is an unmangled type name in a form presentable to the user.
     282/*
     283  Return the pretty name associated with this type,
     284  that is an unmangled type name in a form presentable to the user.
    208285*/
    209 SWIGRUNTIME(const char *)
     286SWIGRUNTIME const char *
    210287SWIG_TypePrettyName(const swig_type_info *type) {
    211288  /* The "str" field contains the equivalent pretty names of the
     
    225302
    226303/*
    227    Compare two type names skipping the space characters, therefore
    228    "char*" == "char *" and "Class<int>" == "Class<int >", etc.
    229 
    230    Return 0 when the two name types are equivalent, as in
    231    strncmp, but skipping ' '.
     304   Set the clientdata field for a type
    232305*/
    233 static int
    234 SWIG_TypeNameComp(const char *f1, const char *l1,
    235                   const char *f2, const char *l2) {
    236   for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
    237     while ((*f1 == ' ') && (f1 != l1)) ++f1;
    238     while ((*f2 == ' ') && (f2 != l2)) ++f2;
    239     if (*f1 != *f2) return *f1 - *f2;
    240   }
    241   return (l1 - f1) - (l2 - f2);
     306SWIGRUNTIME void
     307SWIG_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  }
    242321}
    243322
    244323/*
    245   Check type equivalence in a name list like <name1>|<name2>|...
     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.
    246330*/
    247 static int
    248 SWIG_TypeEquiv(const char *nb, const char *tb) {
    249   int equiv = 0;
    250   const char* te = tb + strlen(tb);
    251   const char* ne = nb;
    252   while (!equiv && *ne) {
    253     for (nb = ne; *ne; ++ne) {
    254       if (*ne == '|') break;
    255     }
    256     equiv = SWIG_TypeNameComp(nb, ne, tb, te) == 0;
    257     if (*ne) ++ne;
    258   }
    259   return equiv;
    260 }
     331SWIGRUNTIME swig_type_info *
     332SWIG_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).
    261371 
    262 
    263 /* Search for a swig_type_info structure */
    264 SWIGRUNTIME(swig_type_info *)
    265 SWIG_TypeQuery(const char *name) {
    266   swig_type_info *ty = *swig_type_list_handle;
    267   while (ty) {
    268     if (ty->str && (SWIG_TypeEquiv(ty->str,name))) return ty;
    269     if (ty->name && (strcmp(name,ty->name) == 0)) return ty;
    270     ty = ty->prev;
    271   }
     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*/
     376SWIGRUNTIME swig_type_info *
     377SWIG_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 */
    272399  return 0;
    273400}
    274401
    275 /* Set the clientdata field for a type */
    276 SWIGRUNTIME(void)
    277 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
    278   swig_type_info *tc, *equiv;
    279   if (ti->clientdata == clientdata) return;
    280   ti->clientdata = clientdata;
    281   equiv = ti->next;
    282   while (equiv) {
    283     if (!equiv->converter) {
    284       tc = *swig_type_list_handle;
    285       while (tc) {
    286         if ((strcmp(tc->name, equiv->name) == 0))
    287           SWIG_TypeClientData(tc,clientdata);
    288         tc = tc->prev;
    289       }
    290     }
    291     equiv = equiv->next;
    292   }
    293 }
    294 
    295 /* Pack binary data into a string */
    296 SWIGRUNTIME(char *)
    297 SWIG_PackData(char *c, void *ptr, int sz) {
    298   static char hex[17] = "0123456789abcdef";
    299   unsigned char *u = (unsigned char *) ptr;
    300   const unsigned char *eu =  u + sz;
    301   register unsigned char uu;
     402
     403/*
     404   Pack binary data into a string
     405*/
     406SWIGRUNTIME char *
     407SWIG_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;
    302411  for (; u != eu; ++u) {
    303     uu = *u;
     412    register unsigned char uu = *u;
    304413    *(c++) = hex[(uu & 0xf0) >> 4];
    305414    *(c++) = hex[uu & 0xf];
     
    308417}
    309418
    310 /* Unpack binary data from a string */
    311 SWIGRUNTIME(char *)
    312 SWIG_UnpackData(char *c, void *ptr, int sz) {
    313   register unsigned char uu = 0;
    314   register int d;
    315   unsigned char *u = (unsigned char *) ptr;
    316   const unsigned char *eu = u + sz;
     419/*
     420   Unpack binary data from a string
     421*/
     422SWIGRUNTIME const char *
     423SWIG_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;
    317426  for (; u != eu; ++u) {
    318     d = *(c++);
     427    register char d = *(c++);
     428    register unsigned char uu = 0;
    319429    if ((d >= '0') && (d <= '9'))
    320430      uu = ((d - '0') << 4);
    321431    else if ((d >= 'a') && (d <= 'f'))
    322432      uu = ((d - ('a'-10)) << 4);
     433    else
     434      return (char *) 0;
    323435    d = *(c++);
    324436    if ((d >= '0') && (d <= '9'))
     
    326438    else if ((d >= 'a') && (d <= 'f'))
    327439      uu |= (d - ('a'-10));
     440    else
     441      return (char *) 0;
    328442    *u = uu;
    329443  }
     
    331445}
    332446
    333 #endif
     447/*
     448   Pack 'void *' into a string buffer.
     449*/
     450SWIGRUNTIME char *
     451SWIG_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
     461SWIGRUNTIME const char *
     462SWIG_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
     474SWIGRUNTIME char *
     475SWIG_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
     489SWIGRUNTIME const char *
     490SWIG_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}
    334501
    335502#ifdef __cplusplus
    336503}
    337504#endif
     505
     506/* -----------------------------------------------------------------------------
     507 * SWIG API. Portion that goes into the runtime
     508 * ----------------------------------------------------------------------------- */
     509
     510#ifdef __cplusplus
     511extern "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 */
     554typedef 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
    338575
    339576/***********************************************************************
     
    347584 ************************************************************************/
    348585
     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
    349622#ifdef __cplusplus
    350623extern "C" {
    351624#endif
    352625
    353 #define SWIG_PY_INT     1
    354 #define SWIG_PY_FLOAT   2
    355 #define SWIG_PY_STRING  3
    356 #define SWIG_PY_POINTER 4
    357 #define SWIG_PY_BINARY  5
    358 
    359 /* Flags for pointer conversion */
    360 
    361 #define SWIG_POINTER_EXCEPTION     0x1
    362 #define SWIG_POINTER_DISOWN        0x2
    363 
    364 /* Exception handling in wrappers */
    365 #define SWIG_fail   goto fail
    366 
    367 /* Constant information structure */
    368 typedef struct swig_const_info {
    369     int type;
    370     char *name;
    371     long lvalue;
    372     double dvalue;
    373     void   *pvalue;
    374     swig_type_info **ptype;
    375 } swig_const_info;
    376 
    377 /* Common SWIG API */
    378 #define SWIG_ConvertPtr(obj, pp, type, flags) \
    379   SWIG_Python_ConvertPtr(obj, pp, type, flags)
    380 #define SWIG_NewPointerObj(p, type, flags) \
    381   SWIG_Python_NewPointerObj(p, type, flags)
    382 #define SWIG_MustGetPtr(p, type, argnum, flags) \
    383   SWIG_Python_MustGetPtr(p, type, argnum, flags)
    384  
    385 /* Python-specific SWIG API */
    386 #define SWIG_newvarlink() \
    387   SWIG_Python_newvarlink()
    388 #define SWIG_addvarlink(p, name, get_attr, set_attr) \
    389   SWIG_Python_addvarlink(p, name, get_attr, set_attr)
    390 #define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) \
    391   SWIG_Python_ConvertPacked(obj, ptr, sz, ty, flags)
    392 #define SWIG_NewPackedObj(ptr, sz, type) \
    393   SWIG_Python_NewPackedObj(ptr, sz, type)
    394 #define SWIG_InstallConstants(d, constants) \
    395   SWIG_Python_InstallConstants(d, constants)
    396 
    397 typedef double (*py_objasdbl_conv)(PyObject *obj);
    398 
    399 #ifdef SWIG_NOINCLUDE
    400 
    401 SWIGIMPORT(int)               SWIG_Python_ConvertPtr(PyObject *, void **, swig_type_info *, int);
    402 SWIGIMPORT(PyObject *)        SWIG_Python_NewPointerObj(void *, swig_type_info *,int own);
    403 SWIGIMPORT(void *)            SWIG_Python_MustGetPtr(PyObject *, swig_type_info *, int, int);
    404 SWIGIMPORT(PyObject *)        SWIG_Python_newvarlink(void);
    405 SWIGIMPORT(void)              SWIG_Python_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
    406 SWIGIMPORT(int)               SWIG_Python_ConvertPacked(PyObject *, void *, int sz, swig_type_info *, int);
    407 SWIGIMPORT(PyObject *)        SWIG_Python_NewPackedObj(void *, int sz, swig_type_info *);
    408 SWIGIMPORT(void)              SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]);
    409 
     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
     635static PyObject *
     636PyString_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
     657typedef struct {
     658  PyObject_HEAD
     659  void *ptr;
     660  const char *desc;
     661} PySwigObject;
     662
     663/* Declarations for objects of type PySwigObject */
     664
     665SWIGRUNTIME int
     666PySwigObject_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 
     678SWIGRUNTIME PyObject *
     679PySwigObject_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
     686SWIGRUNTIME PyObject *
     687PySwigObject_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
     694SWIGRUNTIME PyObject *
     695PySwigObject_long(PySwigObject *v)
     696{
     697  return PyLong_FromVoidPtr(v->ptr);
     698}
     699
     700SWIGRUNTIME PyObject *
     701PySwigObject_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
     716SWIGRUNTIME PyObject *
     717PySwigObject_oct(PySwigObject *v)
     718{
     719  return PySwigObject_format("%o",v);
     720}
     721
     722SWIGRUNTIME PyObject *
     723PySwigObject_hex(PySwigObject *v)
     724{
     725  return PySwigObject_format("%x",v);
     726}
     727
     728SWIGRUNTIME int
     729PySwigObject_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
     741SWIGRUNTIME void
     742PySwigObject_dealloc(PySwigObject *self)
     743{
     744  PyObject_Del(self);
     745}
     746
     747SWIGRUNTIME PyTypeObject*
     748PySwigObject_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
     838SWIGRUNTIME PyObject *
     839PySwigObject_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
     849SWIGRUNTIMEINLINE void *
     850PySwigObject_AsVoidPtr(PyObject *self)
     851{
     852  return ((PySwigObject *)self)->ptr;
     853}
     854
     855SWIGRUNTIMEINLINE const char *
     856PySwigObject_GetDesc(PyObject *self)
     857{
     858  return ((PySwigObject *)self)->desc;
     859}
     860
     861SWIGRUNTIMEINLINE int
     862PySwigObject_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
     871typedef struct {
     872  PyObject_HEAD
     873  void *pack;
     874  const char *desc;
     875  size_t size;
     876} PySwigPacked;
     877
     878SWIGRUNTIME int
     879PySwigPacked_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 
     893SWIGRUNTIME PyObject *
     894PySwigPacked_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
     904SWIGRUNTIME PyObject *
     905PySwigPacked_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
     915SWIGRUNTIME int
     916PySwigPacked_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
     929SWIGRUNTIME void
     930PySwigPacked_dealloc(PySwigPacked *self)
     931{
     932  free(self->pack);
     933  PyObject_Del(self);
     934}
     935
     936SWIGRUNTIME PyTypeObject*
     937PySwigPacked_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
     995SWIGRUNTIME PyObject *
     996PySwigPacked_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
     1014SWIGRUNTIMEINLINE const char *
     1015PySwigPacked_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
     1023SWIGRUNTIMEINLINE const char *
     1024PySwigPacked_GetDesc(PyObject *self)
     1025{
     1026  return ((PySwigPacked *)self)->desc;
     1027}
     1028
     1029SWIGRUNTIMEINLINE int
     1030PySwigPacked_Check(PyObject *op) {
     1031  return ((op)->ob_type == PySwigPacked_type())
     1032    || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0);
     1033}
    4101034
    4111035#else
    412 
    413 
    4141036/* -----------------------------------------------------------------------------
    415  * global variable support code.
     1037 * Use the old Python PyCObject instead of PySwigObject
    4161038 * ----------------------------------------------------------------------------- */
    4171039
    418 typedef struct swig_globalvar {   
    419   char       *name;                  /* Name of global variable */
    420   PyObject *(*get_attr)(void);       /* Return the current value */
    421   int       (*set_attr)(PyObject *); /* Set the value */
    422   struct swig_globalvar *next;
    423 } swig_globalvar;
    424 
    425 typedef struct swig_varlinkobject {
    426   PyObject_HEAD
    427   swig_globalvar *vars;
    428 } swig_varlinkobject;
    429 
    430 static PyObject *
    431 swig_varlink_repr(swig_varlinkobject *v) {
    432   v = v;
    433   return PyString_FromString("<Global variables>");
    434 }
    435 
    436 static int
    437 swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) {
    438   swig_globalvar  *var;
    439   flags = flags;
    440   fprintf(fp,"Global variables { ");
    441   for (var = v->vars; var; var=var->next) {
    442     fprintf(fp,"%s", var->name);
    443     if (var->next) fprintf(fp,", ");
    444   }
    445   fprintf(fp," }\n");
    446   return 0;
    447 }
    448 
    449 static PyObject *
    450 swig_varlink_getattr(swig_varlinkobject *v, char *n) {
    451   swig_globalvar *var = v->vars;
    452   while (var) {
    453     if (strcmp(var->name,n) == 0) {
    454       return (*var->get_attr)();
    455     }
    456     var = var->next;
    457   }
    458   PyErr_SetString(PyExc_NameError,"Unknown C global variable");
    459   return NULL;
    460 }
    461 
    462 static int
    463 swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
    464   swig_globalvar *var = v->vars;
    465   while (var) {
    466     if (strcmp(var->name,n) == 0) {
    467       return (*var->set_attr)(p);
    468     }
    469     var = var->next;
    470   }
    471   PyErr_SetString(PyExc_NameError,"Unknown C global variable");
    472   return 1;
    473 }
    474 
    475 statichere PyTypeObject varlinktype = {
    476   PyObject_HEAD_INIT(0)             
    477   0,                                  /* Number of items in variable part (ob_size) */
    478   (char *)"swigvarlink",              /* Type name (tp_name) */
    479   sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
    480   0,                                  /* Itemsize (tp_itemsize) */
    481   0,                                  /* Deallocator (tp_dealloc) */
    482   (printfunc) swig_varlink_print,     /* Print (tp_print) */
    483   (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
    484   (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
    485   0,                                  /* tp_compare */
    486   (reprfunc) swig_varlink_repr,       /* tp_repr */
    487   0,                                  /* tp_as_number */
    488   0,                                  /* tp_as_sequence */
    489   0,                                  /* tp_as_mapping */
    490   0,                                  /* tp_hash */
    491   0,                                  /* tp_call */
    492   0,                                  /* tp_str */
    493   0,                                  /* tp_getattro */
    494   0,                                  /* tp_setattro */
    495   0,                                  /* tp_as_buffer */
    496   0,                                  /* tp_flags */
    497   0,                                  /* tp_doc */
    498   0,                                  /* tp_traverse */
    499   0,                                  /* tp_clear */
    500   0,                                  /* tp_richcompare */
    501   0,                                  /* tp_weaklistoffset */
    502 #if PY_VERSION_HEX >= 0x02020000
    503   0,                                  /* tp_iter */
    504   0,                                  /* tp_iternext */
    505   0,                                  /* tp_methods */
    506   0,                                  /* tp_members */
    507   0,                                  /* tp_getset */
    508   0,                                  /* tp_base */
    509   0,                                  /* tp_dict */
    510   0,                                  /* tp_descr_get */
    511   0,                                  /* tp_descr_set */
    512   0,                                  /* tp_dictoffset */
    513   0,                                  /* tp_init */
    514   0,                                  /* tp_alloc */
    515   0,                                  /* tp_new */
    516   0,                                  /* tp_free */
    517   0,                                  /* tp_is_gc */
    518   0,                                  /* tp_bases */
    519   0,                                  /* tp_mro */
    520   0,                                  /* tp_cache */
    521   0,                                  /* tp_subclasses */
    522   0,                                  /* tp_weaklist */
    523 #endif
    524 #if PY_VERSION_HEX >= 0x02030200
    525   0,                                  /* tp_del */
    526 #endif
    527 #ifdef COUNT_ALLOCS
    528   /* these must be last */
    529   0,                                  /* tp_alloc */
    530   0,                                  /* tp_free */
    531   0,                                  /* tp_maxalloc */
    532   0,                                  /*  tp_next */
    533 #endif
    534 };
    535 
    536 /* Create a variable linking object for use later */
    537 SWIGRUNTIME(PyObject *)
    538 SWIG_Python_newvarlink(void) {
    539   swig_varlinkobject *result = 0;
    540   result = PyMem_NEW(swig_varlinkobject,1);
    541   varlinktype.ob_type = &PyType_Type;    /* Patch varlinktype into a PyType */
    542   result->ob_type = &varlinktype;
    543   result->vars = 0;
    544   result->ob_refcnt = 0;
    545   Py_XINCREF((PyObject *) result);
    546   return ((PyObject*) result);
    547 }
    548 
    549 SWIGRUNTIME(void)
    550 SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
    551   swig_varlinkobject *v;
    552   swig_globalvar *gv;
    553   v= (swig_varlinkobject *) p;
    554   gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
    555   gv->name = (char *) malloc(strlen(name)+1);
    556   strcpy(gv->name,name);
    557   gv->get_attr = get_attr;
    558   gv->set_attr = set_attr;
    559   gv->next = v->vars;
    560   v->vars = gv;
    561 }
     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
     1053SWIGRUNTIME void
     1054SWIG_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
     1089SWIGRUNTIMEINLINE void
     1090SWIG_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
     1099SWIGRUNTIME int
     1100SWIG_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
     1124SWIGRUNTIME int
     1125SWIG_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 * ----------------------------------------------------------------------------- */
    5621141
    5631142/* Convert a pointer value */
    564 SWIGRUNTIME(int)
     1143SWIGRUNTIME int
    5651144SWIG_Python_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) {
    566   swig_type_info *tc;
    567   char *c = 0;
     1145  swig_cast_info *tc;
     1146  const char *c = 0;
    5681147  static PyObject *SWIG_this = 0;
    5691148  int    newref = 0;
    5701149  PyObject  *pyobj = 0;
    571 
     1150  void *vptr;
     1151 
    5721152  if (!obj) return 0;
    5731153  if (obj == Py_None) {
     
    5751155    return 0;
    5761156  }
     1157
    5771158#ifdef SWIG_COBJECT_TYPES
    578   if (!(PyCObject_Check(obj))) {
     1159  if (!(PySwigObject_Check(obj))) {
    5791160    if (!SWIG_this)
    5801161      SWIG_this = PyString_FromString("this");
     
    5831164    newref = 1;
    5841165    if (!obj) goto type_error;
    585     if (!PyCObject_Check(obj)) {
     1166    if (!PySwigObject_Check(obj)) {
    5861167      Py_DECREF(obj);
    5871168      goto type_error;
    5881169    }
    5891170  } 
    590   *ptr = PyCObject_AsVoidPtr(obj);
    591   c = (char *) PyCObject_GetDesc(obj);
    592   if (newref) Py_DECREF(obj);
    593   goto cobject;
     1171  vptr = PySwigObject_AsVoidPtr(obj);
     1172  c = (const char *) PySwigObject_GetDesc(obj);
     1173  if (newref) { Py_DECREF(obj); }
     1174  goto type_check;
    5941175#else
    5951176  if (!(PyString_Check(obj))) {
     
    6051186    }
    6061187  }
    607   c = PyString_AS_STRING(obj);
     1188  c = PyString_AsString(obj);
    6081189  /* Pointer values must start with leading underscore */
    609   if (*c != '_') {
    610     *ptr = (void *) 0;
    611     if (strcmp(c,"NULL") == 0) {
    612       if (newref) { Py_DECREF(obj); }
    613       return 0;
    614     } else {
    615       if (newref) { Py_DECREF(obj); }
    616       goto type_error;
    617     }
    618   }
    619   c++;
    620   c = SWIG_UnpackData(c,ptr,sizeof(void *));
     1190  c = SWIG_UnpackVoidPtr(c, &vptr, ty->name);
    6211191  if (newref) { Py_DECREF(obj); }
    622 #endif
    623 
    624 #ifdef SWIG_COBJECT_TYPES
    625 cobject:
    626 #endif
    627 
     1192  if (!c) goto type_error;
     1193#endif
     1194
     1195type_check:
    6281196  if (ty) {
    6291197    tc = SWIG_TypeCheck(c,ty);
    6301198    if (!tc) goto type_error;
    631     *ptr = SWIG_TypeCast(tc,(void*) *ptr);
    632   }
    633 
     1199    *ptr = SWIG_TypeCast(tc,vptr);
     1200  } else {
     1201    *ptr = vptr;
     1202  }
    6341203  if ((pyobj) && (flags & SWIG_POINTER_DISOWN)) {
    6351204    PyObject_SetAttrString(pyobj,(char*)"thisown",Py_False);
     1205  }
     1206  return 0;
     1207
     1208type_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 */
     1234SWIGRUNTIME void *
     1235SWIG_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 */
     1248SWIGRUNTIME int
     1249SWIG_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;
    6361265  }
    6371266  return 0;
     
    6401269  PyErr_Clear();
    6411270  if (flags & SWIG_POINTER_EXCEPTION) {
    642     if (ty && c) {
    643       PyErr_Format(PyExc_TypeError,
    644                    "Type error. Got %s, expected %s",
    645                    c, ty->name);
     1271    if (ty) {
     1272      SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
    6461273    } else {
    647       PyErr_SetString(PyExc_TypeError,"Expected a pointer");
     1274      SWIG_Python_TypeError("C/C++ packed data", obj);
    6481275    }
    6491276  }
    6501277  return -1;
    651 }
    652 
    653 /* Convert a pointer value, signal an exception on a type mismatch */
    654 SWIGRUNTIME(void *)
    655 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
    656   void *result;
    657   SWIG_Python_ConvertPtr(obj, &result, ty, flags | SWIG_POINTER_EXCEPTION);
    658   return result;
    659 }
    660 
    661 /* Convert a packed value value */
    662 SWIGRUNTIME(int)
    663 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, int sz, swig_type_info *ty, int flags) {
    664   swig_type_info *tc;
    665   char  *c = 0;
    666 
    667   if ((!obj) || (!PyString_Check(obj))) goto type_error;
    668   c = PyString_AS_STRING(obj);
    669   /* Pointer values must start with leading underscore */
    670   if (*c != '_') goto type_error;
    671   c++;
    672   c = SWIG_UnpackData(c,ptr,sz);
    673   if (ty) {
    674     tc = SWIG_TypeCheck(c,ty);
    675     if (!tc) goto type_error;
    676   }
    677   return 0;
    678 
    679 type_error:
    680 
    681   if (flags) {
    682     if (ty && c) {
    683       PyErr_Format(PyExc_TypeError,
    684                    "Type error. Got %s, expected %s",
    685                    c, ty->name);
    686     } else {
    687       PyErr_SetString(PyExc_TypeError,"Expected a pointer");
    688     }
    689   }
    690   return -1;
    691 }
    692 
    693 /* Create a new pointer object */
    694 SWIGRUNTIME(PyObject *)
     1278
     1279
     1280/* Create a new array object */
     1281SWIGRUNTIME PyObject *
    6951282SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int own) {
    696   PyObject *robj;
     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  }
    6971290  if (!ptr) {
    6981291    Py_INCREF(Py_None);
     
    7001293  }
    7011294#ifdef SWIG_COBJECT_TYPES
    702   robj = PyCObject_FromVoidPtrAndDesc((void *) ptr, (char *) type->name, NULL);
     1295  robj = PySwigObject_FromVoidPtrAndDesc((void *) ptr, (char *)type->name);
    7031296#else
    7041297  {
    705     char result[1024];
    706     char *r = result;
    707     *(r++) = '_';
    708     r = SWIG_PackData(r,&ptr,sizeof(void *));
    709     strcpy(r,type->name);
    710     robj = PyString_FromString(result);
     1298    char result[SWIG_BUFFER_SIZE];
     1299    robj = SWIG_PackVoidPtr(result, ptr, type->name, sizeof(result)) ?
     1300      PyString_FromString(result) : 0;
    7111301  }
    7121302#endif
     
    7281318}
    7291319
    730 SWIGRUNTIME(PyObject *)
    731 SWIG_Python_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
    732   char result[1024];
    733   char *r = result;
    734   if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
    735   *(r++) = '_';
    736   r = SWIG_PackData(r,ptr,sz);
    737   strcpy(r,type->name);
    738   return PyString_FromString(result);
    739 }
    740 
    741 /* Install Constants */
    742 SWIGRUNTIME(void)
    743 SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
    744   int i;
    745   PyObject *obj;
    746   for (i = 0; constants[i].type; i++) {
    747     switch(constants[i].type) {
    748     case SWIG_PY_INT:
    749       obj = PyInt_FromLong(constants[i].lvalue);
    750       break;
    751     case SWIG_PY_FLOAT:
    752       obj = PyFloat_FromDouble(constants[i].dvalue);
    753       break;
    754     case SWIG_PY_STRING:
    755       if (constants[i].pvalue) {
    756         obj = PyString_FromString((char *) constants[i].pvalue);
    757       } else {
    758         Py_INCREF(Py_None);
    759         obj = Py_None;
    760       }
    761       break;
    762     case SWIG_PY_POINTER:
    763       obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
    764       break;
    765     case SWIG_PY_BINARY:
    766       obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
    767       break;
    768     default:
    769       obj = 0;
    770       break;
    771     }
    772     if (obj) {
    773       PyDict_SetItemString(d,constants[i].name,obj);
    774       Py_DECREF(obj);
    775     }
    776   }
    777 }
    778 
    779 #endif
    780 
    781 /* Contract support */
    782 
    783 #define SWIG_contract_assert(expr, msg) if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg ); goto fail; } else
     1320SWIGRUNTIME PyObject *
     1321SWIG_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
     1344void *SWIG_ReturnGlobalTypeList(void *);
     1345#endif
     1346
     1347SWIGRUNTIME swig_module_info *
     1348SWIG_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
     1368is copied out of Python/modsupport.c in python version 2.3.4 */
     1369SWIGINTERN int
     1370PyModule_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
     1398SWIGRUNTIME void
     1399SWIG_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}
    7841409
    7851410#ifdef __cplusplus
     
    7901415/* -------- TYPES TABLE (BEGIN) -------- */
    7911416
    792 #define  SWIGTYPE_p_libtrace_t swig_types[0]
    793 #define  SWIGTYPE_p_libtrace_udp swig_types[1]
    794 #define  SWIGTYPE_p_libtrace_ip swig_types[2]
    795 #define  SWIGTYPE_p_libtrace_icmp_un_echo swig_types[3]
    796 #define  SWIGTYPE_p_libtrace_icmp_un swig_types[4]
    797 #define  SWIGTYPE_p_uint64_t swig_types[5]
    798 #define  SWIGTYPE_p_void swig_types[6]
    799 #define  SWIGTYPE_p_libtrace_packet_t swig_types[7]
    800 #define  SWIGTYPE_p_char swig_types[8]
    801 #define  SWIGTYPE_p_libtrace_icmp_un_frag swig_types[9]
    802 #define  SWIGTYPE_p_libtrace_filter_t swig_types[10]
    803 #define  SWIGTYPE_p_timeval swig_types[11]
    804 #define  SWIGTYPE_p_libtrace_icmp swig_types[12]
    805 #define  SWIGTYPE_p_int8_t swig_types[13]
    806 #define  SWIGTYPE_p_in_addr swig_types[14]
    807 #define  SWIGTYPE_p_libtrace_tcp swig_types[15]
    808 #define  SWIGTYPE_p_libtrace_linktype_t swig_types[16]
    809 static swig_type_info *swig_types[18];
     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]
     1443static swig_type_info *swig_types[27];
     1444static 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)
    8101447
    8111448/* -------- TYPES TABLE (END) -------- */
     
    8191456#define SWIG_name    "_libtrace"
    8201457
    821 /* Auxiliar swig  macros that appear in the header */
    822 
    823 #define SWIG_OLDOBJ  1
    824 #define SWIG_NEWOBJ  SWIG_OLDOBJ + 1
    825 #define SWIG_PYSTR   SWIG_NEWOBJ + 1
    826 
    827 #ifdef __cplusplus
    828 #define SWIGSTATICINLINE(a) static inline a
    829 #define SWIGSTATIC(a) static a
    830 #define swig_new_array(size,Type) (new Type[(size)])
    831 #define swig_delete(cptr) delete cptr
    832 #define swig_delete_array(cptr) delete[] cptr
    833 #define swig_const_cast(a,Type) const_cast<Type >(a)
    834 #define swig_static_cast(a,Type) static_cast<Type >(a)
    835 #define swig_reinterpret_cast(a,Type) reinterpret_cast<Type >(a)
    836 #define swig_new_copy(ptr,Type) (new Type(*ptr))
    837 #define swig_numeric_cast(a,Type) static_cast<Type >(a)
    838 
    839 #else /* C case */
    840 
    841 #define SWIGSTATICINLINE(a) static a
    842 #define SWIGSTATIC(a) static a
    843 #define swig_new_array(size,Type) ((Type*) malloc((size)*sizeof(Type)))
    844 #define swig_delete(cptr) free((char*)cptr)
    845 #define swig_delete_array(cptr) free((char*)cptr)
    846 #define swig_const_cast(a,Type) (Type)(a)
    847 #define swig_static_cast(a,Type) (Type)(a)
    848 #define swig_reinterpret_cast(a,Type) (Type)(a)
    849 #define swig_numeric_cast(a,Type) (Type)(a)
    850 #define swig_new_copy(ptr,Type)  ((Type*)memcpy(malloc(sizeof(Type)),ptr,sizeof(Type)))
    851 
    852 #endif /* __cplusplus */
    853 
    854 
    855 /*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/
    856 #define SWIG_From_signed_SS_char PyInt_FromLong
    857 /*@@*/
    858 /*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/
    859 #define SWIG_From_unsigned_SS_char PyInt_FromLong
    860 /*@@*/
    861 /*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/
    862 #define SWIG_From_short PyInt_FromLong
    863 /*@@*/
    864 /*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/
    865 #define SWIG_From_unsigned_SS_short PyInt_FromLong
    866 /*@@*/
    867 /*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/
    868 #define SWIG_From_int PyInt_FromLong
    869 /*@@*/
    870 /*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/
    871 #define SWIG_From_long PyInt_FromLong
    872 /*@@*/
    873 /*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/
    874 #define SWIG_From_float PyFloat_FromDouble
    875 /*@@*/
    876 /*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/
    877 #define SWIG_From_double PyFloat_FromDouble
    878 /*@@*/
    879 
    880 
    8811458#include <arpa/inet.h>
    8821459#include "libtrace.h"
     
    8891466
    8901467
    891 SWIGSTATICINLINE(int)
     1468SWIGINTERN int
    8921469  SWIG_CheckLongInRange(long value, long min_value, long max_value,
    8931470                        const char *errmsg)
     
    9121489
    9131490
    914 SWIGSTATICINLINE(int)
     1491SWIGINTERN int
    9151492  SWIG_AsVal_long(PyObject * obj, long* val)
    9161493{
    917   if (PyInt_Check(obj)) {
    918     if (val) *val = PyInt_AS_LONG(obj);
    919     return 1;
    920   }
    9211494  if (PyLong_Check(obj)) {
    9221495    long v = PyLong_AsLong(obj);
     
    9291502    }
    9301503  }
     1504  if (PyInt_Check(obj)) {
     1505    if (val) *val = PyInt_AsLong(obj);
     1506    return 1;
     1507  }
    9311508  if (val) {
    932     PyErr_SetString(PyExc_TypeError, "a long is expected");
     1509    SWIG_type_error("long", obj);
    9331510  }
    9341511  return 0;
     
    9371514
    9381515#if INT_MAX != LONG_MAX
    939 SWIGSTATICINLINE(int)
     1516SWIGINTERN int
    9401517  SWIG_AsVal_int(PyObject *obj, int *val)
    9411518{
    942   const char* errmsg = val ? "int" : 0;
     1519  const char* errmsg = val ? "int" : (char*)0;
    9431520  long v;
    9441521  if (SWIG_AsVal_long(obj, &v)) {
    9451522    if (SWIG_CheckLongInRange(v, INT_MIN,INT_MAX, errmsg)) {
    946       if (val) *val = swig_numeric_cast(v, int);
     1523      if (val) *val = (int)(v);
    9471524      return 1;
    9481525    } else {
     
    9531530  }
    9541531  if (val) {
    955     PyErr_SetString(PyExc_TypeError, "an int is expected");
     1532    SWIG_type_error(errmsg, obj);
    9561533  }
    9571534  return 0;   
    9581535}
    9591536#else
    960 SWIGSTATICINLINE(int)
     1537SWIGINTERNINLINE int
    9611538  SWIG_AsVal_int(PyObject *obj, int *val)
    9621539{
     
    9661543
    9671544
    968 SWIGSTATICINLINE(int)
     1545SWIGINTERNINLINE int
    9691546SWIG_As_int(PyObject* obj)
    9701547{
     
    9721549  if (!SWIG_AsVal_int(obj, &v)) {
    9731550    /*
    974       this is needed to make valgrind/purify happier.  the other
    975       solution is throw an exception, but since this code should work
    976       with plain C ....
     1551      this is needed to make valgrind/purify happier.
    9771552     */
    9781553    memset((void*)&v, 0, sizeof(int));
     
    9821557
    9831558 
    984 SWIGSTATICINLINE(int)
     1559SWIGINTERNINLINE int
    9851560SWIG_Check_int(PyObject* obj)
    9861561{
     
    9891564
    9901565
    991 SWIGSTATICINLINE(int)
     1566  /*@/usr/share/swig1.3/python/pymacros.swg,72,SWIG_define@*/
     1567#define SWIG_From_int PyInt_FromLong
     1568/*@@*/
     1569
     1570
     1571SWIGINTERNINLINE int
    9921572  SWIG_CheckUnsignedLongInRange(unsigned long value,
    9931573                                unsigned long max_value,
     
    9971577    if (errmsg) {
    9981578      PyErr_Format(PyExc_OverflowError,
    999                    "value %ld is greater than '%s' minimum %ld",
     1579                   "value %lu is greater than '%s' minimum %lu",
    10001580                   value, errmsg, max_value);
    10011581    }
     
    10061586
    10071587
    1008 SWIGSTATICINLINE(int)
    1009   SWIG_AsVal_unsigned_SS_long(PyObject * obj, unsigned long *val)
     1588SWIGINTERN int
     1589  SWIG_AsVal_unsigned_SS_long(PyObject *obj, unsigned long *val)
    10101590{
    1011   if (PyInt_Check(obj)) {
    1012     long v = PyInt_AS_LONG(obj);
    1013     if (v >= 0) {
    1014       if (val) *val = v;
    1015       return 1;
    1016     }   
    1017   }
    10181591  if (PyLong_Check(obj)) {
    10191592    unsigned long v = PyLong_AsUnsignedLong(obj);
     
    10261599    }
    10271600  }
     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  }
    10281608  if (val) {
    1029     PyErr_SetString(PyExc_TypeError, "an unsigned long is expected");
     1609    SWIG_type_error("unsigned long", obj);
    10301610  }
    10311611  return 0;
     
    10341614
    10351615#if UINT_MAX != ULONG_MAX
    1036 SWIGSTATICINLINE(int)
     1616SWIGINTERN int
    10371617  SWIG_AsVal_unsigned_SS_int(PyObject *obj, unsigned int *val)
    10381618{
    1039   const char* errmsg = val ? "unsigned int" : 0;
     1619  const char* errmsg = val ? "unsigned int" : (char*)0;
    10401620  unsigned long v;
    10411621  if (SWIG_AsVal_unsigned_SS_long(obj, &v)) {
    10421622    if (SWIG_CheckUnsignedLongInRange(v, INT_MAX, errmsg)) {
    1043       if (val) *val = swig_numeric_cast(v, unsigned int);
     1623      if (val) *val = (unsigned int)(v);
    10441624      return 1;
    10451625    }
     
    10481628  }
    10491629  if (val) {
    1050     PyErr_SetString(PyExc_TypeError, "an unsigned int is expected");
     1630    SWIG_type_error(errmsg, obj);
    10511631  }
    10521632  return 0;   
    10531633}
    10541634#else
    1055 SWIGSTATICINLINE(unsigned int)
     1635SWIGINTERNINLINE unsigned int
    10561636  SWIG_AsVal_unsigned_SS_int(PyObject *obj, unsigned int *val)
    10571637{
     
    10611641
    10621642
    1063 SWIGSTATICINLINE(unsigned int)
     1643SWIGINTERNINLINE unsigned int
    10641644SWIG_As_unsigned_SS_int(PyObject* obj)
    10651645{
     
    10671647  if (!SWIG_AsVal_unsigned_SS_int(obj, &v)) {
    10681648    /*
    1069       this is needed to make valgrind/purify happier.  the other
    1070       solution is throw an exception, but since this code should work
    1071       with plain C ....
     1649      this is needed to make valgrind/purify happier.
    10721650     */
    10731651    memset((void*)&v, 0, sizeof(unsigned int));
     
    10771655
    10781656 
    1079 SWIGSTATICINLINE(int)
     1657SWIGINTERNINLINE int
    10801658SWIG_Check_unsigned_SS_int(PyObject* obj)
    10811659{
     
    10841662
    10851663
    1086 SWIGSTATICINLINE(PyObject* )
     1664  /*@/usr/share/swig1.3/python/pymacros.swg,72,SWIG_define@*/
     1665#define SWIG_From_long PyInt_FromLong
     1666/*@@*/
     1667
     1668
     1669SWIGINTERNINLINE PyObject*
    10871670  SWIG_From_unsigned_SS_long(unsigned long value)
    10881671{
    10891672  return (value > LONG_MAX) ?
    10901673    PyLong_FromUnsignedLong(value)
    1091     : PyInt_FromLong(swig_numeric_cast(value,long));
     1674    : PyInt_FromLong((long)(value));
    10921675}
    10931676
    10941677
    10951678#if UINT_MAX < LONG_MAX
    1096 /*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/
     1679/*@/usr/share/swig1.3/python/pymacros.swg,72,SWIG_define@*/
    10971680#define SWIG_From_unsigned_SS_int SWIG_From_long
    10981681/*@@*/
    10991682#else
    1100 /*@/usr/share/swig1.3/python/pymacros.swg,63,SWIG_define@*/
     1683/*@/usr/share/swig1.3/python/pymacros.swg,72,SWIG_define@*/
    11011684#define SWIG_From_unsigned_SS_int SWIG_From_unsigned_SS_long
    11021685/*@@*/
     
    11041687
    11051688
    1106 SWIGSTATICINLINE(int)
     1689SWIGINTERN int
    11071690  SWIG_AsVal_unsigned_SS_char(PyObject *obj, unsigned char *val)
    11081691{
    1109   const char* errmsg = val ? "unsigned char" : 0;
     1692  const char* errmsg = val ? "unsigned char" : (char*)0;
    11101693  unsigned long v;
    11111694  if (SWIG_AsVal_unsigned_SS_long(obj, &v)) {
    11121695    if (SWIG_CheckUnsignedLongInRange(v, UCHAR_MAX,errmsg)) {
    1113       if (val) *val = swig_numeric_cast(v, unsigned char);
     1696      if (val) *val = (unsigned char)(v);
    11141697      return 1;
    11151698    } else {
     
    11201703  }
    11211704  if (val) {
    1122     PyErr_SetString(PyExc_TypeError, "an unsigned char is expected");
     1705    SWIG_type_error(errmsg, obj);
    11231706  }
    11241707  return 0;
     
    11261709
    11271710
    1128 SWIGSTATICINLINE(unsigned char)
     1711SWIGINTERNINLINE unsigned char
    11291712SWIG_As_unsigned_SS_char(PyObject* obj)
    11301713{
     
    11321715  if (!SWIG_AsVal_unsigned_SS_char(obj, &v)) {
    11331716    /*
    1134       this is needed to make valgrind/purify happier.  the other
    1135       solution is throw an exception, but since this code should work
    1136       with plain C ....
     1717      this is needed to make valgrind/purify happier.
    11371718     */
    11381719    memset((void*)&v, 0, sizeof(unsigned char));
     
    11421723
    11431724 
    1144 SWIGSTATICINLINE(int)
     1725SWIGINTERNINLINE int
    11451726SWIG_Check_unsigned_SS_char(PyObject* obj)
    11461727{
     
    11491730
    11501731
    1151 SWIGSTATICINLINE(PyObject *)
     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
     1742SWIGINTERN PyObject *
    11521743SWIG_FromCharPtr(const char* cptr)
    11531744{
     
    11551746    size_t size = strlen(cptr);
    11561747    if (size > INT_MAX) {
    1157       return SWIG_NewPointerObj(swig_const_cast(cptr,char*),
     1748      return SWIG_NewPointerObj((char*)(cptr),
    11581749                                SWIG_TypeQuery("char *"), 0);
    11591750    } else {
     
    11921783
    11931784
    1194 SWIGSTATICINLINE(int)
     1785SWIGINTERN int
    11951786  SWIG_AsVal_unsigned_SS_short(PyObject *obj, unsigned short *val)
    11961787{
    1197   const char* errmsg = val ? "unsigned short" : 0;
     1788  const char* errmsg = val ? "unsigned short" : (char*)0;
    11981789  unsigned long v;
    11991790  if (SWIG_AsVal_unsigned_SS_long(obj, &v)) {
    12001791    if (SWIG_CheckUnsignedLongInRange(v, USHRT_MAX, errmsg)) {
    1201       if (val) *val = swig_numeric_cast(v, unsigned short);
     1792      if (val) *val = (unsigned short)(v);
    12021793      return 1;
    12031794    } else {
     
    12081799  }
    12091800  if (val) {
    1210     PyErr_SetString(PyExc_TypeError, "an unsigned short is expected");
     1801    SWIG_type_error(errmsg, obj);
    12111802  }
    12121803  return 0;
     
    12141805
    12151806
    1216 SWIGSTATICINLINE(unsigned short)
     1807SWIGINTERNINLINE unsigned short
    12171808SWIG_As_unsigned_SS_short(PyObject* obj)
    12181809{
     
    12201811  if (!SWIG_AsVal_unsigned_SS_short(obj, &v)) {
    12211812    /*
    1222       this is needed to make valgrind/purify happier.  the other
    1223       solution is throw an exception, but since this code should work
    1224       with plain C ....
     1813      this is needed to make valgrind/purify happier.
    12251814     */
    12261815    memset((void*)&v, 0, sizeof(unsigned short));
     
    12301819
    12311820 
    1232 SWIGSTATICINLINE(int)
     1821SWIGINTERNINLINE int
    12331822SWIG_Check_unsigned_SS_short(PyObject* obj)
    12341823{
     
    12801869
    12811870
    1282 struct libtrace_packet_t *new_libtrace_packet_t(){
    1283                 struct libtrace_packet_t *packet = malloc(sizeof(struct libtrace_packet_t));
     1871static struct libtrace_packet_t *new_libtrace_packet_t(){
     1872                struct libtrace_packet_t *packet = trace_create_packet();
    12841873                return packet;
    12851874                }
    1286 void delete_libtrace_packet_t(struct libtrace_packet_t *self){ free(self);}
    1287 struct libtrace_ip *libtrace_packet_t_trace_get_ip(struct libtrace_packet_t *self){
     1875static void delete_libtrace_packet_t(struct libtrace_packet_t *self){
     1876                trace_destroy_packet(self);
     1877                }
     1878static libtrace_packet_t *libtrace_packet_t_trace_copy_packet(struct libtrace_packet_t *self){
     1879                return trace_copy_packet(self);
     1880        }
     1881static void *libtrace_packet_t_trace_get_link(struct libtrace_packet_t *self){
     1882                return trace_get_link(self);
     1883        }
     1884static 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        }
     1887static struct libtrace_ip *libtrace_packet_t_trace_get_ip(struct libtrace_packet_t *self){
    12881888                return trace_get_ip(self);
    12891889        }
    1290 struct libtrace_tcp *libtrace_packet_t_trace_get_tcp(struct libtrace_packet_t *self){
     1890static struct libtrace_tcp *libtrace_packet_t_trace_get_tcp(struct libtrace_packet_t *self){
    12911891                return trace_get_tcp(self);
    12921892        }
    1293 struct libtrace_udp *libtrace_packet_t_trace_get_udp(struct libtrace_packet_t *self){
     1893static struct libtrace_udp *libtrace_packet_t_trace_get_udp(struct libtrace_packet_t *self){
    12941894                return trace_get_udp(self);
    12951895        }
    1296 struct libtrace_icmp *libtrace_packet_t_trace_get_icmp(struct libtrace_packet_t *self){
     1896static struct libtrace_icmp *libtrace_packet_t_trace_get_icmp(struct libtrace_packet_t *self){
    12971897                return trace_get_icmp(self);
    12981898        }
    1299 void *libtrace_packet_t_trace_get_link(struct libtrace_packet_t *self){
    1300                 return trace_get_link(self);
     1899static char *libtrace_packet_t_trace_get_destination_mac(struct libtrace_packet_t *self){
     1900                return trace_ether_ntoa(trace_get_destination_mac(self),0);
    13011901        }
    1302 double libtrace_packet_t_trace_get_seconds(struct libtrace_packet_t *self){
     1902static 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        }
     1905static char *libtrace_packet_t_trace_ether_ntoa(struct libtrace_packet_t *self,uint8_t *mac){
     1906                return trace_ether_ntoa(mac, 0);
     1907        }
     1908static uint16_t libtrace_packet_t_trace_get_source_port(struct libtrace_packet_t *self){
     1909                return trace_get_source_port(self);
     1910        }
     1911static uint16_t libtrace_packet_t_trace_get_destination_port(struct libtrace_packet_t *self){
     1912                return trace_get_destination_port(self);
     1913        }
     1914static double libtrace_packet_t_trace_get_seconds(struct libtrace_packet_t *self){
    13031915                return trace_get_seconds(self);
    13041916        }
    1305 uint64_t libtrace_packet_t_trace_get_erf_timestamp(struct libtrace_packet_t *self){
     1917
     1918  /*@/usr/share/swig1.3/python/pymacros.swg,72,SWIG_define@*/
     1919#define SWIG_From_double PyFloat_FromDouble
     1920/*@@*/
     1921
     1922static uint64_t libtrace_packet_t_trace_get_erf_timestamp(struct libtrace_packet_t *self){
    13061923                return trace_get_erf_timestamp(self);
    13071924        }
    1308 struct timeval libtrace_packet_t_trace_get_timeval(struct libtrace_packet_t *self){
     1925static struct timeval libtrace_packet_t_trace_get_timeval(struct libtrace_packet_t *self){
    13091926                return trace_get_timeval(self);
    13101927        }
    1311 int libtrace_packet_t_trace_get_capture_length(struct libtrace_packet_t *self){
     1928static int libtrace_packet_t_trace_get_capture_length(struct libtrace_packet_t *self){
    13121929                return trace_get_capture_length(self);
    13131930        }
    1314 int libtrace_packet_t_trace_get_wire_lenth(struct libtrace_packet_t *self){
     1931
     1932SWIGINTERNINLINE unsigned long
     1933SWIG_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 
     1946SWIGINTERNINLINE int
     1947SWIG_Check_unsigned_SS_long(PyObject* obj)
     1948{
     1949  return SWIG_AsVal_unsigned_SS_long(obj, (unsigned long*)0);
     1950}
     1951
     1952static 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        }
     1955static int libtrace_packet_t_trace_get_wire_lenth(struct libtrace_packet_t *self){
    13151956                return trace_get_wire_length(self);
    13161957        }
    1317 libtrace_linktype_t libtrace_packet_t_trace_get_link_type(struct libtrace_packet_t *self){
     1958static int libtrace_packet_t_trace_get_framing_length(struct libtrace_packet_t *self){
     1959                return trace_get_framing_length(self);
     1960        }
     1961static libtrace_linktype_t libtrace_packet_t_trace_get_link_type(struct libtrace_packet_t *self){
    13181962                return trace_get_link_type(self);
    13191963        }
    1320 int8_t libtrace_packet_t_trace_get_direction(struct libtrace_packet_t *self){
     1964static int8_t libtrace_packet_t_trace_get_direction(struct libtrace_packet_t *self){
    13211965                return trace_get_direction(self);
    13221966        }
    1323 int8_t libtrace_packet_t_trace_set_direction(struct libtrace_packet_t *self,int8_t direction){
     1967static int8_t libtrace_packet_t_trace_set_direction(struct libtrace_packet_t *self,int8_t direction){
    13241968                return trace_set_direction(self,direction);
    13251969        }
    1326 int libtrace_packet_t_trace_bpf_filter(struct libtrace_packet_t *self,struct libtrace_filter_t *filter){
    1327                 return trace_bpf_filter(filter,self);
     1970static int libtrace_packet_t_trace_apply_filter(struct libtrace_packet_t *self,struct libtrace_filter_t *filter){
     1971                return trace_apply_filter(filter,self);
    13281972        }
    1329 uint8_t libtrace_packet_t_trace_get_server_port(struct libtrace_packet_t *self,uint8_t protocol,uint16_t source,uint16_t dest){
     1973static uint8_t libtrace_packet_t_trace_get_server_port(struct libtrace_packet_t *self,uint8_t protocol,uint16_t source,uint16_t dest){
    13301974                return trace_get_server_port(protocol,source,dest);
    13311975        }
    13321976
    13331977/* returns SWIG_OLDOBJ if the input is a raw char*, SWIG_PYSTR if is a PyString */
    1334 SWIGSTATIC(int)
     1978SWIGINTERN int
    13351979SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize)
    13361980{
     
    13431987    return SWIG_OLDOBJ;
    13441988  } else {
     1989    PyErr_Clear();
    13451990    if (PyString_Check(obj)) {
    13461991      if (cptr) {
     
    13541999  }
    13552000  if (cptr) {
    1356     PyErr_SetString(PyExc_TypeError, "a string is expected");
     2001    SWIG_type_error("char *", obj);
    13572002  }
    13582003  return 0;
     
    13602005
    13612006
    1362 SWIGSTATICINLINE(int)
     2007SWIGINTERNINLINE int
    13632008SWIG_AsCharPtr(PyObject *obj, char **val)
    13642009{
    1365   char* cptr = 0;
    1366   if (SWIG_AsCharPtrAndSize(obj, &cptr, (size_t*)(0))) {
    1367     if (val) *val = cptr;
     2010  if (SWIG_AsCharPtrAndSize(obj, val, (size_t*)(0))) {
    13682011    return 1;
    13692012  }
    13702013  if (val) {
    1371     PyErr_SetString(PyExc_TypeError, "a char* is expected");
     2014    PyErr_Clear();
     2015    SWIG_type_error("char *", obj);
    13722016  }
    13732017  return 0;
    13742018}
    13752019
    1376 struct libtrace_filter_t *new_libtrace_filter_t(char *filterstring){
    1377                 return trace_bpf_setfilter(filterstring);
     2020static struct libtrace_filter_t *new_libtrace_filter_t(char *filterstring){
     2021                return trace_create_filter(filterstring);
    13782022        }
    1379 int libtrace_filter_t_trace_bpf_filter(struct libtrace_filter_t *self,struct libtrace_packet_t *packet){
    1380                 return trace_bpf_filter(self,packet);
     2023static void delete_libtrace_filter_t(struct libtrace_filter_t *self){
     2024                trace_destroy_filter(self);
    13812025        }
    1382 struct libtrace_t *new_libtrace_t(char *uri){ return trace_create(uri); }
    1383 void delete_libtrace_t(struct libtrace_t *self){ trace_destroy(self); }
    1384 int libtrace_t_trace_read_packet(struct libtrace_t *self,struct libtrace_packet_t *packet){
     2026static 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        }
     2029static struct libtrace_t *new_libtrace_t(char *uri){ return trace_create(uri); }
     2030static void delete_libtrace_t(struct libtrace_t *self){ trace_destroy(self); }
     2031static int libtrace_t_trace_read_packet(struct libtrace_t *self,struct libtrace_packet_t *packet){
    13852032                return trace_read_packet(self,packet);
     2033        }
     2034static int libtrace_t_trace_start(struct libtrace_t *self){
     2035                return trace_start(self);
     2036        }
     2037static int libtrace_t_trace_pause(struct libtrace_t *self){
     2038                return trace_pause(self);
     2039        }
     2040static void libtrace_t_trace_help(struct libtrace_t *self){
     2041                trace_help();
     2042        }
     2043static int libtrace_t_trace_config(struct libtrace_t *self,trace_option_t option,void *value){
     2044                return trace_config(self, option, value);
     2045        }
     2046static libtrace_err_t libtrace_t_trace_get_err(struct libtrace_t *self){
     2047                return trace_get_err(self);
     2048        }
     2049static bool libtrace_t_trace_is_err(struct libtrace_t *self){
     2050                return trace_is_err(self);
     2051        }
     2052
     2053SWIGINTERNINLINE 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
     2061static struct libtrace_out_t *new_libtrace_out_t(char *uri){ return trace_create_output(uri); }
     2062static void delete_libtrace_out_t(struct libtrace_out_t *self){ trace_destroy_output(self); }
     2063static int libtrace_out_t_trace_start_output(struct libtrace_out_t *self){
     2064                return trace_start_output(self);
     2065        }
     2066static 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        }
     2069static libtrace_err_t libtrace_out_t_trace_get_err_output(struct libtrace_out_t *self){
     2070                return trace_get_err_output(self);
     2071        }
     2072static bool libtrace_out_t_trace_is_err_output(struct libtrace_out_t *self){
     2073                return trace_is_err_output(self);
     2074        }
     2075static int libtrace_out_t_trace_write_packet(struct libtrace_out_t *self,libtrace_packet_t *packet){
     2076                return trace_write_packet(self, packet);
    13862077        }
    13872078#ifdef __cplusplus
     
    13892080#endif
    13902081static PyObject *_wrap_in_addr_s_addr_set(PyObject *self, PyObject *args) {
    1391     PyObject *resultobj;
     2082    PyObject *resultobj = NULL;
    13922083    struct in_addr *arg1 = (struct in_addr *) 0 ;
    13932084    int arg2 ;
     
    13962087   
    13972088    if(!PyArg_ParseTuple(args,(char *)"OO:in_addr_s_addr_set",&obj0,&obj1)) goto fail;
    1398     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_in_addr,
    1399     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    1400     arg2 = (int)SWIG_As_int(obj1);
    1401     if (PyErr_Occurred()) SWIG_fail;
     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    }
    14022095    if (arg1) (arg1)->s_addr = arg2;
    14032096   
     
    14102103
    14112104static PyObject *_wrap_in_addr_s_addr_get(PyObject *self, PyObject *args) {
    1412     PyObject *resultobj;
     2105    PyObject *resultobj = NULL;
    14132106    struct in_addr *arg1 = (struct in_addr *) 0 ;
    14142107    int result;
     
    14162109   
    14172110    if(!PyArg_ParseTuple(args,(char *)"O:in_addr_s_addr_get",&obj0)) goto fail;
    1418     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_in_addr,
    1419     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2111    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_in_addr, SWIG_POINTER_EXCEPTION | 0);
     2112    if (SWIG_arg_fail(1)) SWIG_fail;
    14202113    result = (int) ((arg1)->s_addr);
    14212114   
    1422     resultobj = SWIG_From_int((int)result);
     2115    {
     2116        resultobj = SWIG_From_int((int)(result));
     2117    }
    14232118    return resultobj;
    14242119    fail:
     
    14352130}
    14362131static PyObject *_wrap_libtrace_ip_ip_hl_set(PyObject *self, PyObject *args) {
    1437     PyObject *resultobj;
     2132    PyObject *resultobj = NULL;
    14382133    struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ;
    14392134    unsigned int arg2 ;
     
    14422137   
    14432138    if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_ip_ip_hl_set",&obj0,&obj1)) goto fail;
    1444     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip,
    1445     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    1446     arg2 = (unsigned int)SWIG_As_unsigned_SS_int(obj1);
    1447     if (PyErr_Occurred()) SWIG_fail;
     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    }
    14482145    if (arg1) (arg1)->ip_hl = arg2;
    14492146   
     
    14562153
    14572154static PyObject *_wrap_libtrace_ip_ip_hl_get(PyObject *self, PyObject *args) {
    1458     PyObject *resultobj;
     2155    PyObject *resultobj = NULL;
    14592156    struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ;
    14602157    unsigned int result;
     
    14622159   
    14632160    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_hl_get",&obj0)) goto fail;
    1464     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip,
    1465     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2161    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0);
     2162    if (SWIG_arg_fail(1)) SWIG_fail;
    14662163    result = (unsigned int) ((arg1)->ip_hl);
    14672164   
    1468     resultobj = SWIG_From_unsigned_SS_int((unsigned int)result);
     2165    {
     2166        resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
     2167    }
    14692168    return resultobj;
    14702169    fail:
     
    14742173
    14752174static PyObject *_wrap_libtrace_ip_ip_v_set(PyObject *self, PyObject *args) {
    1476     PyObject *resultobj;
     2175    PyObject *resultobj = NULL;
    14772176    struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ;
    14782177    unsigned int arg2 ;
     
    14812180   
    14822181    if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_ip_ip_v_set",&obj0,&obj1)) goto fail;
    1483     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip,
    1484     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    1485     arg2 = (unsigned int)SWIG_As_unsigned_SS_int(obj1);
    1486     if (PyErr_Occurred()) SWIG_fail;
     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    }
    14872188    if (arg1) (arg1)->ip_v = arg2;
    14882189   
     
    14952196
    14962197static PyObject *_wrap_libtrace_ip_ip_v_get(PyObject *self, PyObject *args) {
    1497     PyObject *resultobj;
     2198    PyObject *resultobj = NULL;
    14982199    struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ;
    14992200    unsigned int result;
     
    15012202   
    15022203    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_v_get",&obj0)) goto fail;
    1503     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip,
    1504     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2204    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0);
     2205    if (SWIG_arg_fail(1)) SWIG_fail;
    15052206    result = (unsigned int) ((arg1)->ip_v);
    15062207   
    1507     resultobj = SWIG_From_unsigned_SS_int((unsigned int)result);
     2208    {
     2209        resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
     2210    }
    15082211    return resultobj;
    15092212    fail:
     
    15132216
    15142217static PyObject *_wrap_libtrace_ip_ip_tos_set(PyObject *self, PyObject *args) {
    1515     PyObject *resultobj;
     2218    PyObject *resultobj = NULL;
    15162219    struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ;
    15172220    uint8_t arg2 ;
     
    15202223   
    15212224    if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_ip_ip_tos_set",&obj0,&obj1)) goto fail;
    1522     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip,
    1523     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    1524     arg2 = (uint8_t)SWIG_As_unsigned_SS_char(obj1);
    1525     if (PyErr_Occurred()) SWIG_fail;
     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    }
    15262231    if (arg1) (arg1)->ip_tos = arg2;
    15272232   
     
    15342239
    15352240static PyObject *_wrap_libtrace_ip_ip_tos_get(PyObject *self, PyObject *args) {
    1536     PyObject *resultobj;
     2241    PyObject *resultobj = NULL;
    15372242    struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ;
    15382243    uint8_t result;
     
    15402245   
    15412246    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_tos_get",&obj0)) goto fail;
    1542     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip,
    1543     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2247    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0);
     2248    if (SWIG_arg_fail(1)) SWIG_fail;
    15442249    result = (uint8_t) ((arg1)->ip_tos);
    15452250   
    1546     resultobj = SWIG_From_unsigned_SS_char((unsigned char)result);
     2251    {
     2252        resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
     2253    }
    15472254    return resultobj;
    15482255    fail:
     
    15522259
    15532260static PyObject *_wrap_libtrace_ip_ip_ttl_set(PyObject *self, PyObject *args) {
    1554     PyObject *resultobj;
     2261    PyObject *resultobj = NULL;
    15552262    struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ;
    15562263    uint8_t arg2 ;
     
    15592266   
    15602267    if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_ip_ip_ttl_set",&obj0,&obj1)) goto fail;
    1561     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip,
    1562     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    1563     arg2 = (uint8_t)SWIG_As_unsigned_SS_char(obj1);
    1564     if (PyErr_Occurred()) SWIG_fail;
     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    }
    15652274    if (arg1) (arg1)->ip_ttl = arg2;
    15662275   
     
    15732282
    15742283static PyObject *_wrap_libtrace_ip_ip_ttl_get(PyObject *self, PyObject *args) {
    1575     PyObject *resultobj;
     2284    PyObject *resultobj = NULL;
    15762285    struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ;
    15772286    uint8_t result;
     
    15792288   
    15802289    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_ttl_get",&obj0)) goto fail;
    1581     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip,
    1582     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2290    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0);
     2291    if (SWIG_arg_fail(1)) SWIG_fail;
    15832292    result = (uint8_t) ((arg1)->ip_ttl);
    15842293   
    1585     resultobj = SWIG_From_unsigned_SS_char((unsigned char)result);
     2294    {
     2295        resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
     2296    }
    15862297    return resultobj;
    15872298    fail:
     
    15912302
    15922303static PyObject *_wrap_libtrace_ip_ip_p_set(PyObject *self, PyObject *args) {
    1593     PyObject *resultobj;
     2304    PyObject *resultobj = NULL;
    15942305    struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ;
    15952306    uint8_t arg2 ;
     
    15982309   
    15992310    if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_ip_ip_p_set",&obj0,&obj1)) goto fail;
    1600     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip,
    1601     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    1602     arg2 = (uint8_t)SWIG_As_unsigned_SS_char(obj1);
    1603     if (PyErr_Occurred()) SWIG_fail;
     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    }
    16042317    if (arg1) (arg1)->ip_p = arg2;
    16052318   
     
    16122325
    16132326static PyObject *_wrap_libtrace_ip_ip_p_get(PyObject *self, PyObject *args) {
    1614     PyObject *resultobj;
     2327    PyObject *resultobj = NULL;
    16152328    struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ;
    16162329    uint8_t result;
     
    16182331   
    16192332    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_p_get",&obj0)) goto fail;
    1620     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip,
    1621     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2333    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0);
     2334    if (SWIG_arg_fail(1)) SWIG_fail;
    16222335    result = (uint8_t) ((arg1)->ip_p);
    16232336   
    1624     resultobj = SWIG_From_unsigned_SS_char((unsigned char)result);
     2337    {
     2338        resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
     2339    }
    16252340    return resultobj;
    16262341    fail:
     
    16302345
    16312346static PyObject *_wrap_libtrace_ip_ip_sum_get(PyObject *self, PyObject *args) {
    1632     PyObject *resultobj;
     2347    PyObject *resultobj = NULL;
    16332348    struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ;
    16342349    uint16_t result;
     
    16362351   
    16372352    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_sum_get",&obj0)) goto fail;
    1638     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip,
    1639     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2353    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0);
     2354    if (SWIG_arg_fail(1)) SWIG_fail;
    16402355    result = (uint16_t)libtrace_ip_ip_sum_get(arg1);
    16412356   
    1642     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     2357    {
     2358        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     2359    }
    16432360    return resultobj;
    16442361    fail:
     
    16482365
    16492366static PyObject *_wrap_libtrace_ip_ip_len_get(PyObject *self, PyObject *args) {
    1650     PyObject *resultobj;
     2367    PyObject *resultobj = NULL;
    16512368    struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ;
    16522369    uint16_t result;
     
    16542371   
    16552372    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_len_get",&obj0)) goto fail;
    1656     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip,
    1657     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2373    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0);
     2374    if (SWIG_arg_fail(1)) SWIG_fail;
    16582375    result = (uint16_t)libtrace_ip_ip_len_get(arg1);
    16592376   
    1660     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     2377    {
     2378        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     2379    }
    16612380    return resultobj;
    16622381    fail:
     
    16662385
    16672386static PyObject *_wrap_libtrace_ip_ip_id_get(PyObject *self, PyObject *args) {
    1668     PyObject *resultobj;
     2387    PyObject *resultobj = NULL;
    16692388    struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ;
    16702389    uint16_t result;
     
    16722391   
    16732392    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_id_get",&obj0)) goto fail;
    1674     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip,
    1675     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2393    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0);
     2394    if (SWIG_arg_fail(1)) SWIG_fail;
    16762395    result = (uint16_t)libtrace_ip_ip_id_get(arg1);
    16772396   
    1678     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     2397    {
     2398        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     2399    }
    16792400    return resultobj;
    16802401    fail:
     
    16842405
    16852406static PyObject *_wrap_libtrace_ip_ip_off_get(PyObject *self, PyObject *args) {
    1686     PyObject *resultobj;
     2407    PyObject *resultobj = NULL;
    16872408    struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ;
    16882409    uint16_t result;
     
    16902411   
    16912412    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_off_get",&obj0)) goto fail;
    1692     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip,
    1693     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2413    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0);
     2414    if (SWIG_arg_fail(1)) SWIG_fail;
    16942415    result = (uint16_t)libtrace_ip_ip_off_get(arg1);
    16952416   
    1696     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     2417    {
     2418        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     2419    }
    16972420    return resultobj;
    16982421    fail:
     
    17022425
    17032426static PyObject *_wrap_libtrace_ip_ip_src_get(PyObject *self, PyObject *args) {
    1704     PyObject *resultobj;
     2427    PyObject *resultobj = NULL;
    17052428    struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ;
    17062429    char *result;
     
    17082431   
    17092432    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_src_get",&obj0)) goto fail;
    1710     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip,
    1711     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2433    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0);
     2434    if (SWIG_arg_fail(1)) SWIG_fail;
    17122435    result = (char *)libtrace_ip_ip_src_get(arg1);
    17132436   
     
    17212444
    17222445static PyObject *_wrap_libtrace_ip_ip_dst_get(PyObject *self, PyObject *args) {
    1723     PyObject *resultobj;
     2446    PyObject *resultobj = NULL;
    17242447    struct libtrace_ip *arg1 = (struct libtrace_ip *) 0 ;
    17252448    char *result;
     
    17272450   
    17282451    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_ip_ip_dst_get",&obj0)) goto fail;
    1729     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_ip,
    1730     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2452    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_ip, SWIG_POINTER_EXCEPTION | 0);
     2453    if (SWIG_arg_fail(1)) SWIG_fail;
    17312454    result = (char *)libtrace_ip_ip_dst_get(arg1);
    17322455   
     
    17472470}
    17482471static PyObject *_wrap_libtrace_tcp_res1_set(PyObject *self, PyObject *args) {
    1749     PyObject *resultobj;
     2472    PyObject *resultobj = NULL;
    17502473    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    17512474    uint16_t arg2 ;
     
    17542477   
    17552478    if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_res1_set",&obj0,&obj1)) goto fail;
    1756     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    1757     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    1758     arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1);
    1759     if (PyErr_Occurred()) SWIG_fail;
     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    }
    17602485    if (arg1) (arg1)->res1 = arg2;
    17612486   
     
    17682493
    17692494static PyObject *_wrap_libtrace_tcp_res1_get(PyObject *self, PyObject *args) {
    1770     PyObject *resultobj;
     2495    PyObject *resultobj = NULL;
    17712496    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    17722497    uint16_t result;
     
    17742499   
    17752500    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_res1_get",&obj0)) goto fail;
    1776     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    1777     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2501    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0);
     2502    if (SWIG_arg_fail(1)) SWIG_fail;
    17782503    result = (uint16_t) ((arg1)->res1);
    17792504   
    1780     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     2505    {
     2506        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     2507    }
    17812508    return resultobj;
    17822509    fail:
     
    17862513
    17872514static PyObject *_wrap_libtrace_tcp_doff_set(PyObject *self, PyObject *args) {
    1788     PyObject *resultobj;
     2515    PyObject *resultobj = NULL;
    17892516    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    17902517    uint16_t arg2 ;
     
    17932520   
    17942521    if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_doff_set",&obj0,&obj1)) goto fail;
    1795     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    1796     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    1797     arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1);
    1798     if (PyErr_Occurred()) SWIG_fail;
     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    }
    17992528    if (arg1) (arg1)->doff = arg2;
    18002529   
     
    18072536
    18082537static PyObject *_wrap_libtrace_tcp_doff_get(PyObject *self, PyObject *args) {
    1809     PyObject *resultobj;
     2538    PyObject *resultobj = NULL;
    18102539    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    18112540    uint16_t result;
     
    18132542   
    18142543    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_doff_get",&obj0)) goto fail;
    1815     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    1816     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2544    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0);
     2545    if (SWIG_arg_fail(1)) SWIG_fail;
    18172546    result = (uint16_t) ((arg1)->doff);
    18182547   
    1819     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     2548    {
     2549        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     2550    }
    18202551    return resultobj;
    18212552    fail:
     
    18252556
    18262557static PyObject *_wrap_libtrace_tcp_fin_set(PyObject *self, PyObject *args) {
    1827     PyObject *resultobj;
     2558    PyObject *resultobj = NULL;
    18282559    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    18292560    uint16_t arg2 ;
     
    18322563   
    18332564    if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_fin_set",&obj0,&obj1)) goto fail;
    1834     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    1835     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    1836     arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1);
    1837     if (PyErr_Occurred()) SWIG_fail;
     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    }
    18382571    if (arg1) (arg1)->fin = arg2;
    18392572   
     
    18462579
    18472580static PyObject *_wrap_libtrace_tcp_fin_get(PyObject *self, PyObject *args) {
    1848     PyObject *resultobj;
     2581    PyObject *resultobj = NULL;
    18492582    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    18502583    uint16_t result;
     
    18522585   
    18532586    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_fin_get",&obj0)) goto fail;
    1854     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    1855     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2587    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0);
     2588    if (SWIG_arg_fail(1)) SWIG_fail;
    18562589    result = (uint16_t) ((arg1)->fin);
    18572590   
    1858     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     2591    {
     2592        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     2593    }
    18592594    return resultobj;
    18602595    fail:
     
    18642599
    18652600static PyObject *_wrap_libtrace_tcp_syn_set(PyObject *self, PyObject *args) {
    1866     PyObject *resultobj;
     2601    PyObject *resultobj = NULL;
    18672602    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    18682603    uint16_t arg2 ;
     
    18712606   
    18722607    if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_syn_set",&obj0,&obj1)) goto fail;
    1873     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    1874     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    1875     arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1);
    1876     if (PyErr_Occurred()) SWIG_fail;
     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    }
    18772614    if (arg1) (arg1)->syn = arg2;
    18782615   
     
    18852622
    18862623static PyObject *_wrap_libtrace_tcp_syn_get(PyObject *self, PyObject *args) {
    1887     PyObject *resultobj;
     2624    PyObject *resultobj = NULL;
    18882625    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    18892626    uint16_t result;
     
    18912628   
    18922629    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_syn_get",&obj0)) goto fail;
    1893     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    1894     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2630    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0);
     2631    if (SWIG_arg_fail(1)) SWIG_fail;
    18952632    result = (uint16_t) ((arg1)->syn);
    18962633   
    1897     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     2634    {
     2635        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     2636    }
    18982637    return resultobj;
    18992638    fail:
     
    19032642
    19042643static PyObject *_wrap_libtrace_tcp_rst_set(PyObject *self, PyObject *args) {
    1905     PyObject *resultobj;
     2644    PyObject *resultobj = NULL;
    19062645    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    19072646    uint16_t arg2 ;
     
    19102649   
    19112650    if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_rst_set",&obj0,&obj1)) goto fail;
    1912     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    1913     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    1914     arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1);
    1915     if (PyErr_Occurred()) SWIG_fail;
     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    }
    19162657    if (arg1) (arg1)->rst = arg2;
    19172658   
     
    19242665
    19252666static PyObject *_wrap_libtrace_tcp_rst_get(PyObject *self, PyObject *args) {
    1926     PyObject *resultobj;
     2667    PyObject *resultobj = NULL;
    19272668    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    19282669    uint16_t result;
     
    19302671   
    19312672    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_rst_get",&obj0)) goto fail;
    1932     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    1933     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2673    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0);
     2674    if (SWIG_arg_fail(1)) SWIG_fail;
    19342675    result = (uint16_t) ((arg1)->rst);
    19352676   
    1936     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     2677    {
     2678        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     2679    }
    19372680    return resultobj;
    19382681    fail:
     
    19422685
    19432686static PyObject *_wrap_libtrace_tcp_psh_set(PyObject *self, PyObject *args) {
    1944     PyObject *resultobj;
     2687    PyObject *resultobj = NULL;
    19452688    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    19462689    uint16_t arg2 ;
     
    19492692   
    19502693    if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_psh_set",&obj0,&obj1)) goto fail;
    1951     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    1952     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    1953     arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1);
    1954     if (PyErr_Occurred()) SWIG_fail;
     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    }
    19552700    if (arg1) (arg1)->psh = arg2;
    19562701   
     
    19632708
    19642709static PyObject *_wrap_libtrace_tcp_psh_get(PyObject *self, PyObject *args) {
    1965     PyObject *resultobj;
     2710    PyObject *resultobj = NULL;
    19662711    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    19672712    uint16_t result;
     
    19692714   
    19702715    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_psh_get",&obj0)) goto fail;
    1971     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    1972     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2716    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0);
     2717    if (SWIG_arg_fail(1)) SWIG_fail;
    19732718    result = (uint16_t) ((arg1)->psh);
    19742719   
    1975     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     2720    {
     2721        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     2722    }
    19762723    return resultobj;
    19772724    fail:
     
    19812728
    19822729static PyObject *_wrap_libtrace_tcp_ack_set(PyObject *self, PyObject *args) {
    1983     PyObject *resultobj;
     2730    PyObject *resultobj = NULL;
    19842731    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    19852732    uint16_t arg2 ;
     
    19882735   
    19892736    if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_ack_set",&obj0,&obj1)) goto fail;
    1990     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    1991     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    1992     arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1);
    1993     if (PyErr_Occurred()) SWIG_fail;
     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    }
    19942743    if (arg1) (arg1)->ack = arg2;
    19952744   
     
    20022751
    20032752static PyObject *_wrap_libtrace_tcp_ack_get(PyObject *self, PyObject *args) {
    2004     PyObject *resultobj;
     2753    PyObject *resultobj = NULL;
    20052754    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    20062755    uint16_t result;
     
    20082757   
    20092758    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_ack_get",&obj0)) goto fail;
    2010     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    2011     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2759    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0);
     2760    if (SWIG_arg_fail(1)) SWIG_fail;
    20122761    result = (uint16_t) ((arg1)->ack);
    20132762   
    2014     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     2763    {
     2764        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     2765    }
    20152766    return resultobj;
    20162767    fail:
     
    20202771
    20212772static PyObject *_wrap_libtrace_tcp_urg_set(PyObject *self, PyObject *args) {
    2022     PyObject *resultobj;
     2773    PyObject *resultobj = NULL;
    20232774    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    20242775    uint16_t arg2 ;
     
    20272778   
    20282779    if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_urg_set",&obj0,&obj1)) goto fail;
    2029     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    2030     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    2031     arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1);
    2032     if (PyErr_Occurred()) SWIG_fail;
     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    }
    20332786    if (arg1) (arg1)->urg = arg2;
    20342787   
     
    20412794
    20422795static PyObject *_wrap_libtrace_tcp_urg_get(PyObject *self, PyObject *args) {
    2043     PyObject *resultobj;
     2796    PyObject *resultobj = NULL;
    20442797    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    20452798    uint16_t result;
     
    20472800   
    20482801    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_urg_get",&obj0)) goto fail;
    2049     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    2050     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2802    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0);
     2803    if (SWIG_arg_fail(1)) SWIG_fail;
    20512804    result = (uint16_t) ((arg1)->urg);
    20522805   
    2053     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     2806    {
     2807        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     2808    }
    20542809    return resultobj;
    20552810    fail:
     
    20592814
    20602815static PyObject *_wrap_libtrace_tcp_res2_set(PyObject *self, PyObject *args) {
    2061     PyObject *resultobj;
     2816    PyObject *resultobj = NULL;
    20622817    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    20632818    uint16_t arg2 ;
     
    20662821   
    20672822    if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_tcp_res2_set",&obj0,&obj1)) goto fail;
    2068     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    2069     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    2070     arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1);
    2071     if (PyErr_Occurred()) SWIG_fail;
     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    }
    20722829    if (arg1) (arg1)->res2 = arg2;
    20732830   
     
    20802837
    20812838static PyObject *_wrap_libtrace_tcp_res2_get(PyObject *self, PyObject *args) {
    2082     PyObject *resultobj;
     2839    PyObject *resultobj = NULL;
    20832840    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    20842841    uint16_t result;
     
    20862843   
    20872844    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_res2_get",&obj0)) goto fail;
    2088     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    2089     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2845    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0);
     2846    if (SWIG_arg_fail(1)) SWIG_fail;
    20902847    result = (uint16_t) ((arg1)->res2);
    20912848   
    2092     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     2849    {
     2850        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     2851    }
    20932852    return resultobj;
    20942853    fail:
     
    20982857
    20992858static PyObject *_wrap_libtrace_tcp_source_get(PyObject *self, PyObject *args) {
    2100     PyObject *resultobj;
     2859    PyObject *resultobj = NULL;
    21012860    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    21022861    uint16_t result;
     
    21042863   
    21052864    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_source_get",&obj0)) goto fail;
    2106     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    2107     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2865    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0);
     2866    if (SWIG_arg_fail(1)) SWIG_fail;
    21082867    result = (uint16_t)libtrace_tcp_source_get(arg1);
    21092868   
    2110     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     2869    {
     2870        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     2871    }
    21112872    return resultobj;
    21122873    fail:
     
    21162877
    21172878static PyObject *_wrap_libtrace_tcp_dest_get(PyObject *self, PyObject *args) {
    2118     PyObject *resultobj;
     2879    PyObject *resultobj = NULL;
    21192880    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    21202881    uint16_t result;
     
    21222883   
    21232884    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_dest_get",&obj0)) goto fail;
    2124     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    2125     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2885    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0);
     2886    if (SWIG_arg_fail(1)) SWIG_fail;
    21262887    result = (uint16_t)libtrace_tcp_dest_get(arg1);
    21272888   
    2128     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     2889    {
     2890        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     2891    }
    21292892    return resultobj;
    21302893    fail:
     
    21342897
    21352898static PyObject *_wrap_libtrace_tcp_window_get(PyObject *self, PyObject *args) {
    2136     PyObject *resultobj;
     2899    PyObject *resultobj = NULL;
    21372900    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    21382901    uint16_t result;
     
    21402903   
    21412904    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_window_get",&obj0)) goto fail;
    2142     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    2143     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2905    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0);
     2906    if (SWIG_arg_fail(1)) SWIG_fail;
    21442907    result = (uint16_t)libtrace_tcp_window_get(arg1);
    21452908   
    2146     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     2909    {
     2910        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     2911    }
    21472912    return resultobj;
    21482913    fail:
     
    21522917
    21532918static PyObject *_wrap_libtrace_tcp_check_get(PyObject *self, PyObject *args) {
    2154     PyObject *resultobj;
     2919    PyObject *resultobj = NULL;
    21552920    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    21562921    uint16_t result;
     
    21582923   
    21592924    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_check_get",&obj0)) goto fail;
    2160     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    2161     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2925    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0);
     2926    if (SWIG_arg_fail(1)) SWIG_fail;
    21622927    result = (uint16_t)libtrace_tcp_check_get(arg1);
    21632928   
    2164     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     2929    {
     2930        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     2931    }
    21652932    return resultobj;
    21662933    fail:
     
    21702937
    21712938static PyObject *_wrap_libtrace_tcp_urg_ptr_get(PyObject *self, PyObject *args) {
    2172     PyObject *resultobj;
     2939    PyObject *resultobj = NULL;
    21732940    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    21742941    uint16_t result;
     
    21762943   
    21772944    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_urg_ptr_get",&obj0)) goto fail;
    2178     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    2179     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2945    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0);
     2946    if (SWIG_arg_fail(1)) SWIG_fail;
    21802947    result = (uint16_t)libtrace_tcp_urg_ptr_get(arg1);
    21812948   
    2182     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     2949    {
     2950        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     2951    }
    21832952    return resultobj;
    21842953    fail:
     
    21882957
    21892958static PyObject *_wrap_libtrace_tcp_seq_get(PyObject *self, PyObject *args) {
    2190     PyObject *resultobj;
     2959    PyObject *resultobj = NULL;
    21912960    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    21922961    uint32_t result;
     
    21942963   
    21952964    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_seq_get",&obj0)) goto fail;
    2196     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    2197     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2965    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0);
     2966    if (SWIG_arg_fail(1)) SWIG_fail;
    21982967    result = (uint32_t)libtrace_tcp_seq_get(arg1);
    21992968   
    2200     resultobj = SWIG_From_unsigned_SS_int((unsigned int)result);
     2969    {
     2970        resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
     2971    }
    22012972    return resultobj;
    22022973    fail:
     
    22062977
    22072978static PyObject *_wrap_libtrace_tcp_ack_seq_get(PyObject *self, PyObject *args) {
    2208     PyObject *resultobj;
     2979    PyObject *resultobj = NULL;
    22092980    struct libtrace_tcp *arg1 = (struct libtrace_tcp *) 0 ;
    22102981    uint32_t result;
     
    22122983   
    22132984    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_tcp_ack_seq_get",&obj0)) goto fail;
    2214     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_tcp,
    2215     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     2985    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_tcp, SWIG_POINTER_EXCEPTION | 0);
     2986    if (SWIG_arg_fail(1)) SWIG_fail;
    22162987    result = (uint32_t)libtrace_tcp_ack_seq_get(arg1);
    22172988   
    2218     resultobj = SWIG_From_unsigned_SS_int((unsigned int)result);
     2989    {
     2990        resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
     2991    }
    22192992    return resultobj;
    22202993    fail:
     
    22313004}
    22323005static PyObject *_wrap_libtrace_udp_source_get(PyObject *self, PyObject *args) {
    2233     PyObject *resultobj;
     3006    PyObject *resultobj = NULL;
    22343007    struct libtrace_udp *arg1 = (struct libtrace_udp *) 0 ;
    22353008    uint16_t result;
     
    22373010   
    22383011    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_udp_source_get",&obj0)) goto fail;
    2239     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_udp,
    2240     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     3012    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_udp, SWIG_POINTER_EXCEPTION | 0);
     3013    if (SWIG_arg_fail(1)) SWIG_fail;
    22413014    result = (uint16_t)libtrace_udp_source_get(arg1);
    22423015   
    2243     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     3016    {
     3017        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     3018    }
    22443019    return resultobj;
    22453020    fail:
     
    22493024
    22503025static PyObject *_wrap_libtrace_udp_dest_get(PyObject *self, PyObject *args) {
    2251     PyObject *resultobj;
     3026    PyObject *resultobj = NULL;
    22523027    struct libtrace_udp *arg1 = (struct libtrace_udp *) 0 ;
    22533028    uint16_t result;
     
    22553030   
    22563031    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_udp_dest_get",&obj0)) goto fail;
    2257     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_udp,
    2258     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     3032    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_udp, SWIG_POINTER_EXCEPTION | 0);
     3033    if (SWIG_arg_fail(1)) SWIG_fail;
    22593034    result = (uint16_t)libtrace_udp_dest_get(arg1);
    22603035   
    2261     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     3036    {
     3037        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     3038    }
    22623039    return resultobj;
    22633040    fail:
     
    22673044
    22683045static PyObject *_wrap_libtrace_udp_len_get(PyObject *self, PyObject *args) {
    2269     PyObject *resultobj;
     3046    PyObject *resultobj = NULL;
    22703047    struct libtrace_udp *arg1 = (struct libtrace_udp *) 0 ;
    22713048    uint16_t result;
     
    22733050   
    22743051    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_udp_len_get",&obj0)) goto fail;
    2275     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_udp,
    2276     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     3052    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_udp, SWIG_POINTER_EXCEPTION | 0);
     3053    if (SWIG_arg_fail(1)) SWIG_fail;
    22773054    result = (uint16_t)libtrace_udp_len_get(arg1);
    22783055   
    2279     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     3056    {
     3057        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     3058    }
    22803059    return resultobj;
    22813060    fail:
     
    22853064
    22863065static PyObject *_wrap_libtrace_udp_check_get(PyObject *self, PyObject *args) {
    2287     PyObject *resultobj;
     3066    PyObject *resultobj = NULL;
    22883067    struct libtrace_udp *arg1 = (struct libtrace_udp *) 0 ;
    22893068    uint16_t result;
     
    22913070   
    22923071    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_udp_check_get",&obj0)) goto fail;
    2293     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_udp,
    2294     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     3072    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_udp, SWIG_POINTER_EXCEPTION | 0);
     3073    if (SWIG_arg_fail(1)) SWIG_fail;
    22953074    result = (uint16_t)libtrace_udp_check_get(arg1);
    22963075   
    2297     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     3076    {
     3077        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     3078    }
    22983079    return resultobj;
    22993080    fail:
     
    23103091}
    23113092static PyObject *_wrap_libtrace_icmp_type_set(PyObject *self, PyObject *args) {
    2312     PyObject *resultobj;
     3093    PyObject *resultobj = NULL;
    23133094    struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ;
    23143095    uint8_t arg2 ;
     
    23173098   
    23183099    if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_type_set",&obj0,&obj1)) goto fail;
    2319     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp,
    2320     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    2321     arg2 = (uint8_t)SWIG_As_unsigned_SS_char(obj1);
    2322     if (PyErr_Occurred()) SWIG_fail;
     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    }
    23233106    if (arg1) (arg1)->type = arg2;
    23243107   
     
    23313114
    23323115static PyObject *_wrap_libtrace_icmp_type_get(PyObject *self, PyObject *args) {
    2333     PyObject *resultobj;
     3116    PyObject *resultobj = NULL;
    23343117    struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ;
    23353118    uint8_t result;
     
    23373120   
    23383121    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_type_get",&obj0)) goto fail;
    2339     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp,
    2340     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     3122    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp, SWIG_POINTER_EXCEPTION | 0);
     3123    if (SWIG_arg_fail(1)) SWIG_fail;
    23413124    result = (uint8_t) ((arg1)->type);
    23423125   
    2343     resultobj = SWIG_From_unsigned_SS_char((unsigned char)result);
     3126    {
     3127        resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
     3128    }
    23443129    return resultobj;
    23453130    fail:
     
    23493134
    23503135static PyObject *_wrap_libtrace_icmp_code_set(PyObject *self, PyObject *args) {
    2351     PyObject *resultobj;
     3136    PyObject *resultobj = NULL;
    23523137    struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ;
    23533138    uint8_t arg2 ;
     
    23563141   
    23573142    if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_code_set",&obj0,&obj1)) goto fail;
    2358     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp,
    2359     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    2360     arg2 = (uint8_t)SWIG_As_unsigned_SS_char(obj1);
    2361     if (PyErr_Occurred()) SWIG_fail;
     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    }
    23623149    if (arg1) (arg1)->code = arg2;
    23633150   
     
    23703157
    23713158static PyObject *_wrap_libtrace_icmp_code_get(PyObject *self, PyObject *args) {
    2372     PyObject *resultobj;
     3159    PyObject *resultobj = NULL;
    23733160    struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ;
    23743161    uint8_t result;
     
    23763163   
    23773164    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_code_get",&obj0)) goto fail;
    2378     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp,
    2379     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     3165    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp, SWIG_POINTER_EXCEPTION | 0);
     3166    if (SWIG_arg_fail(1)) SWIG_fail;
    23803167    result = (uint8_t) ((arg1)->code);
    23813168   
    2382     resultobj = SWIG_From_unsigned_SS_char((unsigned char)result);
     3169    {
     3170        resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
     3171    }
    23833172    return resultobj;
    23843173    fail:
     
    23883177
    23893178static PyObject *_wrap_libtrace_icmp_checksum_set(PyObject *self, PyObject *args) {
    2390     PyObject *resultobj;
     3179    PyObject *resultobj = NULL;
    23913180    struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ;
    23923181    uint16_t arg2 ;
     
    23953184   
    23963185    if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_checksum_set",&obj0,&obj1)) goto fail;
    2397     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp,
    2398     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    2399     arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1);
    2400     if (PyErr_Occurred()) SWIG_fail;
     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    }
    24013192    if (arg1) (arg1)->checksum = arg2;
    24023193   
     
    24093200
    24103201static PyObject *_wrap_libtrace_icmp_checksum_get(PyObject *self, PyObject *args) {
    2411     PyObject *resultobj;
     3202    PyObject *resultobj = NULL;
    24123203    struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ;
    24133204    uint16_t result;
     
    24153206   
    24163207    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_checksum_get",&obj0)) goto fail;
    2417     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp,
    2418     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     3208    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp, SWIG_POINTER_EXCEPTION | 0);
     3209    if (SWIG_arg_fail(1)) SWIG_fail;
    24193210    result = (uint16_t) ((arg1)->checksum);
    24203211   
    2421     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     3212    {
     3213        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     3214    }
    24223215    return resultobj;
    24233216    fail:
     
    24273220
    24283221static PyObject *_wrap_libtrace_icmp_un_get(PyObject *self, PyObject *args) {
    2429     PyObject *resultobj;
     3222    PyObject *resultobj = NULL;
    24303223    struct libtrace_icmp *arg1 = (struct libtrace_icmp *) 0 ;
    24313224    libtrace_icmp_un *result;
     
    24333226   
    24343227    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_get",&obj0)) goto fail;
    2435     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp,
    2436     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     3228    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp, SWIG_POINTER_EXCEPTION | 0);
     3229    if (SWIG_arg_fail(1)) SWIG_fail;
    24373230    result = (libtrace_icmp_un *)& ((arg1)->un);
    24383231   
     
    24523245}
    24533246static PyObject *_wrap_libtrace_icmp_un_gateway_set(PyObject *self, PyObject *args) {
    2454     PyObject *resultobj;
     3247    PyObject *resultobj = NULL;
    24553248    libtrace_icmp_un *arg1 = (libtrace_icmp_un *) 0 ;
    24563249    uint32_t arg2 ;
     
    24593252   
    24603253    if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_un_gateway_set",&obj0,&obj1)) goto fail;
    2461     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un,
    2462     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    2463     arg2 = (uint32_t)SWIG_As_unsigned_SS_int(obj1);
    2464     if (PyErr_Occurred()) SWIG_fail;
     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    }
    24653260    if (arg1) (arg1)->gateway = arg2;
    24663261   
     
    24733268
    24743269static PyObject *_wrap_libtrace_icmp_un_gateway_get(PyObject *self, PyObject *args) {
    2475     PyObject *resultobj;
     3270    PyObject *resultobj = NULL;
    24763271    libtrace_icmp_un *arg1 = (libtrace_icmp_un *) 0 ;
    24773272    uint32_t result;
     
    24793274   
    24803275    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_gateway_get",&obj0)) goto fail;
    2481     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un,
    2482     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     3276    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp_un, SWIG_POINTER_EXCEPTION | 0);
     3277    if (SWIG_arg_fail(1)) SWIG_fail;
    24833278    result = (uint32_t) ((arg1)->gateway);
    24843279   
    2485     resultobj = SWIG_From_unsigned_SS_int((unsigned int)result);
     3280    {
     3281        resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
     3282    }
    24863283    return resultobj;
    24873284    fail:
     
    24913288
    24923289static PyObject *_wrap_libtrace_icmp_un_frag_get(PyObject *self, PyObject *args) {
    2493     PyObject *resultobj;
     3290    PyObject *resultobj = NULL;
    24943291    libtrace_icmp_un *arg1 = (libtrace_icmp_un *) 0 ;
    24953292    libtrace_icmp_un_frag *result;
     
    24973294   
    24983295    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_frag_get",&obj0)) goto fail;
    2499     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un,
    2500     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     3296    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp_un, SWIG_POINTER_EXCEPTION | 0);
     3297    if (SWIG_arg_fail(1)) SWIG_fail;
    25013298    result = (libtrace_icmp_un_frag *)& ((arg1)->frag);
    25023299   
     
    25093306
    25103307static PyObject *_wrap_libtrace_icmp_un_echo_get(PyObject *self, PyObject *args) {
    2511     PyObject *resultobj;
     3308    PyObject *resultobj = NULL;
    25123309    libtrace_icmp_un *arg1 = (libtrace_icmp_un *) 0 ;
    25133310    libtrace_icmp_un_echo *result;
     
    25153312   
    25163313    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_echo_get",&obj0)) goto fail;
    2517     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un,
    2518     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     3314    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_icmp_un, SWIG_POINTER_EXCEPTION | 0);
     3315    if (SWIG_arg_fail(1)) SWIG_fail;
    25193316    result = (libtrace_icmp_un_echo *)& ((arg1)->echo);
    25203317   
     
    25343331}
    25353332static PyObject *_wrap_libtrace_icmp_un_frag___unused_set(PyObject *self, PyObject *args) {
    2536     PyObject *resultobj;
     3333    PyObject *resultobj = NULL;
    25373334    libtrace_icmp_un_frag *arg1 = (libtrace_icmp_un_frag *) 0 ;
    25383335    uint16_t arg2 ;
     
    25413338   
    25423339    if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_un_frag___unused_set",&obj0,&obj1)) goto fail;
    2543     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un_frag,
    2544     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    2545     arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1);
    2546     if (PyErr_Occurred()) SWIG_fail;
     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    }
    25473346    if (arg1) (arg1)->__unused = arg2;
    25483347   
     
    25553354
    25563355static PyObject *_wrap_libtrace_icmp_un_frag___unused_get(PyObject *self, PyObject *args) {
    2557     PyObject *resultobj;
     3356    PyObject *resultobj = NULL;
    25583357    libtrace_icmp_un_frag *arg1 = (libtrace_icmp_un_frag *) 0 ;
    25593358    uint16_t result;
     
    25613360   
    25623361    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_frag___unused_get",&obj0)) goto fail;
    2563     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un_frag,
    2564     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     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;
    25653364    result = (uint16_t) ((arg1)->__unused);
    25663365   
    2567     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     3366    {
     3367        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     3368    }
    25683369    return resultobj;
    25693370    fail:
     
    25733374
    25743375static PyObject *_wrap_libtrace_icmp_un_frag_mtu_set(PyObject *self, PyObject *args) {
    2575     PyObject *resultobj;
     3376    PyObject *resultobj = NULL;
    25763377    libtrace_icmp_un_frag *arg1 = (libtrace_icmp_un_frag *) 0 ;
    25773378    uint16_t arg2 ;
     
    25803381   
    25813382    if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_un_frag_mtu_set",&obj0,&obj1)) goto fail;
    2582     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un_frag,
    2583     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    2584     arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1);
    2585     if (PyErr_Occurred()) SWIG_fail;
     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    }
    25863389    if (arg1) (arg1)->mtu = arg2;
    25873390   
     
    25943397
    25953398static PyObject *_wrap_libtrace_icmp_un_frag_mtu_get(PyObject *self, PyObject *args) {
    2596     PyObject *resultobj;
     3399    PyObject *resultobj = NULL;
    25973400    libtrace_icmp_un_frag *arg1 = (libtrace_icmp_un_frag *) 0 ;
    25983401    uint16_t result;
     
    26003403   
    26013404    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_frag_mtu_get",&obj0)) goto fail;
    2602     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un_frag,
    2603     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     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;
    26043407    result = (uint16_t) ((arg1)->mtu);
    26053408   
    2606     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     3409    {
     3410        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     3411    }
    26073412    return resultobj;
    26083413    fail:
     
    26193424}
    26203425static PyObject *_wrap_libtrace_icmp_un_echo_id_set(PyObject *self, PyObject *args) {
    2621     PyObject *resultobj;
     3426    PyObject *resultobj = NULL;
    26223427    libtrace_icmp_un_echo *arg1 = (libtrace_icmp_un_echo *) 0 ;
    26233428    uint16_t arg2 ;
     
    26263431   
    26273432    if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_un_echo_id_set",&obj0,&obj1)) goto fail;
    2628     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un_echo,
    2629     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    2630     arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1);
    2631     if (PyErr_Occurred()) SWIG_fail;
     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    }
    26323439    if (arg1) (arg1)->id = arg2;
    26333440   
     
    26403447
    26413448static PyObject *_wrap_libtrace_icmp_un_echo_id_get(PyObject *self, PyObject *args) {
    2642     PyObject *resultobj;
     3449    PyObject *resultobj = NULL;
    26433450    libtrace_icmp_un_echo *arg1 = (libtrace_icmp_un_echo *) 0 ;
    26443451    uint16_t result;
     
    26463453   
    26473454    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_echo_id_get",&obj0)) goto fail;
    2648     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un_echo,
    2649     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     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;
    26503457    result = (uint16_t) ((arg1)->id);
    26513458   
    2652     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     3459    {
     3460        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     3461    }
    26533462    return resultobj;
    26543463    fail:
     
    26583467
    26593468static PyObject *_wrap_libtrace_icmp_un_echo_sequence_set(PyObject *self, PyObject *args) {
    2660     PyObject *resultobj;
     3469    PyObject *resultobj = NULL;
    26613470    libtrace_icmp_un_echo *arg1 = (libtrace_icmp_un_echo *) 0 ;
    26623471    uint16_t arg2 ;
     
    26653474   
    26663475    if(!PyArg_ParseTuple(args,(char *)"OO:libtrace_icmp_un_echo_sequence_set",&obj0,&obj1)) goto fail;
    2667     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un_echo,
    2668     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    2669     arg2 = (uint16_t)SWIG_As_unsigned_SS_short(obj1);
    2670     if (PyErr_Occurred()) SWIG_fail;
     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    }
    26713482    if (arg1) (arg1)->sequence = arg2;
    26723483   
     
    26793490
    26803491static PyObject *_wrap_libtrace_icmp_un_echo_sequence_get(PyObject *self, PyObject *args) {
    2681     PyObject *resultobj;
     3492    PyObject *resultobj = NULL;
    26823493    libtrace_icmp_un_echo *arg1 = (libtrace_icmp_un_echo *) 0 ;
    26833494    uint16_t result;
     
    26853496   
    26863497    if(!PyArg_ParseTuple(args,(char *)"O:libtrace_icmp_un_echo_sequence_get",&obj0)) goto fail;
    2687     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_icmp_un_echo,
    2688     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     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;
    26893500    result = (uint16_t) ((arg1)->sequence);
    26903501   
    2691     resultobj = SWIG_From_unsigned_SS_short((unsigned short)result);
     3502    {
     3503        resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
     3504    }
    26923505    return resultobj;
    26933506    fail:
     
    27043517}
    27053518static PyObject *_wrap_new_Packet(PyObject *self, PyObject *args) {
    2706     PyObject *resultobj;
     3519    PyObject *resultobj = NULL;
    27073520    struct libtrace_packet_t *result;
    27083521   
     
    27183531
    27193532static PyObject *_wrap_delete_Packet(PyObject *self, PyObject *args) {
    2720     PyObject *resultobj;
     3533    PyObject *resultobj = NULL;
    27213534    struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    27223535    PyObject * obj0 = 0 ;
    27233536   
    27243537    if(!PyArg_ParseTuple(args,(char *)"O:delete_Packet",&obj0)) goto fail;
    2725     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t,
    2726     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     3538    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0);
     3539    if (SWIG_arg_fail(1)) SWIG_fail;
    27273540    delete_libtrace_packet_t(arg1);
    27283541   
     
    27343547
    27353548
     3549static 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
     3567static 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
     3585static 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
    27363611static PyObject *_wrap_Packet_trace_get_ip(PyObject *self, PyObject *args) {
    2737     PyObject *resultobj;
     3612    PyObject *resultobj = NULL;
    27383613    struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    27393614    struct libtrace_ip *result;
     
    27413616   
    27423617    if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_ip",&obj0)) goto fail;
    2743     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t,
    2744     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     3618    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0);
     3619    if (SWIG_arg_fail(1)) SWIG_fail;
    27453620    result = (struct libtrace_ip *)libtrace_packet_t_trace_get_ip(arg1);
    27463621   
     
    27533628
    27543629static PyObject *_wrap_Packet_trace_get_tcp(PyObject *self, PyObject *args) {
    2755     PyObject *resultobj;
     3630    PyObject *resultobj = NULL;
    27563631    struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    27573632    struct libtrace_tcp *result;
     
    27593634   
    27603635    if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_tcp",&obj0)) goto fail;
    2761     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t,
    2762     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     3636    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0);
     3637    if (SWIG_arg_fail(1)) SWIG_fail;
    27633638    result = (struct libtrace_tcp *)libtrace_packet_t_trace_get_tcp(arg1);
    27643639   
     
    27713646
    27723647static PyObject *_wrap_Packet_trace_get_udp(PyObject *self, PyObject *args) {
    2773     PyObject *resultobj;
     3648    PyObject *resultobj = NULL;
    27743649    struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    27753650    struct libtrace_udp *result;
     
    27773652   
    27783653    if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_udp",&obj0)) goto fail;
    2779     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t,
    2780     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     3654    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0);
     3655    if (SWIG_arg_fail(1)) SWIG_fail;
    27813656    result = (struct libtrace_udp *)libtrace_packet_t_trace_get_udp(arg1);
    27823657   
     
    27893664
    27903665static PyObject *_wrap_Packet_trace_get_icmp(PyObject *self, PyObject *args) {
    2791     PyObject *resultobj;
     3666    PyObject *resultobj = NULL;
    27923667    struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    27933668    struct libtrace_icmp *result;
     
    27953670   
    27963671    if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_icmp",&obj0)) goto fail;
    2797     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t,
    2798     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     3672    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0);
     3673    if (SWIG_arg_fail(1)) SWIG_fail;
    27993674    result = (struct libtrace_icmp *)libtrace_packet_t_trace_get_icmp(arg1);
    28003675   
     
    28063681
    28073682
    2808 static PyObject *_wrap_Packet_trace_get_link(PyObject *self, PyObject *args) {
    2809     PyObject *resultobj;
     3683static PyObject *_wrap_Packet_trace_get_destination_mac(PyObject *self, PyObject *args) {
     3684    PyObject *resultobj = NULL;
    28103685    struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    2811     void *result;
    2812     PyObject * obj0 = 0 ;
    2813    
    2814     if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_link",&obj0)) goto fail;
    2815     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t,
    2816     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    2817     result = (void *)libtrace_packet_t_trace_get_link(arg1);
    2818    
    2819     resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_void, 0);
     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
     3701static 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
     3719static 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
     3741static 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
     3761static 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    }
    28203775    return resultobj;
    28213776    fail:
     
    28253780
    28263781static PyObject *_wrap_Packet_trace_get_seconds(PyObject *self, PyObject *args) {
    2827     PyObject *resultobj;
     3782    PyObject *resultobj = NULL;
    28283783    struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    28293784    double result;
     
    28313786   
    28323787    if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_seconds",&obj0)) goto fail;
    2833     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t,
    2834     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     3788    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0);
     3789    if (SWIG_arg_fail(1)) SWIG_fail;
    28353790    result = (double)libtrace_packet_t_trace_get_seconds(arg1);
    28363791   
    2837     resultobj = SWIG_From_double((double)result);
     3792    {
     3793        resultobj = SWIG_From_double((double)(result));
     3794    }
    28383795    return resultobj;
    28393796    fail:
     
    28433800
    28443801static PyObject *_wrap_Packet_trace_get_erf_timestamp(PyObject *self, PyObject *args) {
    2845     PyObject *resultobj;
     3802    PyObject *resultobj = NULL;
    28463803    struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    28473804    uint64_t result;
     
    28493806   
    28503807    if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_erf_timestamp",&obj0)) goto fail;
    2851     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t,
    2852     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     3808    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0);
     3809    if (SWIG_arg_fail(1)) SWIG_fail;
    28533810    result = libtrace_packet_t_trace_get_erf_timestamp(arg1);
    28543811   
     
    28563813        uint64_t * resultptr;
    28573814        resultptr = (uint64_t *) malloc(sizeof(uint64_t));
    2858         memmove(resultptr, &result, sizeof(uint64_t));
     3815        if (resultptr) memcpy(resultptr, &result, sizeof(uint64_t));
    28593816        resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_uint64_t, 1);
    28603817    }
     
    28663823
    28673824static PyObject *_wrap_Packet_trace_get_timeval(PyObject *self, PyObject *args) {
    2868     PyObject *resultobj;
     3825    PyObject *resultobj = NULL;
    28693826    struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    28703827    struct timeval result;
     
    28723829   
    28733830    if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_timeval",&obj0)) goto fail;
    2874     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t,
    2875     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     3831    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0);
     3832    if (SWIG_arg_fail(1)) SWIG_fail;
    28763833    result = libtrace_packet_t_trace_get_timeval(arg1);
    28773834   
     
    28793836        struct timeval * resultptr;
    28803837        resultptr = (struct timeval *) malloc(sizeof(struct timeval));
    2881         memmove(resultptr, &result, sizeof(struct timeval));
     3838        if (resultptr) memcpy(resultptr, &result, sizeof(struct timeval));
    28823839        resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_timeval, 1);
    28833840    }
     
    28893846
    28903847static PyObject *_wrap_Packet_trace_get_capture_length(PyObject *self, PyObject *args) {
    2891     PyObject *resultobj;
     3848    PyObject *resultobj = NULL;
    28923849    struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    28933850    int result;
     
    28953852   
    28963853    if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_capture_length",&obj0)) goto fail;
    2897     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t,
    2898     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     3854    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0);
     3855    if (SWIG_arg_fail(1)) SWIG_fail;
    28993856    result = (int)libtrace_packet_t_trace_get_capture_length(arg1);
    29003857   
    2901     resultobj = SWIG_From_int((int)result);
     3858    {
     3859        resultobj = SWIG_From_int((int)(result));
     3860    }
     3861    return resultobj;
     3862    fail:
     3863    return NULL;
     3864}
     3865
     3866
     3867static 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    }
    29023887    return resultobj;
    29033888    fail:
     
    29073892
    29083893static PyObject *_wrap_Packet_trace_get_wire_lenth(PyObject *self, PyObject *args) {
    2909     PyObject *resultobj;
     3894    PyObject *resultobj = NULL;
    29103895    struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    29113896    int result;
     
    29133898   
    29143899    if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_wire_lenth",&obj0)) goto fail;
    2915     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t,
    2916     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     3900    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0);
     3901    if (SWIG_arg_fail(1)) SWIG_fail;
    29173902    result = (int)libtrace_packet_t_trace_get_wire_lenth(arg1);
    29183903   
    2919     resultobj = SWIG_From_int((int)result);
     3904    {
     3905        resultobj = SWIG_From_int((int)(result));
     3906    }
     3907    return resultobj;
     3908    fail:
     3909    return NULL;
     3910}
     3911
     3912
     3913static 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    }
    29203927    return resultobj;
    29213928    fail:
     
    29253932
    29263933static PyObject *_wrap_Packet_trace_get_link_type(PyObject *self, PyObject *args) {
    2927     PyObject *resultobj;
     3934    PyObject *resultobj = NULL;
    29283935    struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    29293936    libtrace_linktype_t result;
     
    29313938   
    29323939    if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_link_type",&obj0)) goto fail;
    2933     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t,
    2934     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     3940    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0);
     3941    if (SWIG_arg_fail(1)) SWIG_fail;
    29353942    result = libtrace_packet_t_trace_get_link_type(arg1);
    29363943   
     
    29383945        libtrace_linktype_t * resultptr;
    29393946        resultptr = (libtrace_linktype_t *) malloc(sizeof(libtrace_linktype_t));
    2940         memmove(resultptr, &result, sizeof(libtrace_linktype_t));
     3947        if (resultptr) memcpy(resultptr, &result, sizeof(libtrace_linktype_t));
    29413948        resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_libtrace_linktype_t, 1);
    29423949    }
     
    29483955
    29493956static PyObject *_wrap_Packet_trace_get_direction(PyObject *self, PyObject *args) {
    2950     PyObject *resultobj;
     3957    PyObject *resultobj = NULL;
    29513958    struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    29523959    int8_t result;
     
    29543961   
    29553962    if(!PyArg_ParseTuple(args,(char *)"O:Packet_trace_get_direction",&obj0)) goto fail;
    2956     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t,
    2957     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     3963    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_packet_t, SWIG_POINTER_EXCEPTION | 0);
     3964    if (SWIG_arg_fail(1)) SWIG_fail;
    29583965    result = libtrace_packet_t_trace_get_direction(arg1);
    29593966   
     
    29613968        int8_t * resultptr;
    29623969        resultptr = (int8_t *) malloc(sizeof(int8_t));
    2963         memmove(resultptr, &result, sizeof(int8_t));
     3970        if (resultptr) memcpy(resultptr, &result, sizeof(int8_t));
    29643971        resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_int8_t, 1);
    29653972    }
     
    29713978
    29723979static PyObject *_wrap_Packet_trace_set_direction(PyObject *self, PyObject *args) {
    2973     PyObject *resultobj;
     3980    PyObject *resultobj = NULL;
    29743981    struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    29753982    int8_t arg2 ;
    29763983    int8_t result;
    2977     int8_t *argp2 ;
    29783984    PyObject * obj0 = 0 ;
    29793985    PyObject * obj1 = 0 ;
    29803986   
    29813987    if(!PyArg_ParseTuple(args,(char *)"OO:Packet_trace_set_direction",&obj0,&obj1)) goto fail;
    2982     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t,
    2983     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    2984     if ((SWIG_ConvertPtr(obj1,(void **)(&argp2),SWIGTYPE_p_int8_t,
    2985     SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail;
    2986     arg2 = *argp2;
     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    }
    29874000    result = libtrace_packet_t_trace_set_direction(arg1,arg2);
    29884001   
     
    29904003        int8_t * resultptr;
    29914004        resultptr = (int8_t *) malloc(sizeof(int8_t));
    2992         memmove(resultptr, &result, sizeof(int8_t));
     4005        if (resultptr) memcpy(resultptr, &result, sizeof(int8_t));
    29934006        resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_int8_t, 1);
    29944007    }
     
    29994012
    30004013
    3001 static PyObject *_wrap_Packet_trace_bpf_filter(PyObject *self, PyObject *args) {
    3002     PyObject *resultobj;
     4014static PyObject *_wrap_Packet_trace_apply_filter(PyObject *self, PyObject *args) {
     4015    PyObject *resultobj = NULL;
    30034016    struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    30044017    struct libtrace_filter_t *arg2 = (struct libtrace_filter_t *) 0 ;
     
    30074020    PyObject * obj1 = 0 ;
    30084021   
    3009     if(!PyArg_ParseTuple(args,(char *)"OO:Packet_trace_bpf_filter",&obj0,&obj1)) goto fail;
    3010     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t,
    3011     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    3012     if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_libtrace_filter_t,
    3013     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    3014     result = (int)libtrace_packet_t_trace_bpf_filter(arg1,arg2);
    3015    
    3016     resultobj = SWIG_From_int((int)result);
     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    }
    30174032    return resultobj;
    30184033    fail:
     
    30224037
    30234038static PyObject *_wrap_Packet_trace_get_server_port(PyObject *self, PyObject *args) {
    3024     PyObject *resultobj;
     4039    PyObject *resultobj = NULL;
    30254040    struct libtrace_packet_t *arg1 = (struct libtrace_packet_t *) 0 ;
    30264041    uint8_t arg2 ;
     
    30344049   
    30354050    if(!PyArg_ParseTuple(args,(char *)"OOOO:Packet_trace_get_server_port",&obj0,&obj1,&obj2,&obj3)) goto fail;
    3036     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_packet_t,
    3037     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    3038     arg2 = (uint8_t)SWIG_As_unsigned_SS_char(obj1);
    3039     if (PyErr_Occurred()) SWIG_fail;
    3040     arg3 = (uint16_t)SWIG_As_unsigned_SS_short(obj2);
    3041     if (PyErr_Occurred()) SWIG_fail;
    3042     arg4 = (uint16_t)SWIG_As_unsigned_SS_short(obj3);
    3043     if (PyErr_Occurred()) SWIG_fail;
     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    }
    30444065    result = (uint8_t)libtrace_packet_t_trace_get_server_port(arg1,arg2,arg3,arg4);
    30454066   
    3046     resultobj = SWIG_From_unsigned_SS_char((unsigned char)result);
     4067    {
     4068        resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
     4069    }
    30474070    return resultobj;
    30484071    fail:
     
    30594082}
    30604083static PyObject *_wrap_new_Filter(PyObject *self, PyObject *args) {
    3061     PyObject *resultobj;
    3062     char *arg1 ;
     4084    PyObject *resultobj = NULL;
     4085    char *arg1 = (char *) 0 ;
    30634086    struct libtrace_filter_t *result;
    30644087    PyObject * obj0 = 0 ;
    30654088   
    30664089    if(!PyArg_ParseTuple(args,(char *)"O:new_Filter",&obj0)) goto fail;
    3067     if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) SWIG_fail;
     4090    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) {
     4091        SWIG_arg_fail(1);SWIG_fail;
     4092    }
    30684093    result = (struct libtrace_filter_t *)new_libtrace_filter_t(arg1);
    30694094   
     
    30754100
    30764101
    3077 static PyObject *_wrap_Filter_trace_bpf_filter(PyObject *self, PyObject *args) {
    3078     PyObject *resultobj;
     4102static 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
     4119static PyObject *_wrap_Filter_trace_apply_filter(PyObject *self, PyObject *args) {
     4120    PyObject *resultobj = NULL;
    30794121    struct libtrace_filter_t *arg1 = (struct libtrace_filter_t *) 0 ;
    30804122    struct libtrace_packet_t *arg2 = (struct libtrace_packet_t *) 0 ;
     
    30834125    PyObject * obj1 = 0 ;
    30844126   
    3085     if(!PyArg_ParseTuple(args,(char *)"OO:Filter_trace_bpf_filter",&obj0,&obj1)) goto fail;
    3086     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_filter_t,
    3087     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    3088     if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_libtrace_packet_t,
    3089     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    3090     result = (int)libtrace_filter_t_trace_bpf_filter(arg1,arg2);
    3091    
    3092     resultobj = SWIG_From_int((int)result);
     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    }
    30934137    return resultobj;
    30944138    fail:
     
    31054149}
    31064150static PyObject *_wrap_new_Trace(PyObject *self, PyObject *args) {
    3107     PyObject *resultobj;
    3108     char *arg1 ;
     4151    PyObject *resultobj = NULL;
     4152    char *arg1 = (char *) 0 ;
    31094153    struct libtrace_t *result;
    31104154    PyObject * obj0 = 0 ;
    31114155   
    31124156    if(!PyArg_ParseTuple(args,(char *)"O:new_Trace",&obj0)) goto fail;
    3113     if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) SWIG_fail;
     4157    if (!SWIG_AsCharPtr(obj0, (char**)&arg1)) {
     4158        SWIG_arg_fail(1);SWIG_fail;
     4159    }
    31144160    result = (struct libtrace_t *)new_libtrace_t(arg1);
    31154161   
     
    31224168
    31234169static PyObject *_wrap_delete_Trace(PyObject *self, PyObject *args) {
    3124     PyObject *resultobj;
     4170    PyObject *resultobj = NULL;
    31254171    struct libtrace_t *arg1 = (struct libtrace_t *) 0 ;
    31264172    PyObject * obj0 = 0 ;
    31274173   
    31284174    if(!PyArg_ParseTuple(args,(char *)"O:delete_Trace",&obj0)) goto fail;
    3129     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_t,
    3130     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     4175    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_libtrace_t, SWIG_POINTER_EXCEPTION | 0);
     4176    if (SWIG_arg_fail(1)) SWIG_fail;
    31314177    delete_libtrace_t(arg1);
    31324178   
     
    31394185
    31404186static PyObject *_wrap_Trace_trace_read_packet(PyObject *self, PyObject *args) {
    3141     PyObject *resultobj;
     4187    PyObject *resultobj = NULL;
    31424188    struct libtrace_t *arg1 = (struct libtrace_t *) 0 ;
    31434189    struct libtrace_packet_t *arg2 = (struct libtrace_packet_t *) 0 ;
     
    31474193   
    31484194    if(!PyArg_ParseTuple(args,(char *)"OO:Trace_trace_read_packet",&obj0,&obj1)) goto fail;
    3149     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_libtrace_t,
    3150     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    3151     if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_libtrace_packet_t,
    3152     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     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;
    31534199    result = (int)libtrace_t_trace_read_packet(arg1,arg2);
    31544200   
    3155     resultobj = SWIG_From_int((int)result);
     4201    {
     4202        resultobj = SWIG_From_int((int)(result));
     4203    }
     4204    return resultobj;
     4205    fail:
     4206    return NULL;
     4207}
     4208
     4209
     4210static 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
     4230static 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
     4250static 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
     4267static 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
     4306static 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
     4329static 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    }
    31564343    return resultobj;
    31574344    fail:
     
    31674354    return Py_BuildValue((char *)"");
    31684355}
     4356static 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
     4375static 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
     4392static 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
     4412static 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
     4451static 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
     4474static 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
     4494static 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
     4518static 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}
    31694525static PyMethodDef SwigMethods[] = {
    3170          { (char *)"in_addr_s_addr_set", _wrap_in_addr_s_addr_set, METH_VARARGS, NULL },
    3171          { (char *)"in_addr_s_addr_get", _wrap_in_addr_s_addr_get, METH_VARARGS, NULL },
    3172          { (char *)"in_addr_swigregister", in_addr_swigregister, METH_VARARGS, NULL },
    3173          { (char *)"libtrace_ip_ip_hl_set", _wrap_libtrace_ip_ip_hl_set, METH_VARARGS, NULL },
    3174          { (char *)"libtrace_ip_ip_hl_get", _wrap_libtrace_ip_ip_hl_get, METH_VARARGS, NULL },
    3175          { (char *)"libtrace_ip_ip_v_set", _wrap_libtrace_ip_ip_v_set, METH_VARARGS, NULL },
    3176          { (char *)"libtrace_ip_ip_v_get", _wrap_libtrace_ip_ip_v_get, METH_VARARGS, NULL },
    3177          { (char *)"libtrace_ip_ip_tos_set", _wrap_libtrace_ip_ip_tos_set, METH_VARARGS, NULL },
    3178          { (char *)"libtrace_ip_ip_tos_get", _wrap_libtrace_ip_ip_tos_get, METH_VARARGS, NULL },
    3179          { (char *)"libtrace_ip_ip_ttl_set", _wrap_libtrace_ip_ip_ttl_set, METH_VARARGS, NULL },
    3180          { (char *)"libtrace_ip_ip_ttl_get", _wrap_libtrace_ip_ip_ttl_get, METH_VARARGS, NULL },
    3181          { (char *)"libtrace_ip_ip_p_set", _wrap_libtrace_ip_ip_p_set, METH_VARARGS, NULL },
    3182          { (char *)"libtrace_ip_ip_p_get", _wrap_libtrace_ip_ip_p_get, METH_VARARGS, NULL },
    3183          { (char *)"libtrace_ip_ip_sum_get", _wrap_libtrace_ip_ip_sum_get, METH_VARARGS, NULL },
    3184          { (char *)"libtrace_ip_ip_len_get", _wrap_libtrace_ip_ip_len_get, METH_VARARGS, NULL },
    3185          { (char *)"libtrace_ip_ip_id_get", _wrap_libtrace_ip_ip_id_get, METH_VARARGS, NULL },
    3186          { (char *)"libtrace_ip_ip_off_get", _wrap_libtrace_ip_ip_off_get, METH_VARARGS, NULL },
    3187          { (char *)"libtrace_ip_ip_src_get", _wrap_libtrace_ip_ip_src_get, METH_VARARGS, NULL },
    3188          { (char *)"libtrace_ip_ip_dst_get", _wrap_libtrace_ip_ip_dst_get, METH_VARARGS, NULL },
    3189          { (char *)"libtrace_ip_swigregister", libtrace_ip_swigregister, METH_VARARGS, NULL },
    3190          { (char *)"libtrace_tcp_res1_set", _wrap_libtrace_tcp_res1_set, METH_VARARGS, NULL },
    3191          { (char *)"libtrace_tcp_res1_get", _wrap_libtrace_tcp_res1_get, METH_VARARGS, NULL },
    3192          { (char *)"libtrace_tcp_doff_set", _wrap_libtrace_tcp_doff_set, METH_VARARGS, NULL },
    3193          { (char *)"libtrace_tcp_doff_get", _wrap_libtrace_tcp_doff_get, METH_VARARGS, NULL },
    3194          { (char *)"libtrace_tcp_fin_set", _wrap_libtrace_tcp_fin_set, METH_VARARGS, NULL },
    3195          { (char *)"libtrace_tcp_fin_get", _wrap_libtrace_tcp_fin_get, METH_VARARGS, NULL },
    3196          { (char *)"libtrace_tcp_syn_set", _wrap_libtrace_tcp_syn_set, METH_VARARGS, NULL },
    3197          { (char *)"libtrace_tcp_syn_get", _wrap_libtrace_tcp_syn_get, METH_VARARGS, NULL },
    3198          { (char *)"libtrace_tcp_rst_set", _wrap_libtrace_tcp_rst_set, METH_VARARGS, NULL },
    3199          { (char *)"libtrace_tcp_rst_get", _wrap_libtrace_tcp_rst_get, METH_VARARGS, NULL },
    3200          { (char *)"libtrace_tcp_psh_set", _wrap_libtrace_tcp_psh_set, METH_VARARGS, NULL },
    3201          { (char *)"libtrace_tcp_psh_get", _wrap_libtrace_tcp_psh_get, METH_VARARGS, NULL },
    3202          { (char *)"libtrace_tcp_ack_set", _wrap_libtrace_tcp_ack_set, METH_VARARGS, NULL },
    3203          { (char *)"libtrace_tcp_ack_get", _wrap_libtrace_tcp_ack_get, METH_VARARGS, NULL },
    3204          { (char *)"libtrace_tcp_urg_set", _wrap_libtrace_tcp_urg_set, METH_VARARGS, NULL },
    3205          { (char *)"libtrace_tcp_urg_get", _wrap_libtrace_tcp_urg_get, METH_VARARGS, NULL },
    3206          { (char *)"libtrace_tcp_res2_set", _wrap_libtrace_tcp_res2_set, METH_VARARGS, NULL },
    3207          { (char *)"libtrace_tcp_res2_get", _wrap_libtrace_tcp_res2_get, METH_VARARGS, NULL },
    3208          { (char *)"libtrace_tcp_source_get", _wrap_libtrace_tcp_source_get, METH_VARARGS, NULL },
    3209          { (char *)"libtrace_tcp_dest_get", _wrap_libtrace_tcp_dest_get, METH_VARARGS, NULL },
    3210          { (char *)"libtrace_tcp_window_get", _wrap_libtrace_tcp_window_get, METH_VARARGS, NULL },
    3211          { (char *)"libtrace_tcp_check_get", _wrap_libtrace_tcp_check_get, METH_VARARGS, NULL },
    3212          { (char *)"libtrace_tcp_urg_ptr_get", _wrap_libtrace_tcp_urg_ptr_get, METH_VARARGS, NULL },
    3213          { (char *)"libtrace_tcp_seq_get", _wrap_libtrace_tcp_seq_get, METH_VARARGS, NULL },
    3214          { (char *)"libtrace_tcp_ack_seq_get", _wrap_libtrace_tcp_ack_seq_get, METH_VARARGS, NULL },
    3215          { (char *)"libtrace_tcp_swigregister", libtrace_tcp_swigregister, METH_VARARGS, NULL },
    3216          { (char *)"libtrace_udp_source_get", _wrap_libtrace_udp_source_get, METH_VARARGS, NULL },
    3217          { (char *)"libtrace_udp_dest_get", _wrap_libtrace_udp_dest_get, METH_VARARGS, NULL },
    3218          { (char *)"libtrace_udp_len_get", _wrap_libtrace_udp_len_get, METH_VARARGS, NULL },
    3219          { (char *)"libtrace_udp_check_get", _wrap_libtrace_udp_check_get, METH_VARARGS, NULL },
    3220          { (char *)"libtrace_udp_swigregister", libtrace_udp_swigregister, METH_VARARGS, NULL },
    3221          { (char *)"libtrace_icmp_type_set", _wrap_libtrace_icmp_type_set, METH_VARARGS, NULL },
    3222          { (char *)"libtrace_icmp_type_get", _wrap_libtrace_icmp_type_get, METH_VARARGS, NULL },
    3223          { (char *)"libtrace_icmp_code_set", _wrap_libtrace_icmp_code_set, METH_VARARGS, NULL },
    3224          { (char *)"libtrace_icmp_code_get", _wrap_libtrace_icmp_code_get, METH_VARARGS, NULL },
    3225          { (char *)"libtrace_icmp_checksum_set", _wrap_libtrace_icmp_checksum_set, METH_VARARGS, NULL },
    3226          { (char *)"libtrace_icmp_checksum_get", _wrap_libtrace_icmp_checksum_get, METH_VARARGS, NULL },
    3227          { (char *)"libtrace_icmp_un_get", _wrap_libtrace_icmp_un_get, METH_VARARGS, NULL },
    3228          { (char *)"libtrace_icmp_swigregister", libtrace_icmp_swigregister, METH_VARARGS, NULL },
    3229          { (char *)"libtrace_icmp_un_gateway_set", _wrap_libtrace_icmp_un_gateway_set, METH_VARARGS, NULL },
    3230          { (char *)"libtrace_icmp_un_gateway_get", _wrap_libtrace_icmp_un_gateway_get, METH_VARARGS, NULL },
    3231          { (char *)"libtrace_icmp_un_frag_get", _wrap_libtrace_icmp_un_frag_get, METH_VARARGS, NULL },
    3232          { (char *)"libtrace_icmp_un_echo_get", _wrap_libtrace_icmp_un_echo_get, METH_VARARGS, NULL },
    3233          { (char *)"libtrace_icmp_un_swigregister", libtrace_icmp_un_swigregister, METH_VARARGS, NULL },
    3234          { (char *)"libtrace_icmp_un_frag___unused_set", _wrap_libtrace_icmp_un_frag___unused_set, METH_VARARGS, NULL },
    3235          { (char *)"libtrace_icmp_un_frag___unused_get", _wrap_libtrace_icmp_un_frag___unused_get, METH_VARARGS, NULL },
    3236          { (char *)"libtrace_icmp_un_frag_mtu_set", _wrap_libtrace_icmp_un_frag_mtu_set, METH_VARARGS, NULL },
    3237          { (char *)"libtrace_icmp_un_frag_mtu_get", _wrap_libtrace_icmp_un_frag_mtu_get, METH_VARARGS, NULL },
    3238          { (char *)"libtrace_icmp_un_frag_swigregister", libtrace_icmp_un_frag_swigregister, METH_VARARGS, NULL },
    3239          { (char *)"libtrace_icmp_un_echo_id_set", _wrap_libtrace_icmp_un_echo_id_set, METH_VARARGS, NULL },
    3240          { (char *)"libtrace_icmp_un_echo_id_get", _wrap_libtrace_icmp_un_echo_id_get, METH_VARARGS, NULL },
    3241          { (char *)"libtrace_icmp_un_echo_sequence_set", _wrap_libtrace_icmp_un_echo_sequence_set, METH_VARARGS, NULL },
    3242          { (char *)"libtrace_icmp_un_echo_sequence_get", _wrap_libtrace_icmp_un_echo_sequence_get, METH_VARARGS, NULL },
    3243          { (char *)"libtrace_icmp_un_echo_swigregister", libtrace_icmp_un_echo_swigregister, METH_VARARGS, NULL },
    3244          { (char *)"new_Packet", _wrap_new_Packet, METH_VARARGS, NULL },
    3245          { (char *)"delete_Packet", _wrap_delete_Packet, METH_VARARGS, NULL },
    3246          { (char *)"Packet_trace_get_ip", _wrap_Packet_trace_get_ip, METH_VARARGS, NULL },
    3247          { (char *)"Packet_trace_get_tcp", _wrap_Packet_trace_get_tcp, METH_VARARGS, NULL },
    3248          { (char *)"Packet_trace_get_udp", _wrap_Packet_trace_get_udp, METH_VARARGS, NULL },
    3249          { (char *)"Packet_trace_get_icmp", _wrap_Packet_trace_get_icmp, METH_VARARGS, NULL },
    3250          { (char *)"Packet_trace_get_link", _wrap_Packet_trace_get_link, METH_VARARGS, NULL },
    3251          { (char *)"Packet_trace_get_seconds", _wrap_Packet_trace_get_seconds, METH_VARARGS, NULL },
    3252          { (char *)"Packet_trace_get_erf_timestamp", _wrap_Packet_trace_get_erf_timestamp, METH_VARARGS, NULL },
    3253          { (char *)"Packet_trace_get_timeval", _wrap_Packet_trace_get_timeval, METH_VARARGS, NULL },
    3254          { (char *)"Packet_trace_get_capture_length", _wrap_Packet_trace_get_capture_length, METH_VARARGS, NULL },
    3255          { (char *)"Packet_trace_get_wire_lenth", _wrap_Packet_trace_get_wire_lenth, METH_VARARGS, NULL },
    3256          { (char *)"Packet_trace_get_link_type", _wrap_Packet_trace_get_link_type, METH_VARARGS, NULL },
    3257          { (char *)"Packet_trace_get_direction", _wrap_Packet_trace_get_direction, METH_VARARGS, NULL },
    3258          { (char *)"Packet_trace_set_direction", _wrap_Packet_trace_set_direction, METH_VARARGS, NULL },
    3259          { (char *)"Packet_trace_bpf_filter", _wrap_Packet_trace_bpf_filter, METH_VARARGS, NULL },
    3260          { (char *)"Packet_trace_get_server_port", _wrap_Packet_trace_get_server_port, METH_VARARGS, NULL },
    3261          { (char *)"Packet_swigregister", Packet_swigregister, METH_VARARGS, NULL },
    3262          { (char *)"new_Filter", _wrap_new_Filter, METH_VARARGS, NULL },
    3263          { (char *)"Filter_trace_bpf_filter", _wrap_Filter_trace_bpf_filter, METH_VARARGS, NULL },
    3264          { (char *)"Filter_swigregister", Filter_swigregister, METH_VARARGS, NULL },
    3265          { (char *)"new_Trace", _wrap_new_Trace, METH_VARARGS, NULL },
    3266          { (char *)"delete_Trace", _wrap_delete_Trace, METH_VARARGS, NULL },
    3267          { (char *)"Trace_trace_read_packet", _wrap_Trace_trace_read_packet, METH_VARARGS, NULL },
    3268          { (char *)"Trace_swigregister", Trace_swigregister, METH_VARARGS, NULL },
     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        &nbs