Struct:ttRouterAdvParam
#include <trsocket.h> /* * Router Advertisement parameters (suggested default values shown). */ typedef struct tsRouterAdvParam { ttUser8Bit raAdvFlags; /* see flags, below */ /* [RFC4861].6.2.1 - Router Configuration Variables (default values shown) */ ttUser8Bit raAdvCurHopLimit; /* TM_6_IP_DEF_HOPS */ ttUser16Bit raAdvDefaultLifetime; /* 3 * MaxRtrAdvInterval */ ttUser16Bit raMinRtrAdvInterval; /* 0.33 * MaxRtrAdvInterval */ ttUser16Bit raMaxRtrAdvInterval; /* 600 seconds */ ttUserS32Bit raAdvLinkMTU; /* 0 bytes */ ttUser32Bit raAdvReachableTime; /* 0 milliseconds */ ttUser32Bit raAdvRetransTimer; /* 0 milliseconds */ /* Array of prefixes for IPv6 stateless address autoconfig ([RFC4862]) */ ttUser8Bit raAdvPrefixCount; ttConstRouterAdvPrefixParamPtr raAdvPrefixArray; #ifdef TM_6_RTR_ADV_SEND_MOD_DNS /* Array of IPv6 addresses for Recursive DNS Servers ([RFC8106].5.1) */ ttRouterAdvDnsParam raAdvRDNSS; /* Array of domain suffixes for DNS Search ([RFC8106].5.1) */ ttRouterAdvDnsParam raAdvDNSSL; /* DNS Search List */ #endif /* TM_6_RTR_ADV_SEND_MOD_DNS */ ttPktLen raOptionLength; /* bytes at raOptionData */ ttUserConstVoidPtr raOptionData; /* Other options, if any */ } ttRouterAdvParam; typedef ttRouterAdvParam TM_FAR * ttRouterAdvParamPtr; typedef const ttRouterAdvParam TM_FAR * ttConstRouterAdvParamPtr; #define TM_RTR_ADV_PARAM_NULL_PTR ((ttConstRouterAdvParamPtr)0) /* * Router Advertisement flags (ttRouterAdvParam.raAdvFlags). */ #define TM_6_RA_FL_MANAGED 0x80 /* AdvManagedFlag */ #define TM_6_RA_FL_OTHER 0x40 /* AdvOtherConfigFlag */ #define TM_6_RA_FL_ONE_UNSOL 0x01 /* send RA on startup only */
Structure Description
This structure contains parameters for constructing a Router Advertisement message. For details, refer to RFC 4861, Section 4.2, Router Advertisement Message Format, Section 4.6.2, Prefix Information, Section 6.2.1, Router Configuration Variables and Section 10, Protocol Constants.
Call tf6RouterAdvDefaults() and tf6RouterAdvPrefixDefaults() to get the default values. Call tf6RouterAdvConfig() to activate the Router Advertisement configuration.
Table 1 below describes the raAdvFlags bit field (bitwise OR the values).
Table 1. Router Advertisement Flags TM_6_RA_FL_MANAGED Set the M (Managed address configuration) flag in the message. When set, it indicates that addresses are available via DHCPv6. Identified in RFC 4861 as Router Configuration Variable AdvManagedFlag. Default: FALSE
TM_6_RA_FL_OTHER Set the O (Other configuration) flag in the message. When set, it indicates that other configuration information is available via DHCPv6. Examples of such information are DNS-related information or information on other servers within the network. Identified in RFC 4861 as Router Configuration Variable AdvOtherConfigFlag. Default: FALSE
TM_6_RA_FL_ONE_UNSOL Set this flag if you do not want to send unsolicited Router Advertisement messages, repeatedly. One unsolicited message will be sent at the start but the retransmit timer will not be started. Solicited messages are unaffected by this flag. If this flag is true, some hosts may experience interruptions because address lifetimes aren't refreshed. Default: FALSE
Members
- raAdvFlags
- Zero or more boolean values OR'd together (see Table 1 above).
- raAdvCurHopLimit
- The value that hosts should use in the IPv6 Hop Limit header field of outgoing packets. The value zero means unspecified (by this router). Identified in RFC 4861 as Router Configuration Variable AdvCurHopLimit.
- raAdvDefaultLifetime
- The lifetime associated with the default router, in seconds. Specify 0 to indicate that this is not a default router. The maximum value for this field is 65535. Identified in RFC 4861 as Router Configuration Variable AdvDefaultLifetime. RFC 4861 specifies a range of between MaxRtrAdvInterval and 9000 seconds and a default lifetime of (3 * MaxRtrAdvInterval).
- raMinRtrAdvInterval
- The minimum time allowed between sending unsolicited multicast Router Advertisements from the interface, in seconds. Identified in RFC 4861 as Router Configuration Variable MinRtrAdvInterval. RFC 4861 specifies a minimum of 3 seconds and a default of (0.33 * MaxRtrAdvInterval) if MaxRtrAdvInterval ≥ 9 seconds.
- raMaxRtrAdvInterval
- raAdvLinkMTU
- raAdvReachableTime
- The time, in milliseconds, that a node assumes a neighbor is reachable after having received a reachability confirmation. Used by the Neighbor Unreachability Detection algorithm (see RFC 4861, Section 7.3). A value of zero means unspecified (by this router). Identified in RFC 4861 as Router Configuration Variable AdvReachableTime. RFC 4861 specifies a maximum of 3,600,000 milliseconds (1 hour) and a default of 0 (unspecified).
- raAdvRetransTimer
- The time, in milliseconds, between retransmitted Neighbor Solicitation messages. Used by address resolution and the Neighbor Unreachability Detection algorithm (see RFC 4861, Sections 7.2 and 7.3). A value of zero means unspecified (by this router). Identified in RFC 4861 as Router Configuration Variable AdvRetransTimer. RFC 4861 specifies a default of 0 (unspecified).
- raAdvPrefixCount
- The number of prefix entries at pointer raAdvPrefixArray. Specify 0 if you are not sending any Prefix Options.
- raAdvPrefixArray
- The pointer to an array of ttRouterAdvPrefixParam entries for building Prefix Options.
- raAdvRDNSS
- If TM_6_RTR_ADV_SEND_MOD_DNS is defined, this is a ttRouterAdvDnsParam structure for building the Recursive DNS Server Option (RFC 8106).
- raAdvDNSSL
- If TM_6_RTR_ADV_SEND_MOD_DNS is defined, this is a ttRouterAdvDnsParam structure for building the DNS Search List Option (RFC 8106).
- raOptionLength
- The length of data, in bytes, pointed to by raOptionData. Specify 0 if you are not supplying any custom options.
- raOptionData
- A pointer to 1 or more custom options to be appended to the Router Advertisement message. Provide the data in binary form, compatible with the Option Format specified in RFC 4861.