Commit Graph

27 Commits

Author SHA1 Message Date
Guy Harris 9c89cdaaa3 strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delenda
est.  Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our
own versions if they're missing from GLib (as is the case with GLib
1.x).

In the code to build the list of named fields for Diameter, don't use
g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping
in the hash function and use g_ascii_strcasecmp() in the compare
function.

We do this because there is no guarantee that toupper(), tolower(), and
functions that use them will, for example, map between "I" and "i" in
all locales; in Turkish locales, for example, there are, in both
upper case and lower case, versions of "i" with and without a dot, and
the upper-case version of "i" is "I"-with-a-dot and the lower-case
version of "I" is "i"-without-a-dot.  This causes strings that should
match not to match.

This finishes fixing bug 2010 - an earlier checkin prevented the crash
(as there are other ways to produce the same crash, e.g. a bogus
dictionary.xml file), but didn't fix the case-insensitive string matching.

svn path=/trunk/; revision=23623
2007-11-27 18:52:51 +00:00
Anders Broman b603b47759 From Stefano Picerno:
Makes more fields searchable
Also fixes some typos and indentation errors
Fixes bug http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1802 for edonkey
dissector: every field defined by the dissector is now contained under the
PROTOABBREV=edonkey "root" key

svn path=/trunk/; revision=23315
2007-10-31 07:47:47 +00:00
Anders Broman 135ba5aeff From Stefano Picerno:
I made some updates to the edonkey dissector.
Most kademlia1 and some kademlia2 messages are now completely decoded.

svn path=/trunk/; revision=23288
2007-10-27 15:28:35 +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
Jaap Keuter 71db7e37ac From Lukazs M.:
Small patch for packet-edonkey.c (stupid mistakes are the easiest to made :-))

svn path=/trunk/; revision=22192
2007-06-25 20:47:45 +00:00
Jaap Keuter d613ff0e2c From Lukasz M.:
Sometimes edonkey packets comes joined, and wireshark display only last
one on column Info. Now everyone is displayed.

svn path=/trunk/; revision=22143
2007-06-20 17:17:25 +00:00
Jaap Keuter d8200256a6 From Lukasz "M.":
I added 5 new packets to packet-edonkey.c and improve 2. Diffs in
attachment. This part of wireshark (decoding emule packets) it's not
finish as I see  :)  I try to do it, meybe...  :)

svn path=/trunk/; revision=22128
2007-06-18 18:11:58 +00:00
Guy Harris 5a43799a17 Use G_GINT64_MODIFIER, rather than the PRI[douxX]64 macros, for GLib
routines and routines using those routines.  GLib might use different
modifiers for 64-bit quantities than the platform's C library does.

svn path=/trunk/; revision=21990
2007-05-29 18:52:42 +00:00
Jeff Morriss ab97c31bb2 Fix warnings of the form "long long unsigned int format, guint64 arg": use
the PRI macros instead of %llu, etc.

svn path=/trunk/; revision=21454
2007-04-17 10:11:41 +00:00
Stephen Fisher 8fd3ee0560 Remove almost all of the casts I committed recently and in place of
them, add -Wno-pointer-sign to CFLAGS when gcc will accept it.


svn path=/trunk/; revision=21253
2007-03-28 21:55:11 +00:00
Stephen Fisher ab8f589336 Fix about 100 simple to fix warnings from gcc 4.0 in epan/dissectors
svn path=/trunk/; revision=21233
2007-03-27 22:50:11 +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
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +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
Anders Broman 07ca040c73 From Jhon Sullivan:
Version 0.47a of eMule extends the eDonkey protocol to support files up to 256GB in length. This patch adds support for the new packet types, and changes to existing packets, used to support this.

In addition, it seems to be getting more common to use compression on the index server connection. The packets used are just like the uncompressed versions, except transmitted as a zlib compressed stream, so I've added dissection for the contents of those too.

Plus a couple of bugfixes to the UDP packet dissection.

svn path=/trunk/; revision=17475
2006-03-06 06:19:11 +00:00
Anders Broman 185cfdefd4 From John Sullivan:
Three patches here:

eth-ed-2.diff
-------------

1) The handling of HashSet Answer messages was wrong
2) Add dissection of some more eMule extension packets to do with
   error recovery

   
eth-bt-1.diff
-------------

New versions of the Azureus BitTorrent client implement a new extension to the protocol, which is effectively a text based encapsulation of the binary BitTorrent protocol, embedded within the BitTorrent protocol. Who knows why they thought that was a good idea, but this patch can pick apart their new headers.


eth-bt-2.diff
-------------

By registering a normal dissector as well as the heuristic one, BitTorrent shows up on the Decode As... list so you can manually override its mistake.

svn path=/trunk/; revision=16856
2005-12-19 06:48:07 +00:00
Guy Harris 494b806bfc Fix a typo.
svn path=/trunk/; revision=16115
2005-10-04 10:26:44 +00:00
Guy Harris bfad2f3a0c Get rid of // comments - not all C compilers like them.
svn path=/trunk/; revision=16114
2005-10-04 10:26:17 +00:00
Anders Broman 1f02bfa0af From John Sullivan:
The current ethereal eDonkey dissector fails to handle a number of valid packet types - in particular the normal server<->client communication between current eserver and eMule versions (from both
sides) produces packets which ethereal incorrectly claims to be malformed.

This patch fills in these holes.

svn path=/trunk/; revision=16107
2005-10-04 05:36:31 +00:00
Ronnie Sahlberg ec3ab9ec3e rename ep_tvb_get_string() to tvb_get_ephemeral_string() asnd update the documentation in README.developer
svn path=/trunk/; revision=15270
2005-08-10 13:41:13 +00:00
Jörg Mayer 5602f5bb83 Make some funtions static. More char -> const char warning fixes
svn path=/trunk/; revision=15146
2005-07-30 01:01:02 +00:00
Ronnie Sahlberg 0d7a2abbc7 some more memification of tvb_get_string() no obvious memleaks fixed this time :-(
svn path=/trunk/; revision=15131
2005-07-28 09:47:28 +00:00
Guy Harris ab797734dd Get rid of the private "my_match_strval()" routine in many dissectors;
add a "match_strval_idx()" routine that does the same thing, and have
"match_strval()" call it.

Make those routines, and "val_to_str()", return a "const" pointer. 
Update dissectors as necessary to squelch compiler warnings produced by
that.

Use "val_to_str()" rather than using "match_strval()" and then, if the
result is null, substituting a specific string.  Clean up some other
"match_strval()"/"val_to_str()" usages.

Add a null pointer check in the NDPS dissector's "attribute_value()"
routine, as it's not clear that "global_attribute_name" won't be null at
that point.

Make some global variables in the AFS4INT dissector local.

Make some routines not used outside the module they're in static.

Make some tables "static const".

Clean up white space.

Fix Gerald's address in some files.

svn path=/trunk/; revision=14786
2005-06-26 19:56:52 +00:00
Guy Harris d9f4b6c9eb There are no guarantees that "strncasecmp()" works with
non-null-terminated strings, so be safe and fetch the metatag string
with "tvb_get_string()".

svn path=/trunk/; revision=12896
2004-12-31 03:10:11 +00:00
Guy Harris 62fce7b2d7 Use the #define for the eDonkey-over-TCP header length.
svn path=/trunk/; revision=12477
2004-11-03 19:23:07 +00:00
Guy Harris 3d37d77f53 Add support for desegmentation of eDonkey-over-TCP.
Clean up indentation.
 
Give edonkey.protocol a value_string table.

svn path=/trunk/; revision=12476
2004-11-03 19:12:49 +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