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

📄 rabbit_ids.h

📁 界面程序
💻 H
字号:
/************************************************************************

<<Begin Documentation>>
<<Keyword: rabbitids, rabbit-ids>>

NAME
  	rabbit_ids.h -- routines and definitions for Rabbit process IDs

SYNOPSIS
  	void ridInit (p_RID)	* initialize Rabbit ID structure 	*
	RABBIT_ID *p_RID;	* pointer to structure to initialize	*

	char *ridStrClassID (class)   * Format Rabbit class ID		*
	R_CLASS_ID  class;	      * class ID to print		*

	void ridPrClassID (fp, class) * Print Rabbit class ID		*
	FILE	   *fp;		      * where to print it		*
	R_CLASS_ID  class;	      * class ID to print		*

	char *ridStrTypeID (type)     * Format Rabbit process type	*
	R_TYPE_ID  type;	      * type ID to print		*

	R_TYPE_ID ridAtoTypeID (sType)
	char *sType;                  * string to convert to type	*

	bool ridIsTypeID (type)
	R_TYPE_ID  type;	      * type ID to check		*

	void ridPrTypeID (fp, type)   * Print Rabbit process type	*
	FILE	  *fp;		      * where to print it		*
	R_TYPE_ID  type;	      * type ID to print		*

	char *ridStrInstance (instance)   * Format Rabbit instance ID	*
	R_INSTANCE_ID  instance;	  * the instance to print	*

	void ridPrInstance (fp, instance) * Print Rabbit instance ID	*
	FILE	      *fp;		  * where to print it		*
	R_INSTANCE_ID  instance;	  * the instance to print	*

	void ridPrRabbitID (fp, pRabbitID, indent) * Print Rabbit ID	*
	FILE	   *fp;				   * where to print it	*
	RABBIT_ID  *pRabbitID;			   * Rabbit ID to print	*

DESCRIPTION
  	This file contains Rabbit ID types and constants and specifies
	routines that manipulate and initialize Rabbit ID structures.

	ridInit() initializes a Rabbit ID structure.  "p_RID" specifies the
	    structure to be initialized.

	ridStrClassID() converts a class ID to a printable string.  "class"
	    is the class identifier to convert.  It returns a pointer to
	    a static buffer that is reused with the next call.

	ridPrClassID() writes a printable version of Rabbit class ID "class"
	    to the open file associated with "fp".

	ridStrTypeID() converts a type ID to a printable string.  "type"
	    is the type identifier to convert.  It returns a pointer to
	    a static buffer that is reused with the next call.

	ridPrTypeID() writes a printable version of Rabbit type ID "type"
	    to the open file associated with "fp".

	ridAtoTypeID() converts a string representation of a Rabbit type
	    identifier (such as one produced by a call to ridStrClassID())
	    into a true Rabbit type ID.  "sType" is the string to convert.
	    ridAtoTypeID() returns the Rabbit type identifier, or NO_TYPE
	    on failure.

	ridStrInstance() converts a Rabbit instance to a printable string.
	    "instance" is the instance identifier to convert.  It returns a
	    pointer to a static buffer that is reused with the next call.

	ridPrInstance() writes a printable version of Rabbit instance
	    "instance" to the open file associated with "fp".

	ridPrRabbitID() writes a printable version of the Rabbit ID structure
	    pointed to by "pRabbitID" to the file corresponding to "fp",
	    indenting each line of the output by "indent" spaces.

NOTES
	Not all classes have specific types associated with them.

	Instance identifiers are currently restricted to positive
	integer values. 

<<End Documentation>>
Copyright 1992 by Rabbit Software Corporation
*************************************************************************/

#ifndef _RABBIT_IDS_H_
#define _RABBIT_IDS_H_

#ifdef HEADERVERSIONS
static char *_rabbit_ids_h_ = "@(#)rabbit_ids.h	1.22 !R2";
#endif /* HEADERVERSIONS */

typedef short       R_BASE_ID;		/* Rabbit class/type ID type	*/
typedef R_BASE_ID   R_CLASS_ID;		/* Rabbit class identifier	*/
typedef R_BASE_ID   R_TYPE_ID;		/* Rabbit type identifier	*/
typedef int	    R_INSTANCE_ID;	/* Rabbit instance identifier	*/

typedef struct				/* "who am I" structure		*/
{
    R_CLASS_ID		id_class;	/* class identifier		*/
    R_TYPE_ID		id_type;	/* type identifier		*/
    R_INSTANCE_ID	id_instance;	/* instance identifier		*/
    PID			id_pid;		/* process pid, if applicable	*/
} RABBIT_ID;

/* Standard class, type, and instance identifer initializers.		*/
#define NO_CLASS    	((R_CLASS_ID ) 0)	/* "no class" ID	*/
#define NO_TYPE	    	((R_TYPE_ID) 0)		/* "no type" ID		*/
#define NO_INSTANCE 	((R_INSTANCE_ID) -1)	/* "no instance" ID	*/
#define ANY_CLASS	NO_CLASS		/* "any class" ID	*/
#define ANY_TYPE	NO_TYPE			/* "any type" ID	*/
#define ANY_INSTANCE	NO_INSTANCE		/* "any instance" ID	*/

#define C_DATALINK  	((R_CLASS_ID) 100)	/* class = data link	*/
#define   T_SDLC	101	/*   type = SDLC	*/
#define   T_QLLC	102	/*   type = QLLC	*/
#define   T_TOKENRING	103	/*   type = Token Ring	*/ 

/*  Some tasks can publish as both PROTHANDLERs and LUMANAGERs
    depending on the context.  For example, the GreenBook Agent
    emulates a PH for the LUMs when on a client, but it emulates
    a LUM for the PH when it is on the server.
*/
#define C_PROTHANDLER	((R_CLASS_ID) 200)	/* class = PH		*/
#define   T_SNAPH	201	/*   type = SNA PH	*/
#define   T_BSCPH	202	/*   type = BSC PH	*/
#define   T_NOVAGENT	203	/*   type = Novell Agent*/
#define   T_PUCPH	204	/*   type = PU Conc. "PH"*/
#define   T_GREENPH	205	/*   type = Green Book "PH"*/

#define C_LUMANAGER	((R_CLASS_ID) 300)	/* class = LU Manager	*/
#define   T_S3270DH	301	/*   type = SNA 3270 DH	*/
#define   T_B3270DH	302	/*   type = BSC 3270 DH	*/
#define   T_SRJELUM	303	/*   type = SNA RJE LUM	*/
#define   T_BRJELUM	304	/*   type = BSC RJE LUM	*/
#define   T_LU62MGR	305	/*   type = LU 6.2 Mgr.	*/
#define   T_USERLUM	306	/*   type = user LUM	*/  
#define   T_PNCP	307	/*   type = PNCP	*/
#define   T_NETVIEW	308	/*   type = Netview 	*/
#define   T_BLUEBOOK	309	/*   type = Blue Book 	*/
#define   T_REDBOOK	310	/*   type = Red Book	*/
#define   T_PUCLUM	311	/*   type = PU Conc. "LUM"*/
#define   T_GREENLUM	312	/*   type = Green Book "LUM"*/
#define   T_SNCP	313	/*   type = SNCP	*/
#define   T_CMDLINELUM  314	/*   type = Command Line LUM */

#define C_3270PIMAPPL	((R_CLASS_ID) 400)	/* class = 3270 PIM 	*/
#define   T_CUS3270PIM  401	/*   type = Custom 3270 PIM */

#define C_3270APIAPPL	((R_CLASS_ID) 500)	/* class = 3270 HLLAPI	*/

#define C_LU62TP	((R_CLASS_ID) 600)	/* class = LU6.2 TP	*/
#define   T_TPRM	601	/*   type = TPRM	*/
#define   T_CPIC	602	/*   type = CPI-C	*/
#define   T_IPSNA	603	/*   type = IP/SNA	*/

