libnet provides a portable framework for low-level network packet construction.
C Lua M4 Makefile C++ Shell Other
Clone or download
sgeto Merge pull request #71 from Kokan/default-src
_DEFAULT_SOURCE should be used when _BSD_SOURCE
Latest commit ee0a45e Jun 24, 2018


    LIBNET 1.1 (c) 1998 - 2004 Mike D. Schiffman <>

    LIBNET 1.1.3 and later (c) 2009 - 2013 Sam Roberts <>

libnet provides a fairly portable framework for network packet construction
an injection.

It is widely used, but had become unmaintained at, and it's
author is unreachable.

This version was forked from the 1.1.3 release candidate, then bug fixed,
actively maintained, and rereleased.

Contact Sam Roberts <> if you have patches, find bugs, or
have issues porting or building against it.

Newest code is at:

Releases are at:

Some old docs are at:

    A C library for portable packet creation and injection.
    Libnet is an API to help with the construction and handling of network
    packets.  It provides a portable framework for low-level network
    packet writing and handling (use libnet in conjunction with libpcap and
    you can write some really cool stuff).  Libnet includes packet creation
    at the IP layer and at the link layer as well as a host of supplementary
    and complementary functionality.  Libnet is very handy with which to
    write network tools and network test code.  See the manpage and sample
    test code for more detailed information.
    Your old code (circa libnet-1.0.x) WILL NOT WORK with libnet-1.1.x.
    Read doc/MIGRATION for easy steps on porting your old code.