date and time created 90/05/11 11:19:43 by sklower
[unix-history] / usr / src / sys / netccitt / pk_var.h
/* Copyright (c) University of British Columbia, 1984 */
/*
*
* X.25 Logical Channel Descriptor
*
*/
struct pklcd {
short lcd_lcn; /* Logical channel number */
short lcd_state; /* Logical Channel state */
bool lcd_intrconf_pending; /* Interrupt confirmation pending */
octet lcd_intrdata; /* Octet of incoming intr data */
short lcd_timer; /* Various timer values */
char lcd_retry; /* Timer retry count */
char lcd_rsn; /* Seq no of last received packet */
char lcd_ssn; /* Seq no of next packet to send */
char lcd_output_window; /* Output flow control window */
char lcd_input_window; /* Input flow control window */
char lcd_last_transmitted_pr;/* Last Pr value transmitted */
bool lcd_rnr_condition; /* Remote in busy condition */
bool lcd_window_condition; /* Output window size exceeded */
bool lcd_reset_condition; /* True, if waiting reset confirm */
char lcd_packetsize; /* Maximum packet size */
char lcd_windowsize; /* Window size - both directions */
octet lcd_closed_user_group; /* Closed user group specification */
char lcd_flags; /* copy of sockaddr_x25 op_flags */
struct x25_packet *lcd_template;/* Address of current packet */
struct socket *lcd_so; /* Socket addr for connection */
struct sockaddr_x25 *lcd_craddr;/* Calling address */
struct sockaddr_x25 *lcd_ceaddr;/* Called address */
time_t lcd_stime; /* time circuit established */
long lcd_txcnt; /* Data packet transmit count */
long lcd_rxcnt; /* Data packet receive count */
short lcd_intrcnt; /* Interrupt packet transmit count */
struct pklcd *lcd_listen; /* Next lcd on listen queue */
struct pkcb *lcd_pkp; /* network this lcd is attached to */
};
/*
* Per network information, allocated dynamically
* when a new network is configured.
*/
struct pkcb {
struct pkcb *pk_next;
short pk_state; /* packet level status */
short pk_maxlcn; /* local copy of xc_maxlcn */
int (*pk_output) (); /* link level output procedure */
struct x25config *pk_xcp; /* network specific configuration */
struct pklcd *pk_chan[1]; /* actual size == xc_maxlcn+1 */
};
#ifdef KERNEL
struct pkcb *pkcbhead; /* head of linked list of networks */
struct pklcd *pk_listenhead;
char *pk_name[], *pk_state[];
int pk_t20, pk_t21, pk_t22, pk_t23;
#endif