Commit Graph

5 Commits

Author SHA1 Message Date
David Anderson
e8185cf62d Use cmp.Diff to compare pcap packets.
This fixes a spurious failure from reflect.DeepEqual.
2017-12-24 17:22:09 -08:00
David Anderson
0cca8f4c85 Remove dependency on prettyprint library.
We only really use it to pretty-print pcap.Packet, and it was making
`go vet` angry. So we replaced it with a specialized pretty printer
instead. As a nice side-effect, it shows nicer timestamps now.
2016-03-24 17:26:45 -07:00
David Anderson
576e70e92c Add copyright/license headers to source. 2016-03-05 15:14:52 -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
7549f62395 Implement a pcap writer. 2016-02-27 20:25:43 -08:00