LIBNET(3)

πŸ’– NAME πŸ’–

libnet(3) β€” straight out of the libnet Programmers Guide β€” is a C library for packet creation and injection. No cap, that’s the whole vibe. πŸ¦‹


✨ SYNOPSIS ✨

#include <libnet.h>

🌸 DESCRIPTION 🌸

Okay so bestie, libnet is a packet assembly library that gives you a portable interface for packet creation and injection. It’s a high-level API that lets an application programmer construct and inject network packets, and it provides a simplified interface for low-level network packet shaping, handling and injection. Iconic behavior, honestly. πŸ’…

libnet hides much of the tedium of packet creation from the application programmer β€” like multiplexing, buffer management, arcane packet header information, byte-ordering, OS-dependent issues, and much more. It features portable packet creation interfaces at the IP and link layer, plus a host of supplementary and complementary functionality. With libnet, quick and simple packet assembly applications can be whipped up with little effort. Give it a bit more time, and more complex programs can be written β€” traceroute(8) and ping(8) were easily rewritten using libnet and pcap(3). πŸ”₯

When you’re building applications with libnet, we recommend using pkg-config(1) to detect the presence and required version of libnet. The libnet-config(1) script is still bundled in the libnet distribution, but it’s considered deprecated in favor of pkg-config(1). Both can be used to get compiler and linker flags of the installed libnet library, as well as provide other useful information. For applications using GNU autotools, we recommend using the PKG_PROG_PKG_CONFIG and PKG_CHECK_MODULES m4 macros. πŸŽ€

NOTE: If you are writing your application with libnet, include libnet.h, which will include any additional header for you β€” rather than including libnet/libnet-functions.h, libnet/libnet-macros.h or any of the others. This is the way. 🫢

🧚 BACKWARDS COMPATIBILITY 🧚

Your old code (circa libnet 1.0.x) WILL NOT WORK with libnet >=1.1.x. Like, it’s giving β€œmiss me with that old API” energy, and it is not kidding. 😭 See doc/MIGRATION.md for easy steps on porting your old code.


πŸ‘‘ SEE ALSO πŸ‘‘


🌈 AUTHORS 🌈

The original author of libnet is Mike D. Schiffman. ✨

libnet has been maintained and extensively enhanced since 2009 by Sam Roberts. It is currently maintained by the Libnet Maintainers at GitHub:

<https://github.com/libnet/libnet>

πŸ“ BUGS πŸ“

Suggestions, bug reports/fixes, and pull requests, see:

<https://github.com/libnet/libnet/issues>

libnet is licensed under the 3-Clause BSD License.


This page’s footer energy is libnet-1.3, dated 2023-10-24, LIBNET(3) β€” and that’s the whole manual, bestie. Bye! πŸ’…πŸŽ€