File Index
Files and directories
Sign in
FILE

in6.h

File preview with syntax highlighting.

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