aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-megaco.c
AgeCommit message (Collapse)AuthorFilesLines
2015-11-13MEGACO: fix indent (remove tab)Alexis La Goutte1-1/+1
Change-Id: I58c5ffc377d268cfb3d245e5bd2165a38dda0457 Reviewed-on: https://code.wireshark.org/review/11779 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-12megaco: replace THROW() with an expert info + returnMartin Kaiser1-2/+4
Change-Id: Ib876ad4b0c6d700da1eec8c8512225c123ad14da Reviewed-on: https://code.wireshark.org/review/9604 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-06-22Refactor RTD stats.Michael Mann1-0/+212
Very similar to the refactoring of SRT stats, it provides more commonality of the stats for all GUI interfaces. Currently implemented for TShark and GTK. Affected dissectors: MEGACO, MGCP, Radius Change-Id: Icb73a7e603dc3502b39bf696227fcaae37d4ed21 Reviewed-on: https://code.wireshark.org/review/8998 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>
2015-05-16megaco: handle missing tokensEvan Huus1-1/+1
Fix an infinite loop when no transaction end offset is present and `megaco_tvb_find_token` returns -1. Bug: 11193 Change-Id: I82c7b795e522efca674787e504427f64b8c28fc4 Reviewed-on: https://code.wireshark.org/review/8483 Reviewed-by: Evan Huus <eapache@gmail.com> Petri-Dish: Evan Huus <eapache@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-05-13MEGACO: Fix Dead Store (Dead assignement/Dead increment) warning found by ClangAlexis La Goutte1-10/+3
Change-Id: Iee615c46fcb5dd0ced55d971c5f70bc7c970f9a6 Reviewed-on: https://code.wireshark.org/review/8448 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-12Add casts to fix clang warnings.Gerald Combs1-4/+4
Change-Id: I0059536cb68fb3ef313f3166bf18444a89b4eea3 Reviewed-on: https://code.wireshark.org/review/8442 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-12Overhaul the MEGACO dissector.Michael Mann1-625/+634
1. Have megaco dissector display fields as their are "interpreted", not as raw data with "interpretation" as a subtree 2. Replace/remove proto_tree_add_text 3. Convert some "numeric string fields" into numeric values. 4. Add some more dissection discovered while looking for sample captures. Bug: 6732 Ping-Bug: 10909 Change-Id: Ie051a8a16ef2355681a24be8789bae0971632cd1 Reviewed-on: https://code.wireshark.org/review/8382 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>
2015-02-21Remove tvb_ from the names of wsutil mempbrk routines.Guy Harris1-7/+7
Routines that don't take a tvbuff as an argument shouldn't have tvb_ in the name. Change-Id: I3550256551e30b3f329cbbfca71ef27c727d29c0 Reviewed-on: https://code.wireshark.org/review/7302 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-12Fix crash at startup in SSE4.2 code when running a 32 bits Windows buildPascal Quantin1-2/+2
There is no guarantee that a g_malloc'ed memory block will be aligned on a 128 bits boundary Instead use a static variable definition (at the cost of exposing the HAVE_SSE4_2 compilation flag in ws_mempbrk.h) Change-Id: I661bf479a9d458d64c96bafc940c519d29a4780b Reviewed-on: https://code.wireshark.org/review/7070 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-02-11Combine SSE and pre-compiled patterns for faster pbrkHadriel Kaplan1-2/+11
This combines the SSE4.2 instructions usage, with pre-compiled pattern searching usage, for a faster pbrk search method. Testing against large files of HTTP and SIP, there is about a 5% performance improvement by using pre-"compiled" patterns for guint8_pbrk() instead of passing it the search string and having it build the match array every time. Similar to regular expressions, "compiling" the pattern match array in advance only once and using the "compiled" patterns for the searches is faster than compiling it every time. Change-Id: Ifcbc14a6c93f32d15663a10d974bacdca5119a8e Ping-Bug: 10798 Reviewed-on: https://code.wireshark.org/review/6990 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-10Do not iterate over reported length when using tvb_find_line_endPascal Quantin1-3/+2
if captured length < reported length, this will trigger an infinite loop Change-Id: I6557b455e7bbff12658a934e5bb13a42c023e133 Reviewed-on: https://code.wireshark.org/review/7053 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> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-23Deleting unnecessary #includes from dissectors.Martin Mathieson1-7/+0
Fourth batch (packet-mac-lte.c -> packet-rtp.c). Will look at cleaning up and committing script afterwards. Change-Id: Id921f07f4b274f0cfb77ce81abe4a285fdb8b644 Reviewed-on: https://code.wireshark.org/review/6023 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-9/+5
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-8/+7
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-19Remove unnecessary tvb_ensure_bytes_exist calls.Michael Mann1-1/+0
All of the calls removed are followed by proto_tree_add_xxx calls of the same offset/length of the tvb_ensure_bytes_exist call. The proto_tree_add_xxx calls should throw the exception, so we don't need the "double check". There are probably more calls that can be removed, these were just obvious as first glance, spurred mostly by noticing the (ab)use in packet-wsp.c Change-Id: I37cee347c8cf8ab0559e21562c802d3b37f4871e Reviewed-on: https://code.wireshark.org/review/4833 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-09-10Various minor changes:Bill Meier1-29/+41
- Create/use some extended value_strings - Remove unneeded #includes; - Do whitespace changes; - Add editor modelines. Change-Id: I2e1ea37dddfd5e8656c90c0d45a6596c4912bb2c Reviewed-on: https://code.wireshark.org/review/4065 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-09Fix some spelling & grammar.Bill Meier1-1/+1
Change-Id: Iedeaa411caa0823922dd79c27897a2349d4e6907 Reviewed-on: https://code.wireshark.org/review/4054 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-03Fix an infinite loop when the line has no lengthEvan Huus1-1/+1
Bug:10333 Change-Id: Ia2dae94095dddf57e4c75792b5477b0eb37c29c9 Reviewed-on: https://code.wireshark.org/review/3343 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-10Quick fix to handle IEPS token.AndersBroman1-4/+16
Fix deorecated APIs Change-Id: Iad1f970b553f1655109b36364a1d37676582f608 Reviewed-on: https://code.wireshark.org/review/2984 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-04convert to proto_tree_add_subtree[_format]Michael Mann1-14/+10
Change-Id: I621f2e2cad9403449cb78f45302388f0c874d3bc Reviewed-on: https://code.wireshark.org/review/2852 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-4/+4
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-4/+4
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-05-19Add new proto_tree_add_format_text() functionJakub Zawadzki1-79/+35
There are lot of text dissectors which want just to add escaped (not filtrable) text, add new function proto_tree_add_format_text() which just do this in optimized way. Change-Id: Ia0e189b620cc0a5b74cfdaef1ad4571d766bb2ab Reviewed-on: https://code.wireshark.org/review/1678 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-03Use ENC_UTF_8 for strings, it's faster and *should* be OK.AndersBroman1-15/+15
Change-Id: I7615f407a017454d3fb11ec0b45b584bfa5d79b5 Reviewed-on: https://code.wireshark.org/review/940 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31Continue to remove $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^\* \$Id\$/,+1 d') (no space before star) Change-Id: I318968db2b8512ba1303b5fc5c624c66441658f0 Reviewed-on: https://code.wireshark.org/review/879 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-12-14Fix [-Wmissing-prototypes]Jakub Zawadzki1-2/+3
svn path=/trunk/; revision=54095
2013-11-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53230
2013-09-09expert_add_info_format_text -> expert_add_info_formatMichael Mann1-13/+13
svn path=/trunk/; revision=51852
2013-09-02Batch of filterable expert info.Michael Mann1-14/+20
svn path=/trunk/; revision=51688
2013-09-02Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-2/+1
svn path=/trunk/; revision=51666
2013-08-19Change some dissectors to use pinfo memory pool instead of malloc if it can ↵Pascal Quantin1-6/+4
trigger an exception between between buffer allocation and tvb_set_free_cb call svn path=/trunk/; revision=51427
2013-08-04Convert proto_item_set_expert_flags to "filterable" items in alcap ↵Michael Mann1-1/+10
dissector. Unfortunately it had a few tentacles, so they needed to be brought along for the ride. svn path=/trunk/; revision=51136
2013-06-14Removed check_col() and the occasional tree.Michael Mann1-18/+9
svn path=/trunk/; revision=49938
2013-05-09Coverity 1011110: Unused pointer valueMartin Kaiser1-1/+0
remove the whole unused subtree svn path=/trunk/; revision=49213
2013-04-24convert some proto_tree_add_texts into expert_add_info_format. Didn't quite ↵Michael Mann1-15/+15
make checkAPIs.pl happy, but given the nature of the dissector (mostly raw text), I'm not sure it can hit the 50% ratio. svn path=/trunk/; revision=49022
2013-03-12Use explicit casts.Anders Broman1-8/+8
svn path=/trunk/; revision=48260
2013-01-31Use '#if 0 ... #endif' rather than /** ... **/ to comment outBill Meier1-22/+22
unused hf[] entries (which I should have done in the first place). svn path=/trunk/; revision=47391
2013-01-26Fix various instances of unused hf[] entries foundBill Meier1-11/+33
by checkhf. svn path=/trunk/; revision=47312
2012-12-26Fix a bunch of warnings.Guy Harris1-6/+6
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of sizeof. Cast away some implicit 64-bit-to-32-bit conversion errors due to use of strtol() and strtoul(). Change some data types to avoid those implicit conversion warnings. When assigning a constant to a float, make sure the constant isn't a double, by appending "f" to the constant. Constify a bunch of variables, parameters, and return values to eliminate warnings due to strings being given const qualifiers. Cast away those warnings in some cases where an API we don't control forces us to do so. Enable a bunch of additional warnings by default. Note why at least some of the other warnings aren't enabled. randpkt.c and text2pcap.c are used to build programs, so they don't need to be in EXTRA_DIST. If the user specifies --enable-warnings-as-errors, add -Werror *even if the user specified --enable-extra-gcc-flags; assume they know what they're doing and are willing to have the compile fail due to the extra GCC warnings being treated as errors. svn path=/trunk/; revision=46748
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
svn path=/trunk/; revision=45017
2012-08-01remove unnecessary underscores from display filtersMichael Mann1-1/+1
svn path=/trunk/; revision=44181
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-06-11Use dscp_vals_ext everyplace (instead of dscp_vals);Bill Meier1-1/+2
(dscp_vals is now a static array in packet-ip.c) svn path=/trunk/; revision=43211
2012-05-17No leading whitespaces in the INFO column.Michael Tüxen1-3/+16
svn path=/trunk/; revision=42679
2012-05-17Add support for specifying an SCTP port number.Michael Tüxen1-2/+18
svn path=/trunk/; revision=42677
2012-04-26From Bodo Petermann:Anders Broman1-16/+28
Megaco parser problem with LF in header. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7198 svn path=/trunk/; revision=42258
2012-04-18Fix some: 'cast discards qualifiers from pointer target type' warningsJakub Zawadzki1-1/+1
- Add const qualifier - Remove some strange casts svn path=/trunk/; revision=42131
2012-03-10Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-90/+2
svn path=/trunk/; revision=41469
2012-01-13Fix some typos.Chris Maynard1-11/+11
svn path=/trunk/; revision=40454