31#ifndef _NDP_ROUTER_ADV_H
32#define _NDP_ROUTER_ADV_H
39#ifndef NDP_ROUTER_ADV_SUPPORT
40 #define NDP_ROUTER_ADV_SUPPORT DISABLED
41#elif (NDP_ROUTER_ADV_SUPPORT != ENABLED && NDP_ROUTER_ADV_SUPPORT != DISABLED)
42 #error NDP_ROUTER_ADV_SUPPORT parameter is not valid
46#ifndef NDP_ROUTER_ADV_TICK_INTERVAL
47 #define NDP_ROUTER_ADV_TICK_INTERVAL 100
48#elif (NDP_ROUTER_ADV_TICK_INTERVAL < 10)
49 #error NDP_ROUTER_ADV_TICK_INTERVAL parameter is not valid
53#ifndef NDP_ROUTER_ADV_PRIVATE_CONTEXT
54 #define NDP_ROUTER_ADV_PRIVATE_CONTEXT
59#define NdpRouterAdvContext struct _NdpRouterAdvContext
72 NdpRouterAdvMessage *message,
size_t *length);
84 bool_t autonomousFlag;
85 uint32_t validLifetime;
86 uint32_t preferredLifetime;
99 uint32_t routeLifetime;
113 uint16_t validLifetime;
157 NDP_ROUTER_ADV_PRIVATE_CONTEXT
167error_t ndpRouterAdvInit(NdpRouterAdvContext *context,
170error_t ndpRouterAdvStart(NdpRouterAdvContext *context);
171error_t ndpRouterAdvStop(NdpRouterAdvContext *context);
error_t
Error codes.
Definition error.h:43
IPv6 (Internet Protocol Version 6)
void(* NdpRouterAddOptionsCallback)(NdpRouterAdvContext *context, NdpRouterAdvMessage *message, size_t *length)
Add Router Advertisement options callback.
Definition ndp_router_adv.h:71
uint32_t systime_t
System time.
Definition os_port_none.h:90
Context information for 6LoWPAN header compression.
Definition ndp_router_adv.h:108
IPv6 prefix information.
Definition ndp_router_adv.h:80
Route information.
Definition ndp_router_adv.h:95
RA service settings.
Definition ndp_router_adv.h:122
uint32_t retransTimer
Value of the Retrans Timer field.
Definition ndp_router_adv.h:134
NetInterface * interface
Underlying network interface.
Definition ndp_router_adv.h:123
NdpRouterAdvPrefixInfo * prefixList
List of prefixes (PIO option)
Definition ndp_router_adv.h:136
uint8_t preference
Value of the Router Selection Preferences field.
Definition ndp_router_adv.h:130
bool_t proxyFlag
Value of the Neighbor Discovery Proxy flag.
Definition ndp_router_adv.h:131
NdpRouterAdvRouteInfo * routeList
List of routes (RIO option)
Definition ndp_router_adv.h:138
bool_t otherConfigFlag
Other Configuration flag.
Definition ndp_router_adv.h:128
bool_t homeAgentFlag
Mobile IPv6 Home Agent flag.
Definition ndp_router_adv.h:129
uint32_t linkMtu
Recommended MTU for the link (MTU option)
Definition ndp_router_adv.h:135
uint8_t curHopLimit
Value of the Cur Hop Limit field.
Definition ndp_router_adv.h:126
bool_t managedFlag
Managed Address Configuration flag.
Definition ndp_router_adv.h:127
uint_t prefixListLength
Number of prefixes in the list.
Definition ndp_router_adv.h:137
uint32_t reachableTime
Value of the Reachable Time field.
Definition ndp_router_adv.h:133
uint_t routeListLength
Number of routes in the list.
Definition ndp_router_adv.h:139
uint_t contextListLength
Number of compression contexts in the list.
Definition ndp_router_adv.h:141
NdpRouterAddOptionsCallback addOptionsCallback
Add Router Advertisement options callback.
Definition ndp_router_adv.h:142
systime_t maxRtrAdvInterval
Minimum time between unsolicited Router Advertisements.
Definition ndp_router_adv.h:124
NdpRouterAdvContextInfo * contextList
List of compression contexts (6CO option)
Definition ndp_router_adv.h:140
systime_t minRtrAdvInterval
Maximum time between unsolicited Router Advertisements.
Definition ndp_router_adv.h:125
uint16_t defaultLifetime
Value of the Router Lifetime field.
Definition ndp_router_adv.h:132
RA service context.
Definition ndp_router_adv.h:151
systime_t timeout
Timeout value.
Definition ndp_router_adv.h:155
NdpRouterAdvSettings settings
RA service settings.
Definition ndp_router_adv.h:152
systime_t timestamp
Timestamp to manage retransmissions.
Definition ndp_router_adv.h:154
uint_t routerAdvCount
Router Advertisement message counter.
Definition ndp_router_adv.h:156
bool_t running
This flag tells whether the RA service is running.
Definition ndp_router_adv.h:153