Commit Graph

91 Commits

Author SHA1 Message Date
Anders Broman 68ef96b3bf From Abhik Sarkar:
Support for Diameter conversations and service response time.

svn path=/trunk/; revision=26785
2008-11-15 15:52:39 +00:00
Bill Meier 5ac2ba6354 Minor changes related to proto_reg_handoff & pref ranges
svn path=/trunk/; revision=26254
2008-09-23 15:03:39 +00:00
Bill Meier a3e6eb8071 Minor cleanup mostly related to proto_reg_handoff
svn path=/trunk/; revision=26236
2008-09-19 17:39:44 +00:00
Anders Broman 74efeaae80 Add Answer or Request to the Command name in the info column depending on
if the R bit is set or not.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2828

svn path=/trunk/; revision=26088
2008-08-25 21:15:55 +00:00
Bill Meier 38eb4d6ce3 Use const with value_string array definitions
svn path=/trunk/; revision=26028
2008-08-14 23:51:52 +00:00
Guy Harris 71a607d7e7 Fix some errors introduced when fixing Luis Ontanon's e-mail address.
svn path=/trunk/; revision=25938
2008-08-05 21:31:17 +00:00
Luis Ontanon 42c3239a1a luis.ontanon@gmail.com => luis@ontanon.org
svn path=/trunk/; revision=25937
2008-08-05 21:03:46 +00:00
Guy Harris 91aa5dcd21 The second argument to g_ptr_array_add() is the pointer to add, not a
pointer to that pointer - unlike g_array_append_vals, which takes a
pointer to an array of values and a count of the number of values in the
array.

svn path=/trunk/; revision=25753
2008-07-16 08:08:17 +00:00
Jeff Morriss d7ed3bf05a GArrays' data is properly aligned for whatever they are holding (despite
the fact that 'data' is a pointer to a char).  GLIB fixed this in their
accessor macro here:

http://svn.gnome.org/viewvc/glib?view=revision&revision=6092

The bug report confirms that the data is properly aligned:

http://bugzilla.gnome.org/show_bug.cgi?id=502927

So, add some intermediate (void *) casts to avoid "cast increases required
alignment of target type" on SPARC.  (No, we can't use the accessor macro
because we want to access the whole array not just the ith element.)

Since build_dict->ett is actually an array of pointers, change it to a
GPtrArray.

Reindent some.

svn path=/trunk/; revision=25749
2008-07-15 21:06:31 +00:00
Bill Meier f8e3822738 Fix some warnings reported by gcc -Wshadow ...
Fix some spacing in packet-dcom.c

svn path=/trunk/; revision=25618
2008-06-27 16:15:30 +00:00
Guy Harris 9e6329860a Fix some warnings - declare some arguments, variables, and structure
members to be const pointers when that's possible, and throw in some
casts when the GLib API fails to have properly consted arguments.

Use ep_strdup_printf() in some cases.

svn path=/trunk/; revision=25596
2008-06-25 03:05:19 +00:00
Martin Mathieson bb8af7419f Mark a local function static rather than extern.
Get rid of an unused variable.

Was going to use proto_register_prefix(), but am not sure if its appropriate.
Even with tree == NULL, dictionary items are used to generate info column.
Loading the dictionary lazily would mean doing a lot of work as part of dissecting
the first diameter frame, which could decrease our chances of capturing frames that
arrive very soon after that one...

svn path=/trunk/; revision=24784
2008-04-05 05:41:59 +00:00
Anders Broman fe620c9d12 Add an expert item about AVP:s without "data".
svn path=/trunk/; revision=24377
2008-02-18 19:10:50 +00:00
Anders Broman dd1ae8f4f7 Dissect Vendor id and Auth-application Id.
svn path=/trunk/; revision=24216
2008-01-28 19:55:20 +00:00
Anders Broman ce40fc22a4 Make it possible to do subdissection of Diameter AVP:s and add dissection
of some 3GPP AVP:s.

svn path=/trunk/; revision=24211
2008-01-27 21:06:33 +00:00
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