/* [<][>][^][v][top][bottom][index][help] */
DEFINITIONS
This source file includes following definitions.
- ndr_push_replPropertyMetaData1
- ndr_pull_replPropertyMetaData1
- ndr_print_replPropertyMetaData1
- ndr_push_replPropertyMetaDataCtr1
- ndr_pull_replPropertyMetaDataCtr1
- ndr_print_replPropertyMetaDataCtr1
- ndr_push_replPropertyMetaDataCtr
- ndr_pull_replPropertyMetaDataCtr
- ndr_print_replPropertyMetaDataCtr
- ndr_push_replPropertyMetaDataBlob
- ndr_pull_replPropertyMetaDataBlob
- ndr_print_replPropertyMetaDataBlob
- ndr_push_replUpToDateVectorCtr1
- ndr_pull_replUpToDateVectorCtr1
- ndr_print_replUpToDateVectorCtr1
- ndr_push_replUpToDateVectorCtr2
- ndr_pull_replUpToDateVectorCtr2
- ndr_print_replUpToDateVectorCtr2
- ndr_push_replUpToDateVectorCtr
- ndr_pull_replUpToDateVectorCtr
- ndr_print_replUpToDateVectorCtr
- ndr_push_replUpToDateVectorBlob
- ndr_pull_replUpToDateVectorBlob
- ndr_print_replUpToDateVectorBlob
- ndr_push_repsFromTo1OtherInfo
- ndr_pull_repsFromTo1OtherInfo
- ndr_print_repsFromTo1OtherInfo
- ndr_size_repsFromTo1OtherInfo
- ndr_push_repsFromTo1
- ndr_pull_repsFromTo1
- ndr_print_repsFromTo1
- ndr_size_repsFromTo1
- ndr_push_repsFromTo
- ndr_pull_repsFromTo
- ndr_print_repsFromTo
- ndr_push_repsFromToBlob
- ndr_pull_repsFromToBlob
- ndr_print_repsFromToBlob
- ndr_push_partialAttributeSetCtr1
- ndr_pull_partialAttributeSetCtr1
- ndr_print_partialAttributeSetCtr1
- ndr_push_partialAttributeSetCtr
- ndr_pull_partialAttributeSetCtr
- ndr_print_partialAttributeSetCtr
- ndr_push_partialAttributeSetBlob
- ndr_pull_partialAttributeSetBlob
- ndr_print_partialAttributeSetBlob
- ndr_push_prefixMapVersion
- ndr_pull_prefixMapVersion
- ndr_print_prefixMapVersion
- ndr_push_prefixMapCtr
- ndr_pull_prefixMapCtr
- ndr_print_prefixMapCtr
- ndr_push_prefixMapBlob
- ndr_pull_prefixMapBlob
- ndr_print_prefixMapBlob
- ndr_push_ldapControlDirSyncExtra
- ndr_pull_ldapControlDirSyncExtra
- ndr_print_ldapControlDirSyncExtra
- ndr_size_ldapControlDirSyncExtra
- ndr_push_ldapControlDirSyncBlob
- ndr_pull_ldapControlDirSyncBlob
- ndr_print_ldapControlDirSyncBlob
- ndr_push_ldapControlDirSyncCookie
- ndr_pull_ldapControlDirSyncCookie
- ndr_print_ldapControlDirSyncCookie
- ndr_push_supplementalCredentialsPackage
- ndr_pull_supplementalCredentialsPackage
- ndr_print_supplementalCredentialsPackage
- ndr_push_supplementalCredentialsSignature
- ndr_pull_supplementalCredentialsSignature
- ndr_print_supplementalCredentialsSignature
- ndr_push_supplementalCredentialsSubBlob
- ndr_pull_supplementalCredentialsSubBlob
- ndr_print_supplementalCredentialsSubBlob
- ndr_size_supplementalCredentialsSubBlob
- ndr_push_supplementalCredentialsBlob
- ndr_pull_supplementalCredentialsBlob
- ndr_print_supplementalCredentialsBlob
- ndr_push_package_PackagesBlob
- ndr_pull_package_PackagesBlob
- ndr_print_package_PackagesBlob
- ndr_push_package_PrimaryKerberosString
- ndr_pull_package_PrimaryKerberosString
- ndr_print_package_PrimaryKerberosString
- ndr_push_package_PrimaryKerberosKey3
- ndr_pull_package_PrimaryKerberosKey3
- ndr_print_package_PrimaryKerberosKey3
- ndr_push_package_PrimaryKerberosCtr3
- ndr_pull_package_PrimaryKerberosCtr3
- ndr_print_package_PrimaryKerberosCtr3
- ndr_push_package_PrimaryKerberosKey4
- ndr_pull_package_PrimaryKerberosKey4
- ndr_print_package_PrimaryKerberosKey4
- ndr_push_package_PrimaryKerberosCtr4
- ndr_pull_package_PrimaryKerberosCtr4
- ndr_print_package_PrimaryKerberosCtr4
- ndr_push_package_PrimaryKerberosCtr
- ndr_pull_package_PrimaryKerberosCtr
- ndr_print_package_PrimaryKerberosCtr
- ndr_push_package_PrimaryKerberosBlob
- ndr_pull_package_PrimaryKerberosBlob
- ndr_print_package_PrimaryKerberosBlob
- ndr_push_package_PrimaryCLEARTEXTBlob
- ndr_pull_package_PrimaryCLEARTEXTBlob
- ndr_print_package_PrimaryCLEARTEXTBlob
- ndr_push_package_PrimaryWDigestHash
- ndr_pull_package_PrimaryWDigestHash
- ndr_print_package_PrimaryWDigestHash
- ndr_push_package_PrimaryWDigestBlob
- ndr_pull_package_PrimaryWDigestBlob
- ndr_print_package_PrimaryWDigestBlob
- ndr_push_AuthInfoNone
- ndr_pull_AuthInfoNone
- ndr_print_AuthInfoNone
- ndr_push_AuthInfoNT4Owf
- ndr_pull_AuthInfoNT4Owf
- ndr_print_AuthInfoNT4Owf
- ndr_push_AuthInfoClear
- ndr_pull_AuthInfoClear
- ndr_print_AuthInfoClear
- ndr_push_AuthInfoVersion
- ndr_pull_AuthInfoVersion
- ndr_print_AuthInfoVersion
- ndr_push_AuthInfo
- ndr_pull_AuthInfo
- ndr_print_AuthInfo
- ndr_push_AuthenticationInformation
- ndr_pull_AuthenticationInformation
- ndr_print_AuthenticationInformation
- ndr_size_trustAuthInOutBlob
- ndr_push_trustCurrentPasswords
- ndr_pull_trustCurrentPasswords
- ndr_print_trustCurrentPasswords
- ndr_size_trustCurrentPasswords
- ndr_push_trustDomainPasswords
- ndr_print_trustDomainPasswords
- ndr_push_DsCompressedChunk
- ndr_pull_DsCompressedChunk
- ndr_print_DsCompressedChunk
- ndr_push_ExtendedErrorAString
- ndr_pull_ExtendedErrorAString
- ndr_print_ExtendedErrorAString
- ndr_push_ExtendedErrorUString
- ndr_pull_ExtendedErrorUString
- ndr_print_ExtendedErrorUString
- ndr_push_ExtendedErrorBlob
- ndr_pull_ExtendedErrorBlob
- ndr_print_ExtendedErrorBlob
- ndr_push_ExtendedErrorComputerNamePresent
- ndr_pull_ExtendedErrorComputerNamePresent
- ndr_print_ExtendedErrorComputerNamePresent
- ndr_push_ExtendedErrorComputerNameU
- ndr_pull_ExtendedErrorComputerNameU
- ndr_print_ExtendedErrorComputerNameU
- ndr_push_ExtendedErrorComputerName
- ndr_pull_ExtendedErrorComputerName
- ndr_print_ExtendedErrorComputerName
- ndr_push_ExtendedErrorParamType
- ndr_pull_ExtendedErrorParamType
- ndr_print_ExtendedErrorParamType
- ndr_push_ExtendedErrorParamU
- ndr_pull_ExtendedErrorParamU
- ndr_print_ExtendedErrorParamU
- ndr_push_ExtendedErrorParam
- ndr_pull_ExtendedErrorParam
- ndr_print_ExtendedErrorParam
- ndr_push_ExtendedErrorInfo
- ndr_pull_ExtendedErrorInfo
- ndr_print_ExtendedErrorInfo
- ndr_push_ExtendedErrorInfoPtr
- ndr_pull_ExtendedErrorInfoPtr
- ndr_print_ExtendedErrorInfoPtr
- ndr_push_decode_replPropertyMetaData
- ndr_pull_decode_replPropertyMetaData
- ndr_print_decode_replPropertyMetaData
- ndr_push_decode_replUpToDateVector
- ndr_pull_decode_replUpToDateVector
- ndr_print_decode_replUpToDateVector
- ndr_push_decode_repsFromTo
- ndr_pull_decode_repsFromTo
- ndr_print_decode_repsFromTo
- ndr_push_decode_partialAttributeSet
- ndr_pull_decode_partialAttributeSet
- ndr_print_decode_partialAttributeSet
- ndr_push_decode_prefixMap
- ndr_pull_decode_prefixMap
- ndr_print_decode_prefixMap
- ndr_push_decode_ldapControlDirSync
- ndr_pull_decode_ldapControlDirSync
- ndr_print_decode_ldapControlDirSync
- ndr_push_decode_supplementalCredentials
- ndr_pull_decode_supplementalCredentials
- ndr_print_decode_supplementalCredentials
- ndr_push_decode_Packages
- ndr_pull_decode_Packages
- ndr_print_decode_Packages
- ndr_push_decode_PrimaryKerberos
- ndr_pull_decode_PrimaryKerberos
- ndr_print_decode_PrimaryKerberos
- ndr_push_decode_PrimaryCLEARTEXT
- ndr_pull_decode_PrimaryCLEARTEXT
- ndr_print_decode_PrimaryCLEARTEXT
- ndr_push_decode_PrimaryWDigest
- ndr_pull_decode_PrimaryWDigest
- ndr_print_decode_PrimaryWDigest
- ndr_push_decode_trustAuthInOut
- ndr_pull_decode_trustAuthInOut
- ndr_print_decode_trustAuthInOut
- ndr_push_decode_trustDomainPasswords
- ndr_pull_decode_trustDomainPasswords
- ndr_print_decode_trustDomainPasswords
- ndr_push_decode_ExtendedErrorInfo
- ndr_pull_decode_ExtendedErrorInfo
- ndr_print_decode_ExtendedErrorInfo
1 /* parser auto-generated by pidl */
2
3 #include "includes.h"
4 #include "../librpc/gen_ndr/ndr_drsblobs.h"
5
6 #include "librpc/gen_ndr/ndr_drsuapi.h"
7 #include "librpc/gen_ndr/ndr_misc.h"
8 #include "librpc/gen_ndr/ndr_samr.h"
9 #include "librpc/gen_ndr/ndr_lsa.h"
10 static enum ndr_err_code ndr_push_replPropertyMetaData1(struct ndr_push *ndr, int ndr_flags, const struct replPropertyMetaData1 *r)
/* [<][>][^][v][top][bottom][index][help] */
11 {
12 if (ndr_flags & NDR_SCALARS) {
13 NDR_CHECK(ndr_push_align(ndr, 8));
14 NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->attid));
15 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
16 NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->originating_change_time));
17 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
18 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->originating_usn));
19 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->local_usn));
20 }
21 if (ndr_flags & NDR_BUFFERS) {
22 }
23 return NDR_ERR_SUCCESS;
24 }
25
26 static enum ndr_err_code ndr_pull_replPropertyMetaData1(struct ndr_pull *ndr, int ndr_flags, struct replPropertyMetaData1 *r)
/* [<][>][^][v][top][bottom][index][help] */
27 {
28 if (ndr_flags & NDR_SCALARS) {
29 NDR_CHECK(ndr_pull_align(ndr, 8));
30 NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->attid));
31 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
32 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->originating_change_time));
33 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
34 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->originating_usn));
35 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->local_usn));
36 }
37 if (ndr_flags & NDR_BUFFERS) {
38 }
39 return NDR_ERR_SUCCESS;
40 }
41
42 _PUBLIC_ void ndr_print_replPropertyMetaData1(struct ndr_print *ndr, const char *name, const struct replPropertyMetaData1 *r)
/* [<][>][^][v][top][bottom][index][help] */
43 {
44 ndr_print_struct(ndr, name, "replPropertyMetaData1");
45 ndr->depth++;
46 ndr_print_drsuapi_DsAttributeId(ndr, "attid", r->attid);
47 ndr_print_uint32(ndr, "version", r->version);
48 ndr_print_NTTIME_1sec(ndr, "originating_change_time", r->originating_change_time);
49 ndr_print_GUID(ndr, "originating_invocation_id", &r->originating_invocation_id);
50 ndr_print_hyper(ndr, "originating_usn", r->originating_usn);
51 ndr_print_hyper(ndr, "local_usn", r->local_usn);
52 ndr->depth--;
53 }
54
55 static enum ndr_err_code ndr_push_replPropertyMetaDataCtr1(struct ndr_push *ndr, int ndr_flags, const struct replPropertyMetaDataCtr1 *r)
/* [<][>][^][v][top][bottom][index][help] */
56 {
57 uint32_t cntr_array_0;
58 if (ndr_flags & NDR_SCALARS) {
59 NDR_CHECK(ndr_push_align(ndr, 8));
60 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
61 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
62 for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) {
63 NDR_CHECK(ndr_push_replPropertyMetaData1(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
64 }
65 }
66 if (ndr_flags & NDR_BUFFERS) {
67 }
68 return NDR_ERR_SUCCESS;
69 }
70
71 static enum ndr_err_code ndr_pull_replPropertyMetaDataCtr1(struct ndr_pull *ndr, int ndr_flags, struct replPropertyMetaDataCtr1 *r)
/* [<][>][^][v][top][bottom][index][help] */
72 {
73 uint32_t cntr_array_0;
74 TALLOC_CTX *_mem_save_array_0;
75 if (ndr_flags & NDR_SCALARS) {
76 NDR_CHECK(ndr_pull_align(ndr, 8));
77 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
78 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
79 NDR_PULL_ALLOC_N(ndr, r->array, r->count);
80 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
81 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
82 for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) {
83 NDR_CHECK(ndr_pull_replPropertyMetaData1(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
84 }
85 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
86 }
87 if (ndr_flags & NDR_BUFFERS) {
88 }
89 return NDR_ERR_SUCCESS;
90 }
91
92 _PUBLIC_ void ndr_print_replPropertyMetaDataCtr1(struct ndr_print *ndr, const char *name, const struct replPropertyMetaDataCtr1 *r)
/* [<][>][^][v][top][bottom][index][help] */
93 {
94 uint32_t cntr_array_0;
95 ndr_print_struct(ndr, name, "replPropertyMetaDataCtr1");
96 ndr->depth++;
97 ndr_print_uint32(ndr, "count", r->count);
98 ndr_print_uint32(ndr, "reserved", r->reserved);
99 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
100 ndr->depth++;
101 for (cntr_array_0=0;cntr_array_0<r->count;cntr_array_0++) {
102 char *idx_0=NULL;
103 if (asprintf(&idx_0, "[%d]", cntr_array_0) != -1) {
104 ndr_print_replPropertyMetaData1(ndr, "array", &r->array[cntr_array_0]);
105 free(idx_0);
106 }
107 }
108 ndr->depth--;
109 ndr->depth--;
110 }
111
112 static enum ndr_err_code ndr_push_replPropertyMetaDataCtr(struct ndr_push *ndr, int ndr_flags, const union replPropertyMetaDataCtr *r)
/* [<][>][^][v][top][bottom][index][help] */
113 {
114 if (ndr_flags & NDR_SCALARS) {
115 int level = ndr_push_get_switch_value(ndr, r);
116 switch (level) {
117 case 1: {
118 NDR_CHECK(ndr_push_replPropertyMetaDataCtr1(ndr, NDR_SCALARS, &r->ctr1));
119 break; }
120
121 default:
122 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
123 }
124 }
125 if (ndr_flags & NDR_BUFFERS) {
126 int level = ndr_push_get_switch_value(ndr, r);
127 switch (level) {
128 case 1:
129 break;
130
131 default:
132 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
133 }
134 }
135 return NDR_ERR_SUCCESS;
136 }
137
138 static enum ndr_err_code ndr_pull_replPropertyMetaDataCtr(struct ndr_pull *ndr, int ndr_flags, union replPropertyMetaDataCtr *r)
/* [<][>][^][v][top][bottom][index][help] */
139 {
140 int level;
141 level = ndr_pull_get_switch_value(ndr, r);
142 if (ndr_flags & NDR_SCALARS) {
143 switch (level) {
144 case 1: {
145 NDR_CHECK(ndr_pull_replPropertyMetaDataCtr1(ndr, NDR_SCALARS, &r->ctr1));
146 break; }
147
148 default:
149 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
150 }
151 }
152 if (ndr_flags & NDR_BUFFERS) {
153 switch (level) {
154 case 1:
155 break;
156
157 default:
158 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
159 }
160 }
161 return NDR_ERR_SUCCESS;
162 }
163
164 _PUBLIC_ void ndr_print_replPropertyMetaDataCtr(struct ndr_print *ndr, const char *name, const union replPropertyMetaDataCtr *r)
/* [<][>][^][v][top][bottom][index][help] */
165 {
166 int level;
167 level = ndr_print_get_switch_value(ndr, r);
168 ndr_print_union(ndr, name, level, "replPropertyMetaDataCtr");
169 switch (level) {
170 case 1:
171 ndr_print_replPropertyMetaDataCtr1(ndr, "ctr1", &r->ctr1);
172 break;
173
174 default:
175 ndr_print_bad_level(ndr, name, level);
176 }
177 }
178
179 _PUBLIC_ enum ndr_err_code ndr_push_replPropertyMetaDataBlob(struct ndr_push *ndr, int ndr_flags, const struct replPropertyMetaDataBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
180 {
181 if (ndr_flags & NDR_SCALARS) {
182 NDR_CHECK(ndr_push_align(ndr, 8));
183 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
184 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
185 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
186 NDR_CHECK(ndr_push_replPropertyMetaDataCtr(ndr, NDR_SCALARS, &r->ctr));
187 }
188 if (ndr_flags & NDR_BUFFERS) {
189 }
190 return NDR_ERR_SUCCESS;
191 }
192
193 _PUBLIC_ enum ndr_err_code ndr_pull_replPropertyMetaDataBlob(struct ndr_pull *ndr, int ndr_flags, struct replPropertyMetaDataBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
194 {
195 if (ndr_flags & NDR_SCALARS) {
196 NDR_CHECK(ndr_pull_align(ndr, 8));
197 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
198 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
199 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
200 NDR_CHECK(ndr_pull_replPropertyMetaDataCtr(ndr, NDR_SCALARS, &r->ctr));
201 }
202 if (ndr_flags & NDR_BUFFERS) {
203 }
204 return NDR_ERR_SUCCESS;
205 }
206
207 _PUBLIC_ void ndr_print_replPropertyMetaDataBlob(struct ndr_print *ndr, const char *name, const struct replPropertyMetaDataBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
208 {
209 ndr_print_struct(ndr, name, "replPropertyMetaDataBlob");
210 ndr->depth++;
211 ndr_print_uint32(ndr, "version", r->version);
212 ndr_print_uint32(ndr, "reserved", r->reserved);
213 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
214 ndr_print_replPropertyMetaDataCtr(ndr, "ctr", &r->ctr);
215 ndr->depth--;
216 }
217
218 static enum ndr_err_code ndr_push_replUpToDateVectorCtr1(struct ndr_push *ndr, int ndr_flags, const struct replUpToDateVectorCtr1 *r)
/* [<][>][^][v][top][bottom][index][help] */
219 {
220 uint32_t cntr_cursors_0;
221 if (ndr_flags & NDR_SCALARS) {
222 NDR_CHECK(ndr_push_align(ndr, 8));
223 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
224 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
225 for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) {
226 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
227 }
228 }
229 if (ndr_flags & NDR_BUFFERS) {
230 }
231 return NDR_ERR_SUCCESS;
232 }
233
234 static enum ndr_err_code ndr_pull_replUpToDateVectorCtr1(struct ndr_pull *ndr, int ndr_flags, struct replUpToDateVectorCtr1 *r)
/* [<][>][^][v][top][bottom][index][help] */
235 {
236 uint32_t cntr_cursors_0;
237 TALLOC_CTX *_mem_save_cursors_0;
238 if (ndr_flags & NDR_SCALARS) {
239 NDR_CHECK(ndr_pull_align(ndr, 8));
240 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
241 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
242 NDR_PULL_ALLOC_N(ndr, r->cursors, r->count);
243 _mem_save_cursors_0 = NDR_PULL_GET_MEM_CTX(ndr);
244 NDR_PULL_SET_MEM_CTX(ndr, r->cursors, 0);
245 for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) {
246 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
247 }
248 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors_0, 0);
249 }
250 if (ndr_flags & NDR_BUFFERS) {
251 }
252 return NDR_ERR_SUCCESS;
253 }
254
255 _PUBLIC_ void ndr_print_replUpToDateVectorCtr1(struct ndr_print *ndr, const char *name, const struct replUpToDateVectorCtr1 *r)
/* [<][>][^][v][top][bottom][index][help] */
256 {
257 uint32_t cntr_cursors_0;
258 ndr_print_struct(ndr, name, "replUpToDateVectorCtr1");
259 ndr->depth++;
260 ndr_print_uint32(ndr, "count", r->count);
261 ndr_print_uint32(ndr, "reserved", r->reserved);
262 ndr->print(ndr, "%s: ARRAY(%d)", "cursors", (int)r->count);
263 ndr->depth++;
264 for (cntr_cursors_0=0;cntr_cursors_0<r->count;cntr_cursors_0++) {
265 char *idx_0=NULL;
266 if (asprintf(&idx_0, "[%d]", cntr_cursors_0) != -1) {
267 ndr_print_drsuapi_DsReplicaCursor(ndr, "cursors", &r->cursors[cntr_cursors_0]);
268 free(idx_0);
269 }
270 }
271 ndr->depth--;
272 ndr->depth--;
273 }
274
275 static enum ndr_err_code ndr_push_replUpToDateVectorCtr2(struct ndr_push *ndr, int ndr_flags, const struct replUpToDateVectorCtr2 *r)
/* [<][>][^][v][top][bottom][index][help] */
276 {
277 uint32_t cntr_cursors_0;
278 if (ndr_flags & NDR_SCALARS) {
279 NDR_CHECK(ndr_push_align(ndr, 8));
280 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
281 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
282 for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) {
283 NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
284 }
285 }
286 if (ndr_flags & NDR_BUFFERS) {
287 }
288 return NDR_ERR_SUCCESS;
289 }
290
291 static enum ndr_err_code ndr_pull_replUpToDateVectorCtr2(struct ndr_pull *ndr, int ndr_flags, struct replUpToDateVectorCtr2 *r)
/* [<][>][^][v][top][bottom][index][help] */
292 {
293 uint32_t cntr_cursors_0;
294 TALLOC_CTX *_mem_save_cursors_0;
295 if (ndr_flags & NDR_SCALARS) {
296 NDR_CHECK(ndr_pull_align(ndr, 8));
297 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
298 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
299 NDR_PULL_ALLOC_N(ndr, r->cursors, r->count);
300 _mem_save_cursors_0 = NDR_PULL_GET_MEM_CTX(ndr);
301 NDR_PULL_SET_MEM_CTX(ndr, r->cursors, 0);
302 for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) {
303 NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
304 }
305 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors_0, 0);
306 }
307 if (ndr_flags & NDR_BUFFERS) {
308 }
309 return NDR_ERR_SUCCESS;
310 }
311
312 _PUBLIC_ void ndr_print_replUpToDateVectorCtr2(struct ndr_print *ndr, const char *name, const struct replUpToDateVectorCtr2 *r)
/* [<][>][^][v][top][bottom][index][help] */
313 {
314 uint32_t cntr_cursors_0;
315 ndr_print_struct(ndr, name, "replUpToDateVectorCtr2");
316 ndr->depth++;
317 ndr_print_uint32(ndr, "count", r->count);
318 ndr_print_uint32(ndr, "reserved", r->reserved);
319 ndr->print(ndr, "%s: ARRAY(%d)", "cursors", (int)r->count);
320 ndr->depth++;
321 for (cntr_cursors_0=0;cntr_cursors_0<r->count;cntr_cursors_0++) {
322 char *idx_0=NULL;
323 if (asprintf(&idx_0, "[%d]", cntr_cursors_0) != -1) {
324 ndr_print_drsuapi_DsReplicaCursor2(ndr, "cursors", &r->cursors[cntr_cursors_0]);
325 free(idx_0);
326 }
327 }
328 ndr->depth--;
329 ndr->depth--;
330 }
331
332 static enum ndr_err_code ndr_push_replUpToDateVectorCtr(struct ndr_push *ndr, int ndr_flags, const union replUpToDateVectorCtr *r)
/* [<][>][^][v][top][bottom][index][help] */
333 {
334 if (ndr_flags & NDR_SCALARS) {
335 int level = ndr_push_get_switch_value(ndr, r);
336 switch (level) {
337 case 1: {
338 NDR_CHECK(ndr_push_replUpToDateVectorCtr1(ndr, NDR_SCALARS, &r->ctr1));
339 break; }
340
341 case 2: {
342 NDR_CHECK(ndr_push_replUpToDateVectorCtr2(ndr, NDR_SCALARS, &r->ctr2));
343 break; }
344
345 default:
346 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
347 }
348 }
349 if (ndr_flags & NDR_BUFFERS) {
350 int level = ndr_push_get_switch_value(ndr, r);
351 switch (level) {
352 case 1:
353 break;
354
355 case 2:
356 break;
357
358 default:
359 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
360 }
361 }
362 return NDR_ERR_SUCCESS;
363 }
364
365 static enum ndr_err_code ndr_pull_replUpToDateVectorCtr(struct ndr_pull *ndr, int ndr_flags, union replUpToDateVectorCtr *r)
/* [<][>][^][v][top][bottom][index][help] */
366 {
367 int level;
368 level = ndr_pull_get_switch_value(ndr, r);
369 if (ndr_flags & NDR_SCALARS) {
370 switch (level) {
371 case 1: {
372 NDR_CHECK(ndr_pull_replUpToDateVectorCtr1(ndr, NDR_SCALARS, &r->ctr1));
373 break; }
374
375 case 2: {
376 NDR_CHECK(ndr_pull_replUpToDateVectorCtr2(ndr, NDR_SCALARS, &r->ctr2));
377 break; }
378
379 default:
380 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
381 }
382 }
383 if (ndr_flags & NDR_BUFFERS) {
384 switch (level) {
385 case 1:
386 break;
387
388 case 2:
389 break;
390
391 default:
392 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
393 }
394 }
395 return NDR_ERR_SUCCESS;
396 }
397
398 _PUBLIC_ void ndr_print_replUpToDateVectorCtr(struct ndr_print *ndr, const char *name, const union replUpToDateVectorCtr *r)
/* [<][>][^][v][top][bottom][index][help] */
399 {
400 int level;
401 level = ndr_print_get_switch_value(ndr, r);
402 ndr_print_union(ndr, name, level, "replUpToDateVectorCtr");
403 switch (level) {
404 case 1:
405 ndr_print_replUpToDateVectorCtr1(ndr, "ctr1", &r->ctr1);
406 break;
407
408 case 2:
409 ndr_print_replUpToDateVectorCtr2(ndr, "ctr2", &r->ctr2);
410 break;
411
412 default:
413 ndr_print_bad_level(ndr, name, level);
414 }
415 }
416
417 _PUBLIC_ enum ndr_err_code ndr_push_replUpToDateVectorBlob(struct ndr_push *ndr, int ndr_flags, const struct replUpToDateVectorBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
418 {
419 if (ndr_flags & NDR_SCALARS) {
420 NDR_CHECK(ndr_push_align(ndr, 8));
421 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
422 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
423 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
424 NDR_CHECK(ndr_push_replUpToDateVectorCtr(ndr, NDR_SCALARS, &r->ctr));
425 }
426 if (ndr_flags & NDR_BUFFERS) {
427 }
428 return NDR_ERR_SUCCESS;
429 }
430
431 _PUBLIC_ enum ndr_err_code ndr_pull_replUpToDateVectorBlob(struct ndr_pull *ndr, int ndr_flags, struct replUpToDateVectorBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
432 {
433 if (ndr_flags & NDR_SCALARS) {
434 NDR_CHECK(ndr_pull_align(ndr, 8));
435 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
436 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
437 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
438 NDR_CHECK(ndr_pull_replUpToDateVectorCtr(ndr, NDR_SCALARS, &r->ctr));
439 }
440 if (ndr_flags & NDR_BUFFERS) {
441 }
442 return NDR_ERR_SUCCESS;
443 }
444
445 _PUBLIC_ void ndr_print_replUpToDateVectorBlob(struct ndr_print *ndr, const char *name, const struct replUpToDateVectorBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
446 {
447 ndr_print_struct(ndr, name, "replUpToDateVectorBlob");
448 ndr->depth++;
449 ndr_print_uint32(ndr, "version", r->version);
450 ndr_print_uint32(ndr, "reserved", r->reserved);
451 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
452 ndr_print_replUpToDateVectorCtr(ndr, "ctr", &r->ctr);
453 ndr->depth--;
454 }
455
456 _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo1OtherInfo(struct ndr_push *ndr, int ndr_flags, const struct repsFromTo1OtherInfo *r)
/* [<][>][^][v][top][bottom][index][help] */
457 {
458 if (ndr_flags & NDR_SCALARS) {
459 NDR_CHECK(ndr_push_align(ndr, 4));
460 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen(r->dns_name) + 1));
461 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_name, strlen(r->dns_name) + 1, sizeof(uint8_t), CH_DOS));
462 }
463 if (ndr_flags & NDR_BUFFERS) {
464 }
465 return NDR_ERR_SUCCESS;
466 }
467
468 _PUBLIC_ enum ndr_err_code ndr_pull_repsFromTo1OtherInfo(struct ndr_pull *ndr, int ndr_flags, struct repsFromTo1OtherInfo *r)
/* [<][>][^][v][top][bottom][index][help] */
469 {
470 if (ndr_flags & NDR_SCALARS) {
471 NDR_CHECK(ndr_pull_align(ndr, 4));
472 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__dns_name_size));
473 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_name, r->__dns_name_size, sizeof(uint8_t), CH_DOS));
474 }
475 if (ndr_flags & NDR_BUFFERS) {
476 }
477 return NDR_ERR_SUCCESS;
478 }
479
480 _PUBLIC_ void ndr_print_repsFromTo1OtherInfo(struct ndr_print *ndr, const char *name, const struct repsFromTo1OtherInfo *r)
/* [<][>][^][v][top][bottom][index][help] */
481 {
482 ndr_print_struct(ndr, name, "repsFromTo1OtherInfo");
483 ndr->depth++;
484 ndr_print_uint32(ndr, "__dns_name_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->dns_name) + 1:r->__dns_name_size);
485 ndr_print_string(ndr, "dns_name", r->dns_name);
486 ndr->depth--;
487 }
488
489 _PUBLIC_ size_t ndr_size_repsFromTo1OtherInfo(const struct repsFromTo1OtherInfo *r, struct smb_iconv_convenience *ic, int flags)
/* [<][>][^][v][top][bottom][index][help] */
490 {
491 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_repsFromTo1OtherInfo, ic);
492 }
493
494 _PUBLIC_ enum ndr_err_code ndr_push_repsFromTo1(struct ndr_push *ndr, int ndr_flags, const struct repsFromTo1 *r)
/* [<][>][^][v][top][bottom][index][help] */
495 {
496 {
497 uint32_t _flags_save_STRUCT = ndr->flags;
498 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
499 if (ndr_flags & NDR_SCALARS) {
500 NDR_CHECK(ndr_push_align(ndr, 8));
501 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo1(r, ndr->iconv_convenience, ndr->flags) + 8));
502 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->consecutive_sync_failures));
503 NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->last_success));
504 NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->last_attempt));
505 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->result_last_attempt));
506 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->other_info));
507 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_repsFromTo1OtherInfo(r->other_info, ndr->iconv_convenience, ndr->flags)));
508 NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourFlags(ndr, NDR_SCALARS, r->replica_flags));
509 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
510 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
511 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
512 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid));
513 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
514 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->transport_guid));
515 }
516 if (ndr_flags & NDR_BUFFERS) {
517 if (r->other_info) {
518 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->other_info));
519 NDR_CHECK(ndr_push_repsFromTo1OtherInfo(ndr, NDR_SCALARS, r->other_info));
520 }
521 }
522 ndr->flags = _flags_save_STRUCT;
523 }
524 return NDR_ERR_SUCCESS;
525 }
526
527 _PUBLIC_ enum ndr_err_code ndr_pull_repsFromTo1(struct ndr_pull *ndr, int ndr_flags, struct repsFromTo1 *r)
/* [<][>][^][v][top][bottom][index][help] */
528 {
529 uint32_t _ptr_other_info;
530 TALLOC_CTX *_mem_save_other_info_0;
531 {
532 uint32_t _flags_save_STRUCT = ndr->flags;
533 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
534 if (ndr_flags & NDR_SCALARS) {
535 NDR_CHECK(ndr_pull_align(ndr, 8));
536 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->blobsize));
537 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->consecutive_sync_failures));
538 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->last_success));
539 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->last_attempt));
540 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->result_last_attempt));
541 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_other_info));
542 if (_ptr_other_info) {
543 NDR_PULL_ALLOC(ndr, r->other_info);
544 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->other_info, _ptr_other_info));
545 } else {
546 r->other_info = NULL;
547 }
548 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->other_info_length));
549 NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourFlags(ndr, NDR_SCALARS, &r->replica_flags));
550 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
551 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
552 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
553 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid));
554 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
555 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->transport_guid));
556 }
557 if (ndr_flags & NDR_BUFFERS) {
558 if (r->other_info) {
559 uint32_t _relative_save_offset;
560 _relative_save_offset = ndr->offset;
561 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->other_info));
562 _mem_save_other_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
563 NDR_PULL_SET_MEM_CTX(ndr, r->other_info, 0);
564 NDR_CHECK(ndr_pull_repsFromTo1OtherInfo(ndr, NDR_SCALARS, r->other_info));
565 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_other_info_0, 0);
566 ndr->offset = _relative_save_offset;
567 }
568 }
569 ndr->flags = _flags_save_STRUCT;
570 }
571 return NDR_ERR_SUCCESS;
572 }
573
574 _PUBLIC_ void ndr_print_repsFromTo1(struct ndr_print *ndr, const char *name, const struct repsFromTo1 *r)
/* [<][>][^][v][top][bottom][index][help] */
575 {
576 ndr_print_struct(ndr, name, "repsFromTo1");
577 {
578 uint32_t _flags_save_STRUCT = ndr->flags;
579 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
580 ndr->depth++;
581 ndr_print_uint32(ndr, "blobsize", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_repsFromTo1(r, ndr->iconv_convenience, ndr->flags) + 8:r->blobsize);
582 ndr_print_uint32(ndr, "consecutive_sync_failures", r->consecutive_sync_failures);
583 ndr_print_NTTIME_1sec(ndr, "last_success", r->last_success);
584 ndr_print_NTTIME_1sec(ndr, "last_attempt", r->last_attempt);
585 ndr_print_WERROR(ndr, "result_last_attempt", r->result_last_attempt);
586 ndr_print_ptr(ndr, "other_info", r->other_info);
587 ndr->depth++;
588 if (r->other_info) {
589 ndr_print_repsFromTo1OtherInfo(ndr, "other_info", r->other_info);
590 }
591 ndr->depth--;
592 ndr_print_uint32(ndr, "other_info_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_repsFromTo1OtherInfo(r->other_info, ndr->iconv_convenience, ndr->flags):r->other_info_length);
593 ndr_print_drsuapi_DsReplicaNeighbourFlags(ndr, "replica_flags", r->replica_flags);
594 ndr_print_array_uint8(ndr, "schedule", r->schedule, 84);
595 ndr_print_uint32(ndr, "reserved", r->reserved);
596 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
597 ndr_print_GUID(ndr, "source_dsa_obj_guid", &r->source_dsa_obj_guid);
598 ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
599 ndr_print_GUID(ndr, "transport_guid", &r->transport_guid);
600 ndr->depth--;
601 ndr->flags = _flags_save_STRUCT;
602 }
603 }
604
605 _PUBLIC_ size_t ndr_size_repsFromTo1(const struct repsFromTo1 *r, struct smb_iconv_convenience *ic, int flags)
/* [<][>][^][v][top][bottom][index][help] */
606 {
607 flags |= LIBNDR_PRINT_ARRAY_HEX;
608 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_repsFromTo1, ic);
609 }
610
611 static enum ndr_err_code ndr_push_repsFromTo(struct ndr_push *ndr, int ndr_flags, const union repsFromTo *r)
/* [<][>][^][v][top][bottom][index][help] */
612 {
613 if (ndr_flags & NDR_SCALARS) {
614 int level = ndr_push_get_switch_value(ndr, r);
615 switch (level) {
616 case 1: {
617 NDR_CHECK(ndr_push_repsFromTo1(ndr, NDR_SCALARS, &r->ctr1));
618 break; }
619
620 default:
621 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
622 }
623 }
624 if (ndr_flags & NDR_BUFFERS) {
625 int level = ndr_push_get_switch_value(ndr, r);
626 switch (level) {
627 case 1:
628 NDR_CHECK(ndr_push_repsFromTo1(ndr, NDR_BUFFERS, &r->ctr1));
629 break;
630
631 default:
632 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
633 }
634 }
635 return NDR_ERR_SUCCESS;
636 }
637
638 static enum ndr_err_code ndr_pull_repsFromTo(struct ndr_pull *ndr, int ndr_flags, union repsFromTo *r)
/* [<][>][^][v][top][bottom][index][help] */
639 {
640 int level;
641 level = ndr_pull_get_switch_value(ndr, r);
642 if (ndr_flags & NDR_SCALARS) {
643 switch (level) {
644 case 1: {
645 NDR_CHECK(ndr_pull_repsFromTo1(ndr, NDR_SCALARS, &r->ctr1));
646 break; }
647
648 default:
649 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
650 }
651 }
652 if (ndr_flags & NDR_BUFFERS) {
653 switch (level) {
654 case 1:
655 NDR_CHECK(ndr_pull_repsFromTo1(ndr, NDR_BUFFERS, &r->ctr1));
656 break;
657
658 default:
659 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
660 }
661 }
662 return NDR_ERR_SUCCESS;
663 }
664
665 _PUBLIC_ void ndr_print_repsFromTo(struct ndr_print *ndr, const char *name, const union repsFromTo *r)
/* [<][>][^][v][top][bottom][index][help] */
666 {
667 int level;
668 level = ndr_print_get_switch_value(ndr, r);
669 ndr_print_union(ndr, name, level, "repsFromTo");
670 switch (level) {
671 case 1:
672 ndr_print_repsFromTo1(ndr, "ctr1", &r->ctr1);
673 break;
674
675 default:
676 ndr_print_bad_level(ndr, name, level);
677 }
678 }
679
680 _PUBLIC_ enum ndr_err_code ndr_push_repsFromToBlob(struct ndr_push *ndr, int ndr_flags, const struct repsFromToBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
681 {
682 if (ndr_flags & NDR_SCALARS) {
683 NDR_CHECK(ndr_push_align(ndr, 8));
684 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
685 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
686 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
687 NDR_CHECK(ndr_push_repsFromTo(ndr, NDR_SCALARS, &r->ctr));
688 }
689 if (ndr_flags & NDR_BUFFERS) {
690 NDR_CHECK(ndr_push_repsFromTo(ndr, NDR_BUFFERS, &r->ctr));
691 }
692 return NDR_ERR_SUCCESS;
693 }
694
695 _PUBLIC_ enum ndr_err_code ndr_pull_repsFromToBlob(struct ndr_pull *ndr, int ndr_flags, struct repsFromToBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
696 {
697 if (ndr_flags & NDR_SCALARS) {
698 NDR_CHECK(ndr_pull_align(ndr, 8));
699 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
700 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
701 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
702 NDR_CHECK(ndr_pull_repsFromTo(ndr, NDR_SCALARS, &r->ctr));
703 }
704 if (ndr_flags & NDR_BUFFERS) {
705 NDR_CHECK(ndr_pull_repsFromTo(ndr, NDR_BUFFERS, &r->ctr));
706 }
707 return NDR_ERR_SUCCESS;
708 }
709
710 _PUBLIC_ void ndr_print_repsFromToBlob(struct ndr_print *ndr, const char *name, const struct repsFromToBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
711 {
712 ndr_print_struct(ndr, name, "repsFromToBlob");
713 ndr->depth++;
714 ndr_print_uint32(ndr, "version", r->version);
715 ndr_print_uint32(ndr, "reserved", r->reserved);
716 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
717 ndr_print_repsFromTo(ndr, "ctr", &r->ctr);
718 ndr->depth--;
719 }
720
721 static enum ndr_err_code ndr_push_partialAttributeSetCtr1(struct ndr_push *ndr, int ndr_flags, const struct partialAttributeSetCtr1 *r)
/* [<][>][^][v][top][bottom][index][help] */
722 {
723 uint32_t cntr_array_0;
724 if (ndr_flags & NDR_SCALARS) {
725 NDR_CHECK(ndr_push_align(ndr, 4));
726 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
727 for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) {
728 NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->array[cntr_array_0]));
729 }
730 }
731 if (ndr_flags & NDR_BUFFERS) {
732 }
733 return NDR_ERR_SUCCESS;
734 }
735
736 static enum ndr_err_code ndr_pull_partialAttributeSetCtr1(struct ndr_pull *ndr, int ndr_flags, struct partialAttributeSetCtr1 *r)
/* [<][>][^][v][top][bottom][index][help] */
737 {
738 uint32_t cntr_array_0;
739 TALLOC_CTX *_mem_save_array_0;
740 if (ndr_flags & NDR_SCALARS) {
741 NDR_CHECK(ndr_pull_align(ndr, 4));
742 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
743 NDR_PULL_ALLOC_N(ndr, r->array, r->count);
744 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
745 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
746 for (cntr_array_0 = 0; cntr_array_0 < r->count; cntr_array_0++) {
747 NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
748 }
749 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
750 }
751 if (ndr_flags & NDR_BUFFERS) {
752 }
753 return NDR_ERR_SUCCESS;
754 }
755
756 _PUBLIC_ void ndr_print_partialAttributeSetCtr1(struct ndr_print *ndr, const char *name, const struct partialAttributeSetCtr1 *r)
/* [<][>][^][v][top][bottom][index][help] */
757 {
758 uint32_t cntr_array_0;
759 ndr_print_struct(ndr, name, "partialAttributeSetCtr1");
760 ndr->depth++;
761 ndr_print_uint32(ndr, "count", r->count);
762 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
763 ndr->depth++;
764 for (cntr_array_0=0;cntr_array_0<r->count;cntr_array_0++) {
765 char *idx_0=NULL;
766 if (asprintf(&idx_0, "[%d]", cntr_array_0) != -1) {
767 ndr_print_drsuapi_DsAttributeId(ndr, "array", r->array[cntr_array_0]);
768 free(idx_0);
769 }
770 }
771 ndr->depth--;
772 ndr->depth--;
773 }
774
775 static enum ndr_err_code ndr_push_partialAttributeSetCtr(struct ndr_push *ndr, int ndr_flags, const union partialAttributeSetCtr *r)
/* [<][>][^][v][top][bottom][index][help] */
776 {
777 if (ndr_flags & NDR_SCALARS) {
778 int level = ndr_push_get_switch_value(ndr, r);
779 switch (level) {
780 case 1: {
781 NDR_CHECK(ndr_push_partialAttributeSetCtr1(ndr, NDR_SCALARS, &r->ctr1));
782 break; }
783
784 default:
785 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
786 }
787 }
788 if (ndr_flags & NDR_BUFFERS) {
789 int level = ndr_push_get_switch_value(ndr, r);
790 switch (level) {
791 case 1:
792 break;
793
794 default:
795 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
796 }
797 }
798 return NDR_ERR_SUCCESS;
799 }
800
801 static enum ndr_err_code ndr_pull_partialAttributeSetCtr(struct ndr_pull *ndr, int ndr_flags, union partialAttributeSetCtr *r)
/* [<][>][^][v][top][bottom][index][help] */
802 {
803 int level;
804 level = ndr_pull_get_switch_value(ndr, r);
805 if (ndr_flags & NDR_SCALARS) {
806 switch (level) {
807 case 1: {
808 NDR_CHECK(ndr_pull_partialAttributeSetCtr1(ndr, NDR_SCALARS, &r->ctr1));
809 break; }
810
811 default:
812 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
813 }
814 }
815 if (ndr_flags & NDR_BUFFERS) {
816 switch (level) {
817 case 1:
818 break;
819
820 default:
821 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
822 }
823 }
824 return NDR_ERR_SUCCESS;
825 }
826
827 _PUBLIC_ void ndr_print_partialAttributeSetCtr(struct ndr_print *ndr, const char *name, const union partialAttributeSetCtr *r)
/* [<][>][^][v][top][bottom][index][help] */
828 {
829 int level;
830 level = ndr_print_get_switch_value(ndr, r);
831 ndr_print_union(ndr, name, level, "partialAttributeSetCtr");
832 switch (level) {
833 case 1:
834 ndr_print_partialAttributeSetCtr1(ndr, "ctr1", &r->ctr1);
835 break;
836
837 default:
838 ndr_print_bad_level(ndr, name, level);
839 }
840 }
841
842 _PUBLIC_ enum ndr_err_code ndr_push_partialAttributeSetBlob(struct ndr_push *ndr, int ndr_flags, const struct partialAttributeSetBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
843 {
844 if (ndr_flags & NDR_SCALARS) {
845 NDR_CHECK(ndr_push_align(ndr, 4));
846 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
847 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
848 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
849 NDR_CHECK(ndr_push_partialAttributeSetCtr(ndr, NDR_SCALARS, &r->ctr));
850 }
851 if (ndr_flags & NDR_BUFFERS) {
852 }
853 return NDR_ERR_SUCCESS;
854 }
855
856 _PUBLIC_ enum ndr_err_code ndr_pull_partialAttributeSetBlob(struct ndr_pull *ndr, int ndr_flags, struct partialAttributeSetBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
857 {
858 if (ndr_flags & NDR_SCALARS) {
859 NDR_CHECK(ndr_pull_align(ndr, 4));
860 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
861 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
862 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
863 NDR_CHECK(ndr_pull_partialAttributeSetCtr(ndr, NDR_SCALARS, &r->ctr));
864 }
865 if (ndr_flags & NDR_BUFFERS) {
866 }
867 return NDR_ERR_SUCCESS;
868 }
869
870 _PUBLIC_ void ndr_print_partialAttributeSetBlob(struct ndr_print *ndr, const char *name, const struct partialAttributeSetBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
871 {
872 ndr_print_struct(ndr, name, "partialAttributeSetBlob");
873 ndr->depth++;
874 ndr_print_uint32(ndr, "version", r->version);
875 ndr_print_uint32(ndr, "reserved", r->reserved);
876 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
877 ndr_print_partialAttributeSetCtr(ndr, "ctr", &r->ctr);
878 ndr->depth--;
879 }
880
881 static enum ndr_err_code ndr_push_prefixMapVersion(struct ndr_push *ndr, int ndr_flags, enum prefixMapVersion r)
/* [<][>][^][v][top][bottom][index][help] */
882 {
883 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
884 return NDR_ERR_SUCCESS;
885 }
886
887 static enum ndr_err_code ndr_pull_prefixMapVersion(struct ndr_pull *ndr, int ndr_flags, enum prefixMapVersion *r)
/* [<][>][^][v][top][bottom][index][help] */
888 {
889 uint32_t v;
890 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
891 *r = v;
892 return NDR_ERR_SUCCESS;
893 }
894
895 _PUBLIC_ void ndr_print_prefixMapVersion(struct ndr_print *ndr, const char *name, enum prefixMapVersion r)
/* [<][>][^][v][top][bottom][index][help] */
896 {
897 const char *val = NULL;
898
899 switch (r) {
900 case PREFIX_MAP_VERSION_DSDB: val = "PREFIX_MAP_VERSION_DSDB"; break;
901 }
902 ndr_print_enum(ndr, name, "ENUM", val, r);
903 }
904
905 static enum ndr_err_code ndr_push_prefixMapCtr(struct ndr_push *ndr, int ndr_flags, const union prefixMapCtr *r)
/* [<][>][^][v][top][bottom][index][help] */
906 {
907 if (ndr_flags & NDR_SCALARS) {
908 int level = ndr_push_get_switch_value(ndr, r);
909 switch (level) {
910 case PREFIX_MAP_VERSION_DSDB: {
911 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->dsdb));
912 break; }
913
914 default:
915 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
916 }
917 }
918 if (ndr_flags & NDR_BUFFERS) {
919 int level = ndr_push_get_switch_value(ndr, r);
920 switch (level) {
921 case PREFIX_MAP_VERSION_DSDB:
922 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->dsdb));
923 break;
924
925 default:
926 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
927 }
928 }
929 return NDR_ERR_SUCCESS;
930 }
931
932 static enum ndr_err_code ndr_pull_prefixMapCtr(struct ndr_pull *ndr, int ndr_flags, union prefixMapCtr *r)
/* [<][>][^][v][top][bottom][index][help] */
933 {
934 int level;
935 level = ndr_pull_get_switch_value(ndr, r);
936 if (ndr_flags & NDR_SCALARS) {
937 switch (level) {
938 case PREFIX_MAP_VERSION_DSDB: {
939 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->dsdb));
940 break; }
941
942 default:
943 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
944 }
945 }
946 if (ndr_flags & NDR_BUFFERS) {
947 switch (level) {
948 case PREFIX_MAP_VERSION_DSDB:
949 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->dsdb));
950 break;
951
952 default:
953 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
954 }
955 }
956 return NDR_ERR_SUCCESS;
957 }
958
959 _PUBLIC_ void ndr_print_prefixMapCtr(struct ndr_print *ndr, const char *name, const union prefixMapCtr *r)
/* [<][>][^][v][top][bottom][index][help] */
960 {
961 int level;
962 level = ndr_print_get_switch_value(ndr, r);
963 ndr_print_union(ndr, name, level, "prefixMapCtr");
964 switch (level) {
965 case PREFIX_MAP_VERSION_DSDB:
966 ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, "dsdb", &r->dsdb);
967 break;
968
969 default:
970 ndr_print_bad_level(ndr, name, level);
971 }
972 }
973
974 _PUBLIC_ enum ndr_err_code ndr_push_prefixMapBlob(struct ndr_push *ndr, int ndr_flags, const struct prefixMapBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
975 {
976 if (ndr_flags & NDR_SCALARS) {
977 NDR_CHECK(ndr_push_align(ndr, 4));
978 NDR_CHECK(ndr_push_prefixMapVersion(ndr, NDR_SCALARS, r->version));
979 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
980 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
981 NDR_CHECK(ndr_push_prefixMapCtr(ndr, NDR_SCALARS, &r->ctr));
982 }
983 if (ndr_flags & NDR_BUFFERS) {
984 NDR_CHECK(ndr_push_prefixMapCtr(ndr, NDR_BUFFERS, &r->ctr));
985 }
986 return NDR_ERR_SUCCESS;
987 }
988
989 _PUBLIC_ enum ndr_err_code ndr_pull_prefixMapBlob(struct ndr_pull *ndr, int ndr_flags, struct prefixMapBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
990 {
991 if (ndr_flags & NDR_SCALARS) {
992 NDR_CHECK(ndr_pull_align(ndr, 4));
993 NDR_CHECK(ndr_pull_prefixMapVersion(ndr, NDR_SCALARS, &r->version));
994 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
995 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
996 NDR_CHECK(ndr_pull_prefixMapCtr(ndr, NDR_SCALARS, &r->ctr));
997 }
998 if (ndr_flags & NDR_BUFFERS) {
999 NDR_CHECK(ndr_pull_prefixMapCtr(ndr, NDR_BUFFERS, &r->ctr));
1000 }
1001 return NDR_ERR_SUCCESS;
1002 }
1003
1004 _PUBLIC_ void ndr_print_prefixMapBlob(struct ndr_print *ndr, const char *name, const struct prefixMapBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
1005 {
1006 ndr_print_struct(ndr, name, "prefixMapBlob");
1007 ndr->depth++;
1008 ndr_print_prefixMapVersion(ndr, "version", r->version);
1009 ndr_print_uint32(ndr, "reserved", r->reserved);
1010 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
1011 ndr_print_prefixMapCtr(ndr, "ctr", &r->ctr);
1012 ndr->depth--;
1013 }
1014
1015 static enum ndr_err_code ndr_push_ldapControlDirSyncExtra(struct ndr_push *ndr, int ndr_flags, const union ldapControlDirSyncExtra *r)
/* [<][>][^][v][top][bottom][index][help] */
1016 {
1017 if (ndr_flags & NDR_SCALARS) {
1018 int level = ndr_push_get_switch_value(ndr, r);
1019 switch (level) {
1020 case 0: {
1021 break; }
1022
1023 default: {
1024 NDR_CHECK(ndr_push_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->uptodateness_vector));
1025 break; }
1026
1027 }
1028 }
1029 if (ndr_flags & NDR_BUFFERS) {
1030 int level = ndr_push_get_switch_value(ndr, r);
1031 switch (level) {
1032 case 0:
1033 break;
1034
1035 default:
1036 break;
1037
1038 }
1039 }
1040 return NDR_ERR_SUCCESS;
1041 }
1042
1043 static enum ndr_err_code ndr_pull_ldapControlDirSyncExtra(struct ndr_pull *ndr, int ndr_flags, union ldapControlDirSyncExtra *r)
/* [<][>][^][v][top][bottom][index][help] */
1044 {
1045 int level;
1046 level = ndr_pull_get_switch_value(ndr, r);
1047 if (ndr_flags & NDR_SCALARS) {
1048 switch (level) {
1049 case 0: {
1050 break; }
1051
1052 default: {
1053 NDR_CHECK(ndr_pull_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->uptodateness_vector));
1054 break; }
1055
1056 }
1057 }
1058 if (ndr_flags & NDR_BUFFERS) {
1059 switch (level) {
1060 case 0:
1061 break;
1062
1063 default:
1064 break;
1065
1066 }
1067 }
1068 return NDR_ERR_SUCCESS;
1069 }
1070
1071 _PUBLIC_ void ndr_print_ldapControlDirSyncExtra(struct ndr_print *ndr, const char *name, const union ldapControlDirSyncExtra *r)
/* [<][>][^][v][top][bottom][index][help] */
1072 {
1073 int level;
1074 level = ndr_print_get_switch_value(ndr, r);
1075 ndr_print_union(ndr, name, level, "ldapControlDirSyncExtra");
1076 switch (level) {
1077 case 0:
1078 break;
1079
1080 default:
1081 ndr_print_replUpToDateVectorBlob(ndr, "uptodateness_vector", &r->uptodateness_vector);
1082 break;
1083
1084 }
1085 }
1086
1087 static size_t ndr_size_ldapControlDirSyncExtra(const union ldapControlDirSyncExtra *r, uint32_t level, struct smb_iconv_convenience *ic, int flags)
/* [<][>][^][v][top][bottom][index][help] */
1088 {
1089 return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_ldapControlDirSyncExtra, ic);
1090 }
1091
1092 static enum ndr_err_code ndr_push_ldapControlDirSyncBlob(struct ndr_push *ndr, int ndr_flags, const struct ldapControlDirSyncBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
1093 {
1094 if (ndr_flags & NDR_SCALARS) {
1095 NDR_CHECK(ndr_push_align(ndr, 8));
1096 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 3));
1097 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time));
1098 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u2));
1099 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u3));
1100 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, ndr->iconv_convenience, 0)));
1101 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
1102 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid1));
1103 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->extra, ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, ndr->iconv_convenience, 0)));
1104 NDR_CHECK(ndr_push_ldapControlDirSyncExtra(ndr, NDR_SCALARS, &r->extra));
1105 }
1106 if (ndr_flags & NDR_BUFFERS) {
1107 NDR_CHECK(ndr_push_ldapControlDirSyncExtra(ndr, NDR_BUFFERS, &r->extra));
1108 }
1109 return NDR_ERR_SUCCESS;
1110 }
1111
1112 static enum ndr_err_code ndr_pull_ldapControlDirSyncBlob(struct ndr_pull *ndr, int ndr_flags, struct ldapControlDirSyncBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
1113 {
1114 if (ndr_flags & NDR_SCALARS) {
1115 NDR_CHECK(ndr_pull_align(ndr, 8));
1116 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u1));
1117 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time));
1118 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u2));
1119 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u3));
1120 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->extra_length));
1121 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
1122 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid1));
1123 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->extra, r->extra_length));
1124 NDR_CHECK(ndr_pull_ldapControlDirSyncExtra(ndr, NDR_SCALARS, &r->extra));
1125 }
1126 if (ndr_flags & NDR_BUFFERS) {
1127 NDR_CHECK(ndr_pull_ldapControlDirSyncExtra(ndr, NDR_BUFFERS, &r->extra));
1128 }
1129 return NDR_ERR_SUCCESS;
1130 }
1131
1132 _PUBLIC_ void ndr_print_ldapControlDirSyncBlob(struct ndr_print *ndr, const char *name, const struct ldapControlDirSyncBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
1133 {
1134 ndr_print_struct(ndr, name, "ldapControlDirSyncBlob");
1135 ndr->depth++;
1136 ndr_print_uint32(ndr, "u1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?3:r->u1);
1137 ndr_print_NTTIME(ndr, "time", r->time);
1138 ndr_print_uint32(ndr, "u2", r->u2);
1139 ndr_print_uint32(ndr, "u3", r->u3);
1140 ndr_print_uint32(ndr, "extra_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_ldapControlDirSyncExtra(&r->extra, r->extra.uptodateness_vector.version, ndr->iconv_convenience, 0):r->extra_length);
1141 ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
1142 ndr_print_GUID(ndr, "guid1", &r->guid1);
1143 ndr_print_set_switch_value(ndr, &r->extra, r->extra_length);
1144 ndr_print_ldapControlDirSyncExtra(ndr, "extra", &r->extra);
1145 ndr->depth--;
1146 }
1147
1148 _PUBLIC_ enum ndr_err_code ndr_push_ldapControlDirSyncCookie(struct ndr_push *ndr, int ndr_flags, const struct ldapControlDirSyncCookie *r)
/* [<][>][^][v][top][bottom][index][help] */
1149 {
1150 uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
1151 if (ndr_flags & NDR_SCALARS) {
1152 NDR_CHECK(ndr_push_align(ndr, 8));
1153 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
1154 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "MSDS", 4, sizeof(uint8_t), CH_DOS));
1155 {
1156 struct ndr_push *_ndr_blob;
1157 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_blob, 0, -1));
1158 NDR_CHECK(ndr_push_ldapControlDirSyncBlob(_ndr_blob, NDR_SCALARS|NDR_BUFFERS, &r->blob));
1159 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_blob, 0, -1));
1160 }
1161 }
1162 if (ndr_flags & NDR_BUFFERS) {
1163 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
1164 }
1165 ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
1166 return NDR_ERR_SUCCESS;
1167 }
1168
1169 _PUBLIC_ enum ndr_err_code ndr_pull_ldapControlDirSyncCookie(struct ndr_pull *ndr, int ndr_flags, struct ldapControlDirSyncCookie *r)
/* [<][>][^][v][top][bottom][index][help] */
1170 {
1171 uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
1172 if (ndr_flags & NDR_SCALARS) {
1173 NDR_CHECK(ndr_pull_align(ndr, 8));
1174 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
1175 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->msds, 4, sizeof(uint8_t), CH_DOS));
1176 {
1177 struct ndr_pull *_ndr_blob;
1178 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_blob, 0, -1));
1179 NDR_CHECK(ndr_pull_ldapControlDirSyncBlob(_ndr_blob, NDR_SCALARS|NDR_BUFFERS, &r->blob));
1180 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_blob, 0, -1));
1181 }
1182 }
1183 if (ndr_flags & NDR_BUFFERS) {
1184 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
1185 }
1186 ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
1187 return NDR_ERR_SUCCESS;
1188 }
1189
1190 _PUBLIC_ void ndr_print_ldapControlDirSyncCookie(struct ndr_print *ndr, const char *name, const struct ldapControlDirSyncCookie *r)
/* [<][>][^][v][top][bottom][index][help] */
1191 {
1192 ndr_print_struct(ndr, name, "ldapControlDirSyncCookie");
1193 ndr->depth++;
1194 ndr_print_string(ndr, "msds", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"MSDS":r->msds);
1195 ndr_print_ldapControlDirSyncBlob(ndr, "blob", &r->blob);
1196 ndr->depth--;
1197 }
1198
1199 static enum ndr_err_code ndr_push_supplementalCredentialsPackage(struct ndr_push *ndr, int ndr_flags, const struct supplementalCredentialsPackage *r)
/* [<][>][^][v][top][bottom][index][help] */
1200 {
1201 if (ndr_flags & NDR_SCALARS) {
1202 NDR_CHECK(ndr_push_align(ndr, 2));
1203 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->name)));
1204 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen(r->data)));
1205 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved));
1206 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, 2 * strlen_m(r->name), sizeof(uint8_t), CH_UTF16));
1207 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data, strlen(r->data), sizeof(uint8_t), CH_DOS));
1208 }
1209 if (ndr_flags & NDR_BUFFERS) {
1210 }
1211 return NDR_ERR_SUCCESS;
1212 }
1213
1214 static enum ndr_err_code ndr_pull_supplementalCredentialsPackage(struct ndr_pull *ndr, int ndr_flags, struct supplementalCredentialsPackage *r)
/* [<][>][^][v][top][bottom][index][help] */
1215 {
1216 if (ndr_flags & NDR_SCALARS) {
1217 NDR_CHECK(ndr_pull_align(ndr, 2));
1218 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->name_len));
1219 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->data_len));
1220 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved));
1221 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, r->name_len, sizeof(uint8_t), CH_UTF16));
1222 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data, r->data_len, sizeof(uint8_t), CH_DOS));
1223 }
1224 if (ndr_flags & NDR_BUFFERS) {
1225 }
1226 return NDR_ERR_SUCCESS;
1227 }
1228
1229 _PUBLIC_ void ndr_print_supplementalCredentialsPackage(struct ndr_print *ndr, const char *name, const struct supplementalCredentialsPackage *r)
/* [<][>][^][v][top][bottom][index][help] */
1230 {
1231 ndr_print_struct(ndr, name, "supplementalCredentialsPackage");
1232 ndr->depth++;
1233 ndr_print_uint16(ndr, "name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->name):r->name_len);
1234 ndr_print_uint16(ndr, "data_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->data):r->data_len);
1235 ndr_print_uint16(ndr, "reserved", r->reserved);
1236 ndr_print_string(ndr, "name", r->name);
1237 ndr_print_string(ndr, "data", r->data);
1238 ndr->depth--;
1239 }
1240
1241 static enum ndr_err_code ndr_push_supplementalCredentialsSignature(struct ndr_push *ndr, int ndr_flags, enum supplementalCredentialsSignature r)
/* [<][>][^][v][top][bottom][index][help] */
1242 {
1243 {
1244 uint32_t _flags_save_ENUM = ndr->flags;
1245 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1246 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
1247 ndr->flags = _flags_save_ENUM;
1248 }
1249 return NDR_ERR_SUCCESS;
1250 }
1251
1252 static enum ndr_err_code ndr_pull_supplementalCredentialsSignature(struct ndr_pull *ndr, int ndr_flags, enum supplementalCredentialsSignature *r)
/* [<][>][^][v][top][bottom][index][help] */
1253 {
1254 uint16_t v;
1255 {
1256 uint32_t _flags_save_ENUM = ndr->flags;
1257 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1258 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
1259 *r = v;
1260 ndr->flags = _flags_save_ENUM;
1261 }
1262 return NDR_ERR_SUCCESS;
1263 }
1264
1265 _PUBLIC_ void ndr_print_supplementalCredentialsSignature(struct ndr_print *ndr, const char *name, enum supplementalCredentialsSignature r)
/* [<][>][^][v][top][bottom][index][help] */
1266 {
1267 const char *val = NULL;
1268
1269 {
1270 uint32_t _flags_save_ENUM = ndr->flags;
1271 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
1272 switch (r) {
1273 case SUPPLEMENTAL_CREDENTIALS_SIGNATURE: val = "SUPPLEMENTAL_CREDENTIALS_SIGNATURE"; break;
1274 }
1275 ndr_print_enum(ndr, name, "ENUM", val, r);
1276 ndr->flags = _flags_save_ENUM;
1277 }
1278 }
1279
1280 static enum ndr_err_code ndr_push_supplementalCredentialsSubBlob(struct ndr_push *ndr, int ndr_flags, const struct supplementalCredentialsSubBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
1281 {
1282 uint32_t cntr_packages_0;
1283 if (ndr_flags & NDR_SCALARS) {
1284 NDR_CHECK(ndr_push_align(ndr, 2));
1285 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, SUPPLEMENTAL_CREDENTIALS_PREFIX, 0x30, sizeof(uint16_t), CH_UTF16));
1286 NDR_CHECK(ndr_push_supplementalCredentialsSignature(ndr, NDR_SCALARS, SUPPLEMENTAL_CREDENTIALS_SIGNATURE));
1287 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_packages));
1288 for (cntr_packages_0 = 0; cntr_packages_0 < r->num_packages; cntr_packages_0++) {
1289 NDR_CHECK(ndr_push_supplementalCredentialsPackage(ndr, NDR_SCALARS, &r->packages[cntr_packages_0]));
1290 }
1291 }
1292 if (ndr_flags & NDR_BUFFERS) {
1293 }
1294 return NDR_ERR_SUCCESS;
1295 }
1296
1297 static enum ndr_err_code ndr_pull_supplementalCredentialsSubBlob(struct ndr_pull *ndr, int ndr_flags, struct supplementalCredentialsSubBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
1298 {
1299 uint32_t cntr_packages_0;
1300 TALLOC_CTX *_mem_save_packages_0;
1301 if (ndr_flags & NDR_SCALARS) {
1302 NDR_CHECK(ndr_pull_align(ndr, 2));
1303 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->prefix, 0x30, sizeof(uint16_t), CH_UTF16));
1304 NDR_CHECK(ndr_pull_supplementalCredentialsSignature(ndr, NDR_SCALARS, &r->signature));
1305 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_packages));
1306 NDR_PULL_ALLOC_N(ndr, r->packages, r->num_packages);
1307 _mem_save_packages_0 = NDR_PULL_GET_MEM_CTX(ndr);
1308 NDR_PULL_SET_MEM_CTX(ndr, r->packages, 0);
1309 for (cntr_packages_0 = 0; cntr_packages_0 < r->num_packages; cntr_packages_0++) {
1310 NDR_CHECK(ndr_pull_supplementalCredentialsPackage(ndr, NDR_SCALARS, &r->packages[cntr_packages_0]));
1311 }
1312 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_packages_0, 0);
1313 }
1314 if (ndr_flags & NDR_BUFFERS) {
1315 }
1316 return NDR_ERR_SUCCESS;
1317 }
1318
1319 _PUBLIC_ void ndr_print_supplementalCredentialsSubBlob(struct ndr_print *ndr, const char *name, const struct supplementalCredentialsSubBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
1320 {
1321 uint32_t cntr_packages_0;
1322 ndr_print_struct(ndr, name, "supplementalCredentialsSubBlob");
1323 ndr->depth++;
1324 ndr_print_string(ndr, "prefix", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?SUPPLEMENTAL_CREDENTIALS_PREFIX:r->prefix);
1325 ndr_print_supplementalCredentialsSignature(ndr, "signature", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?SUPPLEMENTAL_CREDENTIALS_SIGNATURE:r->signature);
1326 ndr_print_uint16(ndr, "num_packages", r->num_packages);
1327 ndr->print(ndr, "%s: ARRAY(%d)", "packages", (int)r->num_packages);
1328 ndr->depth++;
1329 for (cntr_packages_0=0;cntr_packages_0<r->num_packages;cntr_packages_0++) {
1330 char *idx_0=NULL;
1331 if (asprintf(&idx_0, "[%d]", cntr_packages_0) != -1) {
1332 ndr_print_supplementalCredentialsPackage(ndr, "packages", &r->packages[cntr_packages_0]);
1333 free(idx_0);
1334 }
1335 }
1336 ndr->depth--;
1337 ndr->depth--;
1338 }
1339
1340 static size_t ndr_size_supplementalCredentialsSubBlob(const struct supplementalCredentialsSubBlob *r, struct smb_iconv_convenience *ic, int flags)
/* [<][>][^][v][top][bottom][index][help] */
1341 {
1342 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_supplementalCredentialsSubBlob, ic);
1343 }
1344
1345 _PUBLIC_ enum ndr_err_code ndr_push_supplementalCredentialsBlob(struct ndr_push *ndr, int ndr_flags, const struct supplementalCredentialsBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
1346 {
1347 if (ndr_flags & NDR_SCALARS) {
1348 NDR_CHECK(ndr_push_align(ndr, 4));
1349 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1350 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->iconv_convenience, ndr->flags)));
1351 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1352 {
1353 struct ndr_push *_ndr_sub;
1354 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sub, 0, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->iconv_convenience, ndr->flags)));
1355 NDR_CHECK(ndr_push_supplementalCredentialsSubBlob(_ndr_sub, NDR_SCALARS, &r->sub));
1356 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sub, 0, ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->iconv_convenience, ndr->flags)));
1357 }
1358 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 0));
1359 }
1360 if (ndr_flags & NDR_BUFFERS) {
1361 }
1362 return NDR_ERR_SUCCESS;
1363 }
1364
1365 _PUBLIC_ enum ndr_err_code ndr_pull_supplementalCredentialsBlob(struct ndr_pull *ndr, int ndr_flags, struct supplementalCredentialsBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
1366 {
1367 if (ndr_flags & NDR_SCALARS) {
1368 NDR_CHECK(ndr_pull_align(ndr, 4));
1369 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
1370 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
1371 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
1372 {
1373 struct ndr_pull *_ndr_sub;
1374 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sub, 0, r->__ndr_size));
1375 NDR_CHECK(ndr_pull_supplementalCredentialsSubBlob(_ndr_sub, NDR_SCALARS, &r->sub));
1376 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sub, 0, r->__ndr_size));
1377 }
1378 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->unknown3));
1379 }
1380 if (ndr_flags & NDR_BUFFERS) {
1381 }
1382 return NDR_ERR_SUCCESS;
1383 }
1384
1385 _PUBLIC_ void ndr_print_supplementalCredentialsBlob(struct ndr_print *ndr, const char *name, const struct supplementalCredentialsBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
1386 {
1387 ndr_print_struct(ndr, name, "supplementalCredentialsBlob");
1388 ndr->depth++;
1389 ndr_print_uint32(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown1);
1390 ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_supplementalCredentialsSubBlob(&r->sub, ndr->iconv_convenience, ndr->flags):r->__ndr_size);
1391 ndr_print_uint32(ndr, "unknown2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown2);
1392 ndr_print_supplementalCredentialsSubBlob(ndr, "sub", &r->sub);
1393 ndr_print_uint8(ndr, "unknown3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown3);
1394 ndr->depth--;
1395 }
1396
1397 _PUBLIC_ enum ndr_err_code ndr_push_package_PackagesBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PackagesBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
1398 {
1399 if (ndr_flags & NDR_SCALARS) {
1400 NDR_CHECK(ndr_push_align(ndr, 4));
1401 {
1402 uint32_t _flags_save_string_array = ndr->flags;
1403 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1404 NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->names));
1405 ndr->flags = _flags_save_string_array;
1406 }
1407 }
1408 if (ndr_flags & NDR_BUFFERS) {
1409 }
1410 return NDR_ERR_SUCCESS;
1411 }
1412
1413 _PUBLIC_ enum ndr_err_code ndr_pull_package_PackagesBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PackagesBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
1414 {
1415 if (ndr_flags & NDR_SCALARS) {
1416 NDR_CHECK(ndr_pull_align(ndr, 4));
1417 {
1418 uint32_t _flags_save_string_array = ndr->flags;
1419 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1420 NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->names));
1421 ndr->flags = _flags_save_string_array;
1422 }
1423 }
1424 if (ndr_flags & NDR_BUFFERS) {
1425 }
1426 return NDR_ERR_SUCCESS;
1427 }
1428
1429 _PUBLIC_ void ndr_print_package_PackagesBlob(struct ndr_print *ndr, const char *name, const struct package_PackagesBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
1430 {
1431 ndr_print_struct(ndr, name, "package_PackagesBlob");
1432 ndr->depth++;
1433 ndr_print_string_array(ndr, "names", r->names);
1434 ndr->depth--;
1435 }
1436
1437 static enum ndr_err_code ndr_push_package_PrimaryKerberosString(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosString *r)
/* [<][>][^][v][top][bottom][index][help] */
1438 {
1439 if (ndr_flags & NDR_SCALARS) {
1440 NDR_CHECK(ndr_push_align(ndr, 4));
1441 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
1442 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
1443 {
1444 uint32_t _flags_save_string = ndr->flags;
1445 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1446 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->string));
1447 ndr->flags = _flags_save_string;
1448 }
1449 }
1450 if (ndr_flags & NDR_BUFFERS) {
1451 {
1452 uint32_t _flags_save_string = ndr->flags;
1453 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1454 if (r->string) {
1455 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->string));
1456 {
1457 struct ndr_push *_ndr_string;
1458 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_string, 0, 2 * strlen_m(r->string)));
1459 NDR_CHECK(ndr_push_string(_ndr_string, NDR_SCALARS, r->string));
1460 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_string, 0, 2 * strlen_m(r->string)));
1461 }
1462 }
1463 ndr->flags = _flags_save_string;
1464 }
1465 }
1466 return NDR_ERR_SUCCESS;
1467 }
1468
1469 static enum ndr_err_code ndr_pull_package_PrimaryKerberosString(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosString *r)
/* [<][>][^][v][top][bottom][index][help] */
1470 {
1471 uint32_t _ptr_string;
1472 TALLOC_CTX *_mem_save_string_0;
1473 if (ndr_flags & NDR_SCALARS) {
1474 NDR_CHECK(ndr_pull_align(ndr, 4));
1475 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
1476 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
1477 {
1478 uint32_t _flags_save_string = ndr->flags;
1479 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1480 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
1481 if (_ptr_string) {
1482 NDR_PULL_ALLOC(ndr, r->string);
1483 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->string, _ptr_string));
1484 } else {
1485 r->string = NULL;
1486 }
1487 ndr->flags = _flags_save_string;
1488 }
1489 }
1490 if (ndr_flags & NDR_BUFFERS) {
1491 {
1492 uint32_t _flags_save_string = ndr->flags;
1493 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
1494 if (r->string) {
1495 uint32_t _relative_save_offset;
1496 _relative_save_offset = ndr->offset;
1497 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->string));
1498 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
1499 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
1500 {
1501 struct ndr_pull *_ndr_string;
1502 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_string, 0, r->size));
1503 NDR_CHECK(ndr_pull_string(_ndr_string, NDR_SCALARS, &r->string));
1504 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_string, 0, r->size));
1505 }
1506 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
1507 ndr->offset = _relative_save_offset;
1508 }
1509 ndr->flags = _flags_save_string;
1510 }
1511 }
1512 return NDR_ERR_SUCCESS;
1513 }
1514
1515 _PUBLIC_ void ndr_print_package_PrimaryKerberosString(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosString *r)
/* [<][>][^][v][top][bottom][index][help] */
1516 {
1517 ndr_print_struct(ndr, name, "package_PrimaryKerberosString");
1518 ndr->depth++;
1519 ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->length);
1520 ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->size);
1521 ndr_print_ptr(ndr, "string", r->string);
1522 ndr->depth++;
1523 if (r->string) {
1524 ndr_print_string(ndr, "string", r->string);
1525 }
1526 ndr->depth--;
1527 ndr->depth--;
1528 }
1529
1530 static enum ndr_err_code ndr_push_package_PrimaryKerberosKey3(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosKey3 *r)
/* [<][>][^][v][top][bottom][index][help] */
1531 {
1532 if (ndr_flags & NDR_SCALARS) {
1533 NDR_CHECK(ndr_push_align(ndr, 4));
1534 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
1535 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
1536 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1537 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->keytype));
1538 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (r->value?r->value->length:0)));
1539 {
1540 uint32_t _flags_save_DATA_BLOB = ndr->flags;
1541 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1542 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value));
1543 ndr->flags = _flags_save_DATA_BLOB;
1544 }
1545 }
1546 if (ndr_flags & NDR_BUFFERS) {
1547 {
1548 uint32_t _flags_save_DATA_BLOB = ndr->flags;
1549 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1550 if (r->value) {
1551 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value));
1552 {
1553 struct ndr_push *_ndr_value;
1554 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_value, 0, (r->value?r->value->length:0)));
1555 NDR_CHECK(ndr_push_DATA_BLOB(_ndr_value, NDR_SCALARS, *r->value));
1556 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_value, 0, (r->value?r->value->length:0)));
1557 }
1558 }
1559 ndr->flags = _flags_save_DATA_BLOB;
1560 }
1561 }
1562 return NDR_ERR_SUCCESS;
1563 }
1564
1565 static enum ndr_err_code ndr_pull_package_PrimaryKerberosKey3(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosKey3 *r)
/* [<][>][^][v][top][bottom][index][help] */
1566 {
1567 uint32_t _ptr_value;
1568 TALLOC_CTX *_mem_save_value_0;
1569 if (ndr_flags & NDR_SCALARS) {
1570 NDR_CHECK(ndr_pull_align(ndr, 4));
1571 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved1));
1572 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved2));
1573 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved3));
1574 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->keytype));
1575 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->value_len));
1576 {
1577 uint32_t _flags_save_DATA_BLOB = ndr->flags;
1578 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1579 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value));
1580 if (_ptr_value) {
1581 NDR_PULL_ALLOC(ndr, r->value);
1582 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value, _ptr_value));
1583 } else {
1584 r->value = NULL;
1585 }
1586 ndr->flags = _flags_save_DATA_BLOB;
1587 }
1588 }
1589 if (ndr_flags & NDR_BUFFERS) {
1590 {
1591 uint32_t _flags_save_DATA_BLOB = ndr->flags;
1592 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1593 if (r->value) {
1594 uint32_t _relative_save_offset;
1595 _relative_save_offset = ndr->offset;
1596 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value));
1597 _mem_save_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
1598 NDR_PULL_SET_MEM_CTX(ndr, r->value, 0);
1599 {
1600 struct ndr_pull *_ndr_value;
1601 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_value, 0, r->value_len));
1602 NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_value, NDR_SCALARS, r->value));
1603 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_value, 0, r->value_len));
1604 }
1605 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_0, 0);
1606 ndr->offset = _relative_save_offset;
1607 }
1608 ndr->flags = _flags_save_DATA_BLOB;
1609 }
1610 }
1611 return NDR_ERR_SUCCESS;
1612 }
1613
1614 _PUBLIC_ void ndr_print_package_PrimaryKerberosKey3(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosKey3 *r)
/* [<][>][^][v][top][bottom][index][help] */
1615 {
1616 ndr_print_struct(ndr, name, "package_PrimaryKerberosKey3");
1617 ndr->depth++;
1618 ndr_print_uint16(ndr, "reserved1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved1);
1619 ndr_print_uint16(ndr, "reserved2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved2);
1620 ndr_print_uint32(ndr, "reserved3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved3);
1621 ndr_print_uint32(ndr, "keytype", r->keytype);
1622 ndr_print_uint32(ndr, "value_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?(r->value?r->value->length:0):r->value_len);
1623 ndr_print_ptr(ndr, "value", r->value);
1624 ndr->depth++;
1625 if (r->value) {
1626 ndr_print_DATA_BLOB(ndr, "value", *r->value);
1627 }
1628 ndr->depth--;
1629 ndr->depth--;
1630 }
1631
1632 static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr3(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosCtr3 *r)
/* [<][>][^][v][top][bottom][index][help] */
1633 {
1634 uint32_t cntr_keys_0;
1635 uint32_t cntr_old_keys_0;
1636 if (ndr_flags & NDR_SCALARS) {
1637 NDR_CHECK(ndr_push_align(ndr, 4));
1638 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_keys));
1639 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_old_keys));
1640 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
1641 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1642 NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
1643 }
1644 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1645 NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
1646 }
1647 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1648 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1649 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1650 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1651 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1652 }
1653 if (ndr_flags & NDR_BUFFERS) {
1654 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
1655 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1656 NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
1657 }
1658 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1659 NDR_CHECK(ndr_push_package_PrimaryKerberosKey3(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
1660 }
1661 }
1662 return NDR_ERR_SUCCESS;
1663 }
1664
1665 static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr3(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosCtr3 *r)
/* [<][>][^][v][top][bottom][index][help] */
1666 {
1667 uint32_t cntr_keys_0;
1668 TALLOC_CTX *_mem_save_keys_0;
1669 uint32_t cntr_old_keys_0;
1670 TALLOC_CTX *_mem_save_old_keys_0;
1671 if (ndr_flags & NDR_SCALARS) {
1672 NDR_CHECK(ndr_pull_align(ndr, 4));
1673 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_keys));
1674 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_old_keys));
1675 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
1676 NDR_PULL_ALLOC_N(ndr, r->keys, r->num_keys);
1677 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1678 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
1679 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1680 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
1681 }
1682 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
1683 NDR_PULL_ALLOC_N(ndr, r->old_keys, r->num_old_keys);
1684 _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1685 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
1686 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1687 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
1688 }
1689 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
1690 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding1));
1691 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding2));
1692 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding3));
1693 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding4));
1694 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding5));
1695 }
1696 if (ndr_flags & NDR_BUFFERS) {
1697 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
1698 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1699 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
1700 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1701 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
1702 }
1703 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
1704 _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1705 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
1706 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1707 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey3(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
1708 }
1709 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
1710 }
1711 return NDR_ERR_SUCCESS;
1712 }
1713
1714 _PUBLIC_ void ndr_print_package_PrimaryKerberosCtr3(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosCtr3 *r)
/* [<][>][^][v][top][bottom][index][help] */
1715 {
1716 uint32_t cntr_keys_0;
1717 uint32_t cntr_old_keys_0;
1718 ndr_print_struct(ndr, name, "package_PrimaryKerberosCtr3");
1719 ndr->depth++;
1720 ndr_print_uint16(ndr, "num_keys", r->num_keys);
1721 ndr_print_uint16(ndr, "num_old_keys", r->num_old_keys);
1722 ndr_print_package_PrimaryKerberosString(ndr, "salt", &r->salt);
1723 ndr->print(ndr, "%s: ARRAY(%d)", "keys", (int)r->num_keys);
1724 ndr->depth++;
1725 for (cntr_keys_0=0;cntr_keys_0<r->num_keys;cntr_keys_0++) {
1726 char *idx_0=NULL;
1727 if (asprintf(&idx_0, "[%d]", cntr_keys_0) != -1) {
1728 ndr_print_package_PrimaryKerberosKey3(ndr, "keys", &r->keys[cntr_keys_0]);
1729 free(idx_0);
1730 }
1731 }
1732 ndr->depth--;
1733 ndr->print(ndr, "%s: ARRAY(%d)", "old_keys", (int)r->num_old_keys);
1734 ndr->depth++;
1735 for (cntr_old_keys_0=0;cntr_old_keys_0<r->num_old_keys;cntr_old_keys_0++) {
1736 char *idx_0=NULL;
1737 if (asprintf(&idx_0, "[%d]", cntr_old_keys_0) != -1) {
1738 ndr_print_package_PrimaryKerberosKey3(ndr, "old_keys", &r->old_keys[cntr_old_keys_0]);
1739 free(idx_0);
1740 }
1741 }
1742 ndr->depth--;
1743 ndr_print_uint32(ndr, "padding1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding1);
1744 ndr_print_uint32(ndr, "padding2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding2);
1745 ndr_print_uint32(ndr, "padding3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding3);
1746 ndr_print_uint32(ndr, "padding4", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding4);
1747 ndr_print_uint32(ndr, "padding5", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding5);
1748 ndr->depth--;
1749 }
1750
1751 static enum ndr_err_code ndr_push_package_PrimaryKerberosKey4(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosKey4 *r)
/* [<][>][^][v][top][bottom][index][help] */
1752 {
1753 if (ndr_flags & NDR_SCALARS) {
1754 NDR_CHECK(ndr_push_align(ndr, 4));
1755 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
1756 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
1757 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1758 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->iteration_count));
1759 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->keytype));
1760 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (r->value?r->value->length:0)));
1761 {
1762 uint32_t _flags_save_DATA_BLOB = ndr->flags;
1763 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1764 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value));
1765 ndr->flags = _flags_save_DATA_BLOB;
1766 }
1767 }
1768 if (ndr_flags & NDR_BUFFERS) {
1769 {
1770 uint32_t _flags_save_DATA_BLOB = ndr->flags;
1771 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1772 if (r->value) {
1773 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value));
1774 {
1775 struct ndr_push *_ndr_value;
1776 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_value, 0, (r->value?r->value->length:0)));
1777 NDR_CHECK(ndr_push_DATA_BLOB(_ndr_value, NDR_SCALARS, *r->value));
1778 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_value, 0, (r->value?r->value->length:0)));
1779 }
1780 }
1781 ndr->flags = _flags_save_DATA_BLOB;
1782 }
1783 }
1784 return NDR_ERR_SUCCESS;
1785 }
1786
1787 static enum ndr_err_code ndr_pull_package_PrimaryKerberosKey4(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosKey4 *r)
/* [<][>][^][v][top][bottom][index][help] */
1788 {
1789 uint32_t _ptr_value;
1790 TALLOC_CTX *_mem_save_value_0;
1791 if (ndr_flags & NDR_SCALARS) {
1792 NDR_CHECK(ndr_pull_align(ndr, 4));
1793 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved1));
1794 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved2));
1795 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved3));
1796 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->iteration_count));
1797 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->keytype));
1798 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->value_len));
1799 {
1800 uint32_t _flags_save_DATA_BLOB = ndr->flags;
1801 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1802 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value));
1803 if (_ptr_value) {
1804 NDR_PULL_ALLOC(ndr, r->value);
1805 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value, _ptr_value));
1806 } else {
1807 r->value = NULL;
1808 }
1809 ndr->flags = _flags_save_DATA_BLOB;
1810 }
1811 }
1812 if (ndr_flags & NDR_BUFFERS) {
1813 {
1814 uint32_t _flags_save_DATA_BLOB = ndr->flags;
1815 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1816 if (r->value) {
1817 uint32_t _relative_save_offset;
1818 _relative_save_offset = ndr->offset;
1819 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value));
1820 _mem_save_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
1821 NDR_PULL_SET_MEM_CTX(ndr, r->value, 0);
1822 {
1823 struct ndr_pull *_ndr_value;
1824 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_value, 0, r->value_len));
1825 NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_value, NDR_SCALARS, r->value));
1826 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_value, 0, r->value_len));
1827 }
1828 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_0, 0);
1829 ndr->offset = _relative_save_offset;
1830 }
1831 ndr->flags = _flags_save_DATA_BLOB;
1832 }
1833 }
1834 return NDR_ERR_SUCCESS;
1835 }
1836
1837 _PUBLIC_ void ndr_print_package_PrimaryKerberosKey4(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosKey4 *r)
/* [<][>][^][v][top][bottom][index][help] */
1838 {
1839 ndr_print_struct(ndr, name, "package_PrimaryKerberosKey4");
1840 ndr->depth++;
1841 ndr_print_uint16(ndr, "reserved1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved1);
1842 ndr_print_uint16(ndr, "reserved2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved2);
1843 ndr_print_uint32(ndr, "reserved3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved3);
1844 ndr_print_uint32(ndr, "iteration_count", r->iteration_count);
1845 ndr_print_uint32(ndr, "keytype", r->keytype);
1846 ndr_print_uint32(ndr, "value_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?(r->value?r->value->length:0):r->value_len);
1847 ndr_print_ptr(ndr, "value", r->value);
1848 ndr->depth++;
1849 if (r->value) {
1850 ndr_print_DATA_BLOB(ndr, "value", *r->value);
1851 }
1852 ndr->depth--;
1853 ndr->depth--;
1854 }
1855
1856 static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr4(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosCtr4 *r)
/* [<][>][^][v][top][bottom][index][help] */
1857 {
1858 uint32_t cntr_keys_0;
1859 uint32_t cntr_old_keys_0;
1860 uint32_t cntr_older_keys_0;
1861 if (ndr_flags & NDR_SCALARS) {
1862 NDR_CHECK(ndr_push_align(ndr, 4));
1863 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_keys));
1864 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
1865 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_old_keys));
1866 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_older_keys));
1867 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
1868 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->default_iteration_count));
1869 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1870 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
1871 }
1872 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1873 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
1874 }
1875 for (cntr_older_keys_0 = 0; cntr_older_keys_0 < r->num_older_keys; cntr_older_keys_0++) {
1876 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->older_keys[cntr_older_keys_0]));
1877 }
1878 }
1879 if (ndr_flags & NDR_BUFFERS) {
1880 NDR_CHECK(ndr_push_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
1881 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1882 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
1883 }
1884 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1885 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
1886 }
1887 for (cntr_older_keys_0 = 0; cntr_older_keys_0 < r->num_older_keys; cntr_older_keys_0++) {
1888 NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->older_keys[cntr_older_keys_0]));
1889 }
1890 }
1891 return NDR_ERR_SUCCESS;
1892 }
1893
1894 static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr4(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosCtr4 *r)
/* [<][>][^][v][top][bottom][index][help] */
1895 {
1896 uint32_t cntr_keys_0;
1897 TALLOC_CTX *_mem_save_keys_0;
1898 uint32_t cntr_service_keys_0;
1899 TALLOC_CTX *_mem_save_service_keys_0;
1900 uint32_t cntr_old_keys_0;
1901 TALLOC_CTX *_mem_save_old_keys_0;
1902 uint32_t cntr_older_keys_0;
1903 TALLOC_CTX *_mem_save_older_keys_0;
1904 if (ndr_flags & NDR_SCALARS) {
1905 NDR_CHECK(ndr_pull_align(ndr, 4));
1906 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_keys));
1907 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_service_keys));
1908 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_old_keys));
1909 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_older_keys));
1910 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_SCALARS, &r->salt));
1911 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->default_iteration_count));
1912 NDR_PULL_ALLOC_N(ndr, r->keys, r->num_keys);
1913 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1914 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
1915 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1916 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->keys[cntr_keys_0]));
1917 }
1918 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
1919 NDR_PULL_ALLOC_N(ndr, r->service_keys, r->num_service_keys);
1920 _mem_save_service_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1921 NDR_PULL_SET_MEM_CTX(ndr, r->service_keys, 0);
1922 for (cntr_service_keys_0 = 0; cntr_service_keys_0 < r->num_service_keys; cntr_service_keys_0++) {
1923 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->service_keys[cntr_service_keys_0]));
1924 }
1925 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_keys_0, 0);
1926 NDR_PULL_ALLOC_N(ndr, r->old_keys, r->num_old_keys);
1927 _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1928 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
1929 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1930 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
1931 }
1932 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
1933 NDR_PULL_ALLOC_N(ndr, r->older_keys, r->num_older_keys);
1934 _mem_save_older_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1935 NDR_PULL_SET_MEM_CTX(ndr, r->older_keys, 0);
1936 for (cntr_older_keys_0 = 0; cntr_older_keys_0 < r->num_older_keys; cntr_older_keys_0++) {
1937 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->older_keys[cntr_older_keys_0]));
1938 }
1939 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_older_keys_0, 0);
1940 }
1941 if (ndr_flags & NDR_BUFFERS) {
1942 NDR_CHECK(ndr_pull_package_PrimaryKerberosString(ndr, NDR_BUFFERS, &r->salt));
1943 _mem_save_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1944 NDR_PULL_SET_MEM_CTX(ndr, r->keys, 0);
1945 for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) {
1946 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->keys[cntr_keys_0]));
1947 }
1948 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keys_0, 0);
1949 _mem_save_service_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1950 NDR_PULL_SET_MEM_CTX(ndr, r->service_keys, 0);
1951 for (cntr_service_keys_0 = 0; cntr_service_keys_0 < r->num_service_keys; cntr_service_keys_0++) {
1952 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->service_keys[cntr_service_keys_0]));
1953 }
1954 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_keys_0, 0);
1955 _mem_save_old_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1956 NDR_PULL_SET_MEM_CTX(ndr, r->old_keys, 0);
1957 for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; cntr_old_keys_0++) {
1958 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
1959 }
1960 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_keys_0, 0);
1961 _mem_save_older_keys_0 = NDR_PULL_GET_MEM_CTX(ndr);
1962 NDR_PULL_SET_MEM_CTX(ndr, r->older_keys, 0);
1963 for (cntr_older_keys_0 = 0; cntr_older_keys_0 < r->num_older_keys; cntr_older_keys_0++) {
1964 NDR_CHECK(ndr_pull_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, &r->older_keys[cntr_older_keys_0]));
1965 }
1966 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_older_keys_0, 0);
1967 }
1968 return NDR_ERR_SUCCESS;
1969 }
1970
1971 _PUBLIC_ void ndr_print_package_PrimaryKerberosCtr4(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosCtr4 *r)
/* [<][>][^][v][top][bottom][index][help] */
1972 {
1973 uint32_t cntr_keys_0;
1974 uint32_t cntr_service_keys_0;
1975 uint32_t cntr_old_keys_0;
1976 uint32_t cntr_older_keys_0;
1977 ndr_print_struct(ndr, name, "package_PrimaryKerberosCtr4");
1978 ndr->depth++;
1979 ndr_print_uint16(ndr, "num_keys", r->num_keys);
1980 ndr_print_uint16(ndr, "num_service_keys", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->num_service_keys);
1981 ndr_print_uint16(ndr, "num_old_keys", r->num_old_keys);
1982 ndr_print_uint16(ndr, "num_older_keys", r->num_older_keys);
1983 ndr_print_package_PrimaryKerberosString(ndr, "salt", &r->salt);
1984 ndr_print_uint32(ndr, "default_iteration_count", r->default_iteration_count);
1985 ndr->print(ndr, "%s: ARRAY(%d)", "keys", (int)r->num_keys);
1986 ndr->depth++;
1987 for (cntr_keys_0=0;cntr_keys_0<r->num_keys;cntr_keys_0++) {
1988 char *idx_0=NULL;
1989 if (asprintf(&idx_0, "[%d]", cntr_keys_0) != -1) {
1990 ndr_print_package_PrimaryKerberosKey4(ndr, "keys", &r->keys[cntr_keys_0]);
1991 free(idx_0);
1992 }
1993 }
1994 ndr->depth--;
1995 ndr->print(ndr, "%s: ARRAY(%d)", "service_keys", (int)r->num_service_keys);
1996 ndr->depth++;
1997 for (cntr_service_keys_0=0;cntr_service_keys_0<r->num_service_keys;cntr_service_keys_0++) {
1998 char *idx_0=NULL;
1999 if (asprintf(&idx_0, "[%d]", cntr_service_keys_0) != -1) {
2000 ndr_print_package_PrimaryKerberosKey4(ndr, "service_keys", &r->service_keys[cntr_service_keys_0]);
2001 free(idx_0);
2002 }
2003 }
2004 ndr->depth--;
2005 ndr->print(ndr, "%s: ARRAY(%d)", "old_keys", (int)r->num_old_keys);
2006 ndr->depth++;
2007 for (cntr_old_keys_0=0;cntr_old_keys_0<r->num_old_keys;cntr_old_keys_0++) {
2008 char *idx_0=NULL;
2009 if (asprintf(&idx_0, "[%d]", cntr_old_keys_0) != -1) {
2010 ndr_print_package_PrimaryKerberosKey4(ndr, "old_keys", &r->old_keys[cntr_old_keys_0]);
2011 free(idx_0);
2012 }
2013 }
2014 ndr->depth--;
2015 ndr->print(ndr, "%s: ARRAY(%d)", "older_keys", (int)r->num_older_keys);
2016 ndr->depth++;
2017 for (cntr_older_keys_0=0;cntr_older_keys_0<r->num_older_keys;cntr_older_keys_0++) {
2018 char *idx_0=NULL;
2019 if (asprintf(&idx_0, "[%d]", cntr_older_keys_0) != -1) {
2020 ndr_print_package_PrimaryKerberosKey4(ndr, "older_keys", &r->older_keys[cntr_older_keys_0]);
2021 free(idx_0);
2022 }
2023 }
2024 ndr->depth--;
2025 ndr->depth--;
2026 }
2027
2028 static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr(struct ndr_push *ndr, int ndr_flags, const union package_PrimaryKerberosCtr *r)
/* [<][>][^][v][top][bottom][index][help] */
2029 {
2030 if (ndr_flags & NDR_SCALARS) {
2031 int level = ndr_push_get_switch_value(ndr, r);
2032 switch (level) {
2033 case 3: {
2034 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr3(ndr, NDR_SCALARS, &r->ctr3));
2035 break; }
2036
2037 case 4: {
2038 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr4(ndr, NDR_SCALARS, &r->ctr4));
2039 break; }
2040
2041 default:
2042 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2043 }
2044 }
2045 if (ndr_flags & NDR_BUFFERS) {
2046 int level = ndr_push_get_switch_value(ndr, r);
2047 switch (level) {
2048 case 3:
2049 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr3(ndr, NDR_BUFFERS, &r->ctr3));
2050 break;
2051
2052 case 4:
2053 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr4(ndr, NDR_BUFFERS, &r->ctr4));
2054 break;
2055
2056 default:
2057 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2058 }
2059 }
2060 return NDR_ERR_SUCCESS;
2061 }
2062
2063 static enum ndr_err_code ndr_pull_package_PrimaryKerberosCtr(struct ndr_pull *ndr, int ndr_flags, union package_PrimaryKerberosCtr *r)
/* [<][>][^][v][top][bottom][index][help] */
2064 {
2065 int level;
2066 level = ndr_pull_get_switch_value(ndr, r);
2067 if (ndr_flags & NDR_SCALARS) {
2068 switch (level) {
2069 case 3: {
2070 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr3(ndr, NDR_SCALARS, &r->ctr3));
2071 break; }
2072
2073 case 4: {
2074 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr4(ndr, NDR_SCALARS, &r->ctr4));
2075 break; }
2076
2077 default:
2078 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2079 }
2080 }
2081 if (ndr_flags & NDR_BUFFERS) {
2082 switch (level) {
2083 case 3:
2084 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr3(ndr, NDR_BUFFERS, &r->ctr3));
2085 break;
2086
2087 case 4:
2088 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr4(ndr, NDR_BUFFERS, &r->ctr4));
2089 break;
2090
2091 default:
2092 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2093 }
2094 }
2095 return NDR_ERR_SUCCESS;
2096 }
2097
2098 _PUBLIC_ void ndr_print_package_PrimaryKerberosCtr(struct ndr_print *ndr, const char *name, const union package_PrimaryKerberosCtr *r)
/* [<][>][^][v][top][bottom][index][help] */
2099 {
2100 int level;
2101 level = ndr_print_get_switch_value(ndr, r);
2102 ndr_print_union(ndr, name, level, "package_PrimaryKerberosCtr");
2103 switch (level) {
2104 case 3:
2105 ndr_print_package_PrimaryKerberosCtr3(ndr, "ctr3", &r->ctr3);
2106 break;
2107
2108 case 4:
2109 ndr_print_package_PrimaryKerberosCtr4(ndr, "ctr4", &r->ctr4);
2110 break;
2111
2112 default:
2113 ndr_print_bad_level(ndr, name, level);
2114 }
2115 }
2116
2117 _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryKerberosBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
2118 {
2119 if (ndr_flags & NDR_SCALARS) {
2120 NDR_CHECK(ndr_push_align(ndr, 4));
2121 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->version));
2122 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
2123 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
2124 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr(ndr, NDR_SCALARS, &r->ctr));
2125 }
2126 if (ndr_flags & NDR_BUFFERS) {
2127 NDR_CHECK(ndr_push_package_PrimaryKerberosCtr(ndr, NDR_BUFFERS, &r->ctr));
2128 }
2129 return NDR_ERR_SUCCESS;
2130 }
2131
2132 _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryKerberosBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
2133 {
2134 if (ndr_flags & NDR_SCALARS) {
2135 NDR_CHECK(ndr_pull_align(ndr, 4));
2136 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->version));
2137 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->flags));
2138 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
2139 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr(ndr, NDR_SCALARS, &r->ctr));
2140 }
2141 if (ndr_flags & NDR_BUFFERS) {
2142 NDR_CHECK(ndr_pull_package_PrimaryKerberosCtr(ndr, NDR_BUFFERS, &r->ctr));
2143 }
2144 return NDR_ERR_SUCCESS;
2145 }
2146
2147 _PUBLIC_ void ndr_print_package_PrimaryKerberosBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
2148 {
2149 ndr_print_struct(ndr, name, "package_PrimaryKerberosBlob");
2150 ndr->depth++;
2151 ndr_print_uint16(ndr, "version", r->version);
2152 ndr_print_uint16(ndr, "flags", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->flags);
2153 ndr_print_set_switch_value(ndr, &r->ctr, r->version);
2154 ndr_print_package_PrimaryKerberosCtr(ndr, "ctr", &r->ctr);
2155 ndr->depth--;
2156 }
2157
2158 _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryCLEARTEXTBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryCLEARTEXTBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
2159 {
2160 if (ndr_flags & NDR_SCALARS) {
2161 NDR_CHECK(ndr_push_align(ndr, 4));
2162 {
2163 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2164 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2165 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->cleartext));
2166 ndr->flags = _flags_save_DATA_BLOB;
2167 }
2168 }
2169 if (ndr_flags & NDR_BUFFERS) {
2170 }
2171 return NDR_ERR_SUCCESS;
2172 }
2173
2174 _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryCLEARTEXTBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryCLEARTEXTBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
2175 {
2176 if (ndr_flags & NDR_SCALARS) {
2177 NDR_CHECK(ndr_pull_align(ndr, 4));
2178 {
2179 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2180 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
2181 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->cleartext));
2182 ndr->flags = _flags_save_DATA_BLOB;
2183 }
2184 }
2185 if (ndr_flags & NDR_BUFFERS) {
2186 }
2187 return NDR_ERR_SUCCESS;
2188 }
2189
2190 _PUBLIC_ void ndr_print_package_PrimaryCLEARTEXTBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryCLEARTEXTBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
2191 {
2192 ndr_print_struct(ndr, name, "package_PrimaryCLEARTEXTBlob");
2193 ndr->depth++;
2194 ndr_print_DATA_BLOB(ndr, "cleartext", r->cleartext);
2195 ndr->depth--;
2196 }
2197
2198 static enum ndr_err_code ndr_push_package_PrimaryWDigestHash(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryWDigestHash *r)
/* [<][>][^][v][top][bottom][index][help] */
2199 {
2200 {
2201 uint32_t _flags_save_STRUCT = ndr->flags;
2202 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2203 if (ndr_flags & NDR_SCALARS) {
2204 NDR_CHECK(ndr_push_align(ndr, 1));
2205 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
2206 }
2207 if (ndr_flags & NDR_BUFFERS) {
2208 }
2209 ndr->flags = _flags_save_STRUCT;
2210 }
2211 return NDR_ERR_SUCCESS;
2212 }
2213
2214 static enum ndr_err_code ndr_pull_package_PrimaryWDigestHash(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryWDigestHash *r)
/* [<][>][^][v][top][bottom][index][help] */
2215 {
2216 {
2217 uint32_t _flags_save_STRUCT = ndr->flags;
2218 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2219 if (ndr_flags & NDR_SCALARS) {
2220 NDR_CHECK(ndr_pull_align(ndr, 1));
2221 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
2222 }
2223 if (ndr_flags & NDR_BUFFERS) {
2224 }
2225 ndr->flags = _flags_save_STRUCT;
2226 }
2227 return NDR_ERR_SUCCESS;
2228 }
2229
2230 _PUBLIC_ void ndr_print_package_PrimaryWDigestHash(struct ndr_print *ndr, const char *name, const struct package_PrimaryWDigestHash *r)
/* [<][>][^][v][top][bottom][index][help] */
2231 {
2232 ndr_print_struct(ndr, name, "package_PrimaryWDigestHash");
2233 {
2234 uint32_t _flags_save_STRUCT = ndr->flags;
2235 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
2236 ndr->depth++;
2237 ndr_print_array_uint8(ndr, "hash", r->hash, 16);
2238 ndr->depth--;
2239 ndr->flags = _flags_save_STRUCT;
2240 }
2241 }
2242
2243 _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryWDigestBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryWDigestBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
2244 {
2245 uint32_t cntr_hashes_0;
2246 if (ndr_flags & NDR_SCALARS) {
2247 NDR_CHECK(ndr_push_align(ndr, 4));
2248 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0x31));
2249 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 0x01));
2250 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->num_hashes));
2251 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2252 NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, 0));
2253 for (cntr_hashes_0 = 0; cntr_hashes_0 < r->num_hashes; cntr_hashes_0++) {
2254 NDR_CHECK(ndr_push_package_PrimaryWDigestHash(ndr, NDR_SCALARS, &r->hashes[cntr_hashes_0]));
2255 }
2256 }
2257 if (ndr_flags & NDR_BUFFERS) {
2258 }
2259 return NDR_ERR_SUCCESS;
2260 }
2261
2262 _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryWDigestBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryWDigestBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
2263 {
2264 uint32_t cntr_hashes_0;
2265 TALLOC_CTX *_mem_save_hashes_0;
2266 if (ndr_flags & NDR_SCALARS) {
2267 NDR_CHECK(ndr_pull_align(ndr, 4));
2268 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown1));
2269 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->unknown2));
2270 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->num_hashes));
2271 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
2272 NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->uuknown4));
2273 NDR_PULL_ALLOC_N(ndr, r->hashes, r->num_hashes);
2274 _mem_save_hashes_0 = NDR_PULL_GET_MEM_CTX(ndr);
2275 NDR_PULL_SET_MEM_CTX(ndr, r->hashes, 0);
2276 for (cntr_hashes_0 = 0; cntr_hashes_0 < r->num_hashes; cntr_hashes_0++) {
2277 NDR_CHECK(ndr_pull_package_PrimaryWDigestHash(ndr, NDR_SCALARS, &r->hashes[cntr_hashes_0]));
2278 }
2279 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hashes_0, 0);
2280 }
2281 if (ndr_flags & NDR_BUFFERS) {
2282 }
2283 return NDR_ERR_SUCCESS;
2284 }
2285
2286 _PUBLIC_ void ndr_print_package_PrimaryWDigestBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryWDigestBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
2287 {
2288 uint32_t cntr_hashes_0;
2289 ndr_print_struct(ndr, name, "package_PrimaryWDigestBlob");
2290 ndr->depth++;
2291 ndr_print_uint16(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x31:r->unknown1);
2292 ndr_print_uint8(ndr, "unknown2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x01:r->unknown2);
2293 ndr_print_uint8(ndr, "num_hashes", r->num_hashes);
2294 ndr_print_uint32(ndr, "unknown3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unknown3);
2295 ndr_print_udlong(ndr, "uuknown4", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->uuknown4);
2296 ndr->print(ndr, "%s: ARRAY(%d)", "hashes", (int)r->num_hashes);
2297 ndr->depth++;
2298 for (cntr_hashes_0=0;cntr_hashes_0<r->num_hashes;cntr_hashes_0++) {
2299 char *idx_0=NULL;
2300 if (asprintf(&idx_0, "[%d]", cntr_hashes_0) != -1) {
2301 ndr_print_package_PrimaryWDigestHash(ndr, "hashes", &r->hashes[cntr_hashes_0]);
2302 free(idx_0);
2303 }
2304 }
2305 ndr->depth--;
2306 ndr->depth--;
2307 }
2308
2309 static enum ndr_err_code ndr_push_AuthInfoNone(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoNone *r)
/* [<][>][^][v][top][bottom][index][help] */
2310 {
2311 if (ndr_flags & NDR_SCALARS) {
2312 NDR_CHECK(ndr_push_align(ndr, 4));
2313 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2314 }
2315 if (ndr_flags & NDR_BUFFERS) {
2316 }
2317 return NDR_ERR_SUCCESS;
2318 }
2319
2320 static enum ndr_err_code ndr_pull_AuthInfoNone(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoNone *r)
/* [<][>][^][v][top][bottom][index][help] */
2321 {
2322 if (ndr_flags & NDR_SCALARS) {
2323 NDR_CHECK(ndr_pull_align(ndr, 4));
2324 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2325 }
2326 if (ndr_flags & NDR_BUFFERS) {
2327 }
2328 return NDR_ERR_SUCCESS;
2329 }
2330
2331 _PUBLIC_ void ndr_print_AuthInfoNone(struct ndr_print *ndr, const char *name, const struct AuthInfoNone *r)
/* [<][>][^][v][top][bottom][index][help] */
2332 {
2333 ndr_print_struct(ndr, name, "AuthInfoNone");
2334 ndr->depth++;
2335 ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->size);
2336 ndr->depth--;
2337 }
2338
2339 static enum ndr_err_code ndr_push_AuthInfoNT4Owf(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoNT4Owf *r)
/* [<][>][^][v][top][bottom][index][help] */
2340 {
2341 if (ndr_flags & NDR_SCALARS) {
2342 NDR_CHECK(ndr_push_align(ndr, 4));
2343 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 16));
2344 NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->password));
2345 }
2346 if (ndr_flags & NDR_BUFFERS) {
2347 }
2348 return NDR_ERR_SUCCESS;
2349 }
2350
2351 static enum ndr_err_code ndr_pull_AuthInfoNT4Owf(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoNT4Owf *r)
/* [<][>][^][v][top][bottom][index][help] */
2352 {
2353 if (ndr_flags & NDR_SCALARS) {
2354 NDR_CHECK(ndr_pull_align(ndr, 4));
2355 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2356 NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->password));
2357 }
2358 if (ndr_flags & NDR_BUFFERS) {
2359 }
2360 return NDR_ERR_SUCCESS;
2361 }
2362
2363 _PUBLIC_ void ndr_print_AuthInfoNT4Owf(struct ndr_print *ndr, const char *name, const struct AuthInfoNT4Owf *r)
/* [<][>][^][v][top][bottom][index][help] */
2364 {
2365 ndr_print_struct(ndr, name, "AuthInfoNT4Owf");
2366 ndr->depth++;
2367 ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?16:r->size);
2368 ndr_print_samr_Password(ndr, "password", &r->password);
2369 ndr->depth--;
2370 }
2371
2372 static enum ndr_err_code ndr_push_AuthInfoClear(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoClear *r)
/* [<][>][^][v][top][bottom][index][help] */
2373 {
2374 if (ndr_flags & NDR_SCALARS) {
2375 NDR_CHECK(ndr_push_align(ndr, 4));
2376 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
2377 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->password, r->size));
2378 }
2379 if (ndr_flags & NDR_BUFFERS) {
2380 }
2381 return NDR_ERR_SUCCESS;
2382 }
2383
2384 static enum ndr_err_code ndr_pull_AuthInfoClear(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoClear *r)
/* [<][>][^][v][top][bottom][index][help] */
2385 {
2386 if (ndr_flags & NDR_SCALARS) {
2387 NDR_CHECK(ndr_pull_align(ndr, 4));
2388 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2389 NDR_PULL_ALLOC_N(ndr, r->password, r->size);
2390 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->password, r->size));
2391 }
2392 if (ndr_flags & NDR_BUFFERS) {
2393 }
2394 return NDR_ERR_SUCCESS;
2395 }
2396
2397 _PUBLIC_ void ndr_print_AuthInfoClear(struct ndr_print *ndr, const char *name, const struct AuthInfoClear *r)
/* [<][>][^][v][top][bottom][index][help] */
2398 {
2399 ndr_print_struct(ndr, name, "AuthInfoClear");
2400 ndr->depth++;
2401 ndr_print_uint32(ndr, "size", r->size);
2402 ndr_print_array_uint8(ndr, "password", r->password, r->size);
2403 ndr->depth--;
2404 }
2405
2406 static enum ndr_err_code ndr_push_AuthInfoVersion(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoVersion *r)
/* [<][>][^][v][top][bottom][index][help] */
2407 {
2408 if (ndr_flags & NDR_SCALARS) {
2409 NDR_CHECK(ndr_push_align(ndr, 4));
2410 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 4));
2411 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
2412 }
2413 if (ndr_flags & NDR_BUFFERS) {
2414 }
2415 return NDR_ERR_SUCCESS;
2416 }
2417
2418 static enum ndr_err_code ndr_pull_AuthInfoVersion(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoVersion *r)
/* [<][>][^][v][top][bottom][index][help] */
2419 {
2420 if (ndr_flags & NDR_SCALARS) {
2421 NDR_CHECK(ndr_pull_align(ndr, 4));
2422 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
2423 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
2424 }
2425 if (ndr_flags & NDR_BUFFERS) {
2426 }
2427 return NDR_ERR_SUCCESS;
2428 }
2429
2430 _PUBLIC_ void ndr_print_AuthInfoVersion(struct ndr_print *ndr, const char *name, const struct AuthInfoVersion *r)
/* [<][>][^][v][top][bottom][index][help] */
2431 {
2432 ndr_print_struct(ndr, name, "AuthInfoVersion");
2433 ndr->depth++;
2434 ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?4:r->size);
2435 ndr_print_uint32(ndr, "version", r->version);
2436 ndr->depth--;
2437 }
2438
2439 static enum ndr_err_code ndr_push_AuthInfo(struct ndr_push *ndr, int ndr_flags, const union AuthInfo *r)
/* [<][>][^][v][top][bottom][index][help] */
2440 {
2441 if (ndr_flags & NDR_SCALARS) {
2442 int level = ndr_push_get_switch_value(ndr, r);
2443 switch (level) {
2444 case TRUST_AUTH_TYPE_NONE: {
2445 NDR_CHECK(ndr_push_AuthInfoNone(ndr, NDR_SCALARS, &r->none));
2446 break; }
2447
2448 case TRUST_AUTH_TYPE_NT4OWF: {
2449 NDR_CHECK(ndr_push_AuthInfoNT4Owf(ndr, NDR_SCALARS, &r->nt4owf));
2450 break; }
2451
2452 case TRUST_AUTH_TYPE_CLEAR: {
2453 NDR_CHECK(ndr_push_AuthInfoClear(ndr, NDR_SCALARS, &r->clear));
2454 break; }
2455
2456 case TRUST_AUTH_TYPE_VERSION: {
2457 NDR_CHECK(ndr_push_AuthInfoVersion(ndr, NDR_SCALARS, &r->version));
2458 break; }
2459
2460 default:
2461 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2462 }
2463 }
2464 if (ndr_flags & NDR_BUFFERS) {
2465 int level = ndr_push_get_switch_value(ndr, r);
2466 switch (level) {
2467 case TRUST_AUTH_TYPE_NONE:
2468 break;
2469
2470 case TRUST_AUTH_TYPE_NT4OWF:
2471 break;
2472
2473 case TRUST_AUTH_TYPE_CLEAR:
2474 break;
2475
2476 case TRUST_AUTH_TYPE_VERSION:
2477 break;
2478
2479 default:
2480 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2481 }
2482 }
2483 return NDR_ERR_SUCCESS;
2484 }
2485
2486 static enum ndr_err_code ndr_pull_AuthInfo(struct ndr_pull *ndr, int ndr_flags, union AuthInfo *r)
/* [<][>][^][v][top][bottom][index][help] */
2487 {
2488 int level;
2489 level = ndr_pull_get_switch_value(ndr, r);
2490 if (ndr_flags & NDR_SCALARS) {
2491 switch (level) {
2492 case TRUST_AUTH_TYPE_NONE: {
2493 NDR_CHECK(ndr_pull_AuthInfoNone(ndr, NDR_SCALARS, &r->none));
2494 break; }
2495
2496 case TRUST_AUTH_TYPE_NT4OWF: {
2497 NDR_CHECK(ndr_pull_AuthInfoNT4Owf(ndr, NDR_SCALARS, &r->nt4owf));
2498 break; }
2499
2500 case TRUST_AUTH_TYPE_CLEAR: {
2501 NDR_CHECK(ndr_pull_AuthInfoClear(ndr, NDR_SCALARS, &r->clear));
2502 break; }
2503
2504 case TRUST_AUTH_TYPE_VERSION: {
2505 NDR_CHECK(ndr_pull_AuthInfoVersion(ndr, NDR_SCALARS, &r->version));
2506 break; }
2507
2508 default:
2509 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2510 }
2511 }
2512 if (ndr_flags & NDR_BUFFERS) {
2513 switch (level) {
2514 case TRUST_AUTH_TYPE_NONE:
2515 break;
2516
2517 case TRUST_AUTH_TYPE_NT4OWF:
2518 break;
2519
2520 case TRUST_AUTH_TYPE_CLEAR:
2521 break;
2522
2523 case TRUST_AUTH_TYPE_VERSION:
2524 break;
2525
2526 default:
2527 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2528 }
2529 }
2530 return NDR_ERR_SUCCESS;
2531 }
2532
2533 _PUBLIC_ void ndr_print_AuthInfo(struct ndr_print *ndr, const char *name, const union AuthInfo *r)
/* [<][>][^][v][top][bottom][index][help] */
2534 {
2535 int level;
2536 level = ndr_print_get_switch_value(ndr, r);
2537 ndr_print_union(ndr, name, level, "AuthInfo");
2538 switch (level) {
2539 case TRUST_AUTH_TYPE_NONE:
2540 ndr_print_AuthInfoNone(ndr, "none", &r->none);
2541 break;
2542
2543 case TRUST_AUTH_TYPE_NT4OWF:
2544 ndr_print_AuthInfoNT4Owf(ndr, "nt4owf", &r->nt4owf);
2545 break;
2546
2547 case TRUST_AUTH_TYPE_CLEAR:
2548 ndr_print_AuthInfoClear(ndr, "clear", &r->clear);
2549 break;
2550
2551 case TRUST_AUTH_TYPE_VERSION:
2552 ndr_print_AuthInfoVersion(ndr, "version", &r->version);
2553 break;
2554
2555 default:
2556 ndr_print_bad_level(ndr, name, level);
2557 }
2558 }
2559
2560 _PUBLIC_ enum ndr_err_code ndr_push_AuthenticationInformation(struct ndr_push *ndr, int ndr_flags, const struct AuthenticationInformation *r)
/* [<][>][^][v][top][bottom][index][help] */
2561 {
2562 if (ndr_flags & NDR_SCALARS) {
2563 NDR_CHECK(ndr_push_align(ndr, 4));
2564 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->LastUpdateTime));
2565 NDR_CHECK(ndr_push_lsa_TrustAuthType(ndr, NDR_SCALARS, r->AuthType));
2566 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->AuthInfo, r->AuthType));
2567 NDR_CHECK(ndr_push_AuthInfo(ndr, NDR_SCALARS, &r->AuthInfo));
2568 {
2569 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2570 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2571 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
2572 ndr->flags = _flags_save_DATA_BLOB;
2573 }
2574 }
2575 if (ndr_flags & NDR_BUFFERS) {
2576 }
2577 return NDR_ERR_SUCCESS;
2578 }
2579
2580 _PUBLIC_ enum ndr_err_code ndr_pull_AuthenticationInformation(struct ndr_pull *ndr, int ndr_flags, struct AuthenticationInformation *r)
/* [<][>][^][v][top][bottom][index][help] */
2581 {
2582 if (ndr_flags & NDR_SCALARS) {
2583 NDR_CHECK(ndr_pull_align(ndr, 4));
2584 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->LastUpdateTime));
2585 NDR_CHECK(ndr_pull_lsa_TrustAuthType(ndr, NDR_SCALARS, &r->AuthType));
2586 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->AuthInfo, r->AuthType));
2587 NDR_CHECK(ndr_pull_AuthInfo(ndr, NDR_SCALARS, &r->AuthInfo));
2588 {
2589 uint32_t _flags_save_DATA_BLOB = ndr->flags;
2590 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
2591 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
2592 ndr->flags = _flags_save_DATA_BLOB;
2593 }
2594 }
2595 if (ndr_flags & NDR_BUFFERS) {
2596 }
2597 return NDR_ERR_SUCCESS;
2598 }
2599
2600 _PUBLIC_ void ndr_print_AuthenticationInformation(struct ndr_print *ndr, const char *name, const struct AuthenticationInformation *r)
/* [<][>][^][v][top][bottom][index][help] */
2601 {
2602 ndr_print_struct(ndr, name, "AuthenticationInformation");
2603 ndr->depth++;
2604 ndr_print_NTTIME(ndr, "LastUpdateTime", r->LastUpdateTime);
2605 ndr_print_lsa_TrustAuthType(ndr, "AuthType", r->AuthType);
2606 ndr_print_set_switch_value(ndr, &r->AuthInfo, r->AuthType);
2607 ndr_print_AuthInfo(ndr, "AuthInfo", &r->AuthInfo);
2608 ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
2609 ndr->depth--;
2610 }
2611
2612 _PUBLIC_ size_t ndr_size_trustAuthInOutBlob(const struct trustAuthInOutBlob *r, struct smb_iconv_convenience *ic, int flags)
/* [<][>][^][v][top][bottom][index][help] */
2613 {
2614 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_trustAuthInOutBlob, ic);
2615 }
2616
2617 _PUBLIC_ enum ndr_err_code ndr_push_trustCurrentPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustCurrentPasswords *r)
/* [<][>][^][v][top][bottom][index][help] */
2618 {
2619 uint32_t cntr_current_0;
2620 if (ndr_flags & NDR_SCALARS) {
2621 NDR_CHECK(ndr_push_align(ndr, 4));
2622 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2623 for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
2624 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->current[cntr_current_0]));
2625 }
2626 }
2627 if (ndr_flags & NDR_BUFFERS) {
2628 for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
2629 if (r->current[cntr_current_0]) {
2630 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->current[cntr_current_0]));
2631 NDR_CHECK(ndr_push_AuthenticationInformation(ndr, NDR_SCALARS, r->current[cntr_current_0]));
2632 }
2633 }
2634 }
2635 return NDR_ERR_SUCCESS;
2636 }
2637
2638 _PUBLIC_ enum ndr_err_code ndr_pull_trustCurrentPasswords(struct ndr_pull *ndr, int ndr_flags, struct trustCurrentPasswords *r)
/* [<][>][^][v][top][bottom][index][help] */
2639 {
2640 uint32_t _ptr_current;
2641 uint32_t cntr_current_0;
2642 TALLOC_CTX *_mem_save_current_0;
2643 TALLOC_CTX *_mem_save_current_1;
2644 if (ndr_flags & NDR_SCALARS) {
2645 NDR_CHECK(ndr_pull_align(ndr, 4));
2646 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2647 NDR_PULL_ALLOC_N(ndr, r->current, r->count);
2648 _mem_save_current_0 = NDR_PULL_GET_MEM_CTX(ndr);
2649 NDR_PULL_SET_MEM_CTX(ndr, r->current, 0);
2650 for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
2651 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_current));
2652 if (_ptr_current) {
2653 NDR_PULL_ALLOC(ndr, r->current[cntr_current_0]);
2654 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->current[cntr_current_0], _ptr_current));
2655 } else {
2656 r->current[cntr_current_0] = NULL;
2657 }
2658 }
2659 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_0, 0);
2660 }
2661 if (ndr_flags & NDR_BUFFERS) {
2662 _mem_save_current_0 = NDR_PULL_GET_MEM_CTX(ndr);
2663 NDR_PULL_SET_MEM_CTX(ndr, r->current, 0);
2664 for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
2665 if (r->current[cntr_current_0]) {
2666 uint32_t _relative_save_offset;
2667 _relative_save_offset = ndr->offset;
2668 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->current[cntr_current_0]));
2669 _mem_save_current_1 = NDR_PULL_GET_MEM_CTX(ndr);
2670 NDR_PULL_SET_MEM_CTX(ndr, r->current[cntr_current_0], 0);
2671 NDR_CHECK(ndr_pull_AuthenticationInformation(ndr, NDR_SCALARS, r->current[cntr_current_0]));
2672 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_1, 0);
2673 ndr->offset = _relative_save_offset;
2674 }
2675 }
2676 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_0, 0);
2677 }
2678 return NDR_ERR_SUCCESS;
2679 }
2680
2681 _PUBLIC_ void ndr_print_trustCurrentPasswords(struct ndr_print *ndr, const char *name, const struct trustCurrentPasswords *r)
/* [<][>][^][v][top][bottom][index][help] */
2682 {
2683 uint32_t cntr_current_0;
2684 ndr_print_struct(ndr, name, "trustCurrentPasswords");
2685 ndr->depth++;
2686 ndr_print_uint32(ndr, "count", r->count);
2687 ndr->print(ndr, "%s: ARRAY(%d)", "current", (int)r->count);
2688 ndr->depth++;
2689 for (cntr_current_0=0;cntr_current_0<r->count;cntr_current_0++) {
2690 char *idx_0=NULL;
2691 if (asprintf(&idx_0, "[%d]", cntr_current_0) != -1) {
2692 ndr_print_ptr(ndr, "current", r->current[cntr_current_0]);
2693 ndr->depth++;
2694 if (r->current[cntr_current_0]) {
2695 ndr_print_AuthenticationInformation(ndr, "current", r->current[cntr_current_0]);
2696 }
2697 ndr->depth--;
2698 free(idx_0);
2699 }
2700 }
2701 ndr->depth--;
2702 ndr->depth--;
2703 }
2704
2705 _PUBLIC_ size_t ndr_size_trustCurrentPasswords(const struct trustCurrentPasswords *r, struct smb_iconv_convenience *ic, int flags)
/* [<][>][^][v][top][bottom][index][help] */
2706 {
2707 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_trustCurrentPasswords, ic);
2708 }
2709
2710 _PUBLIC_ enum ndr_err_code ndr_push_trustDomainPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustDomainPasswords *r)
/* [<][>][^][v][top][bottom][index][help] */
2711 {
2712 if (ndr_flags & NDR_SCALARS) {
2713 NDR_CHECK(ndr_push_align(ndr, 4));
2714 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->confounder, 512));
2715 {
2716 struct ndr_push *_ndr_outgoing;
2717 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_outgoing, 0, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->iconv_convenience, ndr->flags)));
2718 NDR_CHECK(ndr_push_trustCurrentPasswords(_ndr_outgoing, NDR_SCALARS|NDR_BUFFERS, &r->outgoing));
2719 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_outgoing, 0, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->iconv_convenience, ndr->flags)));
2720 }
2721 {
2722 struct ndr_push *_ndr_incoming;
2723 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_incoming, 0, ndr_size_trustCurrentPasswords(&r->incoming, ndr->iconv_convenience, ndr->flags)));
2724 NDR_CHECK(ndr_push_trustCurrentPasswords(_ndr_incoming, NDR_SCALARS|NDR_BUFFERS, &r->incoming));
2725 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_incoming, 0, ndr_size_trustCurrentPasswords(&r->incoming, ndr->iconv_convenience, ndr->flags)));
2726 }
2727 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->iconv_convenience, ndr->flags)));
2728 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->incoming, ndr->iconv_convenience, ndr->flags)));
2729 }
2730 if (ndr_flags & NDR_BUFFERS) {
2731 }
2732 return NDR_ERR_SUCCESS;
2733 }
2734
2735 _PUBLIC_ void ndr_print_trustDomainPasswords(struct ndr_print *ndr, const char *name, const struct trustDomainPasswords *r)
/* [<][>][^][v][top][bottom][index][help] */
2736 {
2737 ndr_print_struct(ndr, name, "trustDomainPasswords");
2738 ndr->depth++;
2739 ndr_print_array_uint8(ndr, "confounder", r->confounder, 512);
2740 ndr_print_trustCurrentPasswords(ndr, "outgoing", &r->outgoing);
2741 ndr_print_trustCurrentPasswords(ndr, "incoming", &r->incoming);
2742 ndr_print_uint32(ndr, "outgoing_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_trustCurrentPasswords(&r->outgoing, ndr->iconv_convenience, ndr->flags):r->outgoing_size);
2743 ndr_print_uint32(ndr, "incoming_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_trustCurrentPasswords(&r->incoming, ndr->iconv_convenience, ndr->flags):r->incoming_size);
2744 ndr->depth--;
2745 }
2746
2747 _PUBLIC_ enum ndr_err_code ndr_push_DsCompressedChunk(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedChunk *r)
/* [<][>][^][v][top][bottom][index][help] */
2748 {
2749 if (ndr_flags & NDR_SCALARS) {
2750 NDR_CHECK(ndr_push_align(ndr, 4));
2751 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->marker));
2752 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data));
2753 }
2754 if (ndr_flags & NDR_BUFFERS) {
2755 }
2756 return NDR_ERR_SUCCESS;
2757 }
2758
2759 _PUBLIC_ enum ndr_err_code ndr_pull_DsCompressedChunk(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedChunk *r)
/* [<][>][^][v][top][bottom][index][help] */
2760 {
2761 if (ndr_flags & NDR_SCALARS) {
2762 NDR_CHECK(ndr_pull_align(ndr, 4));
2763 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->marker));
2764 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
2765 }
2766 if (ndr_flags & NDR_BUFFERS) {
2767 }
2768 return NDR_ERR_SUCCESS;
2769 }
2770
2771 _PUBLIC_ void ndr_print_DsCompressedChunk(struct ndr_print *ndr, const char *name, const struct DsCompressedChunk *r)
/* [<][>][^][v][top][bottom][index][help] */
2772 {
2773 ndr_print_struct(ndr, name, "DsCompressedChunk");
2774 ndr->depth++;
2775 ndr_print_uint32(ndr, "marker", r->marker);
2776 ndr_print_DATA_BLOB(ndr, "data", r->data);
2777 ndr->depth--;
2778 }
2779
2780 static enum ndr_err_code ndr_push_ExtendedErrorAString(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorAString *r)
/* [<][>][^][v][top][bottom][index][help] */
2781 {
2782 if (ndr_flags & NDR_SCALARS) {
2783 NDR_CHECK(ndr_push_align(ndr, 4));
2784 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->__size));
2785 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
2786 }
2787 if (ndr_flags & NDR_BUFFERS) {
2788 if (r->string) {
2789 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->__size));
2790 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, r->__size, sizeof(uint8_t), CH_DOS));
2791 }
2792 }
2793 return NDR_ERR_SUCCESS;
2794 }
2795
2796 static enum ndr_err_code ndr_pull_ExtendedErrorAString(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorAString *r)
/* [<][>][^][v][top][bottom][index][help] */
2797 {
2798 uint32_t _ptr_string;
2799 TALLOC_CTX *_mem_save_string_0;
2800 if (ndr_flags & NDR_SCALARS) {
2801 NDR_CHECK(ndr_pull_align(ndr, 4));
2802 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->__size));
2803 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
2804 if (_ptr_string) {
2805 NDR_PULL_ALLOC(ndr, r->string);
2806 } else {
2807 r->string = NULL;
2808 }
2809 }
2810 if (ndr_flags & NDR_BUFFERS) {
2811 if (r->string) {
2812 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
2813 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
2814 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
2815 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_size(ndr, &r->string), sizeof(uint8_t), CH_DOS));
2816 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
2817 }
2818 if (r->string) {
2819 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->__size));
2820 }
2821 }
2822 return NDR_ERR_SUCCESS;
2823 }
2824
2825 _PUBLIC_ void ndr_print_ExtendedErrorAString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorAString *r)
/* [<][>][^][v][top][bottom][index][help] */
2826 {
2827 ndr_print_struct(ndr, name, "ExtendedErrorAString");
2828 ndr->depth++;
2829 ndr_print_uint16(ndr, "__size", r->__size);
2830 ndr_print_ptr(ndr, "string", r->string);
2831 ndr->depth++;
2832 if (r->string) {
2833 ndr_print_string(ndr, "string", r->string);
2834 }
2835 ndr->depth--;
2836 ndr->depth--;
2837 }
2838
2839 static enum ndr_err_code ndr_push_ExtendedErrorUString(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorUString *r)
/* [<][>][^][v][top][bottom][index][help] */
2840 {
2841 if (ndr_flags & NDR_SCALARS) {
2842 NDR_CHECK(ndr_push_align(ndr, 4));
2843 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->__size));
2844 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
2845 }
2846 if (ndr_flags & NDR_BUFFERS) {
2847 if (r->string) {
2848 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->__size));
2849 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, r->__size, sizeof(uint16_t), CH_UTF16));
2850 }
2851 }
2852 return NDR_ERR_SUCCESS;
2853 }
2854
2855 static enum ndr_err_code ndr_pull_ExtendedErrorUString(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorUString *r)
/* [<][>][^][v][top][bottom][index][help] */
2856 {
2857 uint32_t _ptr_string;
2858 TALLOC_CTX *_mem_save_string_0;
2859 if (ndr_flags & NDR_SCALARS) {
2860 NDR_CHECK(ndr_pull_align(ndr, 4));
2861 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->__size));
2862 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
2863 if (_ptr_string) {
2864 NDR_PULL_ALLOC(ndr, r->string);
2865 } else {
2866 r->string = NULL;
2867 }
2868 }
2869 if (ndr_flags & NDR_BUFFERS) {
2870 if (r->string) {
2871 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
2872 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
2873 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
2874 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_size(ndr, &r->string), sizeof(uint16_t), CH_UTF16));
2875 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
2876 }
2877 if (r->string) {
2878 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->__size));
2879 }
2880 }
2881 return NDR_ERR_SUCCESS;
2882 }
2883
2884 _PUBLIC_ void ndr_print_ExtendedErrorUString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorUString *r)
/* [<][>][^][v][top][bottom][index][help] */
2885 {
2886 ndr_print_struct(ndr, name, "ExtendedErrorUString");
2887 ndr->depth++;
2888 ndr_print_uint16(ndr, "__size", r->__size);
2889 ndr_print_ptr(ndr, "string", r->string);
2890 ndr->depth++;
2891 if (r->string) {
2892 ndr_print_string(ndr, "string", r->string);
2893 }
2894 ndr->depth--;
2895 ndr->depth--;
2896 }
2897
2898 static enum ndr_err_code ndr_push_ExtendedErrorBlob(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
2899 {
2900 if (ndr_flags & NDR_SCALARS) {
2901 NDR_CHECK(ndr_push_align(ndr, 4));
2902 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
2903 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
2904 }
2905 if (ndr_flags & NDR_BUFFERS) {
2906 if (r->data) {
2907 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
2908 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
2909 }
2910 }
2911 return NDR_ERR_SUCCESS;
2912 }
2913
2914 static enum ndr_err_code ndr_pull_ExtendedErrorBlob(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
2915 {
2916 uint32_t _ptr_data;
2917 TALLOC_CTX *_mem_save_data_0;
2918 if (ndr_flags & NDR_SCALARS) {
2919 NDR_CHECK(ndr_pull_align(ndr, 4));
2920 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
2921 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
2922 if (_ptr_data) {
2923 NDR_PULL_ALLOC(ndr, r->data);
2924 } else {
2925 r->data = NULL;
2926 }
2927 }
2928 if (ndr_flags & NDR_BUFFERS) {
2929 if (r->data) {
2930 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
2931 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
2932 NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
2933 NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
2934 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data)));
2935 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
2936 }
2937 if (r->data) {
2938 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->length));
2939 }
2940 }
2941 return NDR_ERR_SUCCESS;
2942 }
2943
2944 _PUBLIC_ void ndr_print_ExtendedErrorBlob(struct ndr_print *ndr, const char *name, const struct ExtendedErrorBlob *r)
/* [<][>][^][v][top][bottom][index][help] */
2945 {
2946 ndr_print_struct(ndr, name, "ExtendedErrorBlob");
2947 ndr->depth++;
2948 ndr_print_uint16(ndr, "length", r->length);
2949 ndr_print_ptr(ndr, "data", r->data);
2950 ndr->depth++;
2951 if (r->data) {
2952 ndr_print_array_uint8(ndr, "data", r->data, r->length);
2953 }
2954 ndr->depth--;
2955 ndr->depth--;
2956 }
2957
2958 static enum ndr_err_code ndr_push_ExtendedErrorComputerNamePresent(struct ndr_push *ndr, int ndr_flags, enum ExtendedErrorComputerNamePresent r)
/* [<][>][^][v][top][bottom][index][help] */
2959 {
2960 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
2961 return NDR_ERR_SUCCESS;
2962 }
2963
2964 static enum ndr_err_code ndr_pull_ExtendedErrorComputerNamePresent(struct ndr_pull *ndr, int ndr_flags, enum ExtendedErrorComputerNamePresent *r)
/* [<][>][^][v][top][bottom][index][help] */
2965 {
2966 uint16_t v;
2967 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
2968 *r = v;
2969 return NDR_ERR_SUCCESS;
2970 }
2971
2972 _PUBLIC_ void ndr_print_ExtendedErrorComputerNamePresent(struct ndr_print *ndr, const char *name, enum ExtendedErrorComputerNamePresent r)
/* [<][>][^][v][top][bottom][index][help] */
2973 {
2974 const char *val = NULL;
2975
2976 switch (r) {
2977 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: val = "EXTENDED_ERROR_COMPUTER_NAME_PRESENT"; break;
2978 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: val = "EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT"; break;
2979 }
2980 ndr_print_enum(ndr, name, "ENUM", val, r);
2981 }
2982
2983 static enum ndr_err_code ndr_push_ExtendedErrorComputerNameU(struct ndr_push *ndr, int ndr_flags, const union ExtendedErrorComputerNameU *r)
/* [<][>][^][v][top][bottom][index][help] */
2984 {
2985 if (ndr_flags & NDR_SCALARS) {
2986 int level = ndr_push_get_switch_value(ndr, r);
2987 NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, level));
2988 switch (level) {
2989 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: {
2990 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_SCALARS, &r->name));
2991 break; }
2992
2993 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: {
2994 break; }
2995
2996 default:
2997 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2998 }
2999 }
3000 if (ndr_flags & NDR_BUFFERS) {
3001 int level = ndr_push_get_switch_value(ndr, r);
3002 switch (level) {
3003 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
3004 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->name));
3005 break;
3006
3007 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
3008 break;
3009
3010 default:
3011 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3012 }
3013 }
3014 return NDR_ERR_SUCCESS;
3015 }
3016
3017 static enum ndr_err_code ndr_pull_ExtendedErrorComputerNameU(struct ndr_pull *ndr, int ndr_flags, union ExtendedErrorComputerNameU *r)
/* [<][>][^][v][top][bottom][index][help] */
3018 {
3019 int level;
3020 uint16_t _level;
3021 level = ndr_pull_get_switch_value(ndr, r);
3022 if (ndr_flags & NDR_SCALARS) {
3023 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
3024 if (_level != level) {
3025 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
3026 }
3027 switch (level) {
3028 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: {
3029 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_SCALARS, &r->name));
3030 break; }
3031
3032 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: {
3033 break; }
3034
3035 default:
3036 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3037 }
3038 }
3039 if (ndr_flags & NDR_BUFFERS) {
3040 switch (level) {
3041 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
3042 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->name));
3043 break;
3044
3045 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
3046 break;
3047
3048 default:
3049 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3050 }
3051 }
3052 return NDR_ERR_SUCCESS;
3053 }
3054
3055 _PUBLIC_ void ndr_print_ExtendedErrorComputerNameU(struct ndr_print *ndr, const char *name, const union ExtendedErrorComputerNameU *r)
/* [<][>][^][v][top][bottom][index][help] */
3056 {
3057 int level;
3058 level = ndr_print_get_switch_value(ndr, r);
3059 ndr_print_union(ndr, name, level, "ExtendedErrorComputerNameU");
3060 switch (level) {
3061 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
3062 ndr_print_ExtendedErrorUString(ndr, "name", &r->name);
3063 break;
3064
3065 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
3066 break;
3067
3068 default:
3069 ndr_print_bad_level(ndr, name, level);
3070 }
3071 }
3072
3073 static enum ndr_err_code ndr_push_ExtendedErrorComputerName(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorComputerName *r)
/* [<][>][^][v][top][bottom][index][help] */
3074 {
3075 if (ndr_flags & NDR_SCALARS) {
3076 NDR_CHECK(ndr_push_align(ndr, 4));
3077 NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, r->present));
3078 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->n, r->present));
3079 NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr, NDR_SCALARS, &r->n));
3080 }
3081 if (ndr_flags & NDR_BUFFERS) {
3082 NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr, NDR_BUFFERS, &r->n));
3083 }
3084 return NDR_ERR_SUCCESS;
3085 }
3086
3087 static enum ndr_err_code ndr_pull_ExtendedErrorComputerName(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorComputerName *r)
/* [<][>][^][v][top][bottom][index][help] */
3088 {
3089 if (ndr_flags & NDR_SCALARS) {
3090 NDR_CHECK(ndr_pull_align(ndr, 4));
3091 NDR_CHECK(ndr_pull_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, &r->present));
3092 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->n, r->present));
3093 NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr, NDR_SCALARS, &r->n));
3094 }
3095 if (ndr_flags & NDR_BUFFERS) {
3096 NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr, NDR_BUFFERS, &r->n));
3097 }
3098 return NDR_ERR_SUCCESS;
3099 }
3100
3101 _PUBLIC_ void ndr_print_ExtendedErrorComputerName(struct ndr_print *ndr, const char *name, const struct ExtendedErrorComputerName *r)
/* [<][>][^][v][top][bottom][index][help] */
3102 {
3103 ndr_print_struct(ndr, name, "ExtendedErrorComputerName");
3104 ndr->depth++;
3105 ndr_print_ExtendedErrorComputerNamePresent(ndr, "present", r->present);
3106 ndr_print_set_switch_value(ndr, &r->n, r->present);
3107 ndr_print_ExtendedErrorComputerNameU(ndr, "n", &r->n);
3108 ndr->depth--;
3109 }
3110
3111 static enum ndr_err_code ndr_push_ExtendedErrorParamType(struct ndr_push *ndr, int ndr_flags, enum ExtendedErrorParamType r)
/* [<][>][^][v][top][bottom][index][help] */
3112 {
3113 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
3114 return NDR_ERR_SUCCESS;
3115 }
3116
3117 static enum ndr_err_code ndr_pull_ExtendedErrorParamType(struct ndr_pull *ndr, int ndr_flags, enum ExtendedErrorParamType *r)
/* [<][>][^][v][top][bottom][index][help] */
3118 {
3119 uint16_t v;
3120 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
3121 *r = v;
3122 return NDR_ERR_SUCCESS;
3123 }
3124
3125 _PUBLIC_ void ndr_print_ExtendedErrorParamType(struct ndr_print *ndr, const char *name, enum ExtendedErrorParamType r)
/* [<][>][^][v][top][bottom][index][help] */
3126 {
3127 const char *val = NULL;
3128
3129 switch (r) {
3130 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: val = "EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING"; break;
3131 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: val = "EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING"; break;
3132 case EXTENDED_ERROR_PARAM_TYPE_UINT32: val = "EXTENDED_ERROR_PARAM_TYPE_UINT32"; break;
3133 case EXTENDED_ERROR_PARAM_TYPE_UINT16: val = "EXTENDED_ERROR_PARAM_TYPE_UINT16"; break;
3134 case EXTENDED_ERROR_PARAM_TYPE_UINT64: val = "EXTENDED_ERROR_PARAM_TYPE_UINT64"; break;
3135 case EXTENDED_ERROR_PARAM_TYPE_NONE: val = "EXTENDED_ERROR_PARAM_TYPE_NONE"; break;
3136 case EXTENDED_ERROR_PARAM_TYPE_BLOB: val = "EXTENDED_ERROR_PARAM_TYPE_BLOB"; break;
3137 }
3138 ndr_print_enum(ndr, name, "ENUM", val, r);
3139 }
3140
3141 static enum ndr_err_code ndr_push_ExtendedErrorParamU(struct ndr_push *ndr, int ndr_flags, const union ExtendedErrorParamU *r)
/* [<][>][^][v][top][bottom][index][help] */
3142 {
3143 if (ndr_flags & NDR_SCALARS) {
3144 int level = ndr_push_get_switch_value(ndr, r);
3145 NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr, NDR_SCALARS, level));
3146 switch (level) {
3147 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: {
3148 NDR_CHECK(ndr_push_ExtendedErrorAString(ndr, NDR_SCALARS, &r->a_string));
3149 break; }
3150
3151 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: {
3152 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_SCALARS, &r->u_string));
3153 break; }
3154
3155 case EXTENDED_ERROR_PARAM_TYPE_UINT32: {
3156 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->uint32));
3157 break; }
3158
3159 case EXTENDED_ERROR_PARAM_TYPE_UINT16: {
3160 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->uint16));
3161 break; }
3162
3163 case EXTENDED_ERROR_PARAM_TYPE_UINT64: {
3164 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->uint64));
3165 break; }
3166
3167 case EXTENDED_ERROR_PARAM_TYPE_NONE: {
3168 break; }
3169
3170 case EXTENDED_ERROR_PARAM_TYPE_BLOB: {
3171 NDR_CHECK(ndr_push_ExtendedErrorBlob(ndr, NDR_SCALARS, &r->blob));
3172 break; }
3173
3174 default:
3175 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3176 }
3177 }
3178 if (ndr_flags & NDR_BUFFERS) {
3179 int level = ndr_push_get_switch_value(ndr, r);
3180 switch (level) {
3181 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
3182 NDR_CHECK(ndr_push_ExtendedErrorAString(ndr, NDR_BUFFERS, &r->a_string));
3183 break;
3184
3185 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
3186 NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->u_string));
3187 break;
3188
3189 case EXTENDED_ERROR_PARAM_TYPE_UINT32:
3190 break;
3191
3192 case EXTENDED_ERROR_PARAM_TYPE_UINT16:
3193 break;
3194
3195 case EXTENDED_ERROR_PARAM_TYPE_UINT64:
3196 break;
3197
3198 case EXTENDED_ERROR_PARAM_TYPE_NONE:
3199 break;
3200
3201 case EXTENDED_ERROR_PARAM_TYPE_BLOB:
3202 NDR_CHECK(ndr_push_ExtendedErrorBlob(ndr, NDR_BUFFERS, &r->blob));
3203 break;
3204
3205 default:
3206 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3207 }
3208 }
3209 return NDR_ERR_SUCCESS;
3210 }
3211
3212 static enum ndr_err_code ndr_pull_ExtendedErrorParamU(struct ndr_pull *ndr, int ndr_flags, union ExtendedErrorParamU *r)
/* [<][>][^][v][top][bottom][index][help] */
3213 {
3214 int level;
3215 uint16_t _level;
3216 level = ndr_pull_get_switch_value(ndr, r);
3217 if (ndr_flags & NDR_SCALARS) {
3218 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
3219 if (_level != level) {
3220 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
3221 }
3222 switch (level) {
3223 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: {
3224 NDR_CHECK(ndr_pull_ExtendedErrorAString(ndr, NDR_SCALARS, &r->a_string));
3225 break; }
3226
3227 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: {
3228 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_SCALARS, &r->u_string));
3229 break; }
3230
3231 case EXTENDED_ERROR_PARAM_TYPE_UINT32: {
3232 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->uint32));
3233 break; }
3234
3235 case EXTENDED_ERROR_PARAM_TYPE_UINT16: {
3236 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->uint16));
3237 break; }
3238
3239 case EXTENDED_ERROR_PARAM_TYPE_UINT64: {
3240 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->uint64));
3241 break; }
3242
3243 case EXTENDED_ERROR_PARAM_TYPE_NONE: {
3244 break; }
3245
3246 case EXTENDED_ERROR_PARAM_TYPE_BLOB: {
3247 NDR_CHECK(ndr_pull_ExtendedErrorBlob(ndr, NDR_SCALARS, &r->blob));
3248 break; }
3249
3250 default:
3251 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3252 }
3253 }
3254 if (ndr_flags & NDR_BUFFERS) {
3255 switch (level) {
3256 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
3257 NDR_CHECK(ndr_pull_ExtendedErrorAString(ndr, NDR_BUFFERS, &r->a_string));
3258 break;
3259
3260 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
3261 NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->u_string));
3262 break;
3263
3264 case EXTENDED_ERROR_PARAM_TYPE_UINT32:
3265 break;
3266
3267 case EXTENDED_ERROR_PARAM_TYPE_UINT16:
3268 break;
3269
3270 case EXTENDED_ERROR_PARAM_TYPE_UINT64:
3271 break;
3272
3273 case EXTENDED_ERROR_PARAM_TYPE_NONE:
3274 break;
3275
3276 case EXTENDED_ERROR_PARAM_TYPE_BLOB:
3277 NDR_CHECK(ndr_pull_ExtendedErrorBlob(ndr, NDR_BUFFERS, &r->blob));
3278 break;
3279
3280 default:
3281 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3282 }
3283 }
3284 return NDR_ERR_SUCCESS;
3285 }
3286
3287 _PUBLIC_ void ndr_print_ExtendedErrorParamU(struct ndr_print *ndr, const char *name, const union ExtendedErrorParamU *r)
/* [<][>][^][v][top][bottom][index][help] */
3288 {
3289 int level;
3290 level = ndr_print_get_switch_value(ndr, r);
3291 ndr_print_union(ndr, name, level, "ExtendedErrorParamU");
3292 switch (level) {
3293 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
3294 ndr_print_ExtendedErrorAString(ndr, "a_string", &r->a_string);
3295 break;
3296
3297 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
3298 ndr_print_ExtendedErrorUString(ndr, "u_string", &r->u_string);
3299 break;
3300
3301 case EXTENDED_ERROR_PARAM_TYPE_UINT32:
3302 ndr_print_uint32(ndr, "uint32", r->uint32);
3303 break;
3304
3305 case EXTENDED_ERROR_PARAM_TYPE_UINT16:
3306 ndr_print_uint16(ndr, "uint16", r->uint16);
3307 break;
3308
3309 case EXTENDED_ERROR_PARAM_TYPE_UINT64:
3310 ndr_print_hyper(ndr, "uint64", r->uint64);
3311 break;
3312
3313 case EXTENDED_ERROR_PARAM_TYPE_NONE:
3314 break;
3315
3316 case EXTENDED_ERROR_PARAM_TYPE_BLOB:
3317 ndr_print_ExtendedErrorBlob(ndr, "blob", &r->blob);
3318 break;
3319
3320 default:
3321 ndr_print_bad_level(ndr, name, level);
3322 }
3323 }
3324
3325 static enum ndr_err_code ndr_push_ExtendedErrorParam(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorParam *r)
/* [<][>][^][v][top][bottom][index][help] */
3326 {
3327 if (ndr_flags & NDR_SCALARS) {
3328 NDR_CHECK(ndr_push_align(ndr, 8));
3329 NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr, NDR_SCALARS, r->type));
3330 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->p, r->type));
3331 NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr, NDR_SCALARS, &r->p));
3332 }
3333 if (ndr_flags & NDR_BUFFERS) {
3334 NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr, NDR_BUFFERS, &r->p));
3335 }
3336 return NDR_ERR_SUCCESS;
3337 }
3338
3339 static enum ndr_err_code ndr_pull_ExtendedErrorParam(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorParam *r)
/* [<][>][^][v][top][bottom][index][help] */
3340 {
3341 if (ndr_flags & NDR_SCALARS) {
3342 NDR_CHECK(ndr_pull_align(ndr, 8));
3343 NDR_CHECK(ndr_pull_ExtendedErrorParamType(ndr, NDR_SCALARS, &r->type));
3344 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->p, r->type));
3345 NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr, NDR_SCALARS, &r->p));
3346 }
3347 if (ndr_flags & NDR_BUFFERS) {
3348 NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr, NDR_BUFFERS, &r->p));
3349 }
3350 return NDR_ERR_SUCCESS;
3351 }
3352
3353 _PUBLIC_ void ndr_print_ExtendedErrorParam(struct ndr_print *ndr, const char *name, const struct ExtendedErrorParam *r)
/* [<][>][^][v][top][bottom][index][help] */
3354 {
3355 ndr_print_struct(ndr, name, "ExtendedErrorParam");
3356 ndr->depth++;
3357 ndr_print_ExtendedErrorParamType(ndr, "type", r->type);
3358 ndr_print_set_switch_value(ndr, &r->p, r->type);
3359 ndr_print_ExtendedErrorParamU(ndr, "p", &r->p);
3360 ndr->depth--;
3361 }
3362
3363 _PUBLIC_ enum ndr_err_code ndr_push_ExtendedErrorInfo(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorInfo *r)
/* [<][>][^][v][top][bottom][index][help] */
3364 {
3365 uint32_t cntr_params_0;
3366 if (ndr_flags & NDR_SCALARS) {
3367 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_params));
3368 NDR_CHECK(ndr_push_align(ndr, 8));
3369 NDR_CHECK(ndr_push_unique_ptr(ndr, r->next));
3370 NDR_CHECK(ndr_push_ExtendedErrorComputerName(ndr, NDR_SCALARS, &r->computer_name));
3371 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->pid));
3372 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time));
3373 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->generating_component));
3374 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->status));
3375 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->detection_location));
3376 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->flags));
3377 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_params));
3378 for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
3379 NDR_CHECK(ndr_push_ExtendedErrorParam(ndr, NDR_SCALARS, &r->params[cntr_params_0]));
3380 }
3381 }
3382 if (ndr_flags & NDR_BUFFERS) {
3383 if (r->next) {
3384 NDR_CHECK(ndr_push_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
3385 }
3386 NDR_CHECK(ndr_push_ExtendedErrorComputerName(ndr, NDR_BUFFERS, &r->computer_name));
3387 for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
3388 NDR_CHECK(ndr_push_ExtendedErrorParam(ndr, NDR_BUFFERS, &r->params[cntr_params_0]));
3389 }
3390 }
3391 return NDR_ERR_SUCCESS;
3392 }
3393
3394 _PUBLIC_ enum ndr_err_code ndr_pull_ExtendedErrorInfo(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfo *r)
/* [<][>][^][v][top][bottom][index][help] */
3395 {
3396 uint32_t _ptr_next;
3397 TALLOC_CTX *_mem_save_next_0;
3398 uint32_t cntr_params_0;
3399 TALLOC_CTX *_mem_save_params_0;
3400 if (ndr_flags & NDR_SCALARS) {
3401 NDR_CHECK(ndr_pull_array_size(ndr, &r->params));
3402 NDR_CHECK(ndr_pull_align(ndr, 8));
3403 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_next));
3404 if (_ptr_next) {
3405 NDR_PULL_ALLOC(ndr, r->next);
3406 } else {
3407 r->next = NULL;
3408 }
3409 NDR_CHECK(ndr_pull_ExtendedErrorComputerName(ndr, NDR_SCALARS, &r->computer_name));
3410 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->pid));
3411 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time));
3412 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->generating_component));
3413 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->status));
3414 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->detection_location));
3415 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->flags));
3416 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_params));
3417 NDR_PULL_ALLOC_N(ndr, r->params, ndr_get_array_size(ndr, &r->params));
3418 _mem_save_params_0 = NDR_PULL_GET_MEM_CTX(ndr);
3419 NDR_PULL_SET_MEM_CTX(ndr, r->params, 0);
3420 for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
3421 NDR_CHECK(ndr_pull_ExtendedErrorParam(ndr, NDR_SCALARS, &r->params[cntr_params_0]));
3422 }
3423 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_params_0, 0);
3424 if (r->params) {
3425 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->params, r->num_params));
3426 }
3427 }
3428 if (ndr_flags & NDR_BUFFERS) {
3429 if (r->next) {
3430 _mem_save_next_0 = NDR_PULL_GET_MEM_CTX(ndr);
3431 NDR_PULL_SET_MEM_CTX(ndr, r->next, 0);
3432 NDR_CHECK(ndr_pull_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
3433 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_0, 0);
3434 }
3435 NDR_CHECK(ndr_pull_ExtendedErrorComputerName(ndr, NDR_BUFFERS, &r->computer_name));
3436 _mem_save_params_0 = NDR_PULL_GET_MEM_CTX(ndr);
3437 NDR_PULL_SET_MEM_CTX(ndr, r->params, 0);
3438 for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
3439 NDR_CHECK(ndr_pull_ExtendedErrorParam(ndr, NDR_BUFFERS, &r->params[cntr_params_0]));
3440 }
3441 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_params_0, 0);
3442 }
3443 return NDR_ERR_SUCCESS;
3444 }
3445
3446 _PUBLIC_ void ndr_print_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfo *r)
/* [<][>][^][v][top][bottom][index][help] */
3447 {
3448 uint32_t cntr_params_0;
3449 ndr_print_struct(ndr, name, "ExtendedErrorInfo");
3450 ndr->depth++;
3451 ndr_print_ptr(ndr, "next", r->next);
3452 ndr->depth++;
3453 if (r->next) {
3454 ndr_print_ExtendedErrorInfo(ndr, "next", r->next);
3455 }
3456 ndr->depth--;
3457 ndr_print_ExtendedErrorComputerName(ndr, "computer_name", &r->computer_name);
3458 ndr_print_hyper(ndr, "pid", r->pid);
3459 ndr_print_NTTIME(ndr, "time", r->time);
3460 ndr_print_uint32(ndr, "generating_component", r->generating_component);
3461 ndr_print_WERROR(ndr, "status", r->status);
3462 ndr_print_uint16(ndr, "detection_location", r->detection_location);
3463 ndr_print_uint16(ndr, "flags", r->flags);
3464 ndr_print_uint16(ndr, "num_params", r->num_params);
3465 ndr->print(ndr, "%s: ARRAY(%d)", "params", (int)r->num_params);
3466 ndr->depth++;
3467 for (cntr_params_0=0;cntr_params_0<r->num_params;cntr_params_0++) {
3468 char *idx_0=NULL;
3469 if (asprintf(&idx_0, "[%d]", cntr_params_0) != -1) {
3470 ndr_print_ExtendedErrorParam(ndr, "params", &r->params[cntr_params_0]);
3471 free(idx_0);
3472 }
3473 }
3474 ndr->depth--;
3475 ndr->depth--;
3476 }
3477
3478 static enum ndr_err_code ndr_push_ExtendedErrorInfoPtr(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorInfoPtr *r)
/* [<][>][^][v][top][bottom][index][help] */
3479 {
3480 if (ndr_flags & NDR_SCALARS) {
3481 NDR_CHECK(ndr_push_align(ndr, 4));
3482 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info));
3483 }
3484 if (ndr_flags & NDR_BUFFERS) {
3485 if (r->info) {
3486 NDR_CHECK(ndr_push_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
3487 }
3488 }
3489 return NDR_ERR_SUCCESS;
3490 }
3491
3492 static enum ndr_err_code ndr_pull_ExtendedErrorInfoPtr(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfoPtr *r)
/* [<][>][^][v][top][bottom][index][help] */
3493 {
3494 uint32_t _ptr_info;
3495 TALLOC_CTX *_mem_save_info_0;
3496 if (ndr_flags & NDR_SCALARS) {
3497 NDR_CHECK(ndr_pull_align(ndr, 4));
3498 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
3499 if (_ptr_info) {
3500 NDR_PULL_ALLOC(ndr, r->info);
3501 } else {
3502 r->info = NULL;
3503 }
3504 }
3505 if (ndr_flags & NDR_BUFFERS) {
3506 if (r->info) {
3507 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3508 NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
3509 NDR_CHECK(ndr_pull_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
3510 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
3511 }
3512 }
3513 return NDR_ERR_SUCCESS;
3514 }
3515
3516 _PUBLIC_ void ndr_print_ExtendedErrorInfoPtr(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfoPtr *r)
/* [<][>][^][v][top][bottom][index][help] */
3517 {
3518 ndr_print_struct(ndr, name, "ExtendedErrorInfoPtr");
3519 ndr->depth++;
3520 ndr_print_ptr(ndr, "info", r->info);
3521 ndr->depth++;
3522 if (r->info) {
3523 ndr_print_ExtendedErrorInfo(ndr, "info", r->info);
3524 }
3525 ndr->depth--;
3526 ndr->depth--;
3527 }
3528
3529 static enum ndr_err_code ndr_push_decode_replPropertyMetaData(struct ndr_push *ndr, int flags, const struct decode_replPropertyMetaData *r)
/* [<][>][^][v][top][bottom][index][help] */
3530 {
3531 if (flags & NDR_IN) {
3532 NDR_CHECK(ndr_push_replPropertyMetaDataBlob(ndr, NDR_SCALARS, &r->in.blob));
3533 }
3534 if (flags & NDR_OUT) {
3535 }
3536 return NDR_ERR_SUCCESS;
3537 }
3538
3539 static enum ndr_err_code ndr_pull_decode_replPropertyMetaData(struct ndr_pull *ndr, int flags, struct decode_replPropertyMetaData *r)
/* [<][>][^][v][top][bottom][index][help] */
3540 {
3541 if (flags & NDR_IN) {
3542 NDR_CHECK(ndr_pull_replPropertyMetaDataBlob(ndr, NDR_SCALARS, &r->in.blob));
3543 }
3544 if (flags & NDR_OUT) {
3545 }
3546 return NDR_ERR_SUCCESS;
3547 }
3548
3549 _PUBLIC_ void ndr_print_decode_replPropertyMetaData(struct ndr_print *ndr, const char *name, int flags, const struct decode_replPropertyMetaData *r)
/* [<][>][^][v][top][bottom][index][help] */
3550 {
3551 ndr_print_struct(ndr, name, "decode_replPropertyMetaData");
3552 ndr->depth++;
3553 if (flags & NDR_SET_VALUES) {
3554 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3555 }
3556 if (flags & NDR_IN) {
3557 ndr_print_struct(ndr, "in", "decode_replPropertyMetaData");
3558 ndr->depth++;
3559 ndr_print_replPropertyMetaDataBlob(ndr, "blob", &r->in.blob);
3560 ndr->depth--;
3561 }
3562 if (flags & NDR_OUT) {
3563 ndr_print_struct(ndr, "out", "decode_replPropertyMetaData");
3564 ndr->depth++;
3565 ndr->depth--;
3566 }
3567 ndr->depth--;
3568 }
3569
3570 static enum ndr_err_code ndr_push_decode_replUpToDateVector(struct ndr_push *ndr, int flags, const struct decode_replUpToDateVector *r)
/* [<][>][^][v][top][bottom][index][help] */
3571 {
3572 if (flags & NDR_IN) {
3573 NDR_CHECK(ndr_push_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->in.blob));
3574 }
3575 if (flags & NDR_OUT) {
3576 }
3577 return NDR_ERR_SUCCESS;
3578 }
3579
3580 static enum ndr_err_code ndr_pull_decode_replUpToDateVector(struct ndr_pull *ndr, int flags, struct decode_replUpToDateVector *r)
/* [<][>][^][v][top][bottom][index][help] */
3581 {
3582 if (flags & NDR_IN) {
3583 NDR_CHECK(ndr_pull_replUpToDateVectorBlob(ndr, NDR_SCALARS, &r->in.blob));
3584 }
3585 if (flags & NDR_OUT) {
3586 }
3587 return NDR_ERR_SUCCESS;
3588 }
3589
3590 _PUBLIC_ void ndr_print_decode_replUpToDateVector(struct ndr_print *ndr, const char *name, int flags, const struct decode_replUpToDateVector *r)
/* [<][>][^][v][top][bottom][index][help] */
3591 {
3592 ndr_print_struct(ndr, name, "decode_replUpToDateVector");
3593 ndr->depth++;
3594 if (flags & NDR_SET_VALUES) {
3595 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3596 }
3597 if (flags & NDR_IN) {
3598 ndr_print_struct(ndr, "in", "decode_replUpToDateVector");
3599 ndr->depth++;
3600 ndr_print_replUpToDateVectorBlob(ndr, "blob", &r->in.blob);
3601 ndr->depth--;
3602 }
3603 if (flags & NDR_OUT) {
3604 ndr_print_struct(ndr, "out", "decode_replUpToDateVector");
3605 ndr->depth++;
3606 ndr->depth--;
3607 }
3608 ndr->depth--;
3609 }
3610
3611 static enum ndr_err_code ndr_push_decode_repsFromTo(struct ndr_push *ndr, int flags, const struct decode_repsFromTo *r)
/* [<][>][^][v][top][bottom][index][help] */
3612 {
3613 if (flags & NDR_IN) {
3614 NDR_CHECK(ndr_push_repsFromToBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3615 }
3616 if (flags & NDR_OUT) {
3617 }
3618 return NDR_ERR_SUCCESS;
3619 }
3620
3621 static enum ndr_err_code ndr_pull_decode_repsFromTo(struct ndr_pull *ndr, int flags, struct decode_repsFromTo *r)
/* [<][>][^][v][top][bottom][index][help] */
3622 {
3623 if (flags & NDR_IN) {
3624 NDR_CHECK(ndr_pull_repsFromToBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3625 }
3626 if (flags & NDR_OUT) {
3627 }
3628 return NDR_ERR_SUCCESS;
3629 }
3630
3631 _PUBLIC_ void ndr_print_decode_repsFromTo(struct ndr_print *ndr, const char *name, int flags, const struct decode_repsFromTo *r)
/* [<][>][^][v][top][bottom][index][help] */
3632 {
3633 ndr_print_struct(ndr, name, "decode_repsFromTo");
3634 ndr->depth++;
3635 if (flags & NDR_SET_VALUES) {
3636 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3637 }
3638 if (flags & NDR_IN) {
3639 ndr_print_struct(ndr, "in", "decode_repsFromTo");
3640 ndr->depth++;
3641 ndr_print_repsFromToBlob(ndr, "blob", &r->in.blob);
3642 ndr->depth--;
3643 }
3644 if (flags & NDR_OUT) {
3645 ndr_print_struct(ndr, "out", "decode_repsFromTo");
3646 ndr->depth++;
3647 ndr->depth--;
3648 }
3649 ndr->depth--;
3650 }
3651
3652 static enum ndr_err_code ndr_push_decode_partialAttributeSet(struct ndr_push *ndr, int flags, const struct decode_partialAttributeSet *r)
/* [<][>][^][v][top][bottom][index][help] */
3653 {
3654 if (flags & NDR_IN) {
3655 NDR_CHECK(ndr_push_partialAttributeSetBlob(ndr, NDR_SCALARS, &r->in.blob));
3656 }
3657 if (flags & NDR_OUT) {
3658 }
3659 return NDR_ERR_SUCCESS;
3660 }
3661
3662 static enum ndr_err_code ndr_pull_decode_partialAttributeSet(struct ndr_pull *ndr, int flags, struct decode_partialAttributeSet *r)
/* [<][>][^][v][top][bottom][index][help] */
3663 {
3664 if (flags & NDR_IN) {
3665 NDR_CHECK(ndr_pull_partialAttributeSetBlob(ndr, NDR_SCALARS, &r->in.blob));
3666 }
3667 if (flags & NDR_OUT) {
3668 }
3669 return NDR_ERR_SUCCESS;
3670 }
3671
3672 _PUBLIC_ void ndr_print_decode_partialAttributeSet(struct ndr_print *ndr, const char *name, int flags, const struct decode_partialAttributeSet *r)
/* [<][>][^][v][top][bottom][index][help] */
3673 {
3674 ndr_print_struct(ndr, name, "decode_partialAttributeSet");
3675 ndr->depth++;
3676 if (flags & NDR_SET_VALUES) {
3677 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3678 }
3679 if (flags & NDR_IN) {
3680 ndr_print_struct(ndr, "in", "decode_partialAttributeSet");
3681 ndr->depth++;
3682 ndr_print_partialAttributeSetBlob(ndr, "blob", &r->in.blob);
3683 ndr->depth--;
3684 }
3685 if (flags & NDR_OUT) {
3686 ndr_print_struct(ndr, "out", "decode_partialAttributeSet");
3687 ndr->depth++;
3688 ndr->depth--;
3689 }
3690 ndr->depth--;
3691 }
3692
3693 static enum ndr_err_code ndr_push_decode_prefixMap(struct ndr_push *ndr, int flags, const struct decode_prefixMap *r)
/* [<][>][^][v][top][bottom][index][help] */
3694 {
3695 if (flags & NDR_IN) {
3696 NDR_CHECK(ndr_push_prefixMapBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3697 }
3698 if (flags & NDR_OUT) {
3699 }
3700 return NDR_ERR_SUCCESS;
3701 }
3702
3703 static enum ndr_err_code ndr_pull_decode_prefixMap(struct ndr_pull *ndr, int flags, struct decode_prefixMap *r)
/* [<][>][^][v][top][bottom][index][help] */
3704 {
3705 if (flags & NDR_IN) {
3706 NDR_CHECK(ndr_pull_prefixMapBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3707 }
3708 if (flags & NDR_OUT) {
3709 }
3710 return NDR_ERR_SUCCESS;
3711 }
3712
3713 _PUBLIC_ void ndr_print_decode_prefixMap(struct ndr_print *ndr, const char *name, int flags, const struct decode_prefixMap *r)
/* [<][>][^][v][top][bottom][index][help] */
3714 {
3715 ndr_print_struct(ndr, name, "decode_prefixMap");
3716 ndr->depth++;
3717 if (flags & NDR_SET_VALUES) {
3718 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3719 }
3720 if (flags & NDR_IN) {
3721 ndr_print_struct(ndr, "in", "decode_prefixMap");
3722 ndr->depth++;
3723 ndr_print_prefixMapBlob(ndr, "blob", &r->in.blob);
3724 ndr->depth--;
3725 }
3726 if (flags & NDR_OUT) {
3727 ndr_print_struct(ndr, "out", "decode_prefixMap");
3728 ndr->depth++;
3729 ndr->depth--;
3730 }
3731 ndr->depth--;
3732 }
3733
3734 static enum ndr_err_code ndr_push_decode_ldapControlDirSync(struct ndr_push *ndr, int flags, const struct decode_ldapControlDirSync *r)
/* [<][>][^][v][top][bottom][index][help] */
3735 {
3736 if (flags & NDR_IN) {
3737 NDR_CHECK(ndr_push_ldapControlDirSyncCookie(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.cookie));
3738 }
3739 if (flags & NDR_OUT) {
3740 }
3741 return NDR_ERR_SUCCESS;
3742 }
3743
3744 static enum ndr_err_code ndr_pull_decode_ldapControlDirSync(struct ndr_pull *ndr, int flags, struct decode_ldapControlDirSync *r)
/* [<][>][^][v][top][bottom][index][help] */
3745 {
3746 if (flags & NDR_IN) {
3747 NDR_CHECK(ndr_pull_ldapControlDirSyncCookie(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.cookie));
3748 }
3749 if (flags & NDR_OUT) {
3750 }
3751 return NDR_ERR_SUCCESS;
3752 }
3753
3754 _PUBLIC_ void ndr_print_decode_ldapControlDirSync(struct ndr_print *ndr, const char *name, int flags, const struct decode_ldapControlDirSync *r)
/* [<][>][^][v][top][bottom][index][help] */
3755 {
3756 ndr_print_struct(ndr, name, "decode_ldapControlDirSync");
3757 ndr->depth++;
3758 if (flags & NDR_SET_VALUES) {
3759 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3760 }
3761 if (flags & NDR_IN) {
3762 ndr_print_struct(ndr, "in", "decode_ldapControlDirSync");
3763 ndr->depth++;
3764 ndr_print_ldapControlDirSyncCookie(ndr, "cookie", &r->in.cookie);
3765 ndr->depth--;
3766 }
3767 if (flags & NDR_OUT) {
3768 ndr_print_struct(ndr, "out", "decode_ldapControlDirSync");
3769 ndr->depth++;
3770 ndr->depth--;
3771 }
3772 ndr->depth--;
3773 }
3774
3775 static enum ndr_err_code ndr_push_decode_supplementalCredentials(struct ndr_push *ndr, int flags, const struct decode_supplementalCredentials *r)
/* [<][>][^][v][top][bottom][index][help] */
3776 {
3777 if (flags & NDR_IN) {
3778 NDR_CHECK(ndr_push_supplementalCredentialsBlob(ndr, NDR_SCALARS, &r->in.blob));
3779 }
3780 if (flags & NDR_OUT) {
3781 }
3782 return NDR_ERR_SUCCESS;
3783 }
3784
3785 static enum ndr_err_code ndr_pull_decode_supplementalCredentials(struct ndr_pull *ndr, int flags, struct decode_supplementalCredentials *r)
/* [<][>][^][v][top][bottom][index][help] */
3786 {
3787 if (flags & NDR_IN) {
3788 NDR_CHECK(ndr_pull_supplementalCredentialsBlob(ndr, NDR_SCALARS, &r->in.blob));
3789 }
3790 if (flags & NDR_OUT) {
3791 }
3792 return NDR_ERR_SUCCESS;
3793 }
3794
3795 _PUBLIC_ void ndr_print_decode_supplementalCredentials(struct ndr_print *ndr, const char *name, int flags, const struct decode_supplementalCredentials *r)
/* [<][>][^][v][top][bottom][index][help] */
3796 {
3797 ndr_print_struct(ndr, name, "decode_supplementalCredentials");
3798 ndr->depth++;
3799 if (flags & NDR_SET_VALUES) {
3800 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3801 }
3802 if (flags & NDR_IN) {
3803 ndr_print_struct(ndr, "in", "decode_supplementalCredentials");
3804 ndr->depth++;
3805 ndr_print_supplementalCredentialsBlob(ndr, "blob", &r->in.blob);
3806 ndr->depth--;
3807 }
3808 if (flags & NDR_OUT) {
3809 ndr_print_struct(ndr, "out", "decode_supplementalCredentials");
3810 ndr->depth++;
3811 ndr->depth--;
3812 }
3813 ndr->depth--;
3814 }
3815
3816 static enum ndr_err_code ndr_push_decode_Packages(struct ndr_push *ndr, int flags, const struct decode_Packages *r)
/* [<][>][^][v][top][bottom][index][help] */
3817 {
3818 if (flags & NDR_IN) {
3819 NDR_CHECK(ndr_push_package_PackagesBlob(ndr, NDR_SCALARS, &r->in.blob));
3820 }
3821 if (flags & NDR_OUT) {
3822 }
3823 return NDR_ERR_SUCCESS;
3824 }
3825
3826 static enum ndr_err_code ndr_pull_decode_Packages(struct ndr_pull *ndr, int flags, struct decode_Packages *r)
/* [<][>][^][v][top][bottom][index][help] */
3827 {
3828 if (flags & NDR_IN) {
3829 NDR_CHECK(ndr_pull_package_PackagesBlob(ndr, NDR_SCALARS, &r->in.blob));
3830 }
3831 if (flags & NDR_OUT) {
3832 }
3833 return NDR_ERR_SUCCESS;
3834 }
3835
3836 _PUBLIC_ void ndr_print_decode_Packages(struct ndr_print *ndr, const char *name, int flags, const struct decode_Packages *r)
/* [<][>][^][v][top][bottom][index][help] */
3837 {
3838 ndr_print_struct(ndr, name, "decode_Packages");
3839 ndr->depth++;
3840 if (flags & NDR_SET_VALUES) {
3841 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3842 }
3843 if (flags & NDR_IN) {
3844 ndr_print_struct(ndr, "in", "decode_Packages");
3845 ndr->depth++;
3846 ndr_print_package_PackagesBlob(ndr, "blob", &r->in.blob);
3847 ndr->depth--;
3848 }
3849 if (flags & NDR_OUT) {
3850 ndr_print_struct(ndr, "out", "decode_Packages");
3851 ndr->depth++;
3852 ndr->depth--;
3853 }
3854 ndr->depth--;
3855 }
3856
3857 static enum ndr_err_code ndr_push_decode_PrimaryKerberos(struct ndr_push *ndr, int flags, const struct decode_PrimaryKerberos *r)
/* [<][>][^][v][top][bottom][index][help] */
3858 {
3859 if (flags & NDR_IN) {
3860 NDR_CHECK(ndr_push_package_PrimaryKerberosBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3861 }
3862 if (flags & NDR_OUT) {
3863 }
3864 return NDR_ERR_SUCCESS;
3865 }
3866
3867 static enum ndr_err_code ndr_pull_decode_PrimaryKerberos(struct ndr_pull *ndr, int flags, struct decode_PrimaryKerberos *r)
/* [<][>][^][v][top][bottom][index][help] */
3868 {
3869 if (flags & NDR_IN) {
3870 NDR_CHECK(ndr_pull_package_PrimaryKerberosBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3871 }
3872 if (flags & NDR_OUT) {
3873 }
3874 return NDR_ERR_SUCCESS;
3875 }
3876
3877 _PUBLIC_ void ndr_print_decode_PrimaryKerberos(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryKerberos *r)
/* [<][>][^][v][top][bottom][index][help] */
3878 {
3879 ndr_print_struct(ndr, name, "decode_PrimaryKerberos");
3880 ndr->depth++;
3881 if (flags & NDR_SET_VALUES) {
3882 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3883 }
3884 if (flags & NDR_IN) {
3885 ndr_print_struct(ndr, "in", "decode_PrimaryKerberos");
3886 ndr->depth++;
3887 ndr_print_package_PrimaryKerberosBlob(ndr, "blob", &r->in.blob);
3888 ndr->depth--;
3889 }
3890 if (flags & NDR_OUT) {
3891 ndr_print_struct(ndr, "out", "decode_PrimaryKerberos");
3892 ndr->depth++;
3893 ndr->depth--;
3894 }
3895 ndr->depth--;
3896 }
3897
3898 static enum ndr_err_code ndr_push_decode_PrimaryCLEARTEXT(struct ndr_push *ndr, int flags, const struct decode_PrimaryCLEARTEXT *r)
/* [<][>][^][v][top][bottom][index][help] */
3899 {
3900 if (flags & NDR_IN) {
3901 NDR_CHECK(ndr_push_package_PrimaryCLEARTEXTBlob(ndr, NDR_SCALARS, &r->in.blob));
3902 }
3903 if (flags & NDR_OUT) {
3904 }
3905 return NDR_ERR_SUCCESS;
3906 }
3907
3908 static enum ndr_err_code ndr_pull_decode_PrimaryCLEARTEXT(struct ndr_pull *ndr, int flags, struct decode_PrimaryCLEARTEXT *r)
/* [<][>][^][v][top][bottom][index][help] */
3909 {
3910 if (flags & NDR_IN) {
3911 NDR_CHECK(ndr_pull_package_PrimaryCLEARTEXTBlob(ndr, NDR_SCALARS, &r->in.blob));
3912 }
3913 if (flags & NDR_OUT) {
3914 }
3915 return NDR_ERR_SUCCESS;
3916 }
3917
3918 _PUBLIC_ void ndr_print_decode_PrimaryCLEARTEXT(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryCLEARTEXT *r)
/* [<][>][^][v][top][bottom][index][help] */
3919 {
3920 ndr_print_struct(ndr, name, "decode_PrimaryCLEARTEXT");
3921 ndr->depth++;
3922 if (flags & NDR_SET_VALUES) {
3923 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3924 }
3925 if (flags & NDR_IN) {
3926 ndr_print_struct(ndr, "in", "decode_PrimaryCLEARTEXT");
3927 ndr->depth++;
3928 ndr_print_package_PrimaryCLEARTEXTBlob(ndr, "blob", &r->in.blob);
3929 ndr->depth--;
3930 }
3931 if (flags & NDR_OUT) {
3932 ndr_print_struct(ndr, "out", "decode_PrimaryCLEARTEXT");
3933 ndr->depth++;
3934 ndr->depth--;
3935 }
3936 ndr->depth--;
3937 }
3938
3939 static enum ndr_err_code ndr_push_decode_PrimaryWDigest(struct ndr_push *ndr, int flags, const struct decode_PrimaryWDigest *r)
/* [<][>][^][v][top][bottom][index][help] */
3940 {
3941 if (flags & NDR_IN) {
3942 NDR_CHECK(ndr_push_package_PrimaryWDigestBlob(ndr, NDR_SCALARS, &r->in.blob));
3943 }
3944 if (flags & NDR_OUT) {
3945 }
3946 return NDR_ERR_SUCCESS;
3947 }
3948
3949 static enum ndr_err_code ndr_pull_decode_PrimaryWDigest(struct ndr_pull *ndr, int flags, struct decode_PrimaryWDigest *r)
/* [<][>][^][v][top][bottom][index][help] */
3950 {
3951 if (flags & NDR_IN) {
3952 NDR_CHECK(ndr_pull_package_PrimaryWDigestBlob(ndr, NDR_SCALARS, &r->in.blob));
3953 }
3954 if (flags & NDR_OUT) {
3955 }
3956 return NDR_ERR_SUCCESS;
3957 }
3958
3959 _PUBLIC_ void ndr_print_decode_PrimaryWDigest(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryWDigest *r)
/* [<][>][^][v][top][bottom][index][help] */
3960 {
3961 ndr_print_struct(ndr, name, "decode_PrimaryWDigest");
3962 ndr->depth++;
3963 if (flags & NDR_SET_VALUES) {
3964 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3965 }
3966 if (flags & NDR_IN) {
3967 ndr_print_struct(ndr, "in", "decode_PrimaryWDigest");
3968 ndr->depth++;
3969 ndr_print_package_PrimaryWDigestBlob(ndr, "blob", &r->in.blob);
3970 ndr->depth--;
3971 }
3972 if (flags & NDR_OUT) {
3973 ndr_print_struct(ndr, "out", "decode_PrimaryWDigest");
3974 ndr->depth++;
3975 ndr->depth--;
3976 }
3977 ndr->depth--;
3978 }
3979
3980 static enum ndr_err_code ndr_push_decode_trustAuthInOut(struct ndr_push *ndr, int flags, const struct decode_trustAuthInOut *r)
/* [<][>][^][v][top][bottom][index][help] */
3981 {
3982 if (flags & NDR_IN) {
3983 NDR_CHECK(ndr_push_trustAuthInOutBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3984 }
3985 if (flags & NDR_OUT) {
3986 }
3987 return NDR_ERR_SUCCESS;
3988 }
3989
3990 static enum ndr_err_code ndr_pull_decode_trustAuthInOut(struct ndr_pull *ndr, int flags, struct decode_trustAuthInOut *r)
/* [<][>][^][v][top][bottom][index][help] */
3991 {
3992 if (flags & NDR_IN) {
3993 NDR_CHECK(ndr_pull_trustAuthInOutBlob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
3994 }
3995 if (flags & NDR_OUT) {
3996 }
3997 return NDR_ERR_SUCCESS;
3998 }
3999
4000 _PUBLIC_ void ndr_print_decode_trustAuthInOut(struct ndr_print *ndr, const char *name, int flags, const struct decode_trustAuthInOut *r)
/* [<][>][^][v][top][bottom][index][help] */
4001 {
4002 ndr_print_struct(ndr, name, "decode_trustAuthInOut");
4003 ndr->depth++;
4004 if (flags & NDR_SET_VALUES) {
4005 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4006 }
4007 if (flags & NDR_IN) {
4008 ndr_print_struct(ndr, "in", "decode_trustAuthInOut");
4009 ndr->depth++;
4010 ndr_print_trustAuthInOutBlob(ndr, "blob", &r->in.blob);
4011 ndr->depth--;
4012 }
4013 if (flags & NDR_OUT) {
4014 ndr_print_struct(ndr, "out", "decode_trustAuthInOut");
4015 ndr->depth++;
4016 ndr->depth--;
4017 }
4018 ndr->depth--;
4019 }
4020
4021 static enum ndr_err_code ndr_push_decode_trustDomainPasswords(struct ndr_push *ndr, int flags, const struct decode_trustDomainPasswords *r)
/* [<][>][^][v][top][bottom][index][help] */
4022 {
4023 if (flags & NDR_IN) {
4024 NDR_CHECK(ndr_push_trustDomainPasswords(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4025 }
4026 if (flags & NDR_OUT) {
4027 }
4028 return NDR_ERR_SUCCESS;
4029 }
4030
4031 static enum ndr_err_code ndr_pull_decode_trustDomainPasswords(struct ndr_pull *ndr, int flags, struct decode_trustDomainPasswords *r)
/* [<][>][^][v][top][bottom][index][help] */
4032 {
4033 if (flags & NDR_IN) {
4034 NDR_CHECK(ndr_pull_trustDomainPasswords(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
4035 }
4036 if (flags & NDR_OUT) {
4037 }
4038 return NDR_ERR_SUCCESS;
4039 }
4040
4041 _PUBLIC_ void ndr_print_decode_trustDomainPasswords(struct ndr_print *ndr, const char *name, int flags, const struct decode_trustDomainPasswords *r)
/* [<][>][^][v][top][bottom][index][help] */
4042 {
4043 ndr_print_struct(ndr, name, "decode_trustDomainPasswords");
4044 ndr->depth++;
4045 if (flags & NDR_SET_VALUES) {
4046 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4047 }
4048 if (flags & NDR_IN) {
4049 ndr_print_struct(ndr, "in", "decode_trustDomainPasswords");
4050 ndr->depth++;
4051 ndr_print_trustDomainPasswords(ndr, "blob", &r->in.blob);
4052 ndr->depth--;
4053 }
4054 if (flags & NDR_OUT) {
4055 ndr_print_struct(ndr, "out", "decode_trustDomainPasswords");
4056 ndr->depth++;
4057 ndr->depth--;
4058 }
4059 ndr->depth--;
4060 }
4061
4062 static enum ndr_err_code ndr_push_decode_ExtendedErrorInfo(struct ndr_push *ndr, int flags, const struct decode_ExtendedErrorInfo *r)
/* [<][>][^][v][top][bottom][index][help] */
4063 {
4064 if (flags & NDR_IN) {
4065 {
4066 struct ndr_push *_ndr_ptr;
4067 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ptr, 0xFFFFFC01, -1));
4068 NDR_CHECK(ndr_push_ExtendedErrorInfoPtr(_ndr_ptr, NDR_SCALARS|NDR_BUFFERS, &r->in.ptr));
4069 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ptr, 0xFFFFFC01, -1));
4070 }
4071 }
4072 if (flags & NDR_OUT) {
4073 }
4074 return NDR_ERR_SUCCESS;
4075 }
4076
4077 static enum ndr_err_code ndr_pull_decode_ExtendedErrorInfo(struct ndr_pull *ndr, int flags, struct decode_ExtendedErrorInfo *r)
/* [<][>][^][v][top][bottom][index][help] */
4078 {
4079 if (flags & NDR_IN) {
4080 {
4081 struct ndr_pull *_ndr_ptr;
4082 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ptr, 0xFFFFFC01, -1));
4083 NDR_CHECK(ndr_pull_ExtendedErrorInfoPtr(_ndr_ptr, NDR_SCALARS|NDR_BUFFERS, &r->in.ptr));
4084 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ptr, 0xFFFFFC01, -1));
4085 }
4086 }
4087 if (flags & NDR_OUT) {
4088 }
4089 return NDR_ERR_SUCCESS;
4090 }
4091
4092 _PUBLIC_ void ndr_print_decode_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, int flags, const struct decode_ExtendedErrorInfo *r)
/* [<][>][^][v][top][bottom][index][help] */
4093 {
4094 ndr_print_struct(ndr, name, "decode_ExtendedErrorInfo");
4095 ndr->depth++;
4096 if (flags & NDR_SET_VALUES) {
4097 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4098 }
4099 if (flags & NDR_IN) {
4100 ndr_print_struct(ndr, "in", "decode_ExtendedErrorInfo");
4101 ndr->depth++;
4102 ndr_print_ExtendedErrorInfoPtr(ndr, "ptr", &r->in.ptr);
4103 ndr->depth--;
4104 }
4105 if (flags & NDR_OUT) {
4106 ndr_print_struct(ndr, "out", "decode_ExtendedErrorInfo");
4107 ndr->depth++;
4108 ndr->depth--;
4109 }
4110 ndr->depth--;
4111 }
4112
4113 static const struct ndr_interface_call drsblobs_calls[] = {
4114 {
4115 "decode_replPropertyMetaData",
4116 sizeof(struct decode_replPropertyMetaData),
4117 (ndr_push_flags_fn_t) ndr_push_decode_replPropertyMetaData,
4118 (ndr_pull_flags_fn_t) ndr_pull_decode_replPropertyMetaData,
4119 (ndr_print_function_t) ndr_print_decode_replPropertyMetaData,
4120 false,
4121 },
4122 {
4123 "decode_replUpToDateVector",
4124 sizeof(struct decode_replUpToDateVector),
4125 (ndr_push_flags_fn_t) ndr_push_decode_replUpToDateVector,
4126 (ndr_pull_flags_fn_t) ndr_pull_decode_replUpToDateVector,
4127 (ndr_print_function_t) ndr_print_decode_replUpToDateVector,
4128 false,
4129 },
4130 {
4131 "decode_repsFromTo",
4132 sizeof(struct decode_repsFromTo),
4133 (ndr_push_flags_fn_t) ndr_push_decode_repsFromTo,
4134 (ndr_pull_flags_fn_t) ndr_pull_decode_repsFromTo,
4135 (ndr_print_function_t) ndr_print_decode_repsFromTo,
4136 false,
4137 },
4138 {
4139 "decode_partialAttributeSet",
4140 sizeof(struct decode_partialAttributeSet),
4141 (ndr_push_flags_fn_t) ndr_push_decode_partialAttributeSet,
4142 (ndr_pull_flags_fn_t) ndr_pull_decode_partialAttributeSet,
4143 (ndr_print_function_t) ndr_print_decode_partialAttributeSet,
4144 false,
4145 },
4146 {
4147 "decode_prefixMap",
4148 sizeof(struct decode_prefixMap),
4149 (ndr_push_flags_fn_t) ndr_push_decode_prefixMap,
4150 (ndr_pull_flags_fn_t) ndr_pull_decode_prefixMap,
4151 (ndr_print_function_t) ndr_print_decode_prefixMap,
4152 false,
4153 },
4154 {
4155 "decode_ldapControlDirSync",
4156 sizeof(struct decode_ldapControlDirSync),
4157 (ndr_push_flags_fn_t) ndr_push_decode_ldapControlDirSync,
4158 (ndr_pull_flags_fn_t) ndr_pull_decode_ldapControlDirSync,
4159 (ndr_print_function_t) ndr_print_decode_ldapControlDirSync,
4160 false,
4161 },
4162 {
4163 "decode_supplementalCredentials",
4164 sizeof(struct decode_supplementalCredentials),
4165 (ndr_push_flags_fn_t) ndr_push_decode_supplementalCredentials,
4166 (ndr_pull_flags_fn_t) ndr_pull_decode_supplementalCredentials,
4167 (ndr_print_function_t) ndr_print_decode_supplementalCredentials,
4168 false,
4169 },
4170 {
4171 "decode_Packages",
4172 sizeof(struct decode_Packages),
4173 (ndr_push_flags_fn_t) ndr_push_decode_Packages,
4174 (ndr_pull_flags_fn_t) ndr_pull_decode_Packages,
4175 (ndr_print_function_t) ndr_print_decode_Packages,
4176 false,
4177 },
4178 {
4179 "decode_PrimaryKerberos",
4180 sizeof(struct decode_PrimaryKerberos),
4181 (ndr_push_flags_fn_t) ndr_push_decode_PrimaryKerberos,
4182 (ndr_pull_flags_fn_t) ndr_pull_decode_PrimaryKerberos,
4183 (ndr_print_function_t) ndr_print_decode_PrimaryKerberos,
4184 false,
4185 },
4186 {
4187 "decode_PrimaryCLEARTEXT",
4188 sizeof(struct decode_PrimaryCLEARTEXT),
4189 (ndr_push_flags_fn_t) ndr_push_decode_PrimaryCLEARTEXT,
4190 (ndr_pull_flags_fn_t) ndr_pull_decode_PrimaryCLEARTEXT,
4191 (ndr_print_function_t) ndr_print_decode_PrimaryCLEARTEXT,
4192 false,
4193 },
4194 {
4195 "decode_PrimaryWDigest",
4196 sizeof(struct decode_PrimaryWDigest),
4197 (ndr_push_flags_fn_t) ndr_push_decode_PrimaryWDigest,
4198 (ndr_pull_flags_fn_t) ndr_pull_decode_PrimaryWDigest,
4199 (ndr_print_function_t) ndr_print_decode_PrimaryWDigest,
4200 false,
4201 },
4202 {
4203 "decode_trustAuthInOut",
4204 sizeof(struct decode_trustAuthInOut),
4205 (ndr_push_flags_fn_t) ndr_push_decode_trustAuthInOut,
4206 (ndr_pull_flags_fn_t) ndr_pull_decode_trustAuthInOut,
4207 (ndr_print_function_t) ndr_print_decode_trustAuthInOut,
4208 false,
4209 },
4210 {
4211 "decode_trustDomainPasswords",
4212 sizeof(struct decode_trustDomainPasswords),
4213 (ndr_push_flags_fn_t) ndr_push_decode_trustDomainPasswords,
4214 (ndr_pull_flags_fn_t) ndr_pull_decode_trustDomainPasswords,
4215 (ndr_print_function_t) ndr_print_decode_trustDomainPasswords,
4216 false,
4217 },
4218 {
4219 "decode_ExtendedErrorInfo",
4220 sizeof(struct decode_ExtendedErrorInfo),
4221 (ndr_push_flags_fn_t) ndr_push_decode_ExtendedErrorInfo,
4222 (ndr_pull_flags_fn_t) ndr_pull_decode_ExtendedErrorInfo,
4223 (ndr_print_function_t) ndr_print_decode_ExtendedErrorInfo,
4224 false,
4225 },
4226 { NULL, 0, NULL, NULL, NULL, false }
4227 };
4228
4229 static const char * const drsblobs_endpoint_strings[] = {
4230 "ncacn_np:[\\pipe\\drsblobs]",
4231 };
4232
4233 static const struct ndr_interface_string_array drsblobs_endpoints = {
4234 .count = 1,
4235 .names = drsblobs_endpoint_strings
4236 };
4237
4238 static const char * const drsblobs_authservice_strings[] = {
4239 "host",
4240 };
4241
4242 static const struct ndr_interface_string_array drsblobs_authservices = {
4243 .count = 1,
4244 .names = drsblobs_authservice_strings
4245 };
4246
4247
4248 const struct ndr_interface_table ndr_table_drsblobs = {
4249 .name = "drsblobs",
4250 .syntax_id = {
4251 {0x12345778,0x1234,0xabcd,{0x00,0x01},{0x00,0x00,0x00,0x01}},
4252 NDR_DRSBLOBS_VERSION
4253 },
4254 .helpstring = NDR_DRSBLOBS_HELPSTRING,
4255 .num_calls = 14,
4256 .calls = drsblobs_calls,
4257 .endpoints = &drsblobs_endpoints,
4258 .authservices = &drsblobs_authservices
4259 };
4260