#include "ntdomain.h"
#include "rpc_dce.h"
#ifndef _RPC_MISC_H
#define _RPC_MISC_H
#define SMB_RPC_INTERFACE_VERSION 1
#define DOMAIN_USER_RID_ADMIN (0x000001F4L)
#define DOMAIN_USER_RID_GUEST (0x000001F5L)
#define DOMAIN_USER_RID_KRBTGT (0x000001F6L)
#define DOMAIN_GROUP_RID_ADMINS (0x00000200L)
#define DOMAIN_GROUP_RID_USERS (0x00000201L)
#define DOMAIN_GROUP_RID_GUESTS (0x00000202L)
#define DOMAIN_GROUP_RID_COMPUTERS (0x00000203L)
#define DOMAIN_GROUP_RID_CONTROLLERS (0x00000204L)
#define DOMAIN_GROUP_RID_CERT_ADMINS (0x00000205L)
#define DOMAIN_GROUP_RID_SCHEMA_ADMINS (0x00000206L)
#define DOMAIN_GROUP_RID_ENTERPRISE_ADMINS (0x00000207L)
#define BUILTIN_ALIAS_RID_ADMINS (0x00000220L)
#define BUILTIN_ALIAS_RID_USERS (0x00000221L)
#define BUILTIN_ALIAS_RID_GUESTS (0x00000222L)
#define BUILTIN_ALIAS_RID_POWER_USERS (0x00000223L)
#define BUILTIN_ALIAS_RID_ACCOUNT_OPS (0x00000224L)
#define BUILTIN_ALIAS_RID_SYSTEM_OPS (0x00000225L)
#define BUILTIN_ALIAS_RID_PRINT_OPS (0x00000226L)
#define BUILTIN_ALIAS_RID_BACKUP_OPS (0x00000227L)
#define BUILTIN_ALIAS_RID_REPLICATOR (0x00000228L)
#define BUILTIN_ALIAS_RID_RAS_SERVERS (0x00000229L)
#define BUILTIN_ALIAS_RID_PRE_2K_ACCESS (0x0000022aL)
#define BASE_RID (0x000003E8L)
#define RID_TYPE_MASK 1
#define RID_MULTIPLIER 2
#define USER_RID_TYPE 0
#define GROUP_RID_TYPE 1
typedef struct enum_hnd_info
{
uint32 ptr_hnd;
uint32 handle;
} ENUM_HND;
typedef struct lookup_level_info
{
uint16 value;
} LOOKUP_LEVEL;
typedef struct sid_info_2
{
uint32 num_auths;
DOM_SID sid;
} DOM_SID2;
typedef struct header_info
{
uint16 str_str_len;
uint16 str_max_len;
uint32 buffer;
} STRHDR;
typedef struct unihdr_info
{
uint16 uni_str_len;
uint16 uni_max_len;
uint32 buffer;
} UNIHDR;
typedef struct unihdr2_info
{
UNIHDR unihdr;
uint32 buffer;
} UNIHDR2;
#define MAX_UNISTRLEN 256
#define MAX_STRINGLEN 256
#define MAX_BUFFERLEN 512
typedef struct unistr_info
{
uint16 *buffer;
} UNISTR;
typedef struct bufhdr_info
{
uint32 buf_max_len;
uint32 buf_len;
} BUFHDR;
typedef struct buffer2_info
{
uint32 buf_max_len;
uint32 offset;
uint32 buf_len;
uint16 *buffer;
} BUFFER2;
typedef struct buffer3_info
{
uint32 buf_max_len;
uint8 *buffer;
uint32 buf_len;
} BUFFER3;
typedef struct buffer5_info
{
uint32 buf_len;
uint16 *buffer;
} BUFFER5;
typedef struct unistr2_info
{
uint32 uni_max_len;
uint32 offset;
uint32 uni_str_len;
uint16 *buffer;
} UNISTR2;
typedef struct string2_info
{
uint32 str_max_len;
uint32 offset;
uint32 str_str_len;
uint8 *buffer;
} STRING2;
typedef struct unistr3_info
{
uint32 uni_str_len;
UNISTR str;
} UNISTR3;
typedef struct
{
uint16 length;
uint16 size;
uint32 ref_id;
UNISTR2 string;
} UNISTR2_ARRAY_EL;
typedef struct
{
uint32 ref_id;
uint32 count;
UNISTR2_ARRAY_EL *strings;
} UNISTR2_ARRAY;
typedef struct
{
uint32 ref_id;
DOM_SID2 sid;
} SID_ARRAY_EL;
typedef struct
{
uint32 ref_id;
uint32 count;
SID_ARRAY_EL *sids;
} SID_ARRAY;
typedef struct domrid2_info
{
uint8 type;
uint32 rid;
uint32 rid_idx;
} DOM_RID2;
typedef struct domrid3_info
{
uint32 rid;
uint32 type1;
uint32 ptr_type;
uint32 type2;
uint32 unk;
} DOM_RID3;
typedef struct domrid4_info
{
uint32 unknown;
uint16 attr;
uint32 rid;
} DOM_RID4;
typedef struct clnt_srv_info
{
uint32 undoc_buffer;
UNISTR2 uni_logon_srv;
uint32 undoc_buffer2;
UNISTR2 uni_comp_name;
} DOM_CLNT_SRV;
typedef struct log_info
{
uint32 undoc_buffer;
UNISTR2 uni_logon_srv;
UNISTR2 uni_acct_name;
uint16 sec_chan;
UNISTR2 uni_comp_name;
} DOM_LOG_INFO;
typedef struct chal_info
{
uchar data[8];
} DOM_CHAL;
typedef struct cred_info
{
DOM_CHAL challenge;
UTIME timestamp;
} DOM_CRED;
typedef struct clnt_info
{
DOM_LOG_INFO login;
DOM_CRED cred;
} DOM_CLNT_INFO;
typedef struct clnt_info2
{
DOM_CLNT_SRV login;
uint32 ptr_cred;
DOM_CRED cred;
} DOM_CLNT_INFO2;
typedef struct logon_info
{
uint32 low;
uint32 high;
} DOM_LOGON_ID;
typedef struct owf_info
{
uint8 data[16];
} OWF_INFO;
typedef struct gid_info
{
uint32 g_rid;
uint32 attr;
} DOM_GID;
typedef struct lsa_policy_info
{
uint32 data1;
uint32 data2;
uint16 data3;
uint16 data4;
uint8 data5[8];
#ifdef __INSURE__
char *marker;
#endif
} POLICY_HND;
typedef struct _cli_auth_fns cli_auth_fns;
struct user_creds;
struct cli_connection {
char *srv_name;
char *pipe_name;
struct user_creds usr_creds;
struct cli_state *pCli_state;
cli_auth_fns *auth;
void *auth_info;
void *auth_creds;
};
typedef struct rpc_hnd_node {
POLICY_HND hnd;
struct cli_connection *cli;
} RPC_HND_NODE;
typedef struct uint64_s
{
uint32 low;
uint32 high;
} UINT64_S;
typedef struct bufhdr2_info
{
uint32 info_level;
uint32 length;
uint32 buffer;
}
BUFHDR2;
typedef struct buffer4_info
{
uint32 buf_len;
uint8 buffer[MAX_BUFFERLEN];
}
BUFFER4;
enum unistr2_term_codes { UNI_FLAGS_NONE = 0, UNI_STR_TERMINATE = 1, UNI_MAXLEN_TERMINATE = 2, UNI_BROKEN_NON_NULL = 3 };
#endif