?? ip.h
字號:
#ifdef IP_GLOBALS
#define IP_EXT
#else
#define IP_EXT extern
#endif
#ifdef Big_End
union w { uint32 dwords;
struct {uint16 high ;uint16 low;}words;
struct {uint8 byte3;uint8 byte2;uint8 byte1;uint8 byte0;}bytes;
};
#endif
#ifdef Little_End
union w { uint32 dwords;
struct {uint16 low;uint16 high;}words;
struct {uint8 byte0;uint8 byte1;uint8 byte2;uint8 byte3;}bytes;
};
#endif
typedef struct {
uint8 VerandIphLen; /*版本與頭長度*/
uint8 ServerType; /*服務類型*/
uint16 TotalLen; /*總長度*/
uint16 FrameIndex; /*IP幀序號*/
uint16 Segment; /*分段標志*/
uint8 ttl; /*生存時間*/
uint8 NextProtocal; /*下一層協(xié)議*/
uint16 Crc; /*校驗和*/
uint8 SourceIp[4]; /*源IP*/
uint8 DestId[4]; /*目的IP*/
}eip;
EX_RAM union ip_rc {
eip e_ip;
struct {uint16 wordbuf[10];}words;
};
typedef struct{ uint8 *RecDataPtr;
uint16 length;
uint8 num;
uint8 ip[4];
uint8 My_Ip[4];
}Rec_Ptr;
#define Q_Max_Size 20
//IP_EXT Rec_Ptr RECQ[MAX_REC_BUFF];
IP_EXT void * RecIcmpQ[Q_Max_Size];
IP_EXT void * RecUdpQ[Q_Max_Size];
IP_EXT void * RecTcpQ[Q_Max_Size];
IP_EXT OS_EVENT *RecIcmpQFlag;
IP_EXT OS_EVENT *RecTcpQFlag;
IP_EXT OS_EVENT *RecUdpQFlag;
IP_EXT OS_EVENT *SendFlag;
IP_EXT uint16 CreateIpHeadCrc(uint8 * Ip);// USE_XDATA ;
IP_EXT uint8 Send_Ip_Frame(struct _pkst *TxdData,uint8 * de_ip,uint8 * so_ip,uint8 PROTOCOL);// USE_XDATA keilreentrant ;//keilreentrant ;
IP_EXT uint8 IP_PROCESS(uint8 * RecData,uint8 num);// USE_XDATA keilreentrant ;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -