下载 FreeRTOS
 

出色的 RTOS & 嵌入式软件

最新资讯
简化任何设备的身份验证云连接。
利用 CoAP 设计节能型云连接 IoT 解决方案。
11.0.0 版 FreeRTOS 内核简介:
FreeRTOS 路线图和代码贡献流程。
使用 FreeRTOS 实现 OPC-UA over TSN。

RA

RA 指的是路由器通告。

路由器通告是 IPv6 邻居发现协议的一部分。路由器定期发送多播消息, 告知设备其存在,同时告知网络配置。RA 允许动态地址配置,使设备更轻松地 连接到网络。

如果 ipconfigUSE_RAFreeRTOSIPConfig.h 中设置为 1 并且在端点初始化过程中设置了端点结构体 bits 字段中的 bWantRA 位, 则 FreeRTOS-Plus-TCP 将尝试通过路由器通告获取端点的 IP 地址。

以下是启用 RA 的端点初始化示例:

IPv6_Address_t xIPAddress;
IPv6_Address_t xPrefix;
IPv6_Address_t xGateWay;
IPv6_Address_t xDNSServer1, xDNSServer2;

FreeRTOS_inet_pton6( "2001:470:ed44::", xPrefix.ucBytes );

FreeRTOS_CreateIPv6Address( &xIPAddress, &xPrefix, 64, pdTRUE );
FreeRTOS_inet_pton6( "fe80::ba27:ebff:fe5a:d751", xGateWay.ucBytes );

FreeRTOS_FillEndPoint_IPv6( &( xInterfaces[ 0 ] ),
&( xEndPoints[ xEndPointCount ] ),
&( xIPAddress ),
&( xPrefix ),
64uL, /* Prefix length. */
&( xGateWay ),
NULL, /* pxDNSServerAddress: Not used yet. */
ucMACAddress );
FreeRTOS_inet_pton6( "2001:4860:4860::8888", xEndPoints[ xEndPointCount ].ipv6_settings.xDNSServerAddresses[ 0 ].ucBytes );
FreeRTOS_inet_pton6( "fe80::1", xEndPoints[ xEndPointCount ].ipv6_settings.xDNSServerAddresses[ 1 ].ucBytes );
FreeRTOS_inet_pton6( "2001:4860:4860::8888", xEndPoints[ xEndPointCount ].ipv6_defaults.xDNSServerAddresses[ 0 ].ucBytes );
FreeRTOS_inet_pton6( "fe80::1", xEndPoints[ xEndPointCount ].ipv6_defaults.xDNSServerAddresses[ 1 ].ucBytes );

#if ( ipconfigUSE_RA != 0 )
{
/* End-point wants to use RA. */
xEndPoints[ xEndPointCount ].bits.**bWantRA** = pdTRUE;
}
#endif /* ( ipconfigUSE_RA != 0 ) */
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.