xref: /haiku/headers/posix/netinet6/in6.h (revision bea66afaeb8d038d8918106a430a56b6e9fb3109)
1 /*
2  * Copyright 2006, Haiku Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _NETINET6_IN6_H_
6 #define _NETINET6_IN6_H_
7 
8 
9 #include <sys/types.h>
10 #include <stdint.h>
11 
12 
13 struct in6_addr {
14 	uint8_t		s6_addr[16];
15 };
16 
17 /*
18  * IP Version 6 socket address.
19  */
20 
21 struct sockaddr_in6 {
22 	uint8_t		sin6_len;
23 	uint8_t		sin6_family;
24 	uint16_t	sin6_port;
25 	uint32_t	sin6_flowinfo;
26 	struct in6_addr	sin6_addr;
27 	uint32_t	sin6_scope_id;
28 };
29 
30 
31 #define IN6ADDR_ANY_INIT \
32 	{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
33 	   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}
34 #define IN6ADDR_LOOPBACK_INIT \
35 	{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
36 	   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}
37 
38 extern const struct in6_addr in6addr_any;
39 extern const struct in6_addr in6addr_loopback;
40 
41 #endif	/* _NETINET6_IN6_H_ */
42