NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
packets.h File Reference
#include "common.h"
Include dependency graph for packets.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ether_hdr
 
struct  ipv4_hdr
 
struct  tcp_hdr
 
struct  eth_ip_tcp_hdr
 
struct  udp_hdr
 
struct  eth_ip_udp_hdr
 
struct  icmp_hdr
 
struct  eth_ip_icmp_hdr
 

Macros

#define TCP_PROTOCOL_ID   0x6
 
#define UDP_PROTOCOL_ID   0x11
 
#define DNS_POST   0x35
 
#define WHITESPACE_ASCII   0x20
 
#define ICMP_ECHO_REPLY   0
 
#define ICMP_ECHO_REQUEST   8
 

Enumerations

enum  tcp_flags {
  TCP_FLAG_FIN = (1 << 0) , TCP_FLAG_SYN = (1 << 1) , TCP_FLAG_RST = (1 << 2) , TCP_FLAG_PSH = (1 << 3) ,
  TCP_FLAG_ACK = (1 << 4) , TCP_FLAG_URG = (1 << 5) , TCP_FLAG_ECE = (1 << 6) , TCP_FLAG_CWR = (1 << 7)
}
 

Functions

struct ether_hdr __attribute__ ((__packed__))
 

Variables

uint8_t d_addr_bytes [ETHER_ADDR_LEN]
 
uint8_t s_addr_bytes [ETHER_ADDR_LEN]
 
uint16_t ether_type
 
uint8_t version_ihl
 
uint8_t type_of_service
 
uint16_t total_length
 
uint16_t packet_id
 
uint16_t fragment_offset
 
uint8_t time_to_live
 
uint8_t next_proto_id
 
uint16_t hdr_checksum
 
uint32_t src_addr
 
uint32_t dst_addr
 
uint16_t src_port
 
uint16_t dst_port
 
uint32_t sent_seq
 
uint32_t recv_ack
 
uint8_t dt_off
 
uint8_t tcp_flags
 
uint16_t rx_win
 
uint16_t cksum
 
uint16_t tcp_urp
 
struct ether_hdr l2_hdr
 
struct ipv4_hdr l3_hdr
 
struct tcp_hdr l4_hdr
 
uint16_t dgram_len
 
uint16_t dgram_cksum
 
uint8_t type
 
uint8_t code
 
uint16_t ident
 
uint16_t seq_nb
 

Macro Definition Documentation

◆ DNS_POST

#define DNS_POST   0x35

Definition at line 34 of file packets.h.

◆ ICMP_ECHO_REPLY

#define ICMP_ECHO_REPLY   0

Definition at line 38 of file packets.h.

◆ ICMP_ECHO_REQUEST

#define ICMP_ECHO_REQUEST   8

Definition at line 39 of file packets.h.

◆ TCP_PROTOCOL_ID

#define TCP_PROTOCOL_ID   0x6

Definition at line 31 of file packets.h.

◆ UDP_PROTOCOL_ID

#define UDP_PROTOCOL_ID   0x11

Definition at line 32 of file packets.h.

◆ WHITESPACE_ASCII

#define WHITESPACE_ASCII   0x20

Definition at line 35 of file packets.h.

Enumeration Type Documentation

◆ tcp_flags

enum tcp_flags
Enumerator
TCP_FLAG_FIN 
TCP_FLAG_SYN 
TCP_FLAG_RST 
TCP_FLAG_PSH 
TCP_FLAG_ACK 
TCP_FLAG_URG 
TCP_FLAG_ECE 
TCP_FLAG_CWR 

Definition at line 41 of file packets.h.

Variable Documentation

◆ cksum

uint16_t cksum

Definition at line 7 of file packets.h.

◆ code

uint8_t code

Definition at line 1 of file packets.h.

◆ d_addr_bytes

uint8_t d_addr_bytes[ETHER_ADDR_LEN]

Definition at line 0 of file packets.h.

◆ dgram_cksum

uint16_t dgram_cksum

Definition at line 3 of file packets.h.

◆ dgram_len

uint16_t dgram_len

Definition at line 2 of file packets.h.

◆ dst_addr

uint32_t dst_addr

Definition at line 9 of file packets.h.

◆ dst_port

uint16_t dst_port

Definition at line 1 of file packets.h.

◆ dt_off

uint8_t dt_off

Definition at line 4 of file packets.h.

◆ ether_type

uint16_t ether_type

Definition at line 2 of file packets.h.

◆ fragment_offset

uint16_t fragment_offset

Definition at line 4 of file packets.h.

◆ hdr_checksum

uint16_t hdr_checksum

Definition at line 7 of file packets.h.

◆ ident

uint16_t ident

Definition at line 3 of file packets.h.

◆ l2_hdr

struct ether_hdr l2_hdr

Definition at line 8 of file packets.h.

◆ l3_hdr

struct ipv4_hdr l3_hdr

Definition at line 8 of file packets.h.

◆ l4_hdr

struct icmp_hdr l4_hdr

Definition at line 8 of file packets.h.

◆ next_proto_id

uint8_t next_proto_id

Definition at line 6 of file packets.h.

◆ packet_id

uint16_t packet_id

Definition at line 3 of file packets.h.

◆ recv_ack

uint32_t recv_ack

Definition at line 3 of file packets.h.

◆ rx_win

uint16_t rx_win

Definition at line 6 of file packets.h.

◆ s_addr_bytes

uint8_t s_addr_bytes[ETHER_ADDR_LEN]

Definition at line 1 of file packets.h.

◆ sent_seq

uint32_t sent_seq

Definition at line 2 of file packets.h.

◆ seq_nb

uint16_t seq_nb

Definition at line 4 of file packets.h.

◆ src_addr

uint32_t src_addr

Definition at line 8 of file packets.h.

◆ src_port

uint16_t src_port

Definition at line 0 of file packets.h.

◆ tcp_flags

uint8_t tcp_flags

Definition at line 5 of file packets.h.

◆ tcp_urp

uint16_t tcp_urp

Definition at line 8 of file packets.h.

◆ time_to_live

uint8_t time_to_live

Definition at line 5 of file packets.h.

◆ total_length

uint16_t total_length

Definition at line 2 of file packets.h.

◆ type

type nv dpa nv dpa type

Definition at line 0 of file packets.h.

◆ type_of_service

uint8_t type_of_service

Definition at line 1 of file packets.h.

◆ version_ihl

uint8_t version_ihl

Definition at line 0 of file packets.h.