Trailing-Edge
-
PDP-10 Archives
-
BB-KL11K-BM_1990
-
t20src/anadpy.mac
There are 14 other files named anadpy.mac in the archive. Click here to see a list.
; UPD ID= 18, RIP:<7.TOOLS-TAPE>ANADPY.MAC.3, 26-Feb-88 13:40:04 by GSCOTT
;TCO 7.1236 - Update copyright notice.
; UPD ID= 16, RIP:<7.TOOLS-TAPE>ANADPY.MAC.2, 26-Feb-88 10:31:36 by GSCOTT
;TCO 7.1217 - Add .DIRECTIVE .NOBIN
;Create from ANAUNV
; COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1988.
; ALL RIGHTS RESERVED.
;
; THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
; ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE
; INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER
; COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
; OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY
; TRANSFERRED.
;
; THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
; AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
; CORPORATION.
;
; DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
; SOFTWARE ON EQUIPMENT THAT IS NOT SUPPLIED BY DIGITAL.
UNIVERSAL ANADPY - Universal for SYSDPY TCP/IP and ARP Displays
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED
;OR COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) DIGITAL EQUIPMENT CORPORATION 1984.
;ALL RIGHTS RESERVED.
SALL
PASS2
SEARCH MACSYM
.DIRECTIVE .NOBIN ;[7.1217]
;Structure of a Gateway block
DEFSTR(GWUP,0,0,1) ;Gateway should be useable
DEFSTR(GWPIP,0,1,1) ;Ping in progress
DEFSTR(GWTYP,0,5,4) ;Gateway type
GW%PRM==1 ;Prime: Speaks ICMP
GW%DUM==2 ;Dumb: Fwd's pkts, but that's all
GW%HST==3 ;Host: Avoid except in emergency
GW%AUP==4 ;Always-up: Fwds but doesn't reflect
DEFSTR(GWHIS,0,14,7) ;Ping history bits
DEFSTR(GWSPC,0,17,3) ;Successful ping count
.THRUP==<6*WID(GWHIS)>/8 ;Threshold to say it is up
.THRDN==<3*WID(GWHIS)>/8 ;Threshold to say it is down
IFL <<1_WID(GWSPC)>-1>-WID(GWHIS), PRINTX ?GWSPC too small
DEFSTR(GWICT,0,35,18) ;Interface count
.GWILS==1 ;Where in block to find the list
MXGWIC==6 ;Maximum number of interfaces
GWBKSZ==.GWILS+MXGWIC ;Size of a gateway block
;Definitions of network formats
;These extract a network number from right justified host number.
DEFSTR NETCLS,0,6,3 ; Bits identifying network class
DEFSTR NETCA,0,11,8 ; Class A network. High 8 bits
.NETCA==1B4 ; Bit is off for a class A network
DEFSTR NETCB,0,19,16 ; Class B network. High 16 bits
.NETCB==1B5 ; Bit is on for a class B network
DEFSTR NETCC,0,27,24 ; Class C network. High 24 bits.
; Macro for extracting the network number from a host address,
; both SRC and DST must be AC's (obviously).
DEFINE NETNUM(DST,SRC,%HERE)<
TXNN SRC,.NETCA ; Class A network?
JRST [LOAD DST,NETCA,+SRC ; Get number
JRST %HERE]
TXNN SRC,.NETCB ; Class B?
JRST [LOAD DST,NETCB,+SRC
JRST %HERE]
LOAD DST,NETCC,+SRC ; Must be class C
%HERE:!>
QSZ==1 ;Number of words in a QUEUE structure
LOCKSZ==5 ;Number of words in a LOCK structure
.IPKVR==0 ;Word with version, type of service, etc
.IPKDH==4 ;Word with destination host
MINIHS==<.IPKDH+1>*4 ;Minimum Internet Header size (bytes)
DEFSTR(PIDO,PKTELI+.IPKVR,7,4) ;PACKET.IP.DATA-OFFSET
MAXIOS==<.RTJST(-1,PIDO)*4-MINIHS> ; Maximum # Option bytes possible
.P==0
.P==.P+3
DEFSTR(PTDO,\<.P>,3,4) ;PACKET.TCP.DATAOFFSET ( 32-BIT UNITS)
.P==.P+2
MINTHS==4*.P ;Minimum TCP header size (bytes)
MAXTOS==<.RTJST(-1,PTDO)*4-MINTHS> ;Maximum # Option bytes possible
MAXSEQ==1_^D32 ;32 bit sequence numbers
SEQMSK==MAXSEQ-1 ;Mask for doing mod MAXSEQ by AND op.
DEFINE MODSEQ(A)<TLZ A,(-MAXSEQ)>
SUBTTL TCB structure
TCBQ==<.T==0> ;TCB.Queue (TCBH, DeadQ, etc)
TCBLCK==<.T==.T+QSZ> ;TCB.LOCK
.T==.T+LOCKSZ
DEFSTR(TOWNR,\<.T>,17,18) ;TCB.OWNER (job #)
DEFSTR(TJCN,\<.T>,35,18) ;TCB.JCN (n of JCNTCB+n)
.T=.T+1
DEFSTR(TFH,\<.T>,35,36) ;TCB.FH
DEFSTR(TFHC,\<.T>,6,3) ;TCB.FH.NET-CLASS
;TCB.FH.NET (0 => TWLDN=1)
.T=.T+1 ;TCB.FH.TCP (0 => TWLDT=1)
DEFSTR(TLH,\<.T>,35,36) ;TCB.LH
.T=.T+1
DEFSTR(TFP,\<.T>,35,36) ;TCB.FP (0 => TWLDP=1)
.T=.T+1
DEFSTR(TLP,\<.T>,35,36) ;TCB.LP only 16 bits
.T=.T+1 ;TCB Flags
DEFSTR(TERR,\<.T>,7,8) ;TCB.ERROR
DEFSTR(TWLDN,\<.T>,8,1) ;OPEN with Net wild
DEFSTR(TWLDT,\<.T>,9,1) ;OPEN with TCP wild
DEFSTR(TWLDP,\<.T>,10,1) ;OPEN with Port wild
DEFSTR(TSFP,\<.T>,11,1) ;TCB.SEND.FORCE-PACKET
DEFSTR(TSEP,\<.T>,12,1) ;TCB.SEND.ENCOURAGE-PACKET
DEFSTR(TRPP,\<.T>,14,1) ;TCB.RECV.PARITAL-PACKET
DEFSTR(TSCR,\<.T>,15,1) ;TCB.SECURE-CONNECTION
DEFSTR(TTVT,\<.T>,16,1) ;TCB.TCP-Virtual-terminal
DEFSTR(TSAP,\<.T>,17,1)
DEFSTR(TERRT,\<.T>,18,1) ;TCB.ERROR.TRACE
DEFSTR(TDEC,\<.T>,19,1) ;DEC JSYS TCB
DEFSTR(TSTAT,\<.T>,35,14) ;TCB.STATE
DEFSTR(TRSYN,\<.T>,24,3) ;TCB.STATE.RECV-SYNC
DEFSTR(TSSYN,\<.T>,27,3) ;TCB.STATE.SEND-SYNC
;State codes for connections
SYNABL==4 ;SYNCHABLE: Activated by user call
SYNSNT==<SYNRCV==5> ;SYN sent or received
SYNCED==7 ;SYN acked
FINSNT==<FINRCV==2> ;FIN sent or received but not ACKd
NOTSYN==0 ;Connection fully closed or not open
;1 Unused bit
DEFSTR(TSUOP,\<.T>,29,1) ;TCB.STATE.USER-OPEN
DEFSTR(TSOPN,\<.T>,30,1) ;TCB.STATE.SAID-OPEN
DEFSTR(TSPRS,\<.T>,31,1) ;TCB.STATE.PERSISTENT
DEFSTR(TSABT,\<.T>,32,1) ;TCB.STATE.ABORT
DEFSTR(TSSV,\<.T>,33,1) ;TCB.STATE.SEQUENCE-VALID
DEFSTR(TSURG,\<.T>,34,1) ;TCB.SEND.URGENT-MODE
DEFSTR(TRURG,\<.T>,35,1) ;TCB.RECV.URGENT-MODE
;Send variables
.T=.T+1
DEFSTR(TSLFT,\<.T>,35,36) ;TCB.SEND.LEFT
.T=.T+1
DEFSTR(TSSEQ,\<.T>,35,36) ;TCB.SEND.SEQUENCE
.T=.T+1
DEFSTR(TSURP,\<.T>,35,36) ;TCB.SEND.URGENT-POINTER
.T=.T+1
DEFSTR(TSWND,\<.T>,17,18) ;TCB.SEND.WINDOW
DEFSTR(TSCB,\<.T>,35,18) ;TCB.SEND.CURRENT-BUFFER
.T=.T+1
DEFSTR(TSTO,\<.T>,35,36) ;TCB.SEND.TIME-OUT
TCBSBQ==<.T=.T+1> ;TCB.SEND.BUFFER-QUEUE
TCBRXQ==<.T=.T+QSZ> ;TCB.SEND.REXMIT-QUEUE
;Recv variables
.T==.T+QSZ
DEFSTR(TRIS,\<.T>,35,36) ;TCB.RECV.INITIAL-SEQUENCE
.T=.T+1
DEFSTR(TRLFT,\<.T>,35,36) ;TCB.RECV.LEFT
.T=.T+1
DEFSTR(TRURP,\<.T>,35,36) ;TCB.RECV.URGENT-POINTER
.T=.T+1
DEFSTR(TRWND,\<.T>,17,18) ;TCB.RECV.WINDOW
DEFSTR(TRCB,\<.T>,35,18) ;TCB.RECV.CURRENT-BUFFER
.T=.T+1
DEFSTR(TRCBY,\<.T>,35,36) ;TCB.RECV.CURRENT-BYTE
.T=.T+1
DEFSTR(TRBS,\<.T>,35,36) ;TCB.RECV.BUFFER-SPACE
TCBRBQ==<.T=.T+1> ;TCB.RECV.BUFFER-QUEUE
TCBRPQ==<.T=.T+QSZ> ;TCB.RECV.PACKET-QUEUE
;PSI variables
TCBPIC==<.T=.T+QSZ> ;TCB.PSI-CHANNELS
DEFSTR(TPSIC,TCBPIC,35,36) ;All PSI channels
;Overlays for above
DEFSTR(TPICU,TCBPIC,5,6) ;URGENT DATA ARRIVED
DEFSTR(TPICR,TCBPIC,11,6) ;RECV DONE
DEFSTR(TPICS,TCBPIC,17,6) ;SEND DONE
DEFSTR(TPICE,TCBPIC,23,6) ;ERROR
DEFSTR(TPICX,TCBPIC,29,6) ;STATE CHANGE
DEFSTR(TPICA,TCBPIC,35,6) ;EOL ACK
;Following must have same order as above
TCBPIF==.T+1 ;TCB.PSI-FORKS
DEFSTR(TPIFU,TCBPIF+0,17,18) ;URGENT DATA ARRIVED
DEFSTR(TPIFR,TCBPIF+0,35,18) ;RECV DONE
DEFSTR(TPIFS,TCBPIF+1,17,18) ;SEND DONE
DEFSTR(TPIFE,TCBPIF+1,35,18) ;ERROR
DEFSTR(TPIFX,TCBPIF+2,17,18) ;STATE CHANGE
DEFSTR(TPIFA,TCBPIF+2,35,18) ;EOL ACK
.T==TCBPIF+3
DEFSTR(TOPNF,\<.T>,8,9) ;TCB.OPEN.WAIT FLAG INDEX
DEFSTR(TERRF,\<.T>,17,9) ;TCB.ERROR.FLAG index
DEFSTR(TOFRK,\<.T>,35,18) ;TCB.OWNING-FORK
;Retransmission variables
.T=.T+1
DEFSTR(TSMRT,\<.T>,35,36) ;TCB.SMOOTHED-ROUND-TRIP (or)
DEFSTR(TMNRT,\<.T>,35,36) ;TCB.MIN-ROUND-TRIP
.T=.T+1
DEFSTR(TMXRT,\<.T>,35,36) ;TCB.MAX-ROUND-TRIP
.T=.T+1
DEFSTR(TRXI,\<.T>,35,36) ;TCB.RETRANSMIT-INTERVAL
.T=.T+1
DEFSTR(TRXP,\<.T>,35,36) ;TCB.Retransmission.Parameters
;Substructures of the above:
DEFSTR(TRXPN,\<.T>,8,9) ;Numberator of backoff fraction
DEFSTR(TRXPD,\<.T>,17,9) ;Denominator thereof
DEFSTR(TRXPI,\<.T>,35,18) ;Initial interval
; Queues and wakeup times for various processes:
TCBQRA==<.T=.T+1> ;Reassembler queue
TCBTRA==<.T=.T+QSZ> ;When RA needed
TCBQPZ==<.T=.T+1> ;Packetizer
TCBTPZ==<.T=.T+QSZ>
TCBQRX==<.T=.T+1> ;Retransmitter
TCBTRX==<.T=.T+QSZ>
TCBQDG==<.T=.T+1> ;Delay Actions
TCBTDG==<.T=.T+QSZ>
.T==.T+1
DEFSTR(TIFDF,\<.T>,0,1) ;IP Don't-Fragment flag
DEFSTR(TTTL,\<.T>,8,8) ;IP Time-to-live
;1 Unused bit
DEFSTR(TTOS,\<.T>,17,8) ;IP Type-of-service
DEFSTR(TABTFX,\<.T>,35,18) ;Forkx of ABORTER
.T=.T+1
DEFSTR(TSLVN,\<.T>,17,18) ;Next Security level
DEFSTR(TSLVC,\<.T>,35,18) ;Current Security Level
.T=.T+1
;2 bits really unused
DEFSTR(TOPFP,\<.T>,17,18) ;Foreign port at open
DEFSTR(TNUFM,\<.T>,18,1) ;OPENed with new formats
;8 unused bits
DEFSTR(TVTL,\<.T>,35,9) ;Virtual terminal line number
.T=.T+1
DEFSTR(TOPFH,\<.T>,35,36) ;TCB.OPEN-FH
.T=.T+1
DEFSTR(TOPLH,\<.T>,35,36) ;TCB.OPEN-LH
.T=.T+1
DEFSTR(TSBYT,\<.T>,35,36) ;Bytes left to send
.T=.T+1
DEFSTR(TRLAK,\<.T>,35,36) ;Seq # of last PACKS sent
.T=.T+1
DEFSTR(TRLWN,\<.T>,35,36) ;Seq # of last PWNDO sent or -1
.T=.T+1
DEFSTR(TSMXB,\<.T>,35,36) ;Max send rate
.T=.T+1
DEFSTR(TSMXP,\<.T>,35,36) ;Max send packet length (inc header)
;Option Variables
.T=.T+1
DEFSTR(TIPDO,\<.T>,5,4) ;IP Data offset, words
DEFSTR(TIPOR,\<.T>,11,6) ;IP Received options, bytes
DEFSTR(TIPOU,\<.T>,17,6) ;IP User options, bytes
DEFSTR(TIOPF,\<.T>,35,18) ;IP User option flags
.T=.T+1
DEFSTR(TTPDO,\<.T>,5,4) ;TCP Data offset, words
DEFSTR(TTPOR,\<.T>,11,6) ;TCP Received options, bytes
DEFSTR(TTPOU,\<.T>,17,6) ;TCP User options, bytes
DEFSTR(TTOPF,\<.T>,35,18) ;TCP User option flags
TCBIO==<.T=.T+1> ;IP Option list (send)
TCBIR==<.T=.T+<MAXIOS+3>/4> ;Last IP Options received
TCBIU==<.T=.T+<MAXIOS+3>/4> ;IP Options from User
TCBTO==<.T=.T+<MAXIOS+3>/4> ;TCP Option list (send)
TCBTR==<.T=.T+<MAXTOS+3>/4> ;Last TCP Options received
TCBTU==<.T=.T+<MAXTOS+3>/4> ;TCP Options from User
.T=.T+<MAXTOS+3>/4
DEFSTR(TERBF,\<.T>,17,18) ;Error/Trace (user) buffer adr
DEFSTR(TERJN,\<.T>,35,18) ;Error/trace (user) JFN
.T=.T+1
DEFSTR(TCTBS,\<.T>,17,18) ;Count of no-buffer errors
DEFSTR(TCTSQ,\<.T>,35,18) ;Count of sequence # pauses
.T=.T+1
DEFSTR(TSCPK,\<.T>,35,36) ;Send current packet
.T=.T+1
DEFSTR(TPRS1,\<.T>,17,18) ;Persistance parameter one
DEFSTR(TPRS2,\<.T>,35,18) ;Persistance parameter two
.T=.T+1 ;DEC JFN Interface Flags
DEFSTR(TCDWT,\<.T>,0,1) ;DEC Wait mode flag
DEFSTR(TCDHT,\<.T>,1,1) ;DEC High Throughput Mode flag
DEFSTR(TCDFS,\<.T>,2,1) ;DEC Active Flag
DEFSTR(TCDOW,\<.T>,3,1) ;DEC OPENF block flag
DEFSTR(TCDGN,\<.T>,4,1) ;DEC GTJFN Name done once flag
DEFSTR(TCDGE,\<.T>,5,1) ;DEC GTJFN Extension done once flag
DEFSTR(TCDPS,\<.T>,6,1) ;DEC Persist flag
DEFSTR(TCDOB,\<.T>,7,1) ;DEC Output buffer setup
DEFSTR(TCDIB,\<.T>,8,1) ;DEC Input buffer setup
DEFSTR(TCDCW,\<.T>,9,1) ;DEC CLOSF Block flag
DEFSTR(TCDB8,\<.T>,10,1) ;DEC OPENF 8 bit byte mode
DEFSTR(TCDOQ,\<.T>,11,1) ;DEC Output buffer Queued
DEFSTR(TCDPU,\<.T>,12,1) ;DEC Do a PUSH flag
DEFSTR(TCDUR,\<.T>,13,1) ;DEC Do an URGENT flag
DEFSTR(TJFN,\<.T>,35,18) ;DEC TCB.JFN (JFN*MLJFN)
.T=.T+1
TJOBF=.T ;DEC TCB output buffer for filling
.T=.T+1
TJOBA=.T ;DEC TCB output buffer active
.T=.T+1
TJIBE=.T ;DEC TCB output buffer for emptying
.T=.T+1
TJIBA=.T ;DEC TCB output buffer active
.T=.T+1
TCPBCO=.T ;DEC TCB real FILBCO
.T=.T+1
TCPBCI=.T ;DEC TCB real FILBCI
.T=.T+1 ;Spare
TCBSIZ==.T+1 ;Size of a TCB
PURGE .T
;Flag bit definitions:
TCP%ER==1B0 ;ERROR
TCP%LE==1B1 ;Local error flag (0 is remote)
TCP%PE==1B2 ;Permanent error (0 is temporary)
TCP%EC==37B7 ;Error code w/o flags
TCP%DN==1B12 ;DONE
TCP%UR==1B15 ;URGENT DATA
TCP%EL==1B16 ;obsolete ;PUSH
TCP%PU==1B16 ;PUSH
TCP%WM==1B17 ;WORD MODE
.TCPBF==0 ;Buffer Flags
.TCPBA==1 ;Buffer data address
.TCPBC==2 ;Buffer data count
.TCPBO==3 ;Buffer option addresses
.TCPOW==^D10 ;Buffer option address word count
.TCPBI==4 ;Buffer IP info
.TCPBS==5 ;Buffer header size
SUBTTL Internet-Ethernet Interface Definitions
.NICHK==:0 ;Computed checksum of file
.NIGTD==:1 ;GTAD format for date/time of when the file was created
.NIMIR==:2 ;IPHOST version # when created
.NILEN==:3 ;Number of words which follow
NIHMHL==:4 ;max length of header
.NIINT==:0 ;the internet host number ** MUST BE OFFSET ZERO **
.NIEN1==:1 ;ethernet addr word 1
.NIEN2==:2 ;ethernet addr word 2
.NIGCF==:3 ;gateway control flags
GH%ARP==1B0 ;this ght entry has been updated by arp, adr is valid
GH%DMB==1B1 ;host does not have arp, use this address
NIHMDL==:4 ;max length of per host data
GH.EN1==.NIEN1-1 ;GHTAR2 ETHERNET ADR HIGH ORDER BYTES
GH.EN2==.NIEN2-1 ;GHTAR2 ETHERNET ADR LOW ORDER BYTES
GH.GCF==.NIGCF-1 ;GHTAR2 GATEWAY CONTROL FLAGS
GH2MDL==NIHMDL-1 ;LENGTH OF AN AREA 2 ENTRY
END