Commit Graph

34 Commits

Author SHA1 Message Date
Jeff Morriss 729de1a635 As suggested in http://www.wireshark.org/lists/wireshark-dev/200809/msg00075.html
(as referenced in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2907 ) and
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3411 :

Write a new convenience routine for finding a conversation and, if it is not
found, create it.  The frame number and addresses are taken from pinfo (as is
the common case).

Use this function in a bunch of dissectors.

svn path=/trunk/; revision=32790
2010-05-13 18:28:34 +00:00
Bill Meier c5614625ee Fix some gcc -Wshadow warnings ....
svn path=/trunk/; revision=31559
2010-01-18 23:16:10 +00:00
Kovarththanan Rajaratnam 65c53fedb6 Don't guard col_append_str with check_col
svn path=/trunk/; revision=30125
2009-09-24 20:00:21 +00:00
Kovarththanan Rajaratnam 6110a96f68 Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29345
2009-08-09 07:59:51 +00:00
Stig Bjørlykke 4d8dd01e8e Changed flags_set_truth -> tfs_set_notset
svn path=/trunk/; revision=28989
2009-07-07 14:54:15 +00:00
Stig Bjørlykke b228488bc0 From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
    for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
    FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero

svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Bill Meier 7172127412 #include reassemble.h not req'd
svn path=/trunk/; revision=27911
2009-03-31 12:08:44 +00:00
Jeff Morriss 8320827203 Fix conversation tracking bug noticed in:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3216#c2

(Basically: how the dissector was dissecting frames--in the GUI--changed based
on the order you had clicked on them.)

