diff options
author | Florin Coras <fcoras@cisco.com> | 2024-02-29 18:19:30 -0800 |
---|---|---|
committer | Dave Barach <vpp@barachs.net> | 2024-03-01 22:22:53 +0000 |
commit | 4f3da9c1f73043145f825491ef573f180af10fc9 (patch) | |
tree | 649810f1b98c5cee3f335b2362c5e14907b4922d /src/vnet/session/session_api.c | |
parent | 242fe13c62fe75fff0fa4d9ade0af0eec740d30f (diff) |
session: add api cb for listen and unlisten
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I28ccebf4d2f0728dd174ab3ee77a0d7ad4b90951
Diffstat (limited to 'src/vnet/session/session_api.c')
-rw-r--r-- | src/vnet/session/session_api.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c index 84d44e9fa3e..759c6ea86cf 100644 --- a/src/vnet/session/session_api.c +++ b/src/vnet/session/session_api.c @@ -271,7 +271,7 @@ snd_msg: return 0; } -int +static int mq_send_session_bound_cb (u32 app_wrk_index, u32 api_context, session_handle_t handle, int rv) { @@ -325,11 +325,14 @@ snd_msg: return 0; } -void -mq_send_unlisten_reply (app_worker_t * app_wrk, session_handle_t sh, - u32 context, int rv) +static void +mq_send_unlisten_cb (u32 app_wrk_index, session_handle_t sh, u32 context, + int rv) { session_unlisten_reply_msg_t m = { 0 }; + app_worker_t *app_wrk; + + app_wrk = app_worker_get (app_wrk_index); m.context = context; m.handle = sh; @@ -503,6 +506,8 @@ static session_cb_vft_t session_mq_cb_vft = { .session_reset_callback = mq_send_session_reset_cb, .session_migrate_callback = mq_send_session_migrate_cb, .session_cleanup_callback = mq_send_session_cleanup_cb, + .session_listened_callback = mq_send_session_bound_cb, + .session_unlistened_callback = mq_send_unlisten_cb, .add_segment_callback = mq_send_add_segment_cb, .del_segment_callback = mq_send_del_segment_cb, .builtin_app_rx_callback = mq_send_io_rx_event, @@ -1282,6 +1287,8 @@ static session_cb_vft_t session_mq_sapi_cb_vft = { .session_reset_callback = mq_send_session_reset_cb, .session_migrate_callback = mq_send_session_migrate_cb, .session_cleanup_callback = mq_send_session_cleanup_cb, + .session_listened_callback = mq_send_session_bound_cb, + .session_unlistened_callback = mq_send_unlisten_cb, .add_segment_callback = mq_send_add_segment_sapi_cb, .del_segment_callback = mq_send_del_segment_sapi_cb, .builtin_app_rx_callback = mq_send_io_rx_event, |