stream_putw(s, api->instance);
stream_putl(s, api->flags);
stream_putc(s, api->message);
- stream_putw(s, api->safi);
+ stream_putc(s, api->safi);
/* Put prefix information. */
stream_putc(s, api->prefix.family);
STREAM_GETW(s, api->instance);
STREAM_GETL(s, api->flags);
STREAM_GETC(s, api->message);
- STREAM_GETW(s, api->safi);
+ STREAM_GETC(s, api->safi);
/* Prefix. */
STREAM_GETC(s, api->prefix.family);
mpls_label_t labels[MPLS_MAX_LABELS];
};
+/*
+ * Some of these data structures do not map easily to
+ * a actual data structure size giving different compilers
+ * and systems. For those data structures we need
+ * to use the smallest available stream_getX/putX functions
+ * to encode/decode.
+ */
struct zapi_route {
u_char type;
u_short instance;
u_char message;
+ /*
+ * This is an enum but we are going to treat it as a uint8_t
+ * for purpose of encoding/decoding
+ */
safi_t safi;
struct prefix prefix;