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