mirror of
https://github.com/ipxe/ipxe
synced 2025-12-26 17:42:47 +03:00
[icmp] Add support for responding to pings
This commit is contained in:
@@ -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 )
|
||||
|
||||
23
src/include/gpxe/icmp.h
Normal file
23
src/include/gpxe/icmp.h
Normal file
@@ -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 */
|
||||
Reference in New Issue
Block a user