DataMuseum.dk

Presents historical artifacts from the history of:

Regnecentalen RC-900

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Regnecentalen RC-900

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦e68e3fe44⟧ TextFile

    Length: 6556 (0x199c)
    Types: TextFile
    Notes: UNIX file
    Names: »slnnau.h«

Derivation

└─⟦a6ab2eb36⟧ Bits:30004042/kconfig3.imd SW95705I 386/ix Multi-user Release 1.2
└─⟦a6ab2eb36⟧ UNIX Filesystem
    └─⟦this⟧ »kc/new/usr/include/sys/slnnau.h« 

TextFile

/*
 *	Copyright (c) 1984 AT&T Technologies, Inc.
 *		   All Rights Reserved
 *
 *	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF
 *		    AT&T TECHNOLOGIES, INC.
 *   The copyright notice above does not evidence any actual
 *   or intended publication of such source code.
 */

#ident "@(#)slnnau.h	1.3 -- 87/01/16"

struct pmod_st {
	queue_t			*que_ptr;
	unsigned short		link_state;
	unsigned short		board;
	unsigned char		c_flag;
	unsigned char		protocol;
	};

struct job_st {
	struct job_st		*forward_link;
	struct pmod_st		*pmod_ptr;
	mblk_t			*bp;
	long			pmod_ackid;
	long			job_retcode;
	long			job_type;
	long			fw_jobid;
	long			fw_retcode;
	long			fw_jobtype;
	short			nau_brdnum;
	short			used;
	};


/* structures used by the low level nau and firmware for stats */
struct naulo_stat {
	unsigned long naulo_st_errors;	/* low level nau errors */
	unsigned long naulo_st_onerr;	/* nau was on unexpectedly */
	unsigned long naulo_st_phyaderr;	/* nau phyad not set yet */
	unsigned long naulo_st_size;	/* nau size field error */
	unsigned long naulo_st_addrerr;	/* nau address field error */
	unsigned long naulo_st_csma;	/* nau csma error on xmit */
	unsigned long naulo_st_crc;	/* nau crc error */
	unsigned long naulo_st_offerr;	/* nau was off unexpectedly */
	unsigned long naulo_st_ovf;	/* nau internal queue overflow */
	unsigned long naulo_st_fail;	/* nau fw unknown error */
	unsigned long naulo_st_noad;	/* nau no match on logical address */
	unsigned long naulo_st_adov;	/* nau multicast table overflow */
};
struct naufw_stat {
	unsigned short crcerr;	/* CRC errors */
	unsigned short alnerr;	/* ALN errors */
	unsigned short rscerr;	/* RSC errors */
	unsigned short ovrnerr;	/* OVRN errors */
	unsigned long pktrcv;	/* packets received */
	unsigned long pkthost;	/* packets sent to host */
	unsigned long pktsize;	/* packets size */
	unsigned long pktdrop;	/* packets dropped */
	unsigned long pad;	/* padding */
};
#ifdef DEBUG
struct naud_stat {
	unsigned long d1;
	unsigned long d2;
	unsigned long d3;
	unsigned long d4;
	unsigned long d5;
};
#endif
	/* structure for the nau stats for both streams and STARLAN */
struct nau_stat {
	unsigned long nau_st_fwjobs;	/* count of fw jobs submitted */
	unsigned long nau_st_fwqsize;	/* sum of the fw queue length size */
	struct naulo_stat naulo_stats;	/* low level stats structure */
	struct naufw_stat naufw_stats;	/* firmware stats */
#ifdef DEBUG
	struct naud_stat  d_stats;
#endif
	};

#ifdef DEBUG
#define NAU_STATS_SIZE	26	/* number of longs in the nau stats */
#else
#define NAU_STATS_SIZE	21	/* number of longs in the nau stats */
#endif

/*******************************
	defines
**********************************/

#define	NAU_INIT	30
#define GET		40
#define REMOVE		50
#define CLEAR		60
#define PENDING		1

#define MAX_PMOD	100
#define	PHYAD_SIZE	6	/* size of the address */
#define MAX_PACKET_SIZE	1514
#define MAX_JOBST	100
#define MAX_MUXTYPE	256
#define NAUBRDMAX	4	/* max number of NAU boards in the system */
#define NAUDATAMAX	1497	/* maximum data size down-stream into the 
				   nau driver */

#ifdef	u3b2
#define SPLNAU		splni()
#else
#define SPLNAU		spl5()
#endif
/* initialization consits */

#define STARTUP		5
#define INITIALIZED	17

#define NAUSTATE	(Nau_state != INITIALIZED)
/* flags */

#define C_OPEN		001
#define C_BIND		010
/* error returns */

