Webserver+3d print
ndp_misc.c File Reference
Helper functions for NDP (Neighbor Discovery Protocol) More...
Go to the source code of this file.
Functions | |
void | ndpParsePrefixInfoOption (NetInterface *interface, NdpPrefixInfoOption *option) |
Parse Prefix Information Option. | |
void | ndpUpdateAddrList (NetInterface *interface) |
Manage the lifetime of IPv6 addresses. | |
void | ndpUpdatePrefixList (NetInterface *interface) |
Periodically update Prefix List. | |
void | ndpUpdateDefaultRouterList (NetInterface *interface) |
Periodically update Default Router List. | |
error_t | ndpSelectDefaultRouter (NetInterface *interface, const Ipv6Addr *unreachableAddr, Ipv6Addr *addr) |
Default Router Selection. | |
bool_t | ndpIsFirstHopRouter (NetInterface *interface, const Ipv6Addr *destAddr, const Ipv6Addr *nextHop) |
Check whether an address is the first-hop router for the specified destination. | |
error_t | ndpSelectNextHop (NetInterface *interface, const Ipv6Addr *destAddr, const Ipv6Addr *unreachableNextHop, Ipv6Addr *nextHop) |
Next-hop determination. | |
void | ndpUpdateNextHop (NetInterface *interface, const Ipv6Addr *unreachableNextHop) |
Update next-hop field of Destination Cache entries. | |
void | ndpAddOption (void *message, size_t *messageLength, uint8_t type, const void *value, size_t length) |
Append an option to a NDP message. | |
void * | ndpGetOption (uint8_t *options, size_t length, uint8_t type) |
Find a specified option in a NDP message. | |
error_t | ndpCheckOptions (const uint8_t *options, size_t length) |
Check NDP message options. |
Detailed Description
Helper functions for NDP (Neighbor Discovery Protocol)
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.
- Version:
- 1.7.6
Definition in file ndp_misc.c.
Function Documentation
void ndpAddOption | ( | void * | message, |
size_t * | messageLength, | ||
uint8_t | type, | ||
const void * | value, | ||
size_t | length | ||
) |
Append an option to a NDP message.
- Parameters:
-
[in] message Pointer to the NDP message [in,out] messageLength Length of the entire message [in] type Option type [in] value Option value [in] length Length of the option value
Definition at line 588 of file ndp_misc.c.
error_t ndpCheckOptions | ( | const uint8_t * | options, |
size_t | length | ||
) |
Check NDP message options.
- Parameters:
-
[in] options Pointer to the Options field [in] length Length of the Options field
- Returns:
- Error code
Definition at line 678 of file ndp_misc.c.
void* ndpGetOption | ( | uint8_t * | options, |
size_t | length, | ||
uint8_t | type | ||
) |
Find a specified option in a NDP message.
- Parameters:
-
[in] options Pointer to the Options field [in] length Length of the Options field [in] type Type of the option to find
- Returns:
- If the specified option is found, a pointer to the corresponding option is returned. Otherwise NULL pointer is returned
Definition at line 636 of file ndp_misc.c.
bool_t ndpIsFirstHopRouter | ( | NetInterface * | interface, |
const Ipv6Addr * | destAddr, | ||
const Ipv6Addr * | nextHop | ||
) |
Check whether an address is the first-hop router for the specified destination.
- Parameters:
-
[in] interface Underlying network interface [in] destAddr Destination address [in] nextHop First-hop address to be checked
- Returns:
- TRUE if the address is the first-hop router, else FALSE
Definition at line 443 of file ndp_misc.c.
void ndpParsePrefixInfoOption | ( | NetInterface * | interface, |
NdpPrefixInfoOption * | option | ||
) |
Parse Prefix Information Option.
- Parameters:
-
[in] interface Underlying network interface [in] option Pointer to the Prefix Information option
Definition at line 52 of file ndp_misc.c.
error_t ndpSelectDefaultRouter | ( | NetInterface * | interface, |
const Ipv6Addr * | unreachableAddr, | ||
Ipv6Addr * | addr | ||
) |
Default Router Selection.
- Parameters:
-
[in] interface Underlying network interface [in] unreachableAddr IPv6 address of the unreachable router (optional parameter) [out] addr IPv6 address of the default router to be used
- Returns:
- Error code
Definition at line 341 of file ndp_misc.c.
error_t ndpSelectNextHop | ( | NetInterface * | interface, |
const Ipv6Addr * | destAddr, | ||
const Ipv6Addr * | unreachableNextHop, | ||
Ipv6Addr * | nextHop | ||
) |
Next-hop determination.
- Parameters:
-
[in] interface Underlying network interface [in] destAddr Destination address [in] unreachableNextHop Address of the unreachable next-hop (optional parameter) [out] nextHop Next-hop address to be used
- Returns:
- Error code
Definition at line 503 of file ndp_misc.c.
void ndpUpdateAddrList | ( | NetInterface * | interface ) |
Manage the lifetime of IPv6 addresses.
- Parameters:
-
[in] interface Underlying network interface
Definition at line 95 of file ndp_misc.c.
void ndpUpdateDefaultRouterList | ( | NetInterface * | interface ) |
Periodically update Default Router List.
- Parameters:
-
[in] interface Underlying network interface
Definition at line 285 of file ndp_misc.c.
void ndpUpdateNextHop | ( | NetInterface * | interface, |
const Ipv6Addr * | unreachableNextHop | ||
) |
Update next-hop field of Destination Cache entries.
- Parameters:
-
[in] interface Underlying network interface [in] unreachableNextHop Address of the unreachable next-hop
Definition at line 549 of file ndp_misc.c.
void ndpUpdatePrefixList | ( | NetInterface * | interface ) |
Periodically update Prefix List.
- Parameters:
-
[in] interface Underlying network interface
Definition at line 249 of file ndp_misc.c.
Generated on Tue Jul 12 2022 17:10:21 by
