This project is mirrored from https://github.com/nplab/packetdrill.
Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer or owner.
Last successful update .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer or owner.
Last successful update .
- Dec 28, 2014
-
-
Michael Tüxen authored
This commit adds support for the following SCTP socket options: * SCTP_RTOINFO * SCTP_INITMSG * SCTP_NODELAY * SCTP_MAXSEG * SCTP_DELAYED_SACK * SCTP_MAX_BURST Tested on Linux and FreeBSD. NetBSD and OpenBSD doen't support SCTP and should not be affected. Signed-off-by:
Michael Tuexen <tuexen@fh-muenster.de>
-
Michael Tüxen authored
This commit get the declaration and definition of the parse_mpls() function in-line. Make it static. Signed-off-by:
Michael Tuexen <tuexen@fh-muenster.de>
-
Michael Tüxen authored
This patch fixes two issues: * It only makes sense to report errno if a system call has actually failed. * You can't call strerror() two times in printf(), since it might use a single static buffer. Signed-off-by:
Michael Tuexen <tuexen@fh-muenster.de>
-
Michael Tüxen authored
This commit makes sure that the udp length is verified in host byte order. Signed-off-by:
Michael Tuexen <tuexen@fh-muenster.de>
-
- May 09, 2014
-
-
Neal Cardwell authored
In local mode, read the outbound packets from the tun device. A recent Linux patch "tcp: avoid retransmits of TCP packets hanging in host queues" means that TCP behavior now depends on whether and when the network device (tun device here) consumes the packets. We now read all these packets so that the kernel can exercise its normal code paths for packet transmit completion. An alternative approach would be to set the tun txqueuelen to 0, but this would impact qdisc behavior. It is more realistic, and has fewer side-effects, to make sure the network device has a non-zero queue length, but packets are still consumed. Change-Id: Ia922994d4eeea12e61d7876b4c4ef34bc9cef34e
-
- Jan 24, 2014
-
-
Neal Cardwell authored
Fix the packet header location calculations in packet_append_header() forgot to account for the fact that there might be layer 2 headers. Remote mode has been broken since the addition of encapsulation support, partly due to this issue. Change-Id: Idfb0670da8799e11fe1b72771ed13d52d8e991fe
-
Neal Cardwell authored
packet_buffer_to_string() needs to accont for the fact that packet->ip_bytes does not capture the full length of the packet (in remote mode there will be layer 2 ethernet headers as well). Change-Id: If2c95e68071545a27078141b6ba5f98cd2c46fb9
-
Neal Cardwell authored
Fix wire_server_netdev_receive() to reflect the fact that in remote mode the server is sniffing packets that are inbound (whereas in local mode we are sniffing *outbound* packets). This was a bug introduced in "net-test: packetdrill encap support: refactor packet receive loops into one loop". Remote mode has been broken since the addition of encapsulation support, partly due to this issue. Change-Id: Ia92f70f48ae90cb2e089ee51d728473a12c63595
-
- Jan 11, 2014
-
-
Neal Cardwell authored
-
Mike Neilsen authored
Signed-off-by:
Mike Neilsen <mneilsen@acm.org>
-
Mike Neilsen authored
Handle ICMPv4 and ICMPv6 parsing separately. Return PACKET_BAD if IP and ICMP versions mismatch. Signed-off-by:
Mike Neilsen <mneilsen@acm.org> Signed-off-by:
Neal Cardwell <ncardwell@google.com>
-
Neal Cardwell authored
Add a little helper for accessing the inner-most header of a packet. In preparation for a patch to support parsing ICMP packets on the wire.
-
- Dec 28, 2013
-
-
Michael Tüxen authored
This patch adds the missing end of table marker in the platform_symbols_table for FreeBSD. Signed-off-by:
Michael Tuexen <tuexen@fh-muenster.de>
-
- Dec 23, 2013
-
-
Michael Tüxen authored
This commit adds support for the CRC32C checksum used by SCTP. Also add a unit-test for it. Signed-off-by:
Michael Tuexen <tuexen@fh-muenster.de>
-
Matthieu Baerts authored
Fixed typos in the 'usage' message: a few ']' were missing Signed-off-by:
Matthieu Baerts <matttbe@gmail.com>
-
Michael Tüxen authored
Fixes "make tests" on FreeBSD/arm. Signed-off-by:
<tuexen@fh-muenster.de>
-
- Nov 30, 2013
-
-
Barath Raghavan authored
The --dry_run command line flag causes packetdrill to verify command line args, load and parse the given script, but not execute it. If any errors are found during these steps, packetdrill will print an error as before. Otherwise, it will exit(0) and produce no output. Change-Id: Ibf4502c6ea326539346a58b58d7feb29d4b3da69
-
Neal Cardwell authored
Test the code to parse on-the-wire MPLS label stacks. Change-Id: I21884aa720de3c3319636b7391827b54049de574
-
Neal Cardwell authored
Test code to print on-the-wire MPLS label stacks in a human-readable format matching the script syntax. Change-Id: I7e5d0d8d07490fee1fb744bbd03804bb12e22ae4
-
Neal Cardwell authored
Code to verify that the outbound on-the-wire MPLS label stacks from the kernel under test match those from the script. Change-Id: Ib7e4e4dc04cdd8d760c8099948f7cdda7973202a
-
Neal Cardwell authored
Code to print MPLS label stacks in a human-readable format matching the script syntax: mpls (label 123, tc 1, [S], ttl 255) (label 456, tc 1, [S], ttl 255) Change-Id: I706be8aab089fbad79eabde67125345330728517
-
Neal Cardwell authored
Code to parse on-the-wire packets using an encapsulation layer that is an MPLS label stack. Change-Id: I62585d491303cd8bd85c8afe5b652c4f1be572d9
-
Neal Cardwell authored
Code to parse script packets using an encapsulation layer that is an MPLS label stack. The syntax looks like: mpls (label 123, tc 1, [S], ttl 255) (label 456, tc 1, [S], ttl 255) This is borrowed from the syntax from tcpdump, which is: MPLS (label 123, exp 1, [S], ttl 255) (label 456, exp 1, [S], ttl 255) We use "tc" because RFC 5462 renamed the EXP ("experimental") field to the TC ("traffic class") field. We use lower-case "mpls" instead of "MPLS" for consistency with other packetdrill protocols, and for ease of typing. Change-Id: I2e797aead8605da9fe3f0461594cf7273d4ef0ec
-
Neal Cardwell authored
Basic code for filling in MPLS headers and appending them to packets. Change-Id: Id31ef8e97de3e9b95c3b05ff42aade6a3d8490a5
-
Neal Cardwell authored
Basic definitions for reading and writing MPLS label stacks. Change-Id: I4190b816082fe57a6cbececfee368aabeab57daa
-
Neal Cardwell authored
The big endian folks would also need a recursion_control field too, now wouldn't they? Change-Id: Ie535241873d3a576d76993e14a803319e3c07250
-
Neal Cardwell authored
Allow the --remote_ip config parameter to be a prefix, not just a single address. The entire remote prefix is routed to the tun device or remote packetdrill machine. The goal here is to all tests to use more than one remote IP. The immediate motivation is testing GRE, where there is a remote IP for the TCP endpoint and a separate remote IP for the GRE decapsulator. But eventually we'll also want to allow testing multiple concurrent TCP connections from multiple remote IPs addresses as well. Here are examples of the remote prefix you get for various values of the --remote_ip field. These are chosen for convenience and backwards compatibility with existing tests that are already using the --remote_ip parameter. o Default: configuration remote prefix ------------------------------ ----------------- IPv4, no --remote_ip -> 192.0.2.0/24 (default) v4/6, no --remote_ip -> 192.0.2.0/24 (default) IPv6, no --remote_ip -> 2001:DB8::0/32 (default) o Explicit IP without prefix length (prefix includes all bits): configuration remote prefix ------------------------------ ----------------- IPv4 --remote_ip=10.248.0.3 -> 10.248.0.3/32 v4/6 --remote_ip=10.248.0.3 -> 10.248.0.3/32 IPv6 --remote_ip=2001:db8::3 -> 2001:db8::3/128 o Explicit with prefix length: configuration remote prefix ------------------------------ ----------------- IPv4 --remote_ip=10.248.0.3/16 -> 10.248.0.0/16 v4/6 --remote_ip=10.248.0.3/16 -> 10.248.0.0/16 IPv6 --remote_ip=2001:db8::3/16 -> 2001::0/16 Change-Id: Ibc95c3419d66bcf1bbfd8a1fc7650d0003345ef2
-
Neal Cardwell authored
The goal here is to be able to route a prefix of user-configurable size over the tun device or to the remote packetdrill server, so that tests can use more than one remote IP. The immediate motivation is testing GRE, where there is a remote IP for the TCP endpoint and a separate remote IP for the GRE decapsulator. Change-Id: I36b7025a242c3803802087c91d284a41c62ca1bd
-
Neal Cardwell authored
packetdrill already supported an inet_addr() as a part of a sockaddr expression (since that's how strace represents the sockaddr argument to connect(), for example). But now we also want to allow a stand-alone inet_addr() call, to allow the specification of IP addresses for other contexts. Change-Id: Ia69751030eff399e6b0d9cbb4a15530f0b721278
-
Neal Cardwell authored
To allow hexadecimal integers with the most significant bit set to be passed as system call parameters, we need to broaden the set of values acceptable to get_s32() to include u32. If this proves confusing, then at some point in the future we could rename this to be get_32() or something. Change-Id: I416f80f8c135306c6b64de8b700186d0b9a005c7
-
Neal Cardwell authored
Properly recognize hex integers. Change-Id: I23b002e06ec21a445e66e82d47e72a65071b9a01
-
Neal Cardwell authored
Tests for basic support of printing encapsulation headers. Change-Id: I2a3e743db44493cb8b338943ab40fc96d9abf63c
-
Neal Cardwell authored
Add simple coverage of IP/GRE encapsulation parsing. Change-Id: I5938edc521a387e0c72bbf547d2862077f6af204
-
- Nov 28, 2013
-
-
Neal Cardwell authored
Basic support for printing encapsulation headers: IPv4, IPv6, GRE. Change-Id: I67b9e432c98a00ba2c19ac6ea25ea35592462ea9
-
Neal Cardwell authored
Add support for IPv6 in encapsulation layers, including: lexical scanning of IPv6 addresses, parsing IPv6 encap in scripts, appending and filling in IPv6 encapsulation. Change-Id: I1349cd4056c168a4114a92324eb2a321f7db7697
-
Neal Cardwell authored
When we sniff an unknown packet, free it and allocate another packet at the top of the sniffing loop. Previously we were not clearing state after parsing an unknown packet, so state from the unkbown packet could linger on, co-mingling with state from the next sniffed packet. Change-Id: Ia9a330766969b114fd6084a087ff3f0d6b11d9d4
-
Neal Cardwell authored
Factor out the packet sniffing loop that's common to local and remote mode, since it is nearly identical in both cases. This is in preparation for fixing a bug that is found in both loops, so we can make the fix in just one place. Change-Id: Ic9a9b84b66a9f812866b1e29cd7c897f7c1d40cf
-
Neal Cardwell authored
Basic verification for outbound encapsulated packets from the kernel under test. Change-Id: I5efeb08fb262312ec85d257680e4df46829a38f0
-
Neal Cardwell authored
Add code for basic parsing of GRE v0 headers, per RFC 1701. Change-Id: I0d564f3ef17132f94a1df76512409b4cee7b441f
-
Neal Cardwell authored
The main engine for handling encapsualted packets in packetdrill, including: - parsing scripts with encapsulation - parsing packets with encapsulation - injecting packets with encapsulation Encapsulated packets look like the following, which has an IP header, GRE header, and then regular IP/TCP header: +0 > ipv4 1.1.1.1 > 2.2.2.2: gre: . 1:1001(1000) ack 1 See other patches in the series for more detailed examples. Change-Id: Ia8c7580e268f5b0347bd9d3fdc73b096f751a79d
-