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

📄 pgpnetkernelxchng.h

📁 PGP8.0源码 请认真阅读您的文件包然后写出其具体功能
💻 H
字号:
/*____________________________________________________________________________
	Copyright (C) 2002 PGP Corporation
	All rights reserved.

	$Id: pgpNetKernelXChng.h,v 1.47 2002/08/06 20:10:25 dallen Exp $
____________________________________________________________________________*/

#ifndef Included_pgpNetKernelXChng_h
#define Included_pgpNetKernelXChng_h

#include "pgpIKE.h"


/*
 * These are the messages that the kernel sends to the service
 */
#if PGP_WIN32
#pragma pack(push, 8)
#endif

typedef struct _PGPnetSAUserData {
	PGPUInt32		packetsSent; 			/* sent packet count for this SA */
	PGPUInt32		packetsReceived;		/* received packet count */
	PGPUInt32		bytesSent;				/* sent byte count for this SA */
	PGPUInt32		bytesReceived;			/* received byte count */
	PGPUInt32		lastPacketsSent;		/* packetsSent last time stats were sent */
	PGPUInt32		lastPacketsReceived;	/* packetsReceived last time stats were sent */
	PGPUInt32		sequenceWindowUpper;	/* replay attacks */
	PGPUInt32		sequenceWindowLower;	/* replay attacks */
	PGPUInt32		sequenceWindow;			/* replay attacks */
	PGPBoolean		reKeyInProgress;
	PGPByte			ethBuffer[6];			/* for saving the ethernet address of a gateway */
	PGPUInt32		ourAddress;				/* for mode-cfg purposes */
	PGPBoolean		bRemoteValid;			/* remote side had valid key */
#if defined(CHICAGO) || defined(PGP_UNIX)
	PGPUInt32		birthTime;
#else
	PGPInt64		birthTime;
#endif
	PGPUInt16		growth;					/* largest packet growth */
	PGPInt32		mtu;					/* mtu for SA's route */
	PGPInt32		maxMTU;					/* max mtu that this sa is allowed to use */
} PGPnetSAUserData;

enum _PGPnetKernelMsgType
{
	PGPnetMessageHeaderType = 0,
	PGPnetMessageICMPType,
	PGPnetMessageSARequest,
	PGPnetMessageSARekey,
	PGPnetMessageSADied,
	PGPnetMessageError,
	PGPnetMessageRASdisconnect,
	PGPnetMessageRASconnect,
	PGPnetMessageAttack,
	PGPnetMessageAttackPacket,
	PGPnetMessageAttackPacketMore,
	PGPnetMessageSpoof,
	PGPnetMessageRuleLog,
	PGPnetMessageDebug,
	PGPnetMessageConnect,
	PGPnetMessageSendDG,
	PGPnetMessageRecvDG,
	PGPnetMessageBind,
	PGPnetMessageListen,
	PGPnetMessageAccept,
	PGPnetMessageSendICMP,
	PGPnetMessageRecvICMP,
	PGPnetMessageTransient,
	PGPnetMessageStats,
	PGPnetMessageReserved,

	PGP_ENUM_FORCE(_PGPnetKernelMsgType)

};
PGPENUM_TYPEDEF( _PGPnetKernelMsgType, PGPnetKernelMsgType );


typedef struct _PGPnetStat {
	PGPipsecSPI spi;
	PGPUInt32	packetsSent;
	PGPUInt32	packetsReceived;
	PGPUInt32	bytesSent;
	PGPUInt32	bytesReceived;
} PGPnetStat;



typedef struct _PGPnetSARequestMsg {
	PGPnetKernelMsgType		msgType; 
	PGPUInt32				ipAddress;
	PGPUInt32				ipAddrStart;
	PGPUInt32				ipMaskEnd;
	PGPBoolean				destIsRange;
	PGPUInt16				port;
	PGPByte					protocol;
	PGPUInt32				localIPaddress;
} PGPnetSARequestMsg;

typedef struct _PGPnetSADiedMsg {
	PGPnetKernelMsgType		msgType; 
	PGPipsecSPI				spi;
} PGPnetSADiedMsg, PGPnetSARekeyMsg;

typedef struct _PGPnetErrorMsg {
	PGPnetKernelMsgType		msgType; 
	PGPUInt32				errorCode;
	PGPUInt32				ipAddress;
	char					msg[256];
} PGPnetErrorMsg;

