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:

IP Datalink

List of all members.

Public Members


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]

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

Reimplemented from IP.

Examples:
hardSpy.cc and icmp_sniff.cc.

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 ()

Get the id field from actuall ICMP-packet.

Examples:
hardSpy.cc and icmp_sniff.cc.

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 doxygen  written by Dimitri van Heesch, © 1997-1999