⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ldppdu.h

📁 技术文件名称:MPLSv1.0软件模块测试规程
💻 H
字号:
#ifndef LDPPDU_H                                                              
#define LDPPDU_H 

#include "_noalign.h"

#define LDP_TCP_MSG_HEADSIZE   sizeof(LDP_TCP_MSG)

#define LDPMSG_COMMHEADSIZE (sizeof(LDPMSG_COMM)-MAX_LDP_MSGLEN)

#define MAX_PDU_LENGTH				4096
#define MAX_LDP_MSGLEN          	5000 /* PROT_UDP、TCP消息用 */
#define LDP_PORT    				646         /* LDP communication port */


#define MPLS_COM_EVENT_BASE                4600
#define TCP_CONNECT_REQ     (MPLS_COM_EVENT_BASE+0x01)     /* TCP connect request */
#define TCP_CONNECT_IND     (MPLS_COM_EVENT_BASE+0x02)     /* TCP connect indicate */
#define TCP_RELEASE_REQ     (MPLS_COM_EVENT_BASE+0x03)     /* TCP close request */
#define TCP_RELEASE_IND     (MPLS_COM_EVENT_BASE+0x04)     /* TCP close indicate */
#define MSG_SEND_REQ        (MPLS_COM_EVENT_BASE+0x05)     /* Message send request */
#define MSG_RECV_IND        (MPLS_COM_EVENT_BASE+0x06)     /* Message receive indicate */
#define RCV_RELEASE_MSG     (MPLS_COM_EVENT_BASE+0x07)     /* tcp release mess ack */

/*   Modified by xgxu--Xu XiaoGang:20020708                */
/*   add a new message type between LDP and Buffer Control */
#define LDP_BUF_MSG_ACK     (MPLS_COM_EVENT_BASE + 0x08)   /* message ack between ldp and Buffer*/

/* 
 * TCP connect structure
 * use for TCP_CONNECT_REQ, TCP_CONNECT_IND, TCP_RELEASE_REQ, TCP_RELEASE_IND
 * only TCP_CONNECT_REQ not use port fields
 */
typedef struct tagTCP_CONNECT_MSG
{
	unsigned long	LocalIpaddr;			/* all zero is unspecfic */
	unsigned short  LocalPort;
	unsigned long	PeerIpaddr;
	unsigned short  PeerPort;
}MPLS_PACK TCP_CONNECT_MSG;

typedef struct tagLDPMSG_COMM
{
	int	    ProtType;			    /* PROT_UDP(17), PROT_TCP(6) */
	unsigned long	LocalIpaddr;    	    /* Source IP address */
	unsigned short  LocalPort;
	unsigned long	PeerIpaddr;			    /* Destination IP address, note broadcast or multicast */
	unsigned short  PeerPort;
	unsigned short  pdulen;				    /* LDP message PDU length */
    unsigned char   pdu[MAX_LDP_MSGLEN];	/* LDP message PDU */
	unsigned long   SequenceNum;               /* returned by LDP to be used by buffer Control--xgxu*/
    unsigned long   index;                  /* for performance */
}MPLS_PACK LDPMSG_COMM;

/* LDP message structure */
typedef struct tagLDP_TCP_MSG
{
    unsigned short  version;     
    unsigned short  datalen; 
}MPLS_PACK LDP_TCP_MSG;

/* 回确认的结构 */
typedef struct {
    unsigned long      SequenceNum;          
} MPLS_PACK REQ_CONF;    


#include "_restore.h"

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -