summaryrefslogtreecommitdiff
path: root/print-ah.c
Commit message (Collapse)AuthorAgeFilesLines
* AH: Remove a ND_TCHECK_SIZE() callFrancois-Xavier Le Bail2020-10-031-4/+0
| | | | | It was the last ND_TCHECK_*() call. Remove the only trunc label.
* AH: Print the Integrity Check Value (ICV) fieldFrancois-Xavier Le Bail2020-10-031-2/+5
| | | | | Remove a ND_TCHECK_LEN call (GET_ used). Update the outputs of two tests accordingly.
* AH: Update in accordance with RFC4302Francois-Xavier Le Bail2020-10-021-9/+24
| | | | | | | | | | | Remove the obsolete RFC1826 AH header. Use nd_print_protocol_caps(). Print the fields in header order. Fix the length field and print the bytes count of header (verbose mode). Print the Reserved field if non-zero. Add/update some comments. Fix spaces. Update the outputs of two tests accordingly.
* Remove many (762) now redundant ND_TCHECK_n() callsFrancois-Xavier Le Bail2020-09-061-1/+0
| | | | | | | | | | | ND_TCHECK_n(e), n in { 1, 2, 3, 4, 8 }. They are redundant because they are followed by a GET_.*_n(e) call, same n, same e, which do the bounds check. Remove unused 'trunc' labels and most associated codes. Update the outputs of some tests accordingly.
* Use the new GET_ macros instead of the EXTRACT_ onesFrancois-Xavier Le Bail2019-03-261-3/+3
| | | | | | | The exceptions are currently: Some EXTRACT_ in print-juniper.c, not used on packet buffer pointer. An EXTRACT_BE_U_3 in addrtoname.c, not always used on packet buffer pointer.
* Use more the nd_print_trunc() callFrancois-Xavier Le Bail2018-05-181-4/+1
| | | | Update the output of a test accordingly.
* Add more nd_print_trunc() callsFrancois-Xavier Le Bail2018-05-061-1/+1
| | | | Update the output of some tests accordingly.
* Add the ndo_protocol field in the netdissect_options structureFrancois-Xavier Le Bail2018-03-161-0/+1
| | | | | Update this field in printer entry functions. It will be used for some printings.
* 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
|
* Clean up signed vs. unsigned.Guy Harris2018-01-111-2/+2
|
* Update ND_PRINT() as a variadic macroFrancois-Xavier Le Bail2018-01-071-6/+6
|
* Use ND_TTEST_SIZE()/ND_TCHECK_SIZE() macros (1/n)Francois-Xavier Le Bail2018-01-031-1/+1
|
* Use nd_ types for AH headers.Guy Harris2017-12-131-4/+4
|
* Remove all storage class specifier 'register'Francois-Xavier Le Bail2017-12-131-2/+2
| | | | | | Let the compiler do the optimizations (or not) based on build options. Avoid 'value has been optimized out' messages in gdb using '-O0'.
* Replace ND_TTEST2()/ND_TCHECK2() macros by macros using pointers (1/n)Francois-Xavier Le Bail2017-12-111-1/+1
| | | | | ND_TTEST2(var, l) -> ND_TTEST_LEN(p, l) ND_TCHECK2(var, l) -> ND_TCHECK_LEN(p, l)
* Rename EXTRACT_ macrosFrancois-Xavier Le Bail2017-11-221-2/+2
| | | | | | | | | | | | | | | | Now all the macros have a name meaning a count in bytes. With _S_: signed, _U_: unsigned e.g.: EXTRACT_BE_32BITS -> EXTRACT_BE_U_4 EXTRACT_LE_32BITS -> EXTRACT_LE_U_4 ... EXTRACT_BE_INT32 -> EXTRACT_BE_S_4 and have: EXTRACT_8BITS -> EXTRACT_U_1 EXTRACT_INT8 -> EXTRACT_S_1
* Rename ND_TCHECK_/ND_TTEST_ macrosFrancois-Xavier Le Bail2017-11-221-1/+1
| | | | | | | | Now all the macros have a name meaning a count in bytes. e.g.: ND_TCHECK_32BITS -> ND_TCHECK_4 ND_TTEST_32BITS -> ND_TTEST_4
* Rename EXTRACT_nBITS() macros to EXTRACT_BE_nBITS()Francois-Xavier Le Bail2017-11-181-2/+2
| | | | | It indicates clearly that these macros are used to extract big-endian integral values.
* CVE-2016-7922/AH: Add a bounds checkFrancois-Xavier Le Bail2017-01-181-5/+2
| | | | | Moreover: Fix a warning (unused variable 'ep').
* CVE-2016-7922/Report to our caller that dissection failed if a bounds check ↵Guy Harris2017-01-181-2/+4
| | | | | | fails. That way, our caller doesn't keep dissecting.
* Move the printer summaries from INSTALL.txt to each printerFrancois-Xavier Le Bail2016-08-141-0/+2
| | | | | | | | with the tag '\summary:' for greping. Remark: Currently some printers have no summary line. Moreover: Summarize all printers with a single line in INSTALL.txt
* 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
* Printers must include 'netdissect.h', not 'interface.h'Francois-Xavier Le Bail2015-09-051-1/+1
|
* 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.
* u_intN_t is dead, long live uintN_t.Guy Harris2014-04-231-1/+1
| | | | | | | | | And, as we require at least autoconf 2.61, and as autoconf 2.61 and later have AC_TYPE_UINTn_T and AC_TYPE_INTn_T macros, we use them to define the uintN_t and intN_t macros if the system doesn't define them for us. This lets us get rid of bitypes.h as well.
* make use of NETDISSECT_REWORKEDDenis Ovsienko2014-03-151-1/+2
| | | | | Update the already converted decoders to define the macro and to include interface.h instead of netdissect.h. Fix incurred compile errors.
* NDOize AH, BEEP and DTP decodersDenis Ovsienko2014-02-271-13/+11
| | | | Also remove some unnecessary passages.
* don't include addrtoname.h needlesslyDenis Ovsienko2014-02-251-1/+0
|
* 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.
* Have various routines for printing non-final headers for IPv4/IPv6guy2003-11-191-2/+2
| | | | | | | return -1 if they run out of data. Have the IPv4 and IPv6 dissectors check for non-positive return values from those routines and quit if they see one.
* Have the configure script arrange that the Makefile define _U_guy2003-11-161-4/+4
| | | | | | | | | | appropriately, and that GNUmakefile and the MSVC++ project file define it apppriately, as we do with libpcap, rather than defining it in "interface.h". Undo the rcsid-shuffling and addition of extra #includes, as we no longer need to arrange that "interface.h" be included before using _U_ in an RCS ID or copyright.
* From Neil Spring:guy2003-11-151-4/+4
| | | | | | | | | | | use "_U_" in the definitions of "rcsid[]", to eliminate complaints about those variables being unused; move the definitions after the include of "interface.h", or add an include of "interface.h", so that "_U_" is defined. Include "config.h" before including "tcpdump-stdinc.h" in "missing/datalinks.c".
* The "__attribute__((packed))" tag on structures causes some files not toguy2002-12-111-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | compile with Sun C, as "interface.h" isn't being included before the structures are being declared. Furthermore, in the files that Sun C *can* compile, it doesn't cause Sun C to generate code that's safe with unaligned accesses, as "__attribute__" is defined as a do-nothing macro with compilers that don't support it. Therefore, we get rid of that tag on the structures to which it was added, and instead use "EXTRACT_16BIT()" and "EXTRACT_32BIT()" to fetch 16-bit and 32-bit big-endian quantities from packets. We also fix some other references to multi-byte quantities to get rid of code that tries to do unaligned loads on platforms that don't support them. We also throw in a hack that makes those macros use "__attribute__((packed))" on structures containing only one 16-bit or 32-bit integer to get the compiler to generate unaligned-safe code rather than doing it by hand. (GCC on SPARC produces the same code that doing it by hand does; I don't know if GCC on any other big-endian strict-alignment processor generates better code for that case. On little-endian processors, as "ntohs()" and "ntohl()" might be functions, that might actually produce worse code.) Fix some places to use "%u" rather than "%d" to print unsigned quantities.
* Get rid of the "-Wno-unused" flag, and fix up most of theguy2002-09-051-2/+2
| | | | | | | | | | | | | | | unused-parameter problems reported by GCC. Add an _U_ tag to label parameters as unused if the function is called through a pointer (so that you can't change its signature by removing parameters) or if there are unused parameters only because the function isn't complete. Add some additional bounds checks the necessity for which was revealed while cleaning up unused-parameter problems. Make some routines static. "lcp_print()", defined in "print-lcp.c", isn't called anywhere - "print-ppp.c" has the code to dissect LCP. Get rid of "print-lcp.c".
* Added support for Win32, based on WinPcap.risso2002-08-011-7/+2
|
* whitespace cleanupitojun2002-06-111-2/+2
|
* Eliminate some unused parameters.fenner2001-09-171-5/+4
| | | | | | | | | | | Use const more. Use EXTRACT_* macros more. Use TCHECK* more. Use tok2str() to replace some home-grown workalikes. smb: - Get rid of private types, use tcpdump-defined types - Rename fdata and fdata1 to smb_fdata and smb_fdata1 to avoid conflict with IRIX library function.
* print SPI in hex.itojun2000-12-121-2/+2
|
* move ah/esp struct declratiaon into separate header (ah.h and esp.h).itojun2000-10-061-18/+2
| | | | | | they are from KAME. use ah.h and esp.h where necessary.
* Get rid of some includes of <net/route.h>, and empty declarations ofguy2000-10-061-3/+1
| | | | | | "struct mbuf" and "struct rtentry" - they shouldn't be necessary (and weren't on the platforms on which I tested, both with GCC and the native compiler if it isn't GCC).
* typo in comment. from jinmei@kame.netitojun2000-10-031-2/+2
|
* Get rid of includes of <netinet/in_systm.h>, and replace "n_short",guy2000-09-291-2/+1
| | | | "n_long", and "n_time", defined in that file, with other types.
* Get rid of unneeded includes of <net/if.h>.guy2000-09-281-2/+1
|
* Add an "ip.h" header, to declare the IP stuff needed by dissectors, andguy2000-09-231-4/+1
| | | | | | | | | | | have dissectors include them rather than <netinet/ip.h> or <netinet/ip_var.h>, if they actually need that stuff. Put the declarations of the ICMP stuff directly into "print-icmp.c". Remove all unnecessary includes of <netinet/ip*.h> files. Copy the byte-order stuff from "nameser.h" into "tcp.h".
* Add "tcp.h" and "udp.h" headers, to declare the TCP and UDP stuff neededguy2000-09-231-4/+1
| | | | | | | | | by dissectors, and have dissectors include them rather than <netinet/udp.h>, <netinet/udp_var.h>, or <netinet/tcp.h>, if they actually need that stuff. Remove all unnecessary includes of <netinet/udp*.h> or <netinet/tcp*.h> files.
* Add definitions of Ethernet types fromguy2000-09-231-2/+1
| | | | | | | | | | | | | | | | "linux-includes/netinet/if_ether.h" to "ethertype.h". Move other stuff used by dissectors from <netinet/if_ether.h> to "ether.h", along the lines of "fddi.h" and "token.h". Move ARP declarations from BSD include files to "print-arp.c". Remove from dissectors includes of <netinet/if_ether.h>, and add includes of "ethertype.h" and/or "ether.h" as necessary. Get rid of configuration options that test declarations now made in "ether.h" or "print-arp.c", as those declarations are now under our control, not the OS's control.
* Put back the $'s in the Header RCS strings.fenner1999-12-151-2/+2
| | | | Make rcsid const to quiet warnings.
* Switch to config.h instead of passing defines in DEFS.fenner1999-11-211-0/+4
|
* Bring in KAME IPv6 tcpdump. replaces esp/ah/isakmp decoder.itojun1999-10-301-53/+52
| | | | | | | Hope I did not break anything. Portability on IPv4-only node needs checking, I'll do this very soon. (sorry for rather jumbo commit) XXx what is _FAVOR_BSD?