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

📄 ntpstruct.h

📁 linux程序
💻 H
字号:
#ifndef _NTP_STRUCT_H_
#define _NTP_STRUCT_H_

// #include "NtpTime.h"
// #include "NtpSock.h"
// #define OS_NoError 1
// #define OS_HasError 0
// typedef int OS_Error;


enum CASTTYPE
{
	UNICAST   = 1,
    MULTICAST = 2,
	ANYCAST   = 3,
};
struct CNtpTimePacket
{
    unsigned long m_dwInteger;
	unsigned long m_dwFractional;
};

struct NtpBasicInfo
{
    unsigned char m_LiVnMode;
    unsigned char m_Stratum;
    char m_Poll;
    char m_Precision;
    long m_RootDelay;
    long m_RootDispersion;
    char m_ReferenceID[4];
    CNtpTimePacket m_ReferenceTimestamp;
    CNtpTimePacket m_OriginateTimestamp;
    CNtpTimePacket m_ReceiveTimestamp;
    CNtpTimePacket m_TransmitTimestamp;
};

//The optional part of an NTP packet
struct NtpAuthenticationInfo
{
	unsigned long m_KeyID;
    unsigned char m_MessageDigest[16];
};

//The Full NTP packet
struct NtpFullPacket
{
	NtpBasicInfo          m_Basic;
    NtpAuthenticationInfo m_Auth;
};

#endif

⌨️ 快捷键说明

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