mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 17:33:08 +08:00
net/inet: Add framework to support IPv4 and IPv6 protocol socket options (i.e., SOL_IP and SOL_IP6). This is build framework only (not actual socket options are yet handled). Handling of these socket options is a necessary step on the way to future ICMPv6 MLD support.
This commit is contained in:
@@ -114,7 +114,7 @@
|
||||
#define IP_MSFILTER (__SO_PROTOCOL + 10) /* Access advanced, full-
|
||||
* state filtering API */
|
||||
#define IP_MULTICAST_ALL (__SO_PROTOCOL + 11) /* Modify the delivery policy
|
||||
* of mutlicast messages bound
|
||||
* of multicast messages bound
|
||||
* to INADDR_ANY */
|
||||
|
||||
/* SOL_IPV6 protocol-level socket options. */
|
||||
|
||||
@@ -64,10 +64,6 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
# error "IGMP for IPv6 not supported"
|
||||
#endif
|
||||
|
||||
/* IGMP packet types */
|
||||
|
||||
#define IGMP_MEMBERSHIP_QUERY 0x11 /* Membership Query */
|
||||
@@ -111,6 +107,8 @@
|
||||
#define IS_SCHEDMSG(f) (((f) & IGMP_SCHEDMSG) != 0)
|
||||
#define IS_WAITMSG(f) (((f) & IGMP_WAITMSG) != 0)
|
||||
|
||||
/* Time-to-Live must be one */
|
||||
|
||||
#define IGMP_TTL 1
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -59,6 +59,21 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* MLD is a sub-protocol of ICMPv6, that is, MLD message types are a subset
|
||||
* of ICMPv6 messages, and MLD messages are identified in IPv6 packets by a
|
||||
* preceding Next Header value of IP_PROTO_ICMP6 (58). All MLD messages
|
||||
* MUST be sent with a link-local IPv6 Source Address, an IPv6 Hop Limit of
|
||||
* 1, and an IPv6 Router Alert option (RFC2711) in a Hop-by-Hop Options
|
||||
* header. (The Router Alert option is necessary to cause routers to
|
||||
* examine MLD messages sent to IPv6 multicast addresses in which the
|
||||
* routers themselves have no interest.) MLD Reports can be sent with the
|
||||
* source address set to the unspecified address (RFC3513), if a valid
|
||||
* link-local IPv6 source address has not been acquired yet for the sending
|
||||
* interface.
|
||||
*/
|
||||
|
||||
#define MLD_TTL (1)
|
||||
|
||||
/* Maximum response code bit definitions.
|
||||
*
|
||||
* If MRC < 32768
|
||||
|
||||
Reference in New Issue
Block a user