home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / ien / ien-158 < prev    next >
Text File  |  1988-12-02  |  7KB  |  234 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. IEN 158                                              Jack Haverty
  7.                                           Bolt Beranek and Newman
  8.                                                    1 October 1980
  9.  
  10.  
  11.  
  12.           XNET Formats for Internet Protocol Version 4
  13.                           Jack Haverty
  14.                   Bolt Beranek and Newman Inc.
  15.                          October 1,1980
  16.  
  17.  
  18.      This IEN is intended to capture in print  the  formats  used
  19.  
  20. currently  in  the  version 4 XNET protocol;  most of the data is
  21.  
  22. courtesy of Ray Tomlinson.
  23.  
  24.  
  25.      Version 4 XNET is identical with version 2.5 XNET  with  the
  26.  
  27. exceptions  listed below.  The version 2.5 format is described in
  28.  
  29. RFC 643.  It should  be  noted  that  the  manner  in  which  the
  30.  
  31. protocol  is  used  by  a  user  program  (such as the PDP10 XNET
  32.  
  33. program), and by the various target-machine XNET servers, is  not
  34.  
  35. defined  herein.   In  particular  there are several problems and
  36.  
  37. heuristics in dealing with the operation of the protocol  in  the
  38.  
  39. internet environment, where individual packets may be duplicated,
  40.  
  41. lost, and reordered.
  42.  
  43.  
  44.      Changes from the version 2 formats include the following:
  45.  
  46. 1)  XNET header and data is embedded in a IN V4 packet instead of
  47.     a V2.5 packet.
  48.  
  49. 2)  Packet format changed  to  add  Port,  Sequence  number,  and
  50.     Checksum fields.
  51.  
  52. 3)  Change in asynchronous reply codes.
  53.  
  54. 4)  Addition of ACK bit to opcode field.
  55.  
  56. 5)  Positive acknowledgement of all messages.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. IEN 158                                              Jack Haverty
  64.                                           Bolt Beranek and Newman
  65.                                                    1 October 1980
  66.  
  67.  
  68.  
  69.  
  70.  
  71. Packet Format
  72.  
  73. +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  74. !                             Port                              !
  75. +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  76. !            LSB            Sequence             MSB            !
  77. +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  78. !                           Checksum                            !
  79. +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  80. !            PID                !CNT!ACK!         Opcode        !
  81. +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  82. !            LSB           Argument 1            MSB            !
  83. +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  84. !            LSB           Argument 2            MSB            !
  85. +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  86. !                                                               !
  87. !                             Data                              !
  88. !                                                               !
  89. +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  90.  
  91. The IN protocol is set to the XNET protocol number (17 octal).
  92.  
  93. Host to target opcodes
  94.  
  95. NOP        0    No operation.
  96. DEBUG      1    Start debugging a process or address space.
  97. ENDBUG     2    End debugging a process or address space.
  98. HALT       3    Halt the process.
  99. DPOSIT     4    Deposit in memory.
  100. RESUME     5    Resume execution of a process.
  101. EXAM       6    Examine memory.
  102. DSV        7    Deposit state vector (r0-r5,sp,pc,ps).
  103. SETBPT    10    Set breakpoint.
  104. REMBPT    11    Remove breakpoint.
  105. ONESTP    12    Single step process (using trace trap).
  106. PROCD     13    Proceed from breakpoint.
  107. CREAP     14    Create a new process (or address space).
  108. DSTROY    15    Destroy (delete) a process or address space.
  109. XIOREP    16    Reply to XIO output (not used anymore).
  110. XINREP    17    Reply to XIO input.
  111. DEFALL    20    Define and allocate memory to an address space.
  112. SAP       21    Start all processes.
  113. SAVDSK    22    Save on disk.
  114. GETDSK    23    Get from disk.
  115. ENTRST    24    Enter address space into restart table.
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122. IEN 158                                              Jack Haverty
  123.                                           Bolt Beranek and Newman
  124.                                                    1 October 1980
  125.  
  126.  
  127.  
  128.  
  129. Opcodes from target to host machine.
  130.  
  131. HALTED    77    Process halted (FREEP with arguments of 0).
  132. TRAPPED   76    Process trapped due to error.
  133. TTRAP     75    Trace trap.
  134. BPT       74    Breakpoint hit.
  135. XIOIN     73    XIO input request.
  136. XIOOUT    72    XIO output request.
  137.  
  138.  
  139. Checksum
  140.  
  141.  
  142.      The checksum is the same as that for  the  IN  header;  ones
  143.  
  144. complement  of  ones  complement  sum of words in the packet from
  145.  
  146. Port field to last data word inclusive.  In case of an odd number
  147.  
  148. of  data  bytes,  an  additional  byte  of  zeroes is assumed for
  149.  
  150. checksum purposes.
  151.  
  152.  
  153. Port number
  154.  
  155.  
  156.      The port number is a unique  number  relative  to  the  host
  157.  
  158. machine  which appears in every packet for a particular debugging
  159.  
  160. session.  It is suggested that this number be  derived  from  the
  161.  
  162. time  of  day  so  that  each  session will be unique over a long
  163.  
  164. period of time.
  165.  
  166.  
  167. Sequence number
  168.  
  169.  
  170.      The first packet of a session (first  use  of  a  particular
  171.  
  172. port  number)  is  numbered 0.  Subsequent packets increment by 1
  173.  
  174. modulo 2**16.  Packets initiated by the target  machine  (opcodes
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181. IEN 158                                              Jack Haverty
  182.                                           Bolt Beranek and Newman
  183.                                                    1 October 1980
  184.  
  185.  
  186.  
  187. 72-77)  are also numbered starting from 0.  The target machine is
  188.  
  189. allowed to execute packets out of order but must never execute  a
  190.  
  191. packet  twice  unless  the  effect  is harmless.  For example, an
  192.  
  193. examine packet should be re-executed so  that  the  data  may  be
  194.  
  195. returned  to  the  sender.   Deposit  or resume should not be re-
  196.  
  197. executed.  The host machine is responsible for  correct  ordering
  198.  
  199. of  critical  functions.   For example, it must not send a RESUME
  200.  
  201. command until all prior deposits have been acknowledged.
  202.  
  203.  
  204. Acknowledgements
  205.  
  206.  
  207.      Each packet  must  be  acknowledged  by  the  receiver.   An
  208.  
  209. acknowledgement   consists   of  the  original  header  plus  any
  210.  
  211. requested   data   (e.g.   EXAM)   with   the   ACK   bit    set.
  212.  
  213. Acknowledgements   are   not   cumulative;   an   acknowledgement
  214.  
  215. acknowledges only the  one  packet  with  the  matching  sequence
  216.  
  217. number.   If  the  target debugger is incapable of performing the
  218.  
  219. requested function, it should set the CNT (can't) bit instead  of
  220.  
  221. the  ACK  bit.  Both bits may be set meaning that the function is
  222.  
  223. available but the data required is  no  longer  available.   This
  224.  
  225. might be the result of a duplicate packet.
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.