]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - include/json_print.h
bridge: fdb: add support for src_vni option
[mirror_iproute2.git] / include / json_print.h
index 44cf5ac512eb75e48d9e22c81b5687592a211b7c..dbdc90e2316ab7ed7c1ec9a133a7c069f9b15cda 100644 (file)
@@ -29,13 +29,11 @@ enum output_type {
        PRINT_ANY = 4,
 };
 
-void new_json_obj(int json, FILE *fp);
+void new_json_obj(int json);
 void delete_json_obj(void);
 
 bool is_json_context(void);
 
-void set_current_fp(FILE *fp);
-
 void fflush_fp(void);
 
 void open_json_object(const char *str);
@@ -43,6 +41,8 @@ void close_json_object(void);
 void open_json_array(enum output_type type, const char *delim);
 void close_json_array(enum output_type type, const char *delim);
 
+void print_nl(void);
+
 #define _PRINT_FUNC(type_name, type)                                   \
        void print_color_##type_name(enum output_type t,                \
                                     enum color_attr color,             \
@@ -55,17 +55,22 @@ void close_json_array(enum output_type type, const char *delim);
                                             const char *fmt,           \
                                             type value)                \
        {                                                               \
-               print_color_##type_name(t, -1, key, fmt, value);        \
+               print_color_##type_name(t, COLOR_NONE, key, fmt, value);        \
        }
 _PRINT_FUNC(int, int);
+_PRINT_FUNC(s64, int64_t);
 _PRINT_FUNC(bool, bool);
 _PRINT_FUNC(null, const char*);
 _PRINT_FUNC(string, const char*);
-_PRINT_FUNC(uint, uint64_t);
+_PRINT_FUNC(uint, unsigned int);
+_PRINT_FUNC(u64, uint64_t);
+_PRINT_FUNC(hhu, unsigned char);
 _PRINT_FUNC(hu, unsigned short);
 _PRINT_FUNC(hex, unsigned int);
-_PRINT_FUNC(0xhex, unsigned int);
-_PRINT_FUNC(lluint, unsigned long long int);
+_PRINT_FUNC(0xhex, unsigned long long);
+_PRINT_FUNC(luint, unsigned long);
+_PRINT_FUNC(lluint, unsigned long long);
+_PRINT_FUNC(float, double);
 #undef _PRINT_FUNC
 
 #endif /* _JSON_PRINT_H_ */