2003-11-21 13:14:17 +00:00
#include "idl_types.h"
2003-11-17 12:43:18 +00:00
/*
wkssvc interface definitions
*/
2004-10-27 04:48:41 +00:00
[ uuid("6bffd098-a112-3610-9833-46c3f87e345a"),
2003-11-17 12:43:18 +00:00
version(1.0),
2004-08-16 19:03:22 +00:00
pointer_default(unique),
r6973: Merge new version of pidl into the main SAMBA_4_0 branch.
The main difference in this new version is the extra data structure generated
between the IDL data structure and the NDR parser:
IDL -> NDR -> { ndr_parser, ndr_header, eparser, etc }
This makes the ndr_parser.pm internals much more sane.
Other changes include:
- Remove unnecessary calls with NDR_BUFFERS (for example, GUID doesn't have any buffers, just scalars) as well as some (unnecessary) nested setting of flags.
- Parse array loops in the C code rather then calling ndr_pull_array(). This allows us to have, for example, arrays of pointers or arrays of pointers to arrays, etc..
- Use if() {} rather then if () goto foo; everywhere
- NDR_IN no longer implies LIBNDR_FLAG_REF_ALLOC
- By default, top level pointers are now "ref" (as is the default in
most other IDL compilers). This can be overridden using the
default_pointer_top() property.
- initial work on new ethereal parser generators by Alan DeKok and me
- pidl now writes errors in the standard format used by compilers, which
is parsable by most editors
- ability to warn about the fact that pidl extension(s) have been used,
useful for making sure IDL files work with other IDL compilers.
oh, and there's probably some other things I can't think of right now..
(This used to be commit 13cf227615f6b9e0e5fa62e59197024410254f01)
2005-05-25 13:50:27 +00:00
pointer_default_top(unique),
2005-01-06 07:34:14 +00:00
helpstring("Workstation Service"),
depends(srvsvc)
2003-11-17 12:43:18 +00:00
] interface wkssvc
{
2006-03-22 12:15:11 +00:00
declare [v1_enum] enum srvsvc_PlatformId;
2003-11-18 11:52:06 +00:00
#define BOOL uint32
2003-11-17 12:43:18 +00:00
/******************/
/* Function: 0x00 */
2003-11-18 11:52:06 +00:00
2003-11-17 12:43:18 +00:00
typedef struct {
2005-01-06 07:34:14 +00:00
srvsvc_PlatformId platform_id;
2005-10-16 18:54:31 +00:00
[string,charset(UTF16)] uint16 *server_name;
[string,charset(UTF16)] uint16 *domain_name;
2004-12-31 03:32:36 +00:00
uint32 version_major;
uint32 version_minor;
2003-12-20 21:50:51 +00:00
} wkssvc_NetWkstaInfo100;
2003-11-17 12:43:18 +00:00
2003-11-18 01:18:24 +00:00
typedef struct {
2005-01-06 07:34:14 +00:00
srvsvc_PlatformId platform_id;
2005-10-16 18:54:31 +00:00
[string,charset(UTF16)] uint16 *server_name;
[string,charset(UTF16)] uint16 *domain_name;
2004-12-31 03:32:36 +00:00
uint32 version_major;
uint32 version_minor;
2005-10-16 18:54:31 +00:00
[string,charset(UTF16)] uint16 *lan_root;
2003-12-20 21:50:51 +00:00
} wkssvc_NetWkstaInfo101;
2003-11-18 01:18:24 +00:00
typedef struct {
2005-01-06 07:34:14 +00:00
srvsvc_PlatformId platform_id;
2005-10-16 18:54:31 +00:00
[string,charset(UTF16)] uint16 *server_name;
[string,charset(UTF16)] uint16 *domain_name;
2004-12-31 03:32:36 +00:00
uint32 version_major;
uint32 version_minor;
2005-10-16 18:54:31 +00:00
[string,charset(UTF16)] uint16 *lan_root;
2003-11-18 03:28:01 +00:00
uint32 logged_on_users;
2003-12-20 21:50:51 +00:00
} wkssvc_NetWkstaInfo102;
2003-11-18 01:18:24 +00:00
2003-11-18 11:52:06 +00:00
typedef struct {
uint32 char_wait;
uint32 collection_time;
uint32 maximum_collection_count;
uint32 keep_connection;
uint32 max_commands;
uint32 session_timeout;
uint32 size_char_buf;
uint32 max_threads;
uint32 lock_quota;
uint32 lock_increment;
uint32 lock_maximum;
uint32 pipe_increment;
uint32 pipe_maximum;
uint32 cache_file_timeout;
uint32 dormant_file_limit;
uint32 read_ahead_throughput;
uint32 num_mailslot_buffers;
uint32 num_srv_announce_buffers;
uint32 max_illegal_dgram_events;
uint32 dgram_event_reset_freq;
BOOL log_election_packets;
BOOL use_opportunistic_locking;
BOOL use_unlock_behind;
BOOL use_close_behind;
BOOL buf_named_pipes;
BOOL use_lock_read_unlock;
BOOL utilize_nt_caching;
BOOL use_raw_read;
BOOL use_raw_write;
BOOL use_write_raw_data;
BOOL use_encryption;
BOOL buf_files_deny_write;
BOOL buf_read_only_files;
BOOL force_core_create_mode;
BOOL use_512_byte_max_transfer;
2003-12-20 21:50:51 +00:00
} wkssvc_NetWkstaInfo502;
2003-11-18 11:52:06 +00:00
2005-12-06 03:53:51 +00:00
typedef struct {
uint32 char_wait;
} wkssvc_NetWkstaInfo1010;
typedef struct {
uint32 collection_time;
} wkssvc_NetWkstaInfo1011;
typedef struct {
uint32 maximum_collection_count;
} wkssvc_NetWkstaInfo1012;
typedef struct {
uint32 keep_connection;
} wkssvc_NetWkstaInfo1013;
typedef struct {
uint32 session_timeout;
} wkssvc_NetWkstaInfo1018;
typedef struct {
uint32 size_char_buf;
} wkssvc_NetWkstaInfo1023;
typedef struct {
uint32 errorlog_sz;
} wkssvc_NetWkstaInfo1027;
typedef struct {
uint32 max_threads;
} wkssvc_NetWkstaInfo1033;
2003-11-17 12:43:18 +00:00
typedef union {
2003-12-20 21:50:51 +00:00
[case(100)] wkssvc_NetWkstaInfo100 *info100;
[case(101)] wkssvc_NetWkstaInfo101 *info101;
[case(102)] wkssvc_NetWkstaInfo102 *info102;
[case(502)] wkssvc_NetWkstaInfo502 *info502;
2005-12-06 03:53:51 +00:00
[case(1010)] wkssvc_NetWkstaInfo1010 *info1010;
[case(1011)] wkssvc_NetWkstaInfo1011 *info1011;
[case(1012)] wkssvc_NetWkstaInfo1012 *info1012;
[case(1013)] wkssvc_NetWkstaInfo1013 *info1013;
[case(1018)] wkssvc_NetWkstaInfo1018 *info1018;
[case(1023)] wkssvc_NetWkstaInfo1023 *info1023;
[case(1027)] wkssvc_NetWkstaInfo1027 *info1027;
[case(1033)] wkssvc_NetWkstaInfo1033 *info1033;
2004-04-09 07:29:34 +00:00
[default] ;
2003-12-20 21:50:51 +00:00
} wkssvc_NetWkstaInfo;
2003-11-17 12:43:18 +00:00
2003-12-20 21:50:51 +00:00
WERROR wkssvc_NetWkstaGetInfo(
2005-10-16 18:54:31 +00:00
[in] [string,charset(UTF16)] uint16 *server_name,
2003-11-17 12:43:18 +00:00
[in] uint32 level,
2005-12-06 03:53:51 +00:00
[out,switch_is(level),ref] wkssvc_NetWkstaInfo *info
2003-11-17 12:43:18 +00:00
);
2003-11-18 03:28:01 +00:00
/******************/
/* Function: 0x01 */
2003-12-20 21:50:51 +00:00
WERROR wkssvc_NetWkstaSetInfo(
2005-10-16 18:54:31 +00:00
[in] [string,charset(UTF16)] uint16 *server_name,
2003-12-20 21:50:51 +00:00
[in] uint32 level,
2005-12-06 03:53:51 +00:00
[in,switch_is(level),ref] wkssvc_NetWkstaInfo *info,
[in,out,ref] uint32 *parm_error
2003-12-20 21:50:51 +00:00
);
2003-11-18 03:28:01 +00:00
2005-12-06 03:53:51 +00:00
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x02 */
2005-12-06 03:53:51 +00:00
typedef struct {
[string,charset(UTF16)] uint16 *user;
} USER_INFO_0;
typedef struct {
uint32 entries_read;
[size_is(entries_read)] USER_INFO_0 *user0;
} USER_INFO_0_CONTAINER;
typedef struct {
[string,charset(UTF16)] uint16 *user_name;
[string,charset(UTF16)] uint16 *logon_domain;
[string,charset(UTF16)] uint16 *other_domains;
[string,charset(UTF16)] uint16 *logon_server;
} USER_INFO_1;
typedef struct {
uint32 entries_read;
[size_is(entries_read)] USER_INFO_1 *user1;
} USER_INFO_1_CONTAINER;
typedef [switch_type(uint32)] union {
[case(0)] USER_INFO_0_CONTAINER *user0;
[case(1)] USER_INFO_1_CONTAINER *user1;
} WKS_USER_ENUM_UNION;
WERROR wkssvc_NetWkstaEnumUsers(
[in] [string,charset(UTF16)] uint16 *server_name,
[in] uint32 level,
[in] [out] [ref] WKS_USER_ENUM_UNION *users,
[in] uint32 prefmaxlen,
[out] uint32 *entriesread,
[out] uint32 *totalentries,
[in] [out] [ref] uint32 *resumehandle
);
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x03 */
2003-11-18 08:03:06 +00:00
WERROR WKSSVC_NETRWKSTAUSERGETINFO ();
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x04 */
2003-11-18 08:03:06 +00:00
WERROR WKSSVC_NETRWKSTAUSERSETINFO ();
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x05 */
typedef struct {
uint32 quality_of_service;
uint32 vc_count;
2005-10-16 18:54:31 +00:00
[string,charset(UTF16)] uint16 *name;
[string,charset(UTF16)] uint16 *address;
2003-11-18 03:28:01 +00:00
uint32 wan_link;
2003-12-20 21:50:51 +00:00
} wkssvc_NetWkstaTransportInfo0;
2003-11-18 03:28:01 +00:00
typedef struct {
uint32 count;
2005-05-27 15:49:15 +00:00
[size_is(count)] wkssvc_NetWkstaTransportInfo0 *array;
2003-12-20 21:50:51 +00:00
} wkssvc_NetWkstaTransportCtr0;
2003-11-18 03:28:01 +00:00
typedef union {
2003-12-20 21:50:51 +00:00
[case(0)] wkssvc_NetWkstaTransportCtr0 *ctr0;
2003-11-20 00:57:59 +00:00
[default] ;
2003-12-20 21:50:51 +00:00
} wkssvc_NetWkstaTransportCtr;
2003-11-18 03:28:01 +00:00
2003-12-20 21:50:51 +00:00
WERROR wkssvc_NetWkstaTransportEnum (
2005-10-16 18:54:31 +00:00
[in] [string,charset(UTF16)] uint16 *server_name,
2003-11-19 23:18:35 +00:00
[in,out] uint32 level,
2005-12-06 03:53:51 +00:00
[in,out,switch_is(level),ref] wkssvc_NetWkstaTransportCtr *ctr,
2003-11-18 03:28:01 +00:00
[in] uint32 max_buffer,
2003-11-19 19:44:17 +00:00
[out] uint32 totalentries,
2003-11-18 03:28:01 +00:00
[in,out] uint32 *resume_handle
);
/*****************************/
/* Function 0x06 */
2003-11-18 08:03:06 +00:00
WERROR WKSSVC_NETRWKSTATRANSPORTADD ();
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x07 */
2003-11-18 08:03:06 +00:00
WERROR WKSSVC_NETRWKSTATRANSPORTDEL ();
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x08 */
2003-11-18 08:03:06 +00:00
WERROR WKSSVC_NETRUSEADD ();
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x09 */
2003-11-18 08:03:06 +00:00
WERROR WKSSVC_NETRUSEGETINFO ();
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x0a */
2003-11-18 08:03:06 +00:00
WERROR WKSSVC_NETRUSEDEL ();
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x0b */
2003-11-18 08:03:06 +00:00
WERROR WKSSVC_NETRUSEENUM ();
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x0c */
2003-11-18 08:03:06 +00:00
WERROR WKSSVC_NETRMESSAGEBUFFERSEND ();
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x0d */
2003-11-18 08:03:06 +00:00
WERROR WKSSVC_NETRWORKSTATIONSTATISTICSGET ();
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x0e */
2003-11-18 08:03:06 +00:00
WERROR WKSSVC_NETRLOGONDOMAINNAMEADD ();
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x0f */
2003-11-18 08:03:06 +00:00
WERROR WKSSVC_NETRLOGONDOMAINNAMEDEL ();
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x10 */
2003-11-18 08:03:06 +00:00
WERROR WKSSVC_NETRJOINDOMAIN ();
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x11 */
2003-11-18 08:03:06 +00:00
WERROR WKSSVC_NETRUNJOINDOMAIN ();
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x12 */
2003-11-18 08:03:06 +00:00
WERROR WKSSVC_NETRRENAMEMACHINEINDOMAIN ();
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x13 */
2003-11-18 08:03:06 +00:00
WERROR WKSSVC_NETRVALIDATENAME ();
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x14 */
2003-11-18 08:03:06 +00:00
WERROR WKSSVC_NETRGETJOININFORMATION ();
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x15 */
2003-11-18 08:03:06 +00:00
WERROR WKSSVC_NETRGETJOINABLEOUS ();
2003-11-18 03:28:01 +00:00
2005-12-06 03:53:51 +00:00
typedef struct {
uint8 blob[524];
} wkssvc_PasswordBuffer;
typedef [bitmap32bit] bitmap {
/* TRUE: defer setting the SPN and dNSHostName until a rename operation */
WKSSVC_JOIN_FLAGS_DEFER_SPN = 0x00000100,
/* TRUE: set the machine password to the provided one after the join completes */
WKSSVC_JOIN_FLAGS_MACHINE_PWD_PASSED = 0x00000080,
/* TRUE: perform an unsecured join */
WKSSVC_JOIN_FLAGS_JOIN_UNSECURE = 0x00000040,
/* TRUE: allow the join to complete even if the account already exists */
WKSSVC_JOIN_FLAGS_DOMAIN_JOIN_IF_JOINED = 0x00000020,
/* TRUE: this join is part of a w9x upgrade */
WKSSVC_JOIN_FLAGS_WIN9X_UPGRADE = 0x00000010,
/* TRUE: delete the account when the domain is left */
WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE = 0x00000004,
/* TRUE: create the account in the domain */
WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE = 0x00000002,
/* TRUE: join domain FALSE: join workgroup */
WKSSVC_JOIN_FLAGS_JOIN_TYPE = 0x00000001
} wkssvc_joinflags;
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x16 */
2005-12-06 03:53:51 +00:00
WERROR wkssvc_NetrJoinDomain2 (
[in] [string,charset(UTF16)] uint16 *server_name,
[in] [string,charset(UTF16),ref] uint16 *domain_name,
[in] [string,charset(UTF16)] uint16 *account_name,
[in] [string,charset(UTF16)] uint16 *admin_account,
[in] wkssvc_PasswordBuffer *type_30,
[in] wkssvc_joinflags join_flags
);
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x17 */
2005-12-06 03:53:51 +00:00
WERROR wkssvc_NetrUnjoinDomain2 (
[in] [unique] [string,charset(UTF16)] uint16 *server_name,
[in] [unique] [string,charset(UTF16)] uint16 *account,
[in] [unique] wkssvc_PasswordBuffer *Encrypted_password,
[in] wkssvc_joinflags unjoin_flags
);
typedef [bitmap32bit] bitmap {
/* TRUE: create the account in the domain */
WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE = 0x00000002
} wkssvc_renameflags;
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x18 */
2005-12-06 03:53:51 +00:00
WERROR wkssvc_NetrRenameMachineInDomain2(
[in] [unique] [string,charset(UTF16)] uint16 *server_name,
[in] [unique] [string,charset(UTF16)] uint16 *NewMachineName,
[in] [unique] [string,charset(UTF16)] uint16 *Account,
[in] [unique] wkssvc_PasswordBuffer *EncryptedPassword,
[in] wkssvc_renameflags RenameOptions
);
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x19 */
2003-11-18 08:03:06 +00:00
WERROR WKSSVC_NETRVALIDATENAME2 ();
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x1a */
2003-11-18 08:03:06 +00:00
WERROR WKSSVC_NETRGETJOINABLEOUS2 ();
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x1b */
2005-12-06 03:53:51 +00:00
WERROR wkssvc_NetrAddAlternateComputerName(
[in] [unique] [string,charset(UTF16)] uint16 *server_name,
[in] [unique] [string,charset(UTF16)] uint16 *NewAlternateMachineName,
[in] [unique] [string,charset(UTF16)] uint16 *Account,
[in] [unique] wkssvc_PasswordBuffer *EncryptedPassword,
[in] uint32 Reserved
);
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x1c */
2005-12-06 03:53:51 +00:00
WERROR wkssvc_NetrRemoveAlternateComputerName(
[in] [unique] [string,charset(UTF16)] uint16 *server_name,
[in] [unique] [string,charset(UTF16)] uint16 *AlternateMachineNameToRemove,
[in] [unique] [string,charset(UTF16)] uint16 *Account,
[in] [unique] wkssvc_PasswordBuffer *EncryptedPassword,
[in] uint32 Reserved
);
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x1d */
2003-11-18 08:03:06 +00:00
WERROR WKSSVC_NETRSETPRIMARYCOMPUTERNAME ();
2003-11-18 03:28:01 +00:00
/*****************************/
/* Function 0x1e */
2003-11-18 08:03:06 +00:00
WERROR WKSSVC_NETRENUMERATECOMPUTERNAMES ();
2003-11-17 12:43:18 +00:00
}