home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / nsc12.zip / nscrsign.h < prev    next >
C/C++ Source or Header  |  1996-07-17  |  14KB  |  254 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.2
  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   14             /* Maximum Password length = 14 */
  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.                     #define  NSC_LOGON_NEW_INI 3   /* Signon and force read of */
  79.                                                    /* ini file                 */
  80.    void          *reserved,            /* Reserved, should be NULL */
  81.    FNMSGDSP      *msgdsp);             /* Error message display function */
  82.  
  83. /* 32-bit API linkage */
  84. #ifdef    NSC32
  85.  #pragma   linkage (NSCRSIGN, far16 pascal)
  86. #endif
  87.  
  88. /********************************************************************/
  89. /*      Return codes from the NSCRSIGN api                          */
  90. /*                                                                  */
  91. /********************************************************************/
  92.  
  93. #define   NSC_OK                    0   /* Successful               */
  94.                                         /****************************/
  95.                                         /*                          */
  96.                                         /*  Informational Messages  */
  97.                                         /*     and Warnings         */
  98.                                         /*                          */
  99.                                         /****************************/
  100. #define   NSC_PW_WILL_EXPIRE        1   /* OK, but password will expire soon */
  101. #define   NSC_ALREADY_LOGGED_ON     2   /* Someone is already logged on */
  102. #define   NSC_ALREADY_LOGGED_OFF    3   /* User was not logged on */
  103. #define   NSC_PW_CHGD_SIGNON_NOT    4   /* Password changed, signon failed */
  104. #define   NSC_OK_PW_EXPIRED         5   /* OK, but password has expired */
  105. #define   NSC_IN_PROGRESS           6   /* Operation in progress (info) */
  106. #define   NSC_PW_CHGD_WARN          7   /* Password changed, but unable to
  107.                                            relogon user originally logged on */
  108.  
  109. #define   NSC_RC_ERROR_BOUNDARY    10   /* Warnings are less than this value,
  110.                                            Errors are greater than or equal to
  111.                                            this value. */
  112.                                         /****************************/
  113.                                         /*                          */
  114.                                         /*  Configuration Errors    */
  115.                                         /*                          */
  116.                                         /****************************/
  117. #define   NSC_CONFIG_FILE_ERROR    10   /* Error reading configuration file */
  118. #define   NSC_TOO_MANY_OPTS        11   /* Too many definitions */
  119. #define   NSC_TOO_MANY_HOSTS       12   /* Too many hosts for remote loc */
  120. #define   NSC_INVALID_PARM         13   /* Invalid parameter */
  121. #define   NSC_INVALID_VALUE        14   /* Invalid parameter value */
  122. #define   NSC_INVALID_OPTION       15   /* Invalid definition */
  123. #define   NSC_CONFIG_LINE          16   /* Text from configuration line */
  124. #define   NSC_CFG_FILE_NOT_FOUND   17   /* Config file not found */
  125.                                         /****************************/
  126.                                         /*                          */
  127.                                         /*  API Errors              */
  128.                                         /*                          */
  129.                                         /****************************/
  130. #define   NSC_INVALID_REQUEST      20   /* Invalid Requested Action */
  131. #define   NSC_BAD_ADDRESS          21   /* Bad Parameter Address */
  132. #define   NSC_BAD_PARMS            22   /* UserID or Passwords too long */
  133. #define   NSC_NO_USERID            23   /* No User ID */
  134. #define   NSC_NO_PW                24   /* No Password */
  135. #define   NSC_CONFIG_ERRORS        25   /* Configuration Errors */
  136. #define   NSC_EXEC_WARNINGS        26   /* Execution Warnings */
  137. #define   NSC_EXEC_ERRORS          27   /* Execution Errors */
  138. #define   NSC_PM_EXEC_ERROR        28   /* Unable to execute NSCPM.EXE */
  139.                                         /****************************/
  140.                                         /*                          */
  141.                                         /*  Execution Errors        */
  142.                                         /*    ID or password related*/
  143.                                         /*                          */
  144.                                         /****************************/
  145. #define   NSC_UID_INVALID          30   /* User ID is invalid */
  146. #define   NSC_UID_OR_PW_INVALID    31   /* User ID or password is invalid */
  147. #define   NSC_PW_INVALID           32   /* Password is invalid */
  148. #define   NSC_PW_EXPIRED           33   /* Password has expired */
  149. #define   NSC_PW_OR_NEWPW_INVALID  34   /* Password or new password invalid */
  150. #define   NSC_NEWPW_NOT_ALLOWED    35   /* Password cannot be changed */
  151. #define   NSC_NEWPW_INVALID        36   /* New password is invalid */
  152. #define   NSC_LOGON_EXEC_ERROR     37   /* Unable to execute LOGON program */
  153. #define   NSC_LOGOFF_EXEC_ERROR    38   /* Unable to execute LOGOFF program */
  154.                                         /****************************/
  155.                                         /*                          */
  156.                                         /*  Execution Errors        */
  157.                                         /*    from LAN Server       */
  158.                                         /*                          */
  159.                                         /****************************/
  160. #define   NSC_NET_NOT_STARTED      40   /* NETWKSTA.SYS is not started */
  161. #define   NSC_WKS_NOT_STARTED      41   /* LAN Requester not started */
  162. #define   NSC_WKS_NOT_STARTED_Q    42   /* LAN Requester not started,
  163.                                            Operation was queued. */
  164. #define   NSC_ADDITIONAL_SERVER    43   /* Cannot ChgPW on additional server */
  165. #define   NSC_NET_EXEC_ERROR       44   /* Unable to execute NET program */
  166. #define   NSC_ACTIVE_SESSIONS      45   /* Active sessions for domain logon */
  167. #define   NSC_ACTIVE_SESSIONS_Q    46   /* Active sessions for domain logon,
  168.                                            Operation was queued. */
  169. #define   NSC_LOGGED_ELSEWHERE     47   /* User signed onto domain elsewhere */
  170. #define   NSC_NO_MAIL_SLOTS        48   /* No mail slots on DOS */
  171.                                         /****************************/
  172.                                         /*                          */
  173.                                         /*  Execution Errors        */
  174.                                         /*    Using NSC Server      */
  175.                                         /*                          */
  176.                                         /****************************/
  177. #define   NSC_NETB_NOT_INSTALLED   50   /* NetBios not installed */
  178. #define   NSC_NB_CONNECT_ERROR     51   /* NetBios connection failed */
  179. #define   NSC_NB_CONNECT_ERROR_Q   52   /* NetBios connection failed,
  180.                                            Operation was queued. */
  181. #define   NSC_NOT_ATTEMPTED        55   /* Operation not attempted because
  182.                                            of NetBios errors */
  183.                                         /****************************/
  184.                                         /*                          */
  185.                                         /*  Execution Errors        */
  186.                                         /*    Comm Mgr - APPC       */
  187.                                         /*                          */
  188.                                         /****************************/
  189. #define   NSC_CM_NOT_STARTED       60   /* Comm Manager not started */
  190. #define   NSC_CM_NOT_STARTED_Q     61   /* Comm Manager not started,
  191.                                            Operation was queued. */
  192. #define   NSC_APPC_NOT_INSTALLED   62   /* APPC not installed */
  193. #define   NSC_APPC_NOT_AVAILABLE   63   /* APPC not configured/started */
  194. #define   NSC_APPC_ALLOC_ERROR     64   /* APPC connection failed */
  195. #define   NSC_APPC_INVALID_PLU     65   /* Partner LU definition missing */
  196. #define   NSC_CM_NOT_INSTALLED     66   /* Comm Manager not installed*/
  197. #define   NSC_CM_FAILED            67   /* CM failed, must be restarted */
  198.                                         /****************************/
  199.                                         /*                          */
  200.                                         /*  Execution Errors        */
  201.                                         /*    Comm Mgr - EHLLAPI    */
  202.                                         /*                          */
  203.                                         /****************************/
  204. #define   NSC_EHLL_NOT_INSTALLED   70   /* EHLLAPI not installed */
  205. #define   NSC_EHLL_SESSION_USED    71   /* Emulator session was being used */
  206. #define   NSC_EHLL_SESSION_USED_Q  72   /* Emulator session was being used,
  207.                                            Operation was queued. */
  208. #define   NSC_EHLL_FILE_ERROR      73   /* Host info file access error */
  209. #define   NSC_EHLL_SESSION_INVALID 74   /* Session ID not 'A'-'Z' or 'a'-'z' */
  210. #define   NSC_EHLL_SYNTAX_INVALID  75   /* Invalid syntax in host info file */
  211. #define   NSC_EHLL_PARM_INVALID    76   /* Invalid parameter in hif */
  212. #define   NSC_EHLL_STATE_EXCEEDED  77   /* NO LONGER RETURNED */
  213. #define   NSC_EHLL_LINE_EXCEEDED   78   /* Maximum line length exceeded */
  214. #define   NSC_EHLL_STRING_EXCEEDED 79   /* NO LONGER RETURNED */
  215. #define   NSC_EHLL_NO_START_STATE  80   /* Host was not in a start state */
  216. #define   NSC_EHLL_STATE_INVALID   81   /* Current host state is invalid */
  217. #define   NSC_EHLL_NO_STATES       82   /* No states for this action */
  218. #define   NSC_EHLL_NO_SESSIONS     83   /* No available emulator session */
  219.                                         /****************************/
  220.                                         /*                          */
  221.                                         /*  Execution Errors        */
  222.                                         /*    Other                 */
  223.                                         /*                          */
  224.                                         /****************************/
  225. #define   NSC_SYS_ERROR            90   /* Unexpected system error */
  226. #define   NSC_MEMORY_ERROR         91   /* Out of memory error */
  227. #define   NSC_EXIT_EXEC_ERROR      92   /* Unable to execute user exit */
  228. #define   NSC_EXIT_RTN_ERROR       93   /* Unknown error from user exit */
  229.                                         /****************************/
  230.                                         /*                          */
  231.                                         /*  Execution Errors        */
  232.                                         /*  Common for multiple     */
  233.                                         /*  location types          */
  234.                                         /*  (continued..)           */
  235.                                         /****************************/
  236. #define   NSC_NOT_AVAILABLE        53   /* Remote machine not available */
  237. #define   NSC_NOT_AVAILABLE_Q      54   /* Remote machine not available,
  238.                                            Operation was queued. */
  239. #define   NSC_UNAUTH_TIME         100   /* Cannot logon: time restriction */
  240. #define   NSC_UNAUTH_CLIENT       101   /* Cannot logon from this client */
  241. #define   NSC_ACCOUNT_ERR         102   /* Account disabled, or has no
  242.                                            balance or no credit */
  243.  
  244. #define   NSC_EHLL_TIMEOUT        103   /* Account disabled, or has no
  245.                                         /****************************/
  246.                                         /*                          */
  247.                                         /*  Execution Errors        */
  248.                                         /*    Novell NetWare        */
  249.                                         /*                          */
  250.                                         /****************************/
  251. #define   NSC_NOVELL_NOT_INSTALLED 120  /* NetWare not installed    */
  252.  
  253. #endif
  254.