xref: /OK3568_Linux_fs/kernel/include/linux/in6.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-or-later */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  *	Types and definitions for AF_INET6
4*4882a593Smuzhiyun  *	Linux INET6 implementation
5*4882a593Smuzhiyun  *
6*4882a593Smuzhiyun  *	Authors:
7*4882a593Smuzhiyun  *	Pedro Roque		<roque@di.fc.ul.pt>
8*4882a593Smuzhiyun  *
9*4882a593Smuzhiyun  *	Sources:
10*4882a593Smuzhiyun  *	IPv6 Program Interfaces for BSD Systems
11*4882a593Smuzhiyun  *      <draft-ietf-ipngwg-bsd-api-05.txt>
12*4882a593Smuzhiyun  *
13*4882a593Smuzhiyun  *	Advanced Sockets API for IPv6
14*4882a593Smuzhiyun  *	<draft-stevens-advanced-api-00.txt>
15*4882a593Smuzhiyun  */
16*4882a593Smuzhiyun #ifndef _LINUX_IN6_H
17*4882a593Smuzhiyun #define _LINUX_IN6_H
18*4882a593Smuzhiyun 
19*4882a593Smuzhiyun #include <uapi/linux/in6.h>
20*4882a593Smuzhiyun 
21*4882a593Smuzhiyun /* IPv6 Wildcard Address (::) and Loopback Address (::1) defined in RFC2553
22*4882a593Smuzhiyun  * NOTE: Be aware the IN6ADDR_* constants and in6addr_* externals are defined
23*4882a593Smuzhiyun  * in network byte order, not in host byte order as are the IPv4 equivalents
24*4882a593Smuzhiyun  */
25*4882a593Smuzhiyun extern const struct in6_addr in6addr_any;
26*4882a593Smuzhiyun #define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } }
27*4882a593Smuzhiyun extern const struct in6_addr in6addr_loopback;
28*4882a593Smuzhiyun #define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } }
29*4882a593Smuzhiyun extern const struct in6_addr in6addr_linklocal_allnodes;
30*4882a593Smuzhiyun #define IN6ADDR_LINKLOCAL_ALLNODES_INIT	\
31*4882a593Smuzhiyun 		{ { { 0xff,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } }
32*4882a593Smuzhiyun extern const struct in6_addr in6addr_linklocal_allrouters;
33*4882a593Smuzhiyun #define IN6ADDR_LINKLOCAL_ALLROUTERS_INIT \
34*4882a593Smuzhiyun 		{ { { 0xff,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2 } } }
35*4882a593Smuzhiyun extern const struct in6_addr in6addr_interfacelocal_allnodes;
36*4882a593Smuzhiyun #define IN6ADDR_INTERFACELOCAL_ALLNODES_INIT \
37*4882a593Smuzhiyun 		{ { { 0xff,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } }
38*4882a593Smuzhiyun extern const struct in6_addr in6addr_interfacelocal_allrouters;
39*4882a593Smuzhiyun #define IN6ADDR_INTERFACELOCAL_ALLROUTERS_INIT \
40*4882a593Smuzhiyun 		{ { { 0xff,1,0,0,0,0,0,0,0,0,0,0,0,0,0,2 } } }
41*4882a593Smuzhiyun extern const struct in6_addr in6addr_sitelocal_allrouters;
42*4882a593Smuzhiyun #define IN6ADDR_SITELOCAL_ALLROUTERS_INIT \
43*4882a593Smuzhiyun 		{ { { 0xff,5,0,0,0,0,0,0,0,0,0,0,0,0,0,2 } } }
44*4882a593Smuzhiyun #endif
45