home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / detk45he.zip / NETCONS.H < prev    next >
C/C++ Source or Header  |  1999-04-29  |  7KB  |  191 lines

  1. /**************************************************************************/
  2. /*                                                                        */
  3. /*              IBM OS/2(tm) Local Area Network (LAN) Server              */
  4. /*                            Version 5.03                                */
  5. /*                   (C) Copyright IBM Corp. 1988, 1998                   */
  6. /*                  Licensed Materials - Property of IBM                  */
  7. /*                                                                        */
  8. /**************************************************************************/
  9.  
  10. /********************************************************************
  11.  *                                                                  *
  12.  *  About this file ...  NETCONS.H                                  *
  13.  *                                                                  *
  14.  *  This file contains constants used throughout the LAN Server     *
  15.  *  API header files.  It should be included in any source file     *
  16.  *  that is going to include other LAN Server API header files or   *
  17.  *  call a LAN Server API.                                          *
  18.  *                                                                  *
  19.  ********************************************************************/
  20.  
  21.  
  22. /*
  23.  *      NOTE:  Lengths of ASCIIZ strings are given as the maximum
  24.  *      strlen() value.  This does not include space for the
  25.  *      terminating 0-byte.  When allocating space for such an item,
  26.  *      use the form:
  27.  *
  28.  *              char username[UNLEN+1];
  29.  *
  30.  *      An exception to this is the PATHLEN manifest, which does
  31.  *      include space for the terminating 0-byte.
  32.  */
  33.  
  34.  
  35. #if defined(PURE_32)   /* Defined by pure 32-bit apps */
  36. #include <os2def.h>
  37. #undef MIXED_32
  38. #undef INCL_32
  39. #define LSFAR
  40. #define LSPAS
  41. #define LSPTR
  42. #define LSINT  short
  43. #define FARPASCAL
  44. #define FARCDECL
  45. #define FARSTAR    *
  46. #define ANY_32_BIT     /* For declarations used by pure 32 and mixed-model */
  47. #endif
  48. #ifdef INCL_32
  49. #define MIXED_32
  50. #endif
  51. #ifdef MIXED_32   /* Defined by mixed-model 32-bit apps */
  52. #undef PURE_32
  53. #define LSFAR
  54. #define LSPAS
  55. #define LSPTR  _Seg16
  56. #define LSINT  short
  57. #define FARPASCAL _Far16 _Pascal
  58. #define FARCDECL  _Far16 _Cdecl
  59. #define FARSTAR   * _Seg16
  60. #define SELTOFLAT(ptr) (void *)(((((ULONG)(ptr))>>19)<<16)|(0xFFFF&((ULONG)(ptr))))
  61. #define ANY_32_BIT    /* For declarations used by pure 32 and mixed-model */
  62. #endif
  63. #if !defined(ANY_32_BIT) /* Must be 16-bit app */
  64. #define LSFAR  far
  65. #define LSPAS  pascal
  66. #define LSPTR
  67. #define LSINT  int
  68. #define FARPASCAL far pascal
  69. #define FARCDECL  far cdecl
  70. #define FARSTAR   far *
  71. #endif
  72.  
  73. #ifndef NETCONS_INCLUDED
  74.  
  75. #define NETCONS_INCLUDED
  76.  
  77. #define CNLEN           15                  /* Computer name length     */
  78. #define UNCLEN          (CNLEN+2)           /* UNC computer name length */
  79. #define NNLEN           12                  /* 8.3 Net name length      */
  80. #define RMLEN           (UNCLEN+1+NNLEN)    /* Maximum remote name length */
  81.  
  82. #define SNLEN           15                  /* Service name length      */
  83. #define STXTLEN         63                  /* Service text length      */
  84.  
  85. #define PATHLEN         260
  86.  
  87. #define DEVLEN           8                  /* Device name length       */
  88. #define APP_LEN          8                  /* Application name length  */
  89. #define ALIAS_LEN        8                  /* Alias name length        */
  90.  
  91. #define DNLEN           CNLEN               /* Maximum domain name length */
  92. #define EVLEN           16                  /* event name length        */
  93. #define JOBSTLEN        80                  /* status length in print job */
  94. #define AFLEN           64                  /* Maximum length of alert  */
  95.                                             /* names field              */
  96. #define UNLEN           20                  /* Maximum user name length */
  97. #define GNLEN           UNLEN               /* Group name               */
  98. #define PWLEN           14                  /* Maximum password length  */
  99. #define SHPWLEN          8                  /* Share password length    */
  100. #define CLTYPE_LEN      12                  /* Length of client type string */
  101.  
  102.  
  103. #define MAXCOMMENTSZ    48                  /* server & share comment length */
  104.  
  105. #define QNLEN           12                  /* Queue name maximum length     */
  106. #define PDLEN            8                  /* Print destination length      */
  107. #define DTLEN            9                  /* Spool file data type          */
  108.                                             /* e.g. IBMQSTD,IBMQESC,IBMQRAW  */
  109. #define ALERTSZ         128                 /* size of alert string in server */
  110. #define MAXDEVENTRIES   (sizeof (LSINT)*8)    /* Max number of device entries   */
  111.                                             /* We use int bitmap to represent */
  112.  
  113. #define HOURS_IN_WEEK           24*7        /* for struct user_info_2 in UAS */
  114. #define MAXWORKSTATIONS         8           /* for struct user_info_2 in UAS */
  115.  
  116. #define NETBIOS_NAME_LEN        16          /* NetBIOS net name */
  117.  
  118. #define DOSIMGLEN     8  /* maximum length for DOS RIPL image name           */
  119.                          /* maximum length for RIPL machine remarks          */
  120. #define RIPLREMLEN  MAXCOMMENTSZ
  121. #define SRVRECLEN   250  /* maximum length for RIPL machine server record ID */
  122.  
  123. #define WRKHEUR_COUNT           54
  124.  
  125.  
  126. /*
  127.  *      Constants used with encryption
  128.  */
  129.  
  130. #define CRYPT_KEY_LEN   7
  131. #define CRYPT_TXT_LEN   8
  132. #define ENCRYPTED_PWLEN 16
  133. #define SESSION_PWLEN   24
  134. #define SESSION_CRYPT_KLEN 21
  135.  
  136. /*
  137.  *  Value to be used with SetInfo calls to allow setting of all
  138.  *  settable parameters (parmnum zero option)
  139. */
  140. #ifndef  PARMNUM_ALL
  141. #define         PARMNUM_ALL             0
  142. #endif
  143.  
  144. /*
  145.  *      Message File Names
  146.  */
  147.  
  148. #define MESSAGE_FILE            "NETPROG\\NET.MSG"
  149. #define MESSAGE_FILENAME        "NET.MSG"
  150. #define OS2MSG_FILE             "NETPROG\\OSO001.MSG"
  151. #define OS2MSG_FILENAME         "OSO001.MSG"
  152. #define HELP_MSG_FILE           "NETPROG\\NETH.MSG"
  153. #define HELP_MSG_FILENAME       "NETH.MSG"
  154. #define NMP_MSG_FILE            "NETPROG\\NMP.MSG"
  155. #define NMP_MSG_FILENAME        "NMP.MSG"
  156.  
  157. #define MESSAGE_FILE_BASE       "NETPROG\\NET00000"
  158. #define MESSAGE_FILE_EXT        ".MSG"
  159.  
  160.  
  161.  
  162. #define NMP_LOW_END             230
  163. #define NMP_HIGH_END            240
  164.  
  165. #ifndef NULL
  166. #define  NULL    0
  167. #endif
  168.  
  169.  
  170. #define PUNAVAIL NULL
  171. #ifdef ANY_32_BIT                       /* was INCL_32 */
  172. #define API_RET_TYPE unsigned short
  173. #else
  174. #define API_RET_TYPE unsigned
  175. #endif
  176. #if defined(API_FUNCTION)
  177. #undef API_FUNCTION
  178. #endif
  179. #define API_FUNCTION   API_RET_TYPE FARPASCAL
  180. #define API16_FUNCTION API_RET_TYPE FARPASCAL
  181. #define API32_FUNCTION API_RET_TYPE APIENTRY
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189. #endif /* NETCONS_INCLUDED */
  190.  
  191.