NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
telemetry_exporter.c File Reference
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <ctype.h>
#include <sys/queue.h>
#include <unistd.h>
#include <linux/types.h>
#include <rte_string_fns.h>
#include <doca_log.h>
#include "telemetry_exporter.h"
#include "utils.h"
Include dependency graph for telemetry_exporter.c:

Go to the source code of this file.

Functions

 DOCA_LOG_REGISTER (NETFLOW_TELEMETRY)
 
static doca_error_t add_netflow_field (uint16_t type, uint16_t length)
 
static doca_error_t init_template_fields (void)
 
static doca_error_t get_hostname_ip (char *host_name)
 
doca_error_t send_netflow_record (void)
 
void enqueue_netflow_record_to_ring (const struct doca_telemetry_exporter_netflow_record *record)
 
void destroy_netflow_schema_and_source (void)
 
doca_error_t init_netflow_schema_and_source (uint8_t id, char *source_tag)
 

Variables

static struct rte_ring * netflow_pending_ring
 
static struct rte_ring * netflow_freelist_ring
 
static struct doca_telemetry_exporter_netflow_record data_to_send [NETFLOW_QUEUE_SIZE]
 
static struct doca_telemetry_exporter_netflow_record * data_to_send_ptr [NETFLOW_QUEUE_SIZE]
 
static struct doca_telemetry_exporter_netflow_template * netflow_template
 

Function Documentation

◆ add_netflow_field()

static doca_error_t add_netflow_field ( uint16_t  type,
uint16_t  length 
)
static

Definition at line 59 of file telemetry_exporter.c.

◆ destroy_netflow_schema_and_source()

void destroy_netflow_schema_and_source ( void  )

Definition at line 230 of file telemetry_exporter.c.

◆ DOCA_LOG_REGISTER()

DOCA_LOG_REGISTER ( NETFLOW_TELEMETRY  )

◆ enqueue_netflow_record_to_ring()

void enqueue_netflow_record_to_ring ( const struct doca_telemetry_exporter_netflow_record *  record)

Definition at line 212 of file telemetry_exporter.c.

◆ get_hostname_ip()

static doca_error_t get_hostname_ip ( char *  host_name)
static

Definition at line 143 of file telemetry_exporter.c.

◆ init_netflow_schema_and_source()

doca_error_t init_netflow_schema_and_source ( uint8_t  id,
char *  source_tag 
)

Definition at line 238 of file telemetry_exporter.c.

◆ init_template_fields()

static doca_error_t init_template_fields ( void  )
static

Definition at line 81 of file telemetry_exporter.c.

◆ send_netflow_record()

doca_error_t send_netflow_record ( void  )

Definition at line 173 of file telemetry_exporter.c.

Variable Documentation

◆ data_to_send

struct doca_telemetry_exporter_netflow_record data_to_send[NETFLOW_QUEUE_SIZE]
static

Definition at line 44 of file telemetry_exporter.c.

◆ data_to_send_ptr

struct doca_telemetry_exporter_netflow_record* data_to_send_ptr[NETFLOW_QUEUE_SIZE]
static

Definition at line 48 of file telemetry_exporter.c.

◆ netflow_freelist_ring

struct rte_ring * netflow_freelist_ring
static

Definition at line 44 of file telemetry_exporter.c.

◆ netflow_pending_ring

struct rte_ring* netflow_pending_ring
static

Definition at line 44 of file telemetry_exporter.c.

◆ netflow_template

struct doca_telemetry_exporter_netflow_template* netflow_template
static

Definition at line 50 of file telemetry_exporter.c.