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

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