44 #ifndef LWIP_HDR_ND6_H 45 #define LWIP_HDR_ND6_H 62 struct nd6_neighbor_cache_entry {
63 ip6_addr_t next_hop_address;
69 struct nd6_q_entry *q;
84 struct nd6_destination_cache_entry {
85 ip6_addr_t destination_addr;
86 ip6_addr_t next_hop_addr;
91 struct nd6_prefix_list_entry {
94 u32_t invalidation_timer;
95 #if LWIP_IPV6_AUTOCONFIG 97 #define ND6_PREFIX_AUTOCONFIG_AUTONOMOUS 0x01 98 #define ND6_PREFIX_AUTOCONFIG_ADDRESS_GENERATED 0x02 99 #define ND6_PREFIX_AUTOCONFIG_ADDRESS_DUPLICATE 0x04 103 struct nd6_router_list_entry {
104 struct nd6_neighbor_cache_entry * neighbor_entry;
105 u32_t invalidation_timer;
110 enum nd6_neighbor_cache_entry_state {
119 #if LWIP_ND6_QUEUEING 124 struct nd6_q_entry *next;
130 #ifdef PACK_STRUCT_USE_INCLUDES 143 #ifdef PACK_STRUCT_USE_INCLUDES 148 #ifdef PACK_STRUCT_USE_INCLUDES 162 #ifdef PACK_STRUCT_USE_INCLUDES 165 #define ND6_FLAG_ROUTER (0x80) 166 #define ND6_FLAG_SOLICITED (0x40) 167 #define ND6_FLAG_OVERRIDE (0x20) 170 #ifdef PACK_STRUCT_USE_INCLUDES 182 #ifdef PACK_STRUCT_USE_INCLUDES 187 #define ND6_RA_FLAG_MANAGED_ADDR_CONFIG (0x80) 188 #define ND6_RA_FLAG_OTHER_CONFIG (0x40) 189 #define ND6_RA_FLAG_HOME_AGENT (0x20) 190 #define ND6_RA_PREFERENCE_MASK (0x18) 191 #define ND6_RA_PREFERENCE_HIGH (0x08) 192 #define ND6_RA_PREFERENCE_MEDIUM (0x00) 193 #define ND6_RA_PREFERENCE_LOW (0x18) 194 #define ND6_RA_PREFERENCE_DISABLED (0x10) 195 #ifdef PACK_STRUCT_USE_INCLUDES 211 #ifdef PACK_STRUCT_USE_INCLUDES 216 #ifdef PACK_STRUCT_USE_INCLUDES 220 struct redirect_header {
230 #ifdef PACK_STRUCT_USE_INCLUDES 235 #define ND6_OPTION_TYPE_SOURCE_LLADDR (0x01) 236 #define ND6_OPTION_TYPE_TARGET_LLADDR (0x02) 237 #ifdef PACK_STRUCT_USE_INCLUDES 241 struct lladdr_option {
247 #ifdef PACK_STRUCT_USE_INCLUDES 252 #define ND6_OPTION_TYPE_PREFIX_INFO (0x03) 253 #define ND6_PREFIX_FLAG_ON_LINK (0x80) 254 #define ND6_PREFIX_FLAG_AUTONOMOUS (0x40) 255 #define ND6_PREFIX_FLAG_ROUTER_ADDRESS (0x20) 256 #define ND6_PREFIX_FLAG_SITE_PREFIX (0x10) 257 #ifdef PACK_STRUCT_USE_INCLUDES 261 struct prefix_option {
273 #ifdef PACK_STRUCT_USE_INCLUDES 278 #define ND6_OPTION_TYPE_REDIR_HDR (0x04) 279 #ifdef PACK_STRUCT_USE_INCLUDES 283 struct redirected_header_option {
291 #ifdef PACK_STRUCT_USE_INCLUDES 296 #define ND6_OPTION_TYPE_MTU (0x05) 297 #ifdef PACK_STRUCT_USE_INCLUDES 308 #ifdef PACK_STRUCT_USE_INCLUDES 313 #define ND6_OPTION_TYPE_ROUTE_INFO (24) 314 #ifdef PACK_STRUCT_USE_INCLUDES 318 struct route_option {
327 #ifdef PACK_STRUCT_USE_INCLUDES 332 #define ND6_TMR_INTERVAL 1000 336 extern struct nd6_neighbor_cache_entry neighbor_cache[];
337 extern struct nd6_destination_cache_entry destination_cache[];
338 extern struct nd6_prefix_list_entry prefix_list[];
339 extern struct nd6_router_list_entry default_router_list[];
342 extern u32_t reachable_time;
343 extern u32_t retrans_timer;
346 void nd6_input(
struct pbuf *p,
struct netif *inp);
347 s8_t nd6_get_next_hop_entry(
const ip6_addr_t * ip6addr,
struct netif *
netif);
348 s8_t nd6_select_router(
const ip6_addr_t * ip6addr,
struct netif *
netif);
349 u16_t nd6_get_destination_mtu(
const ip6_addr_t * ip6addr,
struct netif *
netif);
350 err_t nd6_queue_packet(
s8_t neighbor_index,
struct pbuf * p);
351 #if LWIP_ND6_TCP_REACHABILITY_HINTS 352 void nd6_reachability_hint(
const ip6_addr_t * ip6addr);
#define PACK_STRUCT_STRUCT
#define PACK_STRUCT_FLD_8(x)
#define PACK_STRUCT_FIELD(x)
#define NETIF_MAX_HWADDR_LEN
#define PACK_STRUCT_FLD_S(x)
#define PACK_STRUCT_BEGIN