VCL: refactor session close / disconnect.
[vpp.git] / src / vppinfra / format.h
index bc0d6d1..a27fbb9 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)
@@ -234,7 +234,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 +242,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,11 +305,14 @@ 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 */
 
 /* Test code. */