home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / protocol / tcpip / 5895 < prev    next >
Encoding:
Text File  |  1993-01-09  |  5.0 KB  |  190 lines

  1. Newsgroups: comp.protocols.tcp-ip
  2. Path: sparky!uunet!mcsun!sunic!bygg
  3. From: bygg@sunic.sunet.se (Johnny Eriksson)
  4. Subject: Re: TCP/IP for Tops-10
  5. Message-ID: <C0M3ID.zC@sunic.sunet.se>
  6. Sender: bygg@sunic.sunet.se (Johnny Eriksson)
  7. Organization: Royal Institute of Technology, Stockholm, Sweden
  8. References: <C0I2oy.7Lp@csi.compuserve.com> <lkrbiuINNi35@news.bbn.com> <1993Jan8.195139.27625@novell.com>
  9. Date: Sun, 10 Jan 1993 00:18:13 GMT
  10. Lines: 178
  11.  
  12. In article <1993Jan8.195139.27625@novell.com> donp@novell.com (don provan) writes:
  13.  
  14. >Gee, if i'd known there'd be this much interest, i would have posted the
  15. >answer instead of just sending it directly.  I implemented TCP/IP on
  16. >TOPS-10.  There's no relation between the TOPS-10 implementation and the
  17. >TENEX/TOPS-20 implementation.  On the other hand, a derivitive of the
  18. >TOPS-10 code ran on WAITS, just in case anyone thought this conversation
  19. >wasn't obscure enough yet.  To my knowledge, there is no copy of the
  20. >code on the face of the earth, though i'd be happy to hear someone tell
  21. >me i'm wrong, particularly if they could send me a copy.
  22.  
  23. See below.
  24.  
  25. >And, although i can't imagine anyone really cares, it ran on 6.02 and
  26. >6.03a.  After that i'm a little vague, but i think i got it to run on
  27. >7.00, but not 7.01.  Something about radical changes to the IO system
  28. >in 7.01, but, gee, that was many years ago so i don't remember the details.
  29.  
  30. It has been running on 7.02, talking IP-on-top-of-DDCMP to a VAX running
  31. BSD 4.2, thru an ANF-10 front end sync port instead of using an IMP.
  32. This required some slight changes...
  33.  
  34. Beginning if TCPSER.MAC follows, to prove I'm not lying:
  35.  
  36. title    TCPSer
  37. subttl    provan
  38.  
  39.     search    f,s
  40.     search    NetDef        ; network definitions
  41.     search    MacTen        ; search only if symbol not found in NetDef
  42.  
  43.     sall
  44.  
  45.     $reloc
  46.     $high
  47.  
  48. XP    VTCPSr,7        ; TCP version
  49. comment    \
  50.  
  51. this module contains the support routines for the transmission
  52. control protocol as defined in RFC-793
  53.  
  54. \
  55.     subttl    compilation control
  56.  
  57. ; number of perpetual listens to allow at one time.
  58. ; [udp] make global
  59. ifndef PlsLen,<    PlsLen==:^d10 >        ; default is 10 entries
  60.     subttl    TCP states
  61.  
  62.  
  63. ; first define the states we have for TCP
  64.  
  65. S%Clos==^d0        ;; closed (sometimes convenient, although usually
  66.             ;;        detected by absense of DDB)
  67.             ;; must ALWAYS be zero.  "closed" type states are
  68.             ;;    less than or equal to zero.
  69. S%List==^d1        ;; listen
  70. S%SynS==^d2        ;; SYN sent
  71. S%SyRP==^d3        ;; SYN received, passive
  72. S%SyRA==^d4        ;; SYN received, active (from S%SynS)
  73. S%Estb==^d5        ;; established
  74. S%Fin1==^d6        ;; FIN wait 1
  75. S%Fin2==^d7        ;; FIN wait 2
  76. S%Clsn==^d8        ;; Closing
  77. S%TimW==^d9        ;; time wait
  78. S%ClsW==^d10        ;; Close wait
  79. S%LAck==^d11        ;; last ACK
  80.     subttl    macro for dispatching on different states
  81.  
  82.  
  83. ; now define a macro to define a dispatch vector.  there are three
  84. ;  arguments.  the first is the register containing the state code.
  85. ;  the second is the location to jump to if a state comes which
  86. ;  is not defined in this table.  the third is a list of pairs of
  87. ;  entries: the state code and the instruction to execute.
  88.  
  89. ;warning: the state pairs MUST begin on the same line as the second
  90. ;    argument.  state pairs MUST be separated from each other with
  91. ;    commas (between each pair) which MUST be on the same line as
  92. ;    the macro which FOLLOWs.
  93.  
  94. define    Dispat (AC,ErrLoc,StPair),
  95.     <
  96.     ...min==777777            ;; a high starting point
  97.     ...max==-1            ;; and a low one
  98.     define    Pair (state,instr),
  99.         <
  100.         ifl <state>-...min,<    ...min==<state>    >
  101.         ifg <state>-...max,<    ...max==<state>    >
  102.         >
  103.  
  104.     define    $$help(bogus),<    pair(bogus) >    ;; your classic helper macro
  105.  
  106.     irp StPair,<        ;; for each pair
  107.         $$help(StPair)    ;; expand the Pair macro with each pair
  108.                 ;;  the as arguments.
  109.     >
  110.  
  111.     ;; code to check to see if the state is in the legal range
  112.     cail    <AC>,...min        ;; less than the lowest we know
  113.      caile    <AC>,...max        ;; or greater than the highest
  114.       jrst    <ErrLoc>        ;; go to the error handler
  115.  
  116.     define    Pair (state,instr),
  117.         <
  118.         ife ...x-<state>,<    ;; is this our state?
  119.             instr        ;; expand the instruction
  120.             ...flg==1    ;; and tell that we did something
  121.         >
  122.         >
  123.  
  124.     ;; code for the actual dispatching
  125.     xct    [
  126.          ...x==...min        ;; start with lowest state
  127.          repeat ...max-...min+1,<    ;; do every state in the range
  128.             ...flg==0        ;; nobody's claimed this spot yet
  129.             irp StPair,<    ;; go through all the pairs
  130.             $$help(StPair)    ;; expanding the Pair macro with each.
  131.             >
  132.             ife ...flg,<    ;; if no one claimed to be this
  133.             jrst    <ErrLoc>;; go to the error handler
  134.             >
  135.             ...x==...x+1    ;; next place.
  136.          >
  137.         ]-...min(<AC>)        ;; now correctly index the XCT
  138.     purge    ...min,...max,...x,...flg
  139.     >    ;; end of Dispat macro definition
  140.  
  141. ;; Let's skip to an interesting routine:
  142.  
  143.     subttl    SecChk
  144.  
  145. ;++
  146. ; Functional description:
  147. ;
  148. ;    Classified.
  149. ;
  150. ;
  151. ; Calling sequence:
  152. ;
  153. ;    Classified.
  154. ;
  155. ; Input parameters:
  156. ;
  157. ;    Classified.
  158. ;
  159. ; Output parameters:
  160. ;
  161. ;    Classified.
  162. ;
  163. ; Implicit inputs:
  164. ;
  165. ;    Classified.
  166. ;
  167. ; Implicit outputs:
  168. ;
  169. ;    Classified.
  170. ;
  171. ; Routine value:
  172. ;
  173. ;    Classified.
  174. ;
  175. ; Side effects:
  176. ;
  177. ;    Classified.
  178. ;
  179. ;--
  180.  
  181.  
  182. SecChk:    pjrst    cpopj1##        ; security looks good.
  183.  
  184. >                        don provan
  185. >                        donp@novell.com
  186.  
  187. --Johnny
  188.  
  189. "When in doubt -- hesitate!"
  190.