mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 12:41:21 +00:00
zebra: API to locate client structure based on protocol
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: Reviewed By: CCR-4968 Testing Done: Tested with subsequent patch(es)
This commit is contained in:
parent
eb3d20d398
commit
8ed6821e60
@ -2371,6 +2371,21 @@ zebra_show_client_brief (struct vty *vty, struct zserv *client)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct zserv *
|
||||||
|
zebra_find_client (u_char proto)
|
||||||
|
{
|
||||||
|
struct listnode *node, *nnode;
|
||||||
|
struct zserv *client;
|
||||||
|
|
||||||
|
for (ALL_LIST_ELEMENTS (zebrad.client_list, node, nnode, client))
|
||||||
|
{
|
||||||
|
if (client->proto == proto)
|
||||||
|
return client;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Display default rtm_table for all clients. */
|
/* Display default rtm_table for all clients. */
|
||||||
DEFUN (show_table,
|
DEFUN (show_table,
|
||||||
|
@ -176,4 +176,6 @@ extern void zserv_create_header(struct stream *s, uint16_t cmd, vrf_id_t vrf_id)
|
|||||||
extern void zserv_nexthop_num_warn(const char *, const struct prefix *, const unsigned int);
|
extern void zserv_nexthop_num_warn(const char *, const struct prefix *, const unsigned int);
|
||||||
extern int zebra_server_send_message(struct zserv *client);
|
extern int zebra_server_send_message(struct zserv *client);
|
||||||
|
|
||||||
|
extern struct zserv *zebra_find_client (u_char proto);
|
||||||
|
|
||||||
#endif /* _ZEBRA_ZEBRA_H */
|
#endif /* _ZEBRA_ZEBRA_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user