diff options
Diffstat (limited to 'zebra/interface.h')
| -rw-r--r-- | zebra/interface.h | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/zebra/interface.h b/zebra/interface.h index 771398b547..4b06603e7f 100644 --- a/zebra/interface.h +++ b/zebra/interface.h @@ -81,6 +81,7 @@ struct rtadvconf { Default: false */ int AdvManagedFlag; + struct timeval lastadvmanagedflag; /* The true/false value to be placed in the "Other stateful @@ -89,6 +90,7 @@ struct rtadvconf { Default: false */ int AdvOtherConfigFlag; + struct timeval lastadvotherconfigflag; /* The value to be placed in MTU options sent by the router. A value of zero indicates that no MTU options are sent. @@ -105,6 +107,7 @@ struct rtadvconf { Default: 0 */ uint32_t AdvReachableTime; #define RTADV_MAX_REACHABLE_TIME 3600000 + struct timeval lastadvreachabletime; /* The value to be placed in the Retrans Timer field in the Router Advertisement messages sent by the router. The value zero means @@ -112,6 +115,7 @@ struct rtadvconf { Default: 0 */ int AdvRetransTimer; + struct timeval lastadvretranstimer; /* The default value to be placed in the Cur Hop Limit field in the Router Advertisement messages sent by the router. The value @@ -121,6 +125,8 @@ struct rtadvconf { Default: The value specified in the "Assigned Numbers" RFC [ASSIGNED] that was in effect at the time of implementation. */ int AdvCurHopLimit; + struct timeval lastadvcurhoplimit; + #define RTADV_DEFAULT_HOPLIMIT 64 /* 64 hops */ /* The value to be placed in the Router Lifetime field of Router @@ -302,14 +308,22 @@ enum zebra_if_flags { /* Dataplane protodown-on */ ZIF_FLAG_PROTODOWN = (1 << 2), + /* Dataplane protodown-on Queued to the dplane */ + ZIF_FLAG_SET_PROTODOWN = (1 << 3), + /* Dataplane protodown-off Queued to the dplane */ + ZIF_FLAG_UNSET_PROTODOWN = (1 << 4), /* LACP bypass state is set by the dataplane on a bond member * and inherited by the bond (if one or more bond members are in * a bypass state the bond is placed in a bypass state) */ - ZIF_FLAG_LACP_BYPASS = (1 << 3) + ZIF_FLAG_LACP_BYPASS = (1 << 5) }; +#define ZEBRA_IF_IS_PROTODOWN(zif) ((zif)->flags & ZIF_FLAG_PROTODOWN) +#define ZEBRA_IF_IS_PROTODOWN_ONLY_EXTERNAL(zif) \ + ((zif)->protodown_rc == ZEBRA_PROTODOWN_EXTERNAL) + /* `zebra' daemon local interface structure. */ struct zebra_if { /* back pointer to the interface */ @@ -323,6 +337,9 @@ struct zebra_if { /* Multicast configuration. */ uint8_t multicast; + /* MPLS status. */ + bool mpls; + /* Router advertise configuration. */ uint8_t rtadv_enable; @@ -394,7 +411,7 @@ struct zebra_if { * in the dataplane. This results in a carrier/L1 down on the * physical device. */ - enum protodown_reasons protodown_rc; + uint32_t protodown_rc; /* list of zebra_mac entries using this interface as destination */ struct list *mac_list; @@ -403,6 +420,7 @@ struct zebra_if { ifindex_t link_ifindex; struct interface *link; + uint8_t speed_update_count; struct thread *speed_update; /* @@ -476,7 +494,7 @@ extern void if_nbr_ipv6ll_to_ipv4ll_neigh_update(struct interface *ifp, extern void if_nbr_ipv6ll_to_ipv4ll_neigh_del_all(struct interface *ifp); extern void if_delete_update(struct interface *ifp); extern void if_add_update(struct interface *ifp); -extern void if_up(struct interface *); +extern void if_up(struct interface *ifp, bool install_connected); extern void if_down(struct interface *); extern void if_refresh(struct interface *); extern void if_flags_update(struct interface *, uint64_t); @@ -487,7 +505,16 @@ extern void if_handle_vrf_change(struct interface *ifp, vrf_id_t vrf_id); extern void zebra_if_update_link(struct interface *ifp, ifindex_t link_ifindex, ns_id_t ns_id); extern void zebra_if_update_all_links(struct zebra_ns *zns); -extern void zebra_if_set_protodown(struct interface *ifp, bool down); +/** + * Directly update entire protodown & reason code bitfield. + */ +extern int zebra_if_update_protodown_rc(struct interface *ifp, bool new_down, + uint32_t new_protodown_rc); +/** + * Set protodown with single reason. + */ +extern int zebra_if_set_protodown(struct interface *ifp, bool down, + enum protodown_reasons new_reason); extern int if_ip_address_install(struct interface *ifp, struct prefix *prefix, const char *label, struct prefix *pp); extern int if_ipv6_address_install(struct interface *ifp, struct prefix *prefix, @@ -511,9 +538,9 @@ extern bool if_nhg_dependents_is_empty(const struct interface *ifp); extern void vrf_add_update(struct vrf *vrfp); extern void zebra_l2_map_slave_to_bond(struct zebra_if *zif, vrf_id_t vrf); extern void zebra_l2_unmap_slave_from_bond(struct zebra_if *zif); -extern const char *zebra_protodown_rc_str(enum protodown_reasons protodown_rc, - char *pd_buf, uint32_t pd_buf_len); -void zebra_if_addr_update_ctx(struct zebra_dplane_ctx *ctx); +extern const char *zebra_protodown_rc_str(uint32_t protodown_rc, char *pd_buf, + uint32_t pd_buf_len); +void zebra_if_dplane_result(struct zebra_dplane_ctx *ctx); #ifdef HAVE_PROC_NET_DEV extern void ifstat_update_proc(void); |
