~ubuntu-branches/ubuntu/trusty/libnl3/trusty

« back to all changes in this revision

Viewing changes to include/linux/ipv6.h

  • Committer: Bazaar Package Importer
  • Author(s): Heiko Stuebner
  • Date: 2011-05-21 19:25:13 UTC
  • Revision ID: james.westby@ubuntu.com-20110521192513-1ieyu9w9kym4bt16
Tags: upstream-3.0
ImportĀ upstreamĀ versionĀ 3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _IPV6_H
 
2
#define _IPV6_H
 
3
 
 
4
/* The latest drafts declared increase in minimal mtu up to 1280. */
 
5
 
 
6
#define IPV6_MIN_MTU    1280
 
7
 
 
8
/*
 
9
 *      Advanced API
 
10
 *      source interface/address selection, source routing, etc...
 
11
 *      *under construction*
 
12
 */
 
13
 
 
14
 
 
15
struct in6_ifreq {
 
16
        struct in6_addr ifr6_addr;
 
17
        __u32           ifr6_prefixlen;
 
18
        int             ifr6_ifindex; 
 
19
};
 
20
 
 
21
#define IPV6_SRCRT_STRICT       0x01    /* Deprecated; will be removed */
 
22
#define IPV6_SRCRT_TYPE_0       0       /* Deprecated; will be removed */
 
23
#define IPV6_SRCRT_TYPE_2       2       /* IPv6 type 2 Routing Header   */
 
24
 
 
25
/*
 
26
 *      routing header
 
27
 */
 
28
struct ipv6_rt_hdr {
 
29
        __u8            nexthdr;
 
30
        __u8            hdrlen;
 
31
        __u8            type;
 
32
        __u8            segments_left;
 
33
 
 
34
        /*
 
35
         *      type specific data
 
36
         *      variable length field
 
37
         */
 
38
};
 
39
 
 
40
 
 
41
struct ipv6_opt_hdr {
 
42
        __u8            nexthdr;
 
43
        __u8            hdrlen;
 
44
        /* 
 
45
         * TLV encoded option data follows.
 
46
         */
 
47
} __attribute__((packed));      /* required for some archs */
 
48
 
 
49
#define ipv6_destopt_hdr ipv6_opt_hdr
 
50
#define ipv6_hopopt_hdr  ipv6_opt_hdr
 
51
 
 
52
/*
 
53
 *      routing header type 0 (used in cmsghdr struct)
 
54
 */
 
55
 
 
56
struct rt0_hdr {
 
57
        struct ipv6_rt_hdr      rt_hdr;
 
58
        __u32                   reserved;
 
59
        struct in6_addr         addr[0];
 
60
 
 
61
#define rt0_type                rt_hdr.type
 
62
};
 
63
 
 
64
/*
 
65
 *      routing header type 2
 
66
 */
 
67
 
 
68
struct rt2_hdr {
 
69
        struct ipv6_rt_hdr      rt_hdr;
 
70
        __u32                   reserved;
 
71
        struct in6_addr         addr;
 
72
 
 
73
#define rt2_type                rt_hdr.type
 
74
};
 
75
 
 
76
/*
 
77
 *      home address option in destination options header
 
78
 */
 
79
 
 
80
struct ipv6_destopt_hao {
 
81
        __u8                    type;
 
82
        __u8                    length;
 
83
        struct in6_addr         addr;
 
84
} __attribute__((packed));
 
85
 
 
86
/* index values for the variables in ipv6_devconf */
 
87
enum {
 
88
        DEVCONF_FORWARDING = 0,
 
89
        DEVCONF_HOPLIMIT,
 
90
        DEVCONF_MTU6,
 
91
        DEVCONF_ACCEPT_RA,
 
92
        DEVCONF_ACCEPT_REDIRECTS,
 
93
        DEVCONF_AUTOCONF,
 
94
        DEVCONF_DAD_TRANSMITS,
 
95
        DEVCONF_RTR_SOLICITS,
 
96
        DEVCONF_RTR_SOLICIT_INTERVAL,
 
97
        DEVCONF_RTR_SOLICIT_DELAY,
 
98
        DEVCONF_USE_TEMPADDR,
 
99
        DEVCONF_TEMP_VALID_LFT,
 
100
        DEVCONF_TEMP_PREFERED_LFT,
 
101
        DEVCONF_REGEN_MAX_RETRY,
 
102
        DEVCONF_MAX_DESYNC_FACTOR,
 
103
        DEVCONF_MAX_ADDRESSES,
 
104
        DEVCONF_FORCE_MLD_VERSION,
 
105
        DEVCONF_ACCEPT_RA_DEFRTR,
 
106
        DEVCONF_ACCEPT_RA_PINFO,
 
107
        DEVCONF_ACCEPT_RA_RTR_PREF,
 
108
        DEVCONF_RTR_PROBE_INTERVAL,
 
109
        DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN,
 
110
        DEVCONF_PROXY_NDP,
 
111
        DEVCONF_OPTIMISTIC_DAD,
 
112
        DEVCONF_ACCEPT_SOURCE_ROUTE,
 
113
        DEVCONF_MC_FORWARDING,
 
114
        DEVCONF_DISABLE_IPV6,
 
115
        DEVCONF_ACCEPT_DAD,
 
116
        DEVCONF_FORCE_TLLAO,
 
117
        DEVCONF_MAX
 
118
};
 
119
 
 
120
#endif /* _IPV6_H */