Namespaces Class Hierarchy Compound List File List Header Files Compound Members File Members Examples
UDP Class Reference
the UDP-class.
More...
#include <usi++.h>
Class diagram for UDP:
List of all members.Public Members
Detailed Description
the UDP-class.
-
Examples:
-
tcp_sniff.cc and udp_spoof.cc.
Member Function Documentation
u_int16_t UDP::get_srcport ()
Get the sourceport of UDP-datagram.
u_int16_t UDP::get_dstport ()
Get the destinationport of the UDP-datagram
u_int16_t UDP::get_len ()
Return length of UDP-header plus contained data.
u_int16_t UDP::get_udpsum ()
Return the checksum of UDP-datagram.
int UDP::set_srcport (u_int16_t sp)
Set the sourceport in the UDP-header.
-
Examples:
-
udp_spoof.cc.
int UDP::set_dstport (u_int16_t dp)
Set the destinationport in the UDP-header.
-
Examples:
-
udp_spoof.cc.
int UDP::set_len (u_int16_t l)
Set the length of the UDP-datagramm.
int UDP::set_udpsum (u_int16_t s)
Set the UDP-checksum. Calling this function with s != 0 will prevent sendpack() from setting the checksum!!!
int UDP::sendpack (void * buf, int paylen) [virtual]
Send an UDP-datagramm, containing 'paylen' bytes of data.
Reimplemented from IP.
-
Examples:
-
udp_spoof.cc.
int UDP::recvpack (void * buf, int len) [virtual]
Receive an UDP-datagramm.
Reimplemented from IP.
int UDP::sniffpack (void * buf, int len) [virtual]
Capture packets that are not for our host.
Reimplemented from IP.
int UDP::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.
The documentation for this class was generated from the following file:
Generated at Sun Oct 10 13:51:36 1999 for libusi++ by
written by Dimitri van Heesch, © 1997-1999