FD.io VPP  v20.09-rc2-28-g3c5414029
Vector Packet Processing
json_format.c File Reference
+ Include dependency graph for json_format.c:

Go to the source code of this file.

Data Structures

struct  vat_print_ctx_s
 

Macros

#define VAT_TAB_WIDTH   2
 
#define P(fmt, ...)   fformat(ctx->ofp, fmt, ##__VA_ARGS__)
 
#define PL(fmt, ...)   fformat(ctx->ofp, fmt"\n", ##__VA_ARGS__)
 
#define PPL(fmt, ...)   vat_json_indent_line(ctx, fmt"\n", ##__VA_ARGS__)
 
#define PP(fmt, ...)   vat_json_indent_line(ctx, fmt, ##__VA_ARGS__)
 
#define INCR   (ctx->indent++)
 
#define DECR   (ctx->indent--)
 

Typedefs

typedef struct vat_print_ctx_s vat_print_ctx_t
 

Functions

static u8vat_json_format_ip4_address (u8 *s, va_list *args)
 
static u8vat_json_format_ip6_address (u8 *s, va_list *args)
 
static void vat_json_indent_print (vat_print_ctx_t *ctx)
 
static void vat_json_indent_line (vat_print_ctx_t *ctx, char *fmt,...)
 
static u8 is_num_only (vat_json_node_t *p)
 
static void vat_json_print_internal (vat_print_ctx_t *ctx, vat_json_node_t *node)
 
void vat_json_print (FILE *ofp, vat_json_node_t *node)
 
void vat_json_free (vat_json_node_t *node)
 

Macro Definition Documentation

◆ DECR

#define DECR   (ctx->indent--)

◆ INCR

#define INCR   (ctx->indent++)

◆ P

#define P (   fmt,
  ... 
)    fformat(ctx->ofp, fmt, ##__VA_ARGS__)

◆ PL

#define PL (   fmt,
  ... 
)    fformat(ctx->ofp, fmt"\n", ##__VA_ARGS__)

◆ PP

#define PP (   fmt,
  ... 
)    vat_json_indent_line(ctx, fmt, ##__VA_ARGS__)

◆ PPL

#define PPL (   fmt,
  ... 
)    vat_json_indent_line(ctx, fmt"\n", ##__VA_ARGS__)

◆ VAT_TAB_WIDTH

#define VAT_TAB_WIDTH   2

Definition at line 25 of file json_format.c.

Typedef Documentation

◆ vat_print_ctx_t

Function Documentation

◆ is_num_only()

static u8 is_num_only ( vat_json_node_t p)
static

Definition at line 114 of file json_format.c.

+ Here is the caller graph for this function:

◆ vat_json_format_ip4_address()

static u8* vat_json_format_ip4_address ( u8 s,
va_list *  args 
)
static

Definition at line 35 of file json_format.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vat_json_format_ip6_address()

static u8* vat_json_format_ip6_address ( u8 s,
va_list *  args 
)
static

Definition at line 43 of file json_format.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vat_json_free()

void vat_json_free ( vat_json_node_t node)

Definition at line 257 of file json_format.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vat_json_indent_line()

static void vat_json_indent_line ( vat_print_ctx_t ctx,
char *  fmt,
  ... 
)
static

Definition at line 103 of file json_format.c.

+ Here is the call graph for this function:

◆ vat_json_indent_print()

static void vat_json_indent_print ( vat_print_ctx_t ctx)
static

Definition at line 93 of file json_format.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vat_json_print()

void vat_json_print ( FILE *  ofp,
vat_json_node_t node 
)

Definition at line 245 of file json_format.c.

+ Here is the call graph for this function:

◆ vat_json_print_internal()

static void vat_json_print_internal ( vat_print_ctx_t ctx,
vat_json_node_t node 
)
static

Definition at line 128 of file json_format.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: