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_wkssvc.h"
46 * A bunch of stuff that was put into smb.h
47 * in the NTDOM branch - it didn't belong there.
50 typedef struct _prs_struct
52 BOOL io; /* parsing in or out of data stream */
54 * If the (incoming) data is big-endian. On output we are
55 * always little-endian.
58 uint8 align; /* data alignment */
59 BOOL is_dynamic; /* Do we own this memory or not ? */
60 uint32 data_offset; /* Current working offset into data. */
61 uint32 buffer_size; /* Current size of the buffer. */
62 char *data_p; /* The buffer itself. */
66 * Defines for io member of prs_struct.
72 #define MARSHALLING(ps) (!(ps)->io)
73 #define UNMARSHALLING(ps) ((ps)->io)
75 typedef struct pipes_struct
77 struct pipes_struct *next, *prev;
79 connection_struct *conn;
81 BOOL open; /* open connection */
85 fstring pipe_srv_name;
87 RPC_HDR hdr; /* Incoming RPC header. */
88 RPC_HDR_REQ hdr_req; /* Incoming request header. */
90 uint32 ntlmssp_chal_flags; /* Client challenge flags. */
91 BOOL ntlmssp_auth_requested; /* If the client wanted authenticated rpc. */
92 BOOL ntlmssp_auth_validated; /* If the client *got* authenticated rpc. */
93 unsigned char challenge[8];
94 unsigned char ntlmssp_hash[258];
95 uint32 ntlmssp_seq_num;
105 * Unix user name and credentials.
107 fstring unix_user_name;
112 * Raw RPC output data. This does not include RPC headers or footers.
116 /* The amount of data sent from the current rdata struct. */
117 uint32 data_sent_length;
120 * The current PDU being returned. This inclues
121 * headers, data and authentication footer.
123 unsigned char current_pdu[MAX_PDU_FRAG_LEN];
125 /* The amount of data in the current_pdu buffer. */
126 uint32 current_pdu_len;
128 /* The amount of data sent from the current PDU. */
129 uint32 current_pdu_sent;
131 /* When replying to an SMBtrans, this is the maximum amount of
132 data that can be sent in the initial reply. */
135 /* remote, server-side rpc redirection */
136 struct msrpc_state *m;
144 BOOL (*fn) (uint16 vuid, prs_struct*, prs_struct*);
156 fstring acct_name; /* account name */
157 uint32 smb_userid; /* domain-relative RID */
160 #endif /* _NT_DOMAIN_H */