Libraries Dug Song's libdnet - dumb network library: Provides a simplified, portable interface to several low-level networking routines, including network address manipulation, kernel arp(4) cache and route(4) table lookup and manipulation, network firewalling, network interface lookup and manipulation, and raw IP packet and Ethernet frame transmission. TCP Packet creation example: tcp = (struct tcp_hdr *)(pkt + IP_HDR_LEN); tcp_pack_hdr(tcp, con->th_dport, con->th_sport, ...); iplen = IP_HDR_LEN + (tcp->th_off << 2) + len; ip_pack_hdr(pkt, 0, iplen, id, df, Honeyd_ttl, IP_PROTO_TCP, ...); memcpy(pkt + IP_HDR_LEN + (tcp->th_off << 2), payload, len); ip_checksum(pkt, iplen); ip_send(Honeyd_ip, pkt, iplen);