Main Page   Class Hierarchy   Compound List   File List   Compound Members   Examples  

usipp::ICMP Class Reference

the ICMP-class. More...

#include <icmp.h>

Inheritance diagram for usipp::ICMP:

usipp::IP usipp::Layer2 List of all members.

Public Methods

 ICMP (const char*)
virtual ~ICMP ()
 ICMP (const ICMP &)
ICMP& operator= (const ICMP &)
virtual int sendpack (void*, size_t)
virtual int sendpack (char*)
virtual int sniffpack (void*, size_t)
virtual int init_device (char *, int, size_t)
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.


Constructor & Destructor Documentation

usipp::ICMP::ICMP ( const char * )
 

Expects host.

usipp::ICMP::ICMP ( const ICMP & )
 

Copy-Construktor


Member Function Documentation

u_int8_t usipp::ICMP::get_code ( )
 

Get ICMP-code.

u_int16_t usipp::ICMP::get_icmpId ( )
 

Get the id field from actuall ICMP-packet.

u_int16_t usipp::ICMP::get_seq ( )
 

Get the sequence-number of actuall ICMP-packet

u_int8_t usipp::ICMP::get_type ( )
 

Get the type-field from the actuall ICMP-packet.

int usipp::ICMP::init_device ( char * dev,
int promisc,
size_t 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 usipp::IP.

ICMP & usipp::ICMP::operator= ( const ICMP & )
 

Assign-operator

int usipp::ICMP::sendpack ( char * pay_string ) [virtual]
 

send a ICMP-packet with string 'payload' as payload.

Reimplemented from usipp::IP.

int usipp::ICMP::sendpack ( void * payload,
size_t paylen ) [virtual]
 

send an ICMP-packet containing 'payload' which is 'paylen' bytes long

Reimplemented from usipp::IP.

int usipp::ICMP::set_code ( u_int8_t )
 

Set ICMP-code.

int usipp::ICMP::set_icmpId ( u_int16_t )
 

Set id field in the actuall ICMP-packet

int usipp::ICMP::set_seq ( u_int16_t )
 

Set the sequecenumber of the actuall ICMP-packet.

int usipp::ICMP::set_type ( u_int8_t )
 

Set the type-field in the actuall ICMP-packet.

int usipp::ICMP::sniffpack ( void * buf,
size_t len ) [virtual]
 

handle packets, that are NOT actually for the local adress!

Reimplemented from usipp::IP.


The documentation for this class was generated from the following file:
Generated at Fri May 11 13:02:56 2001 for libusi++ by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000