OpenAFS
OpenAFS distributed network file system
/cygdrive/c/src/openafs/openafs.git/repo/src/WINNT/afsd/ms-wkssvc.idl
00001 /*
00002  * Copyright 2009 Microsoft
00003  *
00004  * Used with permission.
00005  */
00006 
00007 import "wtypes.idl";
00008 
00009 [
00010     uuid(6BFFD098-A112-3610-9833-46C3F87E345A),version(1.0),
00011     pointer_default(unique)
00012 ]
00013 
00014 interface wkssvc
00015 {
00016     typedef enum _NETSETUP_JOIN_STATUS {
00017         NetSetupUnknownStatus = 0,
00018         NetSetupUnjoined,
00019         NetSetupWorkgroupName,
00020         NetSetupDomainName
00021     } NETSETUP_JOIN_STATUS, *PNETSETUP_JOIN_STATUS;
00022 
00023     typedef enum  _NETSETUP_NAME_TYPE {
00024         NetSetupUnknown = 0,
00025         NetSetupMachine,
00026         NetSetupWorkgroup,
00027         NetSetupDomain,
00028         NetSetupNonExistentDomain,
00029         NetSetupDnsMachine
00030     } NETSETUP_NAME_TYPE, *PNETSETUP_NAME_TYPE;
00031 
00032     typedef enum _NET_COMPUTER_NAME_TYPE {
00033         NetPrimaryComputerName = 0,
00034         NetAlternateComputerNames,
00035         NetAllComputerNames,
00036         NetComputerNameTypeMax
00037     } NET_COMPUTER_NAME_TYPE, *PNET_COMPUTER_NAME_TYPE;
00038 
00039     typedef struct _STAT_WORKSTATION_0 {
00040         LARGE_INTEGER   StatisticsStartTime;
00041         LARGE_INTEGER   BytesReceived;
00042         LARGE_INTEGER   SmbsReceived;
00043         LARGE_INTEGER   PagingReadBytesRequested;
00044         LARGE_INTEGER   NonPagingReadBytesRequested;
00045         LARGE_INTEGER   CacheReadBytesRequested;
00046         LARGE_INTEGER   NetworkReadBytesRequested;
00047         LARGE_INTEGER   BytesTransmitted;
00048         LARGE_INTEGER   SmbsTransmitted;
00049         LARGE_INTEGER   PagingWriteBytesRequested;
00050         LARGE_INTEGER   NonPagingWriteBytesRequested;
00051         LARGE_INTEGER   CacheWriteBytesRequested;
00052         LARGE_INTEGER   NetworkWriteBytesRequested;
00053         unsigned long   InitiallyFailedOperations;
00054         unsigned long   FailedCompletionOperations;
00055         unsigned long   ReadOperations;
00056         unsigned long   RandomReadOperations;
00057         unsigned long   ReadSmbs;
00058         unsigned long   LargeReadSmbs;
00059         unsigned long   SmallReadSmbs;
00060         unsigned long   WriteOperations;
00061         unsigned long   RandomWriteOperations;
00062         unsigned long   WriteSmbs;
00063         unsigned long   LargeWriteSmbs;
00064         unsigned long   SmallWriteSmbs;
00065         unsigned long   RawReadsDenied;
00066         unsigned long   RawWritesDenied;
00067         unsigned long   NetworkErrors;
00068         unsigned long   Sessions;
00069         unsigned long   FailedSessions;
00070         unsigned long   Reconnects;
00071         unsigned long   CoreConnects;
00072         unsigned long   Lanman20Connects;
00073         unsigned long   Lanman21Connects;
00074         unsigned long   LanmanNtConnects;
00075         unsigned long   ServerDisconnects;
00076         unsigned long   HungSessions;
00077         unsigned long   UseCount;
00078         unsigned long   FailedUseCount;
00079         unsigned long   CurrentCommands;
00080     } STAT_WORKSTATION_0, *PSTAT_WORKSTATION_0, *LPSTAT_WORKSTATION_0;
00081 
00082     typedef struct _WKSTA_INFO_100 {
00083         unsigned long  wki100_platform_id;
00084         [string] wchar_t* wki100_computername;
00085         [string] wchar_t* wki100_langroup;
00086         unsigned long wki100_ver_major;
00087         unsigned long wki100_ver_minor;
00088     } WKSTA_INFO_100, *PWKSTA_INFO_100, *LPWKSTA_INFO_100;
00089 
00090     typedef struct _WKSTA_INFO_101 {
00091         unsigned long wki101_platform_id;
00092         [string] wchar_t* wki101_computername;
00093         [string] wchar_t* wki101_langroup;
00094         unsigned long wki101_ver_major;
00095         unsigned long wki101_ver_minor;
00096         [string] wchar_t* wki101_lanroot;
00097     } WKSTA_INFO_101, *PWKSTA_INFO_101, *LPWKSTA_INFO_101;
00098 
00099     typedef struct _WKSTA_INFO_102 {
00100         unsigned long  wki102_platform_id;
00101         [string] wchar_t* wki102_computername;
00102         [string] wchar_t* wki102_langroup;
00103         unsigned long wki102_ver_major;
00104         unsigned long wki102_ver_minor;
00105         [string] wchar_t* wki102_lanroot;
00106         unsigned long  wki102_logged_on_users;
00107     } WKSTA_INFO_102, *PWKSTA_INFO_102, *LPWKSTA_INFO_102;
00108 
00109     typedef struct _WKSTA_INFO_502{
00110         unsigned long   wki502_char_wait;
00111         unsigned long   wki502_collection_time;
00112         unsigned long   wki502_maximum_collection_count;
00113         unsigned long   wki502_keep_conn;
00114         unsigned long   wki502_max_cmds;
00115         unsigned long   wki502_sess_timeout;
00116         unsigned long   wki502_siz_char_buf;
00117         unsigned long   wki502_max_threads;
00118         unsigned long   wki502_lock_quota;
00119         unsigned long   wki502_lock_increment;
00120         unsigned long   wki502_lock_maximum;
00121         unsigned long   wki502_pipe_increment;
00122         unsigned long   wki502_pipe_maximum;
00123         unsigned long   wki502_cache_file_timeout;
00124         unsigned long   wki502_dormant_file_limit;
00125         unsigned long   wki502_read_ahead_throughput;
00126         unsigned long   wki502_num_mailslot_buffers;
00127         unsigned long   wki502_num_srv_announce_buffers;
00128         unsigned long   wki502_max_illegal_datagram_events;
00129         unsigned long   wki502_illegal_datagram_event_reset_frequency;
00130         int  wki502_log_election_packets;
00131         int  wki502_use_opportunistic_locking;
00132         int  wki502_use_unlock_behind;
00133         int  wki502_use_close_behind;
00134         int  wki502_buf_named_pipes;
00135         int  wki502_use_lock_read_unlock;
00136         int  wki502_utilize_nt_caching;
00137         int  wki502_use_raw_read;
00138         int  wki502_use_raw_write;
00139         int  wki502_use_write_raw_data;
00140         int  wki502_use_encryption;
00141         int  wki502_buf_files_deny_write;
00142         int  wki502_buf_read_only_files;
00143         int  wki502_force_core_create_mode;
00144         int  wki502_use_512_byte_max_transfer;
00145     } WKSTA_INFO_502, *PWKSTA_INFO_502, *LPWKSTA_INFO_502;
00146 
00147     typedef struct _WKSTA_INFO_1013 {
00148          unsigned long  wki1013_keep_conn;
00149     } WKSTA_INFO_1013, *PWKSTA_INFO_1013, *LPWKSTA_INFO_1013;
00150 
00151     typedef struct _WKSTA_INFO_1018 {
00152          unsigned long  wki1018_sess_timeout;
00153     } WKSTA_INFO_1018, *PWKSTA_INFO_1018, *LPWKSTA_INFO_1018;
00154 
00155     typedef struct _WKSTA_INFO_1046 {
00156         unsigned long  wki1046_dormant_file_limit;
00157     } WKSTA_INFO_1046, *PWKSTA_INFO_1046, *LPWKSTA_INFO_1046;
00158 
00159     typedef struct _WKSTA_USER_INFO_0 {
00160         [string] wchar_t* wkui0_username;
00161     } WKSTA_USER_INFO_0, *PWKSTA_USER_INFO_0, *LPWKSTA_USER_INFO_0;
00162 
00163     typedef struct _WKSTA_USER_INFO_1 {
00164         [string]  wchar_t* wkui1_username;
00165         [string] wchar_t* wkui1_logon_domain;
00166         [string] wchar_t* wkui1_oth_domains;
00167         [string] wchar_t* wkui1_logon_server;
00168     } WKSTA_USER_INFO_1, *PWKSTA_USER_INFO_1, *LPWKSTA_USER_INFO_1;
00169 
00170     typedef struct _WKSTA_TRANSPORT_INFO_0 {
00171         unsigned long wkti0_quality_of_service;
00172         unsigned long wkti0_number_of_vcs;
00173         [string] wchar_t* wkti0_transport_name;
00174         [string] wchar_t* wkti0_transport_address;
00175         unsigned long wkti0_wan_ish;
00176     } WKSTA_TRANSPORT_INFO_0, *PWKSTA_TRANSPORT_INFO_0,
00177      *LPWKSTA_TRANSPORT_INFO_0;
00178 
00179     typedef [handle] wchar_t* WKSSVC_IDENTIFY_HANDLE;
00180 
00181     typedef [handle] wchar_t* WKSSVC_IMPERSONATE_HANDLE;
00182 
00183     typedef [switch_type(unsigned long)] union _WKSTA_INFO {
00184         [case(100)]
00185             LPWKSTA_INFO_100 WkstaInfo100;
00186         [case(101)]
00187             LPWKSTA_INFO_101 WkstaInfo101;
00188         [case(102)]
00189             LPWKSTA_INFO_102 WkstaInfo102;
00190         [case(502)]
00191             LPWKSTA_INFO_502 WkstaInfo502;
00192         [case(1013)]
00193             LPWKSTA_INFO_1013 WkstaInfo1013;
00194         [case(1018)]
00195             LPWKSTA_INFO_1018 WkstaInfo1018;
00196         [case(1046)]
00197             LPWKSTA_INFO_1046 WkstaInfo1046;
00198         [default]
00199             ;
00200     } WKSTA_INFO, *PWKSTA_INFO, *LPWKSTA_INFO;
00201 
00202     unsigned long
00203     NetrWkstaGetInfo (
00204         [in,string,unique] WKSSVC_IDENTIFY_HANDLE ServerName,
00205         [in] unsigned long Level,
00206         [out, switch_is(Level)] LPWKSTA_INFO WkstaInfo
00207     );
00208 
00209     unsigned long
00210     NetrWkstaSetInfo (
00211         [in,string,unique] WKSSVC_IDENTIFY_HANDLE ServerName,
00212         [in] unsigned long  Level,
00213         [in, switch_is(Level)] LPWKSTA_INFO   WkstaInfo,
00214         [in,out,unique] unsigned long* ErrorParameter
00215     );
00216 
00217     typedef struct _WKSTA_USER_INFO_0_CONTAINER {
00218         unsigned long   EntriesRead;
00219         [size_is(EntriesRead)] LPWKSTA_USER_INFO_0 Buffer;
00220     } WKSTA_USER_INFO_0_CONTAINER, *PWKSTA_USER_INFO_0_CONTAINER,
00221       *LPWKSTA_USER_INFO_0_CONTAINER;
00222 
00223     typedef struct _WKSTA_USER_INFO_1_CONTAINER {
00224         unsigned long   EntriesRead;
00225         [size_is(EntriesRead)] LPWKSTA_USER_INFO_1 Buffer;
00226     } WKSTA_USER_INFO_1_CONTAINER, *PWKSTA_USER_INFO_1_CONTAINER,
00227       *LPWKSTA_USER_INFO_1_CONTAINER;
00228 
00229 
00230     typedef struct _WKSTA_USER_ENUM_STRUCT {
00231         unsigned long   Level;
00232         [switch_is(Level)] union _WKSTA_USER_ENUM_UNION {
00233             [case(0)]
00234                 LPWKSTA_USER_INFO_0_CONTAINER Level0;
00235             [case(1)]
00236                 LPWKSTA_USER_INFO_1_CONTAINER Level1;
00237             [default]
00238                 ;
00239         } WkstaUserInfo;
00240     } WKSTA_USER_ENUM_STRUCT,
00241       *PWKSTA_USER_ENUM_STRUCT,
00242       *LPWKSTA_USER_ENUM_STRUCT;
00243 
00244     unsigned long
00245     NetrWkstaUserEnum (
00246         [in,string,unique] WKSSVC_IDENTIFY_HANDLE ServerName,
00247         [in,out] LPWKSTA_USER_ENUM_STRUCT UserInfo,
00248         [in] unsigned long  PreferredMaximumLength,
00249         [out] unsigned long* TotalEntries,
00250         [in,out,unique] unsigned long* ResumeHandle
00251     );
00252 
00253     void Opnum3NotUsedOnWire(void);
00254 
00255     void Opnum4NotUsedOnWire(void);
00256 
00257     typedef struct _WKSTA_TRANSPORT_INFO_0_CONTAINER {
00258         unsigned long   EntriesRead;
00259         [size_is(EntriesRead)] LPWKSTA_TRANSPORT_INFO_0 Buffer;
00260     } WKSTA_TRANSPORT_INFO_0_CONTAINER,
00261       *PWKSTA_TRANSPORT_INFO_0_CONTAINER,
00262       *LPWKSTA_TRANSPORT_INFO_0_CONTAINER;
00263 
00264     typedef struct _WKSTA_TRANSPORT_ENUM_STRUCT {
00265         unsigned long   Level;
00266         [switch_is(Level)] union _WKSTA_TRANSPORT_ENUM_UNION {
00267             [case(0)]
00268                 LPWKSTA_TRANSPORT_INFO_0_CONTAINER Level0;
00269             [default]
00270                 ;
00271         } WkstaTransportInfo;
00272     } WKSTA_TRANSPORT_ENUM_STRUCT, *PWKSTA_TRANSPORT_ENUM_STRUCT,
00273       *LPWKSTA_TRANSPORT_ENUM_STRUCT;
00274 
00275     unsigned long
00276     NetrWkstaTransportEnum (
00277         [in,string,unique] WKSSVC_IDENTIFY_HANDLE ServerName,
00278         [in,out] LPWKSTA_TRANSPORT_ENUM_STRUCT TransportInfo,
00279         [in] unsigned long  PreferredMaximumLength,
00280         [out] unsigned long* TotalEntries,
00281         [in,out,unique] unsigned long* ResumeHandle
00282     );
00283 
00284     unsigned long
00285     NetrWkstaTransportAdd (
00286         [in,string,unique] WKSSVC_IDENTIFY_HANDLE ServerName,
00287         [in] unsigned long Level,
00288         [in] LPWKSTA_TRANSPORT_INFO_0 TransportInfo,
00289         [in,out,unique] unsigned long* ErrorParameter
00290     );
00291 
00292     unsigned long
00293     NetrWkstaTransportDel (
00294         [in,string,unique] WKSSVC_IDENTIFY_HANDLE ServerName,
00295         [in,string,unique] wchar_t* TransportName,
00296         [in] unsigned long ForceLevel
00297     );
00298 
00299     void Opnum8NotUsedOnWire(void);
00300 
00301     void Opnum9NotUsedOnWire(void);
00302 
00303     void Opnum10NotUsedOnWire(void);
00304 
00305     void Opnum11NotUsedOnWire(void);
00306 
00307     void Opnum12NotUsedOnWire(void);
00308 
00309     unsigned long
00310     NetrWorkstationStatisticsGet(
00311         [in,string,unique] WKSSVC_IDENTIFY_HANDLE ServerName,
00312         [in,string,unique] wchar_t* ServiceName,
00313         [in] unsigned long Level,
00314         [in] unsigned long Options,
00315         [out] LPSTAT_WORKSTATION_0* Buffer
00316     );
00317 
00318     void Opnum14NotUsedOnWire(void);
00319 
00320     void Opnum15NotUsedOnWire(void);
00321 
00322     void Opnum16NotUsedOnWire(void);
00323 
00324     void Opnum17NotUsedOnWire(void);
00325 
00326     void Opnum18NotUsedOnWire(void);
00327 
00328     void Opnum19NotUsedOnWire(void);
00329 
00330     unsigned long
00331     NetrGetJoinInformation(
00332         [in,string,unique] WKSSVC_IMPERSONATE_HANDLE ServerName,
00333         [in,out,string] wchar_t**    NameBuffer,
00334         [out] PNETSETUP_JOIN_STATUS BufferType
00335     );
00336 
00337     void Opnum21NotUsedOnWire(void);
00338 
00339 #define JOIN_OBFUSCATOR_LENGTH 8
00340 #define JOIN_MAX_PASSWORD_LENGTH 256
00341 
00342     typedef struct _JOINPR_USER_PASSWORD {
00343         unsigned char Obfuscator[JOIN_OBFUSCATOR_LENGTH];
00344         wchar_t Buffer[JOIN_MAX_PASSWORD_LENGTH];
00345         unsigned long Length;
00346     } JOINPR_USER_PASSWORD,
00347      *PJOINPR_USER_PASSWORD;
00348 
00349     typedef struct _JOINPR_ENCRYPTED_USER_PASSWORD {
00350         unsigned char Buffer[JOIN_OBFUSCATOR_LENGTH +
00351             (JOIN_MAX_PASSWORD_LENGTH * sizeof(wchar_t)) +
00352             sizeof(unsigned long)];
00353     } JOINPR_ENCRYPTED_USER_PASSWORD,
00354      *PJOINPR_ENCRYPTED_USER_PASSWORD;
00355 
00356     typedef struct _UNICODE_STRING {
00357         unsigned short Length;
00358         unsigned short MaximumLength;
00359         [size_is(MaximumLength / 2), length_is((Length) / 2)]
00360             unsigned short* Buffer;
00361     } UNICODE_STRING,
00362      *PUNICODE_STRING;
00363 
00364     unsigned long
00365     NetrJoinDomain2(
00366         [in] handle_t RpcBindingHandle,
00367         [in,string,unique] wchar_t* ServerName,
00368         [in,string] wchar_t* DomainName,
00369         [in,string,unique] wchar_t* MachineAccountOU,
00370         [in,string,unique] wchar_t* AccountName,
00371         [in,unique] PJOINPR_ENCRYPTED_USER_PASSWORD Password,
00372         [in] unsigned long Options
00373     );
00374 
00375     unsigned long
00376     NetrUnjoinDomain2(
00377         [in] handle_t RpcBindingHandle,
00378         [in,string,unique] wchar_t* ServerName,
00379         [in,string,unique] wchar_t* AccountName,
00380         [in,unique] PJOINPR_ENCRYPTED_USER_PASSWORD Password,
00381         [in] unsigned long Options
00382     );
00383 
00384     unsigned long
00385     NetrRenameMachineInDomain2(
00386         [in] handle_t RpcBindingHandle,
00387         [in,string,unique] wchar_t* ServerName,
00388         [in,string,unique] wchar_t* MachineName,
00389         [in,string,unique] wchar_t* AccountName,
00390         [in,unique] PJOINPR_ENCRYPTED_USER_PASSWORD Password,
00391         [in] unsigned long Options
00392     );
00393 
00394     unsigned long
00395     NetrValidateName2(
00396         [in] handle_t RpcBindingHandle,
00397         [in,string,unique] wchar_t* ServerName,
00398         [in,string] wchar_t* NameToValidate,
00399         [in,string,unique] wchar_t* AccountName,
00400         [in,unique] PJOINPR_ENCRYPTED_USER_PASSWORD Password,
00401         [in] NETSETUP_NAME_TYPE NameType
00402     );
00403 
00404     unsigned long
00405     NetrGetJoinableOUs2(
00406         [in] handle_t  RpcBindingHandle,
00407         [in,string,unique] wchar_t*  ServerName,
00408         [in,string] wchar_t*  DomainName,
00409         [in,string,unique] wchar_t*  AccountName,
00410         [in,unique] PJOINPR_ENCRYPTED_USER_PASSWORD Password,
00411         [in,out] unsigned long*  OUCount,
00412         [out,string,size_is(,*OUCount)] wchar_t*** OUs
00413     );
00414 
00415     unsigned long
00416     NetrAddAlternateComputerName(
00417         [in] handle_t  RpcBindingHandle,
00418         [in,string,unique] wchar_t*  ServerName,
00419         [in,string,unique] wchar_t*  AlternateName,
00420         [in,string,unique] wchar_t*  DomainAccount,
00421         [in,unique] PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword,
00422         [in] unsigned long  Reserved
00423     );
00424 
00425     unsigned long
00426     NetrRemoveAlternateComputerName(
00427         [in] handle_t  RpcBindingHandle,
00428         [in,string,unique] wchar_t*  ServerName,
00429         [in,string,unique] wchar_t*  AlternateName,
00430         [in,string,unique] wchar_t*  DomainAccount,
00431         [in,unique] PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword,
00432         [in] unsigned long  Reserved
00433     );
00434 
00435     unsigned long
00436     NetrSetPrimaryComputerName(
00437         [in] handle_t  RpcBindingHandle,
00438         [in,string,unique] wchar_t*  ServerName,
00439         [in,string,unique] wchar_t*  PrimaryName,
00440         [in,string,unique] wchar_t*  DomainAccount,
00441         [in,unique] PJOINPR_ENCRYPTED_USER_PASSWORD  EncryptedPassword,
00442         [in] unsigned long  Reserved
00443     );
00444 
00445     typedef struct _NET_COMPUTER_NAME_ARRAY {
00446         unsigned long EntryCount;
00447         [size_is(EntryCount)] PUNICODE_STRING ComputerNames;
00448     } NET_COMPUTER_NAME_ARRAY, *PNET_COMPUTER_NAME_ARRAY;
00449 
00450     unsigned long
00451     NetrEnumerateComputerNames(
00452         [in,string,unique] WKSSVC_IMPERSONATE_HANDLE ServerName,
00453         [in] NET_COMPUTER_NAME_TYPE  NameType,
00454         [in] unsigned long  Reserved,
00455         [out] PNET_COMPUTER_NAME_ARRAY  *ComputerNames
00456     );
00457 }
 All Data Structures Files Functions Variables