Scapy: a powerful interactive packet manipulation program
secdev.org
secdev.org
We ended up keeping the addon for the ioctl calls, but the addon for sending raw packets didn't make it: we didn't want to reconstruct the javascript object versions of packets sniffed by node_pcap in order to send them on the raw socket (didn't want to make a small mistake and break the whole project for ourselves).
So we used scapy that part of the tethering project; worked well for us though it could have used more docs.
Scapy and Impacket are basically Python scriptable versions of tcpdump / wireshark. Very useful tools, particularly for measuring a server's behavior without having to modify it for logging, etc. I once used pcapy to log several years of an NTP pool server to make this graph: http://imgur.com/IvRdU
Includes a FAQ and a great guide for capturing rogue DHCP servers on your network: http://trac.secdev.org/scapy/wiki/IdentifyingRogueDHCPServer...
I've had to use it a few times. It is also (or used to?) be in MacPorts.
http://packetfactory.openwall.net/projects/libnet/
which route created / maintained.
I've always wanted an "nsed" -- to mimic the "ngrep" idea. A quick and dirty way to, for example, modify HTTP headers on the fly.