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"
46 #include "rpc_atsvc.h"
47 #include "rpc_spoolss.h"
48 #include "rpc_eventlog.h"
51 * A bunch of stuff that was put into smb.h
52 * in the NTDOM branch - it didn't belong there.
57 struct mem_buf *data; /* memory buffer */
58 uint32 offset; /* offset currently being accessed in memory buffer */
59 uint8 align; /* data alignment */
60 BOOL io; /* parsing in or out of data stream */
61 BOOL error; /* error occurred */
65 typedef struct pipes_struct
67 struct pipes_struct *next, *prev;
69 connection_struct *conn;
71 BOOL open; /* open connection */
75 fstring pipe_srv_name;
77 prs_struct rhdr; /* output header */
78 prs_struct rfault; /* fault */
79 prs_struct rdata; /* output data */
80 prs_struct rdata_i; /* output data (intermediate, for fragments) */
81 prs_struct rauth; /* output authentication verifier */
82 prs_struct rverf; /* output verifier */
83 prs_struct rntlm; /* output ntlmssp */
89 RPC_HDR_RESP hdr_resp;
90 RPC_HDR_FAULT hdr_fault;
91 RPC_HDR_AUTH auth_info;
92 RPC_HDR_AUTHA autha_info;
94 RPC_AUTH_NTLMSSP_VERIFIER auth_verifier;
95 RPC_AUTH_NTLMSSP_NEG ntlmssp_neg;
96 RPC_AUTH_NTLMSSP_CHAL ntlmssp_chal;
97 RPC_AUTH_NTLMSSP_RESP ntlmssp_resp;
98 RPC_AUTH_NTLMSSP_CHK ntlmssp_chk;
101 BOOL ntlmssp_validated;
102 unsigned char ntlmssp_hash[258];
103 uint32 ntlmssp_seq_num;
109 uint32 prev_pdu_file_offset;
118 void (*fn) (pipes_struct*, prs_struct*, prs_struct*);
123 /* array memory offsets */
130 BOOL dynamic; /* True iff data has been dynamically allocated
131 (and therefore can be freed) */
136 uint32 margin; /* safety margin when reallocing. */
137 /* this can be abused quite nicely */
138 uint8 align; /* alignment of data structures (smb, dce/rpc, udp etc) */
140 struct mem_desc offset;
142 struct mem_buf *next;
147 fstring acct_name; /* account name */
148 fstring acct_desc; /* account description */
149 uint32 rid; /* domain-relative RID */
153 * higher order functions for use with msrpc client code
156 #define ALIAS_FN(fn)\
157 void (*fn)(const char*, const DOM_SID*, uint32, const char*)
158 #define ALIAS_INFO_FN(fn)\
159 void (*fn)(const char*, const DOM_SID*, uint32, ALIAS_INFO_CTR *const)
160 #define ALIAS_MEM_FN(fn)\
161 void(*fn)(const char*, const DOM_SID*, uint32, const char*,\
162 uint32, DOM_SID *const *const, char *const *const,\
165 #define GROUP_FN(fn)\
166 void (*fn)(const char*, const DOM_SID*, uint32, const char*)
167 #define GROUP_INFO_FN(fn)\
168 void (*fn)(const char*, const DOM_SID*, uint32, GROUP_INFO_CTR *const)
169 #define GROUP_MEM_FN(fn)\
170 void(*fn)(const char*, const DOM_SID*, uint32, const char*,\
171 uint32, const uint32*, char *const *const,\
174 #define DOMAIN_FN(fn)\
175 void (*fn)(const char*)
176 #define DOMAIN_INFO_FN(fn)\
177 void (*fn)(const char*, const DOM_SID *, uint32, SAM_UNK_CTR *)
180 void (*fn)(const char*, const DOM_SID*, uint32, const char*)
181 #define USER_INFO_FN(fn)\
182 void (*fn)(const char*, const DOM_SID*, uint32,\
183 SAM_USER_INFO_21 *const)
184 #define USER_MEM_FN(fn)\
185 void (*fn)(const char*, const DOM_SID*, uint32, const char*,\
186 uint32, const uint32*, char *const *const, uint32* const)
189 void (*fn)(const char*, const DOM_SID*, uint16, uint32, \
193 void (*fn)(int, const char *, int)
194 #define REG_KEY_FN(fn)\
195 void (*fn)(const char*, const char*, time_t)
196 #define REG_VAL_FN(fn)\
197 void (*fn)(const char *, const char*, uint32, const BUFFER2 *)
199 #define SVC_QUERY_FN(fn)\
200 void (*fn)(const QUERY_SERVICE_CONFIG *)
201 #define SVC_INFO_FN(fn)\
202 void (*fn)(const ENUM_SRVC_STATUS *)
204 #define TPRT_INFO_FN(fn)\
205 void (*fn)(const SRV_TPRT_INFO_CTR *)
207 #define PRINT_INFO_FN(fn)\
208 void (*fn)(const char*, uint32, uint32, void *const *const)
209 #define JOB_INFO_FN(fn)\
210 void (*fn)(const char*, const char*, uint32, uint32, void *const *const)
212 #endif /* _NT_DOMAIN_H */