LANtern is a frame and packet analyzer for Linux. It's written in C (without pcap) and released under the MIT license.
LANtern currently supports ethernet frames, ARP, MPLS, RARP, IPv4 (AH, ESP, GRE, ICMP, IGMP, TCP, IPComp, UDP, UDP-Lite, and IP-in-IP encapsulation)
I hope to soon write/release a BSD version.
Feel free to make changes to fit your needs. This isn't released under the GPL so you're not "required" to submit modifications, but if you want to send me some enhancements or new features, please do.