2 Unix SMB/CIFS implementation.
3 DCERPC interface structures
5 Copyright (C) Tim Potter 2003
6 Copyright (C) Andrew Tridgell 2003
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 see http://www.opengroup.org/onlinepubs/9629399/chap12.htm for details
27 note that the structure definitions here don't include some of the
28 fields that are wire-artifacts. Those are put on the wire by the
29 marshalling/unmarshalling routines in decrpc.c
37 uint32 srv_max_xmit_frag;
38 uint32 srv_max_recv_frag;
39 struct cli_tree *tree;
42 /* dcerpc packet types */
43 #define DCERPC_PKT_REQUEST 0
44 #define DCERPC_PKT_RESPONSE 2
45 #define DCERPC_PKT_BIND 11
46 #define DCERPC_PKT_BIND_ACK 12
47 #define DCERPC_PKT_BIND_NAK 13
50 #define DCERPC_PFC_FLAG_FIRST 0x01
51 #define DCERPC_PFC_FLAG_LAST 0x02
52 #define DCERPC_PFC_FLAG_NOCALL 0x20
55 all dcerpc packets use this structure.
57 struct dcerpc_packet {
58 /* all requests and responses contain a dcerpc header */
60 uint8 rpc_vers; /* RPC version */
61 uint8 rpc_vers_minor; /* Minor version */
62 uint8 ptype; /* Packet type */
63 uint8 pfc_flags; /* Fragmentation flags */
64 uint8 drep[4]; /* NDR data representation */
65 uint16 frag_length; /* Total length of fragment */
66 uint16 auth_length; /* authenticator length */
67 uint32 call_id; /* Call identifier */
74 uint32 assoc_group_id;
78 uint8 num_transfer_syntaxes;
79 struct dcerpc_syntax_id {
83 const struct dcerpc_syntax_id *transfer_syntaxes;
85 DATA_BLOB auth_verifier;
88 struct dcerpc_request {
93 DATA_BLOB auth_verifier;
98 struct dcerpc_bind_ack {
100 uint16 max_recv_frag;
101 uint32 assoc_group_id;
102 const char *secondary_address;
106 struct dcerpc_syntax_id syntax;
108 DATA_BLOB auth_verifier;
111 struct dcerpc_bind_nak {
112 uint16 reject_reason;
117 struct dcerpc_response {
122 DATA_BLOB auth_verifier;
127 /* this seems to be the only transfer syntax used */
128 #define DCERPC_TRANSFER_SYNTAX_V2 {"8a885d04-1ceb-11c9-9fe8-08002b104860", 2}