# Install libnet with Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper

C library for creating IP packets. Version 1.3 via Homebrew; verified 2026-06-15.

## Install

```sh
sudo av install brew:libnet
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install libnet
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install libnet
```

  Evidence: MacPorts ports tree: net/libnet/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add libnet
```

  Evidence: Alpine Linux edge package indexes: libnet from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install libnet1
```

  Evidence: Debian stable package indexes: libnet1 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install libnet
```

  Evidence: Fedora Rawhide package metadata: libnet from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#libnet
```

  Evidence: nixpkgs package indexes: pkgs/by-name/li/libnet/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S libnet
```

  Evidence: Arch Linux sync databases: libnet from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install libnet-devel
```

  Evidence: openSUSE Tumbleweed package metadata: libnet-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:libnet
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/libnet>
- **Version:** 1.3
- **Source summary:** C library for creating IP packets
- **Homepage:** <https://codedocs.xyz/libnet/libnet/>
- **Repository:** <https://github.com/libnet/libnet>
- **Upstream docs:** <https://codedocs.xyz/libnet/libnet>
- **License:** BSD-2-Clause
- **Source archive:** <https://github.com/libnet/libnet/releases/download/v1.3/libnet-1.3.tar.gz>
- **Last updated:** 2026-06-15T10:20:20-04:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- libnet-config (cli)
- libnet-config (alias)

## Build dependencies

- doxygen

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, monterey, sonoma, ventura, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.3
- Package-manager updated: 2026-06-15
- Local data: ok
- Upstream repository: https://github.com/libnet/libnet
- info: No cached GitHub release or tag data was available.
## Project history and usage

libnet is a C library for constructing and injecting network packets. It occupies the low-level packet-building side of the classic libpcap/libnet pairing: libpcap captures packets, while libnet gives test tools, scanners, and protocol experiments a portable API for emitting packets with controlled headers.

### Project history

The project traces its 1.1 line to Mike D. Schiffman's Packetfactory-era work, with project materials crediting libnet 1.1 to 1998-2004. The maintained 1.1.3-and-later line was revived by Sam Roberts starting in 2009 after the older Packetfactory-hosted code had become unmaintained.

The 1.1 API was a significant break from 1.0.x code. The migration guide describes the change as a simplification from a five-step packet workflow to initialization, packet building, and packet writing, and the README warns that libnet 1.0.x code is incompatible with libnet 1.1.x and later.

### Adoption history

libnet spread through security and networking tools because it hides byte ordering, buffer management, and link/IP layer packet assembly details while still allowing deliberate packet shaping. The official README names packaged tools such as arping, ettercap, nemesis, packit, tcptraceroute, and yersinia as libnet users.

### How it is used

Developers include libnet through libnet.h and link with -lnet. The project retained libnet-config for compatibility but moved new integration guidance toward pkg-config, with libnet.pc replacing the older helper in modern builds.

### Why package nerds care

For package maintainers, libnet is notable because it is tiny in concept but sits on privileged and platform-specific network interfaces. Its ABI break between 1.0.x and 1.1.x, the revival from an abandoned upstream, and the long-lived libnet-config compatibility shim are exactly the sort of details that explain why distributions keep careful split packages and rebuild notes for it.

### Timeline

- 1998-2004: libnet 1.1 materials credit Mike D. Schiffman for the Packetfactory-era implementation.
- 2009: Sam Roberts began maintaining the 1.1.3-and-later line after the older upstream had gone quiet.
- 2012: libnet 1.1.6 appeared in the SourceForge-hosted release area.
- 2023: GitHub listed libnet v1.3 as a release dated October 2, 2023.

### Related projects

- libpcap is the natural companion library for capture-side workflows.
- Packet-generation and network-security tools named by the project include arping, ettercap, nemesis, packit, tcptraceroute, and yersinia.

### Sources

- <https://github.com/libnet/libnet>
- <https://github.com/libnet/libnet/blob/master/doc/MIGRATION.md>
- <https://sourceforge.net/projects/libnet-dev/files/>


## Security Notes

library-like package without higher-risk signals.

