summaryrefslogtreecommitdiff
path: root/lib/zebra.h
diff options
context:
space:
mode:
authorpaul <paul>2006-01-16 01:54:02 +0000
committerpaul <paul>2006-01-16 01:54:02 +0000
commitc1b9800a60f073c7d57f6232f9af7ae39bc3353a (patch)
tree94fc0006fcf73d4ab4733bef23689cb8f36772ee /lib/zebra.h
parentc77d4546619f9d3e0ccfac5acbc0ebb42658a61f (diff)
[zserv] Extend Zserv header with version information and marker field
2006-01-16 Paul Jakma <paul.jakma@sun.com> * lib/zclient.h: Update the Zserv protocol header with a version field. Define the old command field to be a 'marker', to allow old Zserv and updated Zserv to be differentiated. Future updates will bump the version field obviously. New command field is made wider. Try to stop using the 'zebra_size_t' typedef in the callbacks. * lib/zclient.c: Update to read/write new format header. * zebra/zserv.c: Ditto
Diffstat (limited to 'lib/zebra.h')
-rw-r--r--lib/zebra.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/zebra.h b/lib/zebra.h
index cf7998f2..00f13f57 100644
--- a/lib/zebra.h
+++ b/lib/zebra.h
@@ -397,6 +397,12 @@ struct in_pktinfo
#define ZEBRA_ROUTER_ID_UPDATE 22
#define ZEBRA_MESSAGE_MAX 23
+/* Marker value used in new Zserv, in the byte location corresponding
+ * the command value in the old zserv header. To allow old and new
+ * Zserv headers to be distinguished from each other.
+ */
+#define ZEBRA_HEADER_MARKER 255
+
/* Zebra route's types. */
#define ZEBRA_ROUTE_SYSTEM 0
#define ZEBRA_ROUTE_KERNEL 1
@@ -493,9 +499,9 @@ extern char zebra_route_char(unsigned int route_type);
typedef u_int16_t afi_t;
typedef u_int8_t safi_t;
-/* Zebra types. */
+/* Zebra types. Used in Zserv message header. */
typedef u_int16_t zebra_size_t;
-typedef u_int8_t zebra_command_t;
+typedef u_int16_t zebra_command_t;
/* FIFO -- first in first out structure and macros. */
struct fifo