home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dsstlkt5.zip / dssos2tk / dss / NETBIOS.H < prev    next >
C/C++ Source or Header  |  1998-05-08  |  8KB  |  196 lines

  1. /**************************************************************************/
  2. /*                                                                        */
  3. /*              IBM OS/2(tm) Directory and Security Services (DSS)        */
  4. /*                            Version 5.0                                 */
  5. /*                   (C) Copyright IBM Corp. 1995                         */
  6. /*                  Licensed Materials - Property of IBM                  */
  7. /*                                                                        */
  8. /**************************************************************************/
  9. /********************************************************************/
  10.  
  11. /********************************************************************
  12.  *                                                                  *
  13.  *  About this file ...  NETBIOS.H                                  *
  14.  *                                                                  *
  15.  *  This file contains information about the NetBios APIs.          *
  16.  *                                                                  *
  17.  *      Function prototypes.                                        *
  18.  *                                                                  *
  19.  *      Data structure templates.                                   *
  20.  *                                                                  *
  21.  *      Definition of special values.                               *
  22.  *                                                                  *
  23.  *                                                                  *
  24.  *  NOTE:  You must include NETCONS.H before this file, since this  *
  25.  *         file depends on values defined in NETCONS.H.             *
  26.  *                                                                  *
  27.  ********************************************************************/
  28.  
  29.  
  30. #ifdef  ANY_32_BIT
  31. #pragma pack(1)
  32. #endif
  33.  
  34.  
  35. #ifndef NETBIOS_INCLUDED
  36.  
  37. #define NETBIOS_INCLUDED
  38.  
  39.  
  40. /****************************************************************
  41.  *                                                              *
  42.  *               Function prototypes - NetBios                  *
  43.  *                                                              *
  44.  ****************************************************************/
  45.  
  46.  
  47. extern API_FUNCTION
  48.   NetBiosOpen ( unsigned char LSFAR *  pszDevName,
  49.                 unsigned char LSFAR *  pszReserved,
  50.                 unsigned short         usOpenOpt,
  51.                 unsigned short LSFAR * phDevName );
  52.  
  53. extern API_FUNCTION
  54.   NetBiosClose ( unsigned short hDevName,
  55.                  unsigned short usReserved );
  56.  
  57. extern API_FUNCTION
  58.   NetBiosEnum ( const unsigned char LSFAR * pszServer,
  59.                 short                       sLevel,
  60.                 unsigned char LSFAR       * pbBuffer,
  61.                 unsigned short              cbBuffer,
  62.                 unsigned short LSFAR      * pcEntriesRead,
  63.                 unsigned short LSFAR      * pcTotalAvail );
  64.  
  65. extern API_FUNCTION
  66.   NetBiosGetInfo ( const unsigned char LSFAR *  pszServer,
  67.                    const unsigned char LSFAR *  pszNetBiosName,
  68.                    short                        sLevel,
  69.                    unsigned char LSFAR       *  pbBuffer,
  70.                    unsigned short               cbBuffer,
  71.                    unsigned short LSFAR       * pcbTotalAvail );
  72.  
  73. extern API_FUNCTION
  74.   NetBiosSubmit ( unsigned short     hDevName,
  75.                   unsigned short     usNcbOpt,
  76.                   struct ncb LSFAR * pNCB );
  77.  
  78.  
  79.  
  80. /****************************************************************
  81.  *                                                              *
  82.  *              Data structure templates                        *
  83.  *                                                              *
  84.  ****************************************************************/
  85.  
  86.  
  87. struct netbios_info_0 {
  88.     unsigned char  nb0_net_name[NETBIOS_NAME_LEN+1];
  89. };      /* netbios_info_0 */
  90.  
  91. struct netbios_info_1 {
  92.     unsigned char  nb1_net_name[NETBIOS_NAME_LEN+1];
  93.     unsigned char  nb1_driver_name[DEVLEN+1];/* OS/2 device driver name        */
  94.     unsigned char  nb1_lana_num;             /* LAN adapter number of this net */
  95.     unsigned char  nb1_pad_1;
  96.     unsigned short nb1_driver_type;
  97.     unsigned short nb1_net_status;
  98.     unsigned long  nb1_net_bandwidth;     /* Network bandwidth, bits/second */
  99.     unsigned short nb1_max_sess;          /* Max number of sessions         */
  100.     unsigned short nb1_max_ncbs;          /* Max number of outstanding NCBs */
  101.     unsigned short nb1_max_names;         /* Max number of names            */
  102. };      /* netbios_info_1 */
  103.  
  104.  
  105. /* p03 -------------------- Begin F2359 --------------------- */
  106.  
  107. #ifdef PURE_32
  108. /****************************************************************
  109.  *                                                              *
  110.  *               Function prototypes - NetBios                  *
  111.  *                                                              *
  112.  ****************************************************************/
  113.  
  114. extern API32_FUNCTION
  115. NetBios32Open ( unsigned char  * pszDevName,
  116.                 unsigned char  * pszReserved,
  117.                 unsigned long    ulOpenOpt,       /* was USHORT*/
  118.                 unsigned long  * phDevName );     /* was PUSHORT*/
  119.  
  120. extern API32_FUNCTION
  121. NetBios32Close ( unsigned long  hDevName,         /* was USHORT*/
  122.                  unsigned long  ulReserved );     /* was USHORT*/
  123.  
  124. extern API32_FUNCTION
  125. NetBios32Enum ( const unsigned char    * pszServer,
  126.                 unsigned long    ulLevel,          /* was signed short*/
  127.                 unsigned char  * pbBuffer,
  128.                 unsigned long    ulBuffer,         /* was USHORT*/
  129.                 unsigned long  * pulEntriesRead,   /* was PUSHORT*/
  130.                 unsigned long  * pulTotalAvail );  /* was PUSHORT*/
  131.  
  132. extern API32_FUNCTION
  133. NetBios32GetInfo ( const unsigned char    * pszServer,
  134.                    const unsigned char    * pszNetBiosName,
  135.                    unsigned long    ulLevel,          /* was signed short*/
  136.                    unsigned char  * pbBuffer,
  137.                    unsigned long    ulBuffer,         /* was USHORT*/
  138.                    unsigned long  * pulTotalAvail );  /* was PUSHORT*/
  139.  
  140. extern API32_FUNCTION
  141. NetBios32Submit ( unsigned long    hDevName,          /* was USHORT*/
  142.                   unsigned long    ulNcbOpt,          /* was USHORT*/
  143.                   struct ncb     * pNCB );
  144. #endif /* PURE_32 */
  145.  
  146. /* p03 --------------------  End  F2359 --------------------- */
  147.  
  148. /****************************************************************
  149.  *                                                              *
  150.  *              Special values and constants                    *
  151.  *                                                              *
  152.  ****************************************************************/
  153.  
  154.  
  155. /*
  156.  *      Driver types (nb1_driver_type).
  157.  */
  158.  
  159. #define NB_TYPE_NCB     1
  160. #define NB_TYPE_MCB     2
  161.  
  162. /*
  163.  *      Bits defined in nb1_net_status.
  164.  */
  165.  
  166. #define NB_LAN_FLAGS_MASK       0x3FFF  /* Mask for LAN Flags */
  167. #define NB_LAN_MANAGED          0x0001  /* LAN is managed by redirector */
  168. #define NB_LAN_LOOPBACK         0x0002  /* LAN is a loopback driver */
  169. #define NB_LAN_SENDNOACK        0x0004  /* LAN allows SendNoAck NCBs */
  170. #define NB_LAN_LMEXT            0x0008  /* LAN supports LAN Manager extended NCBs */
  171. #define NB_LAN_INTNCB           0x0010  /* LAN allows NCB submission at */
  172.                                         /* interrupt time (from NCBDone) */
  173. #define NB_LAN_NORESET          0x0040  /*  @p01a  */
  174.  
  175. #define NB_OPEN_MODE_MASK       0xC000  /* Mask for NetBios Open Modes */
  176. #define NB_OPEN_REGULAR         0x4000  /* NetBios opened in Regular mode */
  177. #define NB_OPEN_PRIVILEGED      0x8000  /* NetBios opened in Privileged mode */
  178. #define NB_OPEN_EXCLUSIVE       0xC000  /* NetBios opened in Exclusive mode */
  179.  
  180. /*
  181.  *      Open modes for NetBiosOpen.
  182.  */
  183.  
  184. #define NB_REGULAR      1
  185. #define NB_PRIVILEGED   2
  186. #define NB_EXCLUSIVE    3
  187.  
  188.  
  189.  
  190. #endif /* NETBIOS_INCLUDED */
  191.  
  192. #ifdef ANY_32_BIT
  193. #pragma pack()
  194. #endif
  195.  
  196.