[icmp] Add support for responding to pings
[people/lynusvaz/gpxe.git] / src / include / gpxe / icmp.h
1 #ifndef _GPXE_ICMP_H
2 #define _GPXE_ICMP_H
3
4 /** @file
5  *
6  * ICMP protocol
7  *
8  */
9
10 /** An ICMP header */
11 struct icmp_header {
12         /** Type */
13         uint8_t type;
14         /** Code */
15         uint8_t code;
16         /** Checksum */
17         uint16_t chksum;
18 } __attribute__ (( packed ));
19
20 #define ICMP_ECHO_RESPONSE 0
21 #define ICMP_ECHO_REQUEST 8
22
23 #endif /* _GPXE_ICMP_H */