Steinar H. Gunderson | 0688023 | 2011-01-20 00:12:30 +0100 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | **************************************************************************** |
| 11 | ****************************************************************************/ |
| 12 | #ifndef _IPV6_H |
| 13 | #define _IPV6_H |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 14 | |
Steinar H. Gunderson | 0688023 | 2011-01-20 00:12:30 +0100 | [diff] [blame] | 15 | #include <linux/types.h> |
| 16 | #include <linux/in6.h> |
| 17 | #include <asm/byteorder.h> |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 18 | |
Steinar H. Gunderson | 0688023 | 2011-01-20 00:12:30 +0100 | [diff] [blame] | 19 | #define IPV6_MIN_MTU 1280 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 20 | |
Steinar H. Gunderson | 0688023 | 2011-01-20 00:12:30 +0100 | [diff] [blame] | 21 | struct in6_pktinfo { |
| 22 | struct in6_addr ipi6_addr; |
| 23 | int ipi6_ifindex; |
| 24 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 25 | |
Steinar H. Gunderson | 0688023 | 2011-01-20 00:12:30 +0100 | [diff] [blame] | 26 | struct ip6_mtuinfo { |
| 27 | struct sockaddr_in6 ip6m_addr; |
| 28 | __u32 ip6m_mtu; |
| 29 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 30 | |
Steinar H. Gunderson | 0688023 | 2011-01-20 00:12:30 +0100 | [diff] [blame] | 31 | struct in6_ifreq { |
| 32 | struct in6_addr ifr6_addr; |
| 33 | __u32 ifr6_prefixlen; |
| 34 | int ifr6_ifindex; |
| 35 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 36 | |
Steinar H. Gunderson | 0688023 | 2011-01-20 00:12:30 +0100 | [diff] [blame] | 37 | #define IPV6_SRCRT_STRICT 0x01 |
| 38 | #define IPV6_SRCRT_TYPE_0 0 |
| 39 | #define IPV6_SRCRT_TYPE_2 2 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 40 | |
Steinar H. Gunderson | 0688023 | 2011-01-20 00:12:30 +0100 | [diff] [blame] | 41 | struct ipv6_rt_hdr { |
| 42 | __u8 nexthdr; |
| 43 | __u8 hdrlen; |
| 44 | __u8 type; |
| 45 | __u8 segments_left; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 46 | |
Steinar H. Gunderson | 0688023 | 2011-01-20 00:12:30 +0100 | [diff] [blame] | 47 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 48 | |
Steinar H. Gunderson | 0688023 | 2011-01-20 00:12:30 +0100 | [diff] [blame] | 49 | struct ipv6_opt_hdr { |
| 50 | __u8 nexthdr; |
| 51 | __u8 hdrlen; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 52 | |
Steinar H. Gunderson | 0688023 | 2011-01-20 00:12:30 +0100 | [diff] [blame] | 53 | } __attribute__((packed)); |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 54 | |
Steinar H. Gunderson | 0688023 | 2011-01-20 00:12:30 +0100 | [diff] [blame] | 55 | #define ipv6_destopt_hdr ipv6_opt_hdr |
| 56 | #define ipv6_hopopt_hdr ipv6_opt_hdr |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 57 | |
Steinar H. Gunderson | 0688023 | 2011-01-20 00:12:30 +0100 | [diff] [blame] | 58 | struct rt0_hdr { |
| 59 | struct ipv6_rt_hdr rt_hdr; |
| 60 | __u32 reserved; |
| 61 | struct in6_addr addr[0]; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 62 | |
Steinar H. Gunderson | 0688023 | 2011-01-20 00:12:30 +0100 | [diff] [blame] | 63 | #define rt0_type rt_hdr.type |
| 64 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 65 | |
Steinar H. Gunderson | 0688023 | 2011-01-20 00:12:30 +0100 | [diff] [blame] | 66 | struct rt2_hdr { |
| 67 | struct ipv6_rt_hdr rt_hdr; |
| 68 | __u32 reserved; |
| 69 | struct in6_addr addr; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 70 | |
Steinar H. Gunderson | 0688023 | 2011-01-20 00:12:30 +0100 | [diff] [blame] | 71 | #define rt2_type rt_hdr.type |
| 72 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 73 | |
Steinar H. Gunderson | 0688023 | 2011-01-20 00:12:30 +0100 | [diff] [blame] | 74 | struct ipv6_destopt_hao { |
| 75 | __u8 type; |
| 76 | __u8 length; |
| 77 | struct in6_addr addr; |
| 78 | } __attribute__((packed)); |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 79 | |
Steinar H. Gunderson | 0688023 | 2011-01-20 00:12:30 +0100 | [diff] [blame] | 80 | struct ipv6hdr { |
| 81 | #ifdef __LITTLE_ENDIAN_BITFIELD |
| 82 | __u8 priority:4, |
| 83 | version:4; |
| 84 | #elif defined(__BIG_ENDIAN_BITFIELD) |
| 85 | __u8 version:4, |
| 86 | priority:4; |
| 87 | #else |
| 88 | #error "Please fix <asm/byteorder.h>" |
| 89 | #endif |
| 90 | __u8 flow_lbl[3]; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 91 | |
Steinar H. Gunderson | 0688023 | 2011-01-20 00:12:30 +0100 | [diff] [blame] | 92 | __be16 payload_len; |
| 93 | __u8 nexthdr; |
| 94 | __u8 hop_limit; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 95 | |
Steinar H. Gunderson | 0688023 | 2011-01-20 00:12:30 +0100 | [diff] [blame] | 96 | struct in6_addr saddr; |
| 97 | struct in6_addr daddr; |
| 98 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 99 | |
Steinar H. Gunderson | 0688023 | 2011-01-20 00:12:30 +0100 | [diff] [blame] | 100 | enum { |
| 101 | DEVCONF_FORWARDING = 0, |
| 102 | DEVCONF_HOPLIMIT, |
| 103 | DEVCONF_MTU6, |
| 104 | DEVCONF_ACCEPT_RA, |
| 105 | DEVCONF_ACCEPT_REDIRECTS, |
| 106 | DEVCONF_AUTOCONF, |
| 107 | DEVCONF_DAD_TRANSMITS, |
| 108 | DEVCONF_RTR_SOLICITS, |
| 109 | DEVCONF_RTR_SOLICIT_INTERVAL, |
| 110 | DEVCONF_RTR_SOLICIT_DELAY, |
| 111 | DEVCONF_USE_TEMPADDR, |
| 112 | DEVCONF_TEMP_VALID_LFT, |
| 113 | DEVCONF_TEMP_PREFERED_LFT, |
| 114 | DEVCONF_REGEN_MAX_RETRY, |
| 115 | DEVCONF_MAX_DESYNC_FACTOR, |
| 116 | DEVCONF_MAX_ADDRESSES, |
| 117 | DEVCONF_FORCE_MLD_VERSION, |
| 118 | DEVCONF_ACCEPT_RA_DEFRTR, |
| 119 | DEVCONF_ACCEPT_RA_PINFO, |
| 120 | DEVCONF_ACCEPT_RA_RTR_PREF, |
| 121 | DEVCONF_RTR_PROBE_INTERVAL, |
| 122 | DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN, |
| 123 | DEVCONF_PROXY_NDP, |
| 124 | DEVCONF_OPTIMISTIC_DAD, |
| 125 | DEVCONF_ACCEPT_SOURCE_ROUTE, |
| 126 | DEVCONF_MC_FORWARDING, |
| 127 | DEVCONF_DISABLE_IPV6, |
| 128 | DEVCONF_ACCEPT_DAD, |
| 129 | DEVCONF_FORCE_TLLAO, |
| 130 | DEVCONF_MAX |
| 131 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 132 | |
Steinar H. Gunderson | 0688023 | 2011-01-20 00:12:30 +0100 | [diff] [blame] | 133 | #endif |