Coder Social home page Coder Social logo

qingchen1984 / libusipp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stealth/libusipp

0.0 1.0 0.0 277 KB

unix socket interface for C++ raw IP/IP6/UDP/TCP, Layer2 etc. framework

Home Page: http://c-skills.blogspot.com

License: Other

C++ 98.20% Makefile 0.86% M4 0.93% Shell 0.01%

libusipp's Introduction

USI++ README

paypal

  1. About

usi++ (UNIX Socket Interface) is a low-level network-library for sending/receiving IP, IP6, ARP etc. packets directly on RAW or PACKET sockets. It can also be used for network-monitoring and rapid development of pentesting tools. It requires libpcap and libdnet if you want the Layer2 DNET provider.

  1. License

usi++ comes under the GPL. See file COPYING for more details.

A data-file for ethernet-MAC's is included. It was taken from arpwatch.

Since USI++ is GPL there is ABSOLUTELY NO WARRANTY. YOU USE IT AT YOUR OWN RISK.

  1. Install

$ cd src
$ autoconf
$ ./configure
$ make
# make install

Please note, if you have multiple libpcap installs for testing, the generated Makefile is just a proposal. The configure script actually cannot know which include or lib path you prefer. In such case, you have to edit the generated Makefile to point to it exactly, as well as setting/unsetting the defines you need in config.h.

Having more than one libpcap install is not uncommon, since various functions such as pcap_set_immediate_mode() or mmapped packet sockets just appeared recently.

  1. Compiling the examples

Usually like this:

# c++ -std=c++11 foo.cc -lusi++ -lpcap -L/usr/local/lib -I/usr/local/include

If you compiled usi++ with dnet support, which allows you to also send packets at the datalink layer (not just RAW sockets), you also need to link against -ldnet. Newer libpcap may already contain pcap_inject() so you can also build usi++ without libdnet, as this function also provides a portable way to send datalink frames.

  1. Function-description

Please look at the HTML-documentation (generated via doxygen) of libusi++ or at the samples.

  1. Supported Platforms

Linux, BSD, OSX.

  1. BUGS/TODO

None.

  1. Background for Layer 2

The linklevel handling has changed. Now all classes are derived from Layer2 {} which contains a RX and a TX object which are used for receiving and transmitting data. The class-declarations can be found in the coresponding .h files. These classes are abstract, this means you must derive your own to get it working. Look at the .h files which functions you must implemet. USI++ ships with the classes Pcap, TX_IP, TX_eth_dnet etc which let you capture/send packets. They give you basic functionality so that you can use programs that work with USI++ 1.67 or lower as normal. By making RX and TX abstract we make sure that Layer2 can access routines such as sendpack(). You are free to write your own RX/TX based classes for different hardware (FDDI,...). You can change RX/TX behaivior at runtime, so it is as flexible as possible. For example you could detect that you are working with PPP and then you load PPP transimitter. Have fun.

libusipp's People

Contributors

stealth avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.