FD.io VPP  v18.07.1-11-g31aa6f2
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

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

Definition at line 25 of file json_format.c.

Typedef Documentation

Function Documentation

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:

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:

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:

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:

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:

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:

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:

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: