|
|
DataMuseum.dkPresents historical artifacts from the history of: RC9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: @ T s
Length: 8092 (0x1f9c)
Types: TextFile
Notes: @(#)subpu.h 13.1 (RC International) 91/02/02 */
Names: »subpu.h«
└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
└─⟦bbf173f5c⟧ »0004«
└─⟦this⟧ »./usr/include/sys/subpu.h«
/** @(#)subpu.h 13.1 (RC International) 91/02/02 */
/*
* This file contains the structures used in the system calls. These are
* the structures: union slot and struct slot_class_info.
*/
/**
* void
* subpuattach(pathname, puname, subpuname)
* char *pathname;
* char *puname;
* char *subpuname;
*
*
* void
* subpucontrol(pathname, request, data)
* char *pathname;
* u_int request;
* caddr_t data;
*/
#ifndef __SUBPU__
#define __SUBPU__
/***************************************\
* Include files... *
\***************************************/
#include <rte/lan.h>
/***************************************\
* Constants... *
\***************************************/
/*
* SUBPU_MAX_CLASSES is the maximum number of classes that can exist for
* one subpu.
*
* Used in <sys/sysinfo.h>
*/
#define SUBPU_MAX_CLASSES 10
/*
* MAXSUBPUNAMELEN is the maximum lenght of the name of a sub-PU.
*/
#define MAXSUBPUNAMELEN 8
/*
* MAXTERMTYPELEN is the maximum lenght of the physical name of a
* terminal:
*/
#define MAXTERMNAMELEN 10
/*
* MAXTERMTYPELEN is the maximum lenght of the physical type of a
* terminal:
*/
#define MAXTERMTYPELEN 10
/***************************************\
* The requests for subpucontrol()... *
\***************************************/
/*
* The following requests is possible in subpucontrol():
*/
/*
* Open a sub-PU:
*
* subpucontrol(pathname, SC_OPEN, 0);
*/
#define SC_OPEN 0
/*
* Detach a sub-PU:
*
* subpucontrol(pathname, SC_DETACH, 0);
*/
#define SC_DETACH 1
/*
* Set some flags for a sub-PU:
*
* u_int flags;
*
* subpucontrol(pathname, SC_SETFLAGS, flags);
*
* The bits in flags are defined below.
*/
#define SC_SETFLAGS 2
/*
* Setup a new class for a sub-PU:
*
* struct slot_class_info *class_info;
*
* subpucontrol(pathname, SC_SETUPCLASS, class_info);
*
* The structure slot_class_info is defined below:
*/
#define SC_SETUPCLASS 3
/*
* Close a sub-PU:
*
* subpucontrol(pathname, SC_CLOSE, 0);
*/
#define SC_CLOSE 4
/***************************************\
* Flags for CS_SETFLAGS... *
\***************************************/
/*
* The flags used in SC_SETFLAGS:
*/
#define SCS_FAULT_TOLERANT 0x0001
/***************************************\
* Definitions for CS_SETUPCLASS... *
\***************************************/
/*
* slot_class is the possible for sci_class:
*/
typedef u_char slot_class;
#define TTY_CLASS 0 /* Login slots */
#define NLL_CLASS 1 /* Nologin slots */
#define LPR_CLASS 2 /* Printer slots */
#define XVC_CLASS 3 /* XVCPI slots */
/*
* aliases for the old class types.
*/
#define TTY_SLOT TTY_CLASS
#define NLL_SLOT NLL_CLASS
#define LPR_SLOT LPR_CLASS
#define SLOT_CLASSES 4
/*
* The different sub_classes
*/
#define CSC_NONE 0 /* no sub_classes within this class */
#define CSC_CSPT_3 0x0003
#define CSC_CSPT_4 0x0004
#define CSC_XVC_CTRL 0x1000
#define CSC_XVC_SVC 0x2000
#define CSC_XVC_PVC 0x3000
/*
* enum state is the states a slot can be in at any given time.
*/
enum state
{
/* The following states are used both by the CSP and the XVCPI driver */
state_vacant = 0, /* Slot vacant */
state_session_established, /* Session established */
state_wait_open, /* Waiting for first open */
state_wait_reconnect, /* Waiting for reconnect */
state_wait_open_reconnect, /* Waiting for first open or
* reconnect */
state_wait_slotrelease, /* Waiting for slotrelease */
state_wait_close, /* Waiting for last close */
state_wait_close_slotrelease, /* Waiting for last close or
* slotrelease */
/* The following states are used only the XVCPI driver */
state_wait_accept, /* Waiting for ioctl/XCACCEPT
(only incomming calls) */
state_wait_call, /* Waiting for ioctl/XCALL
(only outgoing calls) */
state_wait_call_conn, /* Waiting for incoming call_conn
(only outgoing calls) */
state_wait_att_pvc, /* Waiting for incoming attach
(only PVC's) */
state_wait_pvc_remove, /* Waiting for incoming attach, but
open canceled */
state_wait_reopen, /* Waiting for first open after fail
fail over */
state_wait_rack_resc, /* Waiting for IMC reset compl. or
ioctl/XRACK */
state_wait_reset_resc, /* Waiting for IMC reset compl. or
reset from xdae */
state_wait_reset, /* Waiting for reset from xdae.*/
state_wait_rack, /* Waiting for ioctl/XRACK */
state_wait_resc, /* Waiting form IMC reset compl. */
state_wait_close_slotrelease_clrinfo,/*Waiting for last close, slotrelease
or incomming clear */
state_wait_close_clrinfo, /* Waiting for last close or incomming
clear */
state_connected, /* Only for ctrl slots, the XDAE is
connected, but there are no opens yet
*/
state_opened, /* Only for ctrl slots, the XDAE is not
connected but the slot is opened. */
state_opened_connected, /* Only for ctrl slots, the XDAE is
connected and the slot is opened */
/*
* The following are alias's used in init.
*/
vacant = state_vacant,
wait_failover = state_wait_open_reconnect,
proc_starting = 100,
sess_removal_recv,
sess_established,
sess_established_wo_proc,
wait_chld_death,
wait_sess_removal,
};
/*
* union slot describes the initial state of one slot. Note that this is a
* union.
*/
union slot
{
struct /* Login slots */
{
u_int sut_sub_class; /* sub class of this slot */
enum state sut_state; /* vacant etc. */
UID_T sut_session_uid; /* assigned at session setup */
} u_tty;
struct /* Nologin slots */
{
u_int sux_sub_class; /* sub class of this slot */
char sun_devname[10 + 1]; /* physical device name */
} u_nll;
struct /* Printer slots */
{
u_int sul_sub_class; /* sub class of this slot */
char sul_devname[10 + 1]; /* physical printer name */
} u_lpr;
struct /* XVCPI slots */
{
u_int sux_sub_class; /* sub class of this slot */
enum state sux_state; /* vacant etc. */
UID_T sux_session_uid; /* assigned at session setup */
u_short sux_chan_no; /* stream # - PVC's only */
char sux_xdae_name[8+1]; /* XDAE name */
char sux_backup_xdae_name[8+1];/* alternative XDAE */
char sux_dev_name[14+1]; /* "/dev/x........" */
} u_xvc
};
#define tty_sub_class u_tty.sut_sub_class
#define tty_state u_tty.sut_state
#define tty_session_uid u_tty.sut_session_uid
#define nll_sub_class u_nll.sun_sub_class
#define nll_devname u_nll.sun_devname
#define lpr_sub_class u_lpr.sun_sub_class
#define lpr_devname u_lpr.sul_devname
#define xvc_sub_class u_xvc.sux_sub_class
#define xvc_state u_xvc.sux_state
#define xvc_session_uid u_xvc.sux_session_uid
#define xvc_chan_no u_xvc.sux_chan_no
#define xvc_xdae_name u_xvc.sux_xdae_name
#define xvc_backup_xdae_name u_xvc.sux_backup_xdae_name
#define xvc_dev_name u_xvc.sux_dev_name
/*
* struct slot_class_info is the structure used in the SC_SETUPCLASS
* request for subpucontrol():
*/
struct slot_class_info
{
/*
* sci_class denotes the class of slot table info
*/
slot_class sci_class;
/*
* # entries in the 'sci_slot_table`
*/
u_int sci_num_slots;
/*
* table with slots for this class
*/
union slot *sci_slot_table;
/*
* # valid entries in 'sci_lan_table`
*/
u_int sci_num_lans;
/*
* The following is a description of the ports of the class:
*/
struct
{
/*
* IMC name of port:
*/
char sci_imc_port_name[12 + 1];
/*
* sci_flags contains some flags for the class:
*/
u_int sci_flags;
/*
* SCI_GLOBAL specifies that the ports for this class should be
* global:
*/
#define SCI_GLOBAL 0x00001
/*
* name of lan's where to open the IMC port
*/
char sci_lan_name[MAX_LAN_NAME];
} sci_lan_table[MAX_LAN];
};
#endif __SUBPU__