]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zserv.h
zebra: reorganize zserv, batch i/o
[mirror_frr.git] / zebra / zserv.h
index 74ff31bcf9b0b82d2837e4c9c34c9bd256da5a3c..a055a28c0100addf4f59dfa99456916124934d65 100644 (file)
@@ -47,8 +47,12 @@ struct zserv {
        int sock;
 
        /* Input/output buffer to the client. */
-       struct stream *ibuf;
-       struct stream *obuf;
+       struct stream_fifo *ibuf_fifo;
+       struct stream_fifo *obuf_fifo;
+
+       /* Private I/O buffers */
+       struct stream *ibuf_work;
+       struct stream *obuf_work;
 
        /* Buffer of data waiting to be written to client. */
        struct buffer *wb;
@@ -129,7 +133,7 @@ struct zserv {
        int last_write_cmd;
 };
 
-/* ZAPI protocol message header */
+/* ZAPI protocol structs */
 struct zmsghdr {
        uint16_t length;
        uint8_t marker;
@@ -139,7 +143,8 @@ struct zmsghdr {
 };
 
 #define ZAPI_HANDLER_ARGS                                                      \
-       struct zserv *client, struct zmsghdr *hdr, struct zebra_vrf *zvrf
+       struct zserv *client, struct zmsghdr *hdr, struct stream *msg,         \
+               struct zebra_vrf *zvrf
 
 /* Zebra instance */
 struct zebra_t {
@@ -197,7 +202,7 @@ extern void zsend_rule_notify_owner(struct zebra_pbr_rule *rule,
 
 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, struct stream *msg);
 
 extern struct zserv *zebra_find_client(u_char proto, u_short instance);