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

📄 mms_defs.h

📁 ICCP Toolkit 是在 Tru64下开发Tase.2通信协议的开发包
💻 H
字号:
/************************************************************************//* SISCO SOFTWARE MODULE HEADER *****************************************//************************************************************************//*   (c) Copyright Systems Integration Specialists Company, Inc.,	*//*      	  1986 - 1997, All Rights Reserved.		        *//*									*//* MODULE NAME : mms_defs.h						*//* PRODUCT(S)  : MMSEASE						*//*									*//* MODULE DESCRIPTION : 						*//*	This module contains miscellaneous definitions and variables.	*//*									*//* MODIFICATION LOG :							*//*  Date     Who   Rev			Comments			*//* --------  ---  ------   -------------------------------------------	*//* 05/07/98  DSF     05    cmd_stat is ST_LONG				*//* 12/10/97  MDE     04    Changed m_max_nest to ST_INT8		*//* 08/14/97  RKR     01    Format changes				*//* 04/02/97  DTL   7.00    MMSEASE 7.0 release. See MODL70.DOC for	*//*			   history.					*//************************************************************************/#ifndef MMS_DEFS_INCLUDED#define MMS_DEFS_INCLUDED#ifdef __cplusplusextern "C" {#endif#include "mms_def2.h"#include "gen_list.h"#include "glbsem.h"/************************************************************************//************************************************************************//* RESOURCE ALLOCATION							*//************************************************************************//* The resource configuration param below are accessable by the user	*//* They must be setup before the MMSEASE initialization 'strt_MMS'      *//* is called, and may not be modified therafter. All are set to nominal *//* values on powerup (shown in ()), and need not be modified unless	*//* desired.								*//************************************************************************/extern ST_INT max_req_pend;    /* max number of outstanding requests(16)*/extern ST_INT max_ind_pend;    /* max number of pending indications(16)	*//************************************************************************//************************************************************************//* CONTEXT SELECT ARRAY 						*//************************************************************************/extern ST_UINT *P_context_sel;/************************************************************************//************************************************************************//* MMSEASE REQUEST/INDICATION CONTROL MECHANISM 			*//************************************************************************//* This structure is used in both indication and request service. All	*//* components are available to the user for application specific use.	*//* Refer to MMSEASE documentation for more detail on it's use.          *//************************************************************************/struct cmd_service  {  ST_RET (*serve_fun)(ST_VOID *p); /* command service function select	*/  ST_CHAR *cmd_info;		   /* command specific information ptr	*/  ST_LONG cmd_stat;		   /* general command status		*/  ST_INT aux_flags[6];	   	/* auxiliary status flags		*/  };typedef struct cmd_service CMD_SERVICE;/************************************************************************//************************************************************************//* MMS OUTSTANDING REQUEST CONTROL					*//************************************************************************//* Request tracking structures						*//* Used to track requests made by the local MMS user and waiting for	*//* a response.								*//************************************************************************//* The resp_err component is either CNF_RESP_OK or has a error code (see	*//* mms_perr.h for codes). If != CNF_RESP_OK, can use ms_perror function 	*//* Note the values of the cancel_state component:			*//*     -2 - cancel attempted; reject occurred - unknown state		*//*     -1 - cancel attempted but failed; back in no-cancel state	*//*	0 - no cancel							*//*	1 - cancel.req sent, but nothing received			*//*	2 - cancel.conf(+) received, but no x.conf(-) received		*//*	3 - x.conf(-) (due to cancel) received, but no cancel.conf(+)	*//*		received						*//*	4 - x.conf(+) received or x.conf(-) (due to some other reason	*//*		than cancel) received, but no cancel.conf(-) received	*//*	5 - both x.conf(-) and cancel.conf(+) received, waiting for	*//*		u_mp_x_conf or u_mv_x_conf to be called 		*/#define CANCEL_REJECTED   	-2#define CANCEL_FAILED     	-1#define NO_CANCEL	    	0#define CANCEL_REQUESTED    	1#define POS_CANCEL_RCVD   	2#define POS_CANCEL_DUE    	3#define NEG_CANCEL_DUE		4#define CANCELLED	    	5typedef struct rqdat  {  DBL_LNK			link;	/* generic double linker list struct	*/  ST_INT pri;			/* request priority			*/  ST_INT chan;			/* channel req was sent on		*/  ST_INT  llp;			/* lower layer service select		*/  ST_UINT      context;		/* P-context select			*/  ST_INT       op;		/* mms opcode				*/  ST_UINT32    id;		/* invoke ID used on wire		*/  ST_RET       resp_err;	/* error flag (see above)		*/  ST_INT       cancl_state;	/* indicates if being cancelled & state */  time_t       req_time;	/* time request was made		*/  ST_BOOLEAN   req_info_pres; 	/* flag, set if request info is present */  ST_VOID      *req_info_ptr; 	/* pointer to request info structure	*/  struct list_of_mods	mods;	/* tracking for modifiers		*/  time_t       resp_time;	/* time request was made		*/  ST_BOOLEAN   resp_info_pres;	/* flag, set if resp info is present	*/  ST_VOID      *resp_info_ptr;	/* pointer to response info structure	*/  ST_INT       rxbuf_type;	/* flag set if rxbuf must be freed	*/  ST_UCHAR     *rxbuf;		/* pointer to buffer rx msg was in	*/  ST_VOID (*resp_rcvd_fun)(struct rqdat *req); /* resp rcvd function	*/  struct csi   cs;		/* RECEIVED CS info			*/  CMD_SERVICE  s; 	/* outstanding command service info	*/  ST_VOID      *usr;		/* For the application to use 		*/  ST_EVENT_SEM done_sem;	  } MMSREQ_PEND;/* The function below is used to terminate outstanding requests for the *//* selected channel. chan == -1 means all channels.			*/ST_RET ms_disconn_pend_req (ST_INT chan);/************************************************************************//* MMS REQUEST INDICATION CONTROL					*//************************************************************************//* Response tracking structures.					*//* Used to track requests recieved and requiring responses.		*//* Note the values of the cancel_state component:			*//*     -1 - cancel attempt denied; back in no-cancel state		*//*	0 - no cancel							*//*	1 - cancel.ind rec'd, but nothing sent                          *//*	2 - cancel.resp(+) sent, but no x.resp(-) sent yet		*//* No other states are needed at the responder, since x.resp or x.error *//* is never sent first by MMS-EASE.					*//*  Cancel states 0 & -1 are the same as the requester cancel states    *//*  MMSOP_CANCEL_FAILED      -1						*//*  NO_CANCEL	        0						*/#define CANCELING       1#define POS_CANCEL_SENT 2typedef struct rspdat  {  DBL_LNK      link;		/* generic double linker list struct	*/  ST_INT       pri;		/* indication priority			*/  ST_INT       chan;		/* channel req was sent on		*/  ST_INT       llp;		/* lower layer service select		*/  ST_UINT      context;		/* P-context select			*/  ST_INT       op;		/* mms opcode				*/  ST_UINT32    id;		/* invoke ID				*/  ST_BOOLEAN   req_info_pres; 	/* information present			*/  ST_VOID      *req_info_ptr; 	/* info pointer 			*/  struct list_of_mods	mods;	/* tracking for modifiers		*/  ST_INT       cancl_state;	/* indicates if being cancelled & state */  time_t ind_time;		/* time recieved			*/  ST_INT       rxbuf_type;	/* flag set when rxbuf must be released */  ST_UCHAR     *rxbuf;		/* pointer to buffer rx msg was in	*/  struct cmd_service s; 	/* outstanding command service info	*/  ST_BOOLEAN   add_addr_info_pres;/* LLC specific addressing info	*/  struct llp_addr_info *add_addr_info;  struct csi   cs;		/* RECEIVED CS info			*/  ST_VOID      *usr;		/* For the application to use 		*/  } MMSREQ_IND;/* This function is used to remove indications from the pending (and	*//* optionally active) indication control ques. Pass the channel # and	*//* flag to clear active que too. chan == -1 means all channels		*/ST_RET ms_clr_ind_que (ST_INT chan, ST_BOOLEAN all);/************************************************************************//************************************************************************//* CHANNEL CONTROL PARAMETERS							*//************************************************************************//* Structures and variables used for channel control handling and	*//* general MMSEASE operation						*//************************************************************************//* The structure below is used to hold general channel-specific MMS	*//* information. This information falls into two catagorys, context ctrl	*//* and INITIATE negiotiated parameters. The context control parameters 	*//* allow the user to determine the current state of the channel, and 	*//* the initiate negiotiated parmameters describe the operations and	*//* limits, etc, that are in force for the channel.			*//* INITIATE PARAMETERS : The meanings of the comp's of this struct do	*//* not correspond to the MMS protocol exactly, but represent an easy	*//* way to represent that information to the user.  For example, the	*//* maxpend_req component stores the maximum number of requests gener-	*//* ated by the local user that can be outstanding at any one time.  It	*//* makes no difference if the local user is the "calling" or "called"   *//* MMS-user.  Each of these components represents what the local user	*//* can do after negotiation of the Initiate parameters has already	*//* taken place, or what he would like to be able to do if negotiation	*//* has not yet taken place.						*//* CONTEXT PARAMETERS :							*//* Possible channel states -						*/#define M_IDLE			0x00000000L#define M_LISTEN		0x00000001L#define M_STOPPING_LISTEN	0x00000002L#define M_REPOST_LISTEN		0x00000004L#define M_ASS_REQ_PEND		0x00000008L#define M_ASS_IND_RCVD		0x00000010L#define M_ASS_RESP_PEND		0x00000020L#define M_NEG_ASS_RESP_PEND 	0x00000040L#define M_ASSOCIATED		0x00000080L#define M_INIT_REQ_PEND		0x00000100L#define M_INIT_REQ_WAIT		0x00000200L	/* CASE 2.1 only		*/#define M_INIT_URESP_WAIT	0x00000400L#define M_INIT_RESP_PEND	0x00000800L#define M_ACTIVE		0x00001000L#define M_CONCL_REQ_PEND	0x00002000L#define M_CONCL_URESP_WAIT	0x00004000L#define M_REL_IND_WAIT		0x00008000L#define M_REL_IND_RCVD		0x00010000L#define M_REL_REQ_PEND		0x00020000L#define M_REL_RESP_PEND		0x00040000L#define M_ABORT_REQ_PEND	0x00080000L#define M_ABORT_IND_RCVD	0x00100000L#define M_WAIT_DISCONNECT	0x00200000L#define M_ACSE_REJECT_PEND      0x00400000L					  /* Possible LLP types -	defined in mmsllp.h				*//* #define ACSE30_LLP		0x0002					*//* Possible contexts - defined in mmsllp.h				*//* #define MMS_PCI		0x0001					*/struct mchaninfo  {  struct    {    ST_INT   llp_type;		/* type of Lower Layer Provider		*/    ST_ULONG chan_state;	/* current state			*/    ST_INT   xmit_pend;		/* pending transmits 			*/    ST_UINT  contexts;		/* Presentation Contexts		*/    ST_CHAR  *locl_ar; 		/* local Application Reference		*/    ST_CHAR  *rem_ar; 		/* remote Application Reference		*/    } ctxt;  struct    {    struct vmd_ctrl	*vmd;    struct domain_objs	*aa_objs;    } objs;  ST_INT16 version;		/* version to use			*/  ST_INT32 segsize;		/* max message size			*/  ST_INT16 maxpend_req;		/* max requests outstanding		*/  ST_INT16 maxpend_ind;		/* max indications outstanding		*/  ST_INT8  max_nest;		/* max data nesting			*/  ST_UCHAR param_supp[2];	/* parameter support			*/  ST_UCHAR service_req[11];	/* services supported as requester 	*/  ST_UCHAR service_resp[11];	/* services supported as responder 	*/  ST_INT   file_blk_size; 	/* file block size			*/  ST_INT   download_blk_size; 	/* download block size			*/  ST_CHAR  *user_info;		/* reserved for user			*/  };typedef struct mchaninfo MCHANINFO;				/* ptr to table of chan ctrl structs	*/				/* [max_mms_chan], allocated at init	*/extern struct mchaninfo *mms_chan_info;#ifdef __cplusplus}#endif#endif    /* MMS_DEFS_INCLUDED */

⌨️ 快捷键说明

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