FD.io VPP  v17.07.01-10-g3be13f0
Vector Packet Processing
format.h File Reference
+ Include dependency graph for format.h:

Go to the source code of this file.

Macros

#define UNFORMAT_END_OF_INPUT   (~0)
 
#define UNFORMAT_MORE_INPUT   0
 
#define unformat_parse_error(input)   clib_error_return (0, "parse error `%U'", format_unformat_error, input)
 

Typedefs

typedef u8 *( format_function_t) (u8 *s, va_list *args)
 
typedef struct _unformat_input_t unformat_input_t
 
typedef uwordunformat_function_t) (unformat_input_t *input, va_list *args)
 

Functions

u8va_format (u8 *s, const char *format, va_list *args)
 
u8format (u8 *s, const char *format,...)
 
word va_fformat (FILE *f, char *fmt, va_list *va)
 
word fformat (FILE *f, char *fmt,...)
 
word fdformat (int fd, char *fmt,...)
 
static uword format_get_indent (u8 *s)
 
static void unformat_init (unformat_input_t *i, uword(*fill_buffer)(unformat_input_t *), void *fill_buffer_arg)
 
static void unformat_free (unformat_input_t *i)
 
static uword unformat_check_input (unformat_input_t *i)
 
static uword unformat_is_eof (unformat_input_t *input)
 
static uword unformat_get_input (unformat_input_t *input)
 
static void unformat_put_input (unformat_input_t *input)
 
static uword unformat_peek_input (unformat_input_t *input)
 
static void unformat_skip_line (unformat_input_t *i)
 
uword unformat_skip_white_space (unformat_input_t *input)
 
uword unformat (unformat_input_t *i, const char *fmt,...)
 
uword unformat_user (unformat_input_t *input, unformat_function_t *func,...)
 
uword va_unformat (unformat_input_t *i, const char *fmt, va_list *args)
 
void unformat_init_command_line (unformat_input_t *input, char *argv[])
 
void unformat_init_string (unformat_input_t *input, char *string, int string_len)
 
static void unformat_init_cstring (unformat_input_t *input, char *string)
 
void unformat_init_vector (unformat_input_t *input, u8 *vector_string)
 
u8format_unformat_error (u8 *s, va_list *va)
 
u8format_unformat_input (u8 *s, va_list *va)
 
u8format_memory_size (u8 *s, va_list *va)
 
u8format_c_identifier (u8 *s, va_list *va)
 
u8format_hexdump (u8 *s, va_list *va)
 
void unformat_init_unix_file (unformat_input_t *input, int file_descriptor)
 
uword unformat_init_unix_env (unformat_input_t *input, char *var)
 
int test_format_main (unformat_input_t *input)
 
int test_unformat_main (unformat_input_t *input)
 
int test_vec_main (unformat_input_t *input)
 

Variables

unformat_function_t unformat_input
 
unformat_function_t unformat_line
 
unformat_function_t unformat_line_input
 
unformat_function_t unformat_token
 
unformat_function_t unformat_hex_string
 
unformat_function_t unformat_eof
 
unformat_function_t unformat_memory_size
 
unformat_function_t unformat_unix_gid
 

Macro Definition Documentation

#define UNFORMAT_END_OF_INPUT   (~0)

Definition at line 143 of file format.h.

#define UNFORMAT_MORE_INPUT   0

Definition at line 144 of file format.h.

#define unformat_parse_error (   input)    clib_error_return (0, "parse error `%U'", format_unformat_error, input)

Definition at line 267 of file format.h.

Typedef Documentation

typedef u8*( format_function_t) (u8 *s, va_list *args)

Definition at line 48 of file format.h.

typedef uword( unformat_function_t) (unformat_input_t *input, va_list *args)

Definition at line 231 of file format.h.

typedef struct _unformat_input_t unformat_input_t

Function Documentation

word fdformat ( int  fd,
char *  fmt,
  ... 
)

Definition at line 467 of file format.c.

+ Here is the call graph for this function:

word fformat ( FILE *  f,
char *  fmt,
  ... 
)

Definition at line 453 of file format.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format ( u8 s,
const char *  format,
  ... 
)

Definition at line 419 of file format.c.

