ikev2: add support for custom ipsec-over-udp port
[vpp.git] / src / vppinfra / format.h
index bc0d6d1..678029e 100644 (file)
@@ -68,10 +68,10 @@ word va_fformat (FILE * f, char *fmt, va_list * va);
 word fformat (FILE * f, char *fmt, ...);
 word fdformat (int fd, char *fmt, ...);
 
-always_inline uword
+always_inline u32
 format_get_indent (u8 * s)
 {
-  uword indent = 0;
+  u32 indent = 0;
   u8 *nl;
 
   if (!s)
@@ -94,6 +94,7 @@ _(format_vec32);
 _(format_vec_uword);
 _(format_ascii_bytes);
 _(format_hex_bytes);
+_(format_hex_bytes_no_wrap);
 _(format_white_space);
 _(format_f64);
 _(format_time_interval);
@@ -116,6 +117,7 @@ _(format_timeval);
 _(format_time_float);
 _(format_signal);
 _(format_ucontext_pc);
+_(format_page_map);
 #endif
 
 #undef _
@@ -152,7 +154,7 @@ unformat_init (unformat_input_t * i,
               uword (*fill_buffer) (unformat_input_t *),
               void *fill_buffer_arg)
 {
-  memset (i, 0, sizeof (i[0]));
+  clib_memset (i, 0, sizeof (i[0]));
   i->fill_buffer = fill_buffer;
   i->fill_buffer_arg = fill_buffer_arg;
 }
@@ -162,7 +164,7 @@ unformat_free (unformat_input_t * i)
 {
   vec_free (i->buffer);
   vec_free (i->buffer_marks);
-  memset (i, 0, sizeof (i[0]));
+  clib_memset (i, 0, sizeof (i[0]));
 }
 
 always_inline uword
@@ -234,7 +236,7 @@ typedef uword (unformat_function_t) (unformat_input_t * input,
 /* External functions. */
 
 /* General unformatting function with programmable input stream. */
-uword unformat (unformat_input_t * i, char *fmt, ...);
+uword unformat (unformat_input_t * i, const char *fmt, ...);
 
 /* Call user defined parse function.
    unformat_user (i, f, ...) is equivalent to unformat (i, "%U", f, ...) */
@@ -242,7 +244,7 @@ uword unformat_user (unformat_input_t * input, unformat_function_t * func,
                     ...);
 
 /* Alternate version which allows for extensions. */
-uword va_unformat (unformat_input_t * i, char *fmt, va_list * args);
+uword va_unformat (unformat_input_t * i, const char *fmt, va_list * args);
 
 /* Setup for unformat of Unix style command line. */
 void unformat_init_command_line (unformat_input_t * input, char *argv[]);
@@ -305,13 +307,18 @@ u8 *format_hexdump (u8 * s, va_list * va);
 /* Unix specific formats. */
 #ifdef CLIB_UNIX
 /* Setup input from Unix file. */
-void unformat_init_unix_file (unformat_input_t * input, int file_descriptor);
+void unformat_init_clib_file (unformat_input_t * input, int file_descriptor);
 
 /* Take input from Unix environment variable; returns
    1 if variable exists zero otherwise. */
 uword unformat_init_unix_env (unformat_input_t * input, char *var);
+
+/* Unformat unix group id (gid) specified as integer or string */
+unformat_function_t unformat_unix_gid;
 #endif /* CLIB_UNIX */
 
+uword unformat_data_size (unformat_input_t * input, va_list * args);
+
 /* Test code. */
 int test_format_main (unformat_input_t * input);
 int test_unformat_main (unformat_input_t * input);