aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-pgm.c
AgeCommit message (Collapse)AuthorFilesLines
2014-12-23Deleting unnecessary #includes from dissectors.Martin Mathieson1-2/+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-1/+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-12-21Have a heur_dissector_list_t be an opaque handle.Guy Harris1-1/+1
This allows dissector lists to be looked up by name, so they can be shared by multiple dissectors. (This means that there's no "udplite" heuristic dissector list, but there shouldn't be one - protocols can run atop UDP or UDPLite equally well, and they share a port namespace and uint dissector table, so they should share a heuristic dissector table as well.) Change-Id: Ifb2d2c294938c06d348a159adea7a57db8d770a7 Reviewed-on: https://code.wireshark.org/review/5936 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-02Add editor modelines & adjust indentation/whitespace as needed.Bill Meier1-422/+435
Change-Id: Ice2d93632cd42dfcef3bfbf0e15f2a8a147278fc Reviewed-on: https://code.wireshark.org/review/4433 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-06Eliminate proto_tree_add_text from some of the dissectors.Michael Mann1-27/+27
Other minor cleanups while in the area. Change-Id: I8ea59205cfe6fab643d8fe01b75ce91532004fd9 Reviewed-on: https://code.wireshark.org/review/4004 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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-08-09Clean up Internet checksum handling.Guy Harris1-2/+1
Add macros to set entries of a vec_t, one for use when you have a pointer to private data, and one for use when you have data in a tvbuff. The latter wraps the use of tvb_get_ptr(), so that you're not directly calling it in a dissector. Move ip_checksum() to epan/in_cksum.c, and add an ip_checksum_tvb() that wraps the use of tvb_get_ptr(). In the CARP dissector, give the length variable an unsigned type - there's no benefit to it being signed, and that requires some casts to be thrown around. In the DCCP dissector, check only against the coverage length to see if we have enough data, combine the "should we check the checksum?" check with the "*can* we check the checksum?" check in a single if, and throw a dissector assertion if the source network address type isn't IPv4 or IPv6. Get rid of inclues of <epan/in_cksum.h> in dissectors that don't use any of the Internet checksum routines. In the HIP dissector, make sure we have the data to calculate the checksum before doing so. Change-Id: I2f9674775dbb54c533d33082632809f7d32ec8ae Reviewed-on: https://code.wireshark.org/review/3517 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-05convert to proto_tree_add_subtree[_format]Michael Mann1-10/+14
Change-Id: I8df48b25de784a48a25f0e48aac1e1545ed92c35 Reviewed-on: https://code.wireshark.org/review/2865 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-20Rename dissector_add_handle() to dissector_add_for_decode_as().Guy Harris1-2/+2
Hopefully that name makes it clear what the routiner's purpose is, and will encourage people to use it rather than using dissector_add_uint() with a bogus integer value. Change-Id: Ic5be456d0ad40b176aab01712ab7b13aed5de2a8 Reviewed-on: https://code.wireshark.org/review/2483 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-1/+1
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-1/+1
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-21Change the signature of dissector_try_heuristic() to return hdtbl_entryAndersBroman1-1/+2
which can be used to call the found heuristic dissector on the next pass. Introduce call_heur_dissector_direct() to be used to call a heuristic dissector which accepted the frame on the first pass. Change-Id: I524edd717b7d92b510bd60acfeea686d5f2b4582 Reviewed-on: https://code.wireshark.org/review/1697 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> 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>
2013-12-25Use expert info instead of proto_tree_add_text.Michael Mann1-51/+59
svn path=/trunk/; revision=54450
2013-12-19Fix leaks where ptvcursor_free() wasn't being called.Chris Maynard1-0/+4
svn path=/trunk/; revision=54255
2013-12-19Rename a couple of to_str functions to have ep_ in the name. This makes itEvan Huus1-1/+1
obvious that the returned string is ephemeral, and opens up the original names in the API for versions that take a wmem pool (and thus can work in any scope). svn path=/trunk/; revision=54249
2013-12-14Fix warningsJakub Zawadzki1-2/+3
svn path=/trunk/; revision=54089
2013-09-29Convert several proto_tree_add_bytes_format calls to ↵Michael Mann1-4/+4
proto_tree_add_bytes_format_value. svn path=/trunk/; revision=52272
2013-09-15Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if ↵Michael Mann1-28/+28
hf_ field name is the first part of the formatted string. This was done with a perl script on the dissectors directory (packet-*.c), followed by manual inspection of the output. The manual inspection yielded a few cases that really should have been proto_tree_add_uint or proto_tree_add_item, so I updated them accordingly. The script didn't catch as many as I would have liked, but it's a start. The most common (ab)use of proto_tree_add_uint_format was for appending strings to CRC/checksum values to note good or bad CRC/checksum. svn path=/trunk/; revision=52045
2013-09-13Dario Lombardo <lomato@gmail.com> viaJörg Mayer1-4/+4
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9147 Migration from emem to wmem for trivial cases (ep_alloc only). svn path=/trunk/; revision=52002
2013-06-14Remove check_col() and the occasional tree.Michael Mann1-15/+8
svn path=/trunk/; revision=49921
2013-03-19From beroset:Anders Broman1-3/+3
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48425
2013-01-31Use '#if 0 ... #endif' rather than /** ... **/ to comment outBill Meier1-4/+4
unused hf[] entries (which I should have done in the first place). svn path=/trunk/; revision=47390
2013-01-26Comment out cases of unused hf array entries found by checkhf.Bill Meier1-2/+6
svn path=/trunk/; revision=47302
2012-12-26Fix a bunch of warnings.Guy Harris1-1/+1
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-3/+1
svn path=/trunk/; revision=45017
2012-09-11Add data parameter to dissector_try_heuristicJakub Zawadzki1-1/+1
svn path=/trunk/; revision=44871
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-01-22Patch from DXDragon [AT] yandex.ru (using e-mail address instead of name ↵Chris Maynard1-0/+4
because I don't know how to enter Cyrillic letters) to fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5687 - Some PGM options are not parsed correctly. svn path=/trunk/; revision=40644
2011-10-25Fix encoding arg for ptvcursor_add() and ptvcursor_add_noadvance() function ↵Bill Meier1-119/+119
calls. svn path=/trunk/; revision=39566
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-2/+2
non-autogenerated epan/dissectors: Specifically: Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as the encoding parameter for proto_tree_add_item() calls which directly reference an item in hf[] which has a type of: FT_UINT8 FT_UINT16 FT_UINT24 FT_UINT32 FT_UINT64 FT_INT8 FT_INT16 FT_INT24 FT_INT32 FT_INT64 FT_FLOAT FT_DOUBLE svn path=/trunk/; revision=39288
2011-08-08Remove unneeded #includes: proto.h,tvbuff.h,value_string.h,stdlib.h,...Bill Meier1-19/+15
svn path=/trunk/; revision=38413
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-7/+7
keys to have _uint in their names, to match the routines that handle dissector tables with string keys. (Using _port can confuse people into thinking they're intended solely for use with TCP/UDP/etc. ports when, in fact, they work better for things such as Ethernet types, where the binding of particular values to particular protocols are a lot stronger.) svn path=/trunk/; revision=35224
2010-05-27From Steven McCoy:Jaap Keuter1-7/+22
AFI fields are 2 bytes i.s.o. 1. From me, several more size changes and decode cleanup. svn path=/trunk/; revision=33003
2010-04-06#include <string.h> not needed.Bill Meier1-1/+0
svn path=/trunk/; revision=32411
2010-04-03Remove unneeded #include <stdio.h>Bill Meier1-1/+0
svn path=/trunk/; revision=32367
2010-01-19Fix gcc -Wshadow warningsBill Meier1-18/+18
svn path=/trunk/; revision=31561
2009-08-16Switch a bunch of dissectors over to using tvb_new_subset_remaining()Kovarththanan Rajaratnam1-1/+1
svn path=/trunk/; revision=29446
2009-08-09Don't guard col_set_str (COL_PROTOCOL) with col_checkKovarththanan Rajaratnam1-2/+1
svn path=/trunk/; revision=29340
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-88/+88
(1) Trailing/leading spaces are removed from 'name's/'blurb's (2) Duplicate 'blurb's are replaced with NULL (3) Empty ("") 'blurb's are replaced with NULL (4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME, FT_PROTOCOL, FT_STRING and FT_STRINGZ field types (5) Only allow non-zero value for 'display' if 'bitmask' is non-zero svn path=/trunk/; revision=28770
2009-03-22P64 changes: Fix some cases for which size_t is not requiredBill Meier1-2/+2
svn path=/trunk/; revision=27822
2008-12-19Back out r27047 and r27053.Gerald Combs1-4/+4
svn path=/trunk/; revision=27062
2008-12-18Update calls to proto_tree_add_bytes_format to reflect r27047.Gerald Combs1-4/+4
svn path=/trunk/; revision=27053
2008-09-15Fix compile errorBill Meier1-1/+0
svn path=/trunk/; revision=26206
2008-09-15'static initialized' --> 'static gboolean initialized'Bill Meier1-1/+1
svn path=/trunk/; revision=26204
2008-09-15proto_reg_handoff: rework/cleanup; fix so ports properly deleted/added.Bill Meier1-42/+43
svn path=/trunk/; revision=26203
2008-05-14Fix some of the Errors/warnings detected by checkapi.Bill Meier1-4/+7
svn path=/trunk/; revision=25290
2006-07-04coverity 201Ronnie Sahlberg1-7/+0
remove some dead code introduced in the recent rewrite svn path=/trunk/; revision=18654
2006-07-01Rewrite of dissector: get rid of static structures and use helper functions ↵Jaap Keuter1-934/+461
available in the form of ptvcursor. Add AF_INET6 support to fix bug 961. svn path=/trunk/; revision=18636
2006-05-21change a whole bunch of ethereal into wiresharkRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18196
2006-01-20packet-bgp.c: Fix incorrect use of g_snprintf return valueJörg Mayer1-20/+25
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