home *** CD-ROM | disk | FTP | other *** search
/ Network Support Encyclopedia 96-1 / novell-nsepro-1996-1-cd2.iso / download / netware / clxcon.exe / NWCLXCON.H < prev   
C/C++ Source or Header  |  1995-08-21  |  9KB  |  307 lines

  1. /****************************************************************************
  2.  
  3.   $Workfile:   nwclxcon.h  $
  4.   $Revision:   1.5  $
  5.   $Modtime::   21 Aug 1995 15:07:24                        $
  6.   $Copyright:
  7.  
  8.   Copyright (c) 1989-1995 Novell, Inc.  All Rights Reserved.
  9.  
  10.   THIS WORK IS  SUBJECT  TO  U.S.  AND  INTERNATIONAL  COPYRIGHT  LAWS  AND
  11.   TREATIES.   NO  PART  OF  THIS  WORK MAY BE  USED,  PRACTICED,  PERFORMED
  12.   COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED,  ABRIDGED, CONDENSED,
  13.   EXPANDED,  COLLECTED,  COMPILED,  LINKED,  RECAST, TRANSFORMED OR ADAPTED
  14.   WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
  15.   OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
  16.   CRIMINAL AND CIVIL LIABILITY.$
  17.  
  18.  ***************************************************************************/
  19.  
  20. #if ! defined ( NWCLXCON_H )
  21. #define NWCLXCON_H
  22.  
  23. #if ! defined ( NTYPES_H )
  24. #include "ntypes.h"
  25. #endif
  26.  
  27. #if ! defined ( NWAPIDEF_H )
  28. #include "nwapidef.h"
  29. #endif
  30.  
  31. #if ! defined ( NWCALDEF_H )  /* include nwcaldef.h for connection handle */
  32. #define NWCALDEF_H
  33. #endif
  34.  
  35. #include "npackon.h"
  36.  
  37. /* Authentication States */
  38. #define NWCC_AUTHENT_STATE_NONE     0x0000
  39. #define NWCC_AUTHENT_STATE_BIND     0x0001
  40. #define NWCC_AUTHENT_STATE_NDS      0x0002
  41.  
  42. /* Broadcast States */
  43. #define NWCC_BCAST_PERMIT_ALL       0x0000
  44. #define NWCC_BCAST_PERMIT_SYSTEM    0x0001
  45. #define NWCC_BCAST_PERMIT_NONE      0x0002
  46. #define NWCC_BCAST_PERMIT_POLL      0x0003  /* DOS Windows and OS/2 only */
  47.  
  48. /* NDS States */
  49. #define NWCC_NDS_NOT_CAPABLE        0x0000
  50. #define NWCC_NDS_CAPABLE            0x0001
  51.  
  52. /* License States */
  53. #define NWCC_NOT_LICENSED           0x0000
  54. #define NWCC_CONNECTION_LICENSED    0x0001
  55. #define NWCC_HANDLE_LICENSED        0x0002
  56.  
  57. /* Name Format types */
  58. #define NWCC_NAME_FORMAT_NDS        0x0001  /* Unicode full dot format name */
  59. #define NWCC_NAME_FORMAT_BIND       0x0002
  60. #define NWCC_NAME_FORMAT_NDS_TREE   0x0008
  61.  
  62. /* Transport types */
  63. #define NWCC_TRAN_TYPE_IPX          0x00000001
  64. #define NWCC_TRAN_TYPE_UDP          0x00000002
  65. #define NWCC_TRAN_TYPE_DDP          0x00000003
  66. #define NWCC_TRAN_TYPE_ASP          0x00000004
  67.  
  68. /* Open States */
  69. #define NWCC_OPEN_LICENSED          0x0001
  70. #define NWCC_OPEN_UNLICENSED        0x0002
  71.  
  72. /* Reserved Value */
  73. #define NWCC_RESERVED               0x0000
  74.  
  75. typedef struct tagNWCCTranAddr
  76. {
  77.    nuint32  type;
  78.    nuint32  len;
  79.    pnuint8  buffer;
  80. } NWCCTranAddr, N_FAR *pNWCCTranAddr;
  81.  
  82. typedef struct tagNWCCVersion
  83. {
  84.    nuint major;
  85.    nuint minor;
  86.    nuint revision;
  87. }NWCCVersion, N_FAR *pNWCCVersion;
  88.  
  89. /* Info Types */
  90. #define NWCC_INFO_AUTHENT_STATE      1
  91. #define NWCC_INFO_BCAST_STATE        2
  92. #define NWCC_INFO_CONN_REF           3
  93. #define NWCC_INFO_TREE_NAME          4
  94. #define NWCC_INFO_CONN_NUMBER        5
  95. #define NWCC_INFO_USER_ID            6
  96. #define NWCC_INFO_SERVER_NAME        7
  97. #define NWCC_INFO_NDS_STATE          8
  98. #define NWCC_INFO_MAX_PACKET_SIZE    9
  99. #define NWCC_INFO_LICENSE_STATE     10
  100. #define NWCC_INFO_DISTANCE          11
  101. #define NWCC_INFO_SERVER_VERSION    12
  102.  
  103. /* Current Info Version */
  104. #define NWCC_INFO_VERSION           0x0001
  105.  
  106. /* Transport Address is not returned in this structure */
  107. typedef struct tagNWCCConnInfo
  108. {
  109.    nuint       authenticationState;
  110.    nuint       broadcastState;
  111.    nuint32     connRef;
  112.    nstr        treeName[NWA_MAX_TREE_NAME_LEN];
  113.    nuint       connNum;
  114.    nuint32     userID;
  115.    nstr        serverName[NWA_MAX_SERVER_NAME_LEN];
  116.    nuint       NDSState;
  117.    nuint       maxPacketSize;
  118.    nuint       licenseState;
  119.    nuint       distance;
  120.    NWCCVersion serverVersion;
  121. }NWCCConnInfo, N_FAR *pNWCCConnInfo;
  122.  
  123. #ifdef __cplusplus
  124. extern "C" {
  125. #endif
  126.  
  127.  
  128. void N_API NWCCGetCLXVersion
  129. (
  130.   pnuint8 majorVersion,
  131.   pnuint8 minorVersion,
  132.   pnuint8 revisionLevel,
  133.   pnuint8 betaReleaseLevel
  134. );
  135.  
  136. N_EXTERN_LIBRARY( NWRCODE )
  137. NWCCOpenConnByName
  138. (
  139.    NWCONN_HANDLE  startConnHandle,     /* in     */
  140.    pnstr8         name,                /* in     */
  141.    nuint          nameFormat,          /* in     */
  142.    nuint          openState,           /* in     */
  143.    nuint          reserved,            /* in     * use NWCC_RESERVED */
  144.    pNWCONN_HANDLE pConnHandle          /*    out */
  145. );
  146.  
  147. N_EXTERN_LIBRARY( NWRCODE )
  148. NWCCOpenConnByAddr
  149. (
  150.    pNWCCTranAddr  tranAddr,            /* in     */
  151.    nuint          openState,           /* in     */
  152.    nuint          reserved,            /* in     * use NWCC_RESERVED */
  153.    pNWCONN_HANDLE pConnHandle          /*    out */
  154. );
  155.  
  156. N_EXTERN_LIBRARY( NWRCODE )
  157. NWCCOpenConnByRef
  158. (
  159.    nuint32        connRef,             /* in     */
  160.    nuint          openState,           /* in     */
  161.    nuint          reserved,            /* in     * use NWCC_RESERVED */
  162.    pNWCONN_HANDLE pConnHandle          /*    out */          
  163. );
  164.  
  165. N_EXTERN_LIBRARY( NWRCODE )
  166. NWCCCloseConn
  167. (
  168.    NWCONN_HANDLE  connHandle                    /* in     */
  169. );
  170.  
  171. N_EXTERN_LIBRARY( NWRCODE )
  172. NWCCSysCloseConnRef
  173. (
  174.    nuint32        connRef                        /* in     */
  175. );
  176.  
  177. N_EXTERN_LIBRARY( NWRCODE )
  178. NWCCMakeConnPermanent
  179. (
  180.    NWCONN_HANDLE  connHandle                    /* in     */
  181. );
  182.  
  183. N_EXTERN_LIBRARY( NWRCODE )
  184. NWCCLicenseConn
  185. (
  186.    NWCONN_HANDLE  connHandle                    /* in     */
  187. );
  188.  
  189. N_EXTERN_LIBRARY( NWRCODE )
  190. NWCCUnlicenseConn
  191. (
  192.    NWCONN_HANDLE  connHandle                    /* in     */
  193. );
  194.  
  195. N_EXTERN_LIBRARY( NWRCODE )
  196. NWCCGetConnRef
  197. (
  198.    NWCONN_HANDLE  connHandle,                   /* in     */
  199.    pnuint32       connRef                       /*    out */
  200. );
  201.  
  202. N_EXTERN_LIBRARY( NWRCODE )
  203. NWCCGetPrefServerName
  204. (
  205.    nuint       len,                                /* in     */
  206.    pnstr       prefServer                          /*    out */
  207. );
  208.  
  209. N_EXTERN_LIBRARY( NWRCODE )
  210. NWCCSetPrefServerName
  211. (
  212.    pnstr       prefServer                          /* in     */
  213. );
  214.  
  215. N_EXTERN_LIBRARY( NWRCODE )
  216. NWCCGetPrimConnRef
  217. (
  218.    pnuint32    connRef                             /*    out */
  219. );
  220.  
  221. N_EXTERN_LIBRARY( NWRCODE )
  222. NWCCSetPrimConn
  223. (
  224.    NWCONN_HANDLE  connHandle                    /* in     */
  225. );
  226.  
  227. N_EXTERN_LIBRARY( NWRCODE )
  228. NWCCScanConnRefs
  229. (  
  230.    pnuint32    scanIterator,                    /* in/out : initialize to 0 */
  231.    pnuint32    connRef                          /*    out */
  232. );
  233.  
  234. N_EXTERN_LIBRARY( NWRCODE )
  235. NWCCGetConnInfo
  236. (
  237.    NWCONN_HANDLE  connHandle,                   /* in     */
  238.    nuint          infoType,                     /* in     */
  239.    nuint          len,                          /* in     */
  240.    nptr           buffer                        /*    out */
  241. ); 
  242.  
  243. N_EXTERN_LIBRARY( NWRCODE )
  244. NWCCGetConnRefInfo
  245. (
  246.    nuint32        connRef,                      /* in     */
  247.    nuint          infoType,                     /* in     */
  248.    nuint          len,                          /* in     */
  249.    nptr           buffer                        /*    out */
  250. ); 
  251.  
  252. N_EXTERN_LIBRARY( NWRCODE )
  253. NWCCGetAllConnInfo
  254. (
  255.    NWCONN_HANDLE  connHandle,                /* in     */
  256.    nuint          connInfoVersion,           /* in     */
  257.                                              /* always set to NWCC_INFO_VERSION */
  258.    pNWCCConnInfo  connInfoBuffer             /*    out */
  259. ); 
  260.  
  261. N_EXTERN_LIBRARY( NWRCODE )
  262. NWCCGetAllConnRefInfo
  263. (
  264.    nuint32        connRef,                   /* in     */
  265.    nuint          connInfoVersion,           /* in     */
  266.                                              /* always set to NWCC_INFO_VERSION */
  267.    pNWCCConnInfo  connInfoBuffer             /*    out */
  268. ); 
  269.  
  270. N_EXTERN_LIBRARY( NWRCODE )
  271. NWCCGetConnAddressLength
  272. (
  273.    NWCONN_HANDLE  connHandle,                /* in     */
  274.    pnuint32       addrLen                    /*    out */
  275. );
  276.  
  277. N_EXTERN_LIBRARY( NWRCODE )
  278. NWCCGetConnRefAddressLength
  279. (
  280.    nuint32           connRef,                /* in     */
  281.    pnuint32          addrLen                 /*    out */
  282. );
  283.  
  284.  
  285. N_EXTERN_LIBRARY( NWRCODE )
  286. NWCCGetConnAddress
  287. (
  288.    NWCONN_HANDLE  connHandle,                /* in     */
  289.    nuint32        bufferLen,                 /* in     */
  290.    pNWCCTranAddr  tranAddr                   /*    out */
  291. ); 
  292.  
  293. N_EXTERN_LIBRARY( NWRCODE )
  294. NWCCGetConnRefAddress
  295. (
  296.    nuint32        connRef,                   /* in     */
  297.    nuint32        bufferLen,                 /* in     */
  298.    pNWCCTranAddr  tranAddr                   /*    out */
  299. ); 
  300.  
  301. #ifdef __cplusplus
  302. }
  303. #endif
  304.  
  305. #include "npackoff.h"
  306. #endif /* NWCLXCON_INC */
  307.