163 Commits

Author SHA1 Message Date
David Anderson
af2fc8892a Add a Uint16 reader for dhcp.Options. 2016-02-28 01:05:54 -08:00
David Anderson
33e5e06817 Change the separation between packets to help PXE testing. 2016-02-27 23:15:07 -08:00
David Anderson
3cbc2e2788 Add a test for DHCP marshalling.
And fix a bug in DHCP marshalling that the test found :).
2016-02-27 22:51:45 -08:00
David Anderson
e799b6e1ab Correct the parsing of the server IP address.
It's the address of the responding server, not the boot server. Which
makes sense, since there's another field for the boot server name.
2016-02-27 22:36:49 -08:00
David Anderson
fa657ad649 Add a basic regression test for DHCP parsing. 2016-02-27 22:34:18 -08:00
David Anderson
178a83f3e0 Make pcap.Reader's API look like bufio.Scanner's.
The Next/Packet/Err structure makes read loops much
cleaner, and presents a more familiar interface for people
familiar with the stdlib.
2016-02-27 21:21:10 -08:00
David Anderson
6b9cba0085 Add brief package documentation. 2016-02-27 20:31:08 -08:00
David Anderson
7549f62395 Implement a pcap writer. 2016-02-27 20:25:43 -08:00
David Anderson
67755cdc83 Add a basic pcap reader.
Very basic, it only parses the pcap structure to pull out the packets,
nothing more.
2016-02-27 19:11:23 -08:00
David Anderson
133baa88bd Initial implementation of DHCP parsing. 2016-02-27 16:35:40 -08:00
David Anderson
90c89c2bd7 Implement the documented default listening behavior for TFTP. 2016-02-27 16:35:03 -08:00
David Anderson
7f4b62d890 Drop the retransmit timeout on the lossy connection test.
Since this is a test to localhost, a 10ms RTO is more than enough,
and speeds up the test 10x.
2016-02-18 09:36:19 -08:00
David Anderson
af8e62003b Implement a read-only TFTP server.
Testing is done against the atftp client.
2016-02-18 00:41:31 -08:00