Changeset View
Changeset View
Standalone View
Standalone View
sys/net/route/route_var.h
Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | struct rib_head { | ||||
int rib_family; /* AF of the rtable */ | int rib_family; /* AF of the rtable */ | ||||
u_int rib_fibnum; /* fib number */ | u_int rib_fibnum; /* fib number */ | ||||
struct callout expire_callout; /* Callout for expiring dynamic routes */ | struct callout expire_callout; /* Callout for expiring dynamic routes */ | ||||
time_t next_expire; /* Next expire run ts */ | time_t next_expire; /* Next expire run ts */ | ||||
uint32_t rnh_prefixes; /* Number of prefixes */ | uint32_t rnh_prefixes; /* Number of prefixes */ | ||||
rt_gen_t rnh_gen_rib; /* fib algo: rib generation counter */ | rt_gen_t rnh_gen_rib; /* fib algo: rib generation counter */ | ||||
uint32_t rib_dying:1; /* rib is detaching */ | uint32_t rib_dying:1; /* rib is detaching */ | ||||
uint32_t rib_algo_fixed:1;/* fixed algorithm */ | uint32_t rib_algo_fixed:1;/* fixed algorithm */ | ||||
uint32_t rib_algo_init:1;/* algo init done */ | |||||
struct nh_control *nh_control; /* nexthop subsystem data */ | struct nh_control *nh_control; /* nexthop subsystem data */ | ||||
CK_STAILQ_HEAD(, rib_subscription) rnh_subscribers;/* notification subscribers */ | CK_STAILQ_HEAD(, rib_subscription) rnh_subscribers;/* notification subscribers */ | ||||
}; | }; | ||||
#define RIB_RLOCK_TRACKER struct rm_priotracker _rib_tracker | #define RIB_RLOCK_TRACKER struct rm_priotracker _rib_tracker | ||||
#define RIB_LOCK_INIT(rh) rm_init(&(rh)->rib_lock, "rib head lock") | #define RIB_LOCK_INIT(rh) rm_init(&(rh)->rib_lock, "rib head lock") | ||||
#define RIB_LOCK_DESTROY(rh) rm_destroy(&(rh)->rib_lock) | #define RIB_LOCK_DESTROY(rh) rm_destroy(&(rh)->rib_lock) | ||||
#define RIB_RLOCK(rh) rm_rlock(&(rh)->rib_lock, &_rib_tracker) | #define RIB_RLOCK(rh) rm_rlock(&(rh)->rib_lock, &_rib_tracker) | ||||
▲ Show 20 Lines • Show All 236 Lines • ▼ Show 20 Lines | |||||
int rtsock_routemsg(int cmd, struct rtentry *rt, struct nhop_object *nh, | int rtsock_routemsg(int cmd, struct rtentry *rt, struct nhop_object *nh, | ||||
int fibnum); | int fibnum); | ||||
int rtsock_routemsg_info(int cmd, struct rt_addrinfo *info, int fibnum); | int rtsock_routemsg_info(int cmd, struct rt_addrinfo *info, int fibnum); | ||||
int rtsock_addrmsg(int cmd, struct ifaddr *ifa, int fibnum); | int rtsock_addrmsg(int cmd, struct ifaddr *ifa, int fibnum); | ||||
/* lookup_framework.c */ | /* lookup_framework.c */ | ||||
void fib_grow_rtables(uint32_t new_num_tables); | void fib_grow_rtables(uint32_t new_num_tables); | ||||
int fib_select_algo_initial(struct rib_head *rh); | void fib_setup_family(int family, uint32_t num_tables); | ||||
void fib_destroy_rib(struct rib_head *rh); | void fib_destroy_rib(struct rib_head *rh); | ||||
void vnet_fib_init(void); | void vnet_fib_init(void); | ||||
void vnet_fib_destroy(void); | void vnet_fib_destroy(void); | ||||
/* Entropy data used for outbound hashing */ | /* Entropy data used for outbound hashing */ | ||||
#define MPATH_ENTROPY_KEY_LEN 40 | #define MPATH_ENTROPY_KEY_LEN 40 | ||||
extern uint8_t mpath_entropy_key[MPATH_ENTROPY_KEY_LEN]; | extern uint8_t mpath_entropy_key[MPATH_ENTROPY_KEY_LEN]; | ||||
#endif | #endif |