summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2009-02-17 07:59:15 +0100
committerMichael Brown2009-02-17 07:59:15 +0100
commit06b5132fdcac6b79ccf2f97de658235b28610bd7 (patch)
tree0cc30bc01362f054109ef2b029f54cc4989f9a18 /src/include
parent[comboot] Implement INT 22h AX=001Bh (Cleanup, shuffle, and boot to real mode) (diff)
downloadipxe-06b5132fdcac6b79ccf2f97de658235b28610bd7.tar.gz
ipxe-06b5132fdcac6b79ccf2f97de658235b28610bd7.tar.xz
ipxe-06b5132fdcac6b79ccf2f97de658235b28610bd7.zip
[icmp] Add support for responding to pings
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gpxe/errfile.h1
-rw-r--r--src/include/gpxe/icmp.h23
2 files changed, 24 insertions, 0 deletions
diff --git a/src/include/gpxe/errfile.h b/src/include/gpxe/errfile.h
index 90c21a7e3..a6181453e 100644
--- a/src/include/gpxe/errfile.h
+++ b/src/include/gpxe/errfile.h
@@ -139,6 +139,7 @@
#define ERRFILE_slam ( ERRFILE_NET | 0x00160000 )
#define ERRFILE_ib_sma ( ERRFILE_NET | 0x00170000 )
#define ERRFILE_ib_packet ( ERRFILE_NET | 0x00180000 )
+#define ERRFILE_icmp ( ERRFILE_NET | 0x00190000 )
#define ERRFILE_image ( ERRFILE_IMAGE | 0x00000000 )
#define ERRFILE_elf ( ERRFILE_IMAGE | 0x00010000 )
diff --git a/src/include/gpxe/icmp.h b/src/include/gpxe/icmp.h
new file mode 100644
index 000000000..49ade2f2e
--- /dev/null
+++ b/src/include/gpxe/icmp.h
@@ -0,0 +1,23 @@
+#ifndef _GPXE_ICMP_H
+#define _GPXE_ICMP_H
+
+/** @file
+ *
+ * ICMP protocol
+ *
+ */
+
+/** An ICMP header */
+struct icmp_header {
+ /** Type */
+ uint8_t type;
+ /** Code */
+ uint8_t code;
+ /** Checksum */
+ uint16_t chksum;
+} __attribute__ (( packed ));
+
+#define ICMP_ECHO_RESPONSE 0
+#define ICMP_ECHO_REQUEST 8
+
+#endif /* _GPXE_ICMP_H */