1 #ifndef _LINUX_ICMPV6_H
2 #define _LINUX_ICMPV6_H
4 #include <asm/byteorder.h>
23 struct icmpv6_nd_advt
{
24 #if defined(__LITTLE_ENDIAN_BITFIELD)
30 #elif defined(__BIG_ENDIAN_BITFIELD)
36 #error "Please fix <asm/byteorder.h>"
42 #if defined(__LITTLE_ENDIAN_BITFIELD)
47 #elif defined(__BIG_ENDIAN_BITFIELD)
52 #error "Please fix <asm/byteorder.h>"
59 #define icmp6_identifier icmp6_dataun.u_echo.identifier
60 #define icmp6_sequence icmp6_dataun.u_echo.sequence
61 #define icmp6_pointer icmp6_dataun.un_data32[0]
62 #define icmp6_mtu icmp6_dataun.un_data32[0]
63 #define icmp6_unused icmp6_dataun.un_data32[0]
64 #define icmp6_maxdelay icmp6_dataun.un_data16[0]
65 #define icmp6_router icmp6_dataun.u_nd_advt.router
66 #define icmp6_solicited icmp6_dataun.u_nd_advt.solicited
67 #define icmp6_override icmp6_dataun.u_nd_advt.override
68 #define icmp6_ndiscreserved icmp6_dataun.u_nd_advt.reserved
69 #define icmp6_hop_limit icmp6_dataun.u_nd_ra.hop_limit
70 #define icmp6_addrconf_managed icmp6_dataun.u_nd_ra.managed
71 #define icmp6_addrconf_other icmp6_dataun.u_nd_ra.other
72 #define icmp6_rt_lifetime icmp6_dataun.u_nd_ra.rt_lifetime
76 #define ICMPV6_DEST_UNREACH 1
77 #define ICMPV6_PKT_TOOBIG 2
78 #define ICMPV6_TIME_EXCEED 3
79 #define ICMPV6_PARAMPROB 4
81 #define ICMPV6_INFOMSG_MASK 0x80
83 #define ICMPV6_ECHO_REQUEST 128
84 #define ICMPV6_ECHO_REPLY 129
85 #define ICMPV6_MGM_QUERY 130
86 #define ICMPV6_MGM_REPORT 131
87 #define ICMPV6_MGM_REDUCTION 132
90 * Codes for Destination Unreachable
92 #define ICMPV6_NOROUTE 0
93 #define ICMPV6_ADM_PROHIBITED 1
94 #define ICMPV6_NOT_NEIGHBOUR 2
95 #define ICMPV6_ADDR_UNREACH 3
96 #define ICMPV6_PORT_UNREACH 4
99 * Codes for Time Exceeded
101 #define ICMPV6_EXC_HOPLIMIT 0
102 #define ICMPV6_EXC_FRAGTIME 1
105 * Codes for Parameter Problem
107 #define ICMPV6_HDR_FIELD 0
108 #define ICMPV6_UNK_NEXTHDR 1
109 #define ICMPV6_UNK_OPTION 2
112 * constants for (set|get)sockopt
115 #define ICMPV6_FILTER 1
121 #define ICMPV6_FILTER_BLOCK 1
122 #define ICMPV6_FILTER_PASS 2
123 #define ICMPV6_FILTER_BLOCKOTHERS 3
124 #define ICMPV6_FILTER_PASSONLY 4
126 struct icmp6_filter
{
132 #include <linux/netdevice.h>
133 #include <linux/skbuff.h>
136 extern void icmpv6_send(struct sk_buff
*skb
,
139 struct net_device
*dev
);
141 extern int icmpv6_init(struct net_proto_family
*ops
);
142 extern int icmpv6_err_convert(int type
, int code
,
144 extern void icmpv6_cleanup(void);
145 extern void icmpv6_param_prob(struct sk_buff
*skb
,
146 int code
, void *pos
);