source: swig/python/libtrace.py @ 77ba31d

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since 77ba31d was 77ba31d, checked in by Daniel Lawson <dlawson@…>, 17 years ago

poink

  • Property mode set to 100644
File size: 18.7 KB
Line 
1# This file was created automatically by SWIG.
2# Don't modify this file, modify the SWIG interface instead.
3# This file is compatible with both classic and new-style classes.
4
5import _libtrace
6
7def _swig_setattr(self,class_type,name,value):
8    if (name == "this"):
9        if isinstance(value, class_type):
10            self.__dict__[name] = value.this
11            if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
12            del value.thisown
13            return
14    method = class_type.__swig_setmethods__.get(name,None)
15    if method: return method(self,value)
16    self.__dict__[name] = value
17
18def _swig_getattr(self,class_type,name):
19    method = class_type.__swig_getmethods__.get(name,None)
20    if method: return method(self)
21    raise AttributeError,name
22
23import types
24try:
25    _object = types.ObjectType
26    _newclass = 1
27except AttributeError:
28    class _object : pass
29    _newclass = 0
30del types
31
32
33class in_addr(_object):
34    __swig_setmethods__ = {}
35    __setattr__ = lambda self, name, value: _swig_setattr(self, in_addr, name, value)
36    __swig_getmethods__ = {}
37    __getattr__ = lambda self, name: _swig_getattr(self, in_addr, name)
38    def __init__(self): raise RuntimeError, "No constructor defined"
39    def __repr__(self):
40        return "<C in_addr instance at %s>" % (self.this,)
41    __swig_setmethods__["s_addr"] = _libtrace.in_addr_s_addr_set
42    __swig_getmethods__["s_addr"] = _libtrace.in_addr_s_addr_get
43    if _newclass:s_addr = property(_libtrace.in_addr_s_addr_get, _libtrace.in_addr_s_addr_set)
44
45class in_addrPtr(in_addr):
46    def __init__(self, this):
47        _swig_setattr(self, in_addr, 'this', this)
48        if not hasattr(self,"thisown"): _swig_setattr(self, in_addr, 'thisown', 0)
49        _swig_setattr(self, in_addr,self.__class__,in_addr)
50_libtrace.in_addr_swigregister(in_addrPtr)
51
52class libtrace_ip(_object):
53    __swig_setmethods__ = {}
54    __setattr__ = lambda self, name, value: _swig_setattr(self, libtrace_ip, name, value)
55    __swig_getmethods__ = {}
56    __getattr__ = lambda self, name: _swig_getattr(self, libtrace_ip, name)
57    def __init__(self): raise RuntimeError, "No constructor defined"
58    def __repr__(self):
59        return "<C libtrace_ip instance at %s>" % (self.this,)
60    __swig_setmethods__["ip_hl"] = _libtrace.libtrace_ip_ip_hl_set
61    __swig_getmethods__["ip_hl"] = _libtrace.libtrace_ip_ip_hl_get
62    if _newclass:ip_hl = property(_libtrace.libtrace_ip_ip_hl_get, _libtrace.libtrace_ip_ip_hl_set)
63    __swig_setmethods__["ip_v"] = _libtrace.libtrace_ip_ip_v_set
64    __swig_getmethods__["ip_v"] = _libtrace.libtrace_ip_ip_v_get
65    if _newclass:ip_v = property(_libtrace.libtrace_ip_ip_v_get, _libtrace.libtrace_ip_ip_v_set)
66    __swig_setmethods__["ip_tos"] = _libtrace.libtrace_ip_ip_tos_set
67    __swig_getmethods__["ip_tos"] = _libtrace.libtrace_ip_ip_tos_get
68    if _newclass:ip_tos = property(_libtrace.libtrace_ip_ip_tos_get, _libtrace.libtrace_ip_ip_tos_set)
69    __swig_setmethods__["ip_ttl"] = _libtrace.libtrace_ip_ip_ttl_set
70    __swig_getmethods__["ip_ttl"] = _libtrace.libtrace_ip_ip_ttl_get
71    if _newclass:ip_ttl = property(_libtrace.libtrace_ip_ip_ttl_get, _libtrace.libtrace_ip_ip_ttl_set)
72    __swig_setmethods__["ip_p"] = _libtrace.libtrace_ip_ip_p_set
73    __swig_getmethods__["ip_p"] = _libtrace.libtrace_ip_ip_p_get
74    if _newclass:ip_p = property(_libtrace.libtrace_ip_ip_p_get, _libtrace.libtrace_ip_ip_p_set)
75    __swig_getmethods__["ip_sum"] = _libtrace.libtrace_ip_ip_sum_get
76    if _newclass:ip_sum = property(_libtrace.libtrace_ip_ip_sum_get)
77    __swig_getmethods__["ip_len"] = _libtrace.libtrace_ip_ip_len_get
78    if _newclass:ip_len = property(_libtrace.libtrace_ip_ip_len_get)
79    __swig_getmethods__["ip_id"] = _libtrace.libtrace_ip_ip_id_get
80    if _newclass:ip_id = property(_libtrace.libtrace_ip_ip_id_get)
81    __swig_getmethods__["ip_off"] = _libtrace.libtrace_ip_ip_off_get
82    if _newclass:ip_off = property(_libtrace.libtrace_ip_ip_off_get)
83    __swig_getmethods__["ip_src"] = _libtrace.libtrace_ip_ip_src_get
84    if _newclass:ip_src = property(_libtrace.libtrace_ip_ip_src_get)
85    __swig_getmethods__["ip_dst"] = _libtrace.libtrace_ip_ip_dst_get
86    if _newclass:ip_dst = property(_libtrace.libtrace_ip_ip_dst_get)
87    def __del__(self, destroy=_libtrace.delete_libtrace_ip):
88        try:
89            if self.thisown: destroy(self)
90        except: pass
91
92class libtrace_ipPtr(libtrace_ip):
93    def __init__(self, this):
94        _swig_setattr(self, libtrace_ip, 'this', this)
95        if not hasattr(self,"thisown"): _swig_setattr(self, libtrace_ip, 'thisown', 0)
96        _swig_setattr(self, libtrace_ip,self.__class__,libtrace_ip)
97_libtrace.libtrace_ip_swigregister(libtrace_ipPtr)
98IP_RF = _libtrace.IP_RF
99IP_DF = _libtrace.IP_DF
100IP_MF = _libtrace.IP_MF
101IP_OFFMASK = _libtrace.IP_OFFMASK
102
103class libtrace_tcp(_object):
104    __swig_setmethods__ = {}
105    __setattr__ = lambda self, name, value: _swig_setattr(self, libtrace_tcp, name, value)
106    __swig_getmethods__ = {}
107    __getattr__ = lambda self, name: _swig_getattr(self, libtrace_tcp, name)
108    def __init__(self): raise RuntimeError, "No constructor defined"
109    def __repr__(self):
110        return "<C libtrace_tcp instance at %s>" % (self.this,)
111    __swig_setmethods__["res1"] = _libtrace.libtrace_tcp_res1_set
112    __swig_getmethods__["res1"] = _libtrace.libtrace_tcp_res1_get
113    if _newclass:res1 = property(_libtrace.libtrace_tcp_res1_get, _libtrace.libtrace_tcp_res1_set)
114    __swig_setmethods__["doff"] = _libtrace.libtrace_tcp_doff_set
115    __swig_getmethods__["doff"] = _libtrace.libtrace_tcp_doff_get
116    if _newclass:doff = property(_libtrace.libtrace_tcp_doff_get, _libtrace.libtrace_tcp_doff_set)
117    __swig_setmethods__["fin"] = _libtrace.libtrace_tcp_fin_set
118    __swig_getmethods__["fin"] = _libtrace.libtrace_tcp_fin_get
119    if _newclass:fin = property(_libtrace.libtrace_tcp_fin_get, _libtrace.libtrace_tcp_fin_set)
120    __swig_setmethods__["syn"] = _libtrace.libtrace_tcp_syn_set
121    __swig_getmethods__["syn"] = _libtrace.libtrace_tcp_syn_get
122    if _newclass:syn = property(_libtrace.libtrace_tcp_syn_get, _libtrace.libtrace_tcp_syn_set)
123    __swig_setmethods__["rst"] = _libtrace.libtrace_tcp_rst_set
124    __swig_getmethods__["rst"] = _libtrace.libtrace_tcp_rst_get
125    if _newclass:rst = property(_libtrace.libtrace_tcp_rst_get, _libtrace.libtrace_tcp_rst_set)
126    __swig_setmethods__["psh"] = _libtrace.libtrace_tcp_psh_set
127    __swig_getmethods__["psh"] = _libtrace.libtrace_tcp_psh_get
128    if _newclass:psh = property(_libtrace.libtrace_tcp_psh_get, _libtrace.libtrace_tcp_psh_set)
129    __swig_setmethods__["ack"] = _libtrace.libtrace_tcp_ack_set
130    __swig_getmethods__["ack"] = _libtrace.libtrace_tcp_ack_get
131    if _newclass:ack = property(_libtrace.libtrace_tcp_ack_get, _libtrace.libtrace_tcp_ack_set)
132    __swig_setmethods__["urg"] = _libtrace.libtrace_tcp_urg_set
133    __swig_getmethods__["urg"] = _libtrace.libtrace_tcp_urg_get
134    if _newclass:urg = property(_libtrace.libtrace_tcp_urg_get, _libtrace.libtrace_tcp_urg_set)
135    __swig_setmethods__["res2"] = _libtrace.libtrace_tcp_res2_set
136    __swig_getmethods__["res2"] = _libtrace.libtrace_tcp_res2_get
137    if _newclass:res2 = property(_libtrace.libtrace_tcp_res2_get, _libtrace.libtrace_tcp_res2_set)
138    __swig_getmethods__["source"] = _libtrace.libtrace_tcp_source_get
139    if _newclass:source = property(_libtrace.libtrace_tcp_source_get)
140    __swig_getmethods__["dest"] = _libtrace.libtrace_tcp_dest_get
141    if _newclass:dest = property(_libtrace.libtrace_tcp_dest_get)
142    __swig_getmethods__["window"] = _libtrace.libtrace_tcp_window_get
143    if _newclass:window = property(_libtrace.libtrace_tcp_window_get)
144    __swig_getmethods__["check"] = _libtrace.libtrace_tcp_check_get
145    if _newclass:check = property(_libtrace.libtrace_tcp_check_get)
146    __swig_getmethods__["urg_ptr"] = _libtrace.libtrace_tcp_urg_ptr_get
147    if _newclass:urg_ptr = property(_libtrace.libtrace_tcp_urg_ptr_get)
148    __swig_getmethods__["seq"] = _libtrace.libtrace_tcp_seq_get
149    if _newclass:seq = property(_libtrace.libtrace_tcp_seq_get)
150    __swig_getmethods__["ack_seq"] = _libtrace.libtrace_tcp_ack_seq_get
151    if _newclass:ack_seq = property(_libtrace.libtrace_tcp_ack_seq_get)
152    def __del__(self, destroy=_libtrace.delete_libtrace_tcp):
153        try:
154            if self.thisown: destroy(self)
155        except: pass
156
157class libtrace_tcpPtr(libtrace_tcp):
158    def __init__(self, this):
159        _swig_setattr(self, libtrace_tcp, 'this', this)
160        if not hasattr(self,"thisown"): _swig_setattr(self, libtrace_tcp, 'thisown', 0)
161        _swig_setattr(self, libtrace_tcp,self.__class__,libtrace_tcp)
162_libtrace.libtrace_tcp_swigregister(libtrace_tcpPtr)
163
164class libtrace_udp(_object):
165    __swig_setmethods__ = {}
166    __setattr__ = lambda self, name, value: _swig_setattr(self, libtrace_udp, name, value)
167    __swig_getmethods__ = {}
168    __getattr__ = lambda self, name: _swig_getattr(self, libtrace_udp, name)
169    def __init__(self): raise RuntimeError, "No constructor defined"
170    def __repr__(self):
171        return "<C libtrace_udp instance at %s>" % (self.this,)
172    __swig_getmethods__["source"] = _libtrace.libtrace_udp_source_get
173    if _newclass:source = property(_libtrace.libtrace_udp_source_get)
174    __swig_getmethods__["dest"] = _libtrace.libtrace_udp_dest_get
175    if _newclass:dest = property(_libtrace.libtrace_udp_dest_get)
176    __swig_getmethods__["len"] = _libtrace.libtrace_udp_len_get
177    if _newclass:len = property(_libtrace.libtrace_udp_len_get)
178    __swig_getmethods__["check"] = _libtrace.libtrace_udp_check_get
179    if _newclass:check = property(_libtrace.libtrace_udp_check_get)
180    def __del__(self, destroy=_libtrace.delete_libtrace_udp):
181        try:
182            if self.thisown: destroy(self)
183        except: pass
184
185class libtrace_udpPtr(libtrace_udp):
186    def __init__(self, this):
187        _swig_setattr(self, libtrace_udp, 'this', this)
188        if not hasattr(self,"thisown"): _swig_setattr(self, libtrace_udp, 'thisown', 0)
189        _swig_setattr(self, libtrace_udp,self.__class__,libtrace_udp)
190_libtrace.libtrace_udp_swigregister(libtrace_udpPtr)
191
192class libtrace_icmp(_object):
193    __swig_setmethods__ = {}
194    __setattr__ = lambda self, name, value: _swig_setattr(self, libtrace_icmp, name, value)
195    __swig_getmethods__ = {}
196    __getattr__ = lambda self, name: _swig_getattr(self, libtrace_icmp, name)
197    def __init__(self): raise RuntimeError, "No constructor defined"
198    def __repr__(self):
199        return "<C libtrace_icmp instance at %s>" % (self.this,)
200    __swig_setmethods__["type"] = _libtrace.libtrace_icmp_type_set
201    __swig_getmethods__["type"] = _libtrace.libtrace_icmp_type_get
202    if _newclass:type = property(_libtrace.libtrace_icmp_type_get, _libtrace.libtrace_icmp_type_set)
203    __swig_setmethods__["code"] = _libtrace.libtrace_icmp_code_set
204    __swig_getmethods__["code"] = _libtrace.libtrace_icmp_code_get
205    if _newclass:code = property(_libtrace.libtrace_icmp_code_get, _libtrace.libtrace_icmp_code_set)
206    __swig_setmethods__["checksum"] = _libtrace.libtrace_icmp_checksum_set
207    __swig_getmethods__["checksum"] = _libtrace.libtrace_icmp_checksum_get
208    if _newclass:checksum = property(_libtrace.libtrace_icmp_checksum_get, _libtrace.libtrace_icmp_checksum_set)
209    __swig_getmethods__["un"] = _libtrace.libtrace_icmp_un_get
210    if _newclass:un = property(_libtrace.libtrace_icmp_un_get)
211    def __del__(self, destroy=_libtrace.delete_libtrace_icmp):
212        try:
213            if self.thisown: destroy(self)
214        except: pass
215
216class libtrace_icmpPtr(libtrace_icmp):
217    def __init__(self, this):
218        _swig_setattr(self, libtrace_icmp, 'this', this)
219        if not hasattr(self,"thisown"): _swig_setattr(self, libtrace_icmp, 'thisown', 0)
220        _swig_setattr(self, libtrace_icmp,self.__class__,libtrace_icmp)
221_libtrace.libtrace_icmp_swigregister(libtrace_icmpPtr)
222
223class libtrace_icmp_un(_object):
224    __swig_setmethods__ = {}
225    __setattr__ = lambda self, name, value: _swig_setattr(self, libtrace_icmp_un, name, value)
226    __swig_getmethods__ = {}
227    __getattr__ = lambda self, name: _swig_getattr(self, libtrace_icmp_un, name)
228    def __init__(self): raise RuntimeError, "No constructor defined"
229    def __repr__(self):
230        return "<C libtrace_icmp_un instance at %s>" % (self.this,)
231    __swig_setmethods__["gateway"] = _libtrace.libtrace_icmp_un_gateway_set
232    __swig_getmethods__["gateway"] = _libtrace.libtrace_icmp_un_gateway_get
233    if _newclass:gateway = property(_libtrace.libtrace_icmp_un_gateway_get, _libtrace.libtrace_icmp_un_gateway_set)
234    __swig_getmethods__["frag"] = _libtrace.libtrace_icmp_un_frag_get
235    if _newclass:frag = property(_libtrace.libtrace_icmp_un_frag_get)
236    __swig_getmethods__["echo"] = _libtrace.libtrace_icmp_un_echo_get
237    if _newclass:echo = property(_libtrace.libtrace_icmp_un_echo_get)
238
239class libtrace_icmp_unPtr(libtrace_icmp_un):
240    def __init__(self, this):
241        _swig_setattr(self, libtrace_icmp_un, 'this', this)
242        if not hasattr(self,"thisown"): _swig_setattr(self, libtrace_icmp_un, 'thisown', 0)
243        _swig_setattr(self, libtrace_icmp_un,self.__class__,libtrace_icmp_un)
244_libtrace.libtrace_icmp_un_swigregister(libtrace_icmp_unPtr)
245
246class libtrace_icmp_un_frag(_object):
247    __swig_setmethods__ = {}
248    __setattr__ = lambda self, name, value: _swig_setattr(self, libtrace_icmp_un_frag, name, value)
249    __swig_getmethods__ = {}
250    __getattr__ = lambda self, name: _swig_getattr(self, libtrace_icmp_un_frag, name)
251    def __init__(self): raise RuntimeError, "No constructor defined"
252    def __repr__(self):
253        return "<C libtrace_icmp_un_frag instance at %s>" % (self.this,)
254    __swig_setmethods__["__unused"] = _libtrace.libtrace_icmp_un_frag___unused_set
255    __swig_getmethods__["__unused"] = _libtrace.libtrace_icmp_un_frag___unused_get
256    if _newclass:__unused = property(_libtrace.libtrace_icmp_un_frag___unused_get, _libtrace.libtrace_icmp_un_frag___unused_set)
257    __swig_setmethods__["mtu"] = _libtrace.libtrace_icmp_un_frag_mtu_set
258    __swig_getmethods__["mtu"] = _libtrace.libtrace_icmp_un_frag_mtu_get
259    if _newclass:mtu = property(_libtrace.libtrace_icmp_un_frag_mtu_get, _libtrace.libtrace_icmp_un_frag_mtu_set)
260
261class libtrace_icmp_un_fragPtr(libtrace_icmp_un_frag):
262    def __init__(self, this):
263        _swig_setattr(self, libtrace_icmp_un_frag, 'this', this)
264        if not hasattr(self,"thisown"): _swig_setattr(self, libtrace_icmp_un_frag, 'thisown', 0)
265        _swig_setattr(self, libtrace_icmp_un_frag,self.__class__,libtrace_icmp_un_frag)
266_libtrace.libtrace_icmp_un_frag_swigregister(libtrace_icmp_un_fragPtr)
267
268class libtrace_icmp_un_echo(_object):
269    __swig_setmethods__ = {}
270    __setattr__ = lambda self, name, value: _swig_setattr(self, libtrace_icmp_un_echo, name, value)
271    __swig_getmethods__ = {}
272    __getattr__ = lambda self, name: _swig_getattr(self, libtrace_icmp_un_echo, name)
273    def __init__(self): raise RuntimeError, "No constructor defined"
274    def __repr__(self):
275        return "<C libtrace_icmp_un_echo instance at %s>" % (self.this,)
276    __swig_setmethods__["id"] = _libtrace.libtrace_icmp_un_echo_id_set
277    __swig_getmethods__["id"] = _libtrace.libtrace_icmp_un_echo_id_get
278    if _newclass:id = property(_libtrace.libtrace_icmp_un_echo_id_get, _libtrace.libtrace_icmp_un_echo_id_set)
279    __swig_setmethods__["sequence"] = _libtrace.libtrace_icmp_un_echo_sequence_set
280    __swig_getmethods__["sequence"] = _libtrace.libtrace_icmp_un_echo_sequence_get
281    if _newclass:sequence = property(_libtrace.libtrace_icmp_un_echo_sequence_get, _libtrace.libtrace_icmp_un_echo_sequence_set)
282
283class libtrace_icmp_un_echoPtr(libtrace_icmp_un_echo):
284    def __init__(self, this):
285        _swig_setattr(self, libtrace_icmp_un_echo, 'this', this)
286        if not hasattr(self,"thisown"): _swig_setattr(self, libtrace_icmp_un_echo, 'thisown', 0)
287        _swig_setattr(self, libtrace_icmp_un_echo,self.__class__,libtrace_icmp_un_echo)
288_libtrace.libtrace_icmp_un_echo_swigregister(libtrace_icmp_un_echoPtr)
289
290class Packet(_object):
291    __swig_setmethods__ = {}
292    __setattr__ = lambda self, name, value: _swig_setattr(self, Packet, name, value)
293    __swig_getmethods__ = {}
294    __getattr__ = lambda self, name: _swig_getattr(self, Packet, name)
295    def __repr__(self):
296        return "<C libtrace_packet_t instance at %s>" % (self.this,)
297    __swig_setmethods__["trace"] = _libtrace.Packet_trace_set
298    __swig_getmethods__["trace"] = _libtrace.Packet_trace_get
299    if _newclass:trace = property(_libtrace.Packet_trace_get, _libtrace.Packet_trace_set)
300    __swig_setmethods__["buffer"] = _libtrace.Packet_buffer_set
301    __swig_getmethods__["buffer"] = _libtrace.Packet_buffer_get
302    if _newclass:buffer = property(_libtrace.Packet_buffer_get, _libtrace.Packet_buffer_set)
303    __swig_setmethods__["size"] = _libtrace.Packet_size_set
304    __swig_getmethods__["size"] = _libtrace.Packet_size_get
305    if _newclass:size = property(_libtrace.Packet_size_get, _libtrace.Packet_size_set)
306    __swig_setmethods__["status"] = _libtrace.Packet_status_set
307    __swig_getmethods__["status"] = _libtrace.Packet_status_get
308    if _newclass:status = property(_libtrace.Packet_status_get, _libtrace.Packet_status_set)
309    def __init__(self, *args):
310        _swig_setattr(self, Packet, 'this', _libtrace.new_Packet(*args))
311        _swig_setattr(self, Packet, 'thisown', 1)
312    def __del__(self, destroy=_libtrace.delete_Packet):
313        try:
314            if self.thisown: destroy(self)
315        except: pass
316    def trace_get_ip(*args): return _libtrace.Packet_trace_get_ip(*args)
317    def trace_get_tcp(*args): return _libtrace.Packet_trace_get_tcp(*args)
318    def trace_get_udp(*args): return _libtrace.Packet_trace_get_udp(*args)
319    def trace_get_icmp(*args): return _libtrace.Packet_trace_get_icmp(*args)
320    def trace_get_seconds(*args): return _libtrace.Packet_trace_get_seconds(*args)
321
322class PacketPtr(Packet):
323    def __init__(self, this):
324        _swig_setattr(self, Packet, 'this', this)
325        if not hasattr(self,"thisown"): _swig_setattr(self, Packet, 'thisown', 0)
326        _swig_setattr(self, Packet,self.__class__,Packet)
327_libtrace.Packet_swigregister(PacketPtr)
328
329class Trace(_object):
330    __swig_setmethods__ = {}
331    __setattr__ = lambda self, name, value: _swig_setattr(self, Trace, name, value)
332    __swig_getmethods__ = {}
333    __getattr__ = lambda self, name: _swig_getattr(self, Trace, name)
334    def __repr__(self):
335        return "<C libtrace_t instance at %s>" % (self.this,)
336    def __init__(self, *args):
337        _swig_setattr(self, Trace, 'this', _libtrace.new_Trace(*args))
338        _swig_setattr(self, Trace, 'thisown', 1)
339    def __del__(self, destroy=_libtrace.delete_Trace):
340        try:
341            if self.thisown: destroy(self)
342        except: pass
343    def trace_read_packet(*args): return _libtrace.Trace_trace_read_packet(*args)
344
345class TracePtr(Trace):
346    def __init__(self, this):
347        _swig_setattr(self, Trace, 'this', this)
348        if not hasattr(self,"thisown"): _swig_setattr(self, Trace, 'thisown', 0)
349        _swig_setattr(self, Trace,self.__class__,Trace)
350_libtrace.Trace_swigregister(TracePtr)
351
352
Note: See TracBrowser for help on using the repository browser.