summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_ptm.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-03-07 00:08:37 +0100
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-03-12 19:57:05 +0100
commit1002497af5aedffc661cb457c8775634a65c3a19 (patch)
treeac62e91f373b3d274440861984440aa242fd957b /zebra/zebra_ptm.c
parentzebra: standardize ZAPI message handler args (diff)
downloadfrr-1002497af5aedffc661cb457c8775634a65c3a19.tar.xz
frr-1002497af5aedffc661cb457c8775634a65c3a19.zip
zebra: reorganize zserv, batch i/o
Group send and receive functions together, change handlers to take a message instead of looking at ->ibuf and ->obuf, allow zebra to read multiple packets off the wire at a time. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_ptm.c')
-rw-r--r--zebra/zebra_ptm.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/zebra/zebra_ptm.c b/zebra/zebra_ptm.c
index 0c48473aa..67c7220b6 100644
--- a/zebra/zebra_ptm.c
+++ b/zebra/zebra_ptm.c
@@ -702,7 +702,7 @@ void zebra_ptm_bfd_dst_register(ZAPI_HANDLER_ARGS)
ptm_lib_append_msg(ptm_hdl, out_ctxt, ZEBRA_PTM_BFD_CLIENT_FIELD,
tmp_buf);
- s = client->ibuf;
+ s = msg;
STREAM_GETL(s, pid);
sprintf(tmp_buf, "%d", pid);
@@ -819,7 +819,6 @@ void zebra_ptm_bfd_dst_register(ZAPI_HANDLER_ARGS)
stream_failure:
ptm_lib_cleanup_msg(ptm_hdl, out_ctxt);
- return;
}
/* BFD peer/dst deregister */
@@ -859,7 +858,7 @@ void zebra_ptm_bfd_dst_deregister(ZAPI_HANDLER_ARGS)
ptm_lib_append_msg(ptm_hdl, out_ctxt, ZEBRA_PTM_BFD_CLIENT_FIELD,
tmp_buf);
- s = client->ibuf;
+ s = msg;
STREAM_GETL(s, pid);
sprintf(tmp_buf, "%d", pid);
@@ -950,7 +949,6 @@ void zebra_ptm_bfd_dst_deregister(ZAPI_HANDLER_ARGS)
stream_failure:
ptm_lib_cleanup_msg(ptm_hdl, out_ctxt);
- return;
}
/* BFD client register */
@@ -968,7 +966,7 @@ void zebra_ptm_bfd_client_register(ZAPI_HANDLER_ARGS)
zlog_debug("bfd_client_register msg from client %s: length=%d",
zebra_route_string(client->proto), hdr->length);
- s = client->ibuf;
+ s = msg;
STREAM_GETL(s, pid);
if (ptm_cb.ptm_sock == -1) {