Commit graph

76 commits

Author SHA1 Message Date
Jörg Mayer
160d7b71af Update a comment about some flags
svn path=/trunk/; revision=23853
2007-12-12 23:59:31 +00:00
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
Guy Harris
7a4eb3eb35 Check for AVPs with a list of values and a type that's not a 32-bit or
shorter integral type.  Fixes bug 2027.

Rename the "bytes" pointer to "octetstring", and initialize it in a
fashion that makes it clearer that it points to the first of the basic
types, to make it clearer that it's for OctetString.

svn path=/trunk/; revision=23615
2007-11-27 01:41:42 +00:00
Anders Broman
7b3debb40d Change dissecton of address type for AVP < 256 (RADIUS address).
svn path=/trunk/; revision=23402
2007-11-08 22:36:19 +00:00
Martin Mathieson
58c63a41d1 Remove some unnecessary includes.
svn path=/trunk/; revision=23280
2007-10-26 16:53:08 +00:00
Gerald Combs
abfa8887ad Remove a couple of unused variables.
svn path=/trunk/; revision=23266
2007-10-24 16:32:51 +00:00
Anders Broman
3ddd51de7f Add port ranges.
svn path=/trunk/; revision=23265
2007-10-24 15:04:01 +00:00
Guy Harris
10276efd48 Make sure characters aren't sign-extended before being handed to
isalnum().

svn path=/trunk/; revision=23254
2007-10-24 02:12:46 +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
Martin Mathieson
c539ff38ef Check the length in unsigned32 AVP data fields.
svn path=/trunk/; revision=22413
2007-07-27 18:32:09 +00:00
Martin Mathieson
3e62d049de - add an all_cmds array for looking up 'RFC' packets
- improve error/expert info when see unmatched AVPs, commands, appids

svn path=/trunk/; revision=22363
2007-07-20 11:39:09 +00:00
Luis Ontanon
5e290061f2 - <?avp-proto and <?type-proto to instruct about which dissector to use for a given type or avp
- dissect timestamps
- add all the avps that were commented out in the dictionary


svn path=/trunk/; revision=22360
2007-07-20 00:15:17 +00:00
Bill Meier
71209c200f Fix two Windows compile warnings
svn path=/trunk/; revision=22353
2007-07-18 15:07:45 +00:00
Martin Mathieson
0a759fa734 Minor changes to expert items
svn path=/trunk/; revision=22350
2007-07-18 13:18:41 +00:00
Luis Ontanon
e27b40f589 Add Address decoding, two debug environment variables (WIRESHARK_DEBUG_DIAM_DICT_PARSER and WIRESHARK_DUMP_DIAM_DICT) and fix some issues pointed out by Martin
svn path=/trunk/; revision=22345
2007-07-17 22:19:54 +00:00
Gerald Combs
01567eb9f4 If we can't find dictionary.xml, fail instead of trying to read from
stdin (which makes distcheck unhappy).  Fixup whitespace.

svn path=/trunk/; revision=22338
2007-07-17 21:29:18 +00:00
Luis Ontanon
cf526583e8 for MSVC (vendor_flag ? 12 : 8) is signed ...
well for gcc is either signed or unsigned (they are two literals!)


svn path=/trunk/; revision=22321
2007-07-16 06:28:56 +00:00
Luis Ontanon
b0bd83c868 Rewrite of the diameter dissector to use the dictionary for creating hfids, drop libxml dependency.
The work is still incomplete (anything but strings and numbers appears as bytes) but I want others to start testing it.

TODO:
builders and decoders for:
- (ntp) timestamps
- addresses
- diameteruris
- diameteridentities
- ipfilterrules
- qosfilterrules
- mipregistrationrequests


svn path=/trunk/; revision=22318
2007-07-16 05:41:58 +00:00
Martin Mathieson
11cd484b8f Allow filtering of whole AVP
svn path=/trunk/; revision=22284
2007-07-10 17:45:11 +00:00
Martin Mathieson
afb016cc87 - Fix a broken comment in xml file
- Add/fix some AVPs
- Print unmatched command codes in decimal

