Getting ready for first Red Hat Linux RPMs for 1.9.19 pre-alpha release
[samba.git] / source / include / ntdomain.h
1 /* 
2    Unix SMB/Netbios implementation.
3    Version 1.9.
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
8    
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.
13    
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.
18    
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.
22 */
23
24 #ifndef _NT_DOMAIN_H /* _NT_DOMAIN_H */
25 #define _NT_DOMAIN_H 
26
27
28 /* dce/rpc support */
29 #include "lib/rpc/include/rpc_dce.h"
30
31 /* miscellaneous structures / defines */
32 #include "lib/rpc/include/rpc_misc.h"
33
34 /* different dce/rpc pipes */
35 #include "lib/rpc/include/rpc_lsa.h"
36 #include "lib/rpc/include/rpc_netlogon.h"
37 #include "lib/rpc/include/rpc_reg.h"
38 #include "lib/rpc/include/rpc_samr.h"
39 #include "lib/rpc/include/rpc_srvsvc.h"
40 #include "lib/rpc/include/rpc_wkssvc.h"
41
42 /* 
43  * A bunch of stuff that was put into smb.h
44  * in the NTDOM branch - it didn't belong there.
45  */
46  
47 typedef struct
48 {
49         struct mem_buf *data; /* memory buffer */
50         uint32 offset; /* offset currently being accessed in memory buffer */
51         uint8 align; /* data alignment */
52         BOOL io; /* parsing in or out of data stream */
53
54 } prs_struct;
55
56 typedef struct
57 {
58         int cnum; 
59         int uid;
60         BOOL open; /* open connection */
61         uint16 device_state;
62         fstring name;
63         fstring pipe_srv_name;
64
65         prs_struct rhdr; /* output header */
66         prs_struct rdata; /* output data */
67         prs_struct rauth; /* output authentication verifier */
68  
69         RPC_HDR     hdr;
70         RPC_HDR_BA  hdr_ba;
71         RPC_HDR_RB  hdr_rb;
72         RPC_HDR_RR  hdr_rr;
73
74         RPC_AUTH_NTLMSSP_REQ  ntlmssp_req;
75         RPC_AUTH_NTLMSSP_RESP ntlmssp_resp;
76
77         uint32 max_rdata_len;
78         uint32 hdr_offsets;
79
80 } pipes_struct;
81
82 struct acct_info
83 {  
84         fstring acct_name; /* account name */
85         uint32 smb_userid; /* domain-relative RID */
86 };
87
88 struct api_struct
89 {  
90   char *name;
91   uint8 opnum;
92   void (*fn) (int uid, prs_struct*, prs_struct*);
93 };
94
95 struct mem_desc
96 {  
97         /* array memory offsets */
98         uint32 start; 
99         uint32 end;
100 };
101    
102 struct mem_buf
103 {  
104         BOOL dynamic; /* True iff data has been dynamically allocated
105                          (and therefore can be freed) */
106         char *data;
107         uint32 data_size;
108         uint32 data_used;
109
110         uint32 margin; /* safety margin when reallocing. */
111                        /* this can be abused quite nicely */
112         uint8 align;   /* alignment of data structures (smb, dce/rpc, udp etc) */
113
114         struct mem_desc offset;
115
116         struct mem_buf *next;
117 };
118
119 typedef struct
120 {  
121         uint32 rid;
122         char *name;
123    
124 } rid_name;
125
126 #endif /* _NT_DOMAIN_H */
127