Changeset View
Changeset View
Standalone View
Standalone View
sys/net/route/nhop.h
Show First 20 Lines • Show All 176 Lines • ▼ Show 20 Lines | |||||
/* flags that can be set using nhop_set_rtflags() */ | /* flags that can be set using nhop_set_rtflags() */ | ||||
#define RT_SET_RTFLAGS_MASK (RTF_PROTO1 | RTF_PROTO2 | RTF_PROTO3 | RTF_STATIC) | #define RT_SET_RTFLAGS_MASK (RTF_PROTO1 | RTF_PROTO2 | RTF_PROTO3 | RTF_STATIC) | ||||
#define RT_CHANGE_RTFLAGS_MASK RT_SET_RTFLAGS_MASK | #define RT_CHANGE_RTFLAGS_MASK RT_SET_RTFLAGS_MASK | ||||
struct nhop_object *nhop_alloc(uint32_t fibnum, int family); | struct nhop_object *nhop_alloc(uint32_t fibnum, int family); | ||||
void nhop_copy(struct nhop_object *nh, const struct nhop_object *nh_orig); | void nhop_copy(struct nhop_object *nh, const struct nhop_object *nh_orig); | ||||
struct nhop_object *nhop_get_nhop(struct nhop_object *nh, int *perror); | struct nhop_object *nhop_get_nhop(struct nhop_object *nh, int *perror); | ||||
int nhop_finalize(struct nhop_object *nh); | |||||
void nhop_set_direct_gw(struct nhop_object *nh, struct ifnet *ifp); | void nhop_set_direct_gw(struct nhop_object *nh, struct ifnet *ifp); | ||||
bool nhop_set_gw(struct nhop_object *nh, const struct sockaddr *sa, bool is_gw); | bool nhop_set_gw(struct nhop_object *nh, const struct sockaddr *sa, bool is_gw); | ||||
void nhop_set_mtu(struct nhop_object *nh, uint32_t mtu, bool from_user); | void nhop_set_mtu(struct nhop_object *nh, uint32_t mtu, bool from_user); | ||||
void nhop_set_rtflags(struct nhop_object *nh, int rt_flags); | void nhop_set_rtflags(struct nhop_object *nh, int rt_flags); | ||||
void nhop_set_pxtype_flag(struct nhop_object *nh, int nh_flag); | void nhop_set_pxtype_flag(struct nhop_object *nh, int nh_flag); | ||||
void nhop_set_broadcast(struct nhop_object *nh, bool is_broadcast); | void nhop_set_broadcast(struct nhop_object *nh, bool is_broadcast); | ||||
void nhop_set_blackhole(struct nhop_object *nh, int blackhole_rt_flag); | void nhop_set_blackhole(struct nhop_object *nh, int blackhole_rt_flag); | ||||
void nhop_set_pinned(struct nhop_object *nh, bool is_pinned); | void nhop_set_pinned(struct nhop_object *nh, bool is_pinned); | ||||
void nhop_set_redirect(struct nhop_object *nh, bool is_redirect); | void nhop_set_redirect(struct nhop_object *nh, bool is_redirect); | ||||
void nhop_set_type(struct nhop_object *nh, enum nhop_type nh_type); | void nhop_set_type(struct nhop_object *nh, enum nhop_type nh_type); | ||||
void nhop_set_src(struct nhop_object *nh, struct ifaddr *ifa); | void nhop_set_src(struct nhop_object *nh, struct ifaddr *ifa); | ||||
void nhop_set_transmit_ifp(struct nhop_object *nh, struct ifnet *ifp); | void nhop_set_transmit_ifp(struct nhop_object *nh, struct ifnet *ifp); | ||||
uint32_t nhop_get_idx(const struct nhop_object *nh); | uint32_t nhop_get_idx(const struct nhop_object *nh); | ||||
uint32_t nhop_get_uidx(const struct nhop_object *nh); | |||||
void nhop_set_uidx(struct nhop_object *nh, uint32_t uidx); | |||||
enum nhop_type nhop_get_type(const struct nhop_object *nh); | enum nhop_type nhop_get_type(const struct nhop_object *nh); | ||||
int nhop_get_rtflags(const struct nhop_object *nh); | int nhop_get_rtflags(const struct nhop_object *nh); | ||||
struct vnet *nhop_get_vnet(const struct nhop_object *nh); | struct vnet *nhop_get_vnet(const struct nhop_object *nh); | ||||
struct nhop_object *nhop_select_func(struct nhop_object *nh, uint32_t flowid); | struct nhop_object *nhop_select_func(struct nhop_object *nh, uint32_t flowid); | ||||
int nhop_get_upper_family(const struct nhop_object *nh); | int nhop_get_upper_family(const struct nhop_object *nh); | ||||
bool nhop_set_upper_family(struct nhop_object *nh, int family); | |||||
int nhop_get_neigh_family(const struct nhop_object *nh); | int nhop_get_neigh_family(const struct nhop_object *nh); | ||||
uint32_t nhop_get_fibnum(const struct nhop_object *nh); | uint32_t nhop_get_fibnum(const struct nhop_object *nh); | ||||
void nhop_set_fibnum(struct nhop_object *nh, uint32_t fibnum); | void nhop_set_fibnum(struct nhop_object *nh, uint32_t fibnum); | ||||
uint32_t nhop_get_expire(const struct nhop_object *nh); | uint32_t nhop_get_expire(const struct nhop_object *nh); | ||||
void nhop_set_expire(struct nhop_object *nh, uint32_t expire); | void nhop_set_expire(struct nhop_object *nh, uint32_t expire); | ||||
struct rib_head *nhop_get_rh(const struct nhop_object *nh); | |||||
struct nhgrp_object; | |||||
uint32_t nhgrp_get_uidx(const struct nhgrp_object *nhg); | |||||
#endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
/* Kernel <> userland structures */ | /* Kernel <> userland structures */ | ||||
/* Structure usage and layout are described in dump_nhop_entry() */ | /* Structure usage and layout are described in dump_nhop_entry() */ | ||||
struct nhop_external { | struct nhop_external { | ||||
uint32_t nh_len; /* length of the datastructure */ | uint32_t nh_len; /* length of the datastructure */ | ||||
uint32_t nh_idx; /* Nexthop index */ | uint32_t nh_idx; /* Nexthop index */ | ||||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |