Rather than complain and quit if -V is missing when -O <protocols> is used, do the...
[obnox/wireshark/wip.git] / doc / README.python
1 Help on module wspy_dissector:
2
3 NAME
4     wspy_dissector
5
6 FILE
7     /Users/standel/xcode/wireshark/wireshark.git/epan/wspython/wspy_dissector.py
8
9 DESCRIPTION
10     # wspy_dissector.py
11     #
12     # $Id: $
13     #
14     # Wireshark Protocol Python Binding
15     #
16     # Copyright (c) 2009 by Sebastien Tandel <sebastien [AT] tandel [dot] be>
17     # Copyright (c) 2001 by Gerald Combs <gerald@wireshark.org>
18     #
19     # This program is free software; you can redistribute it and/or
20     # modify it under the terms of the GNU General Public License
21     # as published by the Free Software Foundation; either version 2
22     # of the License, or (at your option) any later version.
23     #
24     # This program is distributed in the hope that it will be useful,
25     # but WITHOUT ANY WARRANTY; without even the implied warranty of
26     # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27     # GNU General Public License for more details.
28     #
29     # You should have received a copy of the GNU General Public License
30     # along with this program; if not, write to the Free Software
31     # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
32
33 CLASSES
34     __builtin__.object
35         Dissector
36         Subtree
37         TVB
38         Tree
39         register_info
40     
41     class Dissector(__builtin__.object)
42      |  #Dissector class : base class to write a dissector in python
43      |  
44      |  Methods defined here:
45      |  
46      |  __hash__(self)
47      |  
48      |  __init__(self, protocol_name, short_desc, short)
49      |  
50      |  __str__(self)
51      |  
52      |  __unicode__(self)
53      |  
54      |  advance(self, step)
55      |      method used to change the value of the offset
56      |  
57      |  create_dissector_handle(self, protocol=None)
58      |      create_dissector_handle : see proto.h
59      |  
60      |  display(self)
61      |  
62      |  dissect(self)
63      |      point of entry when starting dissecting a packet. This method must be
64      |      therefore overloaded by the object implementing the dissector of a specific
65      |      protocol.
66      |  
67      |  find_dissector(self, protocol)
68      |      find_dissector : see proto.h
69      |  
70      |  pre_dissect(self)
71      |      private method executed right before dissect in order to retrieve some
72      |      internal information and enabling the possibility to add the base tree of
73      |      this protocol dissection to the tree without any user intervention
74      |  
75      |  protocol(self)
76      |  
77      |  protocol_ids(self)
78      |      defined a list of tuples containing three values. Each tuple is defining
79      |      the parameters of dissector_add_uint(). This function MUST be defined when
80      |      implementing the dissector of a specific protocol.
81      |  
82      |  register_handoff(self)
83      |      private method used during the registration of protocol dissectors
84      |  
85      |  register_protocol(self)
86      |      private function called by libwireshark when registering all
87      |      protocols
88      |  
89      |  ----------------------------------------------------------------------
90      |  Data descriptors defined here:
91      |  
92      |  __dict__
93      |      dictionary for instance variables (if defined)
94      |  
95      |  __weakref__
96      |      list of weak references to the object (if defined)
97      |  
98      |  hf
99      |      hf property : hf_register_info fields. every defined field is available
100      |      as an attribute of this object
101      |  
102      |  libhandle
103      |      libhandle property : return a handle to the libwireshark lib. You don't
104      |      want to use this in normal situation. Use it only if you know what you're
105      |      doing.
106      |  
107      |  offset
108      |      offset property : if is the current offset computed from the
109      |      dissection.
110      |  
111      |  raw_pinfo
112      |      raw_pinfo property : return the raw pinfo pointer. You can use this with
113      |      libhandle. You don't want to use this in normal situation. Use it only if
114      |      you know what you're doing.
115      |  
116      |  raw_tree
117      |      raw_tree property : returns the raw tree pointer. You can use this with
118      |      libhandle. You don't want to use this in normal situation. Use it only if
119      |      you know what you're doing.
120      |  
121      |  raw_tvb
122      |      raw_tvb property : returns the raw tvb pointer. You can use this with
123      |      libhandle. You don't want to use this in normal situation. Use it only if
124      |      you know what you're doing.
125      |  
126      |  subtrees
127      |      subtrees property : subtress definition. every subtree added is
128      |      accessible as an attribute of this object
129      |  
130      |  tree
131      |      tree property : initial tree at the start of the dissection
132     
133     class Subtree(__builtin__.object)
134      |  #Subtrees definition
135      |  #Every subtree added can be accesses as an attribute after having been
136      |  #registered
137      |  
138      |  Methods defined here:
139      |  
140      |  __getattr__(self, name)
141      |  
142      |  __init__(self, wsl, protocol)
143      |  
144      |  add(self, name)
145      |  
146      |  has_user_defined_protocol_tree(self)
147      |  
148      |  register(self)
149      |  
150      |  ----------------------------------------------------------------------
151      |  Data descriptors defined here:
152      |  
153      |  __dict__
154      |      dictionary for instance variables (if defined)
155      |  
156      |  __weakref__
157      |      list of weak references to the object (if defined)
158     
159     class TVB(__builtin__.object)
160      |  #tvb class implementation
161      |  #see proto.h
162      |  
163      |  Methods defined here:
164      |  
165      |  __init__(self, wsl, tvb, dissector)
166      |  
167      |  get_guint8(self, offset=-1)
168      |  
169      |  get_letohl(self, offset=-1)
170      |  
171      |  get_letohs(self, offset=-1)
172      |  
173      |  get_ntohl(self, offset=-1)
174      |  
175      |  get_ntohs(self, offset=-1)
176      |  
177      |  get_ptr(self, offset=-1)
178      |      #STA TODO : check that we can do that
179      |  
180      |  length(self)
181      |  
182      |  length_remaining(self, offset=-1)
183      |  
184      |  reported_length(self)
185      |  
186      |  reported_length_remaining(self, offset=-1)
187      |  
188      |  ----------------------------------------------------------------------
189      |  Data descriptors defined here:
190      |  
191      |  __dict__
192      |      dictionary for instance variables (if defined)
193      |  
194      |  __weakref__
195      |      list of weak references to the object (if defined)
196     
197     class Tree(__builtin__.object)
198      |  #Tree class implementation
199      |  #see proto.h
200      |  
201      |  Methods defined here:
202      |  
203      |  __init__(self, tree, dissector)
204      |  
205      |  add_item(self, field, offset=0, length=-1, little_endian=False, adv=True)
206      |      add an item to the tree
207      |  
208      |  add_subtree(self, subtree)
209      |      add a subtree to the tree
210      |  
211      |  add_text(self, string, offset=0, length=-1, adv=True)
212      |      add text to the tree
213      |  
214      |  add_uint(self, field, value, offset=0, length=4, adv=True)
215      |      add unsigned integer to the tree
216      |  
217      |  ----------------------------------------------------------------------
218      |  Data descriptors defined here:
219      |  
220      |  __dict__
221      |      dictionary for instance variables (if defined)
222      |  
223      |  __weakref__
224      |      list of weak references to the object (if defined)
225      |  
226      |  raw_tree
227     
228     class register_info(__builtin__.object)
229      |  # hf_register_info from usual dissectors
230      |  
231      |  Methods defined here:
232      |  
233      |  __del__(self)
234      |  
235      |  __init__(self, wsl)
236      |  
237      |  add(self, name, short_desc, type=6, display=1, strings=None, bitmask=0, desc=None)
238      |  
239      |  display(self)
240      |  
241      |  get(self)
242      |  
243      |  register(self, protocol)
244      |  
245      |  ----------------------------------------------------------------------
246      |  Data descriptors defined here:
247      |  
248      |  __dict__
249      |      dictionary for instance variables (if defined)
250      |  
251      |  __weakref__
252      |      list of weak references to the object (if defined)
253
254 FUNCTIONS
255     POINTER(...)
256     
257     pointer(...)
258
259 DATA
260     BASE_CUSTOM = 6
261     BASE_DEC = 1
262     BASE_DEC_HEX = 4
263     BASE_HEX = 2
264     BASE_HEX_DEC = 5
265     BASE_NONE = 0
266     BASE_OCT = 3
267     FT_ABSOLUTE_TIME = 15
268     FT_BOOLEAN = 2
269     FT_BYTES = 22
270     FT_DOUBLE = 14
271     FT_EBCDIC = 19
272     FT_ETHER = 21
273     FT_FLOAT = 13
274     FT_FRAMENUM = 27
275     FT_GUID = 29
276     FT_INT16 = 9
277     FT_INT24 = 10
278     FT_INT32 = 11
279     FT_INT64 = 12
280     FT_INT8 = 8
281     FT_IPXNET = 26
282     FT_IPv4 = 24
283     FT_IPv6 = 25
284     FT_NONE = 0
285     FT_OID = 30
286     FT_PCRE = 28
287     FT_PROTOCOL = 1
288     FT_RELATIVE_TIME = 16
289     FT_STRING = 17
290     FT_STRINGZ = 18
291     FT_UINT16 = 4
292     FT_UINT24 = 5
293     FT_UINT32 = 6
294     FT_UINT64 = 7
295     FT_UINT8 = 3
296     FT_UINT_BYTES = 23
297     FT_UINT_STRING = 20
298
299