hc
2024-05-10 61598093bbdd283a7edc367d900f223070ead8d2
kernel/include/uapi/linux/icmp.h
....@@ -19,6 +19,7 @@
1919 #define _UAPI_LINUX_ICMP_H
2020
2121 #include <linux/types.h>
22
+#include <asm/byteorder.h>
2223
2324 #define ICMP_ECHOREPLY 0 /* Echo Reply */
2425 #define ICMP_DEST_UNREACH 3 /* Destination Unreachable */
....@@ -95,5 +96,26 @@
9596 __u32 data;
9697 };
9798
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
+};
98120
99121 #endif /* _UAPI_LINUX_ICMP_H */