NDN-DPDK
High-Speed Named Data Networking Forwarder
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Enumerations | Functions
logger.c File Reference
#include "logger.h"
#include <spdk/log.h>

Enumerations

enum  { DebugString_MaxCapacity = 100000 , DebugString_StructSize }
 

Functions

int Logger_Dpdk_Init (FILE *output)
 
 RTE_LOG_REGISTER (RTE_LOGTYPE_SPDK, SPDK, DEBUG)
 
void Logger_Spdk (int level, const char *restrict file, const int line, const char *restrict func, const char *restrict format, va_list args)
 
void Logger_HexDump (const uint8_t *b, size_t count)
 Print buffer in hexadecimal to stderr. More...
 
DebugStringDebugString_Get (size_t capacity)
 Obtain a buffer for populating a debug string. More...
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
DebugString_MaxCapacity 
DebugString_StructSize 

Function Documentation

◆ DebugString_Get()

DebugString* DebugString_Get ( size_t  capacity)

Obtain a buffer for populating a debug string.

Parameters
capacitybuffer capacity; panics on oversized request.
Returns
pointer to a per-lcore static buffer that will be overwritten on subsequent calls

◆ Logger_Dpdk_Init()

int Logger_Dpdk_Init ( FILE *  output)

◆ Logger_HexDump()

void Logger_HexDump ( const uint8_t *  b,
size_t  count 
)

Print buffer in hexadecimal to stderr.

This is only used during debugging, and should not appear in committed code.

◆ Logger_Spdk()

void Logger_Spdk ( int  level,
const char *restrict  file,
const int  line,
const char *restrict  func,
const char *restrict  format,
va_list  args 
)

◆ RTE_LOG_REGISTER()

RTE_LOG_REGISTER ( RTE_LOGTYPE_SPDK  ,
SPDK  ,
DEBUG   
)