📄 icmp.h
字号:
/****************************************Copyright (c)**************************************************
** Guangzou ZLG-MCU Development Co.,LTD.
** graduate school
** http://www.zlgmcu.com
**
**--------------File Info-------------------------------------------------------------------------------
** File Name: dhcp.h
** Last modified Date: 2004-11-27
** Last Version: 1.0
** Descriptions: DHCP HEAD FILE
**
**------------------------------------------------------------------------------------------------------
** Created By: Yehaoben
** Created date: 2004-11-27
** Version: 1.0
** Descriptions: First version
**
**------------------------------------------------------------------------------------------------------
** Modified by:
** Modified date:
** Version:
** Descriptions:
**
********************************************************************************************************/
#ifdef ICMP_GLOBALS
#define ICMP_EXT
#else
#define ICMP_EXT extern
#endif
/********************************************************************************************************
** Structure Define
********************************************************************************************************/
typedef struct {/*包含在IP包中,是IP的上层为0X01的应用*/
uint8 type; /*0X08 PING请求 0X00 PING应答*/
uint8 option; /*0X00 PING*/
uint16 Crc;
uint16 id;
uint16 seq;
uint8 icmpdata[32];
}icmp;
union icmp_rc {
icmp e_icmp;
struct {uint16 wordbuf[20];}words;
};
typedef struct { //ipethernet etf;
union ip_rc ipf;
union icmp_rc icmpf;
}icmppro;
/********************************************************************************************************
** Global Variables Define
********************************************************************************************************/
ICMP_EXT union icmp_rc IcmpPacked;
/********************************************************************************************************
** Function Define
********************************************************************************************************/
ICMP_EXT uint16 CreateIcmpCrc(union icmp_rc) ;
ICMP_EXT uint8 send_icmp_packed( uint8 * ICMPSENDPTR);
ICMP_EXT void icmp_process(uint8 * ICMPSENDPTR,uint8 num) ;
ICMP_EXT void Ping_Precess(uint8 * de_ip,uint8 * so_ip);
ICMP_EXT void Icmp_Send(uint8 type,uint8 option,uint8 *so_ip,uint8 *de_ip, uint8 * REC_FRAME );
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -