aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-pim.c
AgeCommit message (Collapse)AuthorFilesLines
2017-04-18Rename BASE_VALS_NO_UNKNOWN to BASE_SPECIAL_VALS.Guy Harris1-2/+2
It makes it a bit clearer what its purpose is - to allow a value_string to be used for numeric rather than enumerated fields, giving certain values of the field a special meaning. Change the explanation in the documentation to match as well. Change-Id: Id07b22eee996b79ea5f3473928d29adcabe09bf3 Reviewed-on: https://code.wireshark.org/review/21209 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-10Add support for BASE_VALS_NO_UNKNOWNAlexis La Goutte1-60/+33
BASE_VALS_NO_UNKNOWN is a special value_string value for only a single (maybe 2) numerical value(s). If a field has the numerical value that doesn't match anything in the value_string, just the number is supplied for the field (no "Unknown") Dissectors that had this use case have been converted in the patch. Change-Id: Ie63a36cceec2fe4436938ec7e3d7f9e690d2b8d9 Reviewed-on: https://code.wireshark.org/review/20736 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-27Follow up for proto_tree_add_checksum.Michael Mann1-10/+30
Fill in the "gaps" so that all dissectors that verify checksums have both a status and expert info field. Also address comments from original proto_tree_add_checksum patch that didn't make it. Ping-Bug: 8859 Change-Id: I2e6640108fd6bb218cb959fe9e4ba98a13e43a2f Reviewed-on: https://code.wireshark.org/review/16590 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>
2016-07-21Add proto_tree_add_checksum.Michael Mann1-23/+14
This is an attempt to standardize display/handling of checksum fields for all dissectors. The main target is for dissectors that do validation, but dissectors that just report the checksum were also included just to make them easier to find in the future. Bug: 10620 Bug: 12058 Ping-Bug: 8859 Change-Id: Ia8abd86e42eaf8ed50de6b173409e914b17993bf Reviewed-on: https://code.wireshark.org/review/16380 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-15Allow control of individual columns to be (un)writable.Michael Mann1-2/+2
Most protocols just want to limit COL_INFO or COL_PROTOCOL so give that level of granularity. Bug: 12144 Bug: 5117 Bug: 11144 Change-Id: I8de9b7d2c69e90d3fbfc0a52c2bd78c3de58e2f8 Reviewed-on: https://code.wireshark.org/review/15894 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-07PIMv2 Hello packet incorrectly dissect Option 1Alexis La Goutte1-2/+2
Bug: 12493 Change-Id: I646853c6756689f9776b11c585d573c117c68cf2 Reviewed-on: https://code.wireshark.org/review/15762 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-07PIMv2: Enchance display of HoldtimeAlexis La Goutte1-3/+3
Change-Id: If92dd22c4ceee41bc7b0151acb09f4341b2e97f3 Reviewed-on: https://code.wireshark.org/review/15763 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-03-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-2/+2
Started by grepping call_dissector_with_data, call_dissector_only and call_dissector and traced the handles passed into them to a find_dissector within the dissector. Then replaced find_dissector with find_dissector_add_dependency and added the protocol id from the dissector. "data" dissector was not considered to be a dependency. Change-Id: I15d0d77301306587ef8e7af5876e74231816890d Reviewed-on: https://code.wireshark.org/review/14509 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-01PIM: fix IPv4/IPv6 filters using the same name for different address typePascal Quantin1-9/+9
Bug: 12061 Change-Id: I42828e1f87abebd6d9a4f893ff28aa50ca7ccbff Reviewed-on: https://code.wireshark.org/review/13640 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-2/+2
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now. Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f Reviewed-on: https://code.wireshark.org/review/12484 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-18create_dissector_handle -> new_create_dissector_handleMichael Mann1-4/+5
Picking off "easy" dissectors that only have one or two exit points at most. Change-Id: I9c7d1c092bbae896ec0c2832617891346927f2e1 Reviewed-on: https://code.wireshark.org/review/11932 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>
2015-10-14Change proto_tree_add_ipv6() to take a struct e_in6_addr pointerJoão Valverde1-6/+6
tvb_get_ipv6() takes a struct e_in6_addr *, use that here too. Change-Id: Id8b368daa05c151a61d4bc01dc88c00da13e9c88 Reviewed-on: https://code.wireshark.org/review/10953 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: Balint Reczey <balint@balintreczey.hu> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-11Replace tabs in files with editor modeline "expandtab"Bill Meier1-7/+7
Change-Id: I4667fd4091c510a4c798f79dae333a07dc42dad6 Reviewed-on: https://code.wireshark.org/review/8880 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-05-12PIM: Add PIM IP version field for PIMv1 tooAlexis La Goutte1-0/+2
Change-Id: I455a4f81798c7a99a48551ae362dabf2b697cf88 Reviewed-on: https://code.wireshark.org/review/8427 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-05-12PIM: Remove trailing whitespace before commaAlexis La Goutte1-32/+32
Change-Id: I7798ddd6db4a98cfe9cc96275f56837ef3bf0b1e Reviewed-on: https://code.wireshark.org/review/8399 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-12PIM: Enhance codeAlexis La Goutte1-82/+92
Use proto_tree_add_item when it is possible Add display of reserved field... Change-Id: Id47c237f06e28e7d5dfbd92848dc26a7496cf799 Reviewed-on: https://code.wireshark.org/review/8398 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-12PIM: Remove proto_tree_add_textAlexis La Goutte1-21/+52
rewrite display of PIM(v1) Address and remove last proto_tree_add_text call :) Change-Id: I020970e80338d15dbe68e32713b8ada31fd0a4e2 Reviewed-on: https://code.wireshark.org/review/8397 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-12PIM: Remove proto_tree_add_textAlexis La Goutte1-21/+45
only 2 proto_tree_add_text calls, (it will be remove on another patch) Change-Id: I670e37bbbe1cc3ae740a94cd620fa14f20cb9feb Reviewed-on: https://code.wireshark.org/review/8396 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-05-06PIM: Fix Dead Store (Dead assignement/Dead increment) warning found by ClangAlexis La Goutte1-3/+12
Change-Id: Ia8eca42bae42fb139bfc63232c6d9bf05811ad39 Reviewed-on: https://code.wireshark.org/review/8280 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-05-02Don't try checksumming if we didn't capture all the data to be checksummed.Guy Harris1-2/+4
Check the captured length as well as the reported length, as is done in other checksumming code paths. Change-Id: I55371d99a28ffd1325e7266037cced580077d80b Reviewed-on: https://code.wireshark.org/review/8272 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-05-02Handle PIMvN, for N > 2, by just adding the checksum and subtree and bailing.Guy Harris1-25/+27
Don't bother doing the checksum, as we don't know how much to checksum; don't assume setting pim_length to 0 will force it not to be checksummed, as it doesn't; and don't test twice for a version != 2. Change-Id: I1c2ed3ecf1572aef6c5af140c410f9cdd0e9c3a6 Reviewed-on: https://code.wireshark.org/review/8271 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-05-02No need to call tvb_reported_length() twice.Guy Harris1-2/+2
Just reuse the result we got from an earlier call. Change-Id: Icb4617d731d9e3f152ce762f56a1c32567cbde4a Reviewed-on: https://code.wireshark.org/review/8270 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-05-02Expand comments.Guy Harris1-8/+56
Update a URL, and tell The Story About PIM, or, at least, about various drafts floating around. I guess it took a while for the protocol to settle down, and a number of things changed significantly between early drafts and RFC 2117, including whether the protocol runs atop IGMP or directly atop IP. There doesn't appear to be *any* draft that corresponds to what dissect_pimv1() dissects; all have significant differences. Change-Id: Ia9c80cc384546b0a822a59fef01c1476f95ad8a6 Reviewed-on: https://code.wireshark.org/review/8269 Reviewed-by: Guy Harris <guy@alum.mit.edu>
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-12-12Change ENC_NA to ENC_BIG_ENDIAN for all fetches of integral type fields.Bill Meier1-3/+3
Change-Id: Ia4f5735c61eedcbe8354eabd5da05d02e167f25e Reviewed-on: https://code.wireshark.org/review/5734 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-11-12Fix warning: no previous prototype for function ... [-Wmissing-prototypes]Alexis La Goutte1-1/+1
warning coming after g055e4768ece and g421913b721 Change-Id: I5caeeb89c559faef8007f2946c68c7172b75dfa8 Reviewed-on: https://code.wireshark.org/review/5250 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-12PIM: Fix Dead Store (Dead assignement/Dead increment) warning found by ClangAlexis La Goutte1-1/+1
Change-Id: I1540c7878692625a9e38b48f8681c07bab852a64 Reviewed-on: https://code.wireshark.org/review/5234 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-08PIM: Fix Dead Store (Dead assignement/Dead increment) warning found by ClangAlexis La Goutte1-4/+2
Change-Id: I4bfc67705ee824e68f14e4177a3194d66bbbe165 Reviewed-on: https://code.wireshark.org/review/5188 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-11-08Create real subdissectors to the IGMP protocol.Michael Mann1-16/+9
Change-Id: I79ee9413b87722bfe4782342737cff03cfc34495 Reviewed-on: https://code.wireshark.org/review/5179 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> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-05pim: BIDIR support (RFC 5015)Matthieu Texier1-9/+118
Bug: 10231 Change-Id: Ia93fa76b8d381971f900de4a8ce591f03cd82da0 Reviewed-on: https://code.wireshark.org/review/5118 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-10-14PIM: Disable unused pimbdirdfvals.Stig Bjørlykke1-1/+3
Change-Id: I2b023868d9f84e891e36f2cfcfd4ad25e1e43592 Reviewed-on: https://code.wireshark.org/review/4681 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-13Aliging PIM hello message type to IANA in order to fix BUG 10231Matthieu Texier1-55/+134
Change-Id: Ie9a126d106c08935eb385fd93d011e481913ab3c Reviewed-on: https://code.wireshark.org/review/4448 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-09-29Add editor modelines; fix indentation as needed.Bill Meier1-0/+13
Change-Id: I1ad94654343e5a018a0b3159481d45ffb3a91263 Reviewed-on: https://code.wireshark.org/review/4363 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-10PIM: fix a copy/paster error introduced in gebff85fPascal Quantin1-1/+1
Bug: 10358 Change-Id: Iddfd5dcd53e80a18cb253834920d9625195b3669 Reviewed-on: https://code.wireshark.org/review/3529 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-08-09Clean up Internet checksum handling.Guy Harris1-12/+6
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-12/+6
Change-Id: I8df48b25de784a48a25f0e48aac1e1545ed92c35 Reviewed-on: https://code.wireshark.org/review/2865 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-5/+5
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-5/+5
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 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-21Add missing includesJakub Zawadzki1-0/+2
svn path=/trunk/; revision=54332
2013-12-15Fix some const/ not const warnings.Jakub Zawadzki1-2/+2
svn path=/trunk/; revision=54114
2013-12-14Fix warningsJakub Zawadzki1-0/+3
svn path=/trunk/; revision=54089
2013-10-13whitespace fixes; mostly: remove trailing blanksBill Meier1-10/+10
svn path=/trunk/; revision=52591
2013-09-15A few more dissectors converted to wmemPascal Quantin1-10/+11
svn path=/trunk/; revision=52071
2013-09-15Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if ↵Michael Mann1-23/+14
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-06-14Remove check_col() and the occasional tree.Michael Mann1-7/+3
svn path=/trunk/; revision=49921
2013-04-06Made IP address fields filterable as well as a few others.Michael Mann1-226/+405
Also added a preference to determine where to put the PIM payload. Per http://www.wireshark.org/lists/wireshark-dev/201304/msg00019.html, I made the default off of the main tree instead of a subtree of PIM. svn path=/trunk/; revision=48760
2013-04-06Show the PIMv2 register flags in the correct tree.Jaap Keuter1-1/+1
svn path=/trunk/; revision=48757
2013-03-19From beroset:Anders Broman1-2/+2
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48425
2013-01-06Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-3/+2
svn path=/trunk/; revision=46961