-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathicmp.h
28 lines (26 loc) · 1.1 KB
/
icmp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//********************************************************************************************
//
// File : icmp.h implement for Internet Control Message Protocol
//
//********************************************************************************************
#define ICMP_TYPE_ECHOREPLY_V 0
#define ICMP_TYPE_ECHOREQUEST_V 8
#define ICMP_PACKET_LEN 40
// icmp buffer position
#define ICMP_TYPE_P 0x22
#define ICMP_CODE_P 0x23
#define ICMP_CHECKSUM_H_P 0x24
#define ICMP_CHECKSUM_L_P 0x25
#define ICMP_IDENTIFIER_H_P 0x26
#define ICMP_IDENTIFIER_L_P 0x27
#define ICMP_SEQUENCE_H_P 0x28
#define ICMP_SEQUENCE_L_P 0x29
#define ICMP_DATA_P 0x2A
//********************************************************************************************
//
// Prototype function
//
//********************************************************************************************
extern BYTE icmp_send_reply ( BYTE *rxtx_buffer, BYTE *dest_mac, BYTE *dest_ip );
extern void icmp_send_request ( BYTE *rxtx_buffer, BYTE *dest_mac, BYTE *dest_ip );
extern BYTE icmp_ping ( BYTE *rxtx_buffer, BYTE *dest_mac, BYTE *dest_ip );