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

📄 suicacse.h

📁 ICCP Toolkit 是在 Tru64下开发Tase.2通信协议的开发包
💻 H
📖 第 1 页 / 共 3 页
字号:
#ifndef SUICACSE_H#define SUICACSE_H/************************************************************************//* SISCO SOFTWARE MODULE HEADER *****************************************//************************************************************************//*   (c) Copyright Systems Integration Specialists Company, Inc.,	*//*		1988 - 2002, All Rights Reserved			*//*									*//* MODULE NAME : suicacse.h						*//* PRODUCT(S)  : SUIC 3.0						*//*									*//* MODULE DESCRIPTION : 						*//* This module contains SUIC definitions and external declarations for	*//* global SUIC variables. This module should be included with user	*//* functions that need to interface with SUIC				*//*									*//* MODIFICATION LOG :							*//*  Date     Who   Rev			Comments			*//* --------  ---  ------   -------------------------------------------	*//* 01/08/02  EJV     09    Keep MARBEN undefined: not needed in MMS-Lite*//* 12/14/01  EJV     08    Del code for unsupported platforms & hardware*//* 04/26/99  DSF     07    Security related changes			*//* 02/09/98  RKR     06    Made ChannelTypeToUse perm part of DIB_ENTRY */ /* 11/13/97  DSF     05    Changed APP_REF_FORM defines to be consistent*//*			   with ASS_INFO				*//* 09/26/97  DSF     04    Added ACSE_ABORT_PRINT			*//* 08/13/97  DSF     03    AR Name management support			*//* 07/29/97  DSF     02    Security Attack stuff			*//* 07/29/97  DSF     01    APP_REF stuff moved here			*//* 04/11/97  DSF   7.00    MMSEASE 7.0 release. See MODLS70.DOC for	*//*			   history.					*//************************************************************************/#ifdef __cplusplusextern "C" {#endif									  #ifdef ADD_COT7_EXT#include "cot7df.h"#endif#ifdef ADD_RS_EXT#include "rsdf.h"#endif#include "glberror.h"#include "asn1defs.h"#include "slog.h"/************************************************************************//* Defines that all SUICs should use. Must be before other #includes	*//************************************************************************//* Transport provider definitions */#define TP4		0#ifndef PSOS_SYSTEM#define TCP		1#endif/* Selector size limits */#define MAX_P_SEL	16#define MAX_S_SEL	16#define MAX_T_SEL	32#define MAX_N_SEL	20#define IP_ADDR_LEN	4#define HOST_NAME_LEN	64#define RFC1006_PORT	102#define MAX_NAME_LEN		64#define MAX_HOST_LEN		32#define TAG_MNGT_ADDR		0#define TAG_MNGT_HOST		1/************************************************************************//* This define represents the maximum number of channels.		*/extern ST_INT s_max_chan;	/* actual number of suic channels used	*/extern ST_INT s_msgsize;		/* max transfer data size		*//************************************************************************//* Select the board type here						*//* These defines are used in the sample source code to make use of	*//* board specific operations, such as status or debug displays. 	*//** #define DECNP5 **/#define MARBEN			/* Now select the board specific include file	*/#ifdef DECNP5#define MAX_SUIC_CHAN 200#include "decnp5_a.h"		/* OpenVMS */#endif#ifdef MARBEN#include "marben_a.h"		/* MARBEN				*/#endif#ifdef REDUCED_STACK#include "rs_a.h"#endif#ifdef LEAN_T#include "lean_a.h"#endif#define DIRECTORY_SUPPORT	(defined (X500_SUPPORT) || defined (LDAP_SUPPORT))#include "gen_list.h"/************************************************************************//************************************************************************//* Error code definitions						*//* These codes are returned when a SUIC command function detects an	*//* error condition.							*//************************************************************************/#define SE_CPU_ALLOC  		0x0B01		/* Memory allocation error	*/#define SE_CHAN_ERR   		0x0B02		/* Invalid channel number	*/#define SE_QUE_FULL   		0x0B03		/* SUIC send queue full		*/#define SE_CHAN_CTRL  		0x0B04		/* Channel control error	*/#define SE_CTRL_ALLOC		0x0B05		/* control block alloc error	*/#define SE_INSFRES		0x0B06		/* insufficient SUIC resources	*/#define SE_NAMENOTFOUND		0x0B07		/* name not found in local DIB	*/#define SE_CHANNOTREG		0x0B08		/* channel not registered	*/#define SE_NOPARAM		0x0B09		/* mandatory param missing	*/#define SE_INVPARAM		0x0B0A		/* invalid param supplied	*/#define SE_INVPDU		0x0B0B		/* invalid PDU encounetred	*/#define SE_INVASN		0x0B0C		/* invalid ASN specified	*/#define SE_INVTSN		0x0B0D 		/* invalid TSN specified	*/#define SE_INVCTXT		0x0B0E		/* invalid AP context specified	*/#define SE_INVPCI		0x0B0F		/* invalid PCI specified	*/#define SE_INVOBJID		0x0B10		/* invalid OBJECT IDENTIFIER	*/#define SE_SIMPLY_ENC		0x0B11		/* simply encoded data		*/#define SE_MSGSIZETOOBIG	0x0B12		/* user-set s_smgsize too big   */#define SE_NOLLP	        0x0B13		/* your LLP isn't up 		*/#define SE_NOT_BOUND		0x0B14		/* not bound to a DSA		*/#define SE_MDS_UNEXPECTED	0x0B15		/* unexpected MDS result	*/#define SE_MDS_INVALID_SYNTAX	0x0B16		/* invalid attribute syntax	*/#define SE_BAD_MECH_NAME	0x0B17		/* unrecognized authentication mechanism name */#define SE_SECURITY_CONTEXT	0x0B18		/* security context could not be created */#define SE_SECURE_DATABASE	0x0B19		/* Security Database access error */#define SE_ENCRYPT		0x0B1A		/* DES CBC Encryption problem 	*/#define SE_DECRYPT		0x0B1B		/* DES CBC Decryption problem	*/#define SE_ACTIVATE		0x0B1C		/* Name activation problem	*/#define SE_DEACTIVATE		0x0B1D		/* Name deactivation problem	*//************************************************************************//* SUIC Debug mechanism variables, functions.				*//************************************************************************//* These are needed for compatibility only                              */#define CTRLRX_PRINT	0x01#define CTRLTX_PRINT	0x02#define CTRLERR_PRINT	0x04#define SUICDEC_PRINT	0x08#define ACSE_IND_PRINT	0x01#define ACSE_CNF_PRINT	0x02#define ACSE_ERR_PRINT	0x04#define ACSE_DEC_PRINT	0x08#if defined(vms)#define OSAK_PRINT      0x0010#define OSAK_DEB    0x0020#endif#define ACSE_NERR_PRINT	0x40#define ACSE_ABORT_PRINT	0x80#define ACSE_IND_PRINT_TYPE	2001#define ACSE_CNF_PRINT_TYPE	2002#define ACSE_ERR_PRINT_TYPE     2003#define ACSE_DEC_PRINT_TYPE	2004#define ACSE_NERR_PRINT_TYPE	2005#define ACSE_ABORT_PRINT_TYPE	2006extern ST_UINT s_debug_sel;extern ST_VOID (*s_menu_fun) (ST_VOID);/************************************************************************//* The variable below is set to exception code when exceptions occur.	*//************************************************************************/extern ST_INT s_err;	        /* set when SUIC exception detected	*/extern ST_INT s_map_err;       /* set when E_SUBSYS id used            *//************************************************************************//* Exception code definitions						*//************************************************************************/#define SX_INTERNAL     	0x0F01  	/* internal SUIC error          */#define SX_CPU_ALLOC    	0x0F02		/* memory allocation error	*/#define SX_CTRL_ALLOC   	0x0F03		/* control block alloc error	*/#define SX_NOCTRL		0x0F04		/* Out of control blocks	*/#define SX_NODATA		0x0F05		/* Out of data buffers		*/#define SX_QUE_FULL   		0x0F06		/* SUIC send queue full		*/#define SX_INVPDU		0x0F07		/* invalid PDU data field	*/#define SX_INVCHAN		0x0F08		/* invalid channel number	*/#define SX_BADCB		0x0F09		/* unknown CB from board	*/#define SX_ENCERR		0x0F0A		/* ASN.1 encode error		*/#define SX_CTRL_FREE		0x0F0B		/* control block free error	*/#define SX_DATA_FREE		0x0F0C		/* data buffer free error	*/#define SX_DATABUF_OVRFLW       0x0F0D     	/* data being received  	*/                                        	/* exceeds s_msgsize            *//************************************************************************//* SUIC state masks							*//************************************************************************/#define SM_CHAN_REG		0x0001	/* channel registered		*/#define SM_ASS_REQ_PEND		0x0002	/* associate request pending	*/#define SM_LISTEN		0x0004	/* listen outstanding		*/#define SM_ASS_ACTIVE		0x0008	/* association active		*/#define SM_CANLISTEN_PEND	0x0010	/* cancel pending		*/#define SM_REL_REQ_PEND		0x0020	/* release request pending	*/#define SM_ABT_REQ_PEND		0x0040	/* abort request pending	*/#define SM_P_ABORT              0x0080  /* Issue P-Abort to User        */#define SM_ASS_IND_RCVD         0x0100  /* associate Indication received*/#define SM_ASS_RSP_PEND         0x0200  /* associate response pending   */#define SM_ASS_REJ_PEND         0x0400  /* associate reject pending     */#define SM_REL_IND_RCVD         0x0800  /* release indication received  */#define SM_REL_RSP_PEND         0x1000  /* release response pending     */#define SM_MDS_READ_PEND        0x2000  /* MDS read request pending	*//************************************************************************//* Security-specific structures and function declaration		*//************************************************************************/#ifdef SECURITY_SUPPORT#define NUM_PASSWD_LEVELS	8#define MAX_USER_NAME		65#define MAX_PASSWD_LEN		129#define KEY_LENGTH		8#define IV_LENGTH		8/************************************************************************//* Structure used to store encryption key information			*//************************************************************************/typedef struct key_info  {  ST_INT index;  ST_CHAR key[KEY_LENGTH];			/* key */  } KEY_INFO;/************************************************************************//* Structure used to store password information				*//************************************************************************/typedef struct password_info  {  ST_INT level;  ST_BOOLEAN passwd_pres;			/* password present flag */  ST_CHAR *password;			/* password */  } PASSWORD_INFO;/************************************************************************//* Application name - used to identify who we are for incoming connections *//************************************************************************/extern ST_CHAR s_appname[];extern ST_BOOLEAN s_app_secure;		/* indicates if application is secure */extern ST_INT s_num_app_pass;		/* number of config'd passwords */extern PASSWORD_INFO *s_app_pass_tbl;	/* table of passwords *//************************************************************************//* Structure used to return security information for a remote name	*//************************************************************************/typedef struct crypto_cfg  {  ST_CHAR *name;		/* Remote AR Name			*/  ST_INT algo_type;		/* Type of encryption method		*/  MMS_OBJ_ID mech_name;  union    {    struct       {      ST_BOOLEAN passwd_pres;		/* length of encrypted password */      ST_CHAR *password;      } pass;    struct      {      MMS_OBJ_ID name_id;      ST_INT index;      ST_CHAR key[KEY_LENGTH];      ST_CHAR iv[IV_LENGTH];      ST_BOOLEAN passwd_pres;		/* password present flag */      ST_CHAR *password;		/* password */      } descbc;    } u;  ST_CHAR *user_reserved;		/* reserved for the user */  } CRYPTO_CFG;/************************************************************************//* Structure used to store user security information			*//************************************************************************/typedef struct user_crypto_info  {  ST_CHAR user_name[MAX_USER_NAME];  MMS_OBJ_ID name_id;  ST_BOOLEAN detect_replay;  ST_INT replay_timeout;  ST_INT num_crypto_cfg;		/* number of CRYPTO_CFG records	*/  CRYPTO_CFG *crypto_cfg; 		/* head of CRYPTO_CFG record array */  } USER_CRYPTO_INFO;extern ST_INT s_num_user_crypto_info;		/* number of User records */extern USER_CRYPTO_INFO *s_user_crypto_info;	/* head of user array *//************************************************************************//* Structure used to store pointers to algo-specific handler functions	*//************************************************************************/typedef struct crypto_info  {  ST_CHAR *(*create_calling_context) (CRYPTO_CFG *crypto_cfg);  ST_CHAR *(*create_responding_context) (MMS_OBJ_ID *mech_name, 	  	           	         ST_INT auth_value_len,		     		         ST_CHAR *auth_value);  ST_RET (*set_calling_auth) (ST_CHAR *calling_context,   			      MMS_OBJ_ID *mech_name,  			      ST_INT *auth_value_len, 		              ST_CHAR **auth_value);  ST_RET (*set_responding_auth) (ST_CHAR *responding_context,

⌨️ 快捷键说明

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