... by rewriting how the frame states are maintained: rather than maintaining
a g_hash table of frames and their states, hang the (now se_alloc'd) frame
data off the frame (using p_*_proto_data()).

svn path=/trunk/; revision=27575
2009-03-01 21:37:30 +00:00
Jeff Morriss 6ce992885e From Toralf Forster via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3216 :
Implement mysql_dissect_row_packet().

From me: change all tvb_length_remaining() calls to
tvb_reported_length_remaining() so the dissector will throw an exception if
the packets are truncated.

svn path=/trunk/; revision=27568
2009-02-28 19:30:56 +00:00
Jeff Morriss 2a516cfe4d Remove a whole bunch of if(tree)'s that were protecting single
proto_tree_add_*() calls: those APIs check if tree is NULL too and taking
out the dissector's ifs makes the code easier to read.

svn path=/trunk/; revision=27567
2009-02-28 19:14:14 +00:00
Bill Meier a8f30cbca1 Fix some typos and spelling (mostly in text strings)
svn path=/trunk/; revision=27037
2008-12-17 17:23:37 +00:00
Bill Meier 3e347bb88c Minor cleanups related to proto_reg_handoff
svn path=/trunk/; revision=26277
2008-09-26 17:04:01 +00:00
Jeff Morriss a5ca07247b conv_frame_states is an array of pointers, make it a GPtrArray instead of a GArray with casts
svn path=/trunk/; revision=25754
2008-07-16 13:29:21 +00:00
Stig Bjørlykke 1d4deb0f19 From Jess Balint (bug 2700):
Implement field decoding in mysql protocol dissector.

svn path=/trunk/; revision=25728
2008-07-12 20:02:10 +00:00
Jeff Morriss 75849c12f1 s/%ll/%" G_GINT64_MODIFIER "/g
svn path=/trunk/; revision=24181
2008-01-24 21:57:13 +00:00
Anders Broman 1950ffc214 Apply the small performance enhancment patches for:
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster.
Replace 
- col_append_fstr() with faster  col_append_str() 
- col_add_str() with col_set_str()
when it's safe

svn path=/trunk/; revision=23252
2007-10-23 05:50:00 +00:00
Jeff Morriss 3dec62b85c - s/ntohs/g_ntohs
- s/ntohl/g_ntohl
- s/free/g_free
- Change some tvb_get_string()+g_free()'s into tvb_get_ephemeral_string()
- Change some tvb_fake_unicode()+g_free()'s into tvb_get_ephemeral_faked_unicode()
- Change some tvb_get_string() calls that were clearly memory leaks (like
  atoi(tvb_get_string(...))) into tvb_get_ephemeral_string()

svn path=/trunk/; revision=22515
2007-08-15 22:27:52 +00:00
Jeff Morriss fae881dc45 Put register_dissector() call back in
svn path=/trunk/; revision=22359
2007-07-19 15:11:34 +00:00
Stephen Fisher d1357063ae From Jess Balint:
a patch to fix the state management for the MySQL protocol dissector.


svn path=/trunk/; revision=22339
2007-07-17 21:50:29 +00:00
Stephen Fisher c053b3c769 From Martin Warnes:
Attached is a small patch that adds a preference option to allow the SQL
Query string to be appended to the INFO column display. This makes life
a little bit easier when scanning a trace to find the packet associated
with a specific query. I thought it was better to implement it as a
preference option with default set FALSE as it can clutter up the
display for applications that generate large amounts of queries.

svn path=/trunk/; revision=22130
2007-06-18 19:08:59 +00:00
Stephen Fisher 9c24cd4036 From Martin Warnes:
Currently the MySQL dissector assumes that an OK-Packet Response
contains the Server_Status field. Having checked the MySQL protocol page
I can't say conclusively whether it should or it shouldn't, however I've
come across a couple of MySQL Java clients that receive the OK-Packet
without the Server_Status field set in response to a "SET AUTOCOMMIT" call.
 
The attached patched simply adds a check to ensure the Server_Status
field is present before calling function mysql_dissect_server_status.


svn path=/trunk/; revision=22129
2007-06-18 18:57:58 +00:00
Jaap Keuter dc0d48928a From Martin Warnesi:
Attached updated patch to use "dissect_mysql_pdu" instead of
"dissect_mysql" when registering the protocol dissector.

svn path=/trunk/; revision=20021
2006-11-30 07:15:17 +00:00
Ronnie Sahlberg 2d1bb39121 change the signature for the get_pdu_len() function pointer passed to tcp_dissect_pdus() to also include a packet_info pointer.
there are many reasons why some protocols actually need to be able to access the pinfo structure while determining the pdu size



svn path=/trunk/; revision=19751
2006-10-31 09:29:07 +00:00
Anders Broman f47dfde23a Remove leftover(?) plugin code.
svn path=/trunk/; revision=18761
2006-07-18 21:16:02 +00:00
Ronnie Sahlberg 847090fe54 fix coverity 188
at the same time, get rid of some unused parameter compiler warnings


svn path=/trunk/; revision=18493
2006-06-17 10:47:10 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Anders Broman 8d6661b911 From Axel Schwenke:
- complete dissector for greeting/login packets
- nearly complete dissector for requests, except:
  + parameters for COM_EXECUTE
  + requests from replication slave
- added some features to response dissectors

svn path=/trunk/; revision=18174
2006-05-16 19:07:48 +00:00
Jaap Keuter 1ce378de2a Fix for bug 881. Adding processing of error packet when server greeting is expected.
svn path=/trunk/; revision=18047
2006-04-30 10:33:36 +00:00
Ronnie Sahlberg f331077a60 waste a couple of bytes per tcp conversation and make the tree for acked_packets (i.e. packets that have interesting tcp properties such as being retransmissions etc) hang off the per conversation tcpd struct instead of being global.
while this should improve performance by unmeasurably little it does have the sideeffect that once we finish the rewrite   tcp analysis might actually work and work well even for tcp over tcp tunnelling. 

this also means that if you include packet-tcp.h   you also need to include emem.h .




svn path=/trunk/; revision=17681
2006-03-20 10:52:53 +00:00
Lars Roland ec9ca01616 Move the following files from /trunk to /trunk/epan:
asn1.[ch]
follow.[ch]
ptvcursor.[ch]
reassemble.[ch]
xmlstub.[ch]

fix #include statements accordingly.

svn path=/trunk/; revision=13366
2005-02-09 23:38:00 +00:00
Anders Broman 851ecd2ac4 From Jon Ringle:
1) Added a setup_frame parameter to conversation_t
2) Used the conversation_t next to maintain a list of conversations with the 
same src/dest tuple but different setup_frame number.
3) Changed the signature of find_conversation() and conversation_new() to pass 
in the frame number.
4) Adjusted packet-sdp to select RTP conversation if both m=audio and m=image 
are present, and T.38 conversation if only m=image is present. I expect that 
RTP/T.38 dissecting to be better, but I don't have a way to generate T.38 
packets.

svn path=/trunk/; revision=13243
2005-02-02 20:07:03 +00:00
Guy Harris bbe7f89742 Move prefs.c and prefs.h into the epan subdirectory.
svn path=/trunk/; revision=12115
2004-09-27 22:55:15 +00:00
Ulf Lamping d530bd4e14 Prevent the word "desegmentation" at the GUI, but use reassembling at that places, as we also use "defragmentation" and "reassembling". Use reassembling as the general term for such actions.
I (hopefully) didn't changed any protocol fields or preference file names, but only the GUI labels appearing in the protocol display and the protocol preferences.

Also added a note to the protocol preferences (where appropriate), that you have to enable "Allow subdissectors to reassemble TCP streams" at the corresponding protocol settings for TCP reassembling to take effect.

If you encounter any mistakes I've made here, please let me know...

svn path=/trunk/; revision=11784
2004-08-21 09:02:52 +00:00
Gilbert Ramirez 669db206cb Move dissectors to epan/dissectors directory.
Also move ncp222.py, x11-fields, process-x11-fields.pl,
make-reg-dotc, and make-reg-dotc.py.

Adjust #include lines in files that include packet-*.h
files.

svn path=/trunk/; revision=11410
2004-07-18 18:06:47 +00:00