.. | .. |
---|
19 | 19 | #define _UAPI_LINUX_ICMP_H |
---|
20 | 20 | |
---|
21 | 21 | #include <linux/types.h> |
---|
| 22 | +#include <asm/byteorder.h> |
---|
22 | 23 | |
---|
23 | 24 | #define ICMP_ECHOREPLY 0 /* Echo Reply */ |
---|
24 | 25 | #define ICMP_DEST_UNREACH 3 /* Destination Unreachable */ |
---|
.. | .. |
---|
95 | 96 | __u32 data; |
---|
96 | 97 | }; |
---|
97 | 98 | |
---|
| 99 | +/* RFC 4884 extension struct: one per message */ |
---|
| 100 | +struct icmp_ext_hdr { |
---|
| 101 | +#if defined(__LITTLE_ENDIAN_BITFIELD) |
---|
| 102 | + __u8 reserved1:4, |
---|
| 103 | + version:4; |
---|
| 104 | +#elif defined(__BIG_ENDIAN_BITFIELD) |
---|
| 105 | + __u8 version:4, |
---|
| 106 | + reserved1:4; |
---|
| 107 | +#else |
---|
| 108 | +#error "Please fix <asm/byteorder.h>" |
---|
| 109 | +#endif |
---|
| 110 | + __u8 reserved2; |
---|
| 111 | + __sum16 checksum; |
---|
| 112 | +}; |
---|
| 113 | + |
---|
| 114 | +/* RFC 4884 extension object header: one for each object */ |
---|
| 115 | +struct icmp_extobj_hdr { |
---|
| 116 | + __be16 length; |
---|
| 117 | + __u8 class_num; |
---|
| 118 | + __u8 class_type; |
---|
| 119 | +}; |
---|
98 | 120 | |
---|
99 | 121 | #endif /* _UAPI_LINUX_ICMP_H */ |
---|