2 Unix SMB/Netbios implementation.
4 SMB parameters and setup
5 Copyright (C) Andrew Tridgell 1992-1997
6 Copyright (C) Luke Kenneth Casson Leighton 1996-1997
7 Copyright (C) Paul Ashton 1997
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #ifndef _NT_DOMAIN_H /* _NT_DOMAIN_H */
31 /* miscellaneous structures / defines */
34 /* security descriptor structures */
35 #include "rpc_secdes.h"
37 /* different dce/rpc pipes */
39 #include "rpc_netlogon.h"
42 #include "rpc_srvsvc.h"
43 #include "rpc_svcctl.h"
44 #include "rpc_wkssvc.h"
45 #include "rpc_atsvc.h"
46 #include "rpc_spoolss.h"
47 #include "rpc_eventlog.h"
50 * A bunch of stuff that was put into smb.h
51 * in the NTDOM branch - it didn't belong there.
56 struct mem_buf *data; /* memory buffer */
57 uint32 offset; /* offset currently being accessed in memory buffer */
58 uint8 align; /* data alignment */
59 BOOL io; /* parsing in or out of data stream */
60 BOOL error; /* error occurred */
64 typedef struct pipes_struct
66 struct pipes_struct *next, *prev;
68 connection_struct *conn;
70 BOOL open; /* open connection */
74 fstring pipe_srv_name;
76 prs_struct rhdr; /* output header */
77 prs_struct rdata; /* output data */
78 prs_struct rdata_i; /* output data (intermediate, for fragments) */
79 prs_struct rauth; /* output authentication verifier */
80 prs_struct rverf; /* output verifier */
81 prs_struct rntlm; /* output ntlmssp */
87 RPC_HDR_RESP hdr_resp;
88 RPC_HDR_AUTH auth_info;
89 RPC_HDR_AUTHA autha_info;
91 RPC_AUTH_NTLMSSP_VERIFIER auth_verifier;
92 RPC_AUTH_NTLMSSP_NEG ntlmssp_neg;
93 RPC_AUTH_NTLMSSP_CHAL ntlmssp_chal;
94 RPC_AUTH_NTLMSSP_RESP ntlmssp_resp;
95 RPC_AUTH_NTLMSSP_CHK ntlmssp_chk;
98 BOOL ntlmssp_validated;
99 unsigned char ntlmssp_hash[258];
100 uint32 ntlmssp_seq_num;
106 uint32 prev_pdu_file_offset;
115 void (*fn) (pipes_struct*, prs_struct*, prs_struct*);
120 /* array memory offsets */
127 BOOL dynamic; /* True iff data has been dynamically allocated
128 (and therefore can be freed) */
133 uint32 margin; /* safety margin when reallocing. */
134 /* this can be abused quite nicely */
135 uint8 align; /* alignment of data structures (smb, dce/rpc, udp etc) */
137 struct mem_desc offset;
139 struct mem_buf *next;
144 fstring acct_name; /* account name */
145 fstring acct_desc; /* account description */
146 uint32 rid; /* domain-relative RID */
150 * higher order functions for use with msrpc client code
153 #define ALIAS_FN(fn) void (*fn)(char*, DOM_SID*, uint32, char*)
154 #define ALIAS_INFO_FN(fn) void (*fn)(char*, DOM_SID*, uint32, ALIAS_INFO_CTR *)
155 #define ALIAS_MEM_FN(fn) void(*fn)(char*, DOM_SID*, uint32, char*, uint32, DOM_SID**, char**, uint8*)
157 #define GROUP_FN(fn) void (*fn)(char*, DOM_SID*, uint32, char*)
158 #define GROUP_INFO_FN(fn) void (*fn)(char*, DOM_SID*, uint32, GROUP_INFO_CTR *)
159 #define GROUP_MEM_FN(fn) void(*fn)(char*, DOM_SID*, uint32, char*, uint32, uint32*, char**, uint32*)
161 #define USER_FN(fn) void (*fn)(char*, DOM_SID*, uint32, char*)
162 #define USER_INFO_FN(fn) void (*fn)(char*, DOM_SID*, uint32, SAM_USER_INFO_21 *)
163 #define USER_MEM_FN(fn) void (*fn)(char*, DOM_SID*, uint32, char*, uint32, uint32*, char**, uint32*)
165 #define REG_FN(fn) void (*fn)(int, const char *, int)
166 #define REG_KEY_FN(fn) void (*fn)(const char*, const char*, time_t)
167 #define REG_VAL_FN(fn) void (*fn)(const char *, const char*, uint32, BUFFER2 *)
169 #define SVC_QUERY_FN(fn) void (*fn)(QUERY_SERVICE_CONFIG *)
170 #define SVC_INFO_FN(fn) void (*fn)(ENUM_SRVC_STATUS *)
172 #define TPRT_INFO_FN(fn) void (*fn)(SRV_TPRT_INFO_CTR *)
174 #endif /* _NT_DOMAIN_H */