home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lansystk.zip / INCLUDE / LANSERV / NSCRSIGN.H < prev    next >
Text File  |  1998-05-08  |  14KB  |  250 lines

  1.  
  2. /*********************************************************************
  3.  
  4.    Module Name    = NSCRSIGN.H
  5.  
  6.    Descriptive Name: Network SignON Coordinator/2 External Header File
  7.  
  8.    Copyright = 5648-049 (c) Copyright IBM Corp. 1992, 1993
  9.                Licensed Material - Program Property of IBM
  10.                Refer to Copyright Instructions Form Number G120-3083
  11.  
  12.    Status = NSC Version 1.1
  13.  
  14.    Function: Header File defining
  15.  
  16.       NSCRSIGN constant parameter values
  17.       NSCRSIGN function prototype
  18.       NSCRSIGN return codes
  19.  
  20.    Compile Options:
  21.  
  22.       Microsoft C 6.0: none
  23.  
  24.       IBM CSet/2:      -DNSC32 to call NSCRSIGN from a 32-bit app
  25.  
  26.    Operating System: OS/2
  27.  
  28. *********************************************************************/
  29.  
  30. #ifndef   NSCRSIGN_INCLUDED
  31. #define   NSCRSIGN_INCLUDED
  32.  
  33. /* API Function Attributes */
  34. #ifndef   NSC_DLL_ENTRY
  35.   #ifdef    NSC32
  36.     #define   NSC_DLL_ENTRY
  37.   #else
  38.     #define   NSC_DLL_ENTRY _export _loadds _far _pascal
  39.   #endif
  40. #endif
  41.  
  42. /* Pointer Types */
  43. #ifdef    NSC32
  44.   #define   NSCPTR _Seg16
  45. #else
  46.   #define   NSCPTR
  47. #endif
  48.  
  49. /* Constants defining internal string length limits */
  50. #define   NSC_MAXUIDLEN  47             /* Maximum User ID length  = 47 */
  51. #define   NSC_MAXPWLEN    8             /* Maximum Password length =  8 */
  52.  
  53.  
  54. /* Typedef for callback procedure to be called for displaying errors */
  55. typedef void NSC_DLL_ENTRY \
  56.     FNMSGDSP (short config_index, \
  57.               short return_code, \
  58.               short reserved, \
  59.               unsigned char * NSCPTR message_txt);
  60. typedef FNMSGDSP *PFNMSGDSP;
  61.  
  62. /* callback procedure linkage */
  63. #ifdef    NSC32
  64.  #pragma   linkage (FNMSGDSP, far16 pascal)
  65. #endif
  66.  
  67.  
  68. /*             Function Prototype                                    */
  69.  
  70. short NSC_DLL_ENTRY   NSCRSIGN (
  71.    unsigned char *UserId,              /* User Id */
  72.    unsigned char *Password,            /* Current Password */
  73.    unsigned char *NewPassword,         /* New Password, NULL if none */
  74.    short          Action,              /* NSC_LOGON, NSC_LOGOFF or NSC_CHGPW */
  75.                     #define  NSC_LOGON   0   /* Signon */
  76.                     #define  NSC_LOGOFF  1   /* Signoff */
  77.                     #define  NSC_CHGPW   2   /* Change Password */
  78.    void          *reserved,            /* Reserved, should be NULL */
  79.    FNMSGDSP      *msgdsp);             /* Error message display function */
  80.  
  81. /* 32-bit API linkage */
  82. #ifdef    NSC32
  83.  #pragma   linkage (NSCRSIGN, far16 pascal)
  84. #endif
  85.  
  86. /********************************************************************/
  87. /*      Return codes from the NSCRSIGN api                          */
  88. /*                                                                  */
  89. /********************************************************************/
  90.  
  91. #define   NSC_OK                    0   /* Successful               */
  92.                                         /****************************/
  93.                                         /*                          */
  94.                                         /*  Informational Messages  */
  95.                                         /*     and Warnings         */
  96.                                         /*                          */
  97.                                         /****************************/
  98. #define   NSC_PW_WILL_EXPIRE        1   /* OK, but password will expire soon */
  99. #define   NSC_ALREADY_LOGGED_ON     2   /* Someone is already logged on */
  100. #define   NSC_ALREADY_LOGGED_OFF    3   /* User was not logged on */
  101. #define   NSC_PW_CHGD_SIGNON_NOT    4   /* Password changed, signon failed */
  102. #define   NSC_OK_PW_EXPIRED         5   /* OK, but password has expired */
  103. #define   NSC_IN_PROGRESS           6   /* Operation in progress (info) */
  104. #define   NSC_PW_CHGD_WARN          7   /* Password changed, but unable to
  105.                                            relogon user originally logged on */
  106.  
  107. #define   NSC_RC_ERROR_BOUNDARY    10   /* Warnings are less than this value,
  108.                                            Errors are greater than or equal to
  109.                                            this value. */
  110.                                         /****************************/
  111.                                         /*                          */
  112.                                         /*  Configuration Errors    */
  113.                                         /*                          */
  114.                                         /****************************/
  115. #define   NSC_CONFIG_FILE_ERROR    10   /* Error reading configuration file */
  116. #define   NSC_TOO_MANY_OPTS        11   /* Too many definitions */
  117. #define   NSC_TOO_MANY_HOSTS       12   /* Too many hosts for remote loc */
  118. #define   NSC_INVALID_PARM         13   /* Invalid parameter */
  119. #define   NSC_INVALID_VALUE        14   /* Invalid parameter value */
  120. #define   NSC_INVALID_OPTION       15   /* Invalid definition */
  121. #define   NSC_CONFIG_LINE          16   /* Text from configuration line */
  122. #define   NSC_CFG_FILE_NOT_FOUND   17   /* Config file not found */
  123.                                         /****************************/
  124.                                         /*                          */
  125.                                         /*  API Errors              */
  126.                                         /*                          */
  127.                                         /****************************/
  128. #define   NSC_INVALID_REQUEST      20   /* Invalid Requested Action */
  129. #define   NSC_BAD_ADDRESS          21   /* Bad Parameter Address */
  130. #define   NSC_BAD_PARMS            22   /* UserID or Passwords too long */
  131. #define   NSC_NO_USERID            23   /* No User ID */
  132. #define   NSC_NO_PW                24   /* No Password */
  133. #define   NSC_CONFIG_ERRORS        25   /* Configuration Errors */
  134. #define   NSC_EXEC_WARNINGS        26   /* Execution Warnings */
  135. #define   NSC_EXEC_ERRORS          27   /* Execution Errors */
  136. #define   NSC_PM_EXEC_ERROR        28   /* Unable to execute NSCPM.EXE */
  137.                                         /****************************/
  138.                                         /*                          */
  139.                                         /*  Execution Errors        */
  140.                                         /*    ID or password related*/
  141.                                         /*                          */
  142.                                         /****************************/
  143. #define   NSC_UID_INVALID          30   /* User ID is invalid */
  144. #define   NSC_UID_OR_PW_INVALID    31   /* User ID or password is invalid */
  145. #define   NSC_PW_INVALID           32   /* Password is invalid */
  146. #define   NSC_PW_EXPIRED           33   /* Password has expired */
  147. #define   NSC_PW_OR_NEWPW_INVALID  34   /* Password or new password invalid */
  148. #define   NSC_NEWPW_NOT_ALLOWED    35   /* Password cannot be changed */
  149. #define   NSC_NEWPW_INVALID        36   /* New password is invalid */
  150. #define   NSC_LOGON_EXEC_ERROR     37   /* Unable to execute LOGON program */
  151. #define   NSC_LOGOFF_EXEC_ERROR    38   /* Unable to execute LOGOFF program */
  152.                                         /****************************/
  153.                                         /*                          */
  154.                                         /*  Execution Errors        */
  155.                                         /*    from LAN Server       */
  156.                                         /*                          */
  157.                                         /****************************/
  158. #define   NSC_NET_NOT_STARTED      40   /* NETWKSTA.SYS is not started */
  159. #define   NSC_WKS_NOT_STARTED      41   /* LAN Requester not started */
  160. #define   NSC_WKS_NOT_STARTED_Q    42   /* LAN Requester not started,
  161.                                            Operation was queued. */
  162. #define   NSC_ADDITIONAL_SERVER    43   /* Cannot ChgPW on additional server */
  163. #define   NSC_NET_EXEC_ERROR       44   /* Unable to execute NET program */
  164. #define   NSC_ACTIVE_SESSIONS      45   /* Active sessions for domain logon */
  165. #define   NSC_ACTIVE_SESSIONS_Q    46   /* Active sessions for domain logon,
  166.                                            Operation was queued. */
  167. #define   NSC_LOGGED_ELSEWHERE     47   /* User signed onto domain elsewhere */
  168. #define   NSC_NO_MAIL_SLOTS        48   /* No mail slots on DOS */
  169.                                         /****************************/
  170.                                         /*                          */
  171.                                         /*  Execution Errors        */
  172.                                         /*    Using NSC Server      */
  173.                                         /*                          */
  174.                                         /****************************/
  175. #define   NSC_NETB_NOT_INSTALLED   50   /* NetBios not installed */
  176. #define   NSC_NB_CONNECT_ERROR     51   /* NetBios connection failed */
  177. #define   NSC_NB_CONNECT_ERROR_Q   52   /* NetBios connection failed,
  178.                                            Operation was queued. */
  179. #define   NSC_NOT_ATTEMPTED        55   /* Operation not attempted because
  180.                                            of NetBios errors */
  181.                                         /****************************/
  182.                                         /*                          */
  183.                                         /*  Execution Errors        */
  184.                                         /*    Comm Mgr - APPC       */
  185.                                         /*                          */
  186.                                         /****************************/
  187. #define   NSC_CM_NOT_STARTED       60   /* Comm Manager not started */
  188. #define   NSC_CM_NOT_STARTED_Q     61   /* Comm Manager not started,
  189.                                            Operation was queued. */
  190. #define   NSC_APPC_NOT_INSTALLED   62   /* APPC not installed */
  191. #define   NSC_APPC_NOT_AVAILABLE   63   /* APPC not configured/started */
  192. #define   NSC_APPC_ALLOC_ERROR     64   /* APPC connection failed */
  193. #define   NSC_APPC_INVALID_PLU     65   /* Partner LU definition missing */
  194. #define   NSC_CM_NOT_INSTALLED     66   /* Comm Manager not installed*/
  195. #define   NSC_CM_FAILED            67   /* CM failed, must be restarted */
  196.                                         /****************************/
  197.                                         /*                          */
  198.                                         /*  Execution Errors        */
  199.                                         /*    Comm Mgr - EHLLAPI    */
  200.                                         /*                          */
  201.                                         /****************************/
  202. #define   NSC_EHLL_NOT_INSTALLED   70   /* EHLLAPI not installed */
  203. #define   NSC_EHLL_SESSION_USED    71   /* Emulator session was being used */
  204. #define   NSC_EHLL_SESSION_USED_Q  72   /* Emulator session was being used,
  205.                                            Operation was queued. */
  206. #define   NSC_EHLL_FILE_ERROR      73   /* Host info file access error */
  207. #define   NSC_EHLL_SESSION_INVALID 74   /* Session ID not 'A'-'Z' or 'a'-'z' */
  208. #define   NSC_EHLL_SYNTAX_INVALID  75   /* Invalid syntax in host info file */
  209. #define   NSC_EHLL_PARM_INVALID    76   /* Invalid parameter in hif */
  210. #define   NSC_EHLL_STATE_EXCEEDED  77   /* NO LONGER RETURNED */
  211. #define   NSC_EHLL_LINE_EXCEEDED   78   /* Maximum line length exceeded */
  212. #define   NSC_EHLL_STRING_EXCEEDED 79   /* NO LONGER RETURNED */
  213. #define   NSC_EHLL_NO_START_STATE  80   /* Host was not in a start state */
  214. #define   NSC_EHLL_STATE_INVALID   81   /* Current host state is invalid */
  215. #define   NSC_EHLL_NO_STATES       82   /* No states for this action */
  216. #define   NSC_EHLL_NO_SESSIONS     83   /* No available emulator session */
  217.                                         /****************************/
  218.                                         /*                          */
  219.                                         /*  Execution Errors        */
  220.                                         /*    Other                 */
  221.                                         /*                          */
  222.                                         /****************************/
  223. #define   NSC_SYS_ERROR            90   /* Unexpected system error */
  224. #define   NSC_MEMORY_ERROR         91   /* Out of memory error */
  225. #define   NSC_EXIT_EXEC_ERROR      92   /* Unable to execute user exit */
  226. #define   NSC_EXIT_RTN_ERROR       93   /* Unknown error from user exit */
  227.                                         /****************************/
  228.                                         /*                          */
  229.                                         /*  Execution Errors        */
  230.                                         /*  Common for multiple     */
  231.                                         /*  location types          */
  232.                                         /*  (continued..)           */
  233.                                         /****************************/
  234. #define   NSC_NOT_AVAILABLE        53   /* Remote machine not available */
  235. #define   NSC_NOT_AVAILABLE_Q      54   /* Remote machine not available,
  236.                                            Operation was queued. */
  237. #define   NSC_UNAUTH_TIME         100   /* Cannot logon: time restriction */
  238. #define   NSC_UNAUTH_CLIENT       101   /* Cannot logon from this client */
  239. #define   NSC_ACCOUNT_ERR         102   /* Account disabled, or has no
  240.                                            balance or no credit */
  241.                                         /****************************/
  242.                                         /*                          */
  243.                                         /*  Execution Errors        */
  244.                                         /*    Novell NetWare        */
  245.                                         /*                          */
  246.                                         /****************************/
  247. #define   NSC_NOVELL_NOT_INSTALLED 120  /* NetWare not installed    */
  248.  
  249. #endif
  250.