Namespaces Class Hierarchy Compound List File List Header Files Compound Members File Members Examples
ICMP Class Reference
the ICMP-class.
More...
#include <usi++.h>
Class diagram for ICMP:
List of all members.Public Members
- ICMP (const char*)
- virtual int sendpack (void*, int)
- virtual int sendpack (char*)
- virtual int recvpack (void*, int)
- virtual int sniffpack (void*, int)
- virtual int init_device (char*, int, int)
- int set_type (u_int8_t)
- int set_code (u_int8_t)
- int set_icmpId (u_int16_t)
- int set_seq (u_int16_t)
- int set_gateway (u_int32_t)
- int set_mtu (u_int16_t)
- u_int8_t get_type ()
- u_int8_t get_code ()
- u_int16_t get_icmpId ()
- u_int16_t get_seq ()
- u_int32_t get_gateway ()
- u_int16_t get_mtu ()
Detailed Description
the ICMP-class.
-
Examples:
-
hardSpy.cc and icmp_sniff.cc.
Member Function Documentation
int ICMP::sendpack (void * payload, int paylen) [virtual]
send an ICMP-packet containing 'payload' which is 'paylen' bytes long
Reimplemented from IP.
int ICMP::sendpack (char * payload) [virtual]
send a ICMP-packet with string 'payload' as payload.
Reimplemented from IP.
-
Examples:
-
hardSpy.cc.
int ICMP::recvpack (void * s, int len) [virtual]
receive an ICMP-packet, not sniff it. This means we will only get packets with a destinationadress that belongs to one of our devices.
Reimplemented from IP.
int ICMP::sniffpack (void * s, int len) [virtual]
int ICMP::init_device (char * dev, int promisc, int snaplen) [virtual]
Initialize a device ("eth0" for example) for packet- capturing. It MUST be called before sniffpack() is launched. Set 'promisc' to 1 if you want the device running in promiscous mode. Fetch at most 'snaplen' bytes per call.
Reimplemented from Datalink.
-
Examples:
-
hardSpy.cc and icmp_sniff.cc.
int ICMP::set_type (u_int8_t t)
Set the type-field in the actuall ICMP-packet.
-
Examples:
-
hardSpy.cc.
int ICMP::set_icmpId (u_int16_t id)
Set id field in the actuall ICMP-packet
-
Examples:
-
hardSpy.cc.
int ICMP::set_seq (u_int16_t s)
Set the sequecenumber of the actuall ICMP-packet.
u_int16_t ICMP::get_icmpId ()
u_int16_t ICMP::get_seq ()
Get the sequence-number of actuall ICMP-packet
-
Examples:
-
icmp_sniff.cc.
The documentation for this class was generated from the following file:
Generated at Sun Oct 10 13:51:35 1999 for libusi++ by
written by Dimitri van Heesch, © 1997-1999