All Projects → libnet → Libnet

libnet / Libnet

Licence: bsd-2-clause
A portable framework for low-level network packet construction

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Libnet

Pypacker
📦 The fastest and simplest packet manipulation lib for Python
Stars: ✭ 216 (-66.25%)
Mutual labels:  tcp, udp, bgp, arp
http-connection-lifecycle
Complete and detailed explanation of HTTP connection lifecycle
Stars: ✭ 43 (-93.28%)
Mutual labels:  dns, tcp, udp, arp
ebook
Third edition of the Computer Networking: Principles, Protocols and Practice ebook
Stars: ✭ 64 (-90%)
Mutual labels:  dns, tcp, bgp, udp
Pytcp
PyTCP is an attempt to create fully functional TCP/IP stack in Python. It supports TCP stream based transport with reliable packet delivery based on sliding window mechanism and basic congestion control. It also supports IPv6/ICMPv6 protocols with SLAAC address configuration. It operates as user space program attached to Linux TAP interface. As of today stack is able to send and receive traffic over Internet using IPv4 and IPv6 default gateways for routing. Since goal of this project is purely educational (at least at this point) the clarity of code is preferred over its efficiency. For the same reason security features are not being implemented just yet unless they are integral part of TCP/IP suite protocols specification.
Stars: ✭ 65 (-89.84%)
Mutual labels:  tcp, udp, arp
Computer Networking
Free resources for a self-taught education in Computer Networking
Stars: ✭ 201 (-68.59%)
Mutual labels:  tcp, udp, arp
okhoxi-serac
冰塔协议-传输层协议
Stars: ✭ 33 (-94.84%)
Mutual labels:  tcp, udp, arp
Dnsguide
A guide to writing a DNS Server from scratch in Rust
Stars: ✭ 2,226 (+247.81%)
Mutual labels:  dns, tcp, udp
net-protocol
golang模拟内核协议栈 实现链路层、网络层、传输层、应用层 用户态协议栈 ,基于虚拟网卡TUN/TAP
Stars: ✭ 129 (-79.84%)
Mutual labels:  tcp, udp, arp
Cnp3
Computer Networking : Principles, Protocols and Practice (first and second edition, third edition is being written on https://github.com/cnp3/ebook)
Stars: ✭ 471 (-26.41%)
Mutual labels:  tcp, udp, bgp
EdgeAdmin
CDN & WAF集群管理系统。
Stars: ✭ 199 (-68.91%)
Mutual labels:  dns, tcp, udp
Mirage Tcpip
TCP/IP networking stack in pure OCaml, using the Mirage platform libraries. Includes IPv4/6, ICMP, and UDP/TCP support.
Stars: ✭ 277 (-56.72%)
Mutual labels:  tcp, udp, arp
Nps
一款轻量级、高性能、功能强大的内网穿透代理服务器。支持tcp、udp、socks5、http等几乎所有流量转发,可用来访问内网网站、本地支付接口调试、ssh访问、远程桌面,内网dns解析、内网socks5代理等等……,并带有功能强大的web管理端。a lightweight, high-performance, powerful intranet penetration proxy server, with a powerful web management terminal.
Stars: ✭ 19,537 (+2952.66%)
Mutual labels:  dns, tcp, udp
Blinksocks
A framework for building composable proxy protocol stack.
Stars: ✭ 587 (-8.28%)
Mutual labels:  tcp, udp
Mobileimsdk
一个原创移动端IM通信层框架,轻量级、高度提炼,历经8年、久经考验。可能是市面上唯一同时支持UDP+TCP+WebSocket三种协议的同类开源框架,支持iOS、Android、Java、H5,服务端基于Netty。
Stars: ✭ 3,864 (+503.75%)
Mutual labels:  tcp, udp
Pyexfil
A Python Package for Data Exfiltration
Stars: ✭ 554 (-13.44%)
Mutual labels:  dns, bgp
Sower
Sower is a cross-platform intelligent transparent proxy solution.
Stars: ✭ 391 (-38.91%)
Mutual labels:  dns, dhcp
Message Io
Event-driven message library for building network applications easy and fast.
Stars: ✭ 321 (-49.84%)
Mutual labels:  tcp, udp
Metallb
A network load-balancer implementation for Kubernetes using standard routing protocols
Stars: ✭ 4,306 (+572.81%)
Mutual labels:  bgp, arp
Impulse
💣 Impulse Denial-of-service ToolKit
Stars: ✭ 538 (-15.94%)
Mutual labels:  tcp, udp
Networker
A simple to use TCP and UDP networking library for .NET. Compatible with Unity.
Stars: ✭ 408 (-36.25%)
Mutual labels:  tcp, udp

Appveyor Status Travis Status CodeDocs Status

Packet Construction and Injection

Libnet is an API to help with the construction and injection 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. Some projects, available in Debian/Ubuntu and OpenBSD, using libnet are:

See the man page and sample test code for more detailed information. Online documentation is available at https://codedocs.xyz/libnet/libnet/

NOTE: Legacy code written for libnet-1.0.x is unfortunately incompatible with libnet-1.1.x and later.
See the Migration Guide for porting help.

Building

First download the latest release from GitHub. Libnet employs the GNU configure and build system. The release tarballs and zip files ship with a pre-built configure script:

tar xf libnet-x.y.z.tar.gz
cd libnet-x.y.z/
./configure && make
sudo make install

To list available options, type ./configure --help

Building from GIT/GitHub

When building from GIT, use ./autogen.sh to generate the configure script. For this you need the full suite of the GNU autotools: autoconf (>=2.69), automake (>=1.14), libtool (>=2.4.2).

How to install the dependencies varies by system, but on many Debian derived systems, apt can be used:

sudo apt install autoconf automake libtool

Building the Documentation

To build the documentation (optional) you need doxygen and pod2man:

sudo apt install doxygen
sudo apt install pod2man || sudo apt install perl

For neat graphics in the HTML documentation, also install graphviz. There is also a PDF version of the docs, to build that you need quite a few more packages:

sudo apt install texlive-extra-utils texlive-latex-extra \
                 texlive-fonts-recommended latex-xcolor  \
                 texlive-font-utils

For Microsoft CHM docs you need the HTML Help Workshop, which is part of Visual Studio: http://go.microsoft.com/fwlink/p/?linkid=154968, on UNIX and GNU/Linux systems, see chmcmd, which is available in the FreePascal suite:

sudo apt install fp-utils-3.0.4

Using -lnet

Libnet is installed as a library and a set of include files. The main include file to use in your program is:

#include <libnet.h>

To get the correct search paths to both the header and library files, use the standard pkg-config tool:

$ pkg-config --libs --static --cflags libnet
-I/usr/local/include -L/usr/local/lib -lnet

The prefix path /usr/local/ shown here is only the default. Use the configure script to select a different prefix when installing libnet.

For GNU autotools based projects, use the following in configure.ac:

# Check for required libraries
PKG_CHECK_MODULES([libnet], [libnet >= 1.2])

and in your Makefile.am:

proggy_CFLAGS = $(libnet_CFLAGS)
proggy_LDADD  = $(libnet_LIBS)

Origin & References

Libnet is widely used, but had been unmaintained for a long time and its author unreachable. This version was forked from the 1.1.3 release candidate from packetfactory.net, bug fixed, developed, and re-released.

Use GitHub issues and pull request feature for questions and patches:

http://github.com/libnet/libnet

Some old docs are available at:

http://packetfactory.openwall.net/projects/libnet/index.html



Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].