📄 pgpnetlog.h
字号:
/*____________________________________________________________________________
Copyright (C) 2002 PGP Corporation
All rights reserved.
$Id: pgpNetLog.h,v 1.18 2002/08/06 20:10:25 dallen Exp $
____________________________________________________________________________*/
#ifndef Included_pgpNetLog_h
#define Included_pgpNetLog_h
#include "pgpPubTypes.h"
#include "pgpIKE.h"
#include "pgpNetServiceErrors.h"
#include "pgpNetAttack.h"
#include "pgpNetKernelXChng.h"
#include "pflTypes.h"
#ifdef PGP_WIN32
#include <windows.h>
#endif
#ifdef PGP_MACINTOSH
#include "MacFiles.h"
#endif
#define kPGPnetLogFileFormatVersion 5 /* 1=>6.5; 3=>6.5.1, 4=7.0, 5=7.1 */
#define kPGPnetLogMaxNumberOfEvents 16384
#define kPGPnetLogFileNameLength 32 /* Includes null terminator */
#define kPGPnetLogAttackDescLength 48
enum PGPnetLogEventType_
{
kPGPnetLogEvent_First = 0,
kPGPnetLogEvent_None = kPGPnetLogEvent_First,
kPGPnetLogEvent_DebugText,
kPGPnetLogEvent_PGPError,
kPGPnetLogEvent_PGPike,
kPGPnetLogEvent_System,
kPGPnetLogEvent_Service,
kPGPnetLogEvent_IPSEC,
kPGPnetLogEvent_Intrusion,
kPGPnetLogEvent_Traffic,
PGP_ENUM_FORCE(PGPnetLogEventType_)
};
PGPENUM_TYPEDEF(PGPnetLogEventType_, PGPnetLogEventType);
typedef struct
{
PGPUInt32 logfileFormatVersion;
PGPUInt32 recordLengthBytes;
PGPUInt32 fileLengthRecords;
} PGPnetLogFileHeader;
typedef struct PGPnetLog * PGPnetLogRef;
typedef struct
{
PGPTime timeOfEvent;
PGPnetLogEventType typeOfEvent;
PGPUInt32 ipaddress;
#if PGP_MACINTOSH
StrFileName eventDataFile;
#else
char eventDataFile[kPGPnetLogFileNameLength];/* File name */
#endif
union {
// for PGPError values
struct {
PGPError error;
PGPUInt32 lineno;
char filename[32];
} pgperror;
// for IKE alerts
struct {
PGPikeAlert alert;
PGPUInt32 value;
PGPBoolean remoteGenerated;
} ikealert;
// for IPSEC messages
struct {
PGPError error;
} ipsec;
// for intrusion detection
struct {
PGPnetAttackType type;
char description[kPGPnetLogAttackDescLength];
} attack;
// for system errors
struct {
PGPUInt32 error;
PGPUInt32 lineno;
char filename[32];
} syserror;
// for PGPnetServiceError values
struct {
PGPnetServiceError error;
PGPKeyID keyID;
PGPUInt32 ipAddress2;
PGPUInt32 lineno;
char filename[32];
} svcerror;
// for debugging strings
struct {
char sztext[64];
} debug;
// for PGPFire Log Messages
struct {
PGPInt32 ruleID;
PGPUInt8 protocol;
PGPUInt32 nboLocalIP;
PGPUInt16 nboLocalPort;
PGPUInt32 nboRemoteIP;
PGPUInt16 nboRemotePort;
PGPBoolean inbound;
PGPBoolean permit;
} fire;
// for convenience
PGPByte buffer[1];
} info;
} PGPnetLogEvent;
PGP_BEGIN_C_DECLARATIONS
PGPError
PGPnetOpenLogFile (
PFLFileSpecRef logFileSpec,
PGPBoolean bWriteAccess,
PGPBoolean bZeroOutFile,
#if PGP_WIN32 || PGP_OSX
char* eventfolder,
PGPUInt32 eventDirLen,
#endif
PGPnetLogRef* plogRef);
PGPError
PGPnetLogEventToFile(
PGPnetLogRef logRef,
PGPnetLogEvent* pevent);
PGPError
PGPnetClearLogFile(
PGPnetLogRef logRef);
PGPError
PGPnetFlushLogBuffers(
PGPnetLogRef logRef);
PGPError
PGPnetCloseLogFile(
PGPnetLogRef logRef);
PGPError
PGPnetReadLogData(
PGPnetLogRef logRef,
PGPSize* pnumberEvents,
void** ppEventBuffer);
PGPError
PGPnetFreeLogData(
void* pEventData);
#if PGP_MACINTOSH
OSStatus
FindPGPnetLogEventDataFolder(
short vRefNum,
short *foundVRefNum,
long *foundDirID);
#endif
PGP_END_C_DECLARATIONS
#endif //Included_pgpNetLog_h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -