Changeset View
Changeset View
Standalone View
Standalone View
sys/net/route/nhop.h
Show First 20 Lines • Show All 139 Lines • ▼ Show 20 Lines | struct nhop_object { | ||||
uint8_t nh_prepend_len; /* length of prepend data */ | uint8_t nh_prepend_len; /* length of prepend data */ | ||||
uint8_t spare[3]; | uint8_t spare[3]; | ||||
uint32_t spare1; /* alignment */ | uint32_t spare1; /* alignment */ | ||||
char nh_prepend[48]; /* L2 prepend */ | char nh_prepend[48]; /* L2 prepend */ | ||||
struct nhop_priv *nh_priv; /* control plane data */ | struct nhop_priv *nh_priv; /* control plane data */ | ||||
/* -- 128 bytes -- */ | /* -- 128 bytes -- */ | ||||
}; | }; | ||||
/* Consumer-visible nexthop info flags */ | |||||
#define NHF_MULTIPATH 0x0008 /* Nexhop is a nexthop group */ | |||||
#define NHF_REJECT 0x0010 /* RTF_REJECT */ | |||||
#define NHF_BLACKHOLE 0x0020 /* RTF_BLACKHOLE */ | |||||
#define NHF_REDIRECT 0x0040 /* RTF_DYNAMIC|RTF_MODIFIED */ | |||||
#define NHF_DEFAULT 0x0080 /* Default route */ | |||||
#define NHF_BROADCAST 0x0100 /* RTF_BROADCAST */ | |||||
#define NHF_GATEWAY 0x0200 /* RTF_GATEWAY */ | |||||
#define NHF_HOST 0x0400 /* RTF_HOST */ | |||||
/* Nexthop request flags */ | |||||
#define NHR_NONE 0x00 /* empty flags field */ | |||||
#define NHR_REF 0x01 /* reference nexhop */ | |||||
#define NHR_NODEFAULT 0x02 /* uRPF: do not consider default route */ | |||||
/* Control plane route request flags */ | |||||
#define NHR_COPY 0x100 /* Copy rte data */ | |||||
#define NHR_UNLOCKED 0x200 /* Do not lock table */ | |||||
/* | /* | ||||
* Nhop validness. | * Nhop validness. | ||||
* | * | ||||
* Currently we verify whether link is up or not on every packet, which can be | * Currently we verify whether link is up or not on every packet, which can be | ||||
* quite costy. | * quite costy. | ||||
* TODO: subscribe for the interface notifications and update the nexthops | * TODO: subscribe for the interface notifications and update the nexthops | ||||
* with NHF_INVALID flag. | * with NHF_INVALID flag. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines |