summaryrefslogtreecommitdiff
path: root/ipproto.c
Commit message (Collapse)AuthorAgeFilesLines
* Add support for ethernet IP protocolAhmed Abdelsalam2020-08-071-0/+1
| | | | | | | | | | | | | | | | | | | The SRv6 network programming defines a new IP protocol number [1]. The new protocol number is used in the Next Header field of an IPv6 header or any extension header indicates that the payload is an Ethernet. IANA has assigned 143 as the protocol number of ethernet [2]. The SRv6 packet has the following format: IPv6 HDR + SRH + Ethernet HDR + IPv4/IPv6 packet This patch allows TCPDUMP to dissect such SRv6 packets. [1] https://tools.ietf.org/html/draft-ietf-spring-srv6-network-programming-16#section-9.1 [2] https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml Signed-off-by: Ahmed Abdelsalam <ahabdels@gmail.com>
* Always include <config.h> rather than "config.h".Guy Harris2018-01-211-1/+1
| | | | | | | | This can prevent bizarre failures if, for example, you've done a configuration in the top-level source directory, leaving behind one config.h file, and then do an out-of-tree build in another directory, with different configuration options. This way, we always pick up the same config.h, in the build directory.
* Use quoted include netdissect-stdinc.h instead of angle-bracketed oneFrancois-Xavier Le Bail2018-01-211-1/+1
|
* Make nd_uint8_t and nd_int8_t arrays, to catch direct references.Guy Harris2017-12-101-1/+1
| | | | | | | | | | This catches direct references, so we can change them to use EXTRACT_U_1 or EXTRACT_S_1. Also, change some structures to use the nd_ types that weren't already using them. Then make the appropriate EXTRACT_{U,S}_1() changes.
* Fixup the previous commit.Denis Ovsienko2017-08-271-0/+1
|
* Use a table instead of getprotobynumber().Denis Ovsienko2017-08-271-0/+305
| | | | | | | | | | | | | | | | | | | On Linux getprotobynumber() returns different results for the same argument depending on the contents of /etc/protocols at runtime (expectedly but gets in the way of reproducible test cases). On FreeBSD it returns results that are irrelevant of the contents of /etc/protocols at runtime (unexpectedly). Other implementations exist and may expose interesting properties too. And if the host uses LDAP instead of /etc/protocols for name services, a call to that function may cause LDAP handle the request. All of the above is not right for the specific task of network protocols decoding, which needs to be fast and deterministic. As the protocol number space is just 8-bit, add a 256-element array of strings/NULLs for the translation and a wrapper function around it for index range enforcement. Change the code to use the new function instead of getprotobynumber(). Fix a typo while at it.
* Dismiss unused IPPROTO_CARP.Denis Ovsienko2017-08-271-2/+1
| | | | | | In ipproto_values[] IPPROTO_CARP never matched because of IPPROTO_VRRP, which matched earlier. Remove the array element and the macro and leave some comments instead.
* zero change: update Hannes Gredler's emailHannes Gredler2017-07-281-1/+1
|
* libnetdissect code must include 'netdissect.h', not 'interface.h'Francois-Xavier Le Bail2015-09-111-1/+1
| | | | | | | Moreover: Remove netdissect.h include in interface.h Move thiszone declaration in netdissect.h Update a comment
* Rename 'tcpdump-stdinc.h' to 'netdissect-stdinc.h'Francois-Xavier Le Bail2015-09-101-1/+1
| | | | Get the full log via: git log --follow netdissect-stdinc.h
* dismiss NETDISSECT_REWORKED macroDenis Ovsienko2015-03-221-1/+0
| | | | | | | The purpose of this macro was to enable the file-by-file switch to NDO, after which only tcpdump.c had a use of it and the definitions guarded by it. Update tcpdump.c not to require them any more and dismiss the unused definitions.
* Define NETDISSECT_REWORKED in a bunch of files, and fix the issues it finds.Guy Harris2014-04-041-0/+1
| | | | | The only one it found was that routines in sigsecret.c needed to refer to ndo->ndo_sigsecret, not just sigsecret.
* remove tcpdump's own CVS keywordsDenis Ovsienko2014-01-031-5/+0
| | | | | | Remove lots of $Header's and a few $Id's that all belong to the former CVS repository of tcpdump itself. These keywords have been frozen since the migration to git in late 2008.
* whitespace changesMichael Richardson2014-01-011-1/+1
|
* unset executable bit on a few .h and .c filesDenis Ovsienko2013-04-201-0/+0
|
* Add a CARP dissector and a command-line option to dissect proto 112 as CARP.George Neville-Neil2011-11-231-0/+1
| | | | | | | CARP and VRRP both use IP protocol number 112, so there needs to be a -T flag to specify that protocol 112 be dissected as CARP rather than VRRP. Also update the man page.
* ipproto.h/c: mark several structs as constKovarththanan Rajaratnam2010-02-201-1/+1
|
* From Ian McDonald and Arnaldo Carvalho de Melo: DCCP support.guy2005-09-201-1/+2
|
* from Andy Heffernan <ahh@juniper.net>:hannes2005-05-201-1/+2
| | | | add PGM upport as per rfc3208
* "ipproto.h" uses "struct tok", and "interface.h" defines it; alwaysguy2005-05-141-2/+2
| | | | include "interface.h" before "ipproto.h".
* Fix a typo.guy2004-12-151-2/+2
|
* temporary patch for "EIGP" protocol.mcr2004-04-291-2/+2
|
* add infrastructure for host-OS indep. ipproto name resolutionhannes2004-04-261-0/+58