Re:Gosniff: A TUI-Based Tcpdump
by accrual on Sunday May 01, 2022 @06:24PM
(#31229318)
I like how each packet is broken out into layers. Would be helpful for learning about new protocols on the wire.
[ Parent
| on HN ]
This, for what it's worth, is a side-effect of using gopacket, which is a deceptively powerful library. You essentially have a big chunk of `tcpdump`'s encoding available to you any time you're working with packet buffers in Go, because of that library; for instance, to debug our BPF-based UDP stuff, there's an interface that shuttles packet snapshots over perf buffers and about 30 lines of Go code to read and decode those buffers. I was surprised at how much I got "for free" just by importing gopacket.
It's great, more people should do cool stuff with it.