diff options
Diffstat (limited to 'bits/in.h')
-rw-r--r-- | bits/in.h | 49 |
1 files changed, 35 insertions, 14 deletions
@@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2016 Free Software Foundation, Inc. +/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,6 +21,9 @@ # error "Never use <bits/in.h> directly; include <netinet/in.h> instead." #endif +/* This is the generic version, do not assume a linux-based kernel. */ +#define __USE_KERNEL_IPV6_DEFS 0 + /* To select the IP level. */ #define SOL_IP 0 @@ -36,11 +39,12 @@ #define IP_RECVDSTADDR 7 /* bool; Receive IP dst addr w/datagram. */ #define IP_RETOPTS 8 /* ip_opts; Set/get IP per-packet options. */ #define IP_MULTICAST_IF 9 /* in_addr; set/get IP multicast i/f */ -#define IP_MULTICAST_TTL 10 /* u_char; set/get IP multicast ttl */ -#define IP_MULTICAST_LOOP 11 /* i_char; set/get IP multicast loopback */ +#define IP_MULTICAST_TTL 10 /* unsigned char; set/get IP multicast ttl */ +#define IP_MULTICAST_LOOP 11 /* bool; set/get IP multicast loopback */ #define IP_ADD_MEMBERSHIP 12 /* ip_mreq; add an IP group membership */ #define IP_DROP_MEMBERSHIP 13 /* ip_mreq; drop an IP group membership */ +#ifdef __USE_MISC /* Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. The `ip_dst' field is used for the first-hop gateway when using a source route (this gets put into the header proper). */ @@ -49,6 +53,7 @@ struct ip_opts struct in_addr ip_dst; /* First hop; zero without source route. */ char ip_opts[40]; /* Actually variable in size. */ }; +#endif /* Socket-level values for IPv6. */ #define SOL_IPV6 41 @@ -56,17 +61,17 @@ struct ip_opts /* IPV6 socket options. */ #define IPV6_ADDRFORM 1 -#define IPV6_PKTINFO 2 -#define IPV6_HOPOPTS 3 -#define IPV6_DSTOPTS 4 -#define IPV6_RTHDR 5 -#define IPV6_PKTOPTIONS 6 +#define IPV6_2292PKTINFO 2 +#define IPV6_2292HOPOPTS 3 +#define IPV6_2292DSTOPTS 4 +#define IPV6_2292RTHDR 5 +#define IPV6_2292PKTOPTIONS 6 #define IPV6_CHECKSUM 7 -#define IPV6_HOPLIMIT 8 +#define IPV6_2292HOPLIMIT 8 -#define IPV6_RXINFO IPV6_PKTINFO -#define IPV6_TXINFO IPV6_PKTINFO -#define SCM_SRCINFO IPV6_PKTINFO +#define IPV6_RXINFO IPV6_2292PKTINFO +#define IPV6_TXINFO IPV6_RXINFO +#define SCM_SRCINFO IPV6_TXINFO #define SCM_SRCRT IPV6_RXSRCRT #define IPV6_UNICAST_HOPS 16 @@ -83,11 +88,27 @@ struct ip_opts #define IPV6_JOIN_ANYCAST 27 #define IPV6_LEAVE_ANYCAST 28 +/* Advanced API (RFC3542) (1). */ +#define IPV6_RECVPKTINFO 49 +#define IPV6_PKTINFO 50 +#define IPV6_RECVHOPLIMIT 51 +#define IPV6_HOPLIMIT 52 +#define IPV6_RECVHOPOPTS 53 +#define IPV6_HOPOPTS 54 +#define IPV6_RTHDRDSTOPTS 55 +#define IPV6_RECVRTHDR 56 +#define IPV6_RTHDR 57 +#define IPV6_RECVDSTOPTS 58 +#define IPV6_DSTOPTS 59 +#define IPV6_RECVPATHMTU 60 +#define IPV6_PATHMTU 61 +#define IPV6_DONTFRAG 62 + /* Obsolete synonyms for the above. */ #define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP #define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP -#define IPV6_RXHOPOPTS IPV6_HOPOPTS -#define IPV6_RXDSTOPTS IPV6_DSTOPTS +#define IPV6_RXHOPOPTS IPV6_2292HOPOPTS +#define IPV6_RXDSTOPTS IPV6_2292DSTOPTS /* Routing header options for IPv6. */ #define IPV6_RTHDR_LOOSE 0 /* Hop doesn't need to be neighbour. */ |