~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/ipv6.h

Version: ~ [ linux-5.12-rc7 ] ~ [ linux-5.11.13 ] ~ [ linux-5.10.29 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.111 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.186 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.230 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.266 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.266 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.18.140 ] ~ [ linux-3.16.85 ] ~ [ linux-3.14.79 ] ~ [ linux-3.12.74 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef _UAPI_IPV6_H
  2 #define _UAPI_IPV6_H
  3 
  4 #include <linux/libc-compat.h>
  5 #include <linux/types.h>
  6 #include <linux/in6.h>
  7 #include <asm/byteorder.h>
  8 
  9 /* The latest drafts declared increase in minimal mtu up to 1280. */
 10 
 11 #define IPV6_MIN_MTU    1280
 12 
 13 /*
 14  *      Advanced API
 15  *      source interface/address selection, source routing, etc...
 16  *      *under construction*
 17  */
 18 
 19 #if __UAPI_DEF_IN6_PKTINFO
 20 struct in6_pktinfo {
 21         struct in6_addr ipi6_addr;
 22         int             ipi6_ifindex;
 23 };
 24 #endif
 25 
 26 #if __UAPI_DEF_IP6_MTUINFO
 27 struct ip6_mtuinfo {
 28         struct sockaddr_in6     ip6m_addr;
 29         __u32                   ip6m_mtu;
 30 };
 31 #endif
 32 
 33 struct in6_ifreq {
 34         struct in6_addr ifr6_addr;
 35         __u32           ifr6_prefixlen;
 36         int             ifr6_ifindex; 
 37 };
 38 
 39 #define IPV6_SRCRT_STRICT       0x01    /* Deprecated; will be removed */
 40 #define IPV6_SRCRT_TYPE_0       0       /* Deprecated; will be removed */
 41 #define IPV6_SRCRT_TYPE_2       2       /* IPv6 type 2 Routing Header   */
 42 #define IPV6_SRCRT_TYPE_4       4       /* Segment Routing with IPv6 */
 43 
 44 /*
 45  *      routing header
 46  */
 47 struct ipv6_rt_hdr {
 48         __u8            nexthdr;
 49         __u8            hdrlen;
 50         __u8            type;
 51         __u8            segments_left;
 52 
 53         /*
 54          *      type specific data
 55          *      variable length field
 56          */
 57 };
 58 
 59 
 60 struct ipv6_opt_hdr {
 61         __u8            nexthdr;
 62         __u8            hdrlen;
 63         /* 
 64          * TLV encoded option data follows.
 65          */
 66 } __attribute__((packed));      /* required for some archs */
 67 
 68 #define ipv6_destopt_hdr ipv6_opt_hdr
 69 #define ipv6_hopopt_hdr  ipv6_opt_hdr
 70 
 71 /* Router Alert option values (RFC2711) */
 72 #define IPV6_OPT_ROUTERALERT_MLD        0x0000  /* MLD(RFC2710) */
 73 
 74 /*
 75  *      routing header type 0 (used in cmsghdr struct)
 76  */
 77 
 78 struct rt0_hdr {
 79         struct ipv6_rt_hdr      rt_hdr;
 80         __u32                   reserved;
 81         struct in6_addr         addr[0];
 82 
 83 #define rt0_type                rt_hdr.type
 84 };
 85 
 86 /*
 87  *      routing header type 2
 88  */
 89 
 90 struct rt2_hdr {
 91         struct ipv6_rt_hdr      rt_hdr;
 92         __u32                   reserved;
 93         struct in6_addr         addr;
 94 
 95 #define rt2_type                rt_hdr.type
 96 };
 97 
 98 /*
 99  *      home address option in destination options header
100  */
101 
102 struct ipv6_destopt_hao {
103         __u8                    type;
104         __u8                    length;
105         struct in6_addr         addr;
106 } __attribute__((packed));
107 
108 /*
109  *      IPv6 fixed header
110  *
111  *      BEWARE, it is incorrect. The first 4 bits of flow_lbl
112  *      are glued to priority now, forming "class".
113  */
114 
115 struct ipv6hdr {
116 #if defined(__LITTLE_ENDIAN_BITFIELD)
117         __u8                    priority:4,
118                                 version:4;
119 #elif defined(__BIG_ENDIAN_BITFIELD)
120         __u8                    version:4,
121                                 priority:4;
122 #else
123 #error  "Please fix <asm/byteorder.h>"
124 #endif
125         __u8                    flow_lbl[3];
126 
127         __be16                  payload_len;
128         __u8                    nexthdr;
129         __u8                    hop_limit;
130 
131         struct  in6_addr        saddr;
132         struct  in6_addr        daddr;
133 };
134 
135 
136 /* index values for the variables in ipv6_devconf */
137 enum {
138         DEVCONF_FORWARDING = 0,
139         DEVCONF_HOPLIMIT,
140         DEVCONF_MTU6,
141         DEVCONF_ACCEPT_RA,
142         DEVCONF_ACCEPT_REDIRECTS,
143         DEVCONF_AUTOCONF,
144         DEVCONF_DAD_TRANSMITS,
145         DEVCONF_RTR_SOLICITS,
146         DEVCONF_RTR_SOLICIT_INTERVAL,
147         DEVCONF_RTR_SOLICIT_DELAY,
148         DEVCONF_USE_TEMPADDR,
149         DEVCONF_TEMP_VALID_LFT,
150         DEVCONF_TEMP_PREFERED_LFT,
151         DEVCONF_REGEN_MAX_RETRY,
152         DEVCONF_MAX_DESYNC_FACTOR,
153         DEVCONF_MAX_ADDRESSES,
154         DEVCONF_FORCE_MLD_VERSION,
155         DEVCONF_ACCEPT_RA_DEFRTR,
156         DEVCONF_ACCEPT_RA_PINFO,
157         DEVCONF_ACCEPT_RA_RTR_PREF,
158         DEVCONF_RTR_PROBE_INTERVAL,
159         DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN,
160         DEVCONF_PROXY_NDP,
161         DEVCONF_OPTIMISTIC_DAD,
162         DEVCONF_ACCEPT_SOURCE_ROUTE,
163         DEVCONF_MC_FORWARDING,
164         DEVCONF_DISABLE_IPV6,
165         DEVCONF_ACCEPT_DAD,
166         DEVCONF_FORCE_TLLAO,
167         DEVCONF_NDISC_NOTIFY,
168         DEVCONF_MLDV1_UNSOLICITED_REPORT_INTERVAL,
169         DEVCONF_MLDV2_UNSOLICITED_REPORT_INTERVAL,
170         DEVCONF_SUPPRESS_FRAG_NDISC,
171         DEVCONF_ACCEPT_RA_FROM_LOCAL,
172         DEVCONF_USE_OPTIMISTIC,
173         DEVCONF_ACCEPT_RA_MTU,
174         DEVCONF_STABLE_SECRET,
175         DEVCONF_USE_OIF_ADDRS_ONLY,
176         DEVCONF_ACCEPT_RA_MIN_HOP_LIMIT,
177         DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN,
178         DEVCONF_DROP_UNICAST_IN_L2_MULTICAST,
179         DEVCONF_DROP_UNSOLICITED_NA,
180         DEVCONF_KEEP_ADDR_ON_DOWN,
181         DEVCONF_RTR_SOLICIT_MAX_INTERVAL,
182         DEVCONF_SEG6_ENABLED,
183         DEVCONF_SEG6_REQUIRE_HMAC,
184         DEVCONF_ENHANCED_DAD,
185         DEVCONF_ADDR_GEN_MODE,
186         DEVCONF_MAX
187 };
188 
189 
190 #endif /* _UAPI_IPV6_H */
191 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp