From Greg Morris:
[obnox/wireshark/wip.git] / epan / dissectors / ncp2222.py
1 #!/usr/bin/env python
2
3 """
4 Creates C code from a table of NCP type 0x2222 packet types.
5 (And 0x3333, which are the replies, but the packets are more commonly
6 refered to as type 0x2222; the 0x3333 replies are understood to be
7 part of the 0x2222 "family")
8
9 The data-munging code was written by Gilbert Ramirez.
10 The NCP data comes from Greg Morris <GMORRIS@novell.com>.
11 Many thanks to Novell for letting him work on this.
12
13 Additional data sources:
14 "Programmer's Guide to the NetWare Core Protocol" by Steve Conner and Dianne Conner.
15
16 Novell provides info at:
17
18 http://developer.novell.com/ndk/ncp.htm  (where you can download an
19 *.exe file which installs a PDF, although you may have to create a login
20 to do this)
21
22 or
23
24 http://developer.novell.com/ndk/doc/ncp/
25 for a badly-formatted HTML version of the same PDF.
26
27
28 $Id$
29
30
31 Portions Copyright (c) 2000-2002 by Gilbert Ramirez <gram@alumni.rice.edu>.
32 Portions Copyright (c) Novell, Inc. 2000-2003.
33
34 This program is free software; you can redistribute it and/or
35 modify it under the terms of the GNU General Public License
36 as published by the Free Software Foundation; either version 2
37 of the License, or (at your option) any later version.
38
39 This program is distributed in the hope that it will be useful,
40 but WITHOUT ANY WARRANTY; without even the implied warranty of
41 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
42 GNU General Public License for more details.
43
44 You should have received a copy of the GNU General Public License
45 along with this program; if not, write to the Free Software
46 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
47 """
48
49 import os
50 import sys
51 import string
52 import getopt
53 import traceback
54
55 errors          = {}
56 groups          = {}
57 packets         = []
58 compcode_lists  = None
59 ptvc_lists      = None
60 msg             = None
61 reply_var = None
62
63 REC_START       = 0
64 REC_LENGTH      = 1
65 REC_FIELD       = 2
66 REC_ENDIANNESS  = 3
67 REC_VAR         = 4
68 REC_REPEAT      = 5
69 REC_REQ_COND    = 6
70
71 NO_VAR          = -1
72 NO_REPEAT       = -1
73 NO_REQ_COND     = -1
74 NO_LENGTH_CHECK = -2
75
76
77 PROTO_LENGTH_UNKNOWN    = -1
78
79 global_highest_var = -1
80 global_req_cond = {}
81
82
83 REQ_COND_SIZE_VARIABLE = "REQ_COND_SIZE_VARIABLE"
84 REQ_COND_SIZE_CONSTANT = "REQ_COND_SIZE_CONSTANT"
85
86 ##############################################################################
87 # Global containers
88 ##############################################################################
89
90 class UniqueCollection:
91         """The UniqueCollection class stores objects which can be compared to other
92         objects of the same class. If two objects in the collection are equivalent,
93         only one is stored."""
94
95         def __init__(self, name):
96                 "Constructor"
97                 self.name = name
98                 self.members = []
99                 self.member_reprs = {}
100
101         def Add(self, object):
102                 """Add an object to the members lists, if a comparable object
103                 doesn't already exist. The object that is in the member list, that is
104                 either the object that was added or the comparable object that was
105                 already in the member list, is returned."""
106
107                 r = repr(object)
108                 # Is 'object' a duplicate of some other member?
109                 if self.member_reprs.has_key(r):
110                         return self.member_reprs[r]
111                 else:
112                         self.member_reprs[r] = object
113                         self.members.append(object)
114                         return object
115
116         def Members(self):
117                 "Returns the list of members."
118                 return self.members
119
120         def HasMember(self, object):
121                 "Does the list of members contain the object?"
122                 if self.members_reprs.has_key(repr(object)):
123                         return 1
124                 else:
125                         return 0
126
127 # This list needs to be defined before the NCP types are defined,
128 # because the NCP types are defined in the global scope, not inside
129 # a function's scope.
130 ptvc_lists      = UniqueCollection('PTVC Lists')
131
132 ##############################################################################
133
134 class NamedList:
135         "NamedList's keep track of PTVC's and Completion Codes"
136         def __init__(self, name, list):
137                 "Constructor"
138                 self.name = name
139                 self.list = list
140
141         def __cmp__(self, other):
142                 "Compare this NamedList to another"
143
144                 if isinstance(other, NamedList):
145                         return cmp(self.list, other.list)
146                 else:
147                         return 0
148
149
150         def Name(self, new_name = None):
151                 "Get/Set name of list"
152                 if new_name != None:
153                         self.name = new_name
154                 return self.name
155
156         def Records(self):
157                 "Returns record lists"
158                 return self.list
159
160         def Null(self):
161                 "Is there no list (different from an empty list)?"
162                 return self.list == None
163
164         def Empty(self):
165                 "It the list empty (different from a null list)?"
166                 assert(not self.Null())
167
168                 if self.list:
169                         return 0
170                 else:
171                         return 1
172
173         def __repr__(self):
174                 return repr(self.list)
175
176 class PTVC(NamedList):
177         """ProtoTree TVBuff Cursor List ("PTVC List") Class"""
178
179         def __init__(self, name, records):
180                 "Constructor"
181                 NamedList.__init__(self, name, [])
182
183                 global global_highest_var
184
185                 expected_offset = None
186                 highest_var = -1
187
188                 named_vars = {}
189
190                 # Make a PTVCRecord object for each list in 'records'
191                 for record in records:
192                         offset = record[REC_START]
193                         length = record[REC_LENGTH]
194                         field = record[REC_FIELD]          
195                         endianness = record[REC_ENDIANNESS]
196
197                         # Variable
198                         var_name = record[REC_VAR]
199                         if var_name:
200                                 # Did we already define this var?
201                                 if named_vars.has_key(var_name):
202                                         sys.exit("%s has multiple %s vars." % \
203                                                 (name, var_name))
204
205                                 highest_var = highest_var + 1
206                                 var = highest_var
207                                 if highest_var > global_highest_var:
208                                     global_highest_var = highest_var
209                                 named_vars[var_name] = var
210                         else:
211                                 var = NO_VAR
212
213                         # Repeat
214                         repeat_name = record[REC_REPEAT]
215                         if repeat_name:
216                                 # Do we have this var?
217                                 if not named_vars.has_key(repeat_name):
218                                         sys.exit("%s does not have %s var defined." % \
219                                                 (name, var_name))
220                                 repeat = named_vars[repeat_name]
221                         else:
222                                 repeat = NO_REPEAT
223
224                         # Request Condition
225                         req_cond = record[REC_REQ_COND]
226                         if req_cond != NO_REQ_COND:
227                                 global_req_cond[req_cond] = None
228
229                         ptvc_rec = PTVCRecord(field, length, endianness, var, repeat, req_cond)
230
231                         if expected_offset == None:
232                                 expected_offset = offset
233
234                         elif expected_offset == -1:
235                                 pass
236
237                         elif expected_offset != offset and offset != -1:
238                                 msg.write("Expected offset in %s for %s to be %d\n" % \
239                                         (name, field.HFName(), expected_offset))
240                                 sys.exit(1)
241
242                         # We can't make a PTVC list from a variable-length
243                         # packet, unless the fields can tell us at run time
244                         # how long the packet is. That is, nstring8 is fine, since
245                         # the field has an integer telling us how long the string is.
246                         # Fields that don't have a length determinable at run-time
247                         # cannot be variable-length.
248                         if type(ptvc_rec.Length()) == type(()):
249                                 if isinstance(ptvc_rec.Field(), nstring):
250                                         expected_offset = -1
251                                         pass
252                                 elif isinstance(ptvc_rec.Field(), nbytes):
253                                         expected_offset = -1
254                                         pass
255                                 elif isinstance(ptvc_rec.Field(), struct):
256                                         expected_offset = -1
257                                         pass
258                                 else:
259                                         field = ptvc_rec.Field()
260                                         assert 0, "Cannot make PTVC from %s, type %s" % \
261                                                 (field.HFName(), field)
262
263                         elif expected_offset > -1:
264                                 if ptvc_rec.Length() < 0:
265                                         expected_offset = -1
266                                 else:
267                                         expected_offset = expected_offset + ptvc_rec.Length()
268
269
270                         self.list.append(ptvc_rec)
271
272         def ETTName(self):
273                 return "ett_%s" % (self.Name(),)
274
275
276         def Code(self):
277                 x =  "static const ptvc_record %s[] = {\n" % (self.Name())
278                 for ptvc_rec in self.list:
279                         x = x +  "\t%s,\n" % (ptvc_rec.Code())
280                 x = x + "\t{ NULL, 0, NULL, NO_ENDIANNESS, NO_VAR, NO_REPEAT, NO_REQ_COND, NCP_FMT_NONE }\n"
281                 x = x + "};\n"
282                 return x
283
284         def __repr__(self):
285                 x = ""
286                 for ptvc_rec in self.list:
287                         x = x + repr(ptvc_rec)
288                 return x
289
290
291 class PTVCBitfield(PTVC):
292         def __init__(self, name, vars):
293                 NamedList.__init__(self, name, [])
294
295                 for var in vars:
296                         ptvc_rec = PTVCRecord(var, var.Length(), var.Endianness(),
297                                 NO_VAR, NO_REPEAT, NO_REQ_COND)
298                         self.list.append(ptvc_rec)
299
300         def Code(self):
301                 ett_name = self.ETTName()
302                 x = "static gint %s;\n" % (ett_name,)
303
304                 x = x + "static const ptvc_record ptvc_%s[] = {\n" % (self.Name())
305                 for ptvc_rec in self.list:
306                         x = x +  "\t%s,\n" % (ptvc_rec.Code())
307                 x = x + "\t{ NULL, 0, NULL, NO_ENDIANNESS, NO_VAR, NO_REPEAT, NO_REQ_COND, NCP_FMT_NONE }\n"
308                 x = x + "};\n"
309
310                 x = x + "static const sub_ptvc_record %s = {\n" % (self.Name(),)
311                 x = x + "\t&%s,\n" % (ett_name,)
312                 x = x + "\tNULL,\n"
313                 x = x + "\tptvc_%s,\n" % (self.Name(),)
314                 x = x + "};\n"
315                 return x
316
317
318 class PTVCRecord:
319         def __init__(self, field, length, endianness, var, repeat, req_cond):
320                 "Constructor"
321                 self.field      = field
322                 self.length     = length
323                 self.endianness = endianness
324                 self.var        = var
325                 self.repeat     = repeat
326                 self.req_cond   = req_cond
327
328         def __cmp__(self, other):
329                 "Comparison operator"
330                 if self.field != other.field:
331                         return 1
332                 elif self.length < other.length:
333                         return -1
334                 elif self.length > other.length:
335                         return 1
336                 elif self.endianness != other.endianness:
337                         return 1
338                 else:
339                         return 0
340
341         def Code(self):
342                 # Nice textual representations
343                 if self.var == NO_VAR:
344                         var = "NO_VAR"
345                 else:
346                         var = self.var
347
348                 if self.repeat == NO_REPEAT:
349                         repeat = "NO_REPEAT"
350                 else:
351                         repeat = self.repeat
352
353                 if self.req_cond == NO_REQ_COND:
354                         req_cond = "NO_REQ_COND"
355                 else:
356                         req_cond = global_req_cond[self.req_cond]
357                         assert req_cond != None
358
359                 if isinstance(self.field, struct):
360                         return self.field.ReferenceString(var, repeat, req_cond)
361                 else:
362                         return self.RegularCode(var, repeat, req_cond)
363
364         def RegularCode(self, var, repeat, req_cond):
365                 "String representation"
366                 endianness = 'BE'
367                 if self.endianness == LE:
368                         endianness = 'LE'
369
370                 length = None
371
372                 if type(self.length) == type(0):
373                         length = self.length
374                 else:
375                         # This is for cases where a length is needed
376                         # in order to determine a following variable-length,
377                         # like nstring8, where 1 byte is needed in order
378                         # to determine the variable length.
379                         var_length = self.field.Length()
380                         if var_length > 0:
381                                 length = var_length
382
383                 if length == PROTO_LENGTH_UNKNOWN:
384                         # XXX length = "PROTO_LENGTH_UNKNOWN"
385                         pass
386
387                 assert length, "Length not handled for %s" % (self.field.HFName(),)
388
389                 sub_ptvc_name = self.field.PTVCName()
390                 if sub_ptvc_name != "NULL":
391                         sub_ptvc_name = "&%s" % (sub_ptvc_name,)
392
393
394                 return "{ &%s, %s, %s, %s, %s, %s, %s, %s }" % \
395                         (self.field.HFName(), length, sub_ptvc_name,
396                         endianness, var, repeat, req_cond,
397                         self.field.SpecialFmt())
398
399         def Offset(self):
400                 return self.offset
401
402         def Length(self):
403                 return self.length
404
405         def Field(self):
406                 return self.field
407
408         def __repr__(self):
409                 return "{%s len=%s end=%s var=%s rpt=%s rqc=%s}" % \
410                         (self.field.HFName(), self.length,
411                         self.endianness, self.var, self.repeat, self.req_cond)
412
413 ##############################################################################
414
415 class NCP:
416         "NCP Packet class"
417         def __init__(self, func_code, description, group, has_length=1):
418                 "Constructor"
419                 self.func_code          = func_code
420                 self.description        = description
421                 self.group              = group
422                 self.codes              = None
423                 self.request_records    = None
424                 self.reply_records      = None
425                 self.has_length         = has_length
426                 self.req_cond_size      = None
427                 self.req_info_str       = None
428
429                 if not groups.has_key(group):
430                         msg.write("NCP 0x%x has invalid group '%s'\n" % \
431                                 (self.func_code, group))
432                         sys.exit(1)
433
434                 if self.HasSubFunction():
435                         # NCP Function with SubFunction
436                         self.start_offset = 10
437                 else:
438                         # Simple NCP Function
439                         self.start_offset = 7
440
441         def ReqCondSize(self):
442                 return self.req_cond_size
443
444         def ReqCondSizeVariable(self):
445                 self.req_cond_size = REQ_COND_SIZE_VARIABLE
446
447         def ReqCondSizeConstant(self):
448                 self.req_cond_size = REQ_COND_SIZE_CONSTANT
449
450         def FunctionCode(self, part=None):
451                 "Returns the function code for this NCP packet."
452                 if part == None:
453                         return self.func_code
454                 elif part == 'high':
455                         if self.HasSubFunction():
456                                 return (self.func_code & 0xff00) >> 8
457                         else:
458                                 return self.func_code
459                 elif part == 'low':
460                         if self.HasSubFunction():
461                                 return self.func_code & 0x00ff
462                         else:
463                                 return 0x00
464                 else:
465                         msg.write("Unknown directive '%s' for function_code()\n" % (part))
466                         sys.exit(1)
467
468         def HasSubFunction(self):
469                 "Does this NPC packet require a subfunction field?"
470                 if self.func_code <= 0xff:
471                         return 0
472                 else:
473                         return 1
474
475         def HasLength(self):
476                 return self.has_length
477
478         def Description(self):
479                 return self.description
480
481         def Group(self):
482                 return self.group
483
484         def PTVCRequest(self):
485                 return self.ptvc_request
486
487         def PTVCReply(self):
488                 return self.ptvc_reply
489
490         def Request(self, size, records=[], **kwargs):
491                 self.request_size = size
492                 self.request_records = records
493                 if self.HasSubFunction():
494                         if self.HasLength():
495                                 self.CheckRecords(size, records, "Request", 10)
496                         else:
497                                 self.CheckRecords(size, records, "Request", 8)
498                 else:
499                         self.CheckRecords(size, records, "Request", 7)
500                 self.ptvc_request = self.MakePTVC(records, "request")
501
502                 if kwargs.has_key("info_str"):
503                         self.req_info_str = kwargs["info_str"]
504
505         def Reply(self, size, records=[]):
506                 self.reply_size = size
507                 self.reply_records = records
508                 self.CheckRecords(size, records, "Reply", 8)
509                 self.ptvc_reply = self.MakePTVC(records, "reply")
510
511         def CheckRecords(self, size, records, descr, min_hdr_length):
512                 "Simple sanity check"
513                 if size == NO_LENGTH_CHECK:
514                         return
515                 min = size
516                 max = size
517                 if type(size) == type(()):
518                         min = size[0]
519                         max = size[1]
520
521                 lower = min_hdr_length
522                 upper = min_hdr_length
523
524                 for record in records:
525                         rec_size = record[REC_LENGTH]
526                         rec_lower = rec_size
527                         rec_upper = rec_size
528                         if type(rec_size) == type(()):
529                                 rec_lower = rec_size[0]
530                                 rec_upper = rec_size[1]
531
532                         lower = lower + rec_lower
533                         upper = upper + rec_upper
534
535                 error = 0
536                 if min != lower:
537                         msg.write("%s records for 2222/0x%x sum to %d bytes minimum, but param1 shows %d\n" \
538                                 % (descr, self.FunctionCode(), lower, min))
539                         error = 1
540                 if max != upper:
541                         msg.write("%s records for 2222/0x%x sum to %d bytes maximum, but param1 shows %d\n" \
542                                 % (descr, self.FunctionCode(), upper, max))
543                         error = 1
544
545                 if error == 1:
546                         sys.exit(1)
547
548
549         def MakePTVC(self, records, name_suffix):
550                 """Makes a PTVC out of a request or reply record list. Possibly adds
551                 it to the global list of PTVCs (the global list is a UniqueCollection,
552                 so an equivalent PTVC may already be in the global list)."""
553
554                 name = "%s_%s" % (self.CName(), name_suffix)
555                 ptvc = PTVC(name, records)
556                 return ptvc_lists.Add(ptvc)
557
558         def CName(self):
559                 "Returns a C symbol based on the NCP function code"
560                 return "ncp_0x%x" % (self.func_code)
561
562         def InfoStrName(self):
563                 "Returns a C symbol based on the NCP function code, for the info_str"
564                 return "info_str_0x%x" % (self.func_code)
565
566         def Variables(self):
567                 """Returns a list of variables used in the request and reply records.
568                 A variable is listed only once, even if it is used twice (once in
569                 the request, once in the reply)."""
570
571                 variables = {}
572                 if self.request_records:
573                         for record in self.request_records:
574                                 var = record[REC_FIELD]
575                                 variables[var.HFName()] = var
576
577                                 sub_vars = var.SubVariables()
578                                 for sv in sub_vars:
579                                         variables[sv.HFName()] = sv
580
581                 if self.reply_records:
582                         for record in self.reply_records:
583                                 var = record[REC_FIELD]
584                                 variables[var.HFName()] = var
585
586                                 sub_vars = var.SubVariables()
587                                 for sv in sub_vars:
588                                         variables[sv.HFName()] = sv
589
590                 return variables.values()
591
592         def CalculateReqConds(self):
593                 """Returns a list of request conditions (dfilter text) used
594                 in the reply records. A request condition is listed only once,
595                 even it it used twice. """
596                 texts = {}
597                 if self.reply_records:
598                         for record in self.reply_records:
599                                 text = record[REC_REQ_COND]
600                                 if text != NO_REQ_COND:
601                                         texts[text] = None
602
603                 if len(texts) == 0:
604                         self.req_conds = None
605                         return None
606
607                 dfilter_texts = texts.keys()
608                 dfilter_texts.sort()
609                 name = "%s_req_cond_indexes" % (self.CName(),)
610                 return NamedList(name, dfilter_texts)
611
612         def GetReqConds(self):
613                 return self.req_conds
614
615         def SetReqConds(self, new_val):
616                 self.req_conds = new_val
617
618
619         def CompletionCodes(self, codes=None):
620                 """Sets or returns the list of completion
621                 codes. Internally, a NamedList is used to store the
622                 completion codes, but the caller of this function never
623                 realizes that because Python lists are the input and
624                 output."""
625
626                 if codes == None:
627                         return self.codes
628
629                 # Sanity check
630                 okay = 1
631                 for code in codes:
632                         if not errors.has_key(code):
633                                 msg.write("Errors table does not have key 0x%04x for NCP=0x%x\n" % (code,
634                                         self.func_code))
635                                 okay = 0
636
637                 # Delay the exit until here so that the programmer can get
638                 # the complete list of missing error codes
639                 if not okay:
640                         sys.exit(1)
641
642                 # Create CompletionCode (NamedList) object and possible
643                 # add it to  the global list of completion code lists.
644                 name = "%s_errors" % (self.CName(),)
645                 codes.sort()
646                 codes_list = NamedList(name, codes)
647                 self.codes = compcode_lists.Add(codes_list)
648
649                 self.Finalize()
650
651         def Finalize(self):
652                 """Adds the NCP object to the global collection of NCP
653                 objects. This is done automatically after setting the
654                 CompletionCode list. Yes, this is a shortcut, but it makes
655                 our list of NCP packet definitions look neater, since an
656                 explicit "add to global list of packets" is not needed."""
657
658                 # Add packet to global collection of packets
659                 packets.append(self)
660
661 def rec(start, length, field, endianness=None, **kw):
662         return _rec(start, length, field, endianness, kw)
663
664 def srec(field, endianness=None, **kw):
665         return _rec(-1, -1, field, endianness, kw)
666
667 def _rec(start, length, field, endianness, kw):
668         # If endianness not explicitly given, use the field's
669         # default endiannes.
670         if endianness == None:
671                 endianness = field.Endianness()
672
673         # Setting a var?
674         if kw.has_key("var"):
675                 # Is the field an INT ?
676                 if not isinstance(field, CountingNumber):
677                         sys.exit("Field %s used as count variable, but not integer." \
678                                 % (field.HFName()))
679                 var = kw["var"]
680         else:
681                 var = None
682
683         # If 'var' not used, 'repeat' can be used.
684         if not var and kw.has_key("repeat"):
685                 repeat = kw["repeat"]
686         else:
687                 repeat = None
688
689         # Request-condition ?
690         if kw.has_key("req_cond"):
691                 req_cond = kw["req_cond"]
692         else:
693                 req_cond = NO_REQ_COND
694
695         return [start, length, field, endianness, var, repeat, req_cond]
696
697
698
699
700 ##############################################################################
701
702 LE              = 1             # Little-Endian
703 BE              = 0             # Big-Endian
704 NA              = -1            # Not Applicable
705
706 class Type:
707         " Virtual class for NCP field types"
708         type            = "Type"
709         ftype           = None
710         disp            = "BASE_DEC"
711         endianness      = NA
712         values          = []
713
714         def __init__(self, abbrev, descr, bytes, endianness = NA):
715                 self.abbrev = abbrev
716                 self.descr = descr
717                 self.bytes = bytes
718                 self.endianness = endianness
719                 self.hfname = "hf_ncp_" + self.abbrev
720                 self.special_fmt = "NCP_FMT_NONE"
721
722         def Length(self):
723                 return self.bytes
724
725         def Abbreviation(self):
726                 return self.abbrev
727
728         def Description(self):
729                 return self.descr
730
731         def HFName(self):
732                 return self.hfname
733
734         def DFilter(self):
735                 return "ncp." + self.abbrev
736
737         def EtherealFType(self):
738                 return self.ftype
739
740         def Display(self, newval=None):
741                 if newval != None:
742                         self.disp = newval
743                 return self.disp
744
745         def ValuesName(self):
746                 return "NULL"
747
748         def Mask(self):
749                 return 0
750
751         def Endianness(self):
752                 return self.endianness
753
754         def SubVariables(self):
755                 return []
756
757         def PTVCName(self):
758                 return "NULL"
759
760         def NWDate(self):
761                 self.special_fmt = "NCP_FMT_NW_DATE"
762
763         def NWTime(self):
764                 self.special_fmt = "NCP_FMT_NW_TIME"
765
766         def NWUnicode(self):
767                 self.special_fmt = "NCP_FMT_UNICODE"
768
769         def SpecialFmt(self):
770                 return self.special_fmt
771
772         def __cmp__(self, other):
773                 return cmp(self.hfname, other.hfname)
774
775 class struct(PTVC, Type):
776         def __init__(self, name, items, descr=None):
777                 name = "struct_%s" % (name,)
778                 NamedList.__init__(self, name, [])
779
780                 self.bytes = 0
781                 self.descr = descr
782                 for item in items:
783                         if isinstance(item, Type):
784                                 field = item
785                                 length = field.Length()
786                                 endianness = field.Endianness()
787                                 var = NO_VAR
788                                 repeat = NO_REPEAT
789                                 req_cond = NO_REQ_COND
790                         elif type(item) == type([]):
791                                 field = item[REC_FIELD]
792                                 length = item[REC_LENGTH]
793                                 endianness = item[REC_ENDIANNESS]
794                                 var = item[REC_VAR]
795                                 repeat = item[REC_REPEAT]
796                                 req_cond = item[REC_REQ_COND]
797                         else:
798                                 assert 0, "Item %s item not handled." % (item,)
799
800                         ptvc_rec = PTVCRecord(field, length, endianness, var,
801                                 repeat, req_cond)
802                         self.list.append(ptvc_rec)
803                         self.bytes = self.bytes + field.Length()
804
805                 self.hfname = self.name
806
807         def Variables(self):
808                 vars = []
809                 for ptvc_rec in self.list:
810                         vars.append(ptvc_rec.Field())
811                 return vars
812
813         def ReferenceString(self, var, repeat, req_cond):
814                 return "{ PTVC_STRUCT, NO_LENGTH, &%s, NO_ENDIANNESS, %s, %s, %s, NCP_FMT_NONE }" % \
815                         (self.name, var, repeat, req_cond)
816
817         def Code(self):
818                 ett_name = self.ETTName()
819                 x = "static gint %s;\n" % (ett_name,)
820                 x = x + "static const ptvc_record ptvc_%s[] = {\n" % (self.name,)
821                 for ptvc_rec in self.list:
822                         x = x +  "\t%s,\n" % (ptvc_rec.Code())
823                 x = x + "\t{ NULL, NO_LENGTH, NULL, NO_ENDIANNESS, NO_VAR, NO_REPEAT, NO_REQ_COND, NCP_FMT_NONE }\n"
824                 x = x + "};\n"
825
826                 x = x + "static const sub_ptvc_record %s = {\n" % (self.name,)
827                 x = x + "\t&%s,\n" % (ett_name,)
828                 if self.descr:
829                         x = x + '\t"%s",\n' % (self.descr,)
830                 else:
831                         x = x + "\tNULL,\n"
832                 x = x + "\tptvc_%s,\n" % (self.Name(),)
833                 x = x + "};\n"
834                 return x
835
836         def __cmp__(self, other):
837                 return cmp(self.HFName(), other.HFName())
838
839
840 class byte(Type):
841         type    = "byte"
842         ftype   = "FT_UINT8"
843         def __init__(self, abbrev, descr):
844                 Type.__init__(self, abbrev, descr, 1)
845
846 class CountingNumber:
847         pass
848
849 # Same as above. Both are provided for convenience
850 class uint8(Type, CountingNumber):
851         type    = "uint8"
852         ftype   = "FT_UINT8"
853         bytes   = 1
854         def __init__(self, abbrev, descr):
855                 Type.__init__(self, abbrev, descr, 1)
856
857 class uint16(Type, CountingNumber):
858         type    = "uint16"
859         ftype   = "FT_UINT16"
860         def __init__(self, abbrev, descr, endianness = LE):
861                 Type.__init__(self, abbrev, descr, 2, endianness)
862
863 class uint24(Type, CountingNumber):
864         type    = "uint24"
865         ftype   = "FT_UINT24"
866         def __init__(self, abbrev, descr, endianness = LE):
867                 Type.__init__(self, abbrev, descr, 3, endianness)
868
869 class uint32(Type, CountingNumber):
870         type    = "uint32"
871         ftype   = "FT_UINT32"
872         def __init__(self, abbrev, descr, endianness = LE):
873                 Type.__init__(self, abbrev, descr, 4, endianness)
874
875 class uint64(Type, CountingNumber):
876         type    = "uint64"
877         ftype   = "FT_UINT64"
878         def __init__(self, abbrev, descr, endianness = LE):
879                 Type.__init__(self, abbrev, descr, 8, endianness)
880
881 class boolean8(uint8):
882         type    = "boolean8"
883         ftype   = "FT_BOOLEAN"
884
885 class boolean16(uint16):
886         type    = "boolean16"
887         ftype   = "FT_BOOLEAN"
888
889 class boolean24(uint24):
890         type    = "boolean24"
891         ftype   = "FT_BOOLEAN"
892
893 class boolean32(uint32):
894         type    = "boolean32"
895         ftype   = "FT_BOOLEAN"
896
897 class nstring:
898         pass
899
900 class nstring8(Type, nstring):
901         """A string of up to (2^8)-1 characters. The first byte
902         gives the string length."""
903
904         type    = "nstring8"
905         ftype   = "FT_UINT_STRING"
906         def __init__(self, abbrev, descr):
907                 Type.__init__(self, abbrev, descr, 1)
908
909 class nstring16(Type, nstring):
910         """A string of up to (2^16)-2 characters. The first 2 bytes
911         gives the string length."""
912
913         type    = "nstring16"
914         ftype   = "FT_UINT_STRING"
915         def __init__(self, abbrev, descr, endianness = LE):
916                 Type.__init__(self, abbrev, descr, 2, endianness)
917
918 class nstring32(Type, nstring):
919         """A string of up to (2^32)-4 characters. The first 4 bytes
920         gives the string length."""
921
922         type    = "nstring32"
923         ftype   = "FT_UINT_STRING"
924         def __init__(self, abbrev, descr, endianness = LE):
925                 Type.__init__(self, abbrev, descr, 4, endianness)
926
927 class fw_string(Type):
928         """A fixed-width string of n bytes."""
929
930         type    = "fw_string"
931         ftype   = "FT_STRING"
932
933         def __init__(self, abbrev, descr, bytes):
934                 Type.__init__(self, abbrev, descr, bytes)
935
936
937 class stringz(Type):
938         "NUL-terminated string, with a maximum length"
939
940         type    = "stringz"
941         ftype   = "FT_STRINGZ"
942         def __init__(self, abbrev, descr):
943                 Type.__init__(self, abbrev, descr, PROTO_LENGTH_UNKNOWN)
944
945 class val_string(Type):
946         """Abstract class for val_stringN, where N is number
947         of bits that key takes up."""
948
949         type    = "val_string"
950         disp    = 'BASE_HEX'
951
952         def __init__(self, abbrev, descr, val_string_array, endianness = LE):
953                 Type.__init__(self, abbrev, descr, self.bytes, endianness)
954                 self.values = val_string_array
955
956         def Code(self):
957                 result = "static const value_string %s[] = {\n" \
958                                 % (self.ValuesCName())
959                 for val_record in self.values:
960                         value   = val_record[0]
961                         text    = val_record[1]
962                         value_repr = self.value_format % value
963                         result = result + '\t{ %s,\t"%s" },\n' \
964                                         % (value_repr, text)
965
966                 value_repr = self.value_format % 0
967                 result = result + "\t{ %s,\tNULL },\n" % (value_repr)
968                 result = result + "};\n"
969                 REC_VAL_STRING_RES = self.value_format % value
970                 return result
971
972         def ValuesCName(self):
973                 return "ncp_%s_vals" % (self.abbrev)
974
975         def ValuesName(self):
976                 return "VALS(%s)" % (self.ValuesCName())
977
978 class val_string8(val_string):
979         type            = "val_string8"
980         ftype           = "FT_UINT8"
981         bytes           = 1
982         value_format    = "0x%02x"
983
984 class val_string16(val_string):
985         type            = "val_string16"
986         ftype           = "FT_UINT16"
987         bytes           = 2
988         value_format    = "0x%04x"
989
990 class val_string32(val_string):
991         type            = "val_string32"
992         ftype           = "FT_UINT32"
993         bytes           = 4
994         value_format    = "0x%08x"
995
996 class bytes(Type):
997         type    = 'bytes'
998         ftype   = 'FT_BYTES'
999
1000         def __init__(self, abbrev, descr, bytes):
1001                 Type.__init__(self, abbrev, descr, bytes, NA)
1002
1003 class nbytes:
1004         pass
1005
1006 class nbytes8(Type, nbytes):
1007         """A series of up to (2^8)-1 bytes. The first byte
1008         gives the byte-string length."""
1009
1010         type    = "nbytes8"
1011         ftype   = "FT_UINT_BYTES"
1012         def __init__(self, abbrev, descr, endianness = LE):
1013                 Type.__init__(self, abbrev, descr, 1, endianness)
1014
1015 class nbytes16(Type, nbytes):
1016         """A series of up to (2^16)-2 bytes. The first 2 bytes
1017         gives the byte-string length."""
1018
1019         type    = "nbytes16"
1020         ftype   = "FT_UINT_BYTES"
1021         def __init__(self, abbrev, descr, endianness = LE):
1022                 Type.__init__(self, abbrev, descr, 2, endianness)
1023
1024 class nbytes32(Type, nbytes):
1025         """A series of up to (2^32)-4 bytes. The first 4 bytes
1026         gives the byte-string length."""
1027
1028         type    = "nbytes32"
1029         ftype   = "FT_UINT_BYTES"
1030         def __init__(self, abbrev, descr, endianness = LE):
1031                 Type.__init__(self, abbrev, descr, 4, endianness)
1032
1033 class bf_uint(Type):
1034         type    = "bf_uint"
1035         disp    = None
1036
1037         def __init__(self, bitmask, abbrev, descr, endianness=LE):
1038                 Type.__init__(self, abbrev, descr, self.bytes, endianness)
1039                 self.bitmask = bitmask
1040
1041         def Mask(self):
1042                 return self.bitmask
1043
1044 class bf_val_str(bf_uint):
1045         type    = "bf_uint"
1046         disp    = None
1047
1048         def __init__(self, bitmask, abbrev, descr, val_string_array, endiannes=LE):
1049                 bf_uint.__init__(self, bitmask, abbrev, descr, endiannes)
1050                 self.values = val_string_array
1051
1052         def ValuesName(self):
1053                 return "VALS(%s)" % (self.ValuesCName())
1054
1055 class bf_val_str8(bf_val_str, val_string8):
1056         type    = "bf_val_str8"
1057         ftype   = "FT_UINT8"
1058         disp    = "BASE_HEX"
1059         bytes   = 1
1060
1061 class bf_val_str16(bf_val_str, val_string16):
1062         type    = "bf_val_str16"
1063         ftype   = "FT_UINT16"
1064         disp    = "BASE_HEX"
1065         bytes   = 2
1066
1067 class bf_val_str32(bf_val_str, val_string32):
1068         type    = "bf_val_str32"
1069         ftype   = "FT_UINT32"
1070         disp    = "BASE_HEX"
1071         bytes   = 4
1072
1073 class bf_boolean:
1074     pass
1075
1076 class bf_boolean8(bf_uint, boolean8, bf_boolean):
1077         type    = "bf_boolean8"
1078         ftype   = "FT_BOOLEAN"
1079         disp    = "8"
1080         bytes   = 1
1081
1082 class bf_boolean16(bf_uint, boolean16, bf_boolean):
1083         type    = "bf_boolean16"
1084         ftype   = "FT_BOOLEAN"
1085         disp    = "16"
1086         bytes   = 2
1087
1088 class bf_boolean24(bf_uint, boolean24, bf_boolean):
1089         type    = "bf_boolean24"
1090         ftype   = "FT_BOOLEAN"
1091         disp    = "24"
1092         bytes   = 3
1093
1094 class bf_boolean32(bf_uint, boolean32, bf_boolean):
1095         type    = "bf_boolean32"
1096         ftype   = "FT_BOOLEAN"
1097         disp    = "32"
1098         bytes   = 4
1099
1100 class bitfield(Type):
1101         type    = "bitfield"
1102         disp    = 'BASE_HEX'
1103
1104         def __init__(self, vars):
1105                 var_hash = {}
1106                 for var in vars:
1107                         if isinstance(var, bf_boolean):
1108                                 if not isinstance(var, self.bf_type):
1109                                         print "%s must be of type %s" % \
1110                                                 (var.Abbreviation(),
1111                                                 self.bf_type)
1112                                         sys.exit(1)
1113                         var_hash[var.bitmask] = var
1114
1115                 bitmasks = var_hash.keys()
1116                 bitmasks.sort()
1117                 bitmasks.reverse()
1118
1119                 ordered_vars = []
1120                 for bitmask in bitmasks:
1121                         var = var_hash[bitmask]
1122                         ordered_vars.append(var)
1123
1124                 self.vars = ordered_vars
1125                 self.ptvcname = "ncp_%s_bitfield" % (self.abbrev,)
1126                 self.hfname = "hf_ncp_%s" % (self.abbrev,)
1127                 self.sub_ptvc = PTVCBitfield(self.PTVCName(), self.vars)
1128
1129         def SubVariables(self):
1130                 return self.vars
1131
1132         def SubVariablesPTVC(self):
1133                 return self.sub_ptvc
1134
1135         def PTVCName(self):
1136                 return self.ptvcname
1137
1138
1139 class bitfield8(bitfield, uint8):
1140         type    = "bitfield8"
1141         ftype   = "FT_UINT8"
1142         bf_type = bf_boolean8
1143
1144         def __init__(self, abbrev, descr, vars):
1145                 uint8.__init__(self, abbrev, descr)
1146                 bitfield.__init__(self, vars)
1147
1148 class bitfield16(bitfield, uint16):
1149         type    = "bitfield16"
1150         ftype   = "FT_UINT16"
1151         bf_type = bf_boolean16
1152
1153         def __init__(self, abbrev, descr, vars, endianness=LE):
1154                 uint16.__init__(self, abbrev, descr, endianness)
1155                 bitfield.__init__(self, vars)
1156
1157 class bitfield24(bitfield, uint24):
1158         type    = "bitfield24"
1159         ftype   = "FT_UINT24"
1160         bf_type = bf_boolean24
1161
1162         def __init__(self, abbrev, descr, vars, endianness=LE):
1163                 uint24.__init__(self, abbrev, descr, endianness)
1164                 bitfield.__init__(self, vars)
1165
1166 class bitfield32(bitfield, uint32):
1167         type    = "bitfield32"
1168         ftype   = "FT_UINT32"
1169         bf_type = bf_boolean32
1170
1171         def __init__(self, abbrev, descr, vars, endianness=LE):
1172                 uint32.__init__(self, abbrev, descr, endianness)
1173                 bitfield.__init__(self, vars)
1174
1175 #
1176 # Force the endianness of a field to a non-default value; used in
1177 # the list of fields of a structure.
1178 #
1179 def endian(field, endianness):
1180         return [-1, field.Length(), field, endianness, NO_VAR, NO_REPEAT, NO_REQ_COND]
1181
1182 ##############################################################################
1183 # NCP Field Types. Defined in Appendix A of "Programmer's Guide..."
1184 ##############################################################################
1185
1186 AbortQueueFlag                  = val_string8("abort_q_flag", "Abort Queue Flag", [
1187         [ 0x00, "Place at End of Queue" ],
1188         [ 0x01, "Do Not Place Spool File, Examine Flags" ],
1189 ])
1190 AcceptedMaxSize                 = uint16("accepted_max_size", "Accepted Max Size")
1191 AccessControl                   = val_string8("access_control", "Access Control", [
1192         [ 0x00, "Open for read by this client" ],
1193         [ 0x01, "Open for write by this client" ],
1194         [ 0x02, "Deny read requests from other stations" ],
1195         [ 0x03, "Deny write requests from other stations" ],
1196         [ 0x04, "File detached" ],
1197         [ 0x05, "TTS holding detach" ],
1198         [ 0x06, "TTS holding open" ],
1199 ])
1200 AccessDate                      = uint16("access_date", "Access Date")
1201 AccessDate.NWDate()
1202 AccessMode                      = bitfield8("access_mode", "Access Mode", [
1203         bf_boolean8(0x01, "acc_mode_read", "Read Access"),
1204         bf_boolean8(0x02, "acc_mode_write", "Write Access"),
1205         bf_boolean8(0x04, "acc_mode_deny_read", "Deny Read Access"),
1206         bf_boolean8(0x08, "acc_mode_deny_write", "Deny Write Access"),
1207         bf_boolean8(0x10, "acc_mode_comp", "Compatibility Mode"),
1208 ])
1209 AccessPrivileges                = bitfield8("access_privileges", "Access Privileges", [
1210         bf_boolean8(0x01, "acc_priv_read", "Read Privileges (files only)"),
1211         bf_boolean8(0x02, "acc_priv_write", "Write Privileges (files only)"),
1212         bf_boolean8(0x04, "acc_priv_open", "Open Privileges (files only)"),
1213         bf_boolean8(0x08, "acc_priv_create", "Create Privileges (files only)"),
1214         bf_boolean8(0x10, "acc_priv_delete", "Delete Privileges (files only)"),
1215         bf_boolean8(0x20, "acc_priv_parent", "Parental Privileges (directories only for creating, deleting, and renaming)"),
1216         bf_boolean8(0x40, "acc_priv_search", "Search Privileges (directories only)"),
1217         bf_boolean8(0x80, "acc_priv_modify", "Modify File Status Flags Privileges (files and directories)"),
1218 ])
1219 AccessRightsMask                = bitfield8("access_rights_mask", "Access Rights", [
1220         bf_boolean8(0x0001, "acc_rights_read", "Read Rights"),
1221         bf_boolean8(0x0002, "acc_rights_write", "Write Rights"),
1222         bf_boolean8(0x0004, "acc_rights_open", "Open Rights"),
1223         bf_boolean8(0x0008, "acc_rights_create", "Create Rights"),
1224         bf_boolean8(0x0010, "acc_rights_delete", "Delete Rights"),
1225         bf_boolean8(0x0020, "acc_rights_parent", "Parental Rights"),
1226         bf_boolean8(0x0040, "acc_rights_search", "Search Rights"),
1227         bf_boolean8(0x0080, "acc_rights_modify", "Modify Rights"),
1228 ])
1229 AccessRightsMaskWord            = bitfield16("access_rights_mask_word", "Access Rights", [
1230         bf_boolean16(0x0001, "acc_rights1_read", "Read Rights"),
1231         bf_boolean16(0x0002, "acc_rights1_write", "Write Rights"),
1232         bf_boolean16(0x0004, "acc_rights1_open", "Open Rights"),
1233         bf_boolean16(0x0008, "acc_rights1_create", "Create Rights"),
1234         bf_boolean16(0x0010, "acc_rights1_delete", "Delete Rights"),
1235         bf_boolean16(0x0020, "acc_rights1_parent", "Parental Rights"),
1236         bf_boolean16(0x0040, "acc_rights1_search", "Search Rights"),
1237         bf_boolean16(0x0080, "acc_rights1_modify", "Modify Rights"),
1238         bf_boolean16(0x0100, "acc_rights1_supervisor", "Supervisor Access Rights"),
1239 ])
1240 AccountBalance                  = uint32("account_balance", "Account Balance")
1241 AccountVersion                  = uint8("acct_version", "Acct Version")
1242 ActionFlag                      = bitfield8("action_flag", "Action Flag", [
1243         bf_boolean8(0x01, "act_flag_open", "Open"),
1244         bf_boolean8(0x02, "act_flag_replace", "Replace"),
1245         bf_boolean8(0x10, "act_flag_create", "Create"),
1246 ])
1247 ActiveConnBitList               = fw_string("active_conn_bit_list", "Active Connection List", 512)
1248 ActiveIndexedFiles              = uint16("active_indexed_files", "Active Indexed Files")
1249 ActualMaxBinderyObjects         = uint16("actual_max_bindery_objects", "Actual Max Bindery Objects")
1250 ActualMaxIndexedFiles           = uint16("actual_max_indexed_files", "Actual Max Indexed Files")
1251 ActualMaxOpenFiles              = uint16("actual_max_open_files", "Actual Max Open Files")
1252 ActualMaxSimultaneousTransactions = uint16("actual_max_sim_trans", "Actual Max Simultaneous Transactions")
1253 ActualMaxUsedDirectoryEntries   = uint16("actual_max_used_directory_entries", "Actual Max Used Directory Entries")
1254 ActualMaxUsedRoutingBuffers     = uint16("actual_max_used_routing_buffers", "Actual Max Used Routing Buffers")
1255 ActualResponseCount             = uint16("actual_response_count", "Actual Response Count")
1256 AddNameSpaceAndVol              = stringz("add_nm_spc_and_vol", "Add Name Space and Volume")
1257 AFPEntryID                      = uint32("afp_entry_id", "AFP Entry ID", BE)
1258 AFPEntryID.Display("BASE_HEX")
1259 AllocAvailByte                  = uint32("alloc_avail_byte", "Bytes Available for Allocation")
1260 AllocateMode                    = bitfield16("alloc_mode", "Allocate Mode", [
1261         bf_val_str16(0x0001, "alloc_dir_hdl", "Dir Handle Type",[
1262             [0x00, "Permanent"],
1263             [0x01, "Temporary"],
1264     ]),
1265         bf_boolean16(0x0002, "alloc_spec_temp_dir_hdl","Special Temporary Directory Handle"),
1266     bf_boolean16(0x4000, "alloc_reply_lvl2","Reply Level 2"),
1267     bf_boolean16(0x8000, "alloc_dst_name_spc","Destination Name Space Input Parameter"),
1268 ])
1269 AllocationBlockSize             = uint32("allocation_block_size", "Allocation Block Size")
1270 AllocFreeCount                  = uint32("alloc_free_count", "Reclaimable Free Bytes")
1271 ApplicationNumber               = uint16("application_number", "Application Number")
1272 ArchivedTime                    = uint16("archived_time", "Archived Time")
1273 ArchivedTime.NWTime()
1274 ArchivedDate                    = uint16("archived_date", "Archived Date")
1275 ArchivedDate.NWDate()
1276 ArchiverID                      = uint32("archiver_id", "Archiver ID", BE)
1277 ArchiverID.Display("BASE_HEX")
1278 AssociatedNameSpace             = uint8("associated_name_space", "Associated Name Space")
1279 AttachDuringProcessing          = uint16("attach_during_processing", "Attach During Processing")
1280 AttachedIndexedFiles            = uint8("attached_indexed_files", "Attached Indexed Files")
1281 AttachWhileProcessingAttach     = uint16("attach_while_processing_attach", "Attach While Processing Attach")
1282 Attributes                      = uint32("attributes", "Attributes")
1283 AttributesDef                   = bitfield8("attr_def", "Attributes", [
1284         bf_boolean8(0x01, "att_def_ro", "Read Only"),
1285         bf_boolean8(0x02, "att_def_hidden", "Hidden"),
1286         bf_boolean8(0x04, "att_def_system", "System"),
1287         bf_boolean8(0x08, "att_def_execute", "Execute"),
1288         bf_boolean8(0x10, "att_def_sub_only", "Subdirectory"),
1289         bf_boolean8(0x20, "att_def_archive", "Archive"),
1290         bf_boolean8(0x80, "att_def_shareable", "Shareable"),
1291 ])
1292 AttributesDef16                 = bitfield16("attr_def_16", "Attributes", [
1293         bf_boolean16(0x0001, "att_def16_ro", "Read Only"),
1294         bf_boolean16(0x0002, "att_def16_hidden", "Hidden"),
1295         bf_boolean16(0x0004, "att_def16_system", "System"),
1296         bf_boolean16(0x0008, "att_def16_execute", "Execute"),
1297         bf_boolean16(0x0010, "att_def16_sub_only", "Subdirectory"),
1298         bf_boolean16(0x0020, "att_def16_archive", "Archive"),
1299         bf_boolean16(0x0080, "att_def16_shareable", "Shareable"),
1300         bf_boolean16(0x1000, "att_def16_transaction", "Transactional"),
1301         bf_boolean16(0x4000, "att_def16_read_audit", "Read Audit"),
1302         bf_boolean16(0x8000, "att_def16_write_audit", "Write Audit"),
1303 ])
1304 AttributesDef32                 = bitfield32("attr_def_32", "Attributes", [
1305         bf_boolean32(0x00000001, "att_def32_ro", "Read Only"),
1306         bf_boolean32(0x00000002, "att_def32_hidden", "Hidden"),
1307         bf_boolean32(0x00000004, "att_def32_system", "System"),
1308         bf_boolean32(0x00000008, "att_def32_execute", "Execute"),
1309         bf_boolean32(0x00000010, "att_def32_sub_only", "Subdirectory"),
1310         bf_boolean32(0x00000020, "att_def32_archive", "Archive"),
1311     bf_boolean32(0x00000040, "att_def32_execute_confirm", "Execute Confirm"),
1312         bf_boolean32(0x00000080, "att_def32_shareable", "Shareable"),
1313         bf_val_str32(0x00000700, "att_def32_search", "Search Mode",[
1314             [0, "Search on all Read Only Opens"],
1315             [1, "Search on Read Only Opens with no Path"],
1316             [2, "Shell Default Search Mode"],
1317             [3, "Search on all Opens with no Path"],
1318             [4, "Do not Search"],
1319             [5, "Reserved - Do not Use"],
1320             [6, "Search on All Opens"],
1321             [7, "Reserved - Do not Use"],
1322     ]),
1323         bf_boolean32(0x00000800, "att_def32_no_suballoc", "No Suballoc"),
1324         bf_boolean32(0x00001000, "att_def32_transaction", "Transactional"),
1325         bf_boolean32(0x00004000, "att_def32_read_audit", "Read Audit"),
1326         bf_boolean32(0x00008000, "att_def32_write_audit", "Write Audit"),
1327         bf_boolean32(0x00010000, "att_def32_purge", "Immediate Purge"),
1328         bf_boolean32(0x00020000, "att_def32_reninhibit", "Rename Inhibit"),
1329         bf_boolean32(0x00040000, "att_def32_delinhibit", "Delete Inhibit"),
1330         bf_boolean32(0x00080000, "att_def32_cpyinhibit", "Copy Inhibit"),
1331         bf_boolean32(0x00100000, "att_def32_file_audit", "File Audit"),
1332         bf_boolean32(0x00200000, "att_def32_reserved", "Reserved"),
1333         bf_boolean32(0x00400000, "att_def32_data_migrate", "Data Migrated"),
1334         bf_boolean32(0x00800000, "att_def32_inhibit_dm", "Inhibit Data Migration"),
1335         bf_boolean32(0x01000000, "att_def32_dm_save_key", "Data Migration Save Key"),
1336         bf_boolean32(0x02000000, "att_def32_im_comp", "Immediate Compress"),
1337         bf_boolean32(0x04000000, "att_def32_comp", "Compressed"),
1338         bf_boolean32(0x08000000, "att_def32_comp_inhibit", "Inhibit Compression"),
1339         bf_boolean32(0x10000000, "att_def32_reserved2", "Reserved"),
1340         bf_boolean32(0x20000000, "att_def32_cant_compress", "Can't Compress"),
1341         bf_boolean32(0x40000000, "att_def32_attr_archive", "Archive Attributes"),
1342         bf_boolean32(0x80000000, "att_def32_reserved3", "Reserved"),
1343 ])
1344 AttributeValidFlag              = uint32("attribute_valid_flag", "Attribute Valid Flag")
1345 AuditFileVersionDate            = uint16("audit_file_ver_date", "Audit File Version Date")
1346 AuditFileVersionDate.NWDate()
1347 AuditFlag                       = val_string8("audit_flag", "Audit Flag", [
1348         [ 0x00, "Do NOT audit object" ],
1349         [ 0x01, "Audit object" ],
1350 ])
1351 AuditHandle                     = uint32("audit_handle", "Audit File Handle")
1352 AuditHandle.Display("BASE_HEX")
1353 AuditID                         = uint32("audit_id", "Audit ID", BE)
1354 AuditID.Display("BASE_HEX")
1355 AuditIDType                     = val_string16("audit_id_type", "Audit ID Type", [
1356         [ 0x0000, "Volume" ],
1357         [ 0x0001, "Container" ],
1358 ])
1359 AuditVersionDate                = uint16("audit_ver_date", "Auditing Version Date")
1360 AuditVersionDate.NWDate()
1361 AvailableBlocks                 = uint32("available_blocks", "Available Blocks")
1362 AvailableClusters               = uint16("available_clusters", "Available Clusters")
1363 AvailableDirectorySlots         = uint16("available_directory_slots", "Available Directory Slots")
1364 AvailableDirEntries             = uint32("available_dir_entries", "Available Directory Entries")
1365 AvailableIndexedFiles           = uint16("available_indexed_files", "Available Indexed Files")
1366
1367 BackgroundAgedWrites            = uint32("background_aged_writes", "Background Aged Writes")
1368 BackgroundDirtyWrites           = uint32("background_dirty_writes", "Background Dirty Writes")
1369 BadLogicalConnectionCount       = uint16("bad_logical_connection_count", "Bad Logical Connection Count")
1370 BannerName                      = fw_string("banner_name", "Banner Name", 14)
1371 BaseDirectoryID                 = uint32("base_directory_id", "Base Directory ID", BE)
1372 BaseDirectoryID.Display("BASE_HEX")
1373 binderyContext                  = nstring8("bindery_context", "Bindery Context")
1374 BitMap                          = bytes("bit_map", "Bit Map", 512)
1375 BlockNumber                     = uint32("block_number", "Block Number")
1376 BlockSize                       = uint16("block_size", "Block Size")
1377 BlockSizeInSectors              = uint32("block_size_in_sectors", "Block Size in Sectors")
1378 BoardInstalled                  = uint8("board_installed", "Board Installed")
1379 BoardNumber                     = uint32("board_number", "Board Number")
1380 BoardNumbers                    = uint32("board_numbers", "Board Numbers")
1381 BufferSize                      = uint16("buffer_size", "Buffer Size")
1382 BusString                       = stringz("bus_string", "Bus String")
1383 BusType                         = val_string8("bus_type", "Bus Type", [
1384         [0x00, "ISA"],
1385         [0x01, "Micro Channel" ],
1386         [0x02, "EISA"],
1387         [0x04, "PCI"],
1388         [0x08, "PCMCIA"],
1389         [0x10, "ISA"],
1390     [0x14, "ISA/PCI"],
1391 ])
1392 BytesActuallyTransferred        = uint32("bytes_actually_transferred", "Bytes Actually Transferred")
1393 BytesRead                       = fw_string("bytes_read", "Bytes Read", 6)
1394 BytesToCopy                     = uint32("bytes_to_copy", "Bytes to Copy")
1395 BytesWritten                    = fw_string("bytes_written", "Bytes Written", 6)
1396
1397 CacheAllocations                = uint32("cache_allocations", "Cache Allocations")
1398 CacheBlockScrapped              = uint16("cache_block_scrapped", "Cache Block Scrapped")
1399 CacheBufferCount                = uint16("cache_buffer_count", "Cache Buffer Count")
1400 CacheBufferSize                 = uint16("cache_buffer_size", "Cache Buffer Size")
1401 CacheFullWriteRequests          = uint32("cache_full_write_requests", "Cache Full Write Requests")
1402 CacheGetRequests                = uint32("cache_get_requests", "Cache Get Requests")
1403 CacheHitOnUnavailableBlock      = uint16("cache_hit_on_unavailable_block", "Cache Hit On Unavailable Block")
1404 CacheHits                       = uint32("cache_hits", "Cache Hits")
1405 CacheMisses                     = uint32("cache_misses", "Cache Misses")
1406 CachePartialWriteRequests       = uint32("cache_partial_write_requests", "Cache Partial Write Requests")
1407 CacheReadRequests               = uint32("cache_read_requests", "Cache Read Requests")
1408 CacheWriteRequests              = uint32("cache_write_requests", "Cache Write Requests")
1409 CategoryName                    = stringz("category_name", "Category Name")
1410 CCFileHandle                    = uint32("cc_file_handle", "File Handle")
1411 CCFileHandle.Display("BASE_HEX")
1412 CCFunction                      = val_string8("cc_function", "OP-Lock Flag", [
1413         [ 0x01, "Clear OP-Lock" ],
1414         [ 0x02, "Acknowledge Callback" ],
1415         [ 0x03, "Decline Callback" ],
1416     [ 0x04, "Level 2" ],
1417 ])
1418 ChangeBits                      = bitfield16("change_bits", "Change Bits", [
1419         bf_boolean16(0x0001, "change_bits_modify", "Modify Name"),
1420         bf_boolean16(0x0002, "change_bits_fatt", "File Attributes"),
1421         bf_boolean16(0x0004, "change_bits_cdate", "Creation Date"),
1422         bf_boolean16(0x0008, "change_bits_ctime", "Creation Time"),
1423         bf_boolean16(0x0010, "change_bits_owner", "Owner ID"),
1424         bf_boolean16(0x0020, "change_bits_adate", "Archive Date"),
1425         bf_boolean16(0x0040, "change_bits_atime", "Archive Time"),
1426         bf_boolean16(0x0080, "change_bits_aid", "Archiver ID"),
1427     bf_boolean16(0x0100, "change_bits_udate", "Update Date"),
1428         bf_boolean16(0x0200, "change_bits_utime", "Update Time"),
1429         bf_boolean16(0x0400, "change_bits_uid", "Update ID"),
1430         bf_boolean16(0x0800, "change_bits_acc_date", "Access Date"),
1431         bf_boolean16(0x1000, "change_bits_max_acc_mask", "Maximum Access Mask"),
1432         bf_boolean16(0x2000, "change_bits_max_space", "Maximum Space"),
1433 ])
1434 ChannelState                    = val_string8("channel_state", "Channel State", [
1435         [ 0x00, "Channel is running" ],
1436         [ 0x01, "Channel is stopping" ],
1437         [ 0x02, "Channel is stopped" ],
1438         [ 0x03, "Channel is not functional" ],
1439 ])
1440 ChannelSynchronizationState     = val_string8("channel_synchronization_state", "Channel Synchronization State", [
1441         [ 0x00, "Channel is not being used" ],
1442         [ 0x02, "NetWare is using the channel; no one else wants it" ],
1443         [ 0x04, "NetWare is using the channel; someone else wants it" ],
1444         [ 0x06, "Someone else is using the channel; NetWare does not need it" ],
1445         [ 0x08, "Someone else is using the channel; NetWare needs it" ],
1446         [ 0x0A, "Someone else has released the channel; NetWare should use it" ],
1447 ])
1448 ChargeAmount                    = uint32("charge_amount", "Charge Amount")
1449 ChargeInformation               = uint32("charge_information", "Charge Information")
1450 ClientCompFlag                  = val_string16("client_comp_flag", "Completion Flag", [
1451         [ 0x0000, "Successful" ],
1452         [ 0x0001, "Illegal Station Number" ],
1453         [ 0x0002, "Client Not Logged In" ],
1454         [ 0x0003, "Client Not Accepting Messages" ],
1455         [ 0x0004, "Client Already has a Message" ],
1456         [ 0x0096, "No Alloc Space for the Message" ],
1457         [ 0x00fd, "Bad Station Number" ],
1458         [ 0x00ff, "Failure" ],
1459 ])
1460 ClientIDNumber                  = uint32("client_id_number", "Client ID Number", BE)
1461 ClientIDNumber.Display("BASE_HEX")
1462 ClientList                      = uint32("client_list", "Client List")
1463 ClientListCount                 = uint16("client_list_cnt", "Client List Count")
1464 ClientListLen                   = uint8("client_list_len", "Client List Length")
1465 ClientName                      = nstring8("client_name", "Client Name")
1466 ClientRecordArea                = fw_string("client_record_area", "Client Record Area", 152)
1467 ClientStation                   = uint8("client_station", "Client Station")
1468 ClientStationLong               = uint32("client_station_long", "Client Station")
1469 ClientTaskNumber                = uint8("client_task_number", "Client Task Number")
1470 ClientTaskNumberLong            = uint32("client_task_number_long", "Client Task Number")
1471 ClusterCount                    = uint16("cluster_count", "Cluster Count")
1472 ClustersUsedByDirectories       = uint32("clusters_used_by_directories", "Clusters Used by Directories")
1473 ClustersUsedByExtendedDirectories = uint32("clusters_used_by_extended_dirs", "Clusters Used by Extended Directories")
1474 ClustersUsedByFAT               = uint32("clusters_used_by_fat", "Clusters Used by FAT")
1475 CodePage                = uint32("code_page", "Code Page")
1476 ComCnts                         = uint16("com_cnts", "Communication Counters")
1477 Comment                         = nstring8("comment", "Comment")
1478 CommentType                     = uint16("comment_type", "Comment Type")
1479 CompletionCode                  = uint32("ncompletion_code", "Completion Code")
1480 CompressedDataStreamsCount      = uint32("compressed_data_streams_count", "Compressed Data Streams Count")
1481 CompressedLimboDataStreamsCount = uint32("compressed_limbo_data_streams_count", "Compressed Limbo Data Streams Count")
1482 CompressedSectors               = uint32("compressed_sectors", "Compressed Sectors")
1483 compressionStage                = uint32("compression_stage", "Compression Stage")
1484 compressVolume                  = uint32("compress_volume", "Volume Compression")
1485 ConfigMajorVN                   = uint8("config_major_vn", "Configuration Major Version Number")
1486 ConfigMinorVN                   = uint8("config_minor_vn", "Configuration Minor Version Number")
1487 ConfigurationDescription        = fw_string("configuration_description", "Configuration Description", 80)
1488 ConfigurationText               = fw_string("configuration_text", "Configuration Text", 160)
1489 ConfiguredMaxBinderyObjects     = uint16("configured_max_bindery_objects", "Configured Max Bindery Objects")
1490 ConfiguredMaxOpenFiles          = uint16("configured_max_open_files", "Configured Max Open Files")
1491 ConfiguredMaxRoutingBuffers     = uint16("configured_max_routing_buffers", "Configured Max Routing Buffers")
1492 ConfiguredMaxSimultaneousTransactions = uint16("cfg_max_simultaneous_transactions", "Configured Max Simultaneous Transactions")
1493 ConnectedLAN                    = uint32("connected_lan", "LAN Adapter")
1494 ConnectionControlBits           = bitfield8("conn_ctrl_bits", "Connection Control", [
1495         bf_boolean8(0x01, "enable_brdcasts", "Enable Broadcasts"),
1496         bf_boolean8(0x02, "enable_personal_brdcasts", "Enable Personal Broadcasts"),
1497         bf_boolean8(0x04, "enable_wdog_messages", "Enable Watchdog Message"),
1498         bf_boolean8(0x10, "disable_brdcasts", "Disable Broadcasts"),
1499         bf_boolean8(0x20, "disable_personal_brdcasts", "Disable Personal Broadcasts"),
1500         bf_boolean8(0x40, "disable_wdog_messages", "Disable Watchdog Message"),
1501 ])
1502 ConnectionListCount             = uint32("conn_list_count", "Connection List Count")
1503 ConnectionList                  = uint32("connection_list", "Connection List")
1504 ConnectionNumber                = uint32("connection_number", "Connection Number", BE)
1505 ConnectionNumberList            = nstring8("connection_number_list", "Connection Number List")
1506 ConnectionNumberWord            = uint16("conn_number_word", "Connection Number")
1507 ConnectionNumberByte            = uint8("conn_number_byte", "Connection Number")
1508 ConnectionServiceType           = val_string8("connection_service_type","Connection Service Type",[
1509         [ 0x01, "CLIB backward Compatibility" ],
1510         [ 0x02, "NCP Connection" ],
1511         [ 0x03, "NLM Connection" ],
1512         [ 0x04, "AFP Connection" ],
1513         [ 0x05, "FTAM Connection" ],
1514         [ 0x06, "ANCP Connection" ],
1515         [ 0x07, "ACP Connection" ],
1516         [ 0x08, "SMB Connection" ],
1517         [ 0x09, "Winsock Connection" ],
1518 ])
1519 ConnectionsInUse                = uint16("connections_in_use", "Connections In Use")
1520 ConnectionsMaxUsed              = uint16("connections_max_used", "Connections Max Used")
1521 ConnectionsSupportedMax         = uint16("connections_supported_max", "Connections Supported Max")
1522 ConnectionType                  = val_string8("connection_type", "Connection Type", [
1523         [ 0x00, "Not in use" ],
1524         [ 0x02, "NCP" ],
1525         [ 0x11, "UDP (for IP)" ],
1526 ])
1527 ConnListLen                     = uint8("conn_list_len", "Connection List Length")
1528 Copyright                       = nstring8("copyright", "Copyright")
1529 connList                        = uint32("conn_list", "Connection List")
1530 ControlFlags                    = val_string8("control_flags", "Control Flags", [
1531         [ 0x00, "Forced Record Locking is Off" ],
1532         [ 0x01, "Forced Record Locking is On" ],
1533 ])
1534 ControllerDriveNumber           = uint8("controller_drive_number", "Controller Drive Number")
1535 ControllerNumber                = uint8("controller_number", "Controller Number")
1536 ControllerType                  = uint8("controller_type", "Controller Type")
1537 Cookie1                         = uint32("cookie_1", "Cookie 1")
1538 Cookie2                         = uint32("cookie_2", "Cookie 2")
1539 Copies                          = uint8( "copies", "Copies" )
1540 CoprocessorFlag                 = uint32("co_processor_flag", "CoProcessor Present Flag")
1541 CoProcessorString               = stringz("co_proc_string", "CoProcessor String")
1542 CounterMask                     = val_string8("counter_mask", "Counter Mask", [
1543         [ 0x00, "Counter is Valid" ],
1544         [ 0x01, "Counter is not Valid" ],
1545 ])
1546 CPUNumber                       = uint32("cpu_number", "CPU Number")
1547 CPUString                       = stringz("cpu_string", "CPU String")
1548 CPUType                         = val_string8("cpu_type", "CPU Type", [
1549         [ 0x00, "80386" ],
1550         [ 0x01, "80486" ],
1551         [ 0x02, "Pentium" ],
1552         [ 0x03, "Pentium Pro" ],
1553 ])
1554 CreationDate                    = uint16("creation_date", "Creation Date")
1555 CreationDate.NWDate()
1556 CreationTime                    = uint16("creation_time", "Creation Time")
1557 CreationTime.NWTime()
1558 CreatorID                       = uint32("creator_id", "Creator ID", BE)
1559 CreatorID.Display("BASE_HEX")
1560 CreatorNameSpaceNumber          = val_string8("creator_name_space_number", "Creator Name Space Number", [
1561         [ 0x00, "DOS Name Space" ],
1562         [ 0x01, "MAC Name Space" ],
1563         [ 0x02, "NFS Name Space" ],
1564         [ 0x04, "Long Name Space" ],
1565 ])
1566 CreditLimit                     = uint32("credit_limit", "Credit Limit")
1567 CtrlFlags                       = val_string16("ctrl_flags", "Control Flags", [
1568         [ 0x0000, "Do Not Return File Name" ],
1569         [ 0x0001, "Return File Name" ],
1570 ])
1571 curCompBlks                     = uint32("cur_comp_blks", "Current Compression Blocks")
1572 curInitialBlks                  = uint32("cur_initial_blks", "Current Initial Blocks")
1573 curIntermediateBlks             = uint32("cur_inter_blks", "Current Intermediate Blocks")
1574 CurNumOfRTags                   = uint32("cur_num_of_r_tags", "Current Number of Resource Tags")
1575 CurrentBlockBeingDecompressed   = uint32("cur_blk_being_dcompress", "Current Block Being Decompressed")
1576 CurrentChangedFATs              = uint16("current_changed_fats", "Current Changed FAT Entries")
1577 CurrentEntries                  = uint32("current_entries", "Current Entries")
1578 CurrentFormType                 = uint8( "current_form_type", "Current Form Type" )
1579 CurrentLFSCounters              = uint32("current_lfs_counters", "Current LFS Counters")
1580 CurrentlyUsedRoutingBuffers     = uint16("currently_used_routing_buffers", "Currently Used Routing Buffers")
1581 CurrentOpenFiles                = uint16("current_open_files", "Current Open Files")
1582 CurrentReferenceID              = uint16("curr_ref_id", "Current Reference ID")
1583 CurrentServers                  = uint32("current_servers", "Current Servers")
1584 CurrentServerTime               = uint32("current_server_time", "Time Elapsed Since Server Was Brought Up")
1585 CurrentSpace                    = uint32("current_space", "Current Space")
1586 CurrentTransactionCount         = uint32("current_trans_count", "Current Transaction Count")
1587 CurrentUsedBinderyObjects       = uint16("current_used_bindery_objects", "Current Used Bindery Objects")
1588 CurrentUsedDynamicSpace         = uint32("current_used_dynamic_space", "Current Used Dynamic Space")
1589 CustomCnts                      = uint32("custom_cnts", "Custom Counters")
1590 CustomCount                     = uint32("custom_count", "Custom Count")
1591 CustomCounters                  = uint32("custom_counters", "Custom Counters")
1592 CustomString                    = nstring8("custom_string", "Custom String")
1593 CustomVariableValue             = uint32("custom_var_value", "Custom Variable Value")
1594
1595 Data                            = nstring8("data", "Data")
1596 DataForkFirstFAT                = uint32("data_fork_first_fat", "Data Fork First FAT Entry")
1597 DataForkLen                     = uint32("data_fork_len", "Data Fork Len")
1598 DataForkSize                    = uint32("data_fork_size", "Data Fork Size")
1599 DataSize                        = uint32("data_size", "Data Size")
1600 DataStream                      = val_string8("data_stream", "Data Stream", [
1601         [ 0x00, "Resource Fork or DOS" ],
1602         [ 0x01, "Data Fork" ],
1603 ])
1604 DataStreamFATBlocks     = uint32("data_stream_fat_blks", "Data Stream FAT Blocks")
1605 DataStreamName                  = nstring8("data_stream_name", "Data Stream Name")
1606 DataStreamNumber                = uint8("data_stream_number", "Data Stream Number")
1607 DataStreamNumberLong    = uint32("data_stream_num_long", "Data Stream Number")
1608 DataStreamsCount                = uint32("data_streams_count", "Data Streams Count")
1609 DataStreamSize                  = uint32("data_stream_size", "Size")
1610 DataStreamSpaceAlloc            = uint32( "data_stream_space_alloc", "Space Allocated for Data Stream" )
1611 DataTypeFlag            = val_string8("data_type_flag", "Data Type Flag", [
1612     [ 0x00, "ASCII Data" ],
1613     [ 0x01, "UTF8 Data" ],
1614 ])
1615 Day                             = uint8("s_day", "Day")
1616 DayOfWeek                       = val_string8("s_day_of_week", "Day of Week", [
1617         [ 0x00, "Sunday" ],
1618         [ 0x01, "Monday" ],
1619         [ 0x02, "Tuesday" ],
1620         [ 0x03, "Wednesday" ],
1621         [ 0x04, "Thursday" ],
1622         [ 0x05, "Friday" ],
1623         [ 0x06, "Saturday" ],
1624 ])
1625 DeadMirrorTable                 = bytes("dead_mirror_table", "Dead Mirror Table", 32)
1626 DefinedDataStreams              = uint8("defined_data_streams", "Defined Data Streams")
1627 DefinedNameSpaces               = uint8("defined_name_spaces", "Defined Name Spaces")
1628 DeletedDate                     = uint16("deleted_date", "Deleted Date")
1629 DeletedDate.NWDate()
1630 DeletedFileTime                 = uint32( "deleted_file_time", "Deleted File Time")
1631 DeletedFileTime.Display("BASE_HEX")
1632 DeletedTime                     = uint16("deleted_time", "Deleted Time")
1633 DeletedTime.NWTime()
1634 DeletedID                       = uint32( "delete_id", "Deleted ID", BE)
1635 DeletedID.Display("BASE_HEX")
1636 DeleteExistingFileFlag          = val_string8("delete_existing_file_flag", "Delete Existing File Flag", [
1637         [ 0x00, "Do Not Delete Existing File" ],
1638         [ 0x01, "Delete Existing File" ],
1639 ])
1640 DenyReadCount                   = uint16("deny_read_count", "Deny Read Count")
1641 DenyWriteCount                  = uint16("deny_write_count", "Deny Write Count")
1642 DescriptionStrings              = fw_string("description_string", "Description", 100)
1643 DesiredAccessRights             = bitfield16("desired_access_rights", "Desired Access Rights", [
1644     bf_boolean16(0x0001, "dsired_acc_rights_read_o", "Read Only"),
1645         bf_boolean16(0x0002, "dsired_acc_rights_write_o", "Write Only"),
1646         bf_boolean16(0x0004, "dsired_acc_rights_deny_r", "Deny Read"),
1647         bf_boolean16(0x0008, "dsired_acc_rights_deny_w", "Deny Write"),
1648         bf_boolean16(0x0010, "dsired_acc_rights_compat", "Compatibility"),
1649         bf_boolean16(0x0040, "dsired_acc_rights_w_thru", "File Write Through"),
1650         bf_boolean16(0x0400, "dsired_acc_rights_del_file_cls", "Delete File Close"),
1651 ])
1652 DesiredResponseCount            = uint16("desired_response_count", "Desired Response Count")
1653 DestDirHandle                   = uint8("dest_dir_handle", "Destination Directory Handle")
1654 DestNameSpace                   = val_string8("dest_name_space", "Destination Name Space", [
1655         [ 0x00, "DOS Name Space" ],
1656         [ 0x01, "MAC Name Space" ],
1657         [ 0x02, "NFS Name Space" ],
1658         [ 0x04, "Long Name Space" ],
1659 ])
1660 DestPathComponentCount          = uint8("dest_component_count", "Destination Path Component Count")
1661 DestPath                        = nstring8("dest_path", "Destination Path")
1662 DetachDuringProcessing          = uint16("detach_during_processing", "Detach During Processing")
1663 DetachForBadConnectionNumber    = uint16("detach_for_bad_connection_number", "Detach For Bad Connection Number")
1664 DirHandle                       = uint8("dir_handle", "Directory Handle")
1665 DirHandleName                   = uint8("dir_handle_name", "Handle Name")
1666 DirHandleLong                   = uint32("dir_handle_long", "Directory Handle")
1667 DirectoryAccessRights           = uint8("directory_access_rights", "Directory Access Rights")
1668 #
1669 # XXX - what do the bits mean here?
1670 #
1671 DirectoryAttributes             = uint8("directory_attributes", "Directory Attributes")
1672 DirectoryBase                   = uint32("dir_base", "Directory Base")
1673 DirectoryBase.Display("BASE_HEX")
1674 DirectoryCount                  = uint16("dir_count", "Directory Count")
1675 DirectoryEntryNumber            = uint32("directory_entry_number", "Directory Entry Number")
1676 DirectoryEntryNumber.Display('BASE_HEX')
1677 DirectoryEntryNumberWord        = uint16("directory_entry_number_word", "Directory Entry Number")
1678 DirectoryID                     = uint16("directory_id", "Directory ID", BE)
1679 DirectoryID.Display("BASE_HEX")
1680 DirectoryName                   = fw_string("directory_name", "Directory Name",12)
1681 DirectoryName14                 = fw_string("directory_name_14", "Directory Name", 14)
1682 DirectoryNameLen                = uint8("directory_name_len", "Directory Name Length")
1683 DirectoryNumber                 = uint32("directory_number", "Directory Number")
1684 DirectoryNumber.Display("BASE_HEX")
1685 DirectoryPath                   = fw_string("directory_path", "Directory Path", 16)
1686 DirectoryServicesObjectID       = uint32("directory_services_object_id", "Directory Services Object ID")
1687 DirectoryServicesObjectID.Display("BASE_HEX")
1688 DirectoryStamp                  = uint16("directory_stamp", "Directory Stamp (0xD1D1)")
1689 DirtyCacheBuffers               = uint16("dirty_cache_buffers", "Dirty Cache Buffers")
1690 DiskChannelNumber               = uint8("disk_channel_number", "Disk Channel Number")
1691 DiskChannelTable                = val_string8("disk_channel_table", "Disk Channel Table", [
1692         [ 0x01, "XT" ],
1693         [ 0x02, "AT" ],
1694         [ 0x03, "SCSI" ],
1695         [ 0x04, "Disk Coprocessor" ],
1696 ])
1697 DiskSpaceLimit                  = uint32("disk_space_limit", "Disk Space Limit")
1698 DMAChannelsUsed                 = uint32("dma_channels_used", "DMA Channels Used")
1699 DMInfoEntries                   = uint32("dm_info_entries", "DM Info Entries")
1700 DMInfoLevel                     = val_string8("dm_info_level", "DM Info Level", [
1701         [ 0x00, "Return Detailed DM Support Module Information" ],
1702         [ 0x01, "Return Number of DM Support Modules" ],
1703         [ 0x02, "Return DM Support Modules Names" ],
1704 ])
1705 DMFlags                         = val_string8("dm_flags", "DM Flags", [
1706         [ 0x00, "OnLine Media" ],
1707         [ 0x01, "OffLine Media" ],
1708 ])
1709 DMmajorVersion                  = uint32("dm_major_version", "DM Major Version")
1710 DMminorVersion                  = uint32("dm_minor_version", "DM Minor Version")
1711 DMPresentFlag                   = val_string8("dm_present_flag", "Data Migration Present Flag", [
1712         [ 0x00, "Data Migration NLM is not loaded" ],
1713         [ 0x01, "Data Migration NLM has been loaded and is running" ],
1714 ])
1715 DOSDirectoryBase                = uint32("dos_directory_base", "DOS Directory Base")
1716 DOSDirectoryBase.Display("BASE_HEX")
1717 DOSDirectoryEntry               = uint32("dos_directory_entry", "DOS Directory Entry")
1718 DOSDirectoryEntry.Display("BASE_HEX")
1719 DOSDirectoryEntryNumber         = uint32("dos_directory_entry_number", "DOS Directory Entry Number")
1720 DOSDirectoryEntryNumber.Display('BASE_HEX')
1721 DOSFileAttributes               = uint8("dos_file_attributes", "DOS File Attributes")
1722 DOSParentDirectoryEntry         = uint32("dos_parent_directory_entry", "DOS Parent Directory Entry")
1723 DOSParentDirectoryEntry.Display('BASE_HEX')
1724 DOSSequence                     = uint32("dos_sequence", "DOS Sequence")
1725 DriveCylinders                  = uint16("drive_cylinders", "Drive Cylinders")
1726 DriveDefinitionString           = fw_string("drive_definition_string", "Drive Definition", 64)
1727 DriveHeads                      = uint8("drive_heads", "Drive Heads")
1728 DriveMappingTable               = bytes("drive_mapping_table", "Drive Mapping Table", 32)
1729 DriveMirrorTable                = bytes("drive_mirror_table", "Drive Mirror Table", 32)
1730 DriverBoardName                 = stringz("driver_board_name", "Driver Board Name")
1731 DriveRemovableFlag              = val_string8("drive_removable_flag", "Drive Removable Flag", [
1732         [ 0x00, "Nonremovable" ],
1733         [ 0xff, "Removable" ],
1734 ])
1735 DriverLogicalName               = stringz("driver_log_name", "Driver Logical Name")
1736 DriverShortName                 = stringz("driver_short_name", "Driver Short Name")
1737 DriveSize                       = uint32("drive_size", "Drive Size")
1738 DstEAFlags                      = val_string16("dst_ea_flags", "Destination EA Flags", [
1739         [ 0x0000, "Return EAHandle,Information Level 0" ],
1740         [ 0x0001, "Return NetWareHandle,Information Level 0" ],
1741         [ 0x0002, "Return Volume/Directory Number,Information Level 0" ],
1742         [ 0x0004, "Return EAHandle,Close Handle on Error,Information Level 0" ],
1743         [ 0x0005, "Return NetWareHandle,Close Handle on Error,Information Level 0" ],
1744         [ 0x0006, "Return Volume/Directory Number,Close Handle on Error,Information Level 0" ],
1745         [ 0x0010, "Return EAHandle,Information Level 1" ],
1746         [ 0x0011, "Return NetWareHandle,Information Level 1" ],
1747         [ 0x0012, "Return Volume/Directory Number,Information Level 1" ],
1748         [ 0x0014, "Return EAHandle,Close Handle on Error,Information Level 1" ],
1749         [ 0x0015, "Return NetWareHandle,Close Handle on Error,Information Level 1" ],
1750         [ 0x0016, "Return Volume/Directory Number,Close Handle on Error,Information Level 1" ],
1751         [ 0x0020, "Return EAHandle,Information Level 2" ],
1752         [ 0x0021, "Return NetWareHandle,Information Level 2" ],
1753         [ 0x0022, "Return Volume/Directory Number,Information Level 2" ],
1754         [ 0x0024, "Return EAHandle,Close Handle on Error,Information Level 2" ],
1755         [ 0x0025, "Return NetWareHandle,Close Handle on Error,Information Level 2" ],
1756         [ 0x0026, "Return Volume/Directory Number,Close Handle on Error,Information Level 2" ],
1757         [ 0x0030, "Return EAHandle,Information Level 3" ],
1758         [ 0x0031, "Return NetWareHandle,Information Level 3" ],
1759         [ 0x0032, "Return Volume/Directory Number,Information Level 3" ],
1760         [ 0x0034, "Return EAHandle,Close Handle on Error,Information Level 3" ],
1761         [ 0x0035, "Return NetWareHandle,Close Handle on Error,Information Level 3" ],
1762         [ 0x0036, "Return Volume/Directory Number,Close Handle on Error,Information Level 3" ],
1763         [ 0x0040, "Return EAHandle,Information Level 4" ],
1764         [ 0x0041, "Return NetWareHandle,Information Level 4" ],
1765         [ 0x0042, "Return Volume/Directory Number,Information Level 4" ],
1766         [ 0x0044, "Return EAHandle,Close Handle on Error,Information Level 4" ],
1767         [ 0x0045, "Return NetWareHandle,Close Handle on Error,Information Level 4" ],
1768         [ 0x0046, "Return Volume/Directory Number,Close Handle on Error,Information Level 4" ],
1769         [ 0x0050, "Return EAHandle,Information Level 5" ],
1770         [ 0x0051, "Return NetWareHandle,Information Level 5" ],
1771         [ 0x0052, "Return Volume/Directory Number,Information Level 5" ],
1772         [ 0x0054, "Return EAHandle,Close Handle on Error,Information Level 5" ],
1773         [ 0x0055, "Return NetWareHandle,Close Handle on Error,Information Level 5" ],
1774         [ 0x0056, "Return Volume/Directory Number,Close Handle on Error,Information Level 5" ],
1775         [ 0x0060, "Return EAHandle,Information Level 6" ],
1776         [ 0x0061, "Return NetWareHandle,Information Level 6" ],
1777         [ 0x0062, "Return Volume/Directory Number,Information Level 6" ],
1778         [ 0x0064, "Return EAHandle,Close Handle on Error,Information Level 6" ],
1779         [ 0x0065, "Return NetWareHandle,Close Handle on Error,Information Level 6" ],
1780         [ 0x0066, "Return Volume/Directory Number,Close Handle on Error,Information Level 6" ],
1781         [ 0x0070, "Return EAHandle,Information Level 7" ],
1782         [ 0x0071, "Return NetWareHandle,Information Level 7" ],
1783         [ 0x0072, "Return Volume/Directory Number,Information Level 7" ],
1784         [ 0x0074, "Return EAHandle,Close Handle on Error,Information Level 7" ],
1785         [ 0x0075, "Return NetWareHandle,Close Handle on Error,Information Level 7" ],
1786         [ 0x0076, "Return Volume/Directory Number,Close Handle on Error,Information Level 7" ],
1787         [ 0x0080, "Return EAHandle,Information Level 0,Immediate Close Handle" ],
1788         [ 0x0081, "Return NetWareHandle,Information Level 0,Immediate Close Handle" ],
1789         [ 0x0082, "Return Volume/Directory Number,Information Level 0,Immediate Close Handle" ],
1790         [ 0x0084, "Return EAHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1791         [ 0x0085, "Return NetWareHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1792         [ 0x0086, "Return Volume/Directory Number,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1793         [ 0x0090, "Return EAHandle,Information Level 1,Immediate Close Handle" ],
1794         [ 0x0091, "Return NetWareHandle,Information Level 1,Immediate Close Handle" ],
1795         [ 0x0092, "Return Volume/Directory Number,Information Level 1,Immediate Close Handle" ],
1796         [ 0x0094, "Return EAHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1797         [ 0x0095, "Return NetWareHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1798         [ 0x0096, "Return Volume/Directory Number,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1799         [ 0x00a0, "Return EAHandle,Information Level 2,Immediate Close Handle" ],
1800         [ 0x00a1, "Return NetWareHandle,Information Level 2,Immediate Close Handle" ],
1801         [ 0x00a2, "Return Volume/Directory Number,Information Level 2,Immediate Close Handle" ],
1802         [ 0x00a4, "Return EAHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1803         [ 0x00a5, "Return NetWareHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1804         [ 0x00a6, "Return Volume/Directory Number,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1805         [ 0x00b0, "Return EAHandle,Information Level 3,Immediate Close Handle" ],
1806         [ 0x00b1, "Return NetWareHandle,Information Level 3,Immediate Close Handle" ],
1807         [ 0x00b2, "Return Volume/Directory Number,Information Level 3,Immediate Close Handle" ],
1808         [ 0x00b4, "Return EAHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1809         [ 0x00b5, "Return NetWareHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1810         [ 0x00b6, "Return Volume/Directory Number,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1811         [ 0x00c0, "Return EAHandle,Information Level 4,Immediate Close Handle" ],
1812         [ 0x00c1, "Return NetWareHandle,Information Level 4,Immediate Close Handle" ],
1813         [ 0x00c2, "Return Volume/Directory Number,Information Level 4,Immediate Close Handle" ],
1814         [ 0x00c4, "Return EAHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1815         [ 0x00c5, "Return NetWareHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1816         [ 0x00c6, "Return Volume/Directory Number,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1817         [ 0x00d0, "Return EAHandle,Information Level 5,Immediate Close Handle" ],
1818         [ 0x00d1, "Return NetWareHandle,Information Level 5,Immediate Close Handle" ],
1819         [ 0x00d2, "Return Volume/Directory Number,Information Level 5,Immediate Close Handle" ],
1820         [ 0x00d4, "Return EAHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1821         [ 0x00d5, "Return NetWareHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1822         [ 0x00d6, "Return Volume/Directory Number,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1823         [ 0x00e0, "Return EAHandle,Information Level 6,Immediate Close Handle" ],
1824         [ 0x00e1, "Return NetWareHandle,Information Level 6,Immediate Close Handle" ],
1825         [ 0x00e2, "Return Volume/Directory Number,Information Level 6,Immediate Close Handle" ],
1826         [ 0x00e4, "Return EAHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1827         [ 0x00e5, "Return NetWareHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1828         [ 0x00e6, "Return Volume/Directory Number,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1829         [ 0x00f0, "Return EAHandle,Information Level 7,Immediate Close Handle" ],
1830         [ 0x00f1, "Return NetWareHandle,Information Level 7,Immediate Close Handle" ],
1831         [ 0x00f2, "Return Volume/Directory Number,Information Level 7,Immediate Close Handle" ],
1832         [ 0x00f4, "Return EAHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1833         [ 0x00f5, "Return NetWareHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1834         [ 0x00f6, "Return Volume/Directory Number,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1835 ])
1836 dstNSIndicator                  = val_string16("dst_ns_indicator", "Destination Name Space Indicator", [
1837         [ 0x0000, "Return Source Name Space Information" ],
1838         [ 0x0001, "Return Destination Name Space Information" ],
1839 ])
1840 DstQueueID                      = uint32("dst_queue_id", "Destination Queue ID")
1841 DuplicateRepliesSent            = uint16("duplicate_replies_sent", "Duplicate Replies Sent")
1842
1843 EAAccessFlag                    = bitfield16("ea_access_flag", "EA Access Flag", [
1844         bf_boolean16(0x0001, "ea_permanent_memory", "Permanent Memory"),
1845         bf_boolean16(0x0002, "ea_deep_freeze", "Deep Freeze"),
1846         bf_boolean16(0x0004, "ea_in_progress", "In Progress"),
1847         bf_boolean16(0x0008, "ea_header_being_enlarged", "Header Being Enlarged"),
1848         bf_boolean16(0x0010, "ea_new_tally_used", "New Tally Used"),
1849         bf_boolean16(0x0020, "ea_tally_need_update", "Tally Need Update"),
1850         bf_boolean16(0x0040, "ea_score_card_present", "Score Card Present"),
1851         bf_boolean16(0x0080, "ea_need_bit_flag", "EA Need Bit Flag"),
1852         bf_boolean16(0x0100, "ea_write_privileges", "Write Privileges"),
1853         bf_boolean16(0x0200, "ea_read_privileges", "Read Privileges"),
1854         bf_boolean16(0x0400, "ea_delete_privileges", "Delete Privileges"),
1855         bf_boolean16(0x0800, "ea_system_ea_only", "System EA Only"),
1856         bf_boolean16(0x1000, "ea_write_in_progress", "Write In Progress"),
1857 ])
1858 EABytesWritten                  = uint32("ea_bytes_written", "Bytes Written")
1859 EACount                         = uint32("ea_count", "Count")
1860 EADataSize                      = uint32("ea_data_size", "Data Size")
1861 EADataSizeDuplicated            = uint32("ea_data_size_duplicated", "Data Size Duplicated")
1862 EADuplicateCount                = uint32("ea_duplicate_count", "Duplicate Count")
1863 EAErrorCodes                    = val_string16("ea_error_codes", "EA Error Codes", [
1864         [ 0x0000, "SUCCESSFUL" ],
1865         [ 0x00c8, "ERR_MISSING_EA_KEY" ],
1866         [ 0x00c9, "ERR_EA_NOT_FOUND" ],
1867         [ 0x00ca, "ERR_INVALID_EA_HANDLE_TYPE" ],
1868         [ 0x00cb, "ERR_EA_NO_KEY_NO_DATA" ],
1869         [ 0x00cc, "ERR_EA_NUMBER_MISMATCH" ],
1870         [ 0x00cd, "ERR_EXTENT_NUMBER_OUT_OF_RANGE" ],
1871         [ 0x00ce, "ERR_EA_BAD_DIR_NUM" ],
1872         [ 0x00cf, "ERR_INVALID_EA_HANDLE" ],
1873         [ 0x00d0, "ERR_EA_POSITION_OUT_OF_RANGE" ],
1874         [ 0x00d1, "ERR_EA_ACCESS_DENIED" ],
1875         [ 0x00d2, "ERR_DATA_PAGE_ODD_SIZE" ],
1876         [ 0x00d3, "ERR_EA_VOLUME_NOT_MOUNTED" ],
1877         [ 0x00d4, "ERR_BAD_PAGE_BOUNDARY" ],
1878         [ 0x00d5, "ERR_INSPECT_FAILURE" ],
1879         [ 0x00d6, "ERR_EA_ALREADY_CLAIMED" ],
1880         [ 0x00d7, "ERR_ODD_BUFFER_SIZE" ],
1881         [ 0x00d8, "ERR_NO_SCORECARDS" ],
1882         [ 0x00d9, "ERR_BAD_EDS_SIGNATURE" ],
1883         [ 0x00da, "ERR_EA_SPACE_LIMIT" ],
1884         [ 0x00db, "ERR_EA_KEY_CORRUPT" ],
1885         [ 0x00dc, "ERR_EA_KEY_LIMIT" ],
1886         [ 0x00dd, "ERR_TALLY_CORRUPT" ],
1887 ])
1888 EAFlags                         = val_string16("ea_flags", "EA Flags", [
1889         [ 0x0000, "Return EAHandle,Information Level 0" ],
1890         [ 0x0001, "Return NetWareHandle,Information Level 0" ],
1891         [ 0x0002, "Return Volume/Directory Number,Information Level 0" ],
1892         [ 0x0004, "Return EAHandle,Close Handle on Error,Information Level 0" ],
1893         [ 0x0005, "Return NetWareHandle,Close Handle on Error,Information Level 0" ],
1894         [ 0x0006, "Return Volume/Directory Number,Close Handle on Error,Information Level 0" ],
1895         [ 0x0010, "Return EAHandle,Information Level 1" ],
1896         [ 0x0011, "Return NetWareHandle,Information Level 1" ],
1897         [ 0x0012, "Return Volume/Directory Number,Information Level 1" ],
1898         [ 0x0014, "Return EAHandle,Close Handle on Error,Information Level 1" ],
1899         [ 0x0015, "Return NetWareHandle,Close Handle on Error,Information Level 1" ],
1900         [ 0x0016, "Return Volume/Directory Number,Close Handle on Error,Information Level 1" ],
1901         [ 0x0020, "Return EAHandle,Information Level 2" ],
1902         [ 0x0021, "Return NetWareHandle,Information Level 2" ],
1903         [ 0x0022, "Return Volume/Directory Number,Information Level 2" ],
1904         [ 0x0024, "Return EAHandle,Close Handle on Error,Information Level 2" ],
1905         [ 0x0025, "Return NetWareHandle,Close Handle on Error,Information Level 2" ],
1906         [ 0x0026, "Return Volume/Directory Number,Close Handle on Error,Information Level 2" ],
1907         [ 0x0030, "Return EAHandle,Information Level 3" ],
1908         [ 0x0031, "Return NetWareHandle,Information Level 3" ],
1909         [ 0x0032, "Return Volume/Directory Number,Information Level 3" ],
1910         [ 0x0034, "Return EAHandle,Close Handle on Error,Information Level 3" ],
1911         [ 0x0035, "Return NetWareHandle,Close Handle on Error,Information Level 3" ],
1912         [ 0x0036, "Return Volume/Directory Number,Close Handle on Error,Information Level 3" ],
1913         [ 0x0040, "Return EAHandle,Information Level 4" ],
1914         [ 0x0041, "Return NetWareHandle,Information Level 4" ],
1915         [ 0x0042, "Return Volume/Directory Number,Information Level 4" ],
1916         [ 0x0044, "Return EAHandle,Close Handle on Error,Information Level 4" ],
1917         [ 0x0045, "Return NetWareHandle,Close Handle on Error,Information Level 4" ],
1918         [ 0x0046, "Return Volume/Directory Number,Close Handle on Error,Information Level 4" ],
1919         [ 0x0050, "Return EAHandle,Information Level 5" ],
1920         [ 0x0051, "Return NetWareHandle,Information Level 5" ],
1921         [ 0x0052, "Return Volume/Directory Number,Information Level 5" ],
1922         [ 0x0054, "Return EAHandle,Close Handle on Error,Information Level 5" ],
1923         [ 0x0055, "Return NetWareHandle,Close Handle on Error,Information Level 5" ],
1924         [ 0x0056, "Return Volume/Directory Number,Close Handle on Error,Information Level 5" ],
1925         [ 0x0060, "Return EAHandle,Information Level 6" ],
1926         [ 0x0061, "Return NetWareHandle,Information Level 6" ],
1927         [ 0x0062, "Return Volume/Directory Number,Information Level 6" ],
1928         [ 0x0064, "Return EAHandle,Close Handle on Error,Information Level 6" ],
1929         [ 0x0065, "Return NetWareHandle,Close Handle on Error,Information Level 6" ],
1930         [ 0x0066, "Return Volume/Directory Number,Close Handle on Error,Information Level 6" ],
1931         [ 0x0070, "Return EAHandle,Information Level 7" ],
1932         [ 0x0071, "Return NetWareHandle,Information Level 7" ],
1933         [ 0x0072, "Return Volume/Directory Number,Information Level 7" ],
1934         [ 0x0074, "Return EAHandle,Close Handle on Error,Information Level 7" ],
1935         [ 0x0075, "Return NetWareHandle,Close Handle on Error,Information Level 7" ],
1936         [ 0x0076, "Return Volume/Directory Number,Close Handle on Error,Information Level 7" ],
1937         [ 0x0080, "Return EAHandle,Information Level 0,Immediate Close Handle" ],
1938         [ 0x0081, "Return NetWareHandle,Information Level 0,Immediate Close Handle" ],
1939         [ 0x0082, "Return Volume/Directory Number,Information Level 0,Immediate Close Handle" ],
1940         [ 0x0084, "Return EAHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1941         [ 0x0085, "Return NetWareHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1942         [ 0x0086, "Return Volume/Directory Number,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1943         [ 0x0090, "Return EAHandle,Information Level 1,Immediate Close Handle" ],
1944         [ 0x0091, "Return NetWareHandle,Information Level 1,Immediate Close Handle" ],
1945         [ 0x0092, "Return Volume/Directory Number,Information Level 1,Immediate Close Handle" ],
1946         [ 0x0094, "Return EAHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1947         [ 0x0095, "Return NetWareHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1948         [ 0x0096, "Return Volume/Directory Number,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1949         [ 0x00a0, "Return EAHandle,Information Level 2,Immediate Close Handle" ],
1950         [ 0x00a1, "Return NetWareHandle,Information Level 2,Immediate Close Handle" ],
1951         [ 0x00a2, "Return Volume/Directory Number,Information Level 2,Immediate Close Handle" ],
1952         [ 0x00a4, "Return EAHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1953         [ 0x00a5, "Return NetWareHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1954         [ 0x00a6, "Return Volume/Directory Number,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1955         [ 0x00b0, "Return EAHandle,Information Level 3,Immediate Close Handle" ],
1956         [ 0x00b1, "Return NetWareHandle,Information Level 3,Immediate Close Handle" ],
1957         [ 0x00b2, "Return Volume/Directory Number,Information Level 3,Immediate Close Handle" ],
1958         [ 0x00b4, "Return EAHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1959         [ 0x00b5, "Return NetWareHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1960         [ 0x00b6, "Return Volume/Directory Number,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1961         [ 0x00c0, "Return EAHandle,Information Level 4,Immediate Close Handle" ],
1962         [ 0x00c1, "Return NetWareHandle,Information Level 4,Immediate Close Handle" ],
1963         [ 0x00c2, "Return Volume/Directory Number,Information Level 4,Immediate Close Handle" ],
1964         [ 0x00c4, "Return EAHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1965         [ 0x00c5, "Return NetWareHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1966         [ 0x00c6, "Return Volume/Directory Number,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1967         [ 0x00d0, "Return EAHandle,Information Level 5,Immediate Close Handle" ],
1968         [ 0x00d1, "Return NetWareHandle,Information Level 5,Immediate Close Handle" ],
1969         [ 0x00d2, "Return Volume/Directory Number,Information Level 5,Immediate Close Handle" ],
1970         [ 0x00d4, "Return EAHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1971         [ 0x00d5, "Return NetWareHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1972         [ 0x00d6, "Return Volume/Directory Number,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1973         [ 0x00e0, "Return EAHandle,Information Level 6,Immediate Close Handle" ],
1974         [ 0x00e1, "Return NetWareHandle,Information Level 6,Immediate Close Handle" ],
1975         [ 0x00e2, "Return Volume/Directory Number,Information Level 6,Immediate Close Handle" ],
1976         [ 0x00e4, "Return EAHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1977         [ 0x00e5, "Return NetWareHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1978         [ 0x00e6, "Return Volume/Directory Number,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1979         [ 0x00f0, "Return EAHandle,Information Level 7,Immediate Close Handle" ],
1980         [ 0x00f1, "Return NetWareHandle,Information Level 7,Immediate Close Handle" ],
1981         [ 0x00f2, "Return Volume/Directory Number,Information Level 7,Immediate Close Handle" ],
1982         [ 0x00f4, "Return EAHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1983         [ 0x00f5, "Return NetWareHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1984         [ 0x00f6, "Return Volume/Directory Number,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1985 ])
1986 EAHandle                        = uint32("ea_handle", "EA Handle")
1987 EAHandle.Display("BASE_HEX")
1988 EAHandleOrNetWareHandleOrVolume = uint32("ea_handle_or_netware_handle_or_volume", "EAHandle or NetWare Handle or Volume (see EAFlags)")
1989 EAHandleOrNetWareHandleOrVolume.Display("BASE_HEX")
1990 EAKey                           = nstring16("ea_key", "EA Key")
1991 EAKeySize                       = uint32("ea_key_size", "Key Size")
1992 EAKeySizeDuplicated             = uint32("ea_key_size_duplicated", "Key Size Duplicated")
1993 EAValue                         = nstring16("ea_value", "EA Value")
1994 EAValueRep                      = fw_string("ea_value_rep", "EA Value", 1)
1995 EAValueLength                   = uint16("ea_value_length", "Value Length")
1996 EchoSocket                      = uint16("echo_socket", "Echo Socket")
1997 EchoSocket.Display('BASE_HEX')
1998 EffectiveRights                 = bitfield8("effective_rights", "Effective Rights", [
1999         bf_boolean8(0x01, "effective_rights_read", "Read Rights"),
2000         bf_boolean8(0x02, "effective_rights_write", "Write Rights"),
2001         bf_boolean8(0x04, "effective_rights_open", "Open Rights"),
2002         bf_boolean8(0x08, "effective_rights_create", "Create Rights"),
2003         bf_boolean8(0x10, "effective_rights_delete", "Delete Rights"),
2004         bf_boolean8(0x20, "effective_rights_parental", "Parental Rights"),
2005         bf_boolean8(0x40, "effective_rights_search", "Search Rights"),
2006         bf_boolean8(0x80, "effective_rights_modify", "Modify Rights"),
2007 ])
2008 EnumInfoMask                    = bitfield8("enum_info_mask", "Return Information Mask", [
2009         bf_boolean8(0x01, "enum_info_transport", "Transport Information"),
2010         bf_boolean8(0x02, "enum_info_time", "Time Information"),
2011         bf_boolean8(0x04, "enum_info_name", "Name Information"),
2012         bf_boolean8(0x08, "enum_info_lock", "Lock Information"),
2013         bf_boolean8(0x10, "enum_info_print", "Print Information"),
2014         bf_boolean8(0x20, "enum_info_stats", "Statistical Information"),
2015         bf_boolean8(0x40, "enum_info_account", "Accounting Information"),
2016         bf_boolean8(0x80, "enum_info_auth", "Authentication Information"),
2017 ])
2018
2019 eventOffset                     = bytes("event_offset", "Event Offset", 8)
2020 eventOffset.Display("BASE_HEX")
2021 eventTime                       = uint32("event_time", "Event Time")
2022 eventTime.Display("BASE_HEX")
2023 ExpirationTime                  = uint32("expiration_time", "Expiration Time")
2024 ExpirationTime.Display('BASE_HEX')
2025 ExtAttrDataSize                 = uint32("ext_attr_data_size", "Extended Attributes Data Size")
2026 ExtAttrCount                    = uint32("ext_attr_count", "Extended Attributes Count")
2027 ExtAttrKeySize                  = uint32("ext_attr_key_size", "Extended Attributes Key Size")
2028 ExtendedAttributesDefined       = uint32("extended_attributes_defined", "Extended Attributes Defined")
2029 ExtendedAttributeExtantsUsed    = uint32("extended_attribute_extants_used", "Extended Attribute Extants Used")
2030 ExtendedInfo                    = bitfield16("ext_info", "Extended Return Information", [
2031         bf_boolean16(0x0001, "ext_info_update", "Last Update"),
2032         bf_boolean16(0x0002, "ext_info_dos_name", "DOS Name"),
2033         bf_boolean16(0x0004, "ext_info_flush", "Flush Time"),
2034         bf_boolean16(0x0008, "ext_info_parental", "Parental"),
2035         bf_boolean16(0x0010, "ext_info_mac_finder", "MAC Finder"),
2036         bf_boolean16(0x0020, "ext_info_sibling", "Sibling"),
2037         bf_boolean16(0x0040, "ext_info_effective", "Effective"),
2038         bf_boolean16(0x0080, "ext_info_mac_date", "MAC Date"),
2039         bf_boolean16(0x0100, "ext_info_access", "Last Access"),
2040         bf_boolean16(0x0400, "ext_info_64_bit_fs", "64 Bit File Sizes"),
2041         bf_boolean16(0x8000, "ext_info_newstyle", "New Style"),
2042 ])
2043 ExtRouterActiveFlag             = boolean8("ext_router_active_flag", "External Router Active Flag")
2044
2045 FailedAllocReqCnt               = uint32("failed_alloc_req", "Failed Alloc Request Count")
2046 FatalFATWriteErrors             = uint16("fatal_fat_write_errors", "Fatal FAT Write Errors")
2047 FATScanErrors                   = uint16("fat_scan_errors", "FAT Scan Errors")
2048 FATWriteErrors                  = uint16("fat_write_errors", "FAT Write Errors")
2049 FieldsLenTable                  = bytes("fields_len_table", "Fields Len Table", 32)
2050 FileCount                       = uint16("file_count", "File Count")
2051 FileDate                        = uint16("file_date", "File Date")
2052 FileDate.NWDate()
2053 FileDirWindow                   = uint16("file_dir_win", "File/Dir Window")
2054 FileDirWindow.Display("BASE_HEX")
2055 FileExecuteType                 = uint8("file_execute_type", "File Execute Type")
2056 FileExtendedAttributes          = val_string8("file_ext_attr", "File Extended Attributes", [
2057         [ 0x00, "Search On All Read Only Opens" ],
2058         [ 0x01, "Search On Read Only Opens With No Path" ],
2059         [ 0x02, "Shell Default Search Mode" ],
2060         [ 0x03, "Search On All Opens With No Path" ],
2061         [ 0x04, "Do Not Search" ],
2062         [ 0x05, "Reserved" ],
2063         [ 0x06, "Search On All Opens" ],
2064         [ 0x07, "Reserved" ],
2065         [ 0x08, "Search On All Read Only Opens/Indexed" ],
2066         [ 0x09, "Search On Read Only Opens With No Path/Indexed" ],
2067         [ 0x0a, "Shell Default Search Mode/Indexed" ],
2068         [ 0x0b, "Search On All Opens With No Path/Indexed" ],
2069         [ 0x0c, "Do Not Search/Indexed" ],
2070         [ 0x0d, "Indexed" ],
2071         [ 0x0e, "Search On All Opens/Indexed" ],
2072         [ 0x0f, "Indexed" ],
2073         [ 0x10, "Search On All Read Only Opens/Transactional" ],
2074         [ 0x11, "Search On Read Only Opens With No Path/Transactional" ],
2075         [ 0x12, "Shell Default Search Mode/Transactional" ],
2076         [ 0x13, "Search On All Opens With No Path/Transactional" ],
2077         [ 0x14, "Do Not Search/Transactional" ],
2078         [ 0x15, "Transactional" ],
2079         [ 0x16, "Search On All Opens/Transactional" ],
2080         [ 0x17, "Transactional" ],
2081         [ 0x18, "Search On All Read Only Opens/Indexed/Transactional" ],
2082         [ 0x19, "Search On Read Only Opens With No Path/Indexed/Transactional" ],
2083         [ 0x1a, "Shell Default Search Mode/Indexed/Transactional" ],
2084         [ 0x1b, "Search On All Opens With No Path/Indexed/Transactional" ],
2085         [ 0x1c, "Do Not Search/Indexed/Transactional" ],
2086         [ 0x1d, "Indexed/Transactional" ],
2087         [ 0x1e, "Search On All Opens/Indexed/Transactional" ],
2088         [ 0x1f, "Indexed/Transactional" ],
2089         [ 0x40, "Search On All Read Only Opens/Read Audit" ],
2090         [ 0x41, "Search On Read Only Opens With No Path/Read Audit" ],
2091         [ 0x42, "Shell Default Search Mode/Read Audit" ],
2092         [ 0x43, "Search On All Opens With No Path/Read Audit" ],
2093         [ 0x44, "Do Not Search/Read Audit" ],
2094         [ 0x45, "Read Audit" ],
2095         [ 0x46, "Search On All Opens/Read Audit" ],
2096         [ 0x47, "Read Audit" ],
2097         [ 0x48, "Search On All Read Only Opens/Indexed/Read Audit" ],
2098         [ 0x49, "Search On Read Only Opens With No Path/Indexed/Read Audit" ],
2099         [ 0x4a, "Shell Default Search Mode/Indexed/Read Audit" ],
2100         [ 0x4b, "Search On All Opens With No Path/Indexed/Read Audit" ],
2101         [ 0x4c, "Do Not Search/Indexed/Read Audit" ],
2102         [ 0x4d, "Indexed/Read Audit" ],
2103         [ 0x4e, "Search On All Opens/Indexed/Read Audit" ],
2104         [ 0x4f, "Indexed/Read Audit" ],
2105         [ 0x50, "Search On All Read Only Opens/Transactional/Read Audit" ],
2106         [ 0x51, "Search On Read Only Opens With No Path/Transactional/Read Audit" ],
2107         [ 0x52, "Shell Default Search Mode/Transactional/Read Audit" ],
2108         [ 0x53, "Search On All Opens With No Path/Transactional/Read Audit" ],
2109         [ 0x54, "Do Not Search/Transactional/Read Audit" ],
2110         [ 0x55, "Transactional/Read Audit" ],
2111         [ 0x56, "Search On All Opens/Transactional/Read Audit" ],
2112         [ 0x57, "Transactional/Read Audit" ],
2113         [ 0x58, "Search On All Read Only Opens/Indexed/Transactional/Read Audit" ],
2114         [ 0x59, "Search On Read Only Opens With No Path/Indexed/Transactional/Read Audit" ],
2115         [ 0x5a, "Shell Default Search Mode/Indexed/Transactional/Read Audit" ],
2116         [ 0x5b, "Search On All Opens With No Path/Indexed/Transactional/Read Audit" ],
2117         [ 0x5c, "Do Not Search/Indexed/Transactional/Read Audit" ],
2118         [ 0x5d, "Indexed/Transactional/Read Audit" ],
2119         [ 0x5e, "Search On All Opens/Indexed/Transactional/Read Audit" ],
2120         [ 0x5f, "Indexed/Transactional/Read Audit" ],
2121         [ 0x80, "Search On All Read Only Opens/Write Audit" ],
2122         [ 0x81, "Search On Read Only Opens With No Path/Write Audit" ],
2123         [ 0x82, "Shell Default Search Mode/Write Audit" ],
2124         [ 0x83, "Search On All Opens With No Path/Write Audit" ],
2125         [ 0x84, "Do Not Search/Write Audit" ],
2126         [ 0x85, "Write Audit" ],
2127         [ 0x86, "Search On All Opens/Write Audit" ],
2128         [ 0x87, "Write Audit" ],
2129         [ 0x88, "Search On All Read Only Opens/Indexed/Write Audit" ],
2130         [ 0x89, "Search On Read Only Opens With No Path/Indexed/Write Audit" ],
2131         [ 0x8a, "Shell Default Search Mode/Indexed/Write Audit" ],
2132         [ 0x8b, "Search On All Opens With No Path/Indexed/Write Audit" ],
2133         [ 0x8c, "Do Not Search/Indexed/Write Audit" ],
2134         [ 0x8d, "Indexed/Write Audit" ],
2135         [ 0x8e, "Search On All Opens/Indexed/Write Audit" ],
2136         [ 0x8f, "Indexed/Write Audit" ],
2137         [ 0x90, "Search On All Read Only Opens/Transactional/Write Audit" ],
2138         [ 0x91, "Search On Read Only Opens With No Path/Transactional/Write Audit" ],
2139         [ 0x92, "Shell Default Search Mode/Transactional/Write Audit" ],
2140         [ 0x93, "Search On All Opens With No Path/Transactional/Write Audit" ],
2141         [ 0x94, "Do Not Search/Transactional/Write Audit" ],
2142         [ 0x95, "Transactional/Write Audit" ],
2143         [ 0x96, "Search On All Opens/Transactional/Write Audit" ],
2144         [ 0x97, "Transactional/Write Audit" ],
2145         [ 0x98, "Search On All Read Only Opens/Indexed/Transactional/Write Audit" ],
2146         [ 0x99, "Search On Read Only Opens With No Path/Indexed/Transactional/Write Audit" ],
2147         [ 0x9a, "Shell Default Search Mode/Indexed/Transactional/Write Audit" ],
2148         [ 0x9b, "Search On All Opens With No Path/Indexed/Transactional/Write Audit" ],
2149         [ 0x9c, "Do Not Search/Indexed/Transactional/Write Audit" ],
2150         [ 0x9d, "Indexed/Transactional/Write Audit" ],
2151         [ 0x9e, "Search On All Opens/Indexed/Transactional/Write Audit" ],
2152         [ 0x9f, "Indexed/Transactional/Write Audit" ],
2153         [ 0xa0, "Search On All Read Only Opens/Read Audit/Write Audit" ],
2154         [ 0xa1, "Search On Read Only Opens With No Path/Read Audit/Write Audit" ],
2155         [ 0xa2, "Shell Default Search Mode/Read Audit/Write Audit" ],
2156         [ 0xa3, "Search On All Opens With No Path/Read Audit/Write Audit" ],
2157         [ 0xa4, "Do Not Search/Read Audit/Write Audit" ],
2158         [ 0xa5, "Read Audit/Write Audit" ],
2159         [ 0xa6, "Search On All Opens/Read Audit/Write Audit" ],
2160         [ 0xa7, "Read Audit/Write Audit" ],
2161         [ 0xa8, "Search On All Read Only Opens/Indexed/Read Audit/Write Audit" ],
2162         [ 0xa9, "Search On Read Only Opens With No Path/Indexed/Read Audit/Write Audit" ],
2163         [ 0xaa, "Shell Default Search Mode/Indexed/Read Audit/Write Audit" ],
2164         [ 0xab, "Search On All Opens With No Path/Indexed/Read Audit/Write Audit" ],
2165         [ 0xac, "Do Not Search/Indexed/Read Audit/Write Audit" ],
2166         [ 0xad, "Indexed/Read Audit/Write Audit" ],
2167         [ 0xae, "Search On All Opens/Indexed/Read Audit/Write Audit" ],
2168         [ 0xaf, "Indexed/Read Audit/Write Audit" ],
2169         [ 0xb0, "Search On All Read Only Opens/Transactional/Read Audit/Write Audit" ],
2170         [ 0xb1, "Search On Read Only Opens With No Path/Transactional/Read Audit/Write Audit" ],
2171         [ 0xb2, "Shell Default Search Mode/Transactional/Read Audit/Write Audit" ],
2172         [ 0xb3, "Search On All Opens With No Path/Transactional/Read Audit/Write Audit" ],
2173         [ 0xb4, "Do Not Search/Transactional/Read Audit/Write Audit" ],
2174         [ 0xb5, "Transactional/Read Audit/Write Audit" ],
2175         [ 0xb6, "Search On All Opens/Transactional/Read Audit/Write Audit" ],
2176         [ 0xb7, "Transactional/Read Audit/Write Audit" ],
2177         [ 0xb8, "Search On All Read Only Opens/Indexed/Transactional/Read Audit/Write Audit" ],
2178         [ 0xb9, "Search On Read Only Opens With No Path/Indexed/Transactional/Read Audit/Write Audit" ],
2179         [ 0xba, "Shell Default Search Mode/Indexed/Transactional/Read Audit/Write Audit" ],
2180         [ 0xbb, "Search On All Opens With No Path/Indexed/Transactional/Read Audit/Write Audit" ],
2181         [ 0xbc, "Do Not Search/Indexed/Transactional/Read Audit/Write Audit" ],
2182         [ 0xbd, "Indexed/Transactional/Read Audit/Write Audit" ],
2183         [ 0xbe, "Search On All Opens/Indexed/Transactional/Read Audit/Write Audit" ],
2184         [ 0xbf, "Indexed/Transactional/Read Audit/Write Audit" ],
2185 ])
2186 fileFlags                       = uint32("file_flags", "File Flags")
2187 FileHandle                      = bytes("file_handle", "File Handle", 6)
2188 FileLimbo                       = uint32("file_limbo", "File Limbo")
2189 FileListCount                   = uint32("file_list_count", "File List Count")
2190 FileLock                        = val_string8("file_lock", "File Lock", [
2191         [ 0x00, "Not Locked" ],
2192         [ 0xfe, "Locked by file lock" ],
2193         [ 0xff, "Unknown" ],
2194 ])
2195 FileLockCount                   = uint16("file_lock_count", "File Lock Count")
2196 FileMigrationState  = val_string8("file_mig_state", "File Migration State", [
2197     [ 0x00, "Mark file ineligible for file migration" ],
2198     [ 0x01, "Mark file eligible for file migration" ],
2199     [ 0x02, "Mark file as migrated and delete fat chains" ],
2200     [ 0x03, "Reset file status back to normal" ],
2201     [ 0x04, "Get file data back and reset file status back to normal" ],
2202 ])
2203 FileMode                        = uint8("file_mode", "File Mode")
2204 FileName                        = nstring8("file_name", "Filename")
2205 FileName12                      = fw_string("file_name_12", "Filename", 12)
2206 FileName14                      = fw_string("file_name_14", "Filename", 14)
2207 FileName16          = nstring16("file_name_16", "Filename")
2208 FileNameLen                     = uint8("file_name_len", "Filename Length")
2209 FileOffset                      = uint32("file_offset", "File Offset")
2210 FilePath                        = nstring8("file_path", "File Path")
2211 FileSize                        = uint32("file_size", "File Size", BE)
2212 FileSize64bit       = uint64("f_size_64bit", "64bit File Size")
2213 FileSystemID                    = uint8("file_system_id", "File System ID")
2214 FileTime                        = uint16("file_time", "File Time")
2215 FileTime.NWTime()
2216 FileUseCount        = uint16("file_use_count", "File Use Count")
2217 FileWriteFlags                  = val_string8("file_write_flags", "File Write Flags", [
2218         [ 0x01, "Writing" ],
2219         [ 0x02, "Write aborted" ],
2220 ])
2221 FileWriteState                  = val_string8("file_write_state", "File Write State", [
2222         [ 0x00, "Not Writing" ],
2223         [ 0x01, "Write in Progress" ],
2224         [ 0x02, "Write Being Stopped" ],
2225 ])
2226 Filler                          = uint8("filler", "Filler")
2227 FinderAttr                      = bitfield16("finder_attr", "Finder Info Attributes", [
2228         bf_boolean16(0x0001, "finder_attr_desktop", "Object on Desktop"),
2229         bf_boolean16(0x2000, "finder_attr_invisible", "Object is Invisible"),
2230         bf_boolean16(0x4000, "finder_attr_bundle", "Object Has Bundle"),
2231 ])
2232 FixedBitMask                    = uint32("fixed_bit_mask", "Fixed Bit Mask")
2233 FixedBitsDefined                = uint16("fixed_bits_defined", "Fixed Bits Defined")
2234 FlagBits                        = uint8("flag_bits", "Flag Bits")
2235 Flags                           = uint8("flags", "Flags")
2236 FlagsDef                        = uint16("flags_def", "Flags")
2237 FlushTime                       = uint32("flush_time", "Flush Time")
2238 FolderFlag                      = val_string8("folder_flag", "Folder Flag", [
2239         [ 0x00, "Not a Folder" ],
2240         [ 0x01, "Folder" ],
2241 ])
2242 ForkCount                       = uint8("fork_count", "Fork Count")
2243 ForkIndicator                   = val_string8("fork_indicator", "Fork Indicator", [
2244         [ 0x00, "Data Fork" ],
2245         [ 0x01, "Resource Fork" ],
2246 ])
2247 ForceFlag                       = val_string8("force_flag", "Force Server Down Flag", [
2248         [ 0x00, "Down Server if No Files Are Open" ],
2249         [ 0xff, "Down Server Immediately, Auto-Close Open Files" ],
2250 ])
2251 ForgedDetachedRequests          = uint16("forged_detached_requests", "Forged Detached Requests")
2252 FormType                        = uint16( "form_type", "Form Type" )
2253 FormTypeCnt                     = uint32("form_type_count", "Form Types Count")
2254 FoundSomeMem                    = uint32("found_some_mem", "Found Some Memory")
2255 FractionalSeconds               = uint32("fractional_time", "Fractional Time in Seconds")
2256 FraggerHandle                   = uint32("fragger_handle", "Fragment Handle")
2257 FraggerHandle.Display('BASE_HEX')
2258 FragmentWriteOccurred           = uint16("fragment_write_occurred", "Fragment Write Occurred")
2259 FragSize                        = uint32("frag_size", "Fragment Size")
2260 FreeableLimboSectors            = uint32("freeable_limbo_sectors", "Freeable Limbo Sectors")
2261 FreeBlocks                      = uint32("free_blocks", "Free Blocks")
2262 FreedClusters                   = uint32("freed_clusters", "Freed Clusters")
2263 FreeDirectoryEntries            = uint16("free_directory_entries", "Free Directory Entries")
2264 FSEngineFlag                    = boolean8("fs_engine_flag", "FS Engine Flag")
2265 FullName                        = fw_string("full_name", "Full Name", 39)
2266
2267 GetSetFlag                      = val_string8("get_set_flag", "Get Set Flag", [
2268         [ 0x00, "Get the default support module ID" ],
2269         [ 0x01, "Set the default support module ID" ],
2270 ])
2271 GUID                            = bytes("guid", "GUID", 16)
2272 GUID.Display("BASE_HEX")
2273
2274 HandleFlag                      = val_string8("handle_flag", "Handle Flag", [
2275         [ 0x00, "Short Directory Handle" ],
2276         [ 0x01, "Directory Base" ],
2277         [ 0xFF, "No Handle Present" ],
2278 ])
2279 HandleInfoLevel                 = val_string8("handle_info_level", "Handle Info Level", [
2280         [ 0x00, "Get Limited Information from a File Handle" ],
2281         [ 0x01, "Get Limited Information from a File Handle Using a Name Space" ],
2282         [ 0x02, "Get Information from a File Handle" ],
2283         [ 0x03, "Get Information from a Directory Handle" ],
2284         [ 0x04, "Get Complete Information from a Directory Handle" ],
2285         [ 0x05, "Get Complete Information from a File Handle" ],
2286 ])
2287 HeldBytesRead                   = bytes("held_bytes_read", "Held Bytes Read", 6)
2288 HeldBytesWritten                = bytes("held_bytes_write", "Held Bytes Written", 6)
2289 HeldConnectTimeInMinutes        = uint32("held_conn_time", "Held Connect Time in Minutes")
2290 HeldRequests                    = uint32("user_info_held_req", "Held Requests")
2291 HoldAmount                      = uint32("hold_amount", "Hold Amount")
2292 HoldCancelAmount                = uint32("hold_cancel_amount", "Hold Cancel Amount")
2293 HolderID                        = uint32("holder_id", "Holder ID")
2294 HolderID.Display("BASE_HEX")
2295 HoldTime                        = uint32("hold_time", "Hold Time")
2296 HopsToNet                       = uint16("hops_to_net", "Hop Count")
2297 HorizLocation                   = uint16("horiz_location", "Horizontal Location")
2298 HostAddress                     = bytes("host_address", "Host Address", 6)
2299 HotFixBlocksAvailable           = uint16("hot_fix_blocks_available", "Hot Fix Blocks Available")
2300 HotFixDisabled                  = val_string8("hot_fix_disabled", "Hot Fix Disabled", [
2301         [ 0x00, "Enabled" ],
2302         [ 0x01, "Disabled" ],
2303 ])
2304 HotFixTableSize                 = uint16("hot_fix_table_size", "Hot Fix Table Size")
2305 HotFixTableStart                = uint32("hot_fix_table_start", "Hot Fix Table Start")
2306 Hour                            = uint8("s_hour", "Hour")
2307 HugeBitMask                     = uint32("huge_bit_mask", "Huge Bit Mask")
2308 HugeBitsDefined                 = uint16("huge_bits_defined", "Huge Bits Defined")
2309 HugeData                        = nstring8("huge_data", "Huge Data")
2310 HugeDataUsed                    = uint32("huge_data_used", "Huge Data Used")
2311 HugeStateInfo                   = bytes("huge_state_info", "Huge State Info", 16)
2312
2313 IdentificationNumber            = uint32("identification_number", "Identification Number")
2314 IgnoredRxPkts                   = uint32("ignored_rx_pkts", "Ignored Receive Packets")
2315 IncomingPacketDiscardedNoDGroup = uint16("incoming_packet_discarded_no_dgroup", "Incoming Packet Discarded No DGroup")
2316 IndexNumber                     = uint8("index_number", "Index Number")
2317 InfoCount                       = uint16("info_count", "Info Count")
2318 InfoFlags                       = bitfield32("info_flags", "Info Flags", [
2319         bf_boolean32(0x10000000, "info_flags_security", "Return Object Security"),
2320         bf_boolean32(0x20000000, "info_flags_flags", "Return Object Flags"),
2321         bf_boolean32(0x40000000, "info_flags_type", "Return Object Type"),
2322         bf_boolean32(0x80000000, "info_flags_name", "Return Object Name"),
2323 ])
2324 InfoLevelNumber                 = val_string8("info_level_num", "Information Level Number", [
2325         [ 0x01, "Volume Information Definition" ],
2326         [ 0x02, "Volume Information 2 Definition" ],
2327 ])
2328 InfoMask                        = bitfield32("info_mask", "Information Mask", [
2329         bf_boolean32(0x00000001, "info_flags_dos_time", "DOS Time"),
2330         bf_boolean32(0x00000002, "info_flags_ref_count", "Reference Count"),
2331         bf_boolean32(0x00000004, "info_flags_dos_attr", "DOS Attributes"),
2332         bf_boolean32(0x00000008, "info_flags_ids", "ID's"),
2333         bf_boolean32(0x00000010, "info_flags_ds_sizes", "Data Stream Sizes"),
2334         bf_boolean32(0x00000020, "info_flags_ns_attr", "Name Space Attributes"),
2335         bf_boolean32(0x00000040, "info_flags_ea_present", "EA Present Flag"),
2336         bf_boolean32(0x00000080, "info_flags_all_attr", "All Attributes"),
2337         bf_boolean32(0x00000100, "info_flags_all_dirbase_num", "All Directory Base Numbers"),
2338         bf_boolean32(0x00000200, "info_flags_max_access_mask", "Maximum Access Mask"),
2339         bf_boolean32(0x00000400, "info_flags_flush_time", "Flush Time"),
2340         bf_boolean32(0x00000800, "info_flags_prnt_base_id", "Parent Base ID"),
2341         bf_boolean32(0x00001000, "info_flags_mac_finder", "Mac Finder Information"),
2342         bf_boolean32(0x00002000, "info_flags_sibling_cnt", "Sibling Count"),
2343         bf_boolean32(0x00004000, "info_flags_effect_rights", "Effective Rights"),
2344         bf_boolean32(0x00008000, "info_flags_mac_time", "Mac Time"),
2345         bf_boolean32(0x20000000, "info_mask_dosname", "DOS Name"),
2346         bf_boolean32(0x40000000, "info_mask_c_name_space", "Creator Name Space & Name"),
2347         bf_boolean32(0x80000000, "info_mask_name", "Name"),
2348 ])
2349 InheritedRightsMask             = bitfield16("inherited_rights_mask", "Inherited Rights Mask", [
2350     bf_boolean16(0x0001, "inh_rights_read", "Read Rights"),
2351         bf_boolean16(0x0002, "inh_rights_write", "Write Rights"),
2352         bf_boolean16(0x0004, "inh_rights_open", "Open Rights"),
2353         bf_boolean16(0x0008, "inh_rights_create", "Create Rights"),
2354         bf_boolean16(0x0010, "inh_rights_delete", "Delete Rights"),
2355         bf_boolean16(0x0020, "inh_rights_parent", "Change Access"),
2356         bf_boolean16(0x0040, "inh_rights_search", "See Files Flag"),
2357         bf_boolean16(0x0080, "inh_rights_modify", "Modify Rights"),
2358         bf_boolean16(0x0100, "inh_rights_supervisor", "Supervisor"),
2359 ])
2360 InheritanceRevokeMask           = bitfield16("inheritance_revoke_mask", "Revoke Rights Mask", [
2361         bf_boolean16(0x0001, "inh_revoke_read", "Read Rights"),
2362         bf_boolean16(0x0002, "inh_revoke_write", "Write Rights"),
2363         bf_boolean16(0x0004, "inh_revoke_open", "Open Rights"),
2364         bf_boolean16(0x0008, "inh_revoke_create", "Create Rights"),
2365         bf_boolean16(0x0010, "inh_revoke_delete", "Delete Rights"),
2366         bf_boolean16(0x0020, "inh_revoke_parent", "Change Access"),
2367         bf_boolean16(0x0040, "inh_revoke_search", "See Files Flag"),
2368         bf_boolean16(0x0080, "inh_revoke_modify", "Modify Rights"),
2369         bf_boolean16(0x0100, "inh_revoke_supervisor", "Supervisor"),
2370 ])
2371 InitialSemaphoreValue           = uint8("initial_semaphore_value", "Initial Semaphore Value")
2372 InspectSize                     = uint32("inspect_size", "Inspect Size")
2373 InternetBridgeVersion           = uint8("internet_bridge_version", "Internet Bridge Version")
2374 InterruptNumbersUsed            = uint32("interrupt_numbers_used", "Interrupt Numbers Used")
2375 InUse                           = uint32("in_use", "Bytes in Use")
2376 IOAddressesUsed                 = bytes("io_addresses_used", "IO Addresses Used", 8)
2377 IOErrorCount                    = uint16("io_error_count", "IO Error Count")
2378 IOEngineFlag                    = boolean8("io_engine_flag", "IO Engine Flag")
2379 IPXNotMyNetwork                 = uint16("ipx_not_my_network", "IPX Not My Network")
2380 ItemsChanged                    = uint32("items_changed", "Items Changed")
2381 ItemsChecked                    = uint32("items_checked", "Items Checked")
2382 ItemsCount                      = uint32("items_count", "Items Count")
2383 itemsInList                     = uint32("items_in_list", "Items in List")
2384 ItemsInPacket                   = uint32("items_in_packet", "Items in Packet")
2385
2386 JobControlFlags                 = bitfield8("job_control_flags", "Job Control Flags", [
2387         bf_boolean8(0x08, "job_control_job_recovery", "Job Recovery"),
2388         bf_boolean8(0x10, "job_control_reservice", "ReService Job"),
2389         bf_boolean8(0x20, "job_control_file_open", "File Open"),
2390         bf_boolean8(0x40, "job_control_user_hold", "User Hold"),
2391         bf_boolean8(0x80, "job_control_operator_hold", "Operator Hold"),
2392
2393 ])
2394 JobControlFlagsWord             = bitfield16("job_control_flags_word", "Job Control Flags", [
2395         bf_boolean16(0x0008, "job_control1_job_recovery", "Job Recovery"),
2396         bf_boolean16(0x0010, "job_control1_reservice", "ReService Job"),
2397         bf_boolean16(0x0020, "job_control1_file_open", "File Open"),
2398         bf_boolean16(0x0040, "job_control1_user_hold", "User Hold"),
2399         bf_boolean16(0x0080, "job_control1_operator_hold", "Operator Hold"),
2400
2401 ])
2402 JobCount                        = uint32("job_count", "Job Count")
2403 JobFileHandle                   = bytes("job_file_handle", "Job File Handle", 6)
2404 JobFileHandleLong               = uint32("job_file_handle_long", "Job File Handle", BE)
2405 JobFileHandleLong.Display("BASE_HEX")
2406 JobFileName                     = fw_string("job_file_name", "Job File Name", 14)
2407 JobPosition                     = uint8("job_position", "Job Position")
2408 JobPositionWord                 = uint16("job_position_word", "Job Position")
2409 JobNumber                       = uint16("job_number", "Job Number", BE )
2410 JobNumberLong                   = uint32("job_number_long", "Job Number", BE )
2411 JobNumberLong.Display("BASE_HEX")
2412 JobType                         = uint16("job_type", "Job Type", BE )
2413
2414 LANCustomVariablesCount         = uint32("lan_cust_var_count", "LAN Custom Variables Count")
2415 LANdriverBoardInstance          = uint16("lan_drv_bd_inst", "LAN Driver Board Instance")
2416 LANdriverBoardNumber            = uint16("lan_drv_bd_num", "LAN Driver Board Number")
2417 LANdriverCardID                 = uint16("lan_drv_card_id", "LAN Driver Card ID")
2418 LANdriverCardName               = fw_string("lan_drv_card_name", "LAN Driver Card Name", 28)
2419 LANdriverCFG_MajorVersion       = uint8("lan_dvr_cfg_major_vrs", "LAN Driver Config - Major Version")
2420 LANdriverCFG_MinorVersion       = uint8("lan_dvr_cfg_minor_vrs", "LAN Driver Config - Minor Version")
2421 LANdriverDMAUsage1              = uint8("lan_drv_dma_usage1", "Primary DMA Channel")
2422 LANdriverDMAUsage2              = uint8("lan_drv_dma_usage2", "Secondary DMA Channel")
2423 LANdriverFlags                  = uint16("lan_drv_flags", "LAN Driver Flags")
2424 LANdriverFlags.Display("BASE_HEX")
2425 LANdriverInterrupt1             = uint8("lan_drv_interrupt1", "Primary Interrupt Vector")
2426 LANdriverInterrupt2             = uint8("lan_drv_interrupt2", "Secondary Interrupt Vector")
2427 LANdriverIOPortsAndRanges1      = uint16("lan_drv_io_ports_and_ranges_1", "Primary Base I/O Port")
2428 LANdriverIOPortsAndRanges2      = uint16("lan_drv_io_ports_and_ranges_2", "Number of I/O Ports")
2429 LANdriverIOPortsAndRanges3      = uint16("lan_drv_io_ports_and_ranges_3", "Secondary Base I/O Port")
2430 LANdriverIOPortsAndRanges4      = uint16("lan_drv_io_ports_and_ranges_4", "Number of I/O Ports")
2431 LANdriverIOReserved             = bytes("lan_drv_io_reserved", "LAN Driver IO Reserved", 14)
2432 LANdriverLineSpeed              = uint16("lan_drv_line_speed", "LAN Driver Line Speed")
2433 LANdriverLink                   = uint32("lan_drv_link", "LAN Driver Link")
2434 LANdriverLogicalName            = bytes("lan_drv_log_name", "LAN Driver Logical Name", 18)
2435 LANdriverMajorVersion           = uint8("lan_drv_major_ver", "LAN Driver Major Version")
2436 LANdriverMaximumSize            = uint32("lan_drv_max_size", "LAN Driver Maximum Size")
2437 LANdriverMaxRecvSize            = uint32("lan_drv_max_rcv_size", "LAN Driver Maximum Receive Size")
2438 LANdriverMediaID                = uint16("lan_drv_media_id", "LAN Driver Media ID")
2439 LANdriverMediaType              = fw_string("lan_drv_media_type", "LAN Driver Media Type", 40)
2440 LANdriverMemoryDecode0          = uint32("lan_drv_mem_decode_0", "LAN Driver Memory Decode 0")
2441 LANdriverMemoryDecode1          = uint32("lan_drv_mem_decode_1", "LAN Driver Memory Decode 1")
2442 LANdriverMemoryLength0          = uint16("lan_drv_mem_length_0", "LAN Driver Memory Length 0")
2443 LANdriverMemoryLength1          = uint16("lan_drv_mem_length_1", "LAN Driver Memory Length 1")
2444 LANdriverMinorVersion           = uint8("lan_drv_minor_ver", "LAN Driver Minor Version")
2445 LANdriverModeFlags              = val_string8("lan_dvr_mode_flags", "LAN Driver Mode Flags", [
2446         [0x80, "Canonical Address" ],
2447         [0x81, "Canonical Address" ],
2448         [0x82, "Canonical Address" ],
2449         [0x83, "Canonical Address" ],
2450         [0x84, "Canonical Address" ],
2451         [0x85, "Canonical Address" ],
2452         [0x86, "Canonical Address" ],
2453         [0x87, "Canonical Address" ],
2454         [0x88, "Canonical Address" ],
2455         [0x89, "Canonical Address" ],
2456         [0x8a, "Canonical Address" ],
2457         [0x8b, "Canonical Address" ],
2458         [0x8c, "Canonical Address" ],
2459         [0x8d, "Canonical Address" ],
2460         [0x8e, "Canonical Address" ],
2461         [0x8f, "Canonical Address" ],
2462         [0x90, "Canonical Address" ],
2463         [0x91, "Canonical Address" ],
2464         [0x92, "Canonical Address" ],
2465         [0x93, "Canonical Address" ],
2466         [0x94, "Canonical Address" ],
2467         [0x95, "Canonical Address" ],
2468         [0x96, "Canonical Address" ],
2469         [0x97, "Canonical Address" ],
2470         [0x98, "Canonical Address" ],
2471         [0x99, "Canonical Address" ],
2472         [0x9a, "Canonical Address" ],
2473         [0x9b, "Canonical Address" ],
2474         [0x9c, "Canonical Address" ],
2475         [0x9d, "Canonical Address" ],
2476         [0x9e, "Canonical Address" ],
2477         [0x9f, "Canonical Address" ],
2478         [0xa0, "Canonical Address" ],
2479         [0xa1, "Canonical Address" ],
2480         [0xa2, "Canonical Address" ],
2481         [0xa3, "Canonical Address" ],
2482         [0xa4, "Canonical Address" ],
2483         [0xa5, "Canonical Address" ],
2484         [0xa6, "Canonical Address" ],
2485         [0xa7, "Canonical Address" ],
2486         [0xa8, "Canonical Address" ],
2487         [0xa9, "Canonical Address" ],
2488         [0xaa, "Canonical Address" ],
2489         [0xab, "Canonical Address" ],
2490         [0xac, "Canonical Address" ],
2491         [0xad, "Canonical Address" ],
2492         [0xae, "Canonical Address" ],
2493         [0xaf, "Canonical Address" ],
2494         [0xb0, "Canonical Address" ],
2495         [0xb1, "Canonical Address" ],
2496         [0xb2, "Canonical Address" ],
2497         [0xb3, "Canonical Address" ],
2498         [0xb4, "Canonical Address" ],
2499         [0xb5, "Canonical Address" ],
2500         [0xb6, "Canonical Address" ],
2501         [0xb7, "Canonical Address" ],
2502         [0xb8, "Canonical Address" ],
2503         [0xb9, "Canonical Address" ],
2504         [0xba, "Canonical Address" ],
2505         [0xbb, "Canonical Address" ],
2506         [0xbc, "Canonical Address" ],
2507         [0xbd, "Canonical Address" ],
2508         [0xbe, "Canonical Address" ],
2509         [0xbf, "Canonical Address" ],
2510         [0xc0, "Non-Canonical Address" ],
2511         [0xc1, "Non-Canonical Address" ],
2512         [0xc2, "Non-Canonical Address" ],
2513         [0xc3, "Non-Canonical Address" ],
2514         [0xc4, "Non-Canonical Address" ],
2515         [0xc5, "Non-Canonical Address" ],
2516         [0xc6, "Non-Canonical Address" ],
2517         [0xc7, "Non-Canonical Address" ],
2518         [0xc8, "Non-Canonical Address" ],
2519         [0xc9, "Non-Canonical Address" ],
2520         [0xca, "Non-Canonical Address" ],
2521         [0xcb, "Non-Canonical Address" ],
2522         [0xcc, "Non-Canonical Address" ],
2523         [0xcd, "Non-Canonical Address" ],
2524         [0xce, "Non-Canonical Address" ],
2525         [0xcf, "Non-Canonical Address" ],
2526         [0xd0, "Non-Canonical Address" ],
2527         [0xd1, "Non-Canonical Address" ],
2528         [0xd2, "Non-Canonical Address" ],
2529         [0xd3, "Non-Canonical Address" ],
2530         [0xd4, "Non-Canonical Address" ],
2531         [0xd5, "Non-Canonical Address" ],
2532         [0xd6, "Non-Canonical Address" ],
2533         [0xd7, "Non-Canonical Address" ],
2534         [0xd8, "Non-Canonical Address" ],
2535         [0xd9, "Non-Canonical Address" ],
2536         [0xda, "Non-Canonical Address" ],
2537         [0xdb, "Non-Canonical Address" ],
2538         [0xdc, "Non-Canonical Address" ],
2539         [0xdd, "Non-Canonical Address" ],
2540         [0xde, "Non-Canonical Address" ],
2541         [0xdf, "Non-Canonical Address" ],
2542         [0xe0, "Non-Canonical Address" ],
2543         [0xe1, "Non-Canonical Address" ],
2544         [0xe2, "Non-Canonical Address" ],
2545         [0xe3, "Non-Canonical Address" ],
2546         [0xe4, "Non-Canonical Address" ],
2547         [0xe5, "Non-Canonical Address" ],
2548         [0xe6, "Non-Canonical Address" ],
2549         [0xe7, "Non-Canonical Address" ],
2550         [0xe8, "Non-Canonical Address" ],
2551         [0xe9, "Non-Canonical Address" ],
2552         [0xea, "Non-Canonical Address" ],
2553         [0xeb, "Non-Canonical Address" ],
2554         [0xec, "Non-Canonical Address" ],
2555         [0xed, "Non-Canonical Address" ],
2556         [0xee, "Non-Canonical Address" ],
2557         [0xef, "Non-Canonical Address" ],
2558         [0xf0, "Non-Canonical Address" ],
2559         [0xf1, "Non-Canonical Address" ],
2560         [0xf2, "Non-Canonical Address" ],
2561         [0xf3, "Non-Canonical Address" ],
2562         [0xf4, "Non-Canonical Address" ],
2563         [0xf5, "Non-Canonical Address" ],
2564         [0xf6, "Non-Canonical Address" ],
2565         [0xf7, "Non-Canonical Address" ],
2566         [0xf8, "Non-Canonical Address" ],
2567         [0xf9, "Non-Canonical Address" ],
2568         [0xfa, "Non-Canonical Address" ],
2569         [0xfb, "Non-Canonical Address" ],
2570         [0xfc, "Non-Canonical Address" ],
2571         [0xfd, "Non-Canonical Address" ],
2572         [0xfe, "Non-Canonical Address" ],
2573         [0xff, "Non-Canonical Address" ],
2574 ])
2575 LANDriverNumber                 = uint8("lan_driver_number", "LAN Driver Number")
2576 LANdriverNodeAddress            = bytes("lan_dvr_node_addr", "LAN Driver Node Address", 6)
2577 LANdriverRecvSize               = uint32("lan_drv_rcv_size", "LAN Driver Receive Size")
2578 LANdriverReserved               = uint16("lan_drv_reserved", "LAN Driver Reserved")
2579 LANdriverSendRetries            = uint16("lan_drv_snd_retries", "LAN Driver Send Retries")
2580 LANdriverSharingFlags           = uint16("lan_drv_share", "LAN Driver Sharing Flags")
2581 LANdriverShortName              = fw_string("lan_drv_short_name", "LAN Driver Short Name", 40)
2582 LANdriverSlot                   = uint16("lan_drv_slot", "LAN Driver Slot")
2583 LANdriverSrcRouting             = uint32("lan_drv_src_route", "LAN Driver Source Routing")
2584 LANdriverTransportTime          = uint16("lan_drv_trans_time", "LAN Driver Transport Time")
2585 LastAccessedDate                = uint16("last_access_date", "Last Accessed Date")
2586 LastAccessedDate.NWDate()
2587 LastAccessedTime                = uint16("last_access_time", "Last Accessed Time")
2588 LastAccessedTime.NWTime()
2589 LastGarbCollect                 = uint32("last_garbage_collect", "Last Garbage Collection")
2590 LastInstance                    = uint32("last_instance", "Last Instance")
2591 LastRecordSeen                  = uint16("last_record_seen", "Last Record Seen")
2592 LastSearchIndex                 = uint16("last_search_index", "Search Index")
2593 LastSeen                        = uint32("last_seen", "Last Seen")
2594 LastSequenceNumber              = uint16("last_sequence_number", "Sequence Number")
2595 Length64bit         = bytes("length_64bit", "64bit Length", 64)
2596 Level                           = uint8("level", "Level")
2597 LFSCounters                     = uint32("lfs_counters", "LFS Counters")
2598 LimboDataStreamsCount           = uint32("limbo_data_streams_count", "Limbo Data Streams Count")
2599 limbCount                       = uint32("limb_count", "Limb Count")
2600 limbFlags           = bitfield32("limb_flags", "Limb Flags", [
2601         bf_boolean32(0x00000002, "scan_entire_folder", "Wild Search"),
2602         bf_boolean32(0x00000004, "scan_files_only", "Scan Files Only"),
2603         bf_boolean32(0x00000008, "scan_folders_only", "Scan Folders Only"),
2604         bf_boolean32(0x00000010, "allow_system", "Allow System Files and Folders"),
2605         bf_boolean32(0x00000020, "allow_hidden", "Allow Hidden Files and Folders"),
2606 ])
2607
2608 limbScanNum                     = uint32("limb_scan_num", "Limb Scan Number")
2609 LimboUsed                       = uint32("limbo_used", "Limbo Used")
2610 LoadedNameSpaces                = uint8("loaded_name_spaces", "Loaded Name Spaces")
2611 LocalConnectionID               = uint32("local_connection_id", "Local Connection ID")
2612 LocalConnectionID.Display("BASE_HEX")
2613 LocalMaxPacketSize              = uint32("local_max_packet_size", "Local Max Packet Size")
2614 LocalMaxSendSize                = uint32("local_max_send_size", "Local Max Send Size")
2615 LocalMaxRecvSize                = uint32("local_max_recv_size", "Local Max Recv Size")
2616 LocalLoginInfoCcode             = uint8("local_login_info_ccode", "Local Login Info C Code")
2617 LocalTargetSocket               = uint32("local_target_socket", "Local Target Socket")
2618 LocalTargetSocket.Display("BASE_HEX")
2619 LockAreaLen                     = uint32("lock_area_len", "Lock Area Length")
2620 LockAreasStartOffset            = uint32("lock_areas_start_offset", "Lock Areas Start Offset")
2621 LockTimeout                     = uint16("lock_timeout", "Lock Timeout")
2622 Locked                          = val_string8("locked", "Locked Flag", [
2623         [ 0x00, "Not Locked Exclusively" ],
2624         [ 0x01, "Locked Exclusively" ],
2625 ])
2626 LockFlag                        = val_string8("lock_flag", "Lock Flag", [
2627         [ 0x00, "Not Locked, Log for Future Exclusive Lock" ],
2628         [ 0x01, "Exclusive Lock (Read/Write)" ],
2629         [ 0x02, "Log for Future Shared Lock"],
2630         [ 0x03, "Shareable Lock (Read-Only)" ],
2631         [ 0xfe, "Locked by a File Lock" ],
2632         [ 0xff, "Locked by Begin Share File Set" ],
2633 ])
2634 LockName                        = nstring8("lock_name", "Lock Name")
2635 LockStatus                      = val_string8("lock_status", "Lock Status", [
2636         [ 0x00, "Locked Exclusive" ],
2637         [ 0x01, "Locked Shareable" ],
2638         [ 0x02, "Logged" ],
2639         [ 0x06, "Lock is Held by TTS"],
2640 ])
2641 LockType                        = val_string8("lock_type", "Lock Type", [
2642         [ 0x00, "Locked" ],
2643         [ 0x01, "Open Shareable" ],
2644         [ 0x02, "Logged" ],
2645         [ 0x03, "Open Normal" ],
2646         [ 0x06, "TTS Holding Lock" ],
2647         [ 0x07, "Transaction Flag Set on This File" ],
2648 ])
2649 LogFileFlagHigh                 = bitfield8("log_file_flag_high", "Log File Flag (byte 2)", [
2650         bf_boolean8(0x80, "log_flag_call_back", "Call Back Requested" ),
2651 ])
2652 LogFileFlagLow                  = bitfield8("log_file_flag_low", "Log File Flag", [
2653         bf_boolean8(0x01, "log_flag_lock_file", "Lock File Immediately" ),
2654 ])
2655 LoggedObjectID                  = uint32("logged_object_id", "Logged in Object ID")
2656 LoggedObjectID.Display("BASE_HEX")
2657 LoggedCount                     = uint16("logged_count", "Logged Count")
2658 LogicalConnectionNumber         = uint16("logical_connection_number", "Logical Connection Number", BE)
2659 LogicalDriveCount               = uint8("logical_drive_count", "Logical Drive Count")
2660 LogicalDriveNumber              = uint8("logical_drive_number", "Logical Drive Number")
2661 LogicalLockThreshold            = uint8("logical_lock_threshold", "LogicalLockThreshold")
2662 LogicalRecordName               = nstring8("logical_record_name", "Logical Record Name")
2663 LoginKey                        = bytes("login_key", "Login Key", 8)
2664 LogLockType                     = uint8("log_lock_type", "Log Lock Type")
2665 LogTtlRxPkts                    = uint32("log_ttl_rx_pkts", "Total Received Packets")
2666 LogTtlTxPkts                    = uint32("log_ttl_tx_pkts", "Total Transmitted Packets")
2667 LongName                        = fw_string("long_name", "Long Name", 32)
2668 LRUBlockWasDirty                = uint16("lru_block_was_dirty", "LRU Block Was Dirty")
2669
2670 MacAttr                         = bitfield16("mac_attr", "Attributes", [
2671         bf_boolean16(0x0001, "mac_attr_smode1", "Search Mode"),
2672         bf_boolean16(0x0002, "mac_attr_smode2", "Search Mode"),
2673         bf_boolean16(0x0004, "mac_attr_smode3", "Search Mode"),
2674         bf_boolean16(0x0010, "mac_attr_transaction", "Transaction"),
2675         bf_boolean16(0x0020, "mac_attr_index", "Index"),
2676         bf_boolean16(0x0040, "mac_attr_r_audit", "Read Audit"),
2677         bf_boolean16(0x0080, "mac_attr_w_audit", "Write Audit"),
2678         bf_boolean16(0x0100, "mac_attr_r_only", "Read Only"),
2679         bf_boolean16(0x0200, "mac_attr_hidden", "Hidden"),
2680         bf_boolean16(0x0400, "mac_attr_system", "System"),
2681         bf_boolean16(0x0800, "mac_attr_execute_only", "Execute Only"),
2682         bf_boolean16(0x1000, "mac_attr_subdirectory", "Subdirectory"),
2683         bf_boolean16(0x2000, "mac_attr_archive", "Archive"),
2684         bf_boolean16(0x8000, "mac_attr_share", "Shareable File"),
2685 ])
2686 MACBackupDate                   = uint16("mac_backup_date", "Mac Backup Date")
2687 MACBackupDate.NWDate()
2688 MACBackupTime                   = uint16("mac_backup_time", "Mac Backup Time")
2689 MACBackupTime.NWTime()
2690 MacBaseDirectoryID              = uint32("mac_base_directory_id", "Mac Base Directory ID", BE)
2691 MacBaseDirectoryID.Display("BASE_HEX")
2692 MACCreateDate                   = uint16("mac_create_date", "Mac Create Date")
2693 MACCreateDate.NWDate()
2694 MACCreateTime                   = uint16("mac_create_time", "Mac Create Time")
2695 MACCreateTime.NWTime()
2696 MacDestinationBaseID            = uint32("mac_destination_base_id", "Mac Destination Base ID")
2697 MacDestinationBaseID.Display("BASE_HEX")
2698 MacFinderInfo                   = bytes("mac_finder_info", "Mac Finder Information", 32)
2699 MacLastSeenID                   = uint32("mac_last_seen_id", "Mac Last Seen ID")
2700 MacLastSeenID.Display("BASE_HEX")
2701 MacSourceBaseID                 = uint32("mac_source_base_id", "Mac Source Base ID")
2702 MacSourceBaseID.Display("BASE_HEX")
2703 MajorVersion                    = uint32("major_version", "Major Version")
2704 MaxBytes                        = uint16("max_bytes", "Maximum Number of Bytes")
2705 MaxDataStreams                  = uint32("max_data_streams", "Maximum Data Streams")
2706 MaxDirDepth                     = uint32("max_dir_depth", "Maximum Directory Depth")
2707 MaximumSpace                    = uint16("max_space", "Maximum Space")
2708 MaxNumOfConn                    = uint32("max_num_of_conn", "Maximum Number of Connections")
2709 MaxNumOfLANS                    = uint32("max_num_of_lans", "Maximum Number Of LAN's")
2710 MaxNumOfMedias                  = uint32("max_num_of_medias", "Maximum Number Of Media's")
2711 MaxNumOfNmeSps                  = uint32("max_num_of_nme_sps", "Maximum Number Of Name Spaces")
2712 MaxNumOfSpoolPr                 = uint32("max_num_of_spool_pr", "Maximum Number Of Spool Printers")
2713 MaxNumOfStacks                  = uint32("max_num_of_stacks", "Maximum Number Of Stacks")
2714 MaxNumOfUsers                   = uint32("max_num_of_users", "Maximum Number Of Users")
2715 MaxNumOfVol                     = uint32("max_num_of_vol", "Maximum Number of Volumes")
2716 MaxReadDataReplySize    = uint16("max_read_data_reply_size", "Max Read Data Reply Size")
2717 MaxSpace                        = uint32("maxspace", "Maximum Space")
2718 MaxUsedDynamicSpace             = uint32("max_used_dynamic_space", "Max Used Dynamic Space")
2719 MediaList                       = uint32("media_list", "Media List")
2720 MediaListCount                  = uint32("media_list_count", "Media List Count")
2721 MediaName                       = nstring8("media_name", "Media Name")
2722 MediaNumber                     = uint32("media_number", "Media Number")
2723 MaxReplyObjectIDCount           = uint8("max_reply_obj_id_count", "Max Reply Object ID Count")
2724 MediaObjectType                 = val_string8("media_object_type", "Object Type", [
2725         [ 0x00, "Adapter" ],
2726         [ 0x01, "Changer" ],
2727         [ 0x02, "Removable Device" ],
2728         [ 0x03, "Device" ],
2729         [ 0x04, "Removable Media" ],
2730         [ 0x05, "Partition" ],
2731         [ 0x06, "Slot" ],
2732         [ 0x07, "Hotfix" ],
2733         [ 0x08, "Mirror" ],
2734         [ 0x09, "Parity" ],
2735         [ 0x0a, "Volume Segment" ],
2736         [ 0x0b, "Volume" ],
2737         [ 0x0c, "Clone" ],
2738         [ 0x0d, "Fixed Media" ],
2739         [ 0x0e, "Unknown" ],
2740 ])
2741 MemberName                      = nstring8("member_name", "Member Name")
2742 MemberType                      = val_string16("member_type", "Member Type", [
2743         [ 0x0000,       "Unknown" ],
2744         [ 0x0001,       "User" ],
2745         [ 0x0002,       "User group" ],
2746         [ 0x0003,       "Print queue" ],
2747         [ 0x0004,       "NetWare file server" ],
2748         [ 0x0005,       "Job server" ],
2749         [ 0x0006,       "Gateway" ],
2750         [ 0x0007,       "Print server" ],
2751         [ 0x0008,       "Archive queue" ],
2752         [ 0x0009,       "Archive server" ],
2753         [ 0x000a,       "Job queue" ],
2754         [ 0x000b,       "Administration" ],
2755         [ 0x0021,       "NAS SNA gateway" ],
2756         [ 0x0026,       "Remote bridge server" ],
2757         [ 0x0027,       "TCP/IP gateway" ],
2758 ])
2759 MessageLanguage                 = uint32("message_language", "NLM Language")
2760 MigratedFiles                   = uint32("migrated_files", "Migrated Files")
2761 MigratedSectors                 = uint32("migrated_sectors", "Migrated Sectors")
2762 MinorVersion                    = uint32("minor_version", "Minor Version")
2763 Minute                          = uint8("s_minute", "Minutes")
2764 MixedModePathFlag               = val_string8("mixed_mode_path_flag", "Mixed Mode Path Flag", [
2765     [ 0x00, "Mixed mode path handling is not available"],
2766     [ 0x01, "Mixed mode path handling is available"],
2767 ])
2768 ModifiedDate                    = uint16("modified_date", "Modified Date")
2769 ModifiedDate.NWDate()
2770 ModifiedTime                    = uint16("modified_time", "Modified Time")
2771 ModifiedTime.NWTime()
2772 ModifierID                      = uint32("modifier_id", "Modifier ID", BE)
2773 ModifierID.Display("BASE_HEX")
2774 ModifyDOSInfoMask               = bitfield16("modify_dos_info_mask", "Modify DOS Info Mask", [
2775         bf_boolean16(0x0002, "modify_dos_read", "Attributes"),
2776         bf_boolean16(0x0004, "modify_dos_write", "Creation Date"),
2777         bf_boolean16(0x0008, "modify_dos_open", "Creation Time"),
2778         bf_boolean16(0x0010, "modify_dos_create", "Creator ID"),
2779         bf_boolean16(0x0020, "modify_dos_delete", "Archive Date"),
2780         bf_boolean16(0x0040, "modify_dos_parent", "Archive Time"),
2781         bf_boolean16(0x0080, "modify_dos_search", "Archiver ID"),
2782         bf_boolean16(0x0100, "modify_dos_mdate", "Modify Date"),
2783         bf_boolean16(0x0200, "modify_dos_mtime", "Modify Time"),
2784         bf_boolean16(0x0400, "modify_dos_mid", "Modifier ID"),
2785         bf_boolean16(0x0800, "modify_dos_laccess", "Last Access"),
2786         bf_boolean16(0x1000, "modify_dos_inheritance", "Inheritance"),
2787         bf_boolean16(0x2000, "modify_dos_max_space", "Maximum Space"),
2788 ])
2789 Month                           = val_string8("s_month", "Month", [
2790         [ 0x01, "January"],
2791         [ 0x02, "Febuary"],
2792         [ 0x03, "March"],
2793         [ 0x04, "April"],
2794         [ 0x05, "May"],
2795         [ 0x06, "June"],
2796         [ 0x07, "July"],
2797         [ 0x08, "August"],
2798         [ 0x09, "September"],
2799         [ 0x0a, "October"],
2800         [ 0x0b, "November"],
2801         [ 0x0c, "December"],
2802 ])
2803
2804 MoreFlag                        = val_string8("more_flag", "More Flag", [
2805         [ 0x00, "No More Segments/Entries Available" ],
2806         [ 0x01, "More Segments/Entries Available" ],
2807         [ 0xff, "More Segments/Entries Available" ],
2808 ])
2809 MoreProperties                  = val_string8("more_properties", "More Properties", [
2810         [ 0x00, "No More Properties Available" ],
2811         [ 0x01, "No More Properties Available" ],
2812         [ 0xff, "More Properties Available" ],
2813 ])
2814
2815 Name                            = nstring8("name", "Name")
2816 Name12                          = fw_string("name12", "Name", 12)
2817 NameLen                         = uint8("name_len", "Name Space Length")
2818 NameLength                      = uint8("name_length", "Name Length")
2819 NameList                        = uint32("name_list", "Name List")
2820 #
2821 # XXX - should this value be used to interpret the characters in names,
2822 # search patterns, and the like?
2823 #
2824 # We need to handle character sets better, e.g. translating strings
2825 # from whatever character set they are in the packet (DOS/Windows code
2826 # pages, ISO character sets, UNIX EUC character sets, UTF-8, UCS-2/Unicode,
2827 # Mac character sets, etc.) into UCS-4 or UTF-8 and storing them as such
2828 # in the protocol tree, and displaying them as best we can.
2829 #
2830 NameSpace                       = val_string8("name_space", "Name Space", [
2831         [ 0x00, "DOS" ],
2832         [ 0x01, "MAC" ],
2833         [ 0x02, "NFS" ],
2834         [ 0x03, "FTAM" ],
2835         [ 0x04, "OS/2, Long" ],
2836 ])
2837 NamesSpaceInfoMask                      = bitfield16("ns_info_mask", "Names Space Info Mask", [
2838         bf_boolean16(0x0001, "ns_info_mask_modify", "Modify Name"),
2839         bf_boolean16(0x0002, "ns_info_mask_fatt", "File Attributes"),
2840         bf_boolean16(0x0004, "ns_info_mask_cdate", "Creation Date"),
2841         bf_boolean16(0x0008, "ns_info_mask_ctime", "Creation Time"),
2842         bf_boolean16(0x0010, "ns_info_mask_owner", "Owner ID"),
2843         bf_boolean16(0x0020, "ns_info_mask_adate", "Archive Date"),
2844         bf_boolean16(0x0040, "ns_info_mask_atime", "Archive Time"),
2845         bf_boolean16(0x0080, "ns_info_mask_aid", "Archiver ID"),
2846         bf_boolean16(0x0100, "ns_info_mask_udate", "Update Date"),
2847         bf_boolean16(0x0200, "ns_info_mask_utime", "Update Time"),
2848         bf_boolean16(0x0400, "ns_info_mask_uid", "Update ID"),
2849         bf_boolean16(0x0800, "ns_info_mask_acc_date", "Access Date"),
2850         bf_boolean16(0x1000, "ns_info_mask_max_acc_mask", "Inheritance"),
2851         bf_boolean16(0x2000, "ns_info_mask_max_space", "Maximum Space"),
2852 ])
2853 NameSpaceName                   = nstring8("name_space_name", "Name Space Name")
2854 nameType                        = uint32("name_type", "nameType")
2855 NCPdataSize                     = uint32("ncp_data_size", "NCP Data Size")
2856 NCPEncodedStringsBits   = uint32("ncp_encoded_strings_bits", "NCP Encoded Strings Bits")
2857 NCPextensionMajorVersion        = uint8("ncp_extension_major_version", "NCP Extension Major Version")
2858 NCPextensionMinorVersion        = uint8("ncp_extension_minor_version", "NCP Extension Minor Version")
2859 NCPextensionName                = nstring8("ncp_extension_name", "NCP Extension Name")
2860 NCPextensionNumber              = uint32("ncp_extension_number", "NCP Extension Number")
2861 NCPextensionNumber.Display("BASE_HEX")
2862 NCPExtensionNumbers             = uint32("ncp_extension_numbers", "NCP Extension Numbers")
2863 NCPextensionRevisionNumber      = uint8("ncp_extension_revision_number", "NCP Extension Revision Number")
2864 NCPPeakStaInUse                 = uint32("ncp_peak_sta_in_use", "Peak Number of Connections since Server was brought up")
2865 NCPStaInUseCnt                  = uint32("ncp_sta_in_use", "Number of Workstations Connected to Server")
2866 NDSRequestFlags                 = bitfield16("nds_request_flags", "NDS Request Flags", [
2867         bf_boolean16(0x0001, "nds_request_flags_output", "Output Fields"),
2868         bf_boolean16(0x0002, "nds_request_flags_no_such_entry", "No Such Entry"),
2869         bf_boolean16(0x0004, "nds_request_flags_local_entry", "Local Entry"),
2870         bf_boolean16(0x0008, "nds_request_flags_type_ref", "Type Referral"),
2871         bf_boolean16(0x0010, "nds_request_flags_alias_ref", "Alias Referral"),
2872         bf_boolean16(0x0020, "nds_request_flags_req_cnt", "Request Count"),
2873         bf_boolean16(0x0040, "nds_request_flags_req_data_size", "Request Data Size"),
2874         bf_boolean16(0x0080, "nds_request_flags_reply_data_size", "Reply Data Size"),
2875         bf_boolean16(0x0100, "nds_request_flags_trans_ref", "Transport Referral"),
2876         bf_boolean16(0x0200, "nds_request_flags_trans_ref2", "Transport Referral"),
2877         bf_boolean16(0x0400, "nds_request_flags_up_ref", "Up Referral"),
2878         bf_boolean16(0x0800, "nds_request_flags_dn_ref", "Down Referral"),
2879 ])
2880 NDSStatus                       = uint32("nds_status", "NDS Status")
2881 NetBIOSBroadcastWasPropogated   = uint32("netbios_broadcast_was_propogated", "NetBIOS Broadcast Was Propogated")
2882 NetIDNumber                     = uint32("net_id_number", "Net ID Number")
2883 NetIDNumber.Display("BASE_HEX")
2884 NetAddress                      = nbytes32("address", "Address")
2885 NetStatus                       = uint16("net_status", "Network Status")
2886 NetWareAccessHandle             = bytes("netware_access_handle", "NetWare Access Handle", 6)
2887 NetworkAddress                  = uint32("network_address", "Network Address")
2888 NetworkAddress.Display("BASE_HEX")
2889 NetworkNodeAddress              = bytes("network_node_address", "Network Node Address", 6)
2890 NetworkNumber                   = uint32("network_number", "Network Number")
2891 NetworkNumber.Display("BASE_HEX")
2892 #
2893 # XXX - this should have the "ipx_socket_vals" value_string table
2894 # from "packet-ipx.c".
2895 #
2896 NetworkSocket                   = uint16("network_socket", "Network Socket")
2897 NetworkSocket.Display("BASE_HEX")
2898 NewAccessRights                 = bitfield16("new_access_rights_mask", "New Access Rights", [
2899         bf_boolean16(0x0001, "new_access_rights_read", "Read"),
2900         bf_boolean16(0x0002, "new_access_rights_write", "Write"),
2901         bf_boolean16(0x0004, "new_access_rights_open", "Open"),
2902         bf_boolean16(0x0008, "new_access_rights_create", "Create"),
2903         bf_boolean16(0x0010, "new_access_rights_delete", "Delete"),
2904         bf_boolean16(0x0020, "new_access_rights_parental", "Parental"),
2905         bf_boolean16(0x0040, "new_access_rights_search", "Search"),
2906         bf_boolean16(0x0080, "new_access_rights_modify", "Modify"),
2907         bf_boolean16(0x0100, "new_access_rights_supervisor", "Supervisor"),
2908 ])
2909 NewDirectoryID                  = uint32("new_directory_id", "New Directory ID", BE)
2910 NewDirectoryID.Display("BASE_HEX")
2911 NewEAHandle                     = uint32("new_ea_handle", "New EA Handle")
2912 NewEAHandle.Display("BASE_HEX")
2913 NewFileName                     = fw_string("new_file_name", "New File Name", 14)
2914 NewFileNameLen                  = nstring8("new_file_name_len", "New File Name")
2915 NewFileSize                     = uint32("new_file_size", "New File Size")
2916 NewPassword                     = nstring8("new_password", "New Password")
2917 NewPath                         = nstring8("new_path", "New Path")
2918 NewPosition                     = uint8("new_position", "New Position")
2919 NewObjectName                   = nstring8("new_object_name", "New Object Name")
2920 NextCntBlock                    = uint32("next_cnt_block", "Next Count Block")
2921 NextHugeStateInfo               = bytes("next_huge_state_info", "Next Huge State Info", 16)
2922 nextLimbScanNum                 = uint32("next_limb_scan_num", "Next Limb Scan Number")
2923 NextObjectID                    = uint32("next_object_id", "Next Object ID", BE)
2924 NextObjectID.Display("BASE_HEX")
2925 NextRecord                      = uint32("next_record", "Next Record")
2926 NextRequestRecord               = uint16("next_request_record", "Next Request Record")
2927 NextSearchIndex                 = uint16("next_search_index", "Next Search Index")
2928 NextSearchNumber                = uint16("next_search_number", "Next Search Number")
2929 NextSearchNum                   = uint32("nxt_search_num", "Next Search Number")
2930 nextStartingNumber              = uint32("next_starting_number", "Next Starting Number")
2931 NextTrusteeEntry                = uint32("next_trustee_entry", "Next Trustee Entry")
2932 NextVolumeNumber                = uint32("next_volume_number", "Next Volume Number")
2933 NLMBuffer                       = nstring8("nlm_buffer", "Buffer")
2934 NLMcount                        = uint32("nlm_count", "NLM Count")
2935 NLMFlags                        = bitfield8("nlm_flags", "Flags", [
2936         bf_boolean8(0x01, "nlm_flags_reentrant", "ReEntrant"),
2937         bf_boolean8(0x02, "nlm_flags_multiple", "Can Load Multiple Times"),
2938         bf_boolean8(0x04, "nlm_flags_synchronize", "Synchronize Start"),
2939         bf_boolean8(0x08, "nlm_flags_pseudo", "PseudoPreemption"),
2940 ])
2941 NLMLoadOptions                  = uint32("nlm_load_options", "NLM Load Options")
2942 NLMName                         = stringz("nlm_name_stringz", "NLM Name")
2943 NLMNumber                       = uint32("nlm_number", "NLM Number")
2944 NLMNumbers                      = uint32("nlm_numbers", "NLM Numbers")
2945 NLMsInList                      = uint32("nlms_in_list", "NLM's in List")
2946 NLMStartNumber                  = uint32("nlm_start_num", "NLM Start Number")
2947 NLMType                         = val_string8("nlm_type", "NLM Type", [
2948         [ 0x00, "Generic NLM (.NLM)" ],
2949         [ 0x01, "LAN Driver (.LAN)" ],
2950         [ 0x02, "Disk Driver (.DSK)" ],
2951         [ 0x03, "Name Space Support Module (.NAM)" ],
2952         [ 0x04, "Utility or Support Program (.NLM)" ],
2953         [ 0x05, "Mirrored Server Link (.MSL)" ],
2954         [ 0x06, "OS NLM (.NLM)" ],
2955         [ 0x07, "Paged High OS NLM (.NLM)" ],
2956         [ 0x08, "Host Adapter Module (.HAM)" ],
2957         [ 0x09, "Custom Device Module (.CDM)" ],
2958         [ 0x0a, "File System Engine (.NLM)" ],
2959         [ 0x0b, "Real Mode NLM (.NLM)" ],
2960         [ 0x0c, "Hidden NLM (.NLM)" ],
2961         [ 0x15, "NICI Support (.NLM)" ],
2962         [ 0x16, "NICI Support (.NLM)" ],
2963         [ 0x17, "Cryptography (.NLM)" ],
2964         [ 0x18, "Encryption (.NLM)" ],
2965         [ 0x19, "NICI Support (.NLM)" ],
2966         [ 0x1c, "NICI Support (.NLM)" ],
2967 ])
2968 nodeFlags                       = uint32("node_flags", "Node Flags")
2969 nodeFlags.Display("BASE_HEX")
2970 NoMoreMemAvlCnt                 = uint32("no_more_mem_avail", "No More Memory Available Count")
2971 NonDedFlag                      = boolean8("non_ded_flag", "Non Dedicated Flag")
2972 NonFreeableAvailableSubAllocSectors = uint32("non_freeable_avail_sub_alloc_sectors", "Non Freeable Available Sub Alloc Sectors")
2973 NonFreeableLimboSectors         = uint32("non_freeable_limbo_sectors", "Non Freeable Limbo Sectors")
2974 NotUsableSubAllocSectors        = uint32("not_usable_sub_alloc_sectors", "Not Usable Sub Alloc Sectors")
2975 NotYetPurgeableBlocks           = uint32("not_yet_purgeable_blocks", "Not Yet Purgeable Blocks")
2976 NSInfoBitMask                   = uint32("ns_info_bit_mask", "Name Space Info Bit Mask")
2977 NSSOAllInFlags                  = bitfield32("nsso_all_in_flags", "SecretStore All Input Flags",[
2978         bf_boolean32(0x00000010, "nsso_all_unicode", "Unicode Data"),
2979         bf_boolean32(0x00000080, "nsso_set_tree", "Set Tree"),
2980         bf_boolean32(0x00000200, "nsso_destroy_ctx", "Destroy Context"),
2981 ])
2982 NSSOGetServiceInFlags           = bitfield32("nsso_get_svc_in_flags", "SecretStore Get Service Flags",[
2983         bf_boolean32(0x00000100, "nsso_get_ctx", "Get Context"),
2984 ])
2985 NSSOReadInFlags                 = bitfield32("nsso_read_in_flags", "SecretStore Read Flags",[
2986         bf_boolean32(0x00000001, "nsso_rw_enh_prot", "Read/Write Enhanced Protection"),
2987         bf_boolean32(0x00000008, "nsso_repair", "Repair SecretStore"),
2988 ])
2989 NSSOReadOrUnlockInFlags         = bitfield32("nsso_read_or_unlock_in_flags", "SecretStore Read or Unlock Flags",[
2990         bf_boolean32(0x00000004, "nsso_ep_master_pwd", "Master Password used instead of ENH Password"),
2991 ])
2992 NSSOUnlockInFlags               = bitfield32("nsso_unlock_in_flags", "SecretStore Unlock Flags",[
2993         bf_boolean32(0x00000004, "nsso_rmv_lock", "Remove Lock from Store"),
2994 ])
2995 NSSOWriteInFlags                = bitfield32("nsso_write_in_flags", "SecretStore Write Flags",[
2996         bf_boolean32(0x00000001, "nsso_enh_prot", "Enhanced Protection"),
2997         bf_boolean32(0x00000002, "nsso_create_id", "Create ID"),
2998         bf_boolean32(0x00000040, "nsso_ep_pwd_used", "Enhanced Protection Password Used"),
2999 ])
3000 NSSOContextOutFlags             = bitfield32("nsso_cts_out_flags", "Type of Context",[
3001         bf_boolean32(0x00000001, "nsso_ds_ctx", "DSAPI Context"),
3002         bf_boolean32(0x00000080, "nsso_ldap_ctx", "LDAP Context"),
3003         bf_boolean32(0x00000200, "nsso_dc_ctx", "Reserved"),
3004 ])
3005 NSSOGetServiceOutFlags          = bitfield32("nsso_get_svc_out_flags", "SecretStore Status Flags",[
3006         bf_boolean32(0x00400000, "nsso_mstr_pwd", "Master Password Present"),
3007 ])
3008 NSSOGetServiceReadOutFlags      = bitfield32("nsso_get_svc_read_out_flags", "SecretStore Status Flags",[
3009         bf_boolean32(0x00800000, "nsso_mp_disabled", "Master Password Disabled"),
3010 ])
3011 NSSOReadOutFlags                = bitfield32("nsso_read_out_flags", "SecretStore Read Flags",[
3012         bf_boolean32(0x00010000, "nsso_secret_locked", "Enhanced Protection Lock on Secret"),
3013         bf_boolean32(0x00020000, "nsso_secret_not_init", "Secret Not Yet Initialized"),
3014         bf_boolean32(0x00040000, "nsso_secret_marked", "Secret Marked for Enhanced Protection"),
3015         bf_boolean32(0x00080000, "nsso_secret_not_sync", "Secret Not Yet Synchronized in NDS"),
3016         bf_boolean32(0x00200000, "nsso_secret_enh_pwd", "Enhanced Protection Password on Secret"),
3017 ])
3018 NSSOReadOutStatFlags            = bitfield32("nsso_read_out_stat_flags", "SecretStore Read Status Flags",[
3019         bf_boolean32(0x00100000, "nsso_admin_mod", "Admin Modified Secret Last"),
3020 ])
3021 NSSOVerb                        = val_string8("nsso_verb", "SecretStore Verb", [
3022         [ 0x00, "Query Server" ],
3023         [ 0x01, "Read App Secrets" ],
3024         [ 0x02, "Write App Secrets" ],
3025         [ 0x03, "Add Secret ID" ],
3026         [ 0x04, "Remove Secret ID" ],
3027         [ 0x05, "Remove SecretStore" ],
3028         [ 0x06, "Enumerate SecretID's" ],
3029         [ 0x07, "Unlock Store" ],
3030         [ 0x08, "Set Master Password" ],
3031         [ 0x09, "Get Service Information" ],
3032 ])
3033 NSSpecificInfo                  = fw_string("ns_specific_info", "Name Space Specific Info", 512)
3034 NumberOfAllocs                  = uint32("num_of_allocs", "Number of Allocations")
3035 NumberOfAttributes              = uint32("number_of_attributes", "Number of Attributes")
3036 NumberOfCPUs                    = uint32("number_of_cpus", "Number of CPU's")
3037 NumberOfDataStreams             = uint16("number_of_data_streams", "Number of Data Streams")
3038 NumberOfDataStreamsLong     = uint32("number_of_data_streams_long", "Number of Data Streams")
3039 NumberOfDynamicMemoryAreas      = uint16("number_of_dynamic_memory_areas", "Number Of Dynamic Memory Areas")
3040 NumberOfEntries                 = uint8("number_of_entries", "Number of Entries")
3041 NumberOfLocks                   = uint8("number_of_locks", "Number of Locks")
3042 NumberOfMinutesToDelay          = uint32("number_of_minutes_to_delay", "Number of Minutes to Delay")
3043 NumberOfNCPExtensions           = uint32("number_of_ncp_extensions", "Number Of NCP Extensions")
3044 NumberOfNSLoaded                = uint16("number_of_ns_loaded", "Number Of Name Spaces Loaded")
3045 NumberOfProtocols               = uint8("number_of_protocols", "Number of Protocols")
3046 NumberOfRecords                 = uint16("number_of_records", "Number of Records")
3047 NumberOfReferencedPublics       = uint32("num_of_ref_publics", "Number of Referenced Public Symbols")
3048 NumberOfSemaphores              = uint16("number_of_semaphores", "Number Of Semaphores")
3049 NumberOfServiceProcesses        = uint8("number_of_service_processes", "Number Of Service Processes")
3050 NumberOfSetCategories           = uint32("number_of_set_categories", "Number Of Set Categories")
3051 NumberOfSMs                     = uint32("number_of_sms", "Number Of Storage Medias")
3052 NumberOfStations                = uint8("number_of_stations", "Number of Stations")
3053 NumBytes                        = uint16("num_bytes", "Number of Bytes")
3054 NumOfCCinPkt                    = uint32("num_of_cc_in_pkt", "Number of Custom Counters in Packet")
3055 NumOfChecks                     = uint32("num_of_checks", "Number of Checks")
3056 NumOfEntries                    = uint32("num_of_entries", "Number of Entries")
3057 NumOfFilesMigrated              = uint32("num_of_files_migrated", "Number Of Files Migrated")
3058 NumOfGarbageColl                = uint32("num_of_garb_coll", "Number of Garbage Collections")
3059 NumOfNCPReqs                    = uint32("num_of_ncp_reqs", "Number of NCP Requests since Server was brought up")
3060 NumOfSegments                   = uint32("num_of_segments", "Number of Segments")
3061
3062 ObjectCount                     = uint32("object_count", "Object Count")
3063 ObjectFlags                     = val_string8("object_flags", "Object Flags", [
3064         [ 0x00, "Dynamic object" ],
3065         [ 0x01, "Static object" ],
3066 ])
3067 ObjectHasProperties             = val_string8("object_has_properites", "Object Has Properties", [
3068         [ 0x00, "No properties" ],
3069         [ 0xff, "One or more properties" ],
3070 ])
3071 ObjectID                        = uint32("object_id", "Object ID", BE)
3072 ObjectID.Display('BASE_HEX')
3073 ObjectIDCount                   = uint16("object_id_count", "Object ID Count")
3074 ObjectIDInfo                    = uint32("object_id_info", "Object Information")
3075 ObjectInfoReturnCount           = uint32("object_info_rtn_count", "Object Information Count")
3076 ObjectName                      = nstring8("object_name", "Object Name")
3077 ObjectNameLen                   = fw_string("object_name_len", "Object Name", 48)
3078 ObjectNameStringz               = stringz("object_name_stringz", "Object Name")
3079 ObjectNumber                    = uint32("object_number", "Object Number")
3080 ObjectSecurity                  = val_string8("object_security", "Object Security", [
3081         [ 0x00, "Object Read (Anyone) / Object Write (Anyone)" ],
3082         [ 0x01, "Object Read (Logged in) / Object Write (Anyone)" ],
3083         [ 0x02, "Object Read (Logged in as Object) / Object Write (Anyone)" ],
3084         [ 0x03, "Object Read (Supervisor) / Object Write (Anyone)" ],
3085         [ 0x04, "Object Read (Operating System Only) / Object Write (Anyone)" ],
3086         [ 0x10, "Object Read (Anyone) / Object Write (Logged in)" ],
3087         [ 0x11, "Object Read (Logged in) / Object Write (Logged in)" ],
3088         [ 0x12, "Object Read (Logged in as Object) / Object Write (Logged in)" ],
3089         [ 0x13, "Object Read (Supervisor) / Object Write (Logged in)" ],
3090         [ 0x14, "Object Read (Operating System Only) / Object Write (Logged in)" ],
3091         [ 0x20, "Object Read (Anyone) / Object Write (Logged in as Object)" ],
3092         [ 0x21, "Object Read (Logged in) / Object Write (Logged in as Object)" ],
3093         [ 0x22, "Object Read (Logged in as Object) / Object Write (Logged in as Object)" ],
3094         [ 0x23, "Object Read (Supervisor) / Object Write (Logged in as Object)" ],
3095         [ 0x24, "Object Read (Operating System Only) / Object Write (Logged in as Object)" ],
3096         [ 0x30, "Object Read (Anyone) / Object Write (Supervisor)" ],
3097         [ 0x31, "Object Read (Logged in) / Object Write (Supervisor)" ],
3098         [ 0x32, "Object Read (Logged in as Object) / Object Write (Supervisor)" ],
3099         [ 0x33, "Object Read (Supervisor) / Object Write (Supervisor)" ],
3100         [ 0x34, "Object Read (Operating System Only) / Object Write (Supervisor)" ],
3101         [ 0x40, "Object Read (Anyone) / Object Write (Operating System Only)" ],
3102         [ 0x41, "Object Read (Logged in) / Object Write (Operating System Only)" ],
3103         [ 0x42, "Object Read (Logged in as Object) / Object Write (Operating System Only)" ],
3104         [ 0x43, "Object Read (Supervisor) / Object Write (Operating System Only)" ],
3105         [ 0x44, "Object Read (Operating System Only) / Object Write (Operating System Only)" ],
3106 ])
3107 #
3108 # XXX - should this use the "server_vals[]" value_string array from
3109 # "packet-ipx.c"?
3110 #
3111 # XXX - should this list be merged with that list?  There are some
3112 # oddities, e.g. this list has 0x03f5 for "Microsoft SQL Server", but
3113 # the list from "packet-ipx.c" has 0xf503 for that - is that just
3114 # byte-order confusion?
3115 #
3116 ObjectType                      = val_string16("object_type", "Object Type", [
3117         [ 0x0000,       "Unknown" ],
3118         [ 0x0001,       "User" ],
3119         [ 0x0002,       "User group" ],
3120         [ 0x0003,       "Print queue" ],
3121         [ 0x0004,       "NetWare file server" ],
3122         [ 0x0005,       "Job server" ],
3123         [ 0x0006,       "Gateway" ],
3124         [ 0x0007,       "Print server" ],
3125         [ 0x0008,       "Archive queue" ],
3126         [ 0x0009,       "Archive server" ],
3127         [ 0x000a,       "Job queue" ],
3128         [ 0x000b,       "Administration" ],
3129         [ 0x0021,       "NAS SNA gateway" ],
3130         [ 0x0026,       "Remote bridge server" ],
3131         [ 0x0027,       "TCP/IP gateway" ],
3132         [ 0x0047,       "Novell Print Server" ],
3133         [ 0x004b,       "Btrieve Server" ],
3134         [ 0x004c,       "NetWare SQL Server" ],
3135         [ 0x0064,       "ARCserve" ],
3136         [ 0x0066,       "ARCserve 3.0" ],
3137         [ 0x0076,       "NetWare SQL" ],
3138         [ 0x00a0,       "Gupta SQL Base Server" ],
3139         [ 0x00a1,       "Powerchute" ],
3140         [ 0x0107,       "NetWare Remote Console" ],
3141         [ 0x01cb,       "Shiva NetModem/E" ],
3142         [ 0x01cc,       "Shiva LanRover/E" ],
3143         [ 0x01cd,       "Shiva LanRover/T" ],
3144         [ 0x01d8,       "Castelle FAXPress Server" ],
3145         [ 0x01da,       "Castelle Print Server" ],
3146         [ 0x01dc,       "Castelle Fax Server" ],
3147         [ 0x0200,       "Novell SQL Server" ],
3148         [ 0x023a,       "NetWare Lanalyzer Agent" ],
3149         [ 0x023c,       "DOS Target Service Agent" ],
3150         [ 0x023f,       "NetWare Server Target Service Agent" ],
3151         [ 0x024f,       "Appletalk Remote Access Service" ],
3152         [ 0x0263,       "NetWare Management Agent" ],
3153         [ 0x0264,       "Global MHS" ],
3154         [ 0x0265,       "SNMP" ],
3155         [ 0x026a,       "NetWare Management/NMS Console" ],
3156         [ 0x026b,       "NetWare Time Synchronization" ],
3157         [ 0x0273,       "Nest Device" ],
3158         [ 0x0274,       "GroupWise Message Multiple Servers" ],
3159         [ 0x0278,       "NDS Replica Server" ],
3160         [ 0x0282,       "NDPS Service Registry Service" ],
3161         [ 0x028a,       "MPR/IPX Address Mapping Gateway" ],
3162         [ 0x028b,       "ManageWise" ],
3163         [ 0x0293,       "NetWare 6" ],
3164         [ 0x030c,       "HP JetDirect" ],
3165         [ 0x0328,       "Watcom SQL Server" ],
3166         [ 0x0355,       "Backup Exec" ],
3167         [ 0x039b,       "Lotus Notes" ],
3168         [ 0x03e1,       "Univel Server" ],
3169         [ 0x03f5,       "Microsoft SQL Server" ],
3170         [ 0x055e,       "Lexmark Print Server" ],
3171         [ 0x0640,       "Microsoft Gateway Services for NetWare" ],
3172         [ 0x064e,       "Microsoft Internet Information Server" ],
3173         [ 0x077b,       "Advantage Database Server" ],
3174         [ 0x07a7,       "Backup Exec Job Queue" ],
3175         [ 0x07a8,       "Backup Exec Job Manager" ],
3176         [ 0x07a9,       "Backup Exec Job Service" ],
3177         [ 0x5555,       "Site Lock" ],
3178         [ 0x8202,       "NDPS Broker" ],
3179 ])
3180 OCRetFlags                      = val_string8("o_c_ret_flags", "Open Create Return Flags", [
3181         [ 0x00, "No CallBack has been registered (No Op-Lock)" ],
3182         [ 0x01, "Request has been registered for CallBack (Op-Lock)" ],
3183 ])
3184 OldestDeletedFileAgeInTicks     = uint32("oldest_deleted_file_age_in_ticks", "Oldest Deleted File Age in Ticks")
3185 OldFileName                     = bytes("old_file_name", "Old File Name", 15)
3186 OldFileSize                     = uint32("old_file_size", "Old File Size")
3187 OpenCount                       = uint16("open_count", "Open Count")
3188 OpenCreateAction                = bitfield8("open_create_action", "Open Create Action", [
3189         bf_boolean8(0x01, "open_create_action_opened", "Opened"),
3190         bf_boolean8(0x02, "open_create_action_created", "Created"),
3191         bf_boolean8(0x04, "open_create_action_replaced", "Replaced"),
3192         bf_boolean8(0x08, "open_create_action_compressed", "Compressed"),
3193         bf_boolean8(0x80, "open_create_action_read_only", "Read Only"),
3194 ])
3195 OpenCreateMode                  = bitfield8("open_create_mode", "Open Create Mode", [
3196         bf_boolean8(0x01, "open_create_mode_open", "Open existing file (file must exist)"),
3197         bf_boolean8(0x02, "open_create_mode_replace", "Replace existing file"),
3198         bf_boolean8(0x08, "open_create_mode_create", "Create new file or subdirectory (file or subdirectory cannot exist)"),
3199     bf_boolean8(0x20, "open_create_mode_64bit", "Open 64-bit Access"),
3200     bf_boolean8(0x40, "open_create_mode_ro", "Open with Read Only Access"),
3201         bf_boolean8(0x80, "open_create_mode_oplock", "Open Callback (Op-Lock)"),
3202 ])
3203 OpenForReadCount                = uint16("open_for_read_count", "Open For Read Count")
3204 OpenForWriteCount               = uint16("open_for_write_count", "Open For Write Count")
3205 OpenRights                      = bitfield8("open_rights", "Open Rights", [
3206         bf_boolean8(0x01, "open_rights_read_only", "Read Only"),
3207         bf_boolean8(0x02, "open_rights_write_only", "Write Only"),
3208         bf_boolean8(0x04, "open_rights_deny_read", "Deny Read"),
3209         bf_boolean8(0x08, "open_rights_deny_write", "Deny Write"),
3210         bf_boolean8(0x10, "open_rights_compat", "Compatibility"),
3211         bf_boolean8(0x40, "open_rights_write_thru", "File Write Through"),
3212 ])
3213 OptionNumber                    = uint8("option_number", "Option Number")
3214 originalSize            = uint32("original_size", "Original Size")
3215 OSLanguageID                    = uint8("os_language_id", "OS Language ID")
3216 OSMajorVersion                  = uint8("os_major_version", "OS Major Version")
3217 OSMinorVersion                  = uint8("os_minor_version", "OS Minor Version")
3218 OSRevision                      = uint8("os_revision", "OS Revision")
3219 OtherFileForkSize               = uint32("other_file_fork_size", "Other File Fork Size")
3220 OtherFileForkFAT                = uint32("other_file_fork_fat", "Other File Fork FAT Entry")
3221 OutgoingPacketDiscardedNoTurboBuffer = uint16("outgoing_packet_discarded_no_turbo_buffer", "Outgoing Packet Discarded No Turbo Buffer")
3222
3223 PacketsDiscardedByHopCount      = uint16("packets_discarded_by_hop_count", "Packets Discarded By Hop Count")
3224 PacketsDiscardedUnknownNet      = uint16("packets_discarded_unknown_net", "Packets Discarded Unknown Net")
3225 PacketsFromInvalidConnection    = uint16("packets_from_invalid_connection", "Packets From Invalid Connection")
3226 PacketsReceivedDuringProcessing = uint16("packets_received_during_processing", "Packets Received During Processing")
3227 PacketsWithBadRequestType       = uint16("packets_with_bad_request_type", "Packets With Bad Request Type")
3228 PacketsWithBadSequenceNumber    = uint16("packets_with_bad_sequence_number", "Packets With Bad Sequence Number")
3229 PageTableOwnerFlag              = uint32("page_table_owner_flag", "Page Table Owner")
3230 ParentID                        = uint32("parent_id", "Parent ID")
3231 ParentID.Display("BASE_HEX")
3232 ParentBaseID                    = uint32("parent_base_id", "Parent Base ID")
3233 ParentBaseID.Display("BASE_HEX")
3234 ParentDirectoryBase             = uint32("parent_directory_base", "Parent Directory Base")
3235 ParentDOSDirectoryBase          = uint32("parent_dos_directory_base", "Parent DOS Directory Base")
3236 ParentObjectNumber              = uint32("parent_object_number", "Parent Object Number")
3237 ParentObjectNumber.Display("BASE_HEX")
3238 Password                        = nstring8("password", "Password")
3239 PathBase                        = uint8("path_base", "Path Base")
3240 PathComponentCount              = uint16("path_component_count", "Path Component Count")
3241 PathComponentSize               = uint16("path_component_size", "Path Component Size")
3242 PathCookieFlags                 = val_string16("path_cookie_flags", "Path Cookie Flags", [
3243         [ 0x0000, "Last component is Not a File Name" ],
3244         [ 0x0001, "Last component is a File Name" ],
3245 ])
3246 PathCount                       = uint8("path_count", "Path Count")
3247 Path                            = nstring8("path", "Path")
3248 Path16              = nstring16("path16", "Path")
3249 PathAndName                     = stringz("path_and_name", "Path and Name")
3250 PendingIOCommands               = uint16("pending_io_commands", "Pending IO Commands")
3251 PhysicalDiskNumber              = uint8("physical_disk_number", "Physical Disk Number")
3252 PhysicalDriveCount              = uint8("physical_drive_count", "Physical Drive Count")
3253 PhysicalLockThreshold           = uint8("physical_lock_threshold", "Physical Lock Threshold")
3254 PingVersion                     = uint16("ping_version", "Ping Version")
3255 PoolName            = stringz("pool_name", "Pool Name")
3256 PositiveAcknowledgesSent        = uint16("positive_acknowledges_sent", "Positive Acknowledges Sent")
3257 PreCompressedSectors            = uint32("pre_compressed_sectors", "Precompressed Sectors")
3258 PreviousRecord                  = uint32("previous_record", "Previous Record")
3259 PrimaryEntry                    = uint32("primary_entry", "Primary Entry")
3260 PrintFlags                      = bitfield8("print_flags", "Print Flags", [
3261         bf_boolean8(0x08, "print_flags_ff", "Suppress Form Feeds"),
3262     bf_boolean8(0x10, "print_flags_cr", "Create"),
3263         bf_boolean8(0x20, "print_flags_del_spool", "Delete Spool File after Printing"),
3264         bf_boolean8(0x40, "print_flags_exp_tabs", "Expand Tabs in the File"),
3265         bf_boolean8(0x80, "print_flags_banner", "Print Banner Page"),
3266 ])
3267 PrinterHalted                   = val_string8("printer_halted", "Printer Halted", [
3268         [ 0x00, "Printer is not Halted" ],
3269         [ 0xff, "Printer is Halted" ],
3270 ])
3271 PrinterOffLine                  = val_string8( "printer_offline", "Printer Off-Line", [
3272         [ 0x00, "Printer is On-Line" ],
3273         [ 0xff, "Printer is Off-Line" ],
3274 ])
3275 PrintServerVersion              = uint8("print_server_version", "Print Server Version")
3276 Priority                        = uint32("priority", "Priority")
3277 Privileges                      = uint32("privileges", "Login Privileges")
3278 ProcessorType                   = val_string8("processor_type", "Processor Type", [
3279         [ 0x00, "Motorola 68000" ],
3280         [ 0x01, "Intel 8088 or 8086" ],
3281         [ 0x02, "Intel 80286" ],
3282 ])
3283 ProDOSInfo                      = bytes("pro_dos_info", "Pro DOS Info", 6)
3284 ProductMajorVersion             = uint16("product_major_version", "Product Major Version")
3285 ProductMinorVersion             = uint16("product_minor_version", "Product Minor Version")
3286 ProductRevisionVersion          = uint8("product_revision_version", "Product Revision Version")
3287 projectedCompSize               = uint32("projected_comp_size", "Projected Compression Size")
3288 PropertyHasMoreSegments         = val_string8("property_has_more_segments",
3289         "Property Has More Segments", [
3290         [ 0x00, "Is last segment" ],
3291         [ 0xff, "More segments are available" ],
3292 ])
3293 PropertyName                    = nstring8("property_name", "Property Name")
3294 PropertyName16                  = fw_string("property_name_16", "Property Name", 16)
3295 PropertyData                    = bytes("property_data", "Property Data", 128)
3296 PropertySegment                 = uint8("property_segment", "Property Segment")
3297 PropertyType                    = val_string8("property_type", "Property Type", [
3298         [ 0x00, "Display Static property" ],
3299         [ 0x01, "Display Dynamic property" ],
3300         [ 0x02, "Set Static property" ],
3301         [ 0x03, "Set Dynamic property" ],
3302 ])
3303 PropertyValue                   = fw_string("property_value", "Property Value", 128)
3304 ProposedMaxSize                 = uint16("proposed_max_size", "Proposed Max Size")
3305 protocolFlags                   = uint32("protocol_flags", "Protocol Flags")
3306 protocolFlags.Display("BASE_HEX")
3307 PurgeableBlocks                 = uint32("purgeable_blocks", "Purgeable Blocks")
3308 PurgeCcode                      = uint32("purge_c_code", "Purge Completion Code")
3309 PurgeCount                      = uint32("purge_count", "Purge Count")
3310 PurgeFlags                      = val_string16("purge_flags", "Purge Flags", [
3311         [ 0x0000, "Do not Purge All" ],
3312         [ 0x0001, "Purge All" ],
3313     [ 0xffff, "Do not Purge All" ],
3314 ])
3315 PurgeList                       = uint32("purge_list", "Purge List")
3316 PhysicalDiskChannel             = uint8("physical_disk_channel", "Physical Disk Channel")
3317 PhysicalDriveType               = val_string8("physical_drive_type", "Physical Drive Type", [
3318         [ 0x01, "XT" ],
3319         [ 0x02, "AT" ],
3320         [ 0x03, "SCSI" ],
3321         [ 0x04, "Disk Coprocessor" ],
3322         [ 0x05, "PS/2 with MFM Controller" ],
3323         [ 0x06, "PS/2 with ESDI Controller" ],
3324         [ 0x07, "Convergent Technology SBIC" ],
3325 ])
3326 PhysicalReadErrors              = uint16("physical_read_errors", "Physical Read Errors")
3327 PhysicalReadRequests            = uint32("physical_read_requests", "Physical Read Requests")
3328 PhysicalWriteErrors             = uint16("physical_write_errors", "Physical Write Errors")
3329 PhysicalWriteRequests           = uint32("physical_write_requests", "Physical Write Requests")
3330 PrintToFileFlag                 = boolean8("print_to_file_flag", "Print to File Flag")
3331
3332 QueueID                         = uint32("queue_id", "Queue ID")
3333 QueueID.Display("BASE_HEX")
3334 QueueName                       = nstring8("queue_name", "Queue Name")
3335 QueueStartPosition              = uint32("queue_start_position", "Queue Start Position")
3336 QueueStatus                     = bitfield8("queue_status", "Queue Status", [
3337         bf_boolean8(0x01, "queue_status_new_jobs", "Operator does not want to add jobs to the queue"),
3338         bf_boolean8(0x02, "queue_status_pserver", "Operator does not want additional servers attaching"),
3339         bf_boolean8(0x04, "queue_status_svc_jobs", "Operator does not want servers to service jobs"),
3340 ])
3341 QueueType                       = uint16("queue_type", "Queue Type")
3342 QueueingVersion                 = uint8("qms_version", "QMS Version")
3343
3344 ReadBeyondWrite                 = uint16("read_beyond_write", "Read Beyond Write")
3345 RecordLockCount                 = uint16("rec_lock_count", "Record Lock Count")
3346 RecordStart                     = uint32("record_start", "Record Start")
3347 RecordEnd                       = uint32("record_end", "Record End")
3348 RecordInUseFlag                 = val_string16("record_in_use", "Record in Use", [
3349         [ 0x0000, "Record In Use" ],
3350         [ 0xffff, "Record Not In Use" ],
3351 ])
3352 RedirectedPrinter               = uint8( "redirected_printer", "Redirected Printer" )
3353 ReferenceCount                  = uint32("reference_count", "Reference Count")
3354 RelationsCount                  = uint16("relations_count", "Relations Count")
3355 ReMirrorCurrentOffset           = uint32("re_mirror_current_offset", "ReMirror Current Offset")
3356 ReMirrorDriveNumber             = uint8("re_mirror_drive_number", "ReMirror Drive Number")
3357 RemoteMaxPacketSize             = uint32("remote_max_packet_size", "Remote Max Packet Size")
3358 RemoteTargetID                  = uint32("remote_target_id", "Remote Target ID")
3359 RemoteTargetID.Display("BASE_HEX")
3360 RemovableFlag                   = uint16("removable_flag", "Removable Flag")
3361 RemoveOpenRights                = bitfield8("remove_open_rights", "Remove Open Rights", [
3362         bf_boolean8(0x01, "remove_open_rights_ro", "Read Only"),
3363         bf_boolean8(0x02, "remove_open_rights_wo", "Write Only"),
3364         bf_boolean8(0x04, "remove_open_rights_dr", "Deny Read"),
3365         bf_boolean8(0x08, "remove_open_rights_dw", "Deny Write"),
3366         bf_boolean8(0x10, "remove_open_rights_comp", "Compatibility"),
3367         bf_boolean8(0x40, "remove_open_rights_write_thru", "Write Through"),
3368 ])
3369 RenameFlag                      = bitfield8("rename_flag", "Rename Flag", [
3370         bf_boolean8(0x01, "rename_flag_ren", "Rename to Myself allows file to be renamed to it's original name"),
3371         bf_boolean8(0x02, "rename_flag_comp", "Compatability allows files that are marked read only to be opened with read/write access"),
3372         bf_boolean8(0x04, "rename_flag_no", "Name Only renames only the specified name space entry name"),
3373 ])
3374 RepliesCancelled                = uint16("replies_cancelled", "Replies Cancelled")
3375 ReplyBuffer                     = nstring8("reply_buffer", "Reply Buffer")
3376 ReplyBufferSize                 = uint32("reply_buffer_size", "Reply Buffer Size")
3377 ReplyQueueJobNumbers            = uint32("reply_queue_job_numbers", "Reply Queue Job Numbers")
3378 RequestBitMap                   = bitfield16("request_bit_map", "Request Bit Map", [
3379         bf_boolean16(0x0001, "request_bit_map_ret_afp_ent", "AFP Entry ID"),
3380         bf_boolean16(0x0002, "request_bit_map_ret_data_fork", "Data Fork Length"),
3381         bf_boolean16(0x0004, "request_bit_map_ret_res_fork", "Resource Fork Length"),
3382         bf_boolean16(0x0008, "request_bit_map_ret_num_off", "Number of Offspring"),
3383         bf_boolean16(0x0010, "request_bit_map_ret_owner", "Owner ID"),
3384         bf_boolean16(0x0020, "request_bit_map_ret_short", "Short Name"),
3385         bf_boolean16(0x0040, "request_bit_map_ret_acc_priv", "Access Privileges"),
3386         bf_boolean16(0x0100, "request_bit_map_ratt", "Return Attributes"),
3387         bf_boolean16(0x0200, "request_bit_map_ret_afp_parent", "AFP Parent Entry ID"),
3388         bf_boolean16(0x0400, "request_bit_map_ret_cr_date", "Creation Date"),
3389         bf_boolean16(0x0800, "request_bit_map_ret_acc_date", "Access Date"),
3390         bf_boolean16(0x1000, "request_bit_map_ret_mod_date", "Modify Date&Time"),
3391         bf_boolean16(0x2000, "request_bit_map_ret_bak_date", "Backup Date&Time"),
3392         bf_boolean16(0x4000, "request_bit_map_ret_finder", "Finder Info"),
3393         bf_boolean16(0x8000, "request_bit_map_ret_long_nm", "Long Name"),
3394 ])
3395 ResourceForkLen                 = uint32("resource_fork_len", "Resource Fork Len")
3396 RequestCode                     = val_string8("request_code", "Request Code", [
3397         [ 0x00, "Change Logged in to Temporary Authenticated" ],
3398         [ 0x01, "Change Temporary Authenticated to Logged in" ],
3399 ])
3400 RequestData                     = nstring8("request_data", "Request Data")
3401 RequestsReprocessed = uint16("requests_reprocessed", "Requests Reprocessed")
3402 Reserved                        = uint8( "reserved", "Reserved" )
3403 Reserved2                       = bytes("reserved2", "Reserved", 2)
3404 Reserved3                       = bytes("reserved3", "Reserved", 3)
3405 Reserved4                       = bytes("reserved4", "Reserved", 4)
3406 Reserved5                       = bytes("reserved5", "Reserved", 5)
3407 Reserved6           = bytes("reserved6", "Reserved", 6)
3408 Reserved8                       = bytes("reserved8", "Reserved", 8)
3409 Reserved10          = bytes("reserved10", "Reserved", 10)
3410 Reserved12                      = bytes("reserved12", "Reserved", 12)
3411 Reserved16                      = bytes("reserved16", "Reserved", 16)
3412 Reserved20                      = bytes("reserved20", "Reserved", 20)
3413 Reserved28                      = bytes("reserved28", "Reserved", 28)
3414 Reserved36                      = bytes("reserved36", "Reserved", 36)
3415 Reserved44                      = bytes("reserved44", "Reserved", 44)
3416 Reserved48                      = bytes("reserved48", "Reserved", 48)
3417 Reserved50                      = bytes("reserved50", "Reserved", 50)
3418 Reserved56                      = bytes("reserved56", "Reserved", 56)
3419 Reserved64                      = bytes("reserved64", "Reserved", 64)
3420 Reserved120                     = bytes("reserved120", "Reserved", 120)
3421 ReservedOrDirectoryNumber       = uint32("reserved_or_directory_number", "Reserved or Directory Number (see EAFlags)")
3422 ResourceCount                   = uint32("resource_count", "Resource Count")
3423 ResourceForkSize                = uint32("resource_fork_size", "Resource Fork Size")
3424 ResourceName                    = stringz("resource_name", "Resource Name")
3425 ResourceSignature               = fw_string("resource_sig", "Resource Signature", 4)
3426 RestoreTime                     = uint32("restore_time", "Restore Time")
3427 Restriction                     = uint32("restriction", "Disk Space Restriction")
3428 RestrictionsEnforced            = val_string8("restrictions_enforced", "Disk Restrictions Enforce Flag", [
3429         [ 0x00, "Enforced" ],
3430         [ 0xff, "Not Enforced" ],
3431 ])
3432 ReturnInfoCount                 = uint32("return_info_count", "Return Information Count")
3433 ReturnInfoMask                  = bitfield16("ret_info_mask", "Return Information", [
3434     bf_boolean16(0x0001, "ret_info_mask_fname", "Return File Name Information"),
3435         bf_boolean16(0x0002, "ret_info_mask_alloc", "Return Allocation Space Information"),
3436         bf_boolean16(0x0004, "ret_info_mask_attr", "Return Attribute Information"),
3437         bf_boolean16(0x0008, "ret_info_mask_size", "Return Size Information"),
3438         bf_boolean16(0x0010, "ret_info_mask_tspace", "Return Total Space Information"),
3439         bf_boolean16(0x0020, "ret_info_mask_eattr", "Return Extended Attributes Information"),
3440         bf_boolean16(0x0040, "ret_info_mask_arch", "Return Archive Information"),
3441         bf_boolean16(0x0080, "ret_info_mask_mod", "Return Modify Information"),
3442     bf_boolean16(0x0100, "ret_info_mask_create", "Return Creation Information"),
3443         bf_boolean16(0x0200, "ret_info_mask_ns", "Return Name Space Information"),
3444         bf_boolean16(0x0400, "ret_info_mask_dir", "Return Directory Information"),
3445         bf_boolean16(0x0800, "ret_info_mask_rights", "Return Rights Information"),
3446         bf_boolean16(0x1000, "ret_info_mask_id", "Return ID Information"),
3447         bf_boolean16(0x2000, "ret_info_mask_ns_attr", "Return Name Space Attributes Information"),
3448         bf_boolean16(0x4000, "ret_info_mask_actual", "Return Actual Information"),
3449         bf_boolean16(0x8000, "ret_info_mask_logical", "Return Logical Information"),
3450 ])
3451 ReturnedListCount               = uint32("returned_list_count", "Returned List Count")
3452 Revision                        = uint32("revision", "Revision")
3453 RevisionNumber                  = uint8("revision_number", "Revision")
3454 RevQueryFlag                    = val_string8("rev_query_flag", "Revoke Rights Query Flag", [
3455         [ 0x00, "Do not query the locks engine for access rights" ],
3456         [ 0x01, "Query the locks engine and return the access rights" ],
3457 ])
3458 RightsGrantMask                 = bitfield8("rights_grant_mask", "Grant Rights", [
3459         bf_boolean8(0x01, "rights_grant_mask_read", "Read"),
3460         bf_boolean8(0x02, "rights_grant_mask_write", "Write"),
3461         bf_boolean8(0x04, "rights_grant_mask_open", "Open"),
3462         bf_boolean8(0x08, "rights_grant_mask_create", "Create"),
3463         bf_boolean8(0x10, "rights_grant_mask_del", "Delete"),
3464         bf_boolean8(0x20, "rights_grant_mask_parent", "Parental"),
3465         bf_boolean8(0x40, "rights_grant_mask_search", "Search"),
3466         bf_boolean8(0x80, "rights_grant_mask_mod", "Modify"),
3467 ])
3468 RightsRevokeMask                = bitfield8("rights_revoke_mask", "Revoke Rights", [
3469         bf_boolean8(0x01, "rights_revoke_mask_read", "Read"),
3470         bf_boolean8(0x02, "rights_revoke_mask_write", "Write"),
3471         bf_boolean8(0x04, "rights_revoke_mask_open", "Open"),
3472         bf_boolean8(0x08, "rights_revoke_mask_create", "Create"),
3473         bf_boolean8(0x10, "rights_revoke_mask_del", "Delete"),
3474         bf_boolean8(0x20, "rights_revoke_mask_parent", "Parental"),
3475         bf_boolean8(0x40, "rights_revoke_mask_search", "Search"),
3476         bf_boolean8(0x80, "rights_revoke_mask_mod", "Modify"),
3477 ])
3478 RIPSocketNumber                 = uint16("rip_socket_num", "RIP Socket Number")
3479 RIPSocketNumber.Display("BASE_HEX")
3480 RouterDownFlag                  = boolean8("router_dn_flag", "Router Down Flag")
3481 RPCccode                        = val_string16("rpc_c_code", "RPC Completion Code", [
3482         [ 0x0000, "Successful" ],
3483 ])
3484 RTagNumber                      = uint32("r_tag_num", "Resource Tag Number")
3485 RTagNumber.Display("BASE_HEX")
3486 RpyNearestSrvFlag               = boolean8("rpy_nearest_srv_flag", "Reply to Nearest Server Flag")
3487
3488 SalvageableFileEntryNumber      = uint32("salvageable_file_entry_number", "Salvageable File Entry Number")
3489 SalvageableFileEntryNumber.Display("BASE_HEX")
3490 SAPSocketNumber                 = uint16("sap_socket_number", "SAP Socket Number")
3491 SAPSocketNumber.Display("BASE_HEX")
3492 ScanItems                       = uint32("scan_items", "Number of Items returned from Scan")
3493 SearchAttributes                = bitfield8("sattr", "Search Attributes", [
3494         bf_boolean8(0x01, "sattr_ronly", "Read-Only Files Allowed"),
3495         bf_boolean8(0x02, "sattr_hid", "Hidden Files Allowed"),
3496         bf_boolean8(0x04, "sattr_sys", "System Files Allowed"),
3497         bf_boolean8(0x08, "sattr_exonly", "Execute-Only Files Allowed"),
3498         bf_boolean8(0x10, "sattr_sub", "Subdirectories Only"),
3499         bf_boolean8(0x20, "sattr_archive", "Archive"),
3500         bf_boolean8(0x40, "sattr_execute_confirm", "Execute Confirm"),
3501         bf_boolean8(0x80, "sattr_shareable", "Shareable"),
3502 ])
3503 SearchAttributesLow             = bitfield16("search_att_low", "Search Attributes", [
3504         bf_boolean16(0x0001, "search_att_read_only", "Read-Only"),
3505         bf_boolean16(0x0002, "search_att_hidden", "Hidden Files Allowed"),
3506         bf_boolean16(0x0004, "search_att_system", "System"),
3507         bf_boolean16(0x0008, "search_att_execute_only", "Execute-Only"),
3508         bf_boolean16(0x0010, "search_att_sub", "Subdirectories Only"),
3509         bf_boolean16(0x0020, "search_att_archive", "Archive"),
3510         bf_boolean16(0x0040, "search_att_execute_confirm", "Execute Confirm"),
3511         bf_boolean16(0x0080, "search_att_shareable", "Shareable"),
3512         bf_boolean16(0x8000, "search_attr_all_files", "All Files and Directories"),
3513 ])
3514 SearchBitMap                            = bitfield8("search_bit_map", "Search Bit Map", [
3515         bf_boolean8(0x01, "search_bit_map_hidden", "Hidden"),
3516         bf_boolean8(0x02, "search_bit_map_sys", "System"),
3517         bf_boolean8(0x04, "search_bit_map_sub", "Subdirectory"),
3518         bf_boolean8(0x08, "search_bit_map_files", "Files"),
3519 ])
3520 SearchConnNumber                        = uint32("search_conn_number", "Search Connection Number")
3521 SearchInstance                          = uint32("search_instance", "Search Instance")
3522 SearchNumber                = uint32("search_number", "Search Number")
3523 SearchPattern                           = nstring8("search_pattern", "Search Pattern")
3524 SearchPattern16                         = nstring16("search_pattern_16", "Search Pattern")
3525 SearchSequence                          = bytes("search_sequence", "Search Sequence", 9)
3526 SearchSequenceWord          = uint16("search_sequence_word", "Search Sequence", BE)
3527 Second                                      = uint8("s_second", "Seconds")
3528 SecondsRelativeToTheYear2000            = uint32("sec_rel_to_y2k", "Seconds Relative to the Year 2000")
3529 SecretStoreVerb                         = val_string8("ss_verb", "Secret Store Verb",[
3530         [ 0x00, "Query Server" ],
3531         [ 0x01, "Read App Secrets" ],
3532         [ 0x02, "Write App Secrets" ],
3533         [ 0x03, "Add Secret ID" ],
3534         [ 0x04, "Remove Secret ID" ],
3535         [ 0x05, "Remove SecretStore" ],
3536         [ 0x06, "Enumerate Secret IDs" ],
3537         [ 0x07, "Unlock Store" ],
3538         [ 0x08, "Set Master Password" ],
3539         [ 0x09, "Get Service Information" ],
3540 ])
3541 SecurityEquivalentList                  = fw_string("security_equiv_list", "Security Equivalent List", 128)
3542 SecurityFlag                            = bitfield8("security_flag", "Security Flag", [
3543         bf_boolean8(0x01, "checksuming", "Checksumming"),
3544         bf_boolean8(0x02, "signature", "Signature"),
3545         bf_boolean8(0x04, "complete_signatures", "Complete Signatures"),
3546         bf_boolean8(0x08, "encryption", "Encryption"),
3547         bf_boolean8(0x80, "large_internet_packets", "Large Internet Packets (LIP) Disabled"),
3548 ])
3549 SecurityRestrictionVersion              = uint8("security_restriction_version", "Security Restriction Version")
3550 SectorsPerBlock                         = uint8("sectors_per_block", "Sectors Per Block")
3551 SectorsPerCluster                       = uint16("sectors_per_cluster", "Sectors Per Cluster" )
3552 SectorsPerClusterLong                   = uint32("sectors_per_cluster_long", "Sectors Per Cluster" )
3553 SectorsPerTrack                         = uint8("sectors_per_track", "Sectors Per Track")
3554 SectorSize                              = uint32("sector_size", "Sector Size")
3555 SemaphoreHandle                         = uint32("semaphore_handle", "Semaphore Handle")
3556 SemaphoreName                           = nstring8("semaphore_name", "Semaphore Name")
3557 SemaphoreOpenCount                      = uint8("semaphore_open_count", "Semaphore Open Count")
3558 SemaphoreShareCount                     = uint8("semaphore_share_count", "Semaphore Share Count")
3559 SemaphoreTimeOut                        = uint16("semaphore_time_out", "Semaphore Time Out")
3560 SemaphoreValue                          = uint16("semaphore_value", "Semaphore Value")
3561 SendStatus                              = val_string8("send_status", "Send Status", [
3562         [ 0x00, "Successful" ],
3563         [ 0x01, "Illegal Station Number" ],
3564         [ 0x02, "Client Not Logged In" ],
3565         [ 0x03, "Client Not Accepting Messages" ],
3566         [ 0x04, "Client Already has a Message" ],
3567         [ 0x96, "No Alloc Space for the Message" ],
3568         [ 0xfd, "Bad Station Number" ],
3569         [ 0xff, "Failure" ],
3570 ])
3571 SequenceByte                    = uint8("sequence_byte", "Sequence")
3572 SequenceNumber                  = uint32("sequence_number", "Sequence Number")
3573 SequenceNumber.Display("BASE_HEX")
3574 ServerAddress                   = bytes("server_address", "Server Address", 12)
3575 ServerAppNumber                 = uint16("server_app_num", "Server App Number")
3576 ServerID                        = uint32("server_id_number", "Server ID", BE )
3577 ServerID.Display("BASE_HEX")
3578 ServerInfoFlags                 = val_string16("server_info_flags", "Server Information Flags", [
3579         [ 0x0000, "This server is not a member of a Cluster" ],
3580         [ 0x0001, "This server is a member of a Cluster" ],
3581 ])
3582 serverListFlags                 = uint32("server_list_flags", "Server List Flags")
3583 ServerName                      = fw_string("server_name", "Server Name", 48)
3584 serverName50                    = fw_string("server_name50", "Server Name", 50)
3585 ServerNameLen                   = nstring8("server_name_len", "Server Name")
3586 ServerNameStringz               = stringz("server_name_stringz", "Server Name")
3587 ServerNetworkAddress            = bytes("server_network_address", "Server Network Address", 10)
3588 ServerNode                      = bytes("server_node", "Server Node", 6)
3589 ServerSerialNumber              = uint32("server_serial_number", "Server Serial Number")
3590 ServerStation                   = uint8("server_station", "Server Station")
3591 ServerStationLong               = uint32("server_station_long", "Server Station")
3592 ServerStationList               = uint8("server_station_list", "Server Station List")
3593 ServerStatusRecord              = fw_string("server_status_record", "Server Status Record", 64)
3594 ServerTaskNumber                = uint8("server_task_number", "Server Task Number")
3595 ServerTaskNumberLong            = uint32("server_task_number_long", "Server Task Number")
3596 ServerType                      = uint16("server_type", "Server Type")
3597 ServerType.Display("BASE_HEX")
3598 ServerUtilization               = uint32("server_utilization", "Server Utilization")
3599 ServerUtilizationPercentage     = uint8("server_utilization_percentage", "Server Utilization Percentage")
3600 ServiceType                     = val_string16("Service_type", "Service Type", [
3601         [ 0x0000,       "Unknown" ],
3602         [ 0x0001,       "User" ],
3603         [ 0x0002,       "User group" ],
3604         [ 0x0003,       "Print queue" ],
3605         [ 0x0004,       "NetWare file server" ],
3606         [ 0x0005,       "Job server" ],
3607         [ 0x0006,       "Gateway" ],
3608         [ 0x0007,       "Print server" ],
3609         [ 0x0008,       "Archive queue" ],
3610         [ 0x0009,       "Archive server" ],
3611         [ 0x000a,       "Job queue" ],
3612         [ 0x000b,       "Administration" ],
3613         [ 0x0021,       "NAS SNA gateway" ],
3614         [ 0x0026,       "Remote bridge server" ],
3615         [ 0x0027,       "TCP/IP gateway" ],
3616 ])
3617 SetCmdCategory                  = val_string8("set_cmd_category", "Set Command Category", [
3618         [ 0x00, "Communications" ],
3619         [ 0x01, "Memory" ],
3620         [ 0x02, "File Cache" ],
3621         [ 0x03, "Directory Cache" ],
3622         [ 0x04, "File System" ],
3623         [ 0x05, "Locks" ],
3624         [ 0x06, "Transaction Tracking" ],
3625         [ 0x07, "Disk" ],
3626         [ 0x08, "Time" ],
3627         [ 0x09, "NCP" ],
3628         [ 0x0a, "Miscellaneous" ],
3629         [ 0x0b, "Error Handling" ],
3630         [ 0x0c, "Directory Services" ],
3631         [ 0x0d, "MultiProcessor" ],
3632         [ 0x0e, "Service Location Protocol" ],
3633         [ 0x0f, "Licensing Services" ],
3634 ])
3635 SetCmdFlags                             = bitfield8("set_cmd_flags", "Set Command Flags", [
3636         bf_boolean8(0x01, "cmd_flags_startup_only", "Startup.ncf Only"),
3637         bf_boolean8(0x02, "cmd_flags_hidden", "Hidden"),
3638         bf_boolean8(0x04, "cmd_flags_advanced", "Advanced"),
3639         bf_boolean8(0x08, "cmd_flags_later", "Restart Server Required to Take Effect"),
3640         bf_boolean8(0x80, "cmd_flags_secure", "Console Secured"),
3641 ])
3642 SetCmdName                      = stringz("set_cmd_name", "Set Command Name")
3643 SetCmdType                      = val_string8("set_cmd_type", "Set Command Type", [
3644         [ 0x00, "Numeric Value" ],
3645         [ 0x01, "Boolean Value" ],
3646         [ 0x02, "Ticks Value" ],
3647         [ 0x04, "Time Value" ],
3648         [ 0x05, "String Value" ],
3649         [ 0x06, "Trigger Value" ],
3650         [ 0x07, "Numeric Value" ],
3651 ])
3652 SetCmdValueNum                  = uint32("set_cmd_value_num", "Set Command Value")
3653 SetCmdValueString               = stringz("set_cmd_value_string", "Set Command Value")
3654 SetMask                         = bitfield32("set_mask", "Set Mask", [
3655                 bf_boolean32(0x00000001, "ncp_encoded_strings", "NCP Encoded Strings"),
3656                 bf_boolean32(0x00000002, "connection_code_page", "Connection Code Page"),
3657 ])
3658 SetParmName                     = stringz("set_parm_name", "Set Parameter Name")
3659 SFTErrorTable                   = bytes("sft_error_table", "SFT Error Table", 60)
3660 SFTSupportLevel                 = val_string8("sft_support_level", "SFT Support Level", [
3661         [ 0x01, "Server Offers Hot Disk Error Fixing" ],
3662         [ 0x02, "Server Offers Disk Mirroring and Transaction Tracking" ],
3663         [ 0x03, "Server Offers Physical Server Mirroring" ],
3664 ])
3665 ShareableLockCount              = uint16("shareable_lock_count", "Shareable Lock Count")
3666 SharedMemoryAddresses           = bytes("shared_memory_addresses", "Shared Memory Addresses", 10)
3667 ShortName                       = fw_string("short_name", "Short Name", 12)
3668 ShortStkName                    = fw_string("short_stack_name", "Short Stack Name", 16)
3669 SiblingCount                    = uint32("sibling_count", "Sibling Count")
3670 SixtyFourBitOffsetsSupportedFlag = val_string8("64_bit_flag", "64 Bit Support", [
3671     [ 0x00, "No support for 64 bit offsets" ],
3672     [ 0x01, "64 bit offsets supported" ],
3673 ])
3674 SMIDs                           = uint32("smids", "Storage Media ID's")
3675 SoftwareDescription             = fw_string("software_description", "Software Description", 65)
3676 SoftwareDriverType              = uint8("software_driver_type", "Software Driver Type")
3677 SoftwareMajorVersionNumber      = uint8("software_major_version_number", "Software Major Version Number")
3678 SoftwareMinorVersionNumber      = uint8("software_minor_version_number", "Software Minor Version Number")
3679 SourceDirHandle                 = uint8("source_dir_handle", "Source Directory Handle")
3680 sourceOriginateTime             = bytes("source_originate_time", "Source Originate Time", 8)
3681 sourceOriginateTime.Display("BASE_HEX")
3682 SourcePath                      = nstring8("source_path", "Source Path")
3683 SourcePathComponentCount        = uint8("source_component_count", "Source Path Component Count")
3684 sourceReturnTime                = bytes("source_return_time", "Source Return Time", 8)
3685 sourceReturnTime.Display("BASE_HEX")
3686 SpaceUsed                       = uint32("space_used", "Space Used")
3687 SpaceMigrated                   = uint32("space_migrated", "Space Migrated")
3688 SrcNameSpace                    = val_string8("src_name_space", "Source Name Space", [
3689         [ 0x00, "DOS Name Space" ],
3690         [ 0x01, "MAC Name Space" ],
3691         [ 0x02, "NFS Name Space" ],
3692         [ 0x04, "Long Name Space" ],
3693 ])
3694 SupModID                        = uint32("sup_mod_id", "Sup Mod ID")
3695 StackCount                      = uint32("stack_count", "Stack Count")
3696 StackFullNameStr                = nstring8("stack_full_name_str", "Stack Full Name")
3697 StackMajorVN                    = uint8("stack_major_vn", "Stack Major Version Number")
3698 StackMinorVN                    = uint8("stack_minor_vn", "Stack Minor Version Number")
3699 StackNumber                     = uint32("stack_number", "Stack Number")
3700 StartConnNumber                 = uint32("start_conn_num", "Starting Connection Number")
3701 StartingBlock                   = uint16("starting_block", "Starting Block")
3702 StartingNumber                  = uint32("starting_number", "Starting Number")
3703 StartingSearchNumber            = uint16("start_search_number", "Start Search Number")
3704 StartNumber                     = uint32("start_number", "Start Number")
3705 startNumberFlag                 = uint16("start_number_flag", "Start Number Flag")
3706 StartOffset64bit    = bytes("s_offset_64bit", "64bit Starting Offset", 64)
3707 StartVolumeNumber               = uint32("start_volume_number", "Starting Volume Number")
3708 StationList                     = uint32("station_list", "Station List")
3709 StationNumber                   = bytes("station_number", "Station Number", 3)
3710 StatMajorVersion                = uint8("stat_major_version", "Statistics Table Major Version")
3711 StatMinorVersion                = uint8("stat_minor_version", "Statistics Table Minor Version")
3712 Status                          = bitfield16("status", "Status", [
3713         bf_boolean16(0x0001, "user_info_logged_in", "Logged In"),
3714         bf_boolean16(0x0002, "user_info_being_abort", "Being Aborted"),
3715         bf_boolean16(0x0004, "user_info_audited", "Audited"),
3716         bf_boolean16(0x0008, "user_info_need_sec", "Needs Security Change"),
3717         bf_boolean16(0x0010, "user_info_mac_station", "MAC Station"),
3718         bf_boolean16(0x0020, "user_info_temp_authen", "Temporary Authenticated"),
3719         bf_boolean16(0x0040, "user_info_audit_conn", "Audit Connection Recorded"),
3720         bf_boolean16(0x0080, "user_info_dsaudit_conn", "DS Audit Connection Recorded"),
3721         bf_boolean16(0x0100, "user_info_logout", "Logout in Progress"),
3722         bf_boolean16(0x0200, "user_info_int_login", "Internal Login"),
3723         bf_boolean16(0x0400, "user_info_bindery", "Bindery Connection"),
3724 ])
3725 StatusFlagBits                  = bitfield32("status_flag_bits", "Status Flag", [
3726         bf_boolean32(0x00000001, "status_flag_bits_suballoc", "Sub Allocation"),
3727         bf_boolean32(0x00000002, "status_flag_bits_comp", "Compression"),
3728         bf_boolean32(0x00000004, "status_flag_bits_migrate", "Migration"),
3729         bf_boolean32(0x00000008, "status_flag_bits_audit", "Audit"),
3730         bf_boolean32(0x00000010, "status_flag_bits_ro", "Read Only"),
3731         bf_boolean32(0x00000020, "status_flag_bits_im_purge", "Immediate Purge"),
3732     bf_boolean32(0x00000040, "status_flag_bits_64bit", "64Bit File Offsets"),
3733     bf_boolean32(0x00000080, "status_flag_bits_utf8", "UTF8 NCP Strings"),
3734     bf_boolean32(0x80000000, "status_flag_bits_nss", "NSS Volume"),
3735 ])
3736 SubAllocClusters                = uint32("sub_alloc_clusters", "Sub Alloc Clusters")
3737 SubAllocFreeableClusters        = uint32("sub_alloc_freeable_clusters", "Sub Alloc Freeable Clusters")
3738 Subdirectory                    = uint32("sub_directory", "Subdirectory")
3739 Subdirectory.Display("BASE_HEX")
3740 SuggestedFileSize               = uint32("suggested_file_size", "Suggested File Size")
3741 SupportModuleID                 = uint32("support_module_id", "Support Module ID")
3742 SynchName                       = nstring8("synch_name", "Synch Name")
3743 SystemIntervalMarker            = uint32("system_interval_marker", "System Interval Marker")
3744
3745 TabSize                         = uint8( "tab_size", "Tab Size" )
3746 TargetClientList                = uint8("target_client_list", "Target Client List")
3747 TargetConnectionNumber          = uint16("target_connection_number", "Target Connection Number")
3748 TargetDirectoryBase             = uint32("target_directory_base", "Target Directory Base")
3749 TargetDirHandle                 = uint8("target_dir_handle", "Target Directory Handle")
3750 TargetEntryID                   = uint32("target_entry_id", "Target Entry ID")
3751 TargetEntryID.Display("BASE_HEX")
3752 TargetExecutionTime             = bytes("target_execution_time", "Target Execution Time", 6)
3753 TargetFileHandle                = bytes("target_file_handle", "Target File Handle", 6)
3754 TargetFileOffset                = uint32("target_file_offset", "Target File Offset")
3755 TargetMessage                   = nstring8("target_message", "Message")
3756 TargetPrinter                   = uint8( "target_ptr", "Target Printer" )
3757 targetReceiveTime               = bytes("target_receive_time", "Target Receive Time", 8)
3758 targetReceiveTime.Display("BASE_HEX")
3759 TargetServerIDNumber            = uint32("target_server_id_number", "Target Server ID Number", BE )
3760 TargetServerIDNumber.Display("BASE_HEX")
3761 targetTransmitTime              = bytes("target_transmit_time", "Target Transmit Time", 8)
3762 targetTransmitTime.Display("BASE_HEX")
3763 TaskNumByte                     = uint8("task_num_byte", "Task Number")
3764 TaskNumber                      = uint32("task_number", "Task Number")
3765 TaskNumberWord                  = uint16("task_number_word", "Task Number")
3766 TextJobDescription              = fw_string("text_job_description", "Text Job Description", 50)
3767 ThrashingCount                  = uint16("thrashing_count", "Thrashing Count")
3768 TimeoutLimit                    = uint16("timeout_limit", "Timeout Limit")
3769 TimesyncStatus                  = bitfield32("timesync_status_flags", "Timesync Status", [
3770         bf_boolean32(0x00000001, "timesync_status_sync", "Time is Synchronized"),
3771         bf_boolean32(0x00000002, "timesync_status_net_sync", "Time is Synchronized to the Network"),
3772     bf_boolean32(0x00000004, "timesync_status_active", "Time Synchronization is Active"),
3773         bf_boolean32(0x00000008, "timesync_status_external", "External Time Synchronization Active"),
3774         bf_val_str32(0x00000700, "timesync_status_server_type", "Time Server Type", [
3775                 [ 0x01, "Client Time Server" ],
3776                 [ 0x02, "Secondary Time Server" ],
3777                 [ 0x03, "Primary Time Server" ],
3778                 [ 0x04, "Reference Time Server" ],
3779                 [ 0x05, "Single Reference Time Server" ],
3780         ]),
3781         bf_boolean32(0x000f0000, "timesync_status_ext_sync", "External Clock Status"),
3782 ])
3783 TimeToNet                       = uint16("time_to_net", "Time To Net")
3784 TotalBlocks                     = uint32("total_blocks", "Total Blocks")
3785 TotalBlocksToDecompress         = uint32("total_blks_to_dcompress", "Total Blocks To Decompress")
3786 TotalBytesRead                  = bytes("user_info_ttl_bytes_rd", "Total Bytes Read", 6)
3787 TotalBytesWritten               = bytes("user_info_ttl_bytes_wrt", "Total Bytes Written", 6)
3788 TotalCacheWrites                = uint32("total_cache_writes", "Total Cache Writes")
3789 TotalChangedFATs                = uint32("total_changed_fats", "Total Changed FAT Entries")
3790 TotalCommonCnts                 = uint32("total_common_cnts", "Total Common Counts")
3791 TotalCntBlocks                  = uint32("total_cnt_blocks", "Total Count Blocks")
3792 TotalDataStreamDiskSpaceAlloc   = uint32("total_stream_size_struct_space_alloc", "Total Data Stream Disk Space Alloc")
3793 TotalDirectorySlots             = uint16("total_directory_slots", "Total Directory Slots")
3794 TotalDirectoryEntries           = uint32("total_dir_entries", "Total Directory Entries")
3795 TotalDynamicSpace               = uint32("total_dynamic_space", "Total Dynamic Space")
3796 TotalExtendedDirectoryExtants   = uint32("total_extended_directory_extants", "Total Extended Directory Extants")
3797 TotalFileServicePackets         = uint32("total_file_service_packets", "Total File Service Packets")
3798 TotalFilesOpened                = uint32("total_files_opened", "Total Files Opened")
3799 TotalLFSCounters                = uint32("total_lfs_counters", "Total LFS Counters")
3800 TotalOffspring                  = uint16("total_offspring", "Total Offspring")
3801 TotalOtherPackets               = uint32("total_other_packets", "Total Other Packets")
3802 TotalQueueJobs                  = uint32("total_queue_jobs", "Total Queue Jobs")
3803 TotalReadRequests               = uint32("total_read_requests", "Total Read Requests")
3804 TotalRequest                    = uint32("total_request", "Total Requests")
3805 TotalRequestPackets             = uint32("total_request_packets", "Total Request Packets")
3806 TotalRoutedPackets              = uint32("total_routed_packets", "Total Routed Packets")
3807 TotalRxPkts                     = uint32("total_rx_pkts", "Total Receive Packets")
3808 TotalServerMemory               = uint16("total_server_memory", "Total Server Memory", BE)
3809 TotalTransactionsBackedOut      = uint32("total_trans_backed_out", "Total Transactions Backed Out")
3810 TotalTransactionsPerformed      = uint32("total_trans_performed", "Total Transactions Performed")
3811 TotalTxPkts                     = uint32("total_tx_pkts", "Total Transmit Packets")
3812 TotalUnfilledBackoutRequests    = uint16("total_unfilled_backout_requests", "Total Unfilled Backout Requests")
3813 TotalVolumeClusters             = uint16("total_volume_clusters", "Total Volume Clusters")
3814 TotalWriteRequests              = uint32("total_write_requests", "Total Write Requests")
3815 TotalWriteTransactionsPerformed = uint32("total_write_trans_performed", "Total Write Transactions Performed")
3816 TrackOnFlag                     = boolean8("track_on_flag", "Track On Flag")
3817 TransactionDiskSpace            = uint16("transaction_disk_space", "Transaction Disk Space")
3818 TransactionFATAllocations       = uint32("transaction_fat_allocations", "Transaction FAT Allocations")
3819 TransactionFileSizeChanges      = uint32("transaction_file_size_changes", "Transaction File Size Changes")
3820 TransactionFilesTruncated       = uint32("transaction_files_truncated", "Transaction Files Truncated")
3821 TransactionNumber               = uint32("transaction_number", "Transaction Number")
3822 TransactionTrackingEnabled      = uint8("transaction_tracking_enabled", "Transaction Tracking Enabled")
3823 TransactionTrackingFlag         = uint16("tts_flag", "Transaction Tracking Flag")
3824 TransactionTrackingSupported    = uint8("transaction_tracking_supported", "Transaction Tracking Supported")
3825 TransactionVolumeNumber         = uint16("transaction_volume_number", "Transaction Volume Number")
3826 TransportType                   = val_string8("transport_type", "Communications Type", [
3827         [ 0x01, "Internet Packet Exchange (IPX)" ],
3828         [ 0x05, "User Datagram Protocol (UDP)" ],
3829         [ 0x06, "Transmission Control Protocol (TCP)" ],
3830 ])
3831 TreeLength                      = uint32("tree_length", "Tree Length")
3832 TreeName                        = nstring32("tree_name", "Tree Name")
3833 TreeName.NWUnicode()
3834 TrusteeAccessMask           = uint8("trustee_acc_mask", "Trustee Access Mask")
3835 TrusteeRights                   = bitfield16("trustee_rights_low", "Trustee Rights", [
3836         bf_boolean16(0x0001, "trustee_rights_read", "Read"),
3837         bf_boolean16(0x0002, "trustee_rights_write", "Write"),
3838         bf_boolean16(0x0004, "trustee_rights_open", "Open"),
3839         bf_boolean16(0x0008, "trustee_rights_create", "Create"),
3840         bf_boolean16(0x0010, "trustee_rights_del", "Delete"),
3841         bf_boolean16(0x0020, "trustee_rights_parent", "Parental"),
3842         bf_boolean16(0x0040, "trustee_rights_search", "Search"),
3843         bf_boolean16(0x0080, "trustee_rights_modify", "Modify"),
3844         bf_boolean16(0x0100, "trustee_rights_super", "Supervisor"),
3845 ])
3846 TTSLevel                        = uint8("tts_level", "TTS Level")
3847 TrusteeSetNumber                = uint8("trustee_set_number", "Trustee Set Number")
3848 TrusteeID                       = uint32("trustee_id_set", "Trustee ID")
3849 TrusteeID.Display("BASE_HEX")
3850 ttlCompBlks                     = uint32("ttl_comp_blks", "Total Compression Blocks")
3851 TtlDSDskSpaceAlloc              = uint32("ttl_ds_disk_space_alloc", "Total Streams Space Allocated")
3852 TtlEAs                          = uint32("ttl_eas", "Total EA's")
3853 TtlEAsDataSize                  = uint32("ttl_eas_data_size", "Total EA's Data Size")
3854 TtlEAsKeySize                   = uint32("ttl_eas_key_size", "Total EA's Key Size")
3855 ttlIntermediateBlks             = uint32("ttl_inter_blks", "Total Intermediate Blocks")
3856 TtlMigratedSize                 = uint32("ttl_migrated_size", "Total Migrated Size")
3857 TtlNumOfRTags                   = uint32("ttl_num_of_r_tags", "Total Number of Resource Tags")
3858 TtlNumOfSetCmds                 = uint32("ttl_num_of_set_cmds", "Total Number of Set Commands")
3859 TtlValuesLength                 = uint32("ttl_values_length", "Total Values Length")
3860 TtlWriteDataSize                = uint32("ttl_write_data_size", "Total Write Data Size")
3861 TurboUsedForFileService         = uint16("turbo_used_for_file_service", "Turbo Used For File Service")
3862
3863 UnclaimedPkts                   = uint32("un_claimed_packets", "Unclaimed Packets")
3864 UnCompressableDataStreamsCount  = uint32("un_compressable_data_streams_count", "Uncompressable Data Streams Count")
3865 Undefined8                      = bytes("undefined_8", "Undefined", 8)
3866 Undefined28                     = bytes("undefined_28", "Undefined", 28)
3867 UndefinedWord                   = uint16("undefined_word", "Undefined")
3868 UniqueID                        = uint8("unique_id", "Unique ID")
3869 UnknownByte                     = uint8("unknown_byte", "Unknown Byte")
3870 Unused                          = uint8("un_used", "Unused")
3871 UnusedBlocks                    = uint32("unused_blocks", "Unused Blocks")
3872 UnUsedDirectoryEntries          = uint32("un_used_directory_entries", "Unused Directory Entries")
3873 UnusedDiskBlocks                = uint32("unused_disk_blocks", "Unused Disk Blocks")
3874 UnUsedExtendedDirectoryExtants  = uint32("un_used_extended_directory_extants", "Unused Extended Directory Extants")
3875 UpdateDate                      = uint16("update_date", "Update Date")
3876 UpdateDate.NWDate()
3877 UpdateID                        = uint32("update_id", "Update ID", BE)
3878 UpdateID.Display("BASE_HEX")
3879 UpdateTime                      = uint16("update_time", "Update Time")
3880 UpdateTime.NWTime()
3881 UseCount                        = val_string16("user_info_use_count", "Use Count", [
3882         [ 0x0000, "Connection is not in use" ],
3883         [ 0x0001, "Connection is in use" ],
3884 ])
3885 UsedBlocks                      = uint32("used_blocks", "Used Blocks")
3886 UserID                          = uint32("user_id", "User ID", BE)
3887 UserID.Display("BASE_HEX")
3888 UserLoginAllowed                = val_string8("user_login_allowed", "Login Status", [
3889         [ 0x00, "Client Login Disabled" ],
3890         [ 0x01, "Client Login Enabled" ],
3891 ])
3892
3893 UserName                        = nstring8("user_name", "User Name")
3894 UserName16                      = fw_string("user_name_16", "User Name", 16)
3895 UserName48                      = fw_string("user_name_48", "User Name", 48)
3896 UserType                        = uint16("user_type", "User Type")
3897 UTCTimeInSeconds                = uint32("uts_time_in_seconds", "UTC Time in Seconds")
3898
3899 ValueAvailable                  = val_string8("value_available", "Value Available", [
3900         [ 0x00, "Has No Value" ],
3901         [ 0xff, "Has Value" ],
3902 ])
3903 VAPVersion                      = uint8("vap_version", "VAP Version")
3904 VariableBitMask                 = uint32("variable_bit_mask", "Variable Bit Mask")
3905 VariableBitsDefined             = uint16("variable_bits_defined", "Variable Bits Defined")
3906 VConsoleRevision                = uint8("vconsole_rev", "Console Revision")
3907 VConsoleVersion                 = uint8("vconsole_ver", "Console Version")
3908 Verb                            = uint32("verb", "Verb")
3909 VerbData                        = uint8("verb_data", "Verb Data")
3910 version                         = uint32("version", "Version")
3911 VersionNumber                   = uint8("version_number", "Version")
3912 VersionNumberLong       = uint32("version_num_long", "Version")
3913 VertLocation                    = uint16("vert_location", "Vertical Location")
3914 VirtualConsoleVersion           = uint8("virtual_console_version", "Virtual Console Version")
3915 VolumeID                        = uint32("volume_id", "Volume ID")
3916 VolumeID.Display("BASE_HEX")
3917 VolInfoReplyLen                 = uint16("vol_info_reply_len", "Volume Information Reply Length")
3918 VolumeCapabilities                      = bitfield32("volume_capabilities", "Volume Capabilities", [
3919         bf_boolean32(0x00000001, "vol_cap_user_space", "NetWare User Space Restrictions Supported"),
3920         bf_boolean32(0x00000002, "vol_cap_dir_quota", "NetWare Directory Quotas Supported"),
3921         bf_boolean32(0x00000004, "vol_cap_dfs", "DFS is Active on Volume"),
3922         bf_boolean32(0x00000008, "vol_cap_sal_purge", "NetWare Salvage and Purge Operations Supported"),
3923         bf_boolean32(0x00000010, "vol_cap_comp", "NetWare Compression Supported"),
3924         bf_boolean32(0x00000020, "vol_cap_cluster", "Volume is a Cluster Resource"),
3925     bf_boolean32(0x00000040, "vol_cap_nss_admin", "Volume is the NSS Admin Volume"),
3926     bf_boolean32(0x00000080, "vol_cap_nss", "Volume is Mounted by NSS"),
3927         bf_boolean32(0x00000100, "vol_cap_ea", "OS2 style EA's Supported"),
3928         bf_boolean32(0x00000200, "vol_cap_archive", "NetWare Archive bit Supported"),
3929     bf_boolean32(0x00000400, "vol_cap_file_attr", "Full NetWare file Attributes Supported"),
3930 ])
3931 VolumeCachedFlag                = val_string8("volume_cached_flag", "Volume Cached Flag", [
3932         [ 0x00, "Volume is Not Cached" ],
3933         [ 0xff, "Volume is Cached" ],
3934 ])
3935 VolumeDataStreams               = uint8("volume_data_streams", "Volume Data Streams")
3936 VolumeGUID              = stringz("volume_guid", "Volume GUID")
3937 VolumeHashedFlag                = val_string8("volume_hashed_flag", "Volume Hashed Flag", [
3938         [ 0x00, "Volume is Not Hashed" ],
3939         [ 0xff, "Volume is Hashed" ],
3940 ])
3941 VolumeLastModifiedDate          = uint16("volume_last_modified_date", "Volume Last Modified Date")
3942 VolumeLastModifiedDate.NWDate()
3943 VolumeLastModifiedTime          = uint16("volume_last_modified_time", "Volume Last Modified Time")
3944 VolumeLastModifiedTime.NWTime()
3945 VolumeMountedFlag               = val_string8("volume_mounted_flag", "Volume Mounted Flag", [
3946         [ 0x00, "Volume is Not Mounted" ],
3947         [ 0xff, "Volume is Mounted" ],
3948 ])
3949 VolumeMountPoint = stringz("volume_mnt_point", "Volume Mount Point")
3950 VolumeName                      = fw_string("volume_name", "Volume Name", 16)
3951 VolumeNameLen                   = nstring8("volume_name_len", "Volume Name")
3952 VolumeNameSpaces                = uint8("volume_name_spaces", "Volume Name Spaces")
3953 VolumeNameStringz       = stringz("vol_name_stringz", "Volume Name")
3954 VolumeNumber                    = uint8("volume_number", "Volume Number")
3955 VolumeNumberLong                = uint32("volume_number_long", "Volume Number")
3956 VolumeRemovableFlag             = val_string8("volume_removable_flag", "Volume Removable Flag", [
3957         [ 0x00, "Disk Cannot be Removed from Server" ],
3958         [ 0xff, "Disk Can be Removed from Server" ],
3959 ])
3960 VolumeRequestFlags              = val_string16("volume_request_flags", "Volume Request Flags", [
3961         [ 0x0000, "Return name with volume number" ],
3962         [ 0x0001, "Do not return name with volume number" ],
3963 ])
3964 VolumeSizeInClusters            = uint32("volume_size_in_clusters", "Volume Size in Clusters")
3965 VolumesSupportedMax             = uint16("volumes_supported_max", "Volumes Supported Max")
3966 VolumeType                      = val_string16("volume_type", "Volume Type", [
3967         [ 0x0000, "NetWare 386" ],
3968         [ 0x0001, "NetWare 286" ],
3969         [ 0x0002, "NetWare 386 Version 30" ],
3970         [ 0x0003, "NetWare 386 Version 31" ],
3971 ])
3972 WastedServerMemory              = uint16("wasted_server_memory", "Wasted Server Memory", BE)
3973 WaitTime                        = uint32("wait_time", "Wait Time")
3974
3975 Year                            = val_string8("year", "Year",[
3976         [ 0x50, "1980" ],
3977         [ 0x51, "1981" ],
3978         [ 0x52, "1982" ],
3979         [ 0x53, "1983" ],
3980         [ 0x54, "1984" ],
3981         [ 0x55, "1985" ],
3982         [ 0x56, "1986" ],
3983         [ 0x57, "1987" ],
3984         [ 0x58, "1988" ],
3985         [ 0x59, "1989" ],
3986         [ 0x5a, "1990" ],
3987         [ 0x5b, "1991" ],
3988         [ 0x5c, "1992" ],
3989         [ 0x5d, "1993" ],
3990         [ 0x5e, "1994" ],
3991         [ 0x5f, "1995" ],
3992         [ 0x60, "1996" ],
3993         [ 0x61, "1997" ],
3994         [ 0x62, "1998" ],
3995         [ 0x63, "1999" ],
3996         [ 0x64, "2000" ],
3997         [ 0x65, "2001" ],
3998         [ 0x66, "2002" ],
3999         [ 0x67, "2003" ],
4000         [ 0x68, "2004" ],
4001         [ 0x69, "2005" ],
4002         [ 0x6a, "2006" ],
4003         [ 0x6b, "2007" ],
4004         [ 0x6c, "2008" ],
4005         [ 0x6d, "2009" ],
4006         [ 0x6e, "2010" ],
4007         [ 0x6f, "2011" ],
4008         [ 0x70, "2012" ],
4009         [ 0x71, "2013" ],
4010         [ 0x72, "2014" ],
4011         [ 0x73, "2015" ],
4012         [ 0x74, "2016" ],
4013         [ 0x75, "2017" ],
4014         [ 0x76, "2018" ],
4015         [ 0x77, "2019" ],
4016         [ 0x78, "2020" ],
4017         [ 0x79, "2021" ],
4018         [ 0x7a, "2022" ],
4019         [ 0x7b, "2023" ],
4020         [ 0x7c, "2024" ],
4021         [ 0x7d, "2025" ],
4022         [ 0x7e, "2026" ],
4023         [ 0x7f, "2027" ],
4024         [ 0xc0, "1984" ],
4025         [ 0xc1, "1985" ],
4026         [ 0xc2, "1986" ],
4027         [ 0xc3, "1987" ],
4028         [ 0xc4, "1988" ],
4029         [ 0xc5, "1989" ],
4030         [ 0xc6, "1990" ],
4031         [ 0xc7, "1991" ],
4032         [ 0xc8, "1992" ],
4033         [ 0xc9, "1993" ],
4034         [ 0xca, "1994" ],
4035         [ 0xcb, "1995" ],
4036         [ 0xcc, "1996" ],
4037         [ 0xcd, "1997" ],
4038         [ 0xce, "1998" ],
4039         [ 0xcf, "1999" ],
4040         [ 0xd0, "2000" ],
4041         [ 0xd1, "2001" ],
4042         [ 0xd2, "2002" ],
4043         [ 0xd3, "2003" ],
4044         [ 0xd4, "2004" ],
4045         [ 0xd5, "2005" ],
4046         [ 0xd6, "2006" ],
4047         [ 0xd7, "2007" ],
4048         [ 0xd8, "2008" ],
4049         [ 0xd9, "2009" ],
4050         [ 0xda, "2010" ],
4051         [ 0xdb, "2011" ],
4052         [ 0xdc, "2012" ],
4053         [ 0xdd, "2013" ],
4054         [ 0xde, "2014" ],
4055         [ 0xdf, "2015" ],
4056 ])
4057 ##############################################################################
4058 # Structs
4059 ##############################################################################
4060
4061
4062 acctngInfo                      = struct("acctng_info_struct", [
4063         HoldTime,
4064         HoldAmount,
4065         ChargeAmount,
4066         HeldConnectTimeInMinutes,
4067         HeldRequests,
4068         HeldBytesRead,
4069         HeldBytesWritten,
4070 ],"Accounting Information")
4071 AFP10Struct                       = struct("afp_10_struct", [
4072         AFPEntryID,
4073         ParentID,
4074         AttributesDef16,
4075         DataForkLen,
4076         ResourceForkLen,
4077         TotalOffspring,
4078         CreationDate,
4079         LastAccessedDate,
4080         ModifiedDate,
4081         ModifiedTime,
4082         ArchivedDate,
4083         ArchivedTime,
4084         CreatorID,
4085         Reserved4,
4086         FinderAttr,
4087         HorizLocation,
4088         VertLocation,
4089         FileDirWindow,
4090         Reserved16,
4091         LongName,
4092         CreatorID,
4093         ShortName,
4094         AccessPrivileges,
4095 ], "AFP Information" )
4096 AFP20Struct                       = struct("afp_20_struct", [
4097         AFPEntryID,
4098         ParentID,
4099         AttributesDef16,
4100         DataForkLen,
4101         ResourceForkLen,
4102         TotalOffspring,
4103         CreationDate,
4104         LastAccessedDate,
4105         ModifiedDate,
4106         ModifiedTime,
4107         ArchivedDate,
4108         ArchivedTime,
4109         CreatorID,
4110         Reserved4,
4111         FinderAttr,
4112         HorizLocation,
4113         VertLocation,
4114         FileDirWindow,
4115         Reserved16,
4116         LongName,
4117         CreatorID,
4118         ShortName,
4119         AccessPrivileges,
4120         Reserved,
4121         ProDOSInfo,
4122 ], "AFP Information" )
4123 ArchiveDateStruct               = struct("archive_date_struct", [
4124         ArchivedDate,
4125 ])
4126 ArchiveIdStruct                 = struct("archive_id_struct", [
4127         ArchiverID,
4128 ])
4129 ArchiveInfoStruct               = struct("archive_info_struct", [
4130         ArchivedTime,
4131         ArchivedDate,
4132         ArchiverID,
4133 ], "Archive Information")
4134 ArchiveTimeStruct               = struct("archive_time_struct", [
4135         ArchivedTime,
4136 ])
4137 AttributesStruct                = struct("attributes_struct", [
4138         AttributesDef32,
4139         FlagsDef,
4140 ], "Attributes")
4141 authInfo                        = struct("auth_info_struct", [
4142         Status,
4143         Reserved2,
4144         Privileges,
4145 ])
4146 BoardNameStruct                 = struct("board_name_struct", [
4147         DriverBoardName,
4148         DriverShortName,
4149         DriverLogicalName,
4150 ], "Board Name")
4151 CacheInfo                       = struct("cache_info", [
4152         uint32("max_byte_cnt", "Maximum Byte Count"),
4153         uint32("min_num_of_cache_buff", "Minimum Number Of Cache Buffers"),
4154         uint32("min_cache_report_thresh", "Minimum Cache Report Threshold"),
4155         uint32("alloc_waiting", "Allocate Waiting Count"),
4156         uint32("ndirty_blocks", "Number of Dirty Blocks"),
4157         uint32("cache_dirty_wait_time", "Cache Dirty Wait Time"),
4158         uint32("cache_max_concur_writes", "Cache Maximum Concurrent Writes"),
4159         uint32("max_dirty_time", "Maximum Dirty Time"),
4160         uint32("num_dir_cache_buff", "Number Of Directory Cache Buffers"),
4161         uint32("cache_byte_to_block", "Cache Byte To Block Shift Factor"),
4162 ], "Cache Information")
4163 CommonLanStruc                  = struct("common_lan_struct", [
4164         boolean8("not_supported_mask", "Bit Counter Supported"),
4165         Reserved3,
4166         uint32("total_tx_packet_count", "Total Transmit Packet Count"),
4167         uint32("total_rx_packet_count", "Total Receive Packet Count"),
4168         uint32("no_ecb_available_count", "No ECB Available Count"),
4169         uint32("packet_tx_too_big_count", "Transmit Packet Too Big Count"),
4170         uint32("packet_tx_too_small_count", "Transmit Packet Too Small Count"),
4171         uint32("packet_rx_overflow_count", "Receive Packet Overflow Count"),
4172         uint32("packet_rx_too_big_count", "Receive Packet Too Big Count"),
4173         uint32("packet_rs_too_small_count", "Receive Packet Too Small Count"),
4174         uint32("packet_tx_misc_error_count", "Transmit Packet Misc Error Count"),
4175         uint32("packet_rx_misc_error_count", "Receive Packet Misc Error Count"),
4176         uint32("retry_tx_count", "Transmit Retry Count"),
4177         uint32("checksum_error_count", "Checksum Error Count"),
4178         uint32("hardware_rx_mismatch_count", "Hardware Receive Mismatch Count"),
4179 ], "Common LAN Information")
4180 CompDeCompStat                  = struct("comp_d_comp_stat", [
4181         uint32("cmphitickhigh", "Compress High Tick"),
4182         uint32("cmphitickcnt", "Compress High Tick Count"),
4183         uint32("cmpbyteincount", "Compress Byte In Count"),
4184         uint32("cmpbyteoutcnt", "Compress Byte Out Count"),
4185         uint32("cmphibyteincnt", "Compress High Byte In Count"),
4186         uint32("cmphibyteoutcnt", "Compress High Byte Out Count"),
4187         uint32("decphitickhigh", "DeCompress High Tick"),
4188         uint32("decphitickcnt", "DeCompress High Tick Count"),
4189         uint32("decpbyteincount", "DeCompress Byte In Count"),
4190         uint32("decpbyteoutcnt", "DeCompress Byte Out Count"),
4191         uint32("decphibyteincnt", "DeCompress High Byte In Count"),
4192         uint32("decphibyteoutcnt", "DeCompress High Byte Out Count"),
4193 ], "Compression/Decompression Information")
4194 ConnFileStruct                  = struct("conn_file_struct", [
4195         ConnectionNumberWord,
4196         TaskNumberWord,
4197         LockType,
4198         AccessControl,
4199         LockFlag,
4200 ], "File Connection Information")
4201 ConnStruct                      = struct("conn_struct", [
4202         TaskNumByte,
4203         LockType,
4204         AccessControl,
4205         LockFlag,
4206         VolumeNumber,
4207         DirectoryEntryNumberWord,
4208         FileName14,
4209 ], "Connection Information")
4210 ConnTaskStruct                  = struct("conn_task_struct", [
4211         ConnectionNumberByte,
4212         TaskNumByte,
4213 ], "Task Information")
4214 Counters                        = struct("counters_struct", [
4215         uint32("read_exist_blck", "Read Existing Block Count"),
4216         uint32("read_exist_write_wait", "Read Existing Write Wait Count"),
4217         uint32("read_exist_part_read", "Read Existing Partial Read Count"),
4218         uint32("read_exist_read_err", "Read Existing Read Error Count"),
4219         uint32("wrt_blck_cnt", "Write Block Count"),
4220         uint32("wrt_entire_blck", "Write Entire Block Count"),
4221         uint32("internl_dsk_get", "Internal Disk Get Count"),
4222         uint32("internl_dsk_get_need_to_alloc", "Internal Disk Get Need To Allocate Count"),
4223         uint32("internl_dsk_get_someone_beat", "Internal Disk Get Someone Beat My Count"),
4224         uint32("internl_dsk_get_part_read", "Internal Disk Get Partial Read Count"),
4225         uint32("internl_dsk_get_read_err", "Internal Disk Get Read Error Count"),
4226         uint32("async_internl_dsk_get", "Async Internal Disk Get Count"),
4227         uint32("async_internl_dsk_get_need_to_alloc", "Async Internal Disk Get Need To Alloc"),
4228         uint32("async_internl_dsk_get_someone_beat", "Async Internal Disk Get Someone Beat Me"),
4229         uint32("err_doing_async_read", "Error Doing Async Read Count"),
4230         uint32("internl_dsk_get_no_read", "Internal Disk Get No Read Count"),
4231         uint32("internl_dsk_get_no_read_alloc", "Internal Disk Get No Read Allocate Count"),
4232         uint32("internl_dsk_get_no_read_someone_beat", "Internal Disk Get No Read Someone Beat Me Count"),
4233         uint32("internl_dsk_write", "Internal Disk Write Count"),
4234         uint32("internl_dsk_write_alloc", "Internal Disk Write Allocate Count"),
4235         uint32("internl_dsk_write_someone_beat", "Internal Disk Write Someone Beat Me Count"),
4236         uint32("write_err", "Write Error Count"),
4237         uint32("wait_on_sema", "Wait On Semaphore Count"),
4238         uint32("alloc_blck_i_had_to_wait_for", "Allocate Block I Had To Wait For Someone Count"),
4239         uint32("alloc_blck", "Allocate Block Count"),
4240         uint32("alloc_blck_i_had_to_wait", "Allocate Block I Had To Wait Count"),
4241 ], "Disk Counter Information")
4242 CPUInformation                  = struct("cpu_information", [
4243         PageTableOwnerFlag,
4244         CPUType,
4245         Reserved3,
4246         CoprocessorFlag,
4247         BusType,
4248         Reserved3,
4249         IOEngineFlag,
4250         Reserved3,
4251         FSEngineFlag,
4252         Reserved3,
4253         NonDedFlag,
4254         Reserved3,
4255         CPUString,
4256         CoProcessorString,
4257         BusString,
4258 ], "CPU Information")
4259 CreationDateStruct              = struct("creation_date_struct", [
4260         CreationDate,
4261 ])
4262 CreationInfoStruct              = struct("creation_info_struct", [
4263         CreationTime,
4264         CreationDate,
4265         CreatorID,
4266 ], "Creation Information")
4267 CreationTimeStruct              = struct("creation_time_struct", [
4268         CreationTime,
4269 ])
4270 CustomCntsInfo                  = struct("custom_cnts_info", [
4271         CustomVariableValue,
4272         CustomString,
4273 ], "Custom Counters" )
4274 DataStreamInfo                  = struct("data_stream_info", [
4275         AssociatedNameSpace,
4276         DataStreamName
4277 ])
4278 DataStreamSizeStruct            = struct("data_stream_size_struct", [
4279         DataStreamSize,
4280 ])
4281 DirCacheInfo                    = struct("dir_cache_info", [
4282         uint32("min_time_since_file_delete", "Minimum Time Since File Delete"),
4283         uint32("abs_min_time_since_file_delete", "Absolute Minimum Time Since File Delete"),
4284         uint32("min_num_of_dir_cache_buff", "Minimum Number Of Directory Cache Buffers"),
4285         uint32("max_num_of_dir_cache_buff", "Maximum Number Of Directory Cache Buffers"),
4286         uint32("num_of_dir_cache_buff", "Number Of Directory Cache Buffers"),
4287         uint32("dc_min_non_ref_time", "DC Minimum Non-Referenced Time"),
4288         uint32("dc_wait_time_before_new_buff", "DC Wait Time Before New Buffer"),
4289         uint32("dc_max_concurrent_writes", "DC Maximum Concurrent Writes"),
4290         uint32("dc_dirty_wait_time", "DC Dirty Wait Time"),
4291         uint32("dc_double_read_flag", "DC Double Read Flag"),
4292         uint32("map_hash_node_count", "Map Hash Node Count"),
4293         uint32("space_restriction_node_count", "Space Restriction Node Count"),
4294         uint32("trustee_list_node_count", "Trustee List Node Count"),
4295         uint32("percent_of_vol_used_by_dirs", "Percent Of Volume Used By Directories"),
4296 ], "Directory Cache Information")
4297 DirEntryStruct                  = struct("dir_entry_struct", [
4298         DirectoryEntryNumber,
4299         DOSDirectoryEntryNumber,
4300         VolumeNumberLong,
4301 ], "Directory Entry Information")
4302 DirectoryInstance               = struct("directory_instance", [
4303         SearchSequenceWord,
4304         DirectoryID,
4305         DirectoryName14,
4306         DirectoryAttributes,
4307         DirectoryAccessRights,
4308         endian(CreationDate, BE),
4309         endian(AccessDate, BE),
4310         CreatorID,
4311         Reserved2,
4312         DirectoryStamp,
4313 ], "Directory Information")
4314 DMInfoLevel0                    = struct("dm_info_level_0", [
4315         uint32("io_flag", "IO Flag"),
4316         uint32("sm_info_size", "Storage Module Information Size"),
4317         uint32("avail_space", "Available Space"),
4318         uint32("used_space", "Used Space"),
4319         stringz("s_module_name", "Storage Module Name"),
4320         uint8("s_m_info", "Storage Media Information"),
4321 ])
4322 DMInfoLevel1                    = struct("dm_info_level_1", [
4323         NumberOfSMs,
4324         SMIDs,
4325 ])
4326 DMInfoLevel2                    = struct("dm_info_level_2", [
4327         Name,
4328 ])
4329 DOSDirectoryEntryStruct         = struct("dos_directory_entry_struct", [
4330         AttributesDef32,
4331         UniqueID,
4332         PurgeFlags,
4333         DestNameSpace,
4334         DirectoryNameLen,
4335         DirectoryName,
4336         CreationTime,
4337         CreationDate,
4338         CreatorID,
4339         ArchivedTime,
4340         ArchivedDate,
4341         ArchiverID,
4342         UpdateTime,
4343         UpdateDate,
4344         NextTrusteeEntry,
4345         Reserved48,
4346         InheritedRightsMask,
4347 ], "DOS Directory Information")
4348 DOSFileEntryStruct              = struct("dos_file_entry_struct", [
4349         AttributesDef32,
4350         UniqueID,
4351         PurgeFlags,
4352         DestNameSpace,
4353         NameLen,
4354         Name12,
4355         CreationTime,
4356         CreationDate,
4357         CreatorID,
4358         ArchivedTime,
4359         ArchivedDate,
4360         ArchiverID,
4361         UpdateTime,
4362         UpdateDate,
4363         UpdateID,
4364         FileSize,
4365         DataForkFirstFAT,
4366         NextTrusteeEntry,
4367         Reserved36,
4368         InheritedRightsMask,
4369         LastAccessedDate,
4370         Reserved28,
4371         PrimaryEntry,
4372         NameList,
4373 ], "DOS File Information")
4374 DSSpaceAllocateStruct           = struct("ds_space_alloc_struct", [
4375         DataStreamSpaceAlloc,
4376 ])
4377 DynMemStruct                    = struct("dyn_mem_struct", [
4378         uint32("dyn_mem_struct_total", "Total Dynamic Space" ),
4379         uint32("dyn_mem_struct_max", "Max Used Dynamic Space" ),
4380         uint32("dyn_mem_struct_cur", "Current Used Dynamic Space" ),
4381 ], "Dynamic Memory Information")
4382 EAInfoStruct                    = struct("ea_info_struct", [
4383         EADataSize,
4384         EACount,
4385         EAKeySize,
4386 ], "Extended Attribute Information")
4387 ExtraCacheCntrs                 = struct("extra_cache_cntrs", [
4388         uint32("internl_dsk_get_no_wait", "Internal Disk Get No Wait Count"),
4389         uint32("internl_dsk_get_no_wait_need", "Internal Disk Get No Wait Need To Allocate Count"),
4390         uint32("internl_dsk_get_no_wait_no_blk", "Internal Disk Get No Wait No Block Count"),
4391         uint32("id_get_no_read_no_wait", "ID Get No Read No Wait Count"),
4392         uint32("id_get_no_read_no_wait_sema", "ID Get No Read No Wait Semaphored Count"),
4393         uint32("id_get_no_read_no_wait_buffer", "ID Get No Read No Wait No Buffer Count"),
4394         uint32("id_get_no_read_no_wait_alloc", "ID Get No Read No Wait Allocate Count"),
4395         uint32("id_get_no_read_no_wait_no_alloc", "ID Get No Read No Wait No Alloc Count"),
4396         uint32("id_get_no_read_no_wait_no_alloc_sema", "ID Get No Read No Wait No Alloc Semaphored Count"),
4397         uint32("id_get_no_read_no_wait_no_alloc_alloc", "ID Get No Read No Wait No Alloc Allocate Count"),
4398 ], "Extra Cache Counters Information")
4399
4400 FileSize64bitStruct             = struct("file_sz_64bit_struct", [
4401         FileSize64bit,
4402 ])
4403
4404 ReferenceIDStruct               = struct("ref_id_struct", [
4405         CurrentReferenceID,
4406 ])
4407 NSAttributeStruct               = struct("ns_attrib_struct", [
4408         AttributesDef32,
4409 ])
4410 DStreamActual                   = struct("d_stream_actual", [
4411         DataStreamNumberLong,
4412         DataStreamFATBlocks,
4413 ])
4414 DStreamLogical                  = struct("d_string_logical", [
4415         DataStreamNumberLong,
4416         DataStreamSize,
4417 ])
4418 LastUpdatedInSecondsStruct      = struct("last_update_in_seconds_struct", [
4419         SecondsRelativeToTheYear2000,
4420 ])
4421 DOSNameStruct                   = struct("dos_name_struct", [
4422         FileName,
4423 ], "DOS File Name")
4424 DOSName16Struct                   = struct("dos_name_16_struct", [
4425         FileName16,
4426 ], "DOS File Name")
4427 FlushTimeStruct                 = struct("flush_time_struct", [
4428         FlushTime,
4429 ])
4430 ParentBaseIDStruct              = struct("parent_base_id_struct", [
4431         ParentBaseID,
4432 ])
4433 MacFinderInfoStruct             = struct("mac_finder_info_struct", [
4434         MacFinderInfo,
4435 ])
4436 SiblingCountStruct              = struct("sibling_count_struct", [
4437         SiblingCount,
4438 ])
4439 EffectiveRightsStruct           = struct("eff_rights_struct", [
4440         EffectiveRights,
4441         Reserved3,
4442 ])
4443 MacTimeStruct                   = struct("mac_time_struct", [
4444         MACCreateDate,
4445         MACCreateTime,
4446         MACBackupDate,
4447         MACBackupTime,
4448 ])
4449 LastAccessedTimeStruct          = struct("last_access_time_struct", [
4450         LastAccessedTime,
4451 ])
4452
4453
4454
4455 FileAttributesStruct            = struct("file_attributes_struct", [
4456         AttributesDef32,
4457 ])
4458 FileInfoStruct                  = struct("file_info_struct", [
4459         ParentID,
4460         DirectoryEntryNumber,
4461         TotalBlocksToDecompress,
4462         CurrentBlockBeingDecompressed,
4463 ], "File Information")
4464 FileInstance                    = struct("file_instance", [
4465         SearchSequenceWord,
4466         DirectoryID,
4467         FileName14,
4468         AttributesDef,
4469         FileMode,
4470         FileSize,
4471         endian(CreationDate, BE),
4472         endian(AccessDate, BE),
4473         endian(UpdateDate, BE),
4474         endian(UpdateTime, BE),
4475 ], "File Instance")
4476 FileNameStruct                  = struct("file_name_struct", [
4477         FileName,
4478 ], "File Name")
4479 FileName16Struct                  = struct("file_name16_struct", [
4480         FileName16,
4481 ], "File Name")
4482 FileServerCounters              = struct("file_server_counters", [
4483         uint16("too_many_hops", "Too Many Hops"),
4484         uint16("unknown_network", "Unknown Network"),
4485         uint16("no_space_for_service", "No Space For Service"),
4486         uint16("no_receive_buff", "No Receive Buffers"),
4487         uint16("not_my_network", "Not My Network"),
4488         uint32("netbios_progated", "NetBIOS Propagated Count"),
4489         uint32("ttl_pckts_srvcd", "Total Packets Serviced"),
4490         uint32("ttl_pckts_routed", "Total Packets Routed"),
4491 ], "File Server Counters")
4492 FileSystemInfo                  = struct("file_system_info", [
4493         uint32("fat_moved", "Number of times the OS has move the location of FAT"),
4494         uint32("fat_write_err", "Number of write errors in both original and mirrored copies of FAT"),
4495         uint32("someone_else_did_it_0", "Someone Else Did It Count 0"),
4496         uint32("someone_else_did_it_1", "Someone Else Did It Count 1"),
4497         uint32("someone_else_did_it_2", "Someone Else Did It Count 2"),
4498         uint32("i_ran_out_someone_else_did_it_0", "I Ran Out Someone Else Did It Count 0"),
4499         uint32("i_ran_out_someone_else_did_it_1", "I Ran Out Someone Else Did It Count 1"),
4500         uint32("i_ran_out_someone_else_did_it_2", "I Ran Out Someone Else Did It Count 2"),
4501         uint32("turbo_fat_build_failed", "Turbo FAT Build Failed Count"),
4502         uint32("extra_use_count_node_count", "Errors allocating a use count node for TTS"),
4503         uint32("extra_extra_use_count_node_count", "Errors allocating an additional use count node for TTS"),
4504         uint32("error_read_last_fat", "Error Reading Last FAT Count"),
4505         uint32("someone_else_using_this_file", "Someone Else Using This File Count"),
4506 ], "File System Information")
4507 GenericInfoDef                  = struct("generic_info_def", [
4508         fw_string("generic_label", "Label", 64),
4509         uint32("generic_ident_type", "Identification Type"),
4510         uint32("generic_ident_time", "Identification Time"),
4511         uint32("generic_media_type", "Media Type"),
4512         uint32("generic_cartridge_type", "Cartridge Type"),
4513         uint32("generic_unit_size", "Unit Size"),
4514         uint32("generic_block_size", "Block Size"),
4515         uint32("generic_capacity", "Capacity"),
4516         uint32("generic_pref_unit_size", "Preferred Unit Size"),
4517         fw_string("generic_name", "Name",64),
4518         uint32("generic_type", "Type"),
4519         uint32("generic_status", "Status"),
4520         uint32("generic_func_mask", "Function Mask"),
4521         uint32("generic_ctl_mask", "Control Mask"),
4522         uint32("generic_parent_count", "Parent Count"),
4523         uint32("generic_sib_count", "Sibling Count"),
4524         uint32("generic_child_count", "Child Count"),
4525         uint32("generic_spec_info_sz", "Specific Information Size"),
4526         uint32("generic_object_uniq_id", "Unique Object ID"),
4527         uint32("generic_media_slot", "Media Slot"),
4528 ], "Generic Information")
4529 HandleInfoLevel0                = struct("handle_info_level_0", [
4530 #        DataStream,
4531 ])
4532 HandleInfoLevel1                = struct("handle_info_level_1", [
4533         DataStream,
4534 ])
4535 HandleInfoLevel2                = struct("handle_info_level_2", [
4536         DOSDirectoryBase,
4537         NameSpace,
4538         DataStream,
4539 ])
4540 HandleInfoLevel3                = struct("handle_info_level_3", [
4541         DOSDirectoryBase,
4542         NameSpace,
4543 ])
4544 HandleInfoLevel4                = struct("handle_info_level_4", [
4545         DOSDirectoryBase,
4546         NameSpace,
4547         ParentDirectoryBase,
4548         ParentDOSDirectoryBase,
4549 ])
4550 HandleInfoLevel5                = struct("handle_info_level_5", [
4551         DOSDirectoryBase,
4552         NameSpace,
4553         DataStream,
4554         ParentDirectoryBase,
4555         ParentDOSDirectoryBase,
4556 ])
4557 IPXInformation                  = struct("ipx_information", [
4558         uint32("ipx_send_pkt", "IPX Send Packet Count"),
4559         uint16("ipx_malform_pkt", "IPX Malformed Packet Count"),
4560         uint32("ipx_get_ecb_req", "IPX Get ECB Request Count"),
4561         uint32("ipx_get_ecb_fail", "IPX Get ECB Fail Count"),
4562         uint32("ipx_aes_event", "IPX AES Event Count"),
4563         uint16("ipx_postponed_aes", "IPX Postponed AES Count"),
4564         uint16("ipx_max_conf_sock", "IPX Max Configured Socket Count"),
4565         uint16("ipx_max_open_sock", "IPX Max Open Socket Count"),
4566         uint16("ipx_open_sock_fail", "IPX Open Socket Fail Count"),
4567         uint32("ipx_listen_ecb", "IPX Listen ECB Count"),
4568         uint16("ipx_ecb_cancel_fail", "IPX ECB Cancel Fail Count"),
4569         uint16("ipx_get_lcl_targ_fail", "IPX Get Local Target Fail Count"),
4570 ], "IPX Information")
4571 JobEntryTime                    = struct("job_entry_time", [
4572         Year,
4573         Month,
4574         Day,
4575         Hour,
4576         Minute,
4577         Second,
4578 ], "Job Entry Time")
4579 JobStruct3x                       = struct("job_struct_3x", [
4580     RecordInUseFlag,
4581     PreviousRecord,
4582     NextRecord,
4583         ClientStationLong,
4584         ClientTaskNumberLong,
4585         ClientIDNumber,
4586         TargetServerIDNumber,
4587         TargetExecutionTime,
4588         JobEntryTime,
4589         JobNumberLong,
4590         JobType,
4591         JobPositionWord,
4592         JobControlFlagsWord,
4593         JobFileName,
4594         JobFileHandleLong,
4595         ServerStationLong,
4596         ServerTaskNumberLong,
4597         ServerID,
4598         TextJobDescription,
4599         ClientRecordArea,
4600 ], "Job Information")
4601 JobStruct                       = struct("job_struct", [
4602         ClientStation,
4603         ClientTaskNumber,
4604         ClientIDNumber,
4605         TargetServerIDNumber,
4606         TargetExecutionTime,
4607         JobEntryTime,
4608         JobNumber,
4609         JobType,
4610         JobPosition,
4611         JobControlFlags,
4612         JobFileName,
4613         JobFileHandle,
4614         ServerStation,
4615         ServerTaskNumber,
4616         ServerID,
4617         TextJobDescription,
4618         ClientRecordArea,
4619 ], "Job Information")
4620 JobStructNew                    = struct("job_struct_new", [
4621         RecordInUseFlag,
4622         PreviousRecord,
4623         NextRecord,
4624         ClientStationLong,
4625         ClientTaskNumberLong,
4626         ClientIDNumber,
4627         TargetServerIDNumber,
4628         TargetExecutionTime,
4629         JobEntryTime,
4630         JobNumberLong,
4631         JobType,
4632         JobPositionWord,
4633         JobControlFlagsWord,
4634         JobFileName,
4635         JobFileHandleLong,
4636         ServerStationLong,
4637         ServerTaskNumberLong,
4638         ServerID,
4639 ], "Job Information")
4640 KnownRoutes                     = struct("known_routes", [
4641         NetIDNumber,
4642         HopsToNet,
4643         NetStatus,
4644         TimeToNet,
4645 ], "Known Routes")
4646 KnownServStruc                  = struct("known_server_struct", [
4647         ServerAddress,
4648         HopsToNet,
4649         ServerNameStringz,
4650 ], "Known Servers")
4651 LANConfigInfo                   = struct("lan_cfg_info", [
4652         LANdriverCFG_MajorVersion,
4653         LANdriverCFG_MinorVersion,
4654         LANdriverNodeAddress,
4655         Reserved,
4656         LANdriverModeFlags,
4657         LANdriverBoardNumber,
4658         LANdriverBoardInstance,
4659         LANdriverMaximumSize,
4660         LANdriverMaxRecvSize,
4661         LANdriverRecvSize,
4662         LANdriverCardID,
4663         LANdriverMediaID,
4664         LANdriverTransportTime,
4665         LANdriverSrcRouting,
4666         LANdriverLineSpeed,
4667         LANdriverReserved,
4668         LANdriverMajorVersion,
4669         LANdriverMinorVersion,
4670         LANdriverFlags,
4671         LANdriverSendRetries,
4672         LANdriverLink,
4673         LANdriverSharingFlags,
4674         LANdriverSlot,
4675         LANdriverIOPortsAndRanges1,
4676         LANdriverIOPortsAndRanges2,
4677         LANdriverIOPortsAndRanges3,
4678         LANdriverIOPortsAndRanges4,
4679         LANdriverMemoryDecode0,
4680         LANdriverMemoryLength0,
4681         LANdriverMemoryDecode1,
4682         LANdriverMemoryLength1,
4683         LANdriverInterrupt1,
4684         LANdriverInterrupt2,
4685         LANdriverDMAUsage1,
4686         LANdriverDMAUsage2,
4687         LANdriverLogicalName,
4688         LANdriverIOReserved,
4689         LANdriverCardName,
4690 ], "LAN Configuration Information")
4691 LastAccessStruct                = struct("last_access_struct", [
4692         LastAccessedDate,
4693 ])
4694 lockInfo                        = struct("lock_info_struct", [
4695         LogicalLockThreshold,
4696         PhysicalLockThreshold,
4697         FileLockCount,
4698         RecordLockCount,
4699 ], "Lock Information")
4700 LockStruct                      = struct("lock_struct", [
4701         TaskNumByte,
4702         LockType,
4703         RecordStart,
4704         RecordEnd,
4705 ], "Locks")
4706 LoginTime                       = struct("login_time", [
4707         Year,
4708         Month,
4709         Day,
4710         Hour,
4711         Minute,
4712         Second,
4713         DayOfWeek,
4714 ], "Login Time")
4715 LogLockStruct                   = struct("log_lock_struct", [
4716         TaskNumByte,
4717         LockStatus,
4718         LockName,
4719 ], "Logical Locks")
4720 LogRecStruct                    = struct("log_rec_struct", [
4721         ConnectionNumberWord,
4722         TaskNumByte,
4723         LockStatus,
4724 ], "Logical Record Locks")
4725 LSLInformation                  = struct("lsl_information", [
4726         uint32("rx_buffers", "Receive Buffers"),
4727         uint32("rx_buffers_75", "Receive Buffers Warning Level"),
4728         uint32("rx_buffers_checked_out", "Receive Buffers Checked Out Count"),
4729         uint32("rx_buffer_size", "Receive Buffer Size"),
4730         uint32("max_phy_packet_size", "Maximum Physical Packet Size"),
4731         uint32("last_time_rx_buff_was_alloc", "Last Time a Receive Buffer was Allocated"),
4732         uint32("max_num_of_protocols", "Maximum Number of Protocols"),
4733         uint32("max_num_of_media_types", "Maximum Number of Media Types"),
4734         uint32("total_tx_packets", "Total Transmit Packets"),
4735         uint32("get_ecb_buf", "Get ECB Buffers"),
4736         uint32("get_ecb_fails", "Get ECB Failures"),
4737         uint32("aes_event_count", "AES Event Count"),
4738         uint32("post_poned_events", "Postponed Events"),
4739         uint32("ecb_cxl_fails", "ECB Cancel Failures"),
4740         uint32("valid_bfrs_reused", "Valid Buffers Reused"),
4741         uint32("enqueued_send_cnt", "Enqueued Send Count"),
4742         uint32("total_rx_packets", "Total Receive Packets"),
4743         uint32("unclaimed_packets", "Unclaimed Packets"),
4744         uint8("stat_table_major_version", "Statistics Table Major Version"),
4745         uint8("stat_table_minor_version", "Statistics Table Minor Version"),
4746 ], "LSL Information")
4747 MaximumSpaceStruct              = struct("max_space_struct", [
4748         MaxSpace,
4749 ])
4750 MemoryCounters                  = struct("memory_counters", [
4751         uint32("orig_num_cache_buff", "Original Number Of Cache Buffers"),
4752         uint32("curr_num_cache_buff", "Current Number Of Cache Buffers"),
4753         uint32("cache_dirty_block_thresh", "Cache Dirty Block Threshold"),
4754         uint32("wait_node", "Wait Node Count"),
4755         uint32("wait_node_alloc_fail", "Wait Node Alloc Failure Count"),
4756         uint32("move_cache_node", "Move Cache Node Count"),
4757         uint32("move_cache_node_from_avai", "Move Cache Node From Avail Count"),
4758         uint32("accel_cache_node_write", "Accelerate Cache Node Write Count"),
4759         uint32("rem_cache_node", "Remove Cache Node Count"),
4760         uint32("rem_cache_node_from_avail", "Remove Cache Node From Avail Count"),
4761 ], "Memory Counters")
4762 MLIDBoardInfo                   = struct("mlid_board_info", [
4763         uint32("protocol_board_num", "Protocol Board Number"),
4764         uint16("protocol_number", "Protocol Number"),
4765         bytes("protocol_id", "Protocol ID", 6),
4766         nstring8("protocol_name", "Protocol Name"),
4767 ], "MLID Board Information")
4768 ModifyInfoStruct                = struct("modify_info_struct", [
4769         ModifiedTime,
4770         ModifiedDate,
4771         ModifierID,
4772         LastAccessedDate,
4773 ], "Modification Information")
4774 nameInfo                        = struct("name_info_struct", [
4775         ObjectType,
4776         nstring8("login_name", "Login Name"),
4777 ], "Name Information")
4778 NCPNetworkAddress               = struct("ncp_network_address_struct", [
4779         TransportType,
4780         Reserved3,
4781         NetAddress,
4782 ], "Network Address")
4783
4784 netAddr                         = struct("net_addr_struct", [
4785         TransportType,
4786         nbytes32("transport_addr", "Transport Address"),
4787 ], "Network Address")
4788
4789 NetWareInformationStruct        = struct("netware_information_struct", [
4790         DataStreamSpaceAlloc,           # (Data Stream Alloc Bit)
4791         AttributesDef32,                # (Attributes Bit)
4792         FlagsDef,
4793         DataStreamSize,                 # (Data Stream Size Bit)
4794         TotalDataStreamDiskSpaceAlloc,  # (Total Stream Size Bit)
4795         NumberOfDataStreams,
4796         CreationTime,                   # (Creation Bit)
4797         CreationDate,
4798         CreatorID,
4799         ModifiedTime,                   # (Modify Bit)
4800         ModifiedDate,
4801         ModifierID,
4802         LastAccessedDate,
4803         ArchivedTime,                   # (Archive Bit)
4804         ArchivedDate,
4805         ArchiverID,
4806         InheritedRightsMask,            # (Rights Bit)
4807         DirectoryEntryNumber,           # (Directory Entry Bit)
4808         DOSDirectoryEntryNumber,
4809         VolumeNumberLong,
4810         EADataSize,                     # (Extended Attribute Bit)
4811         EACount,
4812         EAKeySize,
4813         CreatorNameSpaceNumber,         # (Name Space Bit)
4814         Reserved3,
4815 ], "NetWare Information")
4816 NLMInformation                  = struct("nlm_information", [
4817         IdentificationNumber,
4818         NLMFlags,
4819         Reserved3,
4820         NLMType,
4821         Reserved3,
4822         ParentID,
4823         MajorVersion,
4824         MinorVersion,
4825         Revision,
4826         Year,
4827         Reserved3,
4828         Month,
4829         Reserved3,
4830         Day,
4831         Reserved3,
4832         AllocAvailByte,
4833         AllocFreeCount,
4834         LastGarbCollect,
4835         MessageLanguage,
4836         NumberOfReferencedPublics,
4837 ], "NLM Information")
4838 NSInfoStruct                    = struct("ns_info_struct", [
4839         NameSpace,
4840         Reserved3,
4841 ])
4842 NWAuditStatus                   = struct("nw_audit_status", [
4843         AuditVersionDate,
4844         AuditFileVersionDate,
4845         val_string16("audit_enable_flag", "Auditing Enabled Flag", [
4846                 [ 0x0000, "Auditing Disabled" ],
4847                 [ 0x0001, "Auditing Enabled" ],
4848         ]),
4849         Reserved2,
4850         uint32("audit_file_size", "Audit File Size"),
4851         uint32("modified_counter", "Modified Counter"),
4852         uint32("audit_file_max_size", "Audit File Maximum Size"),
4853         uint32("audit_file_size_threshold", "Audit File Size Threshold"),
4854         uint32("audit_record_count", "Audit Record Count"),
4855         uint32("auditing_flags", "Auditing Flags"),
4856 ], "NetWare Audit Status")
4857 ObjectSecurityStruct            = struct("object_security_struct", [
4858         ObjectSecurity,
4859 ])
4860 ObjectFlagsStruct               = struct("object_flags_struct", [
4861         ObjectFlags,
4862 ])
4863 ObjectTypeStruct                = struct("object_type_struct", [
4864         ObjectType,
4865         Reserved2,
4866 ])
4867 ObjectNameStruct                = struct("object_name_struct", [
4868         ObjectNameStringz,
4869 ])
4870 ObjectIDStruct                  = struct("object_id_struct", [
4871         ObjectID,
4872         Restriction,
4873 ])
4874 OpnFilesStruct                  = struct("opn_files_struct", [
4875         TaskNumberWord,
4876         LockType,
4877         AccessControl,
4878         LockFlag,
4879         VolumeNumber,
4880         DOSParentDirectoryEntry,
4881         DOSDirectoryEntry,
4882         ForkCount,
4883         NameSpace,
4884         FileName,
4885 ], "Open Files Information")
4886 OwnerIDStruct                   = struct("owner_id_struct", [
4887         CreatorID,
4888 ])
4889 PacketBurstInformation          = struct("packet_burst_information", [
4890         uint32("big_invalid_slot", "Big Invalid Slot Count"),
4891         uint32("big_forged_packet", "Big Forged Packet Count"),
4892         uint32("big_invalid_packet", "Big Invalid Packet Count"),
4893         uint32("big_still_transmitting", "Big Still Transmitting Count"),
4894         uint32("still_doing_the_last_req", "Still Doing The Last Request Count"),
4895         uint32("invalid_control_req", "Invalid Control Request Count"),
4896         uint32("control_invalid_message_number", "Control Invalid Message Number Count"),
4897         uint32("control_being_torn_down", "Control Being Torn Down Count"),
4898         uint32("big_repeat_the_file_read", "Big Repeat the File Read Count"),
4899         uint32("big_send_extra_cc_count", "Big Send Extra CC Count"),
4900         uint32("big_return_abort_mess", "Big Return Abort Message Count"),
4901         uint32("big_read_invalid_mess", "Big Read Invalid Message Number Count"),
4902         uint32("big_read_do_it_over", "Big Read Do It Over Count"),
4903         uint32("big_read_being_torn_down", "Big Read Being Torn Down Count"),
4904         uint32("previous_control_packet", "Previous Control Packet Count"),
4905         uint32("send_hold_off_message", "Send Hold Off Message Count"),
4906         uint32("big_read_no_data_avail", "Big Read No Data Available Count"),
4907         uint32("big_read_trying_to_read", "Big Read Trying To Read Too Much Count"),
4908         uint32("async_read_error", "Async Read Error Count"),
4909         uint32("big_read_phy_read_err", "Big Read Physical Read Error Count"),
4910         uint32("ctl_bad_ack_frag_list", "Control Bad ACK Fragment List Count"),
4911         uint32("ctl_no_data_read", "Control No Data Read Count"),
4912         uint32("write_dup_req", "Write Duplicate Request Count"),
4913         uint32("shouldnt_be_ack_here", "Shouldn't Be ACKing Here Count"),
4914         uint32("write_incon_packet_len", "Write Inconsistent Packet Lengths Count"),
4915         uint32("first_packet_isnt_a_write", "First Packet Isn't A Write Count"),
4916         uint32("write_trash_dup_req", "Write Trashed Duplicate Request Count"),
4917         uint32("big_write_inv_message_num", "Big Write Invalid Message Number Count"),
4918         uint32("big_write_being_torn_down", "Big Write Being Torn Down Count"),
4919         uint32("big_write_being_abort", "Big Write Being Aborted Count"),
4920         uint32("zero_ack_frag", "Zero ACK Fragment Count"),
4921         uint32("write_curr_trans", "Write Currently Transmitting Count"),
4922         uint32("try_to_write_too_much", "Trying To Write Too Much Count"),
4923         uint32("write_out_of_mem_for_ctl_nodes", "Write Out Of Memory For Control Nodes Count"),
4924         uint32("write_didnt_need_this_frag", "Write Didn't Need This Fragment Count"),
4925         uint32("write_too_many_buf_check", "Write Too Many Buffers Checked Out Count"),
4926         uint32("write_timeout", "Write Time Out Count"),
4927         uint32("write_got_an_ack0", "Write Got An ACK Count 0"),
4928         uint32("write_got_an_ack1", "Write Got An ACK Count 1"),
4929         uint32("poll_abort_conn", "Poller Aborted The Connnection Count"),
4930         uint32("may_had_out_of_order", "Maybe Had Out Of Order Writes Count"),
4931         uint32("had_an_out_of_order", "Had An Out Of Order Write Count"),
4932         uint32("moved_the_ack_bit_dn", "Moved The ACK Bit Down Count"),
4933         uint32("bumped_out_of_order", "Bumped Out Of Order Write Count"),
4934         uint32("poll_rem_old_out_of_order", "Poller Removed Old Out Of Order Count"),
4935         uint32("write_didnt_need_but_req_ack", "Write Didn't Need But Requested ACK Count"),
4936         uint32("write_trash_packet", "Write Trashed Packet Count"),
4937         uint32("too_many_ack_frag", "Too Many ACK Fragments Count"),
4938         uint32("saved_an_out_of_order_packet", "Saved An Out Of Order Packet Count"),
4939         uint32("conn_being_aborted", "Connection Being Aborted Count"),
4940 ], "Packet Burst Information")
4941
4942 PadDSSpaceAllocate              = struct("pad_ds_space_alloc", [
4943     Reserved4,
4944 ])
4945 PadAttributes                   = struct("pad_attributes", [
4946     Reserved6,
4947 ])
4948 PadDataStreamSize               = struct("pad_data_stream_size", [
4949     Reserved4,
4950 ])
4951 PadTotalStreamSize              = struct("pad_total_stream_size", [
4952     Reserved6,
4953 ])
4954 PadCreationInfo                 = struct("pad_creation_info", [
4955     Reserved8,
4956 ])
4957 PadModifyInfo                   = struct("pad_modify_info", [
4958     Reserved10,
4959 ])
4960 PadArchiveInfo                  = struct("pad_archive_info", [
4961     Reserved8,
4962 ])
4963 PadRightsInfo                   = struct("pad_rights_info", [
4964     Reserved2,
4965 ])
4966 PadDirEntry                     = struct("pad_dir_entry", [
4967     Reserved12,
4968 ])
4969 PadEAInfo                       = struct("pad_ea_info", [
4970     Reserved12,
4971 ])
4972 PadNSInfo                       = struct("pad_ns_info", [
4973     Reserved4,
4974 ])
4975 PhyLockStruct                   = struct("phy_lock_struct", [
4976         LoggedCount,
4977         ShareableLockCount,
4978         RecordStart,
4979         RecordEnd,
4980         LogicalConnectionNumber,
4981         TaskNumByte,
4982         LockType,
4983 ], "Physical Locks")
4984 printInfo                       = struct("print_info_struct", [
4985         PrintFlags,
4986         TabSize,
4987         Copies,
4988         PrintToFileFlag,
4989         BannerName,
4990         TargetPrinter,
4991         FormType,
4992 ], "Print Information")
4993 ReplyLevel1Struct       = struct("reply_lvl_1_struct", [
4994     DirHandle,
4995     VolumeNumber,
4996     Reserved4,
4997 ], "Reply Level 1")
4998 ReplyLevel2Struct       = struct("reply_lvl_2_struct", [
4999     VolumeNumberLong,
5000     DirectoryBase,
5001     DOSDirectoryBase,
5002     NameSpace,
5003     DirHandle,
5004 ], "Reply Level 2")
5005 RightsInfoStruct                = struct("rights_info_struct", [
5006         InheritedRightsMask,
5007 ])
5008 RoutersInfo                     = struct("routers_info", [
5009         bytes("node", "Node", 6),
5010         ConnectedLAN,
5011         uint16("route_hops", "Hop Count"),
5012         uint16("route_time", "Route Time"),
5013 ], "Router Information")
5014 RTagStructure                   = struct("r_tag_struct", [
5015         RTagNumber,
5016         ResourceSignature,
5017         ResourceCount,
5018         ResourceName,
5019 ], "Resource Tag")
5020 ScanInfoFileName                = struct("scan_info_file_name", [
5021         SalvageableFileEntryNumber,
5022         FileName,
5023 ])
5024 ScanInfoFileNoName              = struct("scan_info_file_no_name", [
5025         SalvageableFileEntryNumber,
5026 ])
5027 Segments                        = struct("segments", [
5028         uint32("volume_segment_dev_num", "Volume Segment Device Number"),
5029         uint32("volume_segment_offset", "Volume Segment Offset"),
5030         uint32("volume_segment_size", "Volume Segment Size"),
5031 ], "Volume Segment Information")
5032 SemaInfoStruct                  = struct("sema_info_struct", [
5033         LogicalConnectionNumber,
5034         TaskNumByte,
5035 ])
5036 SemaStruct                      = struct("sema_struct", [
5037         OpenCount,
5038         SemaphoreValue,
5039         TaskNumByte,
5040         SemaphoreName,
5041 ], "Semaphore Information")
5042 ServerInfo                      = struct("server_info", [
5043         uint32("reply_canceled", "Reply Canceled Count"),
5044         uint32("write_held_off", "Write Held Off Count"),
5045         uint32("write_held_off_with_dup", "Write Held Off With Duplicate Request"),
5046         uint32("invalid_req_type", "Invalid Request Type Count"),
5047         uint32("being_aborted", "Being Aborted Count"),
5048         uint32("already_doing_realloc", "Already Doing Re-Allocate Count"),
5049         uint32("dealloc_invalid_slot", "De-Allocate Invalid Slot Count"),
5050         uint32("dealloc_being_proc", "De-Allocate Being Processed Count"),
5051         uint32("dealloc_forged_packet", "De-Allocate Forged Packet Count"),
5052         uint32("dealloc_still_transmit", "De-Allocate Still Transmitting Count"),
5053         uint32("start_station_error", "Start Station Error Count"),
5054         uint32("invalid_slot", "Invalid Slot Count"),
5055         uint32("being_processed", "Being Processed Count"),
5056         uint32("forged_packet", "Forged Packet Count"),
5057         uint32("still_transmitting", "Still Transmitting Count"),
5058         uint32("reexecute_request", "Re-Execute Request Count"),
5059         uint32("invalid_sequence_number", "Invalid Sequence Number Count"),
5060         uint32("dup_is_being_sent", "Duplicate Is Being Sent Already Count"),
5061         uint32("sent_pos_ack", "Sent Positive Acknowledge Count"),
5062         uint32("sent_a_dup_reply", "Sent A Duplicate Reply Count"),
5063         uint32("no_mem_for_station", "No Memory For Station Control Count"),
5064         uint32("no_avail_conns", "No Available Connections Count"),
5065         uint32("realloc_slot", "Re-Allocate Slot Count"),
5066         uint32("realloc_slot_came_too_soon", "Re-Allocate Slot Came Too Soon Count"),
5067 ], "Server Information")
5068 ServersSrcInfo                  = struct("servers_src_info", [
5069         ServerNode,
5070         ConnectedLAN,
5071         HopsToNet,
5072 ], "Source Server Information")
5073 SpaceStruct                     = struct("space_struct", [
5074         Level,
5075         MaxSpace,
5076         CurrentSpace,
5077 ], "Space Information")
5078 SPXInformation                  = struct("spx_information", [
5079         uint16("spx_max_conn", "SPX Max Connections Count"),
5080         uint16("spx_max_used_conn", "SPX Max Used Connections"),
5081         uint16("spx_est_conn_req", "SPX Establish Connection Requests"),
5082         uint16("spx_est_conn_fail", "SPX Establish Connection Fail"),
5083         uint16("spx_listen_con_req", "SPX Listen Connect Request"),
5084         uint16("spx_listen_con_fail", "SPX Listen Connect Fail"),
5085         uint32("spx_send", "SPX Send Count"),
5086         uint32("spx_window_choke", "SPX Window Choke Count"),
5087         uint16("spx_bad_send", "SPX Bad Send Count"),
5088         uint16("spx_send_fail", "SPX Send Fail Count"),
5089         uint16("spx_abort_conn", "SPX Aborted Connection"),
5090         uint32("spx_listen_pkt", "SPX Listen Packet Count"),
5091         uint16("spx_bad_listen", "SPX Bad Listen Count"),
5092         uint32("spx_incoming_pkt", "SPX Incoming Packet Count"),
5093         uint16("spx_bad_in_pkt", "SPX Bad In Packet Count"),
5094         uint16("spx_supp_pkt", "SPX Suppressed Packet Count"),
5095         uint16("spx_no_ses_listen", "SPX No Session Listen ECB Count"),
5096         uint16("spx_watch_dog", "SPX Watch Dog Destination Session Count"),
5097 ], "SPX Information")
5098 StackInfo                       = struct("stack_info", [
5099         StackNumber,
5100         fw_string("stack_short_name", "Stack Short Name", 16),
5101 ], "Stack Information")
5102 statsInfo                       = struct("stats_info_struct", [
5103         TotalBytesRead,
5104         TotalBytesWritten,
5105         TotalRequest,
5106 ], "Statistics")
5107 theTimeStruct                   = struct("the_time_struct", [
5108         UTCTimeInSeconds,
5109         FractionalSeconds,
5110         TimesyncStatus,
5111 ])
5112 timeInfo                        = struct("time_info", [
5113         Year,
5114         Month,
5115         Day,
5116         Hour,
5117         Minute,
5118         Second,
5119         DayOfWeek,
5120         uint32("login_expiration_time", "Login Expiration Time"),
5121 ])
5122 TotalStreamSizeStruct           = struct("total_stream_size_struct", [
5123         TotalDataStreamDiskSpaceAlloc,
5124         NumberOfDataStreams,
5125 ])
5126 TrendCounters                   = struct("trend_counters", [
5127         uint32("num_of_cache_checks", "Number Of Cache Checks"),
5128         uint32("num_of_cache_hits", "Number Of Cache Hits"),
5129         uint32("num_of_dirty_cache_checks", "Number Of Dirty Cache Checks"),
5130         uint32("num_of_cache_dirty_checks", "Number Of Cache Dirty Checks"),
5131         uint32("cache_used_while_check", "Cache Used While Checking"),
5132         uint32("wait_till_dirty_blcks_dec", "Wait Till Dirty Blocks Decrease Count"),
5133         uint32("alloc_blck_frm_avail", "Allocate Block From Available Count"),
5134         uint32("alloc_blck_frm_lru", "Allocate Block From LRU Count"),
5135         uint32("alloc_blck_already_wait", "Allocate Block Already Waiting"),
5136         uint32("lru_sit_time", "LRU Sitting Time"),
5137         uint32("num_of_cache_check_no_wait", "Number Of Cache Check No Wait"),
5138         uint32("num_of_cache_hits_no_wait", "Number Of Cache Hits No Wait"),
5139 ], "Trend Counters")
5140 TrusteeStruct                   = struct("trustee_struct", [
5141         endian(ObjectID, LE),
5142         AccessRightsMaskWord,
5143 ])
5144 UpdateDateStruct                = struct("update_date_struct", [
5145         UpdateDate,
5146 ])
5147 UpdateIDStruct                  = struct("update_id_struct", [
5148         UpdateID,
5149 ])
5150 UpdateTimeStruct                = struct("update_time_struct", [
5151         UpdateTime,
5152 ])
5153 UserInformation                 = struct("user_info", [
5154         endian(ConnectionNumber, LE),
5155         UseCount,
5156         Reserved2,
5157         ConnectionServiceType,
5158         Year,
5159         Month,
5160         Day,
5161         Hour,
5162         Minute,
5163         Second,
5164         DayOfWeek,
5165         Status,
5166         Reserved2,
5167         ExpirationTime,
5168         ObjectType,
5169         Reserved2,
5170         TransactionTrackingFlag,
5171         LogicalLockThreshold,
5172         FileWriteFlags,
5173         FileWriteState,
5174         Reserved,
5175         FileLockCount,
5176         RecordLockCount,
5177         TotalBytesRead,
5178         TotalBytesWritten,
5179         TotalRequest,
5180         HeldRequests,
5181         HeldBytesRead,
5182         HeldBytesWritten,
5183 ], "User Information")
5184 VolInfoStructure                = struct("vol_info_struct", [
5185         VolumeType,
5186         Reserved2,
5187         StatusFlagBits,
5188         SectorSize,
5189         SectorsPerClusterLong,
5190         VolumeSizeInClusters,
5191         FreedClusters,
5192         SubAllocFreeableClusters,
5193         FreeableLimboSectors,
5194         NonFreeableLimboSectors,
5195         NonFreeableAvailableSubAllocSectors,
5196         NotUsableSubAllocSectors,
5197         SubAllocClusters,
5198         DataStreamsCount,
5199         LimboDataStreamsCount,
5200         OldestDeletedFileAgeInTicks,
5201         CompressedDataStreamsCount,
5202         CompressedLimboDataStreamsCount,
5203         UnCompressableDataStreamsCount,
5204         PreCompressedSectors,
5205         CompressedSectors,
5206         MigratedFiles,
5207         MigratedSectors,
5208         ClustersUsedByFAT,
5209         ClustersUsedByDirectories,
5210         ClustersUsedByExtendedDirectories,
5211         TotalDirectoryEntries,
5212         UnUsedDirectoryEntries,
5213         TotalExtendedDirectoryExtants,
5214         UnUsedExtendedDirectoryExtants,
5215         ExtendedAttributesDefined,
5216         ExtendedAttributeExtantsUsed,
5217         DirectoryServicesObjectID,
5218         VolumeLastModifiedTime,
5219         VolumeLastModifiedDate,
5220 ], "Volume Information")
5221 VolInfo2Struct                  = struct("vol_info_struct_2", [
5222         uint32("volume_active_count", "Volume Active Count"),
5223         uint32("volume_use_count", "Volume Use Count"),
5224         uint32("mac_root_ids", "MAC Root IDs"),
5225         VolumeLastModifiedTime,
5226         VolumeLastModifiedDate,
5227         uint32("volume_reference_count", "Volume Reference Count"),
5228         uint32("compression_lower_limit", "Compression Lower Limit"),
5229         uint32("outstanding_ios", "Outstanding IOs"),
5230         uint32("outstanding_compression_ios", "Outstanding Compression IOs"),
5231         uint32("compression_ios_limit", "Compression IOs Limit"),
5232 ], "Extended Volume Information")
5233 VolumeStruct                    = struct("volume_struct", [
5234         VolumeNumberLong,
5235         VolumeNameLen,
5236 ])
5237
5238 DataStreamsStruct               = struct("number_of_data_streams_struct", [
5239     NumberOfDataStreamsLong,
5240 ])
5241
5242 ##############################################################################
5243 # NCP Groups
5244 ##############################################################################
5245 def define_groups():
5246         groups['accounting']    = "Accounting"
5247         groups['afp']           = "AFP"
5248         groups['auditing']      = "Auditing"
5249         groups['bindery']       = "Bindery"
5250         groups['connection']    = "Connection"
5251         groups['enhanced']      = "Enhanced File System"
5252         groups['extended']      = "Extended Attribute"
5253         groups['extension']     = "NCP Extension"
5254         groups['file']          = "File System"
5255         groups['fileserver']    = "File Server Environment"
5256         groups['message']       = "Message"
5257         groups['migration']     = "Data Migration"
5258         groups['nds']           = "Novell Directory Services"
5259         groups['pburst']        = "Packet Burst"
5260         groups['print']         = "Print"
5261         groups['remote']        = "Remote"
5262         groups['sync']          = "Synchronization"
5263         groups['tsync']         = "Time Synchronization"
5264         groups['tts']           = "Transaction Tracking"
5265         groups['qms']           = "Queue Management System (QMS)"
5266         groups['stats']         = "Server Statistics"
5267         groups['nmas']          = "Novell Modular Authentication Service"
5268         groups['sss']           = "SecretStore Services"
5269
5270 ##############################################################################
5271 # NCP Errors
5272 ##############################################################################
5273 def define_errors():
5274         errors[0x0000] = "Ok"
5275         errors[0x0001] = "Transaction tracking is available"
5276         errors[0x0002] = "Ok. The data has been written"
5277         errors[0x0003] = "Calling Station is a Manager"
5278
5279         errors[0x0100] = "One or more of the Connection Numbers in the send list are invalid"
5280         errors[0x0101] = "Invalid space limit"
5281         errors[0x0102] = "Insufficient disk space"
5282         errors[0x0103] = "Queue server cannot add jobs"
5283         errors[0x0104] = "Out of disk space"
5284         errors[0x0105] = "Semaphore overflow"
5285         errors[0x0106] = "Invalid Parameter"
5286         errors[0x0107] = "Invalid Number of Minutes to Delay"
5287         errors[0x0108] = "Invalid Start or Network Number"
5288         errors[0x0109] = "Cannot Obtain License"
5289
5290         errors[0x0200] = "One or more clients in the send list are not logged in"
5291         errors[0x0201] = "Queue server cannot attach"
5292
5293         errors[0x0300] = "One or more clients in the send list are not accepting messages"
5294
5295         errors[0x0400] = "Client already has message"
5296         errors[0x0401] = "Queue server cannot service job"
5297
5298         errors[0x7300] = "Revoke Handle Rights Not Found"
5299         errors[0x7900] = "Invalid Parameter in Request Packet"
5300         errors[0x7901] = "Nothing being Compressed"
5301         errors[0x7a00] = "Connection Already Temporary"
5302         errors[0x7b00] = "Connection Already Logged in"
5303         errors[0x7c00] = "Connection Not Authenticated"
5304
5305         errors[0x7e00] = "NCP failed boundary check"
5306         errors[0x7e01] = "Invalid Length"
5307
5308         errors[0x7f00] = "Lock Waiting"
5309         errors[0x8000] = "Lock fail"
5310         errors[0x8001] = "File in Use"
5311
5312         errors[0x8100] = "A file handle could not be allocated by the file server"
5313         errors[0x8101] = "Out of File Handles"
5314
5315         errors[0x8200] = "Unauthorized to open the file"
5316         errors[0x8300] = "Unable to read/write the volume. Possible bad sector on the file server"
5317         errors[0x8301] = "Hard I/O Error"
5318
5319         errors[0x8400] = "Unauthorized to create the directory"
5320         errors[0x8401] = "Unauthorized to create the file"
5321
5322         errors[0x8500] = "Unauthorized to delete the specified file"
5323         errors[0x8501] = "Unauthorized to overwrite an existing file in this directory"
5324
5325         errors[0x8700] = "An unexpected character was encountered in the filename"
5326         errors[0x8701] = "Create Filename Error"
5327
5328         errors[0x8800] = "Invalid file handle"
5329         errors[0x8900] = "Unauthorized to search this file/directory"
5330         errors[0x8a00] = "Unauthorized to delete this file/directory"
5331         errors[0x8b00] = "Unauthorized to rename a file in this directory"
5332
5333         errors[0x8c00] = "No set privileges"
5334         errors[0x8c01] = "Unauthorized to modify a file in this directory"
5335         errors[0x8c02] = "Unauthorized to change the restriction on this volume"
5336
5337         errors[0x8d00] = "Some of the affected files are in use by another client"
5338         errors[0x8d01] = "The affected file is in use"
5339
5340         errors[0x8e00] = "All of the affected files are in use by another client"
5341         errors[0x8f00] = "Some of the affected files are read-only"
5342
5343         errors[0x9000] = "An attempt to modify a read-only volume occurred"
5344         errors[0x9001] = "All of the affected files are read-only"
5345         errors[0x9002] = "Read Only Access to Volume"
5346
5347         errors[0x9100] = "Some of the affected files already exist"
5348         errors[0x9101] = "Some Names Exist"
5349
5350         errors[0x9200] = "Directory with the new name already exists"
5351         errors[0x9201] = "All of the affected files already exist"
5352
5353         errors[0x9300] = "Unauthorized to read from this file"
5354         errors[0x9400] = "Unauthorized to write to this file"
5355         errors[0x9500] = "The affected file is detached"
5356
5357         errors[0x9600] = "The file server has run out of memory to service this request"
5358         errors[0x9601] = "No alloc space for message"
5359         errors[0x9602] = "Server Out of Space"
5360
5361         errors[0x9800] = "The affected volume is not mounted"
5362         errors[0x9801] = "The volume associated with Volume Number is not mounted"
5363         errors[0x9802] = "The resulting volume does not exist"
5364         errors[0x9803] = "The destination volume is not mounted"
5365         errors[0x9804] = "Disk Map Error"
5366
5367         errors[0x9900] = "The file server has run out of directory space on the affected volume"
5368         errors[0x9a00] = "Invalid request to rename the affected file to another volume"
5369
5370         errors[0x9b00] = "DirHandle is not associated with a valid directory path"
5371         errors[0x9b01] = "A resulting directory handle is not associated with a valid directory path"
5372         errors[0x9b02] = "The directory associated with DirHandle does not exist"
5373         errors[0x9b03] = "Bad directory handle"
5374
5375         errors[0x9c00] = "The resulting path is not valid"
5376         errors[0x9c01] = "The resulting file path is not valid"
5377         errors[0x9c02] = "The resulting directory path is not valid"
5378         errors[0x9c03] = "Invalid path"
5379
5380         errors[0x9d00] = "A directory handle was not available for allocation"
5381
5382         errors[0x9e00] = "The name of the directory does not conform to a legal name for this name space"
5383         errors[0x9e01] = "The new directory name does not conform to a legal name for this name space"
5384         errors[0x9e02] = "Bad File Name"
5385
5386         errors[0x9f00] = "The request attempted to delete a directory that is in use by another client"
5387
5388         errors[0xa000] = "The request attempted to delete a directory that is not empty"
5389         errors[0xa100] = "An unrecoverable error occured on the affected directory"
5390
5391         errors[0xa200] = "The request attempted to read from a file region that is physically locked"
5392         errors[0xa201] = "I/O Lock Error"
5393
5394         errors[0xa400] = "Invalid directory rename attempted"
5395         errors[0xa500] = "Invalid open create mode"
5396         errors[0xa600] = "Auditor Access has been Removed"
5397         errors[0xa700] = "Error Auditing Version"
5398
5399         errors[0xa800] = "Invalid Support Module ID"
5400         errors[0xa801] = "No Auditing Access Rights"
5401         errors[0xa802] = "No Access Rights"
5402
5403         errors[0xa900] = "Error Link in Path"
5404         errors[0xa901] = "Invalid Data Type Flag (outdated return value - replaced in NSS as 0x89aa error)"
5405
5406         errors[0xaa00] = "Invalid Data Type Flag"
5407
5408         errors[0xbe00] = "Invalid Data Stream"
5409         errors[0xbf00] = "Requests for this name space are not valid on this volume"
5410
5411         errors[0xc000] = "Unauthorized to retrieve accounting data"
5412
5413         errors[0xc100] = "The ACCOUNT_BALANCE property does not exist"
5414         errors[0xc101] = "No Account Balance"
5415
5416         errors[0xc200] = "The object has exceeded its credit limit"
5417         errors[0xc300] = "Too many holds have been placed against this account"
5418         errors[0xc400] = "The client account has been disabled"
5419
5420         errors[0xc500] = "Access to the account has been denied because of intruder detection"
5421         errors[0xc501] = "Login lockout"
5422         errors[0xc502] = "Server Login Locked"
5423
5424         errors[0xc600] = "The caller does not have operator privileges"
5425         errors[0xc601] = "The client does not have operator privileges"
5426
5427         errors[0xc800] = "Missing EA Key"
5428         errors[0xc900] = "EA Not Found"
5429         errors[0xca00] = "Invalid EA Handle Type"
5430         errors[0xcb00] = "EA No Key No Data"
5431         errors[0xcc00] = "EA Number Mismatch"
5432         errors[0xcd00] = "Extent Number Out of Range"
5433         errors[0xce00] = "EA Bad Directory Number"
5434         errors[0xcf00] = "Invalid EA Handle"
5435
5436         errors[0xd000] = "Queue error"
5437         errors[0xd001] = "EA Position Out of Range"
5438
5439         errors[0xd100] = "The queue does not exist"
5440         errors[0xd101] = "EA Access Denied"
5441
5442         errors[0xd200] = "A queue server is not associated with this queue"
5443         errors[0xd201] = "A queue server is not associated with the selected queue"
5444         errors[0xd202] = "No queue server"
5445         errors[0xd203] = "Data Page Odd Size"
5446
5447         errors[0xd300] = "No queue rights"
5448         errors[0xd301] = "EA Volume Not Mounted"
5449
5450         errors[0xd400] = "The queue is full and cannot accept another request"
5451         errors[0xd401] = "The queue associated with ObjectId is full and cannot accept another request"
5452         errors[0xd402] = "Bad Page Boundary"
5453
5454         errors[0xd500] = "A job does not exist in this queue"
5455         errors[0xd501] = "No queue job"
5456         errors[0xd502] = "The job associated with JobNumber does not exist in this queue"
5457         errors[0xd503] = "Inspect Failure"
5458         errors[0xd504] = "Unknown NCP Extension Number"
5459
5460         errors[0xd600] = "The file server does not allow unencrypted passwords"
5461         errors[0xd601] = "No job right"
5462         errors[0xd602] = "EA Already Claimed"
5463
5464         errors[0xd700] = "Bad account"
5465         errors[0xd701] = "The old and new password strings are identical"
5466         errors[0xd702] = "The job is currently being serviced"
5467         errors[0xd703] = "The queue is currently servicing a job"
5468         errors[0xd704] = "Queue servicing"
5469         errors[0xd705] = "Odd Buffer Size"
5470
5471         errors[0xd800] = "Queue not active"
5472         errors[0xd801] = "No Scorecards"
5473
5474         errors[0xd900] = "The file server cannot accept another connection as it has reached its limit"
5475         errors[0xd901] = "The client is not security equivalent to one of the objects in the Q_SERVERS group property of the target queue"
5476         errors[0xd902] = "Station is not a server"
5477         errors[0xd903] = "Bad EDS Signature"
5478         errors[0xd904] = "Attempt to log in using an account which has limits on the number of concurrent connections and that number has been reached."
5479     
5480         errors[0xda00] = "Attempted to login to the file server during a restricted time period"
5481         errors[0xda01] = "Queue halted"
5482         errors[0xda02] = "EA Space Limit"
5483
5484         errors[0xdb00] = "Attempted to login to the file server from an unauthorized workstation or network"
5485         errors[0xdb01] = "The queue cannot attach another queue server"
5486         errors[0xdb02] = "Maximum queue servers"
5487         errors[0xdb03] = "EA Key Corrupt"
5488
5489         errors[0xdc00] = "Account Expired"
5490         errors[0xdc01] = "EA Key Limit"
5491
5492         errors[0xdd00] = "Tally Corrupt"
5493         errors[0xde00] = "Attempted to login to the file server with an incorrect password"
5494         errors[0xdf00] = "Attempted to login to the file server with a password that has expired"
5495
5496         errors[0xe000] = "No Login Connections Available"
5497         errors[0xe700] = "No disk track"
5498         errors[0xe800] = "Write to group"
5499         errors[0xe900] = "The object is already a member of the group property"
5500
5501         errors[0xea00] = "No such member"
5502         errors[0xea01] = "The bindery object is not a member of the set"
5503         errors[0xea02] = "Non-existent member"
5504
5505         errors[0xeb00] = "The property is not a set property"
5506
5507         errors[0xec00] = "No such set"
5508         errors[0xec01] = "The set property does not exist"
5509
5510         errors[0xed00] = "Property exists"
5511         errors[0xed01] = "The property already exists"
5512         errors[0xed02] = "An attempt was made to create a bindery object property that already exists"
5513
5514         errors[0xee00] = "The object already exists"
5515         errors[0xee01] = "The bindery object already exists"
5516
5517         errors[0xef00] = "Illegal name"
5518         errors[0xef01] = "Illegal characters in ObjectName field"
5519         errors[0xef02] = "Invalid name"
5520
5521         errors[0xf000] = "A wildcard was detected in a field that does not support wildcards"
5522         errors[0xf001] = "An illegal wildcard was detected in ObjectName"
5523
5524         errors[0xf100] = "The client does not have the rights to access this bindery object"
5525         errors[0xf101] = "Bindery security"
5526         errors[0xf102] = "Invalid bindery security"
5527
5528         errors[0xf200] = "Unauthorized to read from this object"
5529         errors[0xf300] = "Unauthorized to rename this object"
5530
5531         errors[0xf400] = "Unauthorized to delete this object"
5532         errors[0xf401] = "No object delete privileges"
5533         errors[0xf402] = "Unauthorized to delete this queue"
5534
5535         errors[0xf500] = "Unauthorized to create this object"
5536         errors[0xf501] = "No object create"
5537
5538         errors[0xf600] = "No property delete"
5539         errors[0xf601] = "Unauthorized to delete the property of this object"
5540         errors[0xf602] = "Unauthorized to delete this property"
5541
5542         errors[0xf700] = "Unauthorized to create this property"
5543         errors[0xf701] = "No property create privilege"
5544
5545         errors[0xf800] = "Unauthorized to write to this property"
5546         errors[0xf900] = "Unauthorized to read this property"
5547         errors[0xfa00] = "Temporary remap error"
5548
5549         errors[0xfb00] = "No such property"
5550         errors[0xfb01] = "The file server does not support this request"
5551         errors[0xfb02] = "The specified property does not exist"
5552         errors[0xfb03] = "The PASSWORD property does not exist for this bindery object"
5553         errors[0xfb04] = "NDS NCP not available"
5554         errors[0xfb05] = "Bad Directory Handle"
5555         errors[0xfb06] = "Unknown Request"
5556         errors[0xfb07] = "Invalid Subfunction Request"
5557         errors[0xfb08] = "Attempt to use an invalid parameter (drive number, path, or flag value) during a set drive path call"
5558         errors[0xfb09] = "NMAS not running on this server, NCP NOT Supported"
5559         errors[0xfb0a] = "Station Not Logged In"
5560         errors[0xfb0b] = "Secret Store not running on this server, NCP Not supported"
5561
5562         errors[0xfc00] = "The message queue cannot accept another message"
5563         errors[0xfc01] = "The trustee associated with ObjectId does not exist"
5564         errors[0xfc02] = "The specified bindery object does not exist"
5565         errors[0xfc03] = "The bindery object associated with ObjectID does not exist"
5566         errors[0xfc04] = "A bindery object does not exist that matches"
5567         errors[0xfc05] = "The specified queue does not exist"
5568         errors[0xfc06] = "No such object"
5569         errors[0xfc07] = "The queue associated with ObjectID does not exist"
5570
5571         errors[0xfd00] = "Bad station number"
5572         errors[0xfd01] = "The connection associated with ConnectionNumber is not active"
5573         errors[0xfd02] = "Lock collision"
5574         errors[0xfd03] = "Transaction tracking is disabled"
5575
5576         errors[0xfe00] = "I/O failure"
5577         errors[0xfe01] = "The files containing the bindery on the file server are locked"
5578         errors[0xfe02] = "A file with the specified name already exists in this directory"
5579         errors[0xfe03] = "No more restrictions were found"
5580         errors[0xfe04] = "The file server was unable to lock the file within the specified time limit"
5581         errors[0xfe05] = "The file server was unable to lock all files within the specified time limit"
5582         errors[0xfe06] = "The bindery object associated with ObjectID is not a valid trustee"
5583         errors[0xfe07] = "Directory locked"
5584         errors[0xfe08] = "Bindery locked"
5585         errors[0xfe09] = "Invalid semaphore name length"
5586         errors[0xfe0a] = "The file server was unable to complete the operation within the specified time limit"
5587         errors[0xfe0b] = "Transaction restart"
5588         errors[0xfe0c] = "Bad packet"
5589         errors[0xfe0d] = "Timeout"
5590         errors[0xfe0e] = "User Not Found"
5591         errors[0xfe0f] = "Trustee Not Found"
5592
5593         errors[0xff00] = "Failure"
5594         errors[0xff01] = "Lock error"
5595         errors[0xff02] = "File not found"
5596         errors[0xff03] = "The file not found or cannot be unlocked"
5597         errors[0xff04] = "Record not found"
5598         errors[0xff05] = "The logical record was not found"
5599         errors[0xff06] = "The printer associated with Printer Number does not exist"
5600         errors[0xff07] = "No such printer"
5601         errors[0xff08] = "Unable to complete the request"
5602         errors[0xff09] = "Unauthorized to change privileges of this trustee"
5603         errors[0xff0a] = "No files matching the search criteria were found"
5604         errors[0xff0b] = "A file matching the search criteria was not found"
5605         errors[0xff0c] = "Verification failed"
5606         errors[0xff0d] = "Object associated with ObjectID is not a manager"
5607         errors[0xff0e] = "Invalid initial semaphore value"
5608         errors[0xff0f] = "The semaphore handle is not valid"
5609         errors[0xff10] = "SemaphoreHandle is not associated with a valid sempahore"
5610         errors[0xff11] = "Invalid semaphore handle"
5611         errors[0xff12] = "Transaction tracking is not available"
5612         errors[0xff13] = "The transaction has not yet been written to disk"
5613         errors[0xff14] = "Directory already exists"
5614         errors[0xff15] = "The file already exists and the deletion flag was not set"
5615         errors[0xff16] = "No matching files or directories were found"
5616         errors[0xff17] = "A file or directory matching the search criteria was not found"
5617         errors[0xff18] = "The file already exists"
5618         errors[0xff19] = "Failure, No files found"
5619         errors[0xff1a] = "Unlock Error"
5620         errors[0xff1b] = "I/O Bound Error"
5621         errors[0xff1c] = "Not Accepting Messages"
5622         errors[0xff1d] = "No More Salvageable Files in Directory"
5623         errors[0xff1e] = "Calling Station is Not a Manager"
5624         errors[0xff1f] = "Bindery Failure"
5625         errors[0xff20] = "NCP Extension Not Found"
5626         errors[0xff21] = "Audit Property Not Found"
5627
5628 ##############################################################################
5629 # Produce C code
5630 ##############################################################################
5631 def ExamineVars(vars, structs_hash, vars_hash):
5632         for var in vars:
5633                 if isinstance(var, struct):
5634                         structs_hash[var.HFName()] = var
5635                         struct_vars = var.Variables()
5636                         ExamineVars(struct_vars, structs_hash, vars_hash)
5637                 else:
5638                         vars_hash[repr(var)] = var
5639                         if isinstance(var, bitfield):
5640                                 sub_vars = var.SubVariables()
5641                                 ExamineVars(sub_vars, structs_hash, vars_hash)
5642
5643 def produce_code():
5644
5645         global errors
5646
5647         print "/*"
5648         print " * Generated automatically from %s" % (sys.argv[0])
5649         print " * Do not edit this file manually, as all changes will be lost."
5650         print " */\n"
5651
5652         print """
5653 /*
5654  * Portions Copyright (c) Gilbert Ramirez 2000-2002
5655  * Portions Copyright (c) Novell, Inc. 2000-2005
5656  *
5657  * This program is free software; you can redistribute it and/or
5658  * modify it under the terms of the GNU General Public License
5659  * as published by the Free Software Foundation; either version 2
5660  * of the License, or (at your option) any later version.
5661  *
5662  * This program is distributed in the hope that it will be useful,
5663  * but WITHOUT ANY WARRANTY; without even the implied warranty of
5664  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5665  * GNU General Public License for more details.
5666  *
5667  * You should have received a copy of the GNU General Public License
5668  * along with this program; if not, write to the Free Software
5669  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
5670  */
5671
5672 #ifdef HAVE_CONFIG_H
5673 # include "config.h"
5674 #endif
5675
5676 #include <string.h>
5677 #include <glib.h>
5678 #include <epan/packet.h>
5679 #include <epan/conversation.h>
5680 #include <epan/ptvcursor.h>
5681 #include <epan/emem.h>
5682 #include "packet-ncp-int.h"
5683 #include "packet-ncp-nmas.h"
5684 #include "packet-ncp-sss.h"
5685 #include <epan/strutil.h>
5686 #include "reassemble.h"
5687 #include <epan/tap.h>
5688
5689 /* Function declarations for functions used in proto_register_ncp2222() */
5690 static void ncp_init_protocol(void);
5691 static void ncp_postseq_cleanup(void);
5692
5693 /* Endianness macros */
5694 #define BE              0
5695 #define LE              1
5696 #define NO_ENDIANNESS   0
5697
5698 #define NO_LENGTH       -1
5699
5700 /* We use this int-pointer as a special flag in ptvc_record's */
5701 static int ptvc_struct_int_storage;
5702 #define PTVC_STRUCT     (&ptvc_struct_int_storage)
5703
5704 /* Values used in the count-variable ("var"/"repeat") logic. */"""
5705
5706
5707         if global_highest_var > -1:
5708                 print "#define NUM_REPEAT_VARS\t%d" % (global_highest_var + 1)
5709                 print "guint repeat_vars[NUM_REPEAT_VARS];",
5710         else:
5711                 print "#define NUM_REPEAT_VARS\t0"
5712                 print "guint *repeat_vars = NULL;",
5713
5714         print """
5715 #define NO_VAR          NUM_REPEAT_VARS
5716 #define NO_REPEAT       NUM_REPEAT_VARS
5717
5718 #define REQ_COND_SIZE_CONSTANT  0
5719 #define REQ_COND_SIZE_VARIABLE  1
5720 #define NO_REQ_COND_SIZE        0
5721
5722
5723 #define NTREE   0x00020000
5724 #define NDEPTH  0x00000002
5725 #define NREV    0x00000004
5726 #define NFLAGS  0x00000008
5727
5728 static int hf_ncp_func = -1;
5729 static int hf_ncp_length = -1;
5730 static int hf_ncp_subfunc = -1;
5731 static int hf_ncp_group = -1;
5732 static int hf_ncp_fragment_handle = -1;
5733 static int hf_ncp_completion_code = -1;
5734 static int hf_ncp_connection_status = -1;
5735 static int hf_ncp_req_frame_num = -1;
5736 static int hf_ncp_req_frame_time = -1;
5737 static int hf_ncp_fragment_size = -1;
5738 static int hf_ncp_message_size = -1;
5739 static int hf_ncp_nds_flag = -1;
5740 static int hf_ncp_nds_verb = -1;
5741 static int hf_ping_version = -1;
5742 static int hf_nds_version = -1;
5743 static int hf_nds_flags = -1;
5744 static int hf_nds_reply_depth = -1;
5745 static int hf_nds_reply_rev = -1;
5746 static int hf_nds_reply_flags = -1;
5747 static int hf_nds_p1type = -1;
5748 static int hf_nds_uint32value = -1;
5749 static int hf_nds_bit1 = -1;
5750 static int hf_nds_bit2 = -1;
5751 static int hf_nds_bit3 = -1;
5752 static int hf_nds_bit4 = -1;
5753 static int hf_nds_bit5 = -1;
5754 static int hf_nds_bit6 = -1;
5755 static int hf_nds_bit7 = -1;
5756 static int hf_nds_bit8 = -1;
5757 static int hf_nds_bit9 = -1;
5758 static int hf_nds_bit10 = -1;
5759 static int hf_nds_bit11 = -1;
5760 static int hf_nds_bit12 = -1;
5761 static int hf_nds_bit13 = -1;
5762 static int hf_nds_bit14 = -1;
5763 static int hf_nds_bit15 = -1;
5764 static int hf_nds_bit16 = -1;
5765 static int hf_bit1outflags = -1;
5766 static int hf_bit2outflags = -1;
5767 static int hf_bit3outflags = -1;
5768 static int hf_bit4outflags = -1;
5769 static int hf_bit5outflags = -1;
5770 static int hf_bit6outflags = -1;
5771 static int hf_bit7outflags = -1;
5772 static int hf_bit8outflags = -1;
5773 static int hf_bit9outflags = -1;
5774 static int hf_bit10outflags = -1;
5775 static int hf_bit11outflags = -1;
5776 static int hf_bit12outflags = -1;
5777 static int hf_bit13outflags = -1;
5778 static int hf_bit14outflags = -1;
5779 static int hf_bit15outflags = -1;
5780 static int hf_bit16outflags = -1;
5781 static int hf_bit1nflags = -1;
5782 static int hf_bit2nflags = -1;
5783 static int hf_bit3nflags = -1;
5784 static int hf_bit4nflags = -1;
5785 static int hf_bit5nflags = -1;
5786 static int hf_bit6nflags = -1;
5787 static int hf_bit7nflags = -1;
5788 static int hf_bit8nflags = -1;
5789 static int hf_bit9nflags = -1;
5790 static int hf_bit10nflags = -1;
5791 static int hf_bit11nflags = -1;
5792 static int hf_bit12nflags = -1;
5793 static int hf_bit13nflags = -1;
5794 static int hf_bit14nflags = -1;
5795 static int hf_bit15nflags = -1;
5796 static int hf_bit16nflags = -1;
5797 static int hf_bit1rflags = -1;
5798 static int hf_bit2rflags = -1;
5799 static int hf_bit3rflags = -1;
5800 static int hf_bit4rflags = -1;
5801 static int hf_bit5rflags = -1;
5802 static int hf_bit6rflags = -1;
5803 static int hf_bit7rflags = -1;
5804 static int hf_bit8rflags = -1;
5805 static int hf_bit9rflags = -1;
5806 static int hf_bit10rflags = -1;
5807 static int hf_bit11rflags = -1;
5808 static int hf_bit12rflags = -1;
5809 static int hf_bit13rflags = -1;
5810 static int hf_bit14rflags = -1;
5811 static int hf_bit15rflags = -1;
5812 static int hf_bit16rflags = -1;
5813 static int hf_bit1cflags = -1;
5814 static int hf_bit2cflags = -1;
5815 static int hf_bit3cflags = -1;
5816 static int hf_bit4cflags = -1;
5817 static int hf_bit5cflags = -1;
5818 static int hf_bit6cflags = -1;
5819 static int hf_bit7cflags = -1;
5820 static int hf_bit8cflags = -1;
5821 static int hf_bit9cflags = -1;
5822 static int hf_bit10cflags = -1;
5823 static int hf_bit11cflags = -1;
5824 static int hf_bit12cflags = -1;
5825 static int hf_bit13cflags = -1;
5826 static int hf_bit14cflags = -1;
5827 static int hf_bit15cflags = -1;
5828 static int hf_bit16cflags = -1;
5829 static int hf_bit1acflags = -1;
5830 static int hf_bit2acflags = -1;
5831 static int hf_bit3acflags = -1;
5832 static int hf_bit4acflags = -1;
5833 static int hf_bit5acflags = -1;
5834 static int hf_bit6acflags = -1;
5835 static int hf_bit7acflags = -1;
5836 static int hf_bit8acflags = -1;
5837 static int hf_bit9acflags = -1;
5838 static int hf_bit10acflags = -1;
5839 static int hf_bit11acflags = -1;
5840 static int hf_bit12acflags = -1;
5841 static int hf_bit13acflags = -1;
5842 static int hf_bit14acflags = -1;
5843 static int hf_bit15acflags = -1;
5844 static int hf_bit16acflags = -1;
5845 static int hf_bit1vflags = -1;
5846 static int hf_bit2vflags = -1;
5847 static int hf_bit3vflags = -1;
5848 static int hf_bit4vflags = -1;
5849 static int hf_bit5vflags = -1;
5850 static int hf_bit6vflags = -1;
5851 static int hf_bit7vflags = -1;
5852 static int hf_bit8vflags = -1;
5853 static int hf_bit9vflags = -1;
5854 static int hf_bit10vflags = -1;
5855 static int hf_bit11vflags = -1;
5856 static int hf_bit12vflags = -1;
5857 static int hf_bit13vflags = -1;
5858 static int hf_bit14vflags = -1;
5859 static int hf_bit15vflags = -1;
5860 static int hf_bit16vflags = -1;
5861 static int hf_bit1eflags = -1;
5862 static int hf_bit2eflags = -1;
5863 static int hf_bit3eflags = -1;
5864 static int hf_bit4eflags = -1;
5865 static int hf_bit5eflags = -1;
5866 static int hf_bit6eflags = -1;
5867 static int hf_bit7eflags = -1;
5868 static int hf_bit8eflags = -1;
5869 static int hf_bit9eflags = -1;
5870 static int hf_bit10eflags = -1;
5871 static int hf_bit11eflags = -1;
5872 static int hf_bit12eflags = -1;
5873 static int hf_bit13eflags = -1;
5874 static int hf_bit14eflags = -1;
5875 static int hf_bit15eflags = -1;
5876 static int hf_bit16eflags = -1;
5877 static int hf_bit1infoflagsl = -1;
5878 static int hf_bit2infoflagsl = -1;
5879 static int hf_bit3infoflagsl = -1;
5880 static int hf_bit4infoflagsl = -1;
5881 static int hf_bit5infoflagsl = -1;
5882 static int hf_bit6infoflagsl = -1;
5883 static int hf_bit7infoflagsl = -1;
5884 static int hf_bit8infoflagsl = -1;
5885 static int hf_bit9infoflagsl = -1;
5886 static int hf_bit10infoflagsl = -1;
5887 static int hf_bit11infoflagsl = -1;
5888 static int hf_bit12infoflagsl = -1;
5889 static int hf_bit13infoflagsl = -1;
5890 static int hf_bit14infoflagsl = -1;
5891 static int hf_bit15infoflagsl = -1;
5892 static int hf_bit16infoflagsl = -1;
5893 static int hf_bit1infoflagsh = -1;
5894 static int hf_bit2infoflagsh = -1;
5895 static int hf_bit3infoflagsh = -1;
5896 static int hf_bit4infoflagsh = -1;
5897 static int hf_bit5infoflagsh = -1;
5898 static int hf_bit6infoflagsh = -1;
5899 static int hf_bit7infoflagsh = -1;
5900 static int hf_bit8infoflagsh = -1;
5901 static int hf_bit9infoflagsh = -1;
5902 static int hf_bit10infoflagsh = -1;
5903 static int hf_bit11infoflagsh = -1;
5904 static int hf_bit12infoflagsh = -1;
5905 static int hf_bit13infoflagsh = -1;
5906 static int hf_bit14infoflagsh = -1;
5907 static int hf_bit15infoflagsh = -1;
5908 static int hf_bit16infoflagsh = -1;
5909 static int hf_bit1lflags = -1;
5910 static int hf_bit2lflags = -1;
5911 static int hf_bit3lflags = -1;
5912 static int hf_bit4lflags = -1;
5913 static int hf_bit5lflags = -1;
5914 static int hf_bit6lflags = -1;
5915 static int hf_bit7lflags = -1;
5916 static int hf_bit8lflags = -1;
5917 static int hf_bit9lflags = -1;
5918 static int hf_bit10lflags = -1;
5919 static int hf_bit11lflags = -1;
5920 static int hf_bit12lflags = -1;
5921 static int hf_bit13lflags = -1;
5922 static int hf_bit14lflags = -1;
5923 static int hf_bit15lflags = -1;
5924 static int hf_bit16lflags = -1;
5925 static int hf_bit1l1flagsl = -1;
5926 static int hf_bit2l1flagsl = -1;
5927 static int hf_bit3l1flagsl = -1;
5928 static int hf_bit4l1flagsl = -1;
5929 static int hf_bit5l1flagsl = -1;
5930 static int hf_bit6l1flagsl = -1;
5931 static int hf_bit7l1flagsl = -1;
5932 static int hf_bit8l1flagsl = -1;
5933 static int hf_bit9l1flagsl = -1;
5934 static int hf_bit10l1flagsl = -1;
5935 static int hf_bit11l1flagsl = -1;
5936 static int hf_bit12l1flagsl = -1;
5937 static int hf_bit13l1flagsl = -1;
5938 static int hf_bit14l1flagsl = -1;
5939 static int hf_bit15l1flagsl = -1;
5940 static int hf_bit16l1flagsl = -1;
5941 static int hf_bit1l1flagsh = -1;
5942 static int hf_bit2l1flagsh = -1;
5943 static int hf_bit3l1flagsh = -1;
5944 static int hf_bit4l1flagsh = -1;
5945 static int hf_bit5l1flagsh = -1;
5946 static int hf_bit6l1flagsh = -1;
5947 static int hf_bit7l1flagsh = -1;
5948 static int hf_bit8l1flagsh = -1;
5949 static int hf_bit9l1flagsh = -1;
5950 static int hf_bit10l1flagsh = -1;
5951 static int hf_bit11l1flagsh = -1;
5952 static int hf_bit12l1flagsh = -1;
5953 static int hf_bit13l1flagsh = -1;
5954 static int hf_bit14l1flagsh = -1;
5955 static int hf_bit15l1flagsh = -1;
5956 static int hf_bit16l1flagsh = -1;
5957 static int hf_nds_tree_name = -1;
5958 static int hf_nds_reply_error = -1;
5959 static int hf_nds_net = -1;
5960 static int hf_nds_node = -1;
5961 static int hf_nds_socket = -1;
5962 static int hf_add_ref_ip = -1;
5963 static int hf_add_ref_udp = -1;
5964 static int hf_add_ref_tcp = -1;
5965 static int hf_referral_record = -1;
5966 static int hf_referral_addcount = -1;
5967 static int hf_nds_port = -1;
5968 static int hf_mv_string = -1;
5969 static int hf_nds_syntax = -1;
5970 static int hf_value_string = -1;
5971 static int hf_nds_buffer_size = -1;
5972 static int hf_nds_ver = -1;
5973 static int hf_nds_nflags = -1;
5974 static int hf_nds_scope = -1;
5975 static int hf_nds_name = -1;
5976 static int hf_nds_comm_trans = -1;
5977 static int hf_nds_tree_trans = -1;
5978 static int hf_nds_iteration = -1;
5979 static int hf_nds_eid = -1;
5980 static int hf_nds_info_type = -1;
5981 static int hf_nds_all_attr = -1;
5982 static int hf_nds_req_flags = -1;
5983 static int hf_nds_attr = -1;
5984 static int hf_nds_crc = -1;
5985 static int hf_nds_referrals = -1;
5986 static int hf_nds_result_flags = -1;
5987 static int hf_nds_tag_string = -1;
5988 static int hf_value_bytes = -1;
5989 static int hf_replica_type = -1;
5990 static int hf_replica_state = -1;
5991 static int hf_replica_number = -1;
5992 static int hf_min_nds_ver = -1;
5993 static int hf_nds_ver_include = -1;
5994 static int hf_nds_ver_exclude = -1;
5995 static int hf_nds_es = -1;
5996 static int hf_es_type = -1;
5997 static int hf_delim_string = -1;
5998 static int hf_rdn_string = -1;
5999 static int hf_nds_revent = -1;
6000 static int hf_nds_rnum = -1;
6001 static int hf_nds_name_type = -1;
6002 static int hf_nds_rflags = -1;
6003 static int hf_nds_eflags = -1;
6004 static int hf_nds_depth = -1;
6005 static int hf_nds_class_def_type = -1;
6006 static int hf_nds_classes = -1;
6007 static int hf_nds_return_all_classes = -1;
6008 static int hf_nds_stream_flags = -1;
6009 static int hf_nds_stream_name = -1;
6010 static int hf_nds_file_handle = -1;
6011 static int hf_nds_file_size = -1;
6012 static int hf_nds_dn_output_type = -1;
6013 static int hf_nds_nested_output_type = -1;
6014 static int hf_nds_output_delimiter = -1;
6015 static int hf_nds_output_entry_specifier = -1;
6016 static int hf_es_value = -1;
6017 static int hf_es_rdn_count = -1;
6018 static int hf_nds_replica_num = -1;
6019 static int hf_nds_event_num = -1;
6020 static int hf_es_seconds = -1;
6021 static int hf_nds_compare_results = -1;
6022 static int hf_nds_parent = -1;
6023 static int hf_nds_name_filter = -1;
6024 static int hf_nds_class_filter = -1;
6025 static int hf_nds_time_filter = -1;
6026 static int hf_nds_partition_root_id = -1;
6027 static int hf_nds_replicas = -1;
6028 static int hf_nds_purge = -1;
6029 static int hf_nds_local_partition = -1;
6030 static int hf_partition_busy = -1;
6031 static int hf_nds_number_of_changes = -1;
6032 static int hf_sub_count = -1;
6033 static int hf_nds_revision = -1;
6034 static int hf_nds_base_class = -1;
6035 static int hf_nds_relative_dn = -1;
6036 static int hf_nds_root_dn = -1;
6037 static int hf_nds_parent_dn = -1;
6038 static int hf_deref_base = -1;
6039 static int hf_nds_entry_info = -1;
6040 static int hf_nds_base = -1;
6041 static int hf_nds_privileges = -1;
6042 static int hf_nds_vflags = -1;
6043 static int hf_nds_value_len = -1;
6044 static int hf_nds_cflags = -1;
6045 static int hf_nds_acflags = -1;
6046 static int hf_nds_asn1 = -1;
6047 static int hf_nds_upper = -1;
6048 static int hf_nds_lower = -1;
6049 static int hf_nds_trustee_dn = -1;
6050 static int hf_nds_attribute_dn = -1;
6051 static int hf_nds_acl_add = -1;
6052 static int hf_nds_acl_del = -1;
6053 static int hf_nds_att_add = -1;
6054 static int hf_nds_att_del = -1;
6055 static int hf_nds_keep = -1;
6056 static int hf_nds_new_rdn = -1;
6057 static int hf_nds_time_delay = -1;
6058 static int hf_nds_root_name = -1;
6059 static int hf_nds_new_part_id = -1;
6060 static int hf_nds_child_part_id = -1;
6061 static int hf_nds_master_part_id = -1;
6062 static int hf_nds_target_name = -1;
6063 static int hf_nds_super = -1;
6064 static int hf_bit1pingflags2 = -1;
6065 static int hf_bit2pingflags2 = -1;
6066 static int hf_bit3pingflags2 = -1;
6067 static int hf_bit4pingflags2 = -1;
6068 static int hf_bit5pingflags2 = -1;
6069 static int hf_bit6pingflags2 = -1;
6070 static int hf_bit7pingflags2 = -1;
6071 static int hf_bit8pingflags2 = -1;
6072 static int hf_bit9pingflags2 = -1;
6073 static int hf_bit10pingflags2 = -1;
6074 static int hf_bit11pingflags2 = -1;
6075 static int hf_bit12pingflags2 = -1;
6076 static int hf_bit13pingflags2 = -1;
6077 static int hf_bit14pingflags2 = -1;
6078 static int hf_bit15pingflags2 = -1;
6079 static int hf_bit16pingflags2 = -1;
6080 static int hf_bit1pingflags1 = -1;
6081 static int hf_bit2pingflags1 = -1;
6082 static int hf_bit3pingflags1 = -1;
6083 static int hf_bit4pingflags1 = -1;
6084 static int hf_bit5pingflags1 = -1;
6085 static int hf_bit6pingflags1 = -1;
6086 static int hf_bit7pingflags1 = -1;
6087 static int hf_bit8pingflags1 = -1;
6088 static int hf_bit9pingflags1 = -1;
6089 static int hf_bit10pingflags1 = -1;
6090 static int hf_bit11pingflags1 = -1;
6091 static int hf_bit12pingflags1 = -1;
6092 static int hf_bit13pingflags1 = -1;
6093 static int hf_bit14pingflags1 = -1;
6094 static int hf_bit15pingflags1 = -1;
6095 static int hf_bit16pingflags1 = -1;
6096 static int hf_bit1pingpflags1 = -1;
6097 static int hf_bit2pingpflags1 = -1;
6098 static int hf_bit3pingpflags1 = -1;
6099 static int hf_bit4pingpflags1 = -1;
6100 static int hf_bit5pingpflags1 = -1;
6101 static int hf_bit6pingpflags1 = -1;
6102 static int hf_bit7pingpflags1 = -1;
6103 static int hf_bit8pingpflags1 = -1;
6104 static int hf_bit9pingpflags1 = -1;
6105 static int hf_bit10pingpflags1 = -1;
6106 static int hf_bit11pingpflags1 = -1;
6107 static int hf_bit12pingpflags1 = -1;
6108 static int hf_bit13pingpflags1 = -1;
6109 static int hf_bit14pingpflags1 = -1;
6110 static int hf_bit15pingpflags1 = -1;
6111 static int hf_bit16pingpflags1 = -1;
6112 static int hf_bit1pingvflags1 = -1;
6113 static int hf_bit2pingvflags1 = -1;
6114 static int hf_bit3pingvflags1 = -1;
6115 static int hf_bit4pingvflags1 = -1;
6116 static int hf_bit5pingvflags1 = -1;
6117 static int hf_bit6pingvflags1 = -1;
6118 static int hf_bit7pingvflags1 = -1;
6119 static int hf_bit8pingvflags1 = -1;
6120 static int hf_bit9pingvflags1 = -1;
6121 static int hf_bit10pingvflags1 = -1;
6122 static int hf_bit11pingvflags1 = -1;
6123 static int hf_bit12pingvflags1 = -1;
6124 static int hf_bit13pingvflags1 = -1;
6125 static int hf_bit14pingvflags1 = -1;
6126 static int hf_bit15pingvflags1 = -1;
6127 static int hf_bit16pingvflags1 = -1;
6128 static int hf_nds_letter_ver = -1;
6129 static int hf_nds_os_ver = -1;
6130 static int hf_nds_lic_flags = -1;
6131 static int hf_nds_ds_time = -1;
6132 static int hf_nds_ping_version = -1;
6133 static int hf_nds_search_scope = -1;
6134 static int hf_nds_num_objects = -1;
6135 static int hf_bit1siflags = -1;
6136 static int hf_bit2siflags = -1;
6137 static int hf_bit3siflags = -1;
6138 static int hf_bit4siflags = -1;
6139 static int hf_bit5siflags = -1;
6140 static int hf_bit6siflags = -1;
6141 static int hf_bit7siflags = -1;
6142 static int hf_bit8siflags = -1;
6143 static int hf_bit9siflags = -1;
6144 static int hf_bit10siflags = -1;
6145 static int hf_bit11siflags = -1;
6146 static int hf_bit12siflags = -1;
6147 static int hf_bit13siflags = -1;
6148 static int hf_bit14siflags = -1;
6149 static int hf_bit15siflags = -1;
6150 static int hf_bit16siflags = -1;
6151 static int hf_nds_segments = -1;
6152 static int hf_nds_segment = -1;
6153 static int hf_nds_segment_overlap = -1;
6154 static int hf_nds_segment_overlap_conflict = -1;
6155 static int hf_nds_segment_multiple_tails = -1;
6156 static int hf_nds_segment_too_long_segment = -1;
6157 static int hf_nds_segment_error = -1;
6158
6159 static proto_item *expert_item = NULL;
6160
6161         """
6162
6163         # Look at all packet types in the packets collection, and cull information
6164         # from them.
6165         errors_used_list = []
6166         errors_used_hash = {}
6167         groups_used_list = []
6168         groups_used_hash = {}
6169         variables_used_hash = {}
6170         structs_used_hash = {}
6171
6172         for pkt in packets:
6173                 # Determine which error codes are used.
6174                 codes = pkt.CompletionCodes()
6175                 for code in codes.Records():
6176                         if not errors_used_hash.has_key(code):
6177                                 errors_used_hash[code] = len(errors_used_list)
6178                                 errors_used_list.append(code)
6179
6180                 # Determine which groups are used.
6181                 group = pkt.Group()
6182                 if not groups_used_hash.has_key(group):
6183                         groups_used_hash[group] = len(groups_used_list)
6184                         groups_used_list.append(group)
6185
6186                 # Determine which variables are used.
6187                 vars = pkt.Variables()
6188                 ExamineVars(vars, structs_used_hash, variables_used_hash)
6189
6190
6191         # Print the hf variable declarations
6192         sorted_vars = variables_used_hash.values()
6193         sorted_vars.sort()
6194         for var in sorted_vars:
6195                 print "static int " + var.HFName() + " = -1;"
6196
6197
6198         # Print the value_string's
6199         for var in sorted_vars:
6200                 if isinstance(var, val_string):
6201                         print ""
6202                         print var.Code()
6203
6204         # Determine which error codes are not used
6205         errors_not_used = {}
6206         # Copy the keys from the error list...
6207         for code in errors.keys():
6208                 errors_not_used[code] = 1
6209         # ... and remove the ones that *were* used.
6210         for code in errors_used_list:
6211                 del errors_not_used[code]
6212
6213         # Print a remark showing errors not used
6214         list_errors_not_used = errors_not_used.keys()
6215         list_errors_not_used.sort()
6216         for code in list_errors_not_used:
6217                 print "/* Error 0x%04x not used: %s */" % (code, errors[code])
6218         print "\n"
6219
6220         # Print the errors table
6221         print "/* Error strings. */"
6222         print "static const char *ncp_errors[] = {"
6223         for code in errors_used_list:
6224                 print '\t/* %02d (0x%04x) */ "%s",' % (errors_used_hash[code], code, errors[code])
6225         print "};\n"
6226
6227
6228
6229
6230         # Determine which groups are not used
6231         groups_not_used = {}
6232         # Copy the keys from the group list...
6233         for group in groups.keys():
6234                 groups_not_used[group] = 1
6235         # ... and remove the ones that *were* used.
6236         for group in groups_used_list:
6237                 del groups_not_used[group]
6238
6239         # Print a remark showing groups not used
6240         list_groups_not_used = groups_not_used.keys()
6241         list_groups_not_used.sort()
6242         for group in list_groups_not_used:
6243                 print "/* Group not used: %s = %s */" % (group, groups[group])
6244         print "\n"
6245
6246         # Print the groups table
6247         print "/* Group strings. */"
6248         print "static const char *ncp_groups[] = {"
6249         for group in groups_used_list:
6250                 print '\t/* %02d (%s) */ "%s",' % (groups_used_hash[group], group, groups[group])
6251         print "};\n"
6252
6253         # Print the group macros
6254         for group in groups_used_list:
6255                 name = string.upper(group)
6256                 print "#define NCP_GROUP_%s\t%d" % (name, groups_used_hash[group])
6257         print "\n"
6258
6259
6260         # Print the conditional_records for all Request Conditions.
6261         num = 0
6262         print "/* Request-Condition dfilter records. The NULL pointer"
6263         print "   is replaced by a pointer to the created dfilter_t. */"
6264         if len(global_req_cond) == 0:
6265                 print "static conditional_record req_conds = NULL;"
6266         else:
6267                 print "static conditional_record req_conds[] = {"
6268                 for req_cond in global_req_cond.keys():
6269                         print "\t{ \"%s\", NULL }," % (req_cond,)
6270                         global_req_cond[req_cond] = num
6271                         num = num + 1
6272                 print "};"
6273         print "#define NUM_REQ_CONDS %d" % (num,)
6274         print "#define NO_REQ_COND   NUM_REQ_CONDS\n\n"
6275
6276
6277
6278         # Print PTVC's for bitfields
6279         ett_list = []
6280         print "/* PTVC records for bit-fields. */"
6281         for var in sorted_vars:
6282                 if isinstance(var, bitfield):
6283                         sub_vars_ptvc = var.SubVariablesPTVC()
6284                         print "/* %s */" % (sub_vars_ptvc.Name())
6285                         print sub_vars_ptvc.Code()
6286                         ett_list.append(sub_vars_ptvc.ETTName())
6287
6288
6289         # Print the PTVC's for structures
6290         print "/* PTVC records for structs. */"
6291         # Sort them
6292         svhash = {}
6293         for svar in structs_used_hash.values():
6294                 svhash[svar.HFName()] = svar
6295                 if svar.descr:
6296                         ett_list.append(svar.ETTName())
6297
6298         struct_vars = svhash.keys()
6299         struct_vars.sort()
6300         for varname in struct_vars:
6301                 var = svhash[varname]
6302                 print var.Code()
6303
6304         ett_list.sort()
6305
6306         # Print regular PTVC's
6307         print "/* PTVC records. These are re-used to save space. */"
6308         for ptvc in ptvc_lists.Members():
6309                 if not ptvc.Null() and not ptvc.Empty():
6310                         print ptvc.Code()
6311
6312         # Print error_equivalency tables
6313         print "/* Error-Equivalency Tables. These are re-used to save space. */"
6314         for compcodes in compcode_lists.Members():
6315                 errors = compcodes.Records()
6316                 # Make sure the record for error = 0x00 comes last.
6317                 print "static const error_equivalency %s[] = {" % (compcodes.Name())
6318                 for error in errors:
6319                         error_in_packet = error >> 8;
6320                         ncp_error_index = errors_used_hash[error]
6321                         print "\t{ 0x%02x, %d }, /* 0x%04x */" % (error_in_packet,
6322                                 ncp_error_index, error)
6323                 print "\t{ 0x00, -1 }\n};\n"
6324
6325
6326
6327         # Print integer arrays for all ncp_records that need
6328         # a list of req_cond_indexes. Do it "uniquely" to save space;
6329         # if multiple packets share the same set of req_cond's,
6330         # then they'll share the same integer array
6331         print "/* Request Condition Indexes */"
6332         # First, make them unique
6333         req_cond_collection = UniqueCollection("req_cond_collection")
6334         for pkt in packets:
6335                 req_conds = pkt.CalculateReqConds()
6336                 if req_conds:
6337                         unique_list = req_cond_collection.Add(req_conds)
6338                         pkt.SetReqConds(unique_list)
6339                 else:
6340                         pkt.SetReqConds(None)
6341
6342         # Print them
6343         for req_cond in req_cond_collection.Members():
6344                 print "static const int %s[] = {" % (req_cond.Name(),)
6345                 print "\t",
6346                 vals = []
6347                 for text in req_cond.Records():
6348                         vals.append(global_req_cond[text])
6349                 vals.sort()
6350                 for val in vals:
6351                         print "%s, " % (val,),
6352
6353                 print "-1 };"
6354                 print ""
6355
6356
6357
6358         # Functions without length parameter
6359         funcs_without_length = {}
6360
6361         # Print info string structures
6362         print "/* Info Strings */"
6363         for pkt in packets:
6364                 if pkt.req_info_str:
6365                         name = pkt.InfoStrName() + "_req"
6366                         var = pkt.req_info_str[0]
6367                         print "static const info_string_t %s = {" % (name,)
6368                         print "\t&%s," % (var.HFName(),)
6369                         print '\t"%s",' % (pkt.req_info_str[1],)
6370                         print '\t"%s"' % (pkt.req_info_str[2],)
6371                         print "};\n"
6372
6373
6374
6375         # Print ncp_record packet records
6376         print "#define SUBFUNC_WITH_LENGTH      0x02"
6377         print "#define SUBFUNC_NO_LENGTH        0x01"
6378         print "#define NO_SUBFUNC               0x00"
6379
6380         print "/* ncp_record structs for packets */"
6381         print "static const ncp_record ncp_packets[] = {"
6382         for pkt in packets:
6383                 if pkt.HasSubFunction():
6384                         func = pkt.FunctionCode('high')
6385                         if pkt.HasLength():
6386                                 subfunc_string = "SUBFUNC_WITH_LENGTH"
6387                                 # Ensure that the function either has a length param or not
6388                                 if funcs_without_length.has_key(func):
6389                                         sys.exit("Function 0x%04x sometimes has length param, sometimes not." \
6390                                                 % (pkt.FunctionCode(),))
6391                         else:
6392                                 subfunc_string = "SUBFUNC_NO_LENGTH"
6393                                 funcs_without_length[func] = 1
6394                 else:
6395                         subfunc_string = "NO_SUBFUNC"
6396                 print '\t{ 0x%02x, 0x%02x, %s, "%s",' % (pkt.FunctionCode('high'),
6397                         pkt.FunctionCode('low'), subfunc_string, pkt.Description()),
6398
6399                 print '\t%d /* %s */,' % (groups_used_hash[pkt.Group()], pkt.Group())
6400
6401                 ptvc = pkt.PTVCRequest()
6402                 if not ptvc.Null() and not ptvc.Empty():
6403                         ptvc_request = ptvc.Name()
6404                 else:
6405                         ptvc_request = 'NULL'
6406
6407                 ptvc = pkt.PTVCReply()
6408                 if not ptvc.Null() and not ptvc.Empty():
6409                         ptvc_reply = ptvc.Name()
6410                 else:
6411                         ptvc_reply = 'NULL'
6412
6413                 errors = pkt.CompletionCodes()
6414
6415                 req_conds_obj = pkt.GetReqConds()
6416                 if req_conds_obj:
6417                         req_conds = req_conds_obj.Name()
6418                 else:
6419                         req_conds = "NULL"
6420
6421                 if not req_conds_obj:
6422                         req_cond_size = "NO_REQ_COND_SIZE"
6423                 else:
6424                         req_cond_size = pkt.ReqCondSize()
6425                         if req_cond_size == None:
6426                                 msg.write("NCP packet %s nees a ReqCondSize*() call\n" \
6427                                         % (pkt.CName(),))
6428                                 sys.exit(1)
6429
6430                 if pkt.req_info_str:
6431                         req_info_str = "&" + pkt.InfoStrName() + "_req"
6432                 else:
6433                         req_info_str = "NULL"
6434
6435                 print '\t\t%s, %s, %s, %s, %s, %s },\n' % \
6436                         (ptvc_request, ptvc_reply, errors.Name(), req_conds,
6437                         req_cond_size, req_info_str)
6438
6439         print '\t{ 0, 0, 0, NULL, 0, NULL, NULL, NULL, NULL, NO_REQ_COND_SIZE, NULL }'
6440         print "};\n"
6441
6442         print "/* ncp funcs that require a subfunc */"
6443         print "static const guint8 ncp_func_requires_subfunc[] = {"
6444         hi_seen = {}
6445         for pkt in packets:
6446                 if pkt.HasSubFunction():
6447                         hi_func = pkt.FunctionCode('high')
6448                         if not hi_seen.has_key(hi_func):
6449                                 print "\t0x%02x," % (hi_func)
6450                                 hi_seen[hi_func] = 1
6451         print "\t0"
6452         print "};\n"
6453
6454
6455         print "/* ncp funcs that have no length parameter */"
6456         print "static const guint8 ncp_func_has_no_length_parameter[] = {"
6457         funcs = funcs_without_length.keys()
6458         funcs.sort()
6459         for func in funcs:
6460                 print "\t0x%02x," % (func,)
6461         print "\t0"
6462         print "};\n"
6463
6464         # final_registration_ncp2222()
6465         print """
6466 static void
6467 final_registration_ncp2222(void)
6468 {
6469         int i;
6470         """
6471
6472         # Create dfilter_t's for conditional_record's
6473         print """
6474         for (i = 0; i < NUM_REQ_CONDS; i++) {
6475                 if (!dfilter_compile((const gchar*)req_conds[i].dfilter_text,
6476                         &req_conds[i].dfilter)) {
6477                         g_message("NCP dissector failed to compiler dfilter: %s\\n",
6478                         req_conds[i].dfilter_text);
6479                         g_assert_not_reached();
6480                 }
6481         }
6482 }
6483         """
6484
6485         # proto_register_ncp2222()
6486         print """
6487 static const value_string ncp_nds_verb_vals[] = {
6488         { 1, "Resolve Name" },
6489         { 2, "Read Entry Information" },
6490         { 3, "Read" },
6491         { 4, "Compare" },
6492         { 5, "List" },
6493         { 6, "Search Entries" },
6494         { 7, "Add Entry" },
6495         { 8, "Remove Entry" },
6496         { 9, "Modify Entry" },
6497         { 10, "Modify RDN" },
6498         { 11, "Create Attribute" },
6499         { 12, "Read Attribute Definition" },
6500         { 13, "Remove Attribute Definition" },
6501         { 14, "Define Class" },
6502         { 15, "Read Class Definition" },
6503         { 16, "Modify Class Definition" },
6504         { 17, "Remove Class Definition" },
6505         { 18, "List Containable Classes" },
6506         { 19, "Get Effective Rights" },
6507         { 20, "Add Partition" },
6508         { 21, "Remove Partition" },
6509         { 22, "List Partitions" },
6510         { 23, "Split Partition" },
6511         { 24, "Join Partitions" },
6512         { 25, "Add Replica" },
6513         { 26, "Remove Replica" },
6514         { 27, "Open Stream" },
6515         { 28, "Search Filter" },
6516         { 29, "Create Subordinate Reference" },
6517         { 30, "Link Replica" },
6518         { 31, "Change Replica Type" },
6519         { 32, "Start Update Schema" },
6520         { 33, "End Update Schema" },
6521         { 34, "Update Schema" },
6522         { 35, "Start Update Replica" },
6523         { 36, "End Update Replica" },
6524         { 37, "Update Replica" },
6525         { 38, "Synchronize Partition" },
6526         { 39, "Synchronize Schema" },
6527         { 40, "Read Syntaxes" },
6528         { 41, "Get Replica Root ID" },
6529         { 42, "Begin Move Entry" },
6530         { 43, "Finish Move Entry" },
6531         { 44, "Release Moved Entry" },
6532         { 45, "Backup Entry" },
6533         { 46, "Restore Entry" },
6534         { 47, "Save DIB" },
6535         { 48, "Control" },
6536         { 49, "Remove Backlink" },
6537         { 50, "Close Iteration" },
6538         { 51, "Unused" },
6539         { 52, "Audit Skulking" },
6540         { 53, "Get Server Address" },
6541         { 54, "Set Keys" },
6542         { 55, "Change Password" },
6543         { 56, "Verify Password" },
6544         { 57, "Begin Login" },
6545         { 58, "Finish Login" },
6546         { 59, "Begin Authentication" },
6547         { 60, "Finish Authentication" },
6548         { 61, "Logout" },
6549         { 62, "Repair Ring" },
6550         { 63, "Repair Timestamps" },
6551         { 64, "Create Back Link" },
6552         { 65, "Delete External Reference" },
6553         { 66, "Rename External Reference" },
6554         { 67, "Create Directory Entry" },
6555         { 68, "Remove Directory Entry" },
6556         { 69, "Designate New Master" },
6557         { 70, "Change Tree Name" },
6558         { 71, "Partition Entry Count" },
6559         { 72, "Check Login Restrictions" },
6560         { 73, "Start Join" },
6561         { 74, "Low Level Split" },
6562         { 75, "Low Level Join" },
6563         { 76, "Abort Low Level Join" },
6564         { 77, "Get All Servers" },
6565     { 240, "Ping" },
6566         { 255, "EDirectory Call" },
6567         { 0,  NULL }
6568 };
6569
6570 void
6571 proto_register_ncp2222(void)
6572 {
6573
6574         static hf_register_info hf[] = {
6575         { &hf_ncp_func,
6576         { "Function", "ncp.func", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
6577
6578         { &hf_ncp_length,
6579         { "Packet Length", "ncp.length", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
6580
6581         { &hf_ncp_subfunc,
6582         { "SubFunction", "ncp.subfunc", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
6583
6584         { &hf_ncp_completion_code,
6585         { "Completion Code", "ncp.completion_code", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
6586
6587         { &hf_ncp_group,
6588         { "NCP Group Type", "ncp.group", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }},
6589
6590         { &hf_ncp_fragment_handle,
6591         { "NDS Fragment Handle", "ncp.ndsfrag", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6592
6593         { &hf_ncp_fragment_size,
6594         { "NDS Fragment Size", "ncp.ndsfragsize", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6595
6596         { &hf_ncp_message_size,
6597         { "Message Size", "ncp.ndsmessagesize", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6598
6599         { &hf_ncp_nds_flag,
6600         { "Flags", "ncp.ndsflag", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6601
6602         { &hf_ncp_nds_verb,
6603         { "NDS Verb", "ncp.ndsverb", FT_UINT8, BASE_HEX, VALS(ncp_nds_verb_vals), 0x0, "", HFILL }},
6604
6605         { &hf_ping_version,
6606         { "NDS Version", "ncp.ping_version", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
6607
6608         { &hf_nds_version,
6609         { "NDS Version", "ncp.nds_version", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6610
6611         { &hf_nds_tree_name,
6612         { "Tree Name", "ncp.nds_tree_name", FT_STRING, BASE_DEC, NULL, 0x0, "", HFILL }},
6613
6614         /*
6615          * XXX - the page at
6616          *
6617          *      http://www.odyssea.com/whats_new/tcpipnet/tcpipnet.html
6618          *
6619          * says of the connection status "The Connection Code field may
6620          * contain values that indicate the status of the client host to
6621          * server connection.  A value of 1 in the fourth bit of this data
6622          * byte indicates that the server is unavailable (server was
6623          * downed).
6624          *
6625          * The page at
6626          *
6627          *      http://www.unm.edu/~network/presentations/course/appendix/appendix_f/tsld088.htm
6628          *
6629          * says that bit 0 is "bad service", bit 2 is "no connection
6630          * available", bit 4 is "service down", and bit 6 is "server
6631          * has a broadcast message waiting for the client".
6632          *
6633          * Should it be displayed in hex, and should those bits (and any
6634          * other bits with significance) be displayed as bitfields
6635          * underneath it?
6636          */
6637         { &hf_ncp_connection_status,
6638         { "Connection Status", "ncp.connection_status", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }},
6639
6640         { &hf_ncp_req_frame_num,
6641         { "Response to Request in Frame Number", "ncp.req_frame_num", FT_FRAMENUM, BASE_NONE,
6642                 NULL, 0x0, "", HFILL }},
6643
6644         { &hf_ncp_req_frame_time,
6645         { "Time from Request", "ncp.time", FT_RELATIVE_TIME, BASE_NONE,
6646                 NULL, 0x0, "Time between request and response in seconds", HFILL }},
6647
6648         { &hf_nds_flags,
6649         { "NDS Return Flags", "ncp.nds_flags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6650
6651
6652         { &hf_nds_reply_depth,
6653         { "Distance from Root", "ncp.ndsdepth", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6654
6655         { &hf_nds_reply_rev,
6656         { "NDS Revision", "ncp.ndsrev", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6657
6658         { &hf_nds_reply_flags,
6659         { "Flags", "ncp.ndsflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6660
6661         { &hf_nds_p1type,
6662         { "NDS Parameter Type", "ncp.p1type", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }},
6663
6664         { &hf_nds_uint32value,
6665         { "NDS Value", "ncp.uint32value", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6666
6667         { &hf_nds_bit1,
6668         { "Typeless", "ncp.nds_bit1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6669
6670         { &hf_nds_bit2,
6671         { "All Containers", "ncp.nds_bit2", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6672
6673         { &hf_nds_bit3,
6674         { "Slashed", "ncp.nds_bit3", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6675
6676         { &hf_nds_bit4,
6677         { "Dotted", "ncp.nds_bit4", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6678
6679         { &hf_nds_bit5,
6680         { "Tuned", "ncp.nds_bit5", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6681
6682         { &hf_nds_bit6,
6683         { "Not Defined", "ncp.nds_bit6", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6684
6685         { &hf_nds_bit7,
6686         { "Not Defined", "ncp.nds_bit7", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6687
6688         { &hf_nds_bit8,
6689         { "Not Defined", "ncp.nds_bit8", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6690
6691         { &hf_nds_bit9,
6692         { "Not Defined", "ncp.nds_bit9", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6693
6694         { &hf_nds_bit10,
6695         { "Not Defined", "ncp.nds_bit10", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6696
6697         { &hf_nds_bit11,
6698         { "Not Defined", "ncp.nds_bit11", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6699
6700         { &hf_nds_bit12,
6701         { "Not Defined", "ncp.nds_bit12", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6702
6703         { &hf_nds_bit13,
6704         { "Not Defined", "ncp.nds_bit13", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6705
6706         { &hf_nds_bit14,
6707         { "Not Defined", "ncp.nds_bit14", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6708
6709         { &hf_nds_bit15,
6710         { "Not Defined", "ncp.nds_bit15", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6711
6712         { &hf_nds_bit16,
6713         { "Not Defined", "ncp.nds_bit16", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6714
6715         { &hf_bit1outflags,
6716         { "Output Flags", "ncp.bit1outflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6717
6718         { &hf_bit2outflags,
6719         { "Entry ID", "ncp.bit2outflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6720
6721         { &hf_bit3outflags,
6722         { "Replica State", "ncp.bit3outflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6723
6724         { &hf_bit4outflags,
6725         { "Modification Timestamp", "ncp.bit4outflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6726
6727         { &hf_bit5outflags,
6728         { "Purge Time", "ncp.bit5outflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6729
6730         { &hf_bit6outflags,
6731         { "Local Partition ID", "ncp.bit6outflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6732
6733         { &hf_bit7outflags,
6734         { "Distinguished Name", "ncp.bit7outflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6735
6736         { &hf_bit8outflags,
6737         { "Replica Type", "ncp.bit8outflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6738
6739         { &hf_bit9outflags,
6740         { "Partition Busy", "ncp.bit9outflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6741
6742         { &hf_bit10outflags,
6743         { "Not Defined", "ncp.bit10outflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6744
6745         { &hf_bit11outflags,
6746         { "Not Defined", "ncp.bit11outflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6747
6748         { &hf_bit12outflags,
6749         { "Not Defined", "ncp.bit12outflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6750
6751         { &hf_bit13outflags,
6752         { "Not Defined", "ncp.bit13outflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6753
6754         { &hf_bit14outflags,
6755         { "Not Defined", "ncp.bit14outflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6756
6757         { &hf_bit15outflags,
6758         { "Not Defined", "ncp.bit15outflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6759
6760         { &hf_bit16outflags,
6761         { "Not Defined", "ncp.bit16outflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6762
6763         { &hf_bit1nflags,
6764         { "Entry ID", "ncp.bit1nflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6765
6766         { &hf_bit2nflags,
6767         { "Readable", "ncp.bit2nflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6768
6769         { &hf_bit3nflags,
6770         { "Writeable", "ncp.bit3nflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6771
6772         { &hf_bit4nflags,
6773         { "Master", "ncp.bit4nflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6774
6775         { &hf_bit5nflags,
6776         { "Create ID", "ncp.bit5nflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6777
6778         { &hf_bit6nflags,
6779         { "Walk Tree", "ncp.bit6nflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6780
6781         { &hf_bit7nflags,
6782         { "Dereference Alias", "ncp.bit7nflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6783
6784         { &hf_bit8nflags,
6785         { "Not Defined", "ncp.bit8nflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6786
6787         { &hf_bit9nflags,
6788         { "Not Defined", "ncp.bit9nflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6789
6790         { &hf_bit10nflags,
6791         { "Not Defined", "ncp.bit10nflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6792
6793         { &hf_bit11nflags,
6794         { "Not Defined", "ncp.bit11nflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6795
6796         { &hf_bit12nflags,
6797         { "Not Defined", "ncp.bit12nflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6798
6799         { &hf_bit13nflags,
6800         { "Not Defined", "ncp.bit13nflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6801
6802         { &hf_bit14nflags,
6803         { "Prefer Referrals", "ncp.bit14nflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6804
6805         { &hf_bit15nflags,
6806         { "Prefer Only Referrals", "ncp.bit15nflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6807
6808         { &hf_bit16nflags,
6809         { "Not Defined", "ncp.bit16nflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6810
6811         { &hf_bit1rflags,
6812         { "Typeless", "ncp.bit1rflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6813
6814         { &hf_bit2rflags,
6815         { "Slashed", "ncp.bit2rflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6816
6817         { &hf_bit3rflags,
6818         { "Dotted", "ncp.bit3rflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6819
6820         { &hf_bit4rflags,
6821         { "Tuned", "ncp.bit4rflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6822
6823         { &hf_bit5rflags,
6824         { "Not Defined", "ncp.bit5rflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6825
6826         { &hf_bit6rflags,
6827         { "Not Defined", "ncp.bit6rflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6828
6829         { &hf_bit7rflags,
6830         { "Not Defined", "ncp.bit7rflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6831
6832         { &hf_bit8rflags,
6833         { "Not Defined", "ncp.bit8rflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6834
6835         { &hf_bit9rflags,
6836         { "Not Defined", "ncp.bit9rflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6837
6838         { &hf_bit10rflags,
6839         { "Not Defined", "ncp.bit10rflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6840
6841         { &hf_bit11rflags,
6842         { "Not Defined", "ncp.bit11rflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6843
6844         { &hf_bit12rflags,
6845         { "Not Defined", "ncp.bit12rflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6846
6847         { &hf_bit13rflags,
6848         { "Not Defined", "ncp.bit13rflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6849
6850         { &hf_bit14rflags,
6851         { "Not Defined", "ncp.bit14rflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6852
6853         { &hf_bit15rflags,
6854         { "Not Defined", "ncp.bit15rflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6855
6856         { &hf_bit16rflags,
6857         { "Not Defined", "ncp.bit16rflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6858
6859         { &hf_bit1eflags,
6860         { "Alias Entry", "ncp.bit1eflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6861
6862         { &hf_bit2eflags,
6863         { "Partition Root", "ncp.bit2eflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6864
6865         { &hf_bit3eflags,
6866         { "Container Entry", "ncp.bit3eflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6867
6868         { &hf_bit4eflags,
6869         { "Container Alias", "ncp.bit4eflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6870
6871         { &hf_bit5eflags,
6872         { "Matches List Filter", "ncp.bit5eflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6873
6874         { &hf_bit6eflags,
6875         { "Reference Entry", "ncp.bit6eflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6876
6877         { &hf_bit7eflags,
6878         { "40x Reference Entry", "ncp.bit7eflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6879
6880         { &hf_bit8eflags,
6881         { "Back Linked", "ncp.bit8eflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6882
6883         { &hf_bit9eflags,
6884         { "New Entry", "ncp.bit9eflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6885
6886         { &hf_bit10eflags,
6887         { "Temporary Reference", "ncp.bit10eflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6888
6889         { &hf_bit11eflags,
6890         { "Audited", "ncp.bit11eflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6891
6892         { &hf_bit12eflags,
6893         { "Entry Not Present", "ncp.bit12eflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6894
6895         { &hf_bit13eflags,
6896         { "Entry Verify CTS", "ncp.bit13eflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6897
6898         { &hf_bit14eflags,
6899         { "Entry Damaged", "ncp.bit14eflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6900
6901         { &hf_bit15eflags,
6902         { "Not Defined", "ncp.bit15rflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6903
6904         { &hf_bit16eflags,
6905         { "Not Defined", "ncp.bit16rflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6906
6907         { &hf_bit1infoflagsl,
6908         { "Output Flags", "ncp.bit1infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6909
6910         { &hf_bit2infoflagsl,
6911         { "Entry ID", "ncp.bit2infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6912
6913         { &hf_bit3infoflagsl,
6914         { "Entry Flags", "ncp.bit3infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6915
6916         { &hf_bit4infoflagsl,
6917         { "Subordinate Count", "ncp.bit4infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6918
6919         { &hf_bit5infoflagsl,
6920         { "Modification Time", "ncp.bit5infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6921
6922         { &hf_bit6infoflagsl,
6923         { "Modification Timestamp", "ncp.bit6infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6924
6925         { &hf_bit7infoflagsl,
6926         { "Creation Timestamp", "ncp.bit7infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6927
6928         { &hf_bit8infoflagsl,
6929         { "Partition Root ID", "ncp.bit8infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6930
6931         { &hf_bit9infoflagsl,
6932         { "Parent ID", "ncp.bit9infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6933
6934         { &hf_bit10infoflagsl,
6935         { "Revision Count", "ncp.bit10infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6936
6937         { &hf_bit11infoflagsl,
6938         { "Replica Type", "ncp.bit11infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6939
6940         { &hf_bit12infoflagsl,
6941         { "Base Class", "ncp.bit12infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6942
6943         { &hf_bit13infoflagsl,
6944         { "Relative Distinguished Name", "ncp.bit13infoflagsl", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6945
6946         { &hf_bit14infoflagsl,
6947         { "Distinguished Name", "ncp.bit14infoflagsl", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6948
6949         { &hf_bit15infoflagsl,
6950         { "Root Distinguished Name", "ncp.bit15infoflagsl", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6951
6952         { &hf_bit16infoflagsl,
6953         { "Parent Distinguished Name", "ncp.bit16infoflagsl", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6954
6955         { &hf_bit1infoflagsh,
6956         { "Purge Time", "ncp.bit1infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6957
6958         { &hf_bit2infoflagsh,
6959         { "Dereference Base Class", "ncp.bit2infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6960
6961         { &hf_bit3infoflagsh,
6962         { "Not Defined", "ncp.bit3infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6963
6964         { &hf_bit4infoflagsh,
6965         { "Not Defined", "ncp.bit4infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6966
6967         { &hf_bit5infoflagsh,
6968         { "Not Defined", "ncp.bit5infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6969
6970         { &hf_bit6infoflagsh,
6971         { "Not Defined", "ncp.bit6infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6972
6973         { &hf_bit7infoflagsh,
6974         { "Not Defined", "ncp.bit7infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6975
6976         { &hf_bit8infoflagsh,
6977         { "Not Defined", "ncp.bit8infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6978
6979         { &hf_bit9infoflagsh,
6980         { "Not Defined", "ncp.bit9infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6981
6982         { &hf_bit10infoflagsh,
6983         { "Not Defined", "ncp.bit10infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6984
6985         { &hf_bit11infoflagsh,
6986         { "Not Defined", "ncp.bit11infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6987
6988         { &hf_bit12infoflagsh,
6989         { "Not Defined", "ncp.bit12infoflagshs", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6990
6991         { &hf_bit13infoflagsh,
6992         { "Not Defined", "ncp.bit13infoflagsh", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6993
6994         { &hf_bit14infoflagsh,
6995         { "Not Defined", "ncp.bit14infoflagsh", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6996
6997         { &hf_bit15infoflagsh,
6998         { "Not Defined", "ncp.bit15infoflagsh", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6999
7000         { &hf_bit16infoflagsh,
7001         { "Not Defined", "ncp.bit16infoflagsh", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7002
7003         { &hf_bit1lflags,
7004         { "List Typeless", "ncp.bit1lflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7005
7006         { &hf_bit2lflags,
7007         { "List Containers", "ncp.bit2lflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7008
7009         { &hf_bit3lflags,
7010         { "List Slashed", "ncp.bit3lflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7011
7012         { &hf_bit4lflags,
7013         { "List Dotted", "ncp.bit4lflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7014
7015         { &hf_bit5lflags,
7016         { "Dereference Alias", "ncp.bit5lflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7017
7018         { &hf_bit6lflags,
7019         { "List All Containers", "ncp.bit6lflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7020
7021         { &hf_bit7lflags,
7022         { "List Obsolete", "ncp.bit7lflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7023
7024         { &hf_bit8lflags,
7025         { "List Tuned Output", "ncp.bit8lflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7026
7027         { &hf_bit9lflags,
7028         { "List External Reference", "ncp.bit9lflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7029
7030         { &hf_bit10lflags,
7031         { "Not Defined", "ncp.bit10lflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7032
7033         { &hf_bit11lflags,
7034         { "Not Defined", "ncp.bit11lflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7035
7036         { &hf_bit12lflags,
7037         { "Not Defined", "ncp.bit12lflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7038
7039         { &hf_bit13lflags,
7040         { "Not Defined", "ncp.bit13lflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7041
7042         { &hf_bit14lflags,
7043         { "Not Defined", "ncp.bit14lflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7044
7045         { &hf_bit15lflags,
7046         { "Not Defined", "ncp.bit15lflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7047
7048         { &hf_bit16lflags,
7049         { "Not Defined", "ncp.bit16lflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7050
7051         { &hf_bit1l1flagsl,
7052         { "Output Flags", "ncp.bit1l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7053
7054         { &hf_bit2l1flagsl,
7055         { "Entry ID", "ncp.bit2l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7056
7057         { &hf_bit3l1flagsl,
7058         { "Replica State", "ncp.bit3l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7059
7060         { &hf_bit4l1flagsl,
7061         { "Modification Timestamp", "ncp.bit4l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7062
7063         { &hf_bit5l1flagsl,
7064         { "Purge Time", "ncp.bit5l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7065
7066         { &hf_bit6l1flagsl,
7067         { "Local Partition ID", "ncp.bit6l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7068
7069         { &hf_bit7l1flagsl,
7070         { "Distinguished Name", "ncp.bit7l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7071
7072         { &hf_bit8l1flagsl,
7073         { "Replica Type", "ncp.bit8l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7074
7075         { &hf_bit9l1flagsl,
7076         { "Partition Busy", "ncp.bit9l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7077
7078         { &hf_bit10l1flagsl,
7079         { "Not Defined", "ncp.bit10l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7080
7081         { &hf_bit11l1flagsl,
7082         { "Not Defined", "ncp.bit11l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7083
7084         { &hf_bit12l1flagsl,
7085         { "Not Defined", "ncp.bit12l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7086
7087         { &hf_bit13l1flagsl,
7088         { "Not Defined", "ncp.bit13l1flagsl", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7089
7090         { &hf_bit14l1flagsl,
7091         { "Not Defined", "ncp.bit14l1flagsl", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7092
7093         { &hf_bit15l1flagsl,
7094         { "Not Defined", "ncp.bit15l1flagsl", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7095
7096         { &hf_bit16l1flagsl,
7097         { "Not Defined", "ncp.bit16l1flagsl", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7098
7099         { &hf_bit1l1flagsh,
7100         { "Not Defined", "ncp.bit1l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7101
7102         { &hf_bit2l1flagsh,
7103         { "Not Defined", "ncp.bit2l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7104
7105         { &hf_bit3l1flagsh,
7106         { "Not Defined", "ncp.bit3l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7107
7108         { &hf_bit4l1flagsh,
7109         { "Not Defined", "ncp.bit4l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7110
7111         { &hf_bit5l1flagsh,
7112         { "Not Defined", "ncp.bit5l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7113
7114         { &hf_bit6l1flagsh,
7115         { "Not Defined", "ncp.bit6l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7116
7117         { &hf_bit7l1flagsh,
7118         { "Not Defined", "ncp.bit7l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7119
7120         { &hf_bit8l1flagsh,
7121         { "Not Defined", "ncp.bit8l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7122
7123         { &hf_bit9l1flagsh,
7124         { "Not Defined", "ncp.bit9l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7125
7126         { &hf_bit10l1flagsh,
7127         { "Not Defined", "ncp.bit10l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7128
7129         { &hf_bit11l1flagsh,
7130         { "Not Defined", "ncp.bit11l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7131
7132         { &hf_bit12l1flagsh,
7133         { "Not Defined", "ncp.bit12l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7134
7135         { &hf_bit13l1flagsh,
7136         { "Not Defined", "ncp.bit13l1flagsh", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7137
7138         { &hf_bit14l1flagsh,
7139         { "Not Defined", "ncp.bit14l1flagsh", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7140
7141         { &hf_bit15l1flagsh,
7142         { "Not Defined", "ncp.bit15l1flagsh", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7143
7144         { &hf_bit16l1flagsh,
7145         { "Not Defined", "ncp.bit16l1flagsh", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7146
7147         { &hf_bit1vflags,
7148         { "Naming", "ncp.bit1vflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7149
7150         { &hf_bit2vflags,
7151         { "Base Class", "ncp.bit2vflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7152
7153         { &hf_bit3vflags,
7154         { "Present", "ncp.bit3vflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7155
7156         { &hf_bit4vflags,
7157         { "Value Damaged", "ncp.bit4vflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7158
7159         { &hf_bit5vflags,
7160         { "Not Defined", "ncp.bit5vflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7161
7162         { &hf_bit6vflags,
7163         { "Not Defined", "ncp.bit6vflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7164
7165         { &hf_bit7vflags,
7166         { "Not Defined", "ncp.bit7vflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7167
7168         { &hf_bit8vflags,
7169         { "Not Defined", "ncp.bit8vflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7170
7171         { &hf_bit9vflags,
7172         { "Not Defined", "ncp.bit9vflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7173
7174         { &hf_bit10vflags,
7175         { "Not Defined", "ncp.bit10vflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7176
7177         { &hf_bit11vflags,
7178         { "Not Defined", "ncp.bit11vflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7179
7180         { &hf_bit12vflags,
7181         { "Not Defined", "ncp.bit12vflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7182
7183         { &hf_bit13vflags,
7184         { "Not Defined", "ncp.bit13vflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7185
7186         { &hf_bit14vflags,
7187         { "Not Defined", "ncp.bit14vflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7188
7189         { &hf_bit15vflags,
7190         { "Not Defined", "ncp.bit15vflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7191
7192         { &hf_bit16vflags,
7193         { "Not Defined", "ncp.bit16vflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7194
7195         { &hf_bit1cflags,
7196         { "Ambiguous Containment", "ncp.bit1cflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7197
7198         { &hf_bit2cflags,
7199         { "Ambiguous Naming", "ncp.bit2cflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7200
7201         { &hf_bit3cflags,
7202         { "Class Definition Cannot be Removed", "ncp.bit3cflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7203
7204         { &hf_bit4cflags,
7205         { "Effective Class", "ncp.bit4cflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7206
7207         { &hf_bit5cflags,
7208         { "Container Class", "ncp.bit5cflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7209
7210         { &hf_bit6cflags,
7211         { "Not Defined", "ncp.bit6cflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7212
7213         { &hf_bit7cflags,
7214         { "Not Defined", "ncp.bit7cflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7215
7216         { &hf_bit8cflags,
7217         { "Not Defined", "ncp.bit8cflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7218
7219         { &hf_bit9cflags,
7220         { "Not Defined", "ncp.bit9cflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7221
7222         { &hf_bit10cflags,
7223         { "Not Defined", "ncp.bit10cflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7224
7225         { &hf_bit11cflags,
7226         { "Not Defined", "ncp.bit11cflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7227
7228         { &hf_bit12cflags,
7229         { "Not Defined", "ncp.bit12cflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7230
7231         { &hf_bit13cflags,
7232         { "Not Defined", "ncp.bit13cflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7233
7234         { &hf_bit14cflags,
7235         { "Not Defined", "ncp.bit14cflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7236
7237         { &hf_bit15cflags,
7238         { "Not Defined", "ncp.bit15cflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7239
7240         { &hf_bit16cflags,
7241         { "Not Defined", "ncp.bit16cflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7242
7243         { &hf_bit1acflags,
7244         { "Single Valued", "ncp.bit1acflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7245
7246         { &hf_bit2acflags,
7247         { "Sized", "ncp.bit2acflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7248
7249         { &hf_bit3acflags,
7250         { "Non-Removable", "ncp.bit3acflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7251
7252         { &hf_bit4acflags,
7253         { "Read Only", "ncp.bit4acflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7254
7255         { &hf_bit5acflags,
7256         { "Hidden", "ncp.bit5acflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7257
7258         { &hf_bit6acflags,
7259         { "String", "ncp.bit6acflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7260
7261         { &hf_bit7acflags,
7262         { "Synchronize Immediate", "ncp.bit7acflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7263
7264         { &hf_bit8acflags,
7265         { "Public Read", "ncp.bit8acflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7266
7267         { &hf_bit9acflags,
7268         { "Server Read", "ncp.bit9acflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7269
7270         { &hf_bit10acflags,
7271         { "Write Managed", "ncp.bit10acflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7272
7273         { &hf_bit11acflags,
7274         { "Per Replica", "ncp.bit11acflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7275
7276         { &hf_bit12acflags,
7277         { "Never Schedule Synchronization", "ncp.bit12acflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7278
7279         { &hf_bit13acflags,
7280         { "Operational", "ncp.bit13acflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7281
7282         { &hf_bit14acflags,
7283         { "Not Defined", "ncp.bit14acflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7284
7285         { &hf_bit15acflags,
7286         { "Not Defined", "ncp.bit15acflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7287
7288         { &hf_bit16acflags,
7289         { "Not Defined", "ncp.bit16acflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7290
7291
7292         { &hf_nds_reply_error,
7293         { "NDS Error", "ncp.ndsreplyerror", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7294
7295         { &hf_nds_net,
7296         { "Network","ncp.ndsnet", FT_IPXNET, BASE_NONE, NULL, 0x0, "", HFILL }},
7297
7298         { &hf_nds_node,
7299         { "Node",       "ncp.ndsnode", FT_ETHER, BASE_NONE, NULL, 0x0, "", HFILL }},
7300
7301         { &hf_nds_socket,
7302         { "Socket",     "ncp.ndssocket", FT_UINT16, BASE_HEX, NULL, 0x0, "", HFILL }},
7303
7304         { &hf_add_ref_ip,
7305         { "Address Referral", "ncp.ipref", FT_IPv4, BASE_DEC, NULL, 0x0, "", HFILL }},
7306
7307         { &hf_add_ref_udp,
7308         { "Address Referral", "ncp.udpref", FT_IPv4, BASE_DEC, NULL, 0x0, "", HFILL }},
7309
7310         { &hf_add_ref_tcp,
7311         { "Address Referral", "ncp.tcpref", FT_IPv4, BASE_DEC, NULL, 0x0, "", HFILL }},
7312
7313         { &hf_referral_record,
7314         { "Referral Record", "ncp.ref_rec", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7315
7316         { &hf_referral_addcount,
7317         { "Address Count", "ncp.ref_addcount", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7318
7319         { &hf_nds_port,
7320         { "Port", "ncp.ndsport", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7321
7322         { &hf_mv_string,
7323         { "Attribute Name ", "ncp.mv_string", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7324
7325         { &hf_nds_syntax,
7326         { "Attribute Syntax ", "ncp.nds_syntax", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7327
7328         { &hf_value_string,
7329         { "Value ", "ncp.value_string", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7330
7331     { &hf_nds_stream_name,
7332         { "Stream Name ", "ncp.nds_stream_name", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7333
7334         { &hf_nds_buffer_size,
7335         { "NDS Reply Buffer Size", "ncp.nds_reply_buf", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7336
7337         { &hf_nds_ver,
7338         { "NDS Version", "ncp.nds_ver", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7339
7340         { &hf_nds_nflags,
7341         { "Flags", "ncp.nds_nflags", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7342
7343     { &hf_nds_rflags,
7344         { "Request Flags", "ncp.nds_rflags", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7345
7346     { &hf_nds_eflags,
7347         { "Entry Flags", "ncp.nds_eflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7348
7349         { &hf_nds_scope,
7350         { "Scope", "ncp.nds_scope", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7351
7352         { &hf_nds_name,
7353         { "Name", "ncp.nds_name", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7354
7355     { &hf_nds_name_type,
7356         { "Name Type", "ncp.nds_name_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7357
7358         { &hf_nds_comm_trans,
7359         { "Communications Transport", "ncp.nds_comm_trans", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7360
7361         { &hf_nds_tree_trans,
7362         { "Tree Walker Transport", "ncp.nds_tree_trans", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7363
7364         { &hf_nds_iteration,
7365         { "Iteration Handle", "ncp.nds_iteration", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7366
7367     { &hf_nds_file_handle,
7368         { "File Handle", "ncp.nds_file_handle", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7369
7370     { &hf_nds_file_size,
7371         { "File Size", "ncp.nds_file_size", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7372
7373         { &hf_nds_eid,
7374         { "NDS EID", "ncp.nds_eid", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7375
7376     { &hf_nds_depth,
7377         { "Distance object is from Root", "ncp.nds_depth", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7378
7379         { &hf_nds_info_type,
7380         { "Info Type", "ncp.nds_info_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7381
7382     { &hf_nds_class_def_type,
7383         { "Class Definition Type", "ncp.nds_class_def_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7384
7385         { &hf_nds_all_attr,
7386         { "All Attributes", "ncp.nds_all_attr", FT_UINT32, BASE_DEC, NULL, 0x0, "Return all Attributes?", HFILL }},
7387
7388     { &hf_nds_return_all_classes,
7389         { "All Classes", "ncp.nds_return_all_classes", FT_STRING, BASE_NONE, NULL, 0x0, "Return all Classes?", HFILL }},
7390
7391         { &hf_nds_req_flags,
7392         { "Request Flags", "ncp.nds_req_flags", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7393
7394         { &hf_nds_attr,
7395         { "Attributes", "ncp.nds_attributes", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7396
7397     { &hf_nds_classes,
7398         { "Classes", "ncp.nds_classes", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7399
7400         { &hf_nds_crc,
7401         { "CRC", "ncp.nds_crc", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7402
7403         { &hf_nds_referrals,
7404         { "Referrals", "ncp.nds_referrals", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7405
7406         { &hf_nds_result_flags,
7407         { "Result Flags", "ncp.nds_result_flags", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7408
7409     { &hf_nds_stream_flags,
7410         { "Streams Flags", "ncp.nds_stream_flags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7411
7412         { &hf_nds_tag_string,
7413         { "Tags", "ncp.nds_tags", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7414
7415         { &hf_value_bytes,
7416         { "Bytes", "ncp.value_bytes", FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL }},
7417
7418         { &hf_replica_type,
7419         { "Replica Type", "ncp.rtype", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7420
7421         { &hf_replica_state,
7422         { "Replica State", "ncp.rstate", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7423
7424     { &hf_nds_rnum,
7425         { "Replica Number", "ncp.rnum", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7426
7427         { &hf_nds_revent,
7428         { "Event", "ncp.revent", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7429
7430         { &hf_replica_number,
7431         { "Replica Number", "ncp.rnum", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7432
7433         { &hf_min_nds_ver,
7434         { "Minimum NDS Version", "ncp.min_nds_version", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7435
7436         { &hf_nds_ver_include,
7437         { "Include NDS Version", "ncp.inc_nds_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7438
7439         { &hf_nds_ver_exclude,
7440         { "Exclude NDS Version", "ncp.exc_nds_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7441
7442         { &hf_nds_es,
7443         { "Input Entry Specifier", "ncp.nds_es", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7444
7445         { &hf_es_type,
7446         { "Entry Specifier Type", "ncp.nds_es_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7447
7448         { &hf_rdn_string,
7449         { "RDN", "ncp.nds_rdn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7450
7451         { &hf_delim_string,
7452         { "Delimeter", "ncp.nds_delim", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7453
7454     { &hf_nds_dn_output_type,
7455         { "Output Entry Specifier Type", "ncp.nds_out_es_type", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7456
7457     { &hf_nds_nested_output_type,
7458         { "Nested Output Entry Specifier Type", "ncp.nds_nested_out_es", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7459
7460     { &hf_nds_output_delimiter,
7461         { "Output Delimiter", "ncp.nds_out_delimiter", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7462
7463     { &hf_nds_output_entry_specifier,
7464         { "Output Entry Specifier", "ncp.nds_out_es", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7465
7466     { &hf_es_value,
7467         { "Entry Specifier Value", "ncp.nds_es_value", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7468
7469     { &hf_es_rdn_count,
7470         { "RDN Count", "ncp.nds_es_rdn_count", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7471
7472     { &hf_nds_replica_num,
7473         { "Replica Number", "ncp.nds_replica_num", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7474
7475     { &hf_es_seconds,
7476         { "Seconds", "ncp.nds_es_seconds", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7477
7478     { &hf_nds_event_num,
7479         { "Event Number", "ncp.nds_event_num", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7480
7481     { &hf_nds_compare_results,
7482         { "Compare Results", "ncp.nds_compare_results", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7483
7484     { &hf_nds_parent,
7485         { "Parent ID", "ncp.nds_parent", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7486
7487     { &hf_nds_name_filter,
7488         { "Name Filter", "ncp.nds_name_filter", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7489
7490     { &hf_nds_class_filter,
7491         { "Class Filter", "ncp.nds_class_filter", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7492
7493     { &hf_nds_time_filter,
7494         { "Time Filter", "ncp.nds_time_filter", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7495
7496     { &hf_nds_partition_root_id,
7497         { "Partition Root ID", "ncp.nds_partition_root_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7498
7499     { &hf_nds_replicas,
7500         { "Replicas", "ncp.nds_replicas", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7501
7502     { &hf_nds_purge,
7503         { "Purge Time", "ncp.nds_purge", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7504
7505     { &hf_nds_local_partition,
7506         { "Local Partition ID", "ncp.nds_local_partition", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7507
7508     { &hf_partition_busy,
7509     { "Partition Busy", "ncp.nds_partition_busy", FT_BOOLEAN, 16, NULL, 0x0, "", HFILL }},
7510
7511     { &hf_nds_number_of_changes,
7512         { "Number of Attribute Changes", "ncp.nds_number_of_changes", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7513
7514     { &hf_sub_count,
7515         { "Subordinate Count", "ncp.sub_count", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7516
7517     { &hf_nds_revision,
7518         { "Revision Count", "ncp.nds_rev_count", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7519
7520     { &hf_nds_base_class,
7521         { "Base Class", "ncp.nds_base_class", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7522
7523     { &hf_nds_relative_dn,
7524         { "Relative Distinguished Name", "ncp.nds_relative_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7525
7526     { &hf_nds_root_dn,
7527         { "Root Distinguished Name", "ncp.nds_root_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7528
7529     { &hf_nds_parent_dn,
7530         { "Parent Distinguished Name", "ncp.nds_parent_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7531
7532     { &hf_deref_base,
7533     { "Dereference Base Class", "ncp.nds_deref_base", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7534
7535     { &hf_nds_base,
7536     { "Base Class", "ncp.nds_base", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7537
7538     { &hf_nds_super,
7539     { "Super Class", "ncp.nds_super", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7540
7541     { &hf_nds_entry_info,
7542     { "Entry Information", "ncp.nds_entry_info", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7543
7544     { &hf_nds_privileges,
7545     { "Privileges", "ncp.nds_privileges", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7546
7547     { &hf_nds_vflags,
7548     { "Value Flags", "ncp.nds_vflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7549
7550     { &hf_nds_value_len,
7551     { "Value Length", "ncp.nds_vlength", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7552
7553     { &hf_nds_cflags,
7554     { "Class Flags", "ncp.nds_cflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7555
7556     { &hf_nds_asn1,
7557         { "ASN.1 ID", "ncp.nds_asn1", FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL }},
7558
7559     { &hf_nds_acflags,
7560     { "Attribute Constraint Flags", "ncp.nds_acflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7561
7562     { &hf_nds_upper,
7563     { "Upper Limit Value", "ncp.nds_upper", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7564
7565     { &hf_nds_lower,
7566     { "Lower Limit Value", "ncp.nds_lower", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7567
7568     { &hf_nds_trustee_dn,
7569         { "Trustee Distinguished Name", "ncp.nds_trustee_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7570
7571     { &hf_nds_attribute_dn,
7572         { "Attribute Name", "ncp.nds_attribute_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7573
7574     { &hf_nds_acl_add,
7575         { "Access Control Lists to Add", "ncp.nds_acl_add", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7576
7577     { &hf_nds_acl_del,
7578         { "Access Control Lists to Delete", "ncp.nds_acl_del", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7579
7580     { &hf_nds_att_add,
7581         { "Attribute to Add", "ncp.nds_att_add", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7582
7583     { &hf_nds_att_del,
7584         { "Attribute to Delete", "ncp.nds_att_del", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7585
7586     { &hf_nds_keep,
7587     { "Delete Original RDN", "ncp.nds_keep", FT_BOOLEAN, 32, NULL, 0x0, "", HFILL }},
7588
7589     { &hf_nds_new_rdn,
7590         { "New Relative Distinguished Name", "ncp.nds_new_rdn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7591
7592     { &hf_nds_time_delay,
7593         { "Time Delay", "ncp.nds_time_delay", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7594
7595     { &hf_nds_root_name,
7596         { "Root Most Object Name", "ncp.nds_root_name", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7597
7598     { &hf_nds_new_part_id,
7599         { "New Partition Root ID", "ncp.nds_new_part_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7600
7601     { &hf_nds_child_part_id,
7602         { "Child Partition Root ID", "ncp.nds_child_part_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7603
7604     { &hf_nds_master_part_id,
7605         { "Master Partition Root ID", "ncp.nds_master_part_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7606
7607     { &hf_nds_target_name,
7608         { "Target Server Name", "ncp.nds_target_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7609
7610
7611         { &hf_bit1pingflags1,
7612         { "Supported Fields", "ncp.bit1pingflags1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7613
7614         { &hf_bit2pingflags1,
7615         { "Depth", "ncp.bit2pingflags1", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7616
7617         { &hf_bit3pingflags1,
7618         { "Revision", "ncp.bit3pingflags1", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7619
7620         { &hf_bit4pingflags1,
7621         { "Flags", "ncp.bit4pingflags1", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7622
7623         { &hf_bit5pingflags1,
7624         { "Verification Flags", "ncp.bit5pingflags1", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7625
7626         { &hf_bit6pingflags1,
7627         { "Letter Version", "ncp.bit6pingflags1", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7628
7629         { &hf_bit7pingflags1,
7630         { "OS Version", "ncp.bit7pingflags1", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7631
7632         { &hf_bit8pingflags1,
7633         { "License Flags", "ncp.bit8pingflags1", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7634
7635         { &hf_bit9pingflags1,
7636         { "DS Time", "ncp.bit9pingflags1", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7637
7638         { &hf_bit10pingflags1,
7639         { "Not Defined", "ncp.bit10pingflags1", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7640
7641         { &hf_bit11pingflags1,
7642         { "Not Defined", "ncp.bit11pingflags1", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7643
7644         { &hf_bit12pingflags1,
7645         { "Not Defined", "ncp.bit12pingflags1", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7646
7647         { &hf_bit13pingflags1,
7648         { "Not Defined", "ncp.bit13pingflags1", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7649
7650         { &hf_bit14pingflags1,
7651         { "Not Defined", "ncp.bit14pingflags1", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7652
7653         { &hf_bit15pingflags1,
7654         { "Not Defined", "ncp.bit15pingflags1", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7655
7656         { &hf_bit16pingflags1,
7657         { "Not Defined", "ncp.bit16pingflags1", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7658
7659         { &hf_bit1pingflags2,
7660         { "Sap Name", "ncp.bit1pingflags2", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7661
7662         { &hf_bit2pingflags2,
7663         { "Tree Name", "ncp.bit2pingflags2", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7664
7665         { &hf_bit3pingflags2,
7666         { "OS Name", "ncp.bit3pingflags2", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7667
7668         { &hf_bit4pingflags2,
7669         { "Hardware Name", "ncp.bit4pingflags2", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7670
7671         { &hf_bit5pingflags2,
7672         { "Vendor Name", "ncp.bit5pingflags2", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7673
7674         { &hf_bit6pingflags2,
7675         { "Not Defined", "ncp.bit6pingflags2", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7676
7677         { &hf_bit7pingflags2,
7678         { "Not Defined", "ncp.bit7pingflags2", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7679
7680         { &hf_bit8pingflags2,
7681         { "Not Defined", "ncp.bit8pingflags2", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7682
7683         { &hf_bit9pingflags2,
7684         { "Not Defined", "ncp.bit9pingflags2", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7685
7686         { &hf_bit10pingflags2,
7687         { "Not Defined", "ncp.bit10pingflags2", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7688
7689         { &hf_bit11pingflags2,
7690         { "Not Defined", "ncp.bit11pingflags2", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7691
7692         { &hf_bit12pingflags2,
7693         { "Not Defined", "ncp.bit12pingflags2", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7694
7695         { &hf_bit13pingflags2,
7696         { "Not Defined", "ncp.bit13pingflags2", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7697
7698         { &hf_bit14pingflags2,
7699         { "Not Defined", "ncp.bit14pingflags2", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7700
7701         { &hf_bit15pingflags2,
7702         { "Not Defined", "ncp.bit15pingflags2", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7703
7704         { &hf_bit16pingflags2,
7705         { "Not Defined", "ncp.bit16pingflags2", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7706
7707         { &hf_bit1pingpflags1,
7708         { "Root Most Master Replica", "ncp.bit1pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7709
7710         { &hf_bit2pingpflags1,
7711         { "Time Synchronized", "ncp.bit2pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7712
7713         { &hf_bit3pingpflags1,
7714         { "Not Defined", "ncp.bit3pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7715
7716         { &hf_bit4pingpflags1,
7717         { "Not Defined", "ncp.bit4pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7718
7719         { &hf_bit5pingpflags1,
7720         { "Not Defined", "ncp.bit5pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7721
7722         { &hf_bit6pingpflags1,
7723         { "Not Defined", "ncp.bit6pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7724
7725         { &hf_bit7pingpflags1,
7726         { "Not Defined", "ncp.bit7pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7727
7728         { &hf_bit8pingpflags1,
7729         { "Not Defined", "ncp.bit8pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7730
7731         { &hf_bit9pingpflags1,
7732         { "Not Defined", "ncp.bit9pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7733
7734         { &hf_bit10pingpflags1,
7735         { "Not Defined", "ncp.bit10pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7736
7737         { &hf_bit11pingpflags1,
7738         { "Not Defined", "ncp.bit11pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7739
7740         { &hf_bit12pingpflags1,
7741         { "Not Defined", "ncp.bit12pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7742
7743         { &hf_bit13pingpflags1,
7744         { "Not Defined", "ncp.bit13pingpflags1", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7745
7746         { &hf_bit14pingpflags1,
7747         { "Not Defined", "ncp.bit14pingpflags1", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7748
7749         { &hf_bit15pingpflags1,
7750         { "Not Defined", "ncp.bit15pingpflags1", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7751
7752         { &hf_bit16pingpflags1,
7753         { "Not Defined", "ncp.bit16pingpflags1", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7754
7755         { &hf_bit1pingvflags1,
7756         { "Checksum", "ncp.bit1pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7757
7758         { &hf_bit2pingvflags1,
7759         { "CRC32", "ncp.bit2pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7760
7761         { &hf_bit3pingvflags1,
7762         { "Not Defined", "ncp.bit3pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7763
7764         { &hf_bit4pingvflags1,
7765         { "Not Defined", "ncp.bit4pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7766
7767         { &hf_bit5pingvflags1,
7768         { "Not Defined", "ncp.bit5pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7769
7770         { &hf_bit6pingvflags1,
7771         { "Not Defined", "ncp.bit6pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7772
7773         { &hf_bit7pingvflags1,
7774         { "Not Defined", "ncp.bit7pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7775
7776         { &hf_bit8pingvflags1,
7777         { "Not Defined", "ncp.bit8pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7778
7779         { &hf_bit9pingvflags1,
7780         { "Not Defined", "ncp.bit9pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7781
7782         { &hf_bit10pingvflags1,
7783         { "Not Defined", "ncp.bit10pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7784
7785         { &hf_bit11pingvflags1,
7786         { "Not Defined", "ncp.bit11pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7787
7788         { &hf_bit12pingvflags1,
7789         { "Not Defined", "ncp.bit12pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7790
7791         { &hf_bit13pingvflags1,
7792         { "Not Defined", "ncp.bit13pingvflags1", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7793
7794         { &hf_bit14pingvflags1,
7795         { "Not Defined", "ncp.bit14pingvflags1", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7796
7797         { &hf_bit15pingvflags1,
7798         { "Not Defined", "ncp.bit15pingvflags1", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7799
7800         { &hf_bit16pingvflags1,
7801         { "Not Defined", "ncp.bit16pingvflags1", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7802
7803     { &hf_nds_letter_ver,
7804         { "Letter Version", "ncp.nds_letter_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7805
7806     { &hf_nds_os_ver,
7807         { "OS Version", "ncp.nds_os_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7808
7809     { &hf_nds_lic_flags,
7810         { "License Flags", "ncp.nds_lic_flags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7811
7812     { &hf_nds_ds_time,
7813         { "DS Time", "ncp.nds_ds_time", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7814
7815     { &hf_nds_ping_version,
7816         { "Ping Version", "ncp.nds_ping_version", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7817
7818     { &hf_nds_search_scope,
7819         { "Search Scope", "ncp.nds_search_scope", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7820
7821     { &hf_nds_num_objects,
7822         { "Number of Objects to Search", "ncp.nds_num_objects", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7823
7824
7825         { &hf_bit1siflags,
7826         { "Names", "ncp.bit1siflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7827
7828         { &hf_bit2siflags,
7829         { "Names and Values", "ncp.bit2siflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7830
7831         { &hf_bit3siflags,
7832         { "Effective Privileges", "ncp.bit3siflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7833
7834         { &hf_bit4siflags,
7835         { "Value Info", "ncp.bit4siflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7836
7837         { &hf_bit5siflags,
7838         { "Abbreviated Value", "ncp.bit5siflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7839
7840         { &hf_bit6siflags,
7841         { "Not Defined", "ncp.bit6siflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7842
7843         { &hf_bit7siflags,
7844         { "Not Defined", "ncp.bit7siflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7845
7846         { &hf_bit8siflags,
7847         { "Not Defined", "ncp.bit8siflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7848
7849         { &hf_bit9siflags,
7850         { "Expanded Class", "ncp.bit9siflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7851
7852         { &hf_bit10siflags,
7853         { "Not Defined", "ncp.bit10siflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7854
7855         { &hf_bit11siflags,
7856         { "Not Defined", "ncp.bit11siflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7857
7858         { &hf_bit12siflags,
7859         { "Not Defined", "ncp.bit12siflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7860
7861         { &hf_bit13siflags,
7862         { "Not Defined", "ncp.bit13siflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7863
7864         { &hf_bit14siflags,
7865         { "Not Defined", "ncp.bit14siflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7866
7867         { &hf_bit15siflags,
7868         { "Not Defined", "ncp.bit15siflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7869
7870         { &hf_bit16siflags,
7871         { "Not Defined", "ncp.bit16siflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7872
7873         { &hf_nds_segment_overlap,
7874           { "Segment overlap",  "nds.segment.overlap", FT_BOOLEAN, BASE_NONE,
7875                 NULL, 0x0, "Segment overlaps with other segments", HFILL }},
7876     
7877         { &hf_nds_segment_overlap_conflict,
7878           { "Conflicting data in segment overlap", "nds.segment.overlap.conflict",
7879         FT_BOOLEAN, BASE_NONE,
7880                 NULL, 0x0, "Overlapping segments contained conflicting data", HFILL }},
7881     
7882         { &hf_nds_segment_multiple_tails,
7883           { "Multiple tail segments found", "nds.segment.multipletails",
7884         FT_BOOLEAN, BASE_NONE,
7885                 NULL, 0x0, "Several tails were found when desegmenting the packet", HFILL }},
7886     
7887         { &hf_nds_segment_too_long_segment,
7888           { "Segment too long", "nds.segment.toolongsegment", FT_BOOLEAN, BASE_NONE,
7889                 NULL, 0x0, "Segment contained data past end of packet", HFILL }},
7890     
7891         { &hf_nds_segment_error,
7892           {"Desegmentation error",      "nds.segment.error", FT_FRAMENUM, BASE_NONE,
7893                 NULL, 0x0, "Desegmentation error due to illegal segments", HFILL }},
7894     
7895         { &hf_nds_segment,
7896           { "NDS Fragment",             "nds.fragment", FT_FRAMENUM, BASE_NONE,
7897                 NULL, 0x0, "NDPS Fragment", HFILL }},
7898     
7899         { &hf_nds_segments,
7900           { "NDS Fragments",    "nds.fragments", FT_NONE, BASE_NONE,
7901                 NULL, 0x0, "NDPS Fragments", HFILL }},
7902
7903  """
7904         # Print the registration code for the hf variables
7905         for var in sorted_vars:
7906                 print "\t{ &%s," % (var.HFName())
7907                 print "\t{ \"%s\", \"%s\", %s, %s, %s, 0x%x, \"\", HFILL }},\n" % \
7908                         (var.Description(), var.DFilter(),
7909                         var.EtherealFType(), var.Display(), var.ValuesName(),
7910                         var.Mask())
7911
7912         print "\t};\n"
7913
7914         if ett_list:
7915                 print "\tstatic gint *ett[] = {"
7916
7917                 for ett in ett_list:
7918                         print "\t\t&%s," % (ett,)
7919
7920                 print "\t};\n"
7921
7922         print """
7923         proto_register_field_array(proto_ncp, hf, array_length(hf));
7924         """
7925
7926         if ett_list:
7927                 print """
7928         proto_register_subtree_array(ett, array_length(ett));
7929                 """
7930
7931         print """
7932         register_init_routine(&ncp_init_protocol);
7933         register_postseq_cleanup_routine(&ncp_postseq_cleanup);
7934         register_final_registration_routine(final_registration_ncp2222);
7935         """
7936
7937
7938         # End of proto_register_ncp2222()
7939         print "}"
7940         print ""
7941         print '#include "packet-ncp2222.inc"'
7942
7943 def usage():
7944         print "Usage: ncp2222.py -o output_file"
7945         sys.exit(1)
7946
7947 def main():
7948         global compcode_lists
7949         global ptvc_lists
7950         global msg
7951
7952         optstring = "o:"
7953         out_filename = None
7954
7955         try:
7956                 opts, args = getopt.getopt(sys.argv[1:], optstring)
7957         except getopt.error:
7958                 usage()
7959
7960         for opt, arg in opts:
7961                 if opt == "-o":
7962                         out_filename = arg
7963                 else:
7964                         usage()
7965
7966         if len(args) != 0:
7967                 usage()
7968
7969         if not out_filename:
7970                 usage()
7971
7972         # Create the output file
7973         try:
7974                 out_file = open(out_filename, "w")
7975         except IOError, err:
7976                 sys.exit("Could not open %s for writing: %s" % (out_filename,
7977                         err))
7978
7979         # Set msg to current stdout
7980         msg = sys.stdout
7981
7982         # Set stdout to the output file
7983         sys.stdout = out_file
7984
7985         msg.write("Processing NCP definitions...\n")
7986         # Run the code, and if we catch any exception,
7987         # erase the output file.
7988         try:
7989                 compcode_lists  = UniqueCollection('Completion Code Lists')
7990                 ptvc_lists      = UniqueCollection('PTVC Lists')
7991
7992                 define_errors()
7993                 define_groups()
7994
7995                 define_ncp2222()
7996
7997                 msg.write("Defined %d NCP types.\n" % (len(packets),))
7998                 produce_code()
7999         except:
8000                 traceback.print_exc(20, msg)
8001                 try:
8002                         out_file.close()
8003                 except IOError, err:
8004                         msg.write("Could not close %s: %s\n" % (out_filename, err))
8005
8006                 try:
8007                         if os.path.exists(out_filename):
8008                                 os.remove(out_filename)
8009                 except OSError, err:
8010                         msg.write("Could not remove %s: %s\n" % (out_filename, err))
8011
8012                 sys.exit(1)
8013
8014
8015
8016 def define_ncp2222():
8017         ##############################################################################
8018         # NCP Packets. Here I list functions and subfunctions in hexadecimal like the
8019         # NCP book (and I believe LanAlyzer does this too).
8020         # However, Novell lists these in decimal in their on-line documentation.
8021         ##############################################################################
8022         # 2222/01
8023         pkt = NCP(0x01, "File Set Lock", 'sync')
8024         pkt.Request(7)
8025         pkt.Reply(8)
8026         pkt.CompletionCodes([0x0000])
8027         # 2222/02
8028         pkt = NCP(0x02, "File Release Lock", 'sync')
8029         pkt.Request(7)
8030         pkt.Reply(8)
8031         pkt.CompletionCodes([0x0000, 0xff00])
8032         # 2222/03
8033         pkt = NCP(0x03, "Log File Exclusive", 'sync')
8034         pkt.Request( (12, 267), [
8035                 rec( 7, 1, DirHandle ),
8036                 rec( 8, 1, LockFlag ),
8037                 rec( 9, 2, TimeoutLimit, BE ),
8038                 rec( 11, (1, 256), FilePath ),
8039         ])
8040         pkt.Reply(8)
8041         pkt.CompletionCodes([0x0000, 0x8200, 0x9600, 0xfe0d, 0xff01])
8042         # 2222/04
8043         pkt = NCP(0x04, "Lock File Set", 'sync')
8044         pkt.Request( 9, [
8045                 rec( 7, 2, TimeoutLimit ),
8046         ])
8047         pkt.Reply(8)
8048         pkt.CompletionCodes([0x0000, 0xfe0d, 0xff01])
8049         ## 2222/05
8050         pkt = NCP(0x05, "Release File", 'sync')
8051         pkt.Request( (9, 264), [
8052                 rec( 7, 1, DirHandle ),
8053                 rec( 8, (1, 256), FilePath ),
8054         ])
8055         pkt.Reply(8)
8056         pkt.CompletionCodes([0x0000, 0x9b00, 0x9c03, 0xff1a])
8057         # 2222/06
8058         pkt = NCP(0x06, "Release File Set", 'sync')
8059         pkt.Request( 8, [
8060                 rec( 7, 1, LockFlag ),
8061         ])
8062         pkt.Reply(8)
8063         pkt.CompletionCodes([0x0000])
8064         # 2222/07
8065         pkt = NCP(0x07, "Clear File", 'sync')
8066         pkt.Request( (9, 264), [
8067                 rec( 7, 1, DirHandle ),
8068                 rec( 8, (1, 256), FilePath ),
8069         ])
8070         pkt.Reply(8)
8071         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03,
8072                 0xa100, 0xfd00, 0xff1a])
8073         # 2222/08
8074         pkt = NCP(0x08, "Clear File Set", 'sync')
8075         pkt.Request( 8, [
8076                 rec( 7, 1, LockFlag ),
8077         ])
8078         pkt.Reply(8)
8079         pkt.CompletionCodes([0x0000])
8080         # 2222/09
8081         pkt = NCP(0x09, "Log Logical Record", 'sync')
8082         pkt.Request( (11, 138), [
8083                 rec( 7, 1, LockFlag ),
8084                 rec( 8, 2, TimeoutLimit, BE ),
8085                 rec( 10, (1, 128), LogicalRecordName ),
8086         ], info_str=(LogicalRecordName, "Log Logical Record: %s", ", %s"))
8087         pkt.Reply(8)
8088         pkt.CompletionCodes([0x0000, 0x9600, 0xfe0d, 0xff1a])
8089         # 2222/0A, 10
8090         pkt = NCP(0x0A, "Lock Logical Record Set", 'sync')
8091         pkt.Request( 10, [
8092                 rec( 7, 1, LockFlag ),
8093                 rec( 8, 2, TimeoutLimit ),
8094         ])
8095         pkt.Reply(8)
8096         pkt.CompletionCodes([0x0000, 0xfe0d, 0xff1a])
8097         # 2222/0B, 11
8098         pkt = NCP(0x0B, "Clear Logical Record", 'sync')
8099         pkt.Request( (8, 135), [
8100                 rec( 7, (1, 128), LogicalRecordName ),
8101         ], info_str=(LogicalRecordName, "Clear Logical Record: %s", ", %s"))
8102         pkt.Reply(8)
8103         pkt.CompletionCodes([0x0000, 0xff1a])
8104         # 2222/0C, 12
8105         pkt = NCP(0x0C, "Release Logical Record", 'sync')
8106         pkt.Request( (8, 135), [
8107                 rec( 7, (1, 128), LogicalRecordName ),
8108         ], info_str=(LogicalRecordName, "Release Logical Record: %s", ", %s"))
8109         pkt.Reply(8)
8110         pkt.CompletionCodes([0x0000, 0xff1a])
8111         # 2222/0D, 13
8112         pkt = NCP(0x0D, "Release Logical Record Set", 'sync')
8113         pkt.Request( 8, [
8114                 rec( 7, 1, LockFlag ),
8115         ])
8116         pkt.Reply(8)
8117         pkt.CompletionCodes([0x0000])
8118         # 2222/0E, 14
8119         pkt = NCP(0x0E, "Clear Logical Record Set", 'sync')
8120         pkt.Request( 8, [
8121                 rec( 7, 1, LockFlag ),
8122         ])
8123         pkt.Reply(8)
8124         pkt.CompletionCodes([0x0000])
8125         # 2222/1100, 17/00
8126         pkt = NCP(0x1100, "Write to Spool File", 'print')
8127         pkt.Request( (11, 16), [
8128                 rec( 10, ( 1, 6 ), Data ),
8129         ], info_str=(Data, "Write to Spool File: %s", ", %s"))
8130         pkt.Reply(8)
8131         pkt.CompletionCodes([0x0000, 0x0104, 0x8000, 0x8101, 0x8701, 0x8800,
8132                              0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9400, 0x9500,
8133                              0x9600, 0x9804, 0x9900, 0xa100, 0xa201, 0xff19])
8134         # 2222/1101, 17/01
8135         pkt = NCP(0x1101, "Close Spool File", 'print')
8136         pkt.Request( 11, [
8137                 rec( 10, 1, AbortQueueFlag ),
8138         ])
8139         pkt.Reply(8)
8140         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8701, 0x8800, 0x8d00,
8141                              0x8e00, 0x8f00, 0x9001, 0x9300, 0x9400, 0x9500,
8142                              0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03, 0x9d00,
8143                              0xa100, 0xd000, 0xd100, 0xd202, 0xd300, 0xd400,
8144                              0xda01, 0xe800, 0xea00, 0xeb00, 0xec00, 0xfc06,
8145                              0xfd00, 0xfe07, 0xff06])
8146         # 2222/1102, 17/02
8147         pkt = NCP(0x1102, "Set Spool File Flags", 'print')
8148         pkt.Request( 30, [
8149                 rec( 10, 1, PrintFlags ),
8150                 rec( 11, 1, TabSize ),
8151                 rec( 12, 1, TargetPrinter ),
8152                 rec( 13, 1, Copies ),
8153                 rec( 14, 1, FormType ),
8154                 rec( 15, 1, Reserved ),
8155                 rec( 16, 14, BannerName ),
8156         ])
8157         pkt.Reply(8)
8158         pkt.CompletionCodes([0x0000, 0x9600, 0xd202, 0xd300, 0xe800, 0xea00,
8159                              0xeb00, 0xec00, 0xfc06, 0xfe07, 0xff06])
8160
8161         # 2222/1103, 17/03
8162         pkt = NCP(0x1103, "Spool A Disk File", 'print')
8163         pkt.Request( (12, 23), [
8164                 rec( 10, 1, DirHandle ),
8165                 rec( 11, (1, 12), Data ),
8166         ], info_str=(Data, "Spool a Disk File: %s", ", %s"))
8167         pkt.Reply(8)
8168         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8701, 0x8800, 0x8d00,
8169                              0x8e00, 0x8f00, 0x9001, 0x9300, 0x9400, 0x9500,
8170                              0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03, 0x9d00,
8171                              0xa100, 0xd000, 0xd100, 0xd202, 0xd300, 0xd400,
8172                              0xda01, 0xe800, 0xea00, 0xeb00, 0xec00, 0xfc06,
8173                              0xfd00, 0xfe07, 0xff06])
8174
8175         # 2222/1106, 17/06
8176         pkt = NCP(0x1106, "Get Printer Status", 'print')
8177         pkt.Request( 11, [
8178                 rec( 10, 1, TargetPrinter ),
8179         ])
8180         pkt.Reply(12, [
8181                 rec( 8, 1, PrinterHalted ),
8182                 rec( 9, 1, PrinterOffLine ),
8183                 rec( 10, 1, CurrentFormType ),
8184                 rec( 11, 1, RedirectedPrinter ),
8185         ])
8186         pkt.CompletionCodes([0x0000, 0x9600, 0xfb05, 0xfd00, 0xff06])
8187
8188         # 2222/1109, 17/09
8189         pkt = NCP(0x1109, "Create Spool File", 'print')
8190         pkt.Request( (12, 23), [
8191                 rec( 10, 1, DirHandle ),
8192                 rec( 11, (1, 12), Data ),
8193         ], info_str=(Data, "Create Spool File: %s", ", %s"))
8194         pkt.Reply(8)
8195         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8400, 0x8701, 0x8d00,
8196                              0x8f00, 0x9001, 0x9400, 0x9600, 0x9804, 0x9900,
8197                              0x9b03, 0x9c03, 0xa100, 0xd000, 0xd100, 0xd202,
8198                              0xd300, 0xd400, 0xda01, 0xe800, 0xea00, 0xeb00,
8199                              0xec00, 0xfc06, 0xfd00, 0xfe07, 0xff06])
8200
8201         # 2222/110A, 17/10
8202         pkt = NCP(0x110A, "Get Printer's Queue", 'print')
8203         pkt.Request( 11, [
8204                 rec( 10, 1, TargetPrinter ),
8205         ])
8206         pkt.Reply( 12, [
8207                 rec( 8, 4, ObjectID, BE ),
8208         ])
8209         pkt.CompletionCodes([0x0000, 0x9600, 0xff06])
8210
8211         # 2222/12, 18
8212         pkt = NCP(0x12, "Get Volume Info with Number", 'file')
8213         pkt.Request( 8, [
8214                 rec( 7, 1, VolumeNumber )
8215         ],info_str=(VolumeNumber, "Get Volume Information for Volume %d", ", %d"))
8216         pkt.Reply( 36, [
8217                 rec( 8, 2, SectorsPerCluster, BE ),
8218                 rec( 10, 2, TotalVolumeClusters, BE ),
8219                 rec( 12, 2, AvailableClusters, BE ),
8220                 rec( 14, 2, TotalDirectorySlots, BE ),
8221                 rec( 16, 2, AvailableDirectorySlots, BE ),
8222                 rec( 18, 16, VolumeName ),
8223                 rec( 34, 2, RemovableFlag, BE ),
8224         ])
8225         pkt.CompletionCodes([0x0000, 0x9804])
8226
8227         # 2222/13, 19
8228         pkt = NCP(0x13, "Get Station Number", 'connection')
8229         pkt.Request(7)
8230         pkt.Reply(11, [
8231                 rec( 8, 3, StationNumber )
8232         ])
8233         pkt.CompletionCodes([0x0000, 0xff00])
8234
8235         # 2222/14, 20
8236         pkt = NCP(0x14, "Get File Server Date And Time", 'fileserver')
8237         pkt.Request(7)
8238         pkt.Reply(15, [
8239                 rec( 8, 1, Year ),
8240                 rec( 9, 1, Month ),
8241                 rec( 10, 1, Day ),
8242                 rec( 11, 1, Hour ),
8243                 rec( 12, 1, Minute ),
8244                 rec( 13, 1, Second ),
8245                 rec( 14, 1, DayOfWeek ),
8246         ])
8247         pkt.CompletionCodes([0x0000])
8248
8249         # 2222/1500, 21/00
8250         pkt = NCP(0x1500, "Send Broadcast Message", 'message')
8251         pkt.Request((13, 70), [
8252                 rec( 10, 1, ClientListLen, var="x" ),
8253                 rec( 11, 1, TargetClientList, repeat="x" ),
8254                 rec( 12, (1, 58), TargetMessage ),
8255         ], info_str=(TargetMessage, "Send Broadcast Message: %s", ", %s"))
8256         pkt.Reply(10, [
8257                 rec( 8, 1, ClientListLen, var="x" ),
8258                 rec( 9, 1, SendStatus, repeat="x" )
8259         ])
8260         pkt.CompletionCodes([0x0000, 0xfd00])
8261
8262         # 2222/1501, 21/01
8263         pkt = NCP(0x1501, "Get Broadcast Message", 'message')
8264         pkt.Request(10)
8265         pkt.Reply((9,66), [
8266                 rec( 8, (1, 58), TargetMessage )
8267         ])
8268         pkt.CompletionCodes([0x0000, 0xfd00])
8269
8270         # 2222/1502, 21/02
8271         pkt = NCP(0x1502, "Disable Broadcasts", 'message')
8272         pkt.Request(10)
8273         pkt.Reply(8)
8274         pkt.CompletionCodes([0x0000, 0xfb0a])
8275
8276         # 2222/1503, 21/03
8277         pkt = NCP(0x1503, "Enable Broadcasts", 'message')
8278         pkt.Request(10)
8279         pkt.Reply(8)
8280         pkt.CompletionCodes([0x0000])
8281
8282         # 2222/1509, 21/09
8283         pkt = NCP(0x1509, "Broadcast To Console", 'message')
8284         pkt.Request((11, 68), [
8285                 rec( 10, (1, 58), TargetMessage )
8286         ], info_str=(TargetMessage, "Broadcast to Console: %s", ", %s"))
8287         pkt.Reply(8)
8288         pkt.CompletionCodes([0x0000])
8289
8290         # 2222/150A, 21/10
8291         pkt = NCP(0x150A, "Send Broadcast Message", 'message')
8292         pkt.Request((17, 74), [
8293                 rec( 10, 2, ClientListCount, LE, var="x" ),
8294                 rec( 12, 4, ClientList, LE, repeat="x" ),
8295                 rec( 16, (1, 58), TargetMessage ),
8296         ], info_str=(TargetMessage, "Send Broadcast Message: %s", ", %s"))
8297         pkt.Reply(14, [
8298                 rec( 8, 2, ClientListCount, LE, var="x" ),
8299                 rec( 10, 4, ClientCompFlag, LE, repeat="x" ),
8300         ])
8301         pkt.CompletionCodes([0x0000, 0xfd00])
8302
8303         # 2222/150B, 21/11
8304         pkt = NCP(0x150B, "Get Broadcast Message", 'message')
8305         pkt.Request(10)
8306         pkt.Reply((9,66), [
8307                 rec( 8, (1, 58), TargetMessage )
8308         ])
8309         pkt.CompletionCodes([0x0000, 0xfd00])
8310
8311         # 2222/150C, 21/12
8312         pkt = NCP(0x150C, "Connection Message Control", 'message')
8313         pkt.Request(22, [
8314                 rec( 10, 1, ConnectionControlBits ),
8315                 rec( 11, 3, Reserved3 ),
8316                 rec( 14, 4, ConnectionListCount, LE, var="x" ),
8317                 rec( 18, 4, ConnectionList, LE, repeat="x" ),
8318         ])
8319         pkt.Reply(8)
8320         pkt.CompletionCodes([0x0000, 0xff00])
8321
8322         # 2222/1600, 22/0
8323         pkt = NCP(0x1600, "Set Directory Handle", 'file')
8324         pkt.Request((13,267), [
8325                 rec( 10, 1, TargetDirHandle ),
8326                 rec( 11, 1, DirHandle ),
8327                 rec( 12, (1, 255), Path ),
8328         ], info_str=(Path, "Set Directory Handle to: %s", ", %s"))
8329         pkt.Reply(8)
8330         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8331                              0xfd00, 0xff00])
8332
8333
8334         # 2222/1601, 22/1
8335         pkt = NCP(0x1601, "Get Directory Path", 'file')
8336         pkt.Request(11, [
8337                 rec( 10, 1, DirHandle ),
8338         ],info_str=(DirHandle, "Get Directory Path for Directory Handle %d", ", %d"))
8339         pkt.Reply((9,263), [
8340                 rec( 8, (1,255), Path ),
8341         ])
8342         pkt.CompletionCodes([0x0000, 0x9600, 0x9b00, 0x9c00, 0xa100])
8343
8344         # 2222/1602, 22/2
8345         pkt = NCP(0x1602, "Scan Directory Information", 'file')
8346         pkt.Request((14,268), [
8347                 rec( 10, 1, DirHandle ),
8348                 rec( 11, 2, StartingSearchNumber, BE ),
8349                 rec( 13, (1, 255), Path ),
8350         ], info_str=(Path, "Scan Directory Information: %s", ", %s"))
8351         pkt.Reply(36, [
8352                 rec( 8, 16, DirectoryPath ),
8353                 rec( 24, 2, CreationDate, BE ),
8354                 rec( 26, 2, CreationTime, BE ),
8355                 rec( 28, 4, CreatorID, BE ),
8356                 rec( 32, 1, AccessRightsMask ),
8357                 rec( 33, 1, Reserved ),
8358                 rec( 34, 2, NextSearchNumber, BE ),
8359         ])
8360         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8361                              0xfd00, 0xff00])
8362
8363         # 2222/1603, 22/3
8364         pkt = NCP(0x1603, "Get Effective Directory Rights", 'file')
8365         pkt.Request((12,266), [
8366                 rec( 10, 1, DirHandle ),
8367                 rec( 11, (1, 255), Path ),
8368         ], info_str=(Path, "Get Effective Directory Rights: %s", ", %s"))
8369         pkt.Reply(9, [
8370                 rec( 8, 1, AccessRightsMask ),
8371         ])
8372         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8373                              0xfd00, 0xff00])
8374
8375         # 2222/1604, 22/4
8376         pkt = NCP(0x1604, "Modify Maximum Rights Mask", 'file')
8377         pkt.Request((14,268), [
8378                 rec( 10, 1, DirHandle ),
8379                 rec( 11, 1, RightsGrantMask ),
8380                 rec( 12, 1, RightsRevokeMask ),
8381                 rec( 13, (1, 255), Path ),
8382         ], info_str=(Path, "Modify Maximum Rights Mask: %s", ", %s"))
8383         pkt.Reply(8)
8384         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8385                              0xfd00, 0xff00])
8386
8387         # 2222/1605, 22/5
8388         pkt = NCP(0x1605, "Get Volume Number", 'file')
8389         pkt.Request((11, 265), [
8390                 rec( 10, (1,255), VolumeNameLen ),
8391         ], info_str=(VolumeNameLen, "Get Volume Number for: %s", ", %s"))
8392         pkt.Reply(9, [
8393                 rec( 8, 1, VolumeNumber ),
8394         ])
8395         pkt.CompletionCodes([0x0000, 0x9600, 0x9804])
8396
8397         # 2222/1606, 22/6
8398         pkt = NCP(0x1606, "Get Volume Name", 'file')
8399         pkt.Request(11, [
8400                 rec( 10, 1, VolumeNumber ),
8401         ],info_str=(VolumeNumber, "Get Name for Volume %d", ", %d"))
8402         pkt.Reply((9, 263), [
8403                 rec( 8, (1,255), VolumeNameLen ),
8404         ])
8405         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0xff00])
8406
8407         # 2222/160A, 22/10
8408         pkt = NCP(0x160A, "Create Directory", 'file')
8409         pkt.Request((13,267), [
8410                 rec( 10, 1, DirHandle ),
8411                 rec( 11, 1, AccessRightsMask ),
8412                 rec( 12, (1, 255), Path ),
8413         ], info_str=(Path, "Create Directory: %s", ", %s"))
8414         pkt.Reply(8)
8415         pkt.CompletionCodes([0x0000, 0x8400, 0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03,
8416                              0x9e00, 0xa100, 0xfd00, 0xff00])
8417
8418         # 2222/160B, 22/11
8419         pkt = NCP(0x160B, "Delete Directory", 'file')
8420         pkt.Request((13,267), [
8421                 rec( 10, 1, DirHandle ),
8422                 rec( 11, 1, Reserved ),
8423                 rec( 12, (1, 255), Path ),
8424         ], info_str=(Path, "Delete Directory: %s", ", %s"))
8425         pkt.Reply(8)
8426         pkt.CompletionCodes([0x0000, 0x8a00, 0x9600, 0x9804, 0x9b03, 0x9c03,
8427                              0x9f00, 0xa000, 0xa100, 0xfd00, 0xff00])
8428
8429         # 2222/160C, 22/12
8430         pkt = NCP(0x160C, "Scan Directory for Trustees", 'file')
8431         pkt.Request((13,267), [
8432                 rec( 10, 1, DirHandle ),
8433                 rec( 11, 1, TrusteeSetNumber ),
8434                 rec( 12, (1, 255), Path ),
8435         ], info_str=(Path, "Scan Directory for Trustees: %s", ", %s"))
8436         pkt.Reply(57, [
8437                 rec( 8, 16, DirectoryPath ),
8438                 rec( 24, 2, CreationDate, BE ),
8439                 rec( 26, 2, CreationTime, BE ),
8440                 rec( 28, 4, CreatorID ),
8441                 rec( 32, 4, TrusteeID, BE ),
8442                 rec( 36, 4, TrusteeID, BE ),
8443                 rec( 40, 4, TrusteeID, BE ),
8444                 rec( 44, 4, TrusteeID, BE ),
8445                 rec( 48, 4, TrusteeID, BE ),
8446                 rec( 52, 1, AccessRightsMask ),
8447                 rec( 53, 1, AccessRightsMask ),
8448                 rec( 54, 1, AccessRightsMask ),
8449                 rec( 55, 1, AccessRightsMask ),
8450                 rec( 56, 1, AccessRightsMask ),
8451         ])
8452         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9b03, 0x9c03,
8453                              0xa100, 0xfd00, 0xff00])
8454
8455         # 2222/160D, 22/13
8456         pkt = NCP(0x160D, "Add Trustee to Directory", 'file')
8457         pkt.Request((17,271), [
8458                 rec( 10, 1, DirHandle ),
8459                 rec( 11, 4, TrusteeID, BE ),
8460                 rec( 15, 1, AccessRightsMask ),
8461                 rec( 16, (1, 255), Path ),
8462         ], info_str=(Path, "Add Trustee to Directory: %s", ", %s"))
8463         pkt.Reply(8)
8464         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03,
8465                              0xa100, 0xfc06, 0xfd00, 0xff00])
8466
8467         # 2222/160E, 22/14
8468         pkt = NCP(0x160E, "Delete Trustee from Directory", 'file')
8469         pkt.Request((17,271), [
8470                 rec( 10, 1, DirHandle ),
8471                 rec( 11, 4, TrusteeID, BE ),
8472                 rec( 15, 1, Reserved ),
8473                 rec( 16, (1, 255), Path ),
8474         ], info_str=(Path, "Delete Trustee from Directory: %s", ", %s"))
8475         pkt.Reply(8)
8476         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03,
8477                              0xa100, 0xfc06, 0xfd00, 0xfe07, 0xff00])
8478
8479         # 2222/160F, 22/15
8480         pkt = NCP(0x160F, "Rename Directory", 'file')
8481         pkt.Request((13, 521), [
8482                 rec( 10, 1, DirHandle ),
8483                 rec( 11, (1, 255), Path ),
8484                 rec( -1, (1, 255), NewPath ),
8485         ], info_str=(Path, "Rename Directory: %s", ", %s"))
8486         pkt.Reply(8)
8487         pkt.CompletionCodes([0x0000, 0x8b00, 0x9200, 0x9600, 0x9804, 0x9b03, 0x9c03,
8488                              0x9e00, 0xa100, 0xef00, 0xfd00, 0xff00])
8489
8490         # 2222/1610, 22/16
8491         pkt = NCP(0x1610, "Purge Erased Files", 'file')
8492         pkt.Request(10)
8493         pkt.Reply(8)
8494         pkt.CompletionCodes([0x0000, 0x8100, 0x9600, 0x9804, 0xa100, 0xff00])
8495
8496         # 2222/1611, 22/17
8497         pkt = NCP(0x1611, "Recover Erased File", 'file')
8498         pkt.Request(11, [
8499                 rec( 10, 1, DirHandle ),
8500         ],info_str=(DirHandle, "Recover Erased File from Directory Handle %d", ", %d"))
8501         pkt.Reply(38, [
8502                 rec( 8, 15, OldFileName ),
8503                 rec( 23, 15, NewFileName ),
8504         ])
8505         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03,
8506                              0xa100, 0xfd00, 0xff00])
8507         # 2222/1612, 22/18
8508         pkt = NCP(0x1612, "Alloc Permanent Directory Handle", 'file')
8509         pkt.Request((13, 267), [
8510                 rec( 10, 1, DirHandle ),
8511                 rec( 11, 1, DirHandleName ),
8512                 rec( 12, (1,255), Path ),
8513         ], info_str=(Path, "Allocate Permanent Directory Handle: %s", ", %s"))
8514         pkt.Reply(10, [
8515                 rec( 8, 1, DirHandle ),
8516                 rec( 9, 1, AccessRightsMask ),
8517         ])
8518         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9900, 0x9b00, 0x9c03, 0x9d00,
8519                              0xa100, 0xfd00, 0xff00])
8520         # 2222/1613, 22/19
8521         pkt = NCP(0x1613, "Alloc Temporary Directory Handle", 'file')
8522         pkt.Request((13, 267), [
8523                 rec( 10, 1, DirHandle ),
8524                 rec( 11, 1, DirHandleName ),
8525                 rec( 12, (1,255), Path ),
8526         ], info_str=(Path, "Allocate Temporary Directory Handle: %s", ", %s"))
8527         pkt.Reply(10, [
8528                 rec( 8, 1, DirHandle ),
8529                 rec( 9, 1, AccessRightsMask ),
8530         ])
8531         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9900, 0x9c03, 0x9d00,
8532                              0xa100, 0xfd00, 0xff00])
8533         # 2222/1614, 22/20
8534         pkt = NCP(0x1614, "Deallocate Directory Handle", 'file')
8535         pkt.Request(11, [
8536                 rec( 10, 1, DirHandle ),
8537         ],info_str=(DirHandle, "Deallocate Directory Handle %d", ", %d"))
8538         pkt.Reply(8)
8539         pkt.CompletionCodes([0x0000, 0x9b03])
8540         # 2222/1615, 22/21
8541         pkt = NCP(0x1615, "Get Volume Info with Handle", 'file')
8542         pkt.Request( 11, [
8543                 rec( 10, 1, DirHandle )
8544         ],info_str=(DirHandle, "Get Volume Information with Handle %d", ", %d"))
8545         pkt.Reply( 36, [
8546                 rec( 8, 2, SectorsPerCluster, BE ),
8547                 rec( 10, 2, TotalVolumeClusters, BE ),
8548                 rec( 12, 2, AvailableClusters, BE ),
8549                 rec( 14, 2, TotalDirectorySlots, BE ),
8550                 rec( 16, 2, AvailableDirectorySlots, BE ),
8551                 rec( 18, 16, VolumeName ),
8552                 rec( 34, 2, RemovableFlag, BE ),
8553         ])
8554         pkt.CompletionCodes([0x0000, 0xff00])
8555         # 2222/1616, 22/22
8556         pkt = NCP(0x1616, "Alloc Special Temporary Directory Handle", 'file')
8557         pkt.Request((13, 267), [
8558                 rec( 10, 1, DirHandle ),
8559                 rec( 11, 1, DirHandleName ),
8560                 rec( 12, (1,255), Path ),
8561         ], info_str=(Path, "Allocate Special Temporary Directory Handle: %s", ", %s"))
8562         pkt.Reply(10, [
8563                 rec( 8, 1, DirHandle ),
8564                 rec( 9, 1, AccessRightsMask ),
8565         ])
8566         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9900, 0x9b00, 0x9c03, 0x9d00,
8567                              0xa100, 0xfd00, 0xff00])
8568         # 2222/1617, 22/23
8569         pkt = NCP(0x1617, "Extract a Base Handle", 'file')
8570         pkt.Request(11, [
8571                 rec( 10, 1, DirHandle ),
8572         ],info_str=(DirHandle, "Extract a Base Handle from Directory Handle %d", ", %d"))
8573         pkt.Reply(22, [
8574                 rec( 8, 10, ServerNetworkAddress ),
8575                 rec( 18, 4, DirHandleLong ),
8576         ])
8577         pkt.CompletionCodes([0x0000, 0x9600, 0x9b03])
8578         # 2222/1618, 22/24
8579         pkt = NCP(0x1618, "Restore an Extracted Base Handle", 'file')
8580         pkt.Request(24, [
8581                 rec( 10, 10, ServerNetworkAddress ),
8582                 rec( 20, 4, DirHandleLong ),
8583         ])
8584         pkt.Reply(10, [
8585                 rec( 8, 1, DirHandle ),
8586                 rec( 9, 1, AccessRightsMask ),
8587         ])
8588         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c00, 0x9d00, 0xa100,
8589                              0xfd00, 0xff00])
8590         # 2222/1619, 22/25
8591         pkt = NCP(0x1619, "Set Directory Information", 'file')
8592         pkt.Request((21, 275), [
8593                 rec( 10, 1, DirHandle ),
8594                 rec( 11, 2, CreationDate ),
8595                 rec( 13, 2, CreationTime ),
8596                 rec( 15, 4, CreatorID, BE ),
8597                 rec( 19, 1, AccessRightsMask ),
8598                 rec( 20, (1,255), Path ),
8599         ], info_str=(Path, "Set Directory Information: %s", ", %s"))
8600         pkt.Reply(8)
8601         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9b03, 0x9c00, 0xa100,
8602                              0xff16])
8603         # 2222/161A, 22/26
8604         pkt = NCP(0x161A, "Get Path Name of a Volume-Directory Number Pair", 'file')
8605         pkt.Request(13, [
8606                 rec( 10, 1, VolumeNumber ),
8607                 rec( 11, 2, DirectoryEntryNumberWord ),
8608         ])
8609         pkt.Reply((9,263), [
8610                 rec( 8, (1,255), Path ),
8611                 ])
8612         pkt.CompletionCodes([0x0000, 0x9804, 0x9c00, 0xa100])
8613         # 2222/161B, 22/27
8614         pkt = NCP(0x161B, "Scan Salvageable Files", 'file')
8615         pkt.Request(15, [
8616                 rec( 10, 1, DirHandle ),
8617                 rec( 11, 4, SequenceNumber ),
8618         ])
8619         pkt.Reply(140, [
8620                 rec( 8, 4, SequenceNumber ),
8621                 rec( 12, 2, Subdirectory ),
8622                 rec( 14, 2, Reserved2 ),
8623                 rec( 16, 4, AttributesDef32 ),
8624                 rec( 20, 1, UniqueID ),
8625                 rec( 21, 1, FlagsDef ),
8626                 rec( 22, 1, DestNameSpace ),
8627                 rec( 23, 1, FileNameLen ),
8628                 rec( 24, 12, FileName12 ),
8629                 rec( 36, 2, CreationTime ),
8630                 rec( 38, 2, CreationDate ),
8631                 rec( 40, 4, CreatorID, BE ),
8632                 rec( 44, 2, ArchivedTime ),
8633                 rec( 46, 2, ArchivedDate ),
8634                 rec( 48, 4, ArchiverID, BE ),
8635                 rec( 52, 2, UpdateTime ),
8636                 rec( 54, 2, UpdateDate ),
8637                 rec( 56, 4, UpdateID, BE ),
8638                 rec( 60, 4, FileSize, BE ),
8639                 rec( 64, 44, Reserved44 ),
8640                 rec( 108, 2, InheritedRightsMask ),
8641                 rec( 110, 2, LastAccessedDate ),
8642                 rec( 112, 4, DeletedFileTime ),
8643                 rec( 116, 2, DeletedTime ),
8644                 rec( 118, 2, DeletedDate ),
8645                 rec( 120, 4, DeletedID, BE ),
8646                 rec( 124, 16, Reserved16 ),
8647         ])
8648         pkt.CompletionCodes([0x0000, 0xfb01, 0x9801, 0xff1d])
8649         # 2222/161C, 22/28
8650         pkt = NCP(0x161C, "Recover Salvageable File", 'file')
8651         pkt.Request((17,525), [
8652                 rec( 10, 1, DirHandle ),
8653                 rec( 11, 4, SequenceNumber ),
8654                 rec( 15, (1, 255), FileName ),
8655                 rec( -1, (1, 255), NewFileNameLen ),
8656         ], info_str=(FileName, "Recover File: %s", ", %s"))
8657         pkt.Reply(8)
8658         pkt.CompletionCodes([0x0000, 0x8401, 0x9c03, 0xfe02])
8659         # 2222/161D, 22/29
8660         pkt = NCP(0x161D, "Purge Salvageable File", 'file')
8661         pkt.Request(15, [
8662                 rec( 10, 1, DirHandle ),
8663                 rec( 11, 4, SequenceNumber ),
8664         ])
8665         pkt.Reply(8)
8666         pkt.CompletionCodes([0x0000, 0x8500, 0x9c03])
8667         # 2222/161E, 22/30
8668         pkt = NCP(0x161E, "Scan a Directory", 'file')
8669         pkt.Request((17, 271), [
8670                 rec( 10, 1, DirHandle ),
8671                 rec( 11, 1, DOSFileAttributes ),
8672                 rec( 12, 4, SequenceNumber ),
8673                 rec( 16, (1, 255), SearchPattern ),
8674         ], info_str=(SearchPattern, "Scan a Directory: %s", ", %s"))
8675         pkt.Reply(140, [
8676                 rec( 8, 4, SequenceNumber ),
8677                 rec( 12, 4, Subdirectory ),
8678                 rec( 16, 4, AttributesDef32 ),
8679                 rec( 20, 1, UniqueID, LE ),
8680                 rec( 21, 1, PurgeFlags ),
8681                 rec( 22, 1, DestNameSpace ),
8682                 rec( 23, 1, NameLen ),
8683                 rec( 24, 12, Name12 ),
8684                 rec( 36, 2, CreationTime ),
8685                 rec( 38, 2, CreationDate ),
8686                 rec( 40, 4, CreatorID, BE ),
8687                 rec( 44, 2, ArchivedTime ),
8688                 rec( 46, 2, ArchivedDate ),
8689                 rec( 48, 4, ArchiverID, BE ),
8690                 rec( 52, 2, UpdateTime ),
8691                 rec( 54, 2, UpdateDate ),
8692                 rec( 56, 4, UpdateID, BE ),
8693                 rec( 60, 4, FileSize, BE ),
8694                 rec( 64, 44, Reserved44 ),
8695                 rec( 108, 2, InheritedRightsMask ),
8696                 rec( 110, 2, LastAccessedDate ),
8697                 rec( 112, 28, Reserved28 ),
8698         ])
8699         pkt.CompletionCodes([0x0000, 0x8500, 0x9c03])
8700         # 2222/161F, 22/31
8701         pkt = NCP(0x161F, "Get Directory Entry", 'file')
8702         pkt.Request(11, [
8703                 rec( 10, 1, DirHandle ),
8704         ])
8705         pkt.Reply(136, [
8706                 rec( 8, 4, Subdirectory ),
8707                 rec( 12, 4, AttributesDef32 ),
8708                 rec( 16, 1, UniqueID, LE ),
8709                 rec( 17, 1, PurgeFlags ),
8710                 rec( 18, 1, DestNameSpace ),
8711                 rec( 19, 1, NameLen ),
8712                 rec( 20, 12, Name12 ),
8713                 rec( 32, 2, CreationTime ),
8714                 rec( 34, 2, CreationDate ),
8715                 rec( 36, 4, CreatorID, BE ),
8716                 rec( 40, 2, ArchivedTime ),
8717                 rec( 42, 2, ArchivedDate ),
8718                 rec( 44, 4, ArchiverID, BE ),
8719                 rec( 48, 2, UpdateTime ),
8720                 rec( 50, 2, UpdateDate ),
8721                 rec( 52, 4, NextTrusteeEntry, BE ),
8722                 rec( 56, 48, Reserved48 ),
8723                 rec( 104, 2, MaximumSpace ),
8724                 rec( 106, 2, InheritedRightsMask ),
8725                 rec( 108, 28, Undefined28 ),
8726         ])
8727         pkt.CompletionCodes([0x0000, 0x8900, 0xbf00, 0xfb00])
8728         # 2222/1620, 22/32
8729         pkt = NCP(0x1620, "Scan Volume's User Disk Restrictions", 'file')
8730         pkt.Request(15, [
8731                 rec( 10, 1, VolumeNumber ),
8732                 rec( 11, 4, SequenceNumber ),
8733         ])
8734         pkt.Reply(17, [
8735                 rec( 8, 1, NumberOfEntries, var="x" ),
8736                 rec( 9, 8, ObjectIDStruct, repeat="x" ),
8737         ])
8738         pkt.CompletionCodes([0x0000, 0x9800])
8739         # 2222/1621, 22/33
8740         pkt = NCP(0x1621, "Add User Disk Space Restriction", 'file')
8741         pkt.Request(19, [
8742                 rec( 10, 1, VolumeNumber ),
8743                 rec( 11, 4, ObjectID ),
8744                 rec( 15, 4, DiskSpaceLimit ),
8745         ])
8746         pkt.Reply(8)
8747         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9800])
8748         # 2222/1622, 22/34
8749         pkt = NCP(0x1622, "Remove User Disk Space Restrictions", 'file')
8750         pkt.Request(15, [
8751                 rec( 10, 1, VolumeNumber ),
8752                 rec( 11, 4, ObjectID ),
8753         ])
8754         pkt.Reply(8)
8755         pkt.CompletionCodes([0x0000, 0x8c00, 0xfe0e])
8756         # 2222/1623, 22/35
8757         pkt = NCP(0x1623, "Get Directory Disk Space Restriction", 'file')
8758         pkt.Request(11, [
8759                 rec( 10, 1, DirHandle ),
8760         ])
8761         pkt.Reply(18, [
8762                 rec( 8, 1, NumberOfEntries ),
8763                 rec( 9, 1, Level ),
8764                 rec( 10, 4, MaxSpace ),
8765                 rec( 14, 4, CurrentSpace ),
8766         ])
8767         pkt.CompletionCodes([0x0000])
8768         # 2222/1624, 22/36
8769         pkt = NCP(0x1624, "Set Directory Disk Space Restriction", 'file')
8770         pkt.Request(15, [
8771                 rec( 10, 1, DirHandle ),
8772                 rec( 11, 4, DiskSpaceLimit ),
8773         ])
8774         pkt.Reply(8)
8775         pkt.CompletionCodes([0x0000, 0x0101, 0x8c00, 0xbf00])
8776         # 2222/1625, 22/37
8777         pkt = NCP(0x1625, "Set Directory Entry Information", 'file')
8778         pkt.Request(NO_LENGTH_CHECK, [
8779                 #
8780                 # XXX - this didn't match what was in the spec for 22/37
8781                 # on the Novell Web site.
8782                 #
8783                 rec( 10, 1, DirHandle ),
8784                 rec( 11, 1, SearchAttributes ),
8785                 rec( 12, 4, SequenceNumber ),
8786                 rec( 16, 2, ChangeBits ),
8787                 rec( 18, 2, Reserved2 ),
8788                 rec( 20, 4, Subdirectory ),
8789                 srec(DOSDirectoryEntryStruct, req_cond="ncp.search_att_sub == TRUE"),
8790                 srec(DOSFileEntryStruct, req_cond="ncp.search_att_sub == FALSE"),
8791         ])
8792         pkt.Reply(8)
8793         pkt.ReqCondSizeConstant()
8794         pkt.CompletionCodes([0x0000, 0x0106, 0x8c00, 0xbf00])
8795         # 2222/1626, 22/38
8796         pkt = NCP(0x1626, "Scan File or Directory for Extended Trustees", 'file')
8797         pkt.Request((13,267), [
8798                 rec( 10, 1, DirHandle ),
8799                 rec( 11, 1, SequenceByte ),
8800                 rec( 12, (1, 255), Path ),
8801         ], info_str=(Path, "Scan for Extended Trustees: %s", ", %s"))
8802         pkt.Reply(91, [
8803                 rec( 8, 1, NumberOfEntries, var="x" ),
8804                 rec( 9, 4, ObjectID ),
8805                 rec( 13, 4, ObjectID ),
8806                 rec( 17, 4, ObjectID ),
8807                 rec( 21, 4, ObjectID ),
8808                 rec( 25, 4, ObjectID ),
8809                 rec( 29, 4, ObjectID ),
8810                 rec( 33, 4, ObjectID ),
8811                 rec( 37, 4, ObjectID ),
8812                 rec( 41, 4, ObjectID ),
8813                 rec( 45, 4, ObjectID ),
8814                 rec( 49, 4, ObjectID ),
8815                 rec( 53, 4, ObjectID ),
8816                 rec( 57, 4, ObjectID ),
8817                 rec( 61, 4, ObjectID ),
8818                 rec( 65, 4, ObjectID ),
8819                 rec( 69, 4, ObjectID ),
8820                 rec( 73, 4, ObjectID ),
8821                 rec( 77, 4, ObjectID ),
8822                 rec( 81, 4, ObjectID ),
8823                 rec( 85, 4, ObjectID ),
8824                 rec( 89, 2, AccessRightsMaskWord, repeat="x" ),
8825         ])
8826         pkt.CompletionCodes([0x0000, 0x9800, 0x9b00, 0x9c00])
8827         # 2222/1627, 22/39
8828         pkt = NCP(0x1627, "Add Extended Trustee to Directory or File", 'file')
8829         pkt.Request((18,272), [
8830                 rec( 10, 1, DirHandle ),
8831                 rec( 11, 4, ObjectID, BE ),
8832                 rec( 15, 2, TrusteeRights ),
8833                 rec( 17, (1, 255), Path ),
8834         ], info_str=(Path, "Add Extended Trustee: %s", ", %s"))
8835         pkt.Reply(8)
8836         pkt.CompletionCodes([0x0000, 0x9000])
8837         # 2222/1628, 22/40
8838         pkt = NCP(0x1628, "Scan Directory Disk Space", 'file')
8839         pkt.Request((17,271), [
8840                 rec( 10, 1, DirHandle ),
8841                 rec( 11, 1, SearchAttributes ),
8842                 rec( 12, 4, SequenceNumber ),
8843                 rec( 16, (1, 255), SearchPattern ),
8844         ], info_str=(SearchPattern, "Scan Directory Disk Space: %s", ", %s"))
8845         pkt.Reply((148), [
8846                 rec( 8, 4, SequenceNumber ),
8847                 rec( 12, 4, Subdirectory ),
8848                 rec( 16, 4, AttributesDef32 ),
8849                 rec( 20, 1, UniqueID ),
8850                 rec( 21, 1, PurgeFlags ),
8851                 rec( 22, 1, DestNameSpace ),
8852                 rec( 23, 1, NameLen ),
8853                 rec( 24, 12, Name12 ),
8854                 rec( 36, 2, CreationTime ),
8855                 rec( 38, 2, CreationDate ),
8856                 rec( 40, 4, CreatorID, BE ),
8857                 rec( 44, 2, ArchivedTime ),
8858                 rec( 46, 2, ArchivedDate ),
8859                 rec( 48, 4, ArchiverID, BE ),
8860                 rec( 52, 2, UpdateTime ),
8861                 rec( 54, 2, UpdateDate ),
8862                 rec( 56, 4, UpdateID, BE ),
8863                 rec( 60, 4, DataForkSize, BE ),
8864                 rec( 64, 4, DataForkFirstFAT, BE ),
8865                 rec( 68, 4, NextTrusteeEntry, BE ),
8866                 rec( 72, 36, Reserved36 ),
8867                 rec( 108, 2, InheritedRightsMask ),
8868                 rec( 110, 2, LastAccessedDate ),
8869                 rec( 112, 4, DeletedFileTime ),
8870                 rec( 116, 2, DeletedTime ),
8871                 rec( 118, 2, DeletedDate ),
8872                 rec( 120, 4, DeletedID, BE ),
8873                 rec( 124, 8, Undefined8 ),
8874                 rec( 132, 4, PrimaryEntry, LE ),
8875                 rec( 136, 4, NameList, LE ),
8876                 rec( 140, 4, OtherFileForkSize, BE ),
8877                 rec( 144, 4, OtherFileForkFAT, BE ),
8878         ])
8879         pkt.CompletionCodes([0x0000, 0x8900, 0x9c03, 0xfb01, 0xff00])
8880         # 2222/1629, 22/41
8881         pkt = NCP(0x1629, "Get Object Disk Usage and Restrictions", 'file')
8882         pkt.Request(15, [
8883                 rec( 10, 1, VolumeNumber ),
8884                 rec( 11, 4, ObjectID, BE ),
8885         ])
8886         pkt.Reply(16, [
8887                 rec( 8, 4, Restriction ),
8888                 rec( 12, 4, InUse ),
8889         ])
8890         pkt.CompletionCodes([0x0000, 0x9802])
8891         # 2222/162A, 22/42
8892         pkt = NCP(0x162A, "Get Effective Rights for Directory Entry", 'file')
8893         pkt.Request((12,266), [
8894                 rec( 10, 1, DirHandle ),
8895                 rec( 11, (1, 255), Path ),
8896         ], info_str=(Path, "Get Effective Rights: %s", ", %s"))
8897         pkt.Reply(10, [
8898                 rec( 8, 2, AccessRightsMaskWord ),
8899         ])
8900         pkt.CompletionCodes([0x0000, 0x9804, 0x9c03])
8901         # 2222/162B, 22/43
8902         pkt = NCP(0x162B, "Remove Extended Trustee from Dir or File", 'file')
8903         pkt.Request((17,271), [
8904                 rec( 10, 1, DirHandle ),
8905                 rec( 11, 4, ObjectID, BE ),
8906                 rec( 15, 1, Unused ),
8907                 rec( 16, (1, 255), Path ),
8908         ], info_str=(Path, "Remove Extended Trustee from %s", ", %s"))
8909         pkt.Reply(8)
8910         pkt.CompletionCodes([0x0000, 0x9002, 0x9c03, 0xfe0f, 0xff09])
8911         # 2222/162C, 22/44
8912         pkt = NCP(0x162C, "Get Volume and Purge Information", 'file')
8913         pkt.Request( 11, [
8914                 rec( 10, 1, VolumeNumber )
8915         ],info_str=(VolumeNumber, "Get Volume and Purge Information for Volume %d", ", %d"))
8916         pkt.Reply( (38,53), [
8917                 rec( 8, 4, TotalBlocks ),
8918                 rec( 12, 4, FreeBlocks ),
8919                 rec( 16, 4, PurgeableBlocks ),
8920                 rec( 20, 4, NotYetPurgeableBlocks ),
8921                 rec( 24, 4, TotalDirectoryEntries ),
8922                 rec( 28, 4, AvailableDirEntries ),
8923                 rec( 32, 4, Reserved4 ),
8924                 rec( 36, 1, SectorsPerBlock ),
8925                 rec( 37, (1,16), VolumeNameLen ),
8926         ])
8927         pkt.CompletionCodes([0x0000])
8928         # 2222/162D, 22/45
8929         pkt = NCP(0x162D, "Get Directory Information", 'file')
8930         pkt.Request( 11, [
8931                 rec( 10, 1, DirHandle )
8932         ])
8933         pkt.Reply( (30, 45), [
8934                 rec( 8, 4, TotalBlocks ),
8935                 rec( 12, 4, AvailableBlocks ),
8936                 rec( 16, 4, TotalDirectoryEntries ),
8937                 rec( 20, 4, AvailableDirEntries ),
8938                 rec( 24, 4, Reserved4 ),
8939                 rec( 28, 1, SectorsPerBlock ),
8940                 rec( 29, (1,16), VolumeNameLen ),
8941         ])
8942         pkt.CompletionCodes([0x0000, 0x9b03])
8943         # 2222/162E, 22/46
8944         pkt = NCP(0x162E, "Rename Or Move", 'file')
8945         pkt.Request( (17,525), [
8946                 rec( 10, 1, SourceDirHandle ),
8947                 rec( 11, 1, SearchAttributes ),
8948                 rec( 12, 1, SourcePathComponentCount ),
8949                 rec( 13, (1,255), SourcePath ),
8950                 rec( -1, 1, DestDirHandle ),
8951                 rec( -1, 1, DestPathComponentCount ),
8952                 rec( -1, (1,255), DestPath ),
8953         ], info_str=(SourcePath, "Rename or Move: %s", ", %s"))
8954         pkt.Reply(8)
8955         pkt.CompletionCodes([0x0000, 0x0102, 0x8701, 0x8b00, 0x8d00, 0x8e00,
8956                              0x8f00, 0x9001, 0x9101, 0x9201, 0x9a00, 0x9b03,
8957                              0x9c03, 0xa400, 0xff17])
8958         # 2222/162F, 22/47
8959         pkt = NCP(0x162F, "Get Name Space Information", 'file')
8960         pkt.Request( 11, [
8961                 rec( 10, 1, VolumeNumber )
8962         ],info_str=(VolumeNumber, "Get Name Space Information for Volume %d", ", %d"))
8963         pkt.Reply( (15,523), [
8964                 #
8965                 # XXX - why does this not display anything at all
8966                 # if the stuff after the first IndexNumber is
8967                 # un-commented?  That stuff really is there....
8968                 #
8969                 rec( 8, 1, DefinedNameSpaces, var="v" ),
8970                 rec( 9, (1,255), NameSpaceName, repeat="v" ),
8971                 rec( -1, 1, DefinedDataStreams, var="w" ),
8972                 rec( -1, (2,256), DataStreamInfo, repeat="w" ),
8973                 rec( -1, 1, LoadedNameSpaces, var="x" ),
8974                 rec( -1, 1, IndexNumber, repeat="x" ),
8975 #               rec( -1, 1, VolumeNameSpaces, var="y" ),
8976 #               rec( -1, 1, IndexNumber, repeat="y" ),
8977 #               rec( -1, 1, VolumeDataStreams, var="z" ),
8978 #               rec( -1, 1, IndexNumber, repeat="z" ),
8979         ])
8980         pkt.CompletionCodes([0x0000, 0x9802, 0xff00])
8981         # 2222/1630, 22/48
8982         pkt = NCP(0x1630, "Get Name Space Directory Entry", 'file')
8983         pkt.Request( 16, [
8984                 rec( 10, 1, VolumeNumber ),
8985                 rec( 11, 4, DOSSequence ),
8986                 rec( 15, 1, SrcNameSpace ),
8987         ])
8988         pkt.Reply( 112, [
8989                 rec( 8, 4, SequenceNumber ),
8990                 rec( 12, 4, Subdirectory ),
8991                 rec( 16, 4, AttributesDef32 ),
8992                 rec( 20, 1, UniqueID ),
8993                 rec( 21, 1, Flags ),
8994                 rec( 22, 1, SrcNameSpace ),
8995                 rec( 23, 1, NameLength ),
8996                 rec( 24, 12, Name12 ),
8997                 rec( 36, 2, CreationTime ),
8998                 rec( 38, 2, CreationDate ),
8999                 rec( 40, 4, CreatorID, BE ),
9000                 rec( 44, 2, ArchivedTime ),
9001                 rec( 46, 2, ArchivedDate ),
9002                 rec( 48, 4, ArchiverID ),
9003                 rec( 52, 2, UpdateTime ),
9004                 rec( 54, 2, UpdateDate ),
9005                 rec( 56, 4, UpdateID ),
9006                 rec( 60, 4, FileSize ),
9007                 rec( 64, 44, Reserved44 ),
9008                 rec( 108, 2, InheritedRightsMask ),
9009                 rec( 110, 2, LastAccessedDate ),
9010         ])
9011         pkt.CompletionCodes([0x0000, 0x8900, 0x9802, 0xbf00])
9012         # 2222/1631, 22/49
9013         pkt = NCP(0x1631, "Open Data Stream", 'file')
9014         pkt.Request( (15,269), [
9015                 rec( 10, 1, DataStream ),
9016                 rec( 11, 1, DirHandle ),
9017                 rec( 12, 1, AttributesDef ),
9018                 rec( 13, 1, OpenRights ),
9019                 rec( 14, (1, 255), FileName ),
9020         ], info_str=(FileName, "Open Data Stream: %s", ", %s"))
9021         pkt.Reply( 12, [
9022                 rec( 8, 4, CCFileHandle, BE ),
9023         ])
9024         pkt.CompletionCodes([0x0000, 0x8000, 0x8200, 0x9002, 0xbe00, 0xff00])
9025         # 2222/1632, 22/50
9026         pkt = NCP(0x1632, "Get Object Effective Rights for Directory Entry", 'file')
9027         pkt.Request( (16,270), [
9028                 rec( 10, 4, ObjectID, BE ),
9029                 rec( 14, 1, DirHandle ),
9030                 rec( 15, (1, 255), Path ),
9031         ], info_str=(Path, "Get Object Effective Rights: %s", ", %s"))
9032         pkt.Reply( 10, [
9033                 rec( 8, 2, TrusteeRights ),
9034         ])
9035         pkt.CompletionCodes([0x0000, 0x7e01, 0x9b00, 0x9c03])
9036         # 2222/1633, 22/51
9037         pkt = NCP(0x1633, "Get Extended Volume Information", 'file')
9038         pkt.Request( 11, [
9039                 rec( 10, 1, VolumeNumber ),
9040         ],info_str=(VolumeNumber, "Get Extended Volume Information for Volume %d", ", %d"))
9041         pkt.Reply( (139,266), [
9042                 rec( 8, 2, VolInfoReplyLen ),
9043                 rec( 10, 128, VolInfoStructure),
9044                 rec( 138, (1,128), VolumeNameLen ),
9045         ])
9046         pkt.CompletionCodes([0x0000, 0x7e01, 0x9804, 0xfb08, 0xff00])
9047         # 2222/1634, 22/52
9048         pkt = NCP(0x1634, "Get Mount Volume List", 'file')
9049         pkt.Request( 22, [
9050                 rec( 10, 4, StartVolumeNumber ),
9051                 rec( 14, 4, VolumeRequestFlags, LE ),
9052                 rec( 18, 4, SrcNameSpace ),
9053         ])
9054         pkt.Reply( 34, [
9055                 rec( 8, 4, ItemsInPacket, var="x" ),
9056                 rec( 12, 4, NextVolumeNumber ),
9057                 rec( 16, 18, VolumeStruct, repeat="x"),
9058         ])
9059         pkt.CompletionCodes([0x0000])
9060     # 2222/1635, 22/53
9061         pkt = NCP(0x1635, "Get Volume Capabilities", 'file')
9062         pkt.Request( 18, [
9063                 rec( 10, 4, VolumeNumberLong ),
9064                 rec( 14, 4, VersionNumberLong ),
9065         ])
9066         pkt.Reply( 744, [
9067                 rec( 8, 4, VolumeCapabilities ),
9068                 rec( 12, 28, Reserved28 ),
9069         rec( 40, 64, VolumeNameStringz ),
9070         rec( 104, 128, VolumeGUID ),
9071                 rec( 232, 256, PoolName ),
9072         rec( 488, 256, VolumeMountPoint ),
9073         ])
9074         pkt.CompletionCodes([0x0000])
9075         # 2222/1700, 23/00
9076         pkt = NCP(0x1700, "Login User", 'connection')
9077         pkt.Request( (12, 58), [
9078                 rec( 10, (1,16), UserName ),
9079                 rec( -1, (1,32), Password ),
9080         ], info_str=(UserName, "Login User: %s", ", %s"))
9081         pkt.Reply(8)
9082         pkt.CompletionCodes([0x0000, 0x9602, 0xc101, 0xc200, 0xc501, 0xd700,
9083                              0xd900, 0xda00, 0xdb00, 0xde00, 0xdf00, 0xe800,
9084                              0xec00, 0xed00, 0xef00, 0xf001, 0xf100, 0xf200,
9085                              0xf600, 0xfb00, 0xfc06, 0xfe07, 0xff00])
9086         # 2222/1701, 23/01
9087         pkt = NCP(0x1701, "Change User Password", 'bindery')
9088         pkt.Request( (13, 90), [
9089                 rec( 10, (1,16), UserName ),
9090                 rec( -1, (1,32), Password ),
9091                 rec( -1, (1,32), NewPassword ),
9092         ], info_str=(UserName, "Change Password for User: %s", ", %s"))
9093         pkt.Reply(8)
9094         pkt.CompletionCodes([0x0000, 0x9600, 0xd600, 0xf001, 0xf101, 0xf501,
9095                              0xfc06, 0xfe07, 0xff00])
9096         # 2222/1702, 23/02
9097         pkt = NCP(0x1702, "Get User Connection List", 'connection')
9098         pkt.Request( (11, 26), [
9099                 rec( 10, (1,16), UserName ),
9100         ], info_str=(UserName, "Get User Connection: %s", ", %s"))
9101         pkt.Reply( (9, 136), [
9102                 rec( 8, (1, 128), ConnectionNumberList ),
9103         ])
9104         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
9105         # 2222/1703, 23/03
9106         pkt = NCP(0x1703, "Get User Number", 'bindery')
9107         pkt.Request( (11, 26), [
9108                 rec( 10, (1,16), UserName ),
9109         ], info_str=(UserName, "Get User Number: %s", ", %s"))
9110         pkt.Reply( 12, [
9111                 rec( 8, 4, ObjectID, BE ),
9112         ])
9113         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
9114         # 2222/1705, 23/05
9115         pkt = NCP(0x1705, "Get Station's Logged Info", 'connection')
9116         pkt.Request( 11, [
9117                 rec( 10, 1, TargetConnectionNumber ),
9118         ],info_str=(TargetConnectionNumber, "Get Station's Logged Information on Connection %d", ", %d"))
9119         pkt.Reply( 266, [
9120                 rec( 8, 16, UserName16 ),
9121                 rec( 24, 7, LoginTime ),
9122                 rec( 31, 39, FullName ),
9123                 rec( 70, 4, UserID, BE ),
9124                 rec( 74, 128, SecurityEquivalentList ),
9125                 rec( 202, 64, Reserved64 ),
9126         ])
9127         pkt.CompletionCodes([0x0000, 0x9602, 0xfc06, 0xfd00, 0xfe07, 0xff00])
9128         # 2222/1707, 23/07
9129         pkt = NCP(0x1707, "Get Group Number", 'bindery')
9130         pkt.Request( 14, [
9131                 rec( 10, 4, ObjectID, BE ),
9132         ])
9133         pkt.Reply( 62, [
9134                 rec( 8, 4, ObjectID, BE ),
9135                 rec( 12, 2, ObjectType, BE ),
9136                 rec( 14, 48, ObjectNameLen ),
9137         ])
9138         pkt.CompletionCodes([0x0000, 0x9602, 0xf101, 0xfc06, 0xfe07, 0xff00])
9139         # 2222/170C, 23/12
9140         pkt = NCP(0x170C, "Verify Serialization", 'fileserver')
9141         pkt.Request( 14, [
9142                 rec( 10, 4, ServerSerialNumber ),
9143         ])
9144         pkt.Reply(8)
9145         pkt.CompletionCodes([0x0000, 0xff00])
9146         # 2222/170D, 23/13
9147         pkt = NCP(0x170D, "Log Network Message", 'file')
9148         pkt.Request( (11, 68), [
9149                 rec( 10, (1, 58), TargetMessage ),
9150         ], info_str=(TargetMessage, "Log Network Message: %s", ", %s"))
9151         pkt.Reply(8)
9152         pkt.CompletionCodes([0x0000, 0x8000, 0x8100, 0x8800, 0x8d00, 0x8e00, 0x8f00,
9153                              0x9001, 0x9400, 0x9600, 0x9804, 0x9900, 0x9b00, 0xa100,
9154                              0xa201, 0xff00])
9155         # 2222/170E, 23/14
9156         pkt = NCP(0x170E, "Get Disk Utilization", 'fileserver')
9157         pkt.Request( 15, [
9158                 rec( 10, 1, VolumeNumber ),
9159                 rec( 11, 4, TrusteeID, BE ),
9160         ])
9161         pkt.Reply( 19, [
9162                 rec( 8, 1, VolumeNumber ),
9163                 rec( 9, 4, TrusteeID, BE ),
9164                 rec( 13, 2, DirectoryCount, BE ),
9165                 rec( 15, 2, FileCount, BE ),
9166                 rec( 17, 2, ClusterCount, BE ),
9167         ])
9168         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0xa100, 0xf200])
9169         # 2222/170F, 23/15
9170         pkt = NCP(0x170F, "Scan File Information", 'file')
9171         pkt.Request((15,269), [
9172                 rec( 10, 2, LastSearchIndex ),
9173                 rec( 12, 1, DirHandle ),
9174                 rec( 13, 1, SearchAttributes ),
9175                 rec( 14, (1, 255), FileName ),
9176         ], info_str=(FileName, "Scan File Information: %s", ", %s"))
9177         pkt.Reply( 102, [
9178                 rec( 8, 2, NextSearchIndex ),
9179                 rec( 10, 14, FileName14 ),
9180                 rec( 24, 2, AttributesDef16 ),
9181                 rec( 26, 4, FileSize, BE ),
9182                 rec( 30, 2, CreationDate, BE ),
9183                 rec( 32, 2, LastAccessedDate, BE ),
9184                 rec( 34, 2, ModifiedDate, BE ),
9185                 rec( 36, 2, ModifiedTime, BE ),
9186                 rec( 38, 4, CreatorID, BE ),
9187                 rec( 42, 2, ArchivedDate, BE ),
9188                 rec( 44, 2, ArchivedTime, BE ),
9189                 rec( 46, 56, Reserved56 ),
9190         ])
9191         pkt.CompletionCodes([0x0000, 0x8800, 0x8900, 0x9300, 0x9400, 0x9804, 0x9b00, 0x9c00,
9192                              0xa100, 0xfd00, 0xff17])
9193         # 2222/1710, 23/16
9194         pkt = NCP(0x1710, "Set File Information", 'file')
9195         pkt.Request((91,345), [
9196                 rec( 10, 2, AttributesDef16 ),
9197                 rec( 12, 4, FileSize, BE ),
9198                 rec( 16, 2, CreationDate, BE ),
9199                 rec( 18, 2, LastAccessedDate, BE ),
9200                 rec( 20, 2, ModifiedDate, BE ),
9201                 rec( 22, 2, ModifiedTime, BE ),
9202                 rec( 24, 4, CreatorID, BE ),
9203                 rec( 28, 2, ArchivedDate, BE ),
9204                 rec( 30, 2, ArchivedTime, BE ),
9205                 rec( 32, 56, Reserved56 ),
9206                 rec( 88, 1, DirHandle ),
9207                 rec( 89, 1, SearchAttributes ),
9208                 rec( 90, (1, 255), FileName ),
9209         ], info_str=(FileName, "Set Information for File: %s", ", %s"))
9210         pkt.Reply(8)
9211         pkt.CompletionCodes([0x0000, 0x8800, 0x8c00, 0x8e00, 0x9400, 0x9600, 0x9804,
9212                              0x9b03, 0x9c00, 0xa100, 0xa201, 0xfc06, 0xfd00, 0xfe07,
9213                              0xff17])
9214         # 2222/1711, 23/17
9215         pkt = NCP(0x1711, "Get File Server Information", 'fileserver')
9216         pkt.Request(10)
9217         pkt.Reply(136, [
9218                 rec( 8, 48, ServerName ),
9219                 rec( 56, 1, OSMajorVersion ),
9220                 rec( 57, 1, OSMinorVersion ),
9221                 rec( 58, 2, ConnectionsSupportedMax, BE ),
9222                 rec( 60, 2, ConnectionsInUse, BE ),
9223                 rec( 62, 2, VolumesSupportedMax, BE ),
9224                 rec( 64, 1, OSRevision ),
9225                 rec( 65, 1, SFTSupportLevel ),
9226                 rec( 66, 1, TTSLevel ),
9227                 rec( 67, 2, ConnectionsMaxUsed, BE ),
9228                 rec( 69, 1, AccountVersion ),
9229                 rec( 70, 1, VAPVersion ),
9230                 rec( 71, 1, QueueingVersion ),
9231                 rec( 72, 1, PrintServerVersion ),
9232                 rec( 73, 1, VirtualConsoleVersion ),
9233                 rec( 74, 1, SecurityRestrictionVersion ),
9234                 rec( 75, 1, InternetBridgeVersion ),
9235                 rec( 76, 1, MixedModePathFlag ), 
9236                 rec( 77, 1, LocalLoginInfoCcode ),   
9237                 rec( 78, 2, ProductMajorVersion, BE ),
9238                 rec( 80, 2, ProductMinorVersion, BE ),
9239                 rec( 82, 2, ProductRevisionVersion, BE ),
9240                 rec( 84, 1, OSLanguageID, LE ),
9241                 rec( 85, 1, SixtyFourBitOffsetsSupportedFlag ),
9242                 rec( 86, 50, Reserved50 ),
9243         ])
9244         pkt.CompletionCodes([0x0000, 0x9600])
9245         # 2222/1712, 23/18
9246         pkt = NCP(0x1712, "Get Network Serial Number", 'fileserver')
9247         pkt.Request(10)
9248         pkt.Reply(14, [
9249                 rec( 8, 4, ServerSerialNumber ),
9250                 rec( 12, 2, ApplicationNumber ),
9251         ])
9252         pkt.CompletionCodes([0x0000, 0x9600])
9253         # 2222/1713, 23/19
9254         pkt = NCP(0x1713, "Get Internet Address", 'connection')
9255         pkt.Request(11, [
9256                 rec( 10, 1, TargetConnectionNumber ),
9257         ],info_str=(TargetConnectionNumber, "Get Internet Address for Connection %d", ", %d"))
9258         pkt.Reply(20, [
9259                 rec( 8, 4, NetworkAddress, BE ),
9260                 rec( 12, 6, NetworkNodeAddress ),
9261                 rec( 18, 2, NetworkSocket, BE ),
9262         ])
9263         pkt.CompletionCodes([0x0000, 0xff00])
9264         # 2222/1714, 23/20
9265         pkt = NCP(0x1714, "Login Object", 'connection')
9266         pkt.Request( (14, 60), [
9267                 rec( 10, 2, ObjectType, BE ),
9268                 rec( 12, (1,16), ClientName ),
9269                 rec( -1, (1,32), Password ),
9270         ], info_str=(UserName, "Login Object: %s", ", %s"))
9271         pkt.Reply(8)
9272         pkt.CompletionCodes([0x0000, 0x9602, 0xc101, 0xc200, 0xc501, 0xd600, 0xd700,
9273                              0xd900, 0xda00, 0xdb00, 0xde00, 0xdf00, 0xe800, 0xec00,
9274                              0xed00, 0xef00, 0xf001, 0xf100, 0xf200, 0xf600, 0xfb00,
9275                              0xfc06, 0xfe07, 0xff00])
9276         # 2222/1715, 23/21
9277         pkt = NCP(0x1715, "Get Object Connection List", 'connection')
9278         pkt.Request( (13, 28), [
9279                 rec( 10, 2, ObjectType, BE ),
9280                 rec( 12, (1,16), ObjectName ),
9281         ], info_str=(UserName, "Get Object Connection List: %s", ", %s"))
9282         pkt.Reply( (9, 136), [
9283                 rec( 8, (1, 128), ConnectionNumberList ),
9284         ])
9285         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
9286         # 2222/1716, 23/22
9287         pkt = NCP(0x1716, "Get Station's Logged Info", 'connection')
9288         pkt.Request( 11, [
9289                 rec( 10, 1, TargetConnectionNumber ),
9290         ])
9291         pkt.Reply( 70, [
9292                 rec( 8, 4, UserID, BE ),
9293                 rec( 12, 2, ObjectType, BE ),
9294                 rec( 14, 48, ObjectNameLen ),
9295                 rec( 62, 7, LoginTime ),
9296                 rec( 69, 1, Reserved ),
9297         ])
9298         pkt.CompletionCodes([0x0000, 0x9602, 0xfb0a, 0xfc06, 0xfd00, 0xfe07, 0xff00])
9299         # 2222/1717, 23/23
9300         pkt = NCP(0x1717, "Get Login Key", 'connection')
9301         pkt.Request(10)
9302         pkt.Reply( 16, [
9303                 rec( 8, 8, LoginKey ),
9304         ])
9305         pkt.CompletionCodes([0x0000, 0x9602])
9306         # 2222/1718, 23/24
9307         pkt = NCP(0x1718, "Keyed Object Login", 'connection')
9308         pkt.Request( (21, 68), [
9309                 rec( 10, 8, LoginKey ),
9310                 rec( 18, 2, ObjectType, BE ),
9311                 rec( 20, (1,48), ObjectName ),
9312         ], info_str=(ObjectName, "Keyed Object Login: %s", ", %s"))
9313         pkt.Reply(8)
9314         pkt.CompletionCodes([0x0000, 0x9602, 0xc101, 0xc200, 0xc500, 0xd904, 0xda00,
9315                              0xdb00, 0xdc00, 0xde00, 0xff00])
9316         # 2222/171A, 23/26
9317         #
9318         # XXX - for NCP-over-IP, the NetworkAddress field appears to be
9319         # an IP address, rather than an IPX network address, and should
9320         # be dissected as an FT_IPv4 value; the NetworkNodeAddress and
9321         # NetworkSocket are 0.
9322         #
9323         # For NCP-over-IPX, it should probably be dissected as an
9324         # FT_IPXNET value.
9325         #
9326         pkt = NCP(0x171A, "Get Internet Address", 'connection')
9327         pkt.Request(12, [
9328                 rec( 10, 2, TargetConnectionNumber ),
9329         ])
9330         pkt.Reply(21, [
9331                 rec( 8, 4, NetworkAddress, BE ),
9332                 rec( 12, 6, NetworkNodeAddress ),
9333                 rec( 18, 2, NetworkSocket, BE ),
9334                 rec( 20, 1, ConnectionType ),
9335         ])
9336         pkt.CompletionCodes([0x0000])
9337         # 2222/171B, 23/27
9338         pkt = NCP(0x171B, "Get Object Connection List", 'connection')
9339         pkt.Request( (17,64), [
9340                 rec( 10, 4, SearchConnNumber ),
9341                 rec( 14, 2, ObjectType, BE ),
9342                 rec( 16, (1,48), ObjectName ),
9343         ], info_str=(ObjectName, "Get Object Connection List: %s", ", %s"))
9344         pkt.Reply( (10,137), [
9345                 rec( 8, 1, ConnListLen, var="x" ),
9346                 rec( 9, (1,128), ConnectionNumberList, repeat="x" ),
9347         ])
9348         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
9349         # 2222/171C, 23/28
9350         pkt = NCP(0x171C, "Get Station's Logged Info", 'connection')
9351         pkt.Request( 14, [
9352                 rec( 10, 4, TargetConnectionNumber ),
9353         ])
9354         pkt.Reply( 70, [
9355                 rec( 8, 4, UserID, BE ),
9356                 rec( 12, 2, ObjectType, BE ),
9357                 rec( 14, 48, ObjectNameLen ),
9358                 rec( 62, 7, LoginTime ),
9359                 rec( 69, 1, Reserved ),
9360         ])
9361         pkt.CompletionCodes([0x0000, 0x9602, 0xfb02, 0xfc06, 0xfd00, 0xfe07, 0xff00])
9362         # 2222/171D, 23/29
9363         pkt = NCP(0x171D, "Change Connection State", 'connection')
9364         pkt.Request( 11, [
9365                 rec( 10, 1, RequestCode ),
9366         ])
9367         pkt.Reply(8)
9368         pkt.CompletionCodes([0x0000, 0x0109, 0x7a00, 0x7b00, 0x7c00, 0xe000, 0xfb06, 0xfd00])
9369         # 2222/171E, 23/30
9370         pkt = NCP(0x171E, "Set Watchdog Delay Interval", 'connection')
9371         pkt.Request( 14, [
9372                 rec( 10, 4, NumberOfMinutesToDelay ),
9373         ])
9374         pkt.Reply(8)
9375         pkt.CompletionCodes([0x0000, 0x0107])
9376         # 2222/171F, 23/31
9377         pkt = NCP(0x171F, "Get Connection List From Object", 'connection')
9378         pkt.Request( 18, [
9379                 rec( 10, 4, ObjectID, BE ),
9380                 rec( 14, 4, ConnectionNumber ),
9381         ])
9382         pkt.Reply( (9, 136), [
9383                 rec( 8, (1, 128), ConnectionNumberList ),
9384         ])
9385         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
9386         # 2222/1720, 23/32
9387         pkt = NCP(0x1720, "Scan Bindery Object (List)", 'bindery')
9388         pkt.Request((23,70), [
9389                 rec( 10, 4, NextObjectID, BE ),
9390                 rec( 14, 4, ObjectType, BE ),
9391                 rec( 18, 4, InfoFlags ),
9392                 rec( 22, (1,48), ObjectName ),
9393         ], info_str=(ObjectName, "Scan Bindery Object: %s", ", %s"))
9394         pkt.Reply(NO_LENGTH_CHECK, [
9395                 rec( 8, 4, ObjectInfoReturnCount ),
9396                 rec( 12, 4, NextObjectID, BE ),
9397                 rec( 16, 4, ObjectIDInfo ),
9398                 srec(ObjectTypeStruct, req_cond="ncp.info_flags_type == TRUE"),
9399                 srec(ObjectSecurityStruct, req_cond="ncp.info_flags_security == TRUE"),
9400                 srec(ObjectFlagsStruct, req_cond="ncp.info_flags_flags == TRUE"),
9401                 srec(ObjectNameStruct, req_cond="ncp.info_flags_name == TRUE"),
9402         ])
9403         pkt.ReqCondSizeVariable()
9404         pkt.CompletionCodes([0x0000, 0x9600, 0xef01, 0xfc02, 0xfe01, 0xff00])
9405         # 2222/1721, 23/33
9406         pkt = NCP(0x1721, "Generate GUIDs", 'connection')
9407         pkt.Request( 14, [
9408                 rec( 10, 4, ReturnInfoCount ),
9409         ])
9410         pkt.Reply(28, [
9411                 rec( 8, 4, ReturnInfoCount, var="x" ),
9412                 rec( 12, 16, GUID, repeat="x" ),
9413         ])
9414         pkt.CompletionCodes([0x0000])
9415     # 2222/1722, 23/34
9416         pkt = NCP(0x1722, "Set Connection Language Encoding", 'connection')
9417         pkt.Request( 22, [
9418                 rec( 10, 4, SetMask ),
9419         rec( 14, 4, NCPEncodedStringsBits ),
9420         rec( 18, 4, CodePage ),
9421         ])
9422         pkt.Reply(8)
9423         pkt.CompletionCodes([0x0000])
9424         # 2222/1732, 23/50
9425         pkt = NCP(0x1732, "Create Bindery Object", 'bindery')
9426         pkt.Request( (15,62), [
9427                 rec( 10, 1, ObjectFlags ),
9428                 rec( 11, 1, ObjectSecurity ),
9429                 rec( 12, 2, ObjectType, BE ),
9430                 rec( 14, (1,48), ObjectName ),
9431         ], info_str=(ObjectName, "Create Bindery Object: %s", ", %s"))
9432         pkt.Reply(8)
9433         pkt.CompletionCodes([0x0000, 0x9600, 0xe700, 0xee00, 0xef00, 0xf101, 0xf501,
9434                              0xfc06, 0xfe07, 0xff00])
9435         # 2222/1733, 23/51
9436         pkt = NCP(0x1733, "Delete Bindery Object", 'bindery')
9437         pkt.Request( (13,60), [
9438                 rec( 10, 2, ObjectType, BE ),
9439                 rec( 12, (1,48), ObjectName ),
9440         ], info_str=(ObjectName, "Delete Bindery Object: %s", ", %s"))
9441         pkt.Reply(8)
9442         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf200, 0xf400, 0xf600, 0xfb00,
9443                              0xfc06, 0xfe07, 0xff00])
9444         # 2222/1734, 23/52
9445         pkt = NCP(0x1734, "Rename Bindery Object", 'bindery')
9446         pkt.Request( (14,108), [
9447                 rec( 10, 2, ObjectType, BE ),
9448                 rec( 12, (1,48), ObjectName ),
9449                 rec( -1, (1,48), NewObjectName ),
9450         ], info_str=(ObjectName, "Rename Bindery Object: %s", ", %s"))
9451         pkt.Reply(8)
9452         pkt.CompletionCodes([0x0000, 0x9600, 0xee00, 0xf000, 0xf300, 0xfc06, 0xfe07, 0xff00])
9453         # 2222/1735, 23/53
9454         pkt = NCP(0x1735, "Get Bindery Object ID", 'bindery')
9455         pkt.Request((13,60), [
9456                 rec( 10, 2, ObjectType, BE ),
9457                 rec( 12, (1,48), ObjectName ),
9458         ], info_str=(ObjectName, "Get Bindery Object: %s", ", %s"))
9459         pkt.Reply(62, [
9460                 rec( 8, 4, ObjectID, BE ),
9461                 rec( 12, 2, ObjectType, BE ),
9462                 rec( 14, 48, ObjectNameLen ),
9463         ])
9464         pkt.CompletionCodes([0x0000, 0x9600, 0xef01, 0xf000, 0xfc02, 0xfe01, 0xff00])
9465         # 2222/1736, 23/54
9466         pkt = NCP(0x1736, "Get Bindery Object Name", 'bindery')
9467         pkt.Request( 14, [
9468                 rec( 10, 4, ObjectID, BE ),
9469         ])
9470         pkt.Reply( 62, [
9471                 rec( 8, 4, ObjectID, BE ),
9472                 rec( 12, 2, ObjectType, BE ),
9473                 rec( 14, 48, ObjectNameLen ),
9474         ])
9475         pkt.CompletionCodes([0x0000, 0x9600, 0xf101, 0xfc02, 0xfe01, 0xff00])
9476         # 2222/1737, 23/55
9477         pkt = NCP(0x1737, "Scan Bindery Object", 'bindery')
9478         pkt.Request((17,64), [
9479                 rec( 10, 4, ObjectID, BE ),
9480                 rec( 14, 2, ObjectType, BE ),
9481                 rec( 16, (1,48), ObjectName ),
9482         ], info_str=(ObjectName, "Scan Bindery Object: %s", ", %s"))
9483         pkt.Reply(65, [
9484                 rec( 8, 4, ObjectID, BE ),
9485                 rec( 12, 2, ObjectType, BE ),
9486                 rec( 14, 48, ObjectNameLen ),
9487                 rec( 62, 1, ObjectFlags ),
9488                 rec( 63, 1, ObjectSecurity ),
9489                 rec( 64, 1, ObjectHasProperties ),
9490         ])
9491         pkt.CompletionCodes([0x0000, 0x9600, 0xef01, 0xfc02,
9492                              0xfe01, 0xff00])
9493         # 2222/1738, 23/56
9494         pkt = NCP(0x1738, "Change Bindery Object Security", 'bindery')
9495         pkt.Request((14,61), [
9496                 rec( 10, 1, ObjectSecurity ),
9497                 rec( 11, 2, ObjectType, BE ),
9498                 rec( 13, (1,48), ObjectName ),
9499         ], info_str=(ObjectName, "Change Bindery Object Security: %s", ", %s"))
9500         pkt.Reply(8)
9501         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf501, 0xfc02, 0xfe01, 0xff00])
9502         # 2222/1739, 23/57
9503         pkt = NCP(0x1739, "Create Property", 'bindery')
9504         pkt.Request((16,78), [
9505                 rec( 10, 2, ObjectType, BE ),
9506                 rec( 12, (1,48), ObjectName ),
9507                 rec( -1, 1, PropertyType ),
9508                 rec( -1, 1, ObjectSecurity ),
9509                 rec( -1, (1,16), PropertyName ),
9510         ], info_str=(PropertyName, "Create Property: %s", ", %s"))
9511         pkt.Reply(8)
9512         pkt.CompletionCodes([0x0000, 0x9600, 0xed00, 0xef00, 0xf000, 0xf101,
9513                              0xf200, 0xf600, 0xf700, 0xfb00, 0xfc02, 0xfe01,
9514                              0xff00])
9515         # 2222/173A, 23/58
9516         pkt = NCP(0x173A, "Delete Property", 'bindery')
9517         pkt.Request((14,76), [
9518                 rec( 10, 2, ObjectType, BE ),
9519                 rec( 12, (1,48), ObjectName ),
9520                 rec( -1, (1,16), PropertyName ),
9521         ], info_str=(PropertyName, "Delete Property: %s", ", %s"))
9522         pkt.Reply(8)
9523         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf600, 0xfb00, 0xfc02,
9524                              0xfe01, 0xff00])
9525         # 2222/173B, 23/59
9526         pkt = NCP(0x173B, "Change Property Security", 'bindery')
9527         pkt.Request((15,77), [
9528                 rec( 10, 2, ObjectType, BE ),
9529                 rec( 12, (1,48), ObjectName ),
9530                 rec( -1, 1, ObjectSecurity ),
9531                 rec( -1, (1,16), PropertyName ),
9532         ], info_str=(PropertyName, "Change Property Security: %s", ", %s"))
9533         pkt.Reply(8)
9534         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf200, 0xf600, 0xfb00,
9535                              0xfc02, 0xfe01, 0xff00])
9536         # 2222/173C, 23/60
9537         pkt = NCP(0x173C, "Scan Property", 'bindery')
9538         pkt.Request((18,80), [
9539                 rec( 10, 2, ObjectType, BE ),
9540                 rec( 12, (1,48), ObjectName ),
9541                 rec( -1, 4, LastInstance, BE ),
9542                 rec( -1, (1,16), PropertyName ),
9543         ], info_str=(PropertyName, "Scan Property: %s", ", %s"))
9544         pkt.Reply( 32, [
9545                 rec( 8, 16, PropertyName16 ),
9546                 rec( 24, 1, ObjectFlags ),
9547                 rec( 25, 1, ObjectSecurity ),
9548                 rec( 26, 4, SearchInstance, BE ),
9549                 rec( 30, 1, ValueAvailable ),
9550                 rec( 31, 1, MoreProperties ),
9551         ])
9552         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf200, 0xf600, 0xfb00,
9553                              0xfc02, 0xfe01, 0xff00])
9554         # 2222/173D, 23/61
9555         pkt = NCP(0x173D, "Read Property Value", 'bindery')
9556         pkt.Request((15,77), [
9557                 rec( 10, 2, ObjectType, BE ),
9558                 rec( 12, (1,48), ObjectName ),
9559                 rec( -1, 1, PropertySegment ),
9560                 rec( -1, (1,16), PropertyName ),
9561         ], info_str=(PropertyName, "Read Property Value: %s", ", %s"))
9562         pkt.Reply(138, [
9563                 rec( 8, 128, PropertyData ),
9564                 rec( 136, 1, PropertyHasMoreSegments ),
9565                 rec( 137, 1, PropertyType ),
9566         ])
9567         pkt.CompletionCodes([0x0000, 0x8800, 0x9300, 0x9600, 0xec01,
9568                              0xf000, 0xf100, 0xf900, 0xfb02, 0xfc02,
9569                              0xfe01, 0xff00])
9570         # 2222/173E, 23/62
9571         pkt = NCP(0x173E, "Write Property Value", 'bindery')
9572         pkt.Request((144,206), [
9573                 rec( 10, 2, ObjectType, BE ),
9574                 rec( 12, (1,48), ObjectName ),
9575                 rec( -1, 1, PropertySegment ),
9576                 rec( -1, 1, MoreFlag ),
9577                 rec( -1, (1,16), PropertyName ),
9578                 #
9579                 # XXX - don't show this if MoreFlag isn't set?
9580                 # In at least some packages where it's not set,
9581                 # PropertyValue appears to be garbage.
9582                 #
9583                 rec( -1, 128, PropertyValue ),
9584         ], info_str=(PropertyName, "Write Property Value: %s", ", %s"))
9585         pkt.Reply(8)
9586         pkt.CompletionCodes([0x0000, 0x9600, 0xe800, 0xec01, 0xf000, 0xf800,
9587                              0xfb02, 0xfc03, 0xfe01, 0xff00 ])
9588         # 2222/173F, 23/63
9589         pkt = NCP(0x173F, "Verify Bindery Object Password", 'bindery')
9590         pkt.Request((14,92), [
9591                 rec( 10, 2, ObjectType, BE ),
9592                 rec( 12, (1,48), ObjectName ),
9593                 rec( -1, (1,32), Password ),
9594         ], info_str=(ObjectName, "Verify Bindery Object Password: %s", ", %s"))
9595         pkt.Reply(8)
9596         pkt.CompletionCodes([0x0000, 0x9600, 0xe800, 0xec01, 0xf000, 0xf101,
9597                              0xfb02, 0xfc03, 0xfe01, 0xff00 ])
9598         # 2222/1740, 23/64
9599         pkt = NCP(0x1740, "Change Bindery Object Password", 'bindery')
9600         pkt.Request((15,124), [
9601                 rec( 10, 2, ObjectType, BE ),
9602                 rec( 12, (1,48), ObjectName ),
9603                 rec( -1, (1,32), Password ),
9604                 rec( -1, (1,32), NewPassword ),
9605         ], info_str=(ObjectName, "Change Bindery Object Password: %s", ", %s"))
9606         pkt.Reply(8)
9607         pkt.CompletionCodes([0x0000, 0x9600, 0xc501, 0xd701, 0xe800, 0xec01, 0xf001,
9608                              0xf100, 0xf800, 0xfb02, 0xfc03, 0xfe01, 0xff00])
9609         # 2222/1741, 23/65
9610         pkt = NCP(0x1741, "Add Bindery Object To Set", 'bindery')
9611         pkt.Request((17,126), [
9612                 rec( 10, 2, ObjectType, BE ),
9613                 rec( 12, (1,48), ObjectName ),
9614                 rec( -1, (1,16), PropertyName ),
9615                 rec( -1, 2, MemberType, BE ),
9616                 rec( -1, (1,48), MemberName ),
9617         ], info_str=(MemberName, "Add Bindery Object to Set: %s", ", %s"))
9618         pkt.Reply(8)
9619         pkt.CompletionCodes([0x0000, 0x9600, 0xe800, 0xe900, 0xea00, 0xeb00,
9620                              0xec01, 0xf000, 0xf800, 0xfb02, 0xfc03, 0xfe01,
9621                              0xff00])
9622         # 2222/1742, 23/66
9623         pkt = NCP(0x1742, "Delete Bindery Object From Set", 'bindery')
9624         pkt.Request((17,126), [
9625                 rec( 10, 2, ObjectType, BE ),
9626                 rec( 12, (1,48), ObjectName ),
9627                 rec( -1, (1,16), PropertyName ),
9628                 rec( -1, 2, MemberType, BE ),
9629                 rec( -1, (1,48), MemberName ),
9630         ], info_str=(MemberName, "Delete Bindery Object from Set: %s", ", %s"))
9631         pkt.Reply(8)
9632         pkt.CompletionCodes([0x0000, 0x9600, 0xeb00, 0xf000, 0xf800, 0xfb02,
9633                              0xfc03, 0xfe01, 0xff00])
9634         # 2222/1743, 23/67
9635         pkt = NCP(0x1743, "Is Bindery Object In Set", 'bindery')
9636         pkt.Request((17,126), [
9637                 rec( 10, 2, ObjectType, BE ),
9638                 rec( 12, (1,48), ObjectName ),
9639                 rec( -1, (1,16), PropertyName ),
9640                 rec( -1, 2, MemberType, BE ),
9641                 rec( -1, (1,48), MemberName ),
9642         ], info_str=(MemberName, "Is Bindery Object in Set: %s", ", %s"))
9643         pkt.Reply(8)
9644         pkt.CompletionCodes([0x0000, 0x9600, 0xea00, 0xeb00, 0xec01, 0xf000,
9645                              0xfb02, 0xfc03, 0xfe01, 0xff00])
9646         # 2222/1744, 23/68
9647         pkt = NCP(0x1744, "Close Bindery", 'bindery')
9648         pkt.Request(10)
9649         pkt.Reply(8)
9650         pkt.CompletionCodes([0x0000, 0xff00])
9651         # 2222/1745, 23/69
9652         pkt = NCP(0x1745, "Open Bindery", 'bindery')
9653         pkt.Request(10)
9654         pkt.Reply(8)
9655         pkt.CompletionCodes([0x0000, 0xff00])
9656         # 2222/1746, 23/70
9657         pkt = NCP(0x1746, "Get Bindery Access Level", 'bindery')
9658         pkt.Request(10)
9659         pkt.Reply(13, [
9660                 rec( 8, 1, ObjectSecurity ),
9661                 rec( 9, 4, LoggedObjectID, BE ),
9662         ])
9663         pkt.CompletionCodes([0x0000, 0x9600])
9664         # 2222/1747, 23/71
9665         pkt = NCP(0x1747, "Scan Bindery Object Trustee Paths", 'bindery')
9666         pkt.Request(17, [
9667                 rec( 10, 1, VolumeNumber ),
9668                 rec( 11, 2, LastSequenceNumber, BE ),
9669                 rec( 13, 4, ObjectID, BE ),
9670         ])
9671         pkt.Reply((16,270), [
9672                 rec( 8, 2, LastSequenceNumber, BE),
9673                 rec( 10, 4, ObjectID, BE ),
9674                 rec( 14, 1, ObjectSecurity ),
9675                 rec( 15, (1,255), Path ),
9676         ])
9677         pkt.CompletionCodes([0x0000, 0x9300, 0x9600, 0xa100, 0xf000, 0xf100,
9678                              0xf200, 0xfc02, 0xfe01, 0xff00])
9679         # 2222/1748, 23/72
9680         pkt = NCP(0x1748, "Get Bindery Object Access Level", 'bindery')
9681         pkt.Request(14, [
9682                 rec( 10, 4, ObjectID, BE ),
9683         ])
9684         pkt.Reply(9, [
9685                 rec( 8, 1, ObjectSecurity ),
9686         ])
9687         pkt.CompletionCodes([0x0000, 0x9600])
9688         # 2222/1749, 23/73
9689         pkt = NCP(0x1749, "Is Calling Station a Manager", 'bindery')
9690         pkt.Request(10)
9691         pkt.Reply(8)
9692         pkt.CompletionCodes([0x0003, 0xff1e])
9693         # 2222/174A, 23/74
9694         pkt = NCP(0x174A, "Keyed Verify Password", 'bindery')
9695         pkt.Request((21,68), [
9696                 rec( 10, 8, LoginKey ),
9697                 rec( 18, 2, ObjectType, BE ),
9698                 rec( 20, (1,48), ObjectName ),
9699         ], info_str=(ObjectName, "Keyed Verify Password: %s", ", %s"))
9700         pkt.Reply(8)
9701         pkt.CompletionCodes([0x0000, 0xc500, 0xfe01, 0xff0c])
9702         # 2222/174B, 23/75
9703         pkt = NCP(0x174B, "Keyed Change Password", 'bindery')
9704         pkt.Request((22,100), [
9705                 rec( 10, 8, LoginKey ),
9706                 rec( 18, 2, ObjectType, BE ),
9707                 rec( 20, (1,48), ObjectName ),
9708                 rec( -1, (1,32), Password ),
9709         ], info_str=(ObjectName, "Keyed Change Password: %s", ", %s"))
9710         pkt.Reply(8)
9711         pkt.CompletionCodes([0x0000, 0xc500, 0xfe01, 0xff0c])
9712         # 2222/174C, 23/76
9713         pkt = NCP(0x174C, "List Relations Of an Object", 'bindery')
9714         pkt.Request((18,80), [
9715                 rec( 10, 4, LastSeen, BE ),
9716                 rec( 14, 2, ObjectType, BE ),
9717                 rec( 16, (1,48), ObjectName ),
9718                 rec( -1, (1,16), PropertyName ),
9719         ], info_str=(ObjectName, "List Relations of an Object: %s", ", %s"))
9720         pkt.Reply(14, [
9721                 rec( 8, 2, RelationsCount, BE, var="x" ),
9722                 rec( 10, 4, ObjectID, BE, repeat="x" ),
9723         ])
9724         pkt.CompletionCodes([0x0000, 0xf000, 0xf200, 0xfe01, 0xff00])
9725         # 2222/1764, 23/100
9726         pkt = NCP(0x1764, "Create Queue", 'qms')
9727         pkt.Request((15,316), [
9728                 rec( 10, 2, QueueType, BE ),
9729                 rec( 12, (1,48), QueueName ),
9730                 rec( -1, 1, PathBase ),
9731                 rec( -1, (1,255), Path ),
9732         ], info_str=(QueueName, "Create Queue: %s", ", %s"))
9733         pkt.Reply(12, [
9734                 rec( 8, 4, QueueID ),
9735         ])
9736         pkt.CompletionCodes([0x0000, 0x9600, 0x9900, 0xd000, 0xd100,
9737                              0xd200, 0xd300, 0xd400, 0xd500, 0xd601,
9738                              0xd703, 0xd800, 0xd902, 0xda01, 0xdb02,
9739                              0xee00, 0xff00])
9740         # 2222/1765, 23/101
9741         pkt = NCP(0x1765, "Destroy Queue", 'qms')
9742         pkt.Request(14, [
9743                 rec( 10, 4, QueueID ),
9744         ])
9745         pkt.Reply(8)
9746         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9747                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9748                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9749         # 2222/1766, 23/102
9750         pkt = NCP(0x1766, "Read Queue Current Status", 'qms')
9751         pkt.Request(14, [
9752                 rec( 10, 4, QueueID ),
9753         ])
9754         pkt.Reply(20, [
9755                 rec( 8, 4, QueueID ),
9756                 rec( 12, 1, QueueStatus ),
9757                 rec( 13, 1, CurrentEntries ),
9758                 rec( 14, 1, CurrentServers, var="x" ),
9759                 rec( 15, 4, ServerID, repeat="x" ),
9760                 rec( 19, 1, ServerStationList, repeat="x" ),
9761         ])
9762         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9763                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9764                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9765         # 2222/1767, 23/103
9766         pkt = NCP(0x1767, "Set Queue Current Status", 'qms')
9767         pkt.Request(15, [
9768                 rec( 10, 4, QueueID ),
9769                 rec( 14, 1, QueueStatus ),
9770         ])
9771         pkt.Reply(8)
9772         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9773                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9774                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07,
9775                              0xff00])
9776         # 2222/1768, 23/104
9777         pkt = NCP(0x1768, "Create Queue Job And File", 'qms')
9778         pkt.Request(264, [
9779                 rec( 10, 4, QueueID ),
9780                 rec( 14, 250, JobStruct ),
9781         ])
9782         pkt.Reply(62, [
9783                 rec( 8, 1, ClientStation ),
9784                 rec( 9, 1, ClientTaskNumber ),
9785                 rec( 10, 4, ClientIDNumber, BE ),
9786                 rec( 14, 4, TargetServerIDNumber, BE ),
9787                 rec( 18, 6, TargetExecutionTime ),
9788                 rec( 24, 6, JobEntryTime ),
9789                 rec( 30, 2, JobNumber, BE ),
9790                 rec( 32, 2, JobType, BE ),
9791                 rec( 34, 1, JobPosition ),
9792                 rec( 35, 1, JobControlFlags ),
9793                 rec( 36, 14, JobFileName ),
9794                 rec( 50, 6, JobFileHandle ),
9795                 rec( 56, 1, ServerStation ),
9796                 rec( 57, 1, ServerTaskNumber ),
9797                 rec( 58, 4, ServerID, BE ),
9798         ])
9799         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9800                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9801                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07,
9802                              0xff00])
9803         # 2222/1769, 23/105
9804         pkt = NCP(0x1769, "Close File And Start Queue Job", 'qms')
9805         pkt.Request(16, [
9806                 rec( 10, 4, QueueID ),
9807                 rec( 14, 2, JobNumber, BE ),
9808         ])
9809         pkt.Reply(8)
9810         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9811                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9812                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9813         # 2222/176A, 23/106
9814         pkt = NCP(0x176A, "Remove Job From Queue", 'qms')
9815         pkt.Request(16, [
9816                 rec( 10, 4, QueueID ),
9817                 rec( 14, 2, JobNumber, BE ),
9818         ])
9819         pkt.Reply(8)
9820         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9821                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9822                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9823         # 2222/176B, 23/107
9824         pkt = NCP(0x176B, "Get Queue Job List", 'qms')
9825         pkt.Request(14, [
9826                 rec( 10, 4, QueueID ),
9827         ])
9828         pkt.Reply(12, [
9829                 rec( 8, 2, JobCount, BE, var="x" ),
9830                 rec( 10, 2, JobNumber, BE, repeat="x" ),
9831         ])
9832         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9833                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9834                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9835         # 2222/176C, 23/108
9836         pkt = NCP(0x176C, "Read Queue Job Entry", 'qms')
9837         pkt.Request(16, [
9838                 rec( 10, 4, QueueID ),
9839                 rec( 14, 2, JobNumber, BE ),
9840         ])
9841         pkt.Reply(258, [
9842             rec( 8, 250, JobStruct ),
9843         ])
9844         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9845                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9846                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9847         # 2222/176D, 23/109
9848         pkt = NCP(0x176D, "Change Queue Job Entry", 'qms')
9849         pkt.Request(260, [
9850             rec( 14, 250, JobStruct ),
9851         ])
9852         pkt.Reply(8)
9853         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9854                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9855                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9856         # 2222/176E, 23/110
9857         pkt = NCP(0x176E, "Change Queue Job Position", 'qms')
9858         pkt.Request(17, [
9859                 rec( 10, 4, QueueID ),
9860                 rec( 14, 2, JobNumber, BE ),
9861                 rec( 16, 1, NewPosition ),
9862         ])
9863         pkt.Reply(8)
9864         pkt.CompletionCodes([0x0000, 0x9600, 0xd000, 0xd100, 0xd300, 0xd500,
9865                              0xd601, 0xfe07, 0xff1f])
9866         # 2222/176F, 23/111
9867         pkt = NCP(0x176F, "Attach Queue Server To Queue", 'qms')
9868         pkt.Request(14, [
9869                 rec( 10, 4, QueueID ),
9870         ])
9871         pkt.Reply(8)
9872         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9873                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9874                              0xd800, 0xd902, 0xda01, 0xdb02, 0xea00,
9875                              0xfc06, 0xff00])
9876         # 2222/1770, 23/112
9877         pkt = NCP(0x1770, "Detach Queue Server From Queue", 'qms')
9878         pkt.Request(14, [
9879                 rec( 10, 4, QueueID ),
9880         ])
9881         pkt.Reply(8)
9882         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9883                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9884                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9885         # 2222/1771, 23/113
9886         pkt = NCP(0x1771, "Service Queue Job", 'qms')
9887         pkt.Request(16, [
9888                 rec( 10, 4, QueueID ),
9889                 rec( 14, 2, ServiceType, BE ),
9890         ])
9891         pkt.Reply(62, [
9892                 rec( 8, 1, ClientStation ),
9893                 rec( 9, 1, ClientTaskNumber ),
9894                 rec( 10, 4, ClientIDNumber, BE ),
9895                 rec( 14, 4, TargetServerIDNumber, BE ),
9896                 rec( 18, 6, TargetExecutionTime ),
9897                 rec( 24, 6, JobEntryTime ),
9898                 rec( 30, 2, JobNumber, BE ),
9899                 rec( 32, 2, JobType, BE ),
9900                 rec( 34, 1, JobPosition ),
9901                 rec( 35, 1, JobControlFlags ),
9902                 rec( 36, 14, JobFileName ),
9903                 rec( 50, 6, JobFileHandle ),
9904                 rec( 56, 1, ServerStation ),
9905                 rec( 57, 1, ServerTaskNumber ),
9906                 rec( 58, 4, ServerID, BE ),
9907         ])
9908         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9909                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9910                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9911         # 2222/1772, 23/114
9912         pkt = NCP(0x1772, "Finish Servicing Queue Job", 'qms')
9913         pkt.Request(20, [
9914                 rec( 10, 4, QueueID ),
9915                 rec( 14, 2, JobNumber, BE ),
9916                 rec( 16, 4, ChargeInformation, BE ),
9917         ])
9918         pkt.Reply(8)
9919         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9920                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9921                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07, 0xff00])
9922         # 2222/1773, 23/115
9923         pkt = NCP(0x1773, "Abort Servicing Queue Job", 'qms')
9924         pkt.Request(16, [
9925                 rec( 10, 4, QueueID ),
9926                 rec( 14, 2, JobNumber, BE ),
9927         ])
9928         pkt.Reply(8)
9929         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9930                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9931                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07, 0xff18])
9932         # 2222/1774, 23/116
9933         pkt = NCP(0x1774, "Change To Client Rights", 'qms')
9934         pkt.Request(16, [
9935                 rec( 10, 4, QueueID ),
9936                 rec( 14, 2, JobNumber, BE ),
9937         ])
9938         pkt.Reply(8)
9939         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9940                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9941                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9942         # 2222/1775, 23/117
9943         pkt = NCP(0x1775, "Restore Queue Server Rights", 'qms')
9944         pkt.Request(10)
9945         pkt.Reply(8)
9946         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9947                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9948                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9949         # 2222/1776, 23/118
9950         pkt = NCP(0x1776, "Read Queue Server Current Status", 'qms')
9951         pkt.Request(19, [
9952                 rec( 10, 4, QueueID ),
9953                 rec( 14, 4, ServerID, BE ),
9954                 rec( 18, 1, ServerStation ),
9955         ])
9956         pkt.Reply(72, [
9957                 rec( 8, 64, ServerStatusRecord ),
9958         ])
9959         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9960                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9961                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9962         # 2222/1777, 23/119
9963         pkt = NCP(0x1777, "Set Queue Server Current Status", 'qms')
9964         pkt.Request(78, [
9965                 rec( 10, 4, QueueID ),
9966                 rec( 14, 64, ServerStatusRecord ),
9967         ])
9968         pkt.Reply(8)
9969         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9970                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9971                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9972         # 2222/1778, 23/120
9973         pkt = NCP(0x1778, "Get Queue Job File Size", 'qms')
9974         pkt.Request(16, [
9975                 rec( 10, 4, QueueID ),
9976                 rec( 14, 2, JobNumber, BE ),
9977         ])
9978         pkt.Reply(20, [
9979                 rec( 8, 4, QueueID ),
9980                 rec( 12, 4, JobNumberLong ),
9981                 rec( 16, 4, FileSize, BE ),
9982         ])
9983         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9984                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9985                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07, 0xff00])
9986         # 2222/1779, 23/121
9987         pkt = NCP(0x1779, "Create Queue Job And File", 'qms')
9988         pkt.Request(264, [
9989                 rec( 10, 4, QueueID ),
9990                 rec( 14, 250, JobStruct3x ),
9991         ])
9992         pkt.Reply(94, [
9993                 rec( 8, 86, JobStructNew ),
9994         ])
9995         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9996                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9997                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07, 0xff00])
9998         # 2222/177A, 23/122
9999         pkt = NCP(0x177A, "Read Queue Job Entry", 'qms')
10000         pkt.Request(18, [
10001                 rec( 10, 4, QueueID ),
10002                 rec( 14, 4, JobNumberLong ),
10003         ])
10004         pkt.Reply(258, [
10005             rec( 8, 250, JobStruct3x ),
10006         ])
10007         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10008                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10009                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10010         # 2222/177B, 23/123
10011         pkt = NCP(0x177B, "Change Queue Job Entry", 'qms')
10012         pkt.Request(264, [
10013                 rec( 10, 4, QueueID ),
10014                 rec( 14, 250, JobStruct ),
10015         ])
10016         pkt.Reply(8)
10017         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10018                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10019                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07, 0xff00])
10020         # 2222/177C, 23/124
10021         pkt = NCP(0x177C, "Service Queue Job", 'qms')
10022         pkt.Request(16, [
10023                 rec( 10, 4, QueueID ),
10024                 rec( 14, 2, ServiceType ),
10025         ])
10026         pkt.Reply(94, [
10027             rec( 8, 86, JobStructNew ),
10028         ])
10029         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10030                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10031                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10032         # 2222/177D, 23/125
10033         pkt = NCP(0x177D, "Read Queue Current Status", 'qms')
10034         pkt.Request(14, [
10035                 rec( 10, 4, QueueID ),
10036         ])
10037         pkt.Reply(32, [
10038                 rec( 8, 4, QueueID ),
10039                 rec( 12, 1, QueueStatus ),
10040                 rec( 13, 3, Reserved3 ),
10041                 rec( 16, 4, CurrentEntries ),
10042                 rec( 20, 4, CurrentServers, var="x" ),
10043                 rec( 24, 4, ServerID, repeat="x" ),
10044                 rec( 28, 4, ServerStationLong, LE, repeat="x" ),
10045         ])
10046         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10047                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10048                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10049         # 2222/177E, 23/126
10050         pkt = NCP(0x177E, "Set Queue Current Status", 'qms')
10051         pkt.Request(15, [
10052                 rec( 10, 4, QueueID ),
10053                 rec( 14, 1, QueueStatus ),
10054         ])
10055         pkt.Reply(8)
10056         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10057                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10058                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10059         # 2222/177F, 23/127
10060         pkt = NCP(0x177F, "Close File And Start Queue Job", 'qms')
10061         pkt.Request(18, [
10062                 rec( 10, 4, QueueID ),
10063                 rec( 14, 4, JobNumberLong ),
10064         ])
10065         pkt.Reply(8)
10066         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10067                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10068                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07, 0xff00])
10069         # 2222/1780, 23/128
10070         pkt = NCP(0x1780, "Remove Job From Queue", 'qms')
10071         pkt.Request(18, [
10072                 rec( 10, 4, QueueID ),
10073                 rec( 14, 4, JobNumberLong ),
10074         ])
10075         pkt.Reply(8)
10076         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10077                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10078                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10079         # 2222/1781, 23/129
10080         pkt = NCP(0x1781, "Get Queue Job List", 'qms')
10081         pkt.Request(18, [
10082                 rec( 10, 4, QueueID ),
10083                 rec( 14, 4, JobNumberLong ),
10084         ])
10085         pkt.Reply(20, [
10086                 rec( 8, 4, TotalQueueJobs ),
10087                 rec( 12, 4, ReplyQueueJobNumbers, var="x" ),
10088                 rec( 16, 4, JobNumberLong, repeat="x" ),
10089         ])
10090         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10091                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10092                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10093         # 2222/1782, 23/130
10094         pkt = NCP(0x1782, "Change Job Priority", 'qms')
10095         pkt.Request(22, [
10096                 rec( 10, 4, QueueID ),
10097                 rec( 14, 4, JobNumberLong ),
10098                 rec( 18, 4, Priority ),
10099         ])
10100         pkt.Reply(8)
10101         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10102                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10103                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10104         # 2222/1783, 23/131
10105         pkt = NCP(0x1783, "Finish Servicing Queue Job", 'qms')
10106         pkt.Request(22, [
10107                 rec( 10, 4, QueueID ),
10108                 rec( 14, 4, JobNumberLong ),
10109                 rec( 18, 4, ChargeInformation ),
10110         ])
10111         pkt.Reply(8)
10112         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10113                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10114                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10115         # 2222/1784, 23/132
10116         pkt = NCP(0x1784, "Abort Servicing Queue Job", 'qms')
10117         pkt.Request(18, [
10118                 rec( 10, 4, QueueID ),
10119                 rec( 14, 4, JobNumberLong ),
10120         ])
10121         pkt.Reply(8)
10122         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10123                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10124                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
10125         # 2222/1785, 23/133
10126         pkt = NCP(0x1785, "Change To Client Rights", 'qms')
10127         pkt.Request(18, [
10128                 rec( 10, 4, QueueID ),
10129                 rec( 14, 4, JobNumberLong ),
10130         ])
10131         pkt.Reply(8)
10132         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10133                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10134                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
10135         # 2222/1786, 23/134
10136         pkt = NCP(0x1786, "Read Queue Server Current Status", 'qms')
10137         pkt.Request(22, [
10138                 rec( 10, 4, QueueID ),
10139                 rec( 14, 4, ServerID, BE ),
10140                 rec( 18, 4, ServerStation ),
10141         ])
10142         pkt.Reply(72, [
10143                 rec( 8, 64, ServerStatusRecord ),
10144         ])
10145         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10146                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10147                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10148         # 2222/1787, 23/135
10149         pkt = NCP(0x1787, "Get Queue Job File Size", 'qms')
10150         pkt.Request(18, [
10151                 rec( 10, 4, QueueID ),
10152                 rec( 14, 4, JobNumberLong ),
10153         ])
10154         pkt.Reply(20, [
10155                 rec( 8, 4, QueueID ),
10156                 rec( 12, 4, JobNumberLong ),
10157                 rec( 16, 4, FileSize, BE ),
10158         ])
10159         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10160                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10161                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10162         # 2222/1788, 23/136
10163         pkt = NCP(0x1788, "Move Queue Job From Src Q to Dst Q", 'qms')
10164         pkt.Request(22, [
10165                 rec( 10, 4, QueueID ),
10166                 rec( 14, 4, JobNumberLong ),
10167                 rec( 18, 4, DstQueueID ),
10168         ])
10169         pkt.Reply(12, [
10170                 rec( 8, 4, JobNumberLong ),
10171         ])
10172         pkt.CompletionCodes([0x0000, 0x7e01, 0xfc06])
10173         # 2222/1789, 23/137
10174         pkt = NCP(0x1789, "Get Queue Jobs From Form List", 'qms')
10175         pkt.Request(24, [
10176                 rec( 10, 4, QueueID ),
10177                 rec( 14, 4, QueueStartPosition ),
10178                 rec( 18, 4, FormTypeCnt, var="x" ),
10179                 rec( 22, 2, FormType, repeat="x" ),
10180         ])
10181         pkt.Reply(20, [
10182                 rec( 8, 4, TotalQueueJobs ),
10183                 rec( 12, 4, JobCount, var="x" ),
10184                 rec( 16, 4, JobNumberLong, repeat="x" ),
10185         ])
10186         pkt.CompletionCodes([0x0000, 0x7e01, 0xfc06])
10187         # 2222/178A, 23/138
10188         pkt = NCP(0x178A, "Service Queue Job By Form List", 'qms')
10189         pkt.Request(24, [
10190                 rec( 10, 4, QueueID ),
10191                 rec( 14, 4, QueueStartPosition ),
10192                 rec( 18, 4, FormTypeCnt, var= "x" ),
10193                 rec( 22, 2, FormType, repeat="x" ),
10194         ])
10195         pkt.Reply(94, [
10196            rec( 8, 86, JobStructNew ),
10197         ])
10198         pkt.CompletionCodes([0x0000, 0x7e01, 0xfc06])
10199         # 2222/1796, 23/150
10200         pkt = NCP(0x1796, "Get Current Account Status", 'accounting')
10201         pkt.Request((13,60), [
10202                 rec( 10, 2, ObjectType, BE ),
10203                 rec( 12, (1,48), ObjectName ),
10204         ], info_str=(ObjectName, "Get Current Account Status: %s", ", %s"))
10205         pkt.Reply(264, [
10206                 rec( 8, 4, AccountBalance, BE ),
10207                 rec( 12, 4, CreditLimit, BE ),
10208                 rec( 16, 120, Reserved120 ),
10209                 rec( 136, 4, HolderID, BE ),
10210                 rec( 140, 4, HoldAmount, BE ),
10211                 rec( 144, 4, HolderID, BE ),
10212                 rec( 148, 4, HoldAmount, BE ),
10213                 rec( 152, 4, HolderID, BE ),
10214                 rec( 156, 4, HoldAmount, BE ),
10215                 rec( 160, 4, HolderID, BE ),
10216                 rec( 164, 4, HoldAmount, BE ),
10217                 rec( 168, 4, HolderID, BE ),
10218                 rec( 172, 4, HoldAmount, BE ),
10219                 rec( 176, 4, HolderID, BE ),
10220                 rec( 180, 4, HoldAmount, BE ),
10221                 rec( 184, 4, HolderID, BE ),
10222                 rec( 188, 4, HoldAmount, BE ),
10223                 rec( 192, 4, HolderID, BE ),
10224                 rec( 196, 4, HoldAmount, BE ),
10225                 rec( 200, 4, HolderID, BE ),
10226                 rec( 204, 4, HoldAmount, BE ),
10227                 rec( 208, 4, HolderID, BE ),
10228                 rec( 212, 4, HoldAmount, BE ),
10229                 rec( 216, 4, HolderID, BE ),
10230                 rec( 220, 4, HoldAmount, BE ),
10231                 rec( 224, 4, HolderID, BE ),
10232                 rec( 228, 4, HoldAmount, BE ),
10233                 rec( 232, 4, HolderID, BE ),
10234                 rec( 236, 4, HoldAmount, BE ),
10235                 rec( 240, 4, HolderID, BE ),
10236                 rec( 244, 4, HoldAmount, BE ),
10237                 rec( 248, 4, HolderID, BE ),
10238                 rec( 252, 4, HoldAmount, BE ),
10239                 rec( 256, 4, HolderID, BE ),
10240                 rec( 260, 4, HoldAmount, BE ),
10241         ])
10242         pkt.CompletionCodes([0x0000, 0x9600, 0xc000, 0xc101, 0xc400, 0xe800,
10243                              0xea00, 0xeb00, 0xec00, 0xfc06, 0xfe07, 0xff00])
10244         # 2222/1797, 23/151
10245         pkt = NCP(0x1797, "Submit Account Charge", 'accounting')
10246         pkt.Request((26,327), [
10247                 rec( 10, 2, ServiceType, BE ),
10248                 rec( 12, 4, ChargeAmount, BE ),
10249                 rec( 16, 4, HoldCancelAmount, BE ),
10250                 rec( 20, 2, ObjectType, BE ),
10251                 rec( 22, 2, CommentType, BE ),
10252                 rec( 24, (1,48), ObjectName ),
10253                 rec( -1, (1,255), Comment ),
10254         ], info_str=(ObjectName, "Submit Account Charge: %s", ", %s"))
10255         pkt.Reply(8)
10256         pkt.CompletionCodes([0x0000, 0x0102, 0x8800, 0x9400, 0x9600, 0xa201,
10257                              0xc000, 0xc101, 0xc200, 0xc400, 0xe800, 0xea00,
10258                              0xeb00, 0xec00, 0xfe07, 0xff00])
10259         # 2222/1798, 23/152
10260         pkt = NCP(0x1798, "Submit Account Hold", 'accounting')
10261         pkt.Request((17,64), [
10262                 rec( 10, 4, HoldCancelAmount, BE ),
10263                 rec( 14, 2, ObjectType, BE ),
10264                 rec( 16, (1,48), ObjectName ),
10265         ], info_str=(ObjectName, "Submit Account Hold: %s", ", %s"))
10266         pkt.Reply(8)
10267         pkt.CompletionCodes([0x0000, 0x0102, 0x8800, 0x9400, 0x9600, 0xa201,
10268                              0xc000, 0xc101, 0xc200, 0xc400, 0xe800, 0xea00,
10269                              0xeb00, 0xec00, 0xfe07, 0xff00])
10270         # 2222/1799, 23/153
10271         pkt = NCP(0x1799, "Submit Account Note", 'accounting')
10272         pkt.Request((18,319), [
10273                 rec( 10, 2, ServiceType, BE ),
10274                 rec( 12, 2, ObjectType, BE ),
10275                 rec( 14, 2, CommentType, BE ),
10276                 rec( 16, (1,48), ObjectName ),
10277                 rec( -1, (1,255), Comment ),
10278         ], info_str=(ObjectName, "Submit Account Note: %s", ", %s"))
10279         pkt.Reply(8)
10280         pkt.CompletionCodes([0x0000, 0x0102, 0x9600, 0xc000, 0xc101, 0xc400,
10281                              0xe800, 0xea00, 0xeb00, 0xec00, 0xf000, 0xfc06,
10282                              0xff00])
10283         # 2222/17c8, 23/200
10284         pkt = NCP(0x17c8, "Check Console Privileges", 'fileserver')
10285         pkt.Request(10)
10286         pkt.Reply(8)
10287         pkt.CompletionCodes([0x0000, 0xc601])
10288         # 2222/17c9, 23/201
10289         pkt = NCP(0x17c9, "Get File Server Description Strings", 'fileserver')
10290         pkt.Request(10)
10291         pkt.Reply(108, [
10292                 rec( 8, 100, DescriptionStrings ),
10293         ])
10294         pkt.CompletionCodes([0x0000, 0x9600])
10295         # 2222/17CA, 23/202
10296         pkt = NCP(0x17CA, "Set File Server Date And Time", 'fileserver')
10297         pkt.Request(16, [
10298                 rec( 10, 1, Year ),
10299                 rec( 11, 1, Month ),
10300                 rec( 12, 1, Day ),
10301                 rec( 13, 1, Hour ),
10302                 rec( 14, 1, Minute ),
10303                 rec( 15, 1, Second ),
10304         ])
10305         pkt.Reply(8)
10306         pkt.CompletionCodes([0x0000, 0xc601])
10307         # 2222/17CB, 23/203
10308         pkt = NCP(0x17CB, "Disable File Server Login", 'fileserver')
10309         pkt.Request(10)
10310         pkt.Reply(8)
10311         pkt.CompletionCodes([0x0000, 0xc601])
10312         # 2222/17CC, 23/204
10313         pkt = NCP(0x17CC, "Enable File Server Login", 'fileserver')
10314         pkt.Request(10)
10315         pkt.Reply(8)
10316         pkt.CompletionCodes([0x0000, 0xc601])
10317         # 2222/17CD, 23/205
10318         pkt = NCP(0x17CD, "Get File Server Login Status", 'fileserver')
10319         pkt.Request(10)
10320         pkt.Reply(12, [
10321                 rec( 8, 4, UserLoginAllowed ),
10322         ])
10323         pkt.CompletionCodes([0x0000, 0x9600, 0xfb01])
10324         # 2222/17CF, 23/207
10325         pkt = NCP(0x17CF, "Disable Transaction Tracking", 'fileserver')
10326         pkt.Request(10)
10327         pkt.Reply(8)
10328         pkt.CompletionCodes([0x0000, 0xc601])
10329         # 2222/17D0, 23/208
10330         pkt = NCP(0x17D0, "Enable Transaction Tracking", 'fileserver')
10331         pkt.Request(10)
10332         pkt.Reply(8)
10333         pkt.CompletionCodes([0x0000, 0xc601])
10334         # 2222/17D1, 23/209
10335         pkt = NCP(0x17D1, "Send Console Broadcast", 'fileserver')
10336         pkt.Request((13,267), [
10337                 rec( 10, 1, NumberOfStations, var="x" ),
10338                 rec( 11, 1, StationList, repeat="x" ),
10339                 rec( 12, (1, 255), TargetMessage ),
10340         ], info_str=(TargetMessage, "Send Console Broadcast: %s", ", %s"))
10341         pkt.Reply(8)
10342         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10343         # 2222/17D2, 23/210
10344         pkt = NCP(0x17D2, "Clear Connection Number", 'fileserver')
10345         pkt.Request(11, [
10346                 rec( 10, 1, ConnectionNumber ),
10347         ],info_str=(ConnectionNumber, "Clear Connection Number %d", ", %d"))
10348         pkt.Reply(8)
10349         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10350         # 2222/17D3, 23/211
10351         pkt = NCP(0x17D3, "Down File Server", 'fileserver')
10352         pkt.Request(11, [
10353                 rec( 10, 1, ForceFlag ),
10354         ])
10355         pkt.Reply(8)
10356         pkt.CompletionCodes([0x0000, 0xc601, 0xff00])
10357         # 2222/17D4, 23/212
10358         pkt = NCP(0x17D4, "Get File System Statistics", 'fileserver')
10359         pkt.Request(10)
10360         pkt.Reply(50, [
10361                 rec( 8, 4, SystemIntervalMarker, BE ),
10362                 rec( 12, 2, ConfiguredMaxOpenFiles ),
10363                 rec( 14, 2, ActualMaxOpenFiles ),
10364                 rec( 16, 2, CurrentOpenFiles ),
10365                 rec( 18, 4, TotalFilesOpened ),
10366                 rec( 22, 4, TotalReadRequests ),
10367                 rec( 26, 4, TotalWriteRequests ),
10368                 rec( 30, 2, CurrentChangedFATs ),
10369                 rec( 32, 4, TotalChangedFATs ),
10370                 rec( 36, 2, FATWriteErrors ),
10371                 rec( 38, 2, FatalFATWriteErrors ),
10372                 rec( 40, 2, FATScanErrors ),
10373                 rec( 42, 2, ActualMaxIndexedFiles ),
10374                 rec( 44, 2, ActiveIndexedFiles ),
10375                 rec( 46, 2, AttachedIndexedFiles ),
10376                 rec( 48, 2, AvailableIndexedFiles ),
10377         ])
10378         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10379         # 2222/17D5, 23/213
10380         pkt = NCP(0x17D5, "Get Transaction Tracking Statistics", 'fileserver')
10381         pkt.Request((13,267), [
10382                 rec( 10, 2, LastRecordSeen ),
10383                 rec( 12, (1,255), SemaphoreName ),
10384         ])
10385         pkt.Reply(53, [
10386                 rec( 8, 4, SystemIntervalMarker, BE ),
10387                 rec( 12, 1, TransactionTrackingSupported ),
10388                 rec( 13, 1, TransactionTrackingEnabled ),
10389                 rec( 14, 2, TransactionVolumeNumber ),
10390                 rec( 16, 2, ConfiguredMaxSimultaneousTransactions ),
10391                 rec( 18, 2, ActualMaxSimultaneousTransactions ),
10392                 rec( 20, 2, CurrentTransactionCount ),
10393                 rec( 22, 4, TotalTransactionsPerformed ),
10394                 rec( 26, 4, TotalWriteTransactionsPerformed ),
10395                 rec( 30, 4, TotalTransactionsBackedOut ),
10396                 rec( 34, 2, TotalUnfilledBackoutRequests ),
10397                 rec( 36, 2, TransactionDiskSpace ),
10398                 rec( 38, 4, TransactionFATAllocations ),
10399                 rec( 42, 4, TransactionFileSizeChanges ),
10400                 rec( 46, 4, TransactionFilesTruncated ),
10401                 rec( 50, 1, NumberOfEntries, var="x" ),
10402                 rec( 51, 2, ConnTaskStruct, repeat="x" ),
10403         ])
10404         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10405         # 2222/17D6, 23/214
10406         pkt = NCP(0x17D6, "Read Disk Cache Statistics", 'fileserver')
10407         pkt.Request(10)
10408         pkt.Reply(86, [
10409                 rec( 8, 4, SystemIntervalMarker, BE ),
10410                 rec( 12, 2, CacheBufferCount ),
10411                 rec( 14, 2, CacheBufferSize ),
10412                 rec( 16, 2, DirtyCacheBuffers ),
10413                 rec( 18, 4, CacheReadRequests ),
10414                 rec( 22, 4, CacheWriteRequests ),
10415                 rec( 26, 4, CacheHits ),
10416                 rec( 30, 4, CacheMisses ),
10417                 rec( 34, 4, PhysicalReadRequests ),
10418                 rec( 38, 4, PhysicalWriteRequests ),
10419                 rec( 42, 2, PhysicalReadErrors ),
10420                 rec( 44, 2, PhysicalWriteErrors ),
10421                 rec( 46, 4, CacheGetRequests ),
10422                 rec( 50, 4, CacheFullWriteRequests ),
10423                 rec( 54, 4, CachePartialWriteRequests ),
10424                 rec( 58, 4, BackgroundDirtyWrites ),
10425                 rec( 62, 4, BackgroundAgedWrites ),
10426                 rec( 66, 4, TotalCacheWrites ),
10427                 rec( 70, 4, CacheAllocations ),
10428                 rec( 74, 2, ThrashingCount ),
10429                 rec( 76, 2, LRUBlockWasDirty ),
10430                 rec( 78, 2, ReadBeyondWrite ),
10431                 rec( 80, 2, FragmentWriteOccurred ),
10432                 rec( 82, 2, CacheHitOnUnavailableBlock ),
10433                 rec( 84, 2, CacheBlockScrapped ),
10434         ])
10435         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10436         # 2222/17D7, 23/215
10437         pkt = NCP(0x17D7, "Get Drive Mapping Table", 'fileserver')
10438         pkt.Request(10)
10439         pkt.Reply(184, [
10440                 rec( 8, 4, SystemIntervalMarker, BE ),
10441                 rec( 12, 1, SFTSupportLevel ),
10442                 rec( 13, 1, LogicalDriveCount ),
10443                 rec( 14, 1, PhysicalDriveCount ),
10444                 rec( 15, 1, DiskChannelTable ),
10445                 rec( 16, 4, Reserved4 ),
10446                 rec( 20, 2, PendingIOCommands, BE ),
10447                 rec( 22, 32, DriveMappingTable ),
10448                 rec( 54, 32, DriveMirrorTable ),
10449                 rec( 86, 32, DeadMirrorTable ),
10450                 rec( 118, 1, ReMirrorDriveNumber ),
10451                 rec( 119, 1, Filler ),
10452                 rec( 120, 4, ReMirrorCurrentOffset, BE ),
10453                 rec( 124, 60, SFTErrorTable ),
10454         ])
10455         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10456         # 2222/17D8, 23/216
10457         pkt = NCP(0x17D8, "Read Physical Disk Statistics", 'fileserver')
10458         pkt.Request(11, [
10459                 rec( 10, 1, PhysicalDiskNumber ),
10460         ])
10461         pkt.Reply(101, [
10462                 rec( 8, 4, SystemIntervalMarker, BE ),
10463                 rec( 12, 1, PhysicalDiskChannel ),
10464                 rec( 13, 1, DriveRemovableFlag ),
10465                 rec( 14, 1, PhysicalDriveType ),
10466                 rec( 15, 1, ControllerDriveNumber ),
10467                 rec( 16, 1, ControllerNumber ),
10468                 rec( 17, 1, ControllerType ),
10469                 rec( 18, 4, DriveSize ),
10470                 rec( 22, 2, DriveCylinders ),
10471                 rec( 24, 1, DriveHeads ),
10472                 rec( 25, 1, SectorsPerTrack ),
10473                 rec( 26, 64, DriveDefinitionString ),
10474                 rec( 90, 2, IOErrorCount ),
10475                 rec( 92, 4, HotFixTableStart ),
10476                 rec( 96, 2, HotFixTableSize ),
10477                 rec( 98, 2, HotFixBlocksAvailable ),
10478                 rec( 100, 1, HotFixDisabled ),
10479         ])
10480         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10481         # 2222/17D9, 23/217
10482         pkt = NCP(0x17D9, "Get Disk Channel Statistics", 'fileserver')
10483         pkt.Request(11, [
10484                 rec( 10, 1, DiskChannelNumber ),
10485         ])
10486         pkt.Reply(192, [
10487                 rec( 8, 4, SystemIntervalMarker, BE ),
10488                 rec( 12, 2, ChannelState, BE ),
10489                 rec( 14, 2, ChannelSynchronizationState, BE ),
10490                 rec( 16, 1, SoftwareDriverType ),
10491                 rec( 17, 1, SoftwareMajorVersionNumber ),
10492                 rec( 18, 1, SoftwareMinorVersionNumber ),
10493                 rec( 19, 65, SoftwareDescription ),
10494                 rec( 84, 8, IOAddressesUsed ),
10495                 rec( 92, 10, SharedMemoryAddresses ),
10496                 rec( 102, 4, InterruptNumbersUsed ),
10497                 rec( 106, 4, DMAChannelsUsed ),
10498                 rec( 110, 1, FlagBits ),
10499                 rec( 111, 1, Reserved ),
10500                 rec( 112, 80, ConfigurationDescription ),
10501         ])
10502         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10503         # 2222/17DB, 23/219
10504         pkt = NCP(0x17DB, "Get Connection's Open Files", 'fileserver')
10505         pkt.Request(14, [
10506                 rec( 10, 2, ConnectionNumber ),
10507                 rec( 12, 2, LastRecordSeen, BE ),
10508         ])
10509         pkt.Reply(32, [
10510                 rec( 8, 2, NextRequestRecord ),
10511                 rec( 10, 1, NumberOfRecords, var="x" ),
10512                 rec( 11, 21, ConnStruct, repeat="x" ),
10513         ])
10514         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10515         # 2222/17DC, 23/220
10516         pkt = NCP(0x17DC, "Get Connection Using A File", 'fileserver')
10517         pkt.Request((14,268), [
10518                 rec( 10, 2, LastRecordSeen, BE ),
10519                 rec( 12, 1, DirHandle ),
10520                 rec( 13, (1,255), Path ),
10521         ], info_str=(Path, "Get Connection Using File: %s", ", %s"))
10522         pkt.Reply(30, [
10523                 rec( 8, 2, UseCount, BE ),
10524                 rec( 10, 2, OpenCount, BE ),
10525                 rec( 12, 2, OpenForReadCount, BE ),
10526                 rec( 14, 2, OpenForWriteCount, BE ),
10527                 rec( 16, 2, DenyReadCount, BE ),
10528                 rec( 18, 2, DenyWriteCount, BE ),
10529                 rec( 20, 2, NextRequestRecord, BE ),
10530                 rec( 22, 1, Locked ),
10531                 rec( 23, 1, NumberOfRecords, var="x" ),
10532                 rec( 24, 6, ConnFileStruct, repeat="x" ),
10533         ])
10534         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10535         # 2222/17DD, 23/221
10536         pkt = NCP(0x17DD, "Get Physical Record Locks By Connection And File", 'fileserver')
10537         pkt.Request(31, [
10538                 rec( 10, 2, TargetConnectionNumber ),
10539                 rec( 12, 2, LastRecordSeen, BE ),
10540                 rec( 14, 1, VolumeNumber ),
10541                 rec( 15, 2, DirectoryID ),
10542                 rec( 17, 14, FileName14 ),
10543         ], info_str=(FileName14, "Get Physical Record Locks by Connection and File: %s", ", %s"))
10544         pkt.Reply(22, [
10545                 rec( 8, 2, NextRequestRecord ),
10546                 rec( 10, 1, NumberOfLocks, var="x" ),
10547                 rec( 11, 1, Reserved ),
10548                 rec( 12, 10, LockStruct, repeat="x" ),
10549         ])
10550         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10551         # 2222/17DE, 23/222
10552         pkt = NCP(0x17DE, "Get Physical Record Locks By File", 'fileserver')
10553         pkt.Request((14,268), [
10554                 rec( 10, 2, TargetConnectionNumber ),
10555                 rec( 12, 1, DirHandle ),
10556                 rec( 13, (1,255), Path ),
10557         ], info_str=(Path, "Get Physical Record Locks by File: %s", ", %s"))
10558         pkt.Reply(28, [
10559                 rec( 8, 2, NextRequestRecord ),
10560                 rec( 10, 1, NumberOfLocks, var="x" ),
10561                 rec( 11, 1, Reserved ),
10562                 rec( 12, 16, PhyLockStruct, repeat="x" ),
10563         ])
10564         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10565         # 2222/17DF, 23/223
10566         pkt = NCP(0x17DF, "Get Logical Records By Connection", 'fileserver')
10567         pkt.Request(14, [
10568                 rec( 10, 2, TargetConnectionNumber ),
10569                 rec( 12, 2, LastRecordSeen, BE ),
10570         ])
10571         pkt.Reply((14,268), [
10572                 rec( 8, 2, NextRequestRecord ),
10573                 rec( 10, 1, NumberOfRecords, var="x" ),
10574                 rec( 11, (3, 257), LogLockStruct, repeat="x" ),
10575         ])
10576         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10577         # 2222/17E0, 23/224
10578         pkt = NCP(0x17E0, "Get Logical Record Information", 'fileserver')
10579         pkt.Request((13,267), [
10580                 rec( 10, 2, LastRecordSeen ),
10581                 rec( 12, (1,255), LogicalRecordName ),
10582         ], info_str=(LogicalRecordName, "Get Logical Record Information: %s", ", %s"))
10583         pkt.Reply(20, [
10584                 rec( 8, 2, UseCount, BE ),
10585                 rec( 10, 2, ShareableLockCount, BE ),
10586                 rec( 12, 2, NextRequestRecord ),
10587                 rec( 14, 1, Locked ),
10588                 rec( 15, 1, NumberOfRecords, var="x" ),
10589                 rec( 16, 4, LogRecStruct, repeat="x" ),
10590         ])
10591         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10592         # 2222/17E1, 23/225
10593         pkt = NCP(0x17E1, "Get Connection's Semaphores", 'fileserver')
10594         pkt.Request(14, [
10595                 rec( 10, 2, ConnectionNumber ),
10596                 rec( 12, 2, LastRecordSeen ),
10597         ])
10598         pkt.Reply((18,272), [
10599                 rec( 8, 2, NextRequestRecord ),
10600                 rec( 10, 2, NumberOfSemaphores, var="x" ),
10601                 rec( 12, (6,260), SemaStruct, repeat="x" ),
10602         ])
10603         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10604         # 2222/17E2, 23/226
10605         pkt = NCP(0x17E2, "Get Semaphore Information", 'fileserver')
10606         pkt.Request((13,267), [
10607                 rec( 10, 2, LastRecordSeen ),
10608                 rec( 12, (1,255), SemaphoreName ),
10609         ], info_str=(SemaphoreName, "Get Semaphore Information: %s", ", %s"))
10610         pkt.Reply(17, [
10611                 rec( 8, 2, NextRequestRecord, BE ),
10612                 rec( 10, 2, OpenCount, BE ),
10613                 rec( 12, 1, SemaphoreValue ),
10614                 rec( 13, 1, NumberOfRecords, var="x" ),
10615                 rec( 14, 3, SemaInfoStruct, repeat="x" ),
10616         ])
10617         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10618         # 2222/17E3, 23/227
10619         pkt = NCP(0x17E3, "Get LAN Driver Configuration Information", 'fileserver')
10620         pkt.Request(11, [
10621                 rec( 10, 1, LANDriverNumber ),
10622         ])
10623         pkt.Reply(180, [
10624                 rec( 8, 4, NetworkAddress, BE ),
10625                 rec( 12, 6, HostAddress ),
10626                 rec( 18, 1, BoardInstalled ),
10627                 rec( 19, 1, OptionNumber ),
10628                 rec( 20, 160, ConfigurationText ),
10629         ])
10630         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10631         # 2222/17E5, 23/229
10632         pkt = NCP(0x17E5, "Get Connection Usage Statistics", 'fileserver')
10633         pkt.Request(12, [
10634                 rec( 10, 2, ConnectionNumber ),
10635         ])
10636         pkt.Reply(26, [
10637                 rec( 8, 2, NextRequestRecord ),
10638                 rec( 10, 6, BytesRead ),
10639                 rec( 16, 6, BytesWritten ),
10640                 rec( 22, 4, TotalRequestPackets ),
10641          ])
10642         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10643         # 2222/17E6, 23/230
10644         pkt = NCP(0x17E6, "Get Object's Remaining Disk Space", 'fileserver')
10645         pkt.Request(14, [
10646                 rec( 10, 4, ObjectID, BE ),
10647         ])
10648         pkt.Reply(21, [
10649                 rec( 8, 4, SystemIntervalMarker, BE ),
10650                 rec( 12, 4, ObjectID ),
10651                 rec( 16, 4, UnusedDiskBlocks, BE ),
10652                 rec( 20, 1, RestrictionsEnforced ),
10653          ])
10654         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10655         # 2222/17E7, 23/231
10656         pkt = NCP(0x17E7, "Get File Server LAN I/O Statistics", 'fileserver')
10657         pkt.Request(10)
10658         pkt.Reply(74, [
10659                 rec( 8, 4, SystemIntervalMarker, BE ),
10660                 rec( 12, 2, ConfiguredMaxRoutingBuffers ),
10661                 rec( 14, 2, ActualMaxUsedRoutingBuffers ),
10662                 rec( 16, 2, CurrentlyUsedRoutingBuffers ),
10663                 rec( 18, 4, TotalFileServicePackets ),
10664                 rec( 22, 2, TurboUsedForFileService ),
10665                 rec( 24, 2, PacketsFromInvalidConnection ),
10666                 rec( 26, 2, BadLogicalConnectionCount ),
10667                 rec( 28, 2, PacketsReceivedDuringProcessing ),
10668                 rec( 30, 2, RequestsReprocessed ),
10669                 rec( 32, 2, PacketsWithBadSequenceNumber ),
10670                 rec( 34, 2, DuplicateRepliesSent ),
10671                 rec( 36, 2, PositiveAcknowledgesSent ),
10672                 rec( 38, 2, PacketsWithBadRequestType ),
10673                 rec( 40, 2, AttachDuringProcessing ),
10674                 rec( 42, 2, AttachWhileProcessingAttach ),
10675                 rec( 44, 2, ForgedDetachedRequests ),
10676                 rec( 46, 2, DetachForBadConnectionNumber ),
10677                 rec( 48, 2, DetachDuringProcessing ),
10678                 rec( 50, 2, RepliesCancelled ),
10679                 rec( 52, 2, PacketsDiscardedByHopCount ),
10680                 rec( 54, 2, PacketsDiscardedUnknownNet ),
10681                 rec( 56, 2, IncomingPacketDiscardedNoDGroup ),
10682                 rec( 58, 2, OutgoingPacketDiscardedNoTurboBuffer ),
10683                 rec( 60, 2, IPXNotMyNetwork ),
10684                 rec( 62, 4, NetBIOSBroadcastWasPropogated ),
10685                 rec( 66, 4, TotalOtherPackets ),
10686                 rec( 70, 4, TotalRoutedPackets ),
10687          ])
10688         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10689         # 2222/17E8, 23/232
10690         pkt = NCP(0x17E8, "Get File Server Misc Information", 'fileserver')
10691         pkt.Request(10)
10692         pkt.Reply(40, [
10693                 rec( 8, 4, SystemIntervalMarker, BE ),
10694                 rec( 12, 1, ProcessorType ),
10695                 rec( 13, 1, Reserved ),
10696                 rec( 14, 1, NumberOfServiceProcesses ),
10697                 rec( 15, 1, ServerUtilizationPercentage ),
10698                 rec( 16, 2, ConfiguredMaxBinderyObjects ),
10699                 rec( 18, 2, ActualMaxBinderyObjects ),
10700                 rec( 20, 2, CurrentUsedBinderyObjects ),
10701                 rec( 22, 2, TotalServerMemory ),
10702                 rec( 24, 2, WastedServerMemory ),
10703                 rec( 26, 2, NumberOfDynamicMemoryAreas, var="x" ),
10704                 rec( 28, 12, DynMemStruct, repeat="x" ),
10705          ])
10706         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10707         # 2222/17E9, 23/233
10708         pkt = NCP(0x17E9, "Get Volume Information", 'fileserver')
10709         pkt.Request(11, [
10710                 rec( 10, 1, VolumeNumber ),
10711         ],info_str=(VolumeNumber, "Get Information on Volume %d", ", %d"))
10712         pkt.Reply(48, [
10713                 rec( 8, 4, SystemIntervalMarker, BE ),
10714                 rec( 12, 1, VolumeNumber ),
10715                 rec( 13, 1, LogicalDriveNumber ),
10716                 rec( 14, 2, BlockSize ),
10717                 rec( 16, 2, StartingBlock ),
10718                 rec( 18, 2, TotalBlocks ),
10719                 rec( 20, 2, FreeBlocks ),
10720                 rec( 22, 2, TotalDirectoryEntries ),
10721                 rec( 24, 2, FreeDirectoryEntries ),
10722                 rec( 26, 2, ActualMaxUsedDirectoryEntries ),
10723                 rec( 28, 1, VolumeHashedFlag ),
10724                 rec( 29, 1, VolumeCachedFlag ),
10725                 rec( 30, 1, VolumeRemovableFlag ),
10726                 rec( 31, 1, VolumeMountedFlag ),
10727                 rec( 32, 16, VolumeName ),
10728          ])
10729         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10730         # 2222/17EA, 23/234
10731         pkt = NCP(0x17EA, "Get Connection's Task Information", 'fileserver')
10732         pkt.Request(12, [
10733                 rec( 10, 2, ConnectionNumber ),
10734         ])
10735         pkt.Reply(18, [
10736                 rec( 8, 2, NextRequestRecord ),
10737                 rec( 10, 4, NumberOfAttributes, var="x" ),
10738                 rec( 14, 4, Attributes, repeat="x" ),
10739          ])
10740         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10741         # 2222/17EB, 23/235
10742         pkt = NCP(0x17EB, "Get Connection's Open Files", 'fileserver')
10743         pkt.Request(14, [
10744                 rec( 10, 2, ConnectionNumber ),
10745                 rec( 12, 2, LastRecordSeen ),
10746         ])
10747         pkt.Reply((29,283), [
10748                 rec( 8, 2, NextRequestRecord ),
10749                 rec( 10, 2, NumberOfRecords, var="x" ),
10750                 rec( 12, (17, 271), OpnFilesStruct, repeat="x" ),
10751         ])
10752         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10753         # 2222/17EC, 23/236
10754         pkt = NCP(0x17EC, "Get Connection Using A File", 'fileserver')
10755         pkt.Request(18, [
10756                 rec( 10, 1, DataStreamNumber ),
10757                 rec( 11, 1, VolumeNumber ),
10758                 rec( 12, 4, DirectoryBase, LE ),
10759                 rec( 16, 2, LastRecordSeen ),
10760         ])
10761         pkt.Reply(33, [
10762                 rec( 8, 2, NextRequestRecord ),
10763                 rec( 10, 2, FileUseCount ),
10764                 rec( 12, 2, OpenCount ),
10765                 rec( 14, 2, OpenForReadCount ),
10766                 rec( 16, 2, OpenForWriteCount ),
10767                 rec( 18, 2, DenyReadCount ),
10768                 rec( 20, 2, DenyWriteCount ),
10769                 rec( 22, 1, Locked ),
10770                 rec( 23, 1, ForkCount ),
10771                 rec( 24, 2, NumberOfRecords, var="x" ),
10772                 rec( 26, 7, ConnFileStruct, repeat="x" ),
10773         ])
10774         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10775         # 2222/17ED, 23/237
10776         pkt = NCP(0x17ED, "Get Physical Record Locks By Connection And File", 'fileserver')
10777         pkt.Request(20, [
10778                 rec( 10, 2, TargetConnectionNumber ),
10779                 rec( 12, 1, DataStreamNumber ),
10780                 rec( 13, 1, VolumeNumber ),
10781                 rec( 14, 4, DirectoryBase, LE ),
10782                 rec( 18, 2, LastRecordSeen ),
10783         ])
10784         pkt.Reply(23, [
10785                 rec( 8, 2, NextRequestRecord ),
10786                 rec( 10, 2, NumberOfLocks, var="x" ),
10787                 rec( 12, 11, LockStruct, repeat="x" ),
10788         ])
10789         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10790         # 2222/17EE, 23/238
10791         pkt = NCP(0x17EE, "Get Physical Record Locks By File", 'fileserver')
10792         pkt.Request(18, [
10793                 rec( 10, 1, DataStreamNumber ),
10794                 rec( 11, 1, VolumeNumber ),
10795                 rec( 12, 4, DirectoryBase ),
10796                 rec( 16, 2, LastRecordSeen ),
10797         ])
10798         pkt.Reply(30, [
10799                 rec( 8, 2, NextRequestRecord ),
10800                 rec( 10, 2, NumberOfLocks, var="x" ),
10801                 rec( 12, 18, PhyLockStruct, repeat="x" ),
10802         ])
10803         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10804         # 2222/17EF, 23/239
10805         pkt = NCP(0x17EF, "Get Logical Records By Connection", 'fileserver')
10806         pkt.Request(14, [
10807                 rec( 10, 2, TargetConnectionNumber ),
10808                 rec( 12, 2, LastRecordSeen ),
10809         ])
10810         pkt.Reply((16,270), [
10811                 rec( 8, 2, NextRequestRecord ),
10812                 rec( 10, 2, NumberOfRecords, var="x" ),
10813                 rec( 12, (4, 258), LogLockStruct, repeat="x" ),
10814         ])
10815         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10816         # 2222/17F0, 23/240
10817         pkt = NCP(0x17F0, "Get Logical Record Information (old)", 'fileserver')
10818         pkt.Request((13,267), [
10819                 rec( 10, 2, LastRecordSeen ),
10820                 rec( 12, (1,255), LogicalRecordName ),
10821         ])
10822         pkt.Reply(22, [
10823                 rec( 8, 2, ShareableLockCount ),
10824                 rec( 10, 2, UseCount ),
10825                 rec( 12, 1, Locked ),
10826                 rec( 13, 2, NextRequestRecord ),
10827                 rec( 15, 2, NumberOfRecords, var="x" ),
10828                 rec( 17, 5, LogRecStruct, repeat="x" ),
10829         ])
10830         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10831         # 2222/17F1, 23/241
10832         pkt = NCP(0x17F1, "Get Connection's Semaphores", 'fileserver')
10833         pkt.Request(14, [
10834                 rec( 10, 2, ConnectionNumber ),
10835                 rec( 12, 2, LastRecordSeen ),
10836         ])
10837         pkt.Reply((19,273), [
10838                 rec( 8, 2, NextRequestRecord ),
10839                 rec( 10, 2, NumberOfSemaphores, var="x" ),
10840                 rec( 12, (7, 261), SemaStruct, repeat="x" ),
10841         ])
10842         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10843         # 2222/17F2, 23/242
10844         pkt = NCP(0x17F2, "Get Semaphore Information", 'fileserver')
10845         pkt.Request((13,267), [
10846                 rec( 10, 2, LastRecordSeen ),
10847                 rec( 12, (1,255), SemaphoreName ),
10848         ], info_str=(SemaphoreName, "Get Semaphore Information: %s", ", %s"))
10849         pkt.Reply(20, [
10850                 rec( 8, 2, NextRequestRecord ),
10851                 rec( 10, 2, OpenCount ),
10852                 rec( 12, 2, SemaphoreValue ),
10853                 rec( 14, 2, NumberOfRecords, var="x" ),
10854                 rec( 16, 4, SemaInfoStruct, repeat="x" ),
10855         ])
10856         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10857         # 2222/17F3, 23/243
10858         pkt = NCP(0x17F3, "Map Directory Number to Path", 'file')
10859         pkt.Request(16, [
10860                 rec( 10, 1, VolumeNumber ),
10861                 rec( 11, 4, DirectoryNumber ),
10862                 rec( 15, 1, NameSpace ),
10863         ])
10864         pkt.Reply((9,263), [
10865                 rec( 8, (1,255), Path ),
10866         ])
10867         pkt.CompletionCodes([0x0000, 0x9600, 0x9c00, 0xc601, 0xfd00, 0xff00])
10868         # 2222/17F4, 23/244
10869         pkt = NCP(0x17F4, "Convert Path to Dir Entry", 'file')
10870         pkt.Request((12,266), [
10871                 rec( 10, 1, DirHandle ),
10872                 rec( 11, (1,255), Path ),
10873         ], info_str=(Path, "Convert Path to Directory Entry: %s", ", %s"))
10874         pkt.Reply(13, [
10875                 rec( 8, 1, VolumeNumber ),
10876                 rec( 9, 4, DirectoryNumber ),
10877         ])
10878         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10879         # 2222/17FD, 23/253
10880         pkt = NCP(0x17FD, "Send Console Broadcast", 'fileserver')
10881         pkt.Request((16, 270), [
10882                 rec( 10, 1, NumberOfStations, var="x" ),
10883                 rec( 11, 4, StationList, repeat="x" ),
10884                 rec( 15, (1, 255), TargetMessage ),
10885         ], info_str=(TargetMessage, "Send Console Broadcast: %s", ", %s"))
10886         pkt.Reply(8)
10887         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10888         # 2222/17FE, 23/254
10889         pkt = NCP(0x17FE, "Clear Connection Number", 'fileserver')
10890         pkt.Request(14, [
10891                 rec( 10, 4, ConnectionNumber ),
10892         ])
10893         pkt.Reply(8)
10894         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10895         # 2222/18, 24
10896         pkt = NCP(0x18, "End of Job", 'connection')
10897         pkt.Request(7)
10898         pkt.Reply(8)
10899         pkt.CompletionCodes([0x0000])
10900         # 2222/19, 25
10901         pkt = NCP(0x19, "Logout", 'connection')
10902         pkt.Request(7)
10903         pkt.Reply(8)
10904         pkt.CompletionCodes([0x0000])
10905         # 2222/1A, 26
10906         pkt = NCP(0x1A, "Log Physical Record", 'sync')
10907         pkt.Request(24, [
10908                 rec( 7, 1, LockFlag ),
10909                 rec( 8, 6, FileHandle ),
10910                 rec( 14, 4, LockAreasStartOffset, BE ),
10911                 rec( 18, 4, LockAreaLen, BE ),
10912                 rec( 22, 2, LockTimeout ),
10913         ], info_str=(LockAreaLen, "Lock Record - Length of %d", "%d"))
10914         pkt.Reply(8)
10915         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
10916         # 2222/1B, 27
10917         pkt = NCP(0x1B, "Lock Physical Record Set", 'sync')
10918         pkt.Request(10, [
10919                 rec( 7, 1, LockFlag ),
10920                 rec( 8, 2, LockTimeout ),
10921         ])
10922         pkt.Reply(8)
10923         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
10924         # 2222/1C, 28
10925         pkt = NCP(0x1C, "Release Physical Record", 'sync')
10926         pkt.Request(22, [
10927                 rec( 7, 1, Reserved ),
10928                 rec( 8, 6, FileHandle ),
10929                 rec( 14, 4, LockAreasStartOffset ),
10930                 rec( 18, 4, LockAreaLen ),
10931         ], info_str=(LockAreaLen, "Release Lock Record - Length of %d", "%d"))
10932         pkt.Reply(8)
10933         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10934         # 2222/1D, 29
10935         pkt = NCP(0x1D, "Release Physical Record Set", 'sync')
10936         pkt.Request(8, [
10937                 rec( 7, 1, LockFlag ),
10938         ])
10939         pkt.Reply(8)
10940         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10941         # 2222/1E, 30   #Tested and fixed 6-14-02 GM
10942         pkt = NCP(0x1E, "Clear Physical Record", 'sync')
10943         pkt.Request(22, [
10944                 rec( 7, 1, Reserved ),
10945                 rec( 8, 6, FileHandle ),
10946                 rec( 14, 4, LockAreasStartOffset, BE ),
10947                 rec( 18, 4, LockAreaLen, BE ),
10948         ], info_str=(LockAreaLen, "Clear Lock Record - Length of %d", "%d"))
10949         pkt.Reply(8)
10950         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10951         # 2222/1F, 31
10952         pkt = NCP(0x1F, "Clear Physical Record Set", 'sync')
10953         pkt.Request(8, [
10954                 rec( 7, 1, LockFlag ),
10955         ])
10956         pkt.Reply(8)
10957         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10958         # 2222/2000, 32/00
10959         pkt = NCP(0x2000, "Open Semaphore", 'sync', has_length=0)
10960         pkt.Request((10,264), [
10961                 rec( 8, 1, InitialSemaphoreValue ),
10962                 rec( 9, (1,255), SemaphoreName ),
10963         ], info_str=(SemaphoreName, "Open Semaphore: %s", ", %s"))
10964         pkt.Reply(13, [
10965                   rec( 8, 4, SemaphoreHandle, BE ),
10966                   rec( 12, 1, SemaphoreOpenCount ),
10967         ])
10968         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10969         # 2222/2001, 32/01
10970         pkt = NCP(0x2001, "Examine Semaphore", 'sync', has_length=0)
10971         pkt.Request(12, [
10972                 rec( 8, 4, SemaphoreHandle, BE ),
10973         ])
10974         pkt.Reply(10, [
10975                   rec( 8, 1, SemaphoreValue ),
10976                   rec( 9, 1, SemaphoreOpenCount ),
10977         ])
10978         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10979         # 2222/2002, 32/02
10980         pkt = NCP(0x2002, "Wait On Semaphore", 'sync', has_length=0)
10981         pkt.Request(14, [
10982                 rec( 8, 4, SemaphoreHandle, BE ),
10983                 rec( 12, 2, SemaphoreTimeOut, BE ),
10984         ])
10985         pkt.Reply(8)
10986         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10987         # 2222/2003, 32/03
10988         pkt = NCP(0x2003, "Signal Semaphore", 'sync', has_length=0)
10989         pkt.Request(12, [
10990                 rec( 8, 4, SemaphoreHandle, BE ),
10991         ])
10992         pkt.Reply(8)
10993         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10994         # 2222/2004, 32/04
10995         pkt = NCP(0x2004, "Close Semaphore", 'sync', has_length=0)
10996         pkt.Request(12, [
10997                 rec( 8, 4, SemaphoreHandle, BE ),
10998         ])
10999         pkt.Reply(8)
11000         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
11001         # 2222/21, 33
11002         pkt = NCP(0x21, "Negotiate Buffer Size", 'connection')
11003         pkt.Request(9, [
11004                 rec( 7, 2, BufferSize, BE ),
11005         ])
11006         pkt.Reply(10, [
11007                 rec( 8, 2, BufferSize, BE ),
11008         ])
11009         pkt.CompletionCodes([0x0000])
11010         # 2222/2200, 34/00
11011         pkt = NCP(0x2200, "TTS Is Available", 'tts', has_length=0)
11012         pkt.Request(8)
11013         pkt.Reply(8)
11014         pkt.CompletionCodes([0x0001, 0xfd03, 0xff12])
11015         # 2222/2201, 34/01
11016         pkt = NCP(0x2201, "TTS Begin Transaction", 'tts', has_length=0)
11017         pkt.Request(8)
11018         pkt.Reply(8)
11019         pkt.CompletionCodes([0x0000])
11020         # 2222/2202, 34/02
11021         pkt = NCP(0x2202, "TTS End Transaction", 'tts', has_length=0)
11022         pkt.Request(8)
11023         pkt.Reply(12, [
11024                   rec( 8, 4, TransactionNumber, BE ),
11025         ])
11026         pkt.CompletionCodes([0x0000, 0xff01])
11027         # 2222/2203, 34/03
11028         pkt = NCP(0x2203, "TTS Abort Transaction", 'tts', has_length=0)
11029         pkt.Request(8)
11030         pkt.Reply(8)
11031         pkt.CompletionCodes([0x0000, 0xfd03, 0xfe0b, 0xff01])
11032         # 2222/2204, 34/04
11033         pkt = NCP(0x2204, "TTS Transaction Status", 'tts', has_length=0)
11034         pkt.Request(12, [
11035                   rec( 8, 4, TransactionNumber, BE ),
11036         ])
11037         pkt.Reply(8)
11038         pkt.CompletionCodes([0x0000])
11039         # 2222/2205, 34/05
11040         pkt = NCP(0x2205, "TTS Get Application Thresholds", 'tts', has_length=0)
11041         pkt.Request(8)
11042         pkt.Reply(10, [
11043                   rec( 8, 1, LogicalLockThreshold ),
11044                   rec( 9, 1, PhysicalLockThreshold ),
11045         ])
11046         pkt.CompletionCodes([0x0000])
11047         # 2222/2206, 34/06
11048         pkt = NCP(0x2206, "TTS Set Application Thresholds", 'tts', has_length=0)
11049         pkt.Request(10, [
11050                   rec( 8, 1, LogicalLockThreshold ),
11051                   rec( 9, 1, PhysicalLockThreshold ),
11052         ])
11053         pkt.Reply(8)
11054         pkt.CompletionCodes([0x0000, 0x9600])
11055         # 2222/2207, 34/07
11056         pkt = NCP(0x2207, "TTS Get Workstation Thresholds", 'tts', has_length=0)
11057         pkt.Request(8)
11058         pkt.Reply(10, [
11059                   rec( 8, 1, LogicalLockThreshold ),
11060                   rec( 9, 1, PhysicalLockThreshold ),
11061         ])
11062         pkt.CompletionCodes([0x0000])
11063         # 2222/2208, 34/08
11064         pkt = NCP(0x2208, "TTS Set Workstation Thresholds", 'tts', has_length=0)
11065         pkt.Request(10, [
11066                   rec( 8, 1, LogicalLockThreshold ),
11067                   rec( 9, 1, PhysicalLockThreshold ),
11068         ])
11069         pkt.Reply(8)
11070         pkt.CompletionCodes([0x0000])
11071         # 2222/2209, 34/09
11072         pkt = NCP(0x2209, "TTS Get Transaction Bits", 'tts', has_length=0)
11073         pkt.Request(8)
11074         pkt.Reply(9, [
11075                 rec( 8, 1, ControlFlags ),
11076         ])
11077         pkt.CompletionCodes([0x0000])
11078         # 2222/220A, 34/10
11079         pkt = NCP(0x220A, "TTS Set Transaction Bits", 'tts', has_length=0)
11080         pkt.Request(9, [
11081                 rec( 8, 1, ControlFlags ),
11082         ])
11083         pkt.Reply(8)
11084         pkt.CompletionCodes([0x0000])
11085         # 2222/2301, 35/01
11086         pkt = NCP(0x2301, "AFP Create Directory", 'afp')
11087         pkt.Request((49, 303), [
11088                 rec( 10, 1, VolumeNumber ),
11089                 rec( 11, 4, BaseDirectoryID ),
11090                 rec( 15, 1, Reserved ),
11091                 rec( 16, 4, CreatorID ),
11092                 rec( 20, 4, Reserved4 ),
11093                 rec( 24, 2, FinderAttr ),
11094                 rec( 26, 2, HorizLocation ),
11095                 rec( 28, 2, VertLocation ),
11096                 rec( 30, 2, FileDirWindow ),
11097                 rec( 32, 16, Reserved16 ),
11098                 rec( 48, (1,255), Path ),
11099         ], info_str=(Path, "AFP Create Directory: %s", ", %s"))
11100         pkt.Reply(12, [
11101                 rec( 8, 4, NewDirectoryID ),
11102         ])
11103         pkt.CompletionCodes([0x0000, 0x8301, 0x8400, 0x8800, 0x9300, 0x9600, 0x9804,
11104                              0x9900, 0x9c03, 0x9e02, 0xa100, 0xa201, 0xfd00, 0xff18])
11105         # 2222/2302, 35/02
11106         pkt = NCP(0x2302, "AFP Create File", 'afp')
11107         pkt.Request((49, 303), [
11108                 rec( 10, 1, VolumeNumber ),
11109                 rec( 11, 4, BaseDirectoryID ),
11110                 rec( 15, 1, DeleteExistingFileFlag ),
11111                 rec( 16, 4, CreatorID, BE ),
11112                 rec( 20, 4, Reserved4 ),
11113                 rec( 24, 2, FinderAttr ),
11114                 rec( 26, 2, HorizLocation, BE ),
11115                 rec( 28, 2, VertLocation, BE ),
11116                 rec( 30, 2, FileDirWindow, BE ),
11117                 rec( 32, 16, Reserved16 ),
11118                 rec( 48, (1,255), Path ),
11119         ], info_str=(Path, "AFP Create File: %s", ", %s"))
11120         pkt.Reply(12, [
11121                 rec( 8, 4, NewDirectoryID ),
11122         ])
11123         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8301, 0x8400, 0x8701, 0x8800,
11124                              0x8a00, 0x8d00, 0x8e00, 0x8f00, 0x9300, 0x9600, 0x9804,
11125                              0x9900, 0x9b03, 0x9c03, 0x9e02, 0xa100, 0xa201, 0xfd00,
11126                              0xff18])
11127         # 2222/2303, 35/03
11128         pkt = NCP(0x2303, "AFP Delete", 'afp')
11129         pkt.Request((16,270), [
11130                 rec( 10, 1, VolumeNumber ),
11131                 rec( 11, 4, BaseDirectoryID ),
11132                 rec( 15, (1,255), Path ),
11133         ], info_str=(Path, "AFP Delete: %s", ", %s"))
11134         pkt.Reply(8)
11135         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x8a00, 0x8d00, 0x8e00, 0x8f00,
11136                              0x9000, 0x9300, 0x9600, 0x9804, 0x9b03, 0x9c03, 0x9e02,
11137                              0xa000, 0xa100, 0xa201, 0xfd00, 0xff19])
11138         # 2222/2304, 35/04
11139         pkt = NCP(0x2304, "AFP Get Entry ID From Name", 'afp')
11140         pkt.Request((16,270), [
11141                 rec( 10, 1, VolumeNumber ),
11142                 rec( 11, 4, BaseDirectoryID ),
11143                 rec( 15, (1,255), Path ),
11144         ], info_str=(Path, "AFP Get Entry from Name: %s", ", %s"))
11145         pkt.Reply(12, [
11146                 rec( 8, 4, TargetEntryID, BE ),
11147         ])
11148         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804, 0x9c03,
11149                              0xa100, 0xa201, 0xfd00, 0xff19])
11150         # 2222/2305, 35/05
11151         pkt = NCP(0x2305, "AFP Get File Information", 'afp')
11152         pkt.Request((18,272), [
11153                 rec( 10, 1, VolumeNumber ),
11154                 rec( 11, 4, BaseDirectoryID ),
11155                 rec( 15, 2, RequestBitMap, BE ),
11156                 rec( 17, (1,255), Path ),
11157         ], info_str=(Path, "AFP Get File Information: %s", ", %s"))
11158         pkt.Reply(121, [
11159                 rec( 8, 4, AFPEntryID, BE ),
11160                 rec( 12, 4, ParentID, BE ),
11161                 rec( 16, 2, AttributesDef16, LE ),
11162                 rec( 18, 4, DataForkLen, BE ),
11163                 rec( 22, 4, ResourceForkLen, BE ),
11164                 rec( 26, 2, TotalOffspring, BE  ),
11165                 rec( 28, 2, CreationDate, BE ),
11166                 rec( 30, 2, LastAccessedDate, BE ),
11167                 rec( 32, 2, ModifiedDate, BE ),
11168                 rec( 34, 2, ModifiedTime, BE ),
11169                 rec( 36, 2, ArchivedDate, BE ),
11170                 rec( 38, 2, ArchivedTime, BE ),
11171                 rec( 40, 4, CreatorID, BE ),
11172                 rec( 44, 4, Reserved4 ),
11173                 rec( 48, 2, FinderAttr ),
11174                 rec( 50, 2, HorizLocation ),
11175                 rec( 52, 2, VertLocation ),
11176                 rec( 54, 2, FileDirWindow ),
11177                 rec( 56, 16, Reserved16 ),
11178                 rec( 72, 32, LongName ),
11179                 rec( 104, 4, CreatorID, BE ),
11180                 rec( 108, 12, ShortName ),
11181                 rec( 120, 1, AccessPrivileges ),
11182         ])
11183         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804, 0x9c03,
11184                              0xa100, 0xa201, 0xfd00, 0xff19])
11185         # 2222/2306, 35/06
11186         pkt = NCP(0x2306, "AFP Get Entry ID From NetWare Handle", 'afp')
11187         pkt.Request(16, [
11188                 rec( 10, 6, FileHandle ),
11189         ])
11190         pkt.Reply(14, [
11191                 rec( 8, 1, VolumeID ),
11192                 rec( 9, 4, TargetEntryID, BE ),
11193                 rec( 13, 1, ForkIndicator ),
11194         ])
11195         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0xa201])
11196         # 2222/2307, 35/07
11197         pkt = NCP(0x2307, "AFP Rename", 'afp')
11198         pkt.Request((21, 529), [
11199                 rec( 10, 1, VolumeNumber ),
11200                 rec( 11, 4, MacSourceBaseID, BE ),
11201                 rec( 15, 4, MacDestinationBaseID, BE ),
11202                 rec( 19, (1,255), Path ),
11203                 rec( -1, (1,255), NewFileNameLen ),
11204         ], info_str=(Path, "AFP Rename: %s", ", %s"))
11205         pkt.Reply(8)
11206         pkt.CompletionCodes([0x0000, 0x8301, 0x8401, 0x8800, 0x8b00, 0x8e00,
11207                              0x9001, 0x9201, 0x9300, 0x9600, 0x9804, 0x9900,
11208                              0x9c03, 0x9e00, 0xa100, 0xa201, 0xfd00, 0xff0a])
11209         # 2222/2308, 35/08
11210         pkt = NCP(0x2308, "AFP Open File Fork", 'afp')
11211         pkt.Request((18, 272), [
11212                 rec( 10, 1, VolumeNumber ),
11213                 rec( 11, 4, MacBaseDirectoryID ),
11214                 rec( 15, 1, ForkIndicator ),
11215                 rec( 16, 1, AccessMode ),
11216                 rec( 17, (1,255), Path ),
11217         ], info_str=(Path, "AFP Open File Fork: %s", ", %s"))
11218         pkt.Reply(22, [
11219                 rec( 8, 4, AFPEntryID, BE ),
11220                 rec( 12, 4, DataForkLen, BE ),
11221                 rec( 16, 6, NetWareAccessHandle ),
11222         ])
11223         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8301, 0x8800, 0x9300,
11224                              0x9400, 0x9600, 0x9804, 0x9900, 0x9c03, 0xa100,
11225                              0xa201, 0xfd00, 0xff16])
11226         # 2222/2309, 35/09
11227         pkt = NCP(0x2309, "AFP Set File Information", 'afp')
11228         pkt.Request((64, 318), [
11229                 rec( 10, 1, VolumeNumber ),
11230                 rec( 11, 4, MacBaseDirectoryID ),
11231                 rec( 15, 2, RequestBitMap, BE ),
11232                 rec( 17, 2, MacAttr, BE ),
11233                 rec( 19, 2, CreationDate, BE ),
11234                 rec( 21, 2, LastAccessedDate, BE ),
11235                 rec( 23, 2, ModifiedDate, BE ),
11236                 rec( 25, 2, ModifiedTime, BE ),
11237                 rec( 27, 2, ArchivedDate, BE ),
11238                 rec( 29, 2, ArchivedTime, BE ),
11239                 rec( 31, 4, CreatorID, BE ),
11240                 rec( 35, 4, Reserved4 ),
11241                 rec( 39, 2, FinderAttr ),
11242                 rec( 41, 2, HorizLocation ),
11243                 rec( 43, 2, VertLocation ),
11244                 rec( 45, 2, FileDirWindow ),
11245                 rec( 47, 16, Reserved16 ),
11246                 rec( 63, (1,255), Path ),
11247         ], info_str=(Path, "AFP Set File Information: %s", ", %s"))
11248         pkt.Reply(8)
11249         pkt.CompletionCodes([0x0000, 0x0104, 0x8301, 0x8800, 0x9300, 0x9400,
11250                              0x9500, 0x9600, 0x9804, 0x9c03, 0xa100, 0xa201,
11251                              0xfd00, 0xff16])
11252         # 2222/230A, 35/10
11253         pkt = NCP(0x230A, "AFP Scan File Information", 'afp')
11254         pkt.Request((26, 280), [
11255                 rec( 10, 1, VolumeNumber ),
11256                 rec( 11, 4, MacBaseDirectoryID ),
11257                 rec( 15, 4, MacLastSeenID, BE ),
11258                 rec( 19, 2, DesiredResponseCount, BE ),
11259                 rec( 21, 2, SearchBitMap, BE ),
11260                 rec( 23, 2, RequestBitMap, BE ),
11261                 rec( 25, (1,255), Path ),
11262         ], info_str=(Path, "AFP Scan File Information: %s", ", %s"))
11263         pkt.Reply(123, [
11264                 rec( 8, 2, ActualResponseCount, BE, var="x" ),
11265                 rec( 10, 113, AFP10Struct, repeat="x" ),
11266         ])
11267         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804,
11268                              0x9c03, 0xa100, 0xa201, 0xfd00, 0xff16])
11269         # 2222/230B, 35/11
11270         pkt = NCP(0x230B, "AFP Alloc Temporary Directory Handle", 'afp')
11271         pkt.Request((16,270), [
11272                 rec( 10, 1, VolumeNumber ),
11273                 rec( 11, 4, MacBaseDirectoryID ),
11274                 rec( 15, (1,255), Path ),
11275         ], info_str=(Path, "AFP Allocate Temporary Directory Handle: %s", ", %s"))
11276         pkt.Reply(10, [
11277                 rec( 8, 1, DirHandle ),
11278                 rec( 9, 1, AccessRightsMask ),
11279         ])
11280         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600,
11281                              0x9804, 0x9b03, 0x9c03, 0x9d00, 0xa100,
11282                              0xa201, 0xfd00, 0xff00])
11283         # 2222/230C, 35/12
11284         pkt = NCP(0x230C, "AFP Get Entry ID From Path Name", 'afp')
11285         pkt.Request((12,266), [
11286                 rec( 10, 1, DirHandle ),
11287                 rec( 11, (1,255), Path ),
11288         ], info_str=(Path, "AFP Get Entry ID from Path Name: %s", ", %s"))
11289         pkt.Reply(12, [
11290                 rec( 8, 4, AFPEntryID, BE ),
11291         ])
11292         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600,
11293                              0x9804, 0x9b03, 0x9c03, 0xa100, 0xa201,
11294                              0xfd00, 0xff00])
11295         # 2222/230D, 35/13
11296         pkt = NCP(0x230D, "AFP 2.0 Create Directory", 'afp')
11297         pkt.Request((55,309), [
11298                 rec( 10, 1, VolumeNumber ),
11299                 rec( 11, 4, BaseDirectoryID ),
11300                 rec( 15, 1, Reserved ),
11301                 rec( 16, 4, CreatorID, BE ),
11302                 rec( 20, 4, Reserved4 ),
11303                 rec( 24, 2, FinderAttr ),
11304                 rec( 26, 2, HorizLocation ),
11305                 rec( 28, 2, VertLocation ),
11306                 rec( 30, 2, FileDirWindow ),
11307                 rec( 32, 16, Reserved16 ),
11308                 rec( 48, 6, ProDOSInfo ),
11309                 rec( 54, (1,255), Path ),
11310         ], info_str=(Path, "AFP 2.0 Create Directory: %s", ", %s"))
11311         pkt.Reply(12, [
11312                 rec( 8, 4, NewDirectoryID ),
11313         ])
11314         pkt.CompletionCodes([0x0000, 0x8301, 0x8400, 0x8800, 0x9300,
11315                              0x9600, 0x9804, 0x9900, 0x9c03, 0x9e00,
11316                              0xa100, 0xa201, 0xfd00, 0xff00])
11317         # 2222/230E, 35/14
11318         pkt = NCP(0x230E, "AFP 2.0 Create File", 'afp')
11319         pkt.Request((55,309), [
11320                 rec( 10, 1, VolumeNumber ),
11321                 rec( 11, 4, BaseDirectoryID ),
11322                 rec( 15, 1, DeleteExistingFileFlag ),
11323                 rec( 16, 4, CreatorID, BE ),
11324                 rec( 20, 4, Reserved4 ),
11325                 rec( 24, 2, FinderAttr ),
11326                 rec( 26, 2, HorizLocation ),
11327                 rec( 28, 2, VertLocation ),
11328                 rec( 30, 2, FileDirWindow ),
11329                 rec( 32, 16, Reserved16 ),
11330                 rec( 48, 6, ProDOSInfo ),
11331                 rec( 54, (1,255), Path ),
11332         ], info_str=(Path, "AFP 2.0 Create File: %s", ", %s"))
11333         pkt.Reply(12, [
11334                 rec( 8, 4, NewDirectoryID ),
11335         ])
11336         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8301, 0x8400,
11337                              0x8701, 0x8800, 0x8a00, 0x8d00, 0x8e00,
11338                              0x8f00, 0x9001, 0x9300, 0x9600, 0x9804,
11339                              0x9900, 0x9b03, 0x9c03, 0x9e00, 0xa100,
11340                              0xa201, 0xfd00, 0xff00])
11341         # 2222/230F, 35/15
11342         pkt = NCP(0x230F, "AFP 2.0 Get File Or Directory Information", 'afp')
11343         pkt.Request((18,272), [
11344                 rec( 10, 1, VolumeNumber ),
11345                 rec( 11, 4, BaseDirectoryID ),
11346                 rec( 15, 2, RequestBitMap, BE ),
11347                 rec( 17, (1,255), Path ),
11348         ], info_str=(Path, "AFP 2.0 Get Information: %s", ", %s"))
11349         pkt.Reply(128, [
11350                 rec( 8, 4, AFPEntryID, BE ),
11351                 rec( 12, 4, ParentID, BE ),
11352                 rec( 16, 2, AttributesDef16 ),
11353                 rec( 18, 4, DataForkLen, BE ),
11354                 rec( 22, 4, ResourceForkLen, BE ),
11355                 rec( 26, 2, TotalOffspring, BE ),
11356                 rec( 28, 2, CreationDate, BE ),
11357                 rec( 30, 2, LastAccessedDate, BE ),
11358                 rec( 32, 2, ModifiedDate, BE ),
11359                 rec( 34, 2, ModifiedTime, BE ),
11360                 rec( 36, 2, ArchivedDate, BE ),
11361                 rec( 38, 2, ArchivedTime, BE ),
11362                 rec( 40, 4, CreatorID, BE ),
11363                 rec( 44, 4, Reserved4 ),
11364                 rec( 48, 2, FinderAttr ),
11365                 rec( 50, 2, HorizLocation ),
11366                 rec( 52, 2, VertLocation ),
11367                 rec( 54, 2, FileDirWindow ),
11368                 rec( 56, 16, Reserved16 ),
11369                 rec( 72, 32, LongName ),
11370                 rec( 104, 4, CreatorID, BE ),
11371                 rec( 108, 12, ShortName ),
11372                 rec( 120, 1, AccessPrivileges ),
11373                 rec( 121, 1, Reserved ),
11374                 rec( 122, 6, ProDOSInfo ),
11375         ])
11376         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804, 0x9c03,
11377                              0xa100, 0xa201, 0xfd00, 0xff19])
11378         # 2222/2310, 35/16
11379         pkt = NCP(0x2310, "AFP 2.0 Set File Information", 'afp')
11380         pkt.Request((70, 324), [
11381                 rec( 10, 1, VolumeNumber ),
11382                 rec( 11, 4, MacBaseDirectoryID ),
11383                 rec( 15, 2, RequestBitMap, BE ),
11384                 rec( 17, 2, AttributesDef16 ),
11385                 rec( 19, 2, CreationDate, BE ),
11386                 rec( 21, 2, LastAccessedDate, BE ),
11387                 rec( 23, 2, ModifiedDate, BE ),
11388                 rec( 25, 2, ModifiedTime, BE ),
11389                 rec( 27, 2, ArchivedDate, BE ),
11390                 rec( 29, 2, ArchivedTime, BE ),
11391                 rec( 31, 4, CreatorID, BE ),
11392                 rec( 35, 4, Reserved4 ),
11393                 rec( 39, 2, FinderAttr ),
11394                 rec( 41, 2, HorizLocation ),
11395                 rec( 43, 2, VertLocation ),
11396                 rec( 45, 2, FileDirWindow ),
11397                 rec( 47, 16, Reserved16 ),
11398                 rec( 63, 6, ProDOSInfo ),
11399                 rec( 69, (1,255), Path ),
11400         ], info_str=(Path, "AFP 2.0 Set File Information: %s", ", %s"))
11401         pkt.Reply(8)
11402         pkt.CompletionCodes([0x0000, 0x0104, 0x8301, 0x8800, 0x9300, 0x9400,
11403                              0x9500, 0x9600, 0x9804, 0x9c03, 0xa100, 0xa201,
11404                              0xfd00, 0xff16])
11405         # 2222/2311, 35/17
11406         pkt = NCP(0x2311, "AFP 2.0 Scan File Information", 'afp')
11407         pkt.Request((26, 280), [
11408                 rec( 10, 1, VolumeNumber ),
11409                 rec( 11, 4, MacBaseDirectoryID ),
11410                 rec( 15, 4, MacLastSeenID, BE ),
11411                 rec( 19, 2, DesiredResponseCount, BE ),
11412                 rec( 21, 2, SearchBitMap, BE ),
11413                 rec( 23, 2, RequestBitMap, BE ),
11414                 rec( 25, (1,255), Path ),
11415         ], info_str=(Path, "AFP 2.0 Scan File Information: %s", ", %s"))
11416         pkt.Reply(14, [
11417                 rec( 8, 2, ActualResponseCount, var="x" ),
11418                 rec( 10, 4, AFP20Struct, repeat="x" ),
11419         ])
11420         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804,
11421                              0x9c03, 0xa100, 0xa201, 0xfd00, 0xff16])
11422         # 2222/2312, 35/18
11423         pkt = NCP(0x2312, "AFP Get DOS Name From Entry ID", 'afp')
11424         pkt.Request(15, [
11425                 rec( 10, 1, VolumeNumber ),
11426                 rec( 11, 4, AFPEntryID, BE ),
11427         ])
11428         pkt.Reply((9,263), [
11429                 rec( 8, (1,255), Path ),
11430         ])
11431         pkt.CompletionCodes([0x0000, 0x8900, 0x9600, 0xbf00])
11432         # 2222/2313, 35/19
11433         pkt = NCP(0x2313, "AFP Get Macintosh Info On Deleted File", 'afp')
11434         pkt.Request(15, [
11435                 rec( 10, 1, VolumeNumber ),
11436                 rec( 11, 4, DirectoryNumber, BE ),
11437         ])
11438         pkt.Reply((51,305), [
11439                 rec( 8, 4, CreatorID, BE ),
11440                 rec( 12, 4, Reserved4 ),
11441                 rec( 16, 2, FinderAttr ),
11442                 rec( 18, 2, HorizLocation ),
11443                 rec( 20, 2, VertLocation ),
11444                 rec( 22, 2, FileDirWindow ),
11445                 rec( 24, 16, Reserved16 ),
11446                 rec( 40, 6, ProDOSInfo ),
11447                 rec( 46, 4, ResourceForkSize, BE ),
11448                 rec( 50, (1,255), FileName ),
11449         ])
11450         pkt.CompletionCodes([0x0000, 0x9c03, 0xbf00])
11451         # 2222/2400, 36/00
11452         pkt = NCP(0x2400, "Get NCP Extension Information", 'extension')
11453         pkt.Request(14, [
11454                 rec( 10, 4, NCPextensionNumber, LE ),
11455         ])
11456         pkt.Reply((16,270), [
11457                 rec( 8, 4, NCPextensionNumber ),
11458                 rec( 12, 1, NCPextensionMajorVersion ),
11459                 rec( 13, 1, NCPextensionMinorVersion ),
11460                 rec( 14, 1, NCPextensionRevisionNumber ),
11461                 rec( 15, (1, 255), NCPextensionName ),
11462         ])
11463         pkt.CompletionCodes([0x0000, 0x7e01, 0xfe00, 0xff20])
11464         # 2222/2401, 36/01
11465         pkt = NCP(0x2401, "Get NCP Extension Maximum Data Size", 'extension')
11466         pkt.Request(10)
11467         pkt.Reply(10, [
11468                 rec( 8, 2, NCPdataSize ),
11469         ])
11470         pkt.CompletionCodes([0x0000, 0x7e01, 0xfe00, 0xff20])
11471         # 2222/2402, 36/02
11472         pkt = NCP(0x2402, "Get NCP Extension Information by Name", 'extension')
11473         pkt.Request((11, 265), [
11474                 rec( 10, (1,255), NCPextensionName ),
11475         ], info_str=(NCPextensionName, "Get NCP Extension Information by Name: %s", ", %s"))
11476         pkt.Reply((16,270), [
11477                 rec( 8, 4, NCPextensionNumber ),
11478                 rec( 12, 1, NCPextensionMajorVersion ),
11479                 rec( 13, 1, NCPextensionMinorVersion ),
11480                 rec( 14, 1, NCPextensionRevisionNumber ),
11481                 rec( 15, (1, 255), NCPextensionName ),
11482         ])
11483         pkt.CompletionCodes([0x0000, 0x7e01, 0xfe00, 0xff20])
11484         # 2222/2403, 36/03
11485         pkt = NCP(0x2403, "Get Number of Registered NCP Extensions", 'extension')
11486         pkt.Request(10)
11487         pkt.Reply(12, [
11488                 rec( 8, 4, NumberOfNCPExtensions ),
11489         ])
11490         pkt.CompletionCodes([0x0000, 0x7e01, 0xfe00, 0xff20])
11491         # 2222/2404, 36/04
11492         pkt = NCP(0x2404, "Get NCP Extension Registered Verbs List", 'extension')
11493         pkt.Request(14, [
11494                 rec( 10, 4, StartingNumber ),
11495         ])
11496         pkt.Reply(20, [
11497                 rec( 8, 4, ReturnedListCount, var="x" ),
11498                 rec( 12, 4, nextStartingNumber ),
11499                 rec( 16, 4, NCPExtensionNumbers, repeat="x" ),
11500         ])
11501         pkt.CompletionCodes([0x0000, 0x7e01, 0xfe00, 0xff20])
11502         # 2222/2405, 36/05
11503         pkt = NCP(0x2405, "Return NCP Extension Information", 'extension')
11504         pkt.Request(14, [
11505                 rec( 10, 4, NCPextensionNumber ),
11506         ])
11507         pkt.Reply((16,270), [
11508                 rec( 8, 4, NCPextensionNumber ),
11509                 rec( 12, 1, NCPextensionMajorVersion ),
11510                 rec( 13, 1, NCPextensionMinorVersion ),
11511                 rec( 14, 1, NCPextensionRevisionNumber ),
11512                 rec( 15, (1, 255), NCPextensionName ),
11513         ])
11514         pkt.CompletionCodes([0x0000, 0x7e01, 0xfe00, 0xff20])
11515         # 2222/2406, 36/06
11516         pkt = NCP(0x2406, "Return NCP Extension Maximum Data Size", 'extension')
11517         pkt.Request(10)
11518         pkt.Reply(12, [
11519                 rec( 8, 4, NCPdataSize ),
11520         ])
11521         pkt.CompletionCodes([0x0000, 0xfe00, 0xff20])
11522         # 2222/25, 37
11523         pkt = NCP(0x25, "Execute NCP Extension", 'extension')
11524         pkt.Request(11, [
11525                 rec( 7, 4, NCPextensionNumber ),
11526                 # The following value is Unicode
11527                 #rec[ 13, (1,255), RequestData ],
11528         ])
11529         pkt.Reply(8)
11530                 # The following value is Unicode
11531                 #[ 8, (1, 255), ReplyBuffer ],
11532         pkt.CompletionCodes([0x0000, 0x7e01, 0xf000, 0x9c00, 0xd504, 0xee00, 0xfe00, 0xff20])
11533         # 2222/3B, 59
11534         pkt = NCP(0x3B, "Commit File", 'file', has_length=0 )
11535         pkt.Request(14, [
11536                 rec( 7, 1, Reserved ),
11537                 rec( 8, 6, FileHandle ),
11538         ], info_str=(FileHandle, "Commit File - 0x%s", ", %s"))
11539         pkt.Reply(8)
11540         pkt.CompletionCodes([0x0000, 0x8800, 0x9804, 0xff00])
11541         # 2222/3E, 62
11542         pkt = NCP(0x3E, "File Search Initialize", 'file', has_length=0 )
11543         pkt.Request((9, 263), [
11544                 rec( 7, 1, DirHandle ),
11545                 rec( 8, (1,255), Path ),
11546         ], info_str=(Path, "Initialize File Search: %s", ", %s"))
11547         pkt.Reply(14, [
11548                 rec( 8, 1, VolumeNumber ),
11549                 rec( 9, 2, DirectoryID ),
11550                 rec( 11, 2, SequenceNumber, BE ),
11551                 rec( 13, 1, AccessRightsMask ),
11552         ])
11553         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100,
11554                              0xfd00, 0xff16])
11555         # 2222/3F, 63
11556         pkt = NCP(0x3F, "File Search Continue", 'file', has_length=0 )
11557         pkt.Request((14, 268), [
11558                 rec( 7, 1, VolumeNumber ),
11559                 rec( 8, 2, DirectoryID ),
11560                 rec( 10, 2, SequenceNumber, BE ),
11561                 rec( 12, 1, SearchAttributes ),
11562                 rec( 13, (1,255), Path ),
11563         ], info_str=(Path, "File Search Continue: %s", ", %s"))
11564         pkt.Reply( NO_LENGTH_CHECK, [
11565                 #
11566                 # XXX - don't show this if we got back a non-zero
11567                 # completion code?  For example, 255 means "No
11568                 # matching files or directories were found", so
11569                 # presumably it can't show you a matching file or
11570                 # directory instance - it appears to just leave crap
11571                 # there.
11572                 #
11573                 srec( DirectoryInstance, req_cond="ncp.sattr_sub==TRUE"),
11574                 srec( FileInstance, req_cond="ncp.sattr_sub!=TRUE"),
11575         ])
11576         pkt.ReqCondSizeVariable()
11577         pkt.CompletionCodes([0x0000, 0xff16])
11578         # 2222/40, 64
11579         pkt = NCP(0x40, "Search for a File", 'file')
11580         pkt.Request((12, 266), [
11581                 rec( 7, 2, SequenceNumber, BE ),
11582                 rec( 9, 1, DirHandle ),
11583                 rec( 10, 1, SearchAttributes ),
11584                 rec( 11, (1,255), FileName ),
11585         ], info_str=(FileName, "Search for File: %s", ", %s"))
11586         pkt.Reply(40, [
11587                 rec( 8, 2, SequenceNumber, BE ),
11588                 rec( 10, 2, Reserved2 ),
11589                 rec( 12, 14, FileName14 ),
11590                 rec( 26, 1, AttributesDef ),
11591                 rec( 27, 1, FileExecuteType ),
11592                 rec( 28, 4, FileSize ),
11593                 rec( 32, 2, CreationDate, BE ),
11594                 rec( 34, 2, LastAccessedDate, BE ),
11595                 rec( 36, 2, ModifiedDate, BE ),
11596                 rec( 38, 2, ModifiedTime, BE ),
11597         ])
11598         pkt.CompletionCodes([0x0000, 0x8900, 0x9600, 0x9804, 0x9b03,
11599                              0x9c03, 0xa100, 0xfd00, 0xff16])
11600         # 2222/41, 65
11601         pkt = NCP(0x41, "Open File", 'file')
11602         pkt.Request((10, 264), [
11603                 rec( 7, 1, DirHandle ),
11604                 rec( 8, 1, SearchAttributes ),
11605                 rec( 9, (1,255), FileName ),
11606         ], info_str=(FileName, "Open File: %s", ", %s"))
11607         pkt.Reply(44, [
11608                 rec( 8, 6, FileHandle ),
11609                 rec( 14, 2, Reserved2 ),
11610                 rec( 16, 14, FileName14 ),
11611                 rec( 30, 1, AttributesDef ),
11612                 rec( 31, 1, FileExecuteType ),
11613                 rec( 32, 4, FileSize, BE ),
11614                 rec( 36, 2, CreationDate, BE ),
11615                 rec( 38, 2, LastAccessedDate, BE ),
11616                 rec( 40, 2, ModifiedDate, BE ),
11617                 rec( 42, 2, ModifiedTime, BE ),
11618         ])
11619         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8200, 0x9400,
11620                              0x9600, 0x9804, 0x9c03, 0xa100, 0xfd00,
11621                              0xff16])
11622         # 2222/42, 66
11623         pkt = NCP(0x42, "Close File", 'file')
11624         pkt.Request(14, [
11625                 rec( 7, 1, Reserved ),
11626                 rec( 8, 6, FileHandle ),
11627         ], info_str=(FileHandle, "Close File - 0x%s", ", %s"))
11628         pkt.Reply(8)
11629         pkt.CompletionCodes([0x0000, 0x8800, 0xff1a])
11630         # 2222/43, 67
11631         pkt = NCP(0x43, "Create File", 'file')
11632         pkt.Request((10, 264), [
11633                 rec( 7, 1, DirHandle ),
11634                 rec( 8, 1, AttributesDef ),
11635                 rec( 9, (1,255), FileName ),
11636         ], info_str=(FileName, "Create File: %s", ", %s"))
11637         pkt.Reply(44, [
11638                 rec( 8, 6, FileHandle ),
11639                 rec( 14, 2, Reserved2 ),
11640                 rec( 16, 14, FileName14 ),
11641                 rec( 30, 1, AttributesDef ),
11642                 rec( 31, 1, FileExecuteType ),
11643                 rec( 32, 4, FileSize, BE ),
11644                 rec( 36, 2, CreationDate, BE ),
11645                 rec( 38, 2, LastAccessedDate, BE ),
11646                 rec( 40, 2, ModifiedDate, BE ),
11647                 rec( 42, 2, ModifiedTime, BE ),
11648         ])
11649         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11650                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11651                              0x9804, 0x9900, 0x9b03, 0x9c03, 0xfd00,
11652                              0xff00])
11653         # 2222/44, 68
11654         pkt = NCP(0x44, "Erase File", 'file')
11655         pkt.Request((10, 264), [
11656                 rec( 7, 1, DirHandle ),
11657                 rec( 8, 1, SearchAttributes ),
11658                 rec( 9, (1,255), FileName ),
11659         ], info_str=(FileName, "Erase File: %s", ", %s"))
11660         pkt.Reply(8)
11661         pkt.CompletionCodes([0x0000, 0x8a00, 0x8d00, 0x8e00, 0x8f00,
11662                              0x9001, 0x9600, 0x9804, 0x9b03, 0x9c03,
11663                              0xa100, 0xfd00, 0xff00])
11664         # 2222/45, 69
11665         pkt = NCP(0x45, "Rename File", 'file')
11666         pkt.Request((12, 520), [
11667                 rec( 7, 1, DirHandle ),
11668                 rec( 8, 1, SearchAttributes ),
11669                 rec( 9, (1,255), FileName ),
11670                 rec( -1, 1, TargetDirHandle ),
11671                 rec( -1, (1, 255), NewFileNameLen ),
11672         ], info_str=(FileName, "Rename File: %s", ", %s"))
11673         pkt.Reply(8)
11674         pkt.CompletionCodes([0x0000, 0x8701, 0x8b00, 0x8d00, 0x8e00,
11675                              0x8f00, 0x9001, 0x9101, 0x9201, 0x9600,
11676                              0x9804, 0x9a00, 0x9b03, 0x9c03, 0xa100,
11677                              0xfd00, 0xff16])
11678         # 2222/46, 70
11679         pkt = NCP(0x46, "Set File Attributes", 'file')
11680         pkt.Request((11, 265), [
11681                 rec( 7, 1, AttributesDef ),
11682                 rec( 8, 1, DirHandle ),
11683                 rec( 9, 1, SearchAttributes ),
11684                 rec( 10, (1,255), FileName ),
11685         ], info_str=(FileName, "Set File Attributes: %s", ", %s"))
11686         pkt.Reply(8)
11687         pkt.CompletionCodes([0x0000, 0x8c00, 0x8d00, 0x8e00, 0x9600,
11688                              0x9804, 0x9b03, 0x9c03, 0xa100, 0xfd00,
11689                              0xff16])
11690         # 2222/47, 71
11691         pkt = NCP(0x47, "Get Current Size of File", 'file')
11692         pkt.Request(14, [
11693         rec(7, 1, Reserved ),
11694                 rec( 8, 6, FileHandle ),
11695         ], info_str=(FileHandle, "Get Current Size of File - 0x%s", ", %s"))
11696         pkt.Reply(12, [
11697                 rec( 8, 4, FileSize, BE ),
11698         ])
11699         pkt.CompletionCodes([0x0000, 0x8800])
11700         # 2222/48, 72
11701         pkt = NCP(0x48, "Read From A File", 'file')
11702         pkt.Request(20, [
11703                 rec( 7, 1, Reserved ),
11704                 rec( 8, 6, FileHandle ),
11705                 rec( 14, 4, FileOffset, BE ),
11706                 rec( 18, 2, MaxBytes, BE ),
11707         ], info_str=(FileHandle, "Read From File - 0x%s", ", %s"))
11708         pkt.Reply(10, [
11709                 rec( 8, 2, NumBytes, BE ),
11710         ])
11711         pkt.CompletionCodes([0x0000, 0x8300, 0x8800, 0x9300, 0xff1b])
11712         # 2222/49, 73
11713         pkt = NCP(0x49, "Write to a File", 'file')
11714         pkt.Request(20, [
11715                 rec( 7, 1, Reserved ),
11716                 rec( 8, 6, FileHandle ),
11717                 rec( 14, 4, FileOffset, BE ),
11718                 rec( 18, 2, MaxBytes, BE ),
11719         ], info_str=(FileHandle, "Write to a File - 0x%s", ", %s"))
11720         pkt.Reply(8)
11721         pkt.CompletionCodes([0x0000, 0x0104, 0x8300, 0x8800, 0x9400, 0x9500, 0xa201, 0xff1b])
11722         # 2222/4A, 74
11723         pkt = NCP(0x4A, "Copy from One File to Another", 'file')
11724         pkt.Request(30, [
11725                 rec( 7, 1, Reserved ),
11726                 rec( 8, 6, FileHandle ),
11727                 rec( 14, 6, TargetFileHandle ),
11728                 rec( 20, 4, FileOffset, BE ),
11729                 rec( 24, 4, TargetFileOffset, BE ),
11730                 rec( 28, 2, BytesToCopy, BE ),
11731         ])
11732         pkt.Reply(12, [
11733                 rec( 8, 4, BytesActuallyTransferred, BE ),
11734         ])
11735         pkt.CompletionCodes([0x0000, 0x0104, 0x8300, 0x8800, 0x9300, 0x9400,
11736                              0x9500, 0x9600, 0xa201, 0xff1b])
11737         # 2222/4B, 75
11738         pkt = NCP(0x4B, "Set File Time Date Stamp", 'file')
11739         pkt.Request(18, [
11740                 rec( 7, 1, Reserved ),
11741                 rec( 8, 6, FileHandle ),
11742                 rec( 14, 2, FileTime, BE ),
11743                 rec( 16, 2, FileDate, BE ),
11744         ], info_str=(FileHandle, "Set Time and Date Stamp for File - 0x%s", ", %s"))
11745         pkt.Reply(8)
11746         pkt.CompletionCodes([0x0000, 0x8800, 0x9400, 0x9600, 0xfb08])
11747         # 2222/4C, 76
11748         pkt = NCP(0x4C, "Open File", 'file')
11749         pkt.Request((11, 265), [
11750                 rec( 7, 1, DirHandle ),
11751                 rec( 8, 1, SearchAttributes ),
11752                 rec( 9, 1, AccessRightsMask ),
11753                 rec( 10, (1,255), FileName ),
11754         ], info_str=(FileName, "Open File: %s", ", %s"))
11755         pkt.Reply(44, [
11756                 rec( 8, 6, FileHandle ),
11757                 rec( 14, 2, Reserved2 ),
11758                 rec( 16, 14, FileName14 ),
11759                 rec( 30, 1, AttributesDef ),
11760                 rec( 31, 1, FileExecuteType ),
11761                 rec( 32, 4, FileSize, BE ),
11762                 rec( 36, 2, CreationDate, BE ),
11763                 rec( 38, 2, LastAccessedDate, BE ),
11764                 rec( 40, 2, ModifiedDate, BE ),
11765                 rec( 42, 2, ModifiedTime, BE ),
11766         ])
11767         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8200, 0x9400,
11768                              0x9600, 0x9804, 0x9c03, 0xa100, 0xfd00,
11769                              0xff16])
11770         # 2222/4D, 77
11771         pkt = NCP(0x4D, "Create File", 'file')
11772         pkt.Request((10, 264), [
11773                 rec( 7, 1, DirHandle ),
11774                 rec( 8, 1, AttributesDef ),
11775                 rec( 9, (1,255), FileName ),
11776         ], info_str=(FileName, "Create File: %s", ", %s"))
11777         pkt.Reply(44, [
11778                 rec( 8, 6, FileHandle ),
11779                 rec( 14, 2, Reserved2 ),
11780                 rec( 16, 14, FileName14 ),
11781                 rec( 30, 1, AttributesDef ),
11782                 rec( 31, 1, FileExecuteType ),
11783                 rec( 32, 4, FileSize, BE ),
11784                 rec( 36, 2, CreationDate, BE ),
11785                 rec( 38, 2, LastAccessedDate, BE ),
11786                 rec( 40, 2, ModifiedDate, BE ),
11787                 rec( 42, 2, ModifiedTime, BE ),
11788         ])
11789         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11790                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11791                              0x9804, 0x9900, 0x9b03, 0x9c03, 0xfd00,
11792                              0xff00])
11793         # 2222/4F, 79
11794         pkt = NCP(0x4F, "Set File Extended Attributes", 'file')
11795         pkt.Request((11, 265), [
11796                 rec( 7, 1, AttributesDef ),
11797                 rec( 8, 1, DirHandle ),
11798                 rec( 9, 1, AccessRightsMask ),
11799                 rec( 10, (1,255), FileName ),
11800         ], info_str=(FileName, "Set File Extended Attributes: %s", ", %s"))
11801         pkt.Reply(8)
11802         pkt.CompletionCodes([0x0000, 0x8c00, 0x8d00, 0x8e00, 0x9600,
11803                              0x9804, 0x9b03, 0x9c03, 0xa100, 0xfd00,
11804                              0xff16])
11805         # 2222/54, 84
11806         pkt = NCP(0x54, "Open/Create File", 'file')
11807         pkt.Request((12, 266), [
11808                 rec( 7, 1, DirHandle ),
11809                 rec( 8, 1, AttributesDef ),
11810                 rec( 9, 1, AccessRightsMask ),
11811                 rec( 10, 1, ActionFlag ),
11812                 rec( 11, (1,255), FileName ),
11813         ], info_str=(FileName, "Open/Create File: %s", ", %s"))
11814         pkt.Reply(44, [
11815                 rec( 8, 6, FileHandle ),
11816                 rec( 14, 2, Reserved2 ),
11817                 rec( 16, 14, FileName14 ),
11818                 rec( 30, 1, AttributesDef ),
11819                 rec( 31, 1, FileExecuteType ),
11820                 rec( 32, 4, FileSize, BE ),
11821                 rec( 36, 2, CreationDate, BE ),
11822                 rec( 38, 2, LastAccessedDate, BE ),
11823                 rec( 40, 2, ModifiedDate, BE ),
11824                 rec( 42, 2, ModifiedTime, BE ),
11825         ])
11826         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11827                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11828                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
11829         # 2222/55, 85
11830         pkt = NCP(0x55, "Get Sparse File Data Block Bit Map", 'file')
11831         pkt.Request(17, [
11832                 rec( 7, 6, FileHandle ),
11833                 rec( 13, 4, FileOffset ),
11834         ], info_str=(FileHandle, "Get Sparse File Data Block Bitmap for File - 0x%s", ", %s"))
11835         pkt.Reply(528, [
11836                 rec( 8, 4, AllocationBlockSize ),
11837                 rec( 12, 4, Reserved4 ),
11838                 rec( 16, 512, BitMap ),
11839         ])
11840         pkt.CompletionCodes([0x0000, 0x8800])
11841         # 2222/5601, 86/01
11842         pkt = NCP(0x5601, "Close Extended Attribute Handle", 'extended', has_length=0 )
11843         pkt.Request(14, [
11844                 rec( 8, 2, Reserved2 ),
11845                 rec( 10, 4, EAHandle ),
11846         ])
11847         pkt.Reply(8)
11848         pkt.CompletionCodes([0x0000, 0xcf00, 0xd301])
11849         # 2222/5602, 86/02
11850         pkt = NCP(0x5602, "Write Extended Attribute", 'extended', has_length=0 )
11851         pkt.Request((35,97), [
11852                 rec( 8, 2, EAFlags ),
11853                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume, BE ),
11854                 rec( 14, 4, ReservedOrDirectoryNumber ),
11855                 rec( 18, 4, TtlWriteDataSize ),
11856                 rec( 22, 4, FileOffset ),
11857                 rec( 26, 4, EAAccessFlag ),
11858                 rec( 30, 2, EAValueLength, var='x' ),
11859                 rec( 32, (2,64), EAKey ),
11860                 rec( -1, 1, EAValueRep, repeat='x' ),
11861         ], info_str=(EAKey, "Write Extended Attribute: %s", ", %s"))
11862         pkt.Reply(20, [
11863                 rec( 8, 4, EAErrorCodes ),
11864                 rec( 12, 4, EABytesWritten ),
11865                 rec( 16, 4, NewEAHandle ),
11866         ])
11867         pkt.CompletionCodes([0x0000, 0xc800, 0xc900, 0xcb00, 0xce00, 0xcf00, 0xd101,
11868                              0xd203, 0xd301, 0xd402])
11869         # 2222/5603, 86/03
11870         pkt = NCP(0x5603, "Read Extended Attribute", 'extended', has_length=0 )
11871         pkt.Request((28,538), [
11872                 rec( 8, 2, EAFlags ),
11873                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
11874                 rec( 14, 4, ReservedOrDirectoryNumber ),
11875                 rec( 18, 4, FileOffset ),
11876                 rec( 22, 4, InspectSize ),
11877                 rec( 26, (2,512), EAKey ),
11878         ], info_str=(EAKey, "Read Extended Attribute: %s", ", %s"))
11879         pkt.Reply((26,536), [
11880                 rec( 8, 4, EAErrorCodes ),
11881                 rec( 12, 4, TtlValuesLength ),
11882                 rec( 16, 4, NewEAHandle ),
11883                 rec( 20, 4, EAAccessFlag ),
11884                 rec( 24, (2,512), EAValue ),
11885         ])
11886         pkt.CompletionCodes([0x0000, 0xc900, 0xce00, 0xcf00, 0xd101,
11887                              0xd301])
11888         # 2222/5604, 86/04
11889         pkt = NCP(0x5604, "Enumerate Extended Attribute", 'extended', has_length=0 )
11890         pkt.Request((26,536), [
11891                 rec( 8, 2, EAFlags ),
11892                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
11893                 rec( 14, 4, ReservedOrDirectoryNumber ),
11894                 rec( 18, 4, InspectSize ),
11895                 rec( 22, 2, SequenceNumber ),
11896                 rec( 24, (2,512), EAKey ),
11897         ], info_str=(EAKey, "Enumerate Extended Attribute: %s", ", %s"))
11898         pkt.Reply(28, [
11899                 rec( 8, 4, EAErrorCodes ),
11900                 rec( 12, 4, TtlEAs ),
11901                 rec( 16, 4, TtlEAsDataSize ),
11902                 rec( 20, 4, TtlEAsKeySize ),
11903                 rec( 24, 4, NewEAHandle ),
11904         ])
11905         pkt.CompletionCodes([0x0000, 0x8800, 0x8c01, 0xc900, 0xce00, 0xcf00, 0xd101,
11906                              0xd301])
11907         # 2222/5605, 86/05
11908         pkt = NCP(0x5605, "Duplicate Extended Attributes", 'extended', has_length=0 )
11909         pkt.Request(28, [
11910                 rec( 8, 2, EAFlags ),
11911                 rec( 10, 2, DstEAFlags ),
11912                 rec( 12, 4, EAHandleOrNetWareHandleOrVolume ),
11913                 rec( 16, 4, ReservedOrDirectoryNumber ),
11914                 rec( 20, 4, EAHandleOrNetWareHandleOrVolume ),
11915                 rec( 24, 4, ReservedOrDirectoryNumber ),
11916         ])
11917         pkt.Reply(20, [
11918                 rec( 8, 4, EADuplicateCount ),
11919                 rec( 12, 4, EADataSizeDuplicated ),
11920                 rec( 16, 4, EAKeySizeDuplicated ),
11921         ])
11922         pkt.CompletionCodes([0x0000, 0xd101])
11923         # 2222/5701, 87/01
11924         pkt = NCP(0x5701, "Open/Create File or Subdirectory", 'file', has_length=0)
11925         pkt.Request((30, 284), [
11926                 rec( 8, 1, NameSpace  ),
11927                 rec( 9, 1, OpenCreateMode ),
11928                 rec( 10, 2, SearchAttributesLow ),
11929                 rec( 12, 2, ReturnInfoMask ),
11930                 rec( 14, 2, ExtendedInfo ),
11931                 rec( 16, 4, AttributesDef32 ),
11932                 rec( 20, 2, DesiredAccessRights ),
11933                 rec( 22, 1, VolumeNumber ),
11934                 rec( 23, 4, DirectoryBase ),
11935                 rec( 27, 1, HandleFlag ),
11936                 rec( 28, 1, PathCount, var="x" ),
11937                 rec( 29, (1,255), Path, repeat="x" ),
11938         ], info_str=(Path, "Open or Create: %s", "/%s"))
11939         pkt.Reply( NO_LENGTH_CHECK, [
11940                 rec( 8, 4, FileHandle ),
11941                 rec( 12, 1, OpenCreateAction ),
11942                 rec( 13, 1, Reserved ),
11943                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
11944                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
11945                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
11946                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
11947                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
11948                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
11949                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
11950                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
11951                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
11952                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
11953                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
11954                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
11955                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
11956                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
11957                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
11958                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
11959                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
11960                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
11961                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
11962                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
11963                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
11964                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
11965                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
11966                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
11967                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
11968                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
11969                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
11970                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
11971                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
11972                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
11973                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
11974                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
11975                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
11976                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
11977                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
11978                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
11979                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
11980                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
11981                 srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ),
11982                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
11983                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
11984                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
11985                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
11986                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
11987                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
11988                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
11989                 srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
11990         ])
11991         pkt.ReqCondSizeVariable()
11992         pkt.CompletionCodes([0x0000, 0x0102, 0x7f00, 0x8001, 0x8101, 0x8401, 0x8501,
11993                              0x8701, 0x8900, 0x8d00, 0x8f00, 0x9001, 0x9400, 0x9600,
11994                              0x9804, 0x9b03, 0x9c03, 0xa500, 0xa802, 0xa901, 0xbf00, 0xfd00, 0xff16])
11995         # 2222/5702, 87/02
11996         pkt = NCP(0x5702, "Initialize Search", 'file', has_length=0)
11997         pkt.Request( (18,272), [
11998                 rec( 8, 1, NameSpace  ),
11999                 rec( 9, 1, Reserved ),
12000                 rec( 10, 1, VolumeNumber ),
12001                 rec( 11, 4, DirectoryBase ),
12002                 rec( 15, 1, HandleFlag ),
12003                 rec( 16, 1, PathCount, var="x" ),
12004                 rec( 17, (1,255), Path, repeat="x" ),
12005         ], info_str=(Path, "Set Search Pointer to: %s", "/%s"))
12006         pkt.Reply(17, [
12007                 rec( 8, 1, VolumeNumber ),
12008                 rec( 9, 4, DirectoryNumber ),
12009                 rec( 13, 4, DirectoryEntryNumber ),
12010         ])
12011         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12012                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12013                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xbf00, 0xfd00, 0xff16])
12014         # 2222/5703, 87/03
12015         pkt = NCP(0x5703, "Search for File or Subdirectory", 'file', has_length=0)
12016         pkt.Request((26, 280), [
12017                 rec( 8, 1, NameSpace  ),
12018                 rec( 9, 1, DataStream ),
12019                 rec( 10, 2, SearchAttributesLow ),
12020                 rec( 12, 2, ReturnInfoMask ),
12021                 rec( 14, 2, ExtendedInfo ),
12022                 rec( 16, 9, SearchSequence ),
12023                 rec( 25, (1,255), SearchPattern ),
12024         ], info_str=(SearchPattern, "Search for: %s", "/%s"))
12025         pkt.Reply( NO_LENGTH_CHECK, [
12026                 rec( 8, 9, SearchSequence ),
12027                 rec( 17, 1, Reserved ),
12028                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12029                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12030                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12031                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12032                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12033                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12034                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12035                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12036                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12037                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12038                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12039                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12040                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12041                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12042                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12043                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12044                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12045                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12046                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12047                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12048                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12049                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12050                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12051                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12052                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12053                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12054                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12055                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12056                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12057                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12058                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12059                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12060                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12061                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
12062                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
12063                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
12064                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
12065                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
12066                 srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ),
12067                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
12068                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
12069                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
12070                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
12071                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
12072                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
12073                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
12074                 srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
12075         ])
12076         pkt.ReqCondSizeVariable()
12077         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12078                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12079                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xbf00, 0xfd00, 0xff16])
12080         # 2222/5704, 87/04
12081         pkt = NCP(0x5704, "Rename Or Move a File or Subdirectory", 'file', has_length=0)
12082         pkt.Request((28, 536), [
12083                 rec( 8, 1, NameSpace  ),
12084                 rec( 9, 1, RenameFlag ),
12085                 rec( 10, 2, SearchAttributesLow ),
12086                 rec( 12, 1, VolumeNumber ),
12087                 rec( 13, 4, DirectoryBase ),
12088                 rec( 17, 1, HandleFlag ),
12089                 rec( 18, 1, PathCount, var="x" ),
12090                 rec( 19, 1, VolumeNumber ),
12091                 rec( 20, 4, DirectoryBase ),
12092                 rec( 24, 1, HandleFlag ),
12093                 rec( 25, 1, PathCount, var="y" ),
12094                 rec( 26, (1, 255), Path, repeat="x" ),
12095                 rec( -1, (1,255), Path, repeat="y" ),
12096         ], info_str=(Path, "Rename or Move: %s", "/%s"))
12097         pkt.Reply(8)
12098         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
12099                              0x8701, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9200, 0x9600,
12100                              0x9804, 0x9a00, 0x9b03, 0x9c03, 0xa901, 0xbf00, 0xfd00, 0xff16])
12101         # 2222/5705, 87/05
12102         pkt = NCP(0x5705, "Scan File or Subdirectory for Trustees", 'file', has_length=0)
12103         pkt.Request((24, 278), [
12104                 rec( 8, 1, NameSpace  ),
12105                 rec( 9, 1, Reserved ),
12106                 rec( 10, 2, SearchAttributesLow ),
12107                 rec( 12, 4, SequenceNumber ),
12108                 rec( 16, 1, VolumeNumber ),
12109                 rec( 17, 4, DirectoryBase ),
12110                 rec( 21, 1, HandleFlag ),
12111                 rec( 22, 1, PathCount, var="x" ),
12112                 rec( 23, (1, 255), Path, repeat="x" ),
12113         ], info_str=(Path, "Scan Trustees for: %s", "/%s"))
12114         pkt.Reply(20, [
12115                 rec( 8, 4, SequenceNumber ),
12116                 rec( 12, 2, ObjectIDCount, var="x" ),
12117                 rec( 14, 6, TrusteeStruct, repeat="x" ),
12118         ])
12119         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12120                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12121                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xbf00, 0xfd00, 0xff16])
12122         # 2222/5706, 87/06
12123         pkt = NCP(0x5706, "Obtain File or SubDirectory Information", 'file', has_length=0)
12124         pkt.Request((24,278), [
12125                 rec( 10, 1, SrcNameSpace ),
12126                 rec( 11, 1, DestNameSpace ),
12127                 rec( 12, 2, SearchAttributesLow ),
12128                 rec( 14, 2, ReturnInfoMask, LE ),
12129                 rec( 16, 2, ExtendedInfo ),
12130                 rec( 18, 1, VolumeNumber ),
12131                 rec( 19, 4, DirectoryBase ),
12132                 rec( 23, 1, HandleFlag ),
12133                 rec( 24, 1, PathCount, var="x" ),
12134                 rec( 25, (1,255), Path, repeat="x",),
12135         ], info_str=(Path, "Obtain Info for: %s", "/%s"))
12136         pkt.Reply(NO_LENGTH_CHECK, [
12137             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12138             srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12139             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12140             srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12141             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12142             srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12143             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12144             srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12145             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12146             srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12147             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12148             srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12149             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12150             srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12151             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12152             srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12153             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12154             srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12155             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12156             srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12157             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12158             srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12159             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12160             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12161             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12162             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12163             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12164             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12165             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12166             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12167             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12168             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12169             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12170             srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
12171             srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
12172             srec( DataStreamsStruct, req_cond="ncp.ret_info_mask_actual == 1" ), 
12173             srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1 && ncp.number_of_data_streams_long > 0" ),            # , repeat="x" 
12174             srec( DataStreamsStruct, req_cond="ncp.ret_info_mask_logical == 1" ), # , var="y" 
12175             srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1 && ncp.number_of_data_streams_long > 0" ),          # , repeat="y" 
12176             srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
12177             srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ),
12178             srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
12179             srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
12180             srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
12181             srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
12182             srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
12183             srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
12184             srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
12185                         srec( FileSize64bitStruct, req_cond="ncp.ext_info_64_bit_fs == 1" ),
12186             srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
12187         ])
12188         pkt.ReqCondSizeVariable()
12189         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12190                              0x8700, 0x8900, 0x8d00, 0x8f00, 0x9001, 0x9600,
12191                              0x9802, 0x9b03, 0x9c03, 0xa802, 0xa901, 0xbf00, 0xfd00, 0xff16])
12192         # 2222/5707, 87/07
12193         pkt = NCP(0x5707, "Modify File or Subdirectory DOS Information", 'file', has_length=0)
12194         pkt.Request((62,316), [
12195                 rec( 8, 1, NameSpace ),
12196                 rec( 9, 1, Reserved ),
12197                 rec( 10, 2, SearchAttributesLow ),
12198                 rec( 12, 2, ModifyDOSInfoMask ),
12199                 rec( 14, 2, Reserved2 ),
12200                 rec( 16, 2, AttributesDef16 ),
12201                 rec( 18, 1, FileMode ),
12202                 rec( 19, 1, FileExtendedAttributes ),
12203                 rec( 20, 2, CreationDate ),
12204                 rec( 22, 2, CreationTime ),
12205                 rec( 24, 4, CreatorID, BE ),
12206                 rec( 28, 2, ModifiedDate ),
12207                 rec( 30, 2, ModifiedTime ),
12208                 rec( 32, 4, ModifierID, BE ),
12209                 rec( 36, 2, ArchivedDate ),
12210                 rec( 38, 2, ArchivedTime ),
12211                 rec( 40, 4, ArchiverID, BE ),
12212                 rec( 44, 2, LastAccessedDate ),
12213                 rec( 46, 2, InheritedRightsMask ),
12214                 rec( 48, 2, InheritanceRevokeMask ),
12215                 rec( 50, 4, MaxSpace ),
12216                 rec( 54, 1, VolumeNumber ),
12217                 rec( 55, 4, DirectoryBase ),
12218                 rec( 59, 1, HandleFlag ),
12219                 rec( 60, 1, PathCount, var="x" ),
12220                 rec( 61, (1,255), Path, repeat="x" ),
12221         ], info_str=(Path, "Modify DOS Information for: %s", "/%s"))
12222         pkt.Reply(8)
12223         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
12224                              0x8701, 0x8c01, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9600,
12225                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xbf00, 0xfd00, 0xff16])
12226         # 2222/5708, 87/08
12227         pkt = NCP(0x5708, "Delete a File or Subdirectory", 'file', has_length=0)
12228         pkt.Request((20,274), [
12229                 rec( 8, 1, NameSpace ),
12230                 rec( 9, 1, Reserved ),                    
12231                 rec( 10, 2, SearchAttributesLow ),
12232                 rec( 12, 1, VolumeNumber ),
12233                 rec( 13, 4, DirectoryBase ),
12234                 rec( 17, 1, HandleFlag ),
12235                 rec( 18, 1, PathCount, var="x" ),
12236                 rec( 19, (1,255), Path, repeat="x" ),
12237         ], info_str=(Path, "Delete a File or Subdirectory: %s", "/%s"))
12238         pkt.Reply(8)
12239         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12240                              0x8701, 0x8900, 0x8a00, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9600,
12241                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xbf00, 0xfd00, 0xff16])
12242         # 2222/5709, 87/09
12243         pkt = NCP(0x5709, "Set Short Directory Handle", 'file', has_length=0)
12244         pkt.Request((20,274), [
12245                 rec( 8, 1, NameSpace ),
12246                 rec( 9, 1, DataStream ),
12247                 rec( 10, 1, DestDirHandle ),
12248                 rec( 11, 1, Reserved ),
12249                 rec( 12, 1, VolumeNumber ),
12250                 rec( 13, 4, DirectoryBase ),
12251                 rec( 17, 1, HandleFlag ),
12252                 rec( 18, 1, PathCount, var="x" ),
12253                 rec( 19, (1,255), Path, repeat="x" ),
12254         ], info_str=(Path, "Set Short Directory Handle to: %s", "/%s"))
12255         pkt.Reply(8)
12256         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12257                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12258                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xbf00, 0xfd00, 0xff16])
12259         # 2222/570A, 87/10
12260         pkt = NCP(0x570A, "Add Trustee Set to File or Subdirectory", 'file', has_length=0)
12261         pkt.Request((31,285), [
12262                 rec( 8, 1, NameSpace ),
12263                 rec( 9, 1, Reserved ),
12264                 rec( 10, 2, SearchAttributesLow ),
12265                 rec( 12, 2, AccessRightsMaskWord ),
12266                 rec( 14, 2, ObjectIDCount, var="y" ),
12267                 rec( 16, 1, VolumeNumber ),
12268                 rec( 17, 4, DirectoryBase ),
12269                 rec( 21, 1, HandleFlag ),
12270                 rec( 22, 1, PathCount, var="x" ),
12271                 rec( 23, (1,255), Path, repeat="x" ),
12272                 rec( -1, 7, TrusteeStruct, repeat="y" ),
12273         ], info_str=(Path, "Add Trustee Set to: %s", "/%s"))
12274         pkt.Reply(8)
12275         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12276                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12277                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xbf00, 0xfc01, 0xfd00, 0xff16])
12278         # 2222/570B, 87/11
12279         pkt = NCP(0x570B, "Delete Trustee Set from File or SubDirectory", 'file', has_length=0)
12280         pkt.Request((27,281), [
12281                 rec( 8, 1, NameSpace ),
12282                 rec( 9, 1, Reserved ),
12283                 rec( 10, 2, ObjectIDCount, var="y" ),
12284                 rec( 12, 1, VolumeNumber ),
12285                 rec( 13, 4, DirectoryBase ),
12286                 rec( 17, 1, HandleFlag ),
12287                 rec( 18, 1, PathCount, var="x" ),
12288                 rec( 19, (1,255), Path, repeat="x" ),
12289                 rec( -1, 7, TrusteeStruct, repeat="y" ),
12290         ], info_str=(Path, "Delete Trustee Set from: %s", "/%s"))
12291         pkt.Reply(8)
12292         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12293                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12294                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12295         # 2222/570C, 87/12
12296         pkt = NCP(0x570C, "Allocate Short Directory Handle", 'file', has_length=0)
12297         pkt.Request((20,274), [
12298                 rec( 8, 1, NameSpace ),
12299                 rec( 9, 1, Reserved ),
12300                 rec( 10, 2, AllocateMode ),
12301                 rec( 12, 1, VolumeNumber ),
12302                 rec( 13, 4, DirectoryBase ),
12303                 rec( 17, 1, HandleFlag ),
12304                 rec( 18, 1, PathCount, var="x" ),
12305                 rec( 19, (1,255), Path, repeat="x" ),
12306         ], info_str=(Path, "Allocate Short Directory Handle to: %s", "/%s"))
12307         pkt.Reply(NO_LENGTH_CHECK, [
12308         srec( ReplyLevel2Struct, req_cond="ncp.alloc_reply_lvl2 == TRUE" ),
12309                 srec( ReplyLevel1Struct, req_cond="ncp.alloc_reply_lvl2 == FALSE" ),
12310         ])
12311         pkt.ReqCondSizeVariable()
12312         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12313                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12314                              0x9804, 0x9b03, 0x9c03, 0x9d00, 0xa901, 0xbf00, 0xfd00, 0xff16])
12315         # 2222/5710, 87/16
12316         pkt = NCP(0x5710, "Scan Salvageable Files", 'file', has_length=0)
12317         pkt.Request((26,280), [
12318                 rec( 8, 1, NameSpace ),
12319                 rec( 9, 1, DataStream ),
12320                 rec( 10, 2, ReturnInfoMask ),
12321                 rec( 12, 2, ExtendedInfo ),
12322                 rec( 14, 4, SequenceNumber ),
12323                 rec( 18, 1, VolumeNumber ),
12324                 rec( 19, 4, DirectoryBase ),
12325                 rec( 23, 1, HandleFlag ),
12326                 rec( 24, 1, PathCount, var="x" ),
12327                 rec( 25, (1,255), Path, repeat="x" ),
12328         ], info_str=(Path, "Scan for Deleted Files in: %s", "/%s"))
12329         pkt.Reply(NO_LENGTH_CHECK, [
12330                 rec( 8, 4, SequenceNumber ),
12331                 rec( 12, 2, DeletedTime ),
12332                 rec( 14, 2, DeletedDate ),
12333                 rec( 16, 4, DeletedID, BE ),
12334                 rec( 20, 4, VolumeID ),
12335                 rec( 24, 4, DirectoryBase ),
12336                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12337                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12338                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12339                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12340                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12341                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12342                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12343                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12344                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12345                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12346                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12347                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12348                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12349                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12350                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12351                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12352                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12353                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12354                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12355                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12356                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12357                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12358                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12359                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12360                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12361                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12362                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12363                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12364                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12365                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12366                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12367                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12368                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12369                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12370                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12371         ])
12372         pkt.ReqCondSizeVariable()
12373         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12374                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12375                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12376         # 2222/5711, 87/17
12377         pkt = NCP(0x5711, "Recover Salvageable File", 'file', has_length=0)
12378         pkt.Request((23,277), [
12379                 rec( 8, 1, NameSpace ),
12380                 rec( 9, 1, Reserved ),
12381                 rec( 10, 4, SequenceNumber ),
12382                 rec( 14, 4, VolumeID ),
12383                 rec( 18, 4, DirectoryBase ),
12384                 rec( 22, (1,255), FileName ),
12385         ], info_str=(FileName, "Recover Deleted File: %s", ", %s"))
12386         pkt.Reply(8)
12387         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12388                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12389                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12390         # 2222/5712, 87/18
12391         pkt = NCP(0x5712, "Purge Salvageable Files", 'file', has_length=0)
12392         pkt.Request(22, [
12393                 rec( 8, 1, NameSpace ),
12394                 rec( 9, 1, Reserved ),
12395                 rec( 10, 4, SequenceNumber ),
12396                 rec( 14, 4, VolumeID ),
12397                 rec( 18, 4, DirectoryBase ),
12398         ])
12399         pkt.Reply(8)
12400         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12401                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12402                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12403         # 2222/5713, 87/19
12404         pkt = NCP(0x5713, "Get Name Space Information", 'file', has_length=0)
12405         pkt.Request(18, [
12406                 rec( 8, 1, SrcNameSpace ),
12407                 rec( 9, 1, DestNameSpace ),
12408                 rec( 10, 1, Reserved ),
12409                 rec( 11, 1, VolumeNumber ),
12410                 rec( 12, 4, DirectoryBase ),
12411                 rec( 16, 2, NamesSpaceInfoMask ),
12412         ])
12413         pkt.Reply(NO_LENGTH_CHECK, [
12414             srec( FileNameStruct, req_cond="ncp.ns_info_mask_modify == TRUE" ),
12415             srec( FileAttributesStruct, req_cond="ncp.ns_info_mask_fatt == TRUE" ),
12416             srec( CreationDateStruct, req_cond="ncp.ns_info_mask_cdate == TRUE" ),
12417             srec( CreationTimeStruct, req_cond="ncp.ns_info_mask_ctime == TRUE" ),
12418             srec( OwnerIDStruct, req_cond="ncp.ns_info_mask_owner == TRUE" ),
12419             srec( ArchiveDateStruct, req_cond="ncp.ns_info_mask_adate == TRUE" ),
12420             srec( ArchiveTimeStruct, req_cond="ncp.ns_info_mask_atime == TRUE" ),
12421             srec( ArchiveIdStruct, req_cond="ncp.ns_info_mask_aid == TRUE" ),
12422             srec( UpdateDateStruct, req_cond="ncp.ns_info_mask_udate == TRUE" ),
12423             srec( UpdateTimeStruct, req_cond="ncp.ns_info_mask_utime == TRUE" ),
12424             srec( UpdateIDStruct, req_cond="ncp.ns_info_mask_uid == TRUE" ),
12425             srec( LastAccessStruct, req_cond="ncp.ns_info_mask_acc_date == TRUE" ),
12426             srec( RightsInfoStruct, req_cond="ncp.ns_info_mask_max_acc_mask == TRUE" ),
12427         ])
12428         pkt.ReqCondSizeVariable()
12429         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12430                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12431                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12432         # 2222/5714, 87/20
12433         pkt = NCP(0x5714, "Search for File or Subdirectory Set", 'file', has_length=0)
12434         pkt.Request((28, 282), [
12435                 rec( 8, 1, NameSpace  ),
12436                 rec( 9, 1, DataStream ),
12437                 rec( 10, 2, SearchAttributesLow ),
12438                 rec( 12, 2, ReturnInfoMask ),
12439                 rec( 14, 2, ExtendedInfo ),
12440                 rec( 16, 2, ReturnInfoCount ),
12441                 rec( 18, 9, SearchSequence ),
12442                 rec( 27, (1,255), SearchPattern ),
12443         ])
12444         pkt.Reply(NO_LENGTH_CHECK, [
12445                 rec( 8, 9, SearchSequence ),
12446                 rec( 17, 1, MoreFlag ),
12447                 rec( 18, 2, InfoCount ),
12448             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12449             srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12450             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12451             srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12452             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12453             srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12454             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12455             srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12456             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12457             srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12458             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12459             srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12460             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12461             srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12462             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12463             srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12464             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12465             srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12466             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12467             srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12468             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12469             srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12470             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12471             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12472             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12473             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12474             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12475             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12476             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12477             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12478             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12479             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12480             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12481             srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
12482             srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
12483             srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
12484             srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
12485             srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
12486             srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ),
12487             srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
12488             srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
12489             srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
12490             srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
12491             srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
12492             srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
12493             srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
12494             srec( FileSize64bitStruct, req_cond="ncp.ext_info_64_bit_fs == 1" ),
12495             srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
12496         ])
12497         pkt.ReqCondSizeVariable()
12498         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12499                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12500                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xbf00, 0xfd00, 0xff16])
12501         # 2222/5715, 87/21
12502         pkt = NCP(0x5715, "Get Path String from Short Directory Handle", 'file', has_length=0)
12503         pkt.Request(10, [
12504                 rec( 8, 1, NameSpace ),
12505                 rec( 9, 1, DirHandle ),
12506         ])
12507         pkt.Reply((9,263), [
12508                 rec( 8, (1,255), Path ),
12509         ])
12510         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12511                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12512                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
12513         # 2222/5716, 87/22
12514         pkt = NCP(0x5716, "Generate Directory Base and Volume Number", 'file', has_length=0)
12515         pkt.Request((20,274), [
12516                 rec( 8, 1, SrcNameSpace ),
12517                 rec( 9, 1, DestNameSpace ),
12518                 rec( 10, 2, dstNSIndicator ),
12519                 rec( 12, 1, VolumeNumber ),
12520                 rec( 13, 4, DirectoryBase ),
12521                 rec( 17, 1, HandleFlag ),
12522                 rec( 18, 1, PathCount, var="x" ),
12523                 rec( 19, (1,255), Path, repeat="x" ),
12524         ], info_str=(Path, "Get Volume and Directory Base from: %s", "/%s"))
12525         pkt.Reply(17, [
12526                 rec( 8, 4, DirectoryBase ),
12527                 rec( 12, 4, DOSDirectoryBase ),
12528                 rec( 16, 1, VolumeNumber ),
12529         ])
12530         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12531                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12532                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12533         # 2222/5717, 87/23
12534         pkt = NCP(0x5717, "Query Name Space Information Format", 'file', has_length=0)
12535         pkt.Request(10, [
12536                 rec( 8, 1, NameSpace ),
12537                 rec( 9, 1, VolumeNumber ),
12538         ])
12539         pkt.Reply(58, [
12540                 rec( 8, 4, FixedBitMask ),
12541                 rec( 12, 4, VariableBitMask ),
12542                 rec( 16, 4, HugeBitMask ),
12543                 rec( 20, 2, FixedBitsDefined ),
12544                 rec( 22, 2, VariableBitsDefined ),
12545                 rec( 24, 2, HugeBitsDefined ),
12546                 rec( 26, 32, FieldsLenTable ),
12547         ])
12548         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12549                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12550                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12551         # 2222/5718, 87/24
12552         pkt = NCP(0x5718, "Get Name Spaces Loaded List from Volume Number", 'file', has_length=0)
12553         pkt.Request(11, [
12554                 rec( 8, 2, Reserved2 ),
12555                 rec( 10, 1, VolumeNumber ),
12556         ], info_str=(VolumeNumber, "Get Name Spaces Loaded List from Vol: %d", "/%d"))
12557         pkt.Reply(11, [
12558                 rec( 8, 2, NumberOfNSLoaded, var="x" ),
12559                 rec( 10, 1, NameSpace, repeat="x" ),
12560         ])
12561         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12562                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12563                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12564         # 2222/5719, 87/25
12565         pkt = NCP(0x5719, "Set Name Space Information", 'file', has_length=0)
12566         pkt.Request(531, [
12567                 rec( 8, 1, SrcNameSpace ),
12568                 rec( 9, 1, DestNameSpace ),
12569                 rec( 10, 1, VolumeNumber ),
12570                 rec( 11, 4, DirectoryBase ),
12571                 rec( 15, 2, NamesSpaceInfoMask ),
12572                 rec( 17, 2, Reserved2 ),
12573                 rec( 19, 512, NSSpecificInfo ),
12574         ])
12575         pkt.Reply(8)
12576         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12577                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12578                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12579                              0xff16])
12580         # 2222/571A, 87/26
12581         pkt = NCP(0x571A, "Get Huge Name Space Information", 'file', has_length=0)
12582         pkt.Request(34, [
12583                 rec( 8, 1, NameSpace ),
12584                 rec( 9, 1, VolumeNumber ),
12585                 rec( 10, 4, DirectoryBase ),
12586                 rec( 14, 4, HugeBitMask ),
12587                 rec( 18, 16, HugeStateInfo ),
12588         ])
12589         pkt.Reply((25,279), [
12590                 rec( 8, 16, NextHugeStateInfo ),
12591                 rec( 24, (1,255), HugeData ),
12592         ])
12593         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12594                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12595                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12596                              0xff16])
12597         # 2222/571B, 87/27
12598         pkt = NCP(0x571B, "Set Huge Name Space Information", 'file', has_length=0)
12599         pkt.Request((35,289), [
12600                 rec( 8, 1, NameSpace ),
12601                 rec( 9, 1, VolumeNumber ),
12602                 rec( 10, 4, DirectoryBase ),
12603                 rec( 14, 4, HugeBitMask ),
12604                 rec( 18, 16, HugeStateInfo ),
12605                 rec( 34, (1,255), HugeData ),
12606         ])
12607         pkt.Reply(28, [
12608                 rec( 8, 16, NextHugeStateInfo ),
12609                 rec( 24, 4, HugeDataUsed ),
12610         ])
12611         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12612                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12613                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12614                              0xff16])
12615         # 2222/571C, 87/28
12616         pkt = NCP(0x571C, "Get Full Path String", 'file', has_length=0)
12617         pkt.Request((28,282), [
12618                 rec( 8, 1, SrcNameSpace ),
12619                 rec( 9, 1, DestNameSpace ),
12620                 rec( 10, 2, PathCookieFlags ),
12621                 rec( 12, 4, Cookie1 ),
12622                 rec( 16, 4, Cookie2 ),
12623                 rec( 20, 1, VolumeNumber ),
12624                 rec( 21, 4, DirectoryBase ),
12625                 rec( 25, 1, HandleFlag ),
12626                 rec( 26, 1, PathCount, var="x" ),
12627                 rec( 27, (1,255), Path, repeat="x" ),
12628         ], info_str=(Path, "Get Full Path from: %s", "/%s"))
12629         pkt.Reply((23,277), [
12630                 rec( 8, 2, PathCookieFlags ),
12631                 rec( 10, 4, Cookie1 ),
12632                 rec( 14, 4, Cookie2 ),
12633                 rec( 18, 2, PathComponentSize ),
12634                 rec( 20, 2, PathComponentCount, var='x' ),
12635                 rec( 22, (1,255), Path, repeat='x' ),
12636         ])
12637         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12638                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12639                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12640                              0xff16])
12641         # 2222/571D, 87/29
12642         pkt = NCP(0x571D, "Get Effective Directory Rights", 'file', has_length=0)
12643         pkt.Request((24, 278), [
12644                 rec( 8, 1, NameSpace  ),
12645                 rec( 9, 1, DestNameSpace ),
12646                 rec( 10, 2, SearchAttributesLow ),
12647                 rec( 12, 2, ReturnInfoMask ),
12648                 rec( 14, 2, ExtendedInfo ),
12649                 rec( 16, 1, VolumeNumber ),
12650                 rec( 17, 4, DirectoryBase ),
12651                 rec( 21, 1, HandleFlag ),
12652                 rec( 22, 1, PathCount, var="x" ),
12653                 rec( 23, (1,255), Path, repeat="x" ),
12654         ], info_str=(Path, "Get Effective Rights for: %s", "/%s"))
12655         pkt.Reply(NO_LENGTH_CHECK, [
12656                 rec( 8, 2, EffectiveRights ),
12657                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12658                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12659                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12660                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12661                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12662                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12663                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12664                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12665                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12666                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12667                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12668                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12669                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12670                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12671                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12672                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12673                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12674                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12675                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12676                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12677                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12678                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12679                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12680                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12681                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12682                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12683                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12684                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12685                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12686                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12687                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12688                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12689                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12690                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12691                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12692         ])
12693         pkt.ReqCondSizeVariable()
12694         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12695                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12696                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12697         # 2222/571E, 87/30
12698         pkt = NCP(0x571E, "Open/Create File or Subdirectory", 'file', has_length=0)
12699         pkt.Request((34, 288), [
12700                 rec( 8, 1, NameSpace  ),
12701                 rec( 9, 1, DataStream ),
12702                 rec( 10, 1, OpenCreateMode ),
12703                 rec( 11, 1, Reserved ),
12704                 rec( 12, 2, SearchAttributesLow ),
12705                 rec( 14, 2, Reserved2 ),
12706                 rec( 16, 2, ReturnInfoMask ),
12707                 rec( 18, 2, ExtendedInfo ),
12708                 rec( 20, 4, AttributesDef32 ),
12709                 rec( 24, 2, DesiredAccessRights ),
12710                 rec( 26, 1, VolumeNumber ),
12711                 rec( 27, 4, DirectoryBase ),
12712                 rec( 31, 1, HandleFlag ),
12713                 rec( 32, 1, PathCount, var="x" ),
12714                 rec( 33, (1,255), Path, repeat="x" ),
12715         ], info_str=(Path, "Open or Create File: %s", "/%s"))
12716         pkt.Reply(NO_LENGTH_CHECK, [
12717                 rec( 8, 4, FileHandle, BE ),
12718                 rec( 12, 1, OpenCreateAction ),
12719                 rec( 13, 1, Reserved ),
12720                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12721                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12722                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12723                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12724                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12725                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12726                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12727                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12728                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12729                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12730                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12731                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12732                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12733                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12734                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12735                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12736                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12737                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12738                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12739                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12740                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12741                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12742                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12743                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12744                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12745                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12746                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12747                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12748                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12749                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12750                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12751                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12752                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12753                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12754                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12755         ])
12756         pkt.ReqCondSizeVariable()
12757         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
12758                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12759                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12760         # 2222/571F, 87/31
12761         pkt = NCP(0x571F, "Get File Information", 'file', has_length=0)
12762         pkt.Request(15, [
12763                 rec( 8, 6, FileHandle  ),
12764                 rec( 14, 1, HandleInfoLevel ),
12765         ], info_str=(FileHandle, "Get File Information - 0x%s", ", %s"))
12766         pkt.Reply(NO_LENGTH_CHECK, [
12767                 rec( 8, 4, VolumeNumberLong ),
12768                 rec( 12, 4, DirectoryBase ),
12769                 srec(HandleInfoLevel0, req_cond="ncp.handle_info_level==0x00" ),
12770                 srec(HandleInfoLevel1, req_cond="ncp.handle_info_level==0x01" ),
12771                 srec(HandleInfoLevel2, req_cond="ncp.handle_info_level==0x02" ),
12772                 srec(HandleInfoLevel3, req_cond="ncp.handle_info_level==0x03" ),
12773                 srec(HandleInfoLevel4, req_cond="ncp.handle_info_level==0x04" ),
12774                 srec(HandleInfoLevel5, req_cond="ncp.handle_info_level==0x05" ),
12775         ])
12776         pkt.ReqCondSizeVariable()
12777         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12778                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12779                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12780         # 2222/5720, 87/32
12781         pkt = NCP(0x5720, "Open/Create File or Subdirectory with Callback", 'file', has_length=0)
12782         pkt.Request((30, 284), [
12783                 rec( 8, 1, NameSpace  ),
12784                 rec( 9, 1, OpenCreateMode ),
12785                 rec( 10, 2, SearchAttributesLow ),
12786                 rec( 12, 2, ReturnInfoMask ),
12787                 rec( 14, 2, ExtendedInfo ),
12788                 rec( 16, 4, AttributesDef32 ),
12789                 rec( 20, 2, DesiredAccessRights ),
12790                 rec( 22, 1, VolumeNumber ),
12791                 rec( 23, 4, DirectoryBase ),
12792                 rec( 27, 1, HandleFlag ),
12793                 rec( 28, 1, PathCount, var="x" ),
12794                 rec( 29, (1,255), Path, repeat="x" ),
12795         ], info_str=(Path, "Open or Create with Op-Lock: %s", "/%s"))
12796         pkt.Reply( NO_LENGTH_CHECK, [
12797                 rec( 8, 4, FileHandle, BE ),
12798                 rec( 12, 1, OpenCreateAction ),
12799                 rec( 13, 1, OCRetFlags ),
12800                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12801                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12802                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12803                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12804                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12805                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12806                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12807                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12808                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12809                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12810                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12811                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12812                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12813                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12814                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12815                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12816                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12817                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12818                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12819                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12820                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12821                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12822                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12823                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12824                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12825                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12826                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12827                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12828                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12829                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12830                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12831                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12832                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12833                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
12834                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
12835                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
12836                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
12837                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
12838                 srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ),
12839                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
12840                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
12841                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
12842                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
12843                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
12844                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
12845                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
12846                 srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
12847         ])
12848         pkt.ReqCondSizeVariable()
12849         pkt.CompletionCodes([0x0000, 0x0102, 0x7f00, 0x8000, 0x8101, 0x8401, 0x8501,
12850                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12851                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12852         # 2222/5721, 87/33
12853         pkt = NCP(0x5721, "Open/Create File or Subdirectory II with Callback", 'file', has_length=0)
12854         pkt.Request((34, 288), [
12855                 rec( 8, 1, NameSpace  ),
12856                 rec( 9, 1, DataStream ),
12857                 rec( 10, 1, OpenCreateMode ),
12858                 rec( 11, 1, Reserved ),
12859                 rec( 12, 2, SearchAttributesLow ),
12860                 rec( 14, 2, Reserved2 ),
12861                 rec( 16, 2, ReturnInfoMask ),
12862                 rec( 18, 2, ExtendedInfo ),
12863                 rec( 20, 4, AttributesDef32 ),
12864                 rec( 24, 2, DesiredAccessRights ),
12865                 rec( 26, 1, VolumeNumber ),
12866                 rec( 27, 4, DirectoryBase ),
12867                 rec( 31, 1, HandleFlag ),
12868                 rec( 32, 1, PathCount, var="x" ),
12869                 rec( 33, (1,255), Path, repeat="x" ),
12870         ], info_str=(FilePath, "Open or Create II with Op-Lock: %s", "/%s"))
12871         pkt.Reply((91,345), [
12872                 rec( 8, 4, FileHandle ),
12873                 rec( 12, 1, OpenCreateAction ),
12874                 rec( 13, 1, OCRetFlags ),
12875                 rec( 14, 4, DataStreamSpaceAlloc ),
12876                 rec( 18, 6, AttributesStruct ),
12877                 rec( 24, 4, DataStreamSize ),
12878                 rec( 28, 4, TtlDSDskSpaceAlloc ),
12879                 rec( 32, 2, NumberOfDataStreams ),
12880                 rec( 34, 2, CreationTime ),
12881                 rec( 36, 2, CreationDate ),
12882                 rec( 38, 4, CreatorID, BE ),
12883                 rec( 42, 2, ModifiedTime ),
12884                 rec( 44, 2, ModifiedDate ),
12885                 rec( 46, 4, ModifierID, BE ),
12886                 rec( 50, 2, LastAccessedDate ),
12887                 rec( 52, 2, ArchivedTime ),
12888                 rec( 54, 2, ArchivedDate ),
12889                 rec( 56, 4, ArchiverID, BE ),
12890                 rec( 60, 2, InheritedRightsMask ),
12891                 rec( 62, 4, DirectoryEntryNumber ),
12892                 rec( 66, 4, DOSDirectoryEntryNumber ),
12893                 rec( 70, 4, VolumeNumberLong ),
12894                 rec( 74, 4, EADataSize ),
12895                 rec( 78, 4, EACount ),
12896                 rec( 82, 4, EAKeySize ),
12897                 rec( 86, 1, CreatorNameSpaceNumber ),
12898                 rec( 87, 3, Reserved3 ),
12899                 rec( 90, (1,255), FileName ),
12900         ])
12901         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
12902                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12903                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12904         # 2222/5722, 87/34
12905         pkt = NCP(0x5722, "Open CallBack Control (Op-Lock)", 'file', has_length=0)
12906         pkt.Request(13, [
12907                 rec( 10, 4, CCFileHandle, BE ),
12908                 rec( 14, 1, CCFunction ),
12909         ])
12910         pkt.Reply(8)
12911         pkt.CompletionCodes([0x0000, 0x8800, 0xff16])
12912         # 2222/5723, 87/35
12913         pkt = NCP(0x5723, "Modify DOS Attributes on a File or Subdirectory", 'file', has_length=0)
12914         pkt.Request((28, 282), [
12915                 rec( 8, 1, NameSpace  ),
12916                 rec( 9, 1, Flags ),
12917                 rec( 10, 2, SearchAttributesLow ),
12918                 rec( 12, 2, ReturnInfoMask ),
12919                 rec( 14, 2, ExtendedInfo ),
12920                 rec( 16, 4, AttributesDef32 ),
12921                 rec( 20, 1, VolumeNumber ),
12922                 rec( 21, 4, DirectoryBase ),
12923                 rec( 25, 1, HandleFlag ),
12924                 rec( 26, 1, PathCount, var="x" ),
12925                 rec( 27, (1,255), Path, repeat="x" ),
12926         ], info_str=(Path, "Modify DOS Attributes for: %s", "/%s"))
12927         pkt.Reply(24, [
12928                 rec( 8, 4, ItemsChecked ),
12929                 rec( 12, 4, ItemsChanged ),
12930                 rec( 16, 4, AttributeValidFlag ),
12931                 rec( 20, 4, AttributesDef32 ),
12932         ])
12933         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
12934                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12935                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12936         # 2222/5724, 87/36
12937         pkt = NCP(0x5724, "Log File", 'sync', has_length=0)
12938         pkt.Request((28, 282), [
12939                 rec( 8, 1, NameSpace  ),
12940                 rec( 9, 1, Reserved ),
12941                 rec( 10, 2, Reserved2 ),
12942                 rec( 12, 1, LogFileFlagLow ),
12943                 rec( 13, 1, LogFileFlagHigh ),
12944                 rec( 14, 2, Reserved2 ),
12945                 rec( 16, 4, WaitTime ),
12946                 rec( 20, 1, VolumeNumber ),
12947                 rec( 21, 4, DirectoryBase ),
12948                 rec( 25, 1, HandleFlag ),
12949                 rec( 26, 1, PathCount, var="x" ),
12950                 rec( 27, (1,255), Path, repeat="x" ),
12951         ], info_str=(Path, "Lock File: %s", "/%s"))
12952         pkt.Reply(8)
12953         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12954                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12955                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12956         # 2222/5725, 87/37
12957         pkt = NCP(0x5725, "Release File", 'sync', has_length=0)
12958         pkt.Request((20, 274), [
12959                 rec( 8, 1, NameSpace  ),
12960                 rec( 9, 1, Reserved ),
12961                 rec( 10, 2, Reserved2 ),
12962                 rec( 12, 1, VolumeNumber ),
12963                 rec( 13, 4, DirectoryBase ),
12964                 rec( 17, 1, HandleFlag ),
12965                 rec( 18, 1, PathCount, var="x" ),
12966                 rec( 19, (1,255), Path, repeat="x" ),
12967         ], info_str=(Path, "Release Lock on: %s", "/%s"))
12968         pkt.Reply(8)
12969         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12970                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12971                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12972         # 2222/5726, 87/38
12973         pkt = NCP(0x5726, "Clear File", 'sync', has_length=0)
12974         pkt.Request((20, 274), [
12975                 rec( 8, 1, NameSpace  ),
12976                 rec( 9, 1, Reserved ),
12977                 rec( 10, 2, Reserved2 ),
12978                 rec( 12, 1, VolumeNumber ),
12979                 rec( 13, 4, DirectoryBase ),
12980                 rec( 17, 1, HandleFlag ),
12981                 rec( 18, 1, PathCount, var="x" ),
12982                 rec( 19, (1,255), Path, repeat="x" ),
12983         ], info_str=(Path, "Clear File: %s", "/%s"))
12984         pkt.Reply(8)
12985         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12986                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12987                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12988         # 2222/5727, 87/39
12989         pkt = NCP(0x5727, "Get Directory Disk Space Restriction", 'file', has_length=0)
12990         pkt.Request((19, 273), [
12991                 rec( 8, 1, NameSpace  ),
12992                 rec( 9, 2, Reserved2 ),
12993                 rec( 11, 1, VolumeNumber ),
12994                 rec( 12, 4, DirectoryBase ),
12995                 rec( 16, 1, HandleFlag ),
12996                 rec( 17, 1, PathCount, var="x" ),
12997                 rec( 18, (1,255), Path, repeat="x" ),
12998         ], info_str=(Path, "Get Disk Space Restriction for: %s", "/%s"))
12999         pkt.Reply(18, [
13000                 rec( 8, 1, NumberOfEntries, var="x" ),
13001                 rec( 9, 9, SpaceStruct, repeat="x" ),
13002         ])
13003         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13004                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13005                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
13006                              0xff16])
13007         # 2222/5728, 87/40
13008         pkt = NCP(0x5728, "Search for File or Subdirectory Set (Extended Errors)", 'file', has_length=0)
13009         pkt.Request((28, 282), [
13010                 rec( 8, 1, NameSpace  ),
13011                 rec( 9, 1, DataStream ),
13012                 rec( 10, 2, SearchAttributesLow ),
13013                 rec( 12, 2, ReturnInfoMask ),
13014                 rec( 14, 2, ExtendedInfo ),
13015                 rec( 16, 2, ReturnInfoCount ),
13016                 rec( 18, 9, SearchSequence ),
13017                 rec( 27, (1,255), SearchPattern ),
13018         ], info_str=(SearchPattern, "Search for: %s", ", %s"))
13019         pkt.Reply(NO_LENGTH_CHECK, [
13020                 rec( 8, 9, SearchSequence ),
13021                 rec( 17, 1, MoreFlag ),
13022                 rec( 18, 2, InfoCount ),
13023                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
13024                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
13025                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
13026                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
13027                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
13028                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
13029                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
13030                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
13031                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
13032                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
13033                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
13034                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
13035                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
13036                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
13037                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
13038                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
13039                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
13040                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
13041                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
13042                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
13043                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
13044                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
13045                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
13046                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
13047                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
13048                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
13049                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
13050                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
13051                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
13052                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
13053                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
13054                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
13055                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
13056                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
13057                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
13058         ])
13059         pkt.ReqCondSizeVariable()
13060         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13061                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13062                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
13063         # 2222/5729, 87/41
13064         pkt = NCP(0x5729, "Scan Salvageable Files", 'file', has_length=0)
13065         pkt.Request((24,278), [
13066                 rec( 8, 1, NameSpace ),
13067                 rec( 9, 1, Reserved ),
13068                 rec( 10, 2, CtrlFlags, LE ),
13069                 rec( 12, 4, SequenceNumber ),
13070                 rec( 16, 1, VolumeNumber ),
13071                 rec( 17, 4, DirectoryBase ),
13072                 rec( 21, 1, HandleFlag ),
13073                 rec( 22, 1, PathCount, var="x" ),
13074                 rec( 23, (1,255), Path, repeat="x" ),
13075         ], info_str=(Path, "Scan Deleted Files: %s", "/%s"))
13076         pkt.Reply(NO_LENGTH_CHECK, [
13077                 rec( 8, 4, SequenceNumber ),
13078                 rec( 12, 4, DirectoryBase ),
13079                 rec( 16, 4, ScanItems, var="x" ),
13080                 srec(ScanInfoFileName, req_cond="ncp.ctrl_flags==0x0001", repeat="x" ),
13081                 srec(ScanInfoFileNoName, req_cond="ncp.ctrl_flags==0x0000", repeat="x" ),
13082         ])
13083         pkt.ReqCondSizeVariable()
13084         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13085                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13086                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
13087         # 2222/572A, 87/42
13088         pkt = NCP(0x572A, "Purge Salvageable File List", 'file', has_length=0)
13089         pkt.Request(28, [
13090                 rec( 8, 1, NameSpace ),
13091                 rec( 9, 1, Reserved ),
13092                 rec( 10, 2, PurgeFlags ),
13093                 rec( 12, 4, VolumeNumberLong ),
13094                 rec( 16, 4, DirectoryBase ),
13095                 rec( 20, 4, PurgeCount, var="x" ),
13096                 rec( 24, 4, PurgeList, repeat="x" ),
13097         ])
13098         pkt.Reply(16, [
13099                 rec( 8, 4, PurgeCount, var="x" ),
13100                 rec( 12, 4, PurgeCcode, repeat="x" ),
13101         ])
13102         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13103                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13104                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
13105         # 2222/572B, 87/43
13106         pkt = NCP(0x572B, "Revoke File Handle Rights", 'file', has_length=0)
13107         pkt.Request(17, [
13108                 rec( 8, 3, Reserved3 ),
13109                 rec( 11, 1, RevQueryFlag ),
13110                 rec( 12, 4, FileHandle ),
13111                 rec( 16, 1, RemoveOpenRights ),
13112         ])
13113         pkt.Reply(13, [
13114                 rec( 8, 4, FileHandle ),
13115                 rec( 12, 1, OpenRights ),
13116         ])
13117         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13118                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13119                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
13120         # 2222/572C, 87/44
13121         pkt = NCP(0x572C, "Update File Handle Rights", 'file', has_length=0)
13122         pkt.Request(24, [
13123                 rec( 8, 2, Reserved2 ),
13124                 rec( 10, 1, VolumeNumber ),
13125                 rec( 11, 1, NameSpace ),
13126                 rec( 12, 4, DirectoryNumber ),
13127                 rec( 16, 2, AccessRightsMaskWord ),
13128                 rec( 18, 2, NewAccessRights ),
13129                 rec( 20, 4, FileHandle, BE ),
13130         ])
13131         pkt.Reply(16, [
13132                 rec( 8, 4, FileHandle, BE ),
13133                 rec( 12, 4, EffectiveRights ),
13134         ])
13135         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13136                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13137                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
13138         # 2222/5740, 87/64
13139         pkt = NCP(0x5740, "Read from File", 'file', has_length=0)
13140         pkt.Request(22, [
13141         rec( 8, 4, FileHandle, BE ),
13142         rec( 12, 8, StartOffset64bit, BE ),
13143         rec( 20, 2, NumBytes, BE ),
13144     ])
13145         pkt.Reply(10, [
13146         rec( 8, 2, NumBytes, BE),
13147     ])
13148         pkt.CompletionCodes([0x0000, 0x8300, 0x8800, 0x9300, 0x9500, 0xa201, 0xfd00, 0xff1b])
13149         # 2222/5741, 87/65
13150         pkt = NCP(0x5741, "Write to File", 'file', has_length=0)
13151         pkt.Request(22, [
13152         rec( 8, 4, FileHandle, BE ),
13153         rec( 12, 8, StartOffset64bit, BE ),
13154         rec( 20, 2, NumBytes, BE ),
13155     ])
13156         pkt.Reply(8)
13157         pkt.CompletionCodes([0x0000, 0x0102, 0x8300, 0x8800, 0x9400, 0x9500, 0xa201, 0xfd00, 0xff1b])
13158         # 2222/5742, 87/66
13159         pkt = NCP(0x5742, "Get Current Size of File", 'file', has_length=0)
13160         pkt.Request(12, [
13161         rec( 8, 4, FileHandle, BE ),
13162     ])
13163         pkt.Reply(16, [
13164         rec( 8, 8, FileSize64bit),
13165     ])
13166         pkt.CompletionCodes([0x0000, 0x7f00, 0x8800, 0x9600, 0xfd02, 0xff01])
13167         # 2222/5743, 87/67
13168         pkt = NCP(0x5743, "Log Physical Record", 'file', has_length=0)
13169         pkt.Request(36, [
13170         rec( 8, 4, LockFlag, BE ),
13171         rec(12, 4, FileHandle, BE ),
13172         rec(16, 8, StartOffset64bit, BE ),
13173         rec(24, 8, Length64bit, BE ),
13174         rec(32, 4, LockTimeout, BE),
13175     ])
13176         pkt.Reply(8)
13177         pkt.CompletionCodes([0x0000, 0x7f00, 0x8800, 0x9600, 0xfb08, 0xfd02, 0xff01])
13178         # 2222/5744, 87/68
13179         pkt = NCP(0x5744, "Release Physical Record", 'file', has_length=0)
13180         pkt.Request(28, [
13181         rec(8, 4, FileHandle, BE ),
13182         rec(12, 8, StartOffset64bit, BE ),
13183         rec(20, 8, Length64bit, BE ),
13184     ])
13185         pkt.Reply(8)
13186         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13187                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13188                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff1a])
13189         # 2222/5745, 87/69
13190         pkt = NCP(0x5745, "Clear Physical Record", 'file', has_length=0)
13191         pkt.Request(28, [
13192         rec(8, 4, FileHandle, BE ),
13193         rec(12, 8, StartOffset64bit, BE ),
13194         rec(20, 8, Length64bit, BE ),
13195     ])
13196         pkt.Reply(8)
13197         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13198                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13199                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff1a])
13200         # 2222/5801, 8801
13201         pkt = NCP(0x5801, "Query Volume Audit Status", "auditing", has_length=0)
13202         pkt.Request(12, [
13203                 rec( 8, 4, ConnectionNumber ),
13204         ])
13205         pkt.Reply(40, [
13206                 rec(8, 32, NWAuditStatus ),
13207         ])
13208         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13209                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13210                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13211         # 2222/5802, 8802
13212         pkt = NCP(0x5802, "Add User Audit Property", "auditing", has_length=0)
13213         pkt.Request(25, [
13214                 rec(8, 4, AuditIDType ),
13215                 rec(12, 4, AuditID ),
13216                 rec(16, 4, AuditHandle ),
13217                 rec(20, 4, ObjectID ),
13218                 rec(24, 1, AuditFlag ),
13219         ])
13220         pkt.Reply(8)
13221         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13222                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13223                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13224         # 2222/5803, 8803
13225         pkt = NCP(0x5803, "Add Auditor Access", "auditing", has_length=0)
13226         pkt.Request(8)
13227         pkt.Reply(8)
13228         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13229                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13230                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xde00, 0xfd00, 0xff16])
13231         # 2222/5804, 8804
13232         pkt = NCP(0x5804, "Change Auditor Volume Password", "auditing", has_length=0)
13233         pkt.Request(8)
13234         pkt.Reply(8)
13235         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13236                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13237                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13238         # 2222/5805, 8805
13239         pkt = NCP(0x5805, "Check Auditor Access", "auditing", has_length=0)
13240         pkt.Request(8)
13241         pkt.Reply(8)
13242         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13243                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13244                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13245         # 2222/5806, 8806
13246         pkt = NCP(0x5806, "Delete User Audit Property", "auditing", has_length=0)
13247         pkt.Request(8)
13248         pkt.Reply(8)
13249         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13250                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13251                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff21])
13252         # 2222/5807, 8807
13253         pkt = NCP(0x5807, "Disable Auditing On A Volume", "auditing", has_length=0)
13254         pkt.Request(8)
13255         pkt.Reply(8)
13256         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13257                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13258                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13259         # 2222/5808, 8808
13260         pkt = NCP(0x5808, "Enable Auditing On A Volume", "auditing", has_length=0)
13261         pkt.Request(8)
13262         pkt.Reply(8)
13263         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13264                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13265                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xde00, 0xfd00, 0xff16])
13266         # 2222/5809, 8809
13267         pkt = NCP(0x5809, "Query User Being Audited", "auditing", has_length=0)
13268         pkt.Request(8)
13269         pkt.Reply(8)
13270         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13271                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13272                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13273         # 2222/580A, 88,10
13274         pkt = NCP(0x580A, "Read Audit Bit Map", "auditing", has_length=0)
13275         pkt.Request(8)
13276         pkt.Reply(8)
13277         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13278                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13279                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13280         # 2222/580B, 88,11
13281         pkt = NCP(0x580B, "Read Audit File Configuration Header", "auditing", has_length=0)
13282         pkt.Request(8)
13283         pkt.Reply(8)
13284         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13285                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13286                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13287         # 2222/580D, 88,13
13288         pkt = NCP(0x580D, "Remove Auditor Access", "auditing", has_length=0)
13289         pkt.Request(8)
13290         pkt.Reply(8)
13291         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13292                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13293                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13294         # 2222/580E, 88,14
13295         pkt = NCP(0x580E, "Reset Audit File", "auditing", has_length=0)
13296         pkt.Request(8)
13297         pkt.Reply(8)
13298         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13299                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13300                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13301
13302         # 2222/580F, 88,15
13303         pkt = NCP(0x580F, "Auditing NCP", "auditing", has_length=0)
13304         pkt.Request(8)
13305         pkt.Reply(8)
13306         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13307                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13308                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfb00, 0xfd00, 0xff16])
13309         # 2222/5810, 88,16
13310         pkt = NCP(0x5810, "Write Audit Bit Map", "auditing", has_length=0)
13311         pkt.Request(8)
13312         pkt.Reply(8)
13313         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13314                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13315                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13316         # 2222/5811, 88,17
13317         pkt = NCP(0x5811, "Write Audit File Configuration Header", "auditing", has_length=0)
13318         pkt.Request(8)
13319         pkt.Reply(8)
13320         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13321                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13322                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13323         # 2222/5812, 88,18
13324         pkt = NCP(0x5812, "Change Auditor Volume Password2", "auditing", has_length=0)
13325         pkt.Request(8)
13326         pkt.Reply(8)
13327         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13328                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13329                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13330         # 2222/5813, 88,19
13331         pkt = NCP(0x5813, "Return Audit Flags", "auditing", has_length=0)
13332         pkt.Request(8)
13333         pkt.Reply(8)
13334         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13335                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13336                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13337         # 2222/5814, 88,20
13338         pkt = NCP(0x5814, "Close Old Audit File", "auditing", has_length=0)
13339         pkt.Request(8)
13340         pkt.Reply(8)
13341         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13342                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13343                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13344         # 2222/5816, 88,22
13345         pkt = NCP(0x5816, "Check Level Two Access", "auditing", has_length=0)
13346         pkt.Request(8)
13347         pkt.Reply(8)
13348         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13349                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13350                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13351         # 2222/5817, 88,23
13352         pkt = NCP(0x5817, "Return Old Audit File List", "auditing", has_length=0)
13353         pkt.Request(8)
13354         pkt.Reply(8)
13355         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13356                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13357                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13358         # 2222/5818, 88,24
13359         pkt = NCP(0x5818, "Init Audit File Reads", "auditing", has_length=0)
13360         pkt.Request(8)
13361         pkt.Reply(8)
13362         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13363                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13364                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13365         # 2222/5819, 88,25
13366         pkt = NCP(0x5819, "Read Auditing File", "auditing", has_length=0)
13367         pkt.Request(8)
13368         pkt.Reply(8)
13369         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13370                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13371                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13372         # 2222/581A, 88,26
13373         pkt = NCP(0x581A, "Delete Old Audit File", "auditing", has_length=0)
13374         pkt.Request(8)
13375         pkt.Reply(8)
13376         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13377                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13378                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13379         # 2222/581E, 88,30
13380         pkt = NCP(0x581E, "Restart Volume auditing", "auditing", has_length=0)
13381         pkt.Request(8)
13382         pkt.Reply(8)
13383         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13384                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13385                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13386         # 2222/581F, 88,31
13387         pkt = NCP(0x581F, "Set Volume Password", "auditing", has_length=0)
13388         pkt.Request(8)
13389         pkt.Reply(8)
13390         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13391                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13392                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13393         # 2222/5901, 89,01
13394         pkt = NCP(0x5901, "Open/Create File or Subdirectory", "enhanced", has_length=0)
13395         pkt.Request((37,290), [
13396                 rec( 8, 1, NameSpace  ),
13397                 rec( 9, 1, OpenCreateMode ),
13398                 rec( 10, 2, SearchAttributesLow ),
13399                 rec( 12, 2, ReturnInfoMask ),
13400                 rec( 14, 2, ExtendedInfo ),
13401                 rec( 16, 4, AttributesDef32 ),
13402                 rec( 20, 2, DesiredAccessRights ),
13403                 rec( 22, 4, DirectoryBase ),
13404                 rec( 26, 1, VolumeNumber ),
13405                 rec( 27, 1, HandleFlag ),
13406                 rec( 28, 1, DataTypeFlag ),
13407                 rec( 29, 5, Reserved5 ),
13408                 rec( 34, 1, PathCount, var="x" ),
13409                 rec( 35, (2,255), Path16, repeat="x" ),
13410         ], info_str=(Path16, "Open or Create File or Subdirectory: %s", "/%s"))
13411         pkt.Reply( NO_LENGTH_CHECK, [
13412                 rec( 8, 4, FileHandle, BE ),
13413                 rec( 12, 1, OpenCreateAction ),
13414                 rec( 13, 1, Reserved ),
13415                         srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
13416                         srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
13417                         srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
13418                         srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
13419                         srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
13420                         srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
13421                         srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
13422                         srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
13423                         srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
13424                         srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
13425                         srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
13426                         srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
13427                         srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
13428                         srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
13429                         srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
13430                         srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
13431                         srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
13432                         srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
13433                         srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
13434                         srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
13435                         srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
13436                         srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
13437                         srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
13438                         srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
13439                         srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
13440                         srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
13441                         srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
13442                         srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
13443                         srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
13444                         srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
13445                         srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
13446                         srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
13447                         srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
13448                         srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
13449                         srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
13450                         srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
13451                         srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
13452                         srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
13453                         srec( DOSName16Struct, req_cond="ncp.ext_info_dos_name == 1" ),
13454                         srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
13455                         srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
13456                         srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
13457                         srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
13458                         srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
13459                         srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
13460                         srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
13461                         srec( FileSize64bitStruct, req_cond="ncp.ext_info_64_bit_fs == 1" ),
13462                         srec( FileName16Struct, req_cond="ncp.ret_info_mask_fname == 1" ),
13463         ])
13464         pkt.ReqCondSizeVariable()
13465         pkt.CompletionCodes([0x0000, 0x0102, 0x7f00, 0x8000, 0x8101, 0x8401, 0x8501,
13466                                                 0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13467                                                 0x9804, 0x9b03, 0x9c03, 0xa901, 0xa500, 0xaa00, 0xbf00, 0xfd00, 0xff16])
13468         # 2222/5902, 89/02
13469         pkt = NCP(0x5902, "Initialize Search", 'enhanced', has_length=0)
13470         pkt.Request( (25,278), [
13471                 rec( 8, 1, NameSpace  ),
13472                 rec( 9, 1, Reserved ),
13473                 rec( 10, 4, DirectoryBase ),
13474                 rec( 14, 1, VolumeNumber ),
13475                 rec( 15, 1, HandleFlag ),
13476         rec( 16, 1, DataTypeFlag ),
13477         rec( 17, 5, Reserved5 ),
13478                 rec( 22, 1, PathCount, var="x" ),
13479                 rec( 23, (2,255), Path16, repeat="x" ),
13480         ], info_str=(Path16, "Set Search Pointer to: %s", "/%s"))
13481         pkt.Reply(17, [
13482                 rec( 8, 1, VolumeNumber ),
13483                 rec( 9, 4, DirectoryNumber ),
13484                 rec( 13, 4, DirectoryEntryNumber ),
13485         ])
13486         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13487                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13488                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
13489         # 2222/5903, 89/03
13490         pkt = NCP(0x5903, "Search for File or Subdirectory", 'enhanced', has_length=0)
13491         pkt.Request((28, 281), [
13492                 rec( 8, 1, NameSpace  ),
13493                 rec( 9, 1, DataStream ),
13494                 rec( 10, 2, SearchAttributesLow ),
13495                 rec( 12, 2, ReturnInfoMask ),
13496                 rec( 14, 2, ExtendedInfo ),
13497                 rec( 16, 9, SearchSequence ),
13498         rec( 25, 1, DataTypeFlag ),
13499                 rec( 26, (2,255), SearchPattern16 ),
13500         ], info_str=(SearchPattern16, "Search for: %s", "/%s"))
13501         pkt.Reply( NO_LENGTH_CHECK, [
13502                 rec( 8, 9, SearchSequence ),
13503                 rec( 17, 1, Reserved ),
13504                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
13505                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
13506                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
13507                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
13508                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
13509                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
13510                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
13511                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
13512                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
13513                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
13514                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
13515                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
13516                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
13517                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
13518                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
13519                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
13520                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
13521                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
13522                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
13523                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
13524                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
13525                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
13526                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
13527                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
13528                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
13529                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
13530                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
13531                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
13532                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
13533                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
13534                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
13535                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
13536                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
13537                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
13538                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
13539                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
13540                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
13541                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
13542                 srec( DOSName16Struct, req_cond="ncp.ext_info_dos_name == 1" ),
13543                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
13544                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
13545                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
13546                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
13547                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
13548                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
13549                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
13550                 srec( FileSize64bitStruct, req_cond="ncp.ext_info_64_bit_fs == 1" ),
13551                 srec( FileName16Struct, req_cond="ncp.ret_info_mask_fname == 1" ),
13552         ])
13553         pkt.ReqCondSizeVariable()
13554         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13555                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13556                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
13557         # 2222/5904, 89/04
13558         pkt = NCP(0x5904, "Rename Or Move a File or Subdirectory", 'enhanced', has_length=0)
13559         pkt.Request((42, 548), [
13560                 rec( 8, 1, NameSpace  ),
13561                 rec( 9, 1, RenameFlag ),
13562                 rec( 10, 2, SearchAttributesLow ),
13563                 rec( 12, 4, DirectoryBase ),
13564                 rec( 16, 1, VolumeNumber ),
13565                 rec( 17, 1, HandleFlag ),
13566         rec( 18, 1, DataTypeFlag ),
13567         rec( 19, 5, Reserved5 ),
13568                 rec( 24, 1, PathCount, var="x" ),
13569                 rec( 25, 4, DirectoryBase ),
13570                 rec( 29, 1, VolumeNumber ),
13571                 rec( 30, 1, HandleFlag ),
13572         rec( 31, 1, DataTypeFlag ),
13573         rec( 32, 5, Reserved5 ),
13574                 rec( 37, 1, PathCount, var="y" ),
13575                 rec( 38, (2, 255), Path16, repeat="x" ),
13576                 rec( -1, (2,255), Path16, repeat="y" ),
13577         ], info_str=(Path16, "Rename or Move: %s", "/%s"))
13578         pkt.Reply(8)
13579         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
13580                              0x8701, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9200, 0x9600,
13581                              0x9804, 0x9a00, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
13582         # 2222/5905, 89/05
13583         pkt = NCP(0x5905, "Scan File or Subdirectory for Trustees", 'enhanced', has_length=0)
13584         pkt.Request((31, 284), [
13585                 rec( 8, 1, NameSpace  ),
13586                 rec( 9, 1, MaxReplyObjectIDCount ),
13587                 rec( 10, 2, SearchAttributesLow ),
13588                 rec( 12, 4, SequenceNumber ),
13589                 rec( 16, 4, DirectoryBase ),
13590                 rec( 20, 1, VolumeNumber ),
13591                 rec( 21, 1, HandleFlag ),
13592         rec( 22, 1, DataTypeFlag ),
13593         rec( 23, 5, Reserved5 ),
13594                 rec( 28, 1, PathCount, var="x" ),
13595                 rec( 29, (2, 255), Path16, repeat="x" ),
13596         ], info_str=(Path16, "Scan Trustees for: %s", "/%s"))
13597         pkt.Reply(20, [
13598                 rec( 8, 4, SequenceNumber ),
13599                 rec( 12, 2, ObjectIDCount, var="x" ),
13600                 rec( 14, 6, TrusteeStruct, repeat="x" ),
13601         ])
13602         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13603                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13604                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
13605         # 2222/5906, 89/06
13606         pkt = NCP(0x5906, "Obtain File or SubDirectory Information", 'enhanced', has_length=0)
13607         pkt.Request((31,284), [
13608                 rec( 8, 1, SrcNameSpace ),
13609                 rec( 9, 1, DestNameSpace ),
13610                 rec( 10, 2, SearchAttributesLow ),
13611                 rec( 12, 2, ReturnInfoMask, LE ),
13612                 rec( 14, 2, ExtendedInfo ),
13613                 rec( 16, 4, DirectoryBase ),
13614                 rec( 20, 1, VolumeNumber ),
13615                 rec( 21, 1, HandleFlag ),
13616         rec( 22, 1, DataTypeFlag ),
13617         rec( 23, 5, Reserved5 ),
13618                 rec( 28, 1, PathCount, var="x" ),
13619                 rec( 29, (2,255), Path16, repeat="x",),
13620         ], info_str=(Path16, "Obtain Info for: %s", "/%s"))
13621         pkt.Reply(NO_LENGTH_CHECK, [
13622             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
13623             srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
13624             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
13625             srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
13626             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
13627             srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
13628             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
13629             srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
13630             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
13631             srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
13632             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
13633             srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
13634             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
13635             srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
13636             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
13637             srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
13638             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
13639             srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
13640             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
13641             srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
13642             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
13643             srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
13644             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
13645             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
13646             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
13647             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
13648             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
13649             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
13650             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
13651             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
13652             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
13653             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
13654             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
13655             srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
13656             srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
13657             srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
13658             srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
13659             srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
13660             srec( DOSName16Struct, req_cond="ncp.ext_info_dos_name == 1" ),
13661             srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
13662             srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
13663             srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
13664             srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
13665             srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
13666             srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
13667             srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
13668             srec( FileSize64bitStruct, req_cond="ncp.ext_info_64_bit_fs == 1" ),
13669             srec( FileName16Struct, req_cond="ncp.ret_info_mask_fname == 1" ),
13670         ])
13671         pkt.ReqCondSizeVariable()
13672         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13673                              0x8700, 0x8900, 0x8d00, 0x8f00, 0x9001, 0x9600,
13674                              0x9804, 0x9b03, 0x9c03, 0xa802, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
13675         # 2222/5907, 89/07
13676         pkt = NCP(0x5907, "Modify File or Subdirectory DOS Information", 'enhanced', has_length=0)
13677         pkt.Request((69,322), [
13678                 rec( 8, 1, NameSpace ),
13679                 rec( 9, 1, Reserved ),
13680                 rec( 10, 2, SearchAttributesLow ),
13681                 rec( 12, 2, ModifyDOSInfoMask ),
13682                 rec( 14, 2, Reserved2 ),
13683                 rec( 16, 2, AttributesDef16 ),
13684                 rec( 18, 1, FileMode ),
13685                 rec( 19, 1, FileExtendedAttributes ),
13686                 rec( 20, 2, CreationDate ),
13687                 rec( 22, 2, CreationTime ),
13688                 rec( 24, 4, CreatorID, BE ),
13689                 rec( 28, 2, ModifiedDate ),
13690                 rec( 30, 2, ModifiedTime ),
13691                 rec( 32, 4, ModifierID, BE ),
13692                 rec( 36, 2, ArchivedDate ),
13693                 rec( 38, 2, ArchivedTime ),
13694                 rec( 40, 4, ArchiverID, BE ),
13695                 rec( 44, 2, LastAccessedDate ),
13696                 rec( 46, 2, InheritedRightsMask ),
13697                 rec( 48, 2, InheritanceRevokeMask ),
13698                 rec( 50, 4, MaxSpace ),
13699                 rec( 54, 4, DirectoryBase ),
13700                 rec( 58, 1, VolumeNumber ),
13701                 rec( 59, 1, HandleFlag ),
13702         rec( 60, 1, DataTypeFlag ),
13703         rec( 61, 5, Reserved5 ),
13704                 rec( 66, 1, PathCount, var="x" ),
13705                 rec( 67, (2,255), Path16, repeat="x" ),
13706         ], info_str=(Path16, "Modify DOS Information for: %s", "/%s"))
13707         pkt.Reply(8)
13708         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
13709                              0x8701, 0x8c01, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9600,
13710                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
13711         # 2222/5908, 89/08
13712         pkt = NCP(0x5908, "Delete a File or Subdirectory", 'enhanced', has_length=0)
13713         pkt.Request((27,280), [
13714                 rec( 8, 1, NameSpace ),
13715                 rec( 9, 1, Reserved ),
13716                 rec( 10, 2, SearchAttributesLow ),
13717                 rec( 12, 4, DirectoryBase ),
13718                 rec( 16, 1, VolumeNumber ),
13719                 rec( 17, 1, HandleFlag ),
13720         rec( 18, 1, DataTypeFlag ),
13721         rec( 19, 5, Reserved5 ),
13722                 rec( 24, 1, PathCount, var="x" ),
13723                 rec( 25, (2,255), Path16, repeat="x" ),
13724         ], info_str=(Path16, "Delete a File or Subdirectory: %s", "/%s"))
13725         pkt.Reply(8)
13726         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13727                              0x8701, 0x8900, 0x8a00, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9600,
13728                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
13729         # 2222/5909, 89/09
13730         pkt = NCP(0x5909, "Set Short Directory Handle", 'enhanced', has_length=0)
13731         pkt.Request((27,280), [
13732                 rec( 8, 1, NameSpace ),
13733                 rec( 9, 1, DataStream ),
13734                 rec( 10, 1, DestDirHandle ),
13735                 rec( 11, 1, Reserved ),
13736                 rec( 12, 4, DirectoryBase ),
13737                 rec( 16, 1, VolumeNumber ),
13738                 rec( 17, 1, HandleFlag ),
13739         rec( 18, 1, DataTypeFlag ),
13740         rec( 19, 5, Reserved5 ),
13741                 rec( 24, 1, PathCount, var="x" ),
13742                 rec( 25, (2,255), Path16, repeat="x" ),
13743         ], info_str=(Path16, "Set Short Directory Handle to: %s", "/%s"))
13744         pkt.Reply(8)
13745         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13746                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13747                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
13748         # 2222/590A, 89/10
13749         pkt = NCP(0x590A, "Add Trustee Set to File or Subdirectory", 'enhanced', has_length=0)
13750         pkt.Request((37,290), [
13751                 rec( 8, 1, NameSpace ),
13752                 rec( 9, 1, Reserved ),
13753                 rec( 10, 2, SearchAttributesLow ),
13754                 rec( 12, 2, AccessRightsMaskWord ),
13755                 rec( 14, 2, ObjectIDCount, var="y" ),
13756                 rec( -1, 6, TrusteeStruct, repeat="y" ),
13757                 rec( -1, 4, DirectoryBase ),
13758                 rec( -1, 1, VolumeNumber ),
13759                 rec( -1, 1, HandleFlag ),
13760         rec( -1, 1, DataTypeFlag ),
13761         rec( -1, 5, Reserved5 ),
13762                 rec( -1, 1, PathCount, var="x" ),
13763                 rec( -1, (2,255), Path16, repeat="x" ),
13764         ], info_str=(Path16, "Add Trustee Set to: %s", "/%s"))
13765         pkt.Reply(8)
13766         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
13767                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13768                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfc01, 0xfd00, 0xff16])
13769         # 2222/590B, 89/11
13770         pkt = NCP(0x590B, "Delete Trustee Set from File or SubDirectory", 'enhanced', has_length=0)
13771         pkt.Request((34,287), [
13772                 rec( 8, 1, NameSpace ),
13773                 rec( 9, 1, Reserved ),
13774                 rec( 10, 2, ObjectIDCount, var="y" ),
13775                 rec( 12, 4, DirectoryBase ),
13776                 rec( 16, 1, VolumeNumber ),
13777                 rec( 17, 1, HandleFlag ),
13778         rec( 18, 1, DataTypeFlag ),
13779         rec( 19, 5, Reserved5 ),
13780                 rec( 24, 1, PathCount, var="x" ),
13781                 rec( 25, (2,255), Path16, repeat="x" ),
13782                 rec( -1, 7, TrusteeStruct, repeat="y" ),
13783         ], info_str=(Path16, "Delete Trustee Set from: %s", "/%s"))
13784         pkt.Reply(8)
13785         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13786                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13787                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
13788         # 2222/590C, 89/12
13789         pkt = NCP(0x590C, "Allocate Short Directory Handle", 'enhanced', has_length=0)
13790         pkt.Request((27,280), [
13791                 rec( 8, 1, NameSpace ),
13792                 rec( 9, 1, DestNameSpace ),
13793                 rec( 10, 2, AllocateMode ),
13794                 rec( 12, 4, DirectoryBase ),
13795                 rec( 16, 1, VolumeNumber ),
13796                 rec( 17, 1, HandleFlag ),
13797         rec( 18, 1, DataTypeFlag ),
13798         rec( 19, 5, Reserved5 ),
13799                 rec( 24, 1, PathCount, var="x" ),
13800                 rec( 25, (2,255), Path16, repeat="x" ),
13801         ], info_str=(Path16, "Allocate Short Directory Handle to: %s", "/%s"))
13802         pkt.Reply(NO_LENGTH_CHECK, [
13803         srec( ReplyLevel2Struct, req_cond="ncp.alloc_reply_lvl2 == TRUE" ),
13804                 srec( ReplyLevel1Struct, req_cond="ncp.alloc_reply_lvl2 == FALSE" ),
13805         ])
13806         pkt.ReqCondSizeVariable()
13807         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13808                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13809                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
13810     # 2222/5910, 89/16
13811         pkt = NCP(0x5910, "Scan Salvageable Files", 'enhanced', has_length=0)
13812         pkt.Request((33,286), [
13813                 rec( 8, 1, NameSpace ),
13814                 rec( 9, 1, DataStream ),
13815                 rec( 10, 2, ReturnInfoMask ),
13816                 rec( 12, 2, ExtendedInfo ),
13817                 rec( 14, 4, SequenceNumber ),
13818                 rec( 18, 4, DirectoryBase ),
13819                 rec( 22, 1, VolumeNumber ),
13820                 rec( 23, 1, HandleFlag ),
13821         rec( 24, 1, DataTypeFlag ),
13822         rec( 25, 5, Reserved5 ),
13823                 rec( 30, 1, PathCount, var="x" ),
13824                 rec( 31, (2,255), Path16, repeat="x" ),
13825         ], info_str=(Path16, "Scan for Deleted Files in: %s", "/%s"))
13826         pkt.Reply(NO_LENGTH_CHECK, [
13827                 rec( 8, 4, SequenceNumber ),
13828                 rec( 12, 2, DeletedTime ),
13829                 rec( 14, 2, DeletedDate ),
13830                 rec( 16, 4, DeletedID, BE ),
13831                 rec( 20, 4, VolumeID ),
13832                 rec( 24, 4, DirectoryBase ),
13833                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
13834                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
13835                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
13836                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
13837                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
13838                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
13839                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
13840                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
13841                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
13842                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
13843                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
13844                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
13845                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
13846                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
13847                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
13848                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
13849                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
13850                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
13851                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
13852                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
13853                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
13854                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
13855                 srec( FileName16Struct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
13856                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
13857                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
13858                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
13859                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
13860                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
13861                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
13862                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
13863                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
13864                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
13865                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
13866                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
13867                 srec( FileSize64bitStruct, req_cond="ncp.ext_info_64_bit_fs == 1" ),
13868                 srec( FileName16Struct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
13869         ])
13870         pkt.ReqCondSizeVariable()
13871         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13872                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13873                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
13874         # 2222/5911, 89/17
13875         pkt = NCP(0x5911, "Recover Salvageable File", 'enhanced', has_length=0)
13876         pkt.Request((24,278), [
13877                 rec( 8, 1, NameSpace ),
13878                 rec( 9, 1, Reserved ),
13879                 rec( 10, 4, SequenceNumber ),
13880                 rec( 14, 4, VolumeID ),
13881                 rec( 18, 4, DirectoryBase ),
13882         rec( 22, 1, DataTypeFlag ),
13883                 rec( 23, (1,255), FileName ),
13884         ], info_str=(FileName, "Recover Deleted File: %s", ", %s"))
13885         pkt.Reply(8)
13886         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
13887                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13888                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
13889         # 2222/5913, 89/19
13890         pkt = NCP(0x5913, "Get Name Space Information", 'enhanced', has_length=0)
13891         pkt.Request(18, [
13892                 rec( 8, 1, SrcNameSpace ),
13893                 rec( 9, 1, DestNameSpace ),
13894                 rec( 10, 1, DataTypeFlag ),
13895                 rec( 11, 1, VolumeNumber ),
13896                 rec( 12, 4, DirectoryBase ),
13897                 rec( 16, 2, NamesSpaceInfoMask ),
13898         ])
13899         pkt.Reply(NO_LENGTH_CHECK, [
13900             srec( FileName16Struct, req_cond="ncp.ns_info_mask_modify == TRUE" ),
13901             srec( FileAttributesStruct, req_cond="ncp.ns_info_mask_fatt == TRUE" ),
13902             srec( CreationDateStruct, req_cond="ncp.ns_info_mask_cdate == TRUE" ),
13903             srec( CreationTimeStruct, req_cond="ncp.ns_info_mask_ctime == TRUE" ),
13904             srec( OwnerIDStruct, req_cond="ncp.ns_info_mask_owner == TRUE" ),
13905             srec( ArchiveDateStruct, req_cond="ncp.ns_info_mask_adate == TRUE" ),
13906             srec( ArchiveTimeStruct, req_cond="ncp.ns_info_mask_atime == TRUE" ),
13907             srec( ArchiveIdStruct, req_cond="ncp.ns_info_mask_aid == TRUE" ),
13908             srec( UpdateDateStruct, req_cond="ncp.ns_info_mask_udate == TRUE" ),
13909             srec( UpdateTimeStruct, req_cond="ncp.ns_info_mask_utime == TRUE" ),
13910             srec( UpdateIDStruct, req_cond="ncp.ns_info_mask_uid == TRUE" ),
13911             srec( LastAccessStruct, req_cond="ncp.ns_info_mask_acc_date == TRUE" ),
13912             srec( RightsInfoStruct, req_cond="ncp.ns_info_mask_max_acc_mask == TRUE" ),
13913         ])
13914         pkt.ReqCondSizeVariable()
13915         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13916                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13917                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
13918         # 2222/5914, 89/20
13919         pkt = NCP(0x5914, "Search for File or Subdirectory Set", 'enhanced', has_length=0)
13920         pkt.Request((30, 283), [
13921                 rec( 8, 1, NameSpace  ),
13922                 rec( 9, 1, DataStream ),
13923                 rec( 10, 2, SearchAttributesLow ),
13924                 rec( 12, 2, ReturnInfoMask ),
13925                 rec( 14, 2, ExtendedInfo ),
13926                 rec( 16, 2, ReturnInfoCount ),
13927                 rec( 18, 9, SearchSequence ),
13928         rec( 27, 1, DataTypeFlag ),
13929                 rec( 28, (2,255), SearchPattern16 ),
13930         ])
13931         pkt.Reply(NO_LENGTH_CHECK, [
13932                 rec( 8, 9, SearchSequence ),
13933                 rec( 17, 1, MoreFlag ),
13934                 rec( 18, 2, InfoCount ),
13935             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
13936             srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
13937             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
13938             srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
13939             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
13940             srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
13941             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
13942             srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
13943             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
13944             srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
13945             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
13946             srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
13947             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
13948             srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
13949             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
13950             srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
13951             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
13952             srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
13953             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
13954             srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
13955             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
13956             srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
13957             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
13958             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
13959             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
13960             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
13961             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
13962             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
13963             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
13964             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
13965             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
13966             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
13967             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
13968             srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
13969             srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
13970             srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
13971             srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
13972             srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
13973             srec( DOSName16Struct, req_cond="ncp.ext_info_dos_name == 1" ),
13974             srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
13975             srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
13976             srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
13977             srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
13978             srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
13979             srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
13980             srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
13981             srec( FileSize64bitStruct, req_cond="ncp.ext_info_64_bit_fs == 1" ),
13982             srec( FileName16Struct, req_cond="ncp.ret_info_mask_fname == 1" ),
13983         ])
13984         pkt.ReqCondSizeVariable()
13985         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13986                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13987                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
13988         # 2222/5916, 89/22
13989         pkt = NCP(0x5916, "Generate Directory Base and Volume Number", 'enhanced', has_length=0)
13990         pkt.Request((27,280), [
13991                 rec( 8, 1, SrcNameSpace ),
13992                 rec( 9, 1, DestNameSpace ),
13993                 rec( 10, 2, dstNSIndicator ),
13994                 rec( 12, 4, DirectoryBase ),
13995                 rec( 16, 1, VolumeNumber ),
13996                 rec( 17, 1, HandleFlag ),
13997         rec( 18, 1, DataTypeFlag ),
13998         rec( 19, 5, Reserved5 ),
13999                 rec( 24, 1, PathCount, var="x" ),
14000                 rec( 25, (2,255), Path16, repeat="x" ),
14001         ], info_str=(Path16, "Get Volume and Directory Base from: %s", "/%s"))
14002         pkt.Reply(17, [
14003                 rec( 8, 4, DirectoryBase ),
14004                 rec( 12, 4, DOSDirectoryBase ),
14005                 rec( 16, 1, VolumeNumber ),
14006         ])
14007         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
14008                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14009                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14010         # 2222/5919, 89/25
14011         pkt = NCP(0x5919, "Set Name Space Information", 'enhanced', has_length=0)
14012         pkt.Request(530, [
14013                 rec( 8, 1, SrcNameSpace ),
14014                 rec( 9, 1, DestNameSpace ),
14015                 rec( 10, 1, VolumeNumber ),
14016                 rec( 11, 4, DirectoryBase ),
14017                 rec( 15, 2, NamesSpaceInfoMask ),
14018         rec( 17, 1, DataTypeFlag ),
14019                 rec( 18, 512, NSSpecificInfo ),
14020         ])
14021         pkt.Reply(8)
14022         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
14023                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
14024                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00,
14025                              0xff16])
14026         # 2222/591C, 89/28
14027         pkt = NCP(0x591C, "Get Full Path String", 'enhanced', has_length=0)
14028         pkt.Request((35,288), [
14029                 rec( 8, 1, SrcNameSpace ),
14030                 rec( 9, 1, DestNameSpace ),
14031                 rec( 10, 2, PathCookieFlags ),
14032                 rec( 12, 4, Cookie1 ),
14033                 rec( 16, 4, Cookie2 ),
14034                 rec( 20, 4, DirectoryBase ),
14035                 rec( 24, 1, VolumeNumber ),
14036                 rec( 25, 1, HandleFlag ),
14037         rec( 26, 1, DataTypeFlag ),
14038         rec( 27, 5, Reserved5 ),
14039                 rec( 32, 1, PathCount, var="x" ),
14040                 rec( 33, (2,255), Path16, repeat="x" ),
14041         ], info_str=(Path16, "Get Full Path from: %s", "/%s"))
14042         pkt.Reply((24,277), [
14043                 rec( 8, 2, PathCookieFlags ),
14044                 rec( 10, 4, Cookie1 ),
14045                 rec( 14, 4, Cookie2 ),
14046                 rec( 18, 2, PathComponentSize ),
14047                 rec( 20, 2, PathComponentCount, var='x' ),
14048                 rec( 22, (2,255), Path16, repeat='x' ),
14049         ])
14050         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
14051                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
14052                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00,
14053                              0xff16])
14054         # 2222/591D, 89/29
14055         pkt = NCP(0x591D, "Get Effective Directory Rights", 'enhanced', has_length=0)
14056         pkt.Request((31, 284), [
14057                 rec( 8, 1, NameSpace  ),
14058                 rec( 9, 1, DestNameSpace ),
14059                 rec( 10, 2, SearchAttributesLow ),
14060                 rec( 12, 2, ReturnInfoMask ),
14061                 rec( 14, 2, ExtendedInfo ),
14062                 rec( 16, 4, DirectoryBase ),
14063                 rec( 20, 1, VolumeNumber ),
14064                 rec( 21, 1, HandleFlag ),
14065         rec( 22, 1, DataTypeFlag ),
14066         rec( 23, 5, Reserved5 ),
14067                 rec( 28, 1, PathCount, var="x" ),
14068                 rec( 29, (2,255), Path16, repeat="x" ),
14069         ], info_str=(Path16, "Get Effective Rights for: %s", "/%s"))
14070         pkt.Reply(NO_LENGTH_CHECK, [
14071                 rec( 8, 2, EffectiveRights ),
14072                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
14073                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
14074                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
14075                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
14076                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
14077                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
14078                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
14079                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
14080                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
14081                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
14082                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
14083                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
14084                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
14085                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
14086                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
14087                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
14088                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
14089                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
14090                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
14091                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
14092                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
14093                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
14094                 srec( FileName16Struct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
14095                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
14096                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
14097                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
14098                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
14099                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
14100                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
14101                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
14102                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
14103                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
14104                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
14105                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
14106                 srec( FileSize64bitStruct, req_cond="(ncp.ext_info_64_bit_fs == 1) && (ncp.ret_info_mask_fname == 1)" ),
14107                 srec( FileName16Struct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
14108         ])
14109         pkt.ReqCondSizeVariable()
14110         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
14111                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14112                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14113         # 2222/591E, 89/30
14114         pkt = NCP(0x591E, "Open/Create File or Subdirectory", 'enhanced', has_length=0)
14115         pkt.Request((41, 294), [
14116                 rec( 8, 1, NameSpace  ),
14117                 rec( 9, 1, DataStream ),
14118                 rec( 10, 1, OpenCreateMode ),
14119                 rec( 11, 1, Reserved ),
14120                 rec( 12, 2, SearchAttributesLow ),
14121                 rec( 14, 2, Reserved2 ),
14122                 rec( 16, 2, ReturnInfoMask ),
14123                 rec( 18, 2, ExtendedInfo ),
14124                 rec( 20, 4, AttributesDef32 ),
14125                 rec( 24, 2, DesiredAccessRights ),
14126                 rec( 26, 4, DirectoryBase ),
14127                 rec( 30, 1, VolumeNumber ),
14128                 rec( 31, 1, HandleFlag ),
14129         rec( 32, 1, DataTypeFlag ),
14130         rec( 33, 5, Reserved5 ),
14131                 rec( 38, 1, PathCount, var="x" ),
14132                 rec( 39, (2,255), Path16, repeat="x" ),
14133         ], info_str=(Path16, "Open or Create File: %s", "/%s"))
14134         pkt.Reply(NO_LENGTH_CHECK, [
14135                 rec( 8, 4, FileHandle, BE ),
14136                 rec( 12, 1, OpenCreateAction ),
14137                 rec( 13, 1, Reserved ),
14138                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
14139                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
14140                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
14141                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
14142                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
14143                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
14144                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
14145                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
14146                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
14147                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
14148                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
14149                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
14150                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
14151                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
14152                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
14153                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
14154                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
14155                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
14156                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
14157                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
14158                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
14159                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
14160                 srec( FileName16Struct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
14161                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
14162                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
14163                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
14164                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
14165                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
14166                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
14167                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
14168                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
14169                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
14170                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
14171                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
14172                 srec( FileSize64bitStruct, req_cond="(ncp.ext_info_64_bit_fs == 1) && (ncp.ret_info_mask_fname == 1)" ),
14173                 srec( FileName16Struct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
14174         ])
14175         pkt.ReqCondSizeVariable()
14176         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
14177                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14178                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14179         # 2222/5920, 89/32
14180         pkt = NCP(0x5920, "Open/Create File or Subdirectory with Callback", 'enhanced', has_length=0)
14181         pkt.Request((37, 290), [
14182                 rec( 8, 1, NameSpace  ),
14183                 rec( 9, 1, OpenCreateMode ),
14184                 rec( 10, 2, SearchAttributesLow ),
14185                 rec( 12, 2, ReturnInfoMask ),
14186                 rec( 14, 2, ExtendedInfo ),
14187                 rec( 16, 4, AttributesDef32 ),
14188                 rec( 20, 2, DesiredAccessRights ),
14189                 rec( 22, 4, DirectoryBase ),
14190                 rec( 26, 1, VolumeNumber ),
14191                 rec( 27, 1, HandleFlag ),
14192         rec( 28, 1, DataTypeFlag ),
14193         rec( 29, 5, Reserved5 ),
14194                 rec( 34, 1, PathCount, var="x" ),
14195                 rec( 35, (2,255), Path16, repeat="x" ),
14196         ], info_str=(Path16, "Open or Create with Op-Lock: %s", "/%s"))
14197         pkt.Reply( NO_LENGTH_CHECK, [
14198                 rec( 8, 4, FileHandle, BE ),
14199                 rec( 12, 1, OpenCreateAction ),
14200                 rec( 13, 1, OCRetFlags ),
14201                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
14202                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
14203                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
14204                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
14205                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
14206                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
14207                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
14208                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
14209                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
14210                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
14211                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
14212                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
14213                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
14214                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
14215                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
14216                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
14217                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
14218                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
14219                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
14220                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
14221                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
14222                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
14223                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
14224                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
14225                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
14226                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
14227                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
14228                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
14229                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
14230                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
14231                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
14232                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
14233                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
14234                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
14235                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
14236                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
14237                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
14238                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
14239                 srec( DOSName16Struct, req_cond="ncp.ext_info_dos_name == 1" ),
14240                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
14241                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
14242                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
14243                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
14244                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
14245                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
14246                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
14247                 srec( FileSize64bitStruct, req_cond="ncp.ext_info_64_bit_fs == 1" ),
14248                 srec( FileName16Struct, req_cond="ncp.ret_info_mask_fname == 1" ),
14249         ])
14250         pkt.ReqCondSizeVariable()
14251         pkt.CompletionCodes([0x0000, 0x0102, 0x7f00, 0x8000, 0x8101, 0x8401, 0x8501,
14252                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14253                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14254         # 2222/5921, 89/33
14255         pkt = NCP(0x5921, "Open/Create File or Subdirectory II with Callback", 'enhanced', has_length=0)
14256         pkt.Request((41, 294), [
14257                 rec( 8, 1, NameSpace  ),
14258                 rec( 9, 1, DataStream ),
14259                 rec( 10, 1, OpenCreateMode ),
14260                 rec( 11, 1, Reserved ),
14261                 rec( 12, 2, SearchAttributesLow ),
14262                 rec( 14, 2, Reserved2 ),
14263                 rec( 16, 2, ReturnInfoMask ),
14264                 rec( 18, 2, ExtendedInfo ),
14265                 rec( 20, 4, AttributesDef32 ),
14266                 rec( 24, 2, DesiredAccessRights ),
14267                 rec( 26, 4, DirectoryBase ),
14268                 rec( 30, 1, VolumeNumber ),
14269                 rec( 31, 1, HandleFlag ),
14270         rec( 32, 1, DataTypeFlag ),
14271         rec( 33, 5, Reserved5 ),
14272                 rec( 38, 1, PathCount, var="x" ),
14273                 rec( 39, (2,255), Path16, repeat="x" ),
14274         ], info_str=(Path16, "Open or Create II with Op-Lock: %s", "/%s"))
14275         pkt.Reply( NO_LENGTH_CHECK, [
14276                 rec( 8, 4, FileHandle ),
14277                 rec( 12, 1, OpenCreateAction ),
14278                 rec( 13, 1, OCRetFlags ),
14279                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
14280                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
14281                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
14282                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
14283                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
14284                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
14285                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
14286                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
14287                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
14288                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
14289                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
14290                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
14291                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
14292                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
14293                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
14294                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
14295                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
14296                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
14297                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
14298                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
14299                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
14300                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
14301                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
14302                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
14303                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
14304                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
14305                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
14306                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
14307                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
14308                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
14309                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
14310                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
14311                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
14312                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
14313                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
14314                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
14315                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
14316                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
14317                 srec( DOSName16Struct, req_cond="ncp.ext_info_dos_name == 1" ),
14318                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
14319                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
14320                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
14321                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
14322                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
14323                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
14324                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
14325                 srec( FileSize64bitStruct, req_cond="ncp.ext_info_64_bit_fs == 1" ),
14326                 srec( FileName16Struct, req_cond="ncp.ret_info_mask_fname == 1" ),
14327         ])
14328         pkt.ReqCondSizeVariable()
14329         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
14330                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14331                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14332         # 2222/5923, 89/35
14333         pkt = NCP(0x5923, "Modify DOS Attributes on a File or Subdirectory", 'enhanced', has_length=0)
14334         pkt.Request((35, 288), [
14335                 rec( 8, 1, NameSpace  ),
14336                 rec( 9, 1, Flags ),
14337                 rec( 10, 2, SearchAttributesLow ),
14338                 rec( 12, 2, ReturnInfoMask ),
14339                 rec( 14, 2, ExtendedInfo ),
14340                 rec( 16, 4, AttributesDef32 ),
14341                 rec( 20, 4, DirectoryBase ),
14342                 rec( 24, 1, VolumeNumber ),
14343                 rec( 25, 1, HandleFlag ),
14344         rec( 26, 1, DataTypeFlag ),
14345         rec( 27, 5, Reserved5 ),
14346                 rec( 32, 1, PathCount, var="x" ),
14347                 rec( 33, (2,255), Path16, repeat="x" ),
14348         ], info_str=(Path16, "Modify DOS Attributes for: %s", "/%s"))
14349         pkt.Reply(24, [
14350                 rec( 8, 4, ItemsChecked ),
14351                 rec( 12, 4, ItemsChanged ),
14352                 rec( 16, 4, AttributeValidFlag ),
14353                 rec( 20, 4, AttributesDef32 ),
14354         ])
14355         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
14356                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14357                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14358         # 2222/5927, 89/39
14359         pkt = NCP(0x5927, "Get Directory Disk Space Restriction", 'enhanced', has_length=0)
14360         pkt.Request((26, 279), [
14361                 rec( 8, 1, NameSpace  ),
14362                 rec( 9, 2, Reserved2 ),
14363                 rec( 11, 4, DirectoryBase ),
14364                 rec( 15, 1, VolumeNumber ),
14365                 rec( 16, 1, HandleFlag ),
14366         rec( 17, 1, DataTypeFlag ),
14367         rec( 18, 5, Reserved5 ),
14368                 rec( 23, 1, PathCount, var="x" ),
14369                 rec( 24, (2,255), Path16, repeat="x" ),
14370         ], info_str=(Path16, "Get Disk Space Restriction for: %s", "/%s"))
14371         pkt.Reply(18, [
14372                 rec( 8, 1, NumberOfEntries, var="x" ),
14373                 rec( 9, 9, SpaceStruct, repeat="x" ),
14374         ])
14375         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
14376                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14377                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00,
14378                              0xff16])
14379         # 2222/5928, 89/40
14380         pkt = NCP(0x5928, "Search for File or Subdirectory Set (Extended Errors)", 'enhanced', has_length=0)
14381         pkt.Request((30, 283), [
14382                 rec( 8, 1, NameSpace  ),
14383                 rec( 9, 1, DataStream ),
14384                 rec( 10, 2, SearchAttributesLow ),
14385                 rec( 12, 2, ReturnInfoMask ),
14386                 rec( 14, 2, ExtendedInfo ),
14387                 rec( 16, 2, ReturnInfoCount ),
14388                 rec( 18, 9, SearchSequence ),
14389         rec( 27, 1, DataTypeFlag ),
14390                 rec( 28, (2,255), SearchPattern16 ),
14391         ], info_str=(SearchPattern16, "Search for: %s", ", %s"))
14392         pkt.Reply(NO_LENGTH_CHECK, [
14393                 rec( 8, 9, SearchSequence ),
14394                 rec( 17, 1, MoreFlag ),
14395                 rec( 18, 2, InfoCount ),
14396                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
14397                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
14398                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
14399                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
14400                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
14401                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
14402                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
14403                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
14404                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
14405                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
14406                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
14407                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
14408                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
14409                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
14410                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
14411                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
14412                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
14413                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
14414                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
14415                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
14416                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
14417                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
14418                 srec( FileName16Struct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
14419                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
14420                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
14421                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
14422                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
14423                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
14424                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
14425                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
14426                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
14427                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
14428                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
14429                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
14430                 srec( FileSize64bitStruct, req_cond="(ncp.ext_info_64_bit_fs == 1) && (ncp.ret_info_mask_fname == 1)" ),
14431                 srec( FileName16Struct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
14432         ])
14433         pkt.ReqCondSizeVariable()
14434         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
14435                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14436                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14437         # 2222/5932, 89/50
14438         pkt = NCP(0x5932, "Get Object Effective Rights", "enhanced", has_length=0)
14439         pkt.Request(25, [
14440     rec( 8, 1, NameSpace ),
14441     rec( 9, 4, ObjectID ),
14442                 rec( 13, 4, DirectoryBase ),
14443                 rec( 17, 1, VolumeNumber ),
14444                 rec( 18, 1, HandleFlag ),
14445         rec( 19, 1, DataTypeFlag ),
14446         rec( 20, 5, Reserved5 ),
14447     ])
14448         pkt.Reply( 10, [
14449                 rec( 8, 2, TrusteeRights ),
14450         ])
14451         pkt.CompletionCodes([0x0000, 0x7e01, 0x9b00, 0x9c03, 0xa901, 0xaa00])
14452         # 2222/5934, 89/52
14453         pkt = NCP(0x5934, "Write Extended Attribute", 'enhanced', has_length=0 )
14454         pkt.Request((36,98), [
14455                 rec( 8, 2, EAFlags ),
14456                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
14457                 rec( 14, 4, ReservedOrDirectoryNumber ),
14458                 rec( 18, 4, TtlWriteDataSize ),
14459                 rec( 22, 4, FileOffset ),
14460                 rec( 26, 4, EAAccessFlag ),
14461         rec( 30, 1, DataTypeFlag ),
14462                 rec( 31, 2, EAValueLength, var='x' ),
14463                 rec( 33, (2,64), EAKey ),
14464                 rec( -1, 1, EAValueRep, repeat='x' ),
14465         ], info_str=(EAKey, "Write Extended Attribute: %s", ", %s"))
14466         pkt.Reply(20, [
14467                 rec( 8, 4, EAErrorCodes ),
14468                 rec( 12, 4, EABytesWritten ),
14469                 rec( 16, 4, NewEAHandle ),
14470         ])
14471         pkt.CompletionCodes([0x0000, 0xc800, 0xc900, 0xcb00, 0xce00, 0xcf00, 0xd101,
14472                              0xd203, 0xa901, 0xaa00, 0xd301, 0xd402])
14473         # 2222/5935, 89/53
14474         pkt = NCP(0x5935, "Read Extended Attribute", 'enhanced', has_length=0 )
14475         pkt.Request((31,541), [
14476                 rec( 8, 2, EAFlags ),
14477                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
14478                 rec( 14, 4, ReservedOrDirectoryNumber ),
14479                 rec( 18, 4, FileOffset ),
14480                 rec( 22, 4, InspectSize ),
14481         rec( 26, 1, DataTypeFlag ),
14482         rec( 27, 2, MaxReadDataReplySize ),
14483                 rec( 29, (2,512), EAKey ),
14484         ], info_str=(EAKey, "Read Extended Attribute: %s", ", %s"))
14485         pkt.Reply((26,536), [
14486                 rec( 8, 4, EAErrorCodes ),
14487                 rec( 12, 4, TtlValuesLength ),
14488                 rec( 16, 4, NewEAHandle ),
14489                 rec( 20, 4, EAAccessFlag ),
14490                 rec( 24, (2,512), EAValue ),
14491         ])
14492         pkt.CompletionCodes([0x0000, 0xa901, 0xaa00, 0xc900, 0xce00, 0xcf00, 0xd101,
14493                              0xd301])
14494         # 2222/5936, 89/54
14495         pkt = NCP(0x5936, "Enumerate Extended Attribute", 'enhanced', has_length=0 )
14496         pkt.Request((27,537), [
14497                 rec( 8, 2, EAFlags ),
14498                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
14499                 rec( 14, 4, ReservedOrDirectoryNumber ),
14500                 rec( 18, 4, InspectSize ),
14501                 rec( 22, 2, SequenceNumber ),
14502         rec( 24, 1, DataTypeFlag ),
14503                 rec( 25, (2,512), EAKey ),
14504         ], info_str=(EAKey, "Enumerate Extended Attribute: %s", ", %s"))
14505         pkt.Reply(28, [
14506                 rec( 8, 4, EAErrorCodes ),
14507                 rec( 12, 4, TtlEAs ),
14508                 rec( 16, 4, TtlEAsDataSize ),
14509                 rec( 20, 4, TtlEAsKeySize ),
14510                 rec( 24, 4, NewEAHandle ),
14511         ])
14512         pkt.CompletionCodes([0x0000, 0x8800, 0xa901, 0xaa00, 0xc900, 0xce00, 0xcf00, 0xd101,
14513                              0xd301])
14514         # 2222/5947, 89/71
14515         pkt = NCP(0x5947, "Scan Volume Trustee Object Paths", 'enhanced', has_length=0)
14516         pkt.Request(21, [
14517                 rec( 8, 4, VolumeID  ),
14518                 rec( 12, 4, ObjectID ),
14519                 rec( 16, 4, SequenceNumber ),
14520                 rec( 20, 1, DataTypeFlag ),
14521         ])
14522         pkt.Reply((20,273), [
14523                 rec( 8, 4, SequenceNumber ),
14524                 rec( 12, 4, ObjectID ),
14525         rec( 16, 1, TrusteeAccessMask ),
14526                 rec( 17, 1, PathCount, var="x" ),
14527                 rec( 18, (2,255), Path16, repeat="x" ),
14528         ])
14529         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
14530                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14531                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14532         # 2222/5A01, 90/00
14533         pkt = NCP(0x5A00, "Parse Tree", 'file')
14534         pkt.Request(46, [
14535                 rec( 10, 4, InfoMask ),
14536                 rec( 14, 4, Reserved4 ),
14537                 rec( 18, 4, Reserved4 ),
14538                 rec( 22, 4, limbCount ),
14539         rec( 26, 4, limbFlags ),
14540         rec( 30, 4, VolumeNumberLong ),
14541         rec( 34, 4, DirectoryBase ),
14542         rec( 38, 4, limbScanNum ),       
14543         rec( 42, 4, NameSpace ),
14544         ])
14545         pkt.Reply(32, [
14546                 rec( 8, 4, limbCount ),
14547                 rec( 12, 4, ItemsCount ),
14548                 rec( 16, 4, nextLimbScanNum ),
14549                 rec( 20, 4, CompletionCode ),
14550                 rec( 24, 1, FolderFlag ),
14551                 rec( 25, 3, Reserved ),
14552                 rec( 28, 4, DirectoryBase ),
14553         ])
14554         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14555                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14556                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
14557         # 2222/5A0A, 90/10
14558         pkt = NCP(0x5A0A, "Get Reference Count from Dir Entry Number", 'file')
14559         pkt.Request(19, [
14560                 rec( 10, 4, VolumeNumberLong ),
14561                 rec( 14, 4, DirectoryBase ),
14562                 rec( 18, 1, NameSpace ),
14563         ])
14564         pkt.Reply(12, [
14565                 rec( 8, 4, ReferenceCount ),
14566         ])
14567         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14568                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14569                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
14570         # 2222/5A0B, 90/11
14571         pkt = NCP(0x5A0B, "Get Reference Count from Dir Handle", 'file')
14572         pkt.Request(14, [
14573                 rec( 10, 4, DirHandle ),
14574         ])
14575         pkt.Reply(12, [
14576                 rec( 8, 4, ReferenceCount ),
14577         ])
14578         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14579                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14580                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
14581         # 2222/5A0C, 90/12
14582         pkt = NCP(0x5A0C, "Set Compressed File Size", 'file')
14583         pkt.Request(20, [
14584                 rec( 10, 6, FileHandle ),
14585                 rec( 16, 4, SuggestedFileSize ),
14586         ])
14587         pkt.Reply(16, [
14588                 rec( 8, 4, OldFileSize ),
14589                 rec( 12, 4, NewFileSize ),
14590         ])
14591         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14592                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14593                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
14594         # 2222/5A80, 90/128
14595         pkt = NCP(0x5A80, "Move File Data To Data Migration", 'migration')
14596         pkt.Request(27, [
14597                 rec( 10, 4, VolumeNumberLong ),
14598                 rec( 14, 4, DirectoryEntryNumber ),
14599                 rec( 18, 1, NameSpace ),
14600                 rec( 19, 3, Reserved ),
14601                 rec( 22, 4, SupportModuleID ),
14602                 rec( 26, 1, DMFlags ),
14603         ])
14604         pkt.Reply(8)
14605         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14606                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14607                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14608         # 2222/5A81, 90/129
14609         pkt = NCP(0x5A81, "Data Migration File Information", 'migration')
14610         pkt.Request(19, [
14611                 rec( 10, 4, VolumeNumberLong ),
14612                 rec( 14, 4, DirectoryEntryNumber ),
14613                 rec( 18, 1, NameSpace ),
14614         ])
14615         pkt.Reply(24, [
14616                 rec( 8, 4, SupportModuleID ),
14617                 rec( 12, 4, RestoreTime ),
14618                 rec( 16, 4, DMInfoEntries, var="x" ),
14619                 rec( 20, 4, DataSize, repeat="x" ),
14620         ])
14621         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14622                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14623                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14624         # 2222/5A82, 90/130
14625         pkt = NCP(0x5A82, "Volume Data Migration Status", 'migration')
14626         pkt.Request(18, [
14627                 rec( 10, 4, VolumeNumberLong ),
14628                 rec( 14, 4, SupportModuleID ),
14629         ])
14630         pkt.Reply(32, [
14631                 rec( 8, 4, NumOfFilesMigrated ),
14632                 rec( 12, 4, TtlMigratedSize ),
14633                 rec( 16, 4, SpaceUsed ),
14634                 rec( 20, 4, LimboUsed ),
14635                 rec( 24, 4, SpaceMigrated ),
14636                 rec( 28, 4, FileLimbo ),
14637         ])
14638         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14639                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14640                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14641         # 2222/5A83, 90/131
14642         pkt = NCP(0x5A83, "Migrator Status Info", 'migration')
14643         pkt.Request(10)
14644         pkt.Reply(20, [
14645                 rec( 8, 1, DMPresentFlag ),
14646                 rec( 9, 3, Reserved3 ),
14647                 rec( 12, 4, DMmajorVersion ),
14648                 rec( 16, 4, DMminorVersion ),
14649         ])
14650         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14651                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14652                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14653         # 2222/5A84, 90/132
14654         pkt = NCP(0x5A84, "Data Migration Support Module Information", 'migration')
14655         pkt.Request(18, [
14656                 rec( 10, 1, DMInfoLevel ),
14657                 rec( 11, 3, Reserved3),
14658                 rec( 14, 4, SupportModuleID ),
14659         ])
14660         pkt.Reply(NO_LENGTH_CHECK, [
14661                 srec( DMInfoLevel0, req_cond="ncp.dm_info_level == 0x00" ),
14662                 srec( DMInfoLevel1, req_cond="ncp.dm_info_level == 0x01" ),
14663                 srec( DMInfoLevel2, req_cond="ncp.dm_info_level == 0x02" ),
14664         ])
14665         pkt.ReqCondSizeVariable()
14666         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14667                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14668                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14669         # 2222/5A85, 90/133
14670         pkt = NCP(0x5A85, "Move File Data From Data Migration", 'migration')
14671         pkt.Request(19, [
14672                 rec( 10, 4, VolumeNumberLong ),
14673                 rec( 14, 4, DirectoryEntryNumber ),
14674                 rec( 18, 1, NameSpace ),
14675         ])
14676         pkt.Reply(8)
14677         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14678                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14679                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14680         # 2222/5A86, 90/134
14681         pkt = NCP(0x5A86, "Get/Set Default Read-Write Support Module ID", 'migration')
14682         pkt.Request(18, [
14683                 rec( 10, 1, GetSetFlag ),
14684                 rec( 11, 3, Reserved3 ),
14685                 rec( 14, 4, SupportModuleID ),
14686         ])
14687         pkt.Reply(12, [
14688                 rec( 8, 4, SupportModuleID ),
14689         ])
14690         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14691                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14692                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14693         # 2222/5A87, 90/135
14694         pkt = NCP(0x5A87, "Data Migration Support Module Capacity Request", 'migration')
14695         pkt.Request(22, [
14696                 rec( 10, 4, SupportModuleID ),
14697                 rec( 14, 4, VolumeNumberLong ),
14698                 rec( 18, 4, DirectoryBase ),
14699         ])
14700         pkt.Reply(20, [
14701                 rec( 8, 4, BlockSizeInSectors ),
14702                 rec( 12, 4, TotalBlocks ),
14703                 rec( 16, 4, UsedBlocks ),
14704         ])
14705         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14706                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14707                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14708         # 2222/5A88, 90/136
14709         pkt = NCP(0x5A88, "RTDM Request", 'migration')
14710         pkt.Request(15, [
14711                 rec( 10, 4, Verb ),
14712                 rec( 14, 1, VerbData ),
14713         ])
14714         pkt.Reply(8)
14715         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14716                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14717                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14718     # 2222/5A96, 90/150
14719         pkt = NCP(0x5A96, "File Migration Request", 'file')
14720         pkt.Request(22, [
14721                 rec( 10, 4, VolumeNumberLong ),
14722         rec( 14, 4, DirectoryBase ),
14723         rec( 18, 4, FileMigrationState ),
14724         ])
14725         pkt.Reply(8)
14726         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14727                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14728                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfb00, 0xff16])
14729     # 2222/5C, 91
14730         pkt = NCP(0x5B, "NMAS Graded Authentication", 'nmas')
14731         #Need info on this packet structure
14732         pkt.Request(7)
14733         pkt.Reply(8)
14734         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14735                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
14736                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14737         # SecretStore data is dissected by packet-ncp-sss.c
14738     # 2222/5C01, 9201                                                  
14739         pkt = NCP(0x5C01, "SecretStore Services (Ping Server)", 'sss', 0)
14740         pkt.Request(8)
14741         pkt.Reply(8)
14742         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14743                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
14744                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14745         # 2222/5C02, 9202
14746         pkt = NCP(0x5C02, "SecretStore Services (Fragment)", 'sss', 0)
14747         pkt.Request(8)
14748         pkt.Reply(8)
14749         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14750                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
14751                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14752         # 2222/5C03, 9203
14753         pkt = NCP(0x5C03, "SecretStore Services (Write App Secrets)", 'sss', 0)
14754         pkt.Request(8)
14755         pkt.Reply(8)
14756         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14757                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
14758                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14759         # 2222/5C04, 9204
14760         pkt = NCP(0x5C04, "SecretStore Services (Add Secret ID)", 'sss', 0)
14761         pkt.Request(8)
14762         pkt.Reply(8)
14763         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14764                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
14765                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14766         # 2222/5C05, 9205
14767         pkt = NCP(0x5C05, "SecretStore Services (Remove Secret ID)", 'sss', 0)
14768         pkt.Request(8)
14769         pkt.Reply(8)
14770         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14771                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
14772                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14773         # 2222/5C06, 9206
14774         pkt = NCP(0x5C06, "SecretStore Services (Remove SecretStore)", 'sss', 0)
14775         pkt.Request(8)
14776         pkt.Reply(8)
14777         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14778                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
14779                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14780         # 2222/5C07, 9207
14781         pkt = NCP(0x5C07, "SecretStore Services (Enumerate Secret IDs)", 'sss', 0)
14782         pkt.Request(8)
14783         pkt.Reply(8)
14784         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14785                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
14786                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14787         # 2222/5C08, 9208
14788         pkt = NCP(0x5C08, "SecretStore Services (Unlock Store)", 'sss', 0)
14789         pkt.Request(8)
14790         pkt.Reply(8)
14791         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14792                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
14793                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14794         # 2222/5C09, 9209
14795         pkt = NCP(0x5C09, "SecretStore Services (Set Master Password)", 'sss', 0)
14796         pkt.Request(8)
14797         pkt.Reply(8)
14798         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14799                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
14800                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14801         # 2222/5C0a, 9210
14802         pkt = NCP(0x5C0a, "SecretStore Services (Get Service Information)", 'sss', 0)
14803         pkt.Request(8)
14804         pkt.Reply(8)
14805         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14806                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
14807                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14808     # NMAS packets are dissected in packet-ncp-nmas.c
14809         # 2222/5E, 9401
14810         pkt = NCP(0x5E01, "NMAS Communications Packet (Ping)", 'nmas', 0)
14811         pkt.Request(8)
14812         pkt.Reply(8)
14813         pkt.CompletionCodes([0x0000, 0xfb09, 0xff08])
14814         # 2222/5E, 9402
14815         pkt = NCP(0x5E02, "NMAS Communications Packet (Fragment)", 'nmas', 0)
14816         pkt.Request(8)
14817         pkt.Reply(8)
14818         pkt.CompletionCodes([0x0000, 0xfb09, 0xff08])
14819         # 2222/5E, 9403
14820         pkt = NCP(0x5E03, "NMAS Communications Packet (Abort)", 'nmas', 0)
14821         pkt.Request(8)
14822         pkt.Reply(8)
14823         pkt.CompletionCodes([0x0000, 0xfb09, 0xff08])
14824         # 2222/61, 97
14825         pkt = NCP(0x61, "Get Big Packet NCP Max Packet Size", 'connection')
14826         pkt.Request(10, [
14827                 rec( 7, 2, ProposedMaxSize, BE ),
14828                 rec( 9, 1, SecurityFlag ),
14829         ],info_str=(ProposedMaxSize, "Get Big Max Packet Size - %d", ", %d"))
14830         pkt.Reply(13, [
14831                 rec( 8, 2, AcceptedMaxSize, BE ),
14832                 rec( 10, 2, EchoSocket, BE ),
14833                 rec( 12, 1, SecurityFlag ),
14834         ])
14835         pkt.CompletionCodes([0x0000])
14836         # 2222/63, 99
14837         pkt = NCP(0x63, "Undocumented Packet Burst", 'pburst')
14838         pkt.Request(7)
14839         pkt.Reply(8)
14840         pkt.CompletionCodes([0x0000])
14841         # 2222/64, 100
14842         pkt = NCP(0x64, "Undocumented Packet Burst", 'pburst')
14843         pkt.Request(7)
14844         pkt.Reply(8)
14845         pkt.CompletionCodes([0x0000])
14846         # 2222/65, 101
14847         pkt = NCP(0x65, "Packet Burst Connection Request", 'pburst')
14848         pkt.Request(25, [
14849                 rec( 7, 4, LocalConnectionID, BE ),
14850                 rec( 11, 4, LocalMaxPacketSize, BE ),
14851                 rec( 15, 2, LocalTargetSocket, BE ),
14852                 rec( 17, 4, LocalMaxSendSize, BE ),
14853                 rec( 21, 4, LocalMaxRecvSize, BE ),
14854         ])
14855         pkt.Reply(16, [
14856                 rec( 8, 4, RemoteTargetID, BE ),
14857                 rec( 12, 4, RemoteMaxPacketSize, BE ),
14858         ])
14859         pkt.CompletionCodes([0x0000])
14860         # 2222/66, 102
14861         pkt = NCP(0x66, "Undocumented Packet Burst", 'pburst')
14862         pkt.Request(7)
14863         pkt.Reply(8)
14864         pkt.CompletionCodes([0x0000])
14865         # 2222/67, 103
14866         pkt = NCP(0x67, "Undocumented Packet Burst", 'pburst')
14867         pkt.Request(7)
14868         pkt.Reply(8)
14869         pkt.CompletionCodes([0x0000])
14870         # 2222/6801, 104/01
14871         pkt = NCP(0x6801, "Ping for NDS NCP", "nds", has_length=0)
14872         pkt.Request(8)
14873         pkt.Reply(8)
14874         pkt.ReqCondSizeVariable()
14875         pkt.CompletionCodes([0x0000, 0x8100, 0xfb04, 0xfe0c])
14876         # 2222/6802, 104/02
14877         #
14878         # XXX - if FraggerHandle is not 0xffffffff, this is not the
14879         # first fragment, so we can only dissect this by reassembling;
14880         # the fields after "Fragment Handle" are bogus for non-0xffffffff
14881         # fragments, so we shouldn't dissect them.
14882         #
14883         # XXX - are there TotalRequest requests in the packet, and
14884         # does each of them have NDSFlags and NDSVerb fields, or
14885         # does only the first one have it?
14886         #
14887         pkt = NCP(0x6802, "Send NDS Fragmented Request/Reply", "nds", has_length=0)
14888         pkt.Request(8)
14889         pkt.Reply(8)
14890         pkt.ReqCondSizeVariable()
14891         pkt.CompletionCodes([0x0000, 0xfd01])
14892         # 2222/6803, 104/03
14893         pkt = NCP(0x6803, "Fragment Close", "nds", has_length=0)
14894         pkt.Request(12, [
14895                 rec( 8, 4, FraggerHandle ),
14896         ])
14897         pkt.Reply(8)
14898         pkt.CompletionCodes([0x0000, 0xff00])
14899         # 2222/6804, 104/04
14900         pkt = NCP(0x6804, "Return Bindery Context", "nds", has_length=0)
14901         pkt.Request(8)
14902         pkt.Reply((9, 263), [
14903                 rec( 8, (1,255), binderyContext ),
14904         ])
14905         pkt.CompletionCodes([0x0000, 0xfe0c, 0xff00])
14906         # 2222/6805, 104/05
14907         pkt = NCP(0x6805, "Monitor NDS Connection", "nds", has_length=0)
14908         pkt.Request(8)
14909         pkt.Reply(8)
14910         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
14911         # 2222/6806, 104/06
14912         pkt = NCP(0x6806, "Return NDS Statistics", "nds", has_length=0)
14913         pkt.Request(10, [
14914                 rec( 8, 2, NDSRequestFlags ),
14915         ])
14916         pkt.Reply(8)
14917         #Need to investigate how to decode Statistics Return Value
14918         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
14919         # 2222/6807, 104/07
14920         pkt = NCP(0x6807, "Clear NDS Statistics", "nds", has_length=0)
14921         pkt.Request(8)
14922         pkt.Reply(8)
14923         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
14924         # 2222/6808, 104/08
14925         pkt = NCP(0x6808, "Reload NDS Software", "nds", has_length=0)
14926         pkt.Request(8)
14927         pkt.Reply(12, [
14928                 rec( 8, 4, NDSStatus ),
14929         ])
14930         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
14931         # 2222/68C8, 104/200
14932         pkt = NCP(0x68C8, "Query Container Audit Status", "auditing", has_length=0)
14933         pkt.Request(12, [
14934                 rec( 8, 4, ConnectionNumber ),
14935         ])
14936         pkt.Reply(40, [
14937                 rec(8, 32, NWAuditStatus ),
14938         ])
14939         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
14940         # 2222/68CA, 104/202
14941         pkt = NCP(0x68CA, "Add Auditor Access", "auditing", has_length=0)
14942         pkt.Request(8)
14943         pkt.Reply(8)
14944         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
14945         # 2222/68CB, 104/203
14946         pkt = NCP(0x68CB, "Change Auditor Container Password", "auditing", has_length=0)
14947         pkt.Request(8)
14948         pkt.Reply(8)
14949         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
14950         # 2222/68CC, 104/204
14951         pkt = NCP(0x68CC, "Check Auditor Access", "auditing", has_length=0)
14952         pkt.Request(8)
14953         pkt.Reply(8)
14954         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
14955         # 2222/68CE, 104/206
14956         pkt = NCP(0x680CE, "Disable Container Auditing", "auditing", has_length=0)
14957         pkt.Request(8)
14958         pkt.Reply(8)
14959         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
14960         # 2222/68CF, 104/207
14961         pkt = NCP(0x68CF, "Enable Container Auditing", "auditing", has_length=0)
14962         pkt.Request(8)
14963         pkt.Reply(8)
14964         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
14965         # 2222/68D1, 104/209
14966         pkt = NCP(0x68D1, "Read Audit File Header", "auditing", has_length=0)
14967         pkt.Request(8)
14968         pkt.Reply(8)
14969         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
14970         # 2222/68D3, 104/211
14971         pkt = NCP(0x68D3, "Remove Auditor Access", "auditing", has_length=0)
14972         pkt.Request(8)
14973         pkt.Reply(8)
14974         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
14975         # 2222/68D4, 104/212
14976         pkt = NCP(0x68D4, "Reset Audit File", "auditing", has_length=0)
14977         pkt.Request(8)
14978         pkt.Reply(8)
14979         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
14980         # 2222/68D6, 104/214
14981         pkt = NCP(0x68D6, "Write Audit File Configuration Header", "auditing", has_length=0)
14982         pkt.Request(8)
14983         pkt.Reply(8)
14984         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
14985         # 2222/68D7, 104/215
14986         pkt = NCP(0x68D7, "Change Auditor Container Password2", "auditing", has_length=0)
14987         pkt.Request(8)
14988         pkt.Reply(8)
14989         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
14990         # 2222/68D8, 104/216
14991         pkt = NCP(0x68D8, "Return Audit Flags", "auditing", has_length=0)
14992         pkt.Request(8)
14993         pkt.Reply(8)
14994         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
14995         # 2222/68D9, 104/217
14996         pkt = NCP(0x68D9, "Close Old Audit File", "auditing", has_length=0)
14997         pkt.Request(8)
14998         pkt.Reply(8)
14999         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15000         # 2222/68DB, 104/219
15001         pkt = NCP(0x68DB, "Check Level Two Access", "auditing", has_length=0)
15002         pkt.Request(8)
15003         pkt.Reply(8)
15004         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15005         # 2222/68DC, 104/220
15006         pkt = NCP(0x68DC, "Check Object Audited", "auditing", has_length=0)
15007         pkt.Request(8)
15008         pkt.Reply(8)
15009         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15010         # 2222/68DD, 104/221
15011         pkt = NCP(0x68DD, "Change Object Audited", "auditing", has_length=0)
15012         pkt.Request(8)
15013         pkt.Reply(8)
15014         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15015         # 2222/68DE, 104/222
15016         pkt = NCP(0x68DE, "Return Old Audit File List", "auditing", has_length=0)
15017         pkt.Request(8)
15018         pkt.Reply(8)
15019         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15020         # 2222/68DF, 104/223
15021         pkt = NCP(0x68DF, "Init Audit File Reads", "auditing", has_length=0)
15022         pkt.Request(8)
15023         pkt.Reply(8)
15024         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15025         # 2222/68E0, 104/224
15026         pkt = NCP(0x68E0, "Read Auditing File", "auditing", has_length=0)
15027         pkt.Request(8)
15028         pkt.Reply(8)
15029         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15030         # 2222/68E1, 104/225
15031         pkt = NCP(0x68E1, "Delete Old Audit File", "auditing", has_length=0)
15032         pkt.Request(8)
15033         pkt.Reply(8)
15034         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15035         # 2222/68E5, 104/229
15036         pkt = NCP(0x68E5, "Set Audit Password", "auditing", has_length=0)
15037         pkt.Request(8)
15038         pkt.Reply(8)
15039         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15040         # 2222/68E7, 104/231
15041         pkt = NCP(0x68E7, "External Audit Append To File", "auditing", has_length=0)
15042         pkt.Request(8)
15043         pkt.Reply(8)
15044         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15045         # 2222/69, 105
15046         pkt = NCP(0x69, "Log File", 'sync')
15047         pkt.Request( (12, 267), [
15048                 rec( 7, 1, DirHandle ),
15049                 rec( 8, 1, LockFlag ),
15050                 rec( 9, 2, TimeoutLimit ),
15051                 rec( 11, (1, 256), FilePath ),
15052         ], info_str=(FilePath, "Log File: %s", "/%s"))
15053         pkt.Reply(8)
15054         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x9600, 0xfe0d, 0xff01])
15055         # 2222/6A, 106
15056         pkt = NCP(0x6A, "Lock File Set", 'sync')
15057         pkt.Request( 9, [
15058                 rec( 7, 2, TimeoutLimit ),
15059         ])
15060         pkt.Reply(8)
15061         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x9600, 0xfe0d, 0xff01])
15062         # 2222/6B, 107
15063         pkt = NCP(0x6B, "Log Logical Record", 'sync')
15064         pkt.Request( (11, 266), [
15065                 rec( 7, 1, LockFlag ),
15066                 rec( 8, 2, TimeoutLimit ),
15067                 rec( 10, (1, 256), SynchName ),
15068         ], info_str=(SynchName, "Log Logical Record: %s", ", %s"))
15069         pkt.Reply(8)
15070         pkt.CompletionCodes([0x0000, 0x7f00, 0x9600, 0xfe0d, 0xff01])
15071         # 2222/6C, 108
15072         pkt = NCP(0x6C, "Log Logical Record", 'sync')
15073         pkt.Request( 10, [
15074                 rec( 7, 1, LockFlag ),
15075                 rec( 8, 2, TimeoutLimit ),
15076         ])
15077         pkt.Reply(8)
15078         pkt.CompletionCodes([0x0000, 0x7f00, 0x9600, 0xfe0d, 0xff01])
15079         # 2222/6D, 109
15080         pkt = NCP(0x6D, "Log Physical Record", 'sync')
15081         pkt.Request(24, [
15082                 rec( 7, 1, LockFlag ),
15083                 rec( 8, 6, FileHandle ),
15084                 rec( 14, 4, LockAreasStartOffset ),
15085                 rec( 18, 4, LockAreaLen ),
15086                 rec( 22, 2, LockTimeout ),
15087         ])
15088         pkt.Reply(8)
15089         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
15090         # 2222/6E, 110
15091         pkt = NCP(0x6E, "Lock Physical Record Set", 'sync')
15092         pkt.Request(10, [
15093                 rec( 7, 1, LockFlag ),
15094                 rec( 8, 2, LockTimeout ),
15095         ])
15096         pkt.Reply(8)
15097         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
15098         # 2222/6F00, 111/00
15099         pkt = NCP(0x6F00, "Open/Create a Semaphore", 'sync', has_length=0)
15100         pkt.Request((10,521), [
15101                 rec( 8, 1, InitialSemaphoreValue ),
15102                 rec( 9, (1, 512), SemaphoreName ),
15103         ], info_str=(SemaphoreName, "Open/Create Semaphore: %s", ", %s"))
15104         pkt.Reply(13, [
15105                   rec( 8, 4, SemaphoreHandle ),
15106                   rec( 12, 1, SemaphoreOpenCount ),
15107         ])
15108         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
15109         # 2222/6F01, 111/01
15110         pkt = NCP(0x6F01, "Examine Semaphore", 'sync', has_length=0)
15111         pkt.Request(12, [
15112                 rec( 8, 4, SemaphoreHandle ),
15113         ])
15114         pkt.Reply(10, [
15115                   rec( 8, 1, SemaphoreValue ),
15116                   rec( 9, 1, SemaphoreOpenCount ),
15117         ])
15118         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
15119         # 2222/6F02, 111/02
15120         pkt = NCP(0x6F02, "Wait On (P) Semaphore", 'sync', has_length=0)
15121         pkt.Request(14, [
15122                 rec( 8, 4, SemaphoreHandle ),
15123                 rec( 12, 2, LockTimeout ),
15124         ])
15125         pkt.Reply(8)
15126         pkt.CompletionCodes([0x0000, 0x9600, 0xfe04, 0xff01])
15127         # 2222/6F03, 111/03
15128         pkt = NCP(0x6F03, "Signal (V) Semaphore", 'sync', has_length=0)
15129         pkt.Request(12, [
15130                 rec( 8, 4, SemaphoreHandle ),
15131         ])
15132         pkt.Reply(8)
15133         pkt.CompletionCodes([0x0000, 0x9600, 0xfe04, 0xff01])
15134         # 2222/6F04, 111/04
15135         pkt = NCP(0x6F04, "Close Semaphore", 'sync', has_length=0)
15136         pkt.Request(12, [
15137                 rec( 8, 4, SemaphoreHandle ),
15138         ])
15139         pkt.Reply(10, [
15140                 rec( 8, 1, SemaphoreOpenCount ),
15141                 rec( 9, 1, SemaphoreShareCount ),
15142         ])
15143         pkt.CompletionCodes([0x0000, 0x9600, 0xfe04, 0xff01])
15144         # 2222/7201, 114/01
15145         pkt = NCP(0x7201, "Timesync Get Time", 'tsync')
15146         pkt.Request(10)
15147         pkt.Reply(32,[
15148                 rec( 8, 12, theTimeStruct ),
15149                 rec(20, 8, eventOffset ),
15150                 rec(28, 4, eventTime ),
15151         ])
15152         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
15153         # 2222/7202, 114/02
15154         pkt = NCP(0x7202, "Timesync Exchange Time", 'tsync')
15155         pkt.Request((63,112), [
15156                 rec( 10, 4, protocolFlags ),
15157                 rec( 14, 4, nodeFlags ),
15158                 rec( 18, 8, sourceOriginateTime ),
15159                 rec( 26, 8, targetReceiveTime ),
15160                 rec( 34, 8, targetTransmitTime ),
15161                 rec( 42, 8, sourceReturnTime ),
15162                 rec( 50, 8, eventOffset ),
15163                 rec( 58, 4, eventTime ),
15164                 rec( 62, (1,50), ServerNameLen ),
15165         ], info_str=(ServerNameLen, "Timesync Exchange Time: %s", ", %s"))
15166         pkt.Reply((64,113), [
15167                 rec( 8, 3, Reserved3 ),
15168                 rec( 11, 4, protocolFlags ),
15169                 rec( 15, 4, nodeFlags ),
15170                 rec( 19, 8, sourceOriginateTime ),
15171                 rec( 27, 8, targetReceiveTime ),
15172                 rec( 35, 8, targetTransmitTime ),
15173                 rec( 43, 8, sourceReturnTime ),
15174                 rec( 51, 8, eventOffset ),
15175                 rec( 59, 4, eventTime ),
15176                 rec( 63, (1,50), ServerNameLen ),
15177         ])
15178         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
15179         # 2222/7205, 114/05
15180         pkt = NCP(0x7205, "Timesync Get Server List", 'tsync')
15181         pkt.Request(14, [
15182                 rec( 10, 4, StartNumber ),
15183         ])
15184         pkt.Reply(66, [
15185                 rec( 8, 4, nameType ),
15186                 rec( 12, 48, ServerName ),
15187                 rec( 60, 4, serverListFlags ),
15188                 rec( 64, 2, startNumberFlag ),
15189         ])
15190         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
15191         # 2222/7206, 114/06
15192         pkt = NCP(0x7206, "Timesync Set Server List", 'tsync')
15193         pkt.Request(14, [
15194                 rec( 10, 4, StartNumber ),
15195         ])
15196         pkt.Reply(66, [
15197                 rec( 8, 4, nameType ),
15198                 rec( 12, 48, ServerName ),
15199                 rec( 60, 4, serverListFlags ),
15200                 rec( 64, 2, startNumberFlag ),
15201         ])
15202         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
15203         # 2222/720C, 114/12
15204         pkt = NCP(0x720C, "Timesync Get Version", 'tsync')
15205         pkt.Request(10)
15206         pkt.Reply(12, [
15207                 rec( 8, 4, version ),
15208         ])
15209         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
15210         # 2222/7B01, 123/01
15211         pkt = NCP(0x7B01, "Get Cache Information", 'stats')
15212         pkt.Request(10)
15213         pkt.Reply(288, [
15214                 rec(8, 4, CurrentServerTime, LE),
15215                 rec(12, 1, VConsoleVersion ),
15216                 rec(13, 1, VConsoleRevision ),
15217                 rec(14, 2, Reserved2 ),
15218                 rec(16, 104, Counters ),
15219                 rec(120, 40, ExtraCacheCntrs ),
15220                 rec(160, 40, MemoryCounters ),
15221                 rec(200, 48, TrendCounters ),
15222                 rec(248, 40, CacheInfo ),
15223         ])
15224         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xff00])
15225         # 2222/7B02, 123/02
15226         pkt = NCP(0x7B02, "Get File Server Information", 'stats')
15227         pkt.Request(10)
15228         pkt.Reply(150, [
15229                 rec(8, 4, CurrentServerTime ),
15230                 rec(12, 1, VConsoleVersion ),
15231                 rec(13, 1, VConsoleRevision ),
15232                 rec(14, 2, Reserved2 ),
15233                 rec(16, 4, NCPStaInUseCnt ),
15234                 rec(20, 4, NCPPeakStaInUse ),
15235                 rec(24, 4, NumOfNCPReqs ),
15236                 rec(28, 4, ServerUtilization ),
15237                 rec(32, 96, ServerInfo ),
15238                 rec(128, 22, FileServerCounters ),
15239         ])
15240         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15241         # 2222/7B03, 123/03
15242         pkt = NCP(0x7B03, "NetWare File System Information", 'stats')
15243         pkt.Request(11, [
15244                 rec(10, 1, FileSystemID ),
15245         ])
15246         pkt.Reply(68, [
15247                 rec(8, 4, CurrentServerTime ),
15248                 rec(12, 1, VConsoleVersion ),
15249                 rec(13, 1, VConsoleRevision ),
15250                 rec(14, 2, Reserved2 ),
15251                 rec(16, 52, FileSystemInfo ),
15252         ])
15253         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15254         # 2222/7B04, 123/04
15255         pkt = NCP(0x7B04, "User Information", 'stats')
15256         pkt.Request(14, [
15257                 rec(10, 4, ConnectionNumber, LE ),
15258         ])
15259         pkt.Reply((85, 132), [
15260                 rec(8, 4, CurrentServerTime ),
15261                 rec(12, 1, VConsoleVersion ),
15262                 rec(13, 1, VConsoleRevision ),
15263                 rec(14, 2, Reserved2 ),
15264                 rec(16, 68, UserInformation ),
15265                 rec(84, (1, 48), UserName ),
15266         ])
15267         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15268         # 2222/7B05, 123/05
15269         pkt = NCP(0x7B05, "Packet Burst Information", 'stats')
15270         pkt.Request(10)
15271         pkt.Reply(216, [
15272                 rec(8, 4, CurrentServerTime ),
15273                 rec(12, 1, VConsoleVersion ),
15274                 rec(13, 1, VConsoleRevision ),
15275                 rec(14, 2, Reserved2 ),
15276                 rec(16, 200, PacketBurstInformation ),
15277         ])
15278         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15279         # 2222/7B06, 123/06
15280         pkt = NCP(0x7B06, "IPX SPX Information", 'stats')
15281         pkt.Request(10)
15282         pkt.Reply(94, [
15283                 rec(8, 4, CurrentServerTime ),
15284                 rec(12, 1, VConsoleVersion ),
15285                 rec(13, 1, VConsoleRevision ),
15286                 rec(14, 2, Reserved2 ),
15287                 rec(16, 34, IPXInformation ),
15288                 rec(50, 44, SPXInformation ),
15289         ])
15290         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15291         # 2222/7B07, 123/07
15292         pkt = NCP(0x7B07, "Garbage Collection Information", 'stats')
15293         pkt.Request(10)
15294         pkt.Reply(40, [
15295                 rec(8, 4, CurrentServerTime ),
15296                 rec(12, 1, VConsoleVersion ),
15297                 rec(13, 1, VConsoleRevision ),
15298                 rec(14, 2, Reserved2 ),
15299                 rec(16, 4, FailedAllocReqCnt ),
15300                 rec(20, 4, NumberOfAllocs ),
15301                 rec(24, 4, NoMoreMemAvlCnt ),
15302                 rec(28, 4, NumOfGarbageColl ),
15303                 rec(32, 4, FoundSomeMem ),
15304                 rec(36, 4, NumOfChecks ),
15305         ])
15306         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15307         # 2222/7B08, 123/08
15308         pkt = NCP(0x7B08, "CPU Information", 'stats')
15309         pkt.Request(14, [
15310                 rec(10, 4, CPUNumber ),
15311         ])
15312         pkt.Reply(51, [
15313                 rec(8, 4, CurrentServerTime ),
15314                 rec(12, 1, VConsoleVersion ),
15315                 rec(13, 1, VConsoleRevision ),
15316                 rec(14, 2, Reserved2 ),
15317                 rec(16, 4, NumberOfCPUs ),
15318                 rec(20, 31, CPUInformation ),
15319         ])
15320         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15321         # 2222/7B09, 123/09
15322         pkt = NCP(0x7B09, "Volume Switch Information", 'stats')
15323         pkt.Request(14, [
15324                 rec(10, 4, StartNumber )
15325         ])
15326         pkt.Reply(28, [
15327                 rec(8, 4, CurrentServerTime ),
15328                 rec(12, 1, VConsoleVersion ),
15329                 rec(13, 1, VConsoleRevision ),
15330                 rec(14, 2, Reserved2 ),
15331                 rec(16, 4, TotalLFSCounters ),
15332                 rec(20, 4, CurrentLFSCounters, var="x"),
15333                 rec(24, 4, LFSCounters, repeat="x"),
15334         ])
15335         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15336         # 2222/7B0A, 123/10
15337         pkt = NCP(0x7B0A, "Get NLM Loaded List", 'stats')
15338         pkt.Request(14, [
15339                 rec(10, 4, StartNumber )
15340         ])
15341         pkt.Reply(28, [
15342                 rec(8, 4, CurrentServerTime ),
15343                 rec(12, 1, VConsoleVersion ),
15344                 rec(13, 1, VConsoleRevision ),
15345                 rec(14, 2, Reserved2 ),
15346                 rec(16, 4, NLMcount ),
15347                 rec(20, 4, NLMsInList, var="x" ),
15348                 rec(24, 4, NLMNumbers, repeat="x" ),
15349         ])
15350         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15351         # 2222/7B0B, 123/11
15352         pkt = NCP(0x7B0B, "NLM Information", 'stats')
15353         pkt.Request(14, [
15354                 rec(10, 4, NLMNumber ),
15355         ])
15356         pkt.Reply((79,841), [
15357                 rec(8, 4, CurrentServerTime ),
15358                 rec(12, 1, VConsoleVersion ),
15359                 rec(13, 1, VConsoleRevision ),
15360                 rec(14, 2, Reserved2 ),
15361                 rec(16, 60, NLMInformation ),
15362                 rec(76, (1,255), FileName ),
15363                 rec(-1, (1,255), Name ),
15364                 rec(-1, (1,255), Copyright ),
15365         ])
15366         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15367         # 2222/7B0C, 123/12
15368         pkt = NCP(0x7B0C, "Get Directory Cache Information", 'stats')
15369         pkt.Request(10)
15370         pkt.Reply(72, [
15371                 rec(8, 4, CurrentServerTime ),
15372                 rec(12, 1, VConsoleVersion ),
15373                 rec(13, 1, VConsoleRevision ),
15374                 rec(14, 2, Reserved2 ),
15375                 rec(16, 56, DirCacheInfo ),
15376         ])
15377         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15378         # 2222/7B0D, 123/13
15379         pkt = NCP(0x7B0D, "Get Operating System Version Information", 'stats')
15380         pkt.Request(10)
15381         pkt.Reply(70, [
15382                 rec(8, 4, CurrentServerTime ),
15383                 rec(12, 1, VConsoleVersion ),
15384                 rec(13, 1, VConsoleRevision ),
15385                 rec(14, 2, Reserved2 ),
15386                 rec(16, 1, OSMajorVersion ),
15387                 rec(17, 1, OSMinorVersion ),
15388                 rec(18, 1, OSRevision ),
15389                 rec(19, 1, AccountVersion ),
15390                 rec(20, 1, VAPVersion ),
15391                 rec(21, 1, QueueingVersion ),
15392                 rec(22, 1, SecurityRestrictionVersion ),
15393                 rec(23, 1, InternetBridgeVersion ),
15394                 rec(24, 4, MaxNumOfVol ),
15395                 rec(28, 4, MaxNumOfConn ),
15396                 rec(32, 4, MaxNumOfUsers ),
15397                 rec(36, 4, MaxNumOfNmeSps ),
15398                 rec(40, 4, MaxNumOfLANS ),
15399                 rec(44, 4, MaxNumOfMedias ),
15400                 rec(48, 4, MaxNumOfStacks ),
15401                 rec(52, 4, MaxDirDepth ),
15402                 rec(56, 4, MaxDataStreams ),
15403                 rec(60, 4, MaxNumOfSpoolPr ),
15404                 rec(64, 4, ServerSerialNumber ),
15405                 rec(68, 2, ServerAppNumber ),
15406         ])
15407         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15408         # 2222/7B0E, 123/14
15409         pkt = NCP(0x7B0E, "Get Active Connection List by Type", 'stats')
15410         pkt.Request(15, [
15411                 rec(10, 4, StartConnNumber ),
15412                 rec(14, 1, ConnectionType ),
15413         ])
15414         pkt.Reply(528, [
15415                 rec(8, 4, CurrentServerTime ),
15416                 rec(12, 1, VConsoleVersion ),
15417                 rec(13, 1, VConsoleRevision ),
15418                 rec(14, 2, Reserved2 ),
15419                 rec(16, 512, ActiveConnBitList ),
15420         ])
15421         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfd01, 0xff00])
15422         # 2222/7B0F, 123/15
15423         pkt = NCP(0x7B0F, "Get NLM Resource Tag List", 'stats')
15424         pkt.Request(18, [
15425                 rec(10, 4, NLMNumber ),
15426                 rec(14, 4, NLMStartNumber ),
15427         ])
15428         pkt.Reply(37, [
15429                 rec(8, 4, CurrentServerTime ),
15430                 rec(12, 1, VConsoleVersion ),
15431                 rec(13, 1, VConsoleRevision ),
15432                 rec(14, 2, Reserved2 ),
15433                 rec(16, 4, TtlNumOfRTags ),
15434                 rec(20, 4, CurNumOfRTags ),
15435                 rec(24, 13, RTagStructure ),
15436         ])
15437         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15438         # 2222/7B10, 123/16
15439         pkt = NCP(0x7B10, "Enumerate Connection Information from Connection List", 'stats')
15440         pkt.Request(22, [
15441                 rec(10, 1, EnumInfoMask),
15442                 rec(11, 3, Reserved3),
15443                 rec(14, 4, itemsInList, var="x"),
15444                 rec(18, 4, connList, repeat="x"),
15445         ])
15446         pkt.Reply(NO_LENGTH_CHECK, [
15447                 rec(8, 4, CurrentServerTime ),
15448                 rec(12, 1, VConsoleVersion ),
15449                 rec(13, 1, VConsoleRevision ),
15450                 rec(14, 2, Reserved2 ),
15451                 rec(16, 4, ItemsInPacket ),
15452                 srec(netAddr, req_cond="ncp.enum_info_transport==TRUE"),
15453                 srec(timeInfo, req_cond="ncp.enum_info_time==TRUE"),
15454                 srec(nameInfo, req_cond="ncp.enum_info_name==TRUE"),
15455                 srec(lockInfo, req_cond="ncp.enum_info_lock==TRUE"),
15456                 srec(printInfo, req_cond="ncp.enum_info_print==TRUE"),
15457                 srec(statsInfo, req_cond="ncp.enum_info_stats==TRUE"),
15458                 srec(acctngInfo, req_cond="ncp.enum_info_account==TRUE"),
15459                 srec(authInfo, req_cond="ncp.enum_info_auth==TRUE"),
15460         ])
15461         pkt.ReqCondSizeVariable()
15462         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15463         # 2222/7B11, 123/17
15464         pkt = NCP(0x7B11, "Enumerate NCP Service Network Addresses", 'stats')
15465         pkt.Request(14, [
15466                 rec(10, 4, SearchNumber ),
15467         ])
15468         pkt.Reply(60, [
15469                 rec(8, 4, CurrentServerTime ),
15470                 rec(12, 1, VConsoleVersion ),
15471                 rec(13, 1, VConsoleRevision ),
15472                 rec(14, 2, ServerInfoFlags ),
15473                 rec(16, 16, GUID ),
15474                 rec(32, 4, NextSearchNum ),
15475                 rec(36, 4, ItemsInPacket, var="x"),
15476                 rec(40, 20, NCPNetworkAddress, repeat="x" ),
15477         ])
15478         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb01, 0xff00])
15479         # 2222/7B14, 123/20
15480         pkt = NCP(0x7B14, "Active LAN Board List", 'stats')
15481         pkt.Request(14, [
15482                 rec(10, 4, StartNumber ),
15483         ])
15484         pkt.Reply(28, [
15485                 rec(8, 4, CurrentServerTime ),
15486                 rec(12, 1, VConsoleVersion ),
15487                 rec(13, 1, VConsoleRevision ),
15488                 rec(14, 2, Reserved2 ),
15489                 rec(16, 4, MaxNumOfLANS ),
15490                 rec(20, 4, ItemsInPacket, var="x"),
15491                 rec(24, 4, BoardNumbers, repeat="x"),
15492         ])
15493         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15494         # 2222/7B15, 123/21
15495         pkt = NCP(0x7B15, "LAN Configuration Information", 'stats')
15496         pkt.Request(14, [
15497                 rec(10, 4, BoardNumber ),
15498         ])
15499         pkt.Reply(152, [
15500                 rec(8, 4, CurrentServerTime ),
15501                 rec(12, 1, VConsoleVersion ),
15502                 rec(13, 1, VConsoleRevision ),
15503                 rec(14, 2, Reserved2 ),
15504                 rec(16,136, LANConfigInfo ),
15505         ])
15506         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15507         # 2222/7B16, 123/22
15508         pkt = NCP(0x7B16, "LAN Common Counters Information", 'stats')
15509         pkt.Request(18, [
15510                 rec(10, 4, BoardNumber ),
15511                 rec(14, 4, BlockNumber ),
15512         ])
15513         pkt.Reply(86, [
15514                 rec(8, 4, CurrentServerTime ),
15515                 rec(12, 1, VConsoleVersion ),
15516                 rec(13, 1, VConsoleRevision ),
15517                 rec(14, 1, StatMajorVersion ),
15518                 rec(15, 1, StatMinorVersion ),
15519                 rec(16, 4, TotalCommonCnts ),
15520                 rec(20, 4, TotalCntBlocks ),
15521                 rec(24, 4, CustomCounters ),
15522                 rec(28, 4, NextCntBlock ),
15523                 rec(32, 54, CommonLanStruc ),
15524         ])
15525         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15526         # 2222/7B17, 123/23
15527         pkt = NCP(0x7B17, "LAN Custom Counters Information", 'stats')
15528         pkt.Request(18, [
15529                 rec(10, 4, BoardNumber ),
15530                 rec(14, 4, StartNumber ),
15531         ])
15532         pkt.Reply(25, [
15533                 rec(8, 4, CurrentServerTime ),
15534                 rec(12, 1, VConsoleVersion ),
15535                 rec(13, 1, VConsoleRevision ),
15536                 rec(14, 2, Reserved2 ),
15537                 rec(16, 4, NumOfCCinPkt, var="x"),
15538                 rec(20, 5, CustomCntsInfo, repeat="x"),
15539         ])
15540         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15541         # 2222/7B18, 123/24
15542         pkt = NCP(0x7B18, "LAN Name Information", 'stats')
15543         pkt.Request(14, [
15544                 rec(10, 4, BoardNumber ),
15545         ])
15546         pkt.Reply(19, [
15547                 rec(8, 4, CurrentServerTime ),
15548                 rec(12, 1, VConsoleVersion ),
15549                 rec(13, 1, VConsoleRevision ),
15550                 rec(14, 2, Reserved2 ),      
15551         rec(16, 3, BoardNameStruct ),
15552         ])
15553         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15554         # 2222/7B19, 123/25
15555         pkt = NCP(0x7B19, "LSL Information", 'stats')
15556         pkt.Request(10)
15557         pkt.Reply(90, [
15558                 rec(8, 4, CurrentServerTime ),
15559                 rec(12, 1, VConsoleVersion ),
15560                 rec(13, 1, VConsoleRevision ),
15561                 rec(14, 2, Reserved2 ),
15562                 rec(16, 74, LSLInformation ),
15563         ])
15564         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15565         # 2222/7B1A, 123/26
15566         pkt = NCP(0x7B1A, "LSL Logical Board Statistics", 'stats')
15567         pkt.Request(14, [
15568                 rec(10, 4, BoardNumber ),
15569         ])
15570         pkt.Reply(28, [
15571                 rec(8, 4, CurrentServerTime ),
15572                 rec(12, 1, VConsoleVersion ),
15573                 rec(13, 1, VConsoleRevision ),
15574                 rec(14, 2, Reserved2 ),
15575                 rec(16, 4, LogTtlTxPkts ),
15576                 rec(20, 4, LogTtlRxPkts ),
15577                 rec(24, 4, UnclaimedPkts ),
15578         ])
15579         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15580         # 2222/7B1B, 123/27
15581         pkt = NCP(0x7B1B, "MLID Board Information", 'stats')
15582         pkt.Request(14, [
15583                 rec(10, 4, BoardNumber ),
15584         ])
15585         pkt.Reply(44, [
15586                 rec(8, 4, CurrentServerTime ),
15587                 rec(12, 1, VConsoleVersion ),
15588                 rec(13, 1, VConsoleRevision ),
15589                 rec(14, 1, Reserved ),
15590                 rec(15, 1, NumberOfProtocols ),
15591                 rec(16, 28, MLIDBoardInfo ),
15592         ])
15593         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15594         # 2222/7B1E, 123/30
15595         pkt = NCP(0x7B1E, "Get Media Manager Object Information", 'stats')
15596         pkt.Request(14, [
15597                 rec(10, 4, ObjectNumber ),
15598         ])
15599         pkt.Reply(212, [
15600                 rec(8, 4, CurrentServerTime ),
15601                 rec(12, 1, VConsoleVersion ),
15602                 rec(13, 1, VConsoleRevision ),
15603                 rec(14, 2, Reserved2 ),
15604                 rec(16, 196, GenericInfoDef ),
15605         ])
15606         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15607         # 2222/7B1F, 123/31
15608         pkt = NCP(0x7B1F, "Get Media Manager Objects List", 'stats')
15609         pkt.Request(15, [
15610                 rec(10, 4, StartNumber ),
15611                 rec(14, 1, MediaObjectType ),
15612         ])
15613         pkt.Reply(28, [
15614                 rec(8, 4, CurrentServerTime ),
15615                 rec(12, 1, VConsoleVersion ),
15616                 rec(13, 1, VConsoleRevision ),
15617                 rec(14, 2, Reserved2 ),
15618                 rec(16, 4, nextStartingNumber ),
15619                 rec(20, 4, ObjectCount, var="x"),
15620                 rec(24, 4, ObjectID, repeat="x"),
15621         ])
15622         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15623         # 2222/7B20, 123/32
15624         pkt = NCP(0x7B20, "Get Media Manager Object Childrens List", 'stats')
15625         pkt.Request(22, [
15626                 rec(10, 4, StartNumber ),
15627                 rec(14, 1, MediaObjectType ),
15628                 rec(15, 3, Reserved3 ),
15629                 rec(18, 4, ParentObjectNumber ),
15630         ])
15631         pkt.Reply(28, [
15632                 rec(8, 4, CurrentServerTime ),
15633                 rec(12, 1, VConsoleVersion ),
15634                 rec(13, 1, VConsoleRevision ),
15635                 rec(14, 2, Reserved2 ),
15636                 rec(16, 4, nextStartingNumber ),
15637                 rec(20, 4, ObjectCount, var="x" ),
15638                 rec(24, 4, ObjectID, repeat="x" ),
15639         ])
15640         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15641         # 2222/7B21, 123/33
15642         pkt = NCP(0x7B21, "Get Volume Segment List", 'stats')
15643         pkt.Request(14, [
15644                 rec(10, 4, VolumeNumberLong ),
15645         ])
15646         pkt.Reply(32, [
15647                 rec(8, 4, CurrentServerTime ),
15648                 rec(12, 1, VConsoleVersion ),
15649                 rec(13, 1, VConsoleRevision ),
15650                 rec(14, 2, Reserved2 ),
15651                 rec(16, 4, NumOfSegments, var="x" ),
15652                 rec(20, 12, Segments, repeat="x" ),
15653         ])
15654         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15655         # 2222/7B22, 123/34
15656         pkt = NCP(0x7B22, "Get Volume Information by Level", 'stats')
15657         pkt.Request(15, [
15658                 rec(10, 4, VolumeNumberLong ),
15659                 rec(14, 1, InfoLevelNumber ),
15660         ])
15661         pkt.Reply(NO_LENGTH_CHECK, [
15662                 rec(8, 4, CurrentServerTime ),
15663                 rec(12, 1, VConsoleVersion ),
15664                 rec(13, 1, VConsoleRevision ),
15665                 rec(14, 2, Reserved2 ),
15666                 rec(16, 1, InfoLevelNumber ),
15667                 rec(17, 3, Reserved3 ),
15668                 srec(VolInfoStructure, req_cond="ncp.info_level_num==0x01"),
15669                 srec(VolInfo2Struct, req_cond="ncp.info_level_num==0x02"),
15670         ])
15671         pkt.ReqCondSizeVariable()
15672         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15673         # 2222/7B28, 123/40
15674         pkt = NCP(0x7B28, "Active Protocol Stacks", 'stats')
15675         pkt.Request(14, [
15676                 rec(10, 4, StartNumber ),
15677         ])
15678         pkt.Reply(48, [
15679                 rec(8, 4, CurrentServerTime ),
15680                 rec(12, 1, VConsoleVersion ),
15681                 rec(13, 1, VConsoleRevision ),
15682                 rec(14, 2, Reserved2 ),
15683                 rec(16, 4, MaxNumOfLANS ),
15684                 rec(20, 4, StackCount, var="x" ),
15685                 rec(24, 4, nextStartingNumber ),
15686                 rec(28, 20, StackInfo, repeat="x" ),
15687         ])
15688         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15689         # 2222/7B29, 123/41
15690         pkt = NCP(0x7B29, "Get Protocol Stack Configuration Information", 'stats')
15691         pkt.Request(14, [
15692                 rec(10, 4, StackNumber ),
15693         ])
15694         pkt.Reply((37,164), [
15695                 rec(8, 4, CurrentServerTime ),
15696                 rec(12, 1, VConsoleVersion ),
15697                 rec(13, 1, VConsoleRevision ),
15698                 rec(14, 2, Reserved2 ),
15699                 rec(16, 1, ConfigMajorVN ),
15700                 rec(17, 1, ConfigMinorVN ),
15701                 rec(18, 1, StackMajorVN ),
15702                 rec(19, 1, StackMinorVN ),
15703                 rec(20, 16, ShortStkName ),
15704                 rec(36, (1,128), StackFullNameStr ),
15705         ])
15706         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15707         # 2222/7B2A, 123/42
15708         pkt = NCP(0x7B2A, "Get Protocol Stack Statistics Information", 'stats')
15709         pkt.Request(14, [
15710                 rec(10, 4, StackNumber ),
15711         ])
15712         pkt.Reply(38, [
15713                 rec(8, 4, CurrentServerTime ),
15714                 rec(12, 1, VConsoleVersion ),
15715                 rec(13, 1, VConsoleRevision ),
15716                 rec(14, 2, Reserved2 ),
15717                 rec(16, 1, StatMajorVersion ),
15718                 rec(17, 1, StatMinorVersion ),
15719                 rec(18, 2, ComCnts ),
15720                 rec(20, 4, CounterMask ),
15721                 rec(24, 4, TotalTxPkts ),
15722                 rec(28, 4, TotalRxPkts ),
15723                 rec(32, 4, IgnoredRxPkts ),
15724                 rec(36, 2, CustomCnts ),
15725         ])
15726         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15727         # 2222/7B2B, 123/43
15728         pkt = NCP(0x7B2B, "Get Protocol Stack Custom Information", 'stats')
15729         pkt.Request(18, [
15730                 rec(10, 4, StackNumber ),
15731                 rec(14, 4, StartNumber ),
15732         ])
15733         pkt.Reply(25, [
15734                 rec(8, 4, CurrentServerTime ),
15735                 rec(12, 1, VConsoleVersion ),
15736                 rec(13, 1, VConsoleRevision ),
15737                 rec(14, 2, Reserved2 ),
15738                 rec(16, 4, CustomCount, var="x" ),
15739                 rec(20, 5, CustomCntsInfo, repeat="x" ),
15740         ])
15741         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15742         # 2222/7B2C, 123/44
15743         pkt = NCP(0x7B2C, "Get Protocol Stack Numbers by Media Number", 'stats')
15744         pkt.Request(14, [
15745                 rec(10, 4, MediaNumber ),
15746         ])
15747         pkt.Reply(24, [
15748                 rec(8, 4, CurrentServerTime ),
15749                 rec(12, 1, VConsoleVersion ),
15750                 rec(13, 1, VConsoleRevision ),
15751                 rec(14, 2, Reserved2 ),
15752                 rec(16, 4, StackCount, var="x" ),
15753                 rec(20, 4, StackNumber, repeat="x" ),
15754         ])
15755         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15756         # 2222/7B2D, 123/45
15757         pkt = NCP(0x7B2D, "Get Protocol Stack Numbers by LAN Board Number", 'stats')
15758         pkt.Request(14, [
15759                 rec(10, 4, BoardNumber ),
15760         ])
15761         pkt.Reply(24, [
15762                 rec(8, 4, CurrentServerTime ),
15763                 rec(12, 1, VConsoleVersion ),
15764                 rec(13, 1, VConsoleRevision ),
15765                 rec(14, 2, Reserved2 ),
15766                 rec(16, 4, StackCount, var="x" ),
15767                 rec(20, 4, StackNumber, repeat="x" ),
15768         ])
15769         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15770         # 2222/7B2E, 123/46
15771         pkt = NCP(0x7B2E, "Get Media Name by Media Number", 'stats')
15772         pkt.Request(14, [
15773                 rec(10, 4, MediaNumber ),
15774         ])
15775         pkt.Reply((17,144), [
15776                 rec(8, 4, CurrentServerTime ),
15777                 rec(12, 1, VConsoleVersion ),
15778                 rec(13, 1, VConsoleRevision ),
15779                 rec(14, 2, Reserved2 ),
15780                 rec(16, (1,128), MediaName ),
15781         ])
15782         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15783         # 2222/7B2F, 123/47
15784         pkt = NCP(0x7B2F, "Get Loaded Media Number", 'stats')
15785         pkt.Request(10)
15786         pkt.Reply(28, [
15787                 rec(8, 4, CurrentServerTime ),
15788                 rec(12, 1, VConsoleVersion ),
15789                 rec(13, 1, VConsoleRevision ),
15790                 rec(14, 2, Reserved2 ),
15791                 rec(16, 4, MaxNumOfMedias ),
15792                 rec(20, 4, MediaListCount, var="x" ),
15793                 rec(24, 4, MediaList, repeat="x" ),
15794         ])
15795         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
15796         # 2222/7B32, 123/50
15797         pkt = NCP(0x7B32, "Get General Router and SAP Information", 'stats')
15798         pkt.Request(10)
15799         pkt.Reply(37, [
15800                 rec(8, 4, CurrentServerTime ),
15801                 rec(12, 1, VConsoleVersion ),
15802                 rec(13, 1, VConsoleRevision ),
15803                 rec(14, 2, Reserved2 ),
15804                 rec(16, 2, RIPSocketNumber ),
15805                 rec(18, 2, Reserved2 ),
15806                 rec(20, 1, RouterDownFlag ),
15807                 rec(21, 3, Reserved3 ),
15808                 rec(24, 1, TrackOnFlag ),
15809                 rec(25, 3, Reserved3 ),
15810                 rec(28, 1, ExtRouterActiveFlag ),
15811                 rec(29, 3, Reserved3 ),
15812                 rec(32, 2, SAPSocketNumber ),
15813                 rec(34, 2, Reserved2 ),
15814                 rec(36, 1, RpyNearestSrvFlag ),
15815         ])
15816         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
15817         # 2222/7B33, 123/51
15818         pkt = NCP(0x7B33, "Get Network Router Information", 'stats')
15819         pkt.Request(14, [
15820                 rec(10, 4, NetworkNumber ),
15821         ])
15822         pkt.Reply(26, [
15823                 rec(8, 4, CurrentServerTime ),
15824                 rec(12, 1, VConsoleVersion ),
15825                 rec(13, 1, VConsoleRevision ),
15826                 rec(14, 2, Reserved2 ),
15827                 rec(16, 10, KnownRoutes ),
15828         ])
15829         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
15830         # 2222/7B34, 123/52
15831         pkt = NCP(0x7B34, "Get Network Routers Information", 'stats')
15832         pkt.Request(18, [
15833                 rec(10, 4, NetworkNumber),
15834                 rec(14, 4, StartNumber ),
15835         ])
15836         pkt.Reply(34, [
15837                 rec(8, 4, CurrentServerTime ),
15838                 rec(12, 1, VConsoleVersion ),
15839                 rec(13, 1, VConsoleRevision ),
15840                 rec(14, 2, Reserved2 ),
15841                 rec(16, 4, NumOfEntries, var="x" ),
15842                 rec(20, 14, RoutersInfo, repeat="x" ),
15843         ])
15844         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
15845         # 2222/7B35, 123/53
15846         pkt = NCP(0x7B35, "Get Known Networks Information", 'stats')
15847         pkt.Request(14, [
15848                 rec(10, 4, StartNumber ),
15849         ])
15850         pkt.Reply(30, [
15851                 rec(8, 4, CurrentServerTime ),
15852                 rec(12, 1, VConsoleVersion ),
15853                 rec(13, 1, VConsoleRevision ),
15854                 rec(14, 2, Reserved2 ),
15855                 rec(16, 4, NumOfEntries, var="x" ),
15856                 rec(20, 10, KnownRoutes, repeat="x" ),
15857         ])
15858         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
15859         # 2222/7B36, 123/54
15860         pkt = NCP(0x7B36, "Get Server Information", 'stats')
15861         pkt.Request((15,64), [
15862                 rec(10, 2, ServerType ),
15863                 rec(12, 2, Reserved2 ),
15864                 rec(14, (1,50), ServerNameLen ),
15865         ], info_str=(ServerNameLen, "Get Server Information: %s", ", %s"))
15866         pkt.Reply(30, [
15867                 rec(8, 4, CurrentServerTime ),
15868                 rec(12, 1, VConsoleVersion ),
15869                 rec(13, 1, VConsoleRevision ),
15870                 rec(14, 2, Reserved2 ),
15871                 rec(16, 12, ServerAddress ),
15872                 rec(28, 2, HopsToNet ),
15873         ])
15874         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
15875         # 2222/7B37, 123/55
15876         pkt = NCP(0x7B37, "Get Server Sources Information", 'stats')
15877         pkt.Request((19,68), [
15878                 rec(10, 4, StartNumber ),
15879                 rec(14, 2, ServerType ),
15880                 rec(16, 2, Reserved2 ),
15881                 rec(18, (1,50), ServerNameLen ),
15882         ], info_str=(ServerNameLen, "Get Server Sources Info: %s", ", %s"))
15883         pkt.Reply(32, [
15884                 rec(8, 4, CurrentServerTime ),
15885                 rec(12, 1, VConsoleVersion ),
15886                 rec(13, 1, VConsoleRevision ),
15887                 rec(14, 2, Reserved2 ),
15888                 rec(16, 4, NumOfEntries, var="x" ),
15889                 rec(20, 12, ServersSrcInfo, repeat="x" ),
15890         ])
15891         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
15892         # 2222/7B38, 123/56
15893         pkt = NCP(0x7B38, "Get Known Servers Information", 'stats')
15894         pkt.Request(16, [
15895                 rec(10, 4, StartNumber ),
15896                 rec(14, 2, ServerType ),
15897         ])
15898         pkt.Reply(35, [
15899                 rec(8, 4, CurrentServerTime ),
15900                 rec(12, 1, VConsoleVersion ),
15901                 rec(13, 1, VConsoleRevision ),
15902                 rec(14, 2, Reserved2 ),
15903                 rec(16, 4, NumOfEntries, var="x" ),
15904                 rec(20, 15, KnownServStruc, repeat="x" ),
15905         ])
15906         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
15907         # 2222/7B3C, 123/60
15908         pkt = NCP(0x7B3C, "Get Server Set Commands Information", 'stats')
15909         pkt.Request(14, [
15910                 rec(10, 4, StartNumber ),
15911         ])
15912         pkt.Reply(NO_LENGTH_CHECK, [
15913                 rec(8, 4, CurrentServerTime ),
15914                 rec(12, 1, VConsoleVersion ),
15915                 rec(13, 1, VConsoleRevision ),
15916                 rec(14, 2, Reserved2 ),
15917                 rec(16, 4, TtlNumOfSetCmds ),
15918                 rec(20, 4, nextStartingNumber ),
15919                 rec(24, 1, SetCmdType ),
15920                 rec(25, 3, Reserved3 ),
15921                 rec(28, 1, SetCmdCategory ),
15922                 rec(29, 3, Reserved3 ),
15923                 rec(32, 1, SetCmdFlags ),
15924                 rec(33, 3, Reserved3 ),
15925                 rec(36, 100, SetCmdName ),
15926                 rec(136, 4, SetCmdValueNum ),
15927         ])                
15928         pkt.ReqCondSizeVariable()
15929         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
15930         # 2222/7B3D, 123/61
15931         pkt = NCP(0x7B3D, "Get Server Set Categories", 'stats')
15932         pkt.Request(14, [
15933                 rec(10, 4, StartNumber ),
15934         ])
15935         pkt.Reply(NO_LENGTH_CHECK, [
15936                 rec(8, 4, CurrentServerTime ),
15937                 rec(12, 1, VConsoleVersion ),
15938                 rec(13, 1, VConsoleRevision ),
15939                 rec(14, 2, Reserved2 ),
15940                 rec(16, 4, NumberOfSetCategories ),
15941                 rec(20, 4, nextStartingNumber ),
15942                 rec(24, PROTO_LENGTH_UNKNOWN, CategoryName ),
15943         ])
15944         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
15945         # 2222/7B3E, 123/62
15946         pkt = NCP(0x7B3E, "Get Server Set Commands Information By Name", 'stats')
15947         pkt.Request(NO_LENGTH_CHECK, [
15948                 rec(10, PROTO_LENGTH_UNKNOWN, SetParmName ),
15949         ], info_str=(SetParmName, "Get Server Set Command Info for: %s", ", %s"))
15950         pkt.Reply(NO_LENGTH_CHECK, [
15951                 rec(8, 4, CurrentServerTime ),
15952                 rec(12, 1, VConsoleVersion ),
15953                 rec(13, 1, VConsoleRevision ),
15954                 rec(14, 2, Reserved2 ),
15955         rec(16, 4, TtlNumOfSetCmds ),
15956         rec(20, 4, nextStartingNumber ),
15957         rec(24, 1, SetCmdType ),
15958         rec(25, 3, Reserved3 ),
15959         rec(28, 1, SetCmdCategory ),
15960         rec(29, 3, Reserved3 ),
15961         rec(32, 1, SetCmdFlags ),
15962         rec(33, 3, Reserved3 ),
15963         rec(36, PROTO_LENGTH_UNKNOWN, SetCmdName ),
15964         ])                
15965         pkt.ReqCondSizeVariable()
15966         pkt.CompletionCodes([0x0000, 0x7e01, 0xc600, 0xfb06, 0xff00])
15967         # 2222/7B46, 123/70
15968         pkt = NCP(0x7B46, "Get Current Compressing File", 'stats')
15969         pkt.Request(14, [
15970                 rec(10, 4, VolumeNumberLong ),
15971         ])
15972         pkt.Reply(56, [
15973                 rec(8, 4, ParentID ),
15974                 rec(12, 4, DirectoryEntryNumber ),
15975                 rec(16, 4, compressionStage ),
15976                 rec(20, 4, ttlIntermediateBlks ),
15977                 rec(24, 4, ttlCompBlks ),
15978                 rec(28, 4, curIntermediateBlks ),
15979                 rec(32, 4, curCompBlks ),
15980                 rec(36, 4, curInitialBlks ),
15981                 rec(40, 4, fileFlags ),
15982                 rec(44, 4, projectedCompSize ),
15983                 rec(48, 4, originalSize ),
15984                 rec(52, 4, compressVolume ),
15985         ])
15986         pkt.CompletionCodes([0x0000, 0x7e00, 0x7901, 0xfb06, 0xff00])
15987         # 2222/7B47, 123/71
15988         pkt = NCP(0x7B47, "Get Current DeCompressing File Info List", 'stats')
15989         pkt.Request(14, [
15990                 rec(10, 4, VolumeNumberLong ),
15991         ])
15992         pkt.Reply(28, [
15993                 rec(8, 4, FileListCount ),
15994                 rec(12, 16, FileInfoStruct ),
15995         ])
15996         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
15997         # 2222/7B48, 123/72
15998         pkt = NCP(0x7B48, "Get Compression and Decompression Time and Counts", 'stats')
15999         pkt.Request(14, [
16000                 rec(10, 4, VolumeNumberLong ),
16001         ])
16002         pkt.Reply(64, [
16003                 rec(8, 56, CompDeCompStat ),
16004         ])
16005         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
16006         # 2222/8301, 131/01
16007         pkt = NCP(0x8301, "RPC Load an NLM", 'remote')
16008         pkt.Request(NO_LENGTH_CHECK, [
16009                 rec(10, 4, NLMLoadOptions ),
16010                 rec(14, 16, Reserved16 ),
16011                 rec(30, PROTO_LENGTH_UNKNOWN, PathAndName ),
16012         ], info_str=(PathAndName, "RPC Load NLM: %s", ", %s"))
16013         pkt.Reply(12, [
16014                 rec(8, 4, RPCccode ),
16015         ])
16016         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
16017         # 2222/8302, 131/02
16018         pkt = NCP(0x8302, "RPC Unload an NLM", 'remote')
16019         pkt.Request(NO_LENGTH_CHECK, [
16020                 rec(10, 20, Reserved20 ),
16021                 rec(30, PROTO_LENGTH_UNKNOWN, NLMName ),
16022         ], info_str=(NLMName, "RPC Unload NLM: %s", ", %s"))
16023         pkt.Reply(12, [
16024                 rec(8, 4, RPCccode ),
16025         ])
16026         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
16027         # 2222/8303, 131/03
16028         pkt = NCP(0x8303, "RPC Mount Volume", 'remote')
16029         pkt.Request(NO_LENGTH_CHECK, [
16030                 rec(10, 20, Reserved20 ),
16031                 rec(30, PROTO_LENGTH_UNKNOWN, VolumeNameStringz ),
16032         ], info_str=(VolumeNameStringz, "RPC Mount Volume: %s", ", %s"))
16033         pkt.Reply(32, [
16034                 rec(8, 4, RPCccode),
16035                 rec(12, 16, Reserved16 ),
16036                 rec(28, 4, VolumeNumberLong ),
16037         ])
16038         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
16039         # 2222/8304, 131/04
16040         pkt = NCP(0x8304, "RPC Dismount Volume", 'remote')
16041         pkt.Request(NO_LENGTH_CHECK, [
16042                 rec(10, 20, Reserved20 ),
16043                 rec(30, PROTO_LENGTH_UNKNOWN, VolumeNameStringz ),
16044         ], info_str=(VolumeNameStringz, "RPC Dismount Volume: %s", ", %s"))
16045         pkt.Reply(12, [
16046                 rec(8, 4, RPCccode ),
16047         ])
16048         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
16049         # 2222/8305, 131/05
16050         pkt = NCP(0x8305, "RPC Add Name Space To Volume", 'remote')
16051         pkt.Request(NO_LENGTH_CHECK, [
16052                 rec(10, 20, Reserved20 ),
16053                 rec(30, PROTO_LENGTH_UNKNOWN, AddNameSpaceAndVol ),
16054         ], info_str=(AddNameSpaceAndVol, "RPC Add Name Space to Volume: %s", ", %s"))
16055         pkt.Reply(12, [
16056                 rec(8, 4, RPCccode ),
16057         ])
16058         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
16059         # 2222/8306, 131/06
16060         pkt = NCP(0x8306, "RPC Set Command Value", 'remote')
16061         pkt.Request(NO_LENGTH_CHECK, [
16062                 rec(10, 1, SetCmdType ),
16063                 rec(11, 3, Reserved3 ),
16064                 rec(14, 4, SetCmdValueNum ),
16065                 rec(18, 12, Reserved12 ),
16066                 rec(30, PROTO_LENGTH_UNKNOWN, SetCmdName ),
16067                 #
16068                 # XXX - optional string, if SetCmdType is 0
16069                 #
16070         ], info_str=(SetCmdName, "RPC Set Command Value: %s", ", %s"))
16071         pkt.Reply(12, [
16072                 rec(8, 4, RPCccode ),
16073         ])
16074         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
16075         # 2222/8307, 131/07
16076         pkt = NCP(0x8307, "RPC Execute NCF File", 'remote')
16077         pkt.Request(NO_LENGTH_CHECK, [
16078                 rec(10, 20, Reserved20 ),
16079                 rec(30, PROTO_LENGTH_UNKNOWN, PathAndName ),
16080         ], info_str=(PathAndName, "RPC Execute NCF File: %s", ", %s"))
16081         pkt.Reply(12, [
16082                 rec(8, 4, RPCccode ),
16083         ])
16084         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
16085 if __name__ == '__main__':
16086 #       import profile
16087 #       filename = "ncp.pstats"
16088 #       profile.run("main()", filename)
16089 #
16090 #       import pstats
16091 #       sys.stdout = msg
16092 #       p = pstats.Stats(filename)
16093 #
16094 #       print "Stats sorted by cumulative time"
16095 #       p.strip_dirs().sort_stats('cumulative').print_stats()
16096 #
16097 #       print "Function callees"
16098 #       p.print_callees()
16099         main()