?? zl5011xpacketloopback.h
字號:
/******************************************************************************
*
* File name: zl5011xPacketLoopback.h
*
* Version: 2
*
* Author: MRC
*
* Date created: 21/02/2003
*
* Copyright 2002, 2003, 2004, 2005, Zarlink Semiconductor Limited.
* All rights reserved.
*
* Module Description:
*
* This is the header file for the packet loopback functions.
*
* Revision History:
*
* Rev: Date: Author: Comments:
* 1 21/02/2003 MRC Initial revision
* 2 05/06/2003 MRC Fixed packet loopback function
*
******************************************************************************/
#ifndef _ZL5011X_PACKET_LOOPBACK_H
#define _ZL5011X_PACKET_LOOPBACK_H
#ifdef __cplusplus
extern "C" {
#endif
/***************** INCLUDE FILES *****************************************/
/***************** MACROS ************************************************/
#define ZL5011X_PKT_ETHERNET_HDR_LEN 14 /* Number of bytes in ethernet header */
#define ZL5011X_PKT_ETHERTYPE_LEN 2 /* Number of bytes in ethertype */
#define ZL5011X_PKT_VLAN_HDR_LEN 4 /* Number of bytes in VLAN header */
#define ZL5011X_PKT_MPLS_HDR_LEN 4 /* Number of bytes in MPLS header */
#define ZL5011X_PKT_IPV4_HDR_LEN 20 /* Number of bytes in IP v4 header */
#define ZL5011X_PKT_UDP_HDR_LEN 8 /* Number of bytes in UDP header */
#define ZL5011X_PKT_IPV4_IDENT_POS 4 /* -from start of IP hdr (8-bit bytes) */
#define ZL5011X_PKT_IPV4_LEN_POS 2 /* -from start of IP hdr (8-bit bytes) */
#define ZL5011X_PKT_UDP_LEN_POS 4 /* -from start of UDP hdr (8-bit bytes) */
#define ZL5011X_PKT_IPV4_CHKSUM_POS 10 /* -from start of IP hdr (8-bit bytes) */
#define ZL5011X_PKT_UDP_CHKSUM_POS 6 /* -from start of UDP hdr (8-bit bytes) */
#define ZL5011X_LOOPBACK_CONTEXT_NUMBER 127
/***************** FUNCTION DECLARATIONS **********************************/
zlStatusE zl5011xPacketTxLoopback(zl5011xParamsS *zl5011xParams,
zl5011xPacketLoopbackConfigS *par);
zlStatusE zl5011xPacketRxLoopback(zl5011xParamsS *zl5011xParams,
zl5011xPacketLoopbackConfigS *par, zl5011xBooleanE unmatchedProtocol);
zlStatusE zl5011xLoopbackUpdateIPChecksum(zl5011xLanTxSetLayer2and3HeaderS *layer2and3Header,
zl5011xPacketLoopbackConfigS * par);
zlStatusE zl5011xLoopbackCopyHeaders(zl5011xLanTxSetLayer2and3HeaderS *layer2and3Header,
zl5011xPacketLoopbackConfigS * par);
#ifdef __cplusplus
}
#endif
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -