mikroSDK Reference Manual
slaac.h
Go to the documentation of this file.
1
31#ifndef _SLAAC_H
32#define _SLAAC_H
33
34//Dependencies
35#include "core/net.h"
36#include "ipv6/ndp.h"
37
38//SLAAC support
39#ifndef SLAAC_SUPPORT
40 #define SLAAC_SUPPORT ENABLED
41#elif (SLAAC_SUPPORT != ENABLED && SLAAC_SUPPORT != DISABLED)
42 #error SLAAC_SUPPORT parameter is not valid
43#endif
44
45//Time constant
46#define SLAAC_LIFETIME_2_HOURS (2 * 3600 * 1000)
47
48//Forward declaration of SlaacContext structure
49struct _SlaacContext;
50#define SlaacContext struct _SlaacContext
51
52//C++ guard
53#ifdef __cplusplus
54extern "C" {
55#endif
56
57
62typedef void (*SlaacLinkChangeCallback)(SlaacContext *context,
63 NetInterface *interface, bool_t linkState);
64
65
70typedef void (*SlaacParseRouterAdvCallback)(SlaacContext *context,
71 NdpRouterAdvMessage *message, size_t length);
72
73
85
86
97
98
99//SLAAC related functions
100void slaacGetDefaultSettings(SlaacSettings *settings);
101error_t slaacInit(SlaacContext *context, const SlaacSettings *settings);
102
103error_t slaacStart(SlaacContext *context);
104error_t slaacStop(SlaacContext *context);
105
106//C++ guard
107#ifdef __cplusplus
108}
109#endif
110
111#endif
error_t
Error codes.
Definition error.h:43
NDP (Neighbor Discovery Protocol)
TCP/IP stack core.
void(* SlaacParseRouterAdvCallback)(SlaacContext *context, NdpRouterAdvMessage *message, size_t length)
Router Advertisement parsing callback.
Definition slaac.h:70
void(* SlaacLinkChangeCallback)(SlaacContext *context, NetInterface *interface, bool_t linkState)
Link state change callback.
Definition slaac.h:62
SLAAC settings.
Definition slaac.h:79
NetInterface * interface
Network interface to configure.
Definition slaac.h:80
SlaacLinkChangeCallback linkChangeEvent
Link state change event.
Definition slaac.h:82
bool_t manualDnsConfig
Force manual DNS configuration.
Definition slaac.h:81
SlaacParseRouterAdvCallback parseRouterAdvCallback
Router Advertisement parsing callback.
Definition slaac.h:83
SLAAC context.
Definition slaac.h:92
SlaacSettings settings
SLAAC settings.
Definition slaac.h:93
bool_t configUpdated
This flag is set when IPv6 configuration has been updated.
Definition slaac.h:95
bool_t running
SLAAC is currently running.
Definition slaac.h:94