home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0210 - 0219 / ibm0210-0219 / ibm0213.tar / ibm0213 / LS4APWAD.ZIP / LS40A.A12 / IBMLSA / IBM400R2 / OSLANAPI.ZIP / IBMLAN / NETSRC / H / NETCONS.H < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-10  |  6.7 KB  |  187 lines

  1. /**************************************************************************/
  2. /*                                                                        */
  3. /*              IBM OS/2(tm) Local Area Network (LAN) Server              */
  4. /*                            Version 3.0                                 */
  5. /* (c) Copyright International Business Machines Corporation, 1988, 1992  */
  6. /*                                                                        */
  7. /**************************************************************************/
  8.  
  9. /********************************************************************
  10.  *                                                                  *
  11.  *  About this file ...  NETCONS.H                                  *
  12.  *                                                                  *
  13.  *  This file contains constants used throughout the LAN Server     *
  14.  *  API header files.  It should be included in any source file     *
  15.  *  that is going to include other LAN Server API header files or   *
  16.  *  call a LAN Server API.                                          *
  17.  *                                                                  *
  18.  ********************************************************************/
  19.  
  20.  
  21. /*
  22.  *      NOTE:  Lengths of ASCIIZ strings are given as the maximum
  23.  *      strlen() value.  This does not include space for the
  24.  *      terminating 0-byte.  When allocating space for such an item,
  25.  *      use the form:
  26.  *
  27.  *              char username[UNLEN+1];
  28.  *
  29.  *      An exception to this is the PATHLEN manifest, which does
  30.  *      include space for the terminating 0-byte.
  31.  */
  32.  
  33.  
  34. #if defined(PURE_32)   /* Defined by pure 32-bit apps */
  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. #if defined(INCL_32)
  47. #define MIXED_32
  48. #endif
  49. #if defined(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.  
  122.  
  123. /*
  124.  *      Constants used with encryption
  125.  */
  126.  
  127. #define CRYPT_KEY_LEN   7
  128. #define CRYPT_TXT_LEN   8
  129. #define ENCRYPTED_PWLEN 16
  130. #define SESSION_PWLEN   24
  131. #define SESSION_CRYPT_KLEN 21
  132.  
  133. /*
  134.  *  Value to be used with SetInfo calls to allow setting of all
  135.  *  settable parameters (parmnum zero option)
  136. */
  137. #ifndef  PARMNUM_ALL
  138. #define         PARMNUM_ALL             0
  139. #endif
  140.  
  141. /*
  142.  *      Message File Names
  143.  */
  144.  
  145. #define MESSAGE_FILE            "NETPROG\\NET.MSG"
  146. #define MESSAGE_FILENAME        "NET.MSG"
  147. #define OS2MSG_FILE             "NETPROG\\OSO001.MSG"
  148. #define OS2MSG_FILENAME         "OSO001.MSG"
  149. #define HELP_MSG_FILE           "NETPROG\\NETH.MSG"
  150. #define HELP_MSG_FILENAME       "NETH.MSG"
  151. #define NMP_MSG_FILE            "NETPROG\\NMP.MSG"
  152. #define NMP_MSG_FILENAME        "NMP.MSG"
  153.  
  154. #define MESSAGE_FILE_BASE       "NETPROG\\NET00000"
  155. #define MESSAGE_FILE_EXT        ".MSG"
  156.  
  157.  
  158.  
  159. #define NMP_LOW_END             230
  160. #define NMP_HIGH_END            240
  161.  
  162. #ifndef NULL
  163. #define  NULL    0
  164. #endif
  165.  
  166.  
  167. #define PUNAVAIL NULL
  168. #ifdef ANY_32_BIT                       /* was INCL_32 */
  169. #define API_RET_TYPE unsigned short
  170. #else
  171. #define API_RET_TYPE unsigned
  172. #endif
  173. #if defined(API_FUNCTION)
  174. #undef API_FUNCTION
  175. #endif
  176. #define API_FUNCTION   API_RET_TYPE LSFAR LSPAS
  177. #define API16_FUNCTION API_RET_TYPE FARPASCAL
  178. #define API32_FUNCTION API_RET_TYPE
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186. #endif /* NETCONS_INCLUDED */
  187.