#define C_PNCPPIMAPPL	((R_CLASS_ID) 700)	/* class = PNCP PIM 	*/

#define C_RJELUMAPPL	((R_CLASS_ID) 800)	/* class = RJE LUM Appl.*/
#define   T_RJECONSOLE	801	/*   type = RJE console	*/
#define   T_RJEPRINTER	802	/*   type = RJE printer	*/

#define C_RESMGR	((R_CLASS_ID) 900)	/* class = resource mgr */
#define   T_MUPOOL	901	/*   type = MU Pool	*/

#define C_POPUP		((R_CLASS_ID) 1000)	/* class = pop up	*/
#define   T_NETCOMM	1001	/*   type = NetComm	*/

#define C_PMAILER	((R_CLASS_ID) 1100)	/* class   = pmail user	*/
#define   T_CMIB	1101	/*    type = CMIB	*/
#define   T_SNMP	1102	/*    type = SNMP	*/
#define   T_OSDCA	1103	/*    type = OSDCA	*/
#define   T_RMA		1104	/*    type = RMA	*/

#define C_TPMGR		((R_CLASS_ID) 1200)	/* class = TP Manager	*/
#define   T_TPMGR	1201	/*   type = TP Manager	*/

/*  The ASCLOGGER and BINLOGGER support ascii and binary logging by
    components on a front-end card, e.g. SDLC.
*/
#define C_UTILITY	((R_CLASS_ID) 1300)	/* class = utilities	*/
#define   T_LINEMONITOR	1301	/*   type = Line Monitor*/
#define   T_ASCLOGGER	1302	/*   type = Ascii Logger*/
#define   T_BINLOGGER	1303	/*   type = Binary Logger*/
#define   T_NETMON	1304	/*   type = Network Monitor */
#define   T_CONFIG	1305	/*   type = Configurator */
#define C_SERVICES	((R_CLASS_ID) 1400)	/* class = services */
#define   T_SESSSERV	1401	/* type = session services */
#define   T_DISCSERV	1402	/* type = discovery services */

#define C_62AGENT	((R_CLASS_ID) 1500)	/* class = LU62 Agent */
#define   T_REDAGENT	1501	/* type = Redbook Agent */

#define C_DRIVERS	((R_CLASS_ID) 1600)	/* class = Drivers	*/
#define	  T_SPXIPX	1601	/* type = SPX/IPX	*/
#define	  T_NETBIOS	1602	/* type = NETBIOS	*/
#define	  T_TCPIP	1603	/* type = TCP/IP	*/
#define	  T_X25		1604	/* type = X25		*/

/* macro to determine whether or not an ID is a class or type ID.	*/
#define R_IS_CLASS_ID(id)	(((id) % 100) == 0)

extern void ridInit ( /* RABBIT_ID *p_RID */ );
extern char *ridStrClassID ( /* R_CLASS_ID class */ );
extern void ridPrClassID ( /* FILE *fp, R_CLASS_ID class */ );
extern char *ridStrTypeID ( /* R_TYPE_ID type */ );
extern void ridPrTypeID ( /* FILE *fp, R_TYPE_ID type */ );
extern bool ridIsTypeID ( /* R_TYPE_ID type */ );
extern R_TYPE_ID ridAtoTypeID ( /* char *sType */ );
extern char *ridStrInstance ( /* R_INSTANCE_ID instance */ );
extern void ridPrInstance ( /* FILE *fp, R_INSTANCE_ID instance */ );
extern void ridPrRabbitID ( /* FILE *fp, RABBIT_ID *pRabbitID, int indent */ );
extern void ridPrBaseID ( /* FILE *fp, R_BASE_ID id */ );

/* convert R_TYPE_ID to R_CLASS_ID */
#define ridTypeToClass(rtype)   (((rtype) / 100) * 100)

/* macro to return a class to type ID string.	*/
#define ridStrBaseID(id) \
	((R_IS_CLASS_ID(id)) ? ridStrClassID(id) : ridStrTypeID(id))

#endif /* _RABBIT_IDS_H_ */

⌨️ 快捷键说明

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