svn path=/trunk/; revision=22275
2007-07-09 13:27:15 +00:00
Martin Mathieson
6949e0d231 - include gqpolicy.xml properly!
- print more specific console disgnostics when AVPs don't match because of vendorID being different

svn path=/trunk/; revision=22142
2007-06-20 14:40:40 +00:00
Guy Harris
1bc049906a Add some GCC warnings to the standard set, and add some others to the
--enable-extra-gcc-checks set.

If we turn on -pedantic, try turning on -Wno-long-long as well, so that
it's not *so* pedantic that it rejects the 64-bit integral data types
that we explicitly require.

Constify a bunch of stuff, and make some other changes, to get rid of
warnings.

Clean up some indentation.

svn path=/trunk/; revision=21526
2007-04-23 10:59:26 +00:00
Stephen Fisher
269edd8e7a Fix a warning
svn path=/trunk/; revision=21336
2007-04-04 19:35:46 +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
Ulf Lamping
7994794ad9 fix a lot more warnings
svn path=/trunk/; revision=21142
2007-03-23 01:29:52 +00:00
Martin Mathieson
a9c08b914e Fix bug 1332 properly.
svn path=/trunk/; revision=20650
2007-01-31 10:57:54 +00:00
Martin Mathieson
4f6e3c9930 Size passed to IP address fields is now fixed (reported AVP size includes 2 bytes of padding), causing assertion reported in bug 1332.
svn path=/trunk/; revision=20623
2007-01-30 13:39:58 +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
Martin Mathieson
ac41d69be5 Delete leftover printf
svn path=/trunk/; revision=18809
2006-08-01 17:07:28 +00:00
Anders Broman
527dc673f4 From Martin Mathieson:
sip_stats.c and tap_sipstat.c:
adds the code 429 ("Provide Referrer Identity", from RFC 3892) to 
SIP stats.

chargecontrol.xml packet-diameter.c :
These patches
- add a few more chargecontrol AVPs, and add the vendor-id where needed
- report as expert info when AVPs' lengths don't match their type

svn path=/trunk/; revision=18743
2006-07-17 05:51:14 +00:00
Anders Broman
12161363c5 From Martin Mathieson:
packet-diameter.c
- show vendor ID as a decimal number

diameter/chargecontrol.xml
- add more AVP entries from 3GPP TS 32.299 (6.6.0)

