aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-eigrp.c
AgeCommit message (Collapse)AuthorFilesLines
2022-09-29Use `register_dissector()` for more protocolsDavid Perry1-3/+2
2022-02-25EIGRP: Fix some item lengthsMartin Mathieson1-5/+10
2021-12-22Corrects repeated words throughout the code.Moshe Kaplan1-1/+1
Repeated words were found with: egrep "(\b[a-zA-Z]+) +\1\b" . -Ir and then manually reviewed. Non-displayed strings (e.g., in comments) were also corrected, to ease future review.
2021-12-19Replace g_snprintf() with snprintf() (dissectors)João Valverde1-3/+3
Use macros from inttypes.h with format strings.
2021-07-21First pass pinfo->pool conversion, part 2Evan Huus1-5/+5
Automated find/replace of wmem_packet_scope() with pinfo->pool in all files where it didn't cause a build failure.
2020-06-19Fix the type of arrays of pointers to hf_ values for bitfield routines.Guy Harris1-2/+2
The static arrays are supposed to be arrays of const pointers to int, not arrays of non-const pointers to const int. Fixing that means some bugs (scribbling on what's *supposed* to be a const array) will be caught (see packet-ieee80211-radiotap.c for examples, the first of which inspired this change and the second of which was discovered while testing compiles with this change), and removes the need for some annoying casts. Also make some of those arrays static while we're at it. Update documentation and dissector-generator tools. Change-Id: I789da5fc60aadc15797cefecfd9a9fbe9a130ccc Reviewed-on: https://code.wireshark.org/review/37517 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-04-14wsutil: use ws_in4_addr in tvb_get_ipv4_addr_with_prefix_len.Dario Lombardo1-7/+4
Instead of guint8* the used type looks more precise. Moreover there is no need to use local unions in the dissectors to switch between the actual address and address bytes. bgp, eigrp and isis-lsp dissectors have been updated accordingly. Change-Id: I7785fe4c12913a09bd31cd6ef26e53027646d35c Reviewed-on: https://code.wireshark.org/review/36836 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <gharris@sonic.net>
2019-07-26HTTPS (almost) everywhere.Guy Harris1-1/+1
Change all wireshark.org URLs to use https. Fix some broken links while we're at it. Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c Reviewed-on: https://code.wireshark.org/review/34089 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-10doxygen: Try to fix warnings.Anders Broman1-1/+1
Change-Id: I1517c968f05e7d9c6b561c0f5a7c6a059462d175 Reviewed-on: https://code.wireshark.org/review/33889 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-07-10doxygen: Try to fix warnings.Anders Broman1-1/+1
Change-Id: I2c104b159f8d4ee1993567c54578dcd695b06037 Reviewed-on: https://code.wireshark.org/review/33886 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-12dissectors: use SPDX identifiers.Dario Lombardo1-13/+1
Change-Id: I92c94448e6641716d03158a5f332c8b53709423a Reviewed-on: https://code.wireshark.org/review/25756 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-10-26Add a ws_in6_addr typedef for struct e_in6_addr.Guy Harris1-1/+1
That allows a parallel typedef of ws_in4_addr for guint32. Change-Id: I03b230247065e0e3840eb87635315a8e523ef562 Reviewed-on: https://code.wireshark.org/review/24073 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-02-04There's an RFC for that.Guy Harris1-3/+1
Change-Id: If9a3ba7fbd93374b4c63be7ce37510be5c2848f0 Reviewed-on: https://code.wireshark.org/review/19948 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-01-10Rename tvb_new_subset() to tvb_new_subset_length_caplen().Guy Harris1-9/+9
This emphasizes that there is no such thing as *the* routine to construct a subset tvbuff; you need to choose one of tvb_new_subset_remaining() (if you want a new tvbuff that contains everything past a certain point in an existing tvbuff), tvb_new_subset_length() (if you want a subset that contains everything past a certain point, for some number of bytes, in an existing tvbuff), and tvb_new_subset_length_caplen() (for all other cases). Many of the calls to tvb_new_subset_length_caplen() should really be calling one of the other routines; that's the next step. (This also makes it easier to find the calls that need fixing.) Change-Id: Ieb3d676d8cda535451c119487d7cd3b559221f2b Reviewed-on: https://code.wireshark.org/review/19597 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-10-05EIGRP: fix checksum computationPascal Quantin1-1/+1
Bug: 12982 Change-Id: Iaf816247d49b2f869dc19f64cb0a24247fb38169 Reviewed-on: https://code.wireshark.org/review/18087 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: Michael Mann <mmann78@netscape.net>
2016-09-26BGP: Support for Cost, EIGRP and OSPF extended communitiesPeter Palúch1-1/+2
Bug: 12891 Change-Id: I70ed7f8a08122c559128b8df4d65e03be8201e1a Reviewed-on: https://code.wireshark.org/review/17683 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Palúch <Peter.Paluch@fri.uniza.sk> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-07-27Follow up for proto_tree_add_checksum.Michael Mann1-1/+4
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-14/+3
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-03-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-1/+1
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-18EIGRP: Add missing CD (Candidate Default) flag on Legacy MetricAlexis La Goutte1-0/+9
According to the EIGRP draft RFC (https://tools.ietf.org/html/draft-savage-eigrp-04#section-6.8.1), 2nd bit (0x2) in EIGRP classic bit field should be interpreted as Candidate Default (CD) Reported by Garri Bug:12136 Change-Id: I56dcbbc7db480e67962e2edfbd8d9c6b117f30ef Reviewed-on: https://code.wireshark.org/review/13987 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-01-04Rename ipv4_addr and ipv6_addr to indicate their full contents.Guy Harris1-2/+2
They're not just addresses, they also include a mask length for IPv4 and a prefix length for IPv6. Rename them appropriately. Rename the old ipv4_addr_and_mask() and ipv6_addr_and_mask() to reflect that 1) they fetch data from a tvbuff and 2) *don't* fetch the mask length or prefix length, those lengths are passed as arguments to indicate how many bytes worth of address to fetch. Change-Id: I4cad5a186ad7bfcb60022a91dbe8bc8479e6471f Reviewed-on: https://code.wireshark.org/review/13035 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-03Clean up error checking and handling.Guy Harris1-71/+55
The TLV length includes the T and the V, so it must be at least 4; fail if it's not. If the IPv4 or IPv6 prefix length isn't valid, don't bother trying to parse the rest of the addresses, just give up. Don't bother returning offset values that aren't used. Rename some routines to indicate that they process more than one item. Add some comments while we're at it. Change-Id: I6825216f0e7218e230d8d60d958b3c2453a3bb62 Reviewed-on: https://code.wireshark.org/review/13016 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-03EIGRP: field eigrp.ipv4.destination does not show the correct destinationAlexis La Goutte1-4/+8
Reported by Fredrik Lönnman Bug:11953 Change-Id: Icaff04122e8ed94751ea8aeb4069be2fc2dda52c Reviewed-on: https://code.wireshark.org/review/13007 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-1/+1
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-10-22Use address functions instead of ADDRESS macros in asn1 and epanGerald Combs1-2/+2
Replace CMP_ADDRESS, COPY_ADDRESS, et al with their lower-case equivalents in the asn1 and epan directories. Change-Id: I4043b0931d4353d60cffbd829e30269eb8d08cf4 Reviewed-on: https://code.wireshark.org/review/11200 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> 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>
2015-10-14Change proto_tree_add_ipv6() to take a struct e_in6_addr pointerJoão Valverde1-1/+1
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-23Remove more deprecated tvb_length callsEvan Huus1-7/+7
Change-Id: I56260a82b19001ab2f87f4be34a9510f127f841f Reviewed-on: https://code.wireshark.org/review/9050 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-03-15Fix copy/pasteo of packet-eigrp.cMichael Mann1-2/+2
Change-Id: I2721086221c435d228bf27aef62f9dc5f6d9ee10 Reviewed-on: https://code.wireshark.org/review/7684 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-03-14Correct comm_type length field.Michael Mann1-0/+2
Change-Id: Ia0cbb36e9962c762648ead8dddd3bb0a794cec74 Reviewed-on: https://code.wireshark.org/review/7678 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-03-14Remove proto_tree_add_text from packet-eigrp.cMichael Mann1-62/+141
Change-Id: Idb2d9e070c7f65540ad27b011bd4a3dcaa3dd7e4 Reviewed-on: https://code.wireshark.org/review/7667 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-09Have ipxnet addresses use wmem scoped memory.Michael Mann1-1/+1
Change-Id: I1d8eed2ceacccce2768590f0689cd2c83a5e56e9 Reviewed-on: https://code.wireshark.org/review/6418 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-09disperse atalk-utils.[ch]Michael Mann1-1/+1
The functionality was suiting for address_to_str.c and the #defines belong in packet-atalk.h. Kept the address structure with the "address string conversion", but that can probably be better cleaned up when the address to str as a whole is cleaned up. Would also consider making AT_ATALK an FT_ type as well. Change-Id: Ia534096c707e6fb94acdfee0d332beda6571c371 Reviewed-on: https://code.wireshark.org/review/6417 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-07Add tvb_address_to_str.Michael Mann1-2/+1
This is intended to handle ALL address types retrieved from a tvbuff. One of the (good) side effects of this function is that it can replace a lot of the "hidden" ep_alloc calls used to allocate memory for the address string. A few existing "popular" helper tvb_ functions were turned into pure macros calling tvb_address_to_str. Some of the "less used" helper tvb_ functions were just directly replaced with tvb_address_to_str. Change-Id: I361d991c4ad90142173e63eae02a94d68af3ec43 Reviewed-on: https://code.wireshark.org/review/6333 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-28Replace ip6_to_str and ip6_guint8_to_str with address_to_str and tvb_ip_to_str.Michael Mann1-2/+4
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-26Replace ip_to_str with [ep_]address_to_str and tvb_ip_to_str.Michael Mann1-2/+5
Change-Id: I40d0c8253743183aecef252040b7dd6742ae5c71 Reviewed-on: https://code.wireshark.org/review/5934 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-22First batch of unincludes. Last attempt...Martin Mathieson1-3/+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-22Fix unknown command tag name [-Wdocumentation-unknown-command]Alexis La Goutte1-1/+1
Change-Id: I6c2564a86e13d9321001856ba1f51681a9f20976 Reviewed-on: https://code.wireshark.org/review/5979 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-2/+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-09-16Fix spelling: cant-->can't, wont-->won't, etcBill Meier1-2/+2
Change-Id: I4497f1b8b6eab0e576d9dd31b732965f9a6679c6 Reviewed-on: https://code.wireshark.org/review/4124 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-09Clean up Internet checksum handling.Guy Harris1-9/+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-06-26convert to proto_tree_add_subtree[_format]Michael Mann1-32/+13
Change-Id: I525ac2aae2bdbfd5f3a2f3b35f1bf10dde053f66 Reviewed-on: https://code.wireshark.org/review/2667 Tested-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-7/+7
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-7/+7
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18Fixup: tvb_get_string(z) -> tvb_get_string(z)_encDario Lombardo1-2/+2
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe Reviewed-on: https://code.wireshark.org/review/2376 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-09Add Modelines infoAlexis La Goutte1-0/+13
Change-Id: If3e77cbdfdeab75766984b10b3356b8343100602 Reviewed-on: https://code.wireshark.org/review/2065 Reviewed-by: Evan Huus <eapache@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-06-02EIGRP Sequence TLV Dissector PatchPeter Palúch1-34/+47
In the EIGRP packet dissector, the dissector routine for the Sequence TLV dissected the TLV only up to the first address in the list. However, the Sequence TLV contains a variably sized list of addresses. This patch modifies the routine so that it processes the entire TLV, not just the first address in the contained list. Also, in the dissect_eigrp(), replaced calls to tvb_new_subset() with the reported length set to -1 with the call to tvb_new_subset_length(). TLVs always carry information about their length. And this time, correct truly ALL calls in the switch{} section. Sample packet capture is available in BugZilla. Bug: 10156 Change-Id: Idaaf182c05bcf799f770f23a2ce2b1e05a3d569a Reviewed-on: https://code.wireshark.org/review/1911 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-05-15Get rid of some uses of tvb_get_ptr().Guy Harris1-1/+1
Introduce a new tvb_ipxnet_to_string() routine to help that. Change-Id: Icb27f7cdd6e6e7de67e765715e450063d7de6072 Reviewed-on: https://code.wireshark.org/review/1647 Reviewed-by: Guy Harris <guy@alum.mit.edu>
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-20Change G_GINT64_CONSTANT(xxxxU) to G_GUINT64_CONSTANT(xxxx)Jakub Zawadzki1-2/+2
svn path=/trunk/; revision=54314