#ifndef _NMEVENT_H
#define _NMEVENT_H

/* Microsoft Network Monitor Events definitions */

#include <npptypes.h>

#define NMEVENTFLAG_MONITOR  0x00000000
#define NMEVENTFLAG_EXPERT  0x00000001

#define NMEVENTFLAG_DO_NOT_DISPLAY_SEVERITY  0x80000000
#define NMEVENTFLAG_DO_NOT_DISPLAY_SOURCE  0x40000000
#define NMEVENTFLAG_DO_NOT_DISPLAY_EVENT_NAME  0x20000000
#define NMEVENTFLAG_DO_NOT_DISPLAY_DESCRIPTION  0x10000000
#define NMEVENTFLAG_DO_NOT_DISPLAY_MACHINE  0x08000000
#define NMEVENTFLAG_DO_NOT_DISPLAY_TIME  0x04000000
#define NMEVENTFLAG_DO_NOT_DISPLAY_DATE  0x02000000
#define NMEVENTFLAG_DO_NOT_DISPLAY_FIXED_COLUMNS 0xFE000000

typedef enum {
    NMCOLUMNTYPE_UINT8 = 0,
    NMCOLUMNTYPE_SINT8,
    NMCOLUMNTYPE_UINT16,
    NMCOLUMNTYPE_SINT16,
    NMCOLUMNTYPE_UINT32,
    NMCOLUMNTYPE_SINT32,
    NMCOLUMNTYPE_FLOAT64,
    NMCOLUMNTYPE_FRAME,
    NMCOLUMNTYPE_YESNO,
    NMCOLUMNTYPE_ONOFF,
    NMCOLUMNTYPE_TRUEFALSE,
    NMCOLUMNTYPE_MACADDR,
    NMCOLUMNTYPE_IPXADDR,
    NMCOLUMNTYPE_IPADDR,
    NMCOLUMNTYPE_VARTIME,
    NMCOLUMNTYPE_STRING
} NMCOLUMNTYPE;

typedef struct _NMCOLUMNVARIANT {
    NMCOLUMNTYPE Type;
    union {
        BYTE Uint8Val;
        char Sint8Val;
        WORD Uint16Val;
        short Sint16Val;
        DWORD Uint32Val;
        long Sint32Val;
        DOUBLE Float64Val;
        DWORD FrameVal;
        BOOL YesNoVal;
        BOOL OnOffVal;
        BOOL TrueFalseVal;
        BYTE MACAddrVal[MAC_ADDRESS_SIZE];
        IPX_ADDRESS IPXAddrVal;
        DWORD IPAddrVal;
        DOUBLE VarTimeVal;
        LPCSTR pStringVal;
    } Value;
} NMCOLUMNVARIANT;

typedef struct _NMCOLUMNINFO {
    LPSTR szColumnName;
    NMCOLUMNVARIANT VariantData;
} NMCOLUMNINFO;
typedef NMCOLUMNINFO *PNMCOLUMNINFO;

typedef LPSTR JTYPE;

typedef struct _NMEVENTDATA {
    LPSTR pszReserved;
    BYTE Version;
    DWORD EventIdent;
    DWORD Flags;
    DWORD Severity;
    BYTE NumColumns;
    LPSTR szSourceName;
    LPSTR szEventName;
    LPSTR szDescription;
    LPSTR szMachine;
    JTYPE Justification;
    LPSTR szUrl;
    SYSTEMTIME SysTime;
    NMCOLUMNINFO Column[];
} NMEVENTDATA;
typedef NMEVENTDATA *PNMEVENTDATA;

enum _NMEVENT_SEVERITIES {
    NMEVENT_SEVERITY_INFORMATIONAL = 0,
    NMEVENT_SEVERITY_WARNING,
    NMEVENT_SEVERITY_STRONG_WARNING,
    NMEVENT_SEVERITY_ERROR,
    NMEVENT_SEVERITY_SEVERE_ERROR,
    NMEVENT_SEVERITY_CRITICAL_ERROR
};

#endif /* _NMEVENT_H */
