diff options
Diffstat (limited to 'zebra/zserv.h')
| -rw-r--r-- | zebra/zserv.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/zebra/zserv.h b/zebra/zserv.h index 1ff7ccd981..3110f7f94b 100644 --- a/zebra/zserv.h +++ b/zebra/zserv.h @@ -70,6 +70,10 @@ struct client_gr_info { TAILQ_ENTRY(client_gr_info) gr_info; }; +/* For managing client list */ +PREDECL_LIST(zserv_client_list); +PREDECL_LIST(zserv_stale_client_list); + /* Client structure. */ struct zserv { /* Client pthread */ @@ -86,6 +90,12 @@ struct zserv { int busy_count; bool is_closed; + /* For managing this node in the client list */ + struct zserv_client_list_item client_list_entry; + + /* For managing this node in the stale client list */ + struct zserv_stale_client_list_item stale_client_list_entry; + /* Input/output buffer to the client. */ pthread_mutex_t ibuf_mtx; struct stream_fifo *ibuf_fifo; @@ -230,6 +240,10 @@ struct zserv { TAILQ_HEAD(info_list, client_gr_info) gr_info_queue; }; +/* Declare the list operations */ +DECLARE_LIST(zserv_client_list, struct zserv, client_list_entry); +DECLARE_LIST(zserv_stale_client_list, struct zserv, stale_client_list_entry); + #define ZAPI_HANDLER_ARGS \ struct zserv *client, struct zmsghdr *hdr, struct stream *msg, \ struct zebra_vrf *zvrf @@ -395,7 +409,7 @@ __attribute__((__noreturn__)) void zebra_finalize(struct event *event); extern void zebra_gr_client_final_shutdown(struct zserv *client); extern int zebra_gr_client_disconnect(struct zserv *client); extern void zebra_gr_client_reconnect(struct zserv *client); -extern void zebra_gr_stale_client_cleanup(struct list *client_list); +extern void zebra_gr_stale_client_cleanup(void); extern void zread_client_capabilities(struct zserv *client, struct zmsghdr *hdr, struct stream *msg, struct zebra_vrf *zvrf); |
