home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / nb_agent / rcb.txt < prev   
Text File  |  1992-07-09  |  4KB  |  199 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.               OS/2 RCB Device Driver Interface
  11.  
  12.  
  13.                       Avnish Aggarwal
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20. _1.  _I_n_t_r_o_d_u_c_t_i_o_n
  21.  
  22.      The OS/2 RCB driver supports the RCB  (Request  Control
  23. Block)  abstraction  -  the  kernel  interface to the TCP/IP
  24. transport.  A RCB driver installs as a standard OS/2  device
  25. driver.  It  gets called by client drivers (such as a socket
  26. driver, NFS Installable File System) via a direct  call,  as
  27. opposed  to  going through the standard device driver inter-
  28. face. More than one client may be using the  RCB  driver  at
  29. one time.
  30.  
  31.      A client device driver performs a standard  DosDevIoctl
  32. to  the RCB driver to get the far address of a "RCB Handler"
  33. routine.  This routine is then passed RCBs for processing by
  34. the  RCB  stack.   At  present,  the RCB handler can only be
  35. called from protected mode.
  36.  
  37. _2.  _R_C_B _D_r_i_v_e_r _C_o_n_f_i_g_u_r_a_t_i_o_n
  38.  
  39.      The RCB  driver  gets  configuration  information  from
  40. NET.CFG.  The only item of interest to client drivers should
  41. be number of sockets supported. This is passed  back  during
  42. initialization. No information is passed from client drivers
  43. to the RCB driver.
  44.  
  45. _3.  _R_C_B _D_r_i_v_e_r _I_n_t_i_a_l_i_z_a_t_i_o_n
  46.  
  47.      The RCB driver will support a DosDevIoctl command  that
  48. is issued from a client driver during system initialization.
  49. The client does a DosOpen, DosDevIoctl(RcbLinkage), DosClose
  50. to  get  the  RCB  Handler  address   back  from the the RCB
  51. driver. (See below for details on RCBLinkage.)
  52.  
  53. _4.  _R_C_B _H_a_n_d_l_e_r _i_n_t_e_r_f_a_c_e
  54.  
  55.      The RCB handler is entered via a direct far  call.  The
  56. calling conventions are as follows:
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.                         May 4, 1990
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                            - 2 -
  71.  
  72.  
  73.  
  74. Entry
  75. =====
  76.  
  77. ES:SI       Virtual address of RCB
  78. DS          DS of RCB driver
  79.  
  80. Exit
  81. ====
  82.  
  83. AX:         immediate return code
  84.  
  85.             0   - ok
  86.             1   - error
  87.  
  88.  
  89.  
  90.      The RCB driver will exit via a far return only when the
  91. requested   operation has finished.  Depending on the opera-
  92. tion, it may block for an indefinite time.  If the immediate
  93. return code is not zero, an error is indicated.
  94.  
  95.      All addresses in the RCB must be virtual addresses that
  96. are: a) locked down, and b) are GDT entries.  The RCB itself
  97. must be a valid virtual address that has been locked down.
  98.  
  99.      The RCB driver does not distinguish   between  synchro-
  100. nous  and  asynchronous calls - it is upto the client driver
  101. to handle this feature.
  102.  
  103. _5.  _R_c_b_L_i_n_k_a_g_e
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.                         May 4, 1990
  131.  
  132.  
  133.  
  134.  
  135.  
  136.                            - 3 -
  137.  
  138.  
  139.  
  140.  
  141. Purpose:    Get RCB direct address
  142.             Get config. info (# of sockets supported)
  143.             Get DS (protect mode)
  144.  
  145. Return Codes:
  146.             Standard codes returned by :
  147.  
  148.             DosOpen()
  149.             DosDevIoctl()
  150.             DosClose()
  151.  
  152.  
  153. Request Packet:  (as sent by client driver)
  154.             Request header
  155.             Category (byte)         = 82h
  156.             Code (byte)             = 70h
  157.             Param Buffer Ptr (dword)= buffer must be 8 bytes long
  158.             Data Buffer Ptr (dword) = NULL
  159.  
  160.  
  161. Param Buffer : (as returned by the RCB driver)
  162.             WORD    - # of sessions supported by RCB driver
  163.             WORD    - RCB driver DS (protect mode)
  164.             DWORD   - RCB Handler address  (ring 0 protect mode address)
  165.  
  166.  
  167. _6.  _N_o_t_e_s
  168.  
  169. 1    Name of RCB driver  - TCPIP.OS2
  170.  
  171. 2    The client driver must be loaded after the RCB driver.
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.                         May 4, 1990
  197.  
  198.  
  199.