1 #define FAKE_TREE_IS_VISIBLE 1
2 /* fake that the tree is visible so that proto.c will not try to
3 "fake" generation of finfo values/nodes.
4 Thus this means netware dissector is slower than it has to, but it wont crash.
5 once the dissector is refactored to avoid calling fvalue_ functions directly this faking of whether the tree is visible or not can be removed.
11 * Routines for NetWare Core Protocol. This C code gets #include'd
12 * into packet-ncp2222.c, which is generated from ncp2222.py. It's
13 * #include'd instead of being in a separate compilation unit so
14 * that all the data tables in packet-ncp2222.c can remain static.
16 * Gilbert Ramirez <gram@alumni.rice.edu>
17 * Modified to decode NDS packets by Greg Morris <gmorris@novell.com>
19 * Portions Copyright (c) Gilbert Ramirez 2000-2002
20 * Portions Copyright (c) Novell, Inc. 2000-2003
24 * Wireshark - Network traffic analyzer
25 * By Gerald Combs <gerald@wireshark.org>
26 * Copyright 2000 Gerald Combs
28 * This program is free software; you can redistribute it and/or
29 * modify it under the terms of the GNU General Public License
30 * as published by the Free Software Foundation; either version 2
31 * of the License, or (at your option) any later version.
33 * This program is distributed in the hope that it will be useful,
34 * but WITHOUT ANY WARRANTY; without even the implied warranty of
35 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36 * GNU General Public License for more details.
38 * You should have received a copy of the GNU General Public License
39 * along with this program; if not, write to the Free Software
40 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
43 #define NCP_PACKET_INIT_COUNT 200
44 #define PROTO_LENGTH_UNTIL_END -1
46 gboolean nds_defragment = TRUE;
47 gboolean nds_echo_eid = TRUE;
48 gboolean ncp_echo_err = TRUE;
49 gboolean ncp_echo_conn = TRUE;
50 gboolean ncp_echo_server = TRUE;
51 gboolean ncp_echo_file = TRUE;
53 extern dissector_handle_t nds_data_handle;
55 guint32 nds_frag_verb;
56 guint32 nds_frag_version;
57 guint32 nds_frag_flags;
60 gboolean nds_fragmented;
64 char mv_resolve_name_string[128];
66 const fragment_items nds_frag_items = {
71 &hf_nds_segment_overlap,
72 &hf_nds_segment_overlap_conflict,
73 &hf_nds_segment_multiple_tails,
74 &hf_nds_segment_too_long_segment,
75 &hf_nds_segment_error,
80 #define NDS_TAG_NO_SUCH_ENTRY 0x00000000
81 #define NDS_TAG_LOCAL_ENTRY 0x00000001
82 #define NDS_TAG_REMOTE_ENTRY 0x00000002
83 #define NDS_TAG_ALIAS_ENTRY 0x00000003
84 #define NDS_TAG_REFERRAL_INFORMATION 0x00000004
85 #define NDS_TAG_ENTRY_AND_REFERRALS 0x00000006
87 static const value_string zensearchenum[] = {
89 { 1, "Object Container" },
90 { 2, "Associated Container" },
91 { 3, "Selected Container" },
95 static const value_string nds_tags[] = {
96 { NDS_TAG_NO_SUCH_ENTRY, "No Such Entry" },
97 { NDS_TAG_LOCAL_ENTRY, "Local Entry" },
98 { NDS_TAG_REMOTE_ENTRY, "Remote Entry" },
99 { NDS_TAG_ALIAS_ENTRY, "Alias Entry" },
100 { NDS_TAG_REFERRAL_INFORMATION, "Referral Information" },
101 { NDS_TAG_ENTRY_AND_REFERRALS, "Entry and Referrals" },
105 static const value_string nds_info_type[] = {
106 { 0x00000000, "Attribute Names Only / " },
107 { 0x00000001, "Attribute Name & Value / " },
108 { 0x00000002, "Effective Privileges / " },
109 { 0x00000003, "Value Information / " },
110 { 0x00000004, "Abbreviated Value / " },
114 static const value_string nds_kind_of_changes[] = {
115 { 0x00000000, "Add Attribute" },
116 { 0x00000001, "Remove Attribute" },
117 { 0x00000002, "Add Value" },
118 { 0x00000003, "Remove Value" },
119 { 0x00000004, "Add Additional Value" },
120 { 0x00000005, "Overwrite Value" },
121 { 0x00000006, "Clear Attribute" },
122 { 0x00000007, "Clear Value" },
126 static const value_string es_type[] = {
127 { 0x00000000, "No type is specified" },
128 { 0x00000001, "Unicode string" },
129 { 0x00000002, "Partial name" },
130 { 0x00000003, "Referrals" },
131 { 0x00000004, "Tuned name" },
132 { 0x00000005, "GUID attribute" },
133 { 0x00000006, "Local entry ID" },
134 { 0x00000007, "Number of defined entry specifiers" },
138 static const value_string ncp_rights_vals[] = {
139 { 0x00, "No Rights"},
142 { 0x03, "Read, Write"},
143 { 0x04, "Deny Read"},
144 { 0x05, "Read, Deny Read"},
145 { 0x06, "Write, Deny Read"},
146 { 0x07, "Read, Write, Deny Read"},
147 { 0x08, "Deny Write"},
148 { 0x09, "Read, Deny Write"},
149 { 0x0a, "Write, Deny Write"},
150 { 0x0b, "Read, Write, Deny Write"},
151 { 0x0c, "Deny Read, Deny Write"},
152 { 0x0d, "Read, Deny Read, Deny Write"},
153 { 0x0e, "Write, Deny Read, Deny Write"},
154 { 0x0f, "Read, Write, Deny Read, Deny Write"},
155 { 0x10, "Compatibility"},
156 { 0x11, "Read, Compatibility"},
157 { 0x12, "Write, Compatibility"},
158 { 0x13, "Read, Write, Compatibility"},
159 { 0x14, "Deny Read, Compatibility"},
160 { 0x15, "Read, Deny Read, Compatibility"},
161 { 0x16, "Write, Deny Read, Compatibility"},
162 { 0x17, "Read, Write, Deny Read, Compatibility"},
163 { 0x18, "Deny Write, Compatibility"},
164 { 0x19, "Read, Deny Write, Compatibility"},
165 { 0x1a, "Write, Deny Write, Compatibility"},
166 { 0x1b, "Read, Write, Deny Write, Compatibility"},
167 { 0x1c, "Deny Read, Deny Write, Compatibility"},
168 { 0x1d, "Read, Deny Read, Deny Write, Compatibility"},
169 { 0x1e, "Write, Deny Read, Deny Write, Compatibility"},
170 { 0x1f, "Read, Write, Deny Read, Deny Write, Compatibility"},
171 { 0x40, "File Write Through"},
172 { 0x41, "Read, File Write Through"},
173 { 0x42, "Write, File Write Through"},
174 { 0x43, "Read, Write, File Write Through"},
175 { 0x44, "Deny Read, File Write Through"},
176 { 0x45, "Read, Deny Read, File Write Through"},
177 { 0x46, "Write, Deny Read, File Write Through"},
178 { 0x47, "Read, Write, Deny Read, File Write Through"},
179 { 0x48, "Deny Write, File Write Through"},
180 { 0x49, "Read, Deny Write, File Write Through"},
181 { 0x4a, "Write, Deny Write, File Write Through"},
182 { 0x4b, "Read, Write, Deny Write, File Write Through"},
183 { 0x4c, "Deny Read, Deny Write, File Write Through"},
184 { 0x4d, "Read, Deny Read, Deny Write, File Write Through"},
185 { 0x4e, "Write, Deny Read, Deny Write, File Write Through"},
186 { 0x4f, "Read, Write, Deny Read, Deny Write, File Write Through"},
187 { 0x50, "Compatibility, File Write Through"},
188 { 0x51, "Read, Compatibility, File Write Through"},
189 { 0x52, "Write, Compatibility, File Write Through"},
190 { 0x53, "Read, Write, Compatibility, File Write Through"},
191 { 0x54, "Deny Read, Compatibility, File Write Through"},
192 { 0x55, "Read, Deny Read, Compatibility, File Write Through"},
193 { 0x56, "Write, Deny Read, Compatibility, File Write Through"},
194 { 0x57, "Read, Write, Deny Read, Compatibility, File Write Through"},
195 { 0x58, "Deny Write, Compatibility, File Write Through"},
196 { 0x59, "Read, Deny Write, Compatibility, File Write Through"},
197 { 0x5a, "Write, Deny Write, Compatibility, File Write Through"},
198 { 0x5b, "Read, Write, Deny Write, Compatibility, File Write Through"},
199 { 0x5c, "Deny Read, Deny Write, Compatibility, File Write Through"},
200 { 0x5d, "Read, Deny Read, Deny Write, Compatibility, File Write Through"},
201 { 0x5e, "Write, Deny Read, Deny Write, Compatibility, File Write Through"},
202 { 0x5f, "Read, Write, Deny Read, Deny Write, Compatibility, File Write Through"},
206 static const value_string open_create_mode_vals[] = {
209 { 0x03, "Open, Replace"},
211 { 0x09, "Open, Create"},
212 { 0x0a, "Replace, Create"},
213 { 0x0b, "Open, Replace, Create"},
215 { 0x21, "Open, 64-bit"},
216 { 0x22, "Replace, 64-bit"},
217 { 0x23, "Open, Replace, 64-bit"},
218 { 0x28, "Create, 64-bit"},
219 { 0x29, "Open, Create, 64-bit"},
220 { 0x2a, "Replace, Create, 64-bit"},
221 { 0x2b, "Open, Replace, Create, 64-bit"},
222 { 0x40, "Read Only"},
223 { 0x41, "Open, Read Only"},
224 { 0x42, "Replace, Read Only"},
225 { 0x43, "Open, Replace, Read Only"},
226 { 0x48, "Create, Read Only"},
227 { 0x49, "Open, Create, Read Only"},
228 { 0x4a, "Replace, Create, Read Only"},
229 { 0x4b, "Open, Replace, Create, Read Only"},
230 { 0x60, "64-bit, Read Only"},
231 { 0x61, "Open, 64-bit, Read Only"},
232 { 0x62, "Replace, 64-bit, Read Only"},
233 { 0x63, "Open, Replace, 64-bit, Read Only"},
234 { 0x68, "Create, 64-bit, Read Only"},
235 { 0x69, "Open, Create, 64-bit, Read Only"},
236 { 0x6a, "Replace, Create, 64-bit, Read Only"},
237 { 0x6b, "Open, Replace, Create, 64-bit, Read Only"},
239 { 0x81, "Open, Op-Lock"},
240 { 0x82, "Replace, Op-Lock"},
241 { 0x83, "Open, Replace, Op-Lock"},
242 { 0x88, "Create, Op-Lock"},
243 { 0x89, "Open, Create, Op-Lock"},
244 { 0x8a, "Replace, Create, Op-Lock"},
245 { 0x8b, "Open, Replace, Create, Op-Lock"},
246 { 0xa0, "64-bit, Op-Lock"},
247 { 0xa1, "Open, 64-bit, Op-Lock"},
248 { 0xa2, "Replace, 64-bit, Op-Lock"},
249 { 0xa3, "Open, Replace, 64-bit, Op-Lock"},
250 { 0xa8, "Create, 64-bit, Op-Lock"},
251 { 0xa9, "Open, Create, 64-bit, Op-Lock"},
252 { 0xaa, "Replace, Create, 64-bit, Op-Lock"},
253 { 0xab, "Open, Replace, Create, 64-bit, Op-Lock"},
254 { 0xc0, "Read Only, Op-Lock"},
255 { 0xc1, "Open, Read Only, Op-Lock"},
256 { 0xc2, "Replace, Read Only, Op-Lock"},
257 { 0xc3, "Open, Replace, Read Only, Op-Lock"},
258 { 0xc8, "Create, Read Only, Op-Lock"},
259 { 0xc9, "Open, Create, Read Only, Op-Lock"},
260 { 0xca, "Replace, Create, Read Only, Op-Lock"},
261 { 0xcb, "Open, Replace, Create, Read Only, Op-Lock"},
262 { 0xe0, "64-bit, Read Only, Op-Lock"},
263 { 0xe1, "Open, 64-bit, Read Only, Op-Lock"},
264 { 0xe2, "Replace, 64-bit, Read Only, Op-Lock"},
265 { 0xe3, "Open, Replace, 64-bit, Read Only, Op-Lock"},
266 { 0xe8, "Create, 64-bit, Read Only, Op-Lock"},
267 { 0xe9, "Open, Create, 64-bit, Read Only, Op-Lock"},
268 { 0xea, "Replace, Create, 64-bit, Read Only, Op-Lock"},
269 { 0xeb, "Open, Replace, Create, 64-bit, Read Only, Op-Lock"},
273 static const value_string open_create_action_vals[] = {
276 { 0x03, "Opened, Created"},
278 { 0x05, "Opened, Replaced"},
279 { 0x06, "Created, Replaced"},
280 { 0x07, "Opened, Created, Replaced"},
281 { 0x08, "Compressed"},
282 { 0x09, "Opened, Compressed"},
283 { 0x0a, "Created, Compressed"},
284 { 0x0b, "Opened, Created, Compressed"},
285 { 0x0c, "Replaced, Compressed"},
286 { 0x0d, "Opened, Replaced, Compressed"},
287 { 0x0e, "Created, Replaced, Compressed"},
288 { 0x0f, "Opened, Created, Replaced, Compressed"},
289 { 0x80, "Read Only"},
290 { 0x81, "Opened, Read Only"},
291 { 0x82, "Created, Read Only"},
292 { 0x83, "Opened, Created, Read Only"},
293 { 0x84, "Replaced, Read Only"},
294 { 0x85, "Opened, Replaced, Read Only"},
295 { 0x86, "Created, Replaced, Read Only"},
296 { 0x87, "Opened, Created, Replaced, Read Only"},
297 { 0x88, "Compressed, Read Only"},
298 { 0x89, "Opened, Compressed, Read Only"},
299 { 0x8a, "Created, Compressed, Read Only"},
300 { 0x8b, "Opened, Created, Compressed, Read Only"},
301 { 0x8c, "Replaced, Compressed, Read Only"},
302 { 0x8d, "Opened, Replaced, Compressed, Read Only"},
303 { 0x8e, "Created, Replaced, Compressed, Read Only"},
304 { 0x8f, "Opened, Created, Replaced, Compressed, Read Only"},
308 static const value_string access_rights_vals[] = {
309 { 0x0000, "No Rights"},
312 { 0x0003, "Read, Write"},
314 { 0x0005, "Read, Open"},
315 { 0x0006, "Write, Open"},
316 { 0x0007, "Read, Write, Open"},
318 { 0x0009, "Read, Create"},
319 { 0x000a, "Write, Create"},
320 { 0x000b, "Read, Write, Create"},
321 { 0x000c, "Open, Create"},
322 { 0x000d, "Read, Open, Create"},
323 { 0x000e, "Write, Open, Create"},
324 { 0x000f, "Read, Write, Open, Create"},
326 { 0x0011, "Read, Delete"},
327 { 0x0012, "Write, Delete"},
328 { 0x0013, "Read, Write, Delete"},
329 { 0x0014, "Open, Delete"},
330 { 0x0015, "Read, Open, Delete"},
331 { 0x0016, "Write, Open, Delete"},
332 { 0x0017, "Read, Write, Open, Delete"},
333 { 0x0018, "Create, Delete"},
334 { 0x0019, "Read, Create, Delete"},
335 { 0x001a, "Write, Create, Delete"},
336 { 0x001b, "Read, Write, Create, Delete"},
337 { 0x001c, "Open, Create, Delete"},
338 { 0x001d, "Read, Open, Create, Delete"},
339 { 0x001e, "Write, Open, Create, Delete"},
340 { 0x001f, "Read, Write, Open, Create, Delete"},
341 { 0x0020, "Parental"},
342 { 0x0021, "Read, Parental"},
343 { 0x0022, "Write, Parental"},
344 { 0x0023, "Read, Write, Parental"},
345 { 0x0024, "Open, Parental"},
346 { 0x0025, "Read, Open, Parental"},
347 { 0x0026, "Write, Open, Parental"},
348 { 0x0027, "Read, Write, Open, Parental"},
349 { 0x0028, "Create, Parental"},
350 { 0x0029, "Read, Create, Parental"},
351 { 0x002a, "Write, Create, Parental"},
352 { 0x002b, "Read, Write, Create, Parental"},
353 { 0x002c, "Open, Create, Parental"},
354 { 0x002d, "Read, Open, Create, Parental"},
355 { 0x002e, "Write, Open, Create, Parental"},
356 { 0x002f, "Read, Write, Open, Create, Parental"},
357 { 0x0030, "Delete, Parental"},
358 { 0x0031, "Read, Delete, Parental"},
359 { 0x0032, "Write, Delete, Parental"},
360 { 0x0033, "Read, Write, Delete, Parental"},
361 { 0x0034, "Open, Delete, Parental"},
362 { 0x0035, "Read, Open, Delete, Parental"},
363 { 0x0036, "Write, Open, Delete, Parental"},
364 { 0x0037, "Read, Write, Open, Delete, Parental"},
365 { 0x0038, "Create, Delete, Parental"},
366 { 0x0039, "Read, Create, Delete, Parental"},
367 { 0x003a, "Write, Create, Delete, Parental"},
368 { 0x003b, "Read, Write, Create, Delete, Parental"},
369 { 0x003c, "Open, Create, Delete, Parental"},
370 { 0x003d, "Read, Open, Create, Delete, Parental"},
371 { 0x003e, "Write, Open, Create, Delete, Parental"},
372 { 0x003f, "Read, Write, Open, Create, Delete, Parental"},
374 { 0x0041, "Read, Search"},
375 { 0x0042, "Write, Search"},
376 { 0x0043, "Read, Write, Search"},
377 { 0x0044, "Open, Search"},
378 { 0x0045, "Read, Open, Search"},
379 { 0x0046, "Write, Open, Search"},
380 { 0x0047, "Read, Write, Open, Search"},
381 { 0x0048, "Create, Search"},
382 { 0x0049, "Read, Create, Search"},
383 { 0x004a, "Write, Create, Search"},
384 { 0x004b, "Read, Write, Create, Search"},
385 { 0x004c, "Open, Create, Search"},
386 { 0x004d, "Read, Open, Create, Search"},
387 { 0x004e, "Write, Open, Create, Search"},
388 { 0x004f, "Read, Write, Open, Create, Search"},
389 { 0x0050, "Delete, Search"},
390 { 0x0051, "Read, Delete, Search"},
391 { 0x0052, "Write, Delete, Search"},
392 { 0x0053, "Read, Write, Delete, Search"},
393 { 0x0054, "Open, Delete, Search"},
394 { 0x0055, "Read, Open, Delete, Search"},
395 { 0x0056, "Write, Open, Delete, Search"},
396 { 0x0057, "Read, Write, Open, Delete, Search"},
397 { 0x0058, "Create, Delete, Search"},
398 { 0x0059, "Read, Create, Delete, Search"},
399 { 0x005a, "Write, Create, Delete, Search"},
400 { 0x005b, "Read, Write, Create, Delete, Search"},
401 { 0x005c, "Open, Create, Delete, Search"},
402 { 0x005d, "Read, Open, Create, Delete, Search"},
403 { 0x005e, "Write, Open, Create, Delete, Search"},
404 { 0x005f, "Read, Write, Open, Create, Delete, Search"},
405 { 0x0060, "Parental, Search"},
406 { 0x0061, "Read, Parental, Search"},
407 { 0x0062, "Write, Parental, Search"},
408 { 0x0063, "Read, Write, Parental, Search"},
409 { 0x0064, "Open, Parental, Search"},
410 { 0x0065, "Read, Open, Parental, Search"},
411 { 0x0066, "Write, Open, Parental, Search"},
412 { 0x0067, "Read, Write, Open, Parental, Search"},
413 { 0x0068, "Create, Parental, Search"},
414 { 0x0069, "Read, Create, Parental, Search"},
415 { 0x006a, "Write, Create, Parental, Search"},
416 { 0x006b, "Read, Write, Create, Parental, Search"},
417 { 0x006c, "Open, Create, Parental, Search"},
418 { 0x006d, "Read, Open, Create, Parental, Search"},
419 { 0x006e, "Write, Open, Create, Parental, Search"},
420 { 0x006f, "Read, Write, Open, Create, Parental, Search"},
421 { 0x0070, "Delete, Parental, Search"},
422 { 0x0071, "Read, Delete, Parental, Search"},
423 { 0x0072, "Write, Delete, Parental, Search"},
424 { 0x0073, "Read, Write, Delete, Parental, Search"},
425 { 0x0074, "Open, Delete, Parental, Search"},
426 { 0x0075, "Read, Open, Delete, Parental, Search"},
427 { 0x0076, "Write, Open, Delete, Parental, Search"},
428 { 0x0077, "Read, Write, Open, Delete, Parental, Search"},
429 { 0x0078, "Create, Delete, Parental, Search"},
430 { 0x0079, "Read, Create, Delete, Parental, Search"},
431 { 0x007a, "Write, Create, Delete, Parental, Search"},
432 { 0x007b, "Read, Write, Create, Delete, Parental, Search"},
433 { 0x007c, "Open, Create, Delete, Parental, Search"},
434 { 0x007d, "Read, Open, Create, Delete, Parental, Search"},
435 { 0x007e, "Write, Open, Create, Delete, Parental, Search"},
436 { 0x007f, "Read, Write, Open, Create, Delete, Parental, Search"},
438 { 0x0081, "Read, Modify"},
439 { 0x0082, "Write, Modify"},
440 { 0x0083, "Read, Write, Modify"},
441 { 0x0084, "Open, Modify"},
442 { 0x0085, "Read, Open, Modify"},
443 { 0x0086, "Write, Open, Modify"},
444 { 0x0087, "Read, Write, Open, Modify"},
445 { 0x0088, "Create, Modify"},
446 { 0x0089, "Read, Create, Modify"},
447 { 0x008a, "Write, Create, Modify"},
448 { 0x008b, "Read, Write, Create, Modify"},
449 { 0x008c, "Open, Create, Modify"},
450 { 0x008d, "Read, Open, Create, Modify"},
451 { 0x008e, "Write, Open, Create, Modify"},
452 { 0x008f, "Read, Write, Open, Create, Modify"},
453 { 0x0090, "Delete, Modify"},
454 { 0x0091, "Read, Delete, Modify"},
455 { 0x0092, "Write, Delete, Modify"},
456 { 0x0093, "Read, Write, Delete, Modify"},
457 { 0x0094, "Open, Delete, Modify"},
458 { 0x0095, "Read, Open, Delete, Modify"},
459 { 0x0096, "Write, Open, Delete, Modify"},
460 { 0x0097, "Read, Write, Open, Delete, Modify"},
461 { 0x0098, "Create, Delete, Modify"},
462 { 0x0099, "Read, Create, Delete, Modify"},
463 { 0x009a, "Write, Create, Delete, Modify"},
464 { 0x009b, "Read, Write, Create, Delete, Modify"},
465 { 0x009c, "Open, Create, Delete, Modify"},
466 { 0x009d, "Read, Open, Create, Delete, Modify"},
467 { 0x009e, "Write, Open, Create, Delete, Modify"},
468 { 0x009f, "Read, Write, Open, Create, Delete, Modify"},
469 { 0x00a0, "Parental, Modify"},
470 { 0x00a1, "Read, Parental, Modify"},
471 { 0x00a2, "Write, Parental, Modify"},
472 { 0x00a3, "Read, Write, Parental, Modify"},
473 { 0x00a4, "Open, Parental, Modify"},
474 { 0x00a5, "Read, Open, Parental, Modify"},
475 { 0x00a6, "Write, Open, Parental, Modify"},
476 { 0x00a7, "Read, Write, Open, Parental, Modify"},
477 { 0x00a8, "Create, Parental, Modify"},
478 { 0x00a9, "Read, Create, Parental, Modify"},
479 { 0x00aa, "Write, Create, Parental, Modify"},
480 { 0x00ab, "Read, Write, Create, Parental, Modify"},
481 { 0x00ac, "Open, Create, Parental, Modify"},
482 { 0x00ad, "Read, Open, Create, Parental, Modify"},
483 { 0x00ae, "Write, Open, Create, Parental, Modify"},
484 { 0x00af, "Read, Write, Open, Create, Parental, Modify"},
485 { 0x00b0, "Delete, Parental, Modify"},
486 { 0x00b1, "Read, Delete, Parental, Modify"},
487 { 0x00b2, "Write, Delete, Parental, Modify"},
488 { 0x00b3, "Read, Write, Delete, Parental, Modify"},
489 { 0x00b4, "Open, Delete, Parental, Modify"},
490 { 0x00b5, "Read, Open, Delete, Parental, Modify"},
491 { 0x00b6, "Write, Open, Delete, Parental, Modify"},
492 { 0x00b7, "Read, Write, Open, Delete, Parental, Modify"},
493 { 0x00b8, "Create, Delete, Parental, Modify"},
494 { 0x00b9, "Read, Create, Delete, Parental, Modify"},
495 { 0x00ba, "Write, Create, Delete, Parental, Modify"},
496 { 0x00bb, "Read, Write, Create, Delete, Parental, Modify"},
497 { 0x00bc, "Open, Create, Delete, Parental, Modify"},
498 { 0x00bd, "Read, Open, Create, Delete, Parental, Modify"},
499 { 0x00be, "Write, Open, Create, Delete, Parental, Modify"},
500 { 0x00bf, "Read, Write, Open, Create, Delete, Parental, Modify"},
501 { 0x00c0, "Search, Modify"},
502 { 0x00c1, "Read, Search, Modify"},
503 { 0x00c2, "Write, Search, Modify"},
504 { 0x00c3, "Read, Write, Search, Modify"},
505 { 0x00c4, "Open, Search, Modify"},
506 { 0x00c5, "Read, Open, Search, Modify"},
507 { 0x00c6, "Write, Open, Search, Modify"},
508 { 0x00c7, "Read, Write, Open, Search, Modify"},
509 { 0x00c8, "Create, Search, Modify"},
510 { 0x00c9, "Read, Create, Search, Modify"},
511 { 0x00ca, "Write, Create, Search, Modify"},
512 { 0x00cb, "Read, Write, Create, Search, Modify"},
513 { 0x00cc, "Open, Create, Search, Modify"},
514 { 0x00cd, "Read, Open, Create, Search, Modify"},
515 { 0x00ce, "Write, Open, Create, Search, Modify"},
516 { 0x00cf, "Read, Write, Open, Create, Search, Modify"},
517 { 0x00d0, "Delete, Search, Modify"},
518 { 0x00d1, "Read, Delete, Search, Modify"},
519 { 0x00d2, "Write, Delete, Search, Modify"},
520 { 0x00d3, "Read, Write, Delete, Search, Modify"},
521 { 0x00d4, "Open, Delete, Search, Modify"},
522 { 0x00d5, "Read, Open, Delete, Search, Modify"},
523 { 0x00d6, "Write, Open, Delete, Search, Modify"},
524 { 0x00d7, "Read, Write, Open, Delete, Search, Modify"},
525 { 0x00d8, "Create, Delete, Search, Modify"},
526 { 0x00d9, "Read, Create, Delete, Search, Modify"},
527 { 0x00da, "Write, Create, Delete, Search, Modify"},
528 { 0x00db, "Read, Write, Create, Delete, Search, Modify"},
529 { 0x00dc, "Open, Create, Delete, Search, Modify"},
530 { 0x00dd, "Read, Open, Create, Delete, Search, Modify"},
531 { 0x00de, "Write, Open, Create, Delete, Search, Modify"},
532 { 0x00df, "Read, Write, Open, Create, Delete, Search, Modify"},
533 { 0x00e0, "Parental, Search, Modify"},
534 { 0x00e1, "Read, Parental, Search, Modify"},
535 { 0x00e2, "Write, Parental, Search, Modify"},
536 { 0x00e3, "Read, Write, Parental, Search, Modify"},
537 { 0x00e4, "Open, Parental, Search, Modify"},
538 { 0x00e5, "Read, Open, Parental, Search, Modify"},
539 { 0x00e6, "Write, Open, Parental, Search, Modify"},
540 { 0x00e7, "Read, Write, Open, Parental, Search, Modify"},
541 { 0x00e8, "Create, Parental, Search, Modify"},
542 { 0x00e9, "Read, Create, Parental, Search, Modify"},
543 { 0x00ea, "Write, Create, Parental, Search, Modify"},
544 { 0x00eb, "Read, Write, Create, Parental, Search, Modify"},
545 { 0x00ec, "Open, Create, Parental, Search, Modify"},
546 { 0x00ed, "Read, Open, Create, Parental, Search, Modify"},
547 { 0x00ee, "Write, Open, Create, Parental, Search, Modify"},
548 { 0x00ef, "Read, Write, Open, Create, Parental, Search, Modify"},
549 { 0x00f0, "Delete, Parental, Search, Modify"},
550 { 0x00f1, "Read, Delete, Parental, Search, Modify"},
551 { 0x00f2, "Write, Delete, Parental, Search, Modify"},
552 { 0x00f3, "Read, Write, Delete, Parental, Search, Modify"},
553 { 0x00f4, "Open, Delete, Parental, Search, Modify"},
554 { 0x00f5, "Read, Open, Delete, Parental, Search, Modify"},
555 { 0x00f6, "Write, Open, Delete, Parental, Search, Modify"},
556 { 0x00f7, "Read, Write, Open, Delete, Parental, Search, Modify"},
557 { 0x00f8, "Create, Delete, Parental, Search, Modify"},
558 { 0x00f9, "Read, Create, Delete, Parental, Search, Modify"},
559 { 0x00fa, "Write, Create, Delete, Parental, Search, Modify"},
560 { 0x00fb, "Read, Write, Create, Delete, Parental, Search, Modify"},
561 { 0x00fc, "Open, Create, Delete, Parental, Search, Modify"},
562 { 0x00fd, "Read, Open, Create, Delete, Parental, Search, Modify"},
563 { 0x00fe, "Write, Open, Create, Delete, Parental, Search, Modify"},
564 { 0x00ff, "Read, Write, Open, Create, Delete, Parental, Search, Modify"},
565 { 0x0100, "Supervisor"},
566 { 0x0101, "Read, Supervisor"},
567 { 0x0102, "Write, Supervisor"},
568 { 0x0103, "Read, Write, Supervisor"},
569 { 0x0104, "Open, Supervisor"},
570 { 0x0105, "Read, Open, Supervisor"},
571 { 0x0106, "Write, Open, Supervisor"},
572 { 0x0107, "Read, Write, Open, Supervisor"},
573 { 0x0108, "Create, Supervisor"},
574 { 0x0109, "Read, Create, Supervisor"},
575 { 0x010a, "Write, Create, Supervisor"},
576 { 0x010b, "Read, Write, Create, Supervisor"},
577 { 0x010c, "Open, Create, Supervisor"},
578 { 0x010d, "Read, Open, Create, Supervisor"},
579 { 0x010e, "Write, Open, Create, Supervisor"},
580 { 0x010f, "Read, Write, Open, Create, Supervisor"},
581 { 0x0110, "Delete, Supervisor"},
582 { 0x0111, "Read, Delete, Supervisor"},
583 { 0x0112, "Write, Delete, Supervisor"},
584 { 0x0113, "Read, Write, Delete, Supervisor"},
585 { 0x0114, "Open, Delete, Supervisor"},
586 { 0x0115, "Read, Open, Delete, Supervisor"},
587 { 0x0116, "Write, Open, Delete, Supervisor"},
588 { 0x0117, "Read, Write, Open, Delete, Supervisor"},
589 { 0x0118, "Create, Delete, Supervisor"},
590 { 0x0119, "Read, Create, Delete, Supervisor"},
591 { 0x011a, "Write, Create, Delete, Supervisor"},
592 { 0x011b, "Read, Write, Create, Delete, Supervisor"},
593 { 0x011c, "Open, Create, Delete, Supervisor"},
594 { 0x011d, "Read, Open, Create, Delete, Supervisor"},
595 { 0x011e, "Write, Open, Create, Delete, Supervisor"},
596 { 0x011f, "Read, Write, Open, Create, Delete, Supervisor"},
597 { 0x0120, "Parental, Supervisor"},
598 { 0x0121, "Read, Parental, Supervisor"},
599 { 0x0122, "Write, Parental, Supervisor"},
600 { 0x0123, "Read, Write, Parental, Supervisor"},
601 { 0x0124, "Open, Parental, Supervisor"},
602 { 0x0125, "Read, Open, Parental, Supervisor"},
603 { 0x0126, "Write, Open, Parental, Supervisor"},
604 { 0x0127, "Read, Write, Open, Parental, Supervisor"},
605 { 0x0128, "Create, Parental, Supervisor"},
606 { 0x0129, "Read, Create, Parental, Supervisor"},
607 { 0x012a, "Write, Create, Parental, Supervisor"},
608 { 0x012b, "Read, Write, Create, Parental, Supervisor"},
609 { 0x012c, "Open, Create, Parental, Supervisor"},
610 { 0x012d, "Read, Open, Create, Parental, Supervisor"},
611 { 0x012e, "Write, Open, Create, Parental, Supervisor"},
612 { 0x012f, "Read, Write, Open, Create, Parental, Supervisor"},
613 { 0x0130, "Delete, Parental, Supervisor"},
614 { 0x0131, "Read, Delete, Parental, Supervisor"},
615 { 0x0132, "Write, Delete, Parental, Supervisor"},
616 { 0x0133, "Read, Write, Delete, Parental, Supervisor"},
617 { 0x0134, "Open, Delete, Parental, Supervisor"},
618 { 0x0135, "Read, Open, Delete, Parental, Supervisor"},
619 { 0x0136, "Write, Open, Delete, Parental, Supervisor"},
620 { 0x0137, "Read, Write, Open, Delete, Parental, Supervisor"},
621 { 0x0138, "Create, Delete, Parental, Supervisor"},
622 { 0x0139, "Read, Create, Delete, Parental, Supervisor"},
623 { 0x013a, "Write, Create, Delete, Parental, Supervisor"},
624 { 0x013b, "Read, Write, Create, Delete, Parental, Supervisor"},
625 { 0x013c, "Open, Create, Delete, Parental, Supervisor"},
626 { 0x013d, "Read, Open, Create, Delete, Parental, Supervisor"},
627 { 0x013e, "Write, Open, Create, Delete, Parental, Supervisor"},
628 { 0x013f, "Read, Write, Open, Create, Delete, Parental, Supervisor"},
629 { 0x0140, "Search, Supervisor"},
630 { 0x0141, "Read, Search, Supervisor"},
631 { 0x0142, "Write, Search, Supervisor"},
632 { 0x0143, "Read, Write, Search, Supervisor"},
633 { 0x0144, "Open, Search, Supervisor"},
634 { 0x0145, "Read, Open, Search, Supervisor"},
635 { 0x0146, "Write, Open, Search, Supervisor"},
636 { 0x0147, "Read, Write, Open, Search, Supervisor"},
637 { 0x0148, "Create, Search, Supervisor"},
638 { 0x0149, "Read, Create, Search, Supervisor"},
639 { 0x014a, "Write, Create, Search, Supervisor"},
640 { 0x014b, "Read, Write, Create, Search, Supervisor"},
641 { 0x014c, "Open, Create, Search, Supervisor"},
642 { 0x014d, "Read, Open, Create, Search, Supervisor"},
643 { 0x014e, "Write, Open, Create, Search, Supervisor"},
644 { 0x014f, "Read, Write, Open, Create, Search, Supervisor"},
645 { 0x0150, "Delete, Search, Supervisor"},
646 { 0x0151, "Read, Delete, Search, Supervisor"},
647 { 0x0152, "Write, Delete, Search, Supervisor"},
648 { 0x0153, "Read, Write, Delete, Search, Supervisor"},
649 { 0x0154, "Open, Delete, Search, Supervisor"},
650 { 0x0155, "Read, Open, Delete, Search, Supervisor"},
651 { 0x0156, "Write, Open, Delete, Search, Supervisor"},
652 { 0x0157, "Read, Write, Open, Delete, Search, Supervisor"},
653 { 0x0158, "Create, Delete, Search, Supervisor"},
654 { 0x0159, "Read, Create, Delete, Search, Supervisor"},
655 { 0x015a, "Write, Create, Delete, Search, Supervisor"},
656 { 0x015b, "Read, Write, Create, Delete, Search, Supervisor"},
657 { 0x015c, "Open, Create, Delete, Search, Supervisor"},
658 { 0x015d, "Read, Open, Create, Delete, Search, Supervisor"},
659 { 0x015e, "Write, Open, Create, Delete, Search, Supervisor"},
660 { 0x015f, "Read, Write, Open, Create, Delete, Search, Supervisor"},
661 { 0x0160, "Parental, Search, Supervisor"},
662 { 0x0161, "Read, Parental, Search, Supervisor"},
663 { 0x0162, "Write, Parental, Search, Supervisor"},
664 { 0x0163, "Read, Write, Parental, Search, Supervisor"},
665 { 0x0164, "Open, Parental, Search, Supervisor"},
666 { 0x0165, "Read, Open, Parental, Search, Supervisor"},
667 { 0x0166, "Write, Open, Parental, Search, Supervisor"},
668 { 0x0167, "Read, Write, Open, Parental, Search, Supervisor"},
669 { 0x0168, "Create, Parental, Search, Supervisor"},
670 { 0x0169, "Read, Create, Parental, Search, Supervisor"},
671 { 0x016a, "Write, Create, Parental, Search, Supervisor"},
672 { 0x016b, "Read, Write, Create, Parental, Search, Supervisor"},
673 { 0x016c, "Open, Create, Parental, Search, Supervisor"},
674 { 0x016d, "Read, Open, Create, Parental, Search, Supervisor"},
675 { 0x016e, "Write, Open, Create, Parental, Search, Supervisor"},
676 { 0x016f, "Read, Write, Open, Create, Parental, Search, Supervisor"},
677 { 0x0170, "Delete, Parental, Search, Supervisor"},
678 { 0x0171, "Read, Delete, Parental, Search, Supervisor"},
679 { 0x0172, "Write, Delete, Parental, Search, Supervisor"},
680 { 0x0173, "Read, Write, Delete, Parental, Search, Supervisor"},
681 { 0x0174, "Open, Delete, Parental, Search, Supervisor"},
682 { 0x0175, "Read, Open, Delete, Parental, Search, Supervisor"},
683 { 0x0176, "Write, Open, Delete, Parental, Search, Supervisor"},
684 { 0x0177, "Read, Write, Open, Delete, Parental, Search, Supervisor"},
685 { 0x0178, "Create, Delete, Parental, Search, Supervisor"},
686 { 0x0179, "Read, Create, Delete, Parental, Search, Supervisor"},
687 { 0x017a, "Write, Create, Delete, Parental, Search, Supervisor"},
688 { 0x017b, "Read, Write, Create, Delete, Parental, Search, Supervisor"},
689 { 0x017c, "Open, Create, Delete, Parental, Search, Supervisor"},
690 { 0x017d, "Read, Open, Create, Delete, Parental, Search, Supervisor"},
691 { 0x017e, "Write, Open, Create, Delete, Parental, Search, Supervisor"},
692 { 0x017f, "Read, Write, Open, Create, Delete, Parental, Search, Supervisor"},
693 { 0x0180, "Modify, Supervisor"},
694 { 0x0181, "Read, Modify, Supervisor"},
695 { 0x0182, "Write, Modify, Supervisor"},
696 { 0x0183, "Read, Write, Modify, Supervisor"},
697 { 0x0184, "Open, Modify, Supervisor"},
698 { 0x0185, "Read, Open, Modify, Supervisor"},
699 { 0x0186, "Write, Open, Modify, Supervisor"},
700 { 0x0187, "Read, Write, Open, Modify, Supervisor"},
701 { 0x0188, "Create, Modify, Supervisor"},
702 { 0x0189, "Read, Create, Modify, Supervisor"},
703 { 0x018a, "Write, Create, Modify, Supervisor"},
704 { 0x018b, "Read, Write, Create, Modify, Supervisor"},
705 { 0x018c, "Open, Create, Modify, Supervisor"},
706 { 0x018d, "Read, Open, Create, Modify, Supervisor"},
707 { 0x018e, "Write, Open, Create, Modify, Supervisor"},
708 { 0x018f, "Read, Write, Open, Create, Modify, Supervisor"},
709 { 0x0190, "Delete, Modify, Supervisor"},
710 { 0x0191, "Read, Delete, Modify, Supervisor"},
711 { 0x0192, "Write, Delete, Modify, Supervisor"},
712 { 0x0193, "Read, Write, Delete, Modify, Supervisor"},
713 { 0x0194, "Open, Delete, Modify, Supervisor"},
714 { 0x0195, "Read, Open, Delete, Modify, Supervisor"},
715 { 0x0196, "Write, Open, Delete, Modify, Supervisor"},
716 { 0x0197, "Read, Write, Open, Delete, Modify, Supervisor"},
717 { 0x0198, "Create, Delete, Modify, Supervisor"},
718 { 0x0199, "Read, Create, Delete, Modify, Supervisor"},
719 { 0x019a, "Write, Create, Delete, Modify, Supervisor"},
720 { 0x019b, "Read, Write, Create, Delete, Modify, Supervisor"},
721 { 0x019c, "Open, Create, Delete, Modify, Supervisor"},
722 { 0x019d, "Read, Open, Create, Delete, Modify, Supervisor"},
723 { 0x019e, "Write, Open, Create, Delete, Modify, Supervisor"},
724 { 0x019f, "Read, Write, Open, Create, Delete, Modify, Supervisor"},
725 { 0x01a0, "Parental, Modify, Supervisor"},
726 { 0x01a1, "Read, Parental, Modify, Supervisor"},
727 { 0x01a2, "Write, Parental, Modify, Supervisor"},
728 { 0x01a3, "Read, Write, Parental, Modify, Supervisor"},
729 { 0x01a4, "Open, Parental, Modify, Supervisor"},
730 { 0x01a5, "Read, Open, Parental, Modify, Supervisor"},
731 { 0x01a6, "Write, Open, Parental, Modify, Supervisor"},
732 { 0x01a7, "Read, Write, Open, Parental, Modify, Supervisor"},
733 { 0x01a8, "Create, Parental, Modify, Supervisor"},
734 { 0x01a9, "Read, Create, Parental, Modify, Supervisor"},
735 { 0x01aa, "Write, Create, Parental, Modify, Supervisor"},
736 { 0x01ab, "Read, Write, Create, Parental, Modify, Supervisor"},
737 { 0x01ac, "Open, Create, Parental, Modify, Supervisor"},
738 { 0x01ad, "Read, Open, Create, Parental, Modify, Supervisor"},
739 { 0x01ae, "Write, Open, Create, Parental, Modify, Supervisor"},
740 { 0x01af, "Read, Write, Open, Create, Parental, Modify, Supervisor"},
741 { 0x01b0, "Delete, Parental, Modify, Supervisor"},
742 { 0x01b1, "Read, Delete, Parental, Modify, Supervisor"},
743 { 0x01b2, "Write, Delete, Parental, Modify, Supervisor"},
744 { 0x01b3, "Read, Write, Delete, Parental, Modify, Supervisor"},
745 { 0x01b4, "Open, Delete, Parental, Modify, Supervisor"},
746 { 0x01b5, "Read, Open, Delete, Parental, Modify, Supervisor"},
747 { 0x01b6, "Write, Open, Delete, Parental, Modify, Supervisor"},
748 { 0x01b7, "Read, Write, Open, Delete, Parental, Modify, Supervisor"},
749 { 0x01b8, "Create, Delete, Parental, Modify, Supervisor"},
750 { 0x01b9, "Read, Create, Delete, Parental, Modify, Supervisor"},
751 { 0x01ba, "Write, Create, Delete, Parental, Modify, Supervisor"},
752 { 0x01bb, "Read, Write, Create, Delete, Parental, Modify, Supervisor"},
753 { 0x01bc, "Open, Create, Delete, Parental, Modify, Supervisor"},
754 { 0x01bd, "Read, Open, Create, Delete, Parental, Modify, Supervisor"},
755 { 0x01be, "Write, Open, Create, Delete, Parental, Modify, Supervisor"},
756 { 0x01bf, "Read, Write, Open, Create, Delete, Parental, Modify, Supervisor"},
757 { 0x01c0, "Search, Modify, Supervisor"},
758 { 0x01c1, "Read, Search, Modify, Supervisor"},
759 { 0x01c2, "Write, Search, Modify, Supervisor"},
760 { 0x01c3, "Read, Write, Search, Modify, Supervisor"},
761 { 0x01c4, "Open, Search, Modify, Supervisor"},
762 { 0x01c5, "Read, Open, Search, Modify, Supervisor"},
763 { 0x01c6, "Write, Open, Search, Modify, Supervisor"},
764 { 0x01c7, "Read, Write, Open, Search, Modify, Supervisor"},
765 { 0x01c8, "Create, Search, Modify, Supervisor"},
766 { 0x01c9, "Read, Create, Search, Modify, Supervisor"},
767 { 0x01ca, "Write, Create, Search, Modify, Supervisor"},
768 { 0x01cb, "Read, Write, Create, Search, Modify, Supervisor"},
769 { 0x01cc, "Open, Create, Search, Modify, Supervisor"},
770 { 0x01cd, "Read, Open, Create, Search, Modify, Supervisor"},
771 { 0x01ce, "Write, Open, Create, Search, Modify, Supervisor"},
772 { 0x01cf, "Read, Write, Open, Create, Search, Modify, Supervisor"},
773 { 0x01d0, "Delete, Search, Modify, Supervisor"},
774 { 0x01d1, "Read, Delete, Search, Modify, Supervisor"},
775 { 0x01d2, "Write, Delete, Search, Modify, Supervisor"},
776 { 0x01d3, "Read, Write, Delete, Search, Modify, Supervisor"},
777 { 0x01d4, "Open, Delete, Search, Modify, Supervisor"},
778 { 0x01d5, "Read, Open, Delete, Search, Modify, Supervisor"},
779 { 0x01d6, "Write, Open, Delete, Search, Modify, Supervisor"},
780 { 0x01d7, "Read, Write, Open, Delete, Search, Modify, Supervisor"},
781 { 0x01d8, "Create, Delete, Search, Modify, Supervisor"},
782 { 0x01d9, "Read, Create, Delete, Search, Modify, Supervisor"},
783 { 0x01da, "Write, Create, Delete, Search, Modify, Supervisor"},
784 { 0x01db, "Read, Write, Create, Delete, Search, Modify, Supervisor"},
785 { 0x01dc, "Open, Create, Delete, Search, Modify, Supervisor"},
786 { 0x01dd, "Read, Open, Create, Delete, Search, Modify, Supervisor"},
787 { 0x01de, "Write, Open, Create, Delete, Search, Modify, Supervisor"},
788 { 0x01df, "Read, Write, Open, Create, Delete, Search, Modify, Supervisor"},
789 { 0x01e0, "Parental, Search, Modify, Supervisor"},
790 { 0x01e1, "Read, Parental, Search, Modify, Supervisor"},
791 { 0x01e2, "Write, Parental, Search, Modify, Supervisor"},
792 { 0x01e3, "Read, Write, Parental, Search, Modify, Supervisor"},
793 { 0x01e4, "Open, Parental, Search, Modify, Supervisor"},
794 { 0x01e5, "Read, Open, Parental, Search, Modify, Supervisor"},
795 { 0x01e6, "Write, Open, Parental, Search, Modify, Supervisor"},
796 { 0x01e7, "Read, Write, Open, Parental, Search, Modify, Supervisor"},
797 { 0x01e8, "Create, Parental, Search, Modify, Supervisor"},
798 { 0x01e9, "Read, Create, Parental, Search, Modify, Supervisor"},
799 { 0x01ea, "Write, Create, Parental, Search, Modify, Supervisor"},
800 { 0x01eb, "Read, Write, Create, Parental, Search, Modify, Supervisor"},
801 { 0x01ec, "Open, Create, Parental, Search, Modify, Supervisor"},
802 { 0x01ed, "Read, Open, Create, Parental, Search, Modify, Supervisor"},
803 { 0x01ee, "Write, Open, Create, Parental, Search, Modify, Supervisor"},
804 { 0x01ef, "Read, Write, Open, Create, Parental, Search, Modify, Supervisor"},
805 { 0x01f0, "Delete, Parental, Search, Modify, Supervisor"},
806 { 0x01f1, "Read, Delete, Parental, Search, Modify, Supervisor"},
807 { 0x01f2, "Write, Delete, Parental, Search, Modify, Supervisor"},
808 { 0x01f3, "Read, Write, Delete, Parental, Search, Modify, Supervisor"},
809 { 0x01f4, "Open, Delete, Parental, Search, Modify, Supervisor"},
810 { 0x01f5, "Read, Open, Delete, Parental, Search, Modify, Supervisor"},
811 { 0x01f6, "Write, Open, Delete, Parental, Search, Modify, Supervisor"},
812 { 0x01f7, "Read, Write, Open, Delete, Parental, Search, Modify, Supervisor"},
813 { 0x01f8, "Create, Delete, Parental, Search, Modify, Supervisor"},
814 { 0x01f9, "Read, Create, Delete, Parental, Search, Modify, Supervisor"},
815 { 0x01fa, "Write, Create, Delete, Parental, Search, Modify, Supervisor"},
816 { 0x01fb, "Read, Write, Create, Delete, Parental, Search, Modify, Supervisor"},
817 { 0x01fc, "Open, Create, Delete, Parental, Search, Modify, Supervisor"},
818 { 0x01fd, "Read, Open, Create, Delete, Parental, Search, Modify, Supervisor"},
819 { 0x01fe, "Write, Open, Create, Delete, Parental, Search, Modify, Supervisor"},
820 { 0x01ff, "Read, Write, Open, Create, Delete, Parental, Search, Modify, Supervisor"},
824 #define NDS_PTYPE_IPX 0x00000000
825 #define NDS_PTYPE_IP 0x00000001
826 #define NDS_PTYPE_SDLC 0x00000002
827 #define NDS_PTYPE_TR_ON_ETH 0x00000003
828 #define NDS_PTYPE_OSI 0x00000004
829 #define NDS_PTYPE_APPLETALK 0x00000005
830 #define NDS_PTYPE_NETBEUI 0x00000006
831 #define NDS_PTYPE_SOCKETADDRESS 0x00000007
832 #define NDS_PTYPE_UDP 0x00000008
833 #define NDS_PTYPE_TCP 0x00000009
834 #define NDS_PTYPE_UDPv6 0x0000000a
835 #define NDS_PTYPE_TCPv6 0x0000000b
836 #define NDS_PTYPE_INTERNAL 0x0000000c
837 #define NDS_PTYPE_URL 0x0000000d
839 static const value_string nds_protocol_type[] = {
840 { NDS_PTYPE_IPX, "(IPX Protocol)" },
841 { NDS_PTYPE_IP, "(IP Protocol)" },
842 { NDS_PTYPE_SDLC, "(SDLC Protocol)" },
843 { NDS_PTYPE_TR_ON_ETH, "(TokenRing on Ethernet Protocol)" },
844 { NDS_PTYPE_OSI, "(OSI Protocol)" },
845 { NDS_PTYPE_APPLETALK, "(AppleTalk Protocol)" },
846 { NDS_PTYPE_NETBEUI, "(NetBEUI Protocol)" },
847 { NDS_PTYPE_SOCKETADDRESS, "(Socket Address Protocol)" },
848 { NDS_PTYPE_UDP, "(UDP Protocol)" },
849 { NDS_PTYPE_TCP, "(TCP Protocol)" },
850 { NDS_PTYPE_UDPv6, "(UDP v6 Protocol)" },
851 { NDS_PTYPE_TCPv6, "(TCP v6 Protocol)" },
852 { NDS_PTYPE_INTERNAL, "(Internal Protocol)" },
853 { NDS_PTYPE_URL, "(URL Protocol)" },
858 static const value_string nds_syntax[] = {
859 { 0x00000000, "Unknown Syntax" },
860 { 0x00000001, "Distinguished Name" },
861 { 0x00000002, "Case Sensitive Unicode String" },
862 { 0x00000003, "Non Case Sensitive Unicode String" },
863 { 0x00000004, "Printable String" },
864 { 0x00000005, "Numeric String" },
865 { 0x00000006, "Case Insensitive List" },
866 { 0x00000007, "Boolean" },
867 { 0x00000008, "Signed Integer" },
868 { 0x00000009, "Binary String" },
869 { 0x0000000a, "Telephone Number" },
870 { 0x0000000b, "Fax Number" },
871 { 0x0000000c, "Network Address" },
872 { 0x0000000d, "Binary String List" },
873 { 0x0000000e, "Email Address" },
874 { 0x0000000f, "File System Path" },
875 { 0x00000010, "Replica Pointer" },
876 { 0x00000011, "Object ACL" },
877 { 0x00000012, "Postal Address" },
878 { 0x00000013, "Time Stamp" },
879 { 0x00000014, "Class Name" },
880 { 0x00000015, "Stream" },
881 { 0x00000016, "Counter" },
882 { 0x00000017, "Back Link" },
883 { 0x00000018, "Time" },
884 { 0x00000019, "Typed Name" },
885 { 0x0000001a, "Hold" },
886 { 0x0000001b, "Interval" },
890 static const value_string name_space_type[] = {
891 { 0x00000000, "DOS Name Space" },
892 { 0x00000001, "MAC Name Space" },
893 { 0x00000002, "NFS Name Space" },
894 { 0x00000003, "FTAM Name Space" },
895 { 0x00000004, "OS/2, Long Name Space" },
900 static const value_string nds_replica_state[] = {
904 { 0x0003, "Locked" },
905 { 0x0004, "Create Master State 0" },
906 { 0x0005, "Create Master State 1" },
907 { 0x0006, "Transition On" },
908 { 0x0007, "Dead Replica" },
909 { 0x0008, "Begin Add" },
910 { 0x000b, "Master Start" },
911 { 0x000c, "Master Done" },
912 { 0x0017, "Federated" },
913 { 0x0030, "Split State 0" },
914 { 0x0031, "Split State 1" },
915 { 0x0040, "Join State 0" },
916 { 0x0041, "Join State 1" },
917 { 0x0042, "Join State 2" },
918 { 0x0050, "Move Subtree State 0" },
919 { 0x0051, "Move Subtree State 1" },
923 static const value_string nds_replica_type[] = {
924 { 0x0000, "Master" },
925 { 0x0001, "Secondary" },
926 { 0x0002, "Read Only" },
927 { 0x0003, "Sub Ref" },
931 static const value_string class_def_type[] = {
932 { 0x0000, "Return Class Name" },
933 { 0x0001, "Return Class Name, Flag, and Definition" },
934 { 0x0002, "Return Class Name, Flag, Definition, and Super Class" },
935 { 0x0003, "Return Class Name, Flag, and ASN.1 identifier" },
936 { 0x0004, "Return Class Name, Flag, Definition, Super Class, and ACL" },
937 { 0x0005, "Return Class Name, Flag, Creation Timestamp, Modification Timestamp, Definition, and ACL" },
941 static const value_string nds_search_scope[] = {
942 { 0x0000, "Examine the base object only" },
943 { 0x0001, "Search the immediate subordinates of the base object" },
944 { 0x0002, "Search the base object and all its subordinates" },
945 { 0x0003, "Search the base objects and all objects in its partition (Implemented in NDS 8)" },
949 static const value_string nds_reply_errors[] = {
950 { 0xffffffff, "(-1) Insufficient Space" },
951 { 0xffffff89, "(-119) Buffer too Small" },
952 { 0xffffff88, "(-120) RR Volume Flag Not Set" },
953 { 0xffffff87, "(-121) No Items Found" },
954 { 0xffffff86, "(-122) Connection Already Temporary" },
955 { 0xffffff85, "(-123) Connection Already Logged In" },
956 { 0xffffff84, "(-124) Connection Not Authenticated" },
957 { 0xffffff83, "(-125) Connection Not Logged In" },
958 { 0xffffff82, "(-126) NCP Boundary Check Failed" },
959 { 0xffffff81, "(-127) Lock Waiting" },
960 { 0xffffff80, "(-128) Lock Fail" },
961 { 0xffffff7f, "(-129) Out of Handles" },
962 { 0xffffff7e, "(-130) No Open Privilege" },
963 { 0xffffff7d, "(-131) Hard IO Error" },
964 { 0xffffff7c, "(-132) No Create Privilege" },
965 { 0xffffff7b, "(-133) No Create Delete Privilege" },
966 { 0xffffff7a, "(-134) Create Duplicate When Read Only" },
967 { 0xffffff79, "(-135) Create File with Invalid Name" },
968 { 0xffffff78, "(-136) Invalid File Handle" },
969 { 0xffffff77, "(-137) No Search Privilege" },
970 { 0xffffff76, "(-138) No Delete Privilege" },
971 { 0xffffff75, "(-139) No Rename Privilege" },
972 { 0xffffff74, "(-140) No Set Privilege" },
973 { 0xffffff73, "(-141) Some File in Use" },
974 { 0xffffff72, "(-142) All File in Use" },
975 { 0xffffff71, "(-143) Some Read Only" },
976 { 0xffffff70, "(-144) All Read Only" },
977 { 0xffffff6f, "(-145) Some names Exist" },
978 { 0xffffff6e, "(-146) All Names Exist" },
979 { 0xffffff6d, "(-147) No Read Privilege" },
980 { 0xffffff6c, "(-148) No Write Privilege" },
981 { 0xffffff6b, "(-149) File Detached" },
982 { 0xffffff6a, "(-150) No Alloc Space/Target Not a Subdirectory/Insuffficient Memory" },
983 { 0xffffff69, "(-151) No Spool Space" },
984 { 0xffffff68, "(-152) Invalid Volume" },
985 { 0xffffff67, "(-153) Directory Full" },
986 { 0xffffff66, "(-154) Rename Across Volume" },
987 { 0xffffff65, "(-155) Bad Directory Handle" },
988 { 0xffffff64, "(-156) Invalid Path/No Such Extension" },
989 { 0xffffff63, "(-157) No Directory Handles" },
990 { 0xffffff62, "(-158) Bad File Name" },
991 { 0xffffff61, "(-159) Directory Active" },
992 { 0xffffff60, "(-160) Directory Not Empty" },
993 { 0xffffff5f, "(-161) Directory IO Error" },
994 { 0xffffff5e, "(-162) IO Locked" },
995 { 0xffffff5d, "(-163) Transaction Restarted" },
996 { 0xffffff5c, "(-164) Rename Directory Invalid" },
997 { 0xffffff5b, "(-165) Invalid Open/Create Mode" },
998 { 0xffffff5a, "(-166) Already in Use" },
999 { 0xffffff59, "(-167) Invalid Resource Tag" },
1000 { 0xffffff58, "(-168) Access Denied" },
1001 { 0xffffff44, "(-188) Login Signing Required" },
1002 { 0xffffff43, "(-189) Login Encryption Required" },
1003 { 0xffffff42, "(-190) Invalid Data Stream" },
1004 { 0xffffff41, "(-191) Invalid Name Space" },
1005 { 0xffffff40, "(-192) No Accounting Privileges" },
1006 { 0xffffff3f, "(-193) No Account Balance" },
1007 { 0xffffff3e, "(-194) Credit Limit Exceeded" },
1008 { 0xffffff3d, "(-195) Too Many Holds" },
1009 { 0xffffff3c, "(-196) Accounting Disabled" },
1010 { 0xffffff3b, "(-197) Intruder Login Lockout" },
1011 { 0xffffff3a, "(-198) No Console Rights" },
1012 { 0xffffff30, "(-208) Queue IO Failure" },
1013 { 0xffffff2f, "(-209) No Queue" },
1014 { 0xffffff2e, "(-210) No Queue Server" },
1015 { 0xffffff2d, "(-211) No Queue Rights" },
1016 { 0xffffff2c, "(-212) Queue Full" },
1017 { 0xffffff2b, "(-213) No Queue Job" },
1018 { 0xffffff2a, "(-214) No Queue Job Rights/Unencrypted Not Allowed" },
1019 { 0xffffff29, "(-215) Queue In Service/Duplicate Password" },
1020 { 0xffffff28, "(-216) Queue Not Active/Password Too Short" },
1021 { 0xffffff27, "(-217) Queue Station Not Server/Maximum Logins Exceeded" },
1022 { 0xffffff26, "(-218) Queue Halted/Bad Login Time" },
1023 { 0xffffff25, "(-219) Queue Maximum Servers/Node Address Violation" },
1024 { 0xffffff24, "(-220) Login Account Expired" },
1025 { 0xffffff22, "(-222) Bad Password" },
1026 { 0xffffff21, "(-223) Password Expired" },
1027 { 0xffffff20, "(-224) No Login Connection Available" },
1028 { 0xffffff18, "(-232) Write to Group Property" },
1029 { 0xffffff17, "(-233) Member Already Exists" },
1030 { 0xffffff16, "(-234) No Such Member" },
1031 { 0xffffff15, "(-235) Property Not Group" },
1032 { 0xffffff14, "(-236) No Such Value Set" },
1033 { 0xffffff13, "(-237) Property Already Exists" },
1034 { 0xffffff12, "(-238) Object Already Exists" },
1035 { 0xffffff11, "(-239) Illegal Name" },
1036 { 0xffffff10, "(-240) Illegal Wildcard" },
1037 { 0xffffff0f, "(-241) Bindery Security" },
1038 { 0xffffff0e, "(-242) No Object Read Rights" },
1039 { 0xffffff0d, "(-243) No Object Rename Rights" },
1040 { 0xffffff0c, "(-244) No Object Delete Rights" },
1041 { 0xffffff0b, "(-245) No Object Create Rights" },
1042 { 0xffffff0a, "(-246) No Property Delete Rights" },
1043 { 0xffffff09, "(-247) No Property Create Rigths" },
1044 { 0xffffff08, "(-248) No Property Write Rights" },
1045 { 0xffffff07, "(-249) No Propery Read Rights" },
1046 { 0xffffff06, "(-250) Temp Remap" },
1047 { 0xffffff05, "(-251) Unknown Request/No Such Property" },
1048 { 0xffffff04, "(-252) Message Queue Full/Target Already Has Message/No Such Object" },
1049 { 0xffffff03, "(-253) Bad Station Number" },
1050 { 0xffffff02, "(-254) Bindery Locked/Directory Locked/Spool Delete/Trustee not Found/Timeout" },
1051 { 0xffffff01, "(-255) Hard Failure" },
1052 { 0xfffffed3, "(-301) Not Enough Memory" },
1053 { 0xfffffed2, "(-302) Bad Key" },
1054 { 0xfffffed1, "(-303) Bad Context" },
1055 { 0xfffffed0, "(-304) Buffer Full" },
1056 { 0xfffffecf, "(-305) List Empty" },
1057 { 0xfffffece, "(-306) Bad Syntax" },
1058 { 0xfffffecd, "(-307) Buffer Empty" },
1059 { 0xfffffecc, "(-308) Bad Verb" },
1060 { 0xfffffecb, "(-309) Expected Identifier" },
1061 { 0xfffffeca, "(-310) Expected Equals" },
1062 { 0xfffffec9, "(-311) Attribute Type Expected" },
1063 { 0xfffffec8, "(-312) Attribute Type Not Expected" },
1064 { 0xfffffec7, "(-313) Filter Tree Empty" },
1065 { 0xfffffec6, "(-314) Invalid Object Name" },
1066 { 0xfffffec5, "(-315) Expected RDN Delimiter" },
1067 { 0xfffffec4, "(-316) Too Many Tokens" },
1068 { 0xfffffec3, "(-317) Inconsistent MultiAVA" },
1069 { 0xfffffec2, "(-318) Country Name Too Long" },
1070 { 0xfffffec1, "(-319) Internal Error" },
1071 { 0xfffffec0, "(-320) Can't Add Root" },
1072 { 0xfffffebf, "(-321) Unable to Attach" },
1073 { 0xfffffebe, "(-322) Invalid Iteration Handle" },
1074 { 0xfffffebd, "(-323) Buffer Zero Length" },
1075 { 0xfffffebc, "(-324) Invalid Replica Type" },
1076 { 0xfffffebb, "(-325) Invalid Attribute Syntax" },
1077 { 0xfffffeba, "(-326) Invalid Filter Syntax" },
1078 { 0xfffffeb8, "(-328) Unicode Error during Context Creation" },
1079 { 0xfffffeb7, "(-329) Invalid Union Tag" },
1080 { 0xfffffeb6, "(-330) Invalid Server Response" },
1081 { 0xfffffeb5, "(-331) Null Pointer" },
1082 { 0xfffffeb4, "(-332) No Server Found" },
1083 { 0xfffffeb3, "(-333) No Connection" },
1084 { 0xfffffeb2, "(-334) RDN Too Long" },
1085 { 0xfffffeb1, "(-335) Duplicate Type" },
1086 { 0xfffffeb0, "(-336) Data Store Failure" },
1087 { 0xfffffeaf, "(-337) Not Logged In" },
1088 { 0xfffffeae, "(-338) Invalid Password Characters" },
1089 { 0xfffffead, "(-339) Failed Server Authentication" },
1090 { 0xfffffeac, "(-340) Transport Failed" },
1091 { 0xfffffeab, "(-341) No Such Syntax" },
1092 { 0xfffffeaa, "(-342) Invalid DS Name" },
1093 { 0xfffffea9, "(-343) Attribute Name Too Long" },
1094 { 0xfffffea8, "(-344) Invalid TDS" },
1095 { 0xfffffea7, "(-345) Invalid DS Version" },
1096 { 0xfffffea6, "(-346) Unicode Translation" },
1097 { 0xfffffea5, "(-347) Schema Name Too Long" },
1098 { 0xfffffea4, "(-348) Unicode File Not Found" },
1099 { 0xfffffea3, "(-349) Unicode Already Loaded" },
1100 { 0xfffffea2, "(-350) Not Context Owner" },
1101 { 0xfffffea1, "(-351) Attempt to Authenticate" },
1102 { 0xfffffea0, "(-352) No Writable Replicas" },
1103 { 0xfffffe9f, "(-353) DN Too Long" },
1104 { 0xfffffe9e, "(-354) Rename Not Allowed" },
1105 { 0xfffffe9d, "(-355) Not NDS for NT" },
1106 { 0xfffffe9c, "(-356) NDS for NT - No Domain" },
1107 { 0xfffffe9b, "(-357) NDS for NT - Sync Disabled" },
1108 { 0xfffffe9a, "(-358) Iterator Invalid Handle" },
1109 { 0xfffffe99, "(-359) Iterator Invalid Position" },
1110 { 0xfffffe98, "(-360) Iterator Invalid Search Data" },
1111 { 0xfffffe97, "(-361) Iterator Invalid Scope" },
1112 { 0xfffffda7, "(-601) No Such Entry" },
1113 { 0xfffffda6, "(-602) No Such Value" },
1114 { 0xfffffda5, "(-603) No Such Attribute" },
1115 { 0xfffffda4, "(-604) No Such Class" },
1116 { 0xfffffda3, "(-605) No Such Partition" },
1117 { 0xfffffda2, "(-606) Entry Already Exists" },
1118 { 0xfffffda1, "(-607) Not Effective Class" },
1119 { 0xfffffda0, "(-608) Illegal Attribute" },
1120 { 0xfffffd9f, "(-609) Missing Mandatory" },
1121 { 0xfffffd9e, "(-610) Illegal DS Name" },
1122 { 0xfffffd9d, "(-611) Illegal Containment" },
1123 { 0xfffffd9c, "(-612) Can't Have Multiple Values" },
1124 { 0xfffffd9b, "(-613) Syntax Violation" },
1125 { 0xfffffd9a, "(-614) Duplicate Value" },
1126 { 0xfffffd99, "(-615) Attribute Already Exists" },
1127 { 0xfffffd98, "(-616) Maximum Entries Exist" },
1128 { 0xfffffd97, "(-617) Database Format" },
1129 { 0xfffffd96, "(-618) Inconsistent Database" },
1130 { 0xfffffd95, "(-619) Invalid Comparison" },
1131 { 0xfffffd94, "(-620) Comparison Failed" },
1132 { 0xfffffd93, "(-621) Transaction Tracking Disabled" },
1133 { 0xfffffd92, "(-622) Invalid Transport" },
1134 { 0xfffffd91, "(-623) Syntax Invalid in Name" },
1135 { 0xfffffd90, "(-624) Replica Already Exists" },
1136 { 0xfffffd8f, "(-625) Transport Failure" },
1137 { 0xfffffd8e, "(-626) All Referrals Failed" },
1138 { 0xfffffd8d, "(-627) Can't Remove Naming Value" },
1139 { 0xfffffd8c, "(-628) Object Class Violation" },
1140 { 0xfffffd8b, "(-629) Entry is Not Leaf" },
1141 { 0xfffffd8a, "(-630) Different Tree" },
1142 { 0xfffffd89, "(-631) Illegal Replica Type" },
1143 { 0xfffffd88, "(-632) System Failure" },
1144 { 0xfffffd87, "(-633) Invalid Entry for Root" },
1145 { 0xfffffd86, "(-634) No Referrals" },
1146 { 0xfffffd85, "(-635) Remote Failure" },
1147 { 0xfffffd84, "(-636) Unreachable Server" },
1148 { 0xfffffd83, "(-637) Previous Move in Progress" },
1149 { 0xfffffd82, "(-638) No Character Mapping" },
1150 { 0xfffffd81, "(-639) Incomplete Authentication" },
1151 { 0xfffffd80, "(-640) Invalid Certificate" },
1152 { 0xfffffd7f, "(-641) Invalid Request" },
1153 { 0xfffffd7e, "(-642) Invalid Iteration" },
1154 { 0xfffffd7d, "(-643) Schema is Non-removable" },
1155 { 0xfffffd7c, "(-644) Schema is in Use" },
1156 { 0xfffffd7b, "(-645) Class Already Exists" },
1157 { 0xfffffd7a, "(-646) Bad Naming Attributes" },
1158 { 0xfffffd79, "(-647) Not Root Partition" },
1159 { 0xfffffd78, "(-648) Insufficient Stack" },
1160 { 0xfffffd77, "(-649) Insufficient Buffer" },
1161 { 0xfffffd76, "(-650) Ambiguous Containment" },
1162 { 0xfffffd75, "(-651) Ambiguous Naming" },
1163 { 0xfffffd74, "(-652) Duplicate Mandatory" },
1164 { 0xfffffd73, "(-653) Duplicate Optional" },
1165 { 0xfffffd72, "(-654) Partition Busy" },
1166 { 0xfffffd71, "(-655) Multiple Replicas" },
1167 { 0xfffffd70, "(-656) Crucial Replica" },
1168 { 0xfffffd6f, "(-657) Schema Sync in Progress" },
1169 { 0xfffffd6e, "(-658) Skulk in Progress" },
1170 { 0xfffffd6d, "(-659) Time Not Synchronized" },
1171 { 0xfffffd6c, "(-660) Record in Use" },
1172 { 0xfffffd6b, "(-661) DS Volume Not Mounted" },
1173 { 0xfffffd6a, "(-662) DS Volume IO Failure" },
1174 { 0xfffffd69, "(-663) DS Locked" },
1175 { 0xfffffd68, "(-664) Old Epoch" },
1176 { 0xfffffd67, "(-665) New Epoch" },
1177 { 0xfffffd66, "(-666) Incompatible DS Version" },
1178 { 0xfffffd65, "(-667) Partition Root" },
1179 { 0xfffffd64, "(-668) Entry Not Container" },
1180 { 0xfffffd63, "(-669) Failed Authentication" },
1181 { 0xfffffd62, "(-670) Invalid Context" },
1182 { 0xfffffd61, "(-671) No Such Parent" },
1183 { 0xfffffd60, "(-672) No Access" },
1184 { 0xfffffd5f, "(-673) Replica Not On" },
1185 { 0xfffffd5e, "(-674) Invalid Name Service" },
1186 { 0xfffffd5d, "(-675) Invalid Task" },
1187 { 0xfffffd5c, "(-676) Invalide Connection Handle" },
1188 { 0xfffffd5b, "(-677) Invalid Identity" },
1189 { 0xfffffd5a, "(-678) Duplicate ACL" },
1190 { 0xfffffd59, "(-679) Partition Already Exists" },
1191 { 0xfffffd58, "(-680) Transport Modified" },
1192 { 0xfffffd57, "(-681) Alias of an Alias" },
1193 { 0xfffffd56, "(-682) Auditing Failed" },
1194 { 0xfffffd55, "(-683) Invalid API Version" },
1195 { 0xfffffd54, "(-684) Secure NCP Violation" },
1196 { 0xfffffd53, "(-685) Move in Progress" },
1197 { 0xfffffd52, "(-686) Not a Leaf Partition" },
1198 { 0xfffffd51, "(-687) Cannot Abort" },
1199 { 0xfffffd50, "(-688) Cache Overflow" },
1200 { 0xfffffd4f, "(-689) Invalid Subordinate Count" },
1201 { 0xfffffd4e, "(-690) Invalid RDN" },
1202 { 0xfffffd4d, "(-691) Modification Time Not Current" },
1203 { 0xfffffd4c, "(-692) Incorrect Base Class" },
1204 { 0xfffffd4b, "(-693) Missing Reference" },
1205 { 0xfffffd4a, "(-694) Lost Entry" },
1206 { 0xfffffd49, "(-695) Agent Already Registered" },
1207 { 0xfffffd48, "(-696) DS Loader Busy" },
1208 { 0xfffffd47, "(-697) DS Cannot Reload" },
1209 { 0xfffffd46, "(-698) Replica in Skulk" },
1210 { 0xfffffd45, "(-699) Fatal" },
1211 { 0xfffffd44, "(-700) Obsolete API" },
1212 { 0xfffffd43, "(-701) Synchronization Disabled" },
1213 { 0xfffffd42, "(-702) Invalid Parameter" },
1214 { 0xfffffd41, "(-703) Duplicate Template" },
1215 { 0xfffffd40, "(-704) No Master Replica" },
1216 { 0xfffffd3f, "(-705) Duplicate Containment" },
1217 { 0xfffffd3e, "(-706) Not a Sibling" },
1218 { 0xfffffd3d, "(-707) Invalid Signature" },
1219 { 0xfffffd3c, "(-708) Invalid Response" },
1220 { 0xfffffd3b, "(-709) Insufficient Sockets" },
1221 { 0xfffffd3a, "(-710) Database Read Fail" },
1222 { 0xfffffd39, "(-711) Invalid Code Page" },
1223 { 0xfffffd38, "(-712) Invalid Escape Character" },
1224 { 0xfffffd37, "(-713) Invalide Delimiters" },
1225 { 0xfffffd36, "(-714) Not Implemented" },
1226 { 0xfffffd35, "(-715) Checksum Failure" },
1227 { 0xfffffd34, "(-716) Checksumming Not Supported" },
1228 { 0xfffffd33, "(-717) CRC Failure" },
1229 { 0xfffffd32, "(-718) Invalid Entry Handle" },
1230 { 0xfffffd31, "(-719) Invalid Value Handle" },
1231 { 0xfffffd30, "(-720) Connection Denied" },
1232 { 0xfffffd2f, "(-721) No Such Federation Link" },
1233 { 0xfffffd2e, "(-722) Operetational Schema Mismatch" },
1234 { 0xfffffd2d, "(-723) Stream Not Found" },
1235 { 0xfffffd2c, "(-724) DClient Unavailable" },
1236 { 0xfffffd2b, "(-725) MASV No Access" },
1237 { 0xfffffd2a, "(-726) MASV Invalid Request" },
1238 { 0xfffffd29, "(-727) MASV Failure" },
1239 { 0xfffffd28, "(-728) MASV Already Exists" },
1240 { 0xfffffd27, "(-729) MASV Not Found" },
1241 { 0xfffffd26, "(-730) MASV Bad Range" },
1242 { 0xfffffd25, "(-731) Value Data" },
1243 { 0xfffffd24, "(-732) Database Locked" },
1244 { 0xfffffd21, "(-735) Nothing to Abort" },
1245 { 0xfffffd20, "(-736) End of Stream" },
1246 { 0xfffffd1f, "(-737) No Such Template" },
1247 { 0xfffffd1e, "(-738) SAS Locked" },
1248 { 0xfffffd1d, "(-739) Invalid SAS Version" },
1249 { 0xfffffd1c, "(-740) SAS Already Registered" },
1250 { 0xfffffd1b, "(-741) Name Type Not Supported" },
1251 { 0xfffffd1a, "(-742) Wrong DS Version" },
1252 { 0xfffffd19, "(-743) Invalid Control Function" },
1253 { 0xfffffd18, "(-744) Invalid Control State" },
1254 { 0xfffffd17, "(-745) Cache in Use" },
1255 { 0xfffffd16, "(-746) Zero Creation Time" },
1256 { 0xfffffd15, "(-747) Would Block" },
1257 { 0xfffffd14, "(-748) Connection Timeout" },
1258 { 0xfffffd13, "(-749) Too Many Referrals" },
1259 { 0xfffffd12, "(-750) Operation Cancelled" },
1260 { 0xfffffd11, "(-751) Unknown Target" },
1261 { 0xfffffd10, "(-752) GUID Failure" },
1262 { 0xfffffd0f, "(-753) Incompatible OS" },
1263 { 0xfffffd0e, "(-754) Callback Cancel" },
1264 { 0xfffffd0d, "(-755) Invalid Synchronization Data" },
1265 { 0xfffffd0c, "(-756) Stream Exists" },
1266 { 0xfffffd0b, "(-757) Auxiliary Has Containment" },
1267 { 0xfffffd0a, "(-758) Auxiliary Not Container" },
1268 { 0xfffffd09, "(-759) Auxiliary Not Effective" },
1269 { 0xfffffd08, "(-760) Auxiliary On Alias" },
1270 { 0xfffffd07, "(-761) Have Seen State" },
1271 { 0xfffffd06, "(-762) Verb Locked" },
1272 { 0xfffffd05, "(-763) Verb Exceeds Table Length" },
1273 { 0xfffffd04, "(-764) BOF Hit" },
1274 { 0xfffffd03, "(-765) EOF Hit" },
1275 { 0xfffffd02, "(-766) Incompatible Replica Version" },
1276 { 0xfffffd01, "(-767) Query Timeout" },
1277 { 0xfffffd00, "(-768) Query Maximum Count" },
1278 { 0xfffffcff, "(-769) Duplicate Naming" },
1279 { 0xfffffcfe, "(-770) No Transaction Active" },
1280 { 0xfffffcfd, "(-771) Transaction Active" },
1281 { 0xfffffcfc, "(-772) Illegal Transaction Operation" },
1282 { 0xfffffcfb, "(-773) Iterator Syntax" },
1283 { 0xfffffcfa, "(-774) Repairing DIB" },
1284 { 0xfffffcf9, "(-775) Invalid OID Format" },
1285 { 0xfffffcf8, "(-776) Attempted to perform an NDS operation, and the DS agent on this server is closing" },
1286 { 0xfffffcf7, "(-777) Attempted to modify an object's attribute that is not stored on the sparse replica" },
1287 { 0xfffffcf6, "(-778) VpVector and VpvUser which must be correlated, are out of sync" },
1288 { 0xfffffcf5, "(-779) Error Cannot Go Remote" },
1289 { 0xfffffcf4, "(-780) Request not Supported" },
1290 { 0xfffffcf3, "(-781) Entry Not Local" },
1291 { 0xfffffcf2, "(-782) Root Unreachable" },
1292 { 0xfffffcf1, "(-783) VRDIM Not Initialized" },
1293 { 0xfffffcf0, "(-784) Wait Timeout" },
1294 { 0xfffffcef, "(-785) DIB Error" },
1295 { 0xfffffcee, "(-786) DIB IO Failure" },
1296 { 0xfffffced, "(-787) Illegal Schema Attribute" },
1297 { 0xfffffcec, "(-788) Error Schema Partition" },
1298 { 0xfffffceb, "(-789) Invalid Template" },
1299 { 0xfffffcea, "(-790) Error Opening File" },
1300 { 0xfffffce9, "(-791) Error Direct Opening File" },
1301 { 0xfffffce8, "(-792) Error Creating File" },
1302 { 0xfffffce7, "(-793) Error Direct Creating File" },
1303 { 0xfffffce6, "(-794) Error Reading File" },
1304 { 0xfffffce5, "(-795) Error Direct Reading File" },
1305 { 0xfffffce4, "(-796) Error Writing File" },
1306 { 0xfffffce3, "(-797) Error Direct Writing File" },
1307 { 0xfffffce2, "(-798) Error Positioning in File" },
1308 { 0xfffffce1, "(-799) Error Getting File Size" },
1309 { 0xffffe88f, "(-6001) Error Truncating File" },
1310 { 0xffffe88e, "(-6002) Error Parsing File Name" },
1311 { 0xffffe88d, "(-6003) Error Closing File" },
1312 { 0xffffe88c, "(-6004) Error Getting File Info" },
1313 { 0xffffe88b, "(-6005) Error Expanding File" },
1314 { 0xffffe88a, "(-6006) Error Getting Free Blocks" },
1315 { 0xffffe889, "(-6007) Error Checking File Existence" },
1316 { 0xffffe888, "(-6008) Error Deleting File" },
1317 { 0xffffe887, "(-6009) Error Renaming File" },
1318 { 0xffffe886, "(-6010) Error Initializing IO System" },
1319 { 0xffffe885, "(-6011) Error Flushing File" },
1320 { 0xffffe884, "(-6012) Error Setting Up for Read" },
1321 { 0xffffe883, "(-6013) Error Setting up for Write" },
1322 { 0xffffe882, "(-6014) Error Old View" },
1323 { 0xffffe881, "(-6015) Server in Skulk" },
1324 { 0xffffe880, "(-6016) Error Returning Partial Results" },
1325 { 0xffffe87f, "(-6017) No Such Schema" },
1326 { 0xffffe87e, "(-6018) Serial Number Mismatch" },
1327 { 0xffffe87d, "(-6019) Bad Referal Database Serial Number" },
1328 { 0xffffe87c, "(-6020) Bad Referal Serial Number" },
1329 { 0xffffe87b, "(-6021) Invalid File Sequence" },
1330 { 0xffffe87a, "(-6022) Error Referal Trans Gap" },
1331 { 0xffffe879, "(-6023) Bad Referal File Number" },
1332 { 0xffffe878, "(-6024) Referal File Not Found" },
1333 { 0xffffe877, "(-6025) Error Backup Active" },
1334 { 0xffffe876, "(-6026) Referal Device Full" },
1335 { 0xffffe875, "(-6027) Unsupported Version" },
1336 { 0xffffe874, "(-6028) Error Must Wait Checkpoint" },
1337 { 0xffffe873, "(-6029) Attribute Maintenance in Progress" },
1338 { 0xffffe872, "(-6030) Error Abort Transaction" },
1339 { 0xffff0000, "Ok" },
1346 process_ptvc_record(ptvcursor_t *ptvc, const ptvc_record *rec,
1347 int *req_cond_results, gboolean really_decode,
1348 const ncp_record *ncp_rec);
1350 /* NCP packets come in request/reply pairs. The request packets tell the type
1351 * of NCP request and give a sequence ID. The response, unfortunately, only
1352 * identifies itself via the sequence ID; you have to know what type of NCP
1353 * request the request packet contained in order to successfully parse the NCP
1354 * response. A global method for doing this does not exist in ethereal yet
1355 * (NFS also requires it), so for now the NCP section will keep its own hash
1356 * table keeping track of NCP packet types.
1358 * We construct a conversation specified by the client and server
1359 * addresses and the connection number; the key representing the unique
1360 * NCP request then is composed of the pointer to the conversation
1361 * structure, cast to a "guint" (which may throw away the upper 32
1362 * bits of the pointer on a P64 platform, but the low-order 32 bits
1363 * are more likely to differ between conversations than the upper 32 bits),
1364 * and the sequence number.
1366 * The value stored in the hash table is the ncp_req_hash_value pointer. This
1367 * struct tells us the NCP type and gives the ncp2222_record pointer, if
1368 * ncp_type == 0x2222.
1371 conversation_t *conversation;
1378 } ncp_req_eid_hash_key;
1381 ncp_req_eid_hash_key *nds_eid;
1382 char object_name[256];
1384 } ncp_req_eid_hash_value;
1386 static GHashTable *ncp_req_hash = NULL;
1387 static GHashTable *ncp_req_eid_hash = NULL;
1388 static GMemChunk *ncp_req_eid_hash_keys = NULL;
1389 static GMemChunk *ncp_req_eid_hash_values = NULL;
1390 static GMemChunk *ncp_req_hash_keys = NULL;
1391 static GMemChunk *ncp_req_hash_values = NULL;
1393 /* Hash Functions */
1395 ncp_equal(gconstpointer v, gconstpointer v2)
1397 const ncp_req_hash_key *val1 = (const ncp_req_hash_key*)v;
1398 const ncp_req_hash_key *val2 = (const ncp_req_hash_key*)v2;
1400 if (val1->conversation == val2->conversation &&
1401 val1->nw_sequence == val2->nw_sequence ) {
1408 ncp_eid_equal(gconstpointer v, gconstpointer v2)
1410 const ncp_req_eid_hash_key *val1 = (const ncp_req_eid_hash_key*)v;
1411 const ncp_req_eid_hash_key *val2 = (const ncp_req_eid_hash_key*)v2;
1413 if (val1->nw_eid == val2->nw_eid ) {
1420 ncp_hash(gconstpointer v)
1422 const ncp_req_hash_key *ncp_key = (const ncp_req_hash_key*)v;
1423 return GPOINTER_TO_UINT(ncp_key->conversation) + ncp_key->nw_sequence;
1427 ncp_eid_hash(gconstpointer v)
1429 const ncp_req_eid_hash_key *ncp_eid_key = (const ncp_req_eid_hash_key*)v;
1430 return GPOINTER_TO_UINT(ncp_eid_key->nw_eid);
1433 /* Frees memory used by the ncp_req_hash_value's */
1435 ncp_req_hash_cleanup(gpointer key _U_, gpointer value, gpointer user_data _U_)
1437 ncp_req_hash_value *request_value = (ncp_req_hash_value*) value;
1439 if (request_value->req_cond_results) {
1440 g_free(request_value->req_cond_results);
1444 /* Frees memory used by the ncp_req_hash_value's */
1446 ncp_req_eid_hash_cleanup(gpointer key _U_, gpointer value, gpointer user_data _U_)
1448 ncp_req_eid_hash_value *request_eid_value = (ncp_req_eid_hash_value*) value;
1450 if (request_eid_value->object_class) {
1451 g_free(request_eid_value->object_name);
1455 /* Initializes the hash table and the mem_chunk area each time a new
1456 * file is loaded or re-loaded in ethereal */
1458 ncp_init_protocol(void)
1461 fragment_table_init(&nds_fragment_table);
1462 reassembled_table_init(&nds_reassembled_table);
1465 g_hash_table_foreach(ncp_req_hash, ncp_req_hash_cleanup, NULL);
1466 g_hash_table_destroy(ncp_req_hash);
1468 if (ncp_req_eid_hash) {
1469 g_hash_table_foreach(ncp_req_eid_hash, ncp_req_eid_hash_cleanup, NULL);
1470 g_hash_table_destroy(ncp_req_eid_hash);
1472 if (ncp_req_hash_keys)
1473 g_mem_chunk_destroy(ncp_req_hash_keys);
1474 if (ncp_req_hash_values)
1475 g_mem_chunk_destroy(ncp_req_hash_values);
1476 if (ncp_req_eid_hash_keys)
1477 g_mem_chunk_destroy(ncp_req_eid_hash_keys);
1478 if (ncp_req_eid_hash_values)
1479 g_mem_chunk_destroy(ncp_req_eid_hash_values);
1481 ncp_req_hash = g_hash_table_new(ncp_hash, ncp_equal);
1482 ncp_req_eid_hash = g_hash_table_new(ncp_eid_hash, ncp_eid_equal);
1483 ncp_req_hash_keys = g_mem_chunk_new("ncp_req_hash_keys",
1484 sizeof(ncp_req_hash_key),
1485 NCP_PACKET_INIT_COUNT * sizeof(ncp_req_hash_key),
1487 ncp_req_hash_values = g_mem_chunk_new("ncp_req_hash_values",
1488 sizeof(ncp_req_hash_value),
1489 NCP_PACKET_INIT_COUNT * sizeof(ncp_req_hash_value),
1491 ncp_req_eid_hash_keys = g_mem_chunk_new("ncp_req_eid_hash_keys",
1492 sizeof(ncp_req_eid_hash_key),
1493 NCP_PACKET_INIT_COUNT * sizeof(ncp_req_eid_hash_key),
1495 ncp_req_eid_hash_values = g_mem_chunk_new("ncp_req_eid_hash_values",
1496 sizeof(ncp_req_eid_hash_value),
1497 NCP_PACKET_INIT_COUNT * sizeof(ncp_req_eid_hash_value),
1501 /* After the sequential run, we don't need the ncp_request hash and keys
1502 * anymore; the lookups have already been done and the vital info
1503 * saved in the reply-packets' private_data in the frame_data struct. */
1505 ncp_postseq_cleanup(void)
1508 /* Destroy the hash, but don't clean up request_condition data. */
1509 /*g_hash_table_destroy(ncp_req_hash);
1510 ncp_req_hash = NULL;*/
1512 if (ncp_req_hash_keys) {
1513 /*g_mem_chunk_destroy(ncp_req_hash_keys);
1514 ncp_req_hash_keys = NULL;*/
1516 /* Don't free the ncp_req_hash_values or EID_hash_table, as they're
1517 * needed during random-access processing of the proto_tree.*/
1520 static ncp_req_hash_value*
1521 ncp_hash_insert(conversation_t *conversation, guint8 nw_sequence,
1522 const ncp_record *ncp_rec)
1524 ncp_req_hash_key *request_key;
1525 ncp_req_hash_value *request_value;
1527 /* Now remember the request, so we can find it if we later
1529 request_key = g_mem_chunk_alloc(ncp_req_hash_keys);
1530 request_key->conversation = conversation;
1531 request_key->nw_sequence = nw_sequence;
1533 request_value = g_mem_chunk_alloc(ncp_req_hash_values);
1534 request_value->ncp_rec = ncp_rec;
1535 request_value->req_cond_results = NULL;
1536 request_value->req_nds_flags = 0;
1537 request_value->nds_request_verb = 0;
1538 request_value->nds_version = 0;
1539 strcpy(request_value->object_name, " ");
1540 request_value->nds_frag = TRUE;
1542 g_hash_table_insert(ncp_req_hash, request_key, request_value);
1544 return request_value;
1547 static ncp_req_eid_hash_value*
1548 ncp_eid_hash_insert(guint32 nw_eid)
1550 ncp_req_eid_hash_key *request_eid_key;
1551 ncp_req_eid_hash_value *request_eid_value;
1553 /* Now remember the request, so we can find it if we later
1555 request_eid_key = g_mem_chunk_alloc(ncp_req_eid_hash_keys);
1556 request_eid_key->nw_eid = nw_eid;
1558 request_eid_value = g_mem_chunk_alloc(ncp_req_eid_hash_values);
1559 strcpy(request_eid_value->object_name, " ");
1560 request_eid_value->object_class = NULL;
1562 g_hash_table_insert(ncp_req_eid_hash, request_eid_key, request_eid_value);
1564 return request_eid_value;
1567 /* Returns the ncp_rec*, or NULL if not found. */
1568 static ncp_req_hash_value*
1569 ncp_hash_lookup(conversation_t *conversation, guint8 nw_sequence)
1571 ncp_req_hash_key request_key;
1573 request_key.conversation = conversation;
1574 request_key.nw_sequence = nw_sequence;
1576 return g_hash_table_lookup(ncp_req_hash, &request_key);
1579 /* Returns the value_rec* for needed EID, or NULL if not found. */
1580 static ncp_req_eid_hash_value*
1581 ncp_eid_hash_lookup(conversation_t *conversation _U_, guint32 nw_eid)
1583 ncp_req_eid_hash_key request_eid_key;
1585 request_eid_key.nw_eid = nw_eid;
1587 return g_hash_table_lookup(ncp_req_eid_hash, &request_eid_key);
1590 /* Does NCP func require a subfunction code? */
1592 ncp_requires_subfunc(guint8 func)
1594 const guint8 *ncp_func_requirement = ncp_func_requires_subfunc;
1596 while (*ncp_func_requirement != 0) {
1597 if (*ncp_func_requirement == func) {
1600 ncp_func_requirement++;
1605 /* Does the NCP func have a length parameter? */
1607 ncp_has_length_parameter(guint8 func)
1609 const guint8 *ncp_func_requirement = ncp_func_has_no_length_parameter;
1611 while (*ncp_func_requirement != 0) {
1612 if (*ncp_func_requirement == func) {
1615 ncp_func_requirement++;
1621 /* Return a ncp_record* based on func and possibly subfunc */
1622 static const ncp_record *
1623 ncp_record_find(guint8 func, guint8 subfunc)
1625 const ncp_record *ncp_rec = ncp_packets;
1627 while(ncp_rec->func != 0 || ncp_rec->subfunc != 0 ||
1628 ncp_rec->name != NULL ) {
1629 if (ncp_rec->func == func) {
1630 if (ncp_rec->has_subfunc) {
1631 if (ncp_rec->subfunc == subfunc) {
1645 /* Given a proto_item*, assume it contains an integer value
1646 * and return a guint from it. */
1648 get_finfo_value_integer(field_info *finfo)
1650 /* XXX the fvalue functions are no longer safe to call directly
1651 since we sometimes fake the entries to speed things up.
1652 this dissector should not call fvalue_ functions directly.
1654 if(!finfo->value.ftype->get_value_integer){
1657 return fvalue_get_integer(&finfo->value);
1660 get_item_value(proto_item *item)
1662 return get_finfo_value_integer(PITEM_FINFO(item));
1667 get_finfo_length(field_info *finfo)
1669 return fvalue_length(&finfo->value);
1674 get_finfo_value_string(field_info *finfo)
1676 return fvalue_get(&finfo->value);
1680 get_item_string(proto_item *item)
1682 return get_finfo_value_string(PITEM_FINFO(item));
1687 get_item_name(proto_item *item)
1689 return PITEM_FINFO(item)->hfinfo->name;
1693 typedef proto_item* (*padd_func_t)(ptvcursor_t*, const ptvc_record*);
1696 * XXX - are these just DOS-format dates and times?
1698 * Should we put code to understand various date and time formats (UNIX,
1699 * DOS, SMB weird mutant UNIX, NT, Mac, etc. into libethereal, and have
1700 * the "display" member of an HF_ABSOLUTE_TIME field specify whether
1701 * it's DOS date/DOS time, DOS time/DOS date, NT time, UNIX time_t,
1702 * UNIX "struct timeval", NFSv3/NFSv4 seconds/nanoseconds, Mac, etc.?
1704 * What about hijacking the "bitmask" field to specify the precision of
1705 * the time stamp, or putting a combination of precision and format
1706 * into the "display" member?
1708 * What about relative times? Should they have units (seconds, milliseconds,
1709 * microseconds, nanoseconds, etc.), precision, and format in there?
1727 #define VTYPE_NONE 0 /* no value */
1728 #define VTYPE_UINT8 1
1729 #define VTYPE_UINT16 2
1730 #define VTYPE_UINT32 3
1731 #define VTYPE_STRING 4
1732 #define VTYPE_BITFIELD 5
1733 #define VTYPE_MULTIVALUE_UINT32 6
1734 #define VTYPE_BYTES 7
1735 #define VTYPE_BOOLEAN 8
1737 #define MVTYPE_ATTR_REQUEST 1
1738 #define MVTYPE_ATTR_REPLY 2
1739 #define MVTYPE_ATTR_REQUEST2 3
1740 #define MVTYPE_READ_CLASS_REQ 4
1741 #define MVTYPE_READ_REPLICAS 5
1742 #define MVTYPE_MODIFY_ATTR_REQUEST 6
1743 #define MVTYPE_ADDR_REFERRAL_REQUEST 7
1744 #define MVTYPE_ADDR_REFERRAL_REPLY 8
1745 #define MVTYPE_LOC_ADDR_REFERRAL_REPLY 9
1746 #define MVTYPE_PROC_ENTRY_SPECIFIERS 10
1747 #define MVTYPE_PRINT_TIMESTAMP 11
1748 #define MVTYPE_LIST_PARTITIONS 12
1749 #define MVTYPE_CLASS_NAMES 13
1750 #define MVTYPE_MODIFY_CLASS 14
1751 #define MVTYPE_ADD_ATTR_REQUEST 15
1780 guint32 bit10hfname;
1782 guint32 bit11hfname;
1784 guint32 bit12hfname;
1786 guint32 bit13hfname;
1788 guint32 bit14hfname;
1790 guint32 bit15hfname;
1792 guint32 bit16hfname;
1795 guint32 nds_version;
1799 /* Given an integer, fill in a nw_date_t struct. */
1801 uint_to_nwdate(guint data, nw_date_t *nwdate)
1803 nwdate->day = data & 0x001f;
1804 nwdate->month = (data & 0x01e0) >> 5;
1805 nwdate->year = ((data & 0xfe00) >> 9) + 1980;
1808 /* Given an integer, fill in a nw_time_t struct. */
1810 uint_to_nwtime(guint data, nw_time_t *nwtime)
1812 /* 2-second resolution */
1813 nwtime->second = (data & 0x001f) * 2;
1814 nwtime->minute = ((data & 0x07e0) >> 5);
1815 nwtime->hour = ((data & 0xf800) >> 11);
1819 padd_normal(ptvcursor_t *ptvc, const ptvc_record *rec)
1822 ptvcursor_add(ptvc, *rec->hf_ptr,
1823 rec->length, rec->endianness);
1827 padd_date(ptvcursor_t *ptvc, const ptvc_record *rec)
1833 offset = ptvcursor_current_offset(ptvc);
1835 item = ptvcursor_add(ptvc, *rec->hf_ptr,
1836 rec->length, rec->endianness);
1838 uint_to_nwdate(get_item_value(item), &nw_date);
1840 proto_item_set_text(item, "%s", get_item_name(item));
1841 proto_item_append_text(item, ": %04u/%02u/%02u",
1842 nw_date.year, nw_date.month, nw_date.day);
1847 padd_time(ptvcursor_t *ptvc, const ptvc_record *rec)
1853 offset = ptvcursor_current_offset(ptvc);
1855 item = ptvcursor_add(ptvc, *rec->hf_ptr,
1856 rec->length, rec->endianness);
1858 uint_to_nwtime(get_item_value(item), &nw_time);
1860 proto_item_set_text(item, "%s", get_item_name(item));
1861 proto_item_append_text(item, ": %02u:%02u:%02u",
1862 nw_time.hour, nw_time.minute, nw_time.second);
1867 /* Convert a string from little-endian unicode to ascii. At the moment we
1868 fake it by taking every odd byte. )-: The caller must free the
1871 padd_uni(ptvcursor_t *ptvc, const ptvc_record *rec)
1877 strcpy(nw_uni.buffer, "");
1878 offset = ptvcursor_current_offset(ptvc);
1880 item = ptvcursor_add(ptvc, *rec->hf_ptr,
1881 rec->length, rec->endianness);
1883 proto_item_set_text(item, "%s", get_item_name(item));
1884 proto_item_append_text(item, " %s",
1890 /* Add a value for a ptvc_record, and process the sub-ptvc_record
1891 * that it points to. */
1893 process_bitfield_sub_ptvc_record(ptvcursor_t *ptvc, const ptvc_record *rec,
1894 gboolean really_decode)
1897 proto_tree *sub_tree;
1898 const ptvc_record *sub_rec;
1901 ptvcursor_t *sub_ptvc;
1903 if (really_decode) {
1904 /* Save the current offset */
1905 current_offset = ptvcursor_current_offset(ptvc);
1908 item = ptvcursor_add(ptvc, *rec->hf_ptr, rec->length,
1911 ett = *rec->sub_ptvc_rec->ett;
1913 /* Make a new protocol sub-tree */
1914 sub_tree = proto_item_add_subtree(item, ett);
1916 /* Make a new ptvcursor */
1917 sub_ptvc = ptvcursor_new(sub_tree, ptvcursor_tvbuff(ptvc),
1921 sub_rec = rec->sub_ptvc_rec->ptvc_rec;
1922 while(sub_rec->hf_ptr != NULL) {
1923 DISSECTOR_ASSERT(!sub_rec->sub_ptvc_rec);
1924 ptvcursor_add_no_advance(sub_ptvc, *sub_rec->hf_ptr,
1925 sub_rec->length, sub_rec->endianness);
1930 ptvcursor_free(sub_ptvc);
1933 DISSECTOR_ASSERT(rec->length > 0 &&
1934 proto_registrar_get_nth(*rec->hf_ptr)->type != FT_UINT_STRING);
1935 ptvcursor_advance(ptvc, rec->length);
1939 /* Process a sub-ptvc_record that points to a "struct" ptvc_record. */
1941 process_struct_sub_ptvc_record(ptvcursor_t *ptvc, const ptvc_record *rec,
1942 int *req_cond_results, gboolean really_decode,
1943 const ncp_record *ncp_rec)
1945 const ptvc_record *sub_rec;
1947 proto_tree *old_tree=NULL, *new_tree;
1948 proto_item *item=NULL;
1951 /* Create a sub-proto_tree? */
1952 if (rec->sub_ptvc_rec->descr) {
1953 ett = *rec->sub_ptvc_rec->ett;
1954 old_tree = ptvcursor_tree(ptvc);
1955 offset = ptvcursor_current_offset(ptvc);
1956 item = proto_tree_add_text(old_tree, ptvcursor_tvbuff(ptvc),
1957 offset, PROTO_LENGTH_UNTIL_END,
1958 rec->sub_ptvc_rec->descr);
1959 new_tree = proto_item_add_subtree(item, ett);
1960 ptvcursor_set_tree(ptvc, new_tree);
1963 /* Get the ptvc_record for the struct and call our caller
1965 sub_rec = rec->sub_ptvc_rec->ptvc_rec;
1966 process_ptvc_record(ptvc, sub_rec, req_cond_results, really_decode, ncp_rec);
1968 /* Re-set the tree */
1969 if (rec->sub_ptvc_rec->descr) {
1970 if (ptvcursor_current_offset(ptvc) <= offset)
1971 THROW(ReportedBoundsError);
1973 proto_item_set_len(item, ptvcursor_current_offset(ptvc) - offset);
1974 ptvcursor_set_tree(ptvc, old_tree);
1978 /* Run through the table of ptvc_record's and add info to the tree. This
1979 * is the work-horse of process_ptvc_record(). */
1981 _process_ptvc_record(ptvcursor_t *ptvc, const ptvc_record *rec,
1982 int *req_cond_results, gboolean really_decode,
1983 const ncp_record *ncp_rec)
1986 guint i, repeat_count;
1987 padd_func_t func = NULL;
1989 if (rec->sub_ptvc_rec) {
1991 if (rec->repeat_index == NO_REPEAT) {
1992 if (rec->hf_ptr == PTVC_STRUCT) {
1993 process_struct_sub_ptvc_record(ptvc, rec,
1994 req_cond_results, really_decode,
1998 process_bitfield_sub_ptvc_record(ptvc, rec,
2003 repeat_count = repeat_vars[rec->repeat_index];
2004 for (i = 0; i < repeat_count; i++ ) {
2005 if (rec->hf_ptr == PTVC_STRUCT) {
2006 process_struct_sub_ptvc_record(ptvc, rec,
2007 req_cond_results, really_decode,
2011 process_bitfield_sub_ptvc_record(ptvc, rec,
2018 /* If we can't repeat this field, we might use it
2019 * to set a 'var'. */
2020 if (rec->repeat_index == NO_REPEAT) {
2021 if (really_decode) {
2022 /* Handle any special formatting. */
2023 switch(rec->special_fmt) {
2027 case NCP_FMT_NW_DATE:
2030 case NCP_FMT_NW_TIME:
2033 case NCP_FMT_UNICODE:
2037 DISSECTOR_ASSERT_NOT_REACHED();
2039 item = func(ptvc, rec);
2041 /* Set the value as a 'var' ? */
2042 if (rec->var_index != NO_VAR) {
2043 repeat_vars[rec->var_index] = get_item_value(item);
2047 /* If we don't decode the field, we
2048 * better not use the value to set a var.
2049 * Actually, we could, as long as we don't
2050 * *use* that var; for now keep this assert in
2052 DISSECTOR_ASSERT(rec->var_index == NO_VAR);
2054 /* This had better not be variable-length,
2056 DISSECTOR_ASSERT(rec->length > 0 &&
2057 proto_registrar_get_nth(*rec->hf_ptr)->type != FT_UINT_STRING);
2058 ptvcursor_advance(ptvc, rec->length);
2062 /* We do repeat this field. */
2063 repeat_count = repeat_vars[rec->repeat_index];
2064 if (really_decode) {
2065 /* Handle any special formatting. */
2066 switch(rec->special_fmt) {
2070 case NCP_FMT_NW_DATE:
2073 case NCP_FMT_NW_TIME:
2076 case NCP_FMT_UNICODE:
2080 DISSECTOR_ASSERT_NOT_REACHED();
2082 for (i = 0; i < repeat_count; i++ ) {
2087 for (i = 0; i < repeat_count; i++ ) {
2088 DISSECTOR_ASSERT(rec->length > 0 &&
2089 proto_registrar_get_nth(*rec->hf_ptr)->type != FT_UINT_STRING);
2090 ptvcursor_advance(ptvc, rec->length);
2097 /* Run through the table of ptvc_record's and add info to the tree.
2098 * Honor a request condition result. */
2100 process_ptvc_record(ptvcursor_t *ptvc, const ptvc_record *rec,
2101 int *req_cond_results, gboolean really_decode,
2102 const ncp_record *ncp_rec)
2106 while(rec->hf_ptr != NULL) {
2107 decode = really_decode;
2108 /* If we're supposed to decode, check the request condition
2109 * results to see if we should override this and *not* decode. */
2110 if (decode && req_cond_results) {
2111 if (rec->req_cond_index != NO_REQ_COND) {
2112 if (req_cond_results[rec->req_cond_index] == FALSE) {
2117 if (decode || ncp_rec->req_cond_size_type == REQ_COND_SIZE_CONSTANT) {
2118 _process_ptvc_record(ptvc, rec, req_cond_results, decode, ncp_rec);
2126 /* Clear the repeat_vars array. */
2128 clear_repeat_vars(void)
2132 for (i = 0 ; i < NUM_REPEAT_VARS; i++ ) {
2138 /* Given an error_equivalency table and a completion code, return
2139 * the string representing the error. */
2141 ncp_error_string(const error_equivalency *errors, guint8 completion_code)
2144 while (errors->ncp_error_index != -1) {
2145 if (errors->error_in_packet == completion_code) {
2146 return ncp_errors[errors->ncp_error_index];
2151 return "Unknown Error Code";
2154 static const ncp_record ncp1111_request =
2155 { 0xf1, 0x00, NO_SUBFUNC, "Create Connection Service", NCP_GROUP_CONNECTION,
2156 NULL, NULL, ncp_0x2_errors, NULL, NO_REQ_COND_SIZE, NULL };
2158 static const ncp_record ncp5555_request =
2159 { 0xf5, 0x00, NO_SUBFUNC, "Destroy Connection Service", NCP_GROUP_CONNECTION,
2160 NULL, NULL, ncp_0x2_errors, NULL, NO_REQ_COND_SIZE, NULL };
2162 static const ncp_record ncpbbbb_request =
2163 { 0xfb, 0x00, NO_SUBFUNC, "Server Broadcast Message", NCP_GROUP_CONNECTION,
2164 NULL, NULL, ncp_0x2_errors, NULL, NO_REQ_COND_SIZE, NULL };
2166 static const ncp_record ncplip_echo =
2167 { 0xfa, 0x00, NO_SUBFUNC, "LIP Echo Packet", NCP_GROUP_CONNECTION,
2168 NULL, NULL, ncp_0x2_errors, NULL, NO_REQ_COND_SIZE, NULL };
2170 /* Wrapper around proto_tree_free() */
2171 static void free_proto_tree(void *tree)
2174 proto_tree_free((proto_tree*) tree);
2179 align_4(tvbuff_t *tvb, guint32 aoffset)
2181 if(tvb_length_remaining(tvb, aoffset) > 4 )
2189 get_string(tvbuff_t* tvb, guint offset, guint str_length, char *dest_buf)
2193 guint32 length_remaining = 0;
2195 length_remaining = tvb_length_remaining(tvb, offset);
2196 if(str_length > length_remaining || str_length > 1024)
2198 THROW(ReportedBoundsError);
2205 for ( i = 0; i < str_length; i++ )
2207 c_char = tvb_get_guint8(tvb, offset );
2208 if (c_char<0x20 || c_char>0x7e)
2213 dest_buf[i] = c_char & 0xff;
2223 dest_buf[i] = c_char & 0xff;
2228 if(length_remaining==1)
2230 dest_buf[i+1] = '\0';
2239 uni_to_string(char * data, guint32 str_length, char *dest_buf)
2243 guint32 length_remaining = 0;
2245 length_remaining = str_length;
2251 for ( i = 0; i < str_length; i++ )
2254 if (c_char<0x20 || c_char>0x7e)
2259 dest_buf[i] = c_char & 0xff;
2269 dest_buf[i] = c_char & 0xff;
2273 if(length_remaining==0)
2275 dest_buf[i+1] = '\0';
2283 /*************************************
2284 * Return based on % format in request
2285 * %d = integer in decimal format = 0
2286 * %x = integer in hex format = 1
2288 **************************************/
2290 get_info_type(const gchar* check_string)
2296 length = strlen(check_string);
2298 for (i = 0 ; i < length-1 ; i++ ) {
2299 char_val = check_string[i+1];
2300 if (check_string[i] == 0x25 && check_string[i+1] == 0x64) { /* %d Digits*/
2303 if ( check_string[i] == 0x78 && check_string[i+1] == 0x25 && check_string[i+2] == 0x73) { /* x%s Bytes*/
2307 return 2; /* Normal String */
2311 process_bitfield(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
2313 gchar flags_str[512];
2316 proto_tree *flags_tree;
2320 bvalue = 0x00000001;
2323 for (i = 0 ; i < (values->vlength*8); i++ ) {
2324 if (values->vvalue & bvalue)
2326 strcat(flags_str, sep);
2329 strcat(flags_str, values->bit1);
2332 strcat(flags_str, values->bit2);
2335 strcat(flags_str, values->bit3);
2338 strcat(flags_str, values->bit4);
2341 strcat(flags_str, values->bit5);
2344 strcat(flags_str, values->bit6);
2347 strcat(flags_str, values->bit7);
2350 strcat(flags_str, values->bit8);
2353 strcat(flags_str, values->bit9);
2356 strcat(flags_str, values->bit10);
2359 strcat(flags_str, values->bit11);
2362 strcat(flags_str, values->bit12);
2365 strcat(flags_str, values->bit13);
2368 strcat(flags_str, values->bit14);
2371 strcat(flags_str, values->bit15);
2374 strcat(flags_str, values->bit16);
2383 if(values->vlength==4)
2385 tinew = proto_tree_add_uint_format(ncp_tree, values->hfname,
2386 tvb, values->voffset, values->vlength, values->vvalue, "%s 0x%08x",
2387 values->vdesc, values->vvalue);
2391 tinew = proto_tree_add_uint_format(ncp_tree, values->hfname,
2392 tvb, values->voffset, values->vlength, values->vvalue, "%s 0x%04x",
2393 values->vdesc, values->vvalue);
2395 if (flags_str[0] != '\0')
2396 proto_item_append_text(tinew, " - (%s)", flags_str);
2398 flags_tree = proto_item_add_subtree(tinew, ett_nds);
2400 bvalue = 0x00000001;
2402 for (i = 0 ; i < (values->vlength*8); i++ ) {
2403 if (values->vvalue & bvalue)
2408 proto_tree_add_item(flags_tree, values->bit1hfname, tvb, values->voffset, values->vlength, TRUE);
2411 proto_tree_add_item(flags_tree, values->bit2hfname, tvb, values->voffset, values->vlength, TRUE);
2414 proto_tree_add_item(flags_tree, values->bit3hfname, tvb, values->voffset, values->vlength, TRUE);
2417 proto_tree_add_item(flags_tree, values->bit4hfname, tvb, values->voffset, values->vlength, TRUE);
2420 proto_tree_add_item(flags_tree, values->bit5hfname, tvb, values->voffset, values->vlength, TRUE);
2423 proto_tree_add_item(flags_tree, values->bit6hfname, tvb, values->voffset, values->vlength, TRUE);
2426 proto_tree_add_item(flags_tree, values->bit7hfname, tvb, values->voffset, values->vlength, TRUE);
2429 proto_tree_add_item(flags_tree, values->bit8hfname, tvb, values->voffset, values->vlength, TRUE);
2432 proto_tree_add_item(flags_tree, values->bit9hfname, tvb, values->voffset, values->vlength, TRUE);
2435 proto_tree_add_item(flags_tree, values->bit10hfname, tvb, values->voffset, values->vlength, TRUE);
2438 proto_tree_add_item(flags_tree, values->bit11hfname, tvb, values->voffset, values->vlength, TRUE);
2441 proto_tree_add_item(flags_tree, values->bit12hfname, tvb, values->voffset, values->vlength, TRUE);
2444 proto_tree_add_item(flags_tree, values->bit13hfname, tvb, values->voffset, values->vlength, TRUE);
2447 proto_tree_add_item(flags_tree, values->bit14hfname, tvb, values->voffset, values->vlength, TRUE);
2450 proto_tree_add_item(flags_tree, values->bit15hfname, tvb, values->voffset, values->vlength, TRUE);
2453 proto_tree_add_item(flags_tree, values->bit16hfname, tvb, values->voffset, values->vlength, TRUE);
2463 /* NCP data from python code can't be accessed directly. Parse the ncp tree and find the items
2464 * and their associated values. Store results in passed buffer.
2467 build_expert_data(proto_tree *ncp_tree, char *hf_name, char *buffer, int repeat_lookup)
2469 proto_tree *tree_pointer;
2470 proto_tree *tree_loc;
2471 char temp_buffer[256]="\0";
2473 tree_loc = ncp_tree->first_child;
2474 for (tree_pointer=tree_loc; tree_pointer!=NULL; tree_pointer=tree_pointer->next)
2476 if (strcmp(tree_pointer->finfo->hfinfo->abbrev, hf_name)==0)
2478 switch (tree_pointer->finfo->hfinfo->type)
2481 case 4: /* uint16 */
2482 g_snprintf(buffer, get_finfo_length(tree_pointer->finfo)*4, "%d", get_finfo_value_integer(tree_pointer->finfo));
2485 case 6: /* uint32 */
2486 g_snprintf(buffer, get_finfo_length(tree_pointer->finfo)*4, "%08x", get_finfo_value_integer(tree_pointer->finfo));
2489 case 19: /* string */
2490 uni_to_string(get_finfo_value_string(tree_pointer->finfo), get_finfo_length(tree_pointer->finfo), buffer);
2491 if (repeat_lookup > 0) {
2492 if (strlen(temp_buffer) + strlen(buffer) < 250) {
2493 strcat(temp_buffer, buffer);
2495 if (repeat_lookup == 0) {
2496 strcpy(buffer, temp_buffer);
2501 strcat(temp_buffer, "/");
2514 case 21: /* Bytes */
2515 g_snprintf(buffer, (get_finfo_length(tree_pointer->finfo))*4, "%s", bytes_to_str(get_finfo_value_string(tree_pointer->finfo), get_finfo_length(tree_pointer->finfo)));
2517 default: /* Dont currently handle. Only need string, integers, and bytes */
2518 buffer = "Unsupported Expert Type\0";
2521 if (repeat_lookup ==0) {
2526 if (strlen(buffer)==0) {
2527 buffer = "No Value\0";
2532 /* Some NCP data may be desirable to echo to the expert table.
2533 * But to extract we must have visability to the tree
2534 * This means that to extract the data we can only perform
2535 * this code path on the first dissection or a redissect.
2537 * Should the dissector store this info in memory so that
2538 * the data can be reported wihout a complete redissection?
2541 trap_for_expert_event(proto_tree *ncp_tree, packet_info *pinfo, const ncp_record *ncp_rec, int request_reply)
2543 if (ncp_rec == NULL)
2546 /* Request == 0, Reply == 1 */
2547 if (request_reply==0) {
2548 if (ncp_echo_file) {
2549 /* The following allows for Update file handle rights echoed to expert tap. */
2550 if (ncp_rec->func == 66) {
2551 char p_filehandle[15]="\0";
2553 build_expert_data(ncp_tree, "ncp.file_handle", p_filehandle, 0);
2555 expert_add_info_format(pinfo, NULL, PI_REQUEST_CODE, PI_CHAT, "Close file handle %s", p_filehandle);
2557 /* The following allows for oplock level 1 file opens echoed to expert tap. */
2558 if ((ncp_rec->func == 89 || ncp_rec->func == 87) && (ncp_rec->subfunc == 1 || ncp_rec->subfunc == 30 || ncp_rec->subfunc == 32 || ncp_rec->subfunc == 33)) {
2559 char oaction[2]="\0";
2560 char p_filename[256]="\0";
2561 char p_rights[2]="\0";
2562 char p_path_count[2]="\0";
2564 build_expert_data(ncp_tree, "ncp.open_create_mode", oaction, 0);
2565 build_expert_data(ncp_tree, "ncp.desired_access_rights", p_rights, 0);
2566 build_expert_data(ncp_tree, "ncp.path_count", p_path_count, 0);
2568 if (ncp_rec->func == 87) {
2569 build_expert_data(ncp_tree, "ncp.path", p_filename, atoi(p_path_count));
2573 build_expert_data(ncp_tree, "ncp.path16", p_filename, atoi(p_path_count));
2576 expert_add_info_format(pinfo, NULL, PI_REQUEST_CODE, PI_CHAT, "%s: %s, Rights:(%s)", match_strval((atoi(oaction) & 0xeb), open_create_mode_vals), p_filename, match_strval((atoi(p_rights) & 0x5f), ncp_rights_vals));
2578 /* The following allows for oplock ack's and level 2 request echoed to expert tap. */
2579 if (ncp_rec->func == 87 && ncp_rec->subfunc == 34) {
2580 char cc_function[2]="\0";
2581 char p_filehandle[15]="\0";
2583 build_expert_data(ncp_tree, "ncp.cc_file_handle", p_filehandle, 0);
2584 build_expert_data(ncp_tree, "ncp.cc_function", cc_function, 0);
2586 expert_add_info_format(pinfo, NULL, PI_REQUEST_CODE, PI_CHAT, "Op-lock on handle %s - %s", p_filehandle, match_strval(atoi(cc_function), ncp_cc_function_vals));
2588 /* The following allows for Update file handle rights echoed to expert tap. */
2589 if (ncp_rec->func == 87 && ncp_rec->subfunc == 44) {
2590 char p_rights[20]="\0";
2591 char n_rights[20]="\0";
2592 char p_filehandle[15]="\0";
2594 build_expert_data(ncp_tree, "ncp.file_handle", p_filehandle, 0);
2595 build_expert_data(ncp_tree, "ncp.access_rights_mask_word", p_rights, 0);
2596 build_expert_data(ncp_tree, "ncp.new_access_rights_mask", n_rights, 0);
2597 expert_add_info_format(pinfo, NULL, PI_REQUEST_CODE, PI_CHAT, "Change handle %s rights from:(%s) to:(%s)", p_filehandle, match_strval((atoi(p_rights) & 0x1ff), access_rights_vals), match_strval((atoi(n_rights) & 0x1ff), access_rights_vals));
2604 if (ncp_echo_file) { /* Echo File System Data */
2605 /* The following allows for oplock level 1 file opens echoed to expert tap. */
2606 if ((ncp_rec->func == 89 || ncp_rec->func == 87) && (ncp_rec->subfunc == 32 || ncp_rec->subfunc == 1)) {
2607 char oaction[2]="\0";
2608 char oplockflg[2]="\0";
2609 char p_filehandle[15]="\0";
2611 build_expert_data(ncp_tree, "ncp.open_create_action", oaction, 0);
2612 build_expert_data(ncp_tree, "ncp.file_handle", p_filehandle, 0);
2614 if (ncp_rec->subfunc == 1) {
2615 expert_add_info_format(pinfo, NULL, PI_RESPONSE_CODE, PI_CHAT, "%s - File handle %s", match_strval((atoi(oaction) & 0x8f), open_create_action_vals), p_filehandle);
2619 build_expert_data(ncp_tree, "ncp.o_c_ret_flags", oplockflg, 0);
2620 expert_add_info_format(pinfo, NULL, PI_RESPONSE_CODE, PI_CHAT, "%s - File handle %s, %s", match_strval((atoi(oaction) & 0x8f), open_create_action_vals), p_filehandle, match_strval(atoi(oplockflg), ncp_o_c_ret_flags_vals));
2623 /* The following allows for Update file handle rights echoed to expert tap. */
2624 if (ncp_rec->func == 87 && ncp_rec->subfunc == 44) {
2625 char p_rights[20]="\0";
2626 char p_filehandle[15]="\0";
2628 build_expert_data(ncp_tree, "ncp.file_handle", p_filehandle, 0);
2629 build_expert_data(ncp_tree, "ncp.effective_rights", p_rights, 0);
2630 expert_add_info_format(pinfo, NULL, PI_RESPONSE_CODE, PI_CHAT, "Handle %s effective rights:(%s)", p_filehandle, match_strval((atoi(p_rights) & 0x1ff), access_rights_vals));
2633 /* The following allows for specific NCP server info to be echoed to the expert tap. */
2634 if (ncp_rec->func == 23 && ncp_rec->subfunc == 17 && ncp_echo_server) {
2635 char fsname[50]="\0";
2636 char p_maj_ver[3]="\0";
2637 char p_min_ver[3]="\0";
2639 char p_lang[3]="\0";
2641 /* Get Server name and version info */
2642 build_expert_data(ncp_tree, "ncp.server_name", fsname, 0);
2643 build_expert_data(ncp_tree, "ncp.product_major_version", p_maj_ver, 0);
2644 build_expert_data(ncp_tree, "ncp.product_minor_version", p_min_ver, 0);
2645 build_expert_data(ncp_tree, "ncp.product_revision_version", p_rev, 0);
2646 build_expert_data(ncp_tree, "ncp.os_language_id", p_lang, 0);
2647 expert_add_info_format(pinfo, NULL, PI_RESPONSE_CODE, PI_CHAT, "Server %s, version %s.%s, support pack %s, language %s", fsname,
2648 p_maj_ver, p_min_ver, p_rev, p_lang);
2655 print_nds_values(proto_tree *vtree, tvbuff_t *tvb, guint32 syntax_type, nds_val *vvalues)
2662 guint32 voffset = 0, oldvoffset;
2664 guint32 number_of_values = 0;
2665 guint32 number_of_items = 0;
2671 const char *valuestr = NULL;
2676 gint length_remaining;
2678 voffset = vvalues->voffset;
2679 if(tvb_get_guint8(tvb, voffset) == 0x00)
2681 voffset = voffset+2;
2684 number_of_values = tvb_get_letohl(tvb, voffset);
2686 vitem = proto_tree_add_uint_format(vtree, hf_nds_uint32value, tvb, voffset,
2687 4, number_of_values, "Number of Values: %u", number_of_values);
2689 nvtree = proto_item_add_subtree(vitem, ett_nds);
2691 oldvoffset = voffset;
2692 voffset = voffset + 4;
2694 for (icounter = 1 ; icounter <= number_of_values; icounter++ )
2696 if (oldvoffset >= voffset) {
2697 proto_tree_add_text(nvtree, tvb, 0, 0, "[ Invalid offset: %u ]", voffset);
2698 THROW(ReportedBoundsError);
2700 oldvoffset = voffset;
2703 case 0x00000006: /* Case Insensitive List */
2704 case 0x0000000d: /* Binary String List */
2705 case 0x00000012: /* Postal Address */
2706 voffset += align_4(tvb, voffset);
2707 voffset = voffset+4;
2708 number_of_items = tvb_get_letohl(tvb, voffset);
2709 voffset = voffset+4;
2710 for (r=1; r<=number_of_items; r++)
2712 value1 = tvb_get_letohl(tvb, voffset);
2713 voffset = voffset + 4;
2714 get_string(tvb, voffset, value1, vvalues->vstring);
2715 proto_tree_add_string(nvtree, hf_value_string, tvb, voffset,
2716 value1, vvalues->vstring);
2717 voffset = voffset + value1;
2718 voffset += align_4(tvb, voffset);
2721 case 0x00000007: /* Boolean */
2722 value1 = tvb_get_letohl(tvb, voffset); /* length of field */
2725 vvalues->vstring = "False";
2729 vvalues->vstring = "True";
2731 tvb_ensure_bytes_exist(tvb, voffset, value1);
2732 proto_tree_add_string(nvtree, hf_value_string, tvb, voffset,
2733 value1, vvalues->vstring);
2736 case 0x00000009: /* Binary String */
2737 value1 = tvb_get_letohl(tvb, voffset); /* length of field */
2738 length_remaining = tvb_length_remaining(tvb, voffset);
2739 if(length_remaining == -1 || value1 > (guint32) length_remaining)
2744 tvb_ensure_bytes_exist(tvb, voffset, value1);
2745 proto_tree_add_bytes(nvtree, hf_value_bytes, tvb, voffset, value1, tvb_get_ptr(tvb, voffset, value1));
2747 voffset += (value1%2);
2749 case 0x00000015: /* Stream */
2750 value1 = tvb_get_letohl(tvb, voffset); /* length of field */
2751 length_remaining = tvb_length_remaining(tvb, voffset);
2752 if(length_remaining == -1 || value1 > (guint32) length_remaining)
2756 proto_tree_add_text(nvtree, tvb, voffset, 4, "No value, Open stream file for data.");
2759 voffset += (value1%2);
2761 case 0x00000008: /* Signed Integer */
2762 case 0x00000016: /* Counter */
2763 case 0x00000018: /* Time */
2764 case 0x0000001b: /* Interval */
2765 value1 = tvb_get_letohl(tvb, voffset); /* length of field */
2766 voffset = voffset+4;
2767 value2 = tvb_get_letohl(tvb, voffset); /* Value */
2768 tvb_ensure_bytes_exist(tvb, voffset, value1);
2769 if (strcmp(vvalues->vstring, "zendmSearchType")==0) {
2770 proto_tree_add_uint_format(nvtree, hf_nds_uint32value, tvb, voffset,
2771 value1, value2, "Value (%d) = %s", value2, match_strval(value2, zensearchenum));
2775 proto_tree_add_uint_format(nvtree, hf_nds_uint32value, tvb, voffset,
2776 value1, value2, "Value %d", value2);
2778 voffset = voffset+4;
2780 case 0x0000000b: /* Fax Number */
2781 value1 = tvb_get_letohl(tvb, voffset); /* length of field */
2782 voffset = voffset+4;
2783 get_string(tvb, voffset, value1, vvalues->vstring);
2784 proto_tree_add_string(nvtree, hf_value_string, tvb, voffset,
2785 value1, vvalues->vstring);
2786 voffset = voffset + value1;
2787 voffset += align_4(tvb, voffset);
2789 case 0x0000000c: /* Network Address */
2790 value1 = tvb_get_letohl(tvb, voffset); /* length of field */
2791 voffset = voffset + 4;
2792 value2 = tvb_get_letohl(tvb, voffset); /* type of Protocol */
2793 valuestr = match_strval(value2, nds_protocol_type);
2794 if (valuestr == NULL)
2796 valuestr="(Undefined Protocol)";
2798 tvb_ensure_bytes_exist(tvb, voffset, value1);
2799 proto_tree_add_uint_format(nvtree, hf_nds_uint32value, tvb, voffset,
2800 value1, value2, valuestr, value2);
2801 voffset = voffset+4;
2802 value3 = tvb_get_letohl(tvb, voffset); /* length of address */
2803 voffset = voffset+4;
2807 proto_tree_add_item(nvtree, hf_nds_net, tvb, voffset, 4, FALSE);
2808 proto_tree_add_item(nvtree, hf_nds_node, tvb, voffset+4, 6, FALSE);
2809 proto_tree_add_item(nvtree, hf_nds_socket, tvb, voffset+10, 2, FALSE);
2812 proto_tree_add_item(nvtree, hf_nds_port, tvb, voffset, 2, FALSE);
2813 proto_tree_add_item(nvtree, hf_add_ref_ip, tvb, voffset+2, 4, FALSE);
2816 proto_tree_add_item(nvtree, hf_nds_port, tvb, voffset, 2, FALSE);
2817 proto_tree_add_item(nvtree, hf_add_ref_udp, tvb, voffset+2, 4, FALSE);
2820 proto_tree_add_item(nvtree, hf_nds_port, tvb, voffset, 2, FALSE);
2821 proto_tree_add_item(nvtree, hf_add_ref_tcp, tvb, voffset+2, 4, FALSE);
2824 get_string(tvb, voffset, value3, vvalues->vstring);
2825 proto_tree_add_string(nvtree, hf_value_string, tvb, voffset,
2826 value3, vvalues->vstring);
2831 voffset = voffset + value3;
2832 voffset += align_4(tvb, voffset);
2834 case 0x0000000f: /* File System Path */
2835 value1 = tvb_get_letohl(tvb, voffset); /* length of field */
2836 voffset = voffset + 4;
2837 value2 = tvb_get_letohl(tvb, voffset); /* Name Space */
2838 valuestr = match_strval(value2, name_space_type);
2839 if (valuestr == NULL)
2841 valuestr = "Unknown Name Space";
2843 proto_tree_add_string(nvtree, hf_value_string, tvb, voffset,
2845 voffset = voffset+4;
2846 value3 = tvb_get_letohl(tvb, voffset); /* Length of Volume name */
2847 voffset = voffset+4;
2848 get_string(tvb, voffset, value3, vvalues->vstring);
2849 proto_tree_add_string(nvtree, hf_value_string, tvb, voffset,
2850 value3, vvalues->vstring);
2851 voffset = voffset+value3;
2852 voffset += align_4(tvb, voffset);
2853 value4 = tvb_get_letohl(tvb, voffset); /* Length of Path name */
2854 voffset = voffset+4;
2855 get_string(tvb, voffset, value4, vvalues->vstring);
2856 proto_tree_add_string(nvtree, hf_value_string, tvb, voffset,
2857 value4, vvalues->vstring);
2858 voffset = voffset+value4;
2859 voffset += align_4(tvb, voffset);
2861 case 0x00000010: /* Replica Pointer */
2862 value1 = tvb_get_letohl(tvb, voffset); /* length of field */
2863 voffset = voffset + 4;
2864 value2 = tvb_get_letohl(tvb, voffset); /* Length of Server name */
2865 voffset = voffset+4;
2866 get_string(tvb, voffset, value2, vvalues->vstring);
2867 proto_tree_add_string(nvtree, hf_value_string, tvb, voffset,
2868 value2, vvalues->vstring);
2869 voffset = voffset+value2;
2870 voffset += align_4(tvb, voffset);
2871 rtype = tvb_get_letohs(tvb, voffset); /* replica type */
2872 valuestr = match_strval(rtype, nds_replica_type);
2873 if (valuestr == NULL)
2875 valuestr="(Unknown Replica Type)";
2877 proto_tree_add_string(nvtree, hf_replica_type, tvb, voffset,
2879 voffset = voffset+2;
2880 rstate = tvb_get_letohs(tvb, voffset); /* replica state */
2881 valuestr = match_strval(rstate, nds_replica_state);
2882 if (valuestr == NULL)
2884 valuestr="(Unknown Replica State)";
2886 proto_tree_add_string(nvtree, hf_replica_state, tvb, voffset,
2888 voffset = voffset+2;
2889 value3 = tvb_get_letohl(tvb, voffset); /* Replica number */
2890 proto_tree_add_uint_format(nvtree, hf_replica_number, tvb, voffset,
2891 4, value3, "Replica Number %d", value3);
2892 voffset = voffset+4;
2893 if(vvalues->nds_version == 0xfe)
2897 number_of_items = tvb_get_letohl(tvb, voffset); /* Number of Addresses */
2898 aditem = proto_tree_add_uint_format(nvtree, hf_nds_uint32value, tvb, voffset,
2899 4, number_of_items, "Number of Addresses: %u", number_of_items);
2901 adtree = proto_item_add_subtree(aditem, ett_nds);
2902 voffset = voffset+4;
2903 for (r=1; r <= number_of_items; r++)
2905 voffset += align_4(tvb, voffset);
2906 value4 = tvb_get_letohl(tvb, voffset); /* type of Protocol */
2907 valuestr = match_strval(value4, nds_protocol_type);
2908 if (valuestr == NULL)
2910 valuestr="(Undefined Protocol)";
2912 proto_tree_add_uint_format(adtree, hf_nds_uint32value, tvb, voffset,
2913 4, value4, valuestr, value4);
2914 voffset = voffset+4;
2915 value5 = tvb_get_letohl(tvb, voffset); /* length of address */
2916 voffset = voffset+4;
2920 proto_tree_add_item(adtree, hf_nds_net, tvb, voffset, 4, FALSE);
2921 proto_tree_add_item(adtree, hf_nds_node, tvb, voffset+4, 6, FALSE);
2922 proto_tree_add_item(adtree, hf_nds_socket, tvb, voffset+10, 2, FALSE);
2925 proto_tree_add_item(adtree, hf_nds_port, tvb, voffset, 2, FALSE);
2926 proto_tree_add_item(adtree, hf_add_ref_ip, tvb, voffset+2, 4, FALSE);
2929 proto_tree_add_item(adtree, hf_nds_port, tvb, voffset, 2, FALSE);
2930 proto_tree_add_item(adtree, hf_add_ref_udp, tvb, voffset+2, 4, FALSE);
2933 proto_tree_add_item(adtree, hf_nds_port, tvb, voffset, 2, FALSE);
2934 proto_tree_add_item(adtree, hf_add_ref_tcp, tvb, voffset+2, 4, FALSE);
2937 get_string(tvb, voffset, value5, vvalues->vstring);
2938 proto_tree_add_string(adtree, hf_value_string, tvb, voffset,
2939 value5, vvalues->vstring);
2944 voffset = voffset + value5;
2946 voffset += align_4(tvb, voffset);
2948 case 0x00000011: /* Object ACL */
2949 value1 = tvb_get_letohl(tvb, voffset); /* Length of Field */
2950 voffset = voffset + 4;
2951 value2 = tvb_get_letohl(tvb, voffset);
2952 voffset = voffset + 4;
2953 get_string(tvb, voffset, value2, vvalues->vstring); /* Unicode String */
2954 proto_tree_add_string(nvtree, hf_value_string, tvb, voffset,
2955 value2, vvalues->vstring);
2956 voffset = voffset + value2;
2957 voffset += align_4(tvb, voffset);
2958 value3 = tvb_get_letohl(tvb, voffset);
2959 voffset = voffset + 4;
2960 get_string(tvb, voffset, value3, vvalues->vstring); /* Unicode Subject Name */
2961 proto_tree_add_string(nvtree, hf_value_string, tvb, voffset,
2962 value3, vvalues->vstring);
2963 voffset = voffset + value3;
2964 voffset += align_4(tvb, voffset);
2965 value4 = tvb_get_letohl(tvb, voffset); /* Privileges */
2966 proto_tree_add_uint_format(nvtree, hf_nds_uint32value, tvb, voffset,
2967 4, value4, "Privileges %8x", value4);
2968 voffset = voffset+4;
2969 voffset += align_4(tvb, voffset);
2971 case 0x00000013: /* Time Stamp */
2972 value1 = tvb_get_letohl(tvb, voffset); /* Seconds */
2973 proto_tree_add_uint_format(nvtree, hf_nds_uint32value, tvb, voffset,
2974 4, value1, "Lenght of Record: %d", value1);
2975 voffset = voffset+4;
2976 value2 = tvb_get_letohl(tvb, voffset);
2977 proto_tree_add_uint_format(nvtree, hf_nds_uint32value, tvb, voffset,
2978 4, value2, "Seconds: %d", value2);
2979 voffset = voffset + 4;
2980 rnum = tvb_get_letohs(tvb, voffset); /* replica number */
2981 proto_tree_add_uint_format(nvtree, hf_nds_rnum, tvb, voffset,
2982 2, rnum, "Replica Number: %d", rnum);
2983 voffset = voffset+2;
2984 revent = tvb_get_letohs(tvb, voffset); /* Event */
2985 proto_tree_add_uint_format(nvtree, hf_nds_revent, tvb, voffset,
2986 2, revent, "Event: %d", revent);
2987 voffset = voffset+2;
2988 voffset += align_4(tvb, voffset);
2990 case 0x00000017: /* Back Link */
2991 value1 = tvb_get_letohl(tvb, voffset); /* Length */
2992 proto_tree_add_uint_format(nvtree, hf_nds_uint32value, tvb, voffset,
2993 4, value1, "Length of Record %08x", value1);
2994 voffset = voffset+4;
2995 value2 = tvb_get_letohl(tvb, voffset); /* Remote ID */
2996 proto_tree_add_uint_format(nvtree, hf_nds_uint32value, tvb, voffset,
2997 4, value2, "Remote ID %08x", value2);
2998 voffset = voffset+4;
2999 value3 = tvb_get_letohl(tvb, voffset); /* Length of string */
3000 voffset = voffset+4;
3001 get_string(tvb, voffset, value3, vvalues->vstring);
3002 proto_tree_add_string_format(nvtree, hf_value_string, tvb, voffset,
3003 value3, vvalues->vstring,
3004 "Server Distinguished Name - %s", vvalues->vstring);
3005 voffset = voffset+value3;
3006 voffset += align_4(tvb, voffset);
3008 case 0x00000019: /* Typed Name */
3009 value1 = tvb_get_letohl(tvb, voffset); /* Length */
3010 proto_tree_add_uint_format(nvtree, hf_nds_uint32value, tvb, voffset,
3011 4, value1, "Length of Record %08x", value1);
3012 voffset = voffset+4;
3013 value2 = tvb_get_letohl(tvb, voffset); /* Level */
3014 proto_tree_add_uint_format(nvtree, hf_nds_uint32value, tvb, voffset,
3015 4, value2, "Level %d", value2);
3016 voffset = voffset+4;
3017 value3 = tvb_get_letohl(tvb, voffset); /* Interval */
3018 proto_tree_add_uint_format(nvtree, hf_nds_uint32value, tvb, voffset,
3019 4, value3, "Interval %d", value3);
3020 voffset = voffset+4;
3021 value4 = tvb_get_letohl(tvb, voffset); /* Distinguished Name */
3022 voffset = voffset+4;
3023 get_string(tvb, voffset, value4, vvalues->vstring);
3024 proto_tree_add_string_format(nvtree, hf_value_string, tvb, voffset,
3025 value4, vvalues->vstring,
3026 "Distinguished Name - %s", vvalues->vstring);
3027 voffset = voffset+value4;
3028 voffset += align_4(tvb, voffset);
3030 case 0x0000001a: /* Hold */
3031 value1 = tvb_get_letohl(tvb, voffset); /* Length */
3032 proto_tree_add_uint_format(nvtree, hf_nds_uint32value, tvb, voffset,
3033 4, value1, "Length of Record %08x", value1);
3034 voffset = voffset+4;
3035 value2 = tvb_get_letohl(tvb, voffset); /* Amount */
3036 proto_tree_add_uint_format(nvtree, hf_nds_uint32value, tvb, voffset,
3037 4, value2, "Amount %d", value2);
3038 voffset = voffset+4;
3039 value3 = tvb_get_letohl(tvb, voffset); /* Subject */
3040 voffset = voffset+4;
3041 get_string(tvb, voffset, value3, vvalues->vstring);
3042 proto_tree_add_string_format(nvtree, hf_value_string, tvb, voffset,
3043 value3, vvalues->vstring,
3044 "Subject - %s", vvalues->vstring);
3045 voffset = voffset+value3;
3046 voffset += align_4(tvb, voffset);
3048 case 0x00000001: /* Distinguished Name */
3049 case 0x00000002: /* Case Sensitive Unicode String */
3050 case 0x00000003: /* Non Case Sensitive Unicode String */
3051 case 0x00000004: /* Printable String */
3052 case 0x00000005: /* Numeric String */
3053 case 0x0000000a: /* Telephone Number */
3054 case 0x0000000e: /* Email Address */
3055 case 0x00000014: /* Class Name */
3057 value1 = tvb_get_letohl(tvb, voffset);
3058 voffset = voffset + 4;
3059 if (strcmp(vvalues->vstring, "zendmSearchOrder")==0) {
3060 get_string(tvb, voffset, value1, vvalues->vstring);
3061 if (strcmp(vvalues->vstring, "012")==0) {
3062 vvalues->vstring = "Value (012) = Object, Group, Container";
3064 if (strcmp(vvalues->vstring, "021")==0) {
3065 vvalues->vstring = "Value (021) = Object, Container, Group";
3067 if (strcmp(vvalues->vstring, "102")==0) {
3068 vvalues->vstring = "Value (102) = Group, Object, Container";
3070 if (strcmp(vvalues->vstring, "120")==0) {
3071 vvalues->vstring = "Value (120) = Group, Container, Object";
3073 if (strcmp(vvalues->vstring, "201")==0) {
3074 vvalues->vstring = "Value (201) = Container, Object, Group";
3076 if (strcmp(vvalues->vstring, "210")==0) {
3077 vvalues->vstring = "Value (210) = Container, Group, Object";
3082 get_string(tvb, voffset, value1, vvalues->vstring);
3084 proto_tree_add_string(nvtree, hf_value_string, tvb, voffset,
3085 value1, vvalues->vstring);
3086 voffset = voffset + value1;
3087 voffset += align_4(tvb, voffset);
3090 voffset += align_4(tvb, voffset);
3092 vvalues->voffset=voffset;
3097 print_es_type(proto_tree *estree, tvbuff_t *tvb, nds_val *values, guint32 vtype, guint32 ioffset)
3104 guint32 number_of_referrals;
3107 guint16 replica_num;
3110 proto_tree *nestree;
3111 proto_item *nesitem;
3114 const char *vstring="";
3116 strcpy(mval_buf.buffer, "");
3120 case 0: /* No Specifier Type */
3121 value1 = tvb_get_letohl(tvb, ioffset); /* ES Type */
3122 proto_tree_add_item(estree, hf_es_value, tvb, ioffset,
3124 ioffset = ioffset + 4;
3126 case 1: /* Unicode String */
3127 value1 = tvb_get_letohl(tvb, ioffset); /* Delimeter Set */
3128 ioffset = ioffset + 4;
3129 get_string(tvb, ioffset, value1, mval_buf.buffer);
3130 values->vstring = mval_buf.buffer;
3131 proto_tree_add_string_format(estree, hf_mv_string, tvb, ioffset,
3132 value1, values->vstring, "Delimeter ->%s", values->vstring);
3133 ioffset=ioffset + value1;
3134 ioffset += align_4(tvb, ioffset);
3135 value2 = tvb_get_letohl(tvb, ioffset);
3136 ioffset = ioffset + 4;
3137 get_string(tvb, ioffset, value2, mval_buf.buffer);
3138 values->vstring = mval_buf.buffer;
3139 proto_tree_add_string(estree, hf_mv_string, tvb, ioffset,
3140 value2, values->vstring);
3141 values->voffset=ioffset + value2;
3142 ioffset = values->voffset;
3143 ioffset += align_4(tvb, ioffset);
3146 value1 = tvb_get_letohl(tvb, ioffset); /* ES Type */
3147 vstring = match_strval(value1, es_type);
3148 if (vstring == NULL)
3150 vstring = "No ES Type Found";
3152 nesitem = proto_tree_add_string_format(estree, hf_es_type, tvb, ioffset,
3153 4, vstring, "Base Context Type - %s", vstring);
3154 nestree = proto_item_add_subtree(nesitem, ett_nds);
3155 ioffset = ioffset + 4;
3158 case 0: /* No Specifier Type */
3159 value2 = tvb_get_letohl(tvb, ioffset); /* ES Type */
3160 proto_tree_add_item(nestree, hf_es_value, tvb, ioffset,
3162 ioffset = ioffset + 4;
3164 case 1: /* Unicode String */
3165 value2 = tvb_get_letohl(tvb, ioffset); /* Delimeter Set */
3166 ioffset = ioffset + 4;
3167 get_string(tvb, ioffset, value2, mval_buf.buffer);
3168 values->vstring = mval_buf.buffer;
3169 proto_tree_add_string_format(nestree, hf_mv_string, tvb, ioffset,
3170 value2, values->vstring, "Delimeter ->%s", values->vstring);
3171 ioffset=ioffset + value2;
3172 ioffset += align_4(tvb, ioffset);
3173 value3 = tvb_get_letohl(tvb, ioffset);
3174 ioffset = ioffset + 4;
3175 get_string(tvb, ioffset, value3, mval_buf.buffer);
3176 values->vstring = mval_buf.buffer;
3177 proto_tree_add_string(nestree, hf_mv_string, tvb, ioffset,
3178 value3, values->vstring);
3179 values->voffset=ioffset + value3;
3180 ioffset = values->voffset;
3181 ioffset += align_4(tvb, ioffset);
3185 case 3: /* Hinted */
3188 value2 = tvb_get_letohl(tvb, ioffset); /* Count */
3189 proto_tree_add_item(nestree, hf_es_rdn_count, tvb, ioffset,
3191 ioffset = ioffset + 4;
3192 for (r = 1 ; r <= value2; r++ )
3194 value3 = tvb_get_letohl(tvb, ioffset); /* Seconds */
3195 proto_tree_add_item(nestree, hf_es_seconds, tvb, ioffset,
3197 ioffset = ioffset + 4;
3198 replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */
3199 proto_tree_add_item(nestree, hf_nds_replica_num, tvb, ioffset,
3201 ioffset = ioffset + 2;
3202 event_num = tvb_get_letohs(tvb, ioffset); /* Event */
3203 proto_tree_add_item(nestree, hf_nds_event_num, tvb, ioffset,
3205 ioffset = ioffset + 2;
3207 value4 = tvb_get_letohl(tvb, ioffset); /* Delimeter Set */
3208 ioffset = ioffset + 4;
3209 get_string(tvb, ioffset, value4, mval_buf.buffer);
3210 values->vstring = mval_buf.buffer;
3211 proto_tree_add_string(nestree, hf_mv_string, tvb, ioffset,
3212 value4, values->vstring);
3213 ioffset=ioffset + value4;
3214 ioffset += align_4(tvb, ioffset);
3215 value5 = tvb_get_letohl(tvb, ioffset); /* RDN */
3216 ioffset = ioffset + 4;
3217 get_string(tvb, ioffset, value5, mval_buf.buffer);
3218 values->vstring = mval_buf.buffer;
3219 proto_tree_add_string(nestree, hf_rdn_string, tvb, ioffset,
3220 value5, values->vstring);
3221 ioffset=ioffset + value5;
3222 ioffset += align_4(tvb, ioffset);
3228 value1 = tvb_get_letohl(tvb, ioffset); /* ES Type */
3229 proto_tree_add_item(estree, hf_es_value, tvb, ioffset,
3231 ioffset = ioffset + 4;
3234 value1 = tvb_get_letohl(tvb, ioffset); /* ES Type */
3235 vstring = match_strval(value1, es_type);
3236 if (vstring == NULL)
3238 vstring = "No ES Type Found";
3240 nesitem = proto_tree_add_string_format(estree, hf_es_type, tvb, ioffset,
3241 4, vstring, "Object Name Type - %s", vstring);
3242 nestree = proto_item_add_subtree(nesitem, ett_nds);
3243 ioffset = ioffset + 4;
3246 case 0: /* No Specifier Type */
3247 value2 = tvb_get_letohl(tvb, ioffset); /* ES Type */
3248 proto_tree_add_item(estree, hf_es_value, tvb, ioffset,
3250 ioffset = ioffset + 4;
3252 case 1: /* Unicode String */
3253 value2 = tvb_get_letohl(tvb, ioffset); /* Delimeter Set */
3254 ioffset = ioffset + 4;
3255 get_string(tvb, ioffset, value2, mval_buf.buffer);
3256 values->vstring = mval_buf.buffer;
3257 proto_tree_add_string_format(estree, hf_mv_string, tvb, ioffset,
3258 value2, values->vstring, "Delimeter ->%s", values->vstring);
3259 ioffset=ioffset + value2;
3260 ioffset += align_4(tvb, ioffset);
3261 value3 = tvb_get_letohl(tvb, ioffset);
3262 ioffset = ioffset + 4;
3263 get_string(tvb, ioffset, value3, mval_buf.buffer);
3264 values->vstring = mval_buf.buffer;
3265 proto_tree_add_string(estree, hf_mv_string, tvb, ioffset,
3266 value3, values->vstring);
3267 values->voffset=ioffset + value3;
3268 ioffset = values->voffset;
3269 ioffset += align_4(tvb, ioffset);
3273 case 3: /* Hinted */
3276 value2 = tvb_get_letohl(tvb, ioffset); /* Count */
3277 proto_tree_add_item(estree, hf_es_rdn_count, tvb, ioffset,
3279 ioffset = ioffset + 4;
3280 for (r = 1 ; r <= value2; r++ )
3282 value3 = tvb_get_letohl(tvb, ioffset); /* Seconds */
3283 proto_tree_add_item(estree, hf_es_seconds, tvb, ioffset,
3285 ioffset = ioffset + 4;
3286 replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */
3287 proto_tree_add_item(estree, hf_nds_replica_num, tvb, ioffset,
3289 ioffset = ioffset + 2;
3290 event_num = tvb_get_letohs(tvb, ioffset); /* Event */
3291 proto_tree_add_item(estree, hf_nds_event_num, tvb, ioffset,
3293 ioffset = ioffset + 2;
3295 value4 = tvb_get_letohl(tvb, ioffset); /* Delimeter Set */
3296 ioffset = ioffset + 4;
3297 get_string(tvb, ioffset, value4, mval_buf.buffer);
3298 values->vstring = mval_buf.buffer;
3299 proto_tree_add_string(estree, hf_mv_string, tvb, ioffset,
3300 value4, values->vstring);
3301 ioffset=ioffset + value4;
3302 ioffset += align_4(tvb, ioffset);
3303 value5 = tvb_get_letohl(tvb, ioffset); /* RDN */
3304 ioffset = ioffset + 4;
3305 get_string(tvb, ioffset, value5, mval_buf.buffer);
3306 values->vstring = mval_buf.buffer;
3307 proto_tree_add_string(estree, hf_rdn_string, tvb, ioffset,
3308 value5, values->vstring);
3309 ioffset=ioffset + value5;
3310 ioffset += align_4(tvb, ioffset);
3316 value1 = tvb_get_letohl(tvb, ioffset); /* ES Type */
3317 proto_tree_add_item(estree, hf_es_value, tvb, ioffset,
3319 ioffset = ioffset + 4;
3323 case 3: /* Hinted */
3324 number_of_referrals = tvb_get_letohl(tvb, ioffset);
3326 for (r = 1 ; r <= number_of_referrals; r++ )
3328 aitem = proto_tree_add_uint_format(estree, hf_referral_record, tvb, 6, 0,
3329 r, "NDS Referral Record #%u", r);
3330 atree = proto_item_add_subtree(aitem, ett_nds);
3332 value1 = tvb_get_letohl(tvb, ioffset);
3334 proto_tree_add_uint_format(atree, hf_referral_addcount, tvb, ioffset, 4,
3335 value1, "Number of Addresses in Referral - %d", value1);
3337 ioffset = ioffset + 4;
3338 for (i = 1 ; i <= value1; i++ )
3340 value2 = tvb_get_letohl(tvb, ioffset);
3341 values->vstring =(char *)match_strval(value2, nds_protocol_type);
3342 if (values->vstring == NULL)
3344 values->vstring="(Undefined Protocol)";
3346 proto_tree_add_uint_format(atree, hf_nds_uint32value, tvb, ioffset,
3347 4, value2, vstring, value2);
3348 ioffset = ioffset+4;
3349 value3 = tvb_get_letohl(tvb, ioffset);
3350 ioffset = ioffset+4;
3354 proto_tree_add_item(atree, hf_nds_net, tvb, ioffset, 4, FALSE);
3355 proto_tree_add_item(atree, hf_nds_node, tvb, ioffset+4, 6, FALSE);
3356 proto_tree_add_item(atree, hf_nds_socket, tvb, ioffset+10, 2, FALSE);
3359 proto_tree_add_item(atree, hf_nds_port, tvb, ioffset, 2, FALSE);
3360 proto_tree_add_item(atree, hf_add_ref_ip, tvb, ioffset+2, 4, FALSE);
3363 proto_tree_add_item(atree, hf_nds_port, tvb, ioffset, 2, FALSE);
3364 proto_tree_add_item(atree, hf_add_ref_udp, tvb, ioffset+2, 4, FALSE);
3367 proto_tree_add_item(atree, hf_nds_port, tvb, ioffset, 2, FALSE);
3368 proto_tree_add_item(atree, hf_add_ref_tcp, tvb, ioffset+2, 4, FALSE);
3371 get_string(tvb, ioffset, value3, values->vstring);
3372 proto_tree_add_string(atree, hf_value_string, tvb, ioffset,
3373 value3, values->vstring);
3378 ioffset = ioffset + value3;
3379 ioffset += align_4(tvb, ioffset);
3383 value1 = tvb_get_letohl(tvb, ioffset); /* ES Type */
3384 vstring = match_strval(value1, es_type);
3385 if (vstring == NULL)
3387 vstring = "No ES Type Found";
3389 nesitem = proto_tree_add_string_format(estree, hf_es_type, tvb, ioffset,
3390 4, vstring, "Object Name Type - %s", vstring);
3391 nestree = proto_item_add_subtree(nesitem, ett_nds);
3392 ioffset = ioffset + 4;
3395 case 0: /* No Specifier Type */
3396 value2 = tvb_get_letohl(tvb, ioffset); /* ES Type */
3397 proto_tree_add_item(estree, hf_es_value, tvb, ioffset,
3399 ioffset = ioffset + 4;
3401 case 1: /* Unicode String */
3402 value2 = tvb_get_letohl(tvb, ioffset); /* Delimeter Set */
3403 ioffset = ioffset + 4;
3404 get_string(tvb, ioffset, value2, mval_buf.buffer);
3405 values->vstring = mval_buf.buffer;
3406 proto_tree_add_string_format(estree, hf_mv_string, tvb, ioffset,
3407 value2, values->vstring, "Delimeter ->%s", values->vstring);
3408 ioffset=ioffset + value2;
3409 ioffset += align_4(tvb, ioffset);
3410 value3 = tvb_get_letohl(tvb, ioffset);
3411 ioffset = ioffset + 4;
3412 get_string(tvb, ioffset, value3, mval_buf.buffer);
3413 values->vstring = mval_buf.buffer;
3414 proto_tree_add_string(estree, hf_mv_string, tvb, ioffset,
3415 value3, values->vstring);
3416 values->voffset=ioffset + value3;
3417 ioffset = values->voffset;
3418 ioffset += align_4(tvb, ioffset);
3422 case 3: /* Hinted */
3425 value2 = tvb_get_letohl(tvb, ioffset); /* Count */
3426 proto_tree_add_item(estree, hf_es_rdn_count, tvb, ioffset,
3428 ioffset = ioffset + 4;
3429 for (r = 1 ; r <= value2; r++ )
3431 value3 = tvb_get_letohl(tvb, ioffset); /* Seconds */
3432 proto_tree_add_item(estree, hf_es_seconds, tvb, ioffset,
3434 ioffset = ioffset + 4;
3435 replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */
3436 proto_tree_add_item(estree, hf_nds_replica_num, tvb, ioffset,
3438 ioffset = ioffset + 2;
3439 event_num = tvb_get_letohs(tvb, ioffset); /* Event */
3440 proto_tree_add_item(estree, hf_nds_event_num, tvb, ioffset,
3442 ioffset = ioffset + 2;
3444 value4 = tvb_get_letohl(tvb, ioffset); /* Delimeter Set */
3445 ioffset = ioffset + 4;
3446 get_string(tvb, ioffset, value4, mval_buf.buffer);
3447 values->vstring = mval_buf.buffer;
3448 proto_tree_add_string(estree, hf_mv_string, tvb, ioffset,
3449 value4, values->vstring);
3450 ioffset=ioffset + value4;
3451 ioffset += align_4(tvb, ioffset);
3452 value5 = tvb_get_letohl(tvb, ioffset); /* RDN */
3453 ioffset = ioffset + 4;
3454 get_string(tvb, ioffset, value5, mval_buf.buffer);
3455 values->vstring = mval_buf.buffer;
3456 proto_tree_add_string(estree, hf_rdn_string, tvb, ioffset,
3457 value5, values->vstring);
3458 ioffset=ioffset + value5;
3459 ioffset += align_4(tvb, ioffset);
3465 value1 = tvb_get_letohl(tvb, ioffset); /* ES Type */
3466 proto_tree_add_item(estree, hf_es_value, tvb, ioffset,
3468 ioffset = ioffset + 4;
3473 value1 = tvb_get_letohl(tvb, ioffset); /* Count */
3474 proto_tree_add_item(estree, hf_es_rdn_count, tvb, ioffset,
3476 ioffset = ioffset + 4;
3477 for (r = 1 ; r <= value1; r++ )
3479 value2 = tvb_get_letohl(tvb, ioffset); /* Seconds */
3480 proto_tree_add_item(estree, hf_es_seconds, tvb, ioffset,
3482 ioffset = ioffset + 4;
3483 replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */
3484 proto_tree_add_item(estree, hf_nds_replica_num, tvb, ioffset,
3486 ioffset = ioffset + 2;
3487 event_num = tvb_get_letohs(tvb, ioffset); /* Event */
3488 proto_tree_add_item(estree, hf_nds_event_num, tvb, ioffset,
3490 ioffset = ioffset + 2;
3492 value3 = tvb_get_letohl(tvb, ioffset); /* Delimeter Set */
3493 ioffset = ioffset + 4;
3494 get_string(tvb, ioffset, value3, mval_buf.buffer);
3495 values->vstring = mval_buf.buffer;
3496 proto_tree_add_string(estree, hf_mv_string, tvb, ioffset,
3497 value3, values->vstring);
3498 ioffset=ioffset + value3;
3499 ioffset += align_4(tvb, ioffset);
3500 value4 = tvb_get_letohl(tvb, ioffset); /* RDN */
3501 ioffset = ioffset + 4;
3502 get_string(tvb, ioffset, value4, mval_buf.buffer);
3503 values->vstring = mval_buf.buffer;
3504 proto_tree_add_string(estree, hf_rdn_string, tvb, ioffset,
3505 value4, values->vstring);
3506 ioffset=ioffset + value4;
3507 ioffset += align_4(tvb, ioffset);
3513 value1 = tvb_get_letohl(tvb, ioffset); /* ES Type */
3514 proto_tree_add_item(estree, hf_es_value, tvb, ioffset,
3516 ioffset = ioffset + 4;
3523 process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
3527 guint32 ioffset = 0, oldioffset;
3535 const char *valuestr = "";
3540 guint32 number_of_referrals = 0;
3544 guint16 replica_num = 0;
3545 guint16 event_num = 0;
3547 nds_val temp_values;
3548 proto_tree *sub1tree;
3549 proto_item *sub1item;
3550 proto_tree *sub2tree;
3551 proto_item *sub2item;
3552 gint length_remaining;
3554 strcpy(mval_buf.buffer, "");
3555 strcpy(mv_resolve_name_string, "");
3557 if(values->mvtype != MVTYPE_LIST_PARTITIONS)
3559 nitem = proto_tree_add_uint_format(ncp_tree, values->hfname, tvb, values->voffset+ioffset,
3560 values->vlength, values->vvalue, values->vdesc, values->vvalue);
3564 nitem = proto_tree_add_string_format(ncp_tree, values->hfname, tvb, values->voffset+ioffset,
3565 values->vlength, values->vdesc, "%s", values->vdesc);
3567 ioffset = (values->voffset+4);
3569 ntree = proto_item_add_subtree(nitem, ett_nds);
3571 switch (values->mvtype)
3573 case MVTYPE_ATTR_REQUEST: /* Attribute Request */
3574 for (i = 1 ; i <= values->vvalue; i++ )
3576 ioffset += align_4(tvb, ioffset);
3577 value1 = tvb_get_letohl(tvb, ioffset);
3578 ioffset = ioffset + 4;
3579 get_string(tvb, ioffset, value1, mval_buf.buffer);
3580 values->vstring = mval_buf.buffer;
3581 proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset,
3582 value1, values->vstring);
3583 ioffset = ioffset + value1;
3587 case MVTYPE_ATTR_REPLY: /* Attribute Reply */
3588 switch(values->vflags)
3591 for (i = 1 ; i <= values->vvalue; i++ )
3593 ioffset += align_4(tvb, ioffset);
3594 value1 = tvb_get_letohl(tvb, ioffset);
3595 ioffset = ioffset + 4;
3596 get_string(tvb, ioffset, value1, mval_buf.buffer);
3597 values->vstring = mval_buf.buffer;
3598 proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset,
3599 value1, values->vstring);
3600 ioffset = ioffset + value1;
3604 for (i = 1 ; i <= values->vvalue; i++ )
3606 value1 = tvb_get_letohl(tvb, ioffset);
3607 values->vstring = (char *)match_strval(value1, nds_syntax);
3608 if (values->vstring == NULL)
3610 values->vstring = "No Syntax Found";
3612 proto_tree_add_string(ntree, hf_nds_syntax, tvb, ioffset,
3613 4, values->vstring);
3614 ioffset = ioffset + 4;
3615 value2 = tvb_get_letohl(tvb, ioffset);
3616 ioffset = ioffset + 4;
3617 get_string(tvb, ioffset, value2, mval_buf.buffer);
3618 values->vstring = mval_buf.buffer;
3619 proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset,
3620 value2, values->vstring);
3622 ioffset += align_4(tvb, ioffset);
3623 values->voffset = ioffset;
3625 print_nds_values(ntree, tvb, value1, values);
3626 ioffset = values->voffset;
3630 for (i = 1 ; i <= values->vvalue; i++ )
3632 value1 = tvb_get_letohl(tvb, ioffset);
3633 values->vstring = (char *)match_strval(value1, nds_syntax);
3634 if (values->vstring == NULL)
3636 values->vstring = "No Syntax Found";
3638 proto_tree_add_string(ntree, hf_nds_syntax, tvb, ioffset,
3639 4, values->vstring);
3640 ioffset = ioffset + 4;
3641 value2 = tvb_get_letohl(tvb, ioffset);
3642 ioffset = ioffset + 4;
3643 get_string(tvb, ioffset, value2, mval_buf.buffer);
3644 values->vstring = mval_buf.buffer;
3645 proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset,
3646 value2, values->vstring);
3647 values->voffset=ioffset + value2;
3649 ioffset += align_4(tvb, ioffset);
3650 value3 = tvb_get_letohl(tvb, ioffset);
3652 proto_tree_add_uint_format(ntree, hf_nds_uint32value, tvb, ioffset, 4,
3653 value1, "Number of Values - %d", value1);
3655 ioffset = ioffset + 4;
3656 for (r = 1 ; r <= value3; r++ )
3658 ioffset += 4; /* Length = 4 */
3659 value4 = tvb_get_letohl(tvb, ioffset);
3660 tvb_ensure_bytes_exist(tvb, ioffset, values->vlength);
3661 proto_tree_add_uint(ntree, hf_nds_privileges, tvb, ioffset,
3662 values->vlength, value4);
3663 ioffset = ioffset+4;
3668 for (i = 1 ; i <= values->vvalue; i++ )
3670 value1 = tvb_get_letohl(tvb, ioffset);
3671 values->vstring = (char *)match_strval(value1, nds_syntax);
3672 if (values->vstring == NULL)
3674 values->vstring = "No Syntax Found";
3676 proto_tree_add_string(ntree, hf_nds_syntax, tvb, ioffset,
3677 4, values->vstring);
3678 ioffset = ioffset + 4;
3679 value2 = tvb_get_letohl(tvb, ioffset);
3680 ioffset = ioffset + 4;
3681 get_string(tvb, ioffset, value2, mval_buf.buffer);
3682 values->vstring = mval_buf.buffer;
3683 proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset,
3684 value2, values->vstring);
3685 ioffset = ioffset + value2;
3686 ioffset += align_4(tvb, ioffset);
3687 value3 = tvb_get_letohl(tvb, ioffset);
3689 aitem = proto_tree_add_uint_format(ntree, hf_nds_uint32value, tvb, ioffset, 4,
3690 value3, "Number of Values - %d", value3);
3692 atree = proto_item_add_subtree(aitem, ett_nds);
3694 ioffset = ioffset + 4;
3695 for (r = 1 ; r <= value3; r++ )
3697 ioffset += align_4(tvb, ioffset);
3698 temp_values.vvalue = tvb_get_letohl(tvb, ioffset);
3699 temp_values.vlength = 2;
3700 temp_values.hfname = hf_nds_vflags;
3701 temp_values.voffset = ioffset;
3702 temp_values.vdesc = "Value Flags";
3703 temp_values.bit1 = "Naming";
3704 temp_values.bit1hfname = hf_bit1vflags;
3705 temp_values.bit2 = "Base Class";
3706 temp_values.bit2hfname = hf_bit2vflags;
3707 temp_values.bit3 = "Present";
3708 temp_values.bit3hfname = hf_bit3vflags;
3709 temp_values.bit4 = "Value Damaged";
3710 temp_values.bit4hfname = hf_bit4vflags;
3711 temp_values.bit5 = "Not Defined";
3712 temp_values.bit5hfname = hf_bit5vflags;
3713 temp_values.bit6 = "Not Defined";
3714 temp_values.bit6hfname = hf_bit6vflags;
3715 temp_values.bit7 = "Not Defined";
3716 temp_values.bit7hfname = hf_bit7vflags;
3717 temp_values.bit8 = "Not Defined";
3718 temp_values.bit8hfname = hf_bit8vflags;
3719 temp_values.bit9 = "Not Defined";
3720 temp_values.bit9hfname = hf_bit9vflags;
3721 temp_values.bit10 = "Not Defined";
3722 temp_values.bit10hfname = hf_bit10vflags;
3723 temp_values.bit11 = "Not Defined";
3724 temp_values.bit11hfname = hf_bit11vflags;
3725 temp_values.bit12 = "Not Defined";
3726 temp_values.bit12hfname = hf_bit12vflags;
3727 temp_values.bit13 = "Not Defined";
3728 temp_values.bit13hfname = hf_bit13vflags;
3729 temp_values.bit14 = "Not Defined";
3730 temp_values.bit14hfname = hf_bit14vflags;
3731 temp_values.bit15 = "Not Defined";
3732 temp_values.bit15hfname = hf_bit15vflags;
3733 temp_values.bit16 = "Not Defined";
3734 temp_values.bit16hfname = hf_bit16vflags;
3735 process_bitfield(atree, tvb, &temp_values);
3736 ioffset = ioffset + 4;
3737 value4 = tvb_get_letohl(tvb, ioffset);
3738 proto_tree_add_uint_format(atree, hf_es_seconds, tvb, ioffset,
3739 4, value4, "Seconds %d", value4);
3740 ioffset = ioffset + 4;
3741 replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */
3742 proto_tree_add_item(atree, hf_nds_replica_num, tvb, ioffset,
3744 ioffset = ioffset + 2;
3745 event_num = tvb_get_letohs(tvb, ioffset); /* Event */
3746 proto_tree_add_item(atree, hf_nds_event_num, tvb, ioffset,
3748 ioffset = ioffset + 2;
3749 value5 = tvb_get_letohl(tvb, ioffset); /* length of field */
3750 if(value5 > tvb_length_remaining(tvb, ioffset))
3755 tvb_ensure_bytes_exist(tvb, ioffset, value5);
3756 proto_tree_add_bytes(atree, hf_value_bytes, tvb, ioffset, value5, tvb_get_ptr(tvb, ioffset, value5));
3758 ioffset += (value5%2);
3763 for (i = 1 ; i <= values->vvalue; i++ )
3765 value1 = tvb_get_letohl(tvb, ioffset);
3766 values->vstring = (char *)match_strval(value1, nds_syntax);
3767 if (values->vstring == NULL)
3769 values->vstring = "No Syntax Found";
3771 proto_tree_add_string(ntree, hf_nds_syntax, tvb, ioffset,
3772 4, values->vstring);
3773 ioffset = ioffset + 4;
3774 value2 = tvb_get_letohl(tvb, ioffset);
3775 ioffset = ioffset + 4;
3776 get_string(tvb, ioffset, value2, mval_buf.buffer);
3777 values->vstring = mval_buf.buffer;
3778 proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset,
3779 value2, values->vstring);
3780 ioffset = ioffset + value2;
3781 value3 = tvb_get_letohl(tvb, ioffset);
3783 proto_tree_add_uint_format(ntree, hf_nds_uint32value, tvb, ioffset, 4,
3784 value3, "Number of Values - %d", value3);
3786 ioffset = ioffset + 4;
3787 for (r = 1 ; r <= value3; r++ )
3789 ioffset += align_4(tvb, ioffset);
3790 temp_values.vvalue = tvb_get_letohl(tvb, ioffset);
3791 temp_values.vlength = 2;
3792 temp_values.hfname = hf_nds_vflags;
3793 temp_values.voffset = ioffset;
3794 temp_values.vdesc = "Value Flags";
3795 temp_values.bit1 = "Naming";
3796 temp_values.bit1hfname = hf_bit1vflags;
3797 temp_values.bit2 = "Base Class";
3798 temp_values.bit2hfname = hf_bit2vflags;
3799 temp_values.bit3 = "Present";
3800 temp_values.bit3hfname = hf_bit3vflags;
3801 temp_values.bit4 = "Value Damaged";
3802 temp_values.bit4hfname = hf_bit4vflags;
3803 temp_values.bit5 = "Not Defined";
3804 temp_values.bit5hfname = hf_bit5vflags;
3805 temp_values.bit6 = "Not Defined";
3806 temp_values.bit6hfname = hf_bit6vflags;
3807 temp_values.bit7 = "Not Defined";
3808 temp_values.bit7hfname = hf_bit7vflags;
3809 temp_values.bit8 = "Not Defined";
3810 temp_values.bit8hfname = hf_bit8vflags;
3811 temp_values.bit9 = "Not Defined";
3812 temp_values.bit9hfname = hf_bit9vflags;
3813 temp_values.bit10 = "Not Defined";
3814 temp_values.bit10hfname = hf_bit10vflags;
3815 temp_values.bit11 = "Not Defined";
3816 temp_values.bit11hfname = hf_bit11vflags;
3817 temp_values.bit12 = "Not Defined";
3818 temp_values.bit12hfname = hf_bit12vflags;
3819 temp_values.bit13 = "Not Defined";
3820 temp_values.bit13hfname = hf_bit13vflags;
3821 temp_values.bit14 = "Not Defined";
3822 temp_values.bit14hfname = hf_bit14vflags;
3823 temp_values.bit15 = "Not Defined";
3824 temp_values.bit15hfname = hf_bit15vflags;
3825 temp_values.bit16 = "Not Defined";
3826 temp_values.bit16hfname = hf_bit16vflags;
3827 process_bitfield(ntree, tvb, &temp_values);
3828 ioffset = ioffset + 4;
3829 value1 = tvb_get_letohl(tvb, ioffset);
3830 proto_tree_add_uint_format(ntree, hf_es_seconds, tvb, ioffset,
3831 4, value1, "Seconds %d", value1);
3832 ioffset = ioffset + 4;
3833 replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */
3834 proto_tree_add_item(ntree, hf_nds_replica_num, tvb, ioffset,
3836 ioffset = ioffset + 2;
3837 event_num = tvb_get_letohs(tvb, ioffset); /* Event */
3838 proto_tree_add_item(ntree, hf_nds_event_num, tvb, ioffset,
3840 ioffset = ioffset + 2;
3841 value1 = tvb_get_letohl(tvb, ioffset);
3842 proto_tree_add_uint(ntree, hf_nds_value_len, tvb, ioffset,
3844 ioffset = ioffset + 4;
3853 case MVTYPE_ATTR_REQUEST2: /* Attribute Request */
3855 for (i = 1 ; i <= values->vvalue; i++ )
3857 if (oldioffset >= ioffset) {
3858 proto_tree_add_text(ntree, tvb, 0, 0, "[ Invalid offset: %u ]", ioffset);
3859 THROW(ReportedBoundsError);
3861 oldioffset = ioffset;
3862 ioffset += align_4(tvb, ioffset);
3863 value1 = tvb_get_letohl(tvb, ioffset);
3864 proto_tree_add_uint_format(ntree, hf_nds_uint32value, tvb, ioffset,
3865 4, value1, "Value %d", value1);
3866 ioffset = ioffset + value1;
3870 case MVTYPE_ADD_ATTR_REQUEST: /* Add Attribute Request */
3871 for (i = 1 ; i <= values->vvalue; i++ )
3873 value1 = tvb_get_letohl(tvb, ioffset);
3874 ioffset = ioffset + 4;
3875 get_string(tvb, ioffset, value1, mval_buf.buffer);
3876 values->vstring = mval_buf.buffer;
3877 proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset,
3878 value1, values->vstring);
3879 ioffset = ioffset + value1;
3880 ioffset += align_4(tvb, ioffset);
3881 values->voffset = ioffset;
3882 print_nds_values(ntree, tvb, 9, values);
3883 ioffset = values->voffset;
3887 case MVTYPE_READ_CLASS_REQ: /* Read Class Request */
3888 for (i = 1 ; i <= values->vvalue; i++ )
3890 ioffset += align_4(tvb, ioffset);
3891 value1 = tvb_get_letohl(tvb, ioffset);
3892 ioffset = ioffset + 4;
3893 get_string(tvb, ioffset, value1, mval_buf.buffer);
3894 values->vstring = mval_buf.buffer;
3895 proto_tree_add_string(ntree, hf_nds_base, tvb, ioffset,
3896 value1, values->vstring);
3897 values->mvtype = MVTYPE_ATTR_REQUEST;
3898 ioffset = ioffset + value1;
3902 case MVTYPE_READ_REPLICAS: /* Read Replicas */
3903 for (i = 1 ; i <= values->vvalue; i++ )
3906 bvalue = 0x00000001;
3908 for (r = 0 ; r < 9; r++ )
3911 if (values->vflags & bvalue)
3915 case 0x00000001: /*p3values.bit1 = "Output Flags"*/
3916 temp_values.vvalue = tvb_get_letohl(tvb, ioffset);
3917 temp_values.vlength = 2;
3918 temp_values.hfname = hf_nds_rflags;
3919 temp_values.voffset = ioffset;
3920 temp_values.vdesc = "Output Flags";
3921 temp_values.bit1 = values->bit1;
3922 temp_values.bit1hfname = hf_bit1outflags;
3923 temp_values.bit2 = values->bit2;
3924 temp_values.bit2hfname = hf_bit2outflags;
3925 temp_values.bit3 = values->bit3;
3926 temp_values.bit3hfname = hf_bit3outflags;
3927 temp_values.bit4 = values->bit4;
3928 temp_values.bit4hfname = hf_bit4outflags;
3929 temp_values.bit5 = values->bit5;
3930 temp_values.bit5hfname = hf_bit5outflags;
3931 temp_values.bit6 = values->bit6;
3932 temp_values.bit6hfname = hf_bit6outflags;
3933 temp_values.bit7 = values->bit7;
3934 temp_values.bit7hfname = hf_bit7outflags;
3935 temp_values.bit8 = values->bit8;
3936 temp_values.bit8hfname = hf_bit8outflags;
3937 temp_values.bit9 = values->bit9;
3938 temp_values.bit9hfname = hf_bit9outflags;
3939 temp_values.bit10 = "Not Defined";
3940 temp_values.bit10hfname = hf_bit10outflags;
3941 temp_values.bit11 = "Not Defined";
3942 temp_values.bit11hfname = hf_bit11outflags;
3943 temp_values.bit12 = "Not Defined";
3944 temp_values.bit12hfname = hf_bit12outflags;
3945 temp_values.bit13 = "Not Defined";
3946 temp_values.bit13hfname = hf_bit13outflags;
3947 temp_values.bit14 = "Not Defined";
3948 temp_values.bit14hfname = hf_bit14outflags;
3949 temp_values.bit15 = "Not Defined";
3950 temp_values.bit15hfname = hf_bit15outflags;
3951 temp_values.bit16 = "Not Defined";
3952 temp_values.bit16hfname = hf_bit16outflags;
3953 process_bitfield(ntree, tvb, &temp_values);
3954 ioffset = ioffset + 4;
3956 case 0x00000002: /*p3values.bit2 = "Entry ID"*/
3957 value1 = tvb_get_letohl(tvb, ioffset);
3958 proto_tree_add_uint_format(ntree, hf_nds_eid, tvb, ioffset,
3959 4, value1, "Entry ID %08x", value1);
3960 ioffset = ioffset + 4;
3962 case 0x00000004: /*p3values.bit3 = "Replica State"*/
3963 value1 = tvb_get_letohl(tvb, ioffset);
3964 temp_values.vstring = (char *)match_strval(value1, nds_replica_state);
3965 if (temp_values.vstring == NULL)
3967 temp_values.vstring = "No Replica State Found";
3969 proto_tree_add_string(ntree, hf_replica_state, tvb, ioffset,
3970 4, temp_values.vstring);
3971 ioffset = ioffset + 4;
3973 case 0x0000008: /*p3values.bit4 = "Modification Timestamp"*/
3974 value1 = tvb_get_letohl(tvb, ioffset);
3975 proto_tree_add_uint_format(ntree, hf_es_seconds, tvb, ioffset,
3976 4, value1, "Seconds %d", value1);
3977 ioffset = ioffset + 4;
3978 replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */
3979 proto_tree_add_item(ntree, hf_nds_replica_num, tvb, ioffset,
3981 ioffset = ioffset + 2;
3982 event_num = tvb_get_letohs(tvb, ioffset); /* Event */
3983 proto_tree_add_item(ntree, hf_nds_event_num, tvb, ioffset,
3985 ioffset = ioffset + 2;
3987 case 0x00000010: /*p3values.bit5 = "Purge Time"*/
3988 value1 = tvb_get_letohl(tvb, ioffset);
3989 proto_tree_add_uint_format(ntree, hf_nds_purge, tvb, ioffset,
3990 4, value1, "Purge Time %d", value1);
3991 ioffset = ioffset + 4;
3993 case 0x00000020: /*p3values.bit6 = "Local Partition ID"*/
3994 value1 = tvb_get_letohl(tvb, ioffset);
3995 proto_tree_add_uint_format(ntree, hf_nds_local_partition, tvb, ioffset,
3996 4, value1, "Local Partition ID %08x", value1);
3997 ioffset = ioffset + 4;
3999 case 0x00000040: /*p3values.bit7 = "Distinguished Name"*/
4000 value1 = tvb_get_letohl(tvb, ioffset);
4001 ioffset = ioffset + 4;
4002 get_string(tvb, ioffset, value1, mval_buf.buffer);
4003 temp_values.vstring = mval_buf.buffer;
4004 proto_tree_add_string(ntree, hf_nds_name, tvb, ioffset,
4005 value1, temp_values.vstring);
4006 ioffset = ioffset + value1;
4008 case 0x00000080: /*p3values.bit8 = "Replica Type & State"*/
4009 value1 = tvb_get_letohl(tvb, ioffset);
4010 value2 = value1 & 0x00ff;
4011 temp_values.vstring = (char *)match_strval(value2, nds_replica_type);
4012 if (temp_values.vstring == NULL)
4014 temp_values.vstring = "No Replica Type Found";
4016 proto_tree_add_string(ntree, hf_replica_type, tvb, ioffset,
4017 4, temp_values.vstring);
4018 value3 = value1 & 0xff00;
4019 temp_values.vstring = (char *)match_strval(value3, nds_replica_state);
4020 if (temp_values.vstring == NULL)
4022 temp_values.vstring = "No Replica State Found";
4024 proto_tree_add_string(ntree, hf_replica_state, tvb, ioffset,
4025 4, temp_values.vstring);
4026 ioffset = ioffset + 4;
4028 case 0x00000100: /*p3values.bit9 = "Partition Busy"*/
4029 value1 = tvb_get_letohs(tvb, ioffset);
4030 proto_tree_add_boolean(ntree, hf_partition_busy, tvb, ioffset, 4, value1);
4039 ioffset += align_4(tvb, ioffset);
4040 if(tvb_length_remaining(tvb, ioffset) < 4 )
4045 if(tvb_length_remaining(tvb, ioffset) < 4 )
4052 case MVTYPE_MODIFY_ATTR_REQUEST: /* Modify Attribute Request */
4053 for (i = 0 ; i < values->vvalue; i++ )
4055 ioffset += align_4(tvb, ioffset);
4056 value1 = tvb_get_letohl(tvb, ioffset);
4057 valuestr = match_strval(value1, nds_kind_of_changes);
4058 if (valuestr == NULL)
4060 valuestr="(Kind Change Not Found)";
4062 tvb_ensure_bytes_exist(tvb, ioffset, values->vlength);
4063 proto_tree_add_uint_format(ntree, hf_nds_uint32value, tvb, ioffset,
4064 values->vlength, value1, valuestr, value1);
4065 ioffset = ioffset+4;
4066 value2 = tvb_get_letohl(tvb, ioffset);
4067 ioffset = ioffset + 4;
4068 get_string(tvb, ioffset, value2, mval_buf.buffer); /* Name of Attribute */
4069 temp_values.vstring = mval_buf.buffer;
4070 proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset,
4071 value2, temp_values.vstring);
4072 ioffset = ioffset + value2;
4073 ioffset += align_4(tvb, ioffset);
4074 if(value1 != 1 && value1 != 6)
4076 values->voffset = ioffset;
4077 print_nds_values(ntree, tvb, 9, values);
4078 ioffset = values->voffset;
4083 case MVTYPE_ADDR_REFERRAL_REQUEST: /* Address Referral Request */
4084 for (i = 0 ; i < values->vvalue; i++ )
4087 value1 = tvb_get_letohl(tvb, ioffset);
4088 valuestr = match_strval(value1, nds_protocol_type);
4089 if (valuestr == NULL)
4091 valuestr="(Undefined Protocol)";
4093 tvb_ensure_bytes_exist(tvb, ioffset, values->vlength);
4094 proto_tree_add_uint_format(ntree, hf_nds_uint32value, tvb, ioffset,
4095 values->vlength, value1, valuestr, value1);
4096 ioffset = ioffset+4;
4100 case MVTYPE_ADDR_REFERRAL_REPLY: /* Address Referral Reply */
4101 number_of_referrals = values->vvalue;
4103 for (r = 1 ; r <= number_of_referrals; r++ )
4105 aitem = proto_tree_add_uint_format(ntree, hf_referral_record, tvb, 6, 0,
4106 r, "NDS Referral Record #%u", r);
4107 atree = proto_item_add_subtree(aitem, ett_nds);
4109 value1 = tvb_get_letohl(tvb, ioffset);
4111 proto_tree_add_uint_format(atree, hf_referral_addcount, tvb, ioffset, 4,
4112 value1, "Number of Addresses in Referral - %d", value1);
4114 ioffset = ioffset + 4;
4115 for (i = 1 ; i <= value1; i++ )
4117 value2 = tvb_get_letohl(tvb, ioffset);
4118 valuestr = match_strval(value2, nds_protocol_type);
4119 if (valuestr == NULL)
4121 valuestr="(Undefined Protocol)";
4123 tvb_ensure_bytes_exist(tvb, ioffset, values->vlength);
4124 proto_tree_add_uint_format(atree, hf_nds_uint32value, tvb, ioffset,
4125 values->vlength, value2, valuestr, value2);
4126 ioffset = ioffset+4;
4127 value3 = tvb_get_letohl(tvb, ioffset);
4128 ioffset = ioffset+4;
4132 proto_tree_add_item(atree, hf_nds_net, tvb, ioffset, 4, FALSE);
4133 proto_tree_add_item(atree, hf_nds_node, tvb, ioffset+4, 6, FALSE);
4134 proto_tree_add_item(atree, hf_nds_socket, tvb, ioffset+10, 2, FALSE);
4137 proto_tree_add_item(atree, hf_nds_port, tvb, ioffset, 2, FALSE);
4138 proto_tree_add_item(atree, hf_add_ref_ip, tvb, ioffset+2, 4, FALSE);
4141 proto_tree_add_item(atree, hf_nds_port, tvb, ioffset, 2, FALSE);
4142 proto_tree_add_item(atree, hf_add_ref_udp, tvb, ioffset+2, 4, FALSE);
4145 proto_tree_add_item(atree, hf_nds_port, tvb, ioffset, 2, FALSE);
4146 proto_tree_add_item(atree, hf_add_ref_tcp, tvb, ioffset+2, 4, FALSE);
4149 get_string(tvb, ioffset, value3, values->vstring);
4150 proto_tree_add_string(atree, hf_value_string, tvb, ioffset,
4151 value3, values->vstring);
4156 ioffset = ioffset + value3;
4157 ioffset += align_4(tvb, ioffset);
4163 case MVTYPE_LOC_ADDR_REFERRAL_REPLY: /* Local Address Referral Reply */
4164 number_of_referrals = values->vvalue;
4166 for (r = 1 ; r <= number_of_referrals; r++ )
4168 aitem = proto_tree_add_uint_format(ntree, hf_referral_record, tvb, 6, 0,
4169 r, "NDS Referral Record #%u", r);
4170 atree = proto_item_add_subtree(aitem, ett_nds);
4172 value2 = tvb_get_letohl(tvb, ioffset);
4173 valuestr = match_strval(value2, nds_protocol_type);
4174 if (valuestr == NULL)
4176 valuestr="(Undefined Protocol)";
4178 tvb_ensure_bytes_exist(tvb, ioffset, values->vlength);
4179 proto_tree_add_uint_format(atree, hf_nds_uint32value, tvb, ioffset,
4180 values->vlength, value2, valuestr, value2);
4181 ioffset = ioffset+4;
4182 value3 = tvb_get_letohl(tvb, ioffset);
4183 ioffset = ioffset+4;
4188 proto_tree_add_item(atree, hf_nds_net, tvb, ioffset, 4, FALSE);
4189 proto_tree_add_item(atree, hf_nds_node, tvb, ioffset+4, 6, FALSE);
4190 proto_tree_add_item(atree, hf_nds_socket, tvb, ioffset+10, 2, FALSE);
4193 proto_tree_add_item(atree, hf_nds_port, tvb, ioffset, 2, FALSE);
4194 proto_tree_add_item(atree, hf_add_ref_ip, tvb, ioffset+2, 4, FALSE);
4197 proto_tree_add_item(atree, hf_nds_port, tvb, ioffset, 2, FALSE);
4198 proto_tree_add_item(atree, hf_add_ref_udp, tvb, ioffset+2, 4, FALSE);
4201 proto_tree_add_item(atree, hf_nds_port, tvb, ioffset, 2, FALSE);
4202 proto_tree_add_item(atree, hf_add_ref_tcp, tvb, ioffset+2, 4, FALSE);
4205 get_string(tvb, ioffset, value3, values->vstring);
4206 proto_tree_add_string(atree, hf_value_string, tvb, ioffset,
4207 value3, values->vstring);
4212 ioffset = ioffset + value3;
4213 ioffset += align_4(tvb, ioffset);
4217 case MVTYPE_PROC_ENTRY_SPECIFIERS: /* Process Entry Specifiers */
4218 value2 = tvb_get_letohl(tvb, ioffset); /* ES Type */
4219 values->vstring = (char *)match_strval(value2, es_type);
4220 if (values->vstring == NULL)
4222 values->vstring = "No ES Type Found";
4224 esitem = proto_tree_add_string_format(ntree, hf_es_type, tvb, ioffset,
4225 4, values->vstring, "Output Entry Specifier - %s", values->vstring);
4226 estree = proto_item_add_subtree(esitem, ett_nds);
4227 ioffset = ioffset + 4;
4228 ioffset = print_es_type(estree, tvb, values, value2, ioffset);
4229 value3 = tvb_get_letohl(tvb, ioffset); /* ES Type */
4230 values->vstring = (char *)match_strval(value3, es_type);
4231 if (values->vstring == NULL)
4233 values->vstring = "No ES Type Found";
4235 esitem = proto_tree_add_string_format(ntree, hf_es_type, tvb, ioffset,
4236 4, values->vstring, "Input Entry Specifier - %s", values->vstring);
4237 estree = proto_item_add_subtree(esitem, ett_nds);
4238 ioffset = ioffset + 4;
4239 ioffset = print_es_type(estree, tvb, values, value3, ioffset);
4240 /* values.vstring is being overwritten. So store the resolve name to a global value */
4241 strcpy(mv_resolve_name_string, values->vstring);
4242 value4 = tvb_get_letohl(tvb, ioffset);
4243 aitem = proto_tree_add_uint_format(ntree, hf_referral_record, tvb, ioffset, 4,
4244 value4, "Referral Protocols - %d", value4);
4245 atree = proto_item_add_subtree(aitem, ett_nds);
4247 for (i = 0 ; i < value4; i++ )
4249 value5 = tvb_get_letohl(tvb, ioffset);
4250 valuestr = match_strval(value5, nds_protocol_type);
4251 if (valuestr == NULL)
4253 valuestr="(Undefined Protocol)";
4255 proto_tree_add_string_format(atree, hf_value_string, tvb, ioffset,
4256 4, valuestr, "Protocol -> %s", valuestr);
4257 ioffset = ioffset+4;
4259 value6 = tvb_get_letohl(tvb, ioffset);
4260 aitem = proto_tree_add_uint_format(ntree, hf_referral_record, tvb, ioffset, 4,
4261 value6, "Tree Walking Protocols - %d", value6);
4262 atree = proto_item_add_subtree(aitem, ett_nds);
4264 for (i = 0 ; i < value6; i++ )
4266 value7 = tvb_get_letohl(tvb, ioffset);
4267 valuestr = match_strval(value7, nds_protocol_type);
4268 if (valuestr == NULL)
4270 valuestr="(Undefined Protocol)";
4272 proto_tree_add_string_format(atree, hf_value_string, tvb, ioffset,
4273 4, valuestr, "Protocol -> %s", valuestr);
4274 ioffset = ioffset+4;
4278 case MVTYPE_PRINT_TIMESTAMP: /* Print Timestamp */
4279 replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */
4280 proto_tree_add_item(ncp_tree, hf_nds_replica_num, tvb, ioffset,
4282 ioffset = ioffset + 2;
4283 event_num = tvb_get_letohs(tvb, ioffset); /* Event */
4284 proto_tree_add_item(ncp_tree, hf_nds_event_num, tvb, ioffset,
4286 ioffset = ioffset + 2;
4289 case MVTYPE_LIST_PARTITIONS: /* List Partitions */
4290 number_of_referrals = values->vvalue;
4291 /* A bad packet could put us in a tight loop so trap for anything
4292 * over 256 referals.
4294 if (number_of_referrals > 256) {
4295 proto_tree_add_text(ntree, tvb, 0, 0, "[ Bad referal at offset: %u ]", ioffset);
4296 THROW(ReportedBoundsError);
4299 for (i = 0; i < number_of_referrals; i++)
4301 bvalue = 0x00000001;
4303 for (r = 0 ; r < 32; r++ )
4305 oldioffset = ioffset;
4306 if (values->vflags & bvalue)
4310 case 0x00000001: /* Information Flags */
4311 temp_values.vvalue = tvb_get_letohs(tvb, ioffset);
4312 temp_values.vtype = VTYPE_BITFIELD;
4313 temp_values.vstring = mval_buf.buffer;
4314 temp_values.vdesc = "Information Flags (low) Byte:";
4315 temp_values.vlength = 2;
4316 temp_values.hfname= hf_nds_rflags;
4317 temp_values.voffset = ioffset;
4318 temp_values.bit1 = "Output Flags";
4319 temp_values.bit1hfname = hf_bit1infoflagsl;
4320 temp_values.bit2 = "Entry ID";
4321 temp_values.bit2hfname = hf_bit2infoflagsl;
4322 temp_values.bit3 = "Entry Flags";
4323 temp_values.bit3hfname = hf_bit3infoflagsl;
4324 temp_values.bit4 = "Subordinate Count";
4325 temp_values.bit4hfname = hf_bit4infoflagsl;
4326 temp_values.bit5 = "Modification Time";
4327 temp_values.bit5hfname = hf_bit5infoflagsl;
4328 temp_values.bit6 = "Modification Timestamp";
4329 temp_values.bit6hfname = hf_bit6infoflagsl;
4330 temp_values.bit7 = "Creation Timestamp";
4331 temp_values.bit7hfname = hf_bit7infoflagsl;
4332 temp_values.bit8 = "Partition Root ID";
4333 temp_values.bit8hfname = hf_bit8infoflagsl;
4334 temp_values.bit9 = "Parent ID";
4335 temp_values.bit9hfname = hf_bit9infoflagsl;
4336 temp_values.bit10 = "Revision Count";
4337 temp_values.bit10hfname = hf_bit10infoflagsl;
4338 temp_values.bit11 = "Replica Type";
4339 temp_values.bit11hfname = hf_bit11infoflagsl;
4340 temp_values.bit12 = "Base Class";
4341 temp_values.bit12hfname = hf_bit12infoflagsl;
4342 temp_values.bit13 = "Relative Distinguished Name";
4343 temp_values.bit13hfname = hf_bit13infoflagsl;
4344 temp_values.bit14 = "Distinguished Name";
4345 temp_values.bit14hfname = hf_bit14infoflagsl;
4346 temp_values.bit15 = "Root Distinguished Name";
4347 temp_values.bit15hfname = hf_bit15infoflagsl;
4348 temp_values.bit16 = "Parent Distinguished Name";
4349 temp_values.bit16hfname = hf_bit16infoflagsl;
4350 process_bitfield(ntree, tvb, &temp_values);
4351 ioffset = ioffset+2;
4352 temp_values.vvalue = tvb_get_letohs(tvb, ioffset);
4353 temp_values.vtype = VTYPE_BITFIELD;
4354 temp_values.vstring = mval_buf.buffer;
4355 temp_values.vdesc = "Information Flags (high) Byte:";
4356 temp_values.vlength = 2;
4357 temp_values.hfname= hf_nds_rflags;
4358 temp_values.voffset = ioffset;
4359 temp_values.bit1 = "Purge Time";
4360 temp_values.bit1hfname = hf_bit1infoflagsh;
4361 temp_values.bit2 = "Dereference Base Class";
4362 temp_values.bit2hfname = hf_bit2infoflagsh;
4363 temp_values.bit3 = "Not Defined";
4364 temp_values.bit3hfname = hf_bit3infoflagsh;
4365 temp_values.bit4 = "Not Defined";
4366 temp_values.bit4hfname = hf_bit4infoflagsh;
4367 temp_values.bit5 = "Not Defined";
4368 temp_values.bit5hfname = hf_bit5infoflagsh;
4369 temp_values.bit6 = "Not Defined";
4370 temp_values.bit6hfname = hf_bit6infoflagsh;
4371 temp_values.bit7 = "Not Defined";
4372 temp_values.bit7hfname = hf_bit7infoflagsh;
4373 temp_values.bit8 = "Not Defined";
4374 temp_values.bit8hfname = hf_bit8infoflagsh;
4375 temp_values.bit9 = "Not Defined";
4376 temp_values.bit9hfname = hf_bit9infoflagsh;
4377 temp_values.bit10 = "Not Defined";
4378 temp_values.bit10hfname = hf_bit10infoflagsh;
4379 temp_values.bit11 = "Not Defined";
4380 temp_values.bit11hfname = hf_bit11infoflagsh;
4381 temp_values.bit12 = "Not Defined";
4382 temp_values.bit12hfname = hf_bit12infoflagsh;
4383 temp_values.bit13 = "Not Defined";
4384 temp_values.bit13hfname = hf_bit13infoflagsh;
4385 temp_values.bit14 = "Not Defined";
4386 temp_values.bit14hfname = hf_bit14infoflagsh;
4387 temp_values.bit15 = "Not Defined";
4388 temp_values.bit15hfname = hf_bit15infoflagsh;
4389 temp_values.bit16 = "Not Defined";
4390 temp_values.bit16hfname = hf_bit16infoflagsh;
4391 process_bitfield(ntree, tvb, &temp_values);
4392 ioffset = ioffset+2;
4394 case 0x00000002: /* Entry ID */
4395 value1 = tvb_get_letohl(tvb, ioffset);
4396 proto_tree_add_uint_format(ntree, hf_nds_eid, tvb, ioffset,
4397 4, value1, "Entry ID %08x", value1);
4398 ioffset = ioffset + 4;
4400 case 0x00000004: /* Entry Flags */
4401 temp_values.vvalue = tvb_get_letohl(tvb, ioffset);
4402 temp_values.vtype = VTYPE_BITFIELD;
4403 temp_values.vstring = mval_buf.buffer;
4404 temp_values.vdesc = "Entry Flags:";
4405 temp_values.vlength = 2;
4406 temp_values.hfname= hf_nds_eflags;
4407 temp_values.voffset = ioffset;
4408 temp_values.bit1 = "Alias Entry";
4409 temp_values.bit1hfname = hf_bit1eflags;
4410 temp_values.bit2 = "Partition Root";
4411 temp_values.bit2hfname = hf_bit2eflags;
4412 temp_values.bit3 = "Container Entry";
4413 temp_values.bit3hfname = hf_bit3eflags;
4414 temp_values.bit4 = "Container Alias";
4415 temp_values.bit4hfname = hf_bit4eflags;
4416 temp_values.bit5 = "Matches List Filter";
4417 temp_values.bit5hfname = hf_bit5eflags;
4418 temp_values.bit6 = "Reference Entry";
4419 temp_values.bit6hfname = hf_bit6eflags;
4420 temp_values.bit7 = "40x Reference Entry";
4421 temp_values.bit7hfname = hf_bit7eflags;
4422 temp_values.bit8 = "Back Linked";
4423 temp_values.bit8hfname = hf_bit8eflags;
4424 temp_values.bit9 = "New Entry";
4425 temp_values.bit9hfname = hf_bit9eflags;
4426 temp_values.bit10 = "Temporary Reference";
4427 temp_values.bit10hfname = hf_bit10eflags;
4428 temp_values.bit11 = "Audited";
4429 temp_values.bit11hfname = hf_bit11eflags;
4430 temp_values.bit12 = "Entry Not Present";
4431 temp_values.bit12hfname = hf_bit12eflags;
4432 temp_values.bit13 = "Entry Verify CTS";
4433 temp_values.bit13hfname = hf_bit13eflags;
4434 temp_values.bit14 = "Entry Damaged";
4435 temp_values.bit14hfname = hf_bit14eflags;
4436 temp_values.bit15 = "Not Defined";
4437 temp_values.bit15hfname = hf_bit15eflags;
4438 temp_values.bit16 = "Not Defined";
4439 temp_values.bit16hfname = hf_bit16eflags;
4440 process_bitfield(ntree, tvb, &temp_values);
4441 ioffset = ioffset+4;
4443 case 0x0000008: /* Subordinate Count */
4444 value1 = tvb_get_letohl(tvb, ioffset);
4445 proto_tree_add_uint_format(ntree, hf_sub_count, tvb, ioffset,
4446 4, value1, "Subordinate Count %d", value1);
4447 ioffset = ioffset + 4;
4449 case 0x0000010: /* Modification Time */
4450 value1 = tvb_get_letohl(tvb, ioffset);
4451 proto_tree_add_uint_format(ntree, hf_es_seconds, tvb, ioffset,
4452 4, value1, "Modification Time in Seconds %d", value1);
4453 ioffset = ioffset + 4;
4455 case 0x0000020: /* Modification Timestamp */
4456 value1 = tvb_get_letohl(tvb, ioffset);
4457 proto_tree_add_uint_format(ntree, hf_es_seconds, tvb, ioffset,
4458 4, value1, "Modification Timestamp Seconds %d", value1);
4459 ioffset = ioffset + 4;
4460 replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */
4461 proto_tree_add_item(ntree, hf_nds_replica_num, tvb, ioffset,
4463 ioffset = ioffset + 2;
4464 event_num = tvb_get_letohs(tvb, ioffset); /* Event */
4465 proto_tree_add_item(ntree, hf_nds_event_num, tvb, ioffset,
4467 ioffset = ioffset + 2;
4469 case 0x0000040: /* Creation Timestamp */
4470 value1 = tvb_get_letohl(tvb, ioffset);
4471 proto_tree_add_uint_format(ntree, hf_es_seconds, tvb, ioffset,
4472 4, value1, "Creation Timestamp Seconds %d", value1);
4473 ioffset = ioffset + 4;
4474 replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */
4475 proto_tree_add_item(ntree, hf_nds_replica_num, tvb, ioffset,
4477 ioffset = ioffset + 2;
4478 event_num = tvb_get_letohs(tvb, ioffset); /* Event */
4479 proto_tree_add_item(ntree, hf_nds_event_num, tvb, ioffset,
4481 ioffset = ioffset + 2;
4483 case 0x00000080: /* Partition Root ID */
4484 value1 = tvb_get_letohl(tvb, ioffset);
4485 proto_tree_add_uint_format(ntree, hf_nds_partition_root_id, tvb, ioffset,
4486 4, value1, "Partition Root ID %08x", value1);
4487 ioffset = ioffset + 4;
4489 case 0x00000100: /* Parent ID */
4490 value1 = tvb_get_letohl(tvb, ioffset);
4491 proto_tree_add_uint_format(ntree, hf_nds_parent, tvb, ioffset,
4492 4, value1, "Parent ID %08x", value1);
4493 ioffset = ioffset + 4;
4495 case 0x00000200: /* Revision Count */
4496 value1 = tvb_get_letohl(tvb, ioffset);
4497 proto_tree_add_uint_format(ntree, hf_nds_revision, tvb, ioffset,
4498 4, value1, "Revision Count %d", value1);
4499 ioffset = ioffset + 4;
4501 case 0x00000400: /* Replica Type & State */
4502 value1 = tvb_get_letohl(tvb, ioffset);
4503 value2 = value1 & 0x00ff;
4504 temp_values.vstring = (char *)match_strval(value2, nds_replica_type);
4505 if (temp_values.vstring == NULL)
4507 temp_values.vstring = "No Replica Type Found";
4509 proto_tree_add_string(ntree, hf_replica_type, tvb, ioffset,
4510 4, temp_values.vstring);
4511 value3 = value1 & 0xff00;
4512 temp_values.vstring = (char *)match_strval(value3, nds_replica_state);
4513 if (temp_values.vstring == NULL)
4515 temp_values.vstring = "No Replica State Found";
4517 proto_tree_add_string(ntree, hf_replica_state, tvb, ioffset,
4518 4, temp_values.vstring);
4519 ioffset = ioffset + 4;
4521 case 0x00000800: /* Base Class */
4522 value1 = tvb_get_letohl(tvb, ioffset);
4523 ioffset = ioffset + 4;
4524 get_string(tvb, ioffset, value1, mval_buf.buffer);
4525 temp_values.vstring = mval_buf.buffer;
4526 proto_tree_add_string(ntree, hf_nds_base, tvb, ioffset,
4527 value1, temp_values.vstring);
4528 ioffset = ioffset + value1;
4530 case 0x00001000: /* Relative Distinguished Name */
4531 value1 = tvb_get_letohl(tvb, ioffset);
4532 ioffset = ioffset + 4;
4533 get_string(tvb, ioffset, value1, mval_buf.buffer);
4534 temp_values.vstring = mval_buf.buffer;
4535 proto_tree_add_string(ntree, hf_nds_relative_dn, tvb, ioffset,
4536 value1, temp_values.vstring);
4537 ioffset = ioffset + value1;
4539 case 0x00002000: /* Distinguished Name */
4540 value1 = tvb_get_letohl(tvb, ioffset);
4541 ioffset = ioffset + 4;
4542 get_string(tvb, ioffset, value1, mval_buf.buffer);
4543 temp_values.vstring = mval_buf.buffer;
4544 proto_tree_add_string(ntree, hf_nds_name, tvb, ioffset,
4545 value1, temp_values.vstring);
4546 ioffset = ioffset + value1;
4548 case 0x00004000: /* Root Distinguished Name */
4549 value1 = tvb_get_letohl(tvb, ioffset);
4550 ioffset = ioffset + 4;
4551 get_string(tvb, ioffset, value1, mval_buf.buffer);
4552 temp_values.vstring = mval_buf.buffer;
4553 proto_tree_add_string(ntree, hf_nds_name, tvb, ioffset,
4554 value1, temp_values.vstring);
4555 ioffset = ioffset + value1;
4557 case 0x00008000: /* Parent Distinguished Name */
4558 value1 = tvb_get_letohl(tvb, ioffset);
4559 ioffset = ioffset + 4;
4560 get_string(tvb, ioffset, value1, mval_buf.buffer);
4561 temp_values.vstring = mval_buf.buffer;
4562 proto_tree_add_string(ntree, hf_nds_name, tvb, ioffset,
4563 value1, temp_values.vstring);
4564 ioffset = ioffset + value1;
4566 case 0x00010000: /* Purge Time */
4567 value1 = tvb_get_letohl(tvb, ioffset);
4568 proto_tree_add_uint_format(ntree, hf_nds_purge, tvb, ioffset,
4569 4, value1, "Purge Time %d", value1);
4570 ioffset = ioffset + 4;
4572 case 0x00020000: /* Dereference Base Class */
4573 value1 = tvb_get_letohl(tvb, ioffset);
4574 ioffset = ioffset + 4;
4575 get_string(tvb, ioffset, value1, mval_buf.buffer);
4576 temp_values.vstring = mval_buf.buffer;
4577 proto_tree_add_string(ntree, hf_deref_base, tvb, ioffset,
4578 value1, temp_values.vstring);
4579 ioffset = ioffset + value1;
4585 ioffset += align_4(tvb, ioffset);
4588 /* We could loop forever so check to see if bvalue has wrapped to 0.
4589 * if so then just abort loop.
4594 if(tvb_length_remaining(tvb, ioffset) < 4 )
4599 if(tvb_length_remaining(tvb, ioffset) < 4 )
4606 case MVTYPE_CLASS_NAMES: /* Class Names */
4607 number_of_referrals = values->vvalue;
4608 for (i = 0; i < number_of_referrals; i++)
4610 ioffset += align_4(tvb, ioffset);
4611 value1 = tvb_get_letohl(tvb, ioffset);
4612 ioffset = ioffset + 4;
4613 get_string(tvb, ioffset, value1, mval_buf.buffer);
4614 temp_values.vstring = mval_buf.buffer;
4615 sub1item = proto_tree_add_string(ntree, hf_nds_base_class, tvb, ioffset,
4616 value1, temp_values.vstring);
4617 sub1tree = proto_item_add_subtree(sub1item, ett_nds);
4618 ioffset = ioffset + value1;
4619 ioffset += align_4(tvb, ioffset);
4620 if(values->vflags != 0)
4622 temp_values.vvalue = tvb_get_letohl(tvb, ioffset);
4623 temp_values.vtype = VTYPE_BITFIELD;
4624 temp_values.vstring = mval_buf.buffer;
4625 temp_values.vdesc = "Class Flags:";
4626 temp_values.vlength = 2;
4627 temp_values.hfname= hf_nds_cflags;
4628 temp_values.voffset = ioffset;
4629 temp_values.bit1 = "Ambiguous Containment";
4630 temp_values.bit1hfname = hf_bit1cflags;
4631 temp_values.bit2 = "Ambiguous Naming";
4632 temp_values.bit2hfname = hf_bit2cflags;
4633 temp_values.bit3 = "Class Definition Cannot be Removed";
4634 temp_values.bit3hfname = hf_bit3cflags;
4635 temp_values.bit4 = "Effective Class";
4636 temp_values.bit4hfname = hf_bit4cflags;
4637 temp_values.bit5 = "Container Class";
4638 temp_values.bit5hfname = hf_bit5cflags;
4639 temp_values.bit6 = "Not Defined";
4640 temp_values.bit6hfname = hf_bit6cflags;
4641 temp_values.bit7 = "Not Defined";
4642 temp_values.bit7hfname = hf_bit7cflags;
4643 temp_values.bit8 = "Not Defined";
4644 temp_values.bit8hfname = hf_bit8cflags;
4645 temp_values.bit9 = "Not Defined";
4646 temp_values.bit9hfname = hf_bit9cflags;
4647 temp_values.bit10 = "Not Defined";
4648 temp_values.bit10hfname = hf_bit10cflags;
4649 temp_values.bit11 = "Not Defined";
4650 temp_values.bit11hfname = hf_bit11cflags;
4651 temp_values.bit12 = "Not Defined";
4652 temp_values.bit12hfname = hf_bit12cflags;
4653 temp_values.bit13 = "Not Defined";
4654 temp_values.bit13hfname = hf_bit13cflags;
4655 temp_values.bit14 = "Not Defined";
4656 temp_values.bit14hfname = hf_bit14cflags;
4657 temp_values.bit15 = "Not Defined";
4658 temp_values.bit15hfname = hf_bit15cflags;
4659 temp_values.bit16 = "Not Defined";
4660 temp_values.bit16hfname = hf_bit16cflags;
4661 process_bitfield(sub1tree, tvb, &temp_values);
4662 ioffset = ioffset+4;
4663 if(values->vflags != 5)
4665 value1 = tvb_get_letohl(tvb, ioffset); /* length of field */
4666 length_remaining = tvb_length_remaining(tvb, ioffset);
4667 if(length_remaining == -1 || value1 > (guint32) length_remaining)
4672 tvb_ensure_bytes_exist(tvb, ioffset, value1);
4673 proto_tree_add_bytes(sub1tree, hf_nds_asn1, tvb, ioffset, value1, tvb_get_ptr(tvb, ioffset, value1));
4675 ioffset += (value1%2);
4677 if(values->vflags == 1 || values->vflags == 2 || values->vflags == 4)
4679 value1 = tvb_get_letohl(tvb, ioffset); /* Super Classes */
4680 sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4681 4, value1, "Super Classes %d", value1);
4682 sub2tree = proto_item_add_subtree(sub2item, ett_nds);
4683 ioffset = ioffset + 4;
4684 for (r = 0; r < value1; r++)
4686 value2 = tvb_get_letohl(tvb, ioffset);
4687 ioffset = ioffset + 4;
4688 get_string(tvb, ioffset, value2, mval_buf.buffer);
4689 temp_values.vstring = mval_buf.buffer;
4690 proto_tree_add_string(sub2tree, hf_nds_super, tvb, ioffset,
4691 value2, temp_values.vstring);
4692 ioffset = ioffset + value2;
4693 ioffset += align_4(tvb, ioffset);
4695 value1 = tvb_get_letohl(tvb, ioffset); /* Containment Classes */
4696 sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4697 4, value1, "Containment Classes %d", value1);
4698 sub2tree = proto_item_add_subtree(sub2item, ett_nds);
4699 ioffset = ioffset + 4;
4700 for (r = 0; r < value1; r++)
4702 value2 = tvb_get_letohl(tvb, ioffset);
4703 ioffset = ioffset + 4;
4704 get_string(tvb, ioffset, value2, mval_buf.buffer);
4705 temp_values.vstring = mval_buf.buffer;
4706 proto_tree_add_string(sub2tree, hf_nds_base_class, tvb, ioffset,
4707 value2, temp_values.vstring);
4708 ioffset = ioffset + value2;
4709 ioffset += align_4(tvb, ioffset);
4711 value1 = tvb_get_letohl(tvb, ioffset); /* Naming Attributes */
4712 sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4713 4, value1, "Naming Attributes %d", value1);
4714 sub2tree = proto_item_add_subtree(sub2item, ett_nds);
4715 ioffset = ioffset + 4;
4716 for (r = 0; r < value1; r++)
4718 value2 = tvb_get_letohl(tvb, ioffset);
4719 ioffset = ioffset + 4;
4720 get_string(tvb, ioffset, value2, mval_buf.buffer);
4721 temp_values.vstring = mval_buf.buffer;
4722 proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset,
4723 value2, temp_values.vstring);
4724 ioffset = ioffset + value2;
4725 ioffset += align_4(tvb, ioffset);
4727 value1 = tvb_get_letohl(tvb, ioffset); /* Mandatory Attributes */
4728 sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4729 4, value1, "Mandatory Attributes %d", value1);
4730 sub2tree = proto_item_add_subtree(sub2item, ett_nds);
4731 ioffset = ioffset + 4;
4732 for (r = 0; r < value1; r++)
4734 value2 = tvb_get_letohl(tvb, ioffset);
4735 ioffset = ioffset + 4;
4736 get_string(tvb, ioffset, value2, mval_buf.buffer);
4737 temp_values.vstring = mval_buf.buffer;
4738 proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset,
4739 value2, temp_values.vstring);
4740 ioffset = ioffset + value2;
4741 ioffset += align_4(tvb, ioffset);
4743 value1 = tvb_get_letohl(tvb, ioffset); /* Optional Attributes */
4744 sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4745 4, value1, "Optional Attributes %d", value1);
4746 sub2tree = proto_item_add_subtree(sub2item, ett_nds);
4747 ioffset = ioffset + 4;
4748 for (r = 0; r < value1; r++)
4750 ioffset += align_4(tvb, ioffset);
4751 value2 = tvb_get_letohl(tvb, ioffset);
4752 ioffset = ioffset + 4;
4753 get_string(tvb, ioffset, value2, mval_buf.buffer);
4754 temp_values.vstring = mval_buf.buffer;
4755 proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset,
4756 value2, temp_values.vstring);
4757 ioffset = ioffset + value2;
4758 if(tvb_length_remaining(tvb, ioffset) < 4 )
4764 /*if(values->vflags == 2 || values->vflags == 4)*/ /* Class Definitions of Super Classes */
4765 if(values->vflags == 4) /* Class Definitions of Super Classes */
4767 value1 = tvb_get_letohl(tvb, ioffset); /* Containment Classes */
4768 sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4769 4, value1, "Containment Classes %d", value1);
4770 sub2tree = proto_item_add_subtree(sub2item, ett_nds);
4771 ioffset = ioffset + 4;
4772 for (r = 0; r < value1; r++)
4774 value2 = tvb_get_letohl(tvb, ioffset);
4775 ioffset = ioffset + 4;
4776 get_string(tvb, ioffset, value2, mval_buf.buffer);
4777 temp_values.vstring = mval_buf.buffer;
4778 proto_tree_add_string(sub2tree, hf_nds_base_class, tvb, ioffset,
4779 value2, temp_values.vstring);
4780 ioffset = ioffset + value2;
4781 ioffset += align_4(tvb, ioffset);
4783 value1 = tvb_get_letohl(tvb, ioffset); /* Naming Attributes */
4784 sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4785 4, value1, "Naming Attributes %d", value1);
4786 sub2tree = proto_item_add_subtree(sub2item, ett_nds);
4787 ioffset = ioffset + 4;
4788 for (r = 0; r < value1; r++)
4790 value2 = tvb_get_letohl(tvb, ioffset);
4791 ioffset = ioffset + 4;
4792 get_string(tvb, ioffset, value2, mval_buf.buffer);
4793 temp_values.vstring = mval_buf.buffer;
4794 proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset,
4795 value2, temp_values.vstring);
4796 ioffset = ioffset + value2;
4797 ioffset += align_4(tvb, ioffset);
4799 value1 = tvb_get_letohl(tvb, ioffset); /* Mandatory Attributes */
4800 sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4801 4, value1, "Mandatory Attributes %d", value1);
4802 sub2tree = proto_item_add_subtree(sub2item, ett_nds);
4803 ioffset = ioffset + 4;
4804 for (r = 0; r < value1; r++)
4806 value2 = tvb_get_letohl(tvb, ioffset);
4807 ioffset = ioffset + 4;
4808 get_string(tvb, ioffset, value2, mval_buf.buffer);
4809 temp_values.vstring = mval_buf.buffer;
4810 proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset,
4811 value2, temp_values.vstring);
4812 ioffset = ioffset + value2;
4813 ioffset += align_4(tvb, ioffset);
4815 value1 = tvb_get_letohl(tvb, ioffset); /* Optional Attributes */
4816 sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4817 4, value1, "Optional Attributes %d", value1);
4818 sub2tree = proto_item_add_subtree(sub2item, ett_nds);
4819 ioffset = ioffset + 4;
4820 for (r = 0; r < value1; r++)
4822 value2 = tvb_get_letohl(tvb, ioffset);
4823 ioffset = ioffset + 4;
4824 get_string(tvb, ioffset, value2, mval_buf.buffer);
4825 temp_values.vstring = mval_buf.buffer;
4826 proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset,
4827 value2, temp_values.vstring);
4828 ioffset = ioffset + value2;
4829 ioffset += align_4(tvb, ioffset);
4831 value1 = tvb_get_letohl(tvb, ioffset); /* Default ACL */
4832 proto_tree_add_uint_format(sub1tree, hf_nds_eid, tvb, ioffset,
4833 4, value1, "Default ACL %08x", value1);
4834 ioffset = ioffset + 4;
4835 if(tvb_length_remaining(tvb, ioffset) < 4 )
4840 if(values->vflags == 5) /* Base Class Definitions */
4842 value1 = tvb_get_letohl(tvb, ioffset); /* Creation Timestamp */
4843 proto_tree_add_uint_format(sub1tree, hf_es_seconds, tvb, ioffset,
4844 4, value1, "Creation Timestamp Seconds %d", value1);
4845 ioffset = ioffset + 4;
4846 replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */
4847 proto_tree_add_item(sub1tree, hf_nds_replica_num, tvb, ioffset,
4849 ioffset = ioffset + 2;
4850 event_num = tvb_get_letohs(tvb, ioffset); /* Event */
4851 proto_tree_add_item(sub1tree, hf_nds_event_num, tvb, ioffset,
4853 ioffset = ioffset + 2;
4854 value1 = tvb_get_letohl(tvb, ioffset); /* Modification Timestamp */
4855 proto_tree_add_uint_format(sub1tree, hf_es_seconds, tvb, ioffset,
4856 4, value1, "Modification Timestamp Seconds %d", value1);
4857 ioffset = ioffset + 4;
4858 replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */
4859 proto_tree_add_item(sub1tree, hf_nds_replica_num, tvb, ioffset,
4861 ioffset = ioffset + 2;
4862 event_num = tvb_get_letohs(tvb, ioffset); /* Event */
4863 proto_tree_add_item(sub1tree, hf_nds_event_num, tvb, ioffset,
4865 ioffset = ioffset + 2;
4866 /* Class Definition */
4867 value1 = tvb_get_letohl(tvb, ioffset); /* Super Classes */
4868 sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4869 4, value1, "Super Classes %d", value1);
4870 sub2tree = proto_item_add_subtree(sub2item, ett_nds);
4871 ioffset = ioffset + 4;
4872 for (r = 0; r < value1; r++)
4874 value2 = tvb_get_letohl(tvb, ioffset);
4875 ioffset = ioffset + 4;
4876 get_string(tvb, ioffset, value2, mval_buf.buffer);
4877 temp_values.vstring = mval_buf.buffer;
4878 proto_tree_add_string(sub2tree, hf_nds_super, tvb, ioffset,
4879 value2, temp_values.vstring);
4880 ioffset = ioffset + value2;
4881 ioffset += align_4(tvb, ioffset);
4883 value1 = tvb_get_letohl(tvb, ioffset); /* Containment Classes */
4884 sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4885 4, value1, "Containment Classes %d", value1);
4886 sub2tree = proto_item_add_subtree(sub2item, ett_nds);
4887 ioffset = ioffset + 4;
4888 for (r = 0; r < value1; r++)
4890 value2 = tvb_get_letohl(tvb, ioffset);
4891 ioffset = ioffset + 4;
4892 get_string(tvb, ioffset, value2, mval_buf.buffer);
4893 temp_values.vstring = mval_buf.buffer;
4894 proto_tree_add_string(sub2tree, hf_nds_base_class, tvb, ioffset,
4895 value2, temp_values.vstring);
4896 ioffset = ioffset + value2;
4897 ioffset += align_4(tvb, ioffset);
4899 value1 = tvb_get_letohl(tvb, ioffset); /* Naming Attributes */
4900 sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4901 4, value1, "Naming Attributes %d", value1);
4902 sub2tree = proto_item_add_subtree(sub2item, ett_nds);
4903 ioffset = ioffset + 4;
4904 for (r = 0; r < value1; r++)
4906 value2 = tvb_get_letohl(tvb, ioffset);
4907 ioffset = ioffset + 4;
4908 get_string(tvb, ioffset, value2, mval_buf.buffer);
4909 temp_values.vstring = mval_buf.buffer;
4910 proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset,
4911 value2, temp_values.vstring);
4912 ioffset = ioffset + value2;
4913 ioffset += align_4(tvb, ioffset);
4915 value1 = tvb_get_letohl(tvb, ioffset); /* Mandatory Attributes */
4916 sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4917 4, value1, "Mandatory Attributes %d", value1);
4918 sub2tree = proto_item_add_subtree(sub2item, ett_nds);
4919 ioffset = ioffset + 4;
4920 for (r = 0; r < value1; r++)
4922 value2 = tvb_get_letohl(tvb, ioffset);
4923 ioffset = ioffset + 4;
4924 get_string(tvb, ioffset, value2, mval_buf.buffer);
4925 temp_values.vstring = mval_buf.buffer;
4926 proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset,
4927 value2, temp_values.vstring);
4928 ioffset = ioffset + value2;
4929 ioffset += align_4(tvb, ioffset);
4931 value1 = tvb_get_letohl(tvb, ioffset); /* Optional Attributes */
4932 sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4933 4, value1, "Optional Attributes %d", value1);
4934 sub2tree = proto_item_add_subtree(sub2item, ett_nds);
4935 ioffset = ioffset + 4;
4936 for (r = 0; r < value1; r++)
4938 value2 = tvb_get_letohl(tvb, ioffset);
4939 ioffset = ioffset + 4;
4940 get_string(tvb, ioffset, value2, mval_buf.buffer);
4941 temp_values.vstring = mval_buf.buffer;
4942 proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset,
4943 value2, temp_values.vstring);
4944 ioffset = ioffset + value2;
4945 ioffset += align_4(tvb, ioffset);
4947 value1 = tvb_get_letohl(tvb, ioffset); /* Default ACL */
4948 proto_tree_add_uint_format(sub1tree, hf_nds_eid, tvb, ioffset,
4949 4, value1, "Default ACL %08x", value1);
4950 ioffset = ioffset + 4;
4951 if(tvb_length_remaining(tvb, ioffset) < 4 )
4960 case MVTYPE_MODIFY_CLASS: /* Modify Class */
4961 for (i = 1 ; i <= values->vvalue; i++ ) /* Attribute Names to add*/
4963 ioffset += align_4(tvb, ioffset);
4964 value1 = tvb_get_letohl(tvb, ioffset);
4965 ioffset = ioffset + 4;
4966 get_string(tvb, ioffset, value1, mval_buf.buffer);
4967 values->vstring = mval_buf.buffer;
4968 proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset,
4969 value1, values->vstring);
4970 ioffset = ioffset + value1;
4972 if(tvb_length_remaining(tvb, ioffset) < 4 )
4976 ioffset += align_4(tvb, ioffset);
4977 value1 = tvb_get_letohl(tvb, ioffset);
4978 proto_tree_add_uint_format(ntree, hf_nds_att_del, tvb, ioffset,
4979 4, value1, "Attribute Names to Delete %d", value1);
4980 ioffset = ioffset + 4;
4981 for (i = 1 ; i <= value1; i++ ) /* Attribute Names to delete*/
4983 ioffset += align_4(tvb, ioffset);
4984 value2 = tvb_get_letohl(tvb, ioffset);
4985 ioffset = ioffset + 4;
4986 get_string(tvb, ioffset, value2, mval_buf.buffer);
4987 values->vstring = mval_buf.buffer;
4988 proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset,
4989 value2, values->vstring);
4990 ioffset = ioffset + value2;
4992 if(tvb_length_remaining(tvb, ioffset) < 4 )
4996 ioffset += align_4(tvb, ioffset);
4997 value1 = tvb_get_letohl(tvb, ioffset);
4998 proto_tree_add_uint_format(ntree, hf_nds_acl_add, tvb, ioffset,
4999 4, value1, "ACL Templates to Add %d", value1);
5000 ioffset = ioffset + 4;
5001 for (i = 1 ; i <= value1; i++ ) /* ACL templates to add*/
5003 ioffset += align_4(tvb, ioffset);
5004 value2 = tvb_get_letohl(tvb, ioffset); /* Attribute Name */
5005 ioffset = ioffset + 4;
5006 get_string(tvb, ioffset, value2, mval_buf.buffer);
5007 values->vstring = mval_buf.buffer;
5008 proto_tree_add_string(ntree, hf_nds_attribute_dn, tvb, ioffset,
5009 value2, values->vstring);
5010 ioffset = ioffset + value2;
5011 ioffset += align_4(tvb, ioffset);
5012 value2 = tvb_get_letohl(tvb, ioffset); /* DN of Trustee */
5013 ioffset = ioffset + 4;
5014 get_string(tvb, ioffset, value2, mval_buf.buffer);
5015 values->vstring = mval_buf.buffer;
5016 proto_tree_add_string(ntree, hf_nds_trustee_dn, tvb, ioffset,
5017 value2, values->vstring);
5018 ioffset = ioffset + value2;
5019 ioffset += align_4(tvb, ioffset);
5020 value1 = tvb_get_letohl(tvb, ioffset);
5021 proto_tree_add_uint_format(ntree, hf_nds_privileges, tvb, ioffset,
5022 4, value1, "Priviledges 0x%08x", value1);
5023 ioffset = ioffset + 4;
5025 if(tvb_length_remaining(tvb, ioffset) < 4 )
5029 ioffset += align_4(tvb, ioffset);
5030 value1 = tvb_get_letohl(tvb, ioffset);
5031 proto_tree_add_uint_format(ntree, hf_nds_acl_del, tvb, ioffset,
5032 4, value1, "ACL Templates to Delete %d", value1);
5033 ioffset = ioffset + 4;
5034 for (i = 1 ; i <= value1; i++ ) /* ACL templates to delete*/
5036 ioffset += align_4(tvb, ioffset);
5037 value2 = tvb_get_letohl(tvb, ioffset); /* Attribute Name */
5038 ioffset = ioffset + 4;
5039 get_string(tvb, ioffset, value2, mval_buf.buffer);
5040 values->vstring = mval_buf.buffer;
5041 proto_tree_add_string(ntree, hf_nds_attribute_dn, tvb, ioffset,
5042 value2, values->vstring);
5043 ioffset = ioffset + value2;
5044 ioffset += align_4(tvb, ioffset);
5045 value2 = tvb_get_letohl(tvb, ioffset); /* DN of Trustee */
5046 ioffset = ioffset + 4;
5047 get_string(tvb, ioffset, value2, mval_buf.buffer);
5048 values->vstring = mval_buf.buffer;
5049 proto_tree_add_string(ntree, hf_nds_trustee_dn, tvb, ioffset,
5050 value2, values->vstring);
5051 ioffset = ioffset + value2;
5052 ioffset += align_4(tvb, ioffset);
5053 value1 = tvb_get_letohl(tvb, ioffset); /* Priviledges */
5054 proto_tree_add_uint_format(ntree, hf_nds_privileges, tvb, ioffset,
5055 4, value1, "Priviledges 0x%08x", value1);
5056 ioffset = ioffset + 4;
5067 * NDS fragment not being set to 0xffffffff indicates we are inside or at the
5068 * beginning of a fragment. But when the end of the fragment
5069 * is encounterd the flag is set to 0xffffffff. So we must mark what the
5070 * frame number is of the end fragment so that we will be
5071 * able to redissect if the user clicks on the packet
5072 * or resorts/filters the trace.
5074 * Once we are certain that we are in a fragment sequence
5075 * then we can just process each fragment in this conversation
5076 * until we reach the fragment == 0xffffffff packet.
5078 * We will be able to easily determine if a conversation is a fragment
5079 * with the exception of the last packet in the fragment. So remember
5080 * the last fragment packet number.
5082 * Also the NDS dissection requires the values of NDS Verb, Version, and Flags.
5083 * Without this values being remembered from the first request packet then
5084 * we will be unable to dissect the reply packet. For this reason we remember
5085 * these values on the first fragment and then populate the values in the final
5086 * fragment. We only do this on the first dissection.
5089 nds_defrag(tvbuff_t *tvb, packet_info *pinfo, guint32 nw_connection, guint8 sequence, guint16 type, proto_tree *tree, struct novell_tap *ncp_tap)
5091 int i, frag_count=0;
5094 tvbuff_t *frag_tvb = NULL;
5095 fragment_data *fd_head;
5096 ncp_req_hash_value *request_value = NULL;
5097 conversation_t *conversation;
5100 for (i = 0; i < 99; i++) {
5101 if (!frags[i].nds_fragmented)
5103 frags[i].nds_frag = 0xfffffff0;
5106 /* Check to see if defragmentation is enabeled in the dissector */
5107 if (!nds_defragment) {
5108 dissect_ncp_reply(tvb, pinfo, nw_connection, sequence, type, tree, ncp_tap);
5111 /* Has this already been dissected? */
5112 if (!pinfo->fd->flags.visited) {
5113 /* Find the conversation whence the request would have come. */
5114 conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
5115 PT_NCP, nw_connection, nw_connection, 0);
5116 if (conversation != NULL) {
5117 /* find the record telling us the request made that caused
5119 request_value = ncp_hash_lookup(conversation, sequence);
5120 if (!request_value) {
5121 dissect_ncp_reply(tvb, pinfo, nw_connection, sequence, type, tree, ncp_tap);
5124 p_add_proto_data(pinfo->fd, proto_ncp, (void*) request_value);
5126 /* else... we haven't seen an NCP Request for that conversation and sequence. */
5129 dissect_ncp_reply(tvb, pinfo, nw_connection, sequence, type, tree, ncp_tap);
5134 request_value = p_get_proto_data(pinfo->fd, proto_ncp);
5135 if (!request_value) {
5136 dissect_ncp_reply(tvb, pinfo, nw_connection, sequence, type, tree, ncp_tap);
5140 /* Validate that this is an NDS packet */
5141 /* If this isn't an NDS packet then just return */
5142 if (!request_value->ncp_rec ||
5143 request_value->ncp_rec->func!=104 || request_value->ncp_rec->subfunc!=2) {
5144 dissect_ncp_reply(tvb, pinfo, nw_connection, sequence, type, tree, ncp_tap);
5147 /* Get the fragment flag */
5148 nds_frag = tvb_get_letohl(tvb, 12);
5150 /* Now we need to find if this is a new fragment or already one defined. */
5151 /* We currently limit the maximum number of simultaneous fragments to 100. */
5152 for (i=0; i<100; i++)
5154 if (frags[i].nds_frag == nds_frag || frags[i].nds_frag == 0xfffffff0)
5156 if (frags[i].nds_frag == 0xfffffff0)
5158 frags[i].nds_length = 0;
5159 frags[i].nds_frag = nds_frag;
5160 frags[i].nds_fragmented = TRUE;
5170 /* is this the end of an existing fragment or just another reply */
5171 if (nds_frag == 0xffffffff && request_value->nds_frag_num == 0xffffffff)
5173 dissect_ncp_reply(tvb, pinfo, nw_connection, sequence, type, tree, ncp_tap);
5177 /* Now we process the fragments */
5178 if (request_value->nds_frag || (request_value->nds_end_frag == pinfo->fd->num))
5180 /* Check to see of this is a fragment. If so then mark as a fragment. */
5181 if (frags[frag_count].nds_frag==0xffffffff) {
5182 request_value->nds_frag = FALSE;
5183 /* nds_length of 0 means start of fragment */
5184 frags[frag_count].nds_length = 0;
5188 if (frags[frag_count].nds_length == 0)
5190 frags[frag_count].nds_length = tvb_get_letohl(tvb, 0);
5197 tid = (pinfo->srcport+pinfo->destport);
5198 len = tvb_reported_length(tvb);
5199 if (len > 0 && tvb_bytes_exist(tvb, 0, len))
5201 if (frags[frag_count].nds_length > len)
5203 /* This is the first fragment so remember the verb, version, and flags. */
5204 frags[frag_count].nds_frag_verb = request_value->nds_request_verb;
5205 frags[frag_count].nds_frag_version = request_value->nds_version;
5206 frags[frag_count].nds_frag_flags = request_value->req_nds_flags;
5207 fd_head = fragment_add_seq_next(tvb, 0, pinfo, tid, nds_fragment_table, nds_reassembled_table, len, request_value->nds_frag);
5208 frags[frag_count].nds_length = 1;
5212 /* Subsequent fragments should be offset by 16 since we do not need */
5213 /* the additional fragment handle and size fields in our composite data */
5214 fd_head = fragment_add_seq_next(tvb, 16, pinfo, tid, nds_fragment_table, nds_reassembled_table, len-16, request_value->nds_frag);
5216 if (fd_head != NULL)
5218 /* Is this the last fragment? nds_frag will indicate */
5219 if (fd_head->next != NULL && !request_value->nds_frag)
5221 frag_tvb = tvb_new_real_data(fd_head->data,
5222 fd_head->len, fd_head->len);
5223 tvb_set_child_real_data_tvbuff(tvb,
5225 add_new_data_source(pinfo,
5228 /* Show all fragments. */
5231 proto_item *frag_tree_item;
5232 show_fragment_seq_tree(fd_head,
5235 frag_tvb, &frag_tree_item);
5239 if (!pinfo->fd->flags.visited)
5241 /* Now we need to find the original fragment number. */
5242 /* Get the fragment flag */
5243 nds_frag = tvb_get_letohl(frag_tvb, 12);
5244 for (i=0; i<100; i++)
5246 if (frags[i].nds_frag == nds_frag)
5253 if (frags[i].nds_frag == 0xffffffff)
5255 /* Error can't find fragment */
5256 /*DISSECTOR_ASSERT(0);*/
5259 /* Remember this fragment information so we can dissect.
5260 * Only do this on the first dissection. After the first
5261 * dissection we will just read the memory values.
5263 request_value->nds_end_frag = pinfo->fd->num;
5264 request_value->nds_request_verb = frags[frag_count].nds_frag_verb;
5265 request_value->nds_version = frags[frag_count].nds_frag_version;
5266 request_value->req_nds_flags = frags[frag_count].nds_frag_flags;
5272 /* This is either a beggining or middle fragment on second dissection */
5273 frag_tvb = tvb_new_subset(tvb, 0, -1, -1);
5274 if (check_col(pinfo->cinfo, COL_INFO))
5276 if (request_value->nds_frag)
5278 col_add_fstr(pinfo->cinfo, COL_INFO, "[NDS Fragment %08x]", frags[frag_count].nds_frag);
5285 /* Fragment from first pass of dissection */
5286 if (check_col(pinfo->cinfo, COL_INFO))
5288 if (request_value->nds_frag)
5290 col_add_fstr(pinfo->cinfo, COL_INFO, "[NDS Fragment %08x]", frags[frag_count].nds_frag);
5299 * There are no bytes so Dissect this
5301 frag_tvb = tvb_new_subset(tvb, 0, -1, -1);
5303 if (frag_tvb == NULL)
5305 /* This is a fragment packet */
5306 frag_tvb = tvb_new_subset (tvb, 0, -1, -1);
5307 nds_data_handle = find_dissector("data");
5308 call_dissector(nds_data_handle, frag_tvb, pinfo, tree);
5312 /* This is the end fragment so dissect */
5313 if (!request_value->nds_frag) {
5314 frags[frag_count].nds_length = 0;
5315 dissect_ncp_reply(frag_tvb, pinfo, nw_connection, sequence, type, tree, ncp_tap);
5321 /* This is not any fragment packet */
5322 frags[frag_count].nds_length = 0;
5323 request_value->nds_frag = FALSE;
5324 dissect_ncp_reply(tvb, pinfo, nw_connection, sequence, type, tree, ncp_tap);
5329 dissect_ncp_request(tvbuff_t *tvb, packet_info *pinfo,
5330 guint32 nw_connection, guint8 sequence,
5331 guint16 type, proto_tree *volatile ncp_tree)
5333 guint8 func, subfunc = 0;
5334 gboolean requires_subfunc = FALSE;
5335 gboolean has_length = FALSE;
5336 ncp_req_hash_value *volatile request_value = NULL;
5337 const ncp_record *volatile ncp_rec = NULL;
5338 conversation_t *conversation;
5339 ptvcursor_t *volatile ptvc = NULL;
5340 proto_tree *temp_tree = NULL;
5341 volatile gboolean run_req_cond = FALSE;
5342 volatile gboolean run_info_str = FALSE;
5343 guint32 length_remaining;
5345 unsigned long except_code;
5346 const char *message;
5348 func = tvb_get_guint8(tvb, 6);
5350 /* Determine which ncp_record to use. */
5352 case NCP_ALLOCATE_SLOT:
5353 length_remaining = tvb_length_remaining(tvb, 4);
5354 if (length_remaining > 4)
5356 testvar = tvb_get_ntohl(tvb, 4);
5357 if( testvar == 0x4c495020)
5359 ncp_rec = &ncplip_echo;
5363 ncp_rec = &ncp1111_request;
5364 if (ncp_echo_conn) {
5365 expert_add_info_format(pinfo, NULL, PI_RESPONSE_CODE, PI_CHAT, "Connection Request");
5371 ncp_rec = &ncp1111_request;
5372 if (ncp_echo_conn) {
5373 expert_add_info_format(pinfo, NULL, PI_RESPONSE_CODE, PI_CHAT, "Connection Request");
5377 case NCP_SERVICE_REQUEST:
5378 requires_subfunc = ncp_requires_subfunc(func);
5379 has_length = ncp_has_length_parameter(func);
5380 if (requires_subfunc) {
5382 subfunc = tvb_get_guint8(tvb, 9);
5385 subfunc = tvb_get_guint8(tvb, 7);
5388 ncp_rec = ncp_record_find(func, subfunc);
5390 case NCP_DEALLOCATE_SLOT:
5391 ncp_rec = &ncp5555_request;
5392 if (ncp_echo_conn) {
5393 expert_add_info_format(pinfo, NULL, PI_RESPONSE_CODE, PI_CHAT, "Destroy Connection %d Request", nw_connection);
5396 case NCP_BROADCAST_SLOT:
5397 ncp_rec = &ncpbbbb_request;
5400 ncp_rec = &ncplip_echo;
5407 /* Fill in the INFO column. */
5408 if (check_col(pinfo->cinfo, COL_INFO)) {
5410 col_add_fstr(pinfo->cinfo, COL_INFO, "C %s", ncp_rec->name);
5411 if (ncp_rec->req_info_str) {
5412 /* We want to add more stuff to the Info
5414 run_info_str = TRUE;
5418 if (requires_subfunc) {
5419 col_add_fstr(pinfo->cinfo, COL_INFO,
5420 "C Unknown Function %u %u (0x%02X/0x%02x)",
5421 func, subfunc, func, subfunc);
5424 col_add_fstr(pinfo->cinfo, COL_INFO,
5425 "C Unknown Function %u (0x%02x)",
5430 if (!pinfo->fd->flags.visited) {
5431 /* This is the first time we've looked at this packet.
5432 Keep track of the address and connection whence the request
5433 came, and the address and connection to which the request
5434 is being sent, so that we can match up calls with replies.
5435 (We don't include the sequence number, as we may want
5436 to have all packets over the same connection treated
5437 as being part of a single conversation so that we can
5438 let the user select that conversation to be displayed.) */
5439 conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
5440 PT_NCP, nw_connection, nw_connection, 0);
5442 if (conversation == NULL) {
5443 /* It's not part of any conversation - create a new one. */
5444 conversation = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst,
5445 PT_NCP, nw_connection, nw_connection, 0);
5447 request_value = ncp_hash_insert(conversation, sequence, ncp_rec);
5448 request_value->req_frame_num = pinfo->fd->num;
5449 request_value->req_frame_time=pinfo->fd->abs_ts;
5451 /* If this is the first time we're examining the packet,
5452 * check to see if this NCP type uses a "request condition".
5453 * If so, we have to build a proto_tree because request conditions
5454 * use display filters to work, and without a proto_tree,
5455 * display filters can't possibly work. */
5457 if (ncp_rec->req_cond_indexes) {
5458 run_req_cond = TRUE;
5463 /* If we have to handle a request condition, or have to
5464 add to the Info column, we need to construct a protocol
5465 tree. If we already have a proto_tree, then wonderful.
5466 If we don't, we need to build one. */
5467 if ((run_info_str || run_req_cond) && !ncp_tree) {
5470 temp_tree = proto_tree_create_root();
5471 proto_tree_set_visible(temp_tree, FALSE);
5472 ti = proto_tree_add_item(temp_tree, proto_ncp, tvb, 0, -1, FALSE);
5473 ncp_tree = proto_item_add_subtree(ti, ett_ncp);
5477 /* If the dissection throws an exception, be sure to free
5478 * the temporary proto_tree that was created. Because of the
5479 * way the CLEANUP_PUSH macro works, we can't put it in an 'if'
5480 * block; it has to be in the same scope as the terminating
5481 * CLEANUP_POP or CLEANUP_POP_AND_ALLOC. So, we always
5482 * call CLEANUP_POP and friends, but the value of temp_tree is
5483 * NULL if no cleanup is needed, and non-null if cleanup is needed. */
5484 CLEANUP_PUSH(free_proto_tree, temp_tree);
5486 #ifdef FAKE_TREE_IS_VISIBLE
5487 PTREE_DATA(ncp_tree)->visible=1;
5490 /* Before the dissection, if we're saving data for a request
5491 * condition, we have to prime the proto tree using the
5492 * dfilter information */
5497 needed = ncp_rec->req_cond_indexes;
5499 while (*needed != -1) {
5500 dfilter = req_conds[*needed].dfilter;
5501 /* Prime the proto_tree with "interesting fields". */
5502 dfilter_prime_proto_tree(dfilter, ncp_tree);
5507 /* Before the dissection, if we need a field for the info_str,
5508 * prime the tree. */
5510 proto_tree_prime_hfid(ncp_tree, *ncp_rec->req_info_str->hf_ptr);
5514 case NCP_BROADCAST_SLOT:
5518 case NCP_SERVICE_REQUEST:
5519 proto_tree_add_uint_format(ncp_tree, hf_ncp_func, tvb, 6, 1,
5520 func, "Function: %u (0x%02X), %s",
5521 func, func, ncp_rec ? ncp_rec->name : "Unknown");
5529 if (requires_subfunc) {
5531 proto_tree_add_item(ncp_tree, hf_ncp_length, tvb, 7,
5533 proto_tree_add_uint_format(ncp_tree, hf_ncp_subfunc, tvb, 9, 1,
5534 subfunc, "SubFunction: %u (0x%02x)",
5536 ptvc = ptvcursor_new(ncp_tree, tvb, 10);
5539 proto_tree_add_uint_format(ncp_tree, hf_ncp_subfunc, tvb, 7, 1,
5540 subfunc, "SubFunction: %u (0x%02x)",
5542 ptvc = ptvcursor_new(ncp_tree, tvb, 8);
5546 ptvc = ptvcursor_new(ncp_tree, tvb, 7);
5549 /* The group is not part of the packet, but it's useful
5550 * information to display anyway. Put it in the tree for filtering and tap use*/
5552 proto_tree_add_uint_format(ncp_tree, hf_ncp_group, tvb, 0, 0, ncp_rec->group, "Group: %s", ncp_groups[ncp_rec->group]);
5557 if (ncp_rec && ncp_rec->request_ptvc) {
5558 clear_repeat_vars();
5560 * We need to remember the results even if we
5561 * throw an exception dissecting this request,
5562 * so that we can properly dissect the reply.
5563 * We catch any exceptions thrown when
5564 * dissecting the request, and re-throw them
5565 * after saving the results of any conditional
5569 process_ptvc_record(ptvc, ncp_rec->request_ptvc, NULL, TRUE, ncp_rec);
5571 except_code = EXCEPT_CODE;
5572 message = GET_MESSAGE;
5576 ptvcursor_free(ptvc);
5577 /* SecretStore packets are dessected in packet-ncp-sss.c */
5578 if (func == 0x5c && ncp_tree) {
5579 dissect_sss_request(tvb, pinfo, ncp_tree, request_value);
5581 /* NMAS packets are dessected in packet-ncp-nmas.c */
5582 if (func == 0x5e && ncp_tree) {
5583 dissect_nmas_request(tvb, pinfo, ncp_tree, request_value);
5586 /* Now that the dissection is done, do we need to run
5587 * some display filters on the resulting tree in order
5588 * to save results for "request conditions" ? */
5594 results = g_new0(gboolean, NUM_REQ_CONDS);
5595 needed = ncp_rec->req_cond_indexes;
5597 while (*needed != -1) {
5598 /* ncp_tree is not a root proto_tree, but
5599 * dfilters will still work on it. */
5600 dfilter = req_conds[*needed].dfilter;
5601 results[*needed] = dfilter_apply(dfilter, ncp_tree);
5605 /* Save the results so the reply packet dissection
5607 request_value->req_cond_results = results;
5609 /* Construct the info string if necessary */
5613 char non_uni_string[1024];
5620 conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
5621 PT_NCP, nw_connection, nw_connection, 0);
5622 if (conversation != NULL) {
5623 /* find the record telling us the request made that caused
5625 request_value = ncp_hash_lookup(conversation, sequence);
5627 if (!conversation || !request_value)
5633 parray = proto_get_finfo_ptr_array(ncp_tree,
5634 *ncp_rec->req_info_str->hf_ptr);
5635 len = g_ptr_array_len(parray);
5639 col_set_str(pinfo->cinfo, COL_INFO, "C ");
5641 finfo = g_ptr_array_index(parray, 0);
5643 info_type = get_info_type((const gchar*) ncp_rec->req_info_str->first_string);
5645 if (info_type != 0) { /* Is this a string or not? */
5647 if (info_type == 1) { /* Is this bytes? */
5648 byte_string = bytes_to_str(get_finfo_value_string(finfo), get_finfo_length(finfo));
5649 col_append_fstr(pinfo->cinfo, COL_INFO,
5650 (const gchar*) ncp_rec->req_info_str->first_string,
5655 if (info_type == 2) { /* Is this a String? */
5656 uni_to_string(get_finfo_value_string(finfo), get_finfo_length(finfo), non_uni_string);
5657 col_append_fstr(pinfo->cinfo, COL_INFO,
5658 (const gchar*) ncp_rec->req_info_str->first_string,
5663 col_append_fstr(pinfo->cinfo, COL_INFO,
5664 (const gchar*) ncp_rec->req_info_str->first_string,
5665 get_finfo_value_string(finfo));
5671 col_append_fstr(pinfo->cinfo, COL_INFO,
5672 (const gchar*) ncp_rec->req_info_str->first_string,
5673 get_finfo_value_integer(finfo));
5677 for (i = 1; i < len; i++) {
5678 non_uni_string[0]='\0';
5679 finfo = g_ptr_array_index(parray, i);
5680 info_type = get_info_type((const gchar*) ncp_rec->req_info_str->repeat_string);
5682 if (info_type != 0) { /* Is this a string or not? */
5684 { /* Is this bytes? */
5685 byte_string = bytes_to_str(get_finfo_value_string(finfo), get_finfo_length(finfo));
5686 col_append_fstr(pinfo->cinfo, COL_INFO,
5687 (const gchar*) ncp_rec->req_info_str->repeat_string,
5692 if (info_type == 2) { /* Is this a String? */
5693 uni_to_string(get_finfo_value_string(finfo), get_finfo_length(finfo), non_uni_string);
5694 col_append_fstr(pinfo->cinfo, COL_INFO,
5695 (const gchar*) ncp_rec->req_info_str->repeat_string,
5700 col_append_fstr(pinfo->cinfo, COL_INFO,
5701 (const gchar*) ncp_rec->req_info_str->repeat_string,
5702 get_finfo_value_string(finfo));
5708 col_append_fstr(pinfo->cinfo, COL_INFO,
5709 (const gchar*) ncp_rec->req_info_str->repeat_string,
5710 get_finfo_value_integer(finfo));
5716 /* Check to see if we need to report to the expert table */
5717 trap_for_expert_event(ncp_tree, pinfo, ncp_rec, 0);
5718 /* Free the temporary proto_tree */
5719 CLEANUP_CALL_AND_POP;
5721 /* Re-throw any exception. */
5722 if (except_code != 0)
5723 THROW_MESSAGE(except_code, message);
5728 dissect_nds_ping_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
5729 proto_tree *ncp_tree, ncp_req_hash_value *request_value)
5731 nw_uni_t reply_buffer;
5732 guint8 ping_version;
5733 guint32 nds_string_len;
5740 strcpy(reply_buffer.buffer, "");
5742 ping_version = tvb_get_guint8(tvb, 8);
5743 proto_tree_add_item(ncp_tree, hf_ping_version, tvb, 8, 1, TRUE);
5744 if (ping_version == 9) {
5745 nds_string_len = tvb_get_ntohl(tvb, 9);
5746 nds_offset = nds_string_len+16;
5747 tvb_ensure_bytes_exist(tvb, 16, nds_string_len);
5748 proto_tree_add_item(ncp_tree, hf_nds_tree_name, tvb, 16, nds_string_len, FALSE);
5749 proto_tree_add_item(ncp_tree, hf_nds_reply_depth, tvb, nds_offset, 4, FALSE);
5750 proto_tree_add_item(ncp_tree, hf_nds_reply_rev, tvb, (nds_offset+4), 4, FALSE);
5751 proto_tree_add_item(ncp_tree, hf_nds_reply_flags, tvb, (nds_offset+8), 4, TRUE);
5755 nds_flags = request_value->req_nds_flags;
5756 bvalue = 0x00000001;
5758 for (i = 0 ; i < 32; i++ ) {
5759 if (nds_flags & bvalue)
5763 case 0x00000001: /* Supported Fields */
5764 pvalues[0].vvalue = tvb_get_letohs(tvb, nds_offset);
5765 pvalues[0].vtype = VTYPE_BITFIELD;
5766 pvalues[0].vstring = "";
5767 pvalues[0].vdesc = "Ping (low) Supported Fields:";
5768 pvalues[0].vlength = 2;
5769 pvalues[0].hfname= hf_nds_rflags;
5770 pvalues[0].voffset = nds_offset;
5771 pvalues[0].bit1 = "Supported Fields";
5772 pvalues[0].bit1hfname = hf_bit1pingflags1;
5773 pvalues[0].bit2 = "Depth";
5774 pvalues[0].bit2hfname = hf_bit2pingflags1;
5775 pvalues[0].bit3 = "Revision";
5776 pvalues[0].bit3hfname = hf_bit3pingflags1;
5777 pvalues[0].bit4 = "Flags";
5778 pvalues[0].bit4hfname = hf_bit4pingflags1;
5779 pvalues[0].bit5 = "Verification Flags";
5780 pvalues[0].bit5hfname = hf_bit5pingflags1;
5781 pvalues[0].bit6 = "Letter Version";
5782 pvalues[0].bit6hfname = hf_bit6pingflags1;
5783 pvalues[0].bit7 = "OS Version";
5784 pvalues[0].bit7hfname = hf_bit7pingflags1;
5785 pvalues[0].bit8 = "License Flags";
5786 pvalues[0].bit8hfname = hf_bit8pingflags1;
5787 pvalues[0].bit9 = "DS Time";
5788 pvalues[0].bit9hfname = hf_bit9pingflags1;
5789 pvalues[0].bit10 = "Not Defined";
5790 pvalues[0].bit10hfname = hf_bit10pingflags1;
5791 pvalues[0].bit11 = "Not Defined";
5792 pvalues[0].bit11hfname = hf_bit11pingflags1;
5793 pvalues[0].bit12 = "Not Defined";
5794 pvalues[0].bit12hfname = hf_bit12pingflags1;
5795 pvalues[0].bit13 = "Not Defined";
5796 pvalues[0].bit13hfname = hf_bit13pingflags1;
5797 pvalues[0].bit14 = "Not Defined";
5798 pvalues[0].bit14hfname = hf_bit14pingflags1;
5799 pvalues[0].bit15 = "Not Defined";
5800 pvalues[0].bit15hfname = hf_bit15pingflags1;
5801 pvalues[0].bit16 = "Not Defined";
5802 pvalues[0].bit16hfname = hf_bit16pingflags1;
5804 process_bitfield(ncp_tree, tvb, &pvalues[0]);
5807 pvalues[0].vvalue = tvb_get_letohs(tvb, nds_offset);
5808 pvalues[0].vtype = VTYPE_BITFIELD;
5809 pvalues[0].vstring = "";
5810 pvalues[0].vdesc = "Ping (high) Supported Fields:";
5811 pvalues[0].vlength = 2;
5812 pvalues[0].hfname= hf_nds_rflags;
5813 pvalues[0].voffset = nds_offset;
5814 pvalues[0].bit1 = "Sap Name";
5815 pvalues[0].bit1hfname = hf_bit1pingflags2;
5816 pvalues[0].bit2 = "Tree Name";
5817 pvalues[0].bit2hfname = hf_bit2pingflags2;
5818 pvalues[0].bit3 = "OS Name";
5819 pvalues[0].bit3hfname = hf_bit3pingflags2;
5820 pvalues[0].bit4 = "Hardware Name";
5821 pvalues[0].bit4hfname = hf_bit4pingflags2;
5822 pvalues[0].bit5 = "Vendor Name";
5823 pvalues[0].bit5hfname = hf_bit5pingflags2;
5824 pvalues[0].bit6 = "Not Defined";
5825 pvalues[0].bit6hfname = hf_bit6pingflags2;
5826 pvalues[0].bit7 = "Not Defined";
5827 pvalues[0].bit7hfname = hf_bit7pingflags2;
5828 pvalues[0].bit8 = "Not Defined";
5829 pvalues[0].bit8hfname = hf_bit8pingflags2;
5830 pvalues[0].bit9 = "Not Defined";
5831 pvalues[0].bit9hfname = hf_bit9pingflags2;
5832 pvalues[0].bit10 = "Not Defined";
5833 pvalues[0].bit10hfname = hf_bit10pingflags2;
5834 pvalues[0].bit11 = "Not Defined";
5835 pvalues[0].bit11hfname = hf_bit11pingflags2;
5836 pvalues[0].bit12 = "Not Defined";
5837 pvalues[0].bit12hfname = hf_bit12pingflags2;
5838 pvalues[0].bit13 = "Not Defined";
5839 pvalues[0].bit13hfname = hf_bit13pingflags2;
5840 pvalues[0].bit14 = "Not Defined";
5841 pvalues[0].bit14hfname = hf_bit14pingflags2;
5842 pvalues[0].bit15 = "Not Defined";
5843 pvalues[0].bit15hfname = hf_bit15pingflags2;
5844 pvalues[0].bit16 = "Not Defined";
5845 pvalues[0].bit16hfname = hf_bit16pingflags2;
5847 process_bitfield(ncp_tree, tvb, &pvalues[0]);
5851 proto_tree_add_item(ncp_tree, hf_nds_reply_depth, tvb, nds_offset, 4, TRUE);
5855 proto_tree_add_item(ncp_tree, hf_nds_reply_rev, tvb, nds_offset, 4, TRUE);
5859 pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
5860 pvalues[0].vtype = VTYPE_BITFIELD;
5861 pvalues[0].vstring = "";
5862 pvalues[0].vdesc = "Ping Flags:";
5863 pvalues[0].vlength = 4;
5864 pvalues[0].hfname= hf_nds_rflags;
5865 pvalues[0].voffset = nds_offset;
5866 pvalues[0].bit1 = "Root Most Master Replica";
5867 pvalues[0].bit1hfname = hf_bit1pingpflags1;
5868 pvalues[0].bit2 = "Time Synchronized";
5869 pvalues[0].bit2hfname = hf_bit2pingpflags1;
5870 pvalues[0].bit3 = "Not Defined";
5871 pvalues[0].bit3hfname = hf_bit3pingpflags1;
5872 pvalues[0].bit4 = "Not Defined";
5873 pvalues[0].bit4hfname = hf_bit4pingpflags1;
5874 pvalues[0].bit5 = "Not Defined";
5875 pvalues[0].bit5hfname = hf_bit5pingpflags1;
5876 pvalues[0].bit6 = "Not Defined";
5877 pvalues[0].bit6hfname = hf_bit6pingpflags1;
5878 pvalues[0].bit7 = "Not Defined";
5879 pvalues[0].bit7hfname = hf_bit7pingpflags1;
5880 pvalues[0].bit8 = "Not Defined";
5881 pvalues[0].bit8hfname = hf_bit8pingpflags1;
5882 pvalues[0].bit9 = "Not Defined";
5883 pvalues[0].bit9hfname = hf_bit9pingpflags1;
5884 pvalues[0].bit10 = "Not Defined";
5885 pvalues[0].bit10hfname = hf_bit10pingpflags1;
5886 pvalues[0].bit11 = "Not Defined";
5887 pvalues[0].bit11hfname = hf_bit11pingpflags1;
5888 pvalues[0].bit12 = "Not Defined";
5889 pvalues[0].bit12hfname = hf_bit12pingpflags1;
5890 pvalues[0].bit13 = "Not Defined";
5891 pvalues[0].bit13hfname = hf_bit13pingpflags1;
5892 pvalues[0].bit14 = "Not Defined";
5893 pvalues[0].bit14hfname = hf_bit14pingpflags1;
5894 pvalues[0].bit15 = "Not Defined";
5895 pvalues[0].bit15hfname = hf_bit15pingpflags1;
5896 pvalues[0].bit16 = "Not Defined";
5897 pvalues[0].bit16hfname = hf_bit16pingpflags1;
5899 process_bitfield(ncp_tree, tvb, &pvalues[0]);
5903 pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
5904 pvalues[0].vtype = VTYPE_BITFIELD;
5905 pvalues[0].vstring = "";
5906 pvalues[0].vdesc = "Verification Flags:";
5907 pvalues[0].vlength = 4;
5908 pvalues[0].hfname= hf_nds_rflags;
5909 pvalues[0].voffset = nds_offset;
5910 pvalues[0].bit1 = "Checksum";
5911 pvalues[0].bit1hfname = hf_bit1pingvflags1;
5912 pvalues[0].bit2 = "CRC32";
5913 pvalues[0].bit2hfname = hf_bit2pingvflags1;
5914 pvalues[0].bit3 = "Not Defined";
5915 pvalues[0].bit3hfname = hf_bit3pingvflags1;
5916 pvalues[0].bit4 = "Not Defined";
5917 pvalues[0].bit4hfname = hf_bit4pingvflags1;
5918 pvalues[0].bit5 = "Not Defined";
5919 pvalues[0].bit5hfname = hf_bit5pingvflags1;
5920 pvalues[0].bit6 = "Not Defined";
5921 pvalues[0].bit6hfname = hf_bit6pingvflags1;
5922 pvalues[0].bit7 = "Not Defined";
5923 pvalues[0].bit7hfname = hf_bit7pingvflags1;
5924 pvalues[0].bit8 = "Not Defined";
5925 pvalues[0].bit8hfname = hf_bit8pingvflags1;
5926 pvalues[0].bit9 = "Not Defined";
5927 pvalues[0].bit9hfname = hf_bit9pingvflags1;
5928 pvalues[0].bit10 = "Not Defined";
5929 pvalues[0].bit10hfname = hf_bit10pingvflags1;
5930 pvalues[0].bit11 = "Not Defined";
5931 pvalues[0].bit11hfname = hf_bit11pingvflags1;
5932 pvalues[0].bit12 = "Not Defined";
5933 pvalues[0].bit12hfname = hf_bit12pingvflags1;
5934 pvalues[0].bit13 = "Not Defined";
5935 pvalues[0].bit13hfname = hf_bit13pingvflags1;
5936 pvalues[0].bit14 = "Not Defined";
5937 pvalues[0].bit14hfname = hf_bit14pingvflags1;
5938 pvalues[0].bit15 = "Not Defined";
5939 pvalues[0].bit15hfname = hf_bit15pingvflags1;
5940 pvalues[0].bit16 = "Not Defined";
5941 pvalues[0].bit16hfname = hf_bit16pingvflags1;
5943 process_bitfield(ncp_tree, tvb, &pvalues[0]);
5947 proto_tree_add_item(ncp_tree, hf_nds_letter_ver, tvb, nds_offset, 4, TRUE);
5951 proto_tree_add_item(ncp_tree, hf_nds_os_ver, tvb, nds_offset, 4, TRUE);
5955 proto_tree_add_item(ncp_tree, hf_nds_lic_flags, tvb, nds_offset, 4, TRUE);
5959 proto_tree_add_item(ncp_tree, hf_nds_ds_time, tvb, nds_offset, 4, TRUE);
5963 nds_string_len = tvb_get_letohl(tvb, nds_offset);
5965 get_string(tvb, nds_offset, nds_string_len, reply_buffer.buffer);
5966 tvb_ensure_bytes_exist(tvb, nds_offset, nds_string_len);
5967 proto_tree_add_text(ncp_tree, tvb, nds_offset, nds_string_len, "SAP Name: %s", reply_buffer.buffer);
5968 nds_offset += nds_string_len;
5969 nds_offset += align_4(tvb, nds_offset);
5973 nds_string_len = tvb_get_letohl(tvb, nds_offset);
5975 get_string(tvb, nds_offset, nds_string_len, reply_buffer.buffer);
5976 tvb_ensure_bytes_exist(tvb, nds_offset, nds_string_len);
5977 proto_tree_add_text(ncp_tree, tvb, nds_offset, nds_string_len, "NDS Tree Name: %s", reply_buffer.buffer);
5978 nds_offset += nds_string_len;
5979 nds_offset += align_4(tvb, nds_offset);
5982 nds_string_len = tvb_get_letohl(tvb, nds_offset);
5984 get_string(tvb, nds_offset, nds_string_len, reply_buffer.buffer);
5985 tvb_ensure_bytes_exist(tvb, nds_offset, nds_string_len);
5986 proto_tree_add_text(ncp_tree, tvb, nds_offset, nds_string_len, "OS Name: %s", reply_buffer.buffer);
5987 nds_offset += nds_string_len;
5988 nds_offset += align_4(tvb, nds_offset);
5991 nds_string_len = tvb_get_letohl(tvb, nds_offset);
5993 get_string(tvb, nds_offset, nds_string_len, reply_buffer.buffer);
5994 tvb_ensure_bytes_exist(tvb, nds_offset, nds_string_len);
5995 proto_tree_add_text(ncp_tree, tvb, nds_offset, nds_string_len, "Hardware Name: %s", reply_buffer.buffer);
5996 nds_offset += nds_string_len;
5997 nds_offset += align_4(tvb, nds_offset);
6000 nds_string_len = tvb_get_letohl(tvb, nds_offset);
6002 get_string(tvb, nds_offset, nds_string_len, reply_buffer.buffer);
6003 tvb_ensure_bytes_exist(tvb, nds_offset, nds_string_len);
6004 proto_tree_add_text(ncp_tree, tvb, nds_offset, nds_string_len, "Vendor Name: %s", reply_buffer.buffer);
6005 nds_offset += nds_string_len;
6006 nds_offset += align_4(tvb, nds_offset);
6054 dissect_nds_reply(tvbuff_t *tvb, packet_info *pinfo,
6055 proto_tree *ncp_tree, guint32 nds_error_code,
6056 const char *nds_error_string, ncp_req_hash_value *request_value,
6057 conversation_t *conversation)
6060 guint32 nds_reply_buffer;
6062 const char *verb_string;
6064 char string_buffer[9][1024];
6065 gboolean resolve_eid=FALSE;
6066 guint32 global_eid=0;
6067 gboolean add_eid = FALSE;
6068 char global_object_name[256];
6069 ncp_req_eid_hash_value *request_eid_value = NULL;
6072 strcpy(global_object_name, "");
6076 nds_reply_buffer = tvb_get_letohl(tvb, nds_offset);
6077 proto_tree_add_uint(ncp_tree, hf_ncp_fragment_size, tvb, nds_offset,
6078 4, nds_reply_buffer);
6080 nds_frag = tvb_get_letohl(tvb, nds_offset);
6081 proto_tree_add_uint(ncp_tree, hf_ncp_fragment_handle, tvb, nds_offset,
6085 * Is the possibly-reassembled reply large enough to have a completion
6086 * code? (We can't check the fragment size as this might just be the
6089 if (tvb_reported_length_remaining(tvb, nds_offset) >= 4)
6091 /* Yes - process the completion code. */
6092 expert_item = proto_tree_add_uint_format(ncp_tree, hf_nds_reply_error, tvb, nds_offset,
6093 4, nds_error_code, "NDS Completion Code: 0x%08x, %s",
6094 nds_error_code, nds_error_string);
6096 if (nds_error_code != 0 && ncp_echo_err) {
6097 expert_add_info_format(pinfo, expert_item, PI_RESPONSE_CODE, PI_ERROR, "NDS Error: 0x%08x %s", nds_error_code, nds_error_string);
6100 if (request_value && nds_error_code == 0x00000000)
6103 for (i = 0; i < 9; i++) {
6104 pvalues[i].vtype = 0;
6105 pvalues[i].vvalue = 0;
6106 pvalues[i].vlength = 0;
6107 pvalues[i].voffset = 0;
6108 pvalues[i].hfname = 0;
6109 pvalues[i].vdesc = "";
6110 string_buffer[i][0] = '\0';
6111 pvalues[i].vstring = string_buffer[i];
6112 pvalues[i].mvtype = 0;
6114 verb_string = val_to_str(request_value->nds_request_verb,
6115 ncp_nds_verb_vals, "Continuation Fragment");
6116 switch (request_value->nds_request_verb)
6119 if(request_value->nds_version < 2)
6121 pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
6122 pvalues[0].vstring = (char *)match_strval(pvalues[0].vvalue, nds_tags);
6123 if(pvalues[0].vstring == NULL)
6125 pvalues[0].vstring = "No Tags Set";
6127 pvalues[0].vtype = VTYPE_STRING;
6128 pvalues[0].vdesc = "Tag: %s";
6129 pvalues[0].vlength = 4;
6130 pvalues[0].voffset = nds_offset;
6131 pvalues[0].hfname = hf_nds_tag_string;
6132 nds_offset = nds_offset+pvalues[0].vlength;
6133 switch(pvalues[0].vvalue)
6135 case NDS_TAG_NO_SUCH_ENTRY:
6137 case NDS_TAG_LOCAL_ENTRY:
6138 pvalues[1].vvalue = tvb_get_letohl(tvb, nds_offset);
6139 pvalues[1].vtype = VTYPE_UINT32;
6140 pvalues[1].vdesc = "Entry ID: 0x%08x";
6143 strcpy(global_object_name, request_value->object_name);
6144 global_eid = pvalues[1].vvalue;
6145 pvalues[1].vlength = 4;
6146 pvalues[1].voffset = nds_offset;
6147 pvalues[1].hfname = hf_nds_eid;
6148 nds_offset = nds_offset+pvalues[1].vlength;
6149 pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);
6150 pvalues[2].vtype = VTYPE_MULTIVALUE_UINT32;
6151 pvalues[2].vdesc = "Referral Records: %u";
6152 pvalues[2].vlength = 4;
6153 pvalues[2].voffset = nds_offset;
6154 pvalues[2].hfname = hf_nds_referrals;
6155 pvalues[2].mvtype = MVTYPE_LOC_ADDR_REFERRAL_REPLY;
6157 case NDS_TAG_REMOTE_ENTRY:
6158 nds_offset += 4; /* GUINT32 reserved field */
6159 pvalues[1].vvalue = tvb_get_letohl(tvb, nds_offset);
6160 pvalues[1].vtype = VTYPE_UINT32;
6161 pvalues[1].vdesc = "Entry ID: 0x%08x";
6164 global_eid = pvalues[1].vvalue;
6165 strcpy(global_object_name, request_value->object_name);
6166 pvalues[1].vlength = 4;
6167 pvalues[1].voffset = nds_offset;
6168 pvalues[1].hfname = hf_nds_eid;
6169 nds_offset = nds_offset+pvalues[1].vlength;
6170 pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);
6171 pvalues[2].vtype = VTYPE_MULTIVALUE_UINT32;
6172 pvalues[2].vdesc = "Referral Records: %u";
6173 pvalues[2].vlength = 4;
6174 pvalues[2].voffset = nds_offset;
6175 pvalues[2].hfname = hf_nds_referrals;
6176 pvalues[2].mvtype = MVTYPE_LOC_ADDR_REFERRAL_REPLY;
6178 case NDS_TAG_ALIAS_ENTRY:
6179 pvalues[1].vtype = VTYPE_STRING;
6180 pvalues[1].vdesc = "Alias Name: %s";
6181 pvalues[1].mvtype = MVTYPE_ATTR_REQUEST;
6182 pvalues[1].vvalue = 0;
6183 pvalues[1].vlength = 256;
6184 pvalues[1].vlength = tvb_get_letohl(tvb, nds_offset);
6185 if (pvalues[1].vlength == 0x00)
6187 pvalues[1].vtype = VTYPE_NONE;
6190 pvalues[1].voffset = nds_offset+4;
6192 get_string(tvb, pvalues[1].voffset, pvalues[1].vlength, pvalues[1].vstring);
6193 nds_offset += pvalues[1].vlength;
6194 nds_offset += align_4(tvb, nds_offset);
6195 pvalues[1].hfname= hf_nds_name;
6197 case NDS_TAG_REFERRAL_INFORMATION:
6198 pvalues[1].vvalue = tvb_get_letohl(tvb, nds_offset);
6199 pvalues[1].vtype = VTYPE_UINT32;
6200 pvalues[1].vdesc = "Distance Object is From Root: 0x%08x";
6201 pvalues[1].vlength = 4;
6202 pvalues[1].voffset = nds_offset;
6203 pvalues[1].hfname = hf_nds_eid;
6204 nds_offset = nds_offset+pvalues[1].vlength;
6205 pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);
6206 pvalues[2].vtype = VTYPE_MULTIVALUE_UINT32;
6207 pvalues[2].vdesc = "Referral Records: %u";
6208 pvalues[2].vlength = 4;
6209 pvalues[2].voffset = nds_offset;
6210 pvalues[2].hfname = hf_nds_depth;
6211 pvalues[2].mvtype = MVTYPE_ADDR_REFERRAL_REPLY;
6213 case NDS_TAG_ENTRY_AND_REFERRALS:
6214 pvalues[1].vvalue = tvb_get_letohl(tvb, nds_offset);
6215 pvalues[1].vtype = VTYPE_UINT32;
6216 pvalues[1].vdesc = "Result Flags: 0x%08x";
6217 pvalues[1].vlength = 4;
6218 pvalues[1].voffset = nds_offset;
6219 pvalues[1].hfname = hf_nds_result_flags;
6220 nds_offset = nds_offset+pvalues[1].vlength;
6221 pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);
6222 pvalues[2].vtype = VTYPE_UINT32;
6223 pvalues[2].vdesc = "Entry ID: 0x%08x";
6226 global_eid = pvalues[2].vvalue;
6227 strcpy(global_object_name, request_value->object_name);
6228 pvalues[2].vlength = 4;
6229 pvalues[2].voffset = nds_offset;
6230 pvalues[2].hfname = hf_nds_eid;
6231 nds_offset = nds_offset+pvalues[2].vlength;
6232 pvalues[3].vvalue = tvb_get_letohl(tvb, nds_offset);
6233 pvalues[3].vtype = VTYPE_MULTIVALUE_UINT32;
6234 pvalues[3].vdesc = "Referral Records: %u";
6235 pvalues[3].vlength = 4;
6236 pvalues[3].voffset = nds_offset;
6237 pvalues[3].mvtype = MVTYPE_ADDR_REFERRAL_REPLY;
6238 pvalues[3].hfname = hf_nds_referrals;
6246 pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
6247 pvalues[0].vtype = VTYPE_UINT32;
6248 pvalues[0].vdesc = "CRC: 0x%08x";
6249 pvalues[0].vlength = 4;
6250 pvalues[0].voffset = nds_offset;
6251 pvalues[0].hfname = hf_nds_crc;
6252 nds_offset = nds_offset+pvalues[0].vlength;
6253 pvalues[1].vvalue = tvb_get_letohl(tvb, nds_offset);
6254 pvalues[1].vstring = (char *)match_strval(pvalues[1].vvalue, nds_tags);
6255 if(pvalues[1].vstring == NULL)
6257 pvalues[1].vstring = "No Tags Set";
6259 pvalues[1].vtype = VTYPE_STRING;
6260 pvalues[1].vdesc = "Tag: %s";
6261 pvalues[1].vlength = 4;
6262 pvalues[1].voffset = nds_offset;
6263 nds_offset = nds_offset+pvalues[1].vlength;
6264 pvalues[1].hfname = hf_nds_tag_string;
6265 switch(pvalues[1].vvalue)
6267 case NDS_TAG_NO_SUCH_ENTRY:
6269 case NDS_TAG_LOCAL_ENTRY:
6270 pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);
6271 pvalues[2].vtype = VTYPE_UINT32;
6272 pvalues[2].vdesc = "Entry ID: 0x%08x";
6275 global_eid = pvalues[2].vvalue;
6276 strcpy(global_object_name, request_value->object_name);
6277 pvalues[2].vlength = 4;
6278 pvalues[2].voffset = nds_offset;
6279 pvalues[2].hfname = hf_nds_eid;
6280 nds_offset = nds_offset+pvalues[2].vlength;
6281 pvalues[3].vvalue = tvb_get_letohl(tvb, nds_offset);
6282 pvalues[3].vtype = VTYPE_MULTIVALUE_UINT32;
6283 pvalues[3].vdesc = "Referral Records: %u";
6284 pvalues[3].vlength = 4;
6285 pvalues[3].voffset = nds_offset;
6286 pvalues[3].hfname = hf_nds_referrals;
6287 pvalues[3].mvtype = MVTYPE_LOC_ADDR_REFERRAL_REPLY;
6289 case NDS_TAG_REMOTE_ENTRY:
6290 nds_offset += 4; /* GUINT32 reserved field */
6291 pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);
6294 global_eid = pvalues[2].vvalue;
6295 strcpy(global_object_name, request_value->object_name);
6296 pvalues[2].vtype = VTYPE_UINT32;
6297 pvalues[2].vdesc = "Entry ID: 0x%08x";
6298 pvalues[2].vlength = 4;
6299 pvalues[2].voffset = nds_offset;
6300 pvalues[2].hfname = hf_nds_eid;
6301 nds_offset = nds_offset+pvalues[2].vlength;
6302 pvalues[3].vvalue = tvb_get_letohl(tvb, nds_offset);
6303 pvalues[3].vtype = VTYPE_MULTIVALUE_UINT32;
6304 pvalues[3].vdesc = "Referral Records: %u";
6305 pvalues[3].vlength = 4;
6306 pvalues[3].voffset = nds_offset;
6307 pvalues[3].hfname = hf_nds_referrals;
6308 pvalues[3].mvtype = MVTYPE_LOC_ADDR_REFERRAL_REPLY;
6310 case NDS_TAG_ALIAS_ENTRY:
6311 pvalues[2].vtype = VTYPE_STRING;
6312 pvalues[2].vdesc = "Alias Name: %s";
6313 pvalues[2].mvtype = MVTYPE_ATTR_REQUEST;
6314 pvalues[2].vvalue = 0;
6315 pvalues[2].vlength = 256;
6316 pvalues[2].vlength = tvb_get_letohl(tvb, nds_offset);
6317 if (pvalues[2].vlength == 0x00)
6319 pvalues[2].vtype = VTYPE_NONE;
6322 pvalues[2].voffset = nds_offset+4;
6324 get_string(tvb, pvalues[2].voffset, pvalues[2].vlength, pvalues[2].vstring);
6325 nds_offset += pvalues[2].vlength;
6326 nds_offset += align_4(tvb, nds_offset);
6327 pvalues[2].hfname= hf_nds_name;
6329 case NDS_TAG_REFERRAL_INFORMATION:
6330 pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);
6331 pvalues[2].vtype = VTYPE_UINT32;
6332 pvalues[2].vdesc = "Distance Object is From Root: 0x%08x";
6333 pvalues[2].vlength = 4;
6334 pvalues[2].voffset = nds_offset;
6335 pvalues[2].hfname = hf_nds_eid;
6336 nds_offset = nds_offset+pvalues[2].vlength;
6337 pvalues[3].vvalue = tvb_get_letohl(tvb, nds_offset);
6338 pvalues[3].vtype = VTYPE_MULTIVALUE_UINT32;
6339 pvalues[3].vdesc = "Referral Records: %u";
6340 pvalues[3].vlength = 4;
6341 pvalues[3].voffset = nds_offset;
6342 pvalues[3].hfname = hf_nds_depth;
6343 pvalues[3].mvtype = MVTYPE_ADDR_REFERRAL_REPLY;
6345 case NDS_TAG_ENTRY_AND_REFERRALS:
6346 pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);
6347 pvalues[2].vtype = VTYPE_UINT32;
6348 pvalues[2].vdesc = "Result Flags: 0x%08x";
6349 pvalues[2].vlength = 4;
6350 pvalues[2].voffset = nds_offset;
6351 pvalues[2].hfname = hf_nds_result_flags;
6352 nds_offset = nds_offset+pvalues[2].vlength;
6353 pvalues[3].vvalue = tvb_get_letohl(tvb, nds_offset);
6354 pvalues[3].vtype = VTYPE_UINT32;
6355 pvalues[3].vdesc = "Entry ID: 0x%08x";
6358 strcpy(global_object_name, request_value->object_name);
6359 global_eid = pvalues[3].vvalue;
6360 pvalues[3].vlength = 4;
6361 pvalues[3].voffset = nds_offset;
6362 pvalues[3].hfname = hf_nds_eid;
6363 nds_offset = nds_offset+pvalues[3].vlength;
6364 pvalues[4].vvalue = tvb_get_letohl(tvb, nds_offset);
6365 pvalues[4].vtype = VTYPE_MULTIVALUE_UINT32;
6366 pvalues[4].vdesc = "Referral Records: %u";
6367 pvalues[4].vlength = 4;
6368 pvalues[4].voffset = nds_offset;
6369 pvalues[4].mvtype = MVTYPE_ADDR_REFERRAL_REPLY;
6370 pvalues[4].hfname = hf_nds_referrals;
6379 if(request_value->nds_version != 0x000000fe)
6381 pvalues[0].vvalue = 1;
6382 pvalues[0].vtype = VTYPE_MULTIVALUE_UINT32;
6383 pvalues[0].vdesc = "Entry Information";
6384 pvalues[0].vlength = 0;
6385 pvalues[0].voffset = nds_offset-4;
6386 pvalues[0].hfname = hf_nds_name;
6387 pvalues[0].mvtype = MVTYPE_LIST_PARTITIONS;
6388 pvalues[0].vflags = request_value->req_nds_flags;
6392 pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
6393 pvalues[0].vtype = VTYPE_UINT32;
6394 pvalues[0].vdesc = "CRC: 0x%08x";
6395 pvalues[0].vlength = 4;
6396 pvalues[0].voffset = nds_offset;
6397 pvalues[0].hfname = hf_nds_crc;
6398 nds_offset = nds_offset+pvalues[0].vlength;
6399 pvalues[1].vvalue = 1;
6400 pvalues[1].vtype = VTYPE_MULTIVALUE_UINT32;
6401 pvalues[1].vdesc = "Entry Information";
6402 pvalues[1].vlength = 0;
6403 pvalues[1].voffset = nds_offset-4;
6404 pvalues[1].hfname = hf_nds_name;
6405 pvalues[1].mvtype = MVTYPE_LIST_PARTITIONS;
6406 pvalues[1].vflags = request_value->req_nds_flags;
6410 if(request_value->nds_version != 0x000000fe)
6412 pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
6413 pvalues[0].vtype = VTYPE_UINT32;
6414 pvalues[0].vdesc = "Iteration Handle: 0x%08x";
6415 pvalues[0].vlength = 4;
6416 pvalues[0].voffset = nds_offset;
6417 pvalues[0].hfname = hf_nds_iteration;
6418 nds_offset = nds_offset+pvalues[0].vlength;
6419 pvalues[1].vvalue = tvb_get_letohl(tvb, nds_offset);
6420 pvalues[1].vstring = (char *)match_strval(pvalues[1].vvalue, nds_info_type);
6421 if(pvalues[1].vstring == NULL)
6423 pvalues[1].vstring = "No Info Type Set";
6425 pvalues[1].vtype = VTYPE_STRING;
6426 pvalues[1].vdesc = "Info Type: %s";
6427 pvalues[1].vlength = 4;
6428 pvalues[1].voffset = nds_offset;
6429 pvalues[1].hfname = hf_nds_info_type;
6430 nds_offset = nds_offset+pvalues[1].vlength;
6431 pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);
6432 pvalues[2].vtype = VTYPE_MULTIVALUE_UINT32;
6433 pvalues[2].vdesc = "Number of Attributes: %u";
6434 pvalues[2].vlength = 4;
6435 pvalues[2].voffset = nds_offset;
6436 pvalues[2].hfname = hf_nds_attr;
6437 pvalues[2].mvtype = MVTYPE_ATTR_REPLY;
6438 pvalues[2].vflags = request_value->req_nds_flags;
6439 pvalues[2].nds_version = request_value->nds_version;
6443 pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
6444 pvalues[0].vtype = VTYPE_UINT32;
6445 pvalues[0].vdesc = "CRC: 0x%08x";
6446 pvalues[0].vlength = 4;
6447 pvalues[0].voffset = nds_offset;
6448 pvalues[0].hfname = hf_nds_crc;
6449 nds_offset = nds_offset+pvalues[0].vlength;
6450 pvalues[1].vvalue = tvb_get_letohl(tvb, nds_offset);
6451 pvalues[1].vtype = VTYPE_UINT32;
6452 pvalues[1].vdesc = "Iteration Handle: 0x%08x";
6453 pvalues[1].vlength = 4;
6454 pvalues[1].voffset = nds_offset;
6455 pvalues[1].hfname = hf_nds_iteration;
6456 nds_offset = nds_offset+pvalues[1].vlength;
6457 pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);
6458 pvalues[2].vstring = (char *)match_strval(pvalues[2].vvalue, nds_info_type);
6459 if(pvalues[2].vstring == NULL)
6461 pvalues[2].vstring = "No Info Type Set";
6463 pvalues[2].vtype = VTYPE_STRING;
6464 pvalues[2].vdesc = "Info Type: %s";
6465 pvalues[2].vlength = 4;
6466 pvalues[2].voffset = nds_offset;
6467 pvalues[2].hfname = hf_nds_info_type;
6468 nds_offset = nds_offset+pvalues[2].vlength;
6469 pvalues[3].vvalue = tvb_get_letohl(tvb, nds_offset);
6470 pvalues[3].vtype = VTYPE_MULTIVALUE_UINT32;
6471 pvalues[3].vdesc = "Number of Attributes: %u";
6472 pvalues[3].vlength = 4;
6473 pvalues[3].voffset = nds_offset;
6474 pvalues[3].hfname = hf_nds_attr;
6475 pvalues[3].mvtype = MVTYPE_ATTR_REPLY;
6476 pvalues[3].vflags = request_value->req_nds_flags;
6477 pvalues[3].nds_version = request_value->nds_version;
6481 pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
6482 if (pvalues[0].vvalue == 0x00000000)
6484 pvalues[0].vstring = "Did Not Match";
6488 pvalues[0].vstring = "Matched";
6490 pvalues[0].vtype = VTYPE_STRING;
6491 pvalues[0].vdesc = "Compare Values Returned - %s";
6492 pvalues[0].vlength = 4;
6493 pvalues[0].voffset = nds_offset;
6494 pvalues[0].mvtype = 0;
6495 pvalues[0].hfname= hf_nds_compare_results;
6496 nds_offset += pvalues[0].vlength;
6499 pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
6500 pvalues[0].vtype = VTYPE_UINT32;
6501 pvalues[0].vdesc = "Iteration Handle: 0x%08x";
6502 pvalues[0].vlength = 4;
6503 pvalues[0].voffset = nds_offset;
6504 pvalues[0].hfname = hf_nds_iteration;
6505 nds_offset = nds_offset+pvalues[0].vlength;
6506 pvalues[1].vvalue = tvb_get_letohl(tvb, nds_offset);
6507 pvalues[1].vtype = VTYPE_MULTIVALUE_UINT32;
6508 pvalues[1].vdesc = "Entry Information";
6509 pvalues[1].vlength = 0;
6510 pvalues[1].voffset = nds_offset;
6511 pvalues[1].hfname = hf_nds_name;
6512 pvalues[1].mvtype = MVTYPE_LIST_PARTITIONS;
6513 pvalues[1].vflags = request_value->req_nds_flags;
6534 pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
6535 pvalues[0].vtype = VTYPE_UINT32;
6536 pvalues[0].vdesc = "Iteration Handle: 0x%08x";
6537 pvalues[0].vlength = 4;
6538 pvalues[0].voffset = nds_offset;
6539 pvalues[0].hfname = hf_nds_iteration;
6540 nds_offset = nds_offset+pvalues[0].vlength;
6541 pvalues[1].vvalue = tvb_get_letohl(tvb, nds_offset);
6542 pvalues[1].vstring = (char *)match_strval(pvalues[1].vvalue, class_def_type);
6543 if(pvalues[1].vstring == NULL)
6545 pvalues[1].vstring = "No Class Definition Type Set";
6547 pvalues[1].vtype = VTYPE_STRING;
6548 pvalues[1].vdesc = "Class Definition Type: %s";
6549 pvalues[1].vlength = 4;
6550 pvalues[1].voffset = nds_offset;
6551 pvalues[1].mvtype = 0;
6552 pvalues[1].hfname= hf_nds_class_def_type;
6553 nds_offset = nds_offset + pvalues[1].vlength;
6554 pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);;
6555 pvalues[2].vtype = VTYPE_MULTIVALUE_UINT32;
6556 pvalues[2].vdesc = "Class Definitions %u";
6557 pvalues[2].vlength = 0;
6558 pvalues[2].voffset = nds_offset;
6559 pvalues[2].hfname = hf_nds_classes;
6560 pvalues[2].mvtype = MVTYPE_CLASS_NAMES;
6561 pvalues[2].vflags = request_value->req_nds_flags;
6568 pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
6569 pvalues[0].vtype = VTYPE_UINT32;
6570 pvalues[0].vdesc = "Iteration Handle: 0x%08x";
6571 pvalues[0].vlength = 4;
6572 pvalues[0].voffset = nds_offset;
6573 pvalues[0].hfname = hf_nds_iteration;
6574 nds_offset = nds_offset+pvalues[0].vlength;
6575 pvalues[1].vvalue = tvb_get_letohl(tvb, nds_offset);
6576 pvalues[1].vtype = VTYPE_MULTIVALUE_UINT32;
6577 pvalues[1].vdesc = "Classes: %u";
6578 pvalues[1].vlength = 4;
6579 pvalues[1].voffset = nds_offset;
6580 pvalues[1].mvtype = MVTYPE_READ_CLASS_REQ;
6581 pvalues[1].hfname= hf_nds_classes;
6584 pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
6585 pvalues[0].vtype = VTYPE_UINT32;
6586 pvalues[0].vdesc = "Privileges: 0x%08x";
6587 pvalues[0].vlength = 4;
6588 pvalues[0].voffset = nds_offset;
6589 pvalues[0].hfname = hf_nds_privileges;
6590 nds_offset = nds_offset+pvalues[0].vlength;
6597 pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
6598 pvalues[0].vtype = VTYPE_UINT32;
6599 pvalues[0].vdesc = "Iteration Handle: 0x%08x";
6600 pvalues[0].vlength = 4;
6601 pvalues[0].voffset = nds_offset;
6602 pvalues[0].hfname = hf_nds_iteration;
6603 nds_offset = nds_offset+pvalues[0].vlength;
6604 pvalues[1].vtype = VTYPE_STRING;
6605 pvalues[1].vdesc = "Server Distinguished Name: %s";
6606 pvalues[1].mvtype = MVTYPE_ATTR_REQUEST;
6607 pvalues[1].vvalue = 0;
6608 pvalues[1].vlength = 256;
6609 pvalues[1].vlength = tvb_get_letohl(tvb, nds_offset);
6610 if (pvalues[1].vlength == 0x00)
6612 pvalues[1].vtype = VTYPE_NONE;
6615 pvalues[1].voffset = nds_offset+4;
6617 get_string(tvb, pvalues[1].voffset, pvalues[1].vlength, pvalues[1].vstring);
6618 nds_offset += pvalues[1].vlength;
6619 nds_offset += align_4(tvb, nds_offset);
6620 pvalues[1].hfname= hf_nds_name;
6621 nds_offset += align_4(tvb, nds_offset);
6622 pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);
6623 pvalues[2].vtype = VTYPE_MULTIVALUE_UINT32;
6624 pvalues[2].vdesc = "Replicas: %u";
6625 pvalues[2].vlength = 4;
6626 pvalues[2].voffset = nds_offset;
6627 pvalues[2].hfname = hf_nds_replicas;
6628 pvalues[2].mvtype = MVTYPE_READ_REPLICAS;
6629 pvalues[2].bit1 = "Output Flags";
6630 pvalues[2].bit2 = "Entry ID";
6631 pvalues[2].bit3 = "Replica State";
6632 pvalues[2].bit4 = "Modification Timestamp";
6633 pvalues[2].bit5 = "Purge Time";
6634 pvalues[2].bit6 = "Local Partition ID";
6635 pvalues[2].bit7 = "Distinguished Name";
6636 pvalues[2].bit8 = "Replica Type";
6637 pvalues[2].bit9 = "Partition Busy";
6638 pvalues[2].vflags = request_value->req_nds_flags;
6649 pvalues[0].vvalue = tvb_get_ntohl(tvb, nds_offset);
6650 pvalues[0].vtype = VTYPE_UINT32;
6651 pvalues[0].vdesc = "File Handle: 0x%08x";
6652 pvalues[0].vlength = 4;
6653 pvalues[0].voffset = nds_offset;
6654 pvalues[0].hfname = hf_nds_file_handle;
6655 nds_offset = nds_offset+pvalues[0].vlength;
6656 pvalues[1].vvalue = tvb_get_letohl(tvb, nds_offset);
6657 pvalues[1].vtype = VTYPE_UINT32;
6658 pvalues[1].vdesc = "File Size: %u";
6659 pvalues[1].vlength = 4;
6660 pvalues[1].voffset = nds_offset;
6661 pvalues[1].hfname = hf_nds_file_size;
6662 nds_offset = nds_offset+pvalues[1].vlength;
6715 if(request_value->nds_version != 0x000000fe)
6717 pvalues[0].vtype = VTYPE_STRING;
6718 pvalues[0].vdesc = "Distinguished Name: %s";
6719 pvalues[0].mvtype = MVTYPE_ATTR_REQUEST;
6720 pvalues[0].vvalue = 0;
6721 pvalues[0].vlength = 256;
6722 pvalues[0].vlength = tvb_get_letohl(tvb, nds_offset);
6723 if (pvalues[0].vlength == 0x00)
6725 pvalues[0].vtype = VTYPE_NONE;
6728 pvalues[0].voffset = nds_offset+4;
6730 get_string(tvb, pvalues[0].voffset, pvalues[0].vlength, pvalues[0].vstring);
6731 nds_offset += pvalues[0].vlength;
6732 nds_offset += align_4(tvb, nds_offset);
6733 pvalues[0].hfname= hf_nds_name;
6734 pvalues[1].vvalue = tvb_get_letohl(tvb, nds_offset);
6735 pvalues[1].vtype = VTYPE_MULTIVALUE_UINT32;
6736 pvalues[1].vdesc = "Referral Records: %u";
6737 pvalues[1].vlength = 4;
6738 pvalues[1].voffset = nds_offset;
6739 pvalues[1].hfname = hf_nds_referrals;
6740 pvalues[1].mvtype = MVTYPE_LOC_ADDR_REFERRAL_REPLY;
6744 pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
6745 pvalues[0].vtype = VTYPE_UINT32;
6746 pvalues[0].vdesc = "Iteration Handle: 0x%08x";
6747 pvalues[0].vlength = 4;
6748 pvalues[0].voffset = nds_offset;
6749 pvalues[0].hfname = hf_nds_iteration;
6750 nds_offset = nds_offset+pvalues[0].vlength;
6751 pvalues[1].vtype = VTYPE_STRING;
6752 pvalues[1].vdesc = "Distinguished Name: %s";
6753 pvalues[1].mvtype = MVTYPE_ATTR_REQUEST;
6754 pvalues[1].vvalue = 0;
6755 pvalues[1].vlength = 256;
6756 pvalues[1].vlength = tvb_get_letohl(tvb, nds_offset);
6757 if (pvalues[1].vlength == 0x00)
6759 pvalues[1].vtype = VTYPE_NONE;
6762 pvalues[1].voffset = nds_offset+4;
6764 get_string(tvb, pvalues[1].voffset, pvalues[1].vlength, pvalues[1].vstring);
6765 nds_offset += pvalues[1].vlength;
6766 nds_offset += align_4(tvb, nds_offset);
6767 pvalues[1].hfname= hf_nds_name;
6768 pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);
6769 pvalues[2].vtype = VTYPE_MULTIVALUE_UINT32;
6770 pvalues[2].vdesc = "Referral Records: %u";
6771 pvalues[2].vlength = 4;
6772 pvalues[2].voffset = nds_offset;
6773 pvalues[2].hfname = hf_nds_referrals;
6774 pvalues[2].mvtype = MVTYPE_LOC_ADDR_REFERRAL_REPLY;
6828 if(request_value->nds_request_verb != 0)
6830 proto_tree_add_uint_format(ncp_tree,
6831 hf_ncp_nds_verb, tvb, 6, 0,
6832 request_value->nds_request_verb,
6834 request_value->nds_request_verb, verb_string);
6836 /* NDS Entry ID's (EID) is identified in the reply
6837 * packet of an NDS resolve name. We need to store
6838 * this EID and its associated name into our hash
6839 * so that we can resolve the name for other NDS
6841 if (!pinfo->fd->flags.visited) {
6844 request_eid_value = ncp_eid_hash_lookup(conversation, global_eid);
6845 if (!request_eid_value) {
6846 request_eid_value = ncp_eid_hash_insert(global_eid);
6847 strcpy(request_eid_value->object_name, global_object_name);
6851 /* Echo EID data to expert Chat window */
6852 if (add_eid && nds_echo_eid) {
6853 expert_add_info_format(pinfo, NULL,
6854 PI_RESPONSE_CODE, PI_CHAT,
6855 "EID (%08x) = %s", global_eid, global_object_name);
6857 /* For NDS requests with just an EID, resolve name
6858 * from hash table. */
6861 request_eid_value = ncp_eid_hash_lookup(conversation, global_eid);
6862 if (request_eid_value) {
6863 strcpy(global_object_name, request_eid_value->object_name);
6864 proto_tree_add_string_format(ncp_tree,
6865 hf_nds_name, tvb, 6, 0,
6867 "NDS Name for EID - %s",
6868 global_object_name);
6871 for (i = 0; i < 9; i++) {
6872 switch (pvalues[i].vtype) {
6874 case VTYPE_NONE: /* no value */
6878 proto_tree_add_uint_format(ncp_tree, pvalues[i].hfname, tvb, pvalues[i].voffset,
6879 pvalues[i].vlength, pvalues[i].vtype, "NDS Parameter not defined %u",
6884 proto_tree_add_uint_format(ncp_tree, pvalues[i].hfname, tvb, pvalues[i].voffset,
6885 pvalues[i].vlength, pvalues[i].vtype, "NDS Parameter not defined %u",
6890 proto_tree_add_uint_format(ncp_tree, pvalues[i].hfname, tvb, pvalues[i].voffset,
6891 pvalues[i].vlength, pvalues[i].vvalue, pvalues[i].vdesc,
6896 proto_tree_add_string_format(ncp_tree, pvalues[i].hfname, tvb, pvalues[i].voffset,
6897 pvalues[i].vlength, pvalues[i].vstring, pvalues[i].vdesc,
6898 pvalues[i].vstring);
6901 case VTYPE_BITFIELD:
6902 process_bitfield(ncp_tree, tvb, &pvalues[i]);
6905 case VTYPE_MULTIVALUE_UINT32:
6906 process_multivalues(ncp_tree, tvb, &pvalues[i]);
6910 proto_tree_add_uint_format(ncp_tree, hf_nds_p1type, tvb, pvalues[i].voffset,
6911 pvalues[i].vlength, pvalues[i].vtype, "NDS Parameter not defined %u",
6920 dissect_ncp_reply(tvbuff_t *tvb, packet_info *pinfo,
6921 guint32 nw_connection, guint8 sequence, guint16 type,
6922 proto_tree *ncp_tree, struct novell_tap *ncp_tap)
6924 conversation_t *conversation = NULL;
6925 ncp_req_hash_value *request_value = NULL;
6926 const ncp_record *ncp_rec = NULL;
6927 int *req_cond_results;
6928 guint8 completion_code=0;
6929 ptvcursor_t *ptvc = NULL;
6930 const char *error_string;
6931 guint32 nds_offset = 0;
6932 guint32 nds_error_code = 0;
6933 guint32 nds_reply_buffer = 0;
6934 const char *nds_error_string = NULL;
6937 #ifdef FAKE_TREE_IS_VISIBLE
6939 PTREE_DATA(ncp_tree)->visible=1;
6943 if (!pinfo->fd->flags.visited) {
6944 /* Find the conversation whence the request would have come. */
6945 conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
6946 PT_NCP, nw_connection, nw_connection, 0);
6947 if (conversation != NULL) {
6948 /* find the record telling us the request made that caused
6950 request_value = ncp_hash_lookup(conversation, sequence);
6951 if (request_value) {
6952 ncp_rec = request_value->ncp_rec;
6954 p_add_proto_data(pinfo->fd, proto_ncp, (void*) request_value);
6956 /* else... we haven't seen an NCP Request for that conversation
6958 Create Service request packets do not contain nw_connection.
6959 The initial value is set to 65535 or 0. The reply packet has the
6960 valid connection. So, we can't find the request packet in
6961 our conversation list. To trap for this we can just perform
6962 the search again with 65535 to see if we can locate the
6963 proper request packet. */
6965 conversation = find_conversation(pinfo->fd->num,
6966 &pinfo->src, &pinfo->dst, PT_NCP, 65535, 65535, 0);
6967 if (conversation != NULL) {
6968 /* find the record telling us the request made
6969 that caused this reply */
6970 request_value = ncp_hash_lookup(conversation,
6972 if (request_value) {
6973 ncp_rec = request_value->ncp_rec;
6975 p_add_proto_data(pinfo->fd, proto_ncp,
6976 (void*) request_value);
6979 conversation = find_conversation(pinfo->fd->num,
6980 &pinfo->src, &pinfo->dst, PT_NCP, 0, 0, 0);
6981 if (conversation != NULL) {
6982 /* find the record telling us the request made
6983 that caused this reply */
6984 request_value = ncp_hash_lookup(conversation,
6986 if (request_value) {
6987 ncp_rec = request_value->ncp_rec;
6989 p_add_proto_data(pinfo->fd, proto_ncp,
6990 (void*) request_value);
6992 /* else... we haven't seen an NCP Request for that
6993 conversation and sequence. */
6998 request_value = p_get_proto_data(pinfo->fd, proto_ncp);
6999 if (request_value) {
7000 ncp_rec = request_value->ncp_rec;
7005 * Tap the packet before the dissectors are called so we
7006 * still get the tap listener called even if there is an
7009 tap_queue_packet(ncp_tap->stat, pinfo, request_value);
7011 if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
7012 if (ncp_rec && ncp_rec->func==0x68 &&
7013 (ncp_rec->subfunc==0x02 || ncp_rec->subfunc==0x01)) {
7014 col_set_str(pinfo->cinfo, COL_PROTOCOL, "NDS");
7018 /* A completion code of 0 always means OK. Non-zero means failure,
7019 * but each non-zero value has a different meaning. And the same value
7020 * can have different meanings, depending on the ncp.func (and ncp.subfunc)
7022 completion_code = tvb_get_guint8(tvb, 6);
7023 if (completion_code == 0) {
7024 if(type == NCP_POSITIVE_ACK)
7026 error_string = "Server Busy, Request Being Processed";
7030 error_string = "OK";
7033 if (ncp_rec && ncp_rec->errors) {
7034 error_string = ncp_error_string(ncp_rec->errors, completion_code);
7037 error_string = "Original Request Packet not Found";
7040 if (type == NCP_SERVICE_REPLY && ncp_rec && ncp_rec->func==0x68 &&
7041 ncp_rec->subfunc==0x02)
7044 nds_reply_buffer = tvb_get_letohl(tvb, nds_offset);
7046 nds_frag = tvb_get_letohl(tvb, nds_offset);
7049 * Is the possibly-reassembled reply large enough to have
7050 * a completion code? (We can't check the fragment size
7051 * as this might just be the last fragment.)
7053 if (tvb_reported_length_remaining(tvb, nds_offset) >= 4)
7055 /* Yes - process the completion code. */
7056 nds_error_code = tvb_get_letohl(tvb, nds_offset);
7057 nds_error_string = match_strval(nds_error_code, nds_reply_errors);
7058 if (nds_error_string == NULL)
7060 nds_error_string = "NDS Error - No Definition Found";
7064 if (check_col(pinfo->cinfo, COL_INFO)) {
7065 col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s",
7066 type == NCP_SERVICE_REPLY ? "R" : "ACK",
7067 nds_error_string ? nds_error_string : error_string);
7072 if (request_value) {
7075 proto_tree_add_uint(ncp_tree, hf_ncp_req_frame_num, tvb, 0, 0,
7076 request_value->req_frame_num);
7077 nstime_delta(&ns, &pinfo->fd->abs_ts, &request_value->req_frame_time);
7078 proto_tree_add_time(ncp_tree, hf_ncp_req_frame_time, tvb, 0, 0, &ns);
7081 /* Put the func (and maybe subfunc) from the request packet
7082 * in the proto tree, but hidden. That way filters on ncp.func
7083 * or ncp.subfunc will find both the requests and the replies.
7086 proto_tree_add_uint_format(ncp_tree, hf_ncp_func, tvb, 6, 0,
7087 ncp_rec->func, "Function: %u (0x%02X), %s",
7088 ncp_rec->func, ncp_rec->func, ncp_rec->name);
7089 if (ncp_requires_subfunc(ncp_rec->func)) {
7090 proto_tree_add_uint_format(ncp_tree, hf_ncp_subfunc, tvb, 6, 0,
7091 ncp_rec->subfunc, "SubFunction: %u (0x%02x)",
7092 ncp_rec->subfunc, ncp_rec->subfunc);
7097 expert_item = proto_tree_add_uint_format(ncp_tree, hf_ncp_completion_code, tvb, 6, 1,
7098 completion_code, "Completion Code: %d (0x89%02x), %s",
7099 completion_code, completion_code, error_string);
7100 if ((completion_code != 0 || type == NCP_POSITIVE_ACK) && ncp_echo_err) {
7101 expert_add_info_format(pinfo, expert_item,
7102 PI_RESPONSE_CODE, PI_ERROR,
7103 "Error: %d (0x89%02x) %s", completion_code,
7104 completion_code, error_string);
7108 proto_tree_add_item(ncp_tree, hf_ncp_connection_status, tvb,
7112 * Unless this is a successful reply, that's all there
7115 if (type != NCP_SERVICE_REPLY || completion_code != 0)
7119 /* Dissect SSS Reply packets */
7120 if (ncp_rec->func == 0x5c && request_value)
7122 dissect_sss_reply(tvb, pinfo, ncp_tree, ncp_rec->subfunc, request_value);
7124 /* Dissect NMAS Reply packets */
7125 if (ncp_rec->func == 0x5e && request_value)
7127 dissect_nmas_reply(tvb, pinfo, ncp_tree, ncp_rec->func, ncp_rec->subfunc, request_value);
7129 /* Dissect NDS Ping packets */
7130 if (ncp_rec->func == 0x68 && ncp_rec->subfunc == 0x01)
7132 dissect_nds_ping_reply(tvb, pinfo, ncp_tree,
7135 /* Dissect NDS Reply packets */
7136 if (ncp_rec->func == 0x68 && ncp_rec->subfunc == 0x02)
7138 dissect_nds_reply(tvb, pinfo, ncp_tree, nds_error_code,
7139 nds_error_string, request_value, conversation);
7141 /* Echo expert data for connection request/reply */
7142 /*if (ncp_rec->func == 241 && ncp_echo_conn) {
7143 expert_add_info_format(pinfo, NULL, PI_RESPONSE_CODE, PI_CHAT, "Connection %d Established", nw_connection);
7145 if (ncp_rec->func == 245 && ncp_echo_conn) {
7146 expert_add_info_format(pinfo, NULL, PI_RESPONSE_CODE, PI_CHAT, "Connection Destroyed");
7148 if (ncp_rec->reply_ptvc) {
7149 /* If we're not building a protocol tree, quit;
7150 * "process_ptvc_record()" assumes we're building
7151 * a protocol tree, and we don't support putting
7152 * stuff in the Info column in replies, and no
7153 * state information is currently updated for
7154 * replies by "process_ptvc_record()", so we
7155 * can't, and don't have a reason to, dissect
7156 * any further if we're not building a protocol
7161 /* If a non-zero completion code was found, it is
7162 * legal to not have any fields, even if the packet
7163 * type is defined as having fields.
7165 * XXX - we already know that the completion code
7166 * is 0, as we checked it above. Is there any
7167 * reason why we'd want to do a full dissection
7168 * if the completion code isn't 0? */
7169 if (completion_code != 0 && tvb_length(tvb) == 8) {
7173 /* Any request condition results? */
7174 if (request_value) {
7175 req_cond_results = request_value->req_cond_results;
7178 req_cond_results = NULL;
7180 clear_repeat_vars();
7181 ptvc = ptvcursor_new(ncp_tree, tvb, 8);
7182 process_ptvc_record(ptvc, ncp_rec->reply_ptvc,
7183 req_cond_results, TRUE, ncp_rec);
7184 ptvcursor_free(ptvc);
7186 /* Check to see if we need to report to the expert table */
7187 trap_for_expert_event(ncp_tree, pinfo, ncp_rec, 1);
7189 if (tvb_length(tvb) > 8) {
7190 expert_item = proto_tree_add_text(ncp_tree, tvb, 8, -1,
7191 "No request record found. Parsing is impossible.");
7193 expert_add_info_format(pinfo, expert_item, PI_SEQUENCE, PI_NOTE, "No request record found.");
7200 dissect_nds_request(tvbuff_t *tvb, packet_info *pinfo,
7201 guint32 nw_connection, guint8 sequence,
7202 guint16 type, proto_tree *ncp_tree)
7204 guint8 func, subfunc = 0;
7205 ncp_req_hash_value *request_value = NULL;
7206 ncp_req_eid_hash_value *request_eid_value = NULL;
7207 const ncp_record *ncp_rec = NULL;
7208 conversation_t *conversation;
7209 ptvcursor_t *ptvc = NULL;
7210 proto_tree *temp_tree = NULL;
7211 gboolean run_req_cond = FALSE;
7212 gboolean run_info_str = FALSE;
7213 guint8 nds_verb = 0;
7214 const char *verb_string = "";
7215 guint32 nds_frag = 0;
7216 gboolean added_arrow;
7218 char string_buffer[9][1024];
7219 guint8 nds_version = 0;
7220 guint32 foffset = 0;
7221 nw_uni_t req_buffer;
7222 char global_object_name[256];
7223 guint32 global_eid=0;
7224 gboolean resolve_eid=FALSE;
7225 guint32 global_flags=0;
7228 for (i = 0; i < 9; i++) {
7229 pvalues[i].vtype = 0;
7230 pvalues[i].vvalue = 0;
7231 pvalues[i].vlength = 0;
7232 pvalues[i].voffset = 0;
7233 pvalues[i].hfname = 0;
7234 pvalues[i].vdesc = "";
7235 string_buffer[i][0] = '\0';
7236 pvalues[i].vstring = string_buffer[i];
7237 pvalues[i].mvtype = 0;
7238 pvalues[i].vflags = 0;
7241 strcpy(req_buffer.buffer, "");
7242 strcpy(global_object_name, "");
7244 func = tvb_get_guint8(tvb, 6);
7245 subfunc = tvb_get_guint8(tvb, 7);
7247 ncp_rec = ncp_record_find(func, subfunc);
7249 /* Check to see if this is a fragment packet */
7250 nds_frag = tvb_get_letohl(tvb, 8);
7253 if (nds_frag == 0xffffffff) {
7254 /* First fragment or only fragment. */
7255 nds_verb = tvb_get_guint8(tvb, 24);
7256 if (nds_verb == 0xfe)
7258 nds_version = nds_verb;
7259 nds_verb = tvb_get_guint8(tvb, 32);
7267 if (type == NCP_SERVICE_REQUEST) {
7268 proto_tree_add_item(ncp_tree, hf_nds_buffer_size, tvb, foffset,
7271 foffset = foffset+4;
7272 verb_string = val_to_str(nds_verb, ncp_nds_verb_vals,
7273 "Continuation Fragment");
7277 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
7278 nds_version = pvalues[0].vvalue;
7279 pvalues[0].vtype = VTYPE_UINT32;
7280 pvalues[0].vdesc = "Version: %u";
7281 pvalues[0].vlength = 4;
7282 pvalues[0].hfname = hf_nds_ver;
7283 pvalues[0].voffset = foffset;
7284 foffset = foffset+pvalues[0].vlength;
7285 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
7286 pvalues[1].vtype = VTYPE_BITFIELD;
7287 pvalues[1].vdesc = "Flags:";
7288 pvalues[1].vlength = 2;
7289 pvalues[1].hfname= hf_nds_nflags;
7290 pvalues[1].voffset = foffset;
7291 pvalues[1].bit1 = "Entry ID";
7292 pvalues[1].bit1hfname = hf_bit1nflags;
7293 pvalues[1].bit2 = "Readable";
7294 pvalues[1].bit2hfname = hf_bit2nflags;
7295 pvalues[1].bit3 = "Writeable";
7296 pvalues[1].bit3hfname = hf_bit3nflags;
7297 pvalues[1].bit4 = "Master";
7298 pvalues[1].bit4hfname = hf_bit4nflags;
7299 pvalues[1].bit5 = "Create ID";
7300 pvalues[1].bit5hfname = hf_bit5nflags;
7301 pvalues[1].bit6 = "Walk Tree";
7302 pvalues[1].bit6hfname = hf_bit6nflags;
7303 pvalues[1].bit7 = "Dereference Alias";
7304 pvalues[1].bit7hfname = hf_bit7nflags;
7305 pvalues[1].bit8 = "Not Defined";
7306 pvalues[1].bit8hfname = hf_bit8nflags;
7307 pvalues[1].bit9 = "Not Defined";
7308 pvalues[1].bit9hfname = hf_bit9nflags;
7309 pvalues[1].bit10 = "Not Defined";
7310 pvalues[1].bit10hfname = hf_bit10nflags;
7311 pvalues[1].bit11= "Not Defined";
7312 pvalues[1].bit11hfname = hf_bit11nflags;
7313 pvalues[1].bit12 = "Not Defined";
7314 pvalues[1].bit12hfname = hf_bit12nflags;
7315 pvalues[1].bit13 = "Not Defined";
7316 pvalues[1].bit13hfname = hf_bit13nflags;
7317 pvalues[1].bit14 = "Prefer Referrals";
7318 pvalues[1].bit14hfname = hf_bit14nflags;
7319 pvalues[1].bit15 = "Prefer Only Referrals";
7320 pvalues[1].bit15hfname = hf_bit15nflags;
7321 pvalues[1].bit16 = "Not Defined";
7322 pvalues[1].bit16hfname = hf_bit16nflags;
7323 foffset = foffset+4;
7324 if (pvalues[0].vvalue == 0 || pvalues[0].vvalue == 1)
7326 pvalues[2].vtype = VTYPE_UINT32;
7327 pvalues[2].vdesc = "Scope: %u";
7328 pvalues[2].vlength = 4;
7329 pvalues[2].voffset = foffset;
7330 pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
7331 pvalues[2].hfname= hf_nds_scope;
7332 foffset = foffset+pvalues[2].vlength;
7333 pvalues[3].vtype = VTYPE_STRING;
7334 pvalues[3].vdesc = "Name: %s";
7335 pvalues[3].mvtype = MVTYPE_ATTR_REQUEST;
7336 pvalues[3].vvalue = 0;
7337 pvalues[3].vlength = 256;
7338 pvalues[3].vlength = tvb_get_letohl(tvb, foffset);
7339 if (pvalues[3].vlength == 0x00)
7341 pvalues[3].vtype = VTYPE_NONE;
7344 pvalues[3].voffset = foffset+4;
7345 foffset = foffset + 4;
7346 get_string(tvb, pvalues[3].voffset, pvalues[3].vlength, req_buffer.buffer);
7347 pvalues[3].vstring = req_buffer.buffer;
7348 strcpy(global_object_name, req_buffer.buffer);
7349 pvalues[3].hfname= hf_nds_name;
7350 foffset = foffset+pvalues[3].vlength;
7351 foffset += align_4(tvb, foffset);
7352 pvalues[4].vvalue = tvb_get_letohl(tvb, foffset);
7353 pvalues[4].vtype = VTYPE_MULTIVALUE_UINT32;
7354 pvalues[4].vdesc = "Communications Transports: %u";
7355 pvalues[4].vlength = 4;
7356 pvalues[4].hfname= hf_nds_comm_trans;
7357 pvalues[4].voffset = foffset;
7358 pvalues[4].mvtype = MVTYPE_ADDR_REFERRAL_REQUEST;
7359 foffset = foffset + (pvalues[4].vvalue * 4) + 4;
7360 pvalues[5].vvalue = tvb_get_letohl(tvb, foffset);
7361 pvalues[5].vtype = VTYPE_MULTIVALUE_UINT32;
7362 pvalues[5].vdesc = "Tree Walker Transport Type: %u";
7363 pvalues[5].vlength = 4;
7364 pvalues[5].mvtype = MVTYPE_ADDR_REFERRAL_REQUEST;
7365 pvalues[5].hfname= hf_nds_tree_trans;
7366 pvalues[5].voffset = foffset;
7370 pvalues[2].vtype = VTYPE_UINT32;
7371 pvalues[2].vdesc = "Minimum DS Version: %u";
7372 pvalues[2].vlength = 4;
7373 pvalues[2].voffset = foffset;
7374 pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
7375 pvalues[2].hfname= hf_min_nds_ver;
7376 foffset = foffset+pvalues[2].vlength;
7377 pvalues[3].vvalue = tvb_get_letohl(tvb, foffset);
7378 pvalues[3].vtype = VTYPE_MULTIVALUE_UINT32;
7379 pvalues[3].vdesc = "Number of Versions to Include: %u";
7380 pvalues[3].vlength = 4;
7381 pvalues[3].mvtype = MVTYPE_ATTR_REQUEST2;
7382 pvalues[3].voffset = foffset;
7383 pvalues[3].hfname= hf_nds_ver_include;
7384 foffset += (pvalues[3].vvalue * 4) + 4;
7385 pvalues[4].vvalue = tvb_get_letohl(tvb, foffset);
7386 pvalues[4].vtype = VTYPE_MULTIVALUE_UINT32;
7387 pvalues[4].vdesc = "Number of Versions to Exclude: %u";
7388 pvalues[4].vlength = 4;
7389 pvalues[4].mvtype = MVTYPE_ATTR_REQUEST2;
7390 pvalues[4].hfname= hf_nds_ver_exclude;
7391 pvalues[4].voffset = foffset;
7393 pvalues[5].vtype = VTYPE_UINT32;
7394 pvalues[5].vdesc = "DN Output Type: %u";
7395 pvalues[5].vlength = 4;
7396 pvalues[5].voffset = foffset;
7397 pvalues[5].vvalue = tvb_get_letohl(tvb, foffset);
7398 pvalues[5].hfname= hf_nds_dn_output_type;
7399 foffset = foffset+pvalues[5].vlength;
7400 pvalues[6].vtype = VTYPE_UINT32;
7401 pvalues[6].vdesc = "Nested Output Type: %u";
7402 pvalues[6].vlength = 4;
7403 pvalues[6].voffset = foffset;
7404 pvalues[6].vvalue = tvb_get_letohl(tvb, foffset);
7405 pvalues[6].hfname= hf_nds_nested_output_type;
7406 foffset = foffset+pvalues[6].vlength;
7407 pvalues[7].vtype = VTYPE_STRING;
7408 pvalues[7].vdesc = "Output Delimiter: %s";
7409 pvalues[7].mvtype = MVTYPE_ATTR_REQUEST;
7410 pvalues[7].vvalue = 0;
7411 pvalues[7].vlength = 256;
7412 pvalues[7].vlength = tvb_get_letohl(tvb, foffset);
7413 pvalues[7].voffset = foffset+4;
7414 foffset = foffset + 4;
7415 get_string(tvb, pvalues[7].voffset, pvalues[7].vlength, req_buffer.buffer);
7416 pvalues[7].vstring = req_buffer.buffer;
7417 pvalues[7].hfname= hf_nds_output_delimiter;
7418 foffset = foffset+pvalues[7].vlength;
7419 foffset += align_4(tvb, foffset);
7420 pvalues[8].vvalue = tvb_get_letohl(tvb, foffset);
7421 pvalues[8].vtype = VTYPE_MULTIVALUE_UINT32;
7422 pvalues[8].vdesc = "Size of Entry Specifier: %u";
7423 pvalues[8].vlength = 4;
7424 pvalues[8].mvtype = MVTYPE_PROC_ENTRY_SPECIFIERS;
7425 pvalues[8].hfname= hf_nds_output_entry_specifier;
7426 pvalues[8].voffset = foffset;
7430 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
7431 pvalues[0].vtype = VTYPE_UINT32;
7432 pvalues[0].vdesc = "Version: %u";
7433 pvalues[0].vlength = 4;
7434 pvalues[0].voffset = foffset;
7435 pvalues[0].hfname= hf_nds_ver;
7436 foffset = foffset+pvalues[0].vlength;
7437 switch(pvalues[0].vvalue)
7440 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
7441 pvalues[1].vtype = VTYPE_UINT32;
7442 pvalues[1].vdesc = "Entry ID: 0x%08x";
7443 pvalues[1].vlength = 4;
7445 global_eid = pvalues[1].vvalue;
7446 pvalues[1].voffset = foffset;
7447 pvalues[1].hfname = hf_nds_eid;
7448 foffset = foffset+pvalues[1].vlength;
7451 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
7452 pvalues[1].vtype = VTYPE_BITFIELD;
7453 pvalues[1].vdesc = "Request Flags:";
7454 pvalues[1].vlength = 2;
7455 pvalues[1].hfname= hf_nds_rflags;
7456 pvalues[1].voffset = foffset;
7457 pvalues[1].bit1 = "Typeless";
7458 pvalues[1].bit1hfname = hf_bit1rflags;
7459 pvalues[1].bit2 = "Slashed";
7460 pvalues[1].bit2hfname = hf_bit2rflags;
7461 pvalues[1].bit3 = "Dotted";
7462 pvalues[1].bit3hfname = hf_bit3rflags;
7463 pvalues[1].bit4 = "Tuned";
7464 pvalues[1].bit4hfname = hf_bit4rflags;
7465 pvalues[1].bit5 = "Not Defined";
7466 pvalues[1].bit5hfname = hf_bit5rflags;
7467 pvalues[1].bit6 = "Not Defined";
7468 pvalues[1].bit6hfname = hf_bit6rflags;
7469 pvalues[1].bit7 = "Not Defined";
7470 pvalues[1].bit7hfname = hf_bit7rflags;
7471 pvalues[1].bit8 = "Not Defined";
7472 pvalues[1].bit8hfname = hf_bit8rflags;
7473 pvalues[1].bit9 = "Not Defined";
7474 pvalues[1].bit9hfname = hf_bit9rflags;
7475 pvalues[1].bit10 = "Not Defined";
7476 pvalues[1].bit10hfname = hf_bit10rflags;
7477 pvalues[1].bit11 = "Not Defined";
7478 pvalues[1].bit11hfname = hf_bit11rflags;
7479 pvalues[1].bit12 = "Not Defined";
7480 pvalues[1].bit12hfname = hf_bit12rflags;
7481 pvalues[1].bit13 = "Not Defined";
7482 pvalues[1].bit13hfname = hf_bit13rflags;
7483 pvalues[1].bit14 = "Not Defined";
7484 pvalues[1].bit14hfname = hf_bit14rflags;
7485 pvalues[1].bit15 = "Not Defined";
7486 pvalues[1].bit15hfname = hf_bit15rflags;
7487 pvalues[1].bit16 = "Not Defined";
7488 pvalues[1].bit16hfname = hf_bit16rflags;
7489 if((pvalues[1].vvalue&&0xf000) == 0xc000)
7491 pvalues[2].vtype = VTYPE_STRING;
7492 pvalues[2].vdesc = "Name Type: %s";
7493 pvalues[2].vstring = "Partial";
7494 pvalues[2].mvtype = 0;
7495 pvalues[2].vvalue = 0;
7496 pvalues[2].vlength = 0;
7497 pvalues[2].voffset = 0;
7498 pvalues[2].hfname= hf_nds_name_type;
7502 pvalues[2].vtype = VTYPE_STRING;
7503 pvalues[2].vdesc = "Name Type: %s";
7504 pvalues[2].vstring = "Full";
7505 pvalues[2].vvalue = 0;
7506 pvalues[2].mvtype = 0;
7507 pvalues[2].vlength = 0;
7508 pvalues[2].voffset = 0;
7509 pvalues[2].hfname= hf_nds_name_type;
7511 foffset = foffset+4;
7512 pvalues[3].vvalue = tvb_get_letohl(tvb, foffset);
7513 pvalues[3].vtype = VTYPE_UINT32;
7514 pvalues[3].vdesc = "Entry ID: 0x%08x";
7515 pvalues[3].vlength = 4;
7516 pvalues[3].voffset = foffset;
7518 global_eid = pvalues[3].vvalue;
7519 pvalues[3].hfname = hf_nds_eid;
7520 foffset = foffset+pvalues[3].vlength;
7523 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
7524 pvalues[1].vtype = VTYPE_BITFIELD;
7525 pvalues[1].vdesc = "Request Flags:";
7526 pvalues[1].vlength = 2;
7527 pvalues[1].hfname= hf_nds_rflags;
7528 pvalues[1].voffset = foffset;
7529 pvalues[1].bit1 = "Typeless";
7530 pvalues[1].bit1hfname = hf_bit1rflags;
7531 pvalues[1].bit2 = "Slashed";
7532 pvalues[1].bit2hfname = hf_bit2rflags;
7533 pvalues[1].bit3 = "Dotted";
7534 pvalues[1].bit3hfname = hf_bit3rflags;
7535 pvalues[1].bit4 = "Tuned";
7536 pvalues[1].bit4hfname = hf_bit4rflags;
7537 pvalues[1].bit5 = "Not Defined";
7538 pvalues[1].bit5hfname = hf_bit5rflags;
7539 pvalues[1].bit6 = "Not Defined";
7540 pvalues[1].bit6hfname = hf_bit6rflags;
7541 pvalues[1].bit7 = "Not Defined";
7542 pvalues[1].bit7hfname = hf_bit7rflags;
7543 pvalues[1].bit8 = "Not Defined";
7544 pvalues[1].bit8hfname = hf_bit8rflags;
7545 pvalues[1].bit9 = "Not Defined";
7546 pvalues[1].bit9hfname = hf_bit9rflags;
7547 pvalues[1].bit10 = "Not Defined";
7548 pvalues[1].bit10hfname = hf_bit10rflags;
7549 pvalues[1].bit11 = "Not Defined";
7550 pvalues[1].bit11hfname = hf_bit11rflags;
7551 pvalues[1].bit12 = "Not Defined";
7552 pvalues[1].bit12hfname = hf_bit12rflags;
7553 pvalues[1].bit13 = "Not Defined";
7554 pvalues[1].bit13hfname = hf_bit13rflags;
7555 pvalues[1].bit14 = "Not Defined";
7556 pvalues[1].bit14hfname = hf_bit14rflags;
7557 pvalues[1].bit15 = "Not Defined";
7558 pvalues[1].bit15hfname = hf_bit15rflags;
7559 pvalues[1].bit16 = "Not Defined";
7560 pvalues[1].bit16hfname = hf_bit16rflags;
7561 if((pvalues[1].vvalue&&0xf000) == 0xc000)
7563 pvalues[2].vtype = VTYPE_STRING;
7564 pvalues[2].vdesc = "Name Type: %s";
7565 pvalues[2].vstring = "Return Partion Name";
7566 pvalues[2].vvalue = 0;
7567 pvalues[2].vlength = 4;
7568 pvalues[2].voffset = pvalues[1].voffset;
7569 pvalues[2].mvtype = 0;
7570 pvalues[2].hfname= hf_nds_name_type;
7574 pvalues[2].vtype = VTYPE_STRING;
7575 pvalues[2].vdesc = "Name Type: %s";
7576 pvalues[2].vstring = "Return Full Name";
7577 pvalues[2].vvalue = 0;
7578 pvalues[2].vlength = 4;
7579 pvalues[2].mvtype = 0;
7580 pvalues[2].voffset = pvalues[1].voffset;
7581 pvalues[2].hfname= hf_nds_name_type;
7583 foffset = foffset+4;
7584 pvalues[3].vvalue = tvb_get_letohs(tvb, foffset);
7585 global_flags = tvb_get_letohl(tvb, foffset);
7586 pvalues[3].vtype = VTYPE_BITFIELD;
7587 pvalues[3].vdesc = "Information Flags (low) Byte:";
7588 pvalues[3].vlength = 2;
7589 pvalues[3].hfname= hf_nds_rflags;
7590 pvalues[3].voffset = foffset;
7591 pvalues[3].bit1 = "Output Flags";
7592 pvalues[3].bit1hfname = hf_bit1infoflagsl;
7593 pvalues[3].bit2 = "Entry ID";
7594 pvalues[3].bit2hfname = hf_bit2infoflagsl;
7595 pvalues[3].bit3 = "Entry Flags";
7596 pvalues[3].bit3hfname = hf_bit3infoflagsl;
7597 pvalues[3].bit4 = "Subordinate Count";
7598 pvalues[3].bit4hfname = hf_bit4infoflagsl;
7599 pvalues[3].bit5 = "Modification Time";
7600 pvalues[3].bit5hfname = hf_bit5infoflagsl;
7601 pvalues[3].bit6 = "Modification Timestamp";
7602 pvalues[3].bit6hfname = hf_bit6infoflagsl;
7603 pvalues[3].bit7 = "Creation Timestamp";
7604 pvalues[3].bit7hfname = hf_bit7infoflagsl;
7605 pvalues[3].bit8 = "Partition Root ID";
7606 pvalues[3].bit8hfname = hf_bit8infoflagsl;
7607 pvalues[3].bit9 = "Parent ID";
7608 pvalues[3].bit9hfname = hf_bit9infoflagsl;
7609 pvalues[3].bit10 = "Revision Count";
7610 pvalues[3].bit10hfname = hf_bit10infoflagsl;
7611 pvalues[3].bit11 = "Replica Type";
7612 pvalues[3].bit11hfname = hf_bit11infoflagsl;
7613 pvalues[3].bit12 = "Base Class";
7614 pvalues[3].bit12hfname = hf_bit12infoflagsl;
7615 pvalues[3].bit13 = "Relative Distinguished Name";
7616 pvalues[3].bit13hfname = hf_bit13infoflagsl;
7617 pvalues[3].bit14 = "Distinguished Name";
7618 pvalues[3].bit14hfname = hf_bit14infoflagsl;
7619 pvalues[3].bit15 = "Root Distinguished Name";
7620 pvalues[3].bit15hfname = hf_bit15infoflagsl;
7621 pvalues[3].bit16 = "Parent Distinguished Name";
7622 pvalues[3].bit16hfname = hf_bit16infoflagsl;
7623 foffset = foffset+2;
7624 pvalues[4].vvalue = tvb_get_letohs(tvb, foffset);
7625 pvalues[4].vtype = VTYPE_BITFIELD;
7626 pvalues[4].vdesc = "Information Flags (high) Byte:";
7627 pvalues[4].vlength = 2;
7628 pvalues[4].hfname= hf_nds_rflags;
7629 pvalues[4].voffset = foffset;
7630 pvalues[4].bit1 = "Purge Time";
7631 pvalues[4].bit1hfname = hf_bit1infoflagsh;
7632 pvalues[4].bit2 = "Dereference Base Class";
7633 pvalues[4].bit2hfname = hf_bit2infoflagsh;
7634 pvalues[4].bit3 = "Not Defined";
7635 pvalues[4].bit3hfname = hf_bit3infoflagsh;
7636 pvalues[4].bit4 = "Not Defined";
7637 pvalues[4].bit4hfname = hf_bit4infoflagsh;
7638 pvalues[4].bit5 = "Not Defined";
7639 pvalues[4].bit5hfname = hf_bit5infoflagsh;
7640 pvalues[4].bit6 = "Not Defined";
7641 pvalues[4].bit6hfname = hf_bit6infoflagsh;
7642 pvalues[4].bit7 = "Not Defined";
7643 pvalues[4].bit7hfname = hf_bit7infoflagsh;
7644 pvalues[4].bit8 = "Not Defined";
7645 pvalues[4].bit8hfname = hf_bit8infoflagsh;
7646 pvalues[4].bit9 = "Not Defined";
7647 pvalues[4].bit9hfname = hf_bit9infoflagsh;
7648 pvalues[4].bit10 = "Not Defined";
7649 pvalues[4].bit10hfname = hf_bit10infoflagsh;
7650 pvalues[4].bit11 = "Not Defined";
7651 pvalues[4].bit11hfname = hf_bit11infoflagsh;
7652 pvalues[4].bit12 = "Not Defined";
7653 pvalues[4].bit12hfname = hf_bit12infoflagsh;
7654 pvalues[4].bit13 = "Not Defined";
7655 pvalues[4].bit13hfname = hf_bit13infoflagsh;
7656 pvalues[4].bit14 = "Not Defined";
7657 pvalues[4].bit14hfname = hf_bit14infoflagsh;
7658 pvalues[4].bit15 = "Not Defined";
7659 pvalues[4].bit15hfname = hf_bit15infoflagsh;
7660 pvalues[4].bit16 = "Not Defined";
7661 pvalues[4].bit16hfname = hf_bit16infoflagsh;
7662 foffset = foffset+2;
7663 pvalues[5].vvalue = tvb_get_letohl(tvb, foffset);
7664 pvalues[5].vtype = VTYPE_UINT32;
7665 pvalues[5].vdesc = "Entry ID: 0x%08x";
7666 pvalues[5].vlength = 4;
7667 pvalues[5].voffset = foffset;
7669 global_eid = pvalues[5].vvalue;
7670 pvalues[5].hfname = hf_nds_eid;
7671 foffset = foffset+pvalues[5].vlength;
7679 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
7680 pvalues[0].vtype = VTYPE_UINT32;
7681 pvalues[0].vdesc = "Version: %u";
7682 pvalues[0].vlength = 4;
7683 pvalues[0].voffset = foffset;
7684 pvalues[0].hfname= hf_nds_ver;
7685 foffset = foffset+pvalues[0].vlength;
7686 if(pvalues[0].vvalue == 0)
7688 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
7689 pvalues[1].vtype = VTYPE_UINT32;
7690 pvalues[1].vdesc = "Iteration Handle: 0x%08x";
7691 pvalues[1].vlength = 4;
7692 pvalues[1].voffset = foffset;
7693 pvalues[1].hfname= hf_nds_iteration;
7694 foffset = foffset+pvalues[1].vlength;
7695 pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
7696 pvalues[2].vtype = VTYPE_UINT32;
7697 pvalues[2].vdesc = "Entry ID: 0x%08x";
7698 pvalues[2].vlength = 4;
7700 global_eid = pvalues[2].vvalue;
7701 pvalues[2].voffset = foffset;
7702 pvalues[2].hfname= hf_nds_eid;
7703 foffset = foffset+pvalues[2].vlength;
7704 pvalues[3].vvalue = tvb_get_letohl(tvb, foffset);
7705 pvalues[3].vstring = (char *)match_strval(pvalues[3].vvalue, nds_info_type);
7706 global_flags = pvalues[3].vvalue;
7707 if(pvalues[3].vstring == NULL)
7709 pvalues[3].vstring = "No Info Type Set";
7711 pvalues[3].vtype = VTYPE_STRING;
7712 pvalues[3].vdesc = "Info Type: %s";
7713 pvalues[3].vlength = 4;
7714 pvalues[3].voffset = foffset;
7715 pvalues[3].mvtype = MVTYPE_ATTR_REQUEST;
7716 pvalues[3].hfname= hf_nds_info_type;
7717 foffset = foffset + pvalues[3].vlength;
7718 pvalues[4].vvalue = tvb_get_letohl(tvb, foffset);
7719 pvalues[4].vtype = VTYPE_UINT32;
7720 pvalues[4].vdesc = "All Attributes: %u";
7721 pvalues[4].vlength = 4;
7722 pvalues[4].voffset = foffset;
7723 pvalues[4].hfname= hf_nds_all_attr;
7724 foffset = foffset+pvalues[4].vlength;
7725 pvalues[5].vvalue = tvb_get_letohl(tvb, foffset);
7726 pvalues[5].vtype = VTYPE_MULTIVALUE_UINT32;
7727 pvalues[5].vdesc = "Attributes: %u";
7728 pvalues[5].vlength = 4;
7729 pvalues[5].voffset = foffset;
7730 pvalues[5].mvtype = MVTYPE_ATTR_REQUEST;
7731 pvalues[5].hfname= hf_nds_attr;
7735 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
7736 pvalues[1].vtype = VTYPE_UINT32;
7737 pvalues[1].vdesc = "Request Flags: 0x%08x";
7738 pvalues[1].vlength = 4;
7739 pvalues[1].voffset = foffset;
7740 pvalues[1].hfname= hf_nds_req_flags;
7741 foffset = foffset+pvalues[1].vlength;
7742 pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
7743 pvalues[2].vtype = VTYPE_UINT32;
7744 pvalues[2].vdesc = "Iteration Handle: 0x%08x";
7745 pvalues[2].vlength = 4;
7746 pvalues[2].voffset = foffset;
7747 pvalues[2].hfname= hf_nds_iteration;
7748 foffset = foffset+pvalues[2].vlength;
7749 pvalues[3].vvalue = tvb_get_letohl(tvb, foffset);
7750 pvalues[3].vtype = VTYPE_UINT32;
7751 pvalues[3].vdesc = "Entry ID: 0x%08x";
7752 pvalues[3].vlength = 4;
7754 global_eid = pvalues[3].vvalue;
7755 pvalues[3].voffset = foffset;
7756 pvalues[3].hfname= hf_nds_eid;
7757 foffset = foffset+pvalues[3].vlength;
7758 pvalues[4].vvalue = tvb_get_letohl(tvb, foffset);
7759 pvalues[4].vstring = (char *)match_strval(pvalues[4].vvalue, nds_info_type);
7760 global_flags = pvalues[4].vvalue;
7761 if(pvalues[4].vstring == NULL)
7763 pvalues[4].vstring = "No Info Type Set";
7765 pvalues[4].vtype = VTYPE_STRING;
7766 pvalues[4].vdesc = "Info Type: %s";
7767 pvalues[4].vlength = 4;
7768 pvalues[4].voffset = foffset;
7769 pvalues[4].hfname= hf_nds_info_type;
7770 pvalues[4].mvtype = MVTYPE_ATTR_REQUEST;
7771 foffset = foffset+pvalues[4].vlength;
7772 pvalues[5].vvalue = tvb_get_letohl(tvb, foffset);
7773 pvalues[5].vtype = VTYPE_UINT32;
7774 pvalues[5].vdesc = "All Attributes: %u";
7775 pvalues[5].vlength = 4;
7776 pvalues[5].voffset = foffset;
7777 pvalues[5].hfname= hf_nds_all_attr;
7778 foffset = foffset+pvalues[5].vlength;
7779 pvalues[6].vvalue = tvb_get_letohl(tvb, foffset);
7780 pvalues[6].vtype = VTYPE_MULTIVALUE_UINT32;
7781 pvalues[6].vdesc = "Attributes: %u";
7782 pvalues[6].vlength = 4;
7783 pvalues[6].voffset = foffset;
7784 pvalues[6].mvtype = MVTYPE_ATTR_REQUEST;
7785 pvalues[6].hfname= hf_nds_attr;
7789 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
7790 pvalues[0].vtype = VTYPE_UINT32;
7791 pvalues[0].vdesc = "Version: %u";
7792 pvalues[0].vlength = 4;
7793 pvalues[0].voffset = foffset;
7794 pvalues[0].hfname= hf_nds_ver;
7795 foffset = foffset+pvalues[0].vlength;
7796 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
7797 pvalues[1].vtype = VTYPE_UINT32;
7798 pvalues[1].vdesc = "Entry ID: 0x%08x";
7799 pvalues[1].vlength = 4;
7801 global_eid = pvalues[1].vvalue;
7802 pvalues[1].voffset = foffset;
7803 pvalues[1].hfname = hf_nds_eid;
7804 foffset = foffset+pvalues[1].vlength;
7805 foffset += 4; /* Attribute Count = 1 */
7806 pvalues[2].vtype = VTYPE_STRING;
7807 pvalues[2].vdesc = "Attribute Name Being Compared: %s";
7808 pvalues[2].mvtype = MVTYPE_ATTR_REQUEST;
7809 pvalues[2].vvalue = 0;
7810 pvalues[2].vlength = 256;
7811 pvalues[2].vlength = tvb_get_letohl(tvb, foffset);
7812 if (pvalues[2].vlength == 0x00)
7814 pvalues[2].vtype = VTYPE_NONE;
7817 pvalues[2].voffset = foffset+4;
7818 foffset = foffset + 4;
7819 get_string(tvb, pvalues[2].voffset, pvalues[2].vlength, req_buffer.buffer);
7820 pvalues[2].vstring = req_buffer.buffer;
7821 strcpy(global_object_name, req_buffer.buffer);
7822 pvalues[2].hfname= hf_nds_name;
7823 foffset = foffset+pvalues[2].vlength;
7824 foffset += align_4(tvb, foffset);
7825 foffset += 4; /* Attribute Value Count = 1 */
7827 * Need Trace file to test. Will have to create a
7828 * new mvtype to call print_nds_values.
7832 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
7833 pvalues[0].vtype = VTYPE_UINT32;
7834 pvalues[0].vdesc = "Version: %u";
7835 pvalues[0].vlength = 4;
7836 pvalues[0].voffset = foffset;
7837 pvalues[0].hfname= hf_nds_ver;
7838 foffset = foffset+pvalues[0].vlength;
7839 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
7840 pvalues[1].vtype = VTYPE_BITFIELD;
7841 pvalues[1].vdesc = "Request Flags:";
7842 pvalues[1].vlength = 2;
7843 pvalues[1].hfname= hf_nds_rflags;
7844 pvalues[1].voffset = foffset;
7845 pvalues[1].bit1 = "List Typeless";
7846 pvalues[1].bit1hfname = hf_bit1lflags;
7847 pvalues[1].bit2 = "List Containers";
7848 pvalues[1].bit2hfname = hf_bit2lflags;
7849 pvalues[1].bit3 = "List Slashed";
7850 pvalues[1].bit3hfname = hf_bit3lflags;
7851 pvalues[1].bit4 = "List Dotted";
7852 pvalues[1].bit4hfname = hf_bit4lflags;
7853 pvalues[1].bit5 = "Dereference Alias";
7854 pvalues[1].bit5hfname = hf_bit5lflags;
7855 pvalues[1].bit6 = "List All Containers";
7856 pvalues[1].bit6hfname = hf_bit6lflags;
7857 pvalues[1].bit7 = "List Obsolete";
7858 pvalues[1].bit7hfname = hf_bit7lflags;
7859 pvalues[1].bit8 = "List Tuned Output";
7860 pvalues[1].bit8hfname = hf_bit8lflags;
7861 pvalues[1].bit9 = "List External Reference";
7862 pvalues[1].bit9hfname = hf_bit9lflags;
7863 pvalues[1].bit10 = "Not Defined";
7864 pvalues[1].bit10hfname = hf_bit10lflags;
7865 pvalues[1].bit11 = "Not Defined";
7866 pvalues[1].bit11hfname = hf_bit11lflags;
7867 pvalues[1].bit12 = "Not Defined";
7868 pvalues[1].bit12hfname = hf_bit12lflags;
7869 pvalues[1].bit13 = "Not Defined";
7870 pvalues[1].bit13hfname = hf_bit13lflags;
7871 pvalues[1].bit14 = "Not Defined";
7872 pvalues[1].bit14hfname = hf_bit14lflags;
7873 pvalues[1].bit15 = "Not Defined";
7874 pvalues[1].bit15hfname = hf_bit15lflags;
7875 pvalues[1].bit16 = "Not Defined";
7876 pvalues[1].bit16hfname = hf_bit16lflags;
7877 foffset = foffset+pvalues[1].vlength;
7879 pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
7880 pvalues[2].vtype = VTYPE_UINT32;
7881 pvalues[2].vdesc = "Iteration Handle: 0x%08x";
7882 pvalues[2].vlength = 4;
7883 pvalues[2].voffset = foffset;
7884 pvalues[2].hfname= hf_nds_iteration;
7885 foffset = foffset+pvalues[2].vlength;
7886 pvalues[3].vvalue = tvb_get_letohl(tvb, foffset);
7887 pvalues[3].vtype = VTYPE_UINT32;
7888 pvalues[3].vdesc = "Parent ID: 0x%08x";
7889 pvalues[3].vlength = 4;
7890 pvalues[3].voffset = foffset;
7891 pvalues[3].hfname= hf_nds_parent;
7892 foffset = foffset+pvalues[3].vlength;
7893 pvalues[4].vvalue = tvb_get_letohs(tvb, foffset);
7894 global_flags = tvb_get_letohl(tvb, foffset);
7895 pvalues[4].vtype = VTYPE_BITFIELD;
7896 pvalues[4].vdesc = "Information Flags (low) Byte:";
7897 pvalues[4].vlength = 2;
7898 pvalues[4].hfname= hf_nds_rflags;
7899 pvalues[4].voffset = foffset;
7900 pvalues[4].bit1 = "Output Flags";
7901 pvalues[4].bit1hfname = hf_bit1infoflagsl;
7902 pvalues[4].bit2 = "Entry ID";
7903 pvalues[4].bit2hfname = hf_bit2infoflagsl;
7904 pvalues[4].bit3 = "Entry Flags";
7905 pvalues[4].bit3hfname = hf_bit3infoflagsl;
7906 pvalues[4].bit4 = "Subordinate Count";
7907 pvalues[4].bit4hfname = hf_bit4infoflagsl;
7908 pvalues[4].bit5 = "Modification Time";
7909 pvalues[4].bit5hfname = hf_bit5infoflagsl;
7910 pvalues[4].bit6 = "Modification Timestamp";
7911 pvalues[4].bit6hfname = hf_bit6infoflagsl;
7912 pvalues[4].bit7 = "Creation Timestamp";
7913 pvalues[4].bit7hfname = hf_bit7infoflagsl;
7914 pvalues[4].bit8 = "Partition Root ID";
7915 pvalues[4].bit8hfname = hf_bit8infoflagsl;
7916 pvalues[4].bit9 = "Parent ID";
7917 pvalues[4].bit9hfname = hf_bit9infoflagsl;
7918 pvalues[4].bit10 = "Revision Count";
7919 pvalues[4].bit10hfname = hf_bit10infoflagsl;
7920 pvalues[4].bit11 = "Replica Type";
7921 pvalues[4].bit11hfname = hf_bit11infoflagsl;
7922 pvalues[4].bit12 = "Base Class";
7923 pvalues[4].bit12hfname = hf_bit12infoflagsl;
7924 pvalues[4].bit13 = "Relative Distinguished Name";
7925 pvalues[4].bit13hfname = hf_bit13infoflagsl;
7926 pvalues[4].bit14 = "Distinguished Name";
7927 pvalues[4].bit14hfname = hf_bit14infoflagsl;
7928 pvalues[4].bit15 = "Root Distinguished Name";
7929 pvalues[4].bit15hfname = hf_bit15infoflagsl;
7930 pvalues[4].bit16 = "Parent Distinguished Name";
7931 pvalues[4].bit16hfname = hf_bit16infoflagsl;
7932 foffset = foffset+2;
7933 pvalues[5].vvalue = tvb_get_letohs(tvb, foffset);
7934 pvalues[5].vtype = VTYPE_BITFIELD;
7935 pvalues[5].vdesc = "Information Flags (high) Byte:";
7936 pvalues[5].vlength = 2;
7937 pvalues[5].hfname= hf_nds_rflags;
7938 pvalues[5].voffset = foffset;
7939 pvalues[5].bit1 = "Purge Time";
7940 pvalues[5].bit1hfname = hf_bit1infoflagsh;
7941 pvalues[5].bit2 = "Dereference Base Class";
7942 pvalues[5].bit2hfname = hf_bit2infoflagsh;
7943 pvalues[5].bit3 = "Not Defined";
7944 pvalues[5].bit3hfname = hf_bit3infoflagsh;
7945 pvalues[5].bit4 = "Not Defined";
7946 pvalues[5].bit4hfname = hf_bit4infoflagsh;
7947 pvalues[5].bit5 = "Not Defined";
7948 pvalues[5].bit5hfname = hf_bit5infoflagsh;
7949 pvalues[5].bit6 = "Not Defined";
7950 pvalues[5].bit6hfname = hf_bit6infoflagsh;
7951 pvalues[5].bit7 = "Not Defined";
7952 pvalues[5].bit7hfname = hf_bit7infoflagsh;
7953 pvalues[5].bit8 = "Not Defined";
7954 pvalues[5].bit8hfname = hf_bit8infoflagsh;
7955 pvalues[5].bit9 = "Not Defined";
7956 pvalues[5].bit9hfname = hf_bit9infoflagsh;
7957 pvalues[5].bit10 = "Not Defined";
7958 pvalues[5].bit10hfname = hf_bit10infoflagsh;
7959 pvalues[5].bit11 = "Not Defined";
7960 pvalues[5].bit11hfname = hf_bit11infoflagsh;
7961 pvalues[5].bit12 = "Not Defined";
7962 pvalues[5].bit12hfname = hf_bit12infoflagsh;
7963 pvalues[5].bit13 = "Not Defined";
7964 pvalues[5].bit13hfname = hf_bit13infoflagsh;
7965 pvalues[5].bit14 = "Not Defined";
7966 pvalues[5].bit14hfname = hf_bit14infoflagsh;
7967 pvalues[5].bit15 = "Not Defined";
7968 pvalues[5].bit15hfname = hf_bit15infoflagsh;
7969 pvalues[5].bit16 = "Not Defined";
7970 pvalues[5].bit16hfname = hf_bit16infoflagsh;
7971 foffset = foffset+2;
7972 pvalues[6].vtype = VTYPE_STRING;
7973 pvalues[6].vdesc = "Name Filter: %s";
7974 pvalues[6].mvtype = MVTYPE_ATTR_REQUEST;
7975 pvalues[6].vvalue = 0;
7976 pvalues[6].vlength = 256;
7977 pvalues[6].vlength = tvb_get_letohl(tvb, foffset);
7978 pvalues[6].voffset = foffset+4;
7979 foffset = foffset + 4;
7980 get_string(tvb, pvalues[6].voffset, pvalues[6].vlength, pvalues[6].vstring);
7981 pvalues[6].hfname= hf_nds_name_filter;
7982 foffset = foffset+pvalues[6].vlength;
7983 if(pvalues[0].vvalue == 0)
7987 foffset += align_4(tvb, foffset);
7988 pvalues[7].vtype = VTYPE_STRING;
7989 pvalues[7].vdesc = "Class Filter: %s";
7990 pvalues[7].mvtype = MVTYPE_ATTR_REQUEST;
7991 pvalues[7].vvalue = 0;
7992 pvalues[7].vlength = 256;
7993 pvalues[7].vlength = tvb_get_letohl(tvb, foffset);
7994 pvalues[7].voffset = foffset+4;
7995 foffset = foffset + 4;
7996 get_string(tvb, pvalues[7].voffset, pvalues[7].vlength, pvalues[7].vstring);
7997 pvalues[7].hfname= hf_nds_class_filter;
7998 foffset = foffset+pvalues[7].vlength;
7999 if(pvalues[0].vvalue == 1)
8003 foffset += align_4(tvb, foffset);
8004 pvalues[8].vvalue = tvb_get_letohl(tvb, foffset);
8005 pvalues[8].vtype = VTYPE_MULTIVALUE_UINT32;
8006 pvalues[8].vdesc = "Seconds: %u";
8007 pvalues[8].vlength = 4;
8008 pvalues[8].mvtype = MVTYPE_PRINT_TIMESTAMP;
8009 pvalues[8].hfname= hf_nds_time_filter;
8010 pvalues[8].voffset = foffset;
8013 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
8014 pvalues[0].vstring = "";
8015 pvalues[0].vtype = VTYPE_UINT32;
8016 pvalues[0].vdesc = "Version: %u";
8017 pvalues[0].vlength = 4;
8018 pvalues[0].voffset = foffset;
8019 pvalues[0].hfname= hf_nds_ver;
8020 foffset = foffset+pvalues[0].vlength;
8021 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
8022 pvalues[1].vtype = VTYPE_UINT32;
8023 pvalues[1].vstring = "";
8024 pvalues[1].vdesc = "Request Flags: 0x%08x";
8025 pvalues[1].vlength = 4;
8026 pvalues[1].hfname= hf_nds_rflags;
8027 pvalues[1].voffset = foffset;
8028 foffset = foffset+4;
8029 pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
8030 pvalues[2].vtype = VTYPE_UINT32;
8031 pvalues[2].vdesc = "Iteration Handle: 0x%08x";
8032 pvalues[2].vlength = 4;
8033 pvalues[2].voffset = foffset;
8034 pvalues[2].hfname= hf_nds_iteration;
8035 foffset = foffset+pvalues[2].vlength;
8036 pvalues[3].vvalue = tvb_get_letohl(tvb, foffset);
8037 pvalues[3].vstring = "";
8038 pvalues[3].vtype = VTYPE_UINT32;
8039 pvalues[3].vdesc = "Base Entry ID: 0x%08x";
8040 pvalues[3].vlength = 4;
8041 resolve_eid = FALSE;
8042 global_eid = pvalues[3].vvalue;
8043 pvalues[3].voffset = foffset;
8044 pvalues[3].hfname= hf_nds_eid;
8045 foffset = foffset+pvalues[3].vlength;
8046 pvalues[4].vvalue = tvb_get_letohl(tvb, foffset);
8047 pvalues[4].vstring = (char *)match_strval(pvalues[4].vvalue, nds_search_scope);
8048 if(pvalues[4].vstring == NULL)
8050 pvalues[4].vstring = "No Search Scope Defined";
8052 pvalues[4].vtype = VTYPE_STRING;
8053 pvalues[4].vdesc = "Replica Type: %s";
8054 pvalues[4].vlength = 4;
8055 pvalues[4].voffset = foffset;
8056 pvalues[4].mvtype = 0;
8057 pvalues[4].hfname= hf_nds_search_scope;
8058 foffset = foffset + pvalues[4].vlength;
8059 pvalues[5].vvalue = tvb_get_letohl(tvb, foffset);
8060 pvalues[5].vtype = VTYPE_UINT32;
8061 pvalues[5].vdesc = "Number of Objects to Search: 0x%08x";
8062 pvalues[5].vlength = 4;
8063 pvalues[5].voffset = foffset;
8064 pvalues[5].hfname= hf_nds_num_objects;
8065 foffset = foffset+pvalues[5].vlength;
8066 pvalues[6].vvalue = tvb_get_letohl(tvb, foffset);
8067 pvalues[6].vtype = VTYPE_BITFIELD;
8068 pvalues[6].vdesc = "Information Types:";
8069 pvalues[6].vlength = 2;
8070 pvalues[6].hfname= hf_nds_nflags;
8071 pvalues[6].voffset = foffset;
8072 pvalues[6].bit1 = "Names";
8073 pvalues[6].bit1hfname = hf_bit1siflags;
8074 pvalues[6].bit2 = "Names and Values";
8075 pvalues[6].bit2hfname = hf_bit2siflags;
8076 pvalues[6].bit3 = "Effective Privileges";
8077 pvalues[6].bit3hfname = hf_bit3siflags;
8078 pvalues[6].bit4 = "Value Info";
8079 pvalues[6].bit4hfname = hf_bit4siflags;
8080 pvalues[6].bit5 = "Abbreviated Value";
8081 pvalues[6].bit5hfname = hf_bit5siflags;
8082 pvalues[6].bit6 = "Not Defined";
8083 pvalues[6].bit6hfname = hf_bit6siflags;
8084 pvalues[6].bit7 = "Not Defined";
8085 pvalues[6].bit7hfname = hf_bit7siflags;
8086 pvalues[6].bit8 = "Not Defined";
8087 pvalues[6].bit8hfname = hf_bit8siflags;
8088 pvalues[6].bit9 = "Expanded Class";
8089 pvalues[6].bit9hfname = hf_bit9siflags;
8090 pvalues[6].bit10 = "Not Defined";
8091 pvalues[6].bit10hfname = hf_bit10siflags;
8092 pvalues[6].bit11= "Not Defined";
8093 pvalues[6].bit11hfname = hf_bit11siflags;
8094 pvalues[6].bit12 = "Not Defined";
8095 pvalues[6].bit12hfname = hf_bit12siflags;
8096 pvalues[6].bit13 = "Not Defined";
8097 pvalues[6].bit13hfname = hf_bit13siflags;
8098 pvalues[6].bit14 = "Not Defined";
8099 pvalues[6].bit14hfname = hf_bit14siflags;
8100 pvalues[6].bit15 = "Not Defined";
8101 pvalues[6].bit15hfname = hf_bit15siflags;
8102 pvalues[6].bit16 = "Not Defined";
8103 pvalues[6].bit16hfname = hf_bit16siflags;
8104 foffset = foffset+4;
8105 if(pvalues[0].vvalue != 2)
8107 pvalues[7].vvalue = tvb_get_letohs(tvb, foffset);
8108 global_flags = tvb_get_letohl(tvb, foffset);
8109 pvalues[7].vtype = VTYPE_BITFIELD;
8110 pvalues[7].vdesc = "Information Flags (low) Byte:";
8111 pvalues[7].vlength = 2;
8112 pvalues[7].hfname= hf_nds_rflags;
8113 pvalues[7].voffset = foffset;
8114 pvalues[7].bit1 = "Output Flags";
8115 pvalues[7].bit1hfname = hf_bit1infoflagsl;
8116 pvalues[7].bit2 = "Entry ID";
8117 pvalues[7].bit2hfname = hf_bit2infoflagsl;
8118 pvalues[7].bit3 = "Entry Flags";
8119 pvalues[7].bit3hfname = hf_bit3infoflagsl;
8120 pvalues[7].bit4 = "Subordinate Count";
8121 pvalues[7].bit4hfname = hf_bit4infoflagsl;
8122 pvalues[7].bit5 = "Modification Time";
8123 pvalues[7].bit5hfname = hf_bit5infoflagsl;
8124 pvalues[7].bit6 = "Modification Timestamp";
8125 pvalues[7].bit6hfname = hf_bit6infoflagsl;
8126 pvalues[7].bit7 = "Creation Timestamp";
8127 pvalues[7].bit7hfname = hf_bit7infoflagsl;
8128 pvalues[7].bit8 = "Partition Root ID";
8129 pvalues[7].bit8hfname = hf_bit8infoflagsl;
8130 pvalues[7].bit9 = "Parent ID";
8131 pvalues[7].bit9hfname = hf_bit9infoflagsl;
8132 pvalues[7].bit10 = "Revision Count";
8133 pvalues[7].bit10hfname = hf_bit10infoflagsl;
8134 pvalues[7].bit11 = "Replica Type";
8135 pvalues[7].bit11hfname = hf_bit11infoflagsl;
8136 pvalues[7].bit12 = "Base Class";
8137 pvalues[7].bit12hfname = hf_bit12infoflagsl;
8138 pvalues[7].bit13 = "Relative Distinguished Name";
8139 pvalues[7].bit13hfname = hf_bit13infoflagsl;
8140 pvalues[7].bit14 = "Distinguished Name";
8141 pvalues[7].bit14hfname = hf_bit14infoflagsl;
8142 pvalues[7].bit15 = "Root Distinguished Name";
8143 pvalues[7].bit15hfname = hf_bit15infoflagsl;
8144 pvalues[7].bit16 = "Parent Distinguished Name";
8145 pvalues[7].bit16hfname = hf_bit16infoflagsl;
8146 foffset = foffset+2;
8147 pvalues[8].vvalue = tvb_get_letohs(tvb, foffset);
8148 pvalues[8].vtype = VTYPE_BITFIELD;
8149 pvalues[8].vdesc = "Information Flags (high) Byte:";
8150 pvalues[8].vlength = 2;
8151 pvalues[8].hfname= hf_nds_rflags;
8152 pvalues[8].voffset = foffset;
8153 pvalues[8].bit1 = "Purge Time";
8154 pvalues[8].bit1hfname = hf_bit1infoflagsh;
8155 pvalues[8].bit2 = "Dereference Base Class";
8156 pvalues[8].bit2hfname = hf_bit2infoflagsh;
8157 pvalues[8].bit3 = "Not Defined";
8158 pvalues[8].bit3hfname = hf_bit3infoflagsh;
8159 pvalues[8].bit4 = "Not Defined";
8160 pvalues[8].bit4hfname = hf_bit4infoflagsh;
8161 pvalues[8].bit5 = "Not Defined";
8162 pvalues[8].bit5hfname = hf_bit5infoflagsh;
8163 pvalues[8].bit6 = "Not Defined";
8164 pvalues[8].bit6hfname = hf_bit6infoflagsh;
8165 pvalues[8].bit7 = "Not Defined";
8166 pvalues[8].bit7hfname = hf_bit7infoflagsh;
8167 pvalues[8].bit8 = "Not Defined";
8168 pvalues[8].bit8hfname = hf_bit8infoflagsh;
8169 pvalues[8].bit9 = "Not Defined";
8170 pvalues[8].bit9hfname = hf_bit9infoflagsh;
8171 pvalues[8].bit10 = "Not Defined";
8172 pvalues[8].bit10hfname = hf_bit10infoflagsh;
8173 pvalues[8].bit11 = "Not Defined";
8174 pvalues[8].bit11hfname = hf_bit11infoflagsh;
8175 pvalues[8].bit12 = "Not Defined";
8176 pvalues[8].bit12hfname = hf_bit12infoflagsh;
8177 pvalues[8].bit13 = "Not Defined";
8178 pvalues[8].bit13hfname = hf_bit13infoflagsh;
8179 pvalues[8].bit14 = "Not Defined";
8180 pvalues[8].bit14hfname = hf_bit14infoflagsh;
8181 pvalues[8].bit15 = "Not Defined";
8182 pvalues[8].bit15hfname = hf_bit15infoflagsh;
8183 pvalues[8].bit16 = "Not Defined";
8184 pvalues[8].bit16hfname = hf_bit16infoflagsh;
8185 foffset = foffset+2;
8189 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
8190 pvalues[0].vstring = "";
8191 pvalues[0].vtype = VTYPE_UINT32;
8192 pvalues[0].vdesc = "Version: %u";
8193 pvalues[0].vlength = 4;
8194 pvalues[0].voffset = foffset;
8195 pvalues[0].hfname= hf_nds_ver;
8196 foffset = foffset+pvalues[0].vlength;
8197 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
8198 pvalues[1].vtype = VTYPE_UINT32;
8199 pvalues[1].vstring = "";
8200 pvalues[1].vdesc = "Request Flags: 0x%08x";
8201 pvalues[1].vlength = 4;
8202 pvalues[1].hfname= hf_nds_rflags;
8203 pvalues[1].voffset = foffset;
8204 foffset = foffset+4;
8205 if(pvalues[0].vvalue == 0)
8207 pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
8208 pvalues[2].vstring = "";
8209 pvalues[2].vtype = VTYPE_UINT32;
8210 pvalues[2].vdesc = "Parent Entry ID: 0x%08x";
8211 pvalues[2].vlength = 4;
8212 resolve_eid = FALSE;
8213 global_eid = pvalues[2].vvalue;
8214 pvalues[2].voffset = foffset;
8215 pvalues[2].hfname= hf_nds_eid;
8216 foffset = foffset+pvalues[2].vlength;
8217 pvalues[3].vtype = VTYPE_STRING;
8218 pvalues[3].vdesc = "Relative Distinguished Name: %s";
8219 pvalues[3].vstring = "";
8220 pvalues[3].mvtype = MVTYPE_ATTR_REQUEST;
8221 pvalues[3].vvalue = 0;
8222 pvalues[3].vlength = 256;
8223 pvalues[3].vlength = tvb_get_letohl(tvb, foffset);
8224 if (pvalues[3].vlength == 0x00)
8226 pvalues[3].vtype = VTYPE_NONE;
8229 pvalues[3].voffset = foffset+4;
8230 foffset = foffset + 4;
8231 get_string(tvb, pvalues[3].voffset, pvalues[3].vlength, req_buffer.buffer);
8232 pvalues[3].vstring = req_buffer.buffer;
8233 strcpy(global_object_name, req_buffer.buffer);
8234 pvalues[3].hfname= hf_nds_relative_dn;
8235 foffset = foffset+pvalues[3].vlength;
8236 foffset += align_4(tvb, foffset);
8237 pvalues[4].vvalue = tvb_get_letohl(tvb, foffset);
8238 pvalues[4].vtype = VTYPE_MULTIVALUE_UINT32;
8239 pvalues[4].vstring = "";
8240 pvalues[4].vdesc = "Attributes: %u";
8241 pvalues[4].vlength = 4;
8242 pvalues[4].voffset = foffset;
8243 pvalues[4].mvtype = MVTYPE_ADD_ATTR_REQUEST;
8244 pvalues[4].hfname= hf_nds_attr;
8248 pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
8249 pvalues[2].vstring = "";
8250 pvalues[2].vtype = VTYPE_UINT32;
8251 pvalues[2].vdesc = "Iteration Handle: 0x%08x";
8252 pvalues[2].vlength = 4;
8253 pvalues[2].voffset = foffset;
8254 pvalues[2].hfname= hf_nds_iteration;
8255 foffset = foffset+pvalues[2].vlength;
8256 pvalues[3].vvalue = tvb_get_letohl(tvb, foffset);
8257 pvalues[3].vstring = "";
8258 pvalues[3].vtype = VTYPE_UINT32;
8259 pvalues[3].vdesc = "Parent Entry ID: 0x%08x";
8260 pvalues[3].vlength = 4;
8261 resolve_eid = FALSE;
8262 global_eid = pvalues[3].vvalue;
8263 pvalues[3].voffset = foffset;
8264 pvalues[3].hfname= hf_nds_eid;
8265 foffset = foffset+pvalues[3].vlength;
8266 pvalues[4].vtype = VTYPE_STRING;
8267 pvalues[4].vdesc = "Relative Distinguished Name: %s";
8268 pvalues[4].vstring = "";
8269 pvalues[4].mvtype = MVTYPE_ATTR_REQUEST;
8270 pvalues[4].vvalue = 0;
8271 pvalues[4].vlength = 256;
8272 pvalues[4].vlength = tvb_get_letohl(tvb, foffset);
8273 if (pvalues[4].vlength == 0x00)
8275 pvalues[4].vtype = VTYPE_NONE;
8278 pvalues[4].voffset = foffset+4;
8279 foffset = foffset + 4;
8280 get_string(tvb, pvalues[4].voffset, pvalues[4].vlength, req_buffer.buffer);
8281 pvalues[4].vstring = req_buffer.buffer;
8282 strcpy(global_object_name, req_buffer.buffer);
8283 pvalues[4].hfname= hf_nds_relative_dn;
8284 foffset = foffset+pvalues[4].vlength;
8285 foffset += align_4(tvb, foffset);
8286 pvalues[5].vvalue = tvb_get_letohl(tvb, foffset);
8287 pvalues[5].vtype = VTYPE_MULTIVALUE_UINT32;
8288 pvalues[5].vstring = "";
8289 pvalues[5].vdesc = "Attributes: %u";
8290 pvalues[5].vlength = 4;
8291 pvalues[5].voffset = foffset;
8292 pvalues[5].mvtype = MVTYPE_ADD_ATTR_REQUEST;
8293 pvalues[5].hfname= hf_nds_attr;
8297 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
8298 pvalues[0].vtype = VTYPE_UINT32;
8299 pvalues[0].vdesc = "Version: %u";
8300 pvalues[0].vlength = 4;
8301 pvalues[0].voffset = foffset;
8302 pvalues[0].hfname= hf_nds_ver;
8303 foffset = foffset+pvalues[0].vlength;
8304 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
8305 pvalues[1].vtype = VTYPE_UINT32;
8306 pvalues[1].vdesc = "Entry ID: 0x%08x";
8307 pvalues[1].vlength = 4;
8309 global_eid = pvalues[1].vvalue;
8310 pvalues[1].voffset = foffset;
8311 pvalues[1].hfname= hf_nds_eid;
8312 foffset = foffset+pvalues[1].vlength;
8315 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
8316 pvalues[0].vtype = VTYPE_UINT32;
8317 pvalues[0].vdesc = "Version: %u";
8318 pvalues[0].vlength = 4;
8319 pvalues[0].voffset = foffset;
8320 pvalues[0].hfname= hf_nds_ver;
8321 foffset = foffset+pvalues[0].vlength;
8322 if(pvalues[0].vvalue == 0)
8324 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
8325 pvalues[1].vtype = VTYPE_UINT32;
8326 pvalues[1].vstring = "";
8327 pvalues[1].vdesc = "Iteration Handle: 0x%08x"; /* always 0 */
8328 pvalues[1].vlength = 4;
8329 pvalues[1].hfname= hf_nds_iteration;
8330 pvalues[1].voffset = foffset;
8331 foffset = foffset+4;
8332 pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
8333 pvalues[2].vstring = "";
8334 pvalues[2].vtype = VTYPE_UINT32;
8335 pvalues[2].vdesc = "Entry ID: 0x%08x";
8336 pvalues[2].vlength = 4;
8337 pvalues[2].voffset = foffset;
8339 global_eid = pvalues[2].vvalue;
8340 pvalues[2].hfname = hf_nds_eid;
8341 foffset = foffset+pvalues[2].vlength;
8342 pvalues[3].vvalue = tvb_get_letohl(tvb, foffset);
8343 pvalues[3].vtype = VTYPE_MULTIVALUE_UINT32;
8344 pvalues[3].vstring = "";
8345 pvalues[3].vdesc = "Number of Attributes to Change %u";
8346 pvalues[3].vlength = 4;
8347 pvalues[3].mvtype = MVTYPE_MODIFY_ATTR_REQUEST;
8348 pvalues[3].hfname= hf_nds_number_of_changes;
8349 pvalues[3].voffset = foffset;
8353 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
8354 pvalues[1].vtype = VTYPE_UINT32;
8355 pvalues[1].vstring = "";
8356 pvalues[1].vdesc = "Request Flags: 0x%08x"; /* always 0 */
8357 pvalues[1].vlength = 4;
8358 pvalues[1].hfname= hf_nds_rflags;
8359 pvalues[1].voffset = foffset;
8360 foffset = foffset+4;
8361 pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
8362 pvalues[2].vtype = VTYPE_UINT32;
8363 pvalues[2].vstring = "";
8364 pvalues[2].vdesc = "Iteration Handle: 0x%08x"; /* always 0 */
8365 pvalues[2].vlength = 4;
8366 pvalues[2].hfname= hf_nds_iteration;
8367 pvalues[2].voffset = foffset;
8368 foffset = foffset+4;
8369 pvalues[3].vvalue = tvb_get_letohl(tvb, foffset);
8370 pvalues[3].vstring = "";
8371 pvalues[3].vtype = VTYPE_UINT32;
8372 pvalues[3].vdesc = "Entry ID: 0x%08x";
8373 pvalues[3].vlength = 4;
8374 pvalues[3].voffset = foffset;
8376 global_eid = pvalues[3].vvalue;
8377 pvalues[3].hfname = hf_nds_eid;
8378 foffset = foffset+pvalues[3].vlength;
8379 pvalues[4].vvalue = tvb_get_letohl(tvb, foffset);
8380 pvalues[4].vtype = VTYPE_MULTIVALUE_UINT32;
8381 pvalues[4].vstring = "";
8382 pvalues[4].vdesc = "Number of Attributes to Change %u";
8383 pvalues[4].vlength = 4;
8384 pvalues[4].mvtype = MVTYPE_MODIFY_ATTR_REQUEST;
8385 pvalues[4].hfname= hf_nds_number_of_changes;
8386 pvalues[4].voffset = foffset;
8390 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
8391 pvalues[0].vtype = VTYPE_UINT32;
8392 pvalues[0].vdesc = "Version: %u";
8393 pvalues[0].vlength = 4;
8394 pvalues[0].voffset = foffset;
8395 pvalues[0].hfname= hf_nds_ver;
8396 foffset = foffset+pvalues[0].vlength;
8397 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
8398 pvalues[1].vtype = VTYPE_UINT32;
8399 pvalues[1].vdesc = "Entry ID: 0x%08x";
8400 pvalues[1].vlength = 4;
8402 global_eid = pvalues[1].vvalue;
8403 pvalues[1].voffset = foffset;
8404 pvalues[1].hfname = hf_nds_eid;
8405 foffset = foffset+pvalues[1].vlength;
8406 pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
8407 pvalues[2].vtype = VTYPE_BOOLEAN;
8408 pvalues[2].vdesc = "Keep Original RDN: %s";
8409 pvalues[2].vlength = 4;
8410 pvalues[2].voffset = foffset;
8411 pvalues[2].mvtype = 0;
8412 pvalues[2].hfname= hf_nds_keep;
8413 foffset = foffset+4;
8414 foffset += align_4(tvb, foffset);
8415 pvalues[3].vtype = VTYPE_STRING;
8416 pvalues[3].vdesc = "New RDN: %s";
8417 pvalues[3].mvtype = 0;
8418 pvalues[3].vvalue = 0;
8419 pvalues[3].vlength = 256;
8420 pvalues[3].vlength = tvb_get_letohl(tvb, foffset);
8421 pvalues[3].voffset = foffset+4;
8422 foffset = foffset + 4;
8423 get_string(tvb, pvalues[3].voffset, pvalues[3].vlength, pvalues[3].vstring);
8424 pvalues[3].hfname= hf_nds_new_rdn;
8425 foffset = foffset+pvalues[3].vlength;
8428 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
8429 pvalues[0].vtype = VTYPE_UINT32;
8430 pvalues[0].vdesc = "Version: %u";
8431 pvalues[0].vlength = 4;
8432 pvalues[0].voffset = foffset;
8433 pvalues[0].hfname= hf_nds_ver;
8434 foffset = foffset+pvalues[0].vlength;
8435 pvalues[1].vvalue = tvb_get_letohs(tvb, foffset);
8436 global_flags = tvb_get_letohl(tvb, foffset);
8437 pvalues[1].vtype = VTYPE_BITFIELD;
8438 pvalues[1].vdesc = "Attribute Constraints:";
8439 pvalues[1].vlength = 2;
8440 pvalues[1].hfname= hf_nds_acflags;
8441 pvalues[1].voffset = foffset;
8442 pvalues[1].bit1 = "Single Valued";
8443 pvalues[1].bit1hfname = hf_bit1acflags;
8444 pvalues[1].bit2 = "Sized";
8445 pvalues[1].bit2hfname = hf_bit2acflags;
8446 pvalues[1].bit3 = "Non-Removable";
8447 pvalues[1].bit3hfname = hf_bit3acflags;
8448 pvalues[1].bit4 = "Read Only";
8449 pvalues[1].bit4hfname = hf_bit4acflags;
8450 pvalues[1].bit5 = "Hidden";
8451 pvalues[1].bit5hfname = hf_bit5acflags;
8452 pvalues[1].bit6 = "String";
8453 pvalues[1].bit6hfname = hf_bit6acflags;
8454 pvalues[1].bit7 = "Synchronize Immediate";
8455 pvalues[1].bit7hfname = hf_bit7acflags;
8456 pvalues[1].bit8 = "Public Read";
8457 pvalues[1].bit8hfname = hf_bit8acflags;
8458 pvalues[1].bit9 = "Server Read";
8459 pvalues[1].bit9hfname = hf_bit9acflags;
8460 pvalues[1].bit10 = "Write Managed";
8461 pvalues[1].bit10hfname = hf_bit10acflags;
8462 pvalues[1].bit11 = "Per Replica";
8463 pvalues[1].bit11hfname = hf_bit11acflags;
8464 pvalues[1].bit12 = "Never Schedule Synchronization";
8465 pvalues[1].bit12hfname = hf_bit12acflags;
8466 pvalues[1].bit13 = "Operational";
8467 pvalues[1].bit13hfname = hf_bit13acflags;
8468 pvalues[1].bit14 = "Not Defined";
8469 pvalues[1].bit14hfname = hf_bit14acflags;
8470 pvalues[1].bit15 = "Not Defined";
8471 pvalues[1].bit15hfname = hf_bit15acflags;
8472 pvalues[1].bit16 = "Not Defined";
8473 pvalues[1].bit16hfname = hf_bit16acflags;
8474 foffset = foffset+4;
8475 pvalues[2].vtype = VTYPE_STRING;
8476 pvalues[2].vdesc = "Attribute Name: %s";
8477 pvalues[2].mvtype = MVTYPE_ATTR_REQUEST;
8478 pvalues[2].vvalue = 0;
8479 pvalues[2].vlength = 256;
8480 pvalues[2].vlength = tvb_get_letohl(tvb, foffset);
8481 if (pvalues[2].vlength == 0x00)
8483 pvalues[2].vtype = VTYPE_NONE;
8486 pvalues[2].voffset = foffset+4;
8487 foffset = foffset + 4;
8488 get_string(tvb, pvalues[2].voffset, pvalues[2].vlength, req_buffer.buffer);
8489 pvalues[2].vstring = req_buffer.buffer;
8490 strcpy(global_object_name, req_buffer.buffer);
8491 pvalues[2].hfname= hf_nds_name;
8492 foffset = foffset+pvalues[2].vlength;
8493 foffset += align_4(tvb, foffset);
8494 pvalues[3].vvalue = tvb_get_letohl(tvb, foffset);
8495 pvalues[3].vstring = (char *)match_strval(pvalues[3].vvalue, nds_syntax);
8496 if(pvalues[3].vstring == NULL)
8498 pvalues[3].vstring = "No Syntax Found";
8500 pvalues[3].vtype = VTYPE_STRING;
8501 pvalues[3].vdesc = "Syntax: %s";
8502 pvalues[3].vlength = 4;
8503 pvalues[3].voffset = foffset;
8504 pvalues[3].hfname= hf_nds_syntax;
8505 pvalues[3].mvtype = 0;
8506 foffset = foffset+pvalues[3].vlength;
8507 pvalues[4].vvalue = tvb_get_letohl(tvb, foffset);
8508 pvalues[4].vtype = VTYPE_UINT32;
8509 pvalues[4].vdesc = "Lower Limit Value %u";
8510 pvalues[4].vlength = 4;
8511 pvalues[4].voffset = foffset;
8512 pvalues[4].hfname = hf_nds_lower;
8514 pvalues[5].vvalue = tvb_get_letohl(tvb, foffset);
8515 pvalues[5].vtype = VTYPE_UINT32;
8516 pvalues[5].vdesc = "Upper Limit Value %u";
8517 pvalues[5].vlength = 4;
8518 pvalues[5].voffset = foffset;
8519 pvalues[5].hfname = hf_nds_upper;
8521 pvalues[6].vvalue = tvb_get_letohl(tvb, foffset); /* Length of bytes field */
8523 pvalues[6].vtype = VTYPE_BYTES;
8524 pvalues[6].vdesc = "ASN.1 ID";
8525 pvalues[6].vlength = pvalues[6].vvalue;
8526 pvalues[6].voffset = foffset;
8527 pvalues[6].hfname = hf_nds_asn1;
8530 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
8533 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
8534 pvalues[0].vtype = VTYPE_UINT32;
8535 pvalues[0].vdesc = "Version: %u";
8536 pvalues[0].vlength = 4;
8537 pvalues[0].voffset = foffset;
8538 pvalues[0].hfname= hf_nds_ver;
8539 foffset = foffset+pvalues[0].vlength;
8540 pvalues[1].vtype = VTYPE_STRING;
8541 pvalues[1].vdesc = "Attribute Name: %s";
8542 pvalues[1].mvtype = MVTYPE_ATTR_REQUEST;
8543 pvalues[1].vvalue = 0;
8544 pvalues[1].vlength = 256;
8545 pvalues[1].vlength = tvb_get_letohl(tvb, foffset);
8546 if (pvalues[1].vlength == 0x00)
8548 pvalues[1].vtype = VTYPE_NONE;
8551 pvalues[1].voffset = foffset+4;
8552 foffset = foffset + 4;
8553 get_string(tvb, pvalues[1].voffset, pvalues[1].vlength, req_buffer.buffer);
8554 pvalues[1].vstring = req_buffer.buffer;
8555 strcpy(global_object_name, req_buffer.buffer);
8556 pvalues[1].hfname= hf_nds_attribute_dn;
8559 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
8562 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
8563 pvalues[0].vtype = VTYPE_UINT32;
8564 pvalues[0].vdesc = "Version: %u";
8565 pvalues[0].vlength = 4;
8566 pvalues[0].voffset = foffset;
8567 pvalues[0].hfname= hf_nds_ver;
8568 foffset = foffset+pvalues[0].vlength;
8569 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
8570 pvalues[1].vtype = VTYPE_UINT32;
8571 pvalues[1].vdesc = "Iteration Handle: 0x%08x";
8572 pvalues[1].vlength = 4;
8573 pvalues[1].voffset = foffset;
8574 pvalues[1].hfname= hf_nds_iteration;
8575 foffset = foffset+pvalues[1].vlength;
8576 pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
8577 global_flags = pvalues[2].vvalue;
8578 pvalues[2].vstring = (char *)match_strval(pvalues[2].vvalue, class_def_type);
8579 if(pvalues[2].vstring == NULL)
8581 pvalues[2].vstring = "No Class Definition Type Set";
8583 pvalues[2].vtype = VTYPE_STRING;
8584 pvalues[2].vdesc = "Class Definition Type: %s";
8585 pvalues[2].vlength = 4;
8586 pvalues[2].voffset = foffset;
8587 pvalues[2].mvtype = 0;
8588 pvalues[2].hfname= hf_nds_class_def_type;
8589 foffset = foffset + pvalues[2].vlength;
8590 pvalues[3].vvalue = tvb_get_letohl(tvb, foffset);
8591 if (pvalues[3].vvalue == 0x00000000)
8593 pvalues[3].vstring = "Do Not Return All Classes";
8594 pvalues[3].mvtype = 0;
8598 pvalues[3].vstring = "Return All Classes";
8599 pvalues[3].mvtype = MVTYPE_ATTR_REQUEST;
8601 pvalues[3].vtype = VTYPE_STRING;
8602 pvalues[3].vdesc = "%s";
8603 pvalues[3].vlength = 4;
8604 pvalues[3].voffset = foffset;
8605 pvalues[3].hfname= hf_nds_return_all_classes;
8606 foffset = foffset + pvalues[3].vlength;
8607 foffset += align_4(tvb, foffset);
8608 pvalues[4].vvalue = tvb_get_letohl(tvb, foffset);
8609 pvalues[4].vtype = VTYPE_MULTIVALUE_UINT32;
8610 pvalues[4].vdesc = "Classes: %d";
8611 pvalues[4].vlength = 4;
8612 pvalues[4].voffset = foffset;
8613 pvalues[4].mvtype = MVTYPE_READ_CLASS_REQ;
8614 pvalues[4].hfname= hf_nds_classes;
8617 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
8618 pvalues[0].vtype = VTYPE_UINT32;
8619 pvalues[0].vdesc = "Version: %u";
8620 pvalues[0].vlength = 4;
8621 pvalues[0].voffset = foffset;
8622 pvalues[0].hfname= hf_nds_ver;
8623 foffset = foffset+pvalues[0].vlength;
8624 pvalues[1].vtype = VTYPE_STRING;
8625 pvalues[1].vdesc = "Class Name: %s";
8626 pvalues[1].mvtype = MVTYPE_ATTR_REQUEST;
8627 pvalues[1].vvalue = 0;
8628 pvalues[1].vlength = 256;
8629 pvalues[1].vlength = tvb_get_letohl(tvb, foffset);
8630 if (pvalues[1].vlength == 0x00)
8632 pvalues[1].vtype = VTYPE_NONE;
8635 pvalues[1].voffset = foffset+4;
8636 foffset = foffset + 4;
8637 get_string(tvb, pvalues[1].voffset, pvalues[1].vlength, req_buffer.buffer);
8638 pvalues[1].vstring = req_buffer.buffer;
8639 strcpy(global_object_name, req_buffer.buffer);
8640 pvalues[1].hfname= hf_nds_base_class;
8641 foffset = foffset+pvalues[1].vlength;
8642 foffset += align_4(tvb, foffset);
8643 pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
8644 pvalues[2].vtype = VTYPE_MULTIVALUE_UINT32;
8645 pvalues[2].vdesc = "Number of Attributes to Add: %u";
8646 pvalues[2].vlength = 4;
8647 pvalues[2].voffset = foffset;
8648 pvalues[2].mvtype = MVTYPE_MODIFY_CLASS;
8649 pvalues[2].hfname= hf_nds_att_add;
8652 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
8653 pvalues[0].vtype = VTYPE_UINT32;
8654 pvalues[0].vdesc = "Version: %u";
8655 pvalues[0].vlength = 4;
8656 pvalues[0].voffset = foffset;
8657 pvalues[0].hfname= hf_nds_ver;
8658 foffset = foffset+pvalues[0].vlength;
8659 pvalues[1].vtype = VTYPE_STRING;
8660 pvalues[1].vdesc = "Class Name: %s";
8661 pvalues[1].mvtype = MVTYPE_ATTR_REQUEST;
8662 pvalues[1].vvalue = 0;
8663 pvalues[1].vlength = 256;
8664 pvalues[1].vlength = tvb_get_letohl(tvb, foffset);
8665 if (pvalues[1].vlength == 0x00)
8667 pvalues[1].vtype = VTYPE_NONE;
8670 pvalues[1].voffset = foffset+4;
8671 foffset = foffset + 4;
8672 get_string(tvb, pvalues[1].voffset, pvalues[1].vlength, req_buffer.buffer);
8673 pvalues[1].vstring = req_buffer.buffer;
8674 strcpy(global_object_name, req_buffer.buffer);
8675 pvalues[1].hfname= hf_nds_base;
8678 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
8679 pvalues[0].vtype = VTYPE_UINT32;
8680 pvalues[0].vdesc = "Version: %u";
8681 pvalues[0].vlength = 4;
8682 pvalues[0].voffset = foffset;
8683 pvalues[0].hfname= hf_nds_ver;
8684 foffset = foffset+pvalues[0].vlength;
8685 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
8686 pvalues[1].vtype = VTYPE_UINT32;
8687 pvalues[1].vdesc = "Iteration Handle: 0x%08x";
8688 pvalues[1].vlength = 4;
8689 pvalues[1].voffset = foffset;
8690 pvalues[1].hfname= hf_nds_iteration;
8691 foffset = foffset+pvalues[1].vlength;
8692 pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
8693 pvalues[2].vtype = VTYPE_UINT32;
8694 pvalues[2].vdesc = "Entry ID: 0x%08x";
8695 pvalues[2].vlength = 4;
8697 global_eid = pvalues[2].vvalue;
8698 pvalues[2].voffset = foffset;
8699 pvalues[2].hfname= hf_nds_eid;
8700 foffset = foffset+pvalues[2].vlength;
8703 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
8704 pvalues[0].vtype = VTYPE_UINT32;
8705 pvalues[0].vdesc = "Version: %u";
8706 pvalues[0].vlength = 4;
8707 pvalues[0].voffset = foffset;
8708 pvalues[0].hfname= hf_nds_ver;
8709 foffset = foffset+pvalues[0].vlength;
8710 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
8711 pvalues[1].vtype = VTYPE_UINT32;
8712 pvalues[1].vdesc = "Entry ID: 0x%08x";
8713 pvalues[1].vlength = 4;
8715 global_eid = pvalues[1].vvalue;
8716 pvalues[1].voffset = foffset;
8717 pvalues[1].hfname= hf_nds_eid;
8718 foffset = foffset+pvalues[1].vlength;
8719 pvalues[2].vtype = VTYPE_STRING;
8720 pvalues[2].vdesc = "Trustee Name: %s";
8721 pvalues[2].mvtype = MVTYPE_ATTR_REQUEST;
8722 pvalues[2].vvalue = 0;
8723 pvalues[2].vlength = 256;
8724 pvalues[2].vlength = tvb_get_letohl(tvb, foffset);
8725 if (pvalues[2].vlength == 0x00)
8727 pvalues[2].vtype = VTYPE_NONE;
8730 pvalues[2].voffset = foffset+4;
8731 foffset = foffset + 4;
8732 get_string(tvb, pvalues[2].voffset, pvalues[2].vlength, req_buffer.buffer);
8733 pvalues[2].vstring = req_buffer.buffer;
8734 pvalues[2].hfname= hf_nds_name;
8735 foffset = foffset+pvalues[2].vlength;
8736 foffset += align_4(tvb, foffset);
8737 pvalues[3].vtype = VTYPE_STRING;
8738 pvalues[3].vdesc = "Attribute to be Checked: %s";
8739 pvalues[3].mvtype = 0;
8740 pvalues[3].vvalue = 0;
8741 pvalues[3].vlength = 256;
8742 pvalues[3].vlength = tvb_get_letohl(tvb, foffset);
8743 if (pvalues[3].vlength == 0x00)
8745 pvalues[3].vtype = VTYPE_NONE;
8748 pvalues[3].voffset = foffset+4;
8749 foffset = foffset + 4;
8750 get_string(tvb, pvalues[3].voffset, pvalues[3].vlength, pvalues[3].vstring);
8751 pvalues[3].hfname= hf_nds_name;
8752 foffset = foffset+pvalues[3].vlength;
8753 foffset += align_4(tvb, foffset);
8754 if(pvalues[0].vvalue != 0)
8756 pvalues[4].vtype = VTYPE_STRING;
8757 pvalues[4].vdesc = "Security Equivalence: %s";
8758 pvalues[4].mvtype = MVTYPE_ATTR_REQUEST;
8759 pvalues[4].vvalue = 0;
8760 pvalues[4].vlength = 256;
8761 pvalues[4].vlength = tvb_get_letohl(tvb, foffset);
8762 if (pvalues[4].vlength == 0x00)
8764 pvalues[4].vtype = VTYPE_NONE;
8767 pvalues[4].voffset = foffset+4;
8768 foffset = foffset + 4;
8769 get_string(tvb, pvalues[4].voffset, pvalues[4].vlength, pvalues[4].vstring);
8770 pvalues[4].hfname= hf_nds_name;
8771 foffset = foffset+pvalues[4].vlength;
8772 foffset += align_4(tvb, foffset);
8776 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
8779 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
8782 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
8783 pvalues[0].vtype = VTYPE_UINT32;
8784 pvalues[0].vdesc = "Version: %u";
8785 pvalues[0].vlength = 4;
8786 pvalues[0].voffset = foffset;
8787 pvalues[0].hfname= hf_nds_ver;
8788 foffset = foffset+pvalues[0].vlength;
8789 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
8790 pvalues[1].vtype = VTYPE_BITFIELD;
8791 pvalues[1].vdesc = "Request Flags:";
8792 pvalues[1].vlength = 2;
8793 pvalues[1].hfname= hf_nds_rflags;
8794 pvalues[1].voffset = foffset;
8795 pvalues[1].bit1 = "Typeless";
8796 pvalues[1].bit1hfname = hf_nds_bit1;
8797 pvalues[1].bit2 = "All Containers";
8798 pvalues[1].bit2hfname = hf_nds_bit2;
8799 pvalues[1].bit3 = "Slashed";
8800 pvalues[1].bit3hfname = hf_nds_bit3;
8801 pvalues[1].bit4 = "Dotted";
8802 pvalues[1].bit4hfname = hf_nds_bit4;
8803 pvalues[1].bit5 = "Tuned";
8804 pvalues[1].bit5hfname = hf_nds_bit5;
8805 pvalues[1].bit6 = "Not Defined";
8806 pvalues[1].bit6hfname = hf_nds_bit6;
8807 pvalues[1].bit7 = "Not Defined";
8808 pvalues[1].bit7hfname = hf_nds_bit7;
8809 pvalues[1].bit8 = "Not Defined";
8810 pvalues[1].bit8hfname = hf_nds_bit8;
8811 pvalues[1].bit9 = "Not Defined";
8812 pvalues[1].bit9hfname = hf_nds_bit9;
8813 pvalues[1].bit10 = "Not Defined";
8814 pvalues[1].bit10hfname = hf_nds_bit10;
8815 pvalues[1].bit11 = "Not Defined";
8816 pvalues[1].bit11hfname = hf_nds_bit11;
8817 pvalues[1].bit12 = "Not Defined";
8818 pvalues[1].bit12hfname = hf_nds_bit12;
8819 pvalues[1].bit13 = "Not Defined";
8820 pvalues[1].bit13hfname = hf_nds_bit13;
8821 pvalues[1].bit14 = "Not Defined";
8822 pvalues[1].bit14hfname = hf_nds_bit14;
8823 pvalues[1].bit15 = "Not Defined";
8824 pvalues[1].bit15hfname = hf_nds_bit15;
8825 pvalues[1].bit16 = "Not Defined";
8826 pvalues[1].bit16hfname = hf_nds_bit16;
8827 foffset = foffset+pvalues[1].vlength;
8828 pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
8829 pvalues[2].vtype = VTYPE_UINT32;
8830 pvalues[2].vdesc = "Iteration Handle: 0x%08x";
8831 pvalues[2].vlength = 4;
8832 pvalues[2].voffset = foffset;
8833 pvalues[2].hfname= hf_nds_iteration;
8834 foffset = foffset+pvalues[2].vlength;
8835 if(pvalues[0].vvalue == 0)
8837 global_flags = 0x000000c0;
8840 pvalues[3].vvalue = tvb_get_letohs(tvb, foffset);
8841 pvalues[3].vtype = VTYPE_BITFIELD;
8842 pvalues[3].vdesc = "Information Flags (low) Byte:";
8843 pvalues[3].vlength = 2;
8844 pvalues[3].hfname= hf_nds_rflags;
8845 pvalues[3].voffset = foffset;
8846 pvalues[3].bit1 = "Output Flags";
8847 pvalues[3].bit1hfname = hf_bit1l1flagsl;
8848 pvalues[3].bit2 = "Entry ID";
8849 pvalues[3].bit2hfname = hf_bit2l1flagsl;
8850 pvalues[3].bit3 = "Replica State";
8851 pvalues[3].bit3hfname = hf_bit3l1flagsl;
8852 pvalues[3].bit4 = "Modification Timestamp";
8853 pvalues[3].bit4hfname = hf_bit4l1flagsl;
8854 pvalues[3].bit5 = "Purge Time";
8855 pvalues[3].bit5hfname = hf_bit5l1flagsl;
8856 pvalues[3].bit6 = "Local Partition ID";
8857 pvalues[3].bit6hfname = hf_bit6l1flagsl;
8858 pvalues[3].bit7 = "Distinguished Name";
8859 pvalues[3].bit7hfname = hf_bit7l1flagsl;
8860 pvalues[3].bit8 = "Replica Type";
8861 pvalues[3].bit8hfname = hf_bit8l1flagsl;
8862 pvalues[3].bit9 = "Partition Busy";
8863 pvalues[3].bit9hfname = hf_bit9l1flagsl;
8864 pvalues[3].bit10 = "Not Defined";
8865 pvalues[3].bit10hfname = hf_bit10l1flagsl;
8866 pvalues[3].bit11 = "Not Defined";
8867 pvalues[3].bit11hfname = hf_bit11l1flagsl;
8868 pvalues[3].bit12 = "Not Defined";
8869 pvalues[3].bit12hfname = hf_bit12l1flagsl;
8870 pvalues[3].bit13 = "Not Defined";
8871 pvalues[3].bit13hfname = hf_bit13l1flagsl;
8872 pvalues[3].bit14 = "Not Defined";
8873 pvalues[3].bit14hfname = hf_bit14l1flagsl;
8874 pvalues[3].bit15 = "Not Defined";
8875 pvalues[3].bit15hfname = hf_bit15l1flagsl;
8876 pvalues[3].bit16 = "Not Defined";
8877 pvalues[3].bit16hfname = hf_bit16l1flagsl;
8878 global_flags = pvalues[3].vvalue;
8879 foffset = foffset+2;
8880 pvalues[4].vvalue = tvb_get_letohs(tvb, foffset);
8881 pvalues[4].vtype = VTYPE_BITFIELD;
8882 pvalues[4].vdesc = "Information Flags (high) Byte:";
8883 pvalues[4].vlength = 2;
8884 pvalues[4].hfname= hf_nds_rflags;
8885 pvalues[4].voffset = foffset;
8886 pvalues[4].bit1 = "Not Defined";
8887 pvalues[4].bit1hfname = hf_bit1l1flagsl;
8888 pvalues[4].bit2 = "Not Defined";
8889 pvalues[4].bit2hfname = hf_bit2l1flagsl;
8890 pvalues[4].bit3 = "Not Defined";
8891 pvalues[4].bit3hfname = hf_bit3l1flagsl;
8892 pvalues[4].bit4 = "Not Defined";
8893 pvalues[4].bit4hfname = hf_bit4l1flagsl;
8894 pvalues[4].bit5 = "Not Defined";
8895 pvalues[4].bit5hfname = hf_bit5l1flagsl;
8896 pvalues[4].bit6 = "Not Defined";
8897 pvalues[4].bit6hfname = hf_bit6l1flagsl;
8898 pvalues[4].bit7 = "Not Defined";
8899 pvalues[4].bit7hfname = hf_bit7l1flagsl;
8900 pvalues[4].bit8 = "Not Defined";
8901 pvalues[4].bit8hfname = hf_bit8l1flagsl;
8902 pvalues[4].bit9 = "Not Defined";
8903 pvalues[4].bit9hfname = hf_bit9l1flagsl;
8904 pvalues[4].bit10 = "Not Defined";
8905 pvalues[4].bit10hfname = hf_bit10l1flagsl;
8906 pvalues[4].bit11 = "Not Defined";
8907 pvalues[4].bit11hfname = hf_bit11l1flagsl;
8908 pvalues[4].bit12 = "Not Defined";
8909 pvalues[4].bit12hfname = hf_bit12l1flagsl;
8910 pvalues[4].bit13 = "Not Defined";
8911 pvalues[4].bit13hfname = hf_bit13l1flagsl;
8912 pvalues[4].bit14 = "Not Defined";
8913 pvalues[4].bit14hfname = hf_bit14l1flagsl;
8914 pvalues[4].bit15 = "Not Defined";
8915 pvalues[4].bit15hfname = hf_bit15l1flagsl;
8916 pvalues[4].bit16 = "Not Defined";
8917 pvalues[4].bit16hfname = hf_bit16l1flagsl;
8918 foffset = foffset+2;
8919 if(pvalues[0].vvalue == 1)
8923 pvalues[5].vvalue = tvb_get_letohl(tvb, foffset);
8924 pvalues[5].vtype = VTYPE_UINT32;
8925 pvalues[5].vdesc = "Partition Root ID: 0x%08x";
8926 pvalues[5].vlength = 4;
8927 pvalues[5].voffset = foffset;
8928 pvalues[5].hfname= hf_nds_partition_root_id;
8929 foffset = foffset+pvalues[5].vlength;
8932 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
8933 nds_version = pvalues[0].vvalue;
8934 pvalues[0].vtype = VTYPE_UINT32;
8935 pvalues[0].vdesc = "Version: %u";
8936 pvalues[0].vlength = 4;
8937 pvalues[0].hfname = hf_nds_ver;
8938 pvalues[0].voffset = foffset;
8939 foffset = foffset+pvalues[0].vlength;
8940 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
8941 nds_version = pvalues[1].vvalue;
8942 pvalues[1].vtype = VTYPE_UINT32;
8943 pvalues[1].vdesc = "Flags: 0x%08x";
8944 pvalues[1].vlength = 4;
8945 pvalues[1].hfname = hf_nds_req_flags;
8946 pvalues[1].voffset = foffset;
8947 foffset = foffset+pvalues[1].vlength;
8948 pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
8949 pvalues[2].vtype = VTYPE_UINT32;
8950 pvalues[2].vdesc = "New Partition Root ID: 0x%08x";
8951 pvalues[2].vlength = 4;
8952 pvalues[2].voffset = foffset;
8953 pvalues[2].hfname= hf_nds_new_part_id;
8954 foffset = foffset+pvalues[2].vlength;
8957 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
8958 nds_version = pvalues[0].vvalue;
8959 pvalues[0].vtype = VTYPE_UINT32;
8960 pvalues[0].vdesc = "Version: %u";
8961 pvalues[0].vlength = 4;
8962 pvalues[0].hfname = hf_nds_ver;
8963 pvalues[0].voffset = foffset;
8964 foffset = foffset+pvalues[0].vlength;
8965 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
8966 nds_version = pvalues[1].vvalue;
8967 pvalues[1].vtype = VTYPE_UINT32;
8968 pvalues[1].vdesc = "Flags: 0x%08x";
8969 pvalues[1].vlength = 4;
8970 pvalues[1].hfname = hf_nds_req_flags;
8971 pvalues[1].voffset = foffset;
8972 foffset = foffset+pvalues[1].vlength;
8973 pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
8974 pvalues[2].vtype = VTYPE_UINT32;
8975 pvalues[2].vdesc = "Child Partition Root ID: 0x%08x";
8976 pvalues[2].vlength = 4;
8977 pvalues[2].voffset = foffset;
8978 pvalues[2].hfname= hf_nds_child_part_id;
8979 foffset = foffset+pvalues[2].vlength;
8982 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
8983 nds_version = pvalues[0].vvalue;
8984 pvalues[0].vtype = VTYPE_UINT32;
8985 pvalues[0].vdesc = "Version: %u";
8986 pvalues[0].vlength = 4;
8987 pvalues[0].hfname = hf_nds_ver;
8988 pvalues[0].voffset = foffset;
8989 foffset = foffset+pvalues[0].vlength;
8990 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
8991 nds_version = pvalues[1].vvalue;
8992 pvalues[1].vtype = VTYPE_UINT32;
8993 pvalues[1].vdesc = "Flags: 0x%08x";
8994 pvalues[1].vlength = 4;
8995 pvalues[1].hfname = hf_nds_req_flags;
8996 pvalues[1].voffset = foffset;
8997 foffset = foffset+pvalues[1].vlength;
8998 pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
8999 pvalues[2].vtype = VTYPE_UINT32;
9000 pvalues[2].vdesc = "Master Partition Root ID: 0x%08x";
9001 pvalues[2].vlength = 4;
9002 pvalues[2].voffset = foffset;
9003 pvalues[2].hfname= hf_nds_master_part_id;
9004 foffset = foffset+pvalues[2].vlength;
9005 pvalues[3].vvalue = tvb_get_letohl(tvb, foffset);
9006 pvalues[3].vstring = (char *)match_strval(pvalues[3].vvalue, nds_replica_type);
9007 if(pvalues[3].vstring == NULL)
9009 pvalues[3].vstring = "No Replica Type Found";
9011 pvalues[3].vtype = VTYPE_STRING;
9012 pvalues[3].vdesc = "Replica Type: %s";
9013 pvalues[3].vlength = 4;
9014 pvalues[3].voffset = foffset;
9015 pvalues[3].mvtype = 0;
9016 pvalues[3].hfname= hf_replica_type;
9017 foffset = foffset + pvalues[3].vlength;
9018 pvalues[4].vtype = VTYPE_STRING;
9019 pvalues[4].vdesc = "Target Server Name: %s";
9020 pvalues[4].mvtype = 0;
9021 pvalues[4].vvalue = 0;
9022 pvalues[4].vlength = 256;
9023 pvalues[4].vlength = tvb_get_letohl(tvb, foffset);
9024 if (pvalues[4].vlength == 0x00)
9026 pvalues[4].vtype = VTYPE_NONE;
9029 pvalues[4].voffset = foffset+4;
9030 foffset = foffset + 4;
9031 get_string(tvb, pvalues[4].voffset, pvalues[4].vlength, pvalues[4].vstring);
9032 pvalues[4].hfname= hf_nds_target_name;
9035 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9038 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
9039 nds_version = pvalues[0].vvalue;
9040 pvalues[0].vtype = VTYPE_UINT32;
9041 pvalues[0].vdesc = "Version: %u";
9042 pvalues[0].vlength = 4;
9043 pvalues[0].hfname = hf_nds_ver;
9044 pvalues[0].voffset = foffset;
9045 foffset = foffset+pvalues[0].vlength;
9046 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
9047 nds_version = pvalues[1].vvalue;
9048 pvalues[1].vtype = VTYPE_UINT32;
9049 pvalues[1].vdesc = "Streams Flags: 0x%08x";
9050 pvalues[1].vlength = 4;
9051 pvalues[1].hfname = hf_nds_stream_flags;
9052 pvalues[1].voffset = foffset;
9053 foffset = foffset+pvalues[1].vlength;
9054 pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
9055 pvalues[2].vtype = VTYPE_UINT32;
9056 pvalues[2].vdesc = "Entry ID: 0x%08x";
9057 pvalues[2].vlength = 4;
9059 global_eid = pvalues[2].vvalue;
9060 pvalues[2].voffset = foffset;
9061 pvalues[2].hfname= hf_nds_eid;
9062 foffset = foffset+pvalues[2].vlength;
9063 pvalues[3].vtype = VTYPE_STRING;
9064 pvalues[3].vdesc = "Stream Name: %s";
9065 pvalues[3].mvtype = MVTYPE_ATTR_REQUEST;
9066 pvalues[3].vvalue = 0;
9067 pvalues[3].vlength = 256;
9068 pvalues[3].vlength = tvb_get_letohl(tvb, foffset);
9069 if (pvalues[3].vlength == 0x00)
9071 pvalues[3].vtype = VTYPE_NONE;
9074 pvalues[3].voffset = foffset+4;
9076 get_string(tvb, pvalues[3].voffset, pvalues[3].vlength, pvalues[3].vstring);
9077 foffset += pvalues[3].vlength;
9078 foffset += align_4(tvb, foffset);
9079 pvalues[3].hfname= hf_nds_stream_name;
9082 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9085 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9088 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9091 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9094 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9097 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9100 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9103 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9106 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9109 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9112 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
9113 nds_version = pvalues[0].vvalue;
9114 pvalues[0].vtype = VTYPE_UINT32;
9115 pvalues[0].vdesc = "Version: %u";
9116 pvalues[0].vlength = 4;
9117 pvalues[0].hfname = hf_nds_ver;
9118 pvalues[0].voffset = foffset;
9119 foffset = foffset+pvalues[0].vlength;
9120 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
9121 nds_version = pvalues[1].vvalue;
9122 pvalues[1].vtype = VTYPE_UINT32;
9123 pvalues[1].vdesc = "Flags: 0x%08x";
9124 pvalues[1].vlength = 4;
9125 pvalues[1].hfname = hf_nds_req_flags;
9126 pvalues[1].voffset = foffset;
9127 foffset = foffset+pvalues[1].vlength;
9128 pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
9129 pvalues[2].vtype = VTYPE_UINT32;
9130 pvalues[2].vdesc = "Time Delay in Seconds: %u";
9131 pvalues[2].vlength = 4;
9132 pvalues[2].voffset = foffset;
9133 pvalues[2].hfname= hf_nds_time_delay;
9134 foffset = foffset+pvalues[2].vlength;
9135 if(pvalues[0].vvalue == 0)
9137 pvalues[3].vtype = VTYPE_STRING;
9138 pvalues[3].vdesc = "Root Most Object Name: %s";
9139 pvalues[3].mvtype = MVTYPE_ATTR_REQUEST;
9140 pvalues[3].vvalue = 0;
9141 pvalues[3].vlength = 256;
9142 pvalues[3].vlength = tvb_get_letohl(tvb, foffset);
9143 if (pvalues[3].vlength == 0x00)
9145 pvalues[3].vtype = VTYPE_NONE;
9148 pvalues[3].voffset = foffset+4;
9150 get_string(tvb, pvalues[3].voffset, pvalues[3].vlength, pvalues[3].vstring);
9151 foffset += pvalues[3].vlength;
9152 foffset += align_4(tvb, foffset);
9153 pvalues[3].hfname= hf_nds_root_name;
9157 pvalues[3].vvalue = tvb_get_letohl(tvb, foffset);
9158 pvalues[3].vtype = VTYPE_UINT32;
9159 pvalues[3].vdesc = "Entry ID: 0x%08x";
9160 pvalues[3].vlength = 4;
9162 global_eid = pvalues[3].vvalue;
9163 pvalues[3].voffset = foffset;
9164 pvalues[3].hfname= hf_nds_eid;
9165 foffset = foffset+pvalues[3].vlength;
9167 global_eid = pvalues[3].vvalue;
9171 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9174 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9177 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9180 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9183 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9186 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9189 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9192 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9195 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9198 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9201 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9204 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9207 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9210 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9213 pvalues[0].vvalue = 0;
9216 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9219 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9222 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9225 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
9226 pvalues[0].vtype = VTYPE_UINT32;
9227 pvalues[0].vdesc = "Version: %u";
9228 pvalues[0].vlength = 4;
9229 pvalues[0].voffset = foffset;
9230 pvalues[0].hfname= hf_nds_ver;
9231 foffset = foffset+pvalues[0].vlength;
9232 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
9233 pvalues[1].vtype = VTYPE_UINT32;
9234 pvalues[1].vdesc = "Entry ID: 0x%08x";
9235 pvalues[1].vlength = 4;
9237 global_eid = pvalues[1].vvalue;
9238 pvalues[1].voffset = foffset;
9239 pvalues[1].hfname= hf_nds_eid;
9240 foffset = foffset+pvalues[1].vlength;
9243 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
9244 pvalues[0].vtype = VTYPE_UINT32;
9245 pvalues[0].vdesc = "Reply Buffer Size: %u";
9246 pvalues[0].vlength = 4;
9247 pvalues[0].voffset = foffset;
9248 pvalues[0].hfname= hf_nds_buffer_size;
9249 foffset = foffset+pvalues[0].vlength;
9250 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
9251 pvalues[1].vtype = VTYPE_UINT32;
9252 pvalues[1].vdesc = "Version: %u";
9253 pvalues[1].vlength = 4;
9254 pvalues[1].voffset = foffset;
9255 pvalues[1].hfname= hf_nds_ver;
9256 foffset = foffset+pvalues[1].vlength;
9257 pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
9258 pvalues[2].vtype = VTYPE_UINT32;
9259 pvalues[2].vdesc = "Entry ID: 0x%08x";
9260 pvalues[2].vlength = 4;
9262 global_eid = pvalues[2].vvalue;
9263 pvalues[2].voffset = foffset;
9264 pvalues[2].hfname= hf_nds_eid;
9265 foffset = foffset+pvalues[2].vlength;
9268 pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
9269 pvalues[0].vtype = VTYPE_UINT32;
9270 pvalues[0].vdesc = "Version: %u";
9271 pvalues[0].vlength = 4;
9272 pvalues[0].voffset = foffset;
9273 pvalues[0].hfname= hf_nds_ver;
9274 foffset = foffset+pvalues[0].vlength;
9275 pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
9276 pvalues[1].vtype = VTYPE_UINT32;
9277 pvalues[1].vdesc = "Entry ID: 0x%08x";
9278 pvalues[1].vlength = 4;
9280 global_eid = pvalues[1].vvalue;
9281 pvalues[1].voffset = foffset;
9282 pvalues[1].hfname= hf_nds_eid;
9283 foffset = foffset+pvalues[1].vlength;
9288 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9291 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9294 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9297 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9300 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9303 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9306 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9309 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9312 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9315 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9318 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9321 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9324 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9327 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9330 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9333 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9336 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9339 pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
9342 /* Fill in the INFO column. */
9343 if (check_col(pinfo->cinfo, COL_INFO)) {
9345 col_set_str(pinfo->cinfo, COL_PROTOCOL, "NDS");
9346 if (nds_frag != 0xffffffff) {
9347 col_add_fstr(pinfo->cinfo, COL_INFO, "C Continue NDS Fragment %08x", nds_frag);
9350 col_add_fstr(pinfo->cinfo, COL_INFO, "C NDS %s", verb_string);
9352 run_info_str = TRUE;
9355 col_add_fstr(pinfo->cinfo, COL_INFO,
9356 "C Unknown Function %d (0x%02x)",
9361 /* Keep track of the address and connection whence the request
9362 came, and the address and connection to which the request
9363 is being sent, so that we can match up calls with replies.
9364 (We don't include the sequence number, as we may want
9365 to have all packets over the same connection treated
9366 as being part of a single conversation so that we can
9367 let the user select that conversation to be displayed.) */
9369 conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
9370 PT_NCP, nw_connection, nw_connection, 0);
9371 if (conversation == NULL) {
9372 /* It's not part of any conversation - create a new one. */
9373 conversation = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst,
9374 PT_NCP, nw_connection, nw_connection, 0);
9377 if (!pinfo->fd->flags.visited) {
9378 request_value = ncp_hash_insert(conversation, sequence, ncp_rec);
9379 request_value->req_frame_num = pinfo->fd->num;
9380 request_value->req_frame_time=pinfo->fd->abs_ts;
9382 /* If this is the first time we're examining the packet,
9383 * check to see if this NCP type uses a "request condition".
9384 * If so, we have to build a proto_tree because request conditions
9385 * use display filters to work, and without a proto_tree,
9386 * display filters can't possibly work. If we already have
9387 * a proto_tree, then wonderful. If we don't, we need to build
9389 if (ncp_rec && !ncp_tree) {
9390 run_req_cond = TRUE;
9392 /* Keep track of the Fragment number in the request for defrag logic */
9393 request_value->nds_frag_num = nds_frag;
9396 /* If we have to handle a request condition, or have to
9397 add to the Info column, we need to construct a protocol
9398 tree. If we already have a proto_tree, then wonderful.
9399 If we don't, we need to build one. */
9400 if ((run_info_str || run_req_cond) && !ncp_tree) {
9403 temp_tree = proto_tree_create_root();
9404 proto_tree_set_visible(temp_tree, FALSE);
9405 ti = proto_tree_add_item(temp_tree, proto_ncp, tvb, 0, -1, FALSE);
9406 ncp_tree = proto_item_add_subtree(ti, ett_ncp);
9410 /* If the dissection throws an exception, be sure to free
9411 * the temporary proto_tree that was created. Because of the
9412 * way the CLEANUP_PUSH macro works, we can't put it in an 'if'
9413 * block; it has to be in the same scope as the terminating
9414 * CLEANUP_POP or CLEANUP_POP_AND_ALLOC. So, we always
9415 * call CLEANUP_POP and friends, but the value of temp_tree is
9416 * NULL if no cleanup is needed, and non-null if cleanup is needed.
9418 CLEANUP_PUSH(free_proto_tree, temp_tree);
9420 #ifdef FAKE_TREE_IS_VISIBLE
9421 PTREE_DATA(ncp_tree)->visible=1;
9424 request_value = ncp_hash_lookup(conversation, sequence);
9426 case NCP_BROADCAST_SLOT:
9430 case NCP_SERVICE_REQUEST:
9432 ptvc = ptvcursor_new(ncp_tree, tvb, 7);
9433 if (ncp_rec && ncp_rec->request_ptvc)
9435 clear_repeat_vars();
9436 process_ptvc_record(ptvc, ncp_rec->request_ptvc, NULL, TRUE, ncp_rec);
9438 proto_tree_add_uint_format(ncp_tree, hf_ncp_func, tvb, 6, 1,
9439 func, "Function: %d (0x%02X), %s",
9440 func, func, ncp_rec ? ncp_rec->name : "Unknown");
9442 proto_tree_add_uint_format(ncp_tree, hf_ncp_subfunc, tvb, 7, 1,
9443 subfunc, "SubFunction: %d (0x%02x)",
9446 proto_tree_add_uint(ncp_tree, hf_ncp_fragment_handle, tvb, 8, 4,
9449 if (nds_frag == 0xffffffff) {
9451 proto_tree_add_item(ncp_tree, hf_ncp_fragment_size, tvb, 12, 4, TRUE);
9453 proto_tree_add_item(ncp_tree, hf_ncp_message_size, tvb, 16, 4, TRUE);
9455 proto_tree_add_item(ncp_tree, hf_ncp_nds_flag, tvb, 20, 4, FALSE);
9457 proto_tree_add_uint_format(ncp_tree, hf_ncp_nds_verb, tvb, 24, 4,
9458 nds_verb, "NDS Verb: %d, (0x%02x), %s",
9459 nds_verb, nds_verb, verb_string);
9460 added_arrow = FALSE;
9461 for (i = 0; i < 9; i++) {
9462 switch (pvalues[i].vtype) {
9464 case VTYPE_NONE: /* no value */
9468 proto_tree_add_uint_format(ncp_tree, pvalues[i].hfname, tvb, pvalues[i].voffset,
9469 pvalues[i].vlength, pvalues[i].vtype, "NDS Parameter not defined %d",
9474 proto_tree_add_uint_format(ncp_tree, pvalues[i].hfname, tvb, pvalues[i].voffset,
9475 pvalues[i].vlength, pvalues[i].vtype, "NDS Parameter not defined %d",
9480 proto_tree_add_uint_format(ncp_tree, pvalues[i].hfname, tvb, pvalues[i].voffset,
9481 pvalues[i].vlength, pvalues[i].vvalue, pvalues[i].vdesc,
9486 proto_tree_add_string_format(ncp_tree, pvalues[i].hfname, tvb, pvalues[i].voffset,
9487 pvalues[i].vlength, pvalues[i].vstring, pvalues[i].vdesc, pvalues[i].vstring);
9488 if (pvalues[i].mvtype == MVTYPE_ATTR_REQUEST) {
9490 * The "vstring" value is set to the input ES type
9491 * for MVTYPE_PROC_ENTRY_SPECIFIERS,
9492 * to add string to columninfo
9494 if (check_col(pinfo->cinfo, COL_INFO)) {
9496 col_append_str(pinfo->cinfo, COL_INFO, " -> ");
9499 col_append_str(pinfo->cinfo, COL_INFO, pvalues[i].vstring);
9504 case VTYPE_BITFIELD:
9505 process_bitfield(ncp_tree, tvb, &pvalues[i]);
9508 case VTYPE_MULTIVALUE_UINT32:
9509 process_multivalues(ncp_tree, tvb, &pvalues[i]);
9510 if (pvalues[i].mvtype == MVTYPE_PROC_ENTRY_SPECIFIERS) {
9512 * The "vstring" value is set to the input ES type
9513 * by "process_multivalues()".
9515 strcpy(global_object_name, mv_resolve_name_string);
9517 if (pvalues[i].mvtype == MVTYPE_ATTR_REQUEST || pvalues[i].mvtype == MVTYPE_PROC_ENTRY_SPECIFIERS) {
9519 * The "vstring" value is set to the input ES type
9520 * for MVTYPE_PROC_ENTRY_SPECIFIERS,
9521 * and the last string for MVTYPE_ATTR_REQUEST,
9522 * by "process_multivalues()".
9524 if (check_col(pinfo->cinfo, COL_INFO)) {
9525 col_append_str(pinfo->cinfo, COL_INFO, pvalues[i].vstring);
9527 col_append_str(pinfo->cinfo, COL_INFO, " -> ");
9530 col_append_str(pinfo->cinfo, COL_INFO, mv_resolve_name_string);
9536 proto_tree_add_bytes(ncp_tree, pvalues[i].hfname, tvb, pvalues[i].voffset,
9537 pvalues[i].vlength, tvb_get_ptr(tvb, pvalues[i].voffset, pvalues[i].vvalue));
9541 proto_tree_add_item(ncp_tree, pvalues[i].hfname, tvb, pvalues[i].voffset, pvalues[i].vlength, TRUE);
9545 proto_tree_add_uint_format(ncp_tree, hf_nds_p1type, tvb, pvalues[i].voffset,
9546 pvalues[i].vlength, pvalues[i].vtype, "NDS Parameter not defined %u",
9550 /* For NDS requests with just an EID, resolve name from hash table. */
9552 request_eid_value = ncp_eid_hash_lookup(conversation, global_eid);
9554 if (request_eid_value) {
9555 strcpy(global_object_name, request_eid_value->object_name);
9556 if (check_col(pinfo->cinfo, COL_INFO))
9558 col_append_str(pinfo->cinfo, COL_INFO, ", Object Name - ");
9559 col_append_str(pinfo->cinfo, COL_INFO, global_object_name);
9565 request_value->nds_request_verb = nds_verb;
9566 request_value->nds_version = nds_version;
9567 strcpy(request_value->object_name, global_object_name);
9568 request_value->req_nds_flags = global_flags;
9577 ptvcursor_free(ptvc);
9579 /* Free the temporary proto_tree */
9580 CLEANUP_CALL_AND_POP;
9585 * XXX - this duplicates stuff in "dissect_ncp_request()"; could
9586 * "dissect_ncp_request()" not just call "dissect_ping_req()" if
9587 * the operation is an NCP ping, and "dissect_ping_req()" just dissect
9591 dissect_ping_req(tvbuff_t *tvb, packet_info *pinfo,
9592 guint32 nw_connection, guint8 sequence,
9593 guint16 type, proto_tree *ncp_tree)
9595 guint8 func, subfunc = 0;
9596 ncp_req_hash_value *request_value = NULL;
9597 const ncp_record *ncp_rec = NULL;
9598 conversation_t *conversation;
9599 ptvcursor_t *ptvc = NULL;
9600 proto_tree *temp_tree = NULL;
9601 gint length_remaining = 0;
9603 guint32 ping_version;
9605 char string_buffer[1024];
9607 #ifdef FAKE_TREE_IS_VISIBLE
9609 PTREE_DATA(ncp_tree)->visible=1;
9618 string_buffer[0] = '\0';
9619 pvalue.vstring = string_buffer;
9622 func = tvb_get_guint8(tvb, 6);
9623 subfunc = tvb_get_guint8(tvb, 7);
9625 ncp_rec = ncp_record_find(func, subfunc);
9627 /* Fill in the INFO column. */
9628 if (check_col(pinfo->cinfo, COL_INFO))
9633 col_set_str(pinfo->cinfo, COL_PROTOCOL, "NDS");
9634 col_add_fstr(pinfo->cinfo, COL_INFO, "C Ping for NDS");
9638 if (!pinfo->fd->flags.visited)
9641 /* This is the first time we've looked at this packet.
9642 Keep track of the address and connection whence the request
9643 came, and the address and connection to which the request
9644 is being sent, so that we can match up calls with replies.
9645 (We don't include the sequence number, as we may want
9646 to have all packets over the same connection treated
9647 as being part of a single conversation so that we can
9648 let the user select that conversation to be displayed.) */
9650 conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
9651 PT_NCP, nw_connection, nw_connection, 0);
9653 if (conversation == NULL)
9655 /* It's not part of any conversation - create a new one. */
9656 conversation = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst,
9657 PT_NCP, nw_connection, nw_connection, 0);
9660 request_value = ncp_hash_insert(conversation, sequence, ncp_rec);
9661 request_value->req_frame_num = pinfo->fd->num;
9662 request_value->req_frame_time=pinfo->fd->abs_ts;
9664 /* If this is the first time we're examining the packet,
9665 * check to see if this NCP type uses a "request condition".
9666 * If so, we have to build a proto_tree because request conditions
9667 * use display filters to work, and without a proto_tree,
9668 * display filters can't possibly work. If we already have
9669 * a proto_tree, then wonderful. If we don't, we need to build
9671 if (ncp_rec && !ncp_tree) {
9674 temp_tree = proto_tree_create_root();
9675 proto_tree_set_visible(temp_tree, FALSE);
9676 ti = proto_tree_add_item(temp_tree, proto_ncp, tvb, 0, -1, FALSE);
9677 ncp_tree = proto_item_add_subtree(ti, ett_ncp);
9682 /* If the dissection throws an exception, be sure to free
9683 * the temporary proto_tree that was created. Because of the
9684 * way the CLEANUP_PUSH macro works, we can't put it in an 'if'
9685 * block; it has to be in the same scope as the terminating
9686 * CLEANUP_POP or CLEANUP_POP_AND_ALLOC. So, we always
9687 * call CLEANUP_POP and friends, but the value of temp_tree is
9688 * NULL if no cleanup is needed, and non-null if cleanup is needed.
9690 CLEANUP_PUSH(free_proto_tree, temp_tree);
9694 case NCP_BROADCAST_SLOT:
9698 case NCP_SERVICE_REQUEST:
9699 proto_tree_add_uint_format(ncp_tree, hf_ncp_func, tvb, 6, 1,
9700 func, "Function: %u (0x%02X), %s",
9701 func, func, ncp_rec ? ncp_rec->name : "Unknown");
9703 proto_tree_add_uint_format(ncp_tree, hf_ncp_subfunc, tvb, 7, 1,
9704 subfunc, "SubFunction: %u (0x%02x)",
9707 length_remaining = tvb_reported_length_remaining(tvb, 8);
9709 if (length_remaining >= 8) {
9710 ping_version = tvb_get_letohl(tvb, 8);
9711 proto_tree_add_uint(ncp_tree, hf_nds_ping_version, tvb, 8,
9713 nds_flags = tvb_get_letohl(tvb, 12);
9715 request_value->nds_request_verb = 0xf0;
9716 request_value->req_nds_flags = nds_flags;
9718 proto_tree_add_uint_hidden(ncp_tree, hf_ncp_nds_verb, tvb, 0, 0,
9722 pvalue.vvalue = tvb_get_letohs(tvb, 12);
9723 pvalue.vtype = VTYPE_BITFIELD;
9724 pvalue.vstring = "";
9725 pvalue.vdesc = "Ping (low) Request Flags:";
9727 pvalue.hfname= hf_nds_rflags;
9728 pvalue.voffset = 12;
9729 pvalue.bit1 = "Supported Fields";
9730 pvalue.bit1hfname = hf_bit1pingflags1;
9731 pvalue.bit2 = "Depth";
9732 pvalue.bit2hfname = hf_bit2pingflags1;
9733 pvalue.bit3 = "Revision";
9734 pvalue.bit3hfname = hf_bit3pingflags1;
9735 pvalue.bit4 = "Flags";
9736 pvalue.bit4hfname = hf_bit4pingflags1;
9737 pvalue.bit5 = "Verification Flags";
9738 pvalue.bit5hfname = hf_bit5pingflags1;
9739 pvalue.bit6 = "Letter Version";
9740 pvalue.bit6hfname = hf_bit6pingflags1;
9741 pvalue.bit7 = "OS Version";
9742 pvalue.bit7hfname = hf_bit7pingflags1;
9743 pvalue.bit8 = "License Flags";
9744 pvalue.bit8hfname = hf_bit8pingflags1;
9745 pvalue.bit9 = "DS Time";
9746 pvalue.bit9hfname = hf_bit9pingflags1;
9747 pvalue.bit10 = "Not Defined";
9748 pvalue.bit10hfname = hf_bit10pingflags1;
9749 pvalue.bit11 = "Not Defined";
9750 pvalue.bit11hfname = hf_bit11pingflags1;
9751 pvalue.bit12 = "Not Defined";
9752 pvalue.bit12hfname = hf_bit12pingflags1;
9753 pvalue.bit13 = "Not Defined";
9754 pvalue.bit13hfname = hf_bit13pingflags1;
9755 pvalue.bit14 = "Not Defined";
9756 pvalue.bit14hfname = hf_bit14pingflags1;
9757 pvalue.bit15 = "Not Defined";
9758 pvalue.bit15hfname = hf_bit15pingflags1;
9759 pvalue.bit16 = "Not Defined";
9760 pvalue.bit16hfname = hf_bit16pingflags1;
9762 process_bitfield(ncp_tree, tvb, &pvalue);
9764 pvalue.vvalue = tvb_get_letohs(tvb, 14);
9765 pvalue.vtype = VTYPE_BITFIELD;
9766 pvalue.vstring = "";
9767 pvalue.vdesc = "Ping (high) Request Flags:";
9769 pvalue.hfname= hf_nds_rflags;
9770 pvalue.voffset = 14;
9771 pvalue.bit1 = "Sap Name";
9772 pvalue.bit1hfname = hf_bit1pingflags2;
9773 pvalue.bit2 = "Tree Name";
9774 pvalue.bit2hfname = hf_bit2pingflags2;
9775 pvalue.bit3 = "OS Name";
9776 pvalue.bit3hfname = hf_bit3pingflags2;
9777 pvalue.bit4 = "Hardware Name";
9778 pvalue.bit4hfname = hf_bit4pingflags2;
9779 pvalue.bit5 = "Vendor Name";
9780 pvalue.bit5hfname = hf_bit5pingflags2;
9781 pvalue.bit6 = "Not Defined";
9782 pvalue.bit6hfname = hf_bit6pingflags2;
9783 pvalue.bit7 = "Not Defined";
9784 pvalue.bit7hfname = hf_bit7pingflags2;
9785 pvalue.bit8 = "Not Defined";
9786 pvalue.bit8hfname = hf_bit8pingflags2;
9787 pvalue.bit9 = "Not Defined";
9788 pvalue.bit9hfname = hf_bit9pingflags2;
9789 pvalue.bit10 = "Not Defined";
9790 pvalue.bit10hfname = hf_bit10pingflags2;
9791 pvalue.bit11 = "Not Defined";
9792 pvalue.bit11hfname = hf_bit11pingflags2;
9793 pvalue.bit12 = "Not Defined";
9794 pvalue.bit12hfname = hf_bit12pingflags2;
9795 pvalue.bit13 = "Not Defined";
9796 pvalue.bit13hfname = hf_bit13pingflags2;
9797 pvalue.bit14 = "Not Defined";
9798 pvalue.bit14hfname = hf_bit14pingflags2;
9799 pvalue.bit15 = "Not Defined";
9800 pvalue.bit15hfname = hf_bit15pingflags2;
9801 pvalue.bit16 = "Not Defined";
9802 pvalue.bit16hfname = hf_bit16pingflags2;
9804 process_bitfield(ncp_tree, tvb, &pvalue);
9812 ptvc = ptvcursor_new(ncp_tree, tvb, 7);
9813 if (ncp_rec && ncp_rec->request_ptvc) {
9814 clear_repeat_vars();
9815 process_ptvc_record(ptvc, ncp_rec->request_ptvc, NULL, TRUE, ncp_rec);
9817 ptvcursor_free(ptvc);
9819 /* Free the temporary proto_tree */
9820 CLEANUP_CALL_AND_POP;