📄 gate_ext.h
字号:
#ifndef _GATE_EXT_H_
#define _GATE_EXT_H_
#ifdef HEADERVERSIONS
static char *_gate_ext_h_ = "@(#)gate_ext.h 2.15 !R2";
#endif
/************************************************************************\
gate_ext.h -- External Gateway defines and structures.
Copyright 1990 - 1993 by Rabbit Software Corporation
\************************************************************************/
#include "rabbit_ids.h"
/************************************************************************\
Notes regarding the IPCBuffer:
Any header needed between communicating tasks is put in the first IPCBuffer.
Data follows in one or more IPCBuffers linked by the `next' pointer. The
`first' and `prev' pointers are for the internal use of each task, they are
not valid across an IPC call.
IPCBuf.CntlBlk.len is the size of the valid portion of one IPCBuffer, not
including the CntlBlk (the ICB). It is always IPCSIZETODATA plus the number
of valid data bytes in IPCBuf.data[].
For a linked list of IPCBuffers, the header specific to the communicating
tasks may have a length field that defines the aggregate size of the data
portion of the message in all linked IPCBuffers.
The header between the snaPH and the Data Link is a DIBHdr. Between the
snaPH and the Applications (LUMs) it is an SNAHdr. When SNA data is
transmitted, the first 6 bytes are the Transmission Header (TH) and the
following 259 bytes are the BIU. When the TH indicates First-in-Segment,
the RU starts with the Request/Response Header (RH). When not conveying
SNA data, the data format is determined by convention between the
cooperating tasks.
\************************************************************************/
/* the ICB, IPC Control Block.
*/
typedef struct
{
R_TYPE_ID to; /* destination task */
R_TYPE_ID from; /* origination task */
word cmd; /* command field */
word len; /* length of following data */
} icb;
#define ICB icb
#define icbNULL ((icb *)0)
/* The Cannonical ICB. Convert the ICB from the above native structure
to an Intel-format byte stream for transmission between processors.
(e.g. between an non-Intel UNIX box and the RBx5 card).
*/
#define icbTO 0 /* offset of 'to' field. */
#define icbFROM (icbTO + sizeof(R_TYPE_ID)) /* offset of 'from' field. */
#define icbCMD (icbFROM + sizeof(R_TYPE_ID)) /* offset of 'cmd' field. */
#define icbLEN (icbCMD + sizeof(word)) /* offset of 'len' field. */
#define nICB (icbLEN + sizeof(word)) /* Size of Cannonical ICB. */
/* the IPCBuffer.
*/
#define sIPCDATA 265
typedef struct IPCBUF
{
icb CntlBlk; /* Interface Control Block */
struct IPCBUF *next; /* Ptr to linked ipcbuf */
struct IPCBUF *fwd; /* Ptr to linked ipcbuf */
struct IPCBUF *prev; /* Ptr to linked ipcbuf */
byte data[sIPCDATA]; /* data portion */
} ipcbuf;
#define IPCBUF ipcbuf
#define IPCBuf ipcbuf
#define IPCBuffer ipcbuf
#define ipcNULL ((ipcbuf *)0)
/* offset to ipcbuf.data[0], not counting the CntlBlk.
*/
#define IPCSZTODATA (3 * sizeof (ipcbuf *))
#define IpcSzToData IPCSZTODATA
/* N O T E:
This PH_LOW_WATER is obsolete and will be removed in the near future.
The Low Water Mark is now obtained from the syscfg database.
*/
/* Low Water Mark: The snaPH will not take an IPC Buffer from the free
pool to read from DLC when this many (or fewer) remain. The reserved
IPC Buffers are for the DH:
1 (SNAHDR) + 128 (32K File Xfer)
The 3270DH is the worst case, so usage by RJE is not included in the
calculation. APPC set's it's own low water mark as a percentage of the
total number of buffers, but ensures it is always well above the PH's.
The low water mark is now a configurable parameter in the System
Configuration Database. This define is obsolete.
*/
#define PH_LOW_WATER (1 + 128)
/****************************************************************/
/* Counts */
/****************************************************************/
#define MAXDLCS 4 /* 2-SDLC, 1-QLLC, 1-802.2 */
/* MAXDLCS is not used? tomd*/
#define MAX_SDLC_LINKS 4 /* Max 2 adapters with 2 links per adapter. */
#define MAX_8022_LINKS 16 /* Max 2 adapters with 8 virtual links per
adapter. */
#define MAX_QLLC_LINKS 16 /* max 2 cards with 2 physical links per card,
4 virtual circuits per physical link. */
#define MAX_LINKS (MAX_SDLC_LINKS + MAX_8022_LINKS + MAX_QLLC_LINKS)
#define MAXLINKS MAX_LINKS
#define MAXPUS 16
#define MAXPU MAXPUS
#define POOLPERLU 4 /* obsolete! only 1 POOLPERLU! tomd*/
#define MAXPOOLS 100 /* obsolete! no limit tomd*/
/****************************************************************/
/* "Angora Enterprise Gateway" Sizes */
/****************************************************************/
#define aegNAMESIZE 9 /* size of names (with EOS) */
#define aegPASSSIZE (aegNAMESIZE - 1) /* no EOS on the password */
#define aegDESCSIZE 65 /* size of descriptions (with EOS) */
/* soon-to-be obsolete (or redefines of aeg*) sizes for various things...
*/
#define sLINKNAME aegNAMESIZE /* Size of Link Name, w/NUL */
#define sPUNAME aegNAMESIZE /* Size of PU Name, w/NUL */
#define sCUNAME aegNAMESIZE /* Size of PU Name, w/NUL */
#define sLUNAME aegNAMESIZE /* Size of LU Name, w/NUL */
#define sPOOLNAME aegNAMESIZE /* Size of Pool name, w/NUL */
#define sNETID 9 /* Size of Network Id, w/NUL */
#define sLINKTID 15 /* Size of Terminal Id, w/NUL */
#define sAPPLNAME 9 /* Size of Application name, w/NUL */
#define sDLCNAME 9 /* Size of Data Link Control name, w/NUL*/
#define sSRVRNAME 9 /* Size of Server (LUM) name, w/NUL */
#define sPARTNAME 17 /* Size of LU-LU partner name, w/NUL */
#define sWKSTNAME 8 /* Size of Wkst Network Name, no NUL */
#define sWKSTADDR 12 /* Size of Wkst Network Address, no NUL */
#define sMODENAME 30 /* Size of Wkst Mode name w/NUL */
#define sASYNCNAME 30 /* Size of Wkst AsyncDev name w/NUL */
#define sGWNAME aegNAMESIZE /* Size of GW Name, w/NUL */
#define sGWMONPASSWD aegPASSSIZE /* Size of GWMON Password, no NUL */
/* I'd like to get rid of these typedefs too, is that possible? tomd
*/
typedef char linkname[sLINKNAME];
typedef char puname[sPUNAME];
typedef char luname[sLUNAME];
typedef char netname[sNETID];
typedef char applname[sAPPLNAME];
typedef char srvrname[sSRVRNAME];
typedef char partname[sPARTNAME];
typedef char cuname[sCUNAME];
typedef char poolname[sPOOLNAME];
typedef char dlcname[sDLCNAME];
/****************************************************************/
/* Link Characteristics */
/****************************************************************/
/* Link Type - (e.g., SDLC, X.25, Channel)
*/
#define lkSDLC 0 /* SDLC link */
#define lkQLLC 1 /* QLLC Link */
#define lkX25 2 /* X.25 */
#define lkBSC 3 /* BSC link */
#define lkTR 4 /* Token-Ring*/
#define lkNONE 9 /* Random number stands for no link */
/****************************************************************/
/* Link */
/****************************************************************/
/* Activation
*/
#define actMANUAL 0 /* Manual activation. */
#define actAUTO 1 /* Automatic activation. */
/* Duplex
*/
#define slHALFD 0 /* half-duplex */
#define slFULLD 1 /* full-duplex */
/* Line
*/
#define slSWITCHED 0 /* switched line */
#define slLEASED 1 /* leased line */
/* Encoding
*/
#define NRZ 0 /* non-return to zero */
#define NRZI 1 /* non-return to zero inverted */
/* RTS
*/
#define slCONTROLLED 0 /* rts on only during send. */
#define slCONSTANT 1 /* rts on all the time. */
/* Upstream/Downstream related link macros, used with DIBHDR.diLnkInd
*/
#define MAXUSLINKID 0x3ff /* Up Stream Link Ids: 0 to 1023 */
#define MAXDSLINKID 0xffff /* Down Stream Link Ids: 1024 to 65535 */
#define isUSlink(LID) (LID <= MAXUSLINKID)
#define isDSlink(LID) (!isUSlink(LID))
/****************************************************************/
/* Physical Unit Characteristics */
/****************************************************************/
/* Type
*/
#define puHOST 0 /* Host node. */
#define puPEER 1 /* Peer node. */
#define puHOST21 2 /* Host PU 2.1 node */
#define puT1 10 /* PU Type 1 */
#define puT2 0 /* PU Type 2.0 */
#define puT21 1 /* PU Type 2.1 */
/* Role - should match roles in file sStation.h of SDLC
*/
#define puSEC 0 /* Secondary */
#define puPRI 1 /* Primary */
#define puNEG 3 /* Negotiable */
#define puNONE 4 /* No Role established */
/* Assembly Option
*/
#define puNOASM 0 /* No assembly */
#define puSESSASM 1 /* Session assembly */
#define puSTASM 2 /* Station assembly */
/* Local XID format
*/
#define XIDLEN 4
#define puFMTZERO 0 /* 3270, 3770, LU6.2 */
#define puFMTONE 1 /* 3270 */
#define puFMTTHREE 3 /* LU6.2 */
#endif /* _GATE_EXT_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -