Introduction to libnet

Designed by Mike Schiffman, libnet is a portable, open source, C-language library for creating and injecting network packets. libnet supports packet creation at all network levels with the TCP/IP network model, as demonstrated in Figure 11-1.

TCP/IP model and example of supported protocols

Figure 11-1. TCP/IP model and example of supported protocols

As of libnet version 1.1.2.1, you can create packets for the following protocols:

802.1q
FDDI
ICMP
IPSEC
Token Ring
DHCP
802.1x
ARP
IGMP
DNS
VRRP
BOOTP
802.2
TCP
IPv4
RIP
MPLS
GRE
802.2 SNAP
UDP
IPv6
RPC
NTP
BGP
802.3
CDP
ISL
STP
OSPF
Sebek
Ethernet

In addition, you can create other protocols within libnet due to its absolute control over packet data content.

Get Network Security Tools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.