home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dsstlkt5.zip / dssos2tk / dss / NETCONS.H < prev    next >
C/C++ Source or Header  |  1998-05-08  |  7KB  |  194 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.  *  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. #define ANY_16_BIT                              /*  @d10   */
  72. #endif
  73.  
  74. #ifndef NETCONS_INCLUDED
  75.  
  76. #define NETCONS_INCLUDED
  77.  
  78. #define CNLEN           15                  /* Computer name length     */
  79. #define UNCLEN          (CNLEN+2)           /* UNC computer name length */
  80. #define NNLEN           12                  /* 8.3 Net name length      */
  81. #define RMLEN           (UNCLEN+1+NNLEN)    /* Maximum remote name length */
  82. #define CELLLEN         256
  83. #define REALMLEN        256
  84.  
  85. #define SNLEN           15                  /* Service name length      */
  86. #define STXTLEN         63                  /* Service text length      */
  87.  
  88. #define PATHLEN         260
  89.  
  90. #define DEVLEN           8                  /* Device name length       */
  91. #define APP_LEN          8                  /* Application name length  */
  92. #define ALIAS_LEN        8                  /* Alias name length        */
  93.  
  94. #define DNLEN           CNLEN               /* Maximum domain name length */
  95. #define EVLEN           16                  /* event name length        */
  96. #define JOBSTLEN        80                  /* status length in print job */
  97. #define AFLEN           64                  /* Maximum length of alert  */
  98.                                             /* names field              */
  99. #define UNLEN           20                  /* Maximum user name length */
  100. #define GNLEN           UNLEN               /* Group name               */
  101. #define PWLEN           14                  /* Maximum password length  */
  102. #define SHPWLEN          8                  /* Share password length    */
  103. #define CLTYPE_LEN      12                  /* Length of client type string */
  104.  
  105.  
  106. #define MAXCOMMENTSZ    48                  /* server & share comment length */
  107.  
  108. #define QNLEN           12                  /* Queue name maximum length     */
  109. #define PDLEN            8                  /* Print destination length      */
  110. #define DTLEN            9                  /* Spool file data type          */
  111.                                             /* e.g. IBMQSTD,IBMQESC,IBMQRAW  */
  112. #define ALERTSZ         128                 /* size of alert string in server */
  113. #define MAXDEVENTRIES   (sizeof (LSINT)*8)    /* Max number of device entries   */
  114.                                             /* We use int bitmap to represent */
  115.  
  116. #define HOURS_IN_WEEK           24*7        /* for struct user_info_2 in UAS */
  117. #define MAXWORKSTATIONS         8           /* for struct user_info_2 in UAS */
  118.  
  119. #define NETBIOS_NAME_LEN        16          /* NetBIOS net name */
  120.  
  121. #define DOSIMGLEN     8  /* maximum length for DOS RIPL image name           */
  122.                          /* maximum length for RIPL machine remarks          */
  123. #define RIPLREMLEN  MAXCOMMENTSZ
  124. #define SRVRECLEN   250  /* maximum length for RIPL machine server record ID */
  125.  
  126. #define WRKHEUR_COUNT           54
  127.  
  128.  
  129. /*
  130.  *      Constants used with encryption
  131.  */
  132.  
  133. #define CRYPT_KEY_LEN   7
  134. #define CRYPT_TXT_LEN   8
  135. #define ENCRYPTED_PWLEN 16
  136. #define SESSION_PWLEN   24
  137. #define SESSION_CRYPT_KLEN 21
  138.  
  139. /*
  140.  *  Value to be used with SetInfo calls to allow setting of all
  141.  *  settable parameters (parmnum zero option)
  142. */
  143. #ifndef  PARMNUM_ALL
  144. #define         PARMNUM_ALL             0
  145. #endif
  146.  
  147. /*
  148.  *      Message File Names
  149.  */
  150.  
  151. #define MESSAGE_FILE            "NETPROG\\NET.MSG"
  152. #define MESSAGE_FILENAME        "NET.MSG"
  153. #define OS2MSG_FILE             "NETPROG\\OSO001.MSG"
  154. #define OS2MSG_FILENAME         "OSO001.MSG"
  155. #define HELP_MSG_FILE           "NETPROG\\NETH.MSG"
  156. #define HELP_MSG_FILENAME       "NETH.MSG"
  157. #define NMP_MSG_FILE            "NETPROG\\NMP.MSG"
  158. #define NMP_MSG_FILENAME        "NMP.MSG"
  159.  
  160. #define MESSAGE_FILE_BASE       "NETPROG\\NET00000"
  161. #define MESSAGE_FILE_EXT        ".MSG"
  162.  
  163.  
  164.  
  165. #define NMP_LOW_END             230
  166. #define NMP_HIGH_END            240
  167.  
  168. #ifndef NULL
  169. #define  NULL    0
  170. #endif
  171.  
  172.  
  173. #define PUNAVAIL NULL
  174. #ifdef ANY_32_BIT                       /* was INCL_32 */
  175. #define API_RET_TYPE unsigned short
  176. #else
  177. #define API_RET_TYPE unsigned
  178. #endif
  179. #if defined(API_FUNCTION)
  180. #undef API_FUNCTION
  181. #endif
  182. #define API_FUNCTION   API_RET_TYPE FARPASCAL
  183. #define API16_FUNCTION API_RET_TYPE FARPASCAL
  184. #define API32_FUNCTION API_RET_TYPE APIENTRY
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192. #endif /* NETCONS_INCLUDED */
  193.  
  194.