diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/command.c | 62 | ||||
| -rw-r--r-- | lib/filter.c | 4 | ||||
| -rw-r--r-- | lib/frr_pthread.c | 8 | ||||
| -rw-r--r-- | lib/graph.c | 2 | ||||
| -rw-r--r-- | lib/hash.c | 2 | ||||
| -rw-r--r-- | lib/if.h | 9 | ||||
| -rw-r--r-- | lib/if_rmap.c | 2 | ||||
| -rw-r--r-- | lib/keychain.c | 2 | ||||
| -rw-r--r-- | lib/md5.c | 9 | ||||
| -rw-r--r-- | lib/plist.c | 4 | ||||
| -rw-r--r-- | lib/prefix.c | 4 | ||||
| -rw-r--r-- | lib/skiplist.c | 2 | ||||
| -rw-r--r-- | lib/thread.c | 2 | ||||
| -rw-r--r-- | lib/vrf.c | 9 | ||||
| -rw-r--r-- | lib/vrf.h | 3 | ||||
| -rw-r--r-- | lib/vty.c | 100 | ||||
| -rw-r--r-- | lib/yang.c | 23 | ||||
| -rw-r--r-- | lib/zclient.c | 39 | ||||
| -rw-r--r-- | lib/zclient.h | 7 |
19 files changed, 99 insertions, 194 deletions
diff --git a/lib/command.c b/lib/command.c index d1dafa3a1a..06879f6854 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1535,67 +1535,11 @@ DEFUN (config_end, "end", "End current mode and change to enable mode.\n") { - switch (vty->node) { - case VIEW_NODE: - case ENABLE_NODE: - /* Nothing to do. */ - break; - case CONFIG_NODE: - case INTERFACE_NODE: - case PW_NODE: - case LOGICALROUTER_NODE: - case VRF_NODE: - case NH_GROUP_NODE: - case ZEBRA_NODE: - case RIP_NODE: - case RIPNG_NODE: - case EIGRP_NODE: - case BABEL_NODE: - case BGP_NODE: - case BGP_VRF_POLICY_NODE: - case BGP_VNC_DEFAULTS_NODE: - case BGP_VNC_NVE_GROUP_NODE: - case BGP_VNC_L2_GROUP_NODE: - case BGP_VPNV4_NODE: - case BGP_VPNV6_NODE: - case BGP_FLOWSPECV4_NODE: - case BGP_FLOWSPECV6_NODE: - case BGP_IPV4_NODE: - case BGP_IPV4M_NODE: - case BGP_IPV4L_NODE: - case BGP_IPV6_NODE: - case BGP_IPV6M_NODE: - case BGP_EVPN_NODE: - case BGP_EVPN_VNI_NODE: - case BGP_IPV6L_NODE: - case RMAP_NODE: - case PBRMAP_NODE: - case OSPF_NODE: - case OSPF6_NODE: - case LDP_NODE: - case LDP_IPV4_NODE: - case LDP_IPV6_NODE: - case LDP_IPV4_IFACE_NODE: - case LDP_IPV6_IFACE_NODE: - case LDP_L2VPN_NODE: - case LDP_PSEUDOWIRE_NODE: - case ISIS_NODE: - case OPENFABRIC_NODE: - case KEYCHAIN_NODE: - case KEYCHAIN_KEY_NODE: - case VTY_NODE: - case LINK_PARAMS_NODE: - case BFD_NODE: - case BFD_PEER_NODE: + if (vty->config) { vty_config_exit(vty); vty->node = ENABLE_NODE; - break; - default: - break; } - vty->xpath_index = 0; - return CMD_SUCCESS; } @@ -2571,8 +2515,6 @@ DEFUN (config_log_syslog, { int idx_log_levels = 2; - disable_log_file(); - if (argc == 3) { int level; if ((level = level_match(argv[idx_log_levels]->arg)) @@ -2939,7 +2881,7 @@ void cmd_init(int terminal) #endif } -void cmd_terminate() +void cmd_terminate(void) { struct cmd_node *cmd_node; diff --git a/lib/filter.c b/lib/filter.c index 1aae58b61c..317c1b68b7 100644 --- a/lib/filter.c +++ b/lib/filter.c @@ -2212,14 +2212,14 @@ static void access_list_init_ipv6(void) install_element(CONFIG_NODE, &no_ipv6_access_list_remark_comment_cmd); } -void access_list_init() +void access_list_init(void) { access_list_init_ipv4(); access_list_init_ipv6(); access_list_init_mac(); } -void access_list_reset() +void access_list_reset(void) { access_list_reset_ipv4(); access_list_reset_ipv6(); diff --git a/lib/frr_pthread.c b/lib/frr_pthread.c index d5a2007c4d..fe18eb1051 100644 --- a/lib/frr_pthread.c +++ b/lib/frr_pthread.c @@ -47,7 +47,7 @@ static struct list *frr_pthread_list; /* ------------------------------------------------------------------------ */ -void frr_pthread_init() +void frr_pthread_init(void) { pthread_mutex_lock(&frr_pthread_list_mtx); { @@ -57,7 +57,7 @@ void frr_pthread_init() pthread_mutex_unlock(&frr_pthread_list_mtx); } -void frr_pthread_finish() +void frr_pthread_finish(void) { pthread_mutex_lock(&frr_pthread_list_mtx); { @@ -124,7 +124,7 @@ int frr_pthread_set_name(struct frr_pthread *fpt) #ifdef HAVE_PTHREAD_SETNAME_NP # ifdef GNU_LINUX ret = pthread_setname_np(fpt->thread, fpt->os_name); -# else /* NetBSD */ +# elif defined(__NetBSD__) ret = pthread_setname_np(fpt->thread, fpt->os_name, NULL); # endif #elif defined(HAVE_PTHREAD_SET_NAME_NP) @@ -178,7 +178,7 @@ int frr_pthread_stop(struct frr_pthread *fpt, void **result) return ret; } -void frr_pthread_stop_all() +void frr_pthread_stop_all(void) { pthread_mutex_lock(&frr_pthread_list_mtx); { diff --git a/lib/graph.c b/lib/graph.c index 4bc3eb82b8..128e45c570 100644 --- a/lib/graph.c +++ b/lib/graph.c @@ -27,7 +27,7 @@ DEFINE_MTYPE_STATIC(LIB, GRAPH, "Graph") DEFINE_MTYPE_STATIC(LIB, GRAPH_NODE, "Graph Node") -struct graph *graph_new() +struct graph *graph_new(void) { struct graph *graph = XCALLOC(MTYPE_GRAPH, sizeof(struct graph)); graph->nodes = vector_init(VECTOR_MIN_SIZE); diff --git a/lib/hash.c b/lib/hash.c index 641c751368..6c3c953e97 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -445,7 +445,7 @@ DEFUN_NOSH(show_hash_stats, return CMD_SUCCESS; } -void hash_cmd_init() +void hash_cmd_init(void) { install_element(ENABLE_NODE, &show_hash_stats_cmd); } @@ -341,6 +341,8 @@ DECLARE_QOBJ_TYPE(interface) DECLARE_HOOK(if_add, (struct interface * ifp), (ifp)) DECLARE_KOOH(if_del, (struct interface * ifp), (ifp)) +#define METRIC_MAX (~0) + /* Connected address structure. */ struct connected { /* Attached interface. */ @@ -388,6 +390,13 @@ struct connected { /* Label for Linux 2.2.X and upper. */ char *label; + + /* + * Used for setting the connected route's cost. If the metric + * here is set to METRIC_MAX the connected route falls back to + * "struct interface" + */ + uint32_t metric; }; /* Nbr Connected address structure. */ diff --git a/lib/if_rmap.c b/lib/if_rmap.c index 108ab7ec6b..69da695dcb 100644 --- a/lib/if_rmap.c +++ b/lib/if_rmap.c @@ -287,7 +287,7 @@ int config_write_if_rmap(struct vty *vty) return write; } -void if_rmap_reset() +void if_rmap_reset(void) { hash_clean(ifrmaphash, (void (*)(void *))if_rmap_free); } diff --git a/lib/keychain.c b/lib/keychain.c index 601b44a4f1..9aa3ef695f 100644 --- a/lib/keychain.c +++ b/lib/keychain.c @@ -1040,7 +1040,7 @@ static int keychain_config_write(struct vty *vty) return 0; } -void keychain_init() +void keychain_init(void) { keychain_list = list_new(); @@ -375,13 +375,8 @@ static void md5_calc(const uint8_t *b64, md5_ctxt *ctxt) } /* From RFC 2104 */ -void hmac_md5(text, text_len, key, key_len, - digest) unsigned char *text; /* pointer to data stream */ -int text_len; /* length of data stream */ -unsigned char *key; /* pointer to authentication key */ -int key_len; /* length of authentication key */ -uint8_t *digest; /* caller digest to be filled in */ - +void hmac_md5(unsigned char *text, int text_len, unsigned char *key, + int key_len, uint8_t *digest) { MD5_CTX context; unsigned char k_ipad[65]; /* inner padding - diff --git a/lib/plist.c b/lib/plist.c index ee68fbc0f1..41c8e4f8c0 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -2111,7 +2111,7 @@ static void prefix_list_init_ipv6(void) install_element(ENABLE_NODE, &clear_ipv6_prefix_list_cmd); } -void prefix_list_init() +void prefix_list_init(void) { cmd_variable_handler_register(plist_var_handlers); @@ -2119,7 +2119,7 @@ void prefix_list_init() prefix_list_init_ipv6(); } -void prefix_list_reset() +void prefix_list_reset(void) { prefix_list_reset_afi(AFI_IP, 0); prefix_list_reset_afi(AFI_IP6, 0); diff --git a/lib/prefix.c b/lib/prefix.c index 0203301562..07eb1785b7 100644 --- a/lib/prefix.c +++ b/lib/prefix.c @@ -820,7 +820,7 @@ const char *prefix_family_str(const struct prefix *p) } /* Allocate new prefix_ipv4 structure. */ -struct prefix_ipv4 *prefix_ipv4_new() +struct prefix_ipv4 *prefix_ipv4_new(void) { struct prefix_ipv4 *p; @@ -1359,7 +1359,7 @@ const char *prefix2str(union prefixconstptr pu, char *str, int size) return str; } -struct prefix *prefix_new() +struct prefix *prefix_new(void) { struct prefix *p; diff --git a/lib/skiplist.c b/lib/skiplist.c index 3933429c3b..dda442580a 100644 --- a/lib/skiplist.c +++ b/lib/skiplist.c @@ -88,7 +88,7 @@ static struct skiplist *skiplist_last_created; /* debugging hack */ #endif -static int randomLevel() +static int randomLevel(void) { register int level = 0; register int b; diff --git a/lib/thread.c b/lib/thread.c index 867ca2dc60..ae8e375a27 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -400,7 +400,7 @@ static void cancelreq_del(void *cr) } /* initializer, only ever called once */ -static void initializer() +static void initializer(void) { pthread_key_create(&thread_current, NULL); } @@ -716,13 +716,6 @@ int vrf_netns_handler_create(struct vty *vty, struct vrf *vrf, char *pathname, return CMD_SUCCESS; } -int vrf_is_mapped_on_netns(struct vrf *vrf) -{ - if (!vrf || vrf->data.l.netns_name[0] == '\0') - return 0; - return 1; -} - /* vrf CLI commands */ DEFUN_NOSH(vrf_exit, vrf_exit_cmd, @@ -953,7 +946,7 @@ int vrf_bind(vrf_id_t vrf_id, int fd, char *name) if (fd < 0 || name == NULL) return fd; - if (vrf_is_mapped_on_netns(vrf_lookup_by_id(vrf_id))) + if (vrf_is_backend_netns()) return fd; #ifdef SO_BINDTODEVICE ret = setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, name, strlen(name)+1); @@ -240,9 +240,6 @@ extern void vrf_set_default_name(const char *default_name, bool force); extern const char *vrf_get_default_name(void); #define VRF_DEFAULT_NAME vrf_get_default_name() -/* VRF is mapped on netns or not ? */ -int vrf_is_mapped_on_netns(struct vrf *vrf); - /* VRF switch from NETNS */ extern int vrf_switch_to_netns(vrf_id_t vrf_id); extern int vrf_switchback_to_initial(void); @@ -775,61 +775,11 @@ static void vty_end_config(struct vty *vty) { vty_out(vty, "\n"); - switch (vty->node) { - case VIEW_NODE: - case ENABLE_NODE: - /* Nothing to do. */ - break; - case CONFIG_NODE: - case INTERFACE_NODE: - case PW_NODE: - case ZEBRA_NODE: - case RIP_NODE: - case RIPNG_NODE: - case EIGRP_NODE: - case BGP_NODE: - case BGP_VPNV4_NODE: - case BGP_VPNV6_NODE: - case BGP_VRF_POLICY_NODE: - case BGP_VNC_DEFAULTS_NODE: - case BGP_VNC_NVE_GROUP_NODE: - case BGP_VNC_L2_GROUP_NODE: - case BGP_IPV4_NODE: - case BGP_IPV4M_NODE: - case BGP_IPV4L_NODE: - case BGP_IPV6_NODE: - case BGP_IPV6M_NODE: - case BGP_EVPN_NODE: - case BGP_IPV6L_NODE: - case RMAP_NODE: - case PBRMAP_NODE: - case OSPF_NODE: - case OSPF6_NODE: - case LDP_NODE: - case LDP_IPV4_NODE: - case LDP_IPV6_NODE: - case LDP_IPV4_IFACE_NODE: - case LDP_IPV6_IFACE_NODE: - case LDP_L2VPN_NODE: - case LDP_PSEUDOWIRE_NODE: - case ISIS_NODE: - case OPENFABRIC_NODE: - case KEYCHAIN_NODE: - case KEYCHAIN_KEY_NODE: - case VTY_NODE: - case BGP_EVPN_VNI_NODE: - case BFD_NODE: - case BFD_PEER_NODE: + if (vty->config) { vty_config_exit(vty); vty->node = ENABLE_NODE; - break; - default: - /* Unknown node, we have to ignore it. */ - break; } - vty->xpath_index = 0; - vty_prompt(vty); vty->cp = 0; } @@ -1190,44 +1140,11 @@ static void vty_stop_input(struct vty *vty) vty_clear_buf(vty); vty_out(vty, "\n"); - switch (vty->node) { - case VIEW_NODE: - case ENABLE_NODE: - /* Nothing to do. */ - break; - case CONFIG_NODE: - case INTERFACE_NODE: - case PW_NODE: - case ZEBRA_NODE: - case RIP_NODE: - case RIPNG_NODE: - case EIGRP_NODE: - case BGP_NODE: - case RMAP_NODE: - case PBRMAP_NODE: - case OSPF_NODE: - case OSPF6_NODE: - case LDP_NODE: - case LDP_IPV4_NODE: - case LDP_IPV6_NODE: - case LDP_IPV4_IFACE_NODE: - case LDP_IPV6_IFACE_NODE: - case LDP_L2VPN_NODE: - case LDP_PSEUDOWIRE_NODE: - case ISIS_NODE: - case OPENFABRIC_NODE: - case KEYCHAIN_NODE: - case KEYCHAIN_KEY_NODE: - case VTY_NODE: - case BFD_NODE: - case BFD_PEER_NODE: + if (vty->config) { vty_config_exit(vty); vty->node = ENABLE_NODE; - break; - default: - /* Unknown node, we have to ignore it. */ - break; } + vty_prompt(vty); /* Set history pointer to the latest one. */ @@ -1688,7 +1605,7 @@ static int vty_flush(struct thread *thread) } /* Allocate new vty struct. */ -struct vty *vty_new() +struct vty *vty_new(void) { struct vty *new = XCALLOC(MTYPE_VTY, sizeof(struct vty)); @@ -2696,6 +2613,7 @@ int vty_config_enter(struct vty *vty, bool private_config, bool exclusive) vty->node = CONFIG_NODE; vty->config = true; vty->private_config = private_config; + vty->xpath_index = 0; if (private_config) { vty->candidate_config = nb_config_dup(running_config); @@ -2733,6 +2651,8 @@ void vty_config_exit(struct vty *vty) nb_config_free(vty->candidate_config_base); vty->candidate_config_base = NULL; } + + vty->config = false; } int vty_config_exclusive_lock(struct vty *vty) @@ -3115,7 +3035,7 @@ struct cmd_node vty_node = { }; /* Reset all VTY status. */ -void vty_reset() +void vty_reset(void) { unsigned int i; struct vty *vty; @@ -3180,7 +3100,7 @@ static void vty_save_cwd(void) strcpy(vty_cwd, cwd); } -char *vty_get_cwd() +char *vty_get_cwd(void) { return vty_cwd; } @@ -3195,7 +3115,7 @@ int vty_shell_serv(struct vty *vty) return vty->type == VTY_SHELL_SERV ? 1 : 0; } -void vty_init_vtysh() +void vty_init_vtysh(void) { vtyvec = vector_init(VECTOR_MIN_SIZE); } diff --git a/lib/yang.c b/lib/yang.c index 71b41c35d8..f62a8163f9 100644 --- a/lib/yang.c +++ b/lib/yang.c @@ -26,6 +26,8 @@ #include "yang_translator.h" #include "northbound.h" +#include <libyang/user_types.h> + DEFINE_MTYPE(LIB, YANG_MODULE, "YANG module") DEFINE_MTYPE(LIB, YANG_DATA, "YANG data structure") @@ -639,8 +641,18 @@ static void ly_log_cb(LY_LOG_LEVEL level, const char *msg, const char *path) zlog(priority, "libyang: %s", msg); } +#if CONFDATE > 20190401 +CPP_NOTICE("lib/yang: time to remove non-LIBYANG_EXT_BUILTIN support") +#endif + +#ifdef LIBYANG_EXT_BUILTIN +extern struct lytype_plugin_list frr_user_types[]; +#endif + void yang_init(void) { +#ifndef LIBYANG_EXT_BUILTIN +CPP_NOTICE("lib/yang: deprecated libyang <0.16.74 extension loading in use!") static char ly_plugin_dir[PATH_MAX]; const char *const *ly_loaded_plugins; const char *ly_plugin; @@ -650,11 +662,20 @@ void yang_init(void) snprintf(ly_plugin_dir, sizeof(ly_plugin_dir), "%s=%s", "LIBYANG_USER_TYPES_PLUGINS_DIR", LIBYANG_PLUGINS_PATH); putenv(ly_plugin_dir); +#endif /* Initialize libyang global parameters that affect all containers. */ ly_set_log_clb(ly_log_cb, 1); ly_log_options(LY_LOLOG | LY_LOSTORE); +#ifdef LIBYANG_EXT_BUILTIN + if (ly_register_types(frr_user_types, "frr_user_types")) { + flog_err(EC_LIB_LIBYANG_PLUGIN_LOAD, + "ly_register_types() failed"); + exit(1); + } +#endif + /* Initialize libyang container for native models. */ ly_native_ctx = ly_ctx_new(YANG_MODELS_PATH, LY_CTX_DISABLE_SEARCHDIR_CWD); @@ -665,6 +686,7 @@ void yang_init(void) ly_ctx_set_module_imp_clb(ly_native_ctx, yang_module_imp_clb, NULL); ly_ctx_set_priv_dup_clb(ly_native_ctx, ly_dup_cb); +#ifndef LIBYANG_EXT_BUILTIN /* Detect if the required libyang plugin(s) were loaded successfully. */ ly_loaded_plugins = ly_get_loaded_plugins(); for (size_t i = 0; (ly_plugin = ly_loaded_plugins[i]); i++) { @@ -678,6 +700,7 @@ void yang_init(void) "%s: failed to load frr_user_types.so", __func__); exit(1); } +#endif yang_translator_init(); } diff --git a/lib/zclient.c b/lib/zclient.c index cc936d47d7..0e58d97174 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -457,8 +457,7 @@ void zclient_send_reg_requests(struct zclient *zclient, vrf_id_t vrf_id) vrf_id); /* If default information is needed. */ - if (vrf_bitmap_check(zclient->default_information[afi], - VRF_DEFAULT)) + if (vrf_bitmap_check(zclient->default_information[afi], vrf_id)) zebra_redistribute_default_send( ZEBRA_REDISTRIBUTE_DEFAULT_ADD, zclient, afi, vrf_id); @@ -525,8 +524,7 @@ void zclient_send_dereg_requests(struct zclient *zclient, vrf_id_t vrf_id) i, 0, vrf_id); /* If default information is needed. */ - if (vrf_bitmap_check(zclient->default_information[afi], - VRF_DEFAULT)) + if (vrf_bitmap_check(zclient->default_information[afi], vrf_id)) zebra_redistribute_default_send( ZEBRA_REDISTRIBUTE_DEFAULT_DELETE, zclient, afi, vrf_id); @@ -756,10 +754,24 @@ int zapi_route_encode(uint8_t cmd, struct stream *s, struct zapi_route *api) stream_reset(s); zclient_create_header(s, cmd, api->vrf_id); + if (api->type >= ZEBRA_ROUTE_MAX) { + flog_err(EC_LIB_ZAPI_ENCODE, + "%s: Specified route type (%u) is not a legal value\n", + __PRETTY_FUNCTION__, api->type); + return -1; + } stream_putc(s, api->type); + stream_putw(s, api->instance); stream_putl(s, api->flags); stream_putc(s, api->message); + + if (api->safi < SAFI_UNICAST || api->safi >= SAFI_MAX) { + flog_err(EC_LIB_ZAPI_ENCODE, + "%s: Specified route SAFI (%u) is not a legal value\n", + __PRETTY_FUNCTION__, api->safi); + return -1; + } stream_putc(s, api->safi); /* Put prefix information. */ @@ -875,7 +887,7 @@ int zapi_route_decode(struct stream *s, struct zapi_route *api) /* Type, flags, message. */ STREAM_GETC(s, api->type); - if (api->type > ZEBRA_ROUTE_MAX) { + if (api->type >= ZEBRA_ROUTE_MAX) { flog_err(EC_LIB_ZAPI_ENCODE, "%s: Specified route type: %d is not a legal value\n", __PRETTY_FUNCTION__, api->type); @@ -886,6 +898,12 @@ int zapi_route_decode(struct stream *s, struct zapi_route *api) STREAM_GETL(s, api->flags); STREAM_GETC(s, api->message); STREAM_GETC(s, api->safi); + if (api->safi < SAFI_UNICAST || api->safi >= SAFI_MAX) { + flog_err(EC_LIB_ZAPI_ENCODE, + "%s: Specified route SAFI (%u) is not a legal value\n", + __PRETTY_FUNCTION__, api->safi); + return -1; + } /* Prefix. */ STREAM_GETC(s, api->prefix.family); @@ -1497,7 +1515,8 @@ static void link_params_set_value(struct stream *s, struct if_link_params *iflp) iflp->use_bw = stream_getf(s); } -struct interface *zebra_interface_link_params_read(struct stream *s) +struct interface *zebra_interface_link_params_read(struct stream *s, + vrf_id_t vrf_id) { struct if_link_params *iflp; ifindex_t ifindex; @@ -1506,7 +1525,7 @@ struct interface *zebra_interface_link_params_read(struct stream *s) ifindex = stream_getl(s); - struct interface *ifp = if_lookup_by_index(ifindex, VRF_DEFAULT); + struct interface *ifp = if_lookup_by_index(ifindex, vrf_id); if (ifp == NULL) { flog_err(EC_LIB_ZAPI_ENCODE, @@ -2372,8 +2391,12 @@ static void zclient_capability_decode(int command, struct zclient *zclient, { struct zclient_capabilities cap; struct stream *s = zclient->ibuf; + int vrf_backend; uint8_t mpls_enabled; + STREAM_GETL(s, vrf_backend); + vrf_configure_backend(vrf_backend); + memset(&cap, 0, sizeof(cap)); STREAM_GETC(s, mpls_enabled); cap.mpls_enabled = !!mpls_enabled; @@ -2583,7 +2606,7 @@ static int zclient_read(struct thread *thread) case ZEBRA_INTERFACE_LINK_PARAMS: if (zclient->interface_link_params) (*zclient->interface_link_params)(command, zclient, - length); + length, vrf_id); break; case ZEBRA_FEC_UPDATE: if (zclient_debug) diff --git a/lib/zclient.h b/lib/zclient.h index 401d6c400a..8a3423cdd8 100644 --- a/lib/zclient.h +++ b/lib/zclient.h @@ -229,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, @@ -426,6 +426,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; }; @@ -564,7 +566,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( |