+ Here is the call graph for this function:

u8* format_c_identifier ( u8 s,
va_list *  va 
)

Definition at line 258 of file std-formats.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword format_get_indent ( u8 s)
inlinestatic

Definition at line 72 of file format.h.

+ Here is the call graph for this function:

u8* format_hexdump ( u8 s,
va_list *  va 
)

Definition at line 281 of file std-formats.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_memory_size ( u8 s,
va_list *  va 
)

Definition at line 193 of file std-formats.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_unformat_error ( u8 s,
va_list *  va 
)

Definition at line 91 of file unformat.c.

+ Here is the call graph for this function:

u8* format_unformat_input ( u8 s,
va_list *  va 
)

Definition at line 143 of file unformat.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int test_format_main ( unformat_input_t input)
int test_unformat_main ( unformat_input_t input)
int test_vec_main ( unformat_input_t input)
uword unformat ( unformat_input_t i,
const char *  fmt,
  ... 
)

Definition at line 972 of file unformat.c.

+ Here is the call graph for this function:

static uword unformat_check_input ( unformat_input_t i)
inlinestatic

Definition at line 169 of file format.h.

static void unformat_free ( unformat_input_t i)
inlinestatic

Definition at line 161 of file format.h.

static uword unformat_get_input ( unformat_input_t input)
inlinestatic

Definition at line 190 of file format.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void unformat_init ( unformat_input_t i,
uword(*)(unformat_input_t *)  fill_buffer,
void *  fill_buffer_arg 
)
inlinestatic

Definition at line 151 of file format.h.

+ Here is the caller graph for this function:

void unformat_init_command_line ( unformat_input_t input,
char *  argv[] 
)

Definition at line 1007 of file unformat.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void unformat_init_cstring ( unformat_input_t input,
char *  string 
)
inlinestatic

Definition at line 255 of file format.h.

+ Here is the call graph for this function:

void unformat_init_string ( unformat_input_t input,
char *  string,
int  string_len 
)

Definition at line 1023 of file unformat.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword unformat_init_unix_env ( unformat_input_t input,
char *  var 
)

Definition at line 1066 of file unformat.c.

+ Here is the call graph for this function:

void unformat_init_unix_file ( unformat_input_t input,
int  file_descriptor 
)

Definition at line 1058 of file unformat.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void unformat_init_vector ( unformat_input_t input,
u8 vector_string 
)

Definition at line 1031 of file unformat.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword unformat_is_eof ( unformat_input_t input)
inlinestatic

Definition at line 182 of file format.h.

+ Here is the call graph for this function:

static uword unformat_peek_input ( unformat_input_t input)
inlinestatic

Definition at line 210 of file format.h.

+ Here is the call graph for this function:

static void unformat_put_input ( unformat_input_t input)
inlinestatic

Definition at line 203 of file format.h.

+ Here is the caller graph for this function:

static void unformat_skip_line ( unformat_input_t i)
inlinestatic

Definition at line 220 of file format.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword unformat_skip_white_space ( unformat_input_t input)

Definition at line 815 of file unformat.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword unformat_user ( unformat_input_t input,
unformat_function_t func,
  ... 
)

Definition at line 983 of file unformat.c.

word va_fformat ( FILE *  f,
char *  fmt,
va_list *  va 
)

Definition at line 429 of file format.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* va_format ( u8 s,
const char *  format,
va_list *  args 
)

Definition at line 387 of file format.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword va_unformat ( unformat_input_t i,
const char *  fmt,
va_list *  args 
)

Definition at line 833 of file unformat.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

unformat_function_t unformat_eof

Definition at line 291 of file format.h.

unformat_function_t unformat_hex_string

Definition at line 287 of file format.h.

unformat_function_t unformat_input

Definition at line 275 of file format.h.

unformat_function_t unformat_line

Definition at line 278 of file format.h.

unformat_function_t unformat_line_input

Definition at line 281 of file format.h.

unformat_function_t unformat_memory_size

Definition at line 294 of file format.h.

unformat_function_t unformat_token

Definition at line 284 of file format.h.

unformat_function_t unformat_unix_gid

Definition at line 315 of file format.h.