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

📄 msgsys.h

📁 在SCO UNIX制定界面程序 可根据文件配制菜单,而不必修改源程序,非常方便
💻 H
字号:
#ifndef _MSGSYS_H_
#define _MSGSYS_H_
/*=============================================================
功能: 		
作者:		
王永忠:2001/04/05:规范程序设计
王永忠:2001/04/05:增加本地代授处理模块STANDIN_HOSTID 3
===============================================================*/

#include <sys/types.h>

#define	MSGFILE		"/etc/IPC_FILE"

#define REQ_MSG		1
#define RESP_MSG	2
#define SAF_MSG		3
#define ADDSAF_MSG	4
#define MONITOR		5

/*
#define FROM_CLI	0
#define TO_CLI		0
#define TO_SVR		0
#define FROM_SVR	0
*/

#define SWITCH_HOSTID		1		/* 必需固定 */
#define TONAS_HOSTID		2		/* 必需固定 */
#define RCVNAS_HOSTID		3		/* 必需固定 */
#define TONAC_HOSTID		4		/* 必需固定 */
#define STANDIN_HOSTID		5		/* 必需固定 */
#define ADD_HOSTID		10		/* 必需固定 */
#define TOHOST_HOSTID		78		/* 必需固定 */
#define SETTLE_HOSTID		30		/* 必需固定 */
#define STANDAUTH_HOSTID	20		/* 必需固定 */

/*	monitor 消息队列的 msg.type	*/
#define	TO_MON		10
#define TO_TRACE	11
#define TO_ERR		12

#define cmsg(a)		creat_msg(MSGFILE, a)
#define gmsg(a)		get_msg(MSGFILE, a)
#define rmsg(a) 	rm_msg(MSGFILE, a)
#define gmsgs(a,b)	get_msg_stat(MSGFILE, a, b)
#define smsgs(a,b)	set_msg_stat(MSGFILE, a, b)

#define cmsg_nonb(a)	creat_msg_nonb(MSGFILE, a)
#define gmsg_nonb(a)	get_msg_nonb(MSGFILE, a)
#define rmsg_nonb(a) 	rm_msg_nonb(MSGFILE, a)



/* ======================以下为安全子进程使用==================== */
#define TO_SAFE		6		/* -->safe */
#define FROM_SAFE	7		/* <--safe */

#ifdef wyz_del_0419
typedef unsigned char uchar;
#endif

typedef	struct {
	long	mtype;
	time_t	stamp;
	int	type;			/* 请求类型 */
	char	data[512];
}	SAFE_REQUEST;

typedef	struct {
	long	mtype;			/* type of msg queue */
	time_t	stamp;
	char	data[512];
}	SAFE_RESPONSE;

typedef struct {
	unsigned char moni_type;
	char data[299];
}	MONI_MSG;

typedef	struct {
	long	mtype;			/* type of msg queue */
	MONI_MSG moni_msg;
}	MONI_DATA;

/* moni_type define of monitor */
#define L_TRANS	1
#define R_TRANS	2
#define MESSAGE 3


	/* 请求类型定义 */
#define	GEN_KKM		2 
#define	GEN_KKM_COMPONENT	3 
#define	GEN_KK		4
#define	GEN_KD		5
#define	CHANGE_LMK	6
#define	KILL_KEY	7
#define	DISABLE_KEY	8
#define	PIN_POS2NET	9
#define	PIN_NET2NET	10
#define	CALC_NET_MAC	11
#define VERIFY_NET_MAC	12
#define	CALC_POS_MAC	13
#define VERIFY_POS_MAC	14
#define GEN_NEW_KEY 	15
#define CSM_PROC	16
#define SAFE_MNG	17
#define DATA_ENCRYPT	18
#define DATA_DECRYPT   19
#define NET_PIN_ENCRYPT     20
#define POS_PIN_DECRYPT        21
#define NET_PIN_DECRYPT        22
#define SAVE_POS_KEY            23
#define GEN_NET_KEY             24
#define WR_NET_KEY              25
#define READ_POS_KEY		26
#define POS_REQ_TRAN		27
#define NET_REQ_TRAN 		28
#define READ_POS_KEY_BASE	29
#define READ_NET_KEY_BASE	30
#define WR_HOST_KEY		31
#define ENCRYPT_HOST_KEY	32
#define DECRYPT_HOST_KEY	33
#define UPDATE_NAP_KEY		34
#define TRAN_TO_NAP		35
#define GET_POS_KEY		36
#define TRAN_FROM_NAP		37
#define SAVE_POS_ZMK_DB		38
#define LOAD_POS_ZMK_DB		39
#define READ_HOST_KEY_BASE	40
#define LOAD_CARD_NO		41
#define HOST_PIN_ENCRYPT        42
#define HOST_PIN_DECRYPT        43
#define GOLD_PIN_ENCRYPT        44
#define GOLD_PIN_DECRYPT        45


#define MORE		1
#define NO_MORE		0

#define CHANGE_PWD	0
#define UPDATE_POS_KKM	1
#define DEL_POS_KEY	2
#define UPDATE_NET_KKM	3
#define DEL_NET_KEY	4
#define GEN_LMK		5
#define UPDATE_NET_KKKD	6
#define UPDATE_POS_ZK   7
#define UPDATE_POS_fix_KKM      8

#define CHANGE		1
#define NO_CHANGE	0

#define ACTIVE 	'A'
#define KILLED	'K'

/***********ADDED for NSS **********/
#define FROM_NAC	1
#define FROM_NAS	2
#define TO_NAS		3
#define FROM_HOST	4
#define TO_HOST		5
#define TO_NAP		6
#define FROM_NAP 	7
#define FROM_CREDIT	8
#define TO_CREDIT	9	
#define FROM_GOLDCARD	10
#define TO_GOLDCARD	11


#define EN_TO_NAP "0"
#define DE_FROM_NAP "1"
#endif

⌨️ 快捷键说明

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