1
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
68
69
70
71
72
73
74
75
76
77
79
80
82
83
84
85
91
92
93
99
100
105
106
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/* ... */
/* ... */
#ifndef LWIP_HDR_ND6_PRIV_H
#define LWIP_HDR_ND6_PRIV_H
#include "lwip/opt.h"
#if LWIP_IPV6
#include "lwip/pbuf.h"
#include "lwip/ip6_addr.h"
#include "lwip/netif.h"
#ifdef __cplusplus
extern "C" {
#endif
#if LWIP_ND6_QUEUEING
/* ... */
struct nd6_q_entry {
struct nd6_q_entry *next;
struct pbuf *p;
...};/* ... */
#endif
struct nd6_neighbor_cache_entry {
ip6_addr_t next_hop_address;
struct netif *netif;
u8_t lladdr[NETIF_MAX_HWADDR_LEN];
#if LWIP_ND6_QUEUEING
struct nd6_q_entry *q;/* ... */
#else
struct pbuf *q;/* ... */
#endif
u8_t state;
u8_t isrouter;
union {
u32_t reachable_time;
u32_t delay_time;
u32_t probes_sent;
u32_t stale_time;
...} counter;
...};
struct nd6_destination_cache_entry {
ip6_addr_t destination_addr;
ip6_addr_t next_hop_addr;
u16_t pmtu;
u32_t age;
...};
struct nd6_prefix_list_entry {
ip6_addr_t prefix;
struct netif *netif;
u32_t invalidation_timer;
...};
struct nd6_router_list_entry {
struct nd6_neighbor_cache_entry *neighbor_entry;
u32_t invalidation_timer;
u8_t flags;
...};
enum nd6_neighbor_cache_entry_state {
ND6_NO_ENTRY = 0,
ND6_INCOMPLETE,
ND6_REACHABLE,
ND6_STALE,
ND6_DELAY,
ND6_PROBE
...};
#define ND6_HOPLIM 255
#define ND6_2HRS 7200
extern struct nd6_neighbor_cache_entry neighbor_cache[];
extern struct nd6_destination_cache_entry destination_cache[];
extern struct nd6_prefix_list_entry prefix_list[];
extern struct nd6_router_list_entry default_router_list[];
extern u32_t reachable_time;
extern u32_t retrans_timer;
#ifdef __cplusplus
}extern "C" { ... }
#endif
/* ... */
#endif
/* ... */
#endif