📄 ping.h
字号:
/**
* \addtogroup ping
* @{
*/
/**
* \file
* \brief PING implementation header file
* \author glyin <glyin@fameg.com>
*/
/*
******************************************************************************
*
Copyright (c) 2006 FameG Shanghai, Inc. All rights reserved.
*
This is unpublished proprietary source code of FameG Shanghai, Inc.
*
The copyright notice above does not evidence any actual or intended
*
publication of such source code.
******************************************************************************
*/
/*
******************************************************************************
*
Project: T4 L4MCU FPGA verification
*
Filename: ping.h
*
Date: 17/03/06
*
Purpose: Ping functions for L4MCU (Keil C Compiler)
*
Author: Guanglei Yin
******************************************************************************
*/
#ifndef __PING_H__
#define __PING_H__
#include "user_config.h"
#include "kernel/system.h"
#include "hw/delay.h"
#if INCLUDE_PING_APP
/*****************************************************************************
* CONSTANT DEFINES *
*****************************************************************************/
/*!\brief max ping buffer length.
*/
#define MAX_PINGBUF_LEN TX_BUF_LEN-IP_OPTLEN-ICMP_HLEN
/*!\brief default ping buffer length.
*/
#define DEF_PINGBUF_LEN 32
/*!\brief default number of echo requests to send.
*/
#define DEF_PINGSEND_CNT 4
/*!\brief default timeout value to wait reply.
*/
#define DEF_PINGREPLY_TO 1*TIMERTIC//2000
#if IPOPTION
/*!\brief default record timestamp count.
*/
#define DEF_TIMESTAMP_CNT 0
/*!\brief default record router count.
*/
#define DEF_ROUTER_CNT 0
#endif
/*!\brief default ping request count.
*/
#define DEF_PING_CNT 4
#define ICMP_DEF_TTL 128
#define ICMP_DEF_TOS 0
/*****************************************************************************
* MACROS *
*****************************************************************************/
/*****************************************************************************
* DATA TYPES *
*****************************************************************************/
/*****************************************************************************
* FUNCTIONS DECLARATION *
*****************************************************************************/
extern void ping_request(void); //ping request to peer
/*****************************************************************************
* GLOBAL VARIABLES DECLARATION *
*****************************************************************************/
#endif /* INCLUDE_PING_APP */
#endif /*__PING_H__*/
/** @} */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -