]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/zclient.h
zebra, lib: fix the ZEBRA_INTERFACE_VRF_UPDATE zapi message
[mirror_frr.git] / lib / zclient.h
index 49419b3df33921eb225d375c1205789e9f520333..8fe711f31044f24fe8126b247c143056031709c5 100644 (file)
 #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;
 
@@ -73,10 +77,6 @@ typedef enum {
        ZEBRA_ROUTE_ADD,
        ZEBRA_ROUTE_DELETE,
        ZEBRA_ROUTE_NOTIFY_OWNER,
-       ZEBRA_IPV4_ROUTE_ADD,
-       ZEBRA_IPV4_ROUTE_DELETE,
-       ZEBRA_IPV6_ROUTE_ADD,
-       ZEBRA_IPV6_ROUTE_DELETE,
        ZEBRA_REDISTRIBUTE_ADD,
        ZEBRA_REDISTRIBUTE_DELETE,
        ZEBRA_REDISTRIBUTE_DEFAULT_ADD,
@@ -95,7 +95,6 @@ typedef enum {
        ZEBRA_IMPORT_ROUTE_REGISTER,
        ZEBRA_IMPORT_ROUTE_UNREGISTER,
        ZEBRA_IMPORT_CHECK_UPDATE,
-       ZEBRA_IPV4_ROUTE_IPV6_NEXTHOP_ADD,
        ZEBRA_BFD_DEST_REGISTER,
        ZEBRA_BFD_DEST_DEREGISTER,
        ZEBRA_BFD_DEST_UPDATE,
@@ -108,6 +107,7 @@ typedef enum {
        ZEBRA_VRF_LABEL,
        ZEBRA_INTERFACE_VRF_UPDATE,
        ZEBRA_BFD_CLIENT_REGISTER,
+       ZEBRA_BFD_CLIENT_DEREGISTER,
        ZEBRA_INTERFACE_ENABLE_RADV,
        ZEBRA_INTERFACE_DISABLE_RADV,
        ZEBRA_IPV4_NEXTHOP_LOOKUP_MRIB,
@@ -116,6 +116,7 @@ typedef enum {
        ZEBRA_MPLS_LABELS_DELETE,
        ZEBRA_IPMR_ROUTE_STATS,
        ZEBRA_LABEL_MANAGER_CONNECT,
+       ZEBRA_LABEL_MANAGER_CONNECT_ASYNC,
        ZEBRA_GET_LABEL_CHUNK,
        ZEBRA_RELEASE_LABEL_CHUNK,
        ZEBRA_FEC_REGISTER,
@@ -138,6 +139,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,
@@ -158,6 +160,7 @@ typedef enum {
        ZEBRA_IPTABLE_ADD,
        ZEBRA_IPTABLE_DELETE,
        ZEBRA_IPTABLE_NOTIFY_OWNER,
+       ZEBRA_VXLAN_FLOOD_CONTROL,
 } zebra_message_types_t;
 
 struct redist_proto {
@@ -285,7 +288,7 @@ struct zclient {
  */
 #define ZAPI_MESSAGE_TABLEID  0x80
 
-#define ZSERV_VERSION 5
+#define ZSERV_VERSION 6
 /* Zserv protocol message header */
 struct zmsghdr {
        uint16_t length;
@@ -352,37 +355,6 @@ struct zapi_route {
        uint32_t tableid;
 };
 
-/* Zebra IPv4 route message API. */
-struct zapi_ipv4 {
-       uint8_t type;
-       unsigned short instance;
-
-       uint32_t flags;
-
-       uint8_t message;
-
-       safi_t safi;
-
-       uint8_t nexthop_num;
-       struct in_addr **nexthop;
-
-       uint8_t ifindex_num;
-       ifindex_t *ifindex;
-
-       uint8_t label_num;
-       unsigned int *label;
-
-       uint8_t distance;
-
-       uint32_t metric;
-
-       route_tag_t tag;
-
-       uint32_t mtu;
-
-       vrf_id_t vrf_id;
-};
-
 struct zapi_pw {
        char ifname[IF_NAMESIZE];
        ifindex_t ifindex;
@@ -455,23 +427,10 @@ struct zclient_options {
        bool receive_notify;
 };
 
-/* Prototypes of zebra client service functions. */
-extern struct zclient *zclient_new(struct thread_master *);
-
-/* clang-format off */
-#if CONFDATE > 20181101
-CPP_NOTICE("zclient_new_notify can take over or zclient_new now");
-#endif
-/* clang-format on */
-
 extern struct zclient_options zclient_options_default;
 
-extern struct zclient *zclient_new_notify(struct thread_master *m,
-                                         struct zclient_options *opt);
-
-#define zclient_new(A)                                                         \
-       zclient_new_notify((A), &zclient_options_default);                     \
-       CPP_WARN("Please transition to using zclient_new_notify");
+extern struct zclient *zclient_new(struct thread_master *m,
+                                  struct zclient_options *opt);
 
 extern void zclient_init(struct zclient *, int, unsigned short,
                         struct zebra_privs_t *privs);
@@ -599,15 +558,6 @@ 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);
 
-/* clang-format off */
-#if CONFDATE > 20180823
-CPP_NOTICE("zapi_ipv4_route, zapi_ipv6_route, zapi_ipv4_route_ipv6_nexthop as well as the zapi_ipv4 and zapi_ipv6 data structures should be removed now");
-#endif
-/* clang-format on */
-
-extern int zapi_ipv4_route(uint8_t, struct zclient *, struct prefix_ipv4 *,
-                          struct zapi_ipv4 *) __attribute__((deprecated));
-
 extern struct interface *zebra_interface_link_params_read(struct stream *);
 extern size_t zebra_interface_link_params_write(struct stream *,
                                                struct interface *);
@@ -616,7 +566,7 @@ extern int zclient_send_get_label_chunk(
        uint8_t         keep,
        uint32_t        chunk_size);
 
-extern int lm_label_manager_connect(struct zclient *zclient);
+extern int lm_label_manager_connect(struct zclient *zclient, int async);
 extern int lm_get_label_chunk(struct zclient *zclient, uint8_t keep,
                              uint32_t chunk_size, uint32_t *start,
                              uint32_t *end);
@@ -634,45 +584,6 @@ extern void zebra_read_pw_status_update(int command, struct zclient *zclient,
                                        zebra_size_t length, vrf_id_t vrf_id,
                                        struct zapi_pw_status *pw);
 
-/* IPv6 prefix add and delete function prototype. */
-
-struct zapi_ipv6 {
-       uint8_t type;
-       unsigned short instance;
-
-       uint32_t flags;
-
-       uint8_t message;
-
-       safi_t safi;
-
-       uint8_t nexthop_num;
-       struct in6_addr **nexthop;
-
-       uint8_t ifindex_num;
-       ifindex_t *ifindex;
-
-       uint8_t label_num;
-       unsigned int *label;
-
-       uint8_t distance;
-
-       uint32_t metric;
-
-       route_tag_t tag;
-
-       uint32_t mtu;
-
-       vrf_id_t vrf_id;
-};
-
-extern int zapi_ipv6_route(uint8_t cmd, struct zclient *zclient,
-                          struct prefix_ipv6 *p, struct prefix_ipv6 *src_p,
-                          struct zapi_ipv6 *api) __attribute__((deprecated));
-extern int zapi_ipv4_route_ipv6_nexthop(uint8_t, struct zclient *,
-                                       struct prefix_ipv4 *,
-                                       struct zapi_ipv6 *)
-       __attribute__((deprecated));
 extern int zclient_route_send(uint8_t, struct zclient *, struct zapi_route *);
 extern int zclient_send_rnh(struct zclient *zclient, int command,
                            struct prefix *p, bool exact_match,