From d211086aefd45e0b7c113a43ed5eb620626b8681 Mon Sep 17 00:00:00 2001 From: paul Date: Tue, 17 Jan 2006 17:43:18 +0000 Subject: [lib/zclient] Export zclient_create_header 2006-01-17 Paul Jakma * zclient.{c,h}: (zclient_create_header) export this, seems others could use it (in lieu of more complete zserv helpers). --- lib/ChangeLog | 2 ++ lib/zclient.c | 2 +- lib/zclient.h | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index 430e6aac..1fa8eb59 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -7,6 +7,8 @@ terminal_no_monitor, in the more normal negating format, to be kind to my fingers. (vty_init) install new ALIAS. + * zclient.{c,h}: (zclient_create_header) export this, seems others + could use it (in lieu of more complete zserv helpers). 2006-01-16 Paul Jakma diff --git a/lib/zclient.c b/lib/zclient.c index ccd8bfc7..a253af61 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -270,7 +270,7 @@ zclient_send_message(struct zclient *zclient) return 0; } -static void +void zclient_create_header (struct stream *s, uint16_t command) { /* length placeholder, caller can update */ diff --git a/lib/zclient.h b/lib/zclient.h index bd33295a..69ada144 100644 --- a/lib/zclient.h +++ b/lib/zclient.h @@ -145,6 +145,9 @@ extern void zclient_redistribute_default (int command, struct zclient *); Returns 0 for success or -1 on an I/O error. */ extern int zclient_send_message(struct zclient *); +/* create header for command, length to be filled in by user later */ +extern void zclient_create_header (struct stream *, uint16_t); + extern struct interface *zebra_interface_add_read (struct stream *); extern struct interface *zebra_interface_state_read (struct stream *s); extern struct connected *zebra_interface_address_read (int, struct stream *); -- cgit v1.2.1