Changeset View
Changeset View
Standalone View
Standalone View
sys/net/route.h
Show First 20 Lines • Show All 338 Lines • ▼ Show 20 Lines | |||||
#define RTAX_MAX 8 /* size of array to allocate */ | #define RTAX_MAX 8 /* size of array to allocate */ | ||||
struct rtentry; | struct rtentry; | ||||
struct nhop_object; | struct nhop_object; | ||||
typedef int rib_filter_f_t(const struct rtentry *, const struct nhop_object *, | typedef int rib_filter_f_t(const struct rtentry *, const struct nhop_object *, | ||||
void *); | void *); | ||||
struct rt_addrinfo { | struct rt_addrinfo { | ||||
int rti_addrs; /* Route RTF_ flags */ | uint16_t rti_addrs; /* rti_info bitmask */ | ||||
uint8_t rti_family; /* address family to operate on */ | |||||
uint8_t rti_spare2; | |||||
int rti_flags; /* Route RTF_ flags */ | int rti_flags; /* Route RTF_ flags */ | ||||
struct sockaddr *rti_info[RTAX_MAX]; /* Sockaddr data */ | struct sockaddr *rti_info[RTAX_MAX]; /* Sockaddr data */ | ||||
struct ifaddr *rti_ifa; /* value of rt_ifa addr */ | struct ifaddr *rti_ifa; /* value of rt_ifa addr */ | ||||
struct ifnet *rti_ifp; /* route interface */ | struct ifnet *rti_ifp; /* route interface */ | ||||
rib_filter_f_t *rti_filter; /* filter function */ | rib_filter_f_t *rti_filter; /* filter function */ | ||||
void *rti_filterdata; /* filter parameters */ | void *rti_filterdata; /* filter parameters */ | ||||
u_long rti_mflags; /* metrics RTV_ flags */ | uint32_t rti_mflags; /* metrics RTV_ flags */ | ||||
u_long rti_spare; /* Will be used for fib */ | uint32_t rti_fibnum; /* Will be used for fib */ | ||||
struct rt_metrics *rti_rmx; /* Pointer to route metrics */ | struct rt_metrics *rti_rmx; /* Pointer to route metrics */ | ||||
}; | }; | ||||
/* | /* | ||||
* This macro returns the size of a struct sockaddr when passed | * This macro returns the size of a struct sockaddr when passed | ||||
* through a routing socket. Basically we round up sa_len to | * through a routing socket. Basically we round up sa_len to | ||||
* a multiple of sizeof(long), with a minimum of sizeof(long). | * a multiple of sizeof(long), with a minimum of sizeof(long). | ||||
* The case sa_len == 0 should only apply to empty structures. | * The case sa_len == 0 should only apply to empty structures. | ||||
▲ Show 20 Lines • Show All 91 Lines • Show Last 20 Lines |