aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-diameter.c
AgeCommit message (Collapse)AuthorFilesLines
2015-05-22[Diamater] Sub dissect Suported-Vendor-IdAnders1-0/+3
Change-Id: I5c0014449ef9886ba74abdf8f609860ef37a7831 Reviewed-on: https://code.wireshark.org/review/8582 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-12Fix Diameter reassembly when the captured tvb length is less than 5 bytes.Jeff Morriss1-11/+25
Since Diameter does heuristic checks before calling tcp_dissect_pdus() we have to "manually" ask for more data if the tvb is too short for our heuristics. Bug: 11183 Change-Id: I14c36042306b532b53df80cc3971866b76094084 Reviewed-on: https://code.wireshark.org/review/8405 Reviewed-by: Evan Huus <eapache@gmail.com> Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-05-06Add/clarify some comments about how the Experimental-Result-Code AVP is handled.Jeff Morriss1-11/+15
Specifically we put Experimental-Result-Codes specified by 3GPP in the XML file and let other vendors' codes be handled through a dissector table. Change-Id: I2c3977fb959ad84faa5cb90aeb3d191c8b465ede Reviewed-on: https://code.wireshark.org/review/8319 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-04-23Use VALS_EXT_PTR to satisfy checkAPIs.Jeff Morriss1-1/+1
Change-Id: Ic7a7cfb97be5c3fbca5944328d04d505b54242ad Reviewed-on: https://code.wireshark.org/review/8176 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-04-22Add special handling of the (derived) AppId AVP type so that we can maintainJeff Morriss1-5/+33
one (and only one) Application ID list. This means we don't have to list all the Application IDs several times in the XML file. Collapse those lists into one (much more complete, now) list while also fixing URIs for several of the specifications (and making it clear for others that we don't have access to the specification--by declaring their URI to be "none"). Add a bunch more entries to the list of application IDs. Change-Id: Ia5c96b1f6f1fe3a9521b3d70142889e3881fae5e Reviewed-on: https://code.wireshark.org/review/8147 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-09Use the new request/response framenum hints.Jeff Morriss1-2/+2
Change-Id: Ic4a3750a55523a5cf8ea72002055ffea1f081dd1 Reviewed-on: https://code.wireshark.org/review/7565 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-02-16[Diameter] Use proto_tree_add_bitmask() to add the diameter flags.AndersBroman1-16/+14
Change-Id: I9cb6e46551b0a25a458311a53365469552d5c195 Reviewed-on: https://code.wireshark.org/review/7177 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-03Fix nameless application in NokiaSolutionsAndNetworks.xml (fromJeff Morriss1-1/+6
I4cd9bd7f7219e4d9ff1bb8a71fab32439a8a9a35). (The nameless application was causing known applications to be reported as unknown.) Add code to the Diameter dissector to report such problems at startup (similar code exists for other entities). Tweak the parser debug slightly. Change-Id: I6b28cda8660e6eb96648c7b3697d7fd85151ac96 Reviewed-on: https://code.wireshark.org/review/6927 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-27Lua: Expose tcp_dissect_pdus() to LuaHadriel Kaplan1-1/+2
Provide a way for Lua-based dissectors to invoke tcp_dissect_pdus() to make TCP-based dissection easier. Bug: 9851 Change-Id: I91630ebf1f1fc1964118b6750cc34238e18a8ad3 Reviewed-on: https://code.wireshark.org/review/6778 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Hadriel Kaplan <hadrielk@yahoo.com>
2014-12-28Replace ip6_to_str and ip6_guint8_to_str with address_to_str and tvb_ip_to_str.Michael Mann1-1/+3
Change-Id: I1d258923a7a63539ec8456d3e306bca5016a1e4b Reviewed-on: https://code.wireshark.org/review/6060 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-26Fix some dissectors doing termio (fprintf(stderr,..), g_warning()).Bill Meier1-8/+9
- Use report_...failure() (in most cases). - Also: Do some misc fixes in certain disectors - re-arrange order of #includes - Fixup preferences help text Change-Id: I385f6f97257f365f53ce611df02f57f9257dc5f9 Reviewed-on: https://code.wireshark.org/review/6039 Petri-Dish: Bill Meier <wmeier@newsguy.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-22First batch of unincludes. Last attempt...Martin Mathieson1-4/+0
Change-Id: I3681462aeb98ca62ed3ec5eb226b2553317391a9 Reviewed-on: https://code.wireshark.org/review/5997 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-3/+0
Specifically: - Set packet.h to be the first wireshark #include after config.h and "system" #includes. packet.h added as an #include in some cases when missing. - Remove some #includes included (directly/indirectly) in packet.h. E.g., glib.h. (Done only for those files including packet.h). - As needed, move "system" #includes to be after config.h and before wireshark #includes. - Rework various #include file specifications for consistency. - Misc. Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95 Reviewed-on: https://code.wireshark.org/review/5923 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-20Get rid of calls to ctype.h functions.Guy Harris1-2/+1
They don't handle values outside the range -1 to 127, and their behavior is locale-dependent. Use g_ascii_isXXX() and g_ascii_toXXX() instead of isXXX() and toXXX(). If you're checking for printable ASCII, don't use isascii() and don't use iscntrl(), use g_ascii_isprint(). If you're checking for graphical ASCII, i.e. printable ASCII except for a space, use g_ascii_isgraph(). Use ws_xton() to convert a hex digit character to the corresponding numeric value. Change-Id: Id3039bc586fbf66d8736c2df248c790c0d7a2330 Reviewed-on: https://code.wireshark.org/review/4851 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-06Adjust indentation to match editor modelines; Do other minor whitespace changes.Bill Meier1-35/+35
Change-Id: Ic020b2c92db5d14a2be9dc4d35aef4514b8b0353 Reviewed-on: https://code.wireshark.org/review/4502 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-10Minor performance tweaks:AndersBroman1-14/+15
- Only calculate tvb length once. - Use tvb_reported_length() instead of tvb_reported_length_remaining() as this is a subtvb offset is always 0. Change-Id: I03bd7a95061488d4576fa93f26e6b31d55f88738 Reviewed-on: https://code.wireshark.org/review/4060 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-22Decode the 3GPP MSISDN AVP using the E.164 routines.Jeff Morriss1-1/+1
Rename dissect_e164_utf8_number() to dissect_e164_msisdn() and give it an 'encoding' argument. Change-Id: I49cf5d2b24b44a0e69427ceae331f378024391c5 Reviewed-on: https://code.wireshark.org/review/3796 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-08-21Decode User-Name as an IMSI in S13/S13' and S7a/S7d.Jeff Morriss1-4/+5
Also move the application ID macros into the diameter header file. Change-Id: Iaca5707c8476d81f50ecdb3aab76be293b5ccfe7 Reviewed-on: https://code.wireshark.org/review/3786 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-08-21Add a function to dissect an E.164 (MSISDN) number in UTF8 format and use itJeff Morriss1-3/+4
in the Diameter dissector. This new API adds a filter for the MSISDN as well as a subtree and filter for the Country Code. Change-Id: Ibcbf4b5f72178b7e4af63efa7496188d608a9de7 Reviewed-on: https://code.wireshark.org/review/3760 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com> Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-08-20Decode IMSIs found in Subscription-Id AVPs.Jeff Morriss1-12/+94
Move decode of the User-Name AVP out of the 3GPP-specific file. Add a couple of macros for 3GPP AppIDs (rather than using the number directly) in both files. Change-Id: I496b4ae86b05264462167b6e41ce1451392de11b Reviewed-on: https://code.wireshark.org/review/3753 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-08-19Don't mark a used parameter as unused.Jeff Morriss1-8/+7
Also fix up some whitespace. Change-Id: I7cd78740199ce7b2682902a5687c4f05c2c963b2 Reviewed-on: https://code.wireshark.org/review/3716 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-08-12When checking if a message is Diameter also check for a minimum message length.Jeff Morriss1-16/+33
This improves the detection of Diameter messages within a TCP bytestream (i.e., when the Diameter PDUs don't neatly align with frames). Bug: 10362 Change-Id: I49a6e8cf076a6ab8a14761493aab9f3b11e4756e Reviewed-on: https://code.wireshark.org/review/3557 Petri-Dish: Evan Huus <eapache@gmail.com> Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-05Eliminate proto_tree_add_text from some dissectors.Michael Mann1-1/+1
Other minor cleanup while in the area. Change-Id: Id8d957d3d68a2e3dd5089f490bd59d773e1be967 Reviewed-on: https://code.wireshark.org/review/3427 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-28Use wmem for application IdsAndersBroman1-29/+33
Remove soft deprecated APIs Change-Id: Iecd2f552c1abb7bb2c6969073b3c245af22f4fcd Reviewed-on: https://code.wireshark.org/review/3230 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-28Sort diameter.applicationId fix a typo.AndersBroman1-0/+4
Change-Id: Id585371df929cdff17f98dddbebf063fa000ff56 Reviewed-on: https://code.wireshark.org/review/3229 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-27Make value_string_ext const-correct.Kevin Cox1-4/+4
There is still some const-incorrect usage of them but those can be ironed out after this change has been made. Change-Id: Iba0631c804bdab34d7c0232b49967130e3370488 Reviewed-on: https://code.wireshark.org/review/3199 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-24/+24
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-24/+24
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-07tvb_new_subset -> tvb_new_subset_length when length parameters are equal.Michael Mann1-1/+1
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is. Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d Reviewed-on: https://code.wireshark.org/review/1999 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-29Convert a few dissectors with simple request/response tracking from ↵Pascal Quantin1-4/+4
red/black tree to hash map Update the readme file accordingly Change-Id: I056d1ab1f77df641b83fa9b3618b6c25d66e1a83 Reviewed-on: https://code.wireshark.org/review/1420 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-18Exported PDU: add support for more than 32 tagsPascal Quantin1-2/+2
Change-Id: Idc9f105164919827a8a81c88b5a56de4fa25df0b Reviewed-on: https://code.wireshark.org/review/1197 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-07Tweak the Diameter heuristics a bit more.Jeff Morriss1-5/+14
Increase the max Diameter message size to 65534 and reject messages whose flags have both the E- and R-bits set. Change-Id: Ib11701a47d23ff042a346d59c56f9f0f4410e6b7 Reviewed-on: https://code.wireshark.org/review/990 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-04Strengthen the Diameter heuristics to avoid trying to reassemble enormous ↵Jeff Morriss1-8/+19
messages. Fixes some heuristics mistakes pointed out in http://ask.wireshark.org/questions/31227/diameter-reassembly-malformed-packets Change-Id: Iffc97d46cee5dd532fec0031286927fbcb86c095 Reviewed-on: https://code.wireshark.org/review/949 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-03-19Exported PDU: add support for data length on the wirePascal Quantin1-1/+2
Change-Id: Iff14ec4d0297ec85f3597b33871fb0ab5256a597 Reviewed-on: https://code.wireshark.org/review/728 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-16Make the avp_str available to sub dissectors and Let the subdissector haveAndersBroman1-2/+12
precedence filling in the avp_item string. Use that in a couple of places. Change-Id: I1af7a1ca4c14fb56ddeaab336202e6c2a18e556b Reviewed-on: https://code.wireshark.org/review/699 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-14Display framed_ipv6_prefix as an IPv6 address even when it's not the fullAndersBroman1-1/+10
16 bits. Change-Id: I6cef08e2da9467cb54b5d08526c77c87e7afe1fa Reviewed-on: https://code.wireshark.org/review/645 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-13Use dissector_try_uint_new() and include diam_sub_dis_inf when calling allAndersBroman1-2/+2
AVP sub dissectors. Change-Id: I6dcc362ea755794d3e18d8d27ed2128b46bd887b Reviewed-on: https://code.wireshark.org/review/642 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-01-19As spotted by Joerg; make a HFILL_INIT(hf) macro and use it to init the ↵Anders Broman1-11/+2
private part of the hf structure. svn path=/trunk/; revision=54843
2014-01-17Try to fix warning: initializer element is not computable at load time.Anders Broman1-20/+39
svn path=/trunk/; revision=54832
2014-01-17Fix a bug intrduced in ↵Anders Broman1-1/+3
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=54820 svn path=/trunk/; revision=54831
2014-01-15Fix a couple ofAnders Broman1-16/+46
warning: initializer element is not computable at load time svn path=/trunk/; revision=54820
2014-01-14Don't make promises of constness that we can't honor.Guy Harris1-5/+5
svn path=/trunk/; revision=54757
2014-01-04Fix a typo.Anders Broman1-1/+1
svn path=/trunk/; revision=54597
2013-12-23Get rid of some useless intermediate ep-memory when building Diameter arrays.Evan Huus1-12/+14
svn path=/trunk/; revision=54421
2013-12-20#if 0 some unused #defines.Bill Meier1-0/+2
svn path=/trunk/; revision=54306
2013-12-15Fix some const/ not const warnings.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=54114
2013-12-14Fix some trivial warnings.Jakub Zawadzki1-3/+3
svn path=/trunk/; revision=54085
2013-12-10Reject the packet if data is NULL.Chris Maynard1-3/+8
svn path=/trunk/; revision=53898
2013-12-07Rename base_display_* to field_displayJakub Zawadzki1-6/+6
This is preparation to support ->display for FT_STRING values. svn path=/trunk/; revision=53820