summaryrefslogtreecommitdiffstats
path: root/src/vlibapi
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlibapi')
-rw-r--r--src/vlibapi/api_common.h1
-rw-r--r--src/vlibapi/api_shared.c12
2 files changed, 13 insertions, 0 deletions
diff --git a/src/vlibapi/api_common.h b/src/vlibapi/api_common.h
index 770cf47d188..8e6ab0ff094 100644
--- a/src/vlibapi/api_common.h
+++ b/src/vlibapi/api_common.h
@@ -144,6 +144,7 @@ void vl_msg_api_set_handlers (int msg_id, char *msg_name,
void *cleanup,
void *endian,
void *print, int msg_size, int traced);
+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);
void vl_msg_api_queue_handler (unix_shared_memory_queue_t * q);
diff --git a/src/vlibapi/api_shared.c b/src/vlibapi/api_shared.c
index 0c4952b189c..27898c3b952 100644
--- a/src/vlibapi/api_shared.c
+++ b/src/vlibapi/api_shared.c
@@ -717,6 +717,18 @@ vl_msg_api_set_handlers (int id, char *name, void *handler, void *cleanup,
}
void
+vl_msg_api_clean_handlers (int msg_id)
+{
+ vl_msg_api_msg_config_t cfg;
+ vl_msg_api_msg_config_t *c = &cfg;
+
+ memset (c, 0, sizeof (*c));
+
+ c->id = msg_id;
+ vl_msg_api_config (c);
+}
+
+void
vl_msg_api_set_cleanup_handler (int msg_id, void *fp)
{
api_main_t *am = &api_main;