diff options
| author | Karen Schoener <karen@voltanet.io> | 2020-12-07 18:01:01 -0500 |
|---|---|---|
| committer | Karen Schoener <karen@volta.io> | 2020-12-07 18:22:36 -0500 |
| commit | 581e797e02d91cb1c5a7acfd9b2f8c8feb1cde56 (patch) | |
| tree | d1ec08584f36686aa19986093d1d06b91687f102 /lib/zclient.h | |
| parent | 6a684109aea0e8b314340a00d9c353df0b3daab4 (diff) | |
zebra: Adding zapi client close notification
When zebra detects a client close, send a zapi client close
notification.
Signed-off-by: Karen Schoener <karen@voltanet.io>
Diffstat (limited to 'lib/zclient.h')
| -rw-r--r-- | lib/zclient.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/zclient.h b/lib/zclient.h index ae94237b76..33c1e732ee 100644 --- a/lib/zclient.h +++ b/lib/zclient.h @@ -220,6 +220,7 @@ typedef enum { ZEBRA_OPAQUE_UNREGISTER, ZEBRA_NEIGH_DISCOVER, ZEBRA_ROUTE_NOTIFY_REQUEST, + ZEBRA_CLIENT_CLOSE_NOTIFY, } zebra_message_types_t; enum zebra_error_types { @@ -377,6 +378,7 @@ struct zclient { int (*opaque_register_handler)(ZAPI_CALLBACK_ARGS); int (*opaque_unregister_handler)(ZAPI_CALLBACK_ARGS); int (*sr_policy_notify_status)(ZAPI_CALLBACK_ARGS); + int (*zebra_client_close_notify)(ZAPI_CALLBACK_ARGS); }; /* Zebra API message flag. */ @@ -1097,6 +1099,17 @@ zclient_send_neigh_discovery_req(struct zclient *zclient, const struct interface *ifp, const struct prefix *p); +struct zapi_client_close_info { + /* Client session tuple */ + uint8_t proto; + uint16_t instance; + uint32_t session_id; +}; + +/* Decode incoming client close notify */ +extern int zapi_client_close_notify_decode(struct stream *s, + struct zapi_client_close_info *info); + #ifdef __cplusplus } #endif |
