NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
eth_common.h File Reference
#include <unistd.h>
#include <doca_pe.h>
#include <doca_dev.h>
#include <doca_mmap.h>
#include <doca_buf_inventory.h>
#include <doca_error.h>
#include "common.h"
Include dependency graph for eth_common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  eth_core_resources
 
struct  eth_core_config
 
struct  ether_hdr
 

Functions

struct ether_hdr __attribute__ ((__packed__))
 
doca_error_t allocate_eth_core_resources (struct eth_core_config *cfg, struct eth_core_resources *resources)
 
doca_error_t destroy_eth_core_resources (struct eth_core_resources *resources)
 
doca_error_t extract_ibdev_name (char *ibdev_name, char *ibdev_name_out)
 
doca_error_t extract_mac_addr (char *mac_addr, uint8_t *mac_addr_out)
 

Variables

uint8_t dst_addr [DOCA_DEVINFO_MAC_ADDR_SIZE]
 
uint8_t src_addr [DOCA_DEVINFO_MAC_ADDR_SIZE]
 
uint16_t ether_type
 

Function Documentation

◆ allocate_eth_core_resources()

doca_error_t allocate_eth_core_resources ( struct eth_core_config cfg,
struct eth_core_resources resources 
)

Definition at line 38 of file eth_common.c.

◆ destroy_eth_core_resources()

doca_error_t destroy_eth_core_resources ( struct eth_core_resources resources)

Definition at line 98 of file eth_common.c.

◆ extract_ibdev_name()

doca_error_t extract_ibdev_name ( char *  ibdev_name,
char *  ibdev_name_out 
)

Definition at line 128 of file eth_common.c.

◆ extract_mac_addr()

doca_error_t extract_mac_addr ( char *  mac_addr,
uint8_t *  mac_addr_out 
)

Definition at line 146 of file eth_common.c.

Variable Documentation

◆ dst_addr

uint8_t dst_addr[DOCA_DEVINFO_MAC_ADDR_SIZE]

Definition at line 0 of file eth_common.h.

◆ ether_type

uint16_t ether_type

Definition at line 2 of file eth_common.h.

◆ src_addr

uint8_t src_addr[DOCA_DEVINFO_MAC_ADDR_SIZE]

Definition at line 1 of file eth_common.h.