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;
43 /* dcerpc packet types */
44 #define DCERPC_PKT_REQUEST 0
45 #define DCERPC_PKT_RESPONSE 2
46 #define DCERPC_PKT_BIND 11
47 #define DCERPC_PKT_BIND_ACK 12
48 #define DCERPC_PKT_BIND_NAK 13
51 #define DCERPC_PFC_FLAG_FIRST 0x01
52 #define DCERPC_PFC_FLAG_LAST 0x02
53 #define DCERPC_PFC_FLAG_NOCALL 0x20
55 /* dcerpc pipe flags */
56 #define DCERPC_DEBUG_PRINT_IN 1
57 #define DCERPC_DEBUG_PRINT_OUT 2
58 #define DCERPC_DEBUG_PRINT_BOTH (DCERPC_DEBUG_PRINT_IN | DCERPC_DEBUG_PRINT_OUT)
61 all dcerpc packets use this structure.
63 struct dcerpc_packet {
64 /* all requests and responses contain a dcerpc header */
66 uint8 rpc_vers; /* RPC version */
67 uint8 rpc_vers_minor; /* Minor version */
68 uint8 ptype; /* Packet type */
69 uint8 pfc_flags; /* Fragmentation flags */
70 uint8 drep[4]; /* NDR data representation */
71 uint16 frag_length; /* Total length of fragment */
72 uint16 auth_length; /* authenticator length */
73 uint32 call_id; /* Call identifier */
80 uint32 assoc_group_id;
84 uint8 num_transfer_syntaxes;
85 struct dcerpc_syntax_id {
89 const struct dcerpc_syntax_id *transfer_syntaxes;
91 DATA_BLOB auth_verifier;
94 struct dcerpc_request {
99 DATA_BLOB auth_verifier;
104 struct dcerpc_bind_ack {
105 uint16 max_xmit_frag;
106 uint16 max_recv_frag;
107 uint32 assoc_group_id;
108 const char *secondary_address;
113 struct dcerpc_syntax_id syntax;
115 DATA_BLOB auth_verifier;
118 struct dcerpc_bind_nak {
119 uint16 reject_reason;
124 struct dcerpc_response {
129 DATA_BLOB auth_verifier;