Sergey Pastor / 1

Dependents:   Nucleo

Embed: (wiki syntax)

« Back to documentation index

slaac.c File Reference

slaac.c File Reference

IPv6 Stateless Address Autoconfiguration. More...

Go to the source code of this file.

Functions

void slaacGetDefaultSettings (SlaacSettings *settings)
 Initialize settings with default values.
error_t slaacInit (SlaacContext *context, const SlaacSettings *settings)
 SLAAC initialization.
error_t slaacStart (SlaacContext *context)
 Start SLAAC process.
error_t slaacStop (SlaacContext *context)
 Stop SLAAC process.
void slaacLinkChangeEvent (SlaacContext *context)
 Callback function for link change event.
void slaacParseRouterAdv (SlaacContext *context, NdpRouterAdvMessage *message, size_t length)
 Parse Router Advertisement message.
void slaacParsePrefixInfoOption (SlaacContext *context, NdpPrefixInfoOption *option)
 Parse Prefix Information Option.
error_t slaacGenerateLinkLocalAddr (SlaacContext *context)
 Generate a link-local address.
void slaacDumpConfig (SlaacContext *context)
 Dump IPv6 configuration for debugging purpose.

Detailed Description

IPv6 Stateless Address Autoconfiguration.

License

Copyright (C) 2010-2017 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.

Description

Stateless Address Autoconfiguration is a facility to allow devices to configure themselves independently. Refer to the following RFCs for complete details:

  • RFC 4862: IPv6 Stateless Address Autoconfiguration
  • RFC 6106: IPv6 Router Advertisement Options for DNS Configuration
Author:
Oryx Embedded SARL (www.oryx-embedded.com)
Version:
1.7.6

Definition in file slaac.c.


Function Documentation

void slaacDumpConfig ( SlaacContext *  context )

Dump IPv6 configuration for debugging purpose.

Parameters:
[in]contextPointer to the SLAAC context

Definition at line 606 of file slaac.c.

error_t slaacGenerateLinkLocalAddr ( SlaacContext *  context )

Generate a link-local address.

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

Definition at line 559 of file slaac.c.

void slaacGetDefaultSettings ( SlaacSettings settings )

Initialize settings with default values.

Parameters:
[out]settingsStructure that contains SLAAC settings

Definition at line 59 of file slaac.c.

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 80 of file slaac.c.

void slaacLinkChangeEvent ( SlaacContext *  context )

Callback function for link change event.

Parameters:
[in]contextPointer to the SLAAC context

Definition at line 200 of file slaac.c.

void slaacParsePrefixInfoOption ( SlaacContext *  context,
NdpPrefixInfoOption *  option 
)

Parse Prefix Information Option.

Parameters:
[in]contextPointer to the SLAAC context
[in]optionPointer to the Prefix Information option

Definition at line 343 of file slaac.c.

void slaacParseRouterAdv ( SlaacContext *  context,
NdpRouterAdvMessage *  message,
size_t  length 
)

Parse Router Advertisement message.

Parameters:
[in]contextPointer to the SLAAC context
[in]messagePointer to the Router Advertisement message
[in]lengthLength of the message, in bytes

Definition at line 250 of file slaac.c.

error_t slaacStart ( SlaacContext *  context )

Start SLAAC process.

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

Definition at line 120 of file slaac.c.

error_t slaacStop ( SlaacContext *  context )

Stop SLAAC process.

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

Definition at line 172 of file slaac.c.