Changeset View
Changeset View
Standalone View
Standalone View
sys/net/route.h
Show First 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | |||||
#define RT_ALL_FIBS -1 /* Announce event for every fib */ | #define RT_ALL_FIBS -1 /* Announce event for every fib */ | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
VNET_DECLARE(uint32_t, _rt_numfibs); /* number of existing route tables */ | VNET_DECLARE(uint32_t, _rt_numfibs); /* number of existing route tables */ | ||||
#define V_rt_numfibs VNET(_rt_numfibs) | #define V_rt_numfibs VNET(_rt_numfibs) | ||||
/* temporary compat arg */ | /* temporary compat arg */ | ||||
#define rt_numfibs V_rt_numfibs | #define rt_numfibs V_rt_numfibs | ||||
VNET_DECLARE(u_int, rt_add_addr_allfibs); /* Announce interfaces to all fibs */ | VNET_DECLARE(u_int, rt_add_addr_allfibs); /* Announce interfaces to all fibs */ | ||||
#define V_rt_add_addr_allfibs VNET(rt_add_addr_allfibs) | #define V_rt_add_addr_allfibs VNET(rt_add_addr_allfibs) | ||||
/* Calculate flowid for locally-originated packets */ | |||||
#define V_fib_hash_outbound VNET(fib_hash_outbound) | |||||
VNET_DECLARE(u_int, fib_hash_outbound); | |||||
#endif | #endif | ||||
/* | /* | ||||
* We distinguish between routes to hosts and routes to networks, | * We distinguish between routes to hosts and routes to networks, | ||||
* preferring the former if available. For each route we infer | * preferring the former if available. For each route we infer | ||||
ae: I think it would be better to name these all with upper case, to have understanding from the… | |||||
* the interface to use from the gateway address supplied when | * the interface to use from the gateway address supplied when | ||||
* the route was entered. Routes that forward packets through | * the route was entered. Routes that forward packets through | ||||
* gateways are marked so that the output routines know to address the | * gateways are marked so that the output routines know to address the | ||||
* gateway rather than the ultimate destination. | * gateway rather than the ultimate destination. | ||||
*/ | */ | ||||
#define RTF_UP 0x1 /* route usable */ | #define RTF_UP 0x1 /* route usable */ | ||||
#define RTF_GATEWAY 0x2 /* destination is a gateway */ | #define RTF_GATEWAY 0x2 /* destination is a gateway */ | ||||
#define RTF_HOST 0x4 /* host entry (net otherwise) */ | #define RTF_HOST 0x4 /* host entry (net otherwise) */ | ||||
▲ Show 20 Lines • Show All 286 Lines • Show Last 20 Lines |
I think it would be better to name these all with upper case, to have understanding from the code that uses them that we use macro. Or maybe move all hashing related code to the same place, and do conditional build there.