svn path=/trunk/; revision=18679
2006-07-07 04:51:12 +00:00
Anders Broman
2032e960d7 From Martin Mathieson:
packet-diameter.c
--------------------------
I completely reindented dissect_avps() before I made any changes, but 
when ignoring white space (in tkdiff, -w plus checking 'Ignore blanks 
when diffing'), its easy to see the small changes I've made:
- when fail to find AVP info, show code in tree parent in decimal (as 
specs do)
- add an expert info (undecoded, note) to indicate unknown AVP codes

diameter/imscxdx.xml
-------------------------------
- added 'Associated-Identities'

svn path=/trunk/; revision=18641
2006-07-03 21:18:36 +00:00
Anders Broman
996d4db495 Ethereal->Wireshark
svn path=/trunk/; revision=18234
2006-05-28 19:49:07 +00:00
Anders Broman
1814821adc From Martin Mathieson:
- Many DCT2000 protocols can be embedded within an IP primitive 
message.  Add a heuristic to see if we can find the protocol payload 
within in IP primitive message, and look for an ethereal dissector 
matching the DCT2000 protocol name (this is useful for simple protocol 
testing where no physical links are involved)
- Make some more of these protocols (diameter, http, mgcp) findable by name
- Adds protocol 'variant' number to stub and dissector
- Break the duplicated writing of the stub header out into a separate 
function

svn path=/trunk/; revision=18212
2006-05-23 05:48:00 +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
5b69723fdc dissect_diameter_tcp should be static void
svn path=/trunk/; revision=18166
2006-05-15 20:22:24 +00:00
Anders Broman
ea024eb4ad From Martin Mathieson:
Some cosmetic changes:
- when working out the application id description to show in the info 
column, also consider vendor application identifiers
- make sure application ids and command codes are always shown as 
decimal numbers
- a little whitespace tidyup

svn path=/trunk/; revision=17684
2006-03-20 19:46:04 +00:00
Anders Broman
522757cae0 from Martim Mattieson:
This small patch will cause the current AVP dictionary to be freed and 
repopulated when relevant preferences have changed.

svn path=/trunk/; revision=17635
2006-03-15 18:55:12 +00:00
Anders Broman
c6a21a1d14 From Martin Mathieson
>>>This patch:
>>>- makes it possible to turn off use of the XML AVP dictionary (which 
>>>relies upon the XML lib being installed).  A failed load results in 3 
>>>annoying dialogs popping up the first time a diameter packet is read. 
>>>Default is previous behaviour.

svn path=/trunk/; revision=17628
2006-03-15 06:16:12 +00:00
Guy Harris
b13f6dcbd3 Use the new "proto_tree_add_*_format_value" routines.
svn path=/trunk/; revision=17316
2006-02-16 11:43:38 +00:00
Jörg Mayer
a052b3a98b packet-bgp.c: Fix incorrect use of g_snprintf return value
mp_addr_to_str was unnecessary 'complex' - simplified it
packet-dns.c: Fix incorrect use of g_snprintf return value
packet-dcm.c: Fix incorrect use of g_snprintf return value
        Someone who understands the protocol should look at the
        "vr, tr might be used uninitialized..." warning.
packet-x11.c: Fix incorrect use of g_snprintf return value
packet-kerberos.c: Fix incorrect use of g_snprintf return value
        Someone should take a look at the
        "longjump might clobber ..." messages
packet-diameter.c: Fix incorrect use of g_snprintf return value
        Get rid of unsigned < 0 check
packet-pgm.c: Fix incorrect use of g_snprintf return value
packet-nbns.c: Fix incorrect use of g_snprintf return value
packet-winsrepl.c: Collateral damage to packet-nbns.c fix
packet-netbios.c: Collateral damage to packet-nbns.c fix
packet-netbios.h: Collateral damage to packet-nbns.c fix
packet-kerberos.c: Collateral damage to packet-nbns.c fix
packet-nbipx.c: Collateral damage to packet-nbns.c fix


svn path=/trunk/; revision=17065
2006-01-20 21:18:18 +00:00
Anders Broman
496e4be980 Handle <application id="4294967295" name="Relay"/>
svn path=/trunk/; revision=16988
2006-01-10 19:57:15 +00:00
Jörg Mayer
f9a57f08d1 Bill Meier:
Spelling fixes.

svn path=/trunk/; revision=16956
2006-01-05 13:01:08 +00:00
Anders Broman
15e0ccf887 Use VendorID from sminmpec.
svn path=/trunk/; revision=16552
2005-11-19 15:59:30 +00:00
Anders Broman
6c466a1437 Display AVP:s of Dimater type Unsigned32 as such even when they have "value translation".
svn path=/trunk/; revision=16510
2005-11-16 07:21:48 +00:00
Ronnie Sahlberg
c1b84ccd59 remove some strcpy() and strcat()
remove two buffers from the stack.


svn path=/trunk/; revision=16229
2005-10-15 22:57:27 +00:00
Ronnie Sahlberg
fd29897666 get rid of some strcpy() and some compiler warnings
svn path=/trunk/; revision=16212
2005-10-13 05:07:28 +00:00
Ronnie Sahlberg
14ecc1ddd5 remove some strcpy() from diameter and remove some arrays from the stack
svn path=/trunk/; revision=16209
2005-10-13 03:10:28 +00:00
Anders Broman
542a623f34 Get application ID from the packet.
svn path=/trunk/; revision=15783
2005-09-13 16:56:28 +00:00