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 {
22 uint8 num_transfer_syntaxes
;
23 dcerpc_syntax_id abstract_syntax
;
24 dcerpc_syntax_id transfer_syntaxes
[num_transfer_syntaxes
];
30 uint32 assoc_group_id
;
32 dcerpc_ctx_list ctx_list
[num_contexts
];
33 [flag
(NDR_ALIGN8
)] DATA_BLOB _pad
;
34 [flag
(NDR_REMAINING
)] DATA_BLOB auth_info
;
38 const uint8 DCERPC_REQUEST_LENGTH
= 24;
39 const uint8 DCERPC_MAX_SIGN_SIZE
= 32;
45 [flag
(NDR_ALIGN8
)] DATA_BLOB _pad
;
46 [flag
(NDR_REMAINING
)] DATA_BLOB stub_and_verifier
;
49 const int DCERPC_BIND_PROVIDER_REJECT
= 2;
50 const int DCERPC_BIND_REASON_ASYNTAX
= 1;
55 dcerpc_syntax_id syntax
;
61 uint32 assoc_group_id
;
62 ascstr3 secondary_address
;
63 [flag
(NDR_ALIGN4
)] DATA_BLOB _pad1
;
65 dcerpc_ack_ctx ctx_list
[num_results
];
66 [flag
(NDR_REMAINING
)] DATA_BLOB auth_info
;
72 uint32 versions
[num_versions
];
75 const uint8 DCERPC_RESPONSE_LENGTH
= 24;
81 [flag
(NDR_ALIGN8
)] DATA_BLOB _pad
;
82 [flag
(NDR_REMAINING
)] DATA_BLOB stub_and_verifier
;
86 const int DCERPC_FAULT_OP_RNG_ERROR
= 0x1c010002;
87 const int DCERPC_FAULT_NDR
= 0x000006f7;
88 const int DCERPC_FAULT_CONTEXT_MISMATCH
= 0x1c00001a;
89 const int DCERPC_FAULT_OTHER
= 0x00000001;
91 /* we return this fault when we haven't yet run the test
92 to see what fault w2k3 returns in this case */
93 const int DCERPC_FAULT_TODO
= 0x00000042;
103 const uint8 DCERPC_AUTH_TYPE_NONE
= 0;
104 const uint8 DCERPC_AUTH_TYPE_KRB5
= 1;
105 const uint8 DCERPC_AUTH_TYPE_NTLMSSP
= 10;
107 const uint8 DCERPC_AUTH_LEVEL_NONE
= 1;
108 const uint8 DCERPC_AUTH_LEVEL_CONNECT
= 2;
109 const uint8 DCERPC_AUTH_LEVEL_CALL
= 3;
110 const uint8 DCERPC_AUTH_LEVEL_PACKET
= 4;
111 const uint8 DCERPC_AUTH_LEVEL_INTEGRITY
= 5;
112 const uint8 DCERPC_AUTH_LEVEL_PRIVACY
= 6;
114 typedef [public] struct {
117 uint8 auth_pad_length
;
119 uint32 auth_context_id
;
120 [flag
(NDR_REMAINING
)] DATA_BLOB credentials
;
123 typedef [public] struct {
125 [flag
(NDR_REMAINING
)] DATA_BLOB auth_info
;
129 DCERPC_PKT_REQUEST
= 0,
131 DCERPC_PKT_RESPONSE
= 2,
132 DCERPC_PKT_FAULT
= 3,
133 DCERPC_PKT_WORKING
= 4,
134 DCERPC_PKT_NOCALL
= 5,
135 DCERPC_PKT_REJECT
= 6,
137 DCERPC_PKT_CL_CANCEL
= 8,
139 DCERPC_PKT_CANCEL_ACK
= 10,
140 DCERPC_PKT_BIND
= 11,
141 DCERPC_PKT_BIND_ACK
= 12,
142 DCERPC_PKT_BIND_NAK
= 13,
143 DCERPC_PKT_ALTER
= 14,
144 DCERPC_PKT_ALTER_ACK
= 15,
145 DCERPC_PKT_AUTH3
= 16,
146 DCERPC_PKT_SHUTDOWN
= 17,
147 DCERPC_PKT_CO_CANCEL
= 18,
148 DCERPC_PKT_ORPHANED
= 19
151 typedef [nodiscriminant
] union {
152 [case(DCERPC_PKT_REQUEST
)] dcerpc_request request
;
153 [case(DCERPC_PKT_RESPONSE
)] dcerpc_response response
;
154 [case(DCERPC_PKT_BIND
)] dcerpc_bind bind
;
155 [case(DCERPC_PKT_BIND_ACK
)] dcerpc_bind_ack bind_ack
;
156 [case(DCERPC_PKT_ALTER
)] dcerpc_bind alter
;
157 [case(DCERPC_PKT_ALTER_ACK
)] dcerpc_bind_ack alter_ack
;
158 [case(DCERPC_PKT_FAULT
)] dcerpc_fault fault
;
159 [case(DCERPC_PKT_AUTH3
)] dcerpc_auth3 auth
;
160 [case(DCERPC_PKT_BIND_NAK
)] dcerpc_bind_nak bind_nak
;
164 /* pfc_flags values */
165 const uint8 DCERPC_PFC_FLAG_FIRST
= 0x01;
166 const uint8 DCERPC_PFC_FLAG_LAST
= 0x02;
167 const uint8 DCERPC_PFC_FLAG_NOCALL
= 0x20;
169 /* these offsets are needed by the signing code */
170 const uint8 DCERPC_FRAG_LEN_OFFSET
= 8;
171 const uint8 DCERPC_AUTH_LEN_OFFSET
= 10;
173 typedef [public] struct {
174 uint8 rpc_vers
; /* RPC version */
175 uint8 rpc_vers_minor
; /* Minor version */
176 uint8 ptype
; /* Packet type */
177 uint8 pfc_flags
; /* Fragmentation flags */
178 uint8 drep
[4]; /* NDR data representation */
179 uint16 frag_length
; /* Total length of fragment */
180 uint16 auth_length
; /* authenticator length */
181 uint32 call_id
; /* Call identifier */
183 [switch_is(ptype
)] dcerpc_payload u
;