summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Remove many (761) redundant ND_TCHECK_n() callstest-rcFrancois-Xavier Le Bail2020-09-055-5/+5
| | | | | | | | | | | 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.
* RADIUS: Redo the RFC 5580 test for Solaris. [skip ci]Denis Ovsienko2020-08-272-3/+3
| | | | | | | | | The file tests/RADIUS-RFC5580.pcap had all NTP timestamps set to 0x01234567.89abcdef seconds since year 1900, which on Linux and FreeBSD produced "19088743.537777777 (1900-08-09T22:25:43Z)", but on Solaris 10 produced "(unrepresentable)". Increment Sighting Time by 120 nominal years worth of seconds and make Time-to-Live and Retention Expires 12 and 48 hours later respectively.
* RADIUS: Fixup the previous commit.Denis Ovsienko2020-08-271-5/+6
| | | | | | | | | Use GET_ macros and C99 uint types. Use nd_printn() to print RADIUS strings, which are not NUL-terminated (see RFC 2865 page 25). Use p_ntp_time() to print NTP timestamps. In print_attr_location_data() print the Location field as hex and add a comment to explain why. In print_basic_location_policy_rules() display any non-zero MBZ bits in the Flags field. Make output format more consistent. Update the test case.
* RADIUS: Add attributes from RFC5580. (GH #706)Herwin Weststrate2020-08-273-0/+13
|
* macsec: Update the outputs of two testsFrancois-Xavier Le Bail2020-08-102-2/+2
| | | | This is a follow-up to 69a76fb67a36a19779142d07bb0cb31b7736a936.
* SRv6: Add a test output without '-e'Francois-Xavier Le Bail2020-08-073-1/+3
| | | | This is a follow-up to commit 1103418a18d71c0fe448c0459a42ff1bc20bb0dc.
* DHCP: Make option printing format more consistent.Denis Ovsienko2020-08-078-1475/+1475
| | | | | | | | | | | | | | | rfc1048_print() used to print DHCP options in a few different formats depending on the context (see GH issue #866): * at the top of an RFC 1048 block: * known options: [string] name and [decimal] tag * unknown options: tag twice * inside a Parameter Request (55) block: * known options: name * unknown options: tag Change it to use the "Name (tag)" format (as in TCP, BGP, etc) in all contexts. Update output for 8 tests.
* Add support for ethernet IP protocolAhmed Abdelsalam2020-08-073-0/+2
| | | | | | | | | | | | | | | | | | | 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>
* PPP: Update the link-layer dissectors to void functionsFrancois-Xavier Le Bail2020-08-062-2/+2
| | | | | | Moreover: Remove trailing "_if" from some protocol names. Update the outputs of two tests accordingly.
* Support for EAP Dump in RADIUS MessagesAravind Prasad S2020-07-221-4/+7
| | | | (pull request #864)
* EAP: Add verbose output for the test case eapon1.pcapFrancois-Xavier Le Bail2020-07-202-0/+332
|
* LLDP 8021 link aggregation TLV supportMoses Devadason2020-06-304-0/+20
| | | | | | As per IEEE std 802.1-AB-2009, 802.3 link aggregation TLV has been deprecated and link aggregation TLV has been added as an 802.1 TLV. Support for this is given.
* TESTrun: add definitions of true and false.Guy Harris2020-06-141-0/+5
| | | | | | | | If we don't give them definitions, in some contents they are interpreted as strings, and 'false', being a non-empty string, is interpreted as being true. See, for example: https://stackoverflow.com/questions/6936194/is-there-a-built-in-true-false-boolean-value-in-perl
* TESTrun: fix copy-and-pasteo.Guy Harris2020-06-141-1/+1
| | | | | | | | (Matters only on Windows, and we're still not ready for the check target to be used on Windows yet; for one thing, it requires that tcpdump be built with the latest shiniest libpcap, to handle some capture files that use post-1.9 LINKTYPE_ values, and we aren't yet set up to do that.)
* TESTrun: process the system return value differently on Windows and UN*X.Guy Harris2020-06-131-19/+99
| | | | | | | | | | | | | We can use the POSIX functions on UN*X, but not on Windows. Use them on UN*X, but extract the exit status manually on Windows. Put in a pile of comments about the return status of commands, command interpreters, and the Perl system function on UN*X and Windows. If system simply fails to run at atll (returns -1), put a message into the faked output file. Get rid of some duplicate initializations while we're at it.
* TESTrun: put white space between flags.Guy Harris2020-06-131-2/+2
| | | | I guess that's not allowed, at least not by fc.
* TESTrun: Windowsify one more path.Guy Harris2020-06-131-1/+1
|
* TESTrun: canonicalize the path of the standard error file.Guy Harris2020-06-131-1/+2
| | | | | | | | DEC's decisions and the Multics developers' decisions affect us to this day. (Unix went with the Multics use of - to indicate options; DOS went with the DEC use of / to indicate options, so they had to use \ as the pathname component separator, and Windows followed suit, so here we are.)
* TESTrun: add and expand comments.Guy Harris2020-06-131-2/+13
| | | | [skip ci]
* TESTrun: put all redirection at the end of the command line.Guy Harris2020-06-131-1/+1
| | | | That makes it a bit easier to read.
* TESTrun: use the same code paths on Windows and UN*X.Guy Harris2020-06-131-78/+72
| | | | There's no need to treat Windows specially in that code path.
* TESTrun: always return a value from runtest().Guy Harris2020-06-131-0/+1
| | | | | | Falling off the end isn't reported as an issue by the Perl interpreter here, and doesn't appear to cause a reliable return value, so not all failed tests are counted.
* TESTrun: I missed one use of $printcmd; use showfile() for it.Guy Harris2020-06-131-1/+1
|
* Add two test files for the unsupported link-layer protocols printerFrancois-Xavier Le Bail2020-06-135-0/+33
| | | | | | | This is a follow-up to commit 25687e1a312a3bb63a6e8d7f0af0210a615e24a8. These files come from the Wireshark menagerie: 0031419.pcap (link type 160) and 5632-Raw_D-BUS.cap (first two packets).
* TESTrun: use fc, rather than diff, on Windows.Guy Harris2020-06-131-2/+20
| | | | diff doesn't come standard with Windows; fc does.
* TESTrun: clean up printing of files.Guy Harris2020-06-131-11/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many Windows commands only accept paths using backslashes, because slashes are option separators. Add a showfile() function that takes a pathname as an argument and: on Windows, converts the pathname to canonical form - which means any slashes will be converted to backslashes - and run "type" on it; on UN*X, run "cat" on it. Convert cat foo | diff bar - to diff bar foo to avoid using cat at all. (Note also that the closest built-in Windows equivalent of diff, fc, does *not* support reading the standard input as one of the files to compare, so it also will avoid that when we change those to use fc on Windows.) The one remaining use of cat is in a command with pathnames, so use a type command, with backslash-separated paths, on Windows, and cat, with slash-separated paths, on UN*X. We might just want to do that directly in Perl; add a comment about that.
* TESTrun: fix some problems when run on Windows.Guy Harris2020-06-111-10/+31
| | | | | | | | | | | | | | Run tcpdump, not windump - we build it as tcpdump, not windump, and there's not really a reason to have a separate windump program. For now, at least, assume a Visual Studio debug build, so it's in the Debug subdirectory. Use that path for *all* calls to tcpdump. Use "type" rather than "cat" to print files on Windows. It still needs to be changed to, for example, not use sed.
* DNS: Add two test files (over TCP and over UDP)Francois-Xavier Le Bail2020-06-1011-0/+101
|
* macsec: update the test files.Guy Harris2020-05-287-7/+7
| | | | | | Add the frame number, as we now run the tests with -#. Fix some output to match the current state of the code.
* Merge branch 'master' into macsecGuy Harris2020-05-271043-6535/+63551
|\
| * rsvp: add error messages for too-short items.Guy Harris2020-05-251-1/+2
| | | | | | | | Update the output file for tests.
| * IS-IS: Add LAN Adjacency Segment Identifier subTLVckishimo2020-05-254-6/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adapted from GitHub pull request #798. Print " (invalid)" when combinations of V-Flag and L-Flag are invalid. Update comments (draft -> RFC). Remove some ND_TCHECK_LEN because GET_ use. Update the output of isis_sid test because commit b09710dfcdd50251efd487e800cd1b9fd01eaf96 updated the output format of the IS-IS dissector.
| * Merge pull request #773 from Mister-X-/fix-reason-codesGuy Harris2020-05-2467-0/+0
| |\ | | | | | | Fix and update 802.11 reason codes
| | * Added test PCAP for reason codesMister X2019-06-2067-0/+0
| | |
| * | Merge pull request #772 from Mister-X-/fix-status-codesGuy Harris2020-05-24108-0/+0
| |\ \ | | | | | | | | Fix and update 802.11 status codes
| | * | Added test PCAP for status codesMister X2019-06-20108-0/+0
| | |/
| * | babel: update to include various later RFCs and I-Ds, including RFC 6126bis.Guy Harris2020-05-244-1/+915
| | | | | | | | | | | | | | | | | | | | | | | | Adapted from GitHub pull request #768, with some cleanups and an additional test update to handle the addition of the Unicast flag to the Hello TLV. Added a list of RFCs and I-Ds.
| * | Fix BGP Route Target Membership NLRI prefix decodingEamon Doyle2020-05-223-0/+90
| | | | | | | | | | | | | | | | | | As described in RFC4684, prefix lengths of 0 and 32-96 are all valid. Introduce bgp_rt_prefix_print() to print partial route targets.
| * | SLIP: Update the link-layer dissectors to void functionsFrancois-Xavier Le Bail2020-04-303-3/+3
| | | | | | | | | | | | | | | | | | Moreover: Update the protocol names (sl_if -> slip and sl_bsdos_if -> slip_bsdos). Update the output of some tests accordingly.
| * | Add test files for a previous fixFrancois-Xavier Le Bail2020-04-305-0/+6
| | | | | | | | | | | | | | | | | | | | | Fix was: "SLIP: Add some bounds checks" (commit bbe15da782ef74dd29feea6e3ea0f2f7d47b4697) The pcap files were updated to avoid pcap_loop() error messages.
| * | Rename a pcapng test file to .pcapngFrancois-Xavier Le Bail2020-04-252-1/+1
| | |
| * | Update the outputs of two testsFrancois-Xavier Le Bail2020-04-102-2/+2
| | | | | | | | | | | | This is a follow-up to the previous commit.
| * | DNS: Update printing the EDNS options and their data with -vvjacobgb242020-04-105-33/+213
| | | | | | | | | | | | | | | | | | (pull request #808) Format of EDNS options matches format of TCP options.
| * | DNS: Add printing the EDNS optionsCasey Deccio2020-04-105-0/+35
| | | | | | | | | | | | (pull request #762)
| * | IS-IS: Add support for Node/Prefix SIDs as per rfc 8667Hannes Gredler2020-04-075-18/+45
| | | | | | | | | | | | (pull request #845)
| * | add support for Broadcom LI headerHannes Gredler2020-04-024-0/+427
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (pull request #843) fix build break for Broadcom LI printer on BSD platforms incorporate review comments: make bcm_li_print() void, add a sample capture incorporate review comments: remove trailing tabs add BCM LI outputs to testset incorporate review comment: return after printing update verbose output for bcm-li
| * | PKTAP: Update the link-layer dissector to a void functionFrancois-Xavier Le Bail2020-03-281-1/+1
| | | | | | | | | | | | | | | | | | Moreover: Remove trailing "_if" from protocol name. Update the output of a test accordingly.
| * | IPv4/IPv6 demux: Rename a printerFrancois-Xavier Le Bail2020-03-083-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Rename ip_print_demux() to ip_demux_print(), with _print suffix like in most similar cases. Moreover: Rename a test.
| * | Add "domain" as an option for -TFrancois-Xavier Le Bail2020-03-027-0/+58
| | | | | | | | | | | | | | | | | | This allows tcpdump to handle DNS running on non-standard ports. Add two test files with DNS over TCP and DNS over UDP, port 8053.
| * | MPTCP: parse v1 ADD_ADDR optionPeter Krystad2020-03-023-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC6824bis-18 (MPTCP version 1) makes changes to the MPTCP ADD_ADDR option format. An HMAC field is added to the option and the IP version field is removed and replaced with an Echo bit that provides a reliability mechanism. This change allows either v0 or v1 ADD_ADDR options to be parsed and displayed correctly. Signed-off-by: Peter Krystad <peter.krystad@linux.intel.com>