api: provide api definition over api
[vpp.git] / src / vlibapi / api_common.h
index 37ffb58..62a8d4c 100644 (file)
@@ -127,11 +127,11 @@ typedef struct
   void *fromjson;              /**< JSON to binary convert function */
   void *calc_size;             /**< message size calculation */
   int size;                    /**< message size  */
-  int traced : 1;              /**< is this message to be traced?  */
-  int replay : 1;              /**< is this message to be replayed?  */
-  int message_bounce : 1;      /**< do not free message after processing */
-  int is_mp_safe : 1;          /**< worker thread barrier required?  */
-  int is_autoendian : 1;       /**< endian conversion required?  */
+  u32 traced : 1;              /**< is this message to be traced?  */
+  u32 replay : 1;              /**< is this message to be replayed?  */
+  u32 message_bounce : 1;      /**< do not free message after processing */
+  u32 is_mp_safe : 1;          /**< worker thread barrier required?  */
+  u32 is_autoendian : 1;       /**< endian conversion required?  */
 } vl_msg_api_msg_config_t;
 
 /** Message header structure */
@@ -171,10 +171,6 @@ void vl_msg_api_trace_only (void *the_msg, uword msg_len);
 void vl_msg_api_cleanup_handler (void *the_msg);
 void vl_msg_api_replay_handler (void *the_msg);
 void vl_msg_api_socket_handler (void *the_msg, uword msg_len);
-void vl_msg_api_set_handlers (int msg_id, char *msg_name, void *handler,
-                             void *endian, format_function_t *format,
-                             int msg_size, int traced, void *tojson,
-                             void *fromjson, void *validate_size);
 void vl_msg_api_clean_handlers (int msg_id);
 void vl_msg_api_config (vl_msg_api_msg_config_t *);
 void vl_msg_api_set_cleanup_handler (int msg_id, void *fp);
@@ -194,7 +190,6 @@ void vl_msg_api_post_mortem_dump (void);
 void vl_msg_api_post_mortem_dump_enable_disable (int enable);
 void vl_msg_api_register_pd_handler (void *handler,
                                     u16 msg_id_host_byte_order);
-int vl_msg_api_pd_handler (void *mp, int rv);
 
 void vl_msg_api_set_first_available_msg_id (u16 first_avail);
 u16 vl_msg_api_get_msg_ids (const char *name, int n);
@@ -359,6 +354,8 @@ typedef struct api_main_t
 
   /** client message index hash table */
   uword *msg_index_by_name_and_crc;
+  /** plugin JSON representation vector table */
+  u8 **json_api_repr;
 
   /** api version list */
   api_version_t *api_version_list;