slaac.h File Reference

IPv6 Stateless Address Autoconfiguration. More...

#include "core/net.h"
#include "ipv6/ndp.h"

Go to the source code of this file.

Data Structures

struct  SlaacSettings
 SLAAC settings. More...
 
struct  _SlaacContext
 SLAAC context. More...
 

Macros

#define SLAAC_SUPPORT   ENABLED
 
#define SLAAC_LIFETIME_2_HOURS   (2 * 3600 * 1000)
 
#define SlaacContext   struct _SlaacContext
 

Typedefs

typedef void(* SlaacLinkChangeCallback) (SlaacContext *context, NetInterface *interface, bool_t linkState)
 Link state change callback. More...
 
typedef void(* SlaacParseRouterAdvCallback) (SlaacContext *context, NdpRouterAdvMessage *message, size_t length)
 Router Advertisement parsing callback. More...
 

Functions

void slaacGetDefaultSettings (SlaacSettings *settings)
 Initialize settings with default values. More...
 
error_t slaacInit (SlaacContext *context, const SlaacSettings *settings)
 SLAAC initialization. More...
 
error_t slaacStart (SlaacContext *context)
 Start SLAAC process. More...
 
error_t slaacStop (SlaacContext *context)
 Stop SLAAC process. More...
 

Detailed Description

IPv6 Stateless Address Autoconfiguration.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneTCP Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.0

Definition in file slaac.h.

Macro Definition Documentation

◆ SLAAC_LIFETIME_2_HOURS

#define SLAAC_LIFETIME_2_HOURS   (2 * 3600 * 1000)

Definition at line 46 of file slaac.h.

◆ SLAAC_SUPPORT

#define SLAAC_SUPPORT   ENABLED

Definition at line 40 of file slaac.h.

◆ SlaacContext

#define SlaacContext   struct _SlaacContext

Definition at line 50 of file slaac.h.

Typedef Documentation

◆ SlaacLinkChangeCallback

typedef void(* SlaacLinkChangeCallback) (SlaacContext *context, NetInterface *interface, bool_t linkState)

Link state change callback.

Definition at line 62 of file slaac.h.

◆ SlaacParseRouterAdvCallback

typedef void(* SlaacParseRouterAdvCallback) (SlaacContext *context, NdpRouterAdvMessage *message, size_t length)

Router Advertisement parsing callback.

Definition at line 70 of file slaac.h.

Function Documentation

◆ slaacGetDefaultSettings()

void slaacGetDefaultSettings ( SlaacSettings settings)

Initialize settings with default values.

Parameters
[out]settingsStructure that contains SLAAC settings

Definition at line 60 of file slaac.c.

◆ slaacInit()

error_t slaacInit ( SlaacContext context,
const SlaacSettings settings 
)

SLAAC initialization.

Parameters
[in]contextPointer to the SLAAC context
[in]settingsSLAAC specific settings
Returns
Error code

Definition at line 81 of file slaac.c.

◆ slaacStart()

error_t slaacStart ( SlaacContext context)

Start SLAAC process.

Parameters
[in]contextPointer to the SLAAC context
Returns
Error code

Definition at line 121 of file slaac.c.

◆ slaacStop()

error_t slaacStop ( SlaacContext context)

Stop SLAAC process.

Parameters
[in]contextPointer to the SLAAC context
Returns
Error code

Definition at line 173 of file slaac.c.