Ip.h
资源名称:PPP0208.rar [点击查看]
上传用户:karykuang
上传日期:2010-02-26
资源大小:103k
文件大小:1k
源码类别:
TCP/IP协议栈
开发平台:
Visual C++
- // ICMP_HEADER.h: interface for the ICMP_HEADER class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_ICMP_HEADER_H__D2802035_E3DD_4B94_899D_4F5EE61A8F40__INCLUDED_)
- #define AFX_ICMP_HEADER_H__D2802035_E3DD_4B94_899D_4F5EE61A8F40__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- class ICMP_HEADER
- {
- public:
- BYTE type;
- BYTE code;
- unsigned short sum;
- unsigned short identifier;
- unsigned short sequence;
- public:
- ICMP_HEADER();
- virtual ~ICMP_HEADER();
- };
- class PPP_OPTION
- {
- public:
- BYTE bType;
- BYTE bLength;
- BYTE bData[64];
- BOOL reject;
- public:
- PPP_OPTION();
- virtual ~PPP_OPTION();
- };
- class IP_HEADER
- {
- public:
- BYTE Version; //be 4bits
- BYTE IHL; //be 4bits
- BYTE Service;
- unsigned short TotalLength;
- unsigned short Identification;
- BYTE FLAG;
- unsigned short FlagFrag;
- BYTE TTL;
- BYTE protocol;
- BYTE HeaderSum;
- BYTE SrcIP[4];
- BYTE DesIP[4];
- public:
- IP_HEADER();
- virtual ~IP_HEADER();
- };
- class PPP_UDP
- {
- public:
- unsigned short sourcePort, destinationPort;
- unsigned short UDPlength, UDPchecksum;
- BYTE *UDPdata;
- public:
- PPP_UDP();
- virtual ~PPP_UDP();
- };
- #endif // !defined(AFX_ICMP_HEADER_H__D2802035_E3DD_4B94_899D_4F5EE61A8F40__INCLUDED_)