Go to the source code of this file.
|
static uint16_t | cksum (void *addr, ssize_t len) |
|
int | print_packet (void *pck) |
|
static ssize_t | resolve_arp (void *arp) |
|
static ssize_t | resolve_eth_arp (struct ether_arp *eth_arp, void *eth_arp_resp, uint8_t ip_addr[4]) |
|
static ssize_t | resolve_eth (struct ether_header *eth, void *eth_resp) |
|
static ssize_t | resolve_ip (struct iphdr *ip, void *ip_resp, uint8_t ip_addr[4]) |
|
static ssize_t | resolve_icmp (struct icmphdr *icmp, void *icmp_resp) |
|
int | resolve_packet (void *in_pck, ssize_t in_size, void *out_pck, uint32_t *out_size, uint8_t ip_addr[4]) |
|
static ssize_t | generate_eth (struct ether_header *eh, uint8_t hw_daddr[6]) |
|
static ssize_t | generate_ip (struct iphdr *ip, uint8_t saddr[4], uint8_t daddr[4]) |
|
static ssize_t | generate_icmp (struct icmphdr *icmp, uint32_t seq) |
|
int | generate_packet (void *pck, uint32_t *size, uint8_t saddr[4], uint8_t daddr[4], uint8_t hw_daddr[6], uint32_t seq) |
|
int | generate_packet2 (void *pck, uint32_t *size, uint8_t saddr[4], uint8_t daddr[4], uint8_t hw_daddr[6], uint32_t seq, icmpr_flow_mode_t mode) |
|
int | resolve_packet2 (void *pck, uint32_t *size, uint8_t ip_addr[4]) |
|
int | resolve_packet3 (void **pck_, uint32_t *size, uint8_t ip_addr[4]) |
|
#define GET_HEADER |
( |
|
out, |
|
|
|
hdr, |
|
|
|
src, |
|
|
|
off |
|
) |
| |
Value:do { \
out = (hdr*)(src + off); \
off += sizeof (hdr); \
} while (0)
Definition at line 375 of file icmp_proto.c.
static uint16_t cksum |
( |
void * |
addr, |
|
|
ssize_t |
len |
|
) |
| |
|
static |
static ssize_t generate_eth |
( |
struct ether_header * |
eh, |
|
|
uint8_t |
hw_daddr[6] |
|
) |
| |
|
static |
static ssize_t generate_icmp |
( |
struct icmphdr * |
icmp, |
|
|
uint32_t |
seq |
|
) |
| |
|
static |
static ssize_t generate_ip |
( |
struct iphdr * |
ip, |
|
|
uint8_t |
saddr[4], |
|
|
uint8_t |
daddr[4] |
|
) |
| |
|
static |
int generate_packet |
( |
void * |
pck, |
|
|
uint32_t * |
size, |
|
|
uint8_t |
saddr[4], |
|
|
uint8_t |
daddr[4], |
|
|
uint8_t |
hw_daddr[6], |
|
|
uint32_t |
seq |
|
) |
| |
int generate_packet2 |
( |
void * |
pck, |
|
|
uint32_t * |
size, |
|
|
uint8_t |
saddr[4], |
|
|
uint8_t |
daddr[4], |
|
|
uint8_t |
hw_daddr[6], |
|
|
uint32_t |
seq, |
|
|
icmpr_flow_mode_t |
mode |
|
) |
| |
int print_packet |
( |
void * |
pck | ) |
|
static ssize_t resolve_arp |
( |
void * |
arp | ) |
|
|
static |
static ssize_t resolve_eth |
( |
struct ether_header * |
eth, |
|
|
void * |
eth_resp |
|
) |
| |
|
static |
static ssize_t resolve_eth_arp |
( |
struct ether_arp * |
eth_arp, |
|
|
void * |
eth_arp_resp, |
|
|
uint8_t |
ip_addr[4] |
|
) |
| |
|
static |
static ssize_t resolve_icmp |
( |
struct icmphdr * |
icmp, |
|
|
void * |
icmp_resp |
|
) |
| |
|
static |
static ssize_t resolve_ip |
( |
struct iphdr * |
ip, |
|
|
void * |
ip_resp, |
|
|
uint8_t |
ip_addr[4] |
|
) |
| |
|
static |
int resolve_packet |
( |
void * |
in_pck, |
|
|
ssize_t |
in_size, |
|
|
void * |
out_pck, |
|
|
uint32_t * |
out_size, |
|
|
uint8_t |
ip_addr[4] |
|
) |
| |
int resolve_packet2 |
( |
void * |
pck, |
|
|
uint32_t * |
size, |
|
|
uint8_t |
ip_addr[4] |
|
) |
| |
int resolve_packet3 |
( |
void ** |
pck_, |
|
|
uint32_t * |
size, |
|
|
uint8_t |
ip_addr[4] |
|
) |
| |