Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

861 lines
35 KiB

////////////////////////////////////////////////////////////////////////
//
// Module : FrameWork/Nshipsec.h
//
// Purpose : Netshell Frame Work for IPSec Implementation.
//
// Developers Name : Bharat/Radhika
//
// History :
//
// Date Author Comments
// 8-10-2001 Radhika Initial Version. V1.0
//
////////////////////////////////////////////////////////////////////////
#ifndef _NSHIPSEC_H_
#define _NSHIPSEC_H_
#define UNICODE
#define BAIL_OUT
#include "Nsu.h"
#undef BAIL_OUT
#include <winuser.h>
#include <math.h>
#include <tchar.h>
#include <netsh.h>
#include <stdio.h>
#include <winsock2.h>
#include <Ws2tcpip.h>
#include <lm.h>
#include <assert.h>
#include <objbase.h>
#include <ipexport.h>
#include <wincrypt.h>
#include <dsgetdc.h>
#include <userenv.h>
#include <winldap.h>
#include <malloc.h>
extern "C" {
#include <rpc.h>
#include <winldap.h>
#include <time.h>
#include <winipsec.h>
#include <ipsec.h>
#include <oakdefs.h>
#ifndef SECURITY_WIN32
#define SECURITY_WIN32
#endif
#include <security.h>
#include "polstore2.h"
}
#include <ipsecshr.h>
#define MAXCOMPUTERNAMELEN (1024)
typedef struct _STORAGELOCATION
{
TCHAR pszMachineName[MAXCOMPUTERNAMELEN];
TCHAR pszDomainName[MAXCOMPUTERNAMELEN];
DWORD dwLocation;
} STORAGELOCATION, *PSTORAGELOCATION;
//ipsec includes
#include "resource.h"
#include "nshpa.h"
#include "parser.h"
#include "parser_static.h"
#include "parser_dynamic.h"
#include "parser_util.h"
#include "staticshowutils.h"
#include "staticmisc.h"
#include "staticshow.h"
#include "staticshowlist.h"
#include "staticshowtable.h"
#include "staticset.h"
#include "staticadd.h"
#include "staticdelete.h"
#include "staticsetutils.h"
#include "dynamicdelete.h"
#include "dynamicshow.h"
#include "dynamicadd.h"
#include "nshcache.h"
#define NSHIPSEC_BUILD_NUMBER (3588)
// Registry Keys
#define ENABLE_DIAG _TEXT("EnableDiagnostics")
#define ENABLE_LOGINT _TEXT("LogInterval")
#define ENABLE_EXEMPT _TEXT("NoDefaultExempt")
#define BOOTMODEKEY _TEXT("OperationMode")
#define BOOTEXEMPTKEY _TEXT("BootExemptList")
#define ERROR_NO_DISPLAY (DWORD)(-1)
#define BAIL_OUT goto error
#define CERT_TEXT_SIZE (8192)
//global definitions...
#define IPSEC_HELPER_VERSION (1)
#define POTF_MAX_STRLEN (256)
#define STR_ADDRLEN (128)
//error masks
#define WIN32_AUTH_BEING_USED (13012)
const TCHAR DENIAL_TOKENS[] = _T("Nn");
const TCHAR ACCEPTANCE_TOKENS[] = _T("Yy");
const GUID g_IPSecGuid = {0xf7e0bc27, 0xba6e, 0x4145, {0xa1, 0x23, 0x01, 0x2f, 0x19, 0x22, 0xf3, 0xf1}};
const GUID g_StaticGuid = {0xf7e0bc28, 0xba6e, 0x4145, {0xa1, 0x23, 0x01, 0x2f, 0x19, 0x22, 0xf3, 0xf1}};
const GUID g_DynamicGuid = {0xf7e0bc29, 0xba6e, 0x4145, {0xa1, 0x23, 0x01, 0x2f, 0x19, 0x22, 0xf3, 0xf1}};
const GUID g_RootGuid = NETSH_ROOT_GUID;
//
// Function prototypes.Forward declarations
//
//
// Static Functions Prototypes
//
FN_HANDLE_CMD HandleStaticAddPolicy;
FN_HANDLE_CMD HandleStaticAddFilterList;
FN_HANDLE_CMD HandleStaticAddFilter;
FN_HANDLE_CMD HandleStaticAddFilterActions;
FN_HANDLE_CMD HandleStaticAddRule;
FN_HANDLE_CMD HandleStaticSetPolicy;
FN_HANDLE_CMD HandleStaticSetFilterList;
FN_HANDLE_CMD HandleStaticSetFilterActions;
FN_HANDLE_CMD HandleStaticSetRule;
FN_HANDLE_CMD HandleStaticSetStore;
FN_HANDLE_CMD HandleStaticSetDefaultRule;
FN_HANDLE_CMD HandleStaticSetInteractive;
FN_HANDLE_CMD HandleStaticSetBatch;
FN_HANDLE_CMD HandleStaticDeletePolicy;
FN_HANDLE_CMD HandleStaticDeleteFilterList;
FN_HANDLE_CMD HandleStaticDeleteFilter;
FN_HANDLE_CMD HandleStaticDeleteFilterActions;
FN_HANDLE_CMD HandleStaticDeleteRule;
FN_HANDLE_CMD HandleStaticDeleteAll;
FN_HANDLE_CMD HandleStaticShowPolicy;
FN_HANDLE_CMD HandleStaticShowFilterList;
FN_HANDLE_CMD HandleStaticShowFilterActions;
FN_HANDLE_CMD HandleStaticShowRule;
FN_HANDLE_CMD HandleStaticShowAll;
FN_HANDLE_CMD HandleStaticShowStore;
FN_HANDLE_CMD HandleStaticShowGPOAssignedPolicy;
FN_HANDLE_CMD HandleStaticExportPolicy;
FN_HANDLE_CMD HandleStaticImportPolicy;
FN_HANDLE_CMD HandleStaticRestoreDefaults;
//
//Dynamic Function Prototypes...
//
FN_HANDLE_CMD HandleDynamicAddQMPolicy;
FN_HANDLE_CMD HandleDynamicAddMMPolicy;
FN_HANDLE_CMD HandleDynamicAddRule;
FN_HANDLE_CMD HandleDynamicSetQMPolicy;
FN_HANDLE_CMD HandleDynamicSetMMPolicy;
FN_HANDLE_CMD HandleDynamicSetConfig;
FN_HANDLE_CMD HandleDynamicSetRule;
FN_HANDLE_CMD HandleDynamicDeleteQMPolicy;
FN_HANDLE_CMD HandleDynamicDeleteMMPolicy;
FN_HANDLE_CMD HandleDynamicDeleteRule;
FN_HANDLE_CMD HandleDynamicDeleteAll;
FN_HANDLE_CMD HandleDynamicShowMMPolicy;
FN_HANDLE_CMD HandleDynamicShowQMPolicy;
FN_HANDLE_CMD HandleDynamicShowMMFilter;
FN_HANDLE_CMD HandleDynamicShowQMFilter;
FN_HANDLE_CMD HandleDynamicShowStats;
FN_HANDLE_CMD HandleDynamicShowMMSas;
FN_HANDLE_CMD HandleDynamicShowQMSas;
FN_HANDLE_CMD HandleDynamicShowRegKeys;
FN_HANDLE_CMD HandleDynamicShowRule;
FN_HANDLE_CMD HandleDynamicShowAll;
//
// Error Code Ids
//
#define ERRCODE_INVALID_NUM_ARGS 1000
#define ERRCODE_INVALID_ARGS 1001
#define ERRCODE_NO_PREKEY 1002
#define ERRCODE_AUTH_INVALID 1003
#define ERRCODE_ENCODE_FAILED 1004
#define ERRCODE_MULTIPLE_KERBPRE 1005
#define ERRCODE_INVALID_INDEX 1007
#define ERRCODE_INVALID_ARG 1008
#define ERRCODE_DNSLOOKUP_FAILED 1009
#define ERRCODE_INVALID_ADDR 1010
#define ERRCODE_INVALID_TAG 1011
#define ERRCODE_TAG_ALREADY_PRESENT 1012
#define ERRCODE_GPONAME_ARG_NEEDED 1013
#define ERRCODE_NAME_GUID_NEEDED 1014
#define ERRCODE_TAG_NEEDED 1015
#define ERRCODE_ARG_INVALID 1016
#define ERRCODE_PREFIX_INVALID 1017
#define ERRCODE_MASK_INVALID 1018
#define ERRCODE_NULL_STRING 1019
#define ERRCODE_SECLIFE_INVALID 1020
#define ERRCODE_KBLIFE_INVALID 1021
#define ERRCODE_P2REKEY_INVALID 1022
#define ERRCODE_HASH_INVALID 1023
#define ERRCODE_ESP_INCOMPLETE 1024
#define ERRCODE_DUPALG_INVALID 1025
#define ERRCODE_NONE_INVALID 1026
#define ERRCODE_IPSECPROT_INVALID 1027
#define ERRCODE_MAX_OFFERS 1028
#define ERRCODE_AHESP_INVALID 1029
#define ERRCODE_KS_INVALID 1030
#define ERRCODE_INVALID_P1GROUP 1031
#define ERRCODE_P1GROUP_MISSING 1032
#define ERRCODE_MMOFFER_INVALID 1033
#define ERRCODE_FILETYPE_INVALID 1034
#define ERRCODE_ADDR_ALL_INVALID 1035
#define ERRCODE_PORT_INVALID 1036
#define ERRCODE_MAXARGS_CROSSED 1037
#define ERRCODE_QMOFFER_INVALID 1038
#define ERRCODE_INVALID_TUNNEL 1039
#define ERRCODE_PROTO_INVALID 1040
#define ERRCODE_INVALID_MASK 1041
#define ERRCODE_INVALID_MACHINE 1042
#define ERRCODE_TOO_MANY_EXEMPTS 1043
//
// Error codes for static commands
//
#define ERRCODE_ADD_STATIC_POLICY_MISSING_POL_NAME 5001
#define ERRCODE_ADD_STATIC_POLICY_POLL_INTERVAL_MSG 5002
#define ERRCODE_ADD_STATIC_POLICY_QMPERMM_MSG 5003
#define ERRCODE_ADD_STATIC_POLICY_LIFETIME_LIMIT_MSG 5004
#define ERRCODE_ADD_STATIC_CRNEWPOL_1 5005
#define ERRCODE_ADD_STATIC_CRNEWPOL_2 5006
#define ERRCODE_ADD_STATIC_CRNEWPOL_4 5007
#define ERRCODE_ADD_STATIC_CRNEWPOL_5 5008
//Add Filterlist
#define ERRCODE_ADD_STATIC_FILTERLIST_1 5009
#define ERRCODE_ADD_STATIC_FILTERLIST_2 5010
#define ERRCODE_ADD_STATIC_FILTERLIST_3 5011
#define ERRCODE_ADD_STATIC_FILTERLIST_5 5012
//Add Filter
#define ERRCODE_ADD_STATIC_FILTER_2 5013
//Add FilterAction
#define ERRCODE_ADD_STATIC_FILTERACTION_1 5014
#define ERRCODE_ADD_STATIC_FILTERACTION_2 5015
#define ERRCODE_ADD_STATIC_FILTERACTION_4 5016
//Add Rule
#define ERRCODE_ADD_STATIC_RULE_1 5017
#define ERRCODE_ADD_STATIC_RULE_2 5018
#define ERRCODE_ADD_STATIC_RULE_3 5019
#define ERRCODE_ADD_STATIC_RULE_4 5020
#define ERRCODE_ADD_STATIC_RULE_5 5021
#define ERRCODE_ADD_STATIC_RULE_6 5022
#define ERRCODE_ADD_STATIC_RULE_7 5023
#define ERRCODE_ADD_STATIC_RULE_CREATING_INFO 5024
#define ERRCODE_ADD_STATIC_RULE_10 5025
#define ERRCODE_ADD_STATIC_RULE_11 5026
#define ERRCODE_ADD_STATIC_FILTER_1 5027
#define ERRCODE_ADD_STATIC_FILTER_4 5028
//Set Policy
#define ERRCODE_SET_STATIC_POLICY_3 5029
#define ERRCODE_SET_STATIC_POLICY_4 5030
#define ERRCODE_SET_STATIC_POLICY_5 5031
#define ERRCODE_SET_STATIC_POLICY_INVALID_CERTMAP_MSG 5032
#define ERRCODE_SET_STATIC_POLICY_CERTMAP_YES_STR 5033
//set filterlist
#define ERRCODE_SET_STATIC_FILTERLIST_1 5034
#define ERRCODE_SET_STATIC_FILTERLIST_3 5035
//set filter action
#define ERRCODE_SET_STATIC_FILTERACTION_1 5036
#define ERRCODE_SET_STATIC_FILTERACTION_3 5037
//set rule
#define ERRCODE_SET_STATIC_RULE_1 5038
#define ERRCODE_SET_STATIC_RULE_2 5039
//set def rule
#define ERRCODE_SET_STATIC_DEFRULE_2 5040
#define ERRCODE_MISC_STATIC_IMPORTPOLICY_1 5041
#define ERRCODE_MISC_STATIC_IMPORTPOLICY_3 5042
#define ERRCODE_MISC_STATIC_IMPORTPOLICY_4 5043
//export policy
#define ERRCODE_MISC_STATIC_EXPORTPOLICY_2 5044
#define ERRCODE_MISC_STATIC_RESDEFRULE_2 5045
#define ERRCODE_DEL_STATIC_POLICY_3 5046
#define ERRCODE_SHW_STATIC_POLICY_2 5047
//delete filterlist
#define ERRCODE_DEL_STATIC_FILTERLIST_2 5048
//delete filter
#define ERRCODE_SHW_STATIC_TAB_PRTALLFL_3 5049
#define ERRCODE_DEL_STATIC_FILTER_1 5050
#define ERRCODE_DEL_STATIC_FILTER_2 5051
//delete filter action
#define ERRCODE_DEL_STATIC_FILTERACTION_2 5052
#define ERRCODE_SHW_STATIC_TAB_PRTALLFA_FA_COUNT_LIST 5053
//delete rule
#define ERRCODE_DEL_STATIC_RULE_3 5054
#define ERRCODE_DEL_STATIC_RULE_4 5055
#define ERRCODE_DEL_STATIC_RULE_5 5056
#define ERRCODE_DEL_STATIC_RULE_10 5057
#define ERRCODE_SHW_STATIC_RULE_3 5058
#define ERRCODE_SHW_STATIC_RULE_4 5059
#define ERRCODE_SHW_STATIC_LIST_POLICY_COUNT 5060
#define ERRCODE_SHW_STATIC_TAB_POLICY_3 5061
#define ERRCODE_SHW_STATIC_TAB_POLICY_4 5062
#define ERRCODE_SHW_STATIC_TAB_POLICY_5 5063
//show filterl
#define ERRCODE_SHW_STATIC_TAB_FILTERLIST_3 5064
#define ERRCODE_SHW_STATIC_TAB_RULE_3 5065
//show assigned gpo policy
#define ERRCODE_SHW_STATIC_TAB_ASSIGNPOL_2 5066
#define ERRCODE_SHW_STATIC_TAB_PRTALLFL_2 5067
#define ERRCODE_SHW_STATIC_TAB_PRTALLFA_6 5068
#define ERRCODE_ADD_STATIC_FILTERACTION_3 5069
#define ERRCODE_ADD_STATIC_RULE_UPDATING_INFO 5070
#define ERRCODE_NO_POLICY 5072
#define ERRCODE_FAILED_POLSTORE_OPEN 5073
#define ERRCODE_NO_FILTER_ACTION 5074
#define ERRCODE_NO_FILTER_LIST 5075
#define ERRCODE_INVALID_POLICY_NAME 5076
#define ERRCODE_SET_STATIC_RULE_3 5077
#define ERRCODE_SET_STATIC_RULE_NEW_RULE_QUERY 5078
#define ERRCODE_SET_STATIC_RULE_5 5079
#define ERRCODE_ADD_STATIC_RULE_SUCCESS_MSG 5080
#define ERRCODE_SHW_STATIC_ASSIGNEDGPO_SRCMACHINE3 5081
#define ERRCODE_SHW_STATIC_ASSIGNEDGPO_SRCMACHINE4 5082
#define ERRCODE_SET_STATIC_POLICY_CERT_MAP_NO_STR 5083
#define ERRCODE_ADD_STATIC_FILTER_3 5084
#define ERRCODE_ADD_STATIC_FILTER_6 5085
#define ERRCODE_ADD_STATIC_FILTER_7 5086
#define ERRCODE_ADD_STATIC_FILTER_8 5087
#define ERRCODE_ADD_STATIC_FILTER_9 5088
#define ERRCODE_ADD_STATIC_FILTER_10 5089
#define ERRCODE_ADD_STATIC_FILTER_11 5090
#define ERRCODE_ADD_STATIC_FILTER_12 5091
#define ERRCODE_SET_STATIC_POL_NEWNAME 5092
#define ERRCODE_SET_STATIC_RULE_NEWNAME 5093
#define ERRCODE_SET_STATIC_FL_NEWNAME 5094
#define ERRCODE_SET_STATIC_FA_NEWNAME 5095
#define ERRCODE_ADD_STATIC_RULE_INVALID_TUNNEL 5096
#define ERRCODE_MISC_STATIC_RESDEFRULE_3 5097
#define ERRCODE_SET_STATIC_SHOW_RULE_TYPE 5098
#define ERRCODE_DEL_STATIC_FILTERLIST_ALL_FL_DEL_QUERY 5099
#define ERRCODE_DEL_STATIC_FILTERACTION_ALL_FA_DEL_QUERY 5100
#define ERRCODE_ADD_RULE_INVALID_TUNNEL 5101
#define ERRCODE_STATIC_INTERNAL_ERROR 5102
#define ERRCODE_SHW_STATIC_RULE_RULE_ID_GUID 5103
#define ERRCODE_UPDATE_DEF_NEGPOL 5104
#define ERRCODE_SET_POL_READ_ONLY_OBJECT 5105
#define ERRCODE_ADD_SET_RULE_READ_ONLY_OBJECT 5106
#define ERRCODE_SET_FA_READ_ONLY_OBJECT 5107
#define ERRCODE_SET_FL_READ_ONLY_OBJECT 5108
#define ERRCODE_DEL_POL_READ_ONLY_OBJECT 5109
#define ERRCODE_DEL_RULE_READ_ONLY_OBJECT 5110
#define ERRCODE_DEL_FA_READ_ONLY_OBJECT 5111
#define ERRCODE_DEL_FL_READ_ONLY_OBJECT 5112
#define ERRCODE_SET_STATIC_POLICY_MISSING_GPO_NAME_STR 5113
#define ERRCODE_MISC_STATIC_SETSTORE_DOMAIN_NA 5114
#define ERRCODE_MISC_STATIC_SETSTORE_NOT_DOMAIN_MEMBER 5115
#define ERRCODE_SET_STATIC_POLICY_GPO_SPECIFIED_ON_NODOMAIN_POLICY 5116
#define ERRCODE_SHW_STATIC_ASSIGNEDGPO_SRCMACHINE5 5117
//
// Dynamic error codes
//
// add rule
#define ERRCODE_ADD_RULE_NO_POILCY 6001
#define ERRCODE_ADD_RULE_WARNING_3 6002
#define ERRCODE_ADD_RULE_WARNING_4 6003
#define ERRCODE_PARSER_ADDRTYPE 6004
#define ERRCODE_PARSER_TUNNELADDRTYPE 6005
// delete rule
#define ERRCODE_DELETE_RULE_NO_MMFILTER 6011
#define ERRCODE_DELETE_RULE_NO_TRANSPORT 6012
#define ERRCODE_DELETE_RULE_NO_TUNNEL 6013
#define ERRCODE_DEL_NO_MMPOLICY 6014
#define ERRCODE_DEL_NO_QMPOLICY 6015
//add mainmode policy
#define ERRCODE_ADD_MMP_MMPOLICY_EXISTS 6021
//add quick mode policy
#define ERRCODE_ADD_QMP_QMPOLICY_EXISTS 6031
//add qmfilter
#define ERRCODE_ADD_QMF_NO_QMPOLICY 6041
//add mmfil
#define ERRCODE_ADD_MMF_NO_MMPOLICY 6051
//set mmfil
#define ERRCODE_SET_MMF_NO_MMPOLICY 6061
//set Transport/Tunnel
#define ERRCODE_SET_QMF_NO_QMPOLICY 6071
//delete rule mmf
#define ERRCODE_DELETE_RULE_MMF_1 6081
#define ERRCODE_DELETE_RULE_MMF_2 6082
#define ERRCODE_DELETE_RULE_MMF_3 6083
#define ERRCODE_DELETE_RULE_MMF_4 6084
//delete rule qmf
#define ERRCODE_DELETE_RULE_QMF_1 6091
#define ERRCODE_DELETE_RULE_QMF_2 6092
#define ERRCODE_DELETE_RULE_QMF_3 6093
#define ERRCODE_DELETE_RULE_QMF_4 6094
#define ERRCODE_DELETE_AUTH_BEING_USED 6095
#define ERRCODE_DELETE_MMF_OBJ_NOTDEL 6096
#define ERRCODE_DELETE_TRANSPORT_OBJ_NOTDEL 6097
#define ERRCODE_DELETE_TUNNEL_OBJ_NOTDEL 6098
#define ERRCODE_SET_CONFIG_1 6121
#define ERRCODE_SET_CONFIG_2 6122
#define ERRCODE_SET_CONFIG_3 6123
#define ERRCODE_SET_CONFIG_4 6124
#define ERRCODE_SET_CONFIG_5 6125
#define ERRCODE_SET_CONFIG_6 6200
//show cmds
#define ERRCODE_SHOW_MMP_5 6126
#define ERRCODE_SHOW_MMP_6 6127
#define ERRCODE_SHOW_QMP_5 6128
#define ERRCODE_SHOW_QMP_6 6129
#define ERRCODE_SHOW_MMF_6 6130
#define ERRCODE_SHOW_MMF_7 6131
#define ERRCODE_SHOW_MMF_8 6132
#define ERRCODE_SHOW_QMF_6 6133
#define ERRCODE_SHOW_QMF_7 6134
#define ERRCODE_SHOW_QMF_8 6135
#define ERRCODE_SHOW_QMF_17 6136
#define ERRCODE_SHOW_MMSAS_3 6137
#define ERRCODE_SHOW_QMSAS_3 6138
#define ERRCODE_SHOW_MMSAS_6 6139
#define ERRCODE_SHOW_QMSAS_4 6140
#define ERRCODE_SHOW_REG_16 6141
//
// Error ID vs Error RC Index
//
const ERROR_TO_RC ERROR_RC[] =
{
{ ERRCODE_INVALID_NUM_ARGS, (ERR_INVALID_NUM_ARGS) },
{ ERRCODE_INVALID_ARGS, (ERR_INVALID_ARGS) },
{ ERRCODE_INVALID_INDEX, (ERR_INVALID_INDEX) },
{ ERRCODE_INVALID_ARG, (ERR_INVALID_ARG) },
{ ERRCODE_DNSLOOKUP_FAILED, (ERR_DNSLOOKUP_FAILED) },
{ ERRCODE_INVALID_ADDR, (ERR_INVALID_ADDR) },
{ ERRCODE_INVALID_TAG, (ERR_INVALID_TAG) },
{ ERRCODE_GPONAME_ARG_NEEDED, (ERR_GPONAME_ARG_NEEDED) },
{ ERRCODE_NAME_GUID_NEEDED, (ERR_NAME_GUID_NEEDED) },
{ ERRCODE_TAG_ALREADY_PRESENT, (ERR_TAG_ALREADY_PRESENT) },
{ ERRCODE_TAG_NEEDED, (ERR_TAG_NEEDED) },
{ ERRCODE_ARG_INVALID, (ERR_ARG_INVALID) },
{ ERRCODE_PREFIX_INVALID, (ERR_PREFIX_INVALID) },
{ ERRCODE_MASK_INVALID, (ERR_MASK_INVALID) },
{ ERRCODE_NULL_STRING, (ERR_NULL_STRING) },
{ ERRCODE_SECLIFE_INVALID, (ERR_SECLIFE_INVALID) },
{ ERRCODE_KBLIFE_INVALID, (ERR_KBLIFE_INVALID) },
{ ERRCODE_P2REKEY_INVALID, (ERR_P2REKEY_INVALID) },
{ ERRCODE_HASH_INVALID, (ERR_HASH_INVALID) },
{ ERRCODE_ESP_INCOMPLETE, (ERR_ESP_INCOMPLETE) },
{ ERRCODE_DUPALG_INVALID, (ERR_DUPALG_INVALID) },
{ ERRCODE_NONE_INVALID, (ERR_NONE_INVALID) },
{ ERRCODE_IPSECPROT_INVALID, (ERR_IPSECPROT_INVALID) },
{ ERRCODE_MAX_OFFERS, (ERR_MAX_OFFERS) },
{ ERRCODE_AHESP_INVALID, (ERR_AHESP_INVALID) },
{ ERRCODE_KS_INVALID, (ERR_KS_INVALID) },
{ ERRCODE_INVALID_P1GROUP, (ERR_INVALID_P1GROUP) },
{ ERRCODE_P1GROUP_MISSING, (ERR_P1GROUP_MISSING) },
{ ERRCODE_MMOFFER_INVALID, (ERR_MMOFFER_INVALID) },
{ ERRCODE_FILETYPE_INVALID, (ERR_FILETYPE_INVALID) },
{ ERRCODE_ADDR_ALL_INVALID, (ERR_ADDR_ALL_INVALID) },
{ ERRCODE_NO_PREKEY, (ERR_NO_PREKEY) },
{ ERRCODE_AUTH_INVALID, (ERR_AUTH_INVALID) },
{ ERRCODE_ENCODE_FAILED, (ERR_ENCODE_FAILED) },
{ ERRCODE_MULTIPLE_KERBPRE, (ERR_MULTIPLE_KERBPRE) },
{ ERRCODE_PORT_INVALID, (ERR_PORT_INVALID) },
{ ERRCODE_MAXARGS_CROSSED, (ERR_MAXARGS_CROSSED) },
{ ERRCODE_QMOFFER_INVALID, (ERR_QMOFFER_INVALID) },
{ ERRCODE_INVALID_TUNNEL, (ERR_INVALID_TUNNEL) },
{ ERRCODE_PROTO_INVALID, (ERR_PROTO_INVALID) },
{ ERRCODE_INVALID_MASK, (ERR_INVALID_MASK) },
{ ERRCODE_INVALID_MACHINE, (ERR_INVALID_MACHINE) },
//static mode error table starts here
{ ERRCODE_ADD_STATIC_POLICY_MISSING_POL_NAME, (ERR_ADD_STATIC_POLICY_MISSING_POL_NAME) },
{ ERRCODE_ADD_STATIC_POLICY_POLL_INTERVAL_MSG, (ERR_ADD_STATIC_POLICY_POLL_INTERVAL_MSG) },
{ ERRCODE_ADD_STATIC_POLICY_QMPERMM_MSG, (ERR_ADD_STATIC_POLICY_QMPERMM_MSG) },
{ ERRCODE_ADD_STATIC_POLICY_LIFETIME_LIMIT_MSG, (ERR_ADD_STATIC_POLICY_LIFETIME_LIMIT_MSG) },
{ ERRCODE_ADD_STATIC_CRNEWPOL_1, (ERR_ADD_STATIC_CRNEWPOL_POL_EXISTS) },
{ ERRCODE_ADD_STATIC_CRNEWPOL_2, (ERR_ADD_STATIC_CRNEWPOL_DEF_RULE_ERR) },
{ ERRCODE_ADD_STATIC_CRNEWPOL_4, (ERR_ADD_STATIC_CRNEWPOL_ERROR) },
{ ERRCODE_ADD_STATIC_CRNEWPOL_5, (ERR_ADD_STATIC_CRNEWPOL_FAIL_DEF_AUTH) },
//Add Filterlist
{ ERRCODE_ADD_STATIC_FILTERLIST_1, (ERR_ADD_STATIC_FILTERLIST_MISSING_FL_NAME) },
{ ERRCODE_ADD_STATIC_FILTERLIST_2, (ERR_ADD_STATIC_FILTERLIST_FL_ALREADY_EXISTS) },
{ ERRCODE_ADD_STATIC_FILTERLIST_3, (ERR_ADD_STATIC_FILTERLIST_ERROR_NEW_FL) },
{ ERRCODE_ADD_STATIC_FILTERLIST_5, (ERR_ADD_STATIC_FILTERLIST_INVALID_GUID) },
//Add Filter
{ ERRCODE_ADD_STATIC_FILTER_2, (ERR_ADD_STATIC_FILTER_ERROR_NEW_FILTER) },
//Add FilterAction
{ ERRCODE_ADD_STATIC_FILTERACTION_1, (ERR_ADD_STATIC_FILTERACTION_FA_EXISTS) },
{ ERRCODE_ADD_STATIC_FILTERACTION_2, (ERR_ADD_STATIC_FILTERACTION_ERROR_NEW_FA) },
{ ERRCODE_ADD_STATIC_FILTERACTION_4, (ERR_ADD_STATIC_FILTERACTION_MIMIMUM_QMSEC) },
//Add Rule
{ ERRCODE_ADD_STATIC_RULE_1, (ERR_ADD_STATIC_RULE_MISSING_RULE_NAME) },
{ ERRCODE_ADD_STATIC_RULE_2, (ERR_ADD_STATIC_RULE_MISSIGN_FA_NAME) },
{ ERRCODE_ADD_STATIC_RULE_3, (ERR_ADD_STATIC_RULE_POL_NOT_AVAILABLE) },
{ ERRCODE_ADD_STATIC_RULE_4, (ERR_ADD_STATIC_RULE_RULE_ALREADY_EXISTS) },
{ ERRCODE_ADD_STATIC_RULE_5, (ERR_ADD_STATIC_RULE_FA_NOT_EXISTS) },
{ ERRCODE_ADD_STATIC_RULE_6, (ERR_ADD_STATIC_RULE_NO_FILTERS_IN_FL) },
{ ERRCODE_ADD_STATIC_RULE_7, (ERR_ADD_STATIC_RULE_ERROR_NEW_RULE) },
{ ERRCODE_ADD_STATIC_RULE_SUCCESS_MSG, (ERR_ADD_STATIC_RULE_MISSING_RULE_NAME_OR_ID) },
{ ERRCODE_ADD_STATIC_RULE_CREATING_INFO, (ERR_ADD_STATIC_RULE_POL_GUID_NOT_EXISTS) },
{ ERRCODE_ADD_STATIC_RULE_10, (ERR_ADD_STATIC_RULE_FA_GUID_NOT_EXISTS) },
{ ERRCODE_ADD_STATIC_RULE_11, (ERR_ADD_STATIC_RULE_DEF_AUTH_LOAD_FAILED) },
{ ERRCODE_ADD_STATIC_RULE_UPDATING_INFO, (ERR_ADD_STATIC_RULE_CERT_DECODING_FAIL) },
{ ERRCODE_ADD_STATIC_RULE_INVALID_TUNNEL, (ERR_ADD_STATIC_RULE_POL_NOT_EXIST_IN_DOMAIN) },
{ ERRCODE_ADD_RULE_INVALID_TUNNEL, (ERR_ADD_RULE_INVALID_TUNNEL) },
{ ERRCODE_ADD_STATIC_FILTER_1, (ERR_ADD_STATIC_FILTER_FL_NOT_EXISTS) },
{ ERRCODE_ADD_STATIC_FILTER_3, (ERR_ADD_STATIC_FILTER_SERVER_NOT_ALLOWED_BOTH_SIDES) },
{ ERRCODE_ADD_STATIC_FILTER_4, (ERR_ADD_STATIC_FILTER_FL_GUID_NOT_EXISTS) },
{ ERRCODE_ADD_STATIC_FILTER_6, (ERR_ADD_STATIC_FILTER_INVALID_SRCIP) },
{ ERRCODE_ADD_STATIC_FILTER_7, (ERR_ADD_STATIC_FILTER_INVALID_SRCIPMASK) },
{ ERRCODE_ADD_STATIC_FILTER_8, (ERR_ADD_STATIC_FILTER_ADDRESS_CONFLICT) },
{ ERRCODE_ADD_STATIC_FILTER_9, (ERR_ADD_STATIC_FILTER_INVALID_SERVER_TYPE) },
{ ERRCODE_ADD_STATIC_FILTER_10, (ERR_ADD_STATIC_FILTER_SERVER_TYPE_NEEDED) },
{ ERRCODE_ADD_STATIC_FILTER_11, (ERR_ADD_STATIC_FILTER_INVALID_DSTIP) },
{ ERRCODE_ADD_STATIC_FILTER_12, (ERR_ADD_STATIC_FILTER_INVALID_DSTIPMASK) },
//Set Policy
{ ERRCODE_SET_STATIC_POLICY_3, (ERR_SET_STATIC_POLICY_NO_DS) },
{ ERRCODE_SET_STATIC_POLICY_4, (ERR_SET_STATIC_POLICY_NO_GPO_NAME) },
{ ERRCODE_SET_STATIC_POLICY_5, (ERR_SET_STATIC_POLICY_ERR_GPO_ASSIGN) },
{ ERRCODE_SET_STATIC_POLICY_INVALID_CERTMAP_MSG, (ERR_SET_STATIC_POLICY_INVALID_CERTMAP_MSG) },
{ ERRCODE_SET_STATIC_POLICY_CERTMAP_YES_STR, (ERR_SET_STATIC_POLICY_CERTMAP_YES_STR) },
{ ERRCODE_SET_STATIC_POLICY_CERT_MAP_NO_STR, (ERR_SET_STATIC_POLICY_CERT_MAP_NO_STR) },
//set filterlist
{ ERRCODE_SET_STATIC_FILTERLIST_1, (ERR_SET_STATIC_FILTERLIST_ERR_UPDATE_FL_NAME) },
{ ERRCODE_SET_STATIC_FILTERLIST_3, (ERR_SET_STATIC_FILTERLIST_ERR_UPDATE_FL_GUID) },
//set filter action
{ ERRCODE_ADD_STATIC_FILTERACTION_3, (ERR_ADD_STATIC_FILTERACTION_INVALID_OPTIONS) },
{ ERRCODE_SET_STATIC_FILTERACTION_1, (ERR_SET_STATIC_FA_ERR_NAME_UPDATE) },
{ ERRCODE_SET_STATIC_FILTERACTION_3, (ERR_SET_STATIC_FA_ERR_GUID_UPDATE) },
//set rule
{ ERRCODE_SET_STATIC_RULE_1, (ERR_SET_STATIC_RULE_INVALID_NAME) },
{ ERRCODE_SET_STATIC_RULE_2, (ERR_SET_STATIC_RULE_ERROR_UPDATE) },
{ ERRCODE_SET_STATIC_RULE_3, (ERR_SET_STATIC_RULE_DEF_DEL_NOT_ALLOWED) },
{ ERRCODE_SET_STATIC_RULE_NEW_RULE_QUERY, (ERR_SET_STATIC_RULE_NEW_RULE_QUERY) },
{ ERRCODE_SET_STATIC_RULE_5, (ERR_SET_STATIC_RULE_INVALID_ID) },
//set def rule
{ ERRCODE_SET_STATIC_DEFRULE_2, (ERR_SET_STATIC_DEFRULE_ERROR_UPDATE) },
{ ERRCODE_MISC_STATIC_IMPORTPOLICY_1, (ERR_MISC_STATIC_IMPORTPOLICY_NO_FILE_NAME) },
{ ERRCODE_MISC_STATIC_IMPORTPOLICY_3, (ERR_MISC_STATIC_IMPORTPOLICY_INVALID_FILE) },
{ ERRCODE_MISC_STATIC_IMPORTPOLICY_4, (ERR_MISC_STATIC_IMPORTPOLICY_ERROR) },
//export policy
{ ERRCODE_MISC_STATIC_EXPORTPOLICY_2, (ERR_MISC_STATIC_EXPORTPOLICY_ERROR) },
{ ERRCODE_MISC_STATIC_RESDEFRULE_2, (ERR_MISC_STATIC_RESDEFRULE_ERROR) },
{ ERRCODE_MISC_STATIC_RESDEFRULE_3, (ERR_MISC_STATIC_RESDEFRULE_CMD_NA) },
//Set Store
{ ERRCODE_MISC_STATIC_SETSTORE_DOMAIN_NA, (ERR_MISC_STATIC_SETSTORE_DOMAIN_NA) },
{ ERRCODE_MISC_STATIC_SETSTORE_NOT_DOMAIN_MEMBER, (ERR_MISC_STATIC_SETSTORE_NOT_DOMAIN_MEMBER) },
{ ERRCODE_DEL_STATIC_POLICY_3, (ERR_DEL_STATIC_POLICY_ERROR) },
{ ERRCODE_SHW_STATIC_POLICY_2, (ERR_SHW_STATIC_POLICY_NAME_NOT_EXISTS) },
//delete filterlist
{ ERRCODE_DEL_STATIC_FILTERLIST_2, (ERR_DEL_STATIC_FILTERLIST_DEL_NOT_ALLOWED) },
//delete filter
{ ERRCODE_SHW_STATIC_TAB_PRTALLFL_3, (ERR_SHW_STATIC_TAB_PRTALLFL_NAME_NOT_EXISTS) },
{ ERRCODE_DEL_STATIC_FILTER_1, (ERR_DEL_STATIC_FILTER_NOT_AVAILABLE) },
{ ERRCODE_DEL_STATIC_FILTER_2, (ERR_DEL_STATIC_FILTER_ERROR) },
//delete filter action
{ ERRCODE_DEL_STATIC_FILTERACTION_2, (ERR_DEL_STATIC_FA_DEL_NOT_ALLOWED) },
{ ERRCODE_SHW_STATIC_TAB_PRTALLFA_FA_COUNT_LIST, (ERR_SHW_STATIC_TAB_PRTALLFA_FA_COUNT_LIST) },
//delete rule
{ ERRCODE_SHW_STATIC_RULE_4, (ERR_SHW_STATIC_RULE_MISSING_POL_NAME) },
{ ERRCODE_SHW_STATIC_RULE_RULE_ID_GUID, (ERR_SHW_STATIC_RULE_RULE_ID_GUID) },
{ ERRCODE_DEL_STATIC_RULE_3, (ERR_DEL_STATIC_RULE_ERR_DEL_RULE_NAME) },
{ ERRCODE_DEL_STATIC_RULE_4, (ERR_DEL_STATIC_RULE_ERR_DEL_RULE_ID) },
{ ERRCODE_DEL_STATIC_RULE_5, (ERR_DEL_STATIC_RULE_DEF_DEL_NOT_ALLOWED) },
{ ERRCODE_SHW_STATIC_RULE_3, (ERR_SHW_STATIC_RULE_NO_RULE_WITH_ID) },
{ ERRCODE_DEL_STATIC_RULE_10, (ERR_DEL_STATIC_RULE_NO_RULE_WITH_NAME) },
{ ERRCODE_SHW_STATIC_LIST_POLICY_COUNT, (ERR_SHW_STATIC_LIST_POLICY_COUNT) },
{ ERRCODE_SHW_STATIC_TAB_POLICY_3, (ERR_SHW_STATIC_TAB_POLICY_ERR_NEGPOL) },
{ ERRCODE_SHW_STATIC_TAB_POLICY_4, (ERR_SHW_STATIC_TAB_POLICY_ERR_FILTER) },
{ ERRCODE_SHW_STATIC_TAB_POLICY_5, (ERR_SHW_STATIC_TAB_POLICY_ERR_ISAKMP) },
//show filterl
{ ERRCODE_SHW_STATIC_TAB_FILTERLIST_3, (ERR_SHW_STATIC_TAB_FL_NO_RULE_NAME_STR) },
{ ERRCODE_SHW_STATIC_TAB_RULE_3, (ERR_SHW_STATIC_TAB_RULE_NO_RULE_ID) },
//show assigned gpo policy
{ ERRCODE_SHW_STATIC_TAB_ASSIGNPOL_2, (ERR_SHW_STATIC_TAB_ASSIGNPOL_NO_ACTIVE_POL) },
{ ERRCODE_STATIC_INTERNAL_ERROR, (ERR_STATIC_INTERNAL_ERROR) },
{ ERRCODE_SHW_STATIC_TAB_PRTALLFL_2, (ERR_SHW_STATIC_TAB_PRTALLFL_NO_FL) },
{ ERRCODE_SHW_STATIC_TAB_PRTALLFA_6, (ERR_SHW_STATIC_TAB_PRTALLFA_NO_FA) },
{ ERRCODE_SHW_STATIC_ASSIGNEDGPO_SRCMACHINE3, (ERR_SHW_STATIC_ASSIGNEDGPO_SRCMACHINE3) },
{ ERRCODE_SHW_STATIC_ASSIGNEDGPO_SRCMACHINE4, (ERR_SHW_STATIC_ASSIGNEDGPO_SRCMACHINE4) },
{ ERRCODE_SHW_STATIC_ASSIGNEDGPO_SRCMACHINE5, (ERR_SHW_STATIC_ASSIGNEDGPO_SRCMACHINE5) },
{ ERRCODE_SET_STATIC_POL_NEWNAME, (ERR_SET_STATIC_POL_NEWNAME) },
{ ERRCODE_SET_STATIC_RULE_NEWNAME, (ERR_SET_STATIC_RULE_NEWNAME) },
{ ERRCODE_SET_STATIC_FL_NEWNAME, (ERR_SET_STATIC_FL_NEWNAME) },
{ ERRCODE_SET_STATIC_FA_NEWNAME, (ERR_SET_STATIC_FA_NEWNAME) },
{ ERRCODE_NO_POLICY, (ERR_NO_POLICY) },
{ ERRCODE_FAILED_POLSTORE_OPEN, (ERR_FAILED_POLSTORE_OPEN) },
{ ERRCODE_NO_FILTER_ACTION, (ERR_NO_FILTER_ACTION) },
{ ERRCODE_NO_FILTER_LIST, (ERR_NO_FILTER_LIST) },
{ ERRCODE_INVALID_POLICY_NAME, (ERR_INVALID_POLICY_NAME) },
{ ERRCODE_SET_STATIC_SHOW_RULE_TYPE, (ERR_SET_STATIC_SHOW_RULE_TYPE) },
{ ERRCODE_DEL_STATIC_FILTERLIST_ALL_FL_DEL_QUERY, (ERR_DEL_STATIC_FILTERLIST_ERROR) },
{ ERRCODE_DEL_STATIC_FILTERACTION_ALL_FA_DEL_QUERY, (ERR_DEL_STATIC_FA_ERROR) },
{ ERRCODE_UPDATE_DEF_NEGPOL, (ERR_UPDATE_DEF_NEGPOL) },
{ ERRCODE_SET_POL_READ_ONLY_OBJECT, (ERR_SET_POL_READ_ONLY_OBJECT) },
{ ERRCODE_ADD_SET_RULE_READ_ONLY_OBJECT, (ERR_ADD_SET_RULE_READ_ONLY_OBJECT) },
{ ERRCODE_SET_FA_READ_ONLY_OBJECT, (ERR_SET_FA_READ_ONLY_OBJECT) },
{ ERRCODE_SET_FL_READ_ONLY_OBJECT, (ERR_SET_FL_READ_ONLY_OBJECT) },
{ ERRCODE_DEL_POL_READ_ONLY_OBJECT, (ERR_DEL_POL_READ_ONLY_OBJECT) },
{ ERRCODE_DEL_RULE_READ_ONLY_OBJECT, (ERR_DEL_RULE_READ_ONLY_OBJECT) },
{ ERRCODE_DEL_FA_READ_ONLY_OBJECT, (ERR_DEL_FA_READ_ONLY_OBJECT) },
{ ERRCODE_DEL_FL_READ_ONLY_OBJECT, (ERR_DEL_FL_READ_ONLY_OBJECT) },
{ ERRCODE_SET_STATIC_POLICY_MISSING_GPO_NAME_STR, (SET_STATIC_POLICY_MISSING_GPO_NAME_STR) },
{ ERRCODE_SET_STATIC_POLICY_GPO_SPECIFIED_ON_NODOMAIN_POLICY, (SET_STATIC_POLICY_GPO_NOT_OK_STR) },
//Dynamic error table starts here
{ ERRCODE_ADD_RULE_NO_POILCY, (ERR_DYN_ACTION_IN_OUT_NEGOTIATE ) },
{ ERRCODE_ADD_RULE_WARNING_3, (ERR_DYN_QMP_NEEDED) },
{ ERRCODE_ADD_RULE_WARNING_4, (ERR_DYN_INVALID_MIRROR) },
{ ERRCODE_PARSER_ADDRTYPE, (ERROR_PARSER_ADDRTYPE) },
{ ERRCODE_PARSER_TUNNELADDRTYPE, (ERROR_PARSER_TUNNELADDRTYPE) },
{ ERRCODE_DELETE_RULE_NO_MMFILTER, (ERR_DYN_MMF_DOES_NOT_EXIST) },
{ ERRCODE_DELETE_RULE_NO_TRANSPORT, (ERR_DYN_TRANSPORT_DOES_NOT_EXIST) },
{ ERRCODE_DELETE_RULE_NO_TUNNEL, (ERR_DYN_TUNNEL_DOES_NOT_EXIST) },
{ ERRCODE_ADD_MMP_MMPOLICY_EXISTS, (ERR_DYN_MMP_EXISTS) },
{ ERRCODE_ADD_QMP_QMPOLICY_EXISTS, (ERR_DYN_QMP_EXISTS) },
{ ERRCODE_ADD_QMF_NO_QMPOLICY, (ERR_DYN_QMP_DOES_NOT_EXIST) },
{ ERRCODE_ADD_MMF_NO_MMPOLICY, (ERR_DYN_MMP_DOES_NOT_EXIST) },
{ ERRCODE_SET_MMF_NO_MMPOLICY, (ERR_DYN_RULE_MMP_DOES_NOT_EXIST) },
{ ERRCODE_SET_QMF_NO_QMPOLICY, (ERR_DYN_RULE_QMP_DOES_NOT_EXIST) },
{ ERRCODE_DEL_NO_MMPOLICY, (ERROR_DEL_NO_MMP) },
{ ERRCODE_DEL_NO_QMPOLICY, (ERROR_DEL_NO_QMP) },
//delete rule mmf
{ ERRCODE_DELETE_RULE_MMF_1, (ERR_DYN_DEL_MMF_DOES_NOT_EXIST) },
{ ERRCODE_DELETE_RULE_MMF_2, (ERR_DYN_DEL_MMF_MMP_DOES_NOT_EXIST) },
{ ERRCODE_DELETE_RULE_MMF_3, (ERR_DYN_DEL_MMP_DOES_NOT_EXIST) },
{ ERRCODE_DELETE_RULE_MMF_4, (ERR_DYN_DEL_SPECIFIED_MMF_DOES_NOT_EXIST) },
//delete rule qmf
{ ERRCODE_DELETE_RULE_QMF_1, (ERR_DYN_DEL_MMF_DOES_NOT_EXIST) },
{ ERRCODE_DELETE_RULE_QMF_2, (ERR_DYN_DEL_MMF_MMP_DOES_NOT_EXIST) },
{ ERRCODE_DELETE_RULE_QMF_3, (ERR_DYN_DEL_MMP_DOES_NOT_EXIST) },
{ ERRCODE_DELETE_RULE_QMF_4, (ERR_DYN_DEL_SPECIFIED_MMF_DOES_NOT_EXIST) },
{ ERRCODE_DELETE_AUTH_BEING_USED, (ERR_DYN_DEL_AUTH_BEING_USED) },
{ ERRCODE_DELETE_MMF_OBJ_NOTDEL, (ERR_DYN_DEL_MMF_OBJ_NOTDEL) },
{ ERRCODE_DELETE_TRANSPORT_OBJ_NOTDEL, (ERR_DYN_DEL_TRANSPORT_OBJ_NOTDEL) },
{ ERRCODE_DELETE_TUNNEL_OBJ_NOTDEL, (ERR_DYN_DEL_TUNNEL_OBJ_NOTDEL) },
//set config
{ ERRCODE_SET_CONFIG_1, (DYNAMIC_SHOW_REG_DIAG_ERR_MSG) },
{ ERRCODE_SET_CONFIG_2, (DYNAMIC_SHOW_REG_IKE_LOG_ERR_MSG) },
{ ERRCODE_SET_CONFIG_3, (DYNAMIC_SHOW_REG_STRONG_CRL_ERR_MSG) },
{ ERRCODE_SET_CONFIG_4, (DYNAMIC_SHOW_REG_IPSEC_LOG_ERR_MSG) },
{ ERRCODE_SET_CONFIG_5, (DYNAMIC_SHOW_REG_IPSEC_EXEMPT_ERR_MSG) },
{ ERRCODE_TOO_MANY_EXEMPTS, (DYNAMIC_SET_REG_TOO_MANY_EXEMPTIONS) },
//show cmds
{ ERRCODE_SHOW_MMP_5, (DYNAMIC_SHOW_SPECIFIED_MMP_NOT_FOUND_MSG) },
{ ERRCODE_SHOW_MMP_6, (DYNAMIC_SHOW_NO_MMP_ERROR_MSG) },
{ ERRCODE_SHOW_QMP_5, (DYNAMIC_SHOW_SPECIFIED_QMP_NOT_FOUND_MSG) },
{ ERRCODE_SHOW_QMP_6, (DYNAMIC_SHOW_NO_QMP_ERROR_MSG) },
{ ERRCODE_SHOW_MMF_6, (DYNAMIC_SHOW_MMF_GENERIC_NOT_FOUND_MSG) },
{ ERRCODE_SHOW_MMF_7, (DYNAMIC_SHOW_MMF_SPECIFIC_NOT_FOUND_MSG) },
{ ERRCODE_SHOW_MMF_8, (DYNAMIC_SHOW_MMF_SPECIFIED_NOT_FOUND_MSG) },
{ ERRCODE_SHOW_QMF_6, (DYNAMIC_SHOW_QMF_GENERIC_NOT_FOUND_MSG) },
{ ERRCODE_SHOW_QMF_7, (DYNAMIC_SHOW_QMF_SPECIFIC_NOT_FOUND_MSG) },
{ ERRCODE_SHOW_QMF_8, (DYNAMIC_SHOW_QMF_SPECIFIED_NOT_FOUND_MSG) },
{ ERRCODE_SHOW_QMF_17, (DYNAMIC_SHOW_NO_RULES_ERROR_MSG) },
{ ERRCODE_SHOW_MMSAS_3, (DYNAMIC_SHOW_MMSAS_NO_SA_FOUND_MSG) },
{ ERRCODE_SHOW_QMSAS_3, (DYNAMIC_SHOW_QMSAS_NO_SA_FOUND_MSG) },
{ ERRCODE_SHOW_MMSAS_6, (DYNAMIC_SHOW_MMSAS_NOT_FOUND_MSG) },
{ ERRCODE_SHOW_QMSAS_4, (DYNAMIC_SHOW_QMSAS_NOT_FOUND_MSG) },
{ ERRCODE_SHOW_REG_16, (DYNAMIC_SHOW_REG_PARAM_NOT_SET_MSG) }
};
//
// externs
//
extern DWORD
SmartDefaults(
IN PINT_IPSEC_MM_AUTH_INFO * ppAuthInfo,
IN LPTSTR pszMachine,
IN DWORD * pdwNumberOfAuth,
IN BOOL bIsDomainPolicy
);
//
// Netsh framework function prototypes...
//
extern "C"
BOOL WINAPI DllMain(
HINSTANCE hinstDLL,
DWORD fdwReason,
PVOID pReserved );
DWORD WINAPI
InitHelperDll(
IN DWORD dwNetshVersion,
OUT PVOID pReserved
);
DWORD WINAPI
StartHelpers(
IN CONST GUID * pguidParent,
IN DWORD dwVersion
);
DWORD WINAPI
IpsecConnect(
IN LPCWSTR pwszMachine
);
VOID
PrintErrorMessage(
IN DWORD dwErrorType,
IN DWORD dwWin32ErrorCode,
IN DWORD dwIpsecErrorCode,
...
);
DWORD
DisplayErrorMessage(
IN LPCWSTR pwszFormat,
IN va_list *parglist
);
VOID
AddSplAddr(
IN OUT ADDR& Addr,
IN DWORD dwSplServer
);
DWORD
PrintErrorMessageFromModule(
IN HANDLE hModule,
IN DWORD dwMsgId,
IN va_list *parglist
);
VOID
UpdateGetLastError(
LPWSTR pwszOutput
);
LPCWSTR
GetIpsecLastError(
VOID
);
BOOL WINAPI
CheckOsVersion(
IN UINT CIMOSType,
IN UINT CIMOSProductSuite,
IN LPCWSTR CIMOSVersion,
IN LPCWSTR CIMOSBuildNumber,
IN LPCWSTR CIMServicePackMajorVersion,
IN LPCWSTR CIMServicePackMinorVersion,
IN UINT CIMProcessorArchitecture,
IN DWORD dwReserved
);
VOID
CleanupAuthMethod(
PSTA_AUTH_METHODS *ppAuthMethod,
BOOL bIsArray = FALSE
);
VOID
CleanupMMAuthMethod(
PSTA_MM_AUTH_METHODS *ppMMAuth,
BOOL bIsArray
);
VOID
CleanupAuthData(
PSTA_AUTH_METHODS *ppKerbAuth,
PSTA_AUTH_METHODS *ppPskAuth,
PSTA_MM_AUTH_METHODS *ppRootcaAuth
);
#endif //_NSHIPSEC_H_