4 the base dcerpc packet definitions - not traditionally coded as IDL,
5 but given that pidl can handle it nicely it simplifies things a lot
8 see http://www.opengroup.org/onlinepubs/9629399/chap12.htm for packet
14 typedef [public] struct {
21 uint8 num_transfer_syntaxes;
22 dcerpc_syntax_id abstract_syntax;
23 dcerpc_syntax_id transfer_syntaxes[num_transfer_syntaxes];
27 a schannel bind blob - used in auth_info
30 typedef [public] struct {
35 } dcerpc_bind_schannel;
40 uint32 assoc_group_id;
42 dcerpc_ctx_list ctx_list[num_contexts];
43 [flag(NDR_ALIGN8)] DATA_BLOB _pad;
44 [flag(NDR_REMAINING)] DATA_BLOB auth_info;
48 const uint8 DCERPC_REQUEST_LENGTH = 24;
49 const uint8 DCERPC_MAX_SIGN_SIZE = 32;
55 [flag(NDR_ALIGN8)] DATA_BLOB _pad;
56 [flag(NDR_REMAINING)] DATA_BLOB stub_and_verifier;
59 const int DCERPC_BIND_PROVIDER_REJECT = 2;
60 const int DCERPC_BIND_REASON_ASYNTAX = 1;
65 dcerpc_syntax_id syntax;
71 uint32 assoc_group_id;
72 ascstr3 secondary_address;
73 [flag(NDR_ALIGN4)] DATA_BLOB _pad1;
75 dcerpc_ack_ctx ctx_list[num_results];
76 [flag(NDR_REMAINING)] DATA_BLOB auth_info;
82 uint32 versions[num_versions];
85 const uint8 DCERPC_RESPONSE_LENGTH = 24;
91 [flag(NDR_ALIGN8)] DATA_BLOB _pad;
92 [flag(NDR_REMAINING)] DATA_BLOB stub_and_verifier;
96 const int DCERPC_FAULT_OP_RNG_ERROR = 0x1c010002;
97 const int DCERPC_FAULT_UNK_IF = 0x1c010003;
98 const int DCERPC_FAULT_NDR = 0x000006f7;
99 const int DCERPC_FAULT_INVALID_TAG = 0x1c000006;
100 const int DCERPC_FAULT_CONTEXT_MISMATCH = 0x1c00001a;
101 const int DCERPC_FAULT_OTHER = 0x00000001;
103 /* we return this fault when we haven't yet run the test
104 to see what fault w2k3 returns in this case */
105 const int DCERPC_FAULT_TODO = 0x00000042;
115 const uint8 DCERPC_AUTH_TYPE_NONE = 0;
116 const uint8 DCERPC_AUTH_TYPE_KRB5 = 1;
117 const uint8 DCERPC_AUTH_TYPE_SPNEGO = 9;
118 const uint8 DCERPC_AUTH_TYPE_NTLMSSP = 10;
119 const uint8 DCERPC_AUTH_TYPE_SCHANNEL = 68;
121 const uint8 DCERPC_AUTH_LEVEL_NONE = 1;
122 const uint8 DCERPC_AUTH_LEVEL_CONNECT = 2;
123 const uint8 DCERPC_AUTH_LEVEL_CALL = 3;
124 const uint8 DCERPC_AUTH_LEVEL_PACKET = 4;
125 const uint8 DCERPC_AUTH_LEVEL_INTEGRITY = 5;
126 const uint8 DCERPC_AUTH_LEVEL_PRIVACY = 6;
128 typedef [public] struct {
131 uint8 auth_pad_length;
133 uint32 auth_context_id;
134 [flag(NDR_REMAINING)] DATA_BLOB credentials;
137 typedef [public] struct {
139 [flag(NDR_REMAINING)] DATA_BLOB auth_info;
143 DCERPC_PKT_REQUEST = 0,
145 DCERPC_PKT_RESPONSE = 2,
146 DCERPC_PKT_FAULT = 3,
147 DCERPC_PKT_WORKING = 4,
148 DCERPC_PKT_NOCALL = 5,
149 DCERPC_PKT_REJECT = 6,
151 DCERPC_PKT_CL_CANCEL = 8,
153 DCERPC_PKT_CANCEL_ACK = 10,
154 DCERPC_PKT_BIND = 11,
155 DCERPC_PKT_BIND_ACK = 12,
156 DCERPC_PKT_BIND_NAK = 13,
157 DCERPC_PKT_ALTER = 14,
158 DCERPC_PKT_ALTER_ACK = 15,
159 DCERPC_PKT_AUTH3 = 16,
160 DCERPC_PKT_SHUTDOWN = 17,
161 DCERPC_PKT_CO_CANCEL = 18,
162 DCERPC_PKT_ORPHANED = 19
165 typedef [nodiscriminant] union {
166 [case(DCERPC_PKT_REQUEST)] dcerpc_request request;
167 [case(DCERPC_PKT_RESPONSE)] dcerpc_response response;
168 [case(DCERPC_PKT_BIND)] dcerpc_bind bind;
169 [case(DCERPC_PKT_BIND_ACK)] dcerpc_bind_ack bind_ack;
170 [case(DCERPC_PKT_ALTER)] dcerpc_bind alter;
171 [case(DCERPC_PKT_ALTER_ACK)] dcerpc_bind_ack alter_ack;
172 [case(DCERPC_PKT_FAULT)] dcerpc_fault fault;
173 [case(DCERPC_PKT_AUTH3)] dcerpc_auth3 auth;
174 [case(DCERPC_PKT_BIND_NAK)] dcerpc_bind_nak bind_nak;
178 /* pfc_flags values */
179 const uint8 DCERPC_PFC_FLAG_FIRST = 0x01;
180 const uint8 DCERPC_PFC_FLAG_LAST = 0x02;
181 const uint8 DCERPC_PFC_FLAG_NOCALL = 0x20;
183 /* these offsets are needed by the signing code */
184 const uint8 DCERPC_DREP_OFFSET = 4;
185 const uint8 DCERPC_FRAG_LEN_OFFSET = 8;
186 const uint8 DCERPC_AUTH_LEN_OFFSET = 10;
188 /* little-endian flag */
189 const uint8 DCERPC_DREP_LE = 0x10;
191 typedef [public] struct {
192 uint8 rpc_vers; /* RPC version */
193 uint8 rpc_vers_minor; /* Minor version */
194 uint8 ptype; /* Packet type */
195 uint8 pfc_flags; /* Fragmentation flags */
196 uint8 drep[4]; /* NDR data representation */
197 uint16 frag_length; /* Total length of fragment */
198 uint16 auth_length; /* authenticator length */
199 uint32 call_id; /* Call identifier */
201 [switch_is(ptype)] dcerpc_payload u;