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
19 uint8 num_transfer_syntaxes;
20 dcerpc_syntax_id abstract_syntax;
21 dcerpc_syntax_id transfer_syntaxes[num_transfer_syntaxes];
27 uint32 assoc_group_id;
29 dcerpc_ctx_list ctx_list[num_contexts];
30 [flag(NDR_ALIGN8)] DATA_BLOB _pad;
31 [flag(NDR_REMAINING)] DATA_BLOB auth_info;
35 const uint8 DCERPC_REQUEST_LENGTH = 24;
41 [flag(NDR_ALIGN8)] DATA_BLOB _pad;
42 [flag(NDR_REMAINING)] DATA_BLOB stub_and_verifier;
48 dcerpc_syntax_id syntax;
54 uint32 assoc_group_id;
55 ascstr3 secondary_address;
56 [flag(NDR_ALIGN4)] DATA_BLOB _pad1;
58 dcerpc_ack_ctx ctx_list[num_results];
59 [flag(NDR_REMAINING)] DATA_BLOB auth_info;
65 uint32 versions[num_versions];
68 const uint8 DCERPC_RESPONSE_LENGTH = 24;
74 [flag(NDR_ALIGN8)] DATA_BLOB _pad;
75 [flag(NDR_REMAINING)] DATA_BLOB stub_and_verifier;
83 const uint8 DCERPC_AUTH_TYPE_NONE = 0;
84 const uint8 DCERPC_AUTH_TYPE_KRB5 = 1;
85 const uint8 DCERPC_AUTH_TYPE_NTLMSSP = 10;
87 const uint8 DCERPC_AUTH_LEVEL_NONE = 1;
88 const uint8 DCERPC_AUTH_LEVEL_CONNECT = 2;
89 const uint8 DCERPC_AUTH_LEVEL_CALL = 3;
90 const uint8 DCERPC_AUTH_LEVEL_PACKET = 4;
91 const uint8 DCERPC_AUTH_LEVEL_INTEGRITY = 5;
92 const uint8 DCERPC_AUTH_LEVEL_PRIVACY = 6;
94 typedef [public] struct {
97 uint8 auth_pad_length;
99 uint32 auth_context_id;
100 [flag(NDR_REMAINING)] DATA_BLOB credentials;
103 typedef [public] struct {
105 [flag(NDR_REMAINING)] DATA_BLOB auth_info;
109 DCERPC_PKT_REQUEST = 0,
111 DCERPC_PKT_RESPONSE = 2,
112 DCERPC_PKT_FAULT = 3,
113 DCERPC_PKT_WORKING = 4,
114 DCERPC_PKT_NOCALL = 5,
115 DCERPC_PKT_REJECT = 6,
117 DCERPC_PKT_CL_CANCEL = 8,
119 DCERPC_PKT_CANCEL_ACK = 10,
120 DCERPC_PKT_BIND = 11,
121 DCERPC_PKT_BIND_ACK = 12,
122 DCERPC_PKT_BIND_NAK = 13,
123 DCERPC_PKT_ALTER = 14,
124 DCERPC_PKT_ALTER_ACK = 15,
125 DCERPC_PKT_AUTH3 = 16,
126 DCERPC_PKT_SHUTDOWN = 17,
127 DCERPC_PKT_CO_CANCEL = 18,
128 DCERPC_PKT_ORPHANED = 19
131 typedef [nodiscriminant] union {
132 [case(DCERPC_PKT_REQUEST)] dcerpc_request request;
133 [case(DCERPC_PKT_RESPONSE)] dcerpc_response response;
134 [case(DCERPC_PKT_BIND)] dcerpc_bind bind;
135 [case(DCERPC_PKT_BIND_ACK)] dcerpc_bind_ack bind_ack;
136 [case(DCERPC_PKT_ALTER)] dcerpc_bind alter;
137 [case(DCERPC_PKT_ALTER_ACK)] dcerpc_bind_ack alter_ack;
138 [case(DCERPC_PKT_FAULT)] dcerpc_fault fault;
139 [case(DCERPC_PKT_AUTH3)] dcerpc_auth3 auth;
140 [case(DCERPC_PKT_BIND_NAK)] dcerpc_bind_nak nak;
144 /* pfc_flags values */
145 const uint8 DCERPC_PFC_FLAG_FIRST = 0x01;
146 const uint8 DCERPC_PFC_FLAG_LAST = 0x02;
147 const uint8 DCERPC_PFC_FLAG_NOCALL = 0x20;
149 /* these offsets are needed by the signing code */
150 const uint8 DCERPC_FRAG_LEN_OFFSET = 8;
151 const uint8 DCERPC_AUTH_LEN_OFFSET = 10;
153 typedef [public] struct {
154 uint8 rpc_vers; /* RPC version */
155 uint8 rpc_vers_minor; /* Minor version */
156 uint8 ptype; /* Packet type */
157 uint8 pfc_flags; /* Fragmentation flags */
158 uint8 drep[4]; /* NDR data representation */
159 uint16 frag_length; /* Total length of fragment */
160 uint16 auth_length; /* authenticator length */
161 uint32 call_id; /* Call identifier */
163 [switch_is(ptype)] dcerpc_payload u;