Ditch the sysvinit stuff
[profile/ivi/iputils.git] / ping6_niquery.h
1 #include <asm/byteorder.h>
2
3 /* Node Information Query */
4 struct ni_hdr {
5         struct icmp6_hdr                ni_u;
6         __u8                            ni_nonce[8];
7 };
8
9 #define ni_type         ni_u.icmp6_type
10 #define ni_code         ni_u.icmp6_code
11 #define ni_cksum        ni_u.icmp6_cksum
12 #define ni_qtype        ni_u.icmp6_data16[0]
13 #define ni_flags        ni_u.icmp6_data16[1]
14
15 /* Types */
16 #ifndef ICMPV6_NI_QUERY
17 # define ICMPV6_NI_QUERY                139
18 # define ICMPV6_NI_REPLY                140
19 #endif
20
21 /* Query Codes */
22 #define NI_SUBJ_IPV6                    0
23 #define NI_SUBJ_NAME                    1
24 #define NI_SUBJ_IPV4                    2
25
26 /* Reply Codes */
27 #define NI_SUCCESS                      0
28 #define NI_REFUSED                      1
29 #define NI_UNKNOWN                      2
30
31 /* Qtypes */
32 #define NI_QTYPE_NOOP                   0
33 #define NI_QTYPE_NAME                   2
34 #define NI_QTYPE_IPV6ADDR               3
35 #define NI_QTYPE_IPV4ADDR               4
36
37 /* Flags */
38 #define NI_IPV6ADDR_F_TRUNCATE          __constant_cpu_to_be16(0x0001)
39 #define NI_IPV6ADDR_F_ALL               __constant_cpu_to_be16(0x0002)
40 #define NI_IPV6ADDR_F_COMPAT            __constant_cpu_to_be16(0x0004)
41 #define NI_IPV6ADDR_F_LINKLOCAL         __constant_cpu_to_be16(0x0008)
42 #define NI_IPV6ADDR_F_SITELOCAL         __constant_cpu_to_be16(0x0010)
43 #define NI_IPV6ADDR_F_GLOBAL            __constant_cpu_to_be16(0x0020)
44
45 #define NI_IPV4ADDR_F_TRUNCATE          NI_IPV6ADDR_F_TRUNCATE
46 #define NI_IPV4ADDR_F_ALL               NI_IPV6ADDR_F_ALL
47