home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warphead.zip / H / NETCONS.H < prev    next >
C/C++ Source or Header  |  1997-09-05  |  7KB  |  189 lines

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