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]) |
|
◆ GET_HEADER
#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.
◆ cksum()
static uint16_t cksum |
( |
void * |
addr, |
|
|
ssize_t |
len |
|
) |
| |
|
static |
◆ generate_eth()
static ssize_t generate_eth |
( |
struct ether_header * |
eh, |
|
|
uint8_t |
hw_daddr[6] |
|
) |
| |
|
static |
◆ generate_icmp()
static ssize_t generate_icmp |
( |
struct icmphdr * |
icmp, |
|
|
uint32_t |
seq |
|
) |
| |
|
static |
◆ generate_ip()
static ssize_t generate_ip |
( |
struct iphdr * |
ip, |
|
|
uint8_t |
saddr[4], |
|
|
uint8_t |
daddr[4] |
|
) |
| |
|
static |
◆ generate_packet()
int generate_packet |
( |
void * |
pck, |
|
|
uint32_t * |
size, |
|
|
uint8_t |
saddr[4], |
|
|
uint8_t |
daddr[4], |
|
|
uint8_t |
hw_daddr[6], |
|
|
uint32_t |
seq |
|
) |
| |
◆ generate_packet2()
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 |
|
) |
| |
◆ print_packet()
int print_packet |
( |
void * |
pck | ) |
|
◆ resolve_arp()
static ssize_t resolve_arp |
( |
void * |
arp | ) |
|
|
static |
◆ resolve_eth()
static ssize_t resolve_eth |
( |
struct ether_header * |
eth, |
|
|
void * |
eth_resp |
|
) |
| |
|
static |
◆ resolve_eth_arp()
static ssize_t resolve_eth_arp |
( |
struct ether_arp * |
eth_arp, |
|
|
void * |
eth_arp_resp, |
|
|
uint8_t |
ip_addr[4] |
|
) |
| |
|
static |
◆ resolve_icmp()
static ssize_t resolve_icmp |
( |
struct icmphdr * |
icmp, |
|
|
void * |
icmp_resp |
|
) |
| |
|
static |
◆ resolve_ip()
static ssize_t resolve_ip |
( |
struct iphdr * |
ip, |
|
|
void * |
ip_resp, |
|
|
uint8_t |
ip_addr[4] |
|
) |
| |
|
static |
◆ resolve_packet()
int resolve_packet |
( |
void * |
in_pck, |
|
|
ssize_t |
in_size, |
|
|
void * |
out_pck, |
|
|
uint32_t * |
out_size, |
|
|
uint8_t |
ip_addr[4] |
|
) |
| |
◆ resolve_packet2()
int resolve_packet2 |
( |
void * |
pck, |
|
|
uint32_t * |
size, |
|
|
uint8_t |
ip_addr[4] |
|
) |
| |
◆ resolve_packet3()
int resolve_packet3 |
( |
void ** |
pck_, |
|
|
uint32_t * |
size, |
|
|
uint8_t |
ip_addr[4] |
|
) |
| |