- **Geiger risk:** green / low
- library-like package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** libnet
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Debian apt - libnet1 - 1.3+dfsg-2: normalized package name match | Debian stable package indexes: libnet1 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | library for the construction and handling of network packets | https://github.com/libnet/libnet/
- Debian apt - libnet1-dev - 1.3+dfsg-2: normalized package name match | Debian stable package indexes: libnet1-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | development files for libnet | https://github.com/libnet/libnet/
- Debian apt - libnet1-doc - 1.3+dfsg-2: normalized package name match | Debian stable package indexes: libnet1-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | developers documentation files for libnet | https://github.com/libnet/libnet/
- Nix - libnet: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libnet/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libnet1 - 1.1.6+dfsg-3.2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libnet1 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | library for the construction and handling of network packets | http://libnet-dev.sourceforge.net/
- Ubuntu apt - libnet1-dbg - 1.1.6+dfsg-3.2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libnet1-dbg from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | debugging symbols for libnet | http://libnet-dev.sourceforge.net/
- Ubuntu apt - libnet1-dev - 1.1.6+dfsg-3.2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libnet1-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | development files for libnet | http://libnet-dev.sourceforge.net/
- Ubuntu apt - libnet1-doc - 1.1.6+dfsg-3.2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libnet1-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | developers documentation files for libnet | http://libnet-dev.sourceforge.net/
- apk - libnet - 1.3-r0: normalized package name match | Alpine Linux edge package indexes: libnet from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A generic networking API that provides access to several protocols. | https://sourceforge.net/projects/libnet-dev/
- apk - libnet-dev - 1.3-r0: normalized package name match | Alpine Linux edge package indexes: libnet-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A generic networking API that provides access to several protocols. (development files) | https://sourceforge.net/projects/libnet-dev/
- apk - libnet-doc - 1.3-r0: normalized package name match | Alpine Linux edge package indexes: libnet-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A generic networking API that provides access to several protocols. (documentation) | https://sourceforge.net/projects/libnet-dev/
- apk - libnet-static - 1.3-r0: normalized package name match | Alpine Linux edge package indexes: libnet-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A generic networking API that provides access to several protocols. (static library) | https://sourceforge.net/projects/libnet-dev/
- dnf - libnet - 1.3-7.fc44: normalized package name match | Fedora Rawhide package metadata: libnet from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | C library for portable packet creation and injection | https://github.com/libnet/libnet
- dnf - libnet-devel - 1.3-7.fc44: normalized package name match | Fedora Rawhide package metadata: libnet-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development files for the libnet library | https://github.com/libnet/libnet
- dnf - libnet-doc - 1.3-7.fc44: normalized package name match | Fedora Rawhide package metadata: libnet-doc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Documentation files for the libnet library | https://github.com/libnet/libnet
- pacman - libnet - 2:1.3-2: normalized package name match | Arch Linux sync databases: libnet from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A library which provides API for commonly used low-level net functions | https://github.com/libnet/libnet


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://www.automicvault.com/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [doxygen](https://www.automicvault.com/pkg/brew/doxygen/) - Build dependency declared by Homebrew.
- [arping](https://www.automicvault.com/pkg/brew/arping/) - Popular package that depends on this formula.
- [arpoison](https://www.automicvault.com/pkg/brew/arpoison/) - Popular package that depends on this formula.
- [ettercap](https://www.automicvault.com/pkg/brew/ettercap/) - Popular package that depends on this formula.
- [ssldump](https://www.automicvault.com/pkg/brew/ssldump/) - Popular package that depends on this formula.
- [sslsplit](https://www.automicvault.com/pkg/brew/sslsplit/) - Popular package that depends on this formula.
- [suricata](https://www.automicvault.com/pkg/brew/suricata/) - Popular package that depends on this formula.
- [syslog-ng](https://www.automicvault.com/pkg/brew/syslog-ng/) - Popular package that depends on this formula.
- [c-ares](https://www.automicvault.com/pkg/brew/c-ares/) - Shares av.db curated category or tags: c, cli, library, networking.
- [czmq](https://www.automicvault.com/pkg/brew/czmq/) - Shares av.db curated category or tags: c, cli, library, networking.
- [xmlrpc-c](https://www.automicvault.com/pkg/brew/xmlrpc-c/) - Shares av.db curated category or tags: c, cli, library, networking.
- [chinadns-c](https://www.automicvault.com/pkg/brew/chinadns-c/) - Shares av.db curated category or tags: c, cli, networking.
- [gupnp](https://www.automicvault.com/pkg/brew/gupnp/) - Shares av.db curated category or tags: cli, library, networking.
- [hesiod](https://www.automicvault.com/pkg/brew/hesiod/) - Shares av.db curated category or tags: c, cli, library, networking.
- [libcoap](https://www.automicvault.com/pkg/brew/libcoap/) - Shares av.db curated category or tags: c, cli, library, networking.
- [liblo](https://www.automicvault.com/pkg/brew/liblo/) - Shares av.db curated category or tags: c, cli, library, networking.
- [libdnet](https://www.automicvault.com/pkg/brew/libdnet/) - Local package facts share a topical domain. Shared terms: cli, config, networking, packet.

## Combined YAML source

View the package source record on GitHub. [combined/libnet.yml](https://github.com/automic-vault/db/blob/main/combined/libnet.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