#define NAU_NOTOPEN		0x101
#define NAU_NOTBIND		0x102
#define NAU_ISBIND		0x103
#define NAU_802_ERROR		0x104
#define NAU_BADPARA		0x105
#define NAU_NOMEM		0x106
#define NAU_DUP_MUXTYPE		0x107
#define NAU_NO_MUXTYPE		0x108
#define NAU_PACK_SIZE		0x109
#define NAU_MAX_JOBST		0x10a
#define NAU_ALR_OPEN		0x10b

/* macro to check the open and bind state of the protocol module */
#define	OBSTATE(pmod)	((pmod->c_flag & C_OPEN) ? ((pmod->c_flag & C_BIND) ? 0 : NAU_NOTBIND) : NAU_NOTOPEN)
#ifdef DEBUG
	/* debug values for different functions and traces */
#define	NAU_D_ERROR	0x00001	/* trace all error legs of the NAU */
#define	NAU_D_INFO	0x00002	/* trace of nau_info() */
#define	NAU_D_NAUADM	0x00004	/* trace of nauadm() */
#define	NAU_D_DEBUG	0x00008	/* trace of problems */

#define	NAU_D_BIND	0x00010	/* trace of nau_bind()/nau_unbind() */
#define	NAU_D_CLOSE	0x00020	/* trace of nau_close() */
#define	NAU_D_LRESP	0x00040	/* trace of the nau_llc1_resp() */
#define	NAU_D_OPEN	0x00080	/* trace of nau_open() */

#define	NAU_D_PUMP	0x00100	/* trace of nau_pump() */
#define	NAU_D_RECV	0x00200	/* trace of nau_recv() */
#define	NAU_D_REPLY	0x00400	/* trace of nau_reply() */
#define	NAU_D_SEND	0x00800	/* trace of nau_send() */

#define	NAU_D_SRV	0x01000	/* trace of nausrv() */
#define	NAU_D_TERM	0x02000	/* trace of nau_term() */
#define	NAU_D_FW	0x04000	/* trace of naufw_*() */
#define	NAU_D_LLC1	0x08000	/* trace of nau_llc1()_ */

#define NAULO_D_INIT	0x10000	/* trace of naulo_init() */
#define NAULO_D_INT	0x20000	/* trace of nauintr() */
#define NAULO_D_LB	0x40000	/* set the board to LOOP BACK */
#define NAULO_D_RECV	0x80000	/* trace of naulo_recv() */

#define NAULO_D_SEND	0x100000	/* trace of naulo_send() */
#define NAULO_D_TERM	0x200000	/* trace of naulo_term() */
#define NAULO_D_PEGCNT	0x400000	/* trace of naulo_pegcount() */
#define	NAULO_D_XMT	(NAULO_D_INT | NAULO_D_SEND)
#define	NAULO_D_PROM	0x800000	/* in promiscuous mode */

#define	NAULO_D_QUEUE	0x1000000	/* trace job queueing and dequeueing */
#define NAULO_D_WTBSY	0x2000000	/* report wait count after RESET */
#define NAULO_D_VERBWT	0x4000000	/* comment on WAITCMD wait time	*/
#endif

/* these are 802.1 and some 802.3 definitions for the nau */
#define DL_XID_RESP	10	/* XID packet response 			*/
#define DL_TEST_RESP	11	/* TEST packet response */
typedef unsigned char OCTET;
typedef struct {	/* MAC and LLC header */
	OCTET	dadd[6];
	OCTET	sadd[6];
	short   length;
	OCTET	dsap;
	OCTET	ssap;
	OCTET	ctrl;
	} LLC1_PAC_HDR;
typedef struct {	/* XID information */
	OCTET	info;
	OCTET	llctype;
	OCTET	windowsize;
	} INFO_PAC;
#define INFO	0x81
#define ITYPE1	0x80
#define ITYPE2  0x40
#define IWNDOW	0x00
#define XID0	0xbf
#define XID1	0xaf
#define TEST0	0xf3
#define TEST1	0xd3
#define UI	0x03
#define LLC1_PAC_HDR_SIZE	17
#define INFO_PAC_SIZE		3
#define	MAC_ADD_SIZE	6	/* size of a MAC address */
#define	LLC_ADD_SIZE	1	/* size of a LLC address */
#define	LSAP_SIZE	MAC_ADD_SIZE + LLC_ADD_SIZE	/* LSAP size */
#define	MAC_HDR_SIZE	14	/* size of the MAC header */
#define	LLC_HDR_SIZE	3	/* size of the LLC header */

typedef struct {	/* a LSAP structure */
	OCTET	mac_add[MAC_ADD_SIZE];
	OCTET	llc_add[LLC_ADD_SIZE];
	} LSAP;