summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaul <paul>2006-01-17 17:43:18 +0000
committerpaul <paul>2006-01-17 17:43:18 +0000
commitd211086aefd45e0b7c113a43ed5eb620626b8681 (patch)
tree353b32a059c864a748d1f52f90e8a57c8adc7b6f
parent789f78ac5a5bf1c22c9c053c883f60d45761e89b (diff)
[lib/zclient] Export zclient_create_header
2006-01-17 Paul Jakma <paul.jakma@sun.com> * zclient.{c,h}: (zclient_create_header) export this, seems others could use it (in lieu of more complete zserv helpers).
-rw-r--r--lib/ChangeLog2
-rw-r--r--lib/zclient.c2
-rw-r--r--lib/zclient.h3
3 files changed, 6 insertions, 1 deletions
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 <paul.jakma@sun.com>
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 *);