UNIVERSAL SNDDEF - Definitions for Stanford SNDSRV terminal messages SUBTTL David Eppstein/DE/KSL/MRC/WHP4 SEARCH MONSYM,MACSYM COMMENT \ Format of IPCF pages used by SNDSRV =================================== SN$HDR On write contains SIXBIT function type. Currently defined types: SNDALL - send to all logged in users SNDLIN - send to a specific line SNDUSR - send to all logged in jobs of a specific user SNDSTA - send statistics back to requestor On read, contains -1 if an error was encountered, zero otherwise. SN$DAT Contains a line number or usernumber as appropriate. SN$FLG Format flags specified by the requestor. Currently defined flags: T%HDR - the header has already been made, don't make another T%RSYS - obey REFUSE SYSTEM even if caller is a wheel (T%USER and T%RAFT defined but ignored by SNDSRV) SN$ERR On read contains an error code SN$STR On read contains the first word of a short ASCIZ error string corresponding to the error code in SN$ERR SN$TTY Unused on write. On read, this word contains the number of ttys the server attempted to send messages too. Succeeding words are of the form , where state is one of -1 user was refusing messages 0 message was successfully send +1 a timeout occured (the SOUT% was blocked too long) +2 the line was inactive (the SOUT% failed) SN$MSG The user's message (an ASCIZ string) starts at this location. \ ; Offsets and flags SN$HDR==0 ;SIXBIT function name SN$DAT==1 ;Data for function SN$FLG==2 ;User flags SN$ERR==3 ;Error code, if any SN$STR==4 ;Error string, if any SN$TTY==20 ;TTY list header SN$MSG==100 ;Start of user message ; Format flags specified in SN$FLG by current requestor T%USER==1B0 ;Turn on "user program" features: ;if recipient has multiple tty type status T%RAFT==1B1 ;Obey REFUSE SYS after this message ;(used by $SEND, ignored by SNDSRV) T%HDR==1B2 ;Header already supplied, don't make another T%RSYS==1B3 ;Obey REFUSE SYS always ; Error codes and strings returned in SN$ERR and SN$STR DEFINE SNDERRS < X 000,TTXIEC, X 001,TTXCAP, X 002,TTXUNK, X 003,TTXDET, X 004,TTXNLG, X 005,TTXUIR, X 006,TTXLNG, X 007,TTXREF, X 010,TTXIMP, X 011,TTXTIM, X 012,TTXNSU, X 013,TTXUSM, X 014,TTXNST, X 015,TTXFIL, X 016,TTXNBD, X 017,TTXACT, X 020,TTXNLI, X 021,TTXBAT, X 022,TTXIPC, X 023,TTXNET, > DEFINE X (VALUE,SYMBOL,STRING) < SYMBOL==VALUE IFG , > MAXTTX==0 SNDERRS ;Define values for each symbol ; Storage parameters shared by SEND/SNDSRV MAXCHR==^D3000 ;Maximum number of characters that can be sent ; Definitions for SNDMSG subroutine package RC%TYP==.LHALF ;Type of recipient RC%NXT==.RHALF ;Next link in recipient chain RC.TTY==0 ;Send to terminal (must be 0) RC.USR==1 ;Send to local user RC.ALL==2 ;Send to all local logged-in users RC.NET==3 ;Send to a net user .SDPID==0 ;Offset in argument block for sender PID .SDFLG==1 ;Flags for IP$FLG .SDTCC==2 ;Interrupt channel for TCP interrupt ; Useful macros DEFINE MKPTR (AC) < ;;Turn HRROI pointer into the real thing TLC AC,-1 TLCN AC,-1 HRLI AC,(POINT 7,) > END