typedef struct _PGPnetAttackMsg {
	PGPnetKernelMsgType		msgType; 
	PGPUInt32				attackType;
	PGPUInt32				ipAddress;
} PGPnetAttackMsg;

typedef struct _PGPnetSpoofMsg {
	PGPnetKernelMsgType	msgType;
	PGPUInt32			processID;
    PGPUInt32			nboRemoteIP;
    PGPUInt16			nboRemotePort;
    PGPUInt32			nboLocalIP;
    PGPUInt16			nboLocalPort;
    PGPUInt8			protocol;
} PGPnetSpoofMsg;

typedef struct _PGPnetLogMsg {
	PGPnetKernelMsgType	msgType;
	PGPInt32			ruleIndex;
    PGPUInt32			nboRemoteIP;
    PGPUInt16			nboRemotePort;
    PGPUInt32			nboLocalIP;
    PGPUInt16			nboLocalPort;
    PGPUInt8			protocol;
	PGPBoolean			inbound;
	PGPBoolean			permit;
} PGPnetLogMsg;

typedef struct _PGPnetStatsMsg {
	PGPnetKernelMsgType	msgType;
	PGPSize				numStats;
	PGPnetStat			stats[1];	/*	Array of numStats structures	*/
} PGPnetStatsMsg;

#if PGP_WIN32
#define kPGPnetAttackPacketDataSize	65000
#else
#define kPGPnetAttackPacketDataSize 65535
#endif

typedef struct _PGPnetAttackPacketMsg {
	PGPnetKernelMsgType		msgType; 
	PGPUInt32				attackType;
	PGPUInt32				ipAddress;
	PGPUInt32				id;
	PGPUInt32				completeSize;
	PGPUInt32				packetDataSize;
	PGPByte					packetData[1];
} PGPnetAttackPacketMsg;

typedef struct _PGPnetDebugMsg {
	PGPnetKernelMsgType		msgType;
	PGPByte					data[1024];
} PGPnetDebugMsg;

typedef struct _PGPnet_ICMP_Message {
	PGPnetKernelMsgType		msgType; 
	PGPUInt32				data;
} PGPnet_ICMP_Message, PGPnetTransientMsg;

typedef struct _PGPnetTdiMsg {
	PGPnetKernelMsgType	msgType;
	PGPBoolean			bAllowConnect;
	PGPUInt32			processID;
    PGPUInt32			nboRemoteIP;
    PGPUInt16			nboRemotePort;
    PGPUInt32			nboLocalIP;
    PGPUInt16			nboLocalPort;
    PGPUInt8			protocol;
	PGPBoolean			bIsBlocked;
} PGPnetTdiMsg;

/*
 * These are the messages that the service sends to the kernel.
 * This isn't a complete list, since come messages send "simple"
 * types (like complete ikeSA structures, or PGPUInts)
 */
typedef struct _PGPnetKernelConfig {
	PGPBoolean		bPGPnetEnabled;
	PGPUInt32		uUnconfiguredMode;
	PGPBoolean		bReplayDetection;
	PGPBoolean		bIntrusionDetection;
	PGPBoolean		bAutoBlockAttacks;
	PGPBoolean		bPGPnetFirewallEnabled;
	PGPBoolean		bFireLearnMode;
	PGPBoolean		bPGPnetVPNEnabled;
	PGPBoolean		bFireInstalled;
	PGPBoolean		bVpnInstalled;
	PGPBoolean		bViInstalled;
	PGPBoolean		bLogAllowed;
	PGPBoolean		bLogBlocked;
	PGPUInt32		uSubnetTrustOption;
} PGPnetKernelConfig;

typedef struct _PGPnetKernelHost
{
	PGPUInt32		hostType;
	PGPUInt32		ipAddrStart;
	PGPUInt32		ipMaskEnd;
	PGPUInt32		ourAddress;
	PGPInt32		childOf;
	PGPByte			ethBuffer[6];
	PGPBoolean		autoConnect;
	PGPBoolean		virtualIP;
	PGPBoolean		destIsRange;
	PGPBoolean		exclusiveGateway;
} PGPnetKernelHost;

typedef struct _PGPnetIPinfo
{
	PGPUInt32	ipAddress;
	PGPUInt32	ipMask;
} PGPnetIPinfo;


#if PGP_WIN32
#pragma pack(pop)
#endif

#endif /* Included_pgpNetKernelXChng_h */

⌨️ 快捷键说明

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