diff options
-rw-r--r-- | lib/log.c | 6 | ||||
-rw-r--r-- | lib/zclient.c | 15 | ||||
-rw-r--r-- | lib/zclient.h | 6 |
3 files changed, 26 insertions, 1 deletions
@@ -464,7 +464,11 @@ static const struct zebra_desc_table command_types[] = { DESC_ENTRY(ZEBRA_ROUTE_NOTIFY_REQUEST), DESC_ENTRY(ZEBRA_CLIENT_CLOSE_NOTIFY), DESC_ENTRY(ZEBRA_EVPN_REMOTE_NH_ADD), - DESC_ENTRY(ZEBRA_EVPN_REMOTE_NH_DEL)}; + DESC_ENTRY(ZEBRA_EVPN_REMOTE_NH_DEL), + DESC_ENTRY(ZEBRA_NHRP_NEIGH_ADDED), + DESC_ENTRY(ZEBRA_NHRP_NEIGH_REMOVED), + DESC_ENTRY(ZEBRA_NHRP_NEIGH_GET)}; + #undef DESC_ENTRY static const struct zebra_desc_table unknown = {0, "unknown", '?'}; diff --git a/lib/zclient.c b/lib/zclient.c index c78937c1e..8d94fe1ac 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -3916,6 +3916,21 @@ static int zclient_read(struct thread *thread) (*zclient->zebra_client_close_notify)(command, zclient, length, vrf_id); break; + case ZEBRA_NHRP_NEIGH_ADDED: + if (zclient->neighbor_added) + (*zclient->neighbor_added)(command, zclient, length, + vrf_id); + break; + case ZEBRA_NHRP_NEIGH_REMOVED: + if (zclient->neighbor_removed) + (*zclient->neighbor_removed)(command, zclient, length, + vrf_id); + break; + case ZEBRA_NHRP_NEIGH_GET: + if (zclient->neighbor_get) + (*zclient->neighbor_get)(command, zclient, length, + vrf_id); + break; default: break; } diff --git a/lib/zclient.h b/lib/zclient.h index bd952ea1e..a99f2eba1 100644 --- a/lib/zclient.h +++ b/lib/zclient.h @@ -223,6 +223,9 @@ typedef enum { ZEBRA_NEIGH_DISCOVER, ZEBRA_ROUTE_NOTIFY_REQUEST, ZEBRA_CLIENT_CLOSE_NOTIFY, + ZEBRA_NHRP_NEIGH_ADDED, + ZEBRA_NHRP_NEIGH_REMOVED, + ZEBRA_NHRP_NEIGH_GET, } zebra_message_types_t; enum zebra_error_types { @@ -381,6 +384,9 @@ struct zclient { int (*opaque_unregister_handler)(ZAPI_CALLBACK_ARGS); int (*sr_policy_notify_status)(ZAPI_CALLBACK_ARGS); int (*zebra_client_close_notify)(ZAPI_CALLBACK_ARGS); + void (*neighbor_added)(ZAPI_CALLBACK_ARGS); + void (*neighbor_removed)(ZAPI_CALLBACK_ARGS); + void (*neighbor_get)(ZAPI_CALLBACK_ARGS); }; /* Zebra API message flag. */ |