#include <ip.h>
Inheritance diagram for usipp::IP:

Public Methods | |
| IP (const char*, u_int8_t) | |
| IP (u_int32_t, u_int8_t) | |
| virtual | ~IP () |
| u_int8_t | get_hlen () |
| u_int8_t | get_vers () |
| u_int8_t | get_tos () |
| u_int16_t | get_totlen () |
| u_int16_t | get_id () |
| u_int16_t | get_fragoff () |
| u_int16_t | get_fflags () |
| u_int8_t | get_ttl () |
| u_int8_t | get_proto () |
| u_int16_t | get_sum () |
| u_int32_t | get_src () |
| u_int32_t | get_dst () |
| IP& | operator= (const IP&) |
| IP (const IP&) | |
| char* | get_src (int resolv, char *buf, size_t buflen) |
| char* | get_dst (int resolv, char *buf, size_t buflen) |
| int | set_hlen (u_int8_t) |
| int | set_vers (u_int8_t) |
| int | set_tos (u_int8_t) |
| int | set_totlen (u_int16_t) |
| int | set_id (u_int16_t) |
| int | set_fragoff (u_int16_t) |
| int | set_fflags (u_int16_t) |
| int | set_ttl (u_int8_t) |
| int | set_proto (u_int8_t) |
| int | set_sum (u_int16_t) |
| int | set_src (u_int32_t) |
| int | set_dst (u_int32_t) |
| int | set_src (const char *ip_or_name) |
| int | set_dst (const char*) |
| iphdr | get_iphdr () |
| virtual int | sendpack (void *payload, size_t paylen) |
| virtual int | sendpack (char *pay_string) |
| virtual int | sniffpack (void *buf, size_t len) |
| virtual int | init_device (char *, int, size_t) |
Protected Methods | |
| char* | reassemble (char *, int, int *) |
Protected Attributes | |
| struct iphdr | iph |
| char | ipOptions [40] |
| struct sockaddr_in | saddr |
| char | host [1000] |
|
|
Expects destination-adress and protocol |
|
|
Destination-adress in network-order |
|
|
Destructor |
|
|
Copy-construktor |
|
|
Ditto, destination-adress. |
|
|
Ditto, destination-adress. |
|
|
Get fragmentation offset. |
|
|
Returns headerlen/4. |
|
|
Get id-field. |
|
|
|
Get protocol, TCP or such. |
|
|
Get source-adress i human-readable-form. Resolve to an hostname, if resolv==1. |
|
|
Get source-adress of packet, in network order. |
|
|
Get IP-header checksum |
|
|
Get Type Of Service. |
|
|
Get total length of packet, including any data. Return len in host-order. |
|
|
returns IP-version. Should give 4 always. |
|
|
Initialize a device for packet capturing Reimplemented from usipp::Layer2. Reimplemented in usipp::ICMP, usipp::TCP, and usipp::UDP. |
|
|
assig-operator |
|
|
Send a Packet. Reimplemented in usipp::ICMP, usipp::TCP, and usipp::UDP. |
|
|
Ditto, destination. Not needed if the destination given in the constructor is OK. |
|
|
Ditto, destination. |
|
|
Set header-len in number of 32 bit words. 5 (5*4 = 20) in normal case. Contructor does this for you, so you should not use this. |
|
|
Set ID-field. Also not needed. |
|
|
Set protocol. If you use TCP {} or such, you don't need to do it yourself. |
|
|
Set source-adress. |
|
|
Set source-adress. Expects Network-ordered. |
|
|
Set total length of packet. Not needed. |
|
|
Set time-to-live field. Not needed. |
|
|
Set version-field. Normally not needed. |
|
|
Capture an packet from the net Reimplemented from usipp::Layer2. Reimplemented in usipp::ICMP, usipp::TCP, and usipp::UDP. |
1.2.3 written by Dimitri van Heesch,
© 1997-2000