rfc909.txt

来自「RFC 的详细文档!」· 文本 代码 · 共 2,217 行 · 第 1/5 页

TXT
2,217
字号
     to  usurp  inactive  connections.  A  connection with no activity
     could be declared 'dead', but would  not  be  usurped  until  the
     connection  resource  was  needed.   However,  this  would  still
     require the transport layer to support two  connection  channels:
     one  to  receive  connection  requests, and another to use for an
     active connection.




     3.3  Command Sequencing

          Each command sent from the host to the target has a sequence
     number.   The  sequence  number is used by the target to refer to
     the command in normal replies and error replies.  To save  space,
     these  numbers  are  not  actually  included  in  host  commands.
     Instead, each command sent from the host is assigned an  implicit
     sequence  number.   The  sequence  number  starts  at zero at the
     beginning of the LDP  session  and  increases  by  one  for  each
     command sent.  The host and target each keep track of the current
     number.  The SYNCH <sequence number> command may be used  by  the
     host to synchronize the sequence number.





     3.4  Data Packing and Transmission

          The convention for the order of data packing was chosen  for
     its  simplicity:  data  are packed most significant bit first, in
     order of increasing target address, into  eight-bit  octets.  The
     octets of packed data are transmitted in sequential order.



     Page 10



     LDP Specification                              Protocol Operation



          Data are always packed according to the  address  format  of
     the  target  machine.   For  example, in an LDP session between a
     20-bit host and  a  16-bit  target,  16-bit  words  (packed  into
     octets)   are  transmitted  in  both  directions.   For  ease  of
     discussion, targets are treated here  as  if  they  have  uniform
     address  spaces.  In practice, the size of address units may vary
     within a target -- 16-bit macromemory, 32-bit micromemory, 10-bit
     dispatch  memory,  etc.   Data packing between host and target is
     tailored to the units of the current target address space.

          Figures showing the packing of data for targets with various
     address  unit  sizes  are given below.  The order of transmission
     with respect to the diagrams is top to bottom.  Bit numbering  in
     the  following diagrams refers to significance in the octet:  bit
     zero  is  the  least  significant  bit  in  an  octet.   For   an
     explanation  of  the bit numbering convention that applies in the
     rest of this document, please see Appendix A.

          The packing of data for targets with word lengths  that  are
     multiples   of  8  is  straightforward.   The  following  diagram
     illustrates 16-bit packing:



                          7                               0
                          ---------------------------------
               Octet 0    |      WORD 0 bits 15-08        |
                          ---------------------------------
               Octet 1    |      WORD 0 bits 07-00        |
                          ---------------------------------
               Octet 2    |      WORD 1 bits 15-08        |
                          ---------------------------------
               Octet 3    |      WORD 1 bits 07-00        |
                          ---------------------------------
                                        *
                                        *
                                        *
                          ---------------------------------
               Octet 2n-1 |      WORD n bits 07-00        |
                          ---------------------------------


                          Packing of 16-bit Words
                                 Figure 3






                                                               Page 11



     RFC-909                                                 July 1984



     Packing  for  targets  with  peculiar  word   lengths   is   more
     complicated.   For  20-bit  machines,  2 words of data are packed
     into  5  octets.   When  an  odd  number  of  20-bit  words   are
     transmitted,  the  partially used octet is included in the length
     of the command, and the octet is padded to the right with zeroes.



                          7                               0
                          ---------------------------------
               Octet 0    |      WORD 0 bits 19-12        |
                          ---------------------------------
               Octet 1    |      WORD 0 bits 11-04        |
                          ---------------------------------
               Octet 2    |  WORD 0 03-00 |  WORD 1 19-16 |
                          ---------------------------------
               Octet 3    |      WORD 1 bits 15-08        |
                          ---------------------------------
               Octet 4    |      WORD 1 bits 07-00        |
                          ---------------------------------


                          Packing of 20-bit Words
                                 Figure 4







     3.5  Implementations

          A subset of LDP commands may be implemented in targets where
     machine  resources  are  limited and the full capabilities of LDP
     are  not  needed.  There  are  three  basic  levels   of   target
     implementations:       LOADER_DUMPER,      BASIC_DEBUGGER     and
     FULL_DEBUGGER.  The target communicates  its  LDP  implementation
     level  to the host during session initiation.  The implementation
     levels are described below:










     Page 12



     LDP Specification                              Protocol Operation



     LOADER_DUMPER

          Used  for   loading/dumping    of   the   target    machine.
          Includes   all  protocol   class  commands and replies; data
          transfer commands READ, WRITE,  MOVE  and  their  responses;
          control   command   START  and  control  reply    EXCEPTION.
          Understands at least PHYS_MACRO and HOST  addressing  modes;
          others if desired.

     BASIC_DEBUGGER

          Implements  LOADER_DUMPER  commands,  all  control commands,
          all  addressing modes appropriate to the target machine, but
          does  not  have finite state machine  (FSM)  breakpoints  or
          watchpoints.   Default  breakpoints  are  implemented.   The
          target understands long addressing mode.

     FULL_DEBUGGER

          Implements all commands and addressing modes appropriate  to
          the   target  machine,  and  includes  breakpoint  commands,
          conditional commands and BREAKPOINT_DATA.   Watchpoints  are
          optional.



























                                                               Page 13



     RFC-909                                                 July 1984





















































     Page 14



     LDP Specification                            Commands and Formats



                                 CHAPTER 4


                           Commands and Formats



     4.1  Packet Format

          LDP commands are enclosed in RDP transport messages.  An RDP
     message  may contain more than one command, but each command must
     fit entirely within a single message.  Network packets containing
     LDP commands have the format shown in Figure 5.


                      +----------------+
                      |  Local Network |
                      |    Header(s)   |
                      +----------------+
                      |   IP Header    |
                      +----------------+
                      |   RDP Header   |
                      +----------------+     +-+
                      |   LDP Command  |      |
                      |   Header       |      |
                      +----------------+      |
                      |   Optional     |      |
                      .   LDP          .      | LDP Command
                      .   Data         .      | Format
                      |                |      |
                      +----------------+      |
                      |   LDP Padding  |      |
                      +----------------+     +-+
                      |   Additional   |
                      .   LDP          .
                      .   Commands     .
                      .                .
                      +----------------+


                           Network Packet Format
                                 Figure 5








                                                               Page 15



     RFC-909                                                 July 1984



     4.2  Command Format

          LDP commands consist of a standard two-word header  followed
     optionally  by  additional data.  To facilitate parsing of multi-
     command messages, all commands contain an even number of  octets.
     Commands that contain an odd number of data octets must be padded
     with a null octet.

          The commands defined by the LDP specification  are  intended
     to  be of universal application to provide a common basis for all
     implementations.  Command class and type codes from 0 to 63.  are
     reserved  by the protocol.  Codes above 63. are available for the
     implementation of target-specific commands.




     4.2.1  Command Header

          LDP commands begin with a fixed length header.   The  header
     specifies the type of command and its length in octets.


                       0             0 0   1         1
                       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
                      +---------------+---------------+
                    0 |     Command Length (octets)   |
                      +---------------+---------------+
                    1 | Command Class | Command Type  |
                      +---------------+---------------+


                         LDP Command Header Format
                                 Figure 6


     HEADER FIELDS:

     Command Length

          The command length gives the total number of octets  in  the
          command,  including the length field and data, and excluding
          padding.

     Command Class
     Command Type




     Page 16



     LDP Specification                            Commands and Formats



          The command class and type  together  specify  a  particular
          command.   The  class selects one of six command categories,
          and the type gives the command within  that  category.   All
          codes are decimal.  The symbols given in Figures 7 and 8 for
          command classes and types are used in the remainder of  this
          document for reference.

          The command classes that have been defined are:


                     Command Class  |  Symbol
                    ----------------+-----------
                            1       | PROTOCOL
                            2       | DATA_TRANSFER
                            3       | CONTROL
                            4       | MANAGEMENT
                            5       | BREAKPOINT
                            6       | CONDITION
                            7 - 63  | <reserved>


                              Command Classes
                                 Figure 7


          Command  type  codes  are  assigned  in  order  of  expected
          frequency  of use.  Commands and their responses/replies are
          numbered  sequentially.   The  command  types,  ordered   by
          command class, are:





















                                                               Page 17

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?