FD.io VPP  v19.08-27-gf4dcae4
Vector Packet Processing
icmp_proto.c File Reference
+ Include dependency graph for icmp_proto.c:

Go to the source code of this file.

Macros

#define GET_HEADER(out, hdr, src, off)
 

Functions

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

Macro Definition Documentation

#define GET_HEADER (   out,
  hdr,
  src,
  off 
)
Value:
do { \
out = (hdr*)(src + off); \
off += sizeof (hdr); \
} while (0)
vl_api_address_t src
Definition: gre.api:51

Definition at line 375 of file icmp_proto.c.

Function Documentation

static uint16_t cksum ( void *  addr,
ssize_t  len 
)
static

Definition at line 45 of file icmp_proto.c.

+ Here is the caller graph for this function:

static ssize_t generate_eth ( struct ether_header *  eh,
uint8_t  hw_daddr[6] 
)
static

Definition at line 258 of file icmp_proto.c.

+ Here is the caller graph for this function:

static ssize_t generate_icmp ( struct icmphdr *  icmp,
uint32_t  seq 
)
static

Definition at line 303 of file icmp_proto.c.

+ Here is the caller graph for this function:

static ssize_t generate_ip ( struct iphdr *  ip,
uint8_t  saddr[4],
uint8_t  daddr[4] 
)
static

Definition at line 275 of file icmp_proto.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int generate_packet ( void *  pck,
uint32_t *  size,
uint8_t  saddr[4],
uint8_t  daddr[4],
uint8_t  hw_daddr[6],
uint32_t  seq 
)

Definition at line 314 of file icmp_proto.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 
)

Definition at line 343 of file icmp_proto.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int print_packet ( void *  pck)

Definition at line 73 of file icmp_proto.c.

+ Here is the caller graph for this function:

static ssize_t resolve_arp ( void *  arp)
static

Definition at line 112 of file icmp_proto.c.

+ Here is the caller graph for this function:

static ssize_t resolve_eth ( struct ether_header *  eth,
void *  eth_resp 
)
static

Definition at line 151 of file icmp_proto.c.

+ Here is the caller graph for this function:

static ssize_t resolve_eth_arp ( struct ether_arp *  eth_arp,
void *  eth_arp_resp,
uint8_t  ip_addr[4] 
)
static

Definition at line 129 of file icmp_proto.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ssize_t resolve_icmp ( struct icmphdr *  icmp,
void *  icmp_resp 
)
static

Definition at line 194 of file icmp_proto.c.

+ Here is the caller graph for this function:

static ssize_t resolve_ip ( struct iphdr *  ip,
void *  ip_resp,
uint8_t  ip_addr[4] 
)
static

Definition at line 170 of file icmp_proto.c.

+ Here is the caller graph for this function:

int resolve_packet ( void *  in_pck,
ssize_t  in_size,
void *  out_pck,
uint32_t *  out_size,
uint8_t  ip_addr[4] 
)

Definition at line 208 of file icmp_proto.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int resolve_packet2 ( void *  pck,
uint32_t *  size,
uint8_t  ip_addr[4] 
)

Definition at line 381 of file icmp_proto.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int resolve_packet3 ( void **  pck_,
uint32_t *  size,
uint8_t  ip_addr[4] 
)

Definition at line 458 of file icmp_proto.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: