rfc823.txt

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

TXT
2,611
字号
     RFC 823



     5  GATEWAY SOFTWARE


          The DARPA Internet Gateway  runs  under  the  MOS  operating

     system [9] which provides facilities for:


          o Multiple processes
          o Interprocess communication
          o Buffer management
          o Asynchronous input/output
          o Shareable real-time clock


     There is a MOS process for  each  network  that  the  gateway  is

     directly  connected  to.   A  data  structure  called  a NETBLOCK

     contains variables of interest for each network and  pointers  to

     local  network  routines.   Network  processes run common gateway

     code while  network-specific  functions  are  dispatched  to  the

     routines  pointed  to  in the NETBLOCK.  There are also processes

     for gateway functions which require their own timing, such as GGP

     and HMP.




     5.1  Software Structure


          The gateway software can be divided conceptually into  three

     parts:   MOS Device Drivers, Network software, and Shared Gateway

     software.





                                   -26-





     DARPA Internet Gateway                             September 1982
     RFC 823



     5.1.1  Device Drivers


          The gateway has a set of  routines  to  handle  sending  and

     receiving  data  for  each type of hardware interface.  There are

     routines for initialization,  initiation,  and  interruption  for

     both  the  transmit  and  receive sides of a device.  The gateway

     supports the following types of devices:


          a)  ACC LSI-11 1822
          b)  DEC IMP11a 1822
          c)  ACC LHDH 1822
          d)  ACC VDH11E
          e)  ACC VDH11C
          f)  Proteon Ring Network
          g)  RSRE HDLC
          h)  Interlan Ethernet
          i)  BBN Fibernet
          j)  ACC XQ/CP X.25 **
          k)  ACC XQ/CP HDH  **




     5.1.2  Network Software


          For each connected network, the gateway has a set  of  eight

     routines  which  handle  local  network  functions.   The network

     routines and their functions are described briefly below.




     _______________
     ** Planned, not yet supported.




                                   -27-





     DARPA Internet Gateway                             September 1982
     RFC 823



          Up.net    Perform  local  network  initialization  such   as
                    flapping the 1822 ready line.

          Sg.net    Handle specific  local  network  timing  functions
                    such as timing out 1822 Destination Deads.

          Rc.net    A message  has  been  received  from  the  network
                    interface.  Check for any input errors.

          Wc.net    A message has  been  transmitted  to  the  network
                    interface.  Check for any output errors.

          Rs.net    Set up a buffer (or buffers) to  receive  messages
                    on the network interface.

          Ws.net    Transmit a message to the network interface.

          Hc.net    Check the local network  header  of  the  received
                    message.    Perform  any  local  network  protocol
                    tasks.

          Hb.net    Rebuild the local network header.


          There are  network  routines  for  the  following  types  of

     networks:


          o  Arpanet (a,b,c,k)
          o  Satnet (d,e,k)
          o  Proteon Ring Network (f)
          o  Packet Radio Network (a,b,c)
          o  Rsre HDLC Null Network (g)
          o  Ethernet (h)
          o  Fibernet (i)
          o  Telenet X.25 (j) **


     Note: The letters in parentheses refer to the device drivers used

     _______________
     ** Planned, not yet supported.




                                   -28-





     DARPA Internet Gateway                             September 1982
     RFC 823



     for each type of network as described in the previous section.




     5.1.3  Shared Gateway Software


          The internet processing of a datagram is performed by a body

     of  code  which  is  shared  by the network processes.  This code

     includes  routines  to  check   the   IP   header,   perform   IP

     fragmentation, calculate the IP checksum, forward a datagram, and

     implement the routing, monitoring, and error reporting protocols.




     5.2  Gateway Processes


     5.2.1  Network Processes


          When the gateway starts up, each network process  calls  its

     local network initialization routine and read start routine.  The

     read start routine sets up two maximum network size  buffers  for

     receiving datagrams.  The network process then waits for an input

     complete signal from the network device driver.


          When a message has been received, the MOS  Operating  System

     signals  the  appropriate  network process with an input complete

     signal.  The network process wakes up and executes the  net  read




                                   -29-





     DARPA Internet Gateway                             September 1982
     RFC 823



     complete  routine.   After  the  message  has been processed, the

     network process waits for more input.


          The  net  read  complete  routine  is  the   major   message

     processing  loop  in  the  gateway.   The  following  actions are

     performed when a message has been received:


          o  Call Local Network Read Complete Routine
          o  Start more reads
          o  Check local Network Header
          o  Check Internet header
          o  Check if datagram is for the gateway
          o  Forward the datagram if necessary
          o  Send ICMP error message if necessary.




     5.2.2  GGP Process


          The GGP process periodically sends GGP echos to each of  the

     gateway's neighbors to determine neighbor connectivity, and sends

     interface  status  messages  addressed  to  itself  to  determine

     network  connectivity.   The  GGP  process also sends out routing

     updates when necessary.  The details of the algorithms  currently

     implemented  by  the  GGP  process  are  given  in  Section  4.4,

     Gateway-to-Gateway Protocol, and in Appendix C.








                                   -30-





     DARPA Internet Gateway                             September 1982
     RFC 823



     5.2.3  HMP Process


          The  HMP  process  handles  timer-based  gateway  statistics

     collection and the periodic transmission of traps.









































                                   -31-





     DARPA Internet Gateway                             September 1982
     RFC 823



     APPENDIX A. GGP Message Formats


          Note that the GGP protocol is currently undergoing extensive

     changes to introduce the Exterior Gateway Protocol facility; this

     is the vehicle needed to permit  gateways  in  other  systems  to

     exchange  routing information with the gateways described in this

     document.


          Each GGP message consists of an Internet header followed  by

     one  of the messages explained below.  The values (in decimal) in

     the Internet header used in a GGP message are as follows.


     Version                  4.

     IHL                      Internet header length in 32-bit words.

     Type of Service          0.

     Total Length             Length of Internet header  and  data  in
                              octets.

     ID, Flags,
     Fragment Offset          0.

     Time to Live             Time to live in seconds.  This field  is
                              decremented   at   least  once  by  each
                              machine that processes the datagram.

     Protocol                 Gateway Protocol = 3.

     Header Checksum          The 16 bit one's complement of the one's
                              complement  sum  of  all 16-bit words in
                              the header.  For computing the checksum,
                              the checksum field should be zero.




                                   -32-





     DARPA Internet Gateway                             September 1982
     RFC 823



     Source Address           The address of the  gateway's  interface
                              from which the message is sent.

     Destination Address      The address of the gateway to which  the
                              message is sent.










































                                   -33-





     DARPA Internet Gateway                             September 1982
     RFC 823



     ROUTING UPDATE


      0                   1
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     !Gateway Type   !  unused (0)   !                 ; 2 bytes
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     !     Sequence Number           !                 ; 2 bytes
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     !  need-update  !  n-distances  !                 ; 2 bytes
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     !  distance 1   !   n1-dist     !                 ; 2 bytes
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     !   net11       !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ; 1, 2 or 3
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ;   bytes
     !   net12       !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ; 1, 2 or 3
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ;   bytes
                                     .
                                     .
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     !   net1n1      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  ; n1 nets at
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  ;   dist 1
                                     .                      ...
                                     .                  ; ndist groups
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                  ;    of nets
     !  distance n   !   nn-dist     !                  ; 2 bytes
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     !   netn1       !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  ; 1, 2 or 3
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  ;   bytes
     !   netn2       !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  ; 1, 2 or 3
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  ;   bytes
                                .
                                .
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     !   netnnn      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  ; nn nets at
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  ;  dist n

     Gateway Type             12 (decimal)

     Sequence Number          The  16-bit  sequence  number  used   to
                              identify routing updates.

     need-update              An 8-bit field.  This byte is set  to  1



                                   -34-





     DARPA Internet Gateway                             September 1982
     RFC 823

⌨️ 快捷键说明

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