|
Classes |
struct | rst_arphdr |
| ARP header specialized for Ethernet at layer 2 and IP at layer 3. More...
|
struct | rst_buf |
Defines |
#define | RST_ETH_HDR_LEN 14 |
#define | RST_ARP_HDR_LEN 28 |
#define | RST_IP_HDR_LEN 20 |
#define | RST_TCP_HDR_LEN 20 |
#define | RST_UDP_HDR_LEN 8 |
#define | RST_ICMP_HDR_LEN 8 |
#define | RST_ETH_HDR 0x01 |
#define | RST_ARP_HDR 0x02 |
#define | RST_IP_HDR 0x04 |
#define | RST_ICMP_HDR 0x20 |
#define | RST_TCP_HDR 0x08 |
#define | RST_UDP_HDR 0x10 |
Functions |
void | rst_initEth (struct ethhdr *, unsigned char *, unsigned char *, unsigned short) |
| Initialize an Ethernet header.
|
void | rst_initARPrequest (struct rst_arphdr *, unsigned char *, unsigned int, unsigned int) |
| Initialize an ARP request header.
|
void | rst_initARPreply (struct rst_arphdr *, unsigned char *, unsigned int, unsigned char *, unsigned int) |
| Initialize an ARP reply header.
|
void | rst_initIP (struct iphdr *, unsigned short, unsigned char, unsigned int, unsigned int) |
| Initialize an IP header.
|
void | rst_initICMP (struct icmphdr *, unsigned char) |
| Initialize an ICMP header.
|
void | rst_initTCP (struct tcphdr *, unsigned short, unsigned short) |
| Initialize a TCP header.
|
void | rst_initUDP (struct udphdr *, unsigned short, unsigned short, unsigned short) |
| Initialize a UDP header.
|
void | rst_initRbuf (struct rst_buf *, unsigned char *, int, unsigned int) |
| Initialize an rst_buf.
|
int | rst_verifyRbuf (struct rst_buf *) |
| Check that an rst_buf is safe, in the sense that a call to rst_htonp will not abort.
|
void | rst_htonp (struct rst_buf *) |
| Do host-to-network byte swapping and checksum calculation.
|
void | rst_ntohp (struct rst_buf *) |
| Parse an incoming packet and do network-to-host byte swapping.
|
unsigned char * | rst_ethData (struct rst_buf *) |
| Get the address of the Ethernet header in rBuf.
|
unsigned char * | rst_ipData (struct rst_buf *) |
| Get the address of the IP header in rBuf.
|
unsigned char * | rst_icmpData (struct rst_buf *) |
| Get the address of the ICMP header in rBuf.
|
unsigned char * | rst_tcpData (struct rst_buf *) |
| Get the address of the TCP header in rBuf.
|
unsigned char * | rst_udpData (struct rst_buf *) |
| Get the address of the UDP header in rBuf.
|
unsigned short | rst_getIPchecksum (struct iphdr *) |
| Compute an IP checksum.
|
unsigned short | rst_getICMPchecksum (struct icmphdr *, unsigned short) |
| Compute an ICMP checksum.
|
unsigned short | rst_getTCPchecksum (struct iphdr *, struct tcphdr *, unsigned short) |
| Compute an TCP checksum.
|
unsigned short | rst_getUDPchecksum (struct iphdr *, struct udphdr *, unsigned short) |
| Compute an UDP checksum.
|