• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

data/H20-Nov-2020-848847

samples/H20-Nov-2020-857600

src/H03-May-2022-5,0713,134

usi++/H20-Nov-2020-5,4102,818

CREDITSH A D20-Nov-202061 42

DoxyfileH A D20-Nov-202012.1 KiB329223

LICENSEH A D20-Nov-2020825 2119

README.mdH A D20-Nov-20203 KiB9964

README.md

1USI++ README
2============
3
4[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9MVF8BRMX2CWA)
5
60. About
7--------
8
9usi++ (UNIX Socket Interface) is a low-level network-library for sending/receiving
10IP, IP6, ARP etc. packets directly on RAW or PACKET sockets. It can also be used for
11network-monitoring and rapid development of pentesting tools. It requires `libpcap`
12and `libdnet` if you want the Layer2 DNET provider.
13
14
151. License
16----------
17
18usi++ comes under the GPL. See file COPYING for more
19details.
20
21A data-file for ethernet-MAC's is included. It was taken from
22arpwatch.
23
24Since USI++ is GPL there is ABSOLUTELY NO WARRANTY. YOU USE IT AT YOUR OWN RISK.
25
262. Install
27----------
28
29
30    $ cd src
31    $ autoconf
32    $ ./configure
33    $ make
34    # make install
35
36Please note, if you have multiple `libpcap` installs for testing, the generated `Makefile` is
37just a proposal. The configure script actually cannot know which include or lib path
38you prefer. In such case, you have to edit the generated `Makefile` to point to it exactly,
39as well as setting/unsetting the defines you need in `config.h`.
40
41Having more than one libpcap install is not uncommon, since various functions such
42as `pcap_set_immediate_mode()` or mmapped packet sockets just appeared recently.
43
44
453. Compiling the examples
46-------------------------
47
48Usually like this:
49
50
51    # c++ -std=c++11 foo.cc -lusi++ -lpcap -L/usr/local/lib -I/usr/local/include
52
53
54If you compiled usi++ with _dnet_ support, which allows you to also
55send packets at the datalink layer (not just RAW sockets), you also need to
56link against `-ldnet`. Newer _libpcap_ may already contain `pcap_inject()` so
57you can also build usi++ without _libdnet_, as this function also
58provides a portable way to send datalink frames.
59
60
614. Function-description
62-----------------------
63
64Please look at the HTML-documentation (generated via doxygen) of `libusi++` or at the samples.
65
66
675. Supported Platforms
68----------------------
69
70Linux, BSD, OSX.
71
72
736. BUGS/TODO
74------------
75
76None.
77
78
797. Background for Layer 2
80-------------------------
81
82The linklevel handling has changed. Now all classes are derived from
83Layer2 {} which contains a RX and a TX object which are used for
84receiving and transmitting data. The class-declarations can be found
85in the coresponding .h files. These classes are abstract, this means
86you must derive your own to get it working. Look at the .h files
87which functions you must implemet. USI++ ships with the classes
88`Pcap`, `TX_IP`, `TX_eth_dnet` etc which let you capture/send packets. They give you
89basic functionality so that you can use programs that work with USI++ 1.67 or
90lower as normal.
91By making `RX` and `TX` abstract we make sure that `Layer2` can access
92routines such as `sendpack()`. You are free to write your own RX/TX based
93classes for different hardware (FDDI,...). You can change RX/TX behaivior at runtime,
94so it is as flexible as possible. For example you could detect that you are
95working with PPP and then you load PPP transimitter.
96Have fun.
97
98
99