summaryrefslogtreecommitdiff
path: root/lib/zclient.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/zclient.h')
-rw-r--r--lib/zclient.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/lib/zclient.h b/lib/zclient.h
index 07fe512a3c..e00821f2f6 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -36,6 +36,8 @@
/* For union pw_protocol_fields */
#include "pw.h"
+#include "mlag.h"
+
/* For input/output buffer to zebra. */
#define ZEBRA_MAX_PACKET_SIZ 16384
@@ -58,6 +60,10 @@
#define ZEBRA_IPTABLES_FORWARD 0
#define ZEBRA_IPTABLES_DROP 1
+/* Zebra FEC register command flags. */
+#define ZEBRA_FEC_REGISTER_LABEL 0x1
+#define ZEBRA_FEC_REGISTER_LABEL_INDEX 0x2
+
extern struct sockaddr_storage zclient_addr;
extern socklen_t zclient_addr_len;
@@ -135,6 +141,7 @@ typedef enum {
ZEBRA_IP_PREFIX_ROUTE_DEL,
ZEBRA_REMOTE_MACIP_ADD,
ZEBRA_REMOTE_MACIP_DEL,
+ ZEBRA_DUPLICATE_ADDR_DETECTION,
ZEBRA_PW_ADD,
ZEBRA_PW_DELETE,
ZEBRA_PW_SET,
@@ -166,6 +173,7 @@ struct redist_proto {
struct zclient_capabilities {
uint32_t ecmp;
bool mpls_enabled;
+ enum mlag_role role;
};
/* Structure for the zebra client. */
@@ -208,7 +216,7 @@ struct zclient {
vrf_bitmap_t redist[AFI_MAX][ZEBRA_ROUTE_MAX];
/* Redistribute defauilt. */
- vrf_bitmap_t default_information;
+ vrf_bitmap_t default_information[AFI_MAX];
/* Pointer to the callback functions. */
void (*zebra_connected)(struct zclient *);
@@ -221,7 +229,7 @@ struct zclient {
int (*interface_address_add)(int, struct zclient *, uint16_t, vrf_id_t);
int (*interface_address_delete)(int, struct zclient *, uint16_t,
vrf_id_t);
- int (*interface_link_params)(int, struct zclient *, uint16_t);
+ int (*interface_link_params)(int, struct zclient *, uint16_t, vrf_id_t);
int (*interface_bfd_dest_update)(int, struct zclient *, uint16_t,
vrf_id_t);
int (*interface_nbr_address_add)(int, struct zclient *, uint16_t,
@@ -298,6 +306,7 @@ struct zapi_nexthop {
enum nexthop_types_t type;
vrf_id_t vrf_id;
ifindex_t ifindex;
+ bool onlink;
union {
union g_addr gate;
enum blackhole_type bh_type;
@@ -418,6 +427,8 @@ enum zapi_iptable_notify_owner {
#define ZEBRA_MACIP_TYPE_ROUTER_FLAG 0x04 /* Router Flag - proxy NA */
#define ZEBRA_MACIP_TYPE_OVERRIDE_FLAG 0x08 /* Override Flag */
+enum zebra_neigh_state { ZEBRA_NEIGH_INACTIVE = 0, ZEBRA_NEIGH_ACTIVE = 1 };
+
struct zclient_options {
bool receive_notify;
};
@@ -471,13 +482,16 @@ extern int zebra_redistribute_send(int command, struct zclient *, afi_t,
int type, unsigned short instance,
vrf_id_t vrf_id);
+extern int zebra_redistribute_default_send(int command, struct zclient *zclient,
+ afi_t afi, vrf_id_t vrf_id);
+
/* If state has changed, update state and call zebra_redistribute_send. */
extern void zclient_redistribute(int command, struct zclient *, afi_t, int type,
unsigned short instance, vrf_id_t vrf_id);
/* If state has changed, update state and send the command to zebra. */
extern void zclient_redistribute_default(int command, struct zclient *,
- vrf_id_t vrf_id);
+ afi_t, vrf_id_t vrf_id);
/* Send the message in zclient->obuf to the zebra daemon (or enqueue it).
Returns 0 for success or -1 on an I/O error. */
@@ -553,7 +567,8 @@ extern struct interface *zebra_interface_vrf_update_read(struct stream *s,
extern void zebra_interface_if_set_value(struct stream *, struct interface *);
extern void zebra_router_id_update_read(struct stream *s, struct prefix *rid);
-extern struct interface *zebra_interface_link_params_read(struct stream *);
+extern struct interface *zebra_interface_link_params_read(struct stream *s,
+ vrf_id_t vrf_id);
extern size_t zebra_interface_link_params_write(struct stream *,
struct interface *);
extern int zclient_send_get_label_chunk(