Fix a typo in the "Defined Name Spaces" field name.
[obnox/wireshark/wip.git] / 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  (where you can download an *.exe file which
19 installs a PDF)
20
21 or
22
23 http://developer.novell.com/ndk/doc/docui/index.htm#../ncp/ncp__enu/data/
24 for a badly-formatted HTML version of the same PDF.
25
26
27 $Id: ncp2222.py,v 1.49 2003/02/08 04:34:38 guy Exp $
28
29
30 Copyright (c) 2000-2002 by Gilbert Ramirez <gram@alumni.rice.edu>
31 and Greg Morris <GMORRIS@novell.com>.
32
33 This program is free software; you can redistribute it and/or
34 modify it under the terms of the GNU General Public License
35 as published by the Free Software Foundation; either version 2
36 of the License, or (at your option) any later version.
37  
38 This program is distributed in the hope that it will be useful,
39 but WITHOUT ANY WARRANTY; without even the implied warranty of
40 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
41 GNU General Public License for more details.
42  
43 You should have received a copy of the GNU General Public License
44 along with this program; if not, write to the Free Software
45 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
46 """
47
48 import os
49 import sys
50 import string
51 import getopt
52 import traceback
53
54 errors          = {}
55 groups          = {}
56 packets         = []
57 compcode_lists  = None
58 ptvc_lists      = None
59 msg             = None
60
61 REC_START       = 0
62 REC_LENGTH      = 1
63 REC_FIELD       = 2
64 REC_ENDIANNESS  = 3
65 REC_VAR         = 4
66 REC_REPEAT      = 5
67 REC_REQ_COND    = 6
68
69 NO_VAR          = -1
70 NO_REPEAT       = -1
71 NO_REQ_COND     = -1
72 NO_LENGTH_CHECK = -2
73
74
75 PROTO_LENGTH_UNKNOWN    = -1
76
77 global_highest_var = -1
78 global_req_cond = {}
79
80
81 REQ_COND_SIZE_VARIABLE = "REQ_COND_SIZE_VARIABLE"
82 REQ_COND_SIZE_CONSTANT = "REQ_COND_SIZE_CONSTANT"
83
84 ##############################################################################
85 # Global containers
86 ##############################################################################
87
88 class UniqueCollection:
89         """The UniqueCollection class stores objects which can be compared to other
90         objects of the same class. If two objects in the collection are equivalent,
91         only one is stored."""
92
93         def __init__(self, name):
94                 "Constructor"
95                 self.name = name
96                 self.members = []
97                 self.member_reprs = {}
98
99         def Add(self, object):
100                 """Add an object to the members lists, if a comparable object
101                 doesn't already exist. The object that is in the member list, that is
102                 either the object that was added or the comparable object that was
103                 already in the member list, is returned."""
104
105                 r = repr(object)
106                 # Is 'object' a duplicate of some other member?
107                 if self.member_reprs.has_key(r):
108                         return self.member_reprs[r]
109                 else:
110                         self.member_reprs[r] = object
111                         self.members.append(object)
112                         return object
113
114         def Members(self):
115                 "Returns the list of members."
116                 return self.members
117
118         def HasMember(self, object):
119                 "Does the list of members contain the object?"
120                 if self.members_reprs.has_key(repr(object)):
121                         return 1
122                 else:
123                         return 0
124
125 # This list needs to be defined before the NCP types are defined,
126 # because the NCP types are defined in the global scope, not inside
127 # a function's scope.
128 ptvc_lists      = UniqueCollection('PTVC Lists')
129
130 ##############################################################################
131
132 class NamedList:
133         "NamedList's keep track of PTVC's and Completion Codes"
134         def __init__(self, name, list):
135                 "Constructor"
136                 self.name = name
137                 self.list = list
138
139         def __cmp__(self, other):
140                 "Compare this NamedList to another"
141
142                 if isinstance(other, NamedList):
143                         return cmp(self.list, other.list)
144                 else:
145                         return 0
146
147
148         def Name(self, new_name = None):
149                 "Get/Set name of list"
150                 if new_name != None:
151                         self.name = new_name
152                 return self.name
153
154         def Records(self):
155                 "Returns record lists"
156                 return self.list
157
158         def Null(self):
159                 "Is there no list (different from an empty list)?"
160                 return self.list == None
161
162         def Empty(self):
163                 "It the list empty (different from a null list)?"
164                 assert(not self.Null())
165
166                 if self.list:
167                         return 0
168                 else:
169                         return 1
170
171         def __repr__(self):
172                 return repr(self.list)
173
174 class PTVC(NamedList):
175         """ProtoTree TVBuff Cursor List ("PTVC List") Class"""
176
177         def __init__(self, name, records):
178                 "Constructor"
179                 NamedList.__init__(self, name, [])
180
181                 global global_highest_var
182
183                 expected_offset = None
184                 highest_var = -1
185
186                 named_vars = {}
187
188                 # Make a PTVCRecord object for each list in 'records'
189                 for record in records:
190                         offset = record[REC_START]
191                         length = record[REC_LENGTH]
192                         field = record[REC_FIELD]
193                         endianness = record[REC_ENDIANNESS]
194
195                         # Variable
196                         var_name = record[REC_VAR]
197                         if var_name:
198                                 # Did we already define this var?
199                                 if named_vars.has_key(var_name):
200                                         sys.exit("%s has multiple %s vars." % \
201                                                 (name, var_name))
202
203                                 highest_var = highest_var + 1
204                                 var = highest_var
205                                 if highest_var > global_highest_var:
206                                     global_highest_var = highest_var
207                                 named_vars[var_name] = var
208                         else:
209                                 var = NO_VAR
210
211                         # Repeat
212                         repeat_name = record[REC_REPEAT]
213                         if repeat_name:
214                                 # Do we have this var?
215                                 if not named_vars.has_key(repeat_name):
216                                         sys.exit("%s does not have %s var defined." % \
217                                                 (name, var_name))
218                                 repeat = named_vars[repeat_name]
219                         else:
220                                 repeat = NO_REPEAT
221
222                         # Request Condition
223                         req_cond = record[REC_REQ_COND]
224                         if req_cond != NO_REQ_COND:
225                                 global_req_cond[req_cond] = None
226
227                         ptvc_rec = PTVCRecord(field, length, endianness, var, repeat, req_cond)
228
229                         if expected_offset == None:
230                                 expected_offset = offset
231
232                         elif expected_offset == -1:
233                                 pass
234
235                         elif expected_offset != offset and offset != -1:
236                                 msg.write("Expected offset in %s for %s to be %d\n" % \
237                                         (name, field.HFName(), expected_offset))
238                                 sys.exit(1)
239
240                         # We can't make a PTVC list from a variable-length
241                         # packet, unless the fields can tell us at run time
242                         # how long the packet is. That is, nstring8 is fine, since
243                         # the field has an integer telling us how long the string is.
244                         # Fields that don't have a length determinable at run-time
245                         # cannot be variable-length.
246                         if type(ptvc_rec.Length()) == type(()):
247                                 if isinstance(ptvc_rec.Field(), nstring):
248                                         expected_offset = -1
249                                         pass
250                                 elif isinstance(ptvc_rec.Field(), nbytes):
251                                         expected_offset = -1
252                                         pass
253                                 elif isinstance(ptvc_rec.Field(), struct):
254                                         expected_offset = -1
255                                         pass
256                                 else:
257                                         field = ptvc_rec.Field()
258                                         assert 0, "Cannot make PTVC from %s, type %s" % \
259                                                 (field.HFName(), field)
260
261                         elif expected_offset > -1:
262                                 if ptvc_rec.Length() < 0:
263                                         expected_offset = -1
264                                 else:
265                                         expected_offset = expected_offset + ptvc_rec.Length()
266
267
268                         self.list.append(ptvc_rec)
269
270         def ETTName(self):
271                 return "ett_%s" % (self.Name(),)
272
273
274         def Code(self):
275                 x =  "static const ptvc_record %s[] = {\n" % (self.Name())
276                 for ptvc_rec in self.list:
277                         x = x +  "\t%s,\n" % (ptvc_rec.Code())
278                 x = x + "\t{ NULL, 0, NULL, NO_ENDIANNESS, NO_VAR, NO_REPEAT, NO_REQ_COND, NCP_FMT_NONE }\n"
279                 x = x + "};\n"
280                 return x
281
282         def __repr__(self):
283                 x = ""
284                 for ptvc_rec in self.list:
285                         x = x + repr(ptvc_rec)
286                 return x
287
288
289 class PTVCBitfield(PTVC):
290         def __init__(self, name, vars):
291                 NamedList.__init__(self, name, [])
292
293                 for var in vars:
294                         ptvc_rec = PTVCRecord(var, var.Length(), var.Endianness(),
295                                 NO_VAR, NO_REPEAT, NO_REQ_COND)
296                         self.list.append(ptvc_rec)
297
298         def Code(self):
299                 ett_name = self.ETTName()
300                 x = "static gint %s;\n" % (ett_name,)
301
302                 x = x + "static const ptvc_record ptvc_%s[] = {\n" % (self.Name())
303                 for ptvc_rec in self.list:
304                         x = x +  "\t%s,\n" % (ptvc_rec.Code())
305                 x = x + "\t{ NULL, 0, NULL, NO_ENDIANNESS, NO_VAR, NO_REPEAT, NO_REQ_COND, NCP_FMT_NONE }\n"
306                 x = x + "};\n"
307
308                 x = x + "static const sub_ptvc_record %s = {\n" % (self.Name(),)
309                 x = x + "\t&%s,\n" % (ett_name,)
310                 x = x + "\tNULL,\n"
311                 x = x + "\tptvc_%s,\n" % (self.Name(),)
312                 x = x + "};\n"
313                 return x
314
315
316 class PTVCRecord:
317         def __init__(self, field, length, endianness, var, repeat, req_cond):
318                 "Constructor"
319                 self.field      = field
320                 self.length     = length
321                 self.endianness = endianness
322                 self.var        = var
323                 self.repeat     = repeat
324                 self.req_cond   = req_cond
325
326         def __cmp__(self, other):
327                 "Comparison operator"
328                 if self.field != other.field:
329                         return 1
330                 elif self.length < other.length:
331                         return -1
332                 elif self.length > other.length:
333                         return 1
334                 elif self.endianness != other.endianness:
335                         return 1
336                 else:
337                         return 0
338
339         def Code(self):
340                 # Nice textual representations
341                 if self.var == NO_VAR:
342                         var = "NO_VAR"
343                 else:
344                         var = self.var
345
346                 if self.repeat == NO_REPEAT:
347                         repeat = "NO_REPEAT"
348                 else:
349                         repeat = self.repeat
350
351                 if self.req_cond == NO_REQ_COND:
352                         req_cond = "NO_REQ_COND"
353                 else:
354                         req_cond = global_req_cond[self.req_cond]
355                         assert req_cond != None
356
357                 if isinstance(self.field, struct):
358                         return self.field.ReferenceString(var, repeat, req_cond)
359                 else:
360                         return self.RegularCode(var, repeat, req_cond)
361
362         def RegularCode(self, var, repeat, req_cond):
363                 "String representation"
364                 endianness = 'BE'
365                 if self.endianness == LE:
366                         endianness = 'LE'
367
368                 length = None
369
370                 if type(self.length) == type(0):
371                         length = self.length
372                 else:
373                         # This is for cases where a length is needed
374                         # in order to determine a following variable-length,
375                         # like nstring8, where 1 byte is needed in order
376                         # to determine the variable length.
377                         var_length = self.field.Length()
378                         if var_length > 0:
379                                 length = var_length
380
381                 if length == PROTO_LENGTH_UNKNOWN:
382                         # XXX length = "PROTO_LENGTH_UNKNOWN"
383                         pass
384
385                 assert length, "Length not handled for %s" % (self.field.HFName(),)
386
387                 sub_ptvc_name = self.field.PTVCName()
388                 if sub_ptvc_name != "NULL":
389                         sub_ptvc_name = "&%s" % (sub_ptvc_name,)
390
391
392                 return "{ &%s, %s, %s, %s, %s, %s, %s, %s }" % \
393                         (self.field.HFName(), length, sub_ptvc_name, 
394                         endianness, var, repeat, req_cond,
395                         self.field.SpecialFmt())
396
397         def Offset(self):
398                 return self.offset
399
400         def Length(self):
401                 return self.length
402
403         def Field(self):
404                 return self.field
405
406         def __repr__(self):
407                 return "{%s len=%s end=%s var=%s rpt=%s rqc=%s}" % \
408                         (self.field.HFName(), self.length,
409                         self.endianness, self.var, self.repeat, self.req_cond)
410
411 ##############################################################################
412
413 class NCP:
414         "NCP Packet class"
415         def __init__(self, func_code, description, group, has_length=1):
416                 "Constructor"
417                 self.func_code          = func_code
418                 self.description        = description
419                 self.group              = group
420                 self.codes              = None
421                 self.request_records    = None
422                 self.reply_records      = None
423                 self.has_length         = has_length
424                 self.req_cond_size      = None
425                 self.req_info_str       = None
426
427                 if not groups.has_key(group):
428                         msg.write("NCP 0x%x has invalid group '%s'\n" % \
429                                 (self.func_code, group))
430                         sys.exit(1)
431
432                 if self.HasSubFunction():
433                         # NCP Function with SubFunction
434                         self.start_offset = 10
435                 else:
436                         # Simple NCP Function
437                         self.start_offset = 7
438
439         def ReqCondSize(self):
440                 return self.req_cond_size
441
442         def ReqCondSizeVariable(self):
443                 self.req_cond_size = REQ_COND_SIZE_VARIABLE
444
445         def ReqCondSizeConstant(self):
446                 self.req_cond_size = REQ_COND_SIZE_CONSTANT
447
448         def FunctionCode(self, part=None):
449                 "Returns the function code for this NCP packet."
450                 if part == None:
451                         return self.func_code
452                 elif part == 'high':
453                         if self.HasSubFunction():
454                                 return (self.func_code & 0xff00) >> 8
455                         else:
456                                 return self.func_code
457                 elif part == 'low':
458                         if self.HasSubFunction():
459                                 return self.func_code & 0x00ff
460                         else:
461                                 return 0x00
462                 else:
463                         msg.write("Unknown directive '%s' for function_code()\n" % (part))
464                         sys.exit(1)
465
466         def HasSubFunction(self):
467                 "Does this NPC packet require a subfunction field?"
468                 if self.func_code <= 0xff:
469                         return 0
470                 else:
471                         return 1
472
473         def HasLength(self):
474                 return self.has_length
475
476         def Description(self):
477                 return self.description
478
479         def Group(self):
480                 return self.group
481
482         def PTVCRequest(self):
483                 return self.ptvc_request
484
485         def PTVCReply(self):
486                 return self.ptvc_reply
487
488         def Request(self, size, records=[], **kwargs):
489                 self.request_size = size
490                 self.request_records = records
491                 if self.HasSubFunction():
492                         if self.HasLength():
493                                 self.CheckRecords(size, records, "Request", 10)
494                         else:
495                                 self.CheckRecords(size, records, "Request", 8)
496                 else:
497                         self.CheckRecords(size, records, "Request", 7)
498                 self.ptvc_request = self.MakePTVC(records, "request")
499
500                 if kwargs.has_key("info_str"):
501                         self.req_info_str = kwargs["info_str"]
502
503         def Reply(self, size, records=[]):
504                 self.reply_size = size
505                 self.reply_records = records
506                 self.CheckRecords(size, records, "Reply", 8)
507                 self.ptvc_reply = self.MakePTVC(records, "reply")
508
509         def CheckRecords(self, size, records, descr, min_hdr_length):
510                 "Simple sanity check"
511                 if size == NO_LENGTH_CHECK:
512                         return
513                 min = size
514                 max = size
515                 if type(size) == type(()):
516                         min = size[0]
517                         max = size[1]
518
519                 lower = min_hdr_length
520                 upper = min_hdr_length
521
522                 for record in records:
523                         rec_size = record[REC_LENGTH]
524                         rec_lower = rec_size
525                         rec_upper = rec_size
526                         if type(rec_size) == type(()):
527                                 rec_lower = rec_size[0]
528                                 rec_upper = rec_size[1]
529
530                         lower = lower + rec_lower
531                         upper = upper + rec_upper
532
533                 error = 0
534                 if min != lower:
535                         msg.write("%s records for 2222/0x%x sum to %d bytes minimum, but param1 shows %d\n" \
536                                 % (descr, self.FunctionCode(), lower, min))
537                         error = 1
538                 if max != upper:
539                         msg.write("%s records for 2222/0x%x sum to %d bytes maximum, but param1 shows %d\n" \
540                                 % (descr, self.FunctionCode(), upper, max))
541                         error = 1
542
543                 if error == 1:
544                         sys.exit(1)
545
546
547         def MakePTVC(self, records, name_suffix):
548                 """Makes a PTVC out of a request or reply record list. Possibly adds
549                 it to the global list of PTVCs (the global list is a UniqueCollection,
550                 so an equivalent PTVC may already be in the global list)."""
551
552                 name = "%s_%s" % (self.CName(), name_suffix)
553                 ptvc = PTVC(name, records)
554                 return ptvc_lists.Add(ptvc)
555
556         def CName(self):
557                 "Returns a C symbol based on the NCP function code"
558                 return "ncp_0x%x" % (self.func_code)
559
560         def InfoStrName(self):
561                 "Returns a C symbol based on the NCP function code, for the info_str"
562                 return "info_str_0x%x" % (self.func_code)
563
564         def Variables(self):
565                 """Returns a list of variables used in the request and reply records.
566                 A variable is listed only once, even if it is used twice (once in
567                 the request, once in the reply)."""
568
569                 variables = {}
570                 if self.request_records:
571                         for record in self.request_records:
572                                 var = record[REC_FIELD]
573                                 variables[var.HFName()] = var
574
575                                 sub_vars = var.SubVariables()
576                                 for sv in sub_vars:
577                                         variables[sv.HFName()] = sv
578
579                 if self.reply_records:
580                         for record in self.reply_records:
581                                 var = record[REC_FIELD]
582                                 variables[var.HFName()] = var
583
584                                 sub_vars = var.SubVariables()
585                                 for sv in sub_vars:
586                                         variables[sv.HFName()] = sv
587
588                 return variables.values()
589
590         def CalculateReqConds(self):
591                 """Returns a list of request conditions (dfilter text) used
592                 in the reply records. A request condition is listed only once,
593                 even it it used twice. """
594                 texts = {}
595                 if self.reply_records:
596                         for record in self.reply_records:
597                                 text = record[REC_REQ_COND]
598                                 if text != NO_REQ_COND:
599                                         texts[text] = None
600
601                 if len(texts) == 0:
602                         self.req_conds = None
603                         return None
604
605                 dfilter_texts = texts.keys()
606                 dfilter_texts.sort()
607                 name = "%s_req_cond_indexes" % (self.CName(),)
608                 return NamedList(name, dfilter_texts)
609
610         def GetReqConds(self):
611                 return self.req_conds
612
613         def SetReqConds(self, new_val):
614                 self.req_conds = new_val
615
616
617         def CompletionCodes(self, codes=None):
618                 """Sets or returns the list of completion
619                 codes. Internally, a NamedList is used to store the
620                 completion codes, but the caller of this function never
621                 realizes that because Python lists are the input and
622                 output."""
623
624                 if codes == None:
625                         return self.codes
626
627                 # Sanity check
628                 okay = 1
629                 for code in codes:
630                         if not errors.has_key(code):
631                                 msg.write("Errors table does not have key 0x%04x for NCP=0x%x\n" % (code,
632                                         self.func_code))
633                                 okay = 0
634
635                 # Delay the exit until here so that the programmer can get
636                 # the complete list of missing error codes
637                 if not okay:
638                         sys.exit(1)
639
640                 # Create CompletionCode (NamedList) object and possible
641                 # add it to  the global list of completion code lists.
642                 name = "%s_errors" % (self.CName(),)
643                 codes.sort()
644                 codes_list = NamedList(name, codes)
645                 self.codes = compcode_lists.Add(codes_list)
646
647                 self.Finalize()
648
649         def Finalize(self):
650                 """Adds the NCP object to the global collection of NCP
651                 objects. This is done automatically after setting the
652                 CompletionCode list. Yes, this is a shortcut, but it makes
653                 our list of NCP packet definitions look neater, since an
654                 explicit "add to global list of packets" is not needed."""
655
656                 # Add packet to global collection of packets
657                 packets.append(self)
658
659 def rec(start, length, field, endianness=None, **kw):
660         return _rec(start, length, field, endianness, kw)
661
662 def srec(field, endianness=None, **kw):
663         return _rec(-1, -1, field, endianness, kw)
664
665 def _rec(start, length, field, endianness, kw):
666         # If endianness not explicitly given, use the field's
667         # default endiannes.
668         if endianness == None:
669                 endianness = field.Endianness()
670
671         # Setting a var?
672         if kw.has_key("var"):
673                 # Is the field an INT ?
674                 if not isinstance(field, CountingNumber):
675                         sys.exit("Field %s used as count variable, but not integer." \
676                                 % (field.HFName()))
677                 var = kw["var"]
678         else:
679                 var = None
680
681         # If 'var' not used, 'repeat' can be used.
682         if not var and kw.has_key("repeat"):
683                 repeat = kw["repeat"]
684         else:
685                 repeat = None
686
687         # Request-condition ?
688         if kw.has_key("req_cond"):
689                 req_cond = kw["req_cond"]
690         else:
691                 req_cond = NO_REQ_COND
692
693         return [start, length, field, endianness, var, repeat, req_cond]
694
695
696
697
698 ##############################################################################
699
700 LE              = 1             # Little-Endian
701 BE              = 0             # Big-Endian
702 NA              = -1            # Not Applicable
703
704 class Type:
705         " Virtual class for NCP field types"
706         type            = "Type"
707         ftype           = None
708         disp            = "BASE_DEC"
709         endianness      = NA
710         values          = []
711
712         def __init__(self, abbrev, descr, bytes, endianness = NA):
713                 self.abbrev = abbrev
714                 self.descr = descr
715                 self.bytes = bytes
716                 self.endianness = endianness
717                 self.hfname = "hf_ncp_" + self.abbrev
718                 self.special_fmt = "NCP_FMT_NONE"
719
720         def Length(self):
721                 return self.bytes
722
723         def Abbreviation(self):
724                 return self.abbrev
725
726         def Description(self):
727                 return self.descr
728
729         def HFName(self):
730                 return self.hfname
731
732         def DFilter(self):
733                 return "ncp." + self.abbrev
734
735         def EtherealFType(self):
736                 return self.ftype
737
738         def Display(self, newval=None):
739                 if newval != None:
740                         self.disp = newval
741                 return self.disp
742
743         def ValuesName(self):
744                 return "NULL"
745
746         def Mask(self):
747                 return 0
748
749         def Endianness(self):
750                 return self.endianness
751
752         def SubVariables(self):
753                 return []
754
755         def PTVCName(self):
756                 return "NULL"
757
758         def NWDate(self):
759                 self.special_fmt = "NCP_FMT_NW_DATE"
760
761         def NWTime(self):
762                 self.special_fmt = "NCP_FMT_NW_TIME"
763                 
764         def NWUnicode(self):
765                 self.special_fmt = "NCP_FMT_UNICODE"                
766                 
767         def SpecialFmt(self):
768                 return self.special_fmt
769
770         def __cmp__(self, other):
771                 return cmp(self.hfname, other.hfname)
772
773 class struct(PTVC, Type):
774         def __init__(self, name, items, descr=None):
775                 name = "struct_%s" % (name,)
776                 NamedList.__init__(self, name, [])
777
778                 self.bytes = 0
779                 self.descr = descr
780                 for item in items:
781                         if isinstance(item, Type):
782                                 field = item
783                                 length = field.Length()
784                                 endianness = field.Endianness()
785                                 var = NO_VAR
786                                 repeat = NO_REPEAT
787                                 req_cond = NO_REQ_COND
788                         elif type(item) == type([]):
789                                 field = item[REC_FIELD]
790                                 length = item[REC_LENGTH]
791                                 endianness = item[REC_ENDIANNESS]
792                                 var = item[REC_VAR]
793                                 repeat = item[REC_REPEAT]
794                                 req_cond = item[REC_REQ_COND]
795                         else:
796                                 assert 0, "Item %s item not handled." % (item,)
797
798                         ptvc_rec = PTVCRecord(field, length, endianness, var,
799                                 repeat, req_cond)
800                         self.list.append(ptvc_rec)
801                         self.bytes = self.bytes + field.Length()
802
803                 self.hfname = self.name
804
805         def Variables(self):
806                 vars = []
807                 for ptvc_rec in self.list:
808                         vars.append(ptvc_rec.Field())
809                 return vars
810
811         def ReferenceString(self, var, repeat, req_cond):
812                 return "{ PTVC_STRUCT, NO_LENGTH, &%s, NO_ENDIANNESS, %s, %s, %s, NCP_FMT_NONE }" % \
813                         (self.name, var, repeat, req_cond)
814
815         def Code(self):
816                 ett_name = self.ETTName()
817                 x = "static gint %s;\n" % (ett_name,)
818                 x = x + "static const ptvc_record ptvc_%s[] = {\n" % (self.name,)
819                 for ptvc_rec in self.list:
820                         x = x +  "\t%s,\n" % (ptvc_rec.Code())
821                 x = x + "\t{ NULL, NO_LENGTH, NULL, NO_ENDIANNESS, NO_VAR, NO_REPEAT, NO_REQ_COND, NCP_FMT_NONE }\n"
822                 x = x + "};\n"
823
824                 x = x + "static const sub_ptvc_record %s = {\n" % (self.name,)
825                 x = x + "\t&%s,\n" % (ett_name,)
826                 if self.descr:
827                         x = x + '\t"%s",\n' % (self.descr,)
828                 else:
829                         x = x + "\tNULL,\n"
830                 x = x + "\tptvc_%s,\n" % (self.Name(),)
831                 x = x + "};\n"
832                 return x
833
834         def __cmp__(self, other):
835                 return cmp(self.HFName(), other.HFName())
836
837
838 class byte(Type):
839         type    = "byte"
840         ftype   = "FT_UINT8"
841         def __init__(self, abbrev, descr):
842                 Type.__init__(self, abbrev, descr, 1)
843
844 class CountingNumber:
845         pass
846
847 # Same as above. Both are provided for convenience
848 class uint8(Type, CountingNumber):
849         type    = "uint8"
850         ftype   = "FT_UINT8"
851         bytes   = 1
852         def __init__(self, abbrev, descr):
853                 Type.__init__(self, abbrev, descr, 1)
854
855 class uint16(Type, CountingNumber):
856         type    = "uint16"
857         ftype   = "FT_UINT16"
858         def __init__(self, abbrev, descr, endianness = LE):
859                 Type.__init__(self, abbrev, descr, 2, endianness)
860
861 class uint24(Type, CountingNumber):
862         type    = "uint24"
863         ftype   = "FT_UINT24"
864         def __init__(self, abbrev, descr, endianness = LE):
865                 Type.__init__(self, abbrev, descr, 3, endianness)
866
867 class uint32(Type, CountingNumber):
868         type    = "uint32"
869         ftype   = "FT_UINT32"
870         def __init__(self, abbrev, descr, endianness = LE):
871                 Type.__init__(self, abbrev, descr, 4, endianness)
872
873 class boolean8(uint8):
874         type    = "boolean8"
875         ftype   = "FT_BOOLEAN"
876
877 class boolean16(uint16):
878         type    = "boolean16"
879         ftype   = "FT_BOOLEAN"
880
881 class boolean24(uint24):
882         type    = "boolean24"
883         ftype   = "FT_BOOLEAN"
884
885 class boolean32(uint32):
886         type    = "boolean32"
887         ftype   = "FT_BOOLEAN"
888
889 class nstring:
890         pass
891
892 class nstring8(Type, nstring):
893         """A string of up to (2^8)-1 characters. The first byte
894         gives the string length."""
895
896         type    = "nstring8"
897         ftype   = "FT_UINT_STRING"
898         def __init__(self, abbrev, descr):
899                 Type.__init__(self, abbrev, descr, 1)
900
901 class nstring16(Type, nstring):
902         """A string of up to (2^16)-2 characters. The first 2 bytes
903         gives the string length."""
904
905         type    = "nstring16"
906         ftype   = "FT_UINT_STRING"
907         def __init__(self, abbrev, descr, endianness = LE):
908                 Type.__init__(self, abbrev, descr, 2, endianness)
909
910 class nstring32(Type, nstring):
911         """A string of up to (2^32)-4 characters. The first 4 bytes
912         gives the string length."""
913
914         type    = "nstring32"
915         ftype   = "FT_UINT_STRING"
916         def __init__(self, abbrev, descr, endianness = LE):
917                 Type.__init__(self, abbrev, descr, 4, endianness)
918
919 class fw_string(Type):
920         """A fixed-width string of n bytes."""
921
922         type    = "fw_string"
923         ftype   = "FT_STRING"
924
925         def __init__(self, abbrev, descr, bytes):
926                 Type.__init__(self, abbrev, descr, bytes)
927
928
929 class stringz(Type):
930         "NUL-terminated string, with a maximum length"
931
932         type    = "stringz"
933         ftype   = "FT_STRINGZ"
934         def __init__(self, abbrev, descr):
935                 Type.__init__(self, abbrev, descr, PROTO_LENGTH_UNKNOWN)
936
937 class val_string(Type):
938         """Abstract class for val_stringN, where N is number
939         of bits that key takes up."""
940
941         type    = "val_string"
942         disp    = 'BASE_HEX'
943
944         def __init__(self, abbrev, descr, val_string_array, endianness = LE):
945                 Type.__init__(self, abbrev, descr, self.bytes, endianness)
946                 self.values = val_string_array
947
948         def Code(self):
949                 result = "static const value_string %s[] = {\n" \
950                                 % (self.ValuesCName())
951                 for val_record in self.values:
952                         value   = val_record[0]
953                         text    = val_record[1]
954                         value_repr = self.value_format % value
955                         result = result + '\t{ %s,\t"%s" },\n' \
956                                         % (value_repr, text)
957
958                 value_repr = self.value_format % 0
959                 result = result + "\t{ %s,\tNULL },\n" % (value_repr)
960                 result = result + "};\n"
961                 REC_VAL_STRING_RES = self.value_format % value
962                 return result
963
964         def ValuesCName(self):
965                 return "ncp_%s_vals" % (self.abbrev)
966
967         def ValuesName(self):
968                 return "VALS(%s)" % (self.ValuesCName())
969
970 class val_string8(val_string):
971         type            = "val_string8"
972         ftype           = "FT_UINT8"
973         bytes           = 1
974         value_format    = "0x%02x"
975
976 class val_string16(val_string):
977         type            = "val_string16"
978         ftype           = "FT_UINT16"
979         bytes           = 2
980         value_format    = "0x%04x"
981
982 class val_string32(val_string):
983         type            = "val_string32"
984         ftype           = "FT_UINT32"
985         bytes           = 4
986         value_format    = "0x%08x"
987
988 class bytes(Type):
989         type    = 'bytes'
990         ftype   = 'FT_BYTES'
991
992         def __init__(self, abbrev, descr, bytes):
993                 Type.__init__(self, abbrev, descr, bytes, NA)
994
995 class nbytes:
996         pass
997
998 class nbytes8(Type, nbytes):
999         """A series of up to (2^8)-1 bytes. The first byte
1000         gives the byte-string length."""
1001
1002         type    = "nbytes8"
1003         ftype   = "FT_UINT_BYTES"
1004         def __init__(self, abbrev, descr, endianness = LE):
1005                 Type.__init__(self, abbrev, descr, 1, endianness)
1006
1007 class nbytes16(Type, nbytes):
1008         """A series of up to (2^16)-2 bytes. The first 2 bytes
1009         gives the byte-string length."""
1010
1011         type    = "nbytes16"
1012         ftype   = "FT_UINT_BYTES"
1013         def __init__(self, abbrev, descr, endianness = LE):
1014                 Type.__init__(self, abbrev, descr, 2, endianness)
1015
1016 class nbytes32(Type, nbytes):
1017         """A series of up to (2^32)-4 bytes. The first 4 bytes
1018         gives the byte-string length."""
1019
1020         type    = "nbytes32"
1021         ftype   = "FT_UINT_BYTES"
1022         def __init__(self, abbrev, descr, endianness = LE):
1023                 Type.__init__(self, abbrev, descr, 4, endianness)
1024
1025 class bf_uint(Type):
1026         type    = "bf_uint"
1027         disp    = None
1028
1029         def __init__(self, bitmask, abbrev, descr, endianness=LE):
1030                 Type.__init__(self, abbrev, descr, self.bytes, endianness)
1031                 self.bitmask = bitmask
1032
1033         def Mask(self):
1034                 return self.bitmask
1035
1036 class bf_val_str(bf_uint):
1037         type    = "bf_uint"
1038         disp    = None
1039
1040         def __init__(self, bitmask, abbrev, descr, val_string_array, endiannes=LE):
1041                 bf_uint.__init__(self, bitmask, abbrev, descr, endiannes)
1042                 self.values = val_string_array
1043
1044         def ValuesName(self):
1045                 return "VALS(%s)" % (self.ValuesCName())
1046
1047 class bf_val_str8(bf_val_str, val_string8):
1048         type    = "bf_val_str8"
1049         ftype   = "FT_UINT8"
1050         disp    = "BASE_HEX"
1051         bytes   = 1
1052
1053 class bf_val_str16(bf_val_str, val_string16):
1054         type    = "bf_val_str16"
1055         ftype   = "FT_UINT16"
1056         disp    = "BASE_HEX"
1057         bytes   = 2
1058
1059 class bf_val_str32(bf_val_str, val_string32):
1060         type    = "bf_val_str32"
1061         ftype   = "FT_UINT32"
1062         disp    = "BASE_HEX"
1063         bytes   = 4
1064
1065 class bf_boolean:
1066     pass
1067
1068 class bf_boolean8(bf_uint, boolean8, bf_boolean):
1069         type    = "bf_boolean8"
1070         ftype   = "FT_BOOLEAN"
1071         disp    = "8"
1072         bytes   = 1
1073
1074 class bf_boolean16(bf_uint, boolean16, bf_boolean):
1075         type    = "bf_boolean16"
1076         ftype   = "FT_BOOLEAN"
1077         disp    = "16"
1078         bytes   = 2
1079
1080 class bf_boolean24(bf_uint, boolean24, bf_boolean):
1081         type    = "bf_boolean24"
1082         ftype   = "FT_BOOLEAN"
1083         disp    = "24"
1084         bytes   = 3
1085
1086 class bf_boolean32(bf_uint, boolean32, bf_boolean):
1087         type    = "bf_boolean32"
1088         ftype   = "FT_BOOLEAN"
1089         disp    = "32"
1090         bytes   = 4
1091
1092 class bitfield(Type):
1093         type    = "bitfield"
1094         disp    = 'BASE_HEX'
1095
1096         def __init__(self, vars):
1097                 var_hash = {}
1098                 for var in vars:
1099                         if isinstance(var, bf_boolean):
1100                                 if not isinstance(var, self.bf_type):
1101                                         print "%s must be of type %s" % \
1102                                                 (var.Abbreviation(),
1103                                                 self.bf_type)
1104                                         sys.exit(1)
1105                         var_hash[var.bitmask] = var
1106
1107                 bitmasks = var_hash.keys()
1108                 bitmasks.sort()
1109                 bitmasks.reverse()
1110
1111                 ordered_vars = []
1112                 for bitmask in bitmasks:
1113                         var = var_hash[bitmask]
1114                         ordered_vars.append(var)
1115
1116                 self.vars = ordered_vars
1117                 self.ptvcname = "ncp_%s_bitfield" % (self.abbrev,)
1118                 self.hfname = "hf_ncp_%s" % (self.abbrev,)
1119                 self.sub_ptvc = PTVCBitfield(self.PTVCName(), self.vars)
1120
1121         def SubVariables(self):
1122                 return self.vars
1123
1124         def SubVariablesPTVC(self):
1125                 return self.sub_ptvc
1126
1127         def PTVCName(self):
1128                 return self.ptvcname
1129
1130
1131 class bitfield8(bitfield, uint8):
1132         type    = "bitfield8"
1133         ftype   = "FT_UINT8"
1134         bf_type = bf_boolean8
1135
1136         def __init__(self, abbrev, descr, vars):
1137                 uint8.__init__(self, abbrev, descr)
1138                 bitfield.__init__(self, vars)
1139
1140 class bitfield16(bitfield, uint16):
1141         type    = "bitfield16"
1142         ftype   = "FT_UINT16"
1143         bf_type = bf_boolean16
1144
1145         def __init__(self, abbrev, descr, vars, endianness=LE):
1146                 uint16.__init__(self, abbrev, descr, endianness)
1147                 bitfield.__init__(self, vars)
1148
1149 class bitfield24(bitfield, uint24):
1150         type    = "bitfield24"
1151         ftype   = "FT_UINT24"
1152         bf_type = bf_boolean24
1153
1154         def __init__(self, abbrev, descr, vars, endianness=LE):
1155                 uint24.__init__(self, abbrev, descr, endianness)
1156                 bitfield.__init__(self, vars)
1157
1158 class bitfield32(bitfield, uint32):
1159         type    = "bitfield32"
1160         ftype   = "FT_UINT32"
1161         bf_type = bf_boolean32
1162
1163         def __init__(self, abbrev, descr, vars, endianness=LE):
1164                 uint32.__init__(self, abbrev, descr, endianness)
1165                 bitfield.__init__(self, vars)
1166
1167 #
1168 # Force the endianness of a field to a non-default value; used in
1169 # the list of fields of a structure.
1170 #
1171 def endian(field, endianness):
1172         return [-1, field.Length(), field, endianness, NO_VAR, NO_REPEAT, NO_REQ_COND]
1173
1174 ##############################################################################
1175 # NCP Field Types. Defined in Appendix A of "Programmer's Guide..."
1176 ##############################################################################
1177 AbortQueueFlag                  = val_string8("abort_q_flag", "Abort Queue Flag", [
1178         [ 0x00, "Place at End of Queue" ],
1179         [ 0x01, "Do Not Place Spool File, Examine Flags" ],
1180 ])
1181 AcceptedMaxSize                 = uint16("accepted_max_size", "Accepted Max Size")
1182 AccessControl                   = val_string8("access_control", "Access Control", [
1183         [ 0x00, "Open for read by this client" ],
1184         [ 0x01, "Open for write by this client" ],
1185         [ 0x02, "Deny read requests from other stations" ],
1186         [ 0x03, "Deny write requests from other stations" ],
1187         [ 0x04, "File detached" ],
1188         [ 0x05, "TTS holding detach" ],
1189         [ 0x06, "TTS holding open" ],
1190 ])
1191 AccessDate                      = uint16("access_date", "Access Date")
1192 AccessDate.NWDate()
1193 AccessMode                      = bitfield8("access_mode", "Access Mode", [
1194         bf_boolean8(0x01, "acc_mode_read", "Read Access"),
1195         bf_boolean8(0x02, "acc_mode_write", "Write Access"),
1196         bf_boolean8(0x04, "acc_mode_deny_read", "Deny Read Access"),
1197         bf_boolean8(0x08, "acc_mode_deny_write", "Deny Write Access"),
1198         bf_boolean8(0x10, "acc_mode_comp", "Compatibility Mode"),
1199 ])
1200 AccessPrivileges                = bitfield8("access_privileges", "Access Privileges", [
1201         bf_boolean8(0x01, "acc_priv_read", "Read Privileges (files only)"),
1202         bf_boolean8(0x02, "acc_priv_write", "Write Privileges (files only)"),
1203         bf_boolean8(0x04, "acc_priv_open", "Open Privileges (files only)"),
1204         bf_boolean8(0x08, "acc_priv_create", "Create Privileges (files only)"),
1205         bf_boolean8(0x10, "acc_priv_delete", "Delete Privileges (files only)"),
1206         bf_boolean8(0x20, "acc_priv_parent", "Parental Privileges (directories only for creating, deleting, and renaming)"),
1207         bf_boolean8(0x40, "acc_priv_search", "Search Privileges (directories only)"),
1208         bf_boolean8(0x80, "acc_priv_modify", "Modify File Status Flags Privileges (files and directories)"),
1209 ])
1210 AccessRightsMask                = bitfield8("access_rights_mask", "Access Rights", [
1211         bf_boolean8(0x0001, "acc_rights_read", "Read Rights"),
1212         bf_boolean8(0x0002, "acc_rights_write", "Write Rights"),
1213         bf_boolean8(0x0004, "acc_rights_open", "Open Rights"),
1214         bf_boolean8(0x0008, "acc_rights_create", "Create Rights"),
1215         bf_boolean8(0x0010, "acc_rights_delete", "Delete Rights"),
1216         bf_boolean8(0x0020, "acc_rights_parent", "Parental Rights"),
1217         bf_boolean8(0x0040, "acc_rights_search", "Search Rights"),
1218         bf_boolean8(0x0080, "acc_rights_modify", "Modify Rights"),
1219 ])
1220 AccessRightsMaskWord            = bitfield16("access_rights_mask_word", "Access Rights", [
1221         bf_boolean16(0x0001, "acc_rights1_read", "Read Rights"),
1222         bf_boolean16(0x0002, "acc_rights1_write", "Write Rights"),
1223         bf_boolean16(0x0004, "acc_rights1_open", "Open Rights"),
1224         bf_boolean16(0x0008, "acc_rights1_create", "Create Rights"),
1225         bf_boolean16(0x0010, "acc_rights1_delete", "Delete Rights"),
1226         bf_boolean16(0x0020, "acc_rights1_parent", "Parental Rights"),
1227         bf_boolean16(0x0040, "acc_rights1_search", "Search Rights"),
1228         bf_boolean16(0x0080, "acc_rights1_modify", "Modify Rights"),
1229         bf_boolean16(0x0100, "acc_rights1_supervisor", "Supervisor Access Rights"),
1230 ])
1231 AccountBalance                  = uint32("account_balance", "Account Balance")
1232 AccountVersion                  = uint8("acct_version", "Acct Version")
1233 ActionFlag                      = bitfield8("action_flag", "Action Flag", [
1234         bf_boolean8(0x01, "act_flag_open", "Open"),
1235         bf_boolean8(0x02, "act_flag_replace", "Replace"),
1236         bf_boolean8(0x10, "act_flag_create", "Create"),
1237 ])
1238 ActiveConnBitList               = fw_string("active_conn_bit_list", "Active Connection List", 512)
1239 ActiveIndexedFiles              = uint16("active_indexed_files", "Active Indexed Files")
1240 ActualMaxBinderyObjects         = uint16("actual_max_bindery_objects", "Actual Max Bindery Objects")
1241 ActualMaxIndexedFiles           = uint16("actual_max_indexed_files", "Actual Max Indexed Files")
1242 ActualMaxOpenFiles              = uint16("actual_max_open_files", "Actual Max Open Files")
1243 ActualMaxSimultaneousTransactions = uint16("actual_max_sim_trans", "Actual Max Simultaneous Transactions")
1244 ActualMaxUsedDirectoryEntries   = uint16("actual_max_used_directory_entries", "Actual Max Used Directory Entries")
1245 ActualMaxUsedRoutingBuffers     = uint16("actual_max_used_routing_buffers", "Actual Max Used Routing Buffers")
1246 ActualResponseCount             = uint16("actual_response_count", "Actual Response Count")
1247 AddNameSpaceAndVol              = stringz("add_nm_spc_and_vol", "Add Name Space and Volume")
1248 AFPEntryID                      = uint32("afp_entry_id", "AFP Entry ID", BE)
1249 AFPEntryID.Display("BASE_HEX")
1250 AllocAvailByte                  = uint32("alloc_avail_byte", "Bytes Available for Allocation")
1251 AllocateMode                    = val_string16("allocate_mode", "Allocate Mode", [
1252         [ 0x0000, "Permanent Directory Handle" ],
1253         [ 0x0001, "Temporary Directory Handle" ],
1254         [ 0x0002, "Special Temporary Directory Handle" ],
1255 ])
1256 AllocationBlockSize             = uint32("allocation_block_size", "Allocation Block Size")
1257 AllocFreeCount                  = uint32("alloc_free_count", "Reclaimable Free Bytes")
1258 ApplicationNumber               = uint16("application_number", "Application Number")
1259 ArchivedTime                    = uint16("archived_time", "Archived Time")
1260 ArchivedTime.NWTime()
1261 ArchivedDate                    = uint16("archived_date", "Archived Date")
1262 ArchivedDate.NWDate()
1263 ArchiverID                      = uint32("archiver_id", "Archiver ID", BE)
1264 ArchiverID.Display("BASE_HEX")
1265 AssociatedNameSpace             = uint8("associated_name_space", "Associated Name Space")
1266 AttachDuringProcessing          = uint16("attach_during_processing", "Attach During Processing")
1267 AttachedIndexedFiles            = uint8("attached_indexed_files", "Attached Indexed Files")
1268 AttachWhileProcessingAttach     = uint16("attach_while_processing_attach", "Attach While Processing Attach")
1269 Attributes                      = uint32("attributes", "Attributes")
1270 AttributesDef                   = bitfield8("attr_def", "Attributes", [
1271         bf_boolean8(0x01, "att_def_ro", "Read Only"),
1272         bf_boolean8(0x02, "att_def_hidden", "Hidden"),
1273         bf_boolean8(0x04, "att_def_system", "System"),
1274         bf_boolean8(0x08, "att_def_execute", "Execute"),
1275         bf_boolean8(0x10, "att_def_sub_only", "Subdirectory"),
1276         bf_boolean8(0x20, "att_def_archive", "Archive"),
1277         bf_boolean8(0x80, "att_def_shareable", "Shareable"),
1278 ])
1279 AttributesDef16                 = bitfield16("attr_def_16", "Attributes", [
1280         bf_boolean16(0x0001, "att_def16_ro", "Read Only"),
1281         bf_boolean16(0x0002, "att_def16_hidden", "Hidden"),
1282         bf_boolean16(0x0004, "att_def16_system", "System"),
1283         bf_boolean16(0x0008, "att_def16_execute", "Execute"),
1284         bf_boolean16(0x0010, "att_def16_sub_only", "Subdirectory"),
1285         bf_boolean16(0x0020, "att_def16_archive", "Archive"),
1286         bf_boolean16(0x0080, "att_def16_shareable", "Shareable"),
1287         bf_boolean16(0x1000, "att_def16_transaction", "Transactional"),
1288         bf_boolean16(0x4000, "att_def16_read_audit", "Read Audit"),
1289         bf_boolean16(0x8000, "att_def16_write_audit", "Write Audit"),
1290 ])
1291 AttributesDef32                 = bitfield32("attr_def_32", "Attributes", [
1292         bf_boolean32(0x00000001, "att_def32_ro", "Read Only"),
1293         bf_boolean32(0x00000002, "att_def32_hidden", "Hidden"),
1294         bf_boolean32(0x00000004, "att_def32_system", "System"),
1295         bf_boolean32(0x00000008, "att_def32_execute", "Execute"),
1296         bf_boolean32(0x00000010, "att_def32_sub_only", "Subdirectory"),
1297         bf_boolean32(0x00000020, "att_def32_archive", "Archive"),
1298         bf_boolean32(0x00000080, "att_def32_shareable", "Shareable"),
1299         bf_boolean32(0x00001000, "att_def32_transaction", "Transactional"),
1300         bf_boolean32(0x00004000, "att_def32_read_audit", "Read Audit"),
1301         bf_boolean32(0x00008000, "att_def32_write_audit", "Write Audit"),
1302         bf_boolean32(0x00010000, "att_def_purge", "Purge"),
1303         bf_boolean32(0x00020000, "att_def_reninhibit", "Rename Inhibit"),
1304         bf_boolean32(0x00040000, "att_def_delinhibit", "Delete Inhibit"),
1305         bf_boolean32(0x00080000, "att_def_cpyinhibit", "Copy Inhibit"),
1306         bf_boolean32(0x02000000, "att_def_im_comp", "Immediate Compress"),
1307         bf_boolean32(0x04000000, "att_def_comp", "Compressed"),
1308 ])
1309 AttributeValidFlag              = uint32("attribute_valid_flag", "Attribute Valid Flag")
1310 AuditFileVersionDate            = uint16("audit_file_ver_date", "Audit File Version Date")
1311 AuditFileVersionDate.NWDate()
1312 AuditFlag                       = val_string8("audit_flag", "Audit Flag", [
1313         [ 0x00, "Do NOT audit object" ],
1314         [ 0x01, "Audit object" ],
1315 ])
1316 AuditHandle                     = uint32("audit_handle", "Audit File Handle")
1317 AuditHandle.Display("BASE_HEX")
1318 AuditID                         = uint32("audit_id", "Audit ID", BE)
1319 AuditID.Display("BASE_HEX")
1320 AuditIDType                     = val_string16("audit_id_type", "Audit ID Type", [
1321         [ 0x0000, "Volume" ],
1322         [ 0x0001, "Container" ],
1323 ])
1324 AuditVersionDate                = uint16("audit_ver_date", "Auditing Version Date")
1325 AuditVersionDate.NWDate()
1326 AvailableBlocks                 = uint32("available_blocks", "Available Blocks")
1327 AvailableClusters               = uint16("available_clusters", "Available Clusters")
1328 AvailableDirectorySlots         = uint16("available_directory_slots", "Available Directory Slots")
1329 AvailableDirEntries             = uint32("available_dir_entries", "Available Directory Entries")
1330 AvailableIndexedFiles           = uint16("available_indexed_files", "Available Indexed Files")
1331
1332 BackgroundAgedWrites            = uint32("background_aged_writes", "Background Aged Writes")
1333 BackgroundDirtyWrites           = uint32("background_dirty_writes", "Background Dirty Writes")
1334 BadLogicalConnectionCount       = uint16("bad_logical_connection_count", "Bad Logical Connection Count")
1335 BannerName                      = fw_string("banner_name", "Banner Name", 14)
1336 BaseDirectoryID                 = uint32("base_directory_id", "Base Directory ID", BE)
1337 BaseDirectoryID.Display("BASE_HEX")
1338 binderyContext                  = nstring8("bindery_context", "Bindery Context")
1339 BitMap                          = bytes("bit_map", "Bit Map", 512)
1340 BlockNumber                     = uint32("block_number", "Block Number")
1341 BlockSize                       = uint16("block_size", "Block Size")
1342 BlockSizeInSectors              = uint32("block_size_in_sectors", "Block Size in Sectors")
1343 BoardInstalled                  = uint8("board_installed", "Board Installed")
1344 BoardNumber                     = uint32("board_number", "Board Number")
1345 BoardNumbers                    = uint32("board_numbers", "Board Numbers")
1346 BufferSize                      = uint16("buffer_size", "Buffer Size")
1347 BusString                       = stringz("bus_string", "Bus String")
1348 BusType                         = val_string8("bus_type", "Bus Type", [
1349         [0x00, "ISA"],
1350         [0x01, "Micro Channel" ],
1351         [0x02, "EISA"],
1352         [0x04, "PCI"],
1353         [0x08, "PCMCIA"],
1354         [0x10, "ISA"],
1355         [0x14, "ISA"],
1356 ])
1357 BytesActuallyTransferred        = uint32("bytes_actually_transferred", "Bytes Actually Transferred")
1358 BytesRead                       = fw_string("bytes_read", "Bytes Read", 6)
1359 BytesToCopy                     = uint32("bytes_to_copy", "Bytes to Copy")
1360 BytesWritten                    = fw_string("bytes_written", "Bytes Written", 6)
1361
1362 CacheAllocations                = uint32("cache_allocations", "Cache Allocations")
1363 CacheBlockScrapped              = uint16("cache_block_scrapped", "Cache Block Scrapped")
1364 CacheBufferCount                = uint16("cache_buffer_count", "Cache Buffer Count")
1365 CacheBufferSize                 = uint16("cache_buffer_size", "Cache Buffer Size")
1366 CacheFullWriteRequests          = uint32("cache_full_write_requests", "Cache Full Write Requests")
1367 CacheGetRequests                = uint32("cache_get_requests", "Cache Get Requests")
1368 CacheHitOnUnavailableBlock      = uint16("cache_hit_on_unavailable_block", "Cache Hit On Unavailable Block")
1369 CacheHits                       = uint32("cache_hits", "Cache Hits")
1370 CacheMisses                     = uint32("cache_misses", "Cache Misses")
1371 CachePartialWriteRequests       = uint32("cache_partial_write_requests", "Cache Partial Write Requests")
1372 CacheReadRequests               = uint32("cache_read_requests", "Cache Read Requests")
1373 CacheWriteRequests              = uint32("cache_write_requests", "Cache Write Requests")
1374 CategoryName                    = stringz("category_name", "Category Name")
1375 CCFileHandle                    = uint32("cc_file_handle", "File Handle")
1376 CCFileHandle.Display("BASE_HEX")
1377 CCFunction                      = val_string8("cc_function", "OP-Lock Flag", [
1378         [ 0x01, "Clear OP-Lock" ],
1379         [ 0x02, "Acknowledge Callback" ],
1380         [ 0x03, "Decline Callback" ],
1381 ])
1382 ChangeBits                      = bitfield16("change_bits", "Change Bits", [
1383         bf_boolean16(0x0001, "change_bits_modify", "Modify Name"),
1384         bf_boolean16(0x0002, "change_bits_fatt", "File Attributes"),
1385         bf_boolean16(0x0004, "change_bits_cdate", "Creation Date"),
1386         bf_boolean16(0x0008, "change_bits_ctime", "Creation Time"),
1387         bf_boolean16(0x0010, "change_bits_owner", "Owner ID"),
1388         bf_boolean16(0x0020, "change_bits_adate", "Archive Date"),
1389         bf_boolean16(0x0040, "change_bits_atime", "Archive Time"),
1390         bf_boolean16(0x0080, "change_bits_aid", "Archiver ID"),
1391         bf_boolean16(0x0100, "change_bits_udate", "Update Date"),
1392         bf_boolean16(0x0200, "change_bits_utime", "Update Time"),
1393         bf_boolean16(0x0400, "change_bits_uid", "Update ID"),
1394         bf_boolean16(0x0800, "change_bits_acc_date", "Access Date"),
1395         bf_boolean16(0x1000, "change_bits_max_acc_mask", "Maximum Access Mask"),
1396         bf_boolean16(0x2000, "change_bits_max_space", "Maximum Space"),
1397 ])
1398 ChannelState                    = val_string8("channel_state", "Channel State", [
1399         [ 0x00, "Channel is running" ],
1400         [ 0x01, "Channel is stopping" ],
1401         [ 0x02, "Channel is stopped" ],
1402         [ 0x03, "Channel is not functional" ],
1403 ])
1404 ChannelSynchronizationState     = val_string8("channel_synchronization_state", "Channel Synchronization State", [
1405         [ 0x00, "Channel is not being used" ],
1406         [ 0x02, "NetWare is using the channel; no one else wants it" ],
1407         [ 0x04, "NetWare is using the channel; someone else wants it" ],
1408         [ 0x06, "Someone else is using the channel; NetWare does not need it" ],
1409         [ 0x08, "Someone else is using the channel; NetWare needs it" ],
1410         [ 0x0A, "Someone else has released the channel; NetWare should use it" ],
1411 ])
1412 ChargeAmount                    = uint32("charge_amount", "Charge Amount")
1413 ChargeInformation               = uint32("charge_information", "Charge Information")
1414 ClientCompFlag                  = val_string16("client_comp_flag", "Completion Flag", [
1415         [ 0x0000, "Successful" ],
1416         [ 0x0001, "Illegal Station Number" ],
1417         [ 0x0002, "Client Not Logged In" ],
1418         [ 0x0003, "Client Not Accepting Messages" ],
1419         [ 0x0004, "Client Already has a Message" ],
1420         [ 0x0096, "No Alloc Space for the Message" ],
1421         [ 0x00fd, "Bad Station Number" ],
1422         [ 0x00ff, "Failure" ],
1423 ])      
1424 ClientIDNumber                  = uint32("client_id_number", "Client ID Number", BE)
1425 ClientIDNumber.Display("BASE_HEX")
1426 ClientList                      = uint32("client_list", "Client List")
1427 ClientListCount                 = uint16("client_list_cnt", "Client List Count")
1428 ClientListLen                   = uint8("client_list_len", "Client List Length")
1429 ClientName                      = nstring8("client_name", "Client Name")
1430 ClientRecordArea                = fw_string("client_record_area", "Client Record Area", 152)
1431 ClientStation                   = uint8("client_station", "Client Station")
1432 ClientStationLong               = uint32("client_station_long", "Client Station")
1433 ClientTaskNumber                = uint8("client_task_number", "Client Task Number")
1434 ClientTaskNumberLong            = uint32("client_task_number_long", "Client Task Number")
1435 ClusterCount                    = uint16("cluster_count", "Cluster Count")
1436 ClustersUsedByDirectories       = uint32("clusters_used_by_directories", "Clusters Used by Directories")
1437 ClustersUsedByExtendedDirectories = uint32("clusters_used_by_extended_dirs", "Clusters Used by Extended Directories")
1438 ClustersUsedByFAT               = uint32("clusters_used_by_fat", "Clusters Used by FAT")
1439 ComCnts                         = uint16("com_cnts", "Communication Counters")
1440 Comment                         = nstring8("comment", "Comment")
1441 CommentType                     = uint16("comment_type", "Comment Type")
1442 CompletionCode                  = uint32("ncompletion_code", "Completion Code")
1443 CompressedDataStreamsCount      = uint32("compressed_data_streams_count", "Compressed Data Streams Count")
1444 CompressedLimboDataStreamsCount = uint32("compressed_limbo_data_streams_count", "Compressed Limbo Data Streams Count")
1445 CompressedSectors               = uint32("compressed_sectors", "Compressed Sectors")
1446 compressionStage                = uint32("compression_stage", "Compression Stage")
1447 compressVolume                  = uint32("compress_volume", "Volume Compression")
1448 ConfigMajorVN                   = uint8("config_major_vn", "Configuration Major Version Number")
1449 ConfigMinorVN                   = uint8("config_minor_vn", "Configuration Minor Version Number")
1450 ConfigurationDescription        = fw_string("configuration_description", "Configuration Description", 80)
1451 ConfigurationText               = fw_string("configuration_text", "Configuration Text", 160)
1452 ConfiguredMaxBinderyObjects     = uint16("configured_max_bindery_objects", "Configured Max Bindery Objects")
1453 ConfiguredMaxOpenFiles          = uint16("configured_max_open_files", "Configured Max Open Files")
1454 ConfiguredMaxRoutingBuffers     = uint16("configured_max_routing_buffers", "Configured Max Routing Buffers")
1455 ConfiguredMaxSimultaneousTransactions = uint16("cfg_max_simultaneous_transactions", "Configured Max Simultaneous Transactions")
1456 ConnectedLAN                    = uint32("connected_lan", "LAN Adapter")
1457 ConnectionControlBits           = bitfield8("conn_ctrl_bits", "Connection Control", [
1458         bf_boolean8(0x01, "enable_brdcasts", "Enable Broadcasts"),
1459         bf_boolean8(0x02, "enable_personal_brdcasts", "Enable Personal Broadcasts"),
1460         bf_boolean8(0x04, "enable_wdog_messages", "Enable Watchdog Message"),
1461         bf_boolean8(0x10, "disable_brdcasts", "Disable Broadcasts"),
1462         bf_boolean8(0x20, "disable_personal_brdcasts", "Disable Personal Broadcasts"),
1463         bf_boolean8(0x40, "disable_wdog_messages", "Disable Watchdog Message"),
1464 ])
1465 ConnectionListCount             = uint32("conn_list_count", "Connection List Count")
1466 ConnectionList                  = uint32("connection_list", "Connection List")
1467 ConnectionNumber                = uint32("connection_number", "Connection Number", BE)
1468 ConnectionNumberList            = nstring8("connection_number_list", "Connection Number List")
1469 ConnectionNumberWord            = uint16("conn_number_word", "Connection Number")
1470 ConnectionNumberByte            = uint8("conn_number_byte", "Connection Number")
1471 ConnectionServiceType           = val_string8("connection_service_type","Connection Service Type",[
1472         [ 0x01, "CLIB backward Compatibility" ],
1473         [ 0x02, "NCP Connection" ],
1474         [ 0x03, "NLM Connection" ],
1475         [ 0x04, "AFP Connection" ],
1476         [ 0x05, "FTAM Connection" ],
1477         [ 0x06, "ANCP Connection" ],
1478         [ 0x07, "ACP Connection" ],
1479         [ 0x08, "SMB Connection" ],
1480         [ 0x09, "Winsock Connection" ],
1481 ])
1482 ConnectionsInUse                = uint16("connections_in_use", "Connections In Use")
1483 ConnectionsMaxUsed              = uint16("connections_max_used", "Connections Max Used")
1484 ConnectionsSupportedMax         = uint16("connections_supported_max", "Connections Supported Max")
1485 ConnectionType                  = val_string8("connection_type", "Connection Type", [
1486         [ 0x00, "Not in use" ],
1487         [ 0x02, "NCP" ],
1488         [ 0x11, "UDP (for IP)" ],
1489 ])
1490 ConnListLen                     = uint8("conn_list_len", "Connection List Length")
1491 Copyright                       = nstring8("copyright", "Copyright")
1492 connList                        = uint32("conn_list", "Connection List")
1493 ControlFlags                    = val_string8("control_flags", "Control Flags", [
1494         [ 0x00, "Forced Record Locking is Off" ],
1495         [ 0x01, "Forced Record Locking is On" ],
1496 ])
1497 ControllerDriveNumber           = uint8("controller_drive_number", "Controller Drive Number")
1498 ControllerNumber                = uint8("controller_number", "Controller Number")
1499 ControllerType                  = uint8("controller_type", "Controller Type")
1500 Cookie1                         = uint32("cookie_1", "Cookie 1")
1501 Cookie2                         = uint32("cookie_2", "Cookie 2")
1502 Copies                          = uint8( "copies", "Copies" )
1503 CoprocessorFlag                 = uint32("co_processor_flag", "CoProcessor Present Flag")
1504 CoProcessorString               = stringz("co_proc_string", "CoProcessor String")
1505 CounterMask                     = val_string8("counter_mask", "Counter Mask", [
1506         [ 0x00, "Counter is Valid" ],
1507         [ 0x01, "Counter is not Valid" ],
1508 ])        
1509 CPUNumber                       = uint32("cpu_number", "CPU Number")
1510 CPUString                       = stringz("cpu_string", "CPU String")
1511 CPUType                         = val_string8("cpu_type", "CPU Type", [
1512         [ 0x00, "80386" ],
1513         [ 0x01, "80486" ],
1514         [ 0x02, "Pentium" ],
1515         [ 0x03, "Pentium Pro" ],
1516 ])    
1517 CreationDate                    = uint16("creation_date", "Creation Date")
1518 CreationDate.NWDate()
1519 CreationTime                    = uint16("creation_time", "Creation Time")
1520 CreationTime.NWTime()
1521 CreatorID                       = uint32("creator_id", "Creator ID", BE)
1522 CreatorID.Display("BASE_HEX")
1523 CreatorNameSpaceNumber          = val_string8("creator_name_space_number", "Creator Name Space Number", [
1524         [ 0x00, "DOS Name Space" ],
1525         [ 0x01, "MAC Name Space" ],
1526         [ 0x02, "NFS Name Space" ],
1527         [ 0x04, "Long Name Space" ],
1528 ])
1529 CreditLimit                     = uint32("credit_limit", "Credit Limit")
1530 CtrlFlags                       = val_string16("ctrl_flags", "Control Flags", [
1531         [ 0x0000, "Do Not Return File Name" ],
1532         [ 0x0001, "Return File Name" ],
1533 ])      
1534 curCompBlks                     = uint32("cur_comp_blks", "Current Compression Blocks")
1535 curInitialBlks                  = uint32("cur_initial_blks", "Current Initial Blocks")
1536 curIntermediateBlks             = uint32("cur_inter_blks", "Current Intermediate Blocks")
1537 CurNumOfRTags                   = uint32("cur_num_of_r_tags", "Current Number of Resource Tags")
1538 CurrentBlockBeingDecompressed   = uint32("cur_blk_being_dcompress", "Current Block Being Decompressed")
1539 CurrentChangedFATs              = uint16("current_changed_fats", "Current Changed FAT Entries")
1540 CurrentEntries                  = uint32("current_entries", "Current Entries")
1541 CurrentFormType                 = uint8( "current_form_type", "Current Form Type" )
1542 CurrentLFSCounters              = uint32("current_lfs_counters", "Current LFS Counters")
1543 CurrentlyUsedRoutingBuffers     = uint16("currently_used_routing_buffers", "Currently Used Routing Buffers")
1544 CurrentOpenFiles                = uint16("current_open_files", "Current Open Files")
1545 CurrentReferenceID              = uint16("curr_ref_id", "Current Reference ID")
1546 CurrentServers                  = uint32("current_servers", "Current Servers")
1547 CurrentServerTime               = uint32("current_server_time", "Time Elapsed Since Server Was Brought Up")
1548 CurrentSpace                    = uint32("current_space", "Current Space")
1549 CurrentTransactionCount         = uint32("current_trans_count", "Current Transaction Count")
1550 CurrentUsedBinderyObjects       = uint16("current_used_bindery_objects", "Current Used Bindery Objects")
1551 CurrentUsedDynamicSpace         = uint32("current_used_dynamic_space", "Current Used Dynamic Space")
1552 CustomCnts                      = uint32("custom_cnts", "Custom Counters")
1553 CustomCount                     = uint32("custom_count", "Custom Count")
1554 CustomCounters                  = uint32("custom_counters", "Custom Counters")
1555 CustomString                    = nstring8("custom_string", "Custom String")
1556 CustomVariableValue             = uint32("custom_var_value", "Custom Variable Value")
1557
1558 Data                            = nstring8("data", "Data")
1559 DataForkFirstFAT                = uint32("data_fork_first_fat", "Data Fork First FAT Entry")
1560 DataForkLen                     = uint32("data_fork_len", "Data Fork Len")
1561 DataForkSize                    = uint32("data_fork_size", "Data Fork Size")
1562 DataSize                        = uint32("data_size", "Data Size")
1563 DataStream                      = val_string8("data_stream", "Data Stream", [
1564         [ 0x00, "Resource Fork or DOS" ],
1565         [ 0x01, "Data Fork" ],
1566 ])
1567 DataStreamName                  = nstring8("data_stream_name", "Data Stream Name")
1568 DataStreamNumber                = uint8("data_stream_number", "Data Stream Number")
1569 DataStreamsCount                = uint32("data_streams_count", "Data Streams Count")
1570 DataStreamSize                  = uint32("data_stream_size", "Size")
1571 DataStreamSpaceAlloc            = uint32( "data_stream_space_alloc", "Space Allocated for Data Stream" )
1572 Day                             = uint8("s_day", "Day")
1573 DayOfWeek                       = val_string8("s_day_of_week", "Day of Week", [
1574         [ 0x00, "Sunday" ],
1575         [ 0x01, "Monday" ],
1576         [ 0x02, "Tuesday" ],
1577         [ 0x03, "Wednesday" ],
1578         [ 0x04, "Thursday" ],
1579         [ 0x05, "Friday" ],
1580         [ 0x06, "Saturday" ],
1581 ])
1582 DeadMirrorTable                 = bytes("dead_mirror_table", "Dead Mirror Table", 32)
1583 DefinedDataStreams              = uint8("defined_data_streams", "Defined Data Streams")
1584 DefinedNameSpaces               = uint8("defined_name_spaces", "Defined Name Spaces")
1585 DeletedDate                     = uint16("deleted_date", "Deleted Date")
1586 DeletedDate.NWDate()
1587 DeletedFileTime                 = uint32( "deleted_file_time", "Deleted File Time")
1588 DeletedFileTime.Display("BASE_HEX")
1589 DeletedTime                     = uint16("deleted_time", "Deleted Time")
1590 DeletedTime.NWTime()
1591 DeletedID                       = uint32( "delete_id", "Deleted ID", BE)
1592 DeletedID.Display("BASE_HEX")
1593 DeleteExistingFileFlag          = val_string8("delete_existing_file_flag", "Delete Existing File Flag", [
1594         [ 0x00, "Do Not Delete Existing File" ],
1595         [ 0x01, "Delete Existing File" ],
1596 ])      
1597 DenyReadCount                   = uint16("deny_read_count", "Deny Read Count")
1598 DenyWriteCount                  = uint16("deny_write_count", "Deny Write Count")
1599 DescriptionStrings              = fw_string("description_string", "Description", 512)
1600 DesiredAccessRights             = bitfield16("desired_access_rights", "Desired Access Rights", [
1601         bf_boolean16(0x0001, "dsired_acc_rights_read_o", "Read Only"),
1602         bf_boolean16(0x0002, "dsired_acc_rights_write_o", "Write Only"),
1603         bf_boolean16(0x0004, "dsired_acc_rights_deny_r", "Deny Read"),
1604         bf_boolean16(0x0008, "dsired_acc_rights_deny_w", "Deny Write"),
1605         bf_boolean16(0x0010, "dsired_acc_rights_compat", "Compatibility"),
1606         bf_boolean16(0x0040, "dsired_acc_rights_w_thru", "File Write Through"),
1607         bf_boolean16(0x0400, "dsired_acc_rights_del_file_cls", "Delete File Close"),
1608 ])
1609 DesiredResponseCount            = uint16("desired_response_count", "Desired Response Count")
1610 DestDirHandle                   = uint8("dest_dir_handle", "Destination Directory Handle")
1611 DestNameSpace                   = val_string8("dest_name_space", "Destination Name Space", [
1612         [ 0x00, "DOS Name Space" ],
1613         [ 0x01, "MAC Name Space" ],
1614         [ 0x02, "NFS Name Space" ],
1615         [ 0x04, "Long Name Space" ],
1616 ])
1617 DestPathComponentCount          = uint8("dest_component_count", "Destination Path Component Count")
1618 DestPath                        = nstring8("dest_path", "Destination Path")
1619 DetachDuringProcessing          = uint16("detach_during_processing", "Detach During Processing")
1620 DetachForBadConnectionNumber    = uint16("detach_for_bad_connection_number", "Detach For Bad Connection Number")
1621 DirHandle                       = uint8("dir_handle", "Directory Handle")
1622 DirHandleName                   = uint8("dir_handle_name", "Handle Name")
1623 DirHandleLong                   = uint32("dir_handle_long", "Directory Handle")
1624 DirectoryAccessRights           = uint8("directory_access_rights", "Directory Access Rights")
1625 #
1626 # XXX - what do the bits mean here?
1627 #
1628 DirectoryAttributes             = uint8("directory_attributes", "Directory Attributes")
1629 DirectoryBase                   = uint32("dir_base", "Directory Base")
1630 DirectoryBase.Display("BASE_HEX")
1631 DirectoryCount                  = uint16("dir_count", "Directory Count")
1632 DirectoryEntryNumber            = uint32("directory_entry_number", "Directory Entry Number")
1633 DirectoryEntryNumber.Display('BASE_HEX')
1634 DirectoryEntryNumberWord        = uint16("directory_entry_number_word", "Directory Entry Number")
1635 DirectoryID                     = uint16("directory_id", "Directory ID", BE)
1636 DirectoryID.Display("BASE_HEX")
1637 DirectoryName                   = fw_string("directory_name", "Directory Name",12)
1638 DirectoryName14                 = fw_string("directory_name_14", "Directory Name", 14)
1639 DirectoryNameLen                = uint8("directory_name_len", "Directory Name Length")
1640 DirectoryNumber                 = uint32("directory_number", "Directory Number")
1641 DirectoryNumber.Display("BASE_HEX")
1642 DirectoryPath                   = fw_string("directory_path", "Directory Path", 16)
1643 DirectoryServicesObjectID       = uint32("directory_services_object_id", "Directory Services Object ID")
1644 DirectoryServicesObjectID.Display("BASE_HEX")
1645 DirectoryStamp                  = uint16("directory_stamp", "Directory Stamp (0xD1D1)")
1646 DirtyCacheBuffers               = uint16("dirty_cache_buffers", "Dirty Cache Buffers")
1647 DiskChannelNumber               = uint8("disk_channel_number", "Disk Channel Number")
1648 DiskChannelTable                = val_string8("disk_channel_table", "Disk Channel Table", [
1649         [ 0x01, "XT" ],
1650         [ 0x02, "AT" ],
1651         [ 0x03, "SCSI" ],
1652         [ 0x04, "Disk Coprocessor" ],
1653 ])
1654 DiskSpaceLimit                  = uint32("disk_space_limit", "Disk Space Limit")
1655 DMAChannelsUsed                 = uint32("dma_channels_used", "DMA Channels Used")
1656 DMInfoEntries                   = uint32("dm_info_entries", "DM Info Entries")
1657 DMInfoLevel                     = val_string8("dm_info_level", "DM Info Level", [
1658         [ 0x00, "Return Detailed DM Support Module Information" ],
1659         [ 0x01, "Return Number of DM Support Modules" ],
1660         [ 0x02, "Return DM Support Modules Names" ],
1661 ])      
1662 DMFlags                         = val_string8("dm_flags", "DM Flags", [
1663         [ 0x00, "OnLine Media" ],
1664         [ 0x01, "OffLine Media" ],
1665 ])
1666 DMmajorVersion                  = uint32("dm_major_version", "DM Major Version")
1667 DMminorVersion                  = uint32("dm_minor_version", "DM Minor Version")
1668 DMPresentFlag                   = val_string8("dm_present_flag", "Data Migration Present Flag", [
1669         [ 0x00, "Data Migration NLM is not loaded" ],
1670         [ 0x01, "Data Migration NLM has been loaded and is running" ],
1671 ])      
1672 DOSDirectoryBase                = uint32("dos_directory_base", "DOS Directory Base")
1673 DOSDirectoryBase.Display("BASE_HEX")
1674 DOSDirectoryEntry               = uint32("dos_directory_entry", "DOS Directory Entry")
1675 DOSDirectoryEntry.Display("BASE_HEX")
1676 DOSDirectoryEntryNumber         = uint32("dos_directory_entry_number", "DOS Directory Entry Number")
1677 DOSDirectoryEntryNumber.Display('BASE_HEX')
1678 DOSFileAttributes               = uint8("dos_file_attributes", "DOS File Attributes")
1679 DOSParentDirectoryEntry         = uint32("dos_parent_directory_entry", "DOS Parent Directory Entry")
1680 DOSParentDirectoryEntry.Display('BASE_HEX')
1681 DOSSequence                     = uint32("dos_sequence", "DOS Sequence")
1682 DriveCylinders                  = uint16("drive_cylinders", "Drive Cylinders")
1683 DriveDefinitionString           = fw_string("drive_definition_string", "Drive Definition", 64)
1684 DriveHeads                      = uint8("drive_heads", "Drive Heads")
1685 DriveMappingTable               = bytes("drive_mapping_table", "Drive Mapping Table", 32)
1686 DriveMirrorTable                = bytes("drive_mirror_table", "Drive Mirror Table", 32)
1687 DriverBoardName                 = stringz("driver_board_name", "Driver Board Name")
1688 DriveRemovableFlag              = val_string8("drive_removable_flag", "Drive Removable Flag", [
1689         [ 0x00, "Nonremovable" ],
1690         [ 0xff, "Removable" ],
1691 ])
1692 DriverLogicalName               = stringz("driver_log_name", "Driver Logical Name")
1693 DriverShortName                 = stringz("driver_short_name", "Driver Short Name")
1694 DriveSize                       = uint32("drive_size", "Drive Size")
1695 DstEAFlags                      = val_string16("dst_ea_flags", "Destination EA Flags", [
1696         [ 0x0000, "Return EAHandle,Information Level 0" ],
1697         [ 0x0001, "Return NetWareHandle,Information Level 0" ],
1698         [ 0x0002, "Return Volume/Directory Number,Information Level 0" ],
1699         [ 0x0004, "Return EAHandle,Close Handle on Error,Information Level 0" ],
1700         [ 0x0005, "Return NetWareHandle,Close Handle on Error,Information Level 0" ],
1701         [ 0x0006, "Return Volume/Directory Number,Close Handle on Error,Information Level 0" ],
1702         [ 0x0010, "Return EAHandle,Information Level 1" ],
1703         [ 0x0011, "Return NetWareHandle,Information Level 1" ],
1704         [ 0x0012, "Return Volume/Directory Number,Information Level 1" ],
1705         [ 0x0014, "Return EAHandle,Close Handle on Error,Information Level 1" ],
1706         [ 0x0015, "Return NetWareHandle,Close Handle on Error,Information Level 1" ],
1707         [ 0x0016, "Return Volume/Directory Number,Close Handle on Error,Information Level 1" ],
1708         [ 0x0020, "Return EAHandle,Information Level 2" ],
1709         [ 0x0021, "Return NetWareHandle,Information Level 2" ],
1710         [ 0x0022, "Return Volume/Directory Number,Information Level 2" ],
1711         [ 0x0024, "Return EAHandle,Close Handle on Error,Information Level 2" ],
1712         [ 0x0025, "Return NetWareHandle,Close Handle on Error,Information Level 2" ],
1713         [ 0x0026, "Return Volume/Directory Number,Close Handle on Error,Information Level 2" ],
1714         [ 0x0030, "Return EAHandle,Information Level 3" ],
1715         [ 0x0031, "Return NetWareHandle,Information Level 3" ],
1716         [ 0x0032, "Return Volume/Directory Number,Information Level 3" ],
1717         [ 0x0034, "Return EAHandle,Close Handle on Error,Information Level 3" ],
1718         [ 0x0035, "Return NetWareHandle,Close Handle on Error,Information Level 3" ],
1719         [ 0x0036, "Return Volume/Directory Number,Close Handle on Error,Information Level 3" ],
1720         [ 0x0040, "Return EAHandle,Information Level 4" ],
1721         [ 0x0041, "Return NetWareHandle,Information Level 4" ],
1722         [ 0x0042, "Return Volume/Directory Number,Information Level 4" ],
1723         [ 0x0044, "Return EAHandle,Close Handle on Error,Information Level 4" ],
1724         [ 0x0045, "Return NetWareHandle,Close Handle on Error,Information Level 4" ],
1725         [ 0x0046, "Return Volume/Directory Number,Close Handle on Error,Information Level 4" ],
1726         [ 0x0050, "Return EAHandle,Information Level 5" ],
1727         [ 0x0051, "Return NetWareHandle,Information Level 5" ],
1728         [ 0x0052, "Return Volume/Directory Number,Information Level 5" ],
1729         [ 0x0054, "Return EAHandle,Close Handle on Error,Information Level 5" ],
1730         [ 0x0055, "Return NetWareHandle,Close Handle on Error,Information Level 5" ],
1731         [ 0x0056, "Return Volume/Directory Number,Close Handle on Error,Information Level 5" ],
1732         [ 0x0060, "Return EAHandle,Information Level 6" ],
1733         [ 0x0061, "Return NetWareHandle,Information Level 6" ],
1734         [ 0x0062, "Return Volume/Directory Number,Information Level 6" ],
1735         [ 0x0064, "Return EAHandle,Close Handle on Error,Information Level 6" ],
1736         [ 0x0065, "Return NetWareHandle,Close Handle on Error,Information Level 6" ],
1737         [ 0x0066, "Return Volume/Directory Number,Close Handle on Error,Information Level 6" ],
1738         [ 0x0070, "Return EAHandle,Information Level 7" ],
1739         [ 0x0071, "Return NetWareHandle,Information Level 7" ],
1740         [ 0x0072, "Return Volume/Directory Number,Information Level 7" ],
1741         [ 0x0074, "Return EAHandle,Close Handle on Error,Information Level 7" ],
1742         [ 0x0075, "Return NetWareHandle,Close Handle on Error,Information Level 7" ],
1743         [ 0x0076, "Return Volume/Directory Number,Close Handle on Error,Information Level 7" ],
1744         [ 0x0080, "Return EAHandle,Information Level 0,Immediate Close Handle" ],
1745         [ 0x0081, "Return NetWareHandle,Information Level 0,Immediate Close Handle" ],
1746         [ 0x0082, "Return Volume/Directory Number,Information Level 0,Immediate Close Handle" ],
1747         [ 0x0084, "Return EAHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1748         [ 0x0085, "Return NetWareHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1749         [ 0x0086, "Return Volume/Directory Number,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1750         [ 0x0090, "Return EAHandle,Information Level 1,Immediate Close Handle" ],
1751         [ 0x0091, "Return NetWareHandle,Information Level 1,Immediate Close Handle" ],
1752         [ 0x0092, "Return Volume/Directory Number,Information Level 1,Immediate Close Handle" ],
1753         [ 0x0094, "Return EAHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1754         [ 0x0095, "Return NetWareHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1755         [ 0x0096, "Return Volume/Directory Number,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1756         [ 0x00a0, "Return EAHandle,Information Level 2,Immediate Close Handle" ],
1757         [ 0x00a1, "Return NetWareHandle,Information Level 2,Immediate Close Handle" ],
1758         [ 0x00a2, "Return Volume/Directory Number,Information Level 2,Immediate Close Handle" ],
1759         [ 0x00a4, "Return EAHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1760         [ 0x00a5, "Return NetWareHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1761         [ 0x00a6, "Return Volume/Directory Number,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1762         [ 0x00b0, "Return EAHandle,Information Level 3,Immediate Close Handle" ],
1763         [ 0x00b1, "Return NetWareHandle,Information Level 3,Immediate Close Handle" ],
1764         [ 0x00b2, "Return Volume/Directory Number,Information Level 3,Immediate Close Handle" ],
1765         [ 0x00b4, "Return EAHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1766         [ 0x00b5, "Return NetWareHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1767         [ 0x00b6, "Return Volume/Directory Number,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1768         [ 0x00c0, "Return EAHandle,Information Level 4,Immediate Close Handle" ],
1769         [ 0x00c1, "Return NetWareHandle,Information Level 4,Immediate Close Handle" ],
1770         [ 0x00c2, "Return Volume/Directory Number,Information Level 4,Immediate Close Handle" ],
1771         [ 0x00c4, "Return EAHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1772         [ 0x00c5, "Return NetWareHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1773         [ 0x00c6, "Return Volume/Directory Number,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1774         [ 0x00d0, "Return EAHandle,Information Level 5,Immediate Close Handle" ],
1775         [ 0x00d1, "Return NetWareHandle,Information Level 5,Immediate Close Handle" ],
1776         [ 0x00d2, "Return Volume/Directory Number,Information Level 5,Immediate Close Handle" ],
1777         [ 0x00d4, "Return EAHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1778         [ 0x00d5, "Return NetWareHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1779         [ 0x00d6, "Return Volume/Directory Number,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1780         [ 0x00e0, "Return EAHandle,Information Level 6,Immediate Close Handle" ],
1781         [ 0x00e1, "Return NetWareHandle,Information Level 6,Immediate Close Handle" ],
1782         [ 0x00e2, "Return Volume/Directory Number,Information Level 6,Immediate Close Handle" ],
1783         [ 0x00e4, "Return EAHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1784         [ 0x00e5, "Return NetWareHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1785         [ 0x00e6, "Return Volume/Directory Number,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1786         [ 0x00f0, "Return EAHandle,Information Level 7,Immediate Close Handle" ],
1787         [ 0x00f1, "Return NetWareHandle,Information Level 7,Immediate Close Handle" ],
1788         [ 0x00f2, "Return Volume/Directory Number,Information Level 7,Immediate Close Handle" ],
1789         [ 0x00f4, "Return EAHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1790         [ 0x00f5, "Return NetWareHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1791         [ 0x00f6, "Return Volume/Directory Number,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1792 ])
1793 dstNSIndicator                  = val_string16("dst_ns_indicator", "Destination Name Space Indicator", [
1794         [ 0x0000, "Return Source Name Space Information" ],
1795         [ 0x0001, "Return Destination Name Space Information" ],
1796 ])      
1797 DstQueueID                      = uint32("dst_queue_id", "Destination Queue ID")
1798 DuplicateRepliesSent            = uint16("duplicate_replies_sent", "Duplicate Replies Sent")
1799
1800 EAAccessFlag                    = bitfield16("ea_access_flag", "EA Access Flag", [
1801         bf_boolean16(0x0001, "ea_permanent_memory", "Permanent Memory"),
1802         bf_boolean16(0x0002, "ea_deep_freeze", "Deep Freeze"),
1803         bf_boolean16(0x0004, "ea_in_progress", "In Progress"),
1804         bf_boolean16(0x0008, "ea_header_being_enlarged", "Header Being Enlarged"),
1805         bf_boolean16(0x0010, "ea_new_tally_used", "New Tally Used"),
1806         bf_boolean16(0x0020, "ea_tally_need_update", "Tally Need Update"),
1807         bf_boolean16(0x0040, "ea_score_card_present", "Score Card Present"),
1808         bf_boolean16(0x0080, "ea_need_bit_flag", "EA Need Bit Flag"),
1809         bf_boolean16(0x0100, "ea_write_privileges", "Write Privileges"),
1810         bf_boolean16(0x0200, "ea_read_privileges", "Read Privileges"),
1811         bf_boolean16(0x0400, "ea_delete_privileges", "Delete Privileges"),
1812         bf_boolean16(0x0800, "ea_system_ea_only", "System EA Only"),
1813         bf_boolean16(0x1000, "ea_write_in_progress", "Write In Progress"),
1814 ])
1815 EABytesWritten                  = uint32("ea_bytes_written", "Bytes Written")
1816 EACount                         = uint32("ea_count", "Count")
1817 EADataSize                      = uint32("ea_data_size", "Data Size")
1818 EADataSizeDuplicated            = uint32("ea_data_size_duplicated", "Data Size Duplicated")
1819 EADuplicateCount                = uint32("ea_duplicate_count", "Duplicate Count")
1820 EAErrorCodes                    = val_string16("ea_error_codes", "EA Error Codes", [
1821         [ 0x0000, "SUCCESSFUL" ],
1822         [ 0x00c8, "ERR_MISSING_EA_KEY" ],
1823         [ 0x00c9, "ERR_EA_NOT_FOUND" ],
1824         [ 0x00ca, "ERR_INVALID_EA_HANDLE_TYPE" ],
1825         [ 0x00cb, "ERR_EA_NO_KEY_NO_DATA" ],
1826         [ 0x00cc, "ERR_EA_NUMBER_MISMATCH" ],
1827         [ 0x00cd, "ERR_EXTENT_NUMBER_OUT_OF_RANGE" ],
1828         [ 0x00ce, "ERR_EA_BAD_DIR_NUM" ],
1829         [ 0x00cf, "ERR_INVALID_EA_HANDLE" ],
1830         [ 0x00d0, "ERR_EA_POSITION_OUT_OF_RANGE" ],
1831         [ 0x00d1, "ERR_EA_ACCESS_DENIED" ],
1832         [ 0x00d2, "ERR_DATA_PAGE_ODD_SIZE" ],
1833         [ 0x00d3, "ERR_EA_VOLUME_NOT_MOUNTED" ],
1834         [ 0x00d4, "ERR_BAD_PAGE_BOUNDARY" ],
1835         [ 0x00d5, "ERR_INSPECT_FAILURE" ],
1836         [ 0x00d6, "ERR_EA_ALREADY_CLAIMED" ],
1837         [ 0x00d7, "ERR_ODD_BUFFER_SIZE" ],
1838         [ 0x00d8, "ERR_NO_SCORECARDS" ],
1839         [ 0x00d9, "ERR_BAD_EDS_SIGNATURE" ],
1840         [ 0x00da, "ERR_EA_SPACE_LIMIT" ],
1841         [ 0x00db, "ERR_EA_KEY_CORRUPT" ],
1842         [ 0x00dc, "ERR_EA_KEY_LIMIT" ],
1843         [ 0x00dd, "ERR_TALLY_CORRUPT" ],
1844 ])
1845 EAFlags                         = val_string16("ea_flags", "EA Flags", [
1846         [ 0x0000, "Return EAHandle,Information Level 0" ],
1847         [ 0x0001, "Return NetWareHandle,Information Level 0" ],
1848         [ 0x0002, "Return Volume/Directory Number,Information Level 0" ],
1849         [ 0x0004, "Return EAHandle,Close Handle on Error,Information Level 0" ],
1850         [ 0x0005, "Return NetWareHandle,Close Handle on Error,Information Level 0" ],
1851         [ 0x0006, "Return Volume/Directory Number,Close Handle on Error,Information Level 0" ],
1852         [ 0x0010, "Return EAHandle,Information Level 1" ],
1853         [ 0x0011, "Return NetWareHandle,Information Level 1" ],
1854         [ 0x0012, "Return Volume/Directory Number,Information Level 1" ],
1855         [ 0x0014, "Return EAHandle,Close Handle on Error,Information Level 1" ],
1856         [ 0x0015, "Return NetWareHandle,Close Handle on Error,Information Level 1" ],
1857         [ 0x0016, "Return Volume/Directory Number,Close Handle on Error,Information Level 1" ],
1858         [ 0x0020, "Return EAHandle,Information Level 2" ],
1859         [ 0x0021, "Return NetWareHandle,Information Level 2" ],
1860         [ 0x0022, "Return Volume/Directory Number,Information Level 2" ],
1861         [ 0x0024, "Return EAHandle,Close Handle on Error,Information Level 2" ],
1862         [ 0x0025, "Return NetWareHandle,Close Handle on Error,Information Level 2" ],
1863         [ 0x0026, "Return Volume/Directory Number,Close Handle on Error,Information Level 2" ],
1864         [ 0x0030, "Return EAHandle,Information Level 3" ],
1865         [ 0x0031, "Return NetWareHandle,Information Level 3" ],
1866         [ 0x0032, "Return Volume/Directory Number,Information Level 3" ],
1867         [ 0x0034, "Return EAHandle,Close Handle on Error,Information Level 3" ],
1868         [ 0x0035, "Return NetWareHandle,Close Handle on Error,Information Level 3" ],
1869         [ 0x0036, "Return Volume/Directory Number,Close Handle on Error,Information Level 3" ],
1870         [ 0x0040, "Return EAHandle,Information Level 4" ],
1871         [ 0x0041, "Return NetWareHandle,Information Level 4" ],
1872         [ 0x0042, "Return Volume/Directory Number,Information Level 4" ],
1873         [ 0x0044, "Return EAHandle,Close Handle on Error,Information Level 4" ],
1874         [ 0x0045, "Return NetWareHandle,Close Handle on Error,Information Level 4" ],
1875         [ 0x0046, "Return Volume/Directory Number,Close Handle on Error,Information Level 4" ],
1876         [ 0x0050, "Return EAHandle,Information Level 5" ],
1877         [ 0x0051, "Return NetWareHandle,Information Level 5" ],
1878         [ 0x0052, "Return Volume/Directory Number,Information Level 5" ],
1879         [ 0x0054, "Return EAHandle,Close Handle on Error,Information Level 5" ],
1880         [ 0x0055, "Return NetWareHandle,Close Handle on Error,Information Level 5" ],
1881         [ 0x0056, "Return Volume/Directory Number,Close Handle on Error,Information Level 5" ],
1882         [ 0x0060, "Return EAHandle,Information Level 6" ],
1883         [ 0x0061, "Return NetWareHandle,Information Level 6" ],
1884         [ 0x0062, "Return Volume/Directory Number,Information Level 6" ],
1885         [ 0x0064, "Return EAHandle,Close Handle on Error,Information Level 6" ],
1886         [ 0x0065, "Return NetWareHandle,Close Handle on Error,Information Level 6" ],
1887         [ 0x0066, "Return Volume/Directory Number,Close Handle on Error,Information Level 6" ],
1888         [ 0x0070, "Return EAHandle,Information Level 7" ],
1889         [ 0x0071, "Return NetWareHandle,Information Level 7" ],
1890         [ 0x0072, "Return Volume/Directory Number,Information Level 7" ],
1891         [ 0x0074, "Return EAHandle,Close Handle on Error,Information Level 7" ],
1892         [ 0x0075, "Return NetWareHandle,Close Handle on Error,Information Level 7" ],
1893         [ 0x0076, "Return Volume/Directory Number,Close Handle on Error,Information Level 7" ],
1894         [ 0x0080, "Return EAHandle,Information Level 0,Immediate Close Handle" ],
1895         [ 0x0081, "Return NetWareHandle,Information Level 0,Immediate Close Handle" ],
1896         [ 0x0082, "Return Volume/Directory Number,Information Level 0,Immediate Close Handle" ],
1897         [ 0x0084, "Return EAHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1898         [ 0x0085, "Return NetWareHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1899         [ 0x0086, "Return Volume/Directory Number,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1900         [ 0x0090, "Return EAHandle,Information Level 1,Immediate Close Handle" ],
1901         [ 0x0091, "Return NetWareHandle,Information Level 1,Immediate Close Handle" ],
1902         [ 0x0092, "Return Volume/Directory Number,Information Level 1,Immediate Close Handle" ],
1903         [ 0x0094, "Return EAHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1904         [ 0x0095, "Return NetWareHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1905         [ 0x0096, "Return Volume/Directory Number,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1906         [ 0x00a0, "Return EAHandle,Information Level 2,Immediate Close Handle" ],
1907         [ 0x00a1, "Return NetWareHandle,Information Level 2,Immediate Close Handle" ],
1908         [ 0x00a2, "Return Volume/Directory Number,Information Level 2,Immediate Close Handle" ],
1909         [ 0x00a4, "Return EAHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1910         [ 0x00a5, "Return NetWareHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1911         [ 0x00a6, "Return Volume/Directory Number,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1912         [ 0x00b0, "Return EAHandle,Information Level 3,Immediate Close Handle" ],
1913         [ 0x00b1, "Return NetWareHandle,Information Level 3,Immediate Close Handle" ],
1914         [ 0x00b2, "Return Volume/Directory Number,Information Level 3,Immediate Close Handle" ],
1915         [ 0x00b4, "Return EAHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1916         [ 0x00b5, "Return NetWareHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1917         [ 0x00b6, "Return Volume/Directory Number,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1918         [ 0x00c0, "Return EAHandle,Information Level 4,Immediate Close Handle" ],
1919         [ 0x00c1, "Return NetWareHandle,Information Level 4,Immediate Close Handle" ],
1920         [ 0x00c2, "Return Volume/Directory Number,Information Level 4,Immediate Close Handle" ],
1921         [ 0x00c4, "Return EAHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1922         [ 0x00c5, "Return NetWareHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1923         [ 0x00c6, "Return Volume/Directory Number,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1924         [ 0x00d0, "Return EAHandle,Information Level 5,Immediate Close Handle" ],
1925         [ 0x00d1, "Return NetWareHandle,Information Level 5,Immediate Close Handle" ],
1926         [ 0x00d2, "Return Volume/Directory Number,Information Level 5,Immediate Close Handle" ],
1927         [ 0x00d4, "Return EAHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1928         [ 0x00d5, "Return NetWareHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1929         [ 0x00d6, "Return Volume/Directory Number,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1930         [ 0x00e0, "Return EAHandle,Information Level 6,Immediate Close Handle" ],
1931         [ 0x00e1, "Return NetWareHandle,Information Level 6,Immediate Close Handle" ],
1932         [ 0x00e2, "Return Volume/Directory Number,Information Level 6,Immediate Close Handle" ],
1933         [ 0x00e4, "Return EAHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1934         [ 0x00e5, "Return NetWareHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1935         [ 0x00e6, "Return Volume/Directory Number,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1936         [ 0x00f0, "Return EAHandle,Information Level 7,Immediate Close Handle" ],
1937         [ 0x00f1, "Return NetWareHandle,Information Level 7,Immediate Close Handle" ],
1938         [ 0x00f2, "Return Volume/Directory Number,Information Level 7,Immediate Close Handle" ],
1939         [ 0x00f4, "Return EAHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1940         [ 0x00f5, "Return NetWareHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1941         [ 0x00f6, "Return Volume/Directory Number,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1942 ])
1943 EAHandle                        = uint32("ea_handle", "EA Handle")
1944 EAHandle.Display("BASE_HEX")
1945 EAHandleOrNetWareHandleOrVolume = uint32("ea_handle_or_netware_handle_or_volume", "EAHandle or NetWare Handle or Volume (see EAFlags)")
1946 EAHandleOrNetWareHandleOrVolume.Display("BASE_HEX")
1947 EAKey                           = nstring16("ea_key", "EA Key")
1948 EAKeySize                       = uint32("ea_key_size", "Key Size")
1949 EAKeySizeDuplicated             = uint32("ea_key_size_duplicated", "Key Size Duplicated")
1950 EAValue                         = nstring16("ea_value", "EA Value")
1951 EAValueRep                      = fw_string("ea_value_rep", "EA Value", 1)
1952 EAValueLength                   = uint16("ea_value_length", "Value Length")
1953 EchoSocket                      = uint16("echo_socket", "Echo Socket")
1954 EchoSocket.Display('BASE_HEX')
1955 EffectiveRights                 = bitfield8("effective_rights", "Effective Rights", [
1956         bf_boolean8(0x01, "effective_rights_read", "Read Rights"),
1957         bf_boolean8(0x02, "effective_rights_write", "Write Rights"),
1958         bf_boolean8(0x04, "effective_rights_open", "Open Rights"),
1959         bf_boolean8(0x08, "effective_rights_create", "Create Rights"),
1960         bf_boolean8(0x10, "effective_rights_delete", "Delete Rights"),
1961         bf_boolean8(0x20, "effective_rights_parental", "Parental Rights"),
1962         bf_boolean8(0x40, "effective_rights_search", "Search Rights"),
1963         bf_boolean8(0x80, "effective_rights_modify", "Modify Rights"),
1964 ])
1965 EnumInfoMask                    = bitfield8("enum_info_mask", "Return Information Mask", [
1966         bf_boolean8(0x01, "enum_info_transport", "Transport Information"),
1967         bf_boolean8(0x02, "enum_info_time", "Time Information"),
1968         bf_boolean8(0x04, "enum_info_name", "Name Information"),
1969         bf_boolean8(0x08, "enum_info_lock", "Lock Information"),
1970         bf_boolean8(0x10, "enum_info_print", "Print Information"),
1971         bf_boolean8(0x20, "enum_info_stats", "Statistical Information"),
1972         bf_boolean8(0x40, "enum_info_account", "Accounting Information"),
1973         bf_boolean8(0x80, "enum_info_auth", "Authentication Information"),
1974 ])
1975
1976 eventOffset                     = bytes("event_offset", "Event Offset", 8)
1977 eventOffset.Display("BASE_HEX")
1978 eventTime                       = uint32("event_time", "Event Time")
1979 eventTime.Display("BASE_HEX")
1980 ExpirationTime                  = uint32("expiration_time", "Expiration Time")
1981 ExpirationTime.Display('BASE_HEX')
1982 ExtAttrDataSize                 = uint32("ext_attr_data_size", "Extended Attributes Data Size")
1983 ExtAttrCount                    = uint32("ext_attr_count", "Extended Attributes Count")
1984 ExtAttrKeySize                  = uint32("ext_attr_key_size", "Extended Attributes Key Size")
1985 ExtendedAttributesDefined       = uint32("extended_attributes_defined", "Extended Attributes Defined")
1986 ExtendedAttributeExtantsUsed    = uint32("extended_attribute_extants_used", "Extended Attribute Extants Used")
1987 ExtendedInfo                    = bitfield16("ext_info", "Extended Return Information", [
1988         bf_boolean16(0x0001, "ext_info_update", "Update"),
1989         bf_boolean16(0x0002, "ext_info_dos_name", "DOS Name"),
1990         bf_boolean16(0x0004, "ext_info_flush", "Flush"),
1991         bf_boolean16(0x0008, "ext_info_parental", "Parental"),
1992         bf_boolean16(0x0010, "ext_info_mac_finder", "MAC Finder"),
1993         bf_boolean16(0x0020, "ext_info_sibling", "Sibling"),
1994         bf_boolean16(0x0040, "ext_info_effective", "Effective"),
1995         bf_boolean16(0x0080, "ext_info_mac_date", "MAC Date"),
1996         bf_boolean16(0x0100, "ext_info_access", "Last Access"),
1997         bf_boolean16(0x0400, "ext_info_64_bit_fs", "64 Bit File Sizes"),
1998         bf_boolean16(0x8000, "ext_info_newstyle", "New Style"),
1999 ])
2000 ExtRouterActiveFlag             = boolean8("ext_router_active_flag", "External Router Active Flag")
2001
2002 FailedAllocReqCnt               = uint32("failed_alloc_req", "Failed Alloc Request Count")
2003 FatalFATWriteErrors             = uint16("fatal_fat_write_errors", "Fatal FAT Write Errors")
2004 FATScanErrors                   = uint16("fat_scan_errors", "FAT Scan Errors")
2005 FATWriteErrors                  = uint16("fat_write_errors", "FAT Write Errors")
2006 FieldsLenTable                  = bytes("fields_len_table", "Fields Len Table", 32)
2007 FileCount                       = uint16("file_count", "File Count")
2008 FileDate                        = uint16("file_date", "File Date")
2009 FileDate.NWDate()
2010 FileDirWindow                   = uint16("file_dir_win", "File/Dir Window")
2011 FileDirWindow.Display("BASE_HEX")
2012 FileExecuteType                 = uint8("file_execute_type", "File Execute Type")
2013 FileExtendedAttributes          = val_string8("file_ext_attr", "File Extended Attributes", [
2014         [ 0x00, "Search On All Read Only Opens" ],
2015         [ 0x01, "Search On Read Only Opens With No Path" ],
2016         [ 0x02, "Shell Default Search Mode" ],
2017         [ 0x03, "Search On All Opens With No Path" ],
2018         [ 0x04, "Do Not Search" ],
2019         [ 0x05, "Reserved" ],
2020         [ 0x06, "Search On All Opens" ],
2021         [ 0x07, "Reserved" ],
2022         [ 0x08, "Search On All Read Only Opens/Indexed" ],
2023         [ 0x09, "Search On Read Only Opens With No Path/Indexed" ],
2024         [ 0x0a, "Shell Default Search Mode/Indexed" ],
2025         [ 0x0b, "Search On All Opens With No Path/Indexed" ],
2026         [ 0x0c, "Do Not Search/Indexed" ],
2027         [ 0x0d, "Indexed" ],
2028         [ 0x0e, "Search On All Opens/Indexed" ],
2029         [ 0x0f, "Indexed" ],
2030         [ 0x10, "Search On All Read Only Opens/Transactional" ],
2031         [ 0x11, "Search On Read Only Opens With No Path/Transactional" ],
2032         [ 0x12, "Shell Default Search Mode/Transactional" ],
2033         [ 0x13, "Search On All Opens With No Path/Transactional" ],
2034         [ 0x14, "Do Not Search/Transactional" ],
2035         [ 0x15, "Transactional" ],
2036         [ 0x16, "Search On All Opens/Transactional" ],
2037         [ 0x17, "Transactional" ],
2038         [ 0x18, "Search On All Read Only Opens/Indexed/Transactional" ],
2039         [ 0x19, "Search On Read Only Opens With No Path/Indexed/Transactional" ],
2040         [ 0x1a, "Shell Default Search Mode/Indexed/Transactional" ],
2041         [ 0x1b, "Search On All Opens With No Path/Indexed/Transactional" ],
2042         [ 0x1c, "Do Not Search/Indexed/Transactional" ],
2043         [ 0x1d, "Indexed/Transactional" ],
2044         [ 0x1e, "Search On All Opens/Indexed/Transactional" ],
2045         [ 0x1f, "Indexed/Transactional" ],
2046         [ 0x40, "Search On All Read Only Opens/Read Audit" ],
2047         [ 0x41, "Search On Read Only Opens With No Path/Read Audit" ],
2048         [ 0x42, "Shell Default Search Mode/Read Audit" ],
2049         [ 0x43, "Search On All Opens With No Path/Read Audit" ],
2050         [ 0x44, "Do Not Search/Read Audit" ],
2051         [ 0x45, "Read Audit" ],
2052         [ 0x46, "Search On All Opens/Read Audit" ],
2053         [ 0x47, "Read Audit" ],
2054         [ 0x48, "Search On All Read Only Opens/Indexed/Read Audit" ],
2055         [ 0x49, "Search On Read Only Opens With No Path/Indexed/Read Audit" ],
2056         [ 0x4a, "Shell Default Search Mode/Indexed/Read Audit" ],
2057         [ 0x4b, "Search On All Opens With No Path/Indexed/Read Audit" ],
2058         [ 0x4c, "Do Not Search/Indexed/Read Audit" ],
2059         [ 0x4d, "Indexed/Read Audit" ],
2060         [ 0x4e, "Search On All Opens/Indexed/Read Audit" ],
2061         [ 0x4f, "Indexed/Read Audit" ],
2062         [ 0x50, "Search On All Read Only Opens/Transactional/Read Audit" ],
2063         [ 0x51, "Search On Read Only Opens With No Path/Transactional/Read Audit" ],
2064         [ 0x52, "Shell Default Search Mode/Transactional/Read Audit" ],
2065         [ 0x53, "Search On All Opens With No Path/Transactional/Read Audit" ],
2066         [ 0x54, "Do Not Search/Transactional/Read Audit" ],
2067         [ 0x55, "Transactional/Read Audit" ],
2068         [ 0x56, "Search On All Opens/Transactional/Read Audit" ],
2069         [ 0x57, "Transactional/Read Audit" ],
2070         [ 0x58, "Search On All Read Only Opens/Indexed/Transactional/Read Audit" ],
2071         [ 0x59, "Search On Read Only Opens With No Path/Indexed/Transactional/Read Audit" ],
2072         [ 0x5a, "Shell Default Search Mode/Indexed/Transactional/Read Audit" ],
2073         [ 0x5b, "Search On All Opens With No Path/Indexed/Transactional/Read Audit" ],
2074         [ 0x5c, "Do Not Search/Indexed/Transactional/Read Audit" ],
2075         [ 0x5d, "Indexed/Transactional/Read Audit" ],
2076         [ 0x5e, "Search On All Opens/Indexed/Transactional/Read Audit" ],
2077         [ 0x5f, "Indexed/Transactional/Read Audit" ],
2078         [ 0x80, "Search On All Read Only Opens/Write Audit" ],
2079         [ 0x81, "Search On Read Only Opens With No Path/Write Audit" ],
2080         [ 0x82, "Shell Default Search Mode/Write Audit" ],
2081         [ 0x83, "Search On All Opens With No Path/Write Audit" ],
2082         [ 0x84, "Do Not Search/Write Audit" ],
2083         [ 0x85, "Write Audit" ],
2084         [ 0x86, "Search On All Opens/Write Audit" ],
2085         [ 0x87, "Write Audit" ],
2086         [ 0x88, "Search On All Read Only Opens/Indexed/Write Audit" ],
2087         [ 0x89, "Search On Read Only Opens With No Path/Indexed/Write Audit" ],
2088         [ 0x8a, "Shell Default Search Mode/Indexed/Write Audit" ],
2089         [ 0x8b, "Search On All Opens With No Path/Indexed/Write Audit" ],
2090         [ 0x8c, "Do Not Search/Indexed/Write Audit" ],
2091         [ 0x8d, "Indexed/Write Audit" ],
2092         [ 0x8e, "Search On All Opens/Indexed/Write Audit" ],
2093         [ 0x8f, "Indexed/Write Audit" ],
2094         [ 0x90, "Search On All Read Only Opens/Transactional/Write Audit" ],
2095         [ 0x91, "Search On Read Only Opens With No Path/Transactional/Write Audit" ],
2096         [ 0x92, "Shell Default Search Mode/Transactional/Write Audit" ],
2097         [ 0x93, "Search On All Opens With No Path/Transactional/Write Audit" ],
2098         [ 0x94, "Do Not Search/Transactional/Write Audit" ],
2099         [ 0x95, "Transactional/Write Audit" ],
2100         [ 0x96, "Search On All Opens/Transactional/Write Audit" ],
2101         [ 0x97, "Transactional/Write Audit" ],
2102         [ 0x98, "Search On All Read Only Opens/Indexed/Transactional/Write Audit" ],
2103         [ 0x99, "Search On Read Only Opens With No Path/Indexed/Transactional/Write Audit" ],
2104         [ 0x9a, "Shell Default Search Mode/Indexed/Transactional/Write Audit" ],
2105         [ 0x9b, "Search On All Opens With No Path/Indexed/Transactional/Write Audit" ],
2106         [ 0x9c, "Do Not Search/Indexed/Transactional/Write Audit" ],
2107         [ 0x9d, "Indexed/Transactional/Write Audit" ],
2108         [ 0x9e, "Search On All Opens/Indexed/Transactional/Write Audit" ],
2109         [ 0x9f, "Indexed/Transactional/Write Audit" ],
2110         [ 0xa0, "Search On All Read Only Opens/Read Audit/Write Audit" ],
2111         [ 0xa1, "Search On Read Only Opens With No Path/Read Audit/Write Audit" ],
2112         [ 0xa2, "Shell Default Search Mode/Read Audit/Write Audit" ],
2113         [ 0xa3, "Search On All Opens With No Path/Read Audit/Write Audit" ],
2114         [ 0xa4, "Do Not Search/Read Audit/Write Audit" ],
2115         [ 0xa5, "Read Audit/Write Audit" ],
2116         [ 0xa6, "Search On All Opens/Read Audit/Write Audit" ],
2117         [ 0xa7, "Read Audit/Write Audit" ],
2118         [ 0xa8, "Search On All Read Only Opens/Indexed/Read Audit/Write Audit" ],
2119         [ 0xa9, "Search On Read Only Opens With No Path/Indexed/Read Audit/Write Audit" ],
2120         [ 0xaa, "Shell Default Search Mode/Indexed/Read Audit/Write Audit" ],
2121         [ 0xab, "Search On All Opens With No Path/Indexed/Read Audit/Write Audit" ],
2122         [ 0xac, "Do Not Search/Indexed/Read Audit/Write Audit" ],
2123         [ 0xad, "Indexed/Read Audit/Write Audit" ],
2124         [ 0xae, "Search On All Opens/Indexed/Read Audit/Write Audit" ],
2125         [ 0xaf, "Indexed/Read Audit/Write Audit" ],
2126         [ 0xb0, "Search On All Read Only Opens/Transactional/Read Audit/Write Audit" ],
2127         [ 0xb1, "Search On Read Only Opens With No Path/Transactional/Read Audit/Write Audit" ],
2128         [ 0xb2, "Shell Default Search Mode/Transactional/Read Audit/Write Audit" ],
2129         [ 0xb3, "Search On All Opens With No Path/Transactional/Read Audit/Write Audit" ],
2130         [ 0xb4, "Do Not Search/Transactional/Read Audit/Write Audit" ],
2131         [ 0xb5, "Transactional/Read Audit/Write Audit" ],
2132         [ 0xb6, "Search On All Opens/Transactional/Read Audit/Write Audit" ],
2133         [ 0xb7, "Transactional/Read Audit/Write Audit" ],
2134         [ 0xb8, "Search On All Read Only Opens/Indexed/Transactional/Read Audit/Write Audit" ],
2135         [ 0xb9, "Search On Read Only Opens With No Path/Indexed/Transactional/Read Audit/Write Audit" ],
2136         [ 0xba, "Shell Default Search Mode/Indexed/Transactional/Read Audit/Write Audit" ],
2137         [ 0xbb, "Search On All Opens With No Path/Indexed/Transactional/Read Audit/Write Audit" ],
2138         [ 0xbc, "Do Not Search/Indexed/Transactional/Read Audit/Write Audit" ],
2139         [ 0xbd, "Indexed/Transactional/Read Audit/Write Audit" ],
2140         [ 0xbe, "Search On All Opens/Indexed/Transactional/Read Audit/Write Audit" ],
2141         [ 0xbf, "Indexed/Transactional/Read Audit/Write Audit" ],
2142 ])
2143 fileFlags                       = uint32("file_flags", "File Flags")
2144 FileHandle                      = bytes("file_handle", "File Handle", 6)
2145 FileLimbo                       = uint32("file_limbo", "File Limbo")
2146 FileListCount                   = uint32("file_list_count", "File List Count")
2147 FileLock                        = val_string8("file_lock", "File Lock", [
2148         [ 0x00, "Not Locked" ],
2149         [ 0xfe, "Locked by file lock" ],
2150         [ 0xff, "Unknown" ],
2151 ])
2152 FileLockCount                   = uint16("file_lock_count", "File Lock Count")
2153 FileMode                        = uint8("file_mode", "File Mode")
2154 FileName                        = nstring8("file_name", "Filename")
2155 FileName12                      = fw_string("file_name_12", "Filename", 12)
2156 FileName14                      = fw_string("file_name_14", "Filename", 14)
2157 FileNameLen                     = uint8("file_name_len", "Filename Length")
2158 FileOffset                      = uint32("file_offset", "File Offset")
2159 FilePath                        = nstring8("file_path", "File Path")
2160 FileSize                        = uint32("file_size", "File Size", BE)
2161 FileSystemID                    = uint8("file_system_id", "File System ID")
2162 FileTime                        = uint16("file_time", "File Time")
2163 FileTime.NWTime()
2164 FileWriteFlags                  = val_string8("file_write_flags", "File Write Flags", [
2165         [ 0x01, "Writing" ],
2166         [ 0x02, "Write aborted" ],
2167 ])
2168 FileWriteState                  = val_string8("file_write_state", "File Write State", [
2169         [ 0x00, "Not Writing" ],
2170         [ 0x01, "Write in Progress" ],
2171         [ 0x02, "Write Being Stopped" ],
2172 ])
2173 Filler                          = uint8("filler", "Filler")
2174 FinderAttr                      = bitfield16("finder_attr", "Finder Info Attributes", [
2175         bf_boolean16(0x0001, "finder_attr_desktop", "Object on Desktop"),
2176         bf_boolean16(0x2000, "finder_attr_invisible", "Object is Invisible"),
2177         bf_boolean16(0x4000, "finder_attr_bundle", "Object Has Bundle"),
2178 ])
2179 FixedBitMask                    = uint32("fixed_bit_mask", "Fixed Bit Mask")
2180 FixedBitsDefined                = uint16("fixed_bits_defined", "Fixed Bits Defined")
2181 FlagBits                        = uint8("flag_bits", "Flag Bits")
2182 Flags                           = uint8("flags", "Flags")
2183 FlagsDef                        = uint16("flags_def", "Flags")
2184 FlushTime                       = uint32("flush_time", "Flush Time")
2185 FolderFlag                      = val_string8("folder_flag", "Folder Flag", [
2186         [ 0x00, "Not a Folder" ],
2187         [ 0x01, "Folder" ],
2188 ])
2189 ForkCount                       = uint8("fork_count", "Fork Count")
2190 ForkIndicator                   = val_string8("fork_indicator", "Fork Indicator", [
2191         [ 0x00, "Data Fork" ],
2192         [ 0x01, "Resource Fork" ],
2193 ])
2194 ForceFlag                       = val_string8("force_flag", "Force Server Down Flag", [
2195         [ 0x00, "Down Server if No Files Are Open" ],
2196         [ 0xff, "Down Server Immediately, Auto-Close Open Files" ],
2197 ])
2198 ForgedDetachedRequests          = uint16("forged_detached_requests", "Forged Detached Requests")
2199 FormType                        = uint16( "form_type", "Form Type" )
2200 FormTypeCnt                     = uint32("form_type_count", "Form Types Count")
2201 FoundSomeMem                    = uint32("found_some_mem", "Found Some Memory")
2202 FractionalSeconds               = uint32("fractional_time", "Fractional Time in Seconds")
2203 FraggerHandle                   = uint32("fragger_handle", "Fragment Handle")
2204 FraggerHandle.Display('BASE_HEX')
2205 FragmentWriteOccurred           = uint16("fragment_write_occurred", "Fragment Write Occurred")
2206 FragSize                        = uint32("frag_size", "Fragment Size")
2207 FreeableLimboSectors            = uint32("freeable_limbo_sectors", "Freeable Limbo Sectors")
2208 FreeBlocks                      = uint32("free_blocks", "Free Blocks")
2209 FreedClusters                   = uint32("freed_clusters", "Freed Clusters")
2210 FreeDirectoryEntries            = uint16("free_directory_entries", "Free Directory Entries")
2211 FSEngineFlag                    = boolean8("fs_engine_flag", "FS Engine Flag")
2212 FullName                        = fw_string("full_name", "Full Name", 39)
2213
2214 GetSetFlag                      = val_string8("get_set_flag", "Get Set Flag", [
2215         [ 0x00, "Get the default support module ID" ],
2216         [ 0x01, "Set the default support module ID" ],
2217 ])      
2218 GUID                            = bytes("guid", "GUID", 16)
2219 GUID.Display("BASE_HEX")
2220
2221 HandleFlag                      = val_string8("handle_flag", "Handle Flag", [
2222         [ 0x00, "Short Directory Handle" ],
2223         [ 0x01, "Directory Base" ],
2224         [ 0xFF, "No Handle Present" ],
2225 ])
2226 HandleInfoLevel                 = val_string8("handle_info_level", "Handle Info Level", [
2227         [ 0x00, "Get Limited Information from a File Handle" ],
2228         [ 0x01, "Get Limited Information from a File Handle Using a Name Space" ],
2229         [ 0x02, "Get Information from a File Handle" ],
2230         [ 0x03, "Get Information from a Directory Handle" ],
2231         [ 0x04, "Get Complete Information from a Directory Handle" ],
2232         [ 0x05, "Get Complete Information from a File Handle" ],
2233 ])
2234 HeldBytesRead                   = bytes("held_bytes_read", "Held Bytes Read", 6)
2235 HeldBytesWritten                = bytes("held_bytes_write", "Held Bytes Written", 6)
2236 HeldConnectTimeInMinutes        = uint32("held_conn_time", "Held Connect Time in Minutes")
2237 HeldRequests                    = uint32("user_info_held_req", "Held Requests")
2238 HoldAmount                      = uint32("hold_amount", "Hold Amount")
2239 HoldCancelAmount                = uint32("hold_cancel_amount", "Hold Cancel Amount")
2240 HolderID                        = uint32("holder_id", "Holder ID")
2241 HolderID.Display("BASE_HEX")
2242 HoldTime                        = uint32("hold_time", "Hold Time")
2243 HopsToNet                       = uint16("hops_to_net", "Hop Count")
2244 HorizLocation                   = uint16("horiz_location", "Horizontal Location")
2245 HostAddress                     = bytes("host_address", "Host Address", 6)
2246 HotFixBlocksAvailable           = uint16("hot_fix_blocks_available", "Hot Fix Blocks Available")
2247 HotFixDisabled                  = val_string8("hot_fix_disabled", "Hot Fix Disabled", [
2248         [ 0x00, "Enabled" ],
2249         [ 0x01, "Disabled" ],
2250 ])
2251 HotFixTableSize                 = uint16("hot_fix_table_size", "Hot Fix Table Size")
2252 HotFixTableStart                = uint32("hot_fix_table_start", "Hot Fix Table Start")
2253 Hour                            = uint8("s_hour", "Hour")
2254 HugeBitMask                     = uint32("huge_bit_mask", "Huge Bit Mask")
2255 HugeBitsDefined                 = uint16("huge_bits_defined", "Huge Bits Defined")
2256 HugeData                        = nstring8("huge_data", "Huge Data")
2257 HugeDataUsed                    = uint32("huge_data_used", "Huge Data Used")
2258 HugeStateInfo                   = bytes("huge_state_info", "Huge State Info", 16)
2259
2260 IdentificationNumber            = uint32("identification_number", "Identification Number")
2261 IgnoredRxPkts                   = uint32("ignored_rx_pkts", "Ignored Receive Packets")
2262 IncomingPacketDiscardedNoDGroup = uint16("incoming_packet_discarded_no_dgroup", "Incoming Packet Discarded No DGroup")
2263 IndexNumber                     = uint8("index_number", "Index Number")
2264 InfoCount                       = uint16("info_count", "Info Count")
2265 InfoFlags                       = bitfield32("info_flags", "Info Flags", [
2266         bf_boolean32(0x10000000, "info_flags_security", "Return Object Security"),
2267         bf_boolean32(0x20000000, "info_flags_flags", "Return Object Flags"),
2268         bf_boolean32(0x40000000, "info_flags_type", "Return Object Type"),
2269         bf_boolean32(0x80000000, "info_flags_name", "Return Object Name"),
2270 ])
2271 InfoLevelNumber                 = val_string8("info_level_num", "Information Level Number", [
2272         [ 0x01, "Volume Information Definition" ],
2273         [ 0x02, "Volume Information 2 Definition" ],
2274 ])        
2275 InfoMask                        = bitfield32("info_mask", "Information Mask", [
2276         bf_boolean32(0x00000001, "info_flags_dos_time", "DOS Time"),
2277         bf_boolean32(0x00000002, "info_flags_ref_count", "Reference Count"),
2278         bf_boolean32(0x00000004, "info_flags_dos_attr", "DOS Attributes"),
2279         bf_boolean32(0x00000008, "info_flags_ids", "ID's"),
2280         bf_boolean32(0x00000010, "info_flags_ds_sizes", "Data Stream Sizes"),
2281         bf_boolean32(0x00000020, "info_flags_ns_attr", "Name Space Attributes"),
2282         bf_boolean32(0x00000040, "info_flags_ea_present", "EA Present Flag"),
2283         bf_boolean32(0x00000080, "info_flags_all_attr", "All Attributes"),
2284         bf_boolean32(0x00000100, "info_flags_all_dirbase_num", "All Directory Base Numbers"),
2285         bf_boolean32(0x00000200, "info_flags_max_access_mask", "Maximum Access Mask"),
2286         bf_boolean32(0x00000400, "info_flags_flush_time", "Flush Time"),
2287         bf_boolean32(0x00000800, "info_flags_prnt_base_id", "Parent Base ID"),
2288         bf_boolean32(0x00001000, "info_flags_mac_finder", "Mac Finder Information"),
2289         bf_boolean32(0x00002000, "info_flags_sibling_cnt", "Sibling Count"),
2290         bf_boolean32(0x00004000, "info_flags_effect_rights", "Effective Rights"),
2291         bf_boolean32(0x00008000, "info_flags_mac_time", "Mac Time"),
2292         bf_boolean32(0x20000000, "info_mask_dosname", "DOS Name"),
2293         bf_boolean32(0x40000000, "info_mask_c_name_space", "Creator Name Space & Name"),
2294         bf_boolean32(0x80000000, "info_mask_name", "Name"),
2295 ])
2296 InheritedRightsMask             = bitfield16("inherited_rights_mask", "Inherited Rights Mask", [ 
2297         bf_boolean16(0x0001, "inh_rights_read", "Read Rights"),
2298         bf_boolean16(0x0002, "inh_rights_write", "Write Rights"),
2299         bf_boolean16(0x0004, "inh_rights_open", "Open Rights"),
2300         bf_boolean16(0x0008, "inh_rights_create", "Create Rights"),
2301         bf_boolean16(0x0010, "inh_rights_delete", "Delete Rights"),
2302         bf_boolean16(0x0020, "inh_rights_parent", "Change Access"),
2303         bf_boolean16(0x0040, "inh_rights_search", "See Files Flag"),
2304         bf_boolean16(0x0080, "inh_rights_modify", "Modify Rights"),
2305         bf_boolean16(0x0100, "inh_rights_supervisor", "Supervisor"),
2306 ])
2307 InheritanceRevokeMask           = bitfield16("inheritance_revoke_mask", "Revoke Rights Mask", [
2308         bf_boolean16(0x0001, "inh_revoke_read", "Read Rights"),
2309         bf_boolean16(0x0002, "inh_revoke_write", "Write Rights"),
2310         bf_boolean16(0x0004, "inh_revoke_open", "Open Rights"),
2311         bf_boolean16(0x0008, "inh_revoke_create", "Create Rights"),
2312         bf_boolean16(0x0010, "inh_revoke_delete", "Delete Rights"),
2313         bf_boolean16(0x0020, "inh_revoke_parent", "Change Access"),
2314         bf_boolean16(0x0040, "inh_revoke_search", "See Files Flag"),
2315         bf_boolean16(0x0080, "inh_revoke_modify", "Modify Rights"),
2316         bf_boolean16(0x0100, "inh_revoke_supervisor", "Supervisor"),
2317 ])
2318 InitialSemaphoreValue           = uint8("initial_semaphore_value", "Initial Semaphore Value")
2319 InspectSize                     = uint32("inspect_size", "Inspect Size")
2320 InternetBridgeVersion           = uint8("internet_bridge_version", "Internet Bridge Version")
2321 InterruptNumbersUsed            = uint32("interrupt_numbers_used", "Interrupt Numbers Used")
2322 InUse                           = uint32("in_use", "Bytes in Use")
2323 IOAddressesUsed                 = bytes("io_addresses_used", "IO Addresses Used", 8)
2324 IOErrorCount                    = uint16("io_error_count", "IO Error Count")
2325 IOEngineFlag                    = boolean8("io_engine_flag", "IO Engine Flag")
2326 IPXNotMyNetwork                 = uint16("ipx_not_my_network", "IPX Not My Network")
2327 ItemsChanged                    = uint32("items_changed", "Items Changed")
2328 ItemsChecked                    = uint32("items_checked", "Items Checked")
2329 ItemsCount                      = uint32("items_count", "Items Count")
2330 itemsInList                     = uint32("items_in_list", "Items in List")
2331 ItemsInPacket                   = uint32("items_in_packet", "Items in Packet")
2332
2333 JobControlFlags                 = bitfield8("job_control_flags", "Job Control Flags", [
2334         bf_boolean8(0x08, "job_control_job_recovery", "Job Recovery"),
2335         bf_boolean8(0x10, "job_control_reservice", "ReService Job"),
2336         bf_boolean8(0x20, "job_control_file_open", "File Open"),
2337         bf_boolean8(0x40, "job_control_user_hold", "User Hold"),
2338         bf_boolean8(0x80, "job_control_operator_hold", "Operator Hold"),
2339
2340 ])
2341 JobControlFlagsWord             = bitfield16("job_control_flags_word", "Job Control Flags", [
2342         bf_boolean16(0x0008, "job_control1_job_recovery", "Job Recovery"),
2343         bf_boolean16(0x0010, "job_control1_reservice", "ReService Job"),
2344         bf_boolean16(0x0020, "job_control1_file_open", "File Open"),
2345         bf_boolean16(0x0040, "job_control1_user_hold", "User Hold"),
2346         bf_boolean16(0x0080, "job_control1_operator_hold", "Operator Hold"),
2347
2348 ])
2349 JobCount                        = uint32("job_count", "Job Count")
2350 JobFileHandle                   = bytes("job_file_handle", "Job File Handle", 6)
2351 JobFileHandleLong               = uint32("job_file_handle_long", "Job File Handle")
2352 JobFileHandleLong.Display("BASE_HEX")
2353 JobFileName                     = fw_string("job_file_name", "Job File Name", 14)
2354 JobPosition                     = uint8("job_position", "Job Position")
2355 JobPositionWord                 = uint16("job_position_word", "Job Position")
2356 JobNumber                       = uint16("job_number", "Job Number", BE )
2357 JobNumberLong                   = uint32("job_number_long", "Job Number", BE )
2358 JobNumberList                   = uint32("job_number_list", "Job Number List")
2359 JobType                         = uint16("job_type", "Job Type", BE )
2360
2361 LANCustomVariablesCount         = uint32("lan_cust_var_count", "LAN Custom Variables Count")
2362 LANdriverBoardInstance          = uint16("lan_drv_bd_inst", "LAN Driver Board Instance")
2363 LANdriverBoardNumber            = uint16("lan_drv_bd_num", "LAN Driver Board Number")
2364 LANdriverCardID                 = uint16("lan_drv_card_id", "LAN Driver Card ID")
2365 LANdriverCardName               = fw_string("lan_drv_card_name", "LAN Driver Card Name", 28)
2366 LANdriverCFG_MajorVersion       = uint8("lan_dvr_cfg_major_vrs", "LAN Driver Config - Major Version")
2367 LANdriverCFG_MinorVersion       = uint8("lan_dvr_cfg_minor_vrs", "LAN Driver Config - Minor Version")
2368 LANdriverDMAUsage1              = uint8("lan_drv_dma_usage1", "Primary DMA Channel")
2369 LANdriverDMAUsage2              = uint8("lan_drv_dma_usage2", "Secondary DMA Channel")
2370 LANdriverFlags                  = uint16("lan_drv_flags", "LAN Driver Flags")
2371 LANdriverFlags.Display("BASE_HEX")        
2372 LANdriverInterrupt1             = uint8("lan_drv_interrupt1", "Primary Interrupt Vector")
2373 LANdriverInterrupt2             = uint8("lan_drv_interrupt2", "Secondary Interrupt Vector")
2374 LANdriverIOPortsAndRanges1      = uint16("lan_drv_io_ports_and_ranges_1", "Primary Base I/O Port")
2375 LANdriverIOPortsAndRanges2      = uint16("lan_drv_io_ports_and_ranges_2", "Number of I/O Ports")
2376 LANdriverIOPortsAndRanges3      = uint16("lan_drv_io_ports_and_ranges_3", "Secondary Base I/O Port")
2377 LANdriverIOPortsAndRanges4      = uint16("lan_drv_io_ports_and_ranges_4", "Number of I/O Ports")
2378 LANdriverIOReserved             = bytes("lan_drv_io_reserved", "LAN Driver IO Reserved", 14)
2379 LANdriverLineSpeed              = uint16("lan_drv_line_speed", "LAN Driver Line Speed")
2380 LANdriverLink                   = uint32("lan_drv_link", "LAN Driver Link")
2381 LANdriverLogicalName            = bytes("lan_drv_log_name", "LAN Driver Logical Name", 18)
2382 LANdriverMajorVersion           = uint8("lan_drv_major_ver", "LAN Driver Major Version")
2383 LANdriverMaximumSize            = uint32("lan_drv_max_size", "LAN Driver Maximum Size")
2384 LANdriverMaxRecvSize            = uint32("lan_drv_max_rcv_size", "LAN Driver Maximum Receive Size")
2385 LANdriverMediaID                = uint16("lan_drv_media_id", "LAN Driver Media ID")
2386 LANdriverMediaType              = fw_string("lan_drv_media_type", "LAN Driver Media Type", 40)
2387 LANdriverMemoryDecode0          = uint32("lan_drv_mem_decode_0", "LAN Driver Memory Decode 0")
2388 LANdriverMemoryDecode1          = uint32("lan_drv_mem_decode_1", "LAN Driver Memory Decode 1")
2389 LANdriverMemoryLength0          = uint16("lan_drv_mem_length_0", "LAN Driver Memory Length 0")
2390 LANdriverMemoryLength1          = uint16("lan_drv_mem_length_1", "LAN Driver Memory Length 1")
2391 LANdriverMinorVersion           = uint8("lan_drv_minor_ver", "LAN Driver Minor Version")
2392 LANdriverModeFlags              = val_string8("lan_dvr_mode_flags", "LAN Driver Mode Flags", [
2393         [0x80, "Canonical Address" ],
2394         [0x81, "Canonical Address" ],
2395         [0x82, "Canonical Address" ],
2396         [0x83, "Canonical Address" ],
2397         [0x84, "Canonical Address" ],
2398         [0x85, "Canonical Address" ],
2399         [0x86, "Canonical Address" ],
2400         [0x87, "Canonical Address" ],
2401         [0x88, "Canonical Address" ],
2402         [0x89, "Canonical Address" ],
2403         [0x8a, "Canonical Address" ],
2404         [0x8b, "Canonical Address" ],
2405         [0x8c, "Canonical Address" ],
2406         [0x8d, "Canonical Address" ],
2407         [0x8e, "Canonical Address" ],
2408         [0x8f, "Canonical Address" ],
2409         [0x90, "Canonical Address" ],
2410         [0x91, "Canonical Address" ],
2411         [0x92, "Canonical Address" ],
2412         [0x93, "Canonical Address" ],
2413         [0x94, "Canonical Address" ],
2414         [0x95, "Canonical Address" ],
2415         [0x96, "Canonical Address" ],
2416         [0x97, "Canonical Address" ],
2417         [0x98, "Canonical Address" ],
2418         [0x99, "Canonical Address" ],
2419         [0x9a, "Canonical Address" ],
2420         [0x9b, "Canonical Address" ],
2421         [0x9c, "Canonical Address" ],
2422         [0x9d, "Canonical Address" ],
2423         [0x9e, "Canonical Address" ],
2424         [0x9f, "Canonical Address" ],
2425         [0xa0, "Canonical Address" ],
2426         [0xa1, "Canonical Address" ],
2427         [0xa2, "Canonical Address" ],
2428         [0xa3, "Canonical Address" ],
2429         [0xa4, "Canonical Address" ],
2430         [0xa5, "Canonical Address" ],
2431         [0xa6, "Canonical Address" ],
2432         [0xa7, "Canonical Address" ],
2433         [0xa8, "Canonical Address" ],
2434         [0xa9, "Canonical Address" ],
2435         [0xaa, "Canonical Address" ],
2436         [0xab, "Canonical Address" ],
2437         [0xac, "Canonical Address" ],
2438         [0xad, "Canonical Address" ],
2439         [0xae, "Canonical Address" ],
2440         [0xaf, "Canonical Address" ],
2441         [0xb0, "Canonical Address" ],
2442         [0xb1, "Canonical Address" ],
2443         [0xb2, "Canonical Address" ],
2444         [0xb3, "Canonical Address" ],
2445         [0xb4, "Canonical Address" ],
2446         [0xb5, "Canonical Address" ],
2447         [0xb6, "Canonical Address" ],
2448         [0xb7, "Canonical Address" ],
2449         [0xb8, "Canonical Address" ],
2450         [0xb9, "Canonical Address" ],
2451         [0xba, "Canonical Address" ],
2452         [0xbb, "Canonical Address" ],
2453         [0xbc, "Canonical Address" ],
2454         [0xbd, "Canonical Address" ],
2455         [0xbe, "Canonical Address" ],
2456         [0xbf, "Canonical Address" ],
2457         [0xc0, "Non-Canonical Address" ],
2458         [0xc1, "Non-Canonical Address" ],
2459         [0xc2, "Non-Canonical Address" ],
2460         [0xc3, "Non-Canonical Address" ],
2461         [0xc4, "Non-Canonical Address" ],
2462         [0xc5, "Non-Canonical Address" ],
2463         [0xc6, "Non-Canonical Address" ],
2464         [0xc7, "Non-Canonical Address" ],
2465         [0xc8, "Non-Canonical Address" ],
2466         [0xc9, "Non-Canonical Address" ],
2467         [0xca, "Non-Canonical Address" ],
2468         [0xcb, "Non-Canonical Address" ],
2469         [0xcc, "Non-Canonical Address" ],
2470         [0xcd, "Non-Canonical Address" ],
2471         [0xce, "Non-Canonical Address" ],
2472         [0xcf, "Non-Canonical Address" ],
2473         [0xd0, "Non-Canonical Address" ],
2474         [0xd1, "Non-Canonical Address" ],
2475         [0xd2, "Non-Canonical Address" ],
2476         [0xd3, "Non-Canonical Address" ],
2477         [0xd4, "Non-Canonical Address" ],
2478         [0xd5, "Non-Canonical Address" ],
2479         [0xd6, "Non-Canonical Address" ],
2480         [0xd7, "Non-Canonical Address" ],
2481         [0xd8, "Non-Canonical Address" ],
2482         [0xd9, "Non-Canonical Address" ],
2483         [0xda, "Non-Canonical Address" ],
2484         [0xdb, "Non-Canonical Address" ],
2485         [0xdc, "Non-Canonical Address" ],
2486         [0xdd, "Non-Canonical Address" ],
2487         [0xde, "Non-Canonical Address" ],
2488         [0xdf, "Non-Canonical Address" ],
2489         [0xe0, "Non-Canonical Address" ],
2490         [0xe1, "Non-Canonical Address" ],
2491         [0xe2, "Non-Canonical Address" ],
2492         [0xe3, "Non-Canonical Address" ],
2493         [0xe4, "Non-Canonical Address" ],
2494         [0xe5, "Non-Canonical Address" ],
2495         [0xe6, "Non-Canonical Address" ],
2496         [0xe7, "Non-Canonical Address" ],
2497         [0xe8, "Non-Canonical Address" ],
2498         [0xe9, "Non-Canonical Address" ],
2499         [0xea, "Non-Canonical Address" ],
2500         [0xeb, "Non-Canonical Address" ],
2501         [0xec, "Non-Canonical Address" ],
2502         [0xed, "Non-Canonical Address" ],
2503         [0xee, "Non-Canonical Address" ],
2504         [0xef, "Non-Canonical Address" ],
2505         [0xf0, "Non-Canonical Address" ],
2506         [0xf1, "Non-Canonical Address" ],
2507         [0xf2, "Non-Canonical Address" ],
2508         [0xf3, "Non-Canonical Address" ],
2509         [0xf4, "Non-Canonical Address" ],
2510         [0xf5, "Non-Canonical Address" ],
2511         [0xf6, "Non-Canonical Address" ],
2512         [0xf7, "Non-Canonical Address" ],
2513         [0xf8, "Non-Canonical Address" ],
2514         [0xf9, "Non-Canonical Address" ],
2515         [0xfa, "Non-Canonical Address" ],
2516         [0xfb, "Non-Canonical Address" ],
2517         [0xfc, "Non-Canonical Address" ],
2518         [0xfd, "Non-Canonical Address" ],
2519         [0xfe, "Non-Canonical Address" ],
2520         [0xff, "Non-Canonical Address" ],
2521 ])        
2522 LANDriverNumber                 = uint8("lan_driver_number", "LAN Driver Number")
2523 LANdriverNodeAddress            = bytes("lan_dvr_node_addr", "LAN Driver Node Address", 6)
2524 LANdriverRecvSize               = uint32("lan_drv_rcv_size", "LAN Driver Receive Size")
2525 LANdriverReserved               = uint16("lan_drv_reserved", "LAN Driver Reserved")
2526 LANdriverSendRetries            = uint16("lan_drv_snd_retries", "LAN Driver Send Retries")
2527 LANdriverSharingFlags           = uint16("lan_drv_share", "LAN Driver Sharing Flags")
2528 LANdriverShortName              = fw_string("lan_drv_short_name", "LAN Driver Short Name", 40)
2529 LANdriverSlot                   = uint16("lan_drv_slot", "LAN Driver Slot")
2530 LANdriverSrcRouting             = uint32("lan_drv_src_route", "LAN Driver Source Routing")
2531 LANdriverTransportTime          = uint16("lan_drv_trans_time", "LAN Driver Transport Time")
2532 LastAccessedDate                = uint16("last_access_date", "Last Accessed Date")
2533 LastAccessedDate.NWDate()
2534 LastAccessedTime                = uint16("last_access_time", "Last Accessed Time")
2535 LastAccessedTime.NWTime()
2536 LastGarbCollect                 = uint32("last_garbage_collect", "Last Garbage Collection")
2537 LastInstance                    = uint32("last_instance", "Last Instance")
2538 LastRecordSeen                  = uint16("last_record_seen", "Last Record Seen")
2539 LastSearchIndex                 = uint16("last_search_index", "Search Index")
2540 LastSeen                        = uint32("last_seen", "Last Seen")
2541 LastSequenceNumber              = uint16("last_sequence_number", "Sequence Number")
2542 Level                           = uint8("level", "Level")
2543 LFSCounters                     = uint32("lfs_counters", "LFS Counters")
2544 LimboDataStreamsCount           = uint32("limbo_data_streams_count", "Limbo Data Streams Count")
2545 limbCount                       = uint32("limb_count", "Limb Count")
2546 LimboUsed                       = uint32("limbo_used", "Limbo Used")
2547 LoadedNameSpaces                = uint8("loaded_name_spaces", "Loaded Name Spaces")
2548 LocalConnectionID               = uint32("local_connection_id", "Local Connection ID")
2549 LocalConnectionID.Display("BASE_HEX")
2550 LocalMaxPacketSize              = uint32("local_max_packet_size", "Local Max Packet Size")
2551 LocalMaxSendSize                = uint32("local_max_send_size", "Local Max Send Size")
2552 LocalMaxRecvSize                = uint32("local_max_recv_size", "Local Max Recv Size")
2553 LocalLoginInfoCcode             = uint8("local_login_info_ccode", "Local Login Info C Code")
2554 LocalTargetSocket               = uint32("local_target_socket", "Local Target Socket")
2555 LocalTargetSocket.Display("BASE_HEX")
2556 LockAreaLen                     = uint32("lock_area_len", "Lock Area Length")
2557 LockAreasStartOffset            = uint32("lock_areas_start_offset", "Lock Areas Start Offset")
2558 LockTimeout                     = uint16("lock_timeout", "Lock Timeout")
2559 Locked                          = val_string8("locked", "Locked Flag", [
2560         [ 0x00, "Not Locked Exclusively" ],
2561         [ 0x01, "Locked Exclusively" ],
2562 ])
2563 LockFlag                        = val_string8("lock_flag", "Lock Flag", [
2564         [ 0x00, "Not Locked, Log for Future Exclusive Lock" ],
2565         [ 0x01, "Exclusive Lock (Read/Write)" ],
2566         [ 0x02, "Log for Future Shared Lock"],
2567         [ 0x03, "Shareable Lock (Read-Only)" ],
2568         [ 0xfe, "Locked by a File Lock" ],
2569         [ 0xff, "Locked by Begin Share File Set" ],
2570 ])
2571 LockName                        = nstring8("lock_name", "Lock Name")
2572 LockStatus                      = val_string8("lock_status", "Lock Status", [
2573         [ 0x00, "Locked Exclusive" ],
2574         [ 0x01, "Locked Shareable" ],
2575         [ 0x02, "Logged" ],
2576         [ 0x06, "Lock is Held by TTS"],
2577 ])
2578 LockType                        = val_string8("lock_type", "Lock Type", [
2579         [ 0x00, "Locked" ],
2580         [ 0x01, "Open Shareable" ],
2581         [ 0x02, "Logged" ],
2582         [ 0x03, "Open Normal" ],
2583         [ 0x06, "TTS Holding Lock" ],
2584         [ 0x07, "Transaction Flag Set on This File" ],
2585 ])
2586 LogFileFlagHigh                 = bitfield8("log_file_flag_high", "Log File Flag (byte 2)", [
2587         bf_boolean8(0x80, "log_flag_call_back", "Call Back Requested" ),
2588 ])
2589 LogFileFlagLow                  = bitfield8("log_file_flag_low", "Log File Flag", [
2590         bf_boolean8(0x01, "log_flag_lock_file", "Lock File Immediately" ), 
2591 ])      
2592 LoggedObjectID                  = uint32("logged_object_id", "Logged in Object ID")
2593 LoggedObjectID.Display("BASE_HEX")
2594 LoggedCount                     = uint16("logged_count", "Logged Count")
2595 LogicalConnectionNumber         = uint16("logical_connection_number", "Logical Connection Number", BE)
2596 LogicalDriveCount               = uint8("logical_drive_count", "Logical Drive Count")
2597 LogicalDriveNumber              = uint8("logical_drive_number", "Logical Drive Number")
2598 LogicalLockThreshold            = uint8("logical_lock_threshold", "LogicalLockThreshold")
2599 LogicalRecordName               = nstring8("logical_record_name", "Logical Record Name")
2600 LoginKey                        = bytes("login_key", "Login Key", 8)
2601 LogLockType                     = uint8("log_lock_type", "Log Lock Type")
2602 LogTtlRxPkts                    = uint32("log_ttl_rx_pkts", "Total Received Packets")
2603 LogTtlTxPkts                    = uint32("log_ttl_tx_pkts", "Total Transmitted Packets")
2604 LongName                        = fw_string("long_name", "Long Name", 32)
2605 LRUBlockWasDirty                = uint16("lru_block_was_dirty", "LRU Block Was Dirty")
2606
2607 MacAttr                         = bitfield16("mac_attr", "Attributes", [
2608         bf_boolean16(0x0001, "mac_attr_smode1", "Search Mode"),
2609         bf_boolean16(0x0002, "mac_attr_smode2", "Search Mode"),
2610         bf_boolean16(0x0004, "mac_attr_smode3", "Search Mode"),
2611         bf_boolean16(0x0010, "mac_attr_transaction", "Transaction"),
2612         bf_boolean16(0x0020, "mac_attr_index", "Index"),
2613         bf_boolean16(0x0040, "mac_attr_r_audit", "Read Audit"),
2614         bf_boolean16(0x0080, "mac_attr_w_audit", "Write Audit"),
2615         bf_boolean16(0x0100, "mac_attr_r_only", "Read Only"),
2616         bf_boolean16(0x0200, "mac_attr_hidden", "Hidden"),
2617         bf_boolean16(0x0400, "mac_attr_system", "System"),
2618         bf_boolean16(0x0800, "mac_attr_execute_only", "Execute Only"),
2619         bf_boolean16(0x1000, "mac_attr_subdirectory", "Subdirectory"),
2620         bf_boolean16(0x2000, "mac_attr_archive", "Archive"),
2621         bf_boolean16(0x8000, "mac_attr_share", "Shareable File"),
2622 ])
2623 MACBackupDate                   = uint16("mac_backup_date", "Mac Backup Date")
2624 MACBackupDate.NWDate()
2625 MACBackupTime                   = uint16("mac_backup_time", "Mac Backup Time")
2626 MACBackupTime.NWTime()
2627 MacBaseDirectoryID              = uint32("mac_base_directory_id", "Mac Base Directory ID", BE)
2628 MacBaseDirectoryID.Display("BASE_HEX")
2629 MACCreateDate                   = uint16("mac_create_date", "Mac Create Date")
2630 MACCreateDate.NWDate()
2631 MACCreateTime                   = uint16("mac_create_time", "Mac Create Time")
2632 MACCreateTime.NWTime()
2633 MacDestinationBaseID            = uint32("mac_destination_base_id", "Mac Destination Base ID")
2634 MacDestinationBaseID.Display("BASE_HEX")
2635 MacFinderInfo                   = bytes("mac_finder_info", "Mac Finder Information", 32)
2636 MacLastSeenID                   = uint32("mac_last_seen_id", "Mac Last Seen ID")
2637 MacLastSeenID.Display("BASE_HEX")
2638 MacSourceBaseID                 = uint32("mac_source_base_id", "Mac Source Base ID")
2639 MacSourceBaseID.Display("BASE_HEX")
2640 MajorVersion                    = uint32("major_version", "Major Version")
2641 MaxBytes                        = uint16("max_bytes", "Maximum Number of Bytes")
2642 MaxDataStreams                  = uint32("max_data_streams", "Maximum Data Streams")
2643 MaxDirDepth                     = uint32("max_dir_depth", "Maximum Directory Depth")
2644 MaximumSpace                    = uint16("max_space", "Maximum Space")
2645 MaxNumOfConn                    = uint32("max_num_of_conn", "Maximum Number of Connections")
2646 MaxNumOfLANS                    = uint32("max_num_of_lans", "Maximum Number Of LAN's")
2647 MaxNumOfMedias                  = uint32("max_num_of_medias", "Maximum Number Of Media's")
2648 MaxNumOfNmeSps                  = uint32("max_num_of_nme_sps", "Maximum Number Of Name Spaces")
2649 MaxNumOfSpoolPr                 = uint32("max_num_of_spool_pr", "Maximum Number Of Spool Printers")
2650 MaxNumOfStacks                  = uint32("max_num_of_stacks", "Maximum Number Of Stacks")
2651 MaxNumOfUsers                   = uint32("max_num_of_users", "Maximum Number Of Users")
2652 MaxNumOfVol                     = uint32("max_num_of_vol", "Maximum Number of Volumes")
2653 MaxSpace                        = uint32("maxspace", "Maximum Space")
2654 MaxUsedDynamicSpace             = uint32("max_used_dynamic_space", "Max Used Dynamic Space")
2655 MediaList                       = uint32("media_list", "Media List")
2656 MediaListCount                  = uint32("media_list_count", "Media List Count")
2657 MediaName                       = nstring8("media_name", "Media Name")
2658 MediaNumber                     = uint32("media_number", "Media Number")
2659 MediaObjectType                 = val_string8("media_object_type", "Object Type", [
2660         [ 0x00, "Adapter" ],
2661         [ 0x01, "Changer" ],
2662         [ 0x02, "Removable Device" ],
2663         [ 0x03, "Device" ],
2664         [ 0x04, "Removable Media" ],
2665         [ 0x05, "Partition" ],
2666         [ 0x06, "Slot" ],
2667         [ 0x07, "Hotfix" ],
2668         [ 0x08, "Mirror" ],
2669         [ 0x09, "Parity" ],
2670         [ 0x0a, "Volume Segment" ],
2671         [ 0x0b, "Volume" ],
2672         [ 0x0c, "Clone" ],
2673         [ 0x0d, "Fixed Media" ],
2674         [ 0x0e, "Unknown" ],
2675 ])        
2676 MemberName                      = nstring8("member_name", "Member Name")
2677 MemberType                      = val_string16("member_type", "Member Type", [
2678         [ 0x0000,       "Unknown" ],
2679         [ 0x0001,       "User" ],
2680         [ 0x0002,       "User group" ],
2681         [ 0x0003,       "Print queue" ],
2682         [ 0x0004,       "NetWare file server" ],
2683         [ 0x0005,       "Job server" ],
2684         [ 0x0006,       "Gateway" ],
2685         [ 0x0007,       "Print server" ],
2686         [ 0x0008,       "Archive queue" ],
2687         [ 0x0009,       "Archive server" ],
2688         [ 0x000a,       "Job queue" ],
2689         [ 0x000b,       "Administration" ],
2690         [ 0x0021,       "NAS SNA gateway" ],
2691         [ 0x0026,       "Remote bridge server" ],
2692         [ 0x0027,       "TCP/IP gateway" ],
2693 ])
2694 MessageLanguage                 = uint32("message_language", "NLM Language")
2695 MigratedFiles                   = uint32("migrated_files", "Migrated Files")
2696 MigratedSectors                 = uint32("migrated_sectors", "Migrated Sectors")
2697 MinorVersion                    = uint32("minor_version", "Minor Version")
2698 Minute                          = uint8("s_minute", "Minutes")
2699 MixedModePathFlag               = uint8("mixed_mode_path_flag", "Mixed Mode Path Flag")
2700 ModifiedDate                    = uint16("modified_date", "Modified Date")
2701 ModifiedDate.NWDate()
2702 ModifiedTime                    = uint16("modified_time", "Modified Time")
2703 ModifiedTime.NWTime()
2704 ModifierID                      = uint32("modifier_id", "Modifier ID", BE)
2705 ModifierID.Display("BASE_HEX")
2706 ModifyDOSInfoMask               = bitfield16("modify_dos_info_mask", "Modify DOS Info Mask", [
2707         bf_boolean16(0x0002, "modify_dos_read", "Attributes"),
2708         bf_boolean16(0x0004, "modify_dos_write", "Creation Date"),
2709         bf_boolean16(0x0008, "modify_dos_open", "Creation Time"),
2710         bf_boolean16(0x0010, "modify_dos_create", "Creator ID"),
2711         bf_boolean16(0x0020, "modify_dos_delete", "Archive Date"),
2712         bf_boolean16(0x0040, "modify_dos_parent", "Archive Time"),
2713         bf_boolean16(0x0080, "modify_dos_search", "Archiver ID"),
2714         bf_boolean16(0x0100, "modify_dos_mdate", "Modify Date"),
2715         bf_boolean16(0x0200, "modify_dos_mtime", "Modify Time"),
2716         bf_boolean16(0x0400, "modify_dos_mid", "Modifier ID"),
2717         bf_boolean16(0x0800, "modify_dos_laccess", "Last Access"),
2718         bf_boolean16(0x1000, "modify_dos_inheritance", "Inheritance"),
2719         bf_boolean16(0x2000, "modify_dos_max_space", "Maximum Space"),
2720 ])      
2721 Month                           = val_string8("s_month", "Month", [
2722         [ 0x01, "January"],
2723         [ 0x02, "Febuary"],
2724         [ 0x03, "March"],
2725         [ 0x04, "April"],
2726         [ 0x05, "May"],
2727         [ 0x06, "June"],
2728         [ 0x07, "July"],
2729         [ 0x08, "August"],
2730         [ 0x09, "September"],
2731         [ 0x0a, "October"],
2732         [ 0x0b, "November"],
2733         [ 0x0c, "December"],
2734 ])
2735
2736 MoreFlag                        = val_string8("more_flag", "More Flag", [
2737         [ 0x00, "No More Segments/Entries Available" ],
2738         [ 0x01, "More Segments/Entries Available" ],
2739         [ 0xff, "More Segments/Entries Available" ],
2740 ])
2741 MoreProperties                  = val_string8("more_properties", "More Properties", [
2742         [ 0x00, "No More Properties Available" ],
2743         [ 0x01, "No More Properties Available" ],
2744         [ 0xff, "More Properties Available" ],
2745 ])
2746
2747 Name                            = nstring8("name", "Name")
2748 Name12                          = fw_string("name12", "Name", 12)
2749 NameLen                         = uint8("name_len", "Name Space Length")
2750 NameLength                      = uint8("name_length", "Name Length")
2751 NameList                        = uint32("name_list", "Name List")
2752 #
2753 # XXX - should this value be used to interpret the characters in names,
2754 # search patterns, and the like?
2755 #
2756 # We need to handle character sets better, e.g. translating strings
2757 # from whatever character set they are in the packet (DOS/Windows code
2758 # pages, ISO character sets, UNIX EUC character sets, UTF-8, UCS-2/Unicode,
2759 # Mac character sets, etc.) into UCS-4 or UTF-8 and storing them as such
2760 # in the protocol tree, and displaying them as best we can.
2761 #
2762 NameSpace                       = val_string8("name_space", "Name Space", [
2763         [ 0x00, "DOS" ],
2764         [ 0x01, "MAC" ],
2765         [ 0x02, "NFS" ],
2766         [ 0x03, "FTAM" ],
2767         [ 0x04, "OS/2, Long" ],
2768 ])
2769 NamesSpaceInfoMask                      = bitfield16("ns_info_mask", "Names Space Info Mask", [
2770         bf_boolean16(0x0001, "ns_info_mask_modify", "Modify Name"),
2771         bf_boolean16(0x0002, "ns_info_mask_fatt", "File Attributes"),
2772         bf_boolean16(0x0004, "ns_info_mask_cdate", "Creation Date"),
2773         bf_boolean16(0x0008, "ns_info_mask_ctime", "Creation Time"),
2774         bf_boolean16(0x0010, "ns_info_mask_owner", "Owner ID"),
2775         bf_boolean16(0x0020, "ns_info_mask_adate", "Archive Date"),
2776         bf_boolean16(0x0040, "ns_info_mask_atime", "Archive Time"),
2777         bf_boolean16(0x0080, "ns_info_mask_aid", "Archiver ID"),
2778         bf_boolean16(0x0100, "ns_info_mask_udate", "Update Date"),
2779         bf_boolean16(0x0200, "ns_info_mask_utime", "Update Time"),
2780         bf_boolean16(0x0400, "ns_info_mask_uid", "Update ID"),
2781         bf_boolean16(0x0800, "ns_info_mask_acc_date", "Access Date"),
2782         bf_boolean16(0x1000, "ns_info_mask_max_acc_mask", "Inheritance"),
2783         bf_boolean16(0x2000, "ns_info_mask_max_space", "Maximum Space"),
2784 ])
2785 NameSpaceName                   = nstring8("name_space_name", "Name Space Name")
2786 nameType                        = uint32("name_type", "nameType")
2787 NCPdataSize                     = uint32("ncp_data_size", "NCP Data Size")
2788 NCPextensionMajorVersion        = uint8("ncp_extension_major_version", "NCP Extension Major Version")
2789 NCPextensionMinorVersion        = uint8("ncp_extension_minor_version", "NCP Extension Minor Version")
2790 NCPextensionName                = nstring8("ncp_extension_name", "NCP Extension Name")
2791 NCPextensionNumber              = uint32("ncp_extension_number", "NCP Extension Number")
2792 NCPextensionNumber.Display("BASE_HEX")
2793 NCPExtensionNumbers             = uint32("ncp_extension_numbers", "NCP Extension Numbers")
2794 NCPextensionRevisionNumber      = uint8("ncp_extension_revision_number", "NCP Extension Revision Number")
2795 NCPPeakStaInUse                 = uint32("ncp_peak_sta_in_use", "Peak Number of Connections since Server was brought up")
2796 NCPStaInUseCnt                  = uint32("ncp_sta_in_use", "Number of Workstations Connected to Server")
2797 NDSRequestFlags                 = bitfield16("nds_request_flags", "NDS Request Flags", [
2798         bf_boolean16(0x0001, "nds_request_flags_output", "Output Fields"),
2799         bf_boolean16(0x0002, "nds_request_flags_no_such_entry", "No Such Entry"),
2800         bf_boolean16(0x0004, "nds_request_flags_local_entry", "Local Entry"),
2801         bf_boolean16(0x0008, "nds_request_flags_type_ref", "Type Referral"),
2802         bf_boolean16(0x0010, "nds_request_flags_alias_ref", "Alias Referral"),
2803         bf_boolean16(0x0020, "nds_request_flags_req_cnt", "Request Count"),
2804         bf_boolean16(0x0040, "nds_request_flags_req_data_size", "Request Data Size"),
2805         bf_boolean16(0x0080, "nds_request_flags_reply_data_size", "Reply Data Size"),
2806         bf_boolean16(0x0100, "nds_request_flags_trans_ref", "Transport Referral"),
2807         bf_boolean16(0x0200, "nds_request_flags_trans_ref2", "Transport Referral"),
2808         bf_boolean16(0x0400, "nds_request_flags_up_ref", "Up Referral"),
2809         bf_boolean16(0x0800, "nds_request_flags_dn_ref", "Down Referral"),
2810 ])      
2811 NDSStatus                       = uint32("nds_status", "NDS Status")
2812 NetBIOSBroadcastWasPropogated   = uint32("netbios_broadcast_was_propogated", "NetBIOS Broadcast Was Propogated")
2813 NetIDNumber                     = uint32("net_id_number", "Net ID Number")
2814 NetIDNumber.Display("BASE_HEX")
2815 NetAddress                      = nbytes32("address", "Address")
2816 NetStatus                       = uint16("net_status", "Network Status")
2817 NetWareAccessHandle             = bytes("netware_access_handle", "NetWare Access Handle", 6)
2818 NetworkAddress                  = uint32("network_address", "Network Address")
2819 NetworkAddress.Display("BASE_HEX")
2820 NetworkNodeAddress              = bytes("network_node_address", "Network Node Address", 6)
2821 NetworkNumber                   = uint32("network_number", "Network Number")
2822 NetworkNumber.Display("BASE_HEX")
2823 #
2824 # XXX - this should have the "ipx_socket_vals" value_string table
2825 # from "packet-ipx.c".
2826 #
2827 NetworkSocket                   = uint16("network_socket", "Network Socket")
2828 NetworkSocket.Display("BASE_HEX")
2829 NewAccessRights                 = bitfield16("new_access_rights_mask", "New Access Rights", [
2830         bf_boolean16(0x0001, "new_access_rights_read", "Read"),
2831         bf_boolean16(0x0002, "new_access_rights_write", "Write"),
2832         bf_boolean16(0x0004, "new_access_rights_open", "Open"),
2833         bf_boolean16(0x0008, "new_access_rights_create", "Create"),
2834         bf_boolean16(0x0010, "new_access_rights_delete", "Delete"),
2835         bf_boolean16(0x0020, "new_access_rights_parental", "Parental"),
2836         bf_boolean16(0x0040, "new_access_rights_search", "Search"),
2837         bf_boolean16(0x0080, "new_access_rights_modify", "Modify"),
2838         bf_boolean16(0x0100, "new_access_rights_supervisor", "Supervisor"),
2839 ])
2840 NewDirectoryID                  = uint32("new_directory_id", "New Directory ID", BE)
2841 NewDirectoryID.Display("BASE_HEX")
2842 NewEAHandle                     = uint32("new_ea_handle", "New EA Handle")
2843 NewEAHandle.Display("BASE_HEX")
2844 NewFileName                     = fw_string("new_file_name", "New File Name", 14)
2845 NewFileNameLen                  = nstring8("new_file_name_len", "New File Name")
2846 NewFileSize                     = uint32("new_file_size", "New File Size")
2847 NewPassword                     = nstring8("new_password", "New Password")
2848 NewPath                         = nstring8("new_path", "New Path")
2849 NewPosition                     = uint8("new_position", "New Position")
2850 NewObjectName                   = nstring8("new_object_name", "New Object Name")
2851 NextCntBlock                    = uint32("next_cnt_block", "Next Count Block")
2852 NextHugeStateInfo               = bytes("next_huge_state_info", "Next Huge State Info", 16)
2853 nextLimbScanNum                 = uint32("next_limb_scan_num", "Next Limb Scan Number")
2854 NextObjectID                    = uint32("next_object_id", "Next Object ID", BE)
2855 NextObjectID.Display("BASE_HEX")
2856 NextRecord                      = uint32("next_record", "Next Record")
2857 NextRequestRecord               = uint16("next_request_record", "Next Request Record")
2858 NextSearchIndex                 = uint16("next_search_index", "Next Search Index")
2859 NextSearchNumber                = uint16("next_search_number", "Next Search Number")
2860 NextSearchNum                   = uint32("nxt_search_num", "Next Search Number")
2861 nextStartingNumber              = uint32("next_starting_number", "Next Starting Number")
2862 NextTrusteeEntry                = uint32("next_trustee_entry", "Next Trustee Entry")
2863 NextVolumeNumber                = uint32("next_volume_number", "Next Volume Number")
2864 NLMBuffer                       = nstring8("nlm_buffer", "Buffer")
2865 NLMcount                        = uint32("nlm_count", "NLM Count")
2866 NLMFlags                        = bitfield8("nlm_flags", "Flags", [
2867         bf_boolean8(0x01, "nlm_flags_reentrant", "ReEntrant"),
2868         bf_boolean8(0x02, "nlm_flags_multiple", "Can Load Multiple Times"),
2869         bf_boolean8(0x04, "nlm_flags_synchronize", "Synchronize Start"),
2870         bf_boolean8(0x08, "nlm_flags_pseudo", "PseudoPreemption"),
2871 ])
2872 NLMLoadOptions                  = uint32("nlm_load_options", "NLM Load Options")
2873 NLMName                         = stringz("nlm_name_stringz", "NLM Name")
2874 NLMNumber                       = uint32("nlm_number", "NLM Number")
2875 NLMNumbers                      = uint32("nlm_numbers", "NLM Numbers")
2876 NLMsInList                      = uint32("nlms_in_list", "NLM's in List")
2877 NLMStartNumber                  = uint32("nlm_start_num", "NLM Start Number")
2878 NLMType                         = val_string8("nlm_type", "NLM Type", [
2879         [ 0x00, "Generic NLM (.NLM)" ],
2880         [ 0x01, "LAN Driver (.LAN)" ],
2881         [ 0x02, "Disk Driver (.DSK)" ],
2882         [ 0x03, "Name Space Support Module (.NAM)" ],
2883         [ 0x04, "Utility or Support Program (.NLM)" ],
2884         [ 0x05, "Mirrored Server Link (.MSL)" ],
2885         [ 0x06, "OS NLM (.NLM)" ],
2886         [ 0x07, "Paged High OS NLM (.NLM)" ],
2887         [ 0x08, "Host Adapter Module (.HAM)" ],
2888         [ 0x09, "Custom Device Module (.CDM)" ],
2889         [ 0x0a, "File System Engine (.NLM)" ],
2890         [ 0x0b, "Real Mode NLM (.NLM)" ],
2891         [ 0x0c, "Hidden NLM (.NLM)" ],
2892         [ 0x15, "NICI Support (.NLM)" ],
2893         [ 0x16, "NICI Support (.NLM)" ],
2894         [ 0x17, "Cryptography (.NLM)" ],
2895         [ 0x18, "Encryption (.NLM)" ],
2896         [ 0x19, "NICI Support (.NLM)" ],
2897         [ 0x1c, "NICI Support (.NLM)" ],
2898 ])        
2899 nodeFlags                       = uint32("node_flags", "Node Flags")
2900 nodeFlags.Display("BASE_HEX")
2901 NoMoreMemAvlCnt                 = uint32("no_more_mem_avail", "No More Memory Available Count")
2902 NonDedFlag                      = boolean8("non_ded_flag", "Non Dedicated Flag")
2903 NonFreeableAvailableSubAllocSectors = uint32("non_freeable_avail_sub_alloc_sectors", "Non Freeable Available Sub Alloc Sectors")
2904 NonFreeableLimboSectors         = uint32("non_freeable_limbo_sectors", "Non Freeable Limbo Sectors")
2905 NotUsableSubAllocSectors        = uint32("not_usable_sub_alloc_sectors", "Not Usable Sub Alloc Sectors")
2906 NotYetPurgeableBlocks           = uint32("not_yet_purgeable_blocks", "Not Yet Purgeable Blocks")
2907 NSInfoBitMask                   = uint32("ns_info_bit_mask", "Name Space Info Bit Mask")
2908 NSSOAllInFlags                  = bitfield32("nsso_all_in_flags", "SecretStore All Input Flags",[
2909         bf_boolean32(0x00000010, "nsso_all_unicode", "Unicode Data"),
2910         bf_boolean32(0x00000080, "nsso_set_tree", "Set Tree"),
2911         bf_boolean32(0x00000200, "nsso_destroy_ctx", "Destroy Context"),
2912 ])
2913 NSSOGetServiceInFlags           = bitfield32("nsso_get_svc_in_flags", "SecretStore Get Service Flags",[
2914         bf_boolean32(0x00000100, "nsso_get_ctx", "Get Context"),
2915 ])
2916 NSSOReadInFlags                 = bitfield32("nsso_read_in_flags", "SecretStore Read Flags",[
2917         bf_boolean32(0x00000001, "nsso_rw_enh_prot", "Read/Write Enhanced Protection"),
2918         bf_boolean32(0x00000008, "nsso_repair", "Repair SecretStore"),
2919 ])
2920 NSSOReadOrUnlockInFlags         = bitfield32("nsso_read_or_unlock_in_flags", "SecretStore Read or Unlock Flags",[
2921         bf_boolean32(0x00000004, "nsso_ep_master_pwd", "Master Password used instead of ENH Password"),
2922 ])
2923 NSSOUnlockInFlags               = bitfield32("nsso_unlock_in_flags", "SecretStore Unlock Flags",[
2924         bf_boolean32(0x00000004, "nsso_rmv_lock", "Remove Lock from Store"),
2925 ])
2926 NSSOWriteInFlags                = bitfield32("nsso_write_in_flags", "SecretStore Write Flags",[
2927         bf_boolean32(0x00000001, "nsso_enh_prot", "Enhanced Protection"),
2928         bf_boolean32(0x00000002, "nsso_create_id", "Create ID"),
2929         bf_boolean32(0x00000040, "nsso_ep_pwd_used", "Enhanced Protection Password Used"),
2930 ])
2931 NSSOContextOutFlags             = bitfield32("nsso_cts_out_flags", "Type of Context",[ 
2932         bf_boolean32(0x00000001, "nsso_ds_ctx", "DSAPI Context"),
2933         bf_boolean32(0x00000080, "nsso_ldap_ctx", "LDAP Context"),
2934         bf_boolean32(0x00000200, "nsso_dc_ctx", "Reserved"),
2935 ])
2936 NSSOGetServiceOutFlags          = bitfield32("nsso_get_svc_out_flags", "SecretStore Status Flags",[ 
2937         bf_boolean32(0x00400000, "nsso_mstr_pwd", "Master Password Present"),
2938 ])
2939 NSSOGetServiceReadOutFlags      = bitfield32("nsso_get_svc_read_out_flags", "SecretStore Status Flags",[
2940         bf_boolean32(0x00800000, "nsso_mp_disabled", "Master Password Disabled"),
2941 ])
2942 NSSOReadOutFlags                = bitfield32("nsso_read_out_flags", "SecretStore Read Flags",[
2943         bf_boolean32(0x00010000, "nsso_secret_locked", "Enhanced Protection Lock on Secret"),
2944         bf_boolean32(0x00020000, "nsso_secret_not_init", "Secret Not Yet Initialized"),
2945         bf_boolean32(0x00040000, "nsso_secret_marked", "Secret Marked for Enhanced Protection"),
2946         bf_boolean32(0x00080000, "nsso_secret_not_sync", "Secret Not Yet Synchronized in NDS"),
2947         bf_boolean32(0x00200000, "nsso_secret_enh_pwd", "Enhanced Protection Password on Secret"),
2948 ])
2949 NSSOReadOutStatFlags            = bitfield32("nsso_read_out_stat_flags", "SecretStore Read Status Flags",[
2950         bf_boolean32(0x00100000, "nsso_admin_mod", "Admin Modified Secret Last"),
2951 ])
2952 NSSOVerb                        = val_string8("nsso_verb", "SecretStore Verb", [
2953         [ 0x00, "Query Server" ],
2954         [ 0x01, "Read App Secrets" ],
2955         [ 0x02, "Write App Secrets" ],
2956         [ 0x03, "Add Secret ID" ],
2957         [ 0x04, "Remove Secret ID" ],
2958         [ 0x05, "Remove SecretStore" ],
2959         [ 0x06, "Enumerate SecretID's" ],
2960         [ 0x07, "Unlock Store" ],
2961         [ 0x08, "Set Master Password" ],
2962         [ 0x09, "Get Service Information" ],
2963 ])        
2964 NSSpecificInfo                  = fw_string("ns_specific_info", "Name Space Specific Info", 512)                                         
2965 NumberOfAllocs                  = uint32("num_of_allocs", "Number of Allocations")
2966 NumberOfAttributes              = uint32("number_of_attributes", "Number of Attributes")
2967 NumberOfCPUs                    = uint32("number_of_cpus", "Number of CPU's")
2968 NumberOfDataStreams             = uint16("number_of_data_streams", "Number of Data Streams")
2969 NumberOfDynamicMemoryAreas      = uint16("number_of_dynamic_memory_areas", "Number Of Dynamic Memory Areas")
2970 NumberOfEntries                 = uint8("number_of_entries", "Number of Entries")
2971 NumberOfLocks                   = uint8("number_of_locks", "Number of Locks")
2972 NumberOfMinutesToDelay          = uint32("number_of_minutes_to_delay", "Number of Minutes to Delay")
2973 NumberOfNCPExtensions           = uint32("number_of_ncp_extensions", "Number Of NCP Extensions")
2974 NumberOfNSLoaded                = uint16("number_of_ns_loaded", "Number Of Name Spaces Loaded")
2975 NumberOfProtocols               = uint8("number_of_protocols", "Number of Protocols")
2976 NumberOfRecords                 = uint16("number_of_records", "Number of Records")
2977 NumberOfReferencedPublics       = uint32("num_of_ref_publics", "Number of Referenced Public Symbols") 
2978 NumberOfSemaphores              = uint16("number_of_semaphores", "Number Of Semaphores")
2979 NumberOfServiceProcesses        = uint8("number_of_service_processes", "Number Of Service Processes")
2980 NumberOfSetCategories           = uint32("number_of_set_categories", "Number Of Set Categories")
2981 NumberOfSMs                     = uint32("number_of_sms", "Number Of Storage Medias")
2982 NumberOfStations                = uint8("number_of_stations", "Number of Stations")
2983 NumBytes                        = uint16("num_bytes", "Number of Bytes")
2984 NumOfCCinPkt                    = uint32("num_of_cc_in_pkt", "Number of Custom Counters in Packet")
2985 NumOfChecks                     = uint32("num_of_checks", "Number of Checks")
2986 NumOfEntries                    = uint32("num_of_entries", "Number of Entries")
2987 NumOfFilesMigrated              = uint32("num_of_files_migrated", "Number Of Files Migrated")
2988 NumOfGarbageColl                = uint32("num_of_garb_coll", "Number of Garbage Collections")
2989 NumOfNCPReqs                    = uint32("num_of_ncp_reqs", "Number of NCP Requests since Server was brought up")
2990 NumOfSegments                   = uint32("num_of_segments", "Number of Segments")
2991
2992 ObjectCount                     = uint32("object_count", "Object Count")
2993 ObjectFlags                     = val_string8("object_flags", "Object Flags", [
2994         [ 0x00, "Dynamic object" ],
2995         [ 0x01, "Static object" ],
2996 ])
2997 ObjectHasProperties             = val_string8("object_has_properites", "Object Has Properties", [
2998         [ 0x00, "No properties" ],
2999         [ 0xff, "One or more properties" ],
3000 ])
3001 ObjectID                        = uint32("object_id", "Object ID", BE)
3002 ObjectID.Display('BASE_HEX')
3003 ObjectIDCount                   = uint16("object_id_count", "Object ID Count")
3004 ObjectIDInfo                    = uint32("object_id_info", "Object Information")
3005 ObjectInfoReturnCount           = uint32("object_info_rtn_count", "Object Information Count")
3006 ObjectName                      = nstring8("object_name", "Object Name")
3007 ObjectNameLen                   = fw_string("object_name_len", "Object Name", 48)
3008 ObjectNameStringz               = stringz("object_name_stringz", "Object Name")
3009 ObjectNumber                    = uint32("object_number", "Object Number")
3010 ObjectSecurity                  = val_string8("object_security", "Object Security", [
3011         [ 0x00, "Object Read (Anyone) / Object Write (Anyone)" ],
3012         [ 0x01, "Object Read (Logged in) / Object Write (Anyone)" ],
3013         [ 0x02, "Object Read (Logged in as Object) / Object Write (Anyone)" ],
3014         [ 0x03, "Object Read (Supervisor) / Object Write (Anyone)" ],
3015         [ 0x04, "Object Read (Operating System Only) / Object Write (Anyone)" ],
3016         [ 0x10, "Object Read (Anyone) / Object Write (Logged in)" ],
3017         [ 0x11, "Object Read (Logged in) / Object Write (Logged in)" ],
3018         [ 0x12, "Object Read (Logged in as Object) / Object Write (Logged in)" ],
3019         [ 0x13, "Object Read (Supervisor) / Object Write (Logged in)" ],
3020         [ 0x14, "Object Read (Operating System Only) / Object Write (Logged in)" ],
3021         [ 0x20, "Object Read (Anyone) / Object Write (Logged in as Object)" ],
3022         [ 0x21, "Object Read (Logged in) / Object Write (Logged in as Object)" ],
3023         [ 0x22, "Object Read (Logged in as Object) / Object Write (Logged in as Object)" ],
3024         [ 0x23, "Object Read (Supervisor) / Object Write (Logged in as Object)" ],
3025         [ 0x24, "Object Read (Operating System Only) / Object Write (Logged in as Object)" ],
3026         [ 0x30, "Object Read (Anyone) / Object Write (Supervisor)" ],
3027         [ 0x31, "Object Read (Logged in) / Object Write (Supervisor)" ],
3028         [ 0x32, "Object Read (Logged in as Object) / Object Write (Supervisor)" ],
3029         [ 0x33, "Object Read (Supervisor) / Object Write (Supervisor)" ],
3030         [ 0x34, "Object Read (Operating System Only) / Object Write (Supervisor)" ],
3031         [ 0x40, "Object Read (Anyone) / Object Write (Operating System Only)" ],
3032         [ 0x41, "Object Read (Logged in) / Object Write (Operating System Only)" ],
3033         [ 0x42, "Object Read (Logged in as Object) / Object Write (Operating System Only)" ],
3034         [ 0x43, "Object Read (Supervisor) / Object Write (Operating System Only)" ],
3035         [ 0x44, "Object Read (Operating System Only) / Object Write (Operating System Only)" ],
3036 ])
3037 #
3038 # XXX - should this use the "server_vals[]" value_string array from
3039 # "packet-ipx.c"?
3040 #
3041 # XXX - should this list be merged with that list?  There are some
3042 # oddities, e.g. this list has 0x03f5 for "Microsoft SQL Server", but
3043 # the list from "packet-ipx.c" has 0xf503 for that - is that just
3044 # byte-order confusion?
3045 #
3046 ObjectType                      = val_string16("object_type", "Object Type", [
3047         [ 0x0000,       "Unknown" ],
3048         [ 0x0001,       "User" ],
3049         [ 0x0002,       "User group" ],
3050         [ 0x0003,       "Print queue" ],
3051         [ 0x0004,       "NetWare file server" ],
3052         [ 0x0005,       "Job server" ],
3053         [ 0x0006,       "Gateway" ],
3054         [ 0x0007,       "Print server" ],
3055         [ 0x0008,       "Archive queue" ],
3056         [ 0x0009,       "Archive server" ],
3057         [ 0x000a,       "Job queue" ],
3058         [ 0x000b,       "Administration" ],
3059         [ 0x0021,       "NAS SNA gateway" ],
3060         [ 0x0026,       "Remote bridge server" ],
3061         [ 0x0027,       "TCP/IP gateway" ],
3062         [ 0x0047,       "Novell Print Server" ],
3063         [ 0x004b,       "Btrieve Server" ],
3064         [ 0x004c,       "NetWare SQL Server" ],
3065         [ 0x0064,       "ARCserve" ],
3066         [ 0x0066,       "ARCserve 3.0" ],
3067         [ 0x0076,       "NetWare SQL" ],
3068         [ 0x00a0,       "Gupta SQL Base Server" ],
3069         [ 0x00a1,       "Powerchute" ],
3070         [ 0x0107,       "NetWare Remote Console" ],
3071         [ 0x01cb,       "Shiva NetModem/E" ],
3072         [ 0x01cc,       "Shiva LanRover/E" ],
3073         [ 0x01cd,       "Shiva LanRover/T" ],
3074         [ 0x01d8,       "Castelle FAXPress Server" ],
3075         [ 0x01da,       "Castelle Print Server" ],
3076         [ 0x01dc,       "Castelle Fax Server" ],
3077         [ 0x0200,       "Novell SQL Server" ],
3078         [ 0x023a,       "NetWare Lanalyzer Agent" ],
3079         [ 0x023c,       "DOS Target Service Agent" ],
3080         [ 0x023f,       "NetWare Server Target Service Agent" ],
3081         [ 0x024f,       "Appletalk Remote Access Service" ],
3082         [ 0x0263,       "NetWare Management Agent" ],
3083         [ 0x0264,       "Global MHS" ],
3084         [ 0x0265,       "SNMP" ],
3085         [ 0x026a,       "NetWare Management/NMS Console" ],
3086         [ 0x026b,       "NetWare Time Synchronization" ],
3087         [ 0x0273,       "Nest Device" ],
3088         [ 0x0274,       "GroupWise Message Multiple Servers" ],
3089         [ 0x0278,       "NDS Replica Server" ],
3090         [ 0x0282,       "NDPS Service Registry Service" ],
3091         [ 0x028a,       "MPR/IPX Address Mapping Gateway" ],
3092         [ 0x028b,       "ManageWise" ],
3093         [ 0x0293,       "NetWare 6" ],
3094         [ 0x030c,       "HP JetDirect" ],
3095         [ 0x0328,       "Watcom SQL Server" ],
3096         [ 0x0355,       "Backup Exec" ],
3097         [ 0x039b,       "Lotus Notes" ],
3098         [ 0x03e1,       "Univel Server" ],
3099         [ 0x03f5,       "Microsoft SQL Server" ],
3100         [ 0x055e,       "Lexmark Print Server" ],
3101         [ 0x0640,       "Microsoft Gateway Services for NetWare" ],
3102         [ 0x064e,       "Microsoft Internet Information Server" ],
3103         [ 0x077b,       "Advantage Database Server" ],
3104         [ 0x07a7,       "Backup Exec Job Queue" ],
3105         [ 0x07a8,       "Backup Exec Job Manager" ],
3106         [ 0x07a9,       "Backup Exec Job Service" ],
3107         [ 0x5555,       "Site Lock" ],
3108         [ 0x8202,       "NDPS Broker" ],
3109 ])
3110 OCRetFlags                      = val_string8("o_c_ret_flags", "Open Create Return Flags", [
3111         [ 0x00, "No CallBack has been registered (No Op-Lock)" ],
3112         [ 0x01, "Request has been registered for CallBack (Op-Lock)" ],
3113 ])
3114 OldestDeletedFileAgeInTicks     = uint32("oldest_deleted_file_age_in_ticks", "Oldest Deleted File Age in Ticks")
3115 OldFileName                     = bytes("old_file_name", "Old File Name", 15)
3116 OldFileSize                     = uint32("old_file_size", "Old File Size")
3117 OpenCount                       = uint16("open_count", "Open Count")
3118 OpenCreateAction                = bitfield8("open_create_action", "Open Create Action", [
3119         bf_boolean8(0x01, "open_create_action_opened", "Opened"),
3120         bf_boolean8(0x02, "open_create_action_created", "Created"),
3121         bf_boolean8(0x04, "open_create_action_replaced", "Replaced"),
3122         bf_boolean8(0x08, "open_create_action_compressed", "Compressed"),
3123         bf_boolean8(0x80, "open_create_action_read_only", "Read Only"),
3124 ])      
3125 OpenCreateMode                  = bitfield8("open_create_mode", "Open Create Mode", [
3126         bf_boolean8(0x01, "open_create_mode_open", "Open existing file (file must exist)"),
3127         bf_boolean8(0x02, "open_create_mode_replace", "Replace existing file"),
3128         bf_boolean8(0x08, "open_create_mode_create", "Create new file or subdirectory (file or subdirectory cannot exist)"),
3129         bf_boolean8(0x80, "open_create_mode_oplock", "Open Callback (Op-Lock)"),
3130 ])
3131 OpenForReadCount                = uint16("open_for_read_count", "Open For Read Count")
3132 OpenForWriteCount               = uint16("open_for_write_count", "Open For Write Count")
3133 OpenRights                      = bitfield8("open_rights", "Open Rights", [
3134         bf_boolean8(0x01, "open_rights_read_only", "Read Only"),
3135         bf_boolean8(0x02, "open_rights_write_only", "Write Only"),
3136         bf_boolean8(0x04, "open_rights_deny_read", "Deny Read"),
3137         bf_boolean8(0x08, "open_rights_deny_write", "Deny Write"),
3138         bf_boolean8(0x10, "open_rights_compat", "Compatibility"),
3139         bf_boolean8(0x40, "open_rights_write_thru", "Write Through"),
3140 ])
3141 OptionNumber                    = uint8("option_number", "Option Number")
3142 originalSize                    = uint32("original_size", "Original Size")
3143 OSLanguageID                    = uint8("os_language_id", "OS Language ID")
3144 OSMajorVersion                  = uint8("os_major_version", "OS Major Version")
3145 OSMinorVersion                  = uint8("os_minor_version", "OS Minor Version")
3146 OSRevision                      = uint8("os_revision", "OS Revision")
3147 OtherFileForkSize               = uint32("other_file_fork_size", "Other File Fork Size")
3148 OtherFileForkFAT                = uint32("other_file_fork_fat", "Other File Fork FAT Entry")
3149 OutgoingPacketDiscardedNoTurboBuffer = uint16("outgoing_packet_discarded_no_turbo_buffer", "Outgoing Packet Discarded No Turbo Buffer")
3150
3151 PacketsDiscardedByHopCount      = uint16("packets_discarded_by_hop_count", "Packets Discarded By Hop Count")
3152 PacketsDiscardedUnknownNet      = uint16("packets_discarded_unknown_net", "Packets Discarded Unknown Net")
3153 PacketsFromInvalidConnection    = uint16("packets_from_invalid_connection", "Packets From Invalid Connection")
3154 PacketsReceivedDuringProcessing = uint16("packets_received_during_processing", "Packets Received During Processing")
3155 PacketsWithBadRequestType       = uint16("packets_with_bad_request_type", "Packets With Bad Request Type")
3156 PacketsWithBadSequenceNumber    = uint16("packets_with_bad_sequence_number", "Packets With Bad Sequence Number")
3157 PageTableOwnerFlag              = uint32("page_table_owner_flag", "Page Table Owner")
3158 ParentID                        = uint32("parent_id", "Parent ID")
3159 ParentID.Display("BASE_HEX")
3160 ParentBaseID                    = uint32("parent_base_id", "Parent Base ID")
3161 ParentBaseID.Display("BASE_HEX")
3162 ParentDirectoryBase             = uint32("parent_directory_base", "Parent Directory Base")
3163 ParentDOSDirectoryBase          = uint32("parent_dos_directory_base", "Parent DOS Directory Base")
3164 ParentObjectNumber              = uint32("parent_object_number", "Parent Object Number")
3165 ParentObjectNumber.Display("BASE_HEX")
3166 Password                        = nstring8("password", "Password")
3167 PathBase                        = uint8("path_base", "Path Base")
3168 PathComponentCount              = uint16("path_component_count", "Path Component Count")
3169 PathComponentSize               = uint16("path_component_size", "Path Component Size")
3170 PathCookieFlags                 = val_string16("path_cookie_flags", "Path Cookie Flags", [
3171         [ 0x0000, "Last component is Not a File Name" ],
3172         [ 0x0001, "Last component is a File Name" ],
3173 ])
3174 PathCount                       = uint8("path_count", "Path Count")
3175 Path                            = nstring8("path", "Path")
3176 PathAndName                     = stringz("path_and_name", "Path and Name")
3177 PendingIOCommands               = uint16("pending_io_commands", "Pending IO Commands")
3178 PhysicalDiskNumber              = uint8("physical_disk_number", "Physical Disk Number")
3179 PhysicalDriveCount              = uint8("physical_drive_count", "Physical Drive Count")
3180 PhysicalLockThreshold           = uint8("physical_lock_threshold", "Physical Lock Threshold")
3181 PingVersion                     = uint16("ping_version", "Ping Version")
3182 PositiveAcknowledgesSent        = uint16("positive_acknowledges_sent", "Positive Acknowledges Sent")
3183 PreCompressedSectors            = uint32("pre_compressed_sectors", "Precompressed Sectors")
3184 PreviousRecord                  = uint32("previous_record", "Previous Record")
3185 PrimaryEntry                    = uint32("primary_entry", "Primary Entry")
3186 PrintFlags                      = bitfield8("print_flags", "Print Flags", [
3187         bf_boolean8(0x08, "print_flags_ff", "Suppress Form Feeds"),
3188         bf_boolean8(0x10, "print_flags_cr", "Create"),
3189         bf_boolean8(0x20, "print_flags_del_spool", "Delete Spool File after Printing"),
3190         bf_boolean8(0x40, "print_flags_exp_tabs", "Expand Tabs in the File"),
3191         bf_boolean8(0x80, "print_flags_banner", "Print Banner Page"),
3192 ])
3193 PrinterHalted                   = val_string8("printer_halted", "Printer Halted", [
3194         [ 0x00, "Printer is not Halted" ],
3195         [ 0xff, "Printer is Halted" ],
3196 ])
3197 PrinterOffLine                  = val_string8( "printer_offline", "Printer Off-Line", [
3198         [ 0x00, "Printer is On-Line" ],
3199         [ 0xff, "Printer is Off-Line" ],
3200 ])
3201 PrintServerVersion              = uint8("print_server_version", "Print Server Version")
3202 Priority                        = uint32("priority", "Priority")
3203 Privileges                      = uint32("privileges", "Login Privileges")
3204 ProcessorType                   = val_string8("processor_type", "Processor Type", [
3205         [ 0x00, "Motorola 68000" ],
3206         [ 0x01, "Intel 8088 or 8086" ],
3207         [ 0x02, "Intel 80286" ],
3208 ])
3209 ProDOSInfo                      = bytes("pro_dos_info", "Pro DOS Info", 6)
3210 ProductMajorVersion             = uint16("product_major_version", "Product Major Version")
3211 ProductMinorVersion             = uint16("product_minor_version", "Product Minor Version")
3212 ProductRevisionVersion          = uint8("product_revision_version", "Product Revision Version")
3213 projectedCompSize               = uint32("projected_comp_size", "Projected Compression Size")
3214 PropertyHasMoreSegments         = val_string8("property_has_more_segments",
3215         "Property Has More Segments", [
3216         [ 0x00, "Is last segment" ],
3217         [ 0xff, "More segments are available" ],
3218 ])
3219 PropertyName                    = nstring8("property_name", "Property Name")
3220 PropertyName16                  = fw_string("property_name_16", "Property Name", 16)
3221 PropertyData                    = bytes("property_data", "Property Data", 128)
3222 PropertySegment                 = uint8("property_segment", "Property Segment")
3223 PropertyType                    = val_string8("property_type", "Property Type", [
3224         [ 0x00, "Display Static property" ],
3225         [ 0x01, "Display Dynamic property" ],
3226         [ 0x02, "Set Static property" ],
3227         [ 0x03, "Set Dynamic property" ],
3228 ])
3229 PropertyValue                   = fw_string("property_value", "Property Value", 128)
3230 ProposedMaxSize                 = uint16("proposed_max_size", "Proposed Max Size")
3231 protocolFlags                   = uint32("protocol_flags", "Protocol Flags")
3232 protocolFlags.Display("BASE_HEX")
3233 PurgeableBlocks                 = uint32("purgeable_blocks", "Purgeable Blocks")
3234 PurgeCcode                      = uint32("purge_c_code", "Purge Completion Code")
3235 PurgeCount                      = uint32("purge_count", "Purge Count")
3236 PurgeFlags                      = val_string16("purge_flags", "Purge Flags", [
3237         [ 0x0000, "Do not Purge All" ],
3238         [ 0x0001, "Purge All" ],
3239         [ 0xffff, "Do not Purge All" ],
3240 ])
3241 PurgeList                       = uint32("purge_list", "Purge List")
3242 PhysicalDiskChannel             = uint8("physical_disk_channel", "Physical Disk Channel")
3243 PhysicalDriveType               = val_string8("physical_drive_type", "Physical Drive Type", [
3244         [ 0x01, "XT" ],
3245         [ 0x02, "AT" ],
3246         [ 0x03, "SCSI" ],
3247         [ 0x04, "Disk Coprocessor" ],
3248         [ 0x05, "PS/2 with MFM Controller" ],
3249         [ 0x06, "PS/2 with ESDI Controller" ],
3250         [ 0x07, "Convergent Technology SBIC" ],
3251 ])      
3252 PhysicalReadErrors              = uint16("physical_read_errors", "Physical Read Errors")
3253 PhysicalReadRequests            = uint32("physical_read_requests", "Physical Read Requests")
3254 PhysicalWriteErrors             = uint16("physical_write_errors", "Physical Write Errors")
3255 PhysicalWriteRequests           = uint32("physical_write_requests", "Physical Write Requests")
3256 PrintToFileFlag                 = boolean8("print_to_file_flag", "Print to File Flag")
3257
3258 QueueID                         = uint32("queue_id", "Queue ID")
3259 QueueID.Display("BASE_HEX")
3260 QueueName                       = nstring8("queue_name", "Queue Name")
3261 QueueStartPosition              = uint32("queue_start_position", "Queue Start Position")
3262 QueueStatus                     = bitfield8("queue_status", "Queue Status", [
3263         bf_boolean8(0x01, "queue_status_new_jobs", "Operator does not want to add jobs to the queue"),
3264         bf_boolean8(0x02, "queue_status_pserver", "Operator does not want additional servers attaching"),
3265         bf_boolean8(0x04, "queue_status_svc_jobs", "Operator does not want servers to service jobs"),
3266 ])
3267 QueueType                       = uint16("queue_type", "Queue Type")
3268 QueueingVersion                 = uint8("qms_version", "QMS Version")
3269
3270 ReadBeyondWrite                 = uint16("read_beyond_write", "Read Beyond Write")
3271 RecordLockCount                 = uint16("rec_lock_count", "Record Lock Count")
3272 RecordStart                     = uint32("record_start", "Record Start")
3273 RecordEnd                       = uint32("record_end", "Record End")
3274 RecordInUseFlag                 = val_string16("record_in_use", "Record in Use", [
3275         [ 0x0000, "Record In Use" ],
3276         [ 0xffff, "Record Not In Use" ],
3277 ])      
3278 RedirectedPrinter               = uint8( "redirected_printer", "Redirected Printer" )
3279 ReferenceCount                  = uint32("reference_count", "Reference Count")
3280 RelationsCount                  = uint16("relations_count", "Relations Count")
3281 ReMirrorCurrentOffset           = uint32("re_mirror_current_offset", "ReMirror Current Offset")
3282 ReMirrorDriveNumber             = uint8("re_mirror_drive_number", "ReMirror Drive Number")
3283 RemoteMaxPacketSize             = uint32("remote_max_packet_size", "Remote Max Packet Size")
3284 RemoteTargetID                  = uint32("remote_target_id", "Remote Target ID")
3285 RemoteTargetID.Display("BASE_HEX")
3286 RemovableFlag                   = uint16("removable_flag", "Removable Flag")
3287 RemoveOpenRights                = bitfield8("remove_open_rights", "Remove Open Rights", [
3288         bf_boolean8(0x01, "remove_open_rights_ro", "Read Only"),
3289         bf_boolean8(0x02, "remove_open_rights_wo", "Write Only"),
3290         bf_boolean8(0x04, "remove_open_rights_dr", "Deny Read"),
3291         bf_boolean8(0x08, "remove_open_rights_dw", "Deny Write"),
3292         bf_boolean8(0x10, "remove_open_rights_comp", "Compatibility"),
3293         bf_boolean8(0x40, "remove_open_rights_write_thru", "Write Through"),
3294 ])
3295 RenameFlag                      = bitfield8("rename_flag", "Rename Flag", [
3296         bf_boolean8(0x01, "rename_flag_ren", "Rename to Myself allows file to be renamed to it's original name"),
3297         bf_boolean8(0x02, "rename_flag_comp", "Compatability allows files that are marked read only to be opened with read/write access"),
3298         bf_boolean8(0x04, "rename_flag_no", "Name Only renames only the specified name space entry name"),
3299 ])
3300 RepliesCancelled                = uint16("replies_cancelled", "Replies Cancelled")
3301 ReplyBuffer                     = nstring8("reply_buffer", "Reply Buffer")
3302 ReplyBufferSize                 = uint32("reply_buffer_size", "Reply Buffer Size")
3303 ReplyQueueJobNumbers            = uint32("reply_queue_job_numbers", "Reply Queue Job Numbers")
3304 RequestBitMap                   = bitfield16("request_bit_map", "Request Bit Map", [
3305         bf_boolean16(0x0001, "request_bit_map_ret_afp_ent", "AFP Entry ID"),
3306         bf_boolean16(0x0002, "request_bit_map_ret_data_fork", "Data Fork Length"),
3307         bf_boolean16(0x0004, "request_bit_map_ret_res_fork", "Resource Fork Length"),
3308         bf_boolean16(0x0008, "request_bit_map_ret_num_off", "Number of Offspring"),
3309         bf_boolean16(0x0010, "request_bit_map_ret_owner", "Owner ID"),
3310         bf_boolean16(0x0020, "request_bit_map_ret_short", "Short Name"),
3311         bf_boolean16(0x0040, "request_bit_map_ret_acc_priv", "Access Privileges"),
3312         bf_boolean16(0x0100, "request_bit_map_ratt", "Return Attributes"),
3313         bf_boolean16(0x0200, "request_bit_map_ret_afp_parent", "AFP Parent Entry ID"),
3314         bf_boolean16(0x0400, "request_bit_map_ret_cr_date", "Creation Date"),
3315         bf_boolean16(0x0800, "request_bit_map_ret_acc_date", "Access Date"),
3316         bf_boolean16(0x1000, "request_bit_map_ret_mod_date", "Modify Date&Time"),
3317         bf_boolean16(0x2000, "request_bit_map_ret_bak_date", "Backup Date&Time"),
3318         bf_boolean16(0x4000, "request_bit_map_ret_finder", "Finder Info"),
3319         bf_boolean16(0x8000, "request_bit_map_ret_long_nm", "Long Name"),
3320 ])              
3321 ResourceForkLen                 = uint32("resource_fork_len", "Resource Fork Len")
3322 RequestCode                     = val_string8("request_code", "Request Code", [
3323         [ 0x00, "Change Logged in to Temporary Authenticated" ],
3324         [ 0x01, "Change Temporary Authenticated to Logged in" ],
3325 ])
3326 RequestData                     = nstring8("request_data", "Request Data")
3327 RequestsReprocessed             = uint16("requests_reprocessed", "Requests Reprocessed")
3328 Reserved                        = uint8( "reserved", "Reserved" )
3329 Reserved2                       = bytes("reserved2", "Reserved", 2)
3330 Reserved3                       = bytes("reserved3", "Reserved", 3)
3331 Reserved4                       = bytes("reserved4", "Reserved", 4)
3332 Reserved6                       = bytes("reserved6", "Reserved", 6)
3333 Reserved8                       = bytes("reserved8", "Reserved", 8)
3334 Reserved10                      = bytes("reserved10", "Reserved", 10)
3335 Reserved12                      = bytes("reserved12", "Reserved", 12)
3336 Reserved16                      = bytes("reserved16", "Reserved", 16)
3337 Reserved20                      = bytes("reserved20", "Reserved", 20)
3338 Reserved28                      = bytes("reserved28", "Reserved", 28)
3339 Reserved36                      = bytes("reserved36", "Reserved", 36)
3340 Reserved44                      = bytes("reserved44", "Reserved", 44)
3341 Reserved48                      = bytes("reserved48", "Reserved", 48)
3342 Reserved51                      = bytes("reserved51", "Reserved", 51)
3343 Reserved56                      = bytes("reserved56", "Reserved", 56)
3344 Reserved64                      = bytes("reserved64", "Reserved", 64)
3345 Reserved120                     = bytes("reserved120", "Reserved", 120)                                  
3346 ReservedOrDirectoryNumber       = uint32("reserved_or_directory_number", "Reserved or Directory Number (see EAFlags)")
3347 ResourceCount                   = uint32("resource_count", "Resource Count")
3348 ResourceForkSize                = uint32("resource_fork_size", "Resource Fork Size")
3349 ResourceName                    = stringz("resource_name", "Resource Name")
3350 ResourceSignature               = fw_string("resource_sig", "Resource Signature", 4)
3351 RestoreTime                     = uint32("restore_time", "Restore Time")
3352 Restriction                     = uint32("restriction", "Disk Space Restriction")
3353 RestrictionsEnforced            = val_string8("restrictions_enforced", "Disk Restrictions Enforce Flag", [
3354         [ 0x00, "Enforced" ],
3355         [ 0xff, "Not Enforced" ],
3356 ])
3357 ReturnInfoCount                 = uint32("return_info_count", "Return Information Count")
3358 ReturnInfoMask                  = bitfield16("ret_info_mask", "Return Information", [
3359         bf_boolean16(0x0001, "ret_info_mask_fname", "Return File Name Information"),
3360         bf_boolean16(0x0002, "ret_info_mask_alloc", "Return Allocation Space Information"),
3361         bf_boolean16(0x0004, "ret_info_mask_attr", "Return Attribute Information"),
3362         bf_boolean16(0x0008, "ret_info_mask_size", "Return Size Information"),
3363         bf_boolean16(0x0010, "ret_info_mask_tspace", "Return Total Space Information"),
3364         bf_boolean16(0x0020, "ret_info_mask_eattr", "Return Extended Attributes Information"),
3365         bf_boolean16(0x0040, "ret_info_mask_arch", "Return Archive Information"),
3366         bf_boolean16(0x0080, "ret_info_mask_mod", "Return Modify Information"),
3367         bf_boolean16(0x0100, "ret_info_mask_create", "Return Creation Information"),
3368         bf_boolean16(0x0200, "ret_info_mask_ns", "Return Name Space Information"),
3369         bf_boolean16(0x0400, "ret_info_mask_dir", "Return Directory Information"),
3370         bf_boolean16(0x0800, "ret_info_mask_rights", "Return Rights Information"),
3371         bf_boolean16(0x1000, "ret_info_mask_id", "Return ID Information"),
3372         bf_boolean16(0x2000, "ret_info_mask_ns_attr", "Return Name Space Attributes Information"),
3373         bf_boolean16(0x4000, "ret_info_mask_actual", "Return Actual Information"),
3374         bf_boolean16(0x8000, "ret_info_mask_logical", "Return Logical Information"),
3375 ])
3376 ReturnedListCount               = uint32("returned_list_count", "Returned List Count")
3377 Revision                        = uint32("revision", "Revision")
3378 RevisionNumber                  = uint8("revision_number", "Revision")
3379 RevQueryFlag                    = val_string8("rev_query_flag", "Revoke Rights Query Flag", [
3380         [ 0x00, "Do not query the locks engine for access rights" ],
3381         [ 0x01, "Query the locks engine and return the access rights" ],
3382 ])
3383 RightsGrantMask                 = bitfield8("rights_grant_mask", "Grant Rights", [
3384         bf_boolean8(0x01, "rights_grant_mask_read", "Read"),
3385         bf_boolean8(0x02, "rights_grant_mask_write", "Write"),
3386         bf_boolean8(0x04, "rights_grant_mask_open", "Open"),
3387         bf_boolean8(0x08, "rights_grant_mask_create", "Create"),
3388         bf_boolean8(0x10, "rights_grant_mask_del", "Delete"),
3389         bf_boolean8(0x20, "rights_grant_mask_parent", "Parental"),
3390         bf_boolean8(0x40, "rights_grant_mask_search", "Search"),
3391         bf_boolean8(0x80, "rights_grant_mask_mod", "Modify"),
3392 ])
3393 RightsRevokeMask                = bitfield8("rights_revoke_mask", "Revoke Rights", [
3394         bf_boolean8(0x01, "rights_revoke_mask_read", "Read"),
3395         bf_boolean8(0x02, "rights_revoke_mask_write", "Write"),
3396         bf_boolean8(0x04, "rights_revoke_mask_open", "Open"),
3397         bf_boolean8(0x08, "rights_revoke_mask_create", "Create"),
3398         bf_boolean8(0x10, "rights_revoke_mask_del", "Delete"),
3399         bf_boolean8(0x20, "rights_revoke_mask_parent", "Parental"),
3400         bf_boolean8(0x40, "rights_revoke_mask_search", "Search"),
3401         bf_boolean8(0x80, "rights_revoke_mask_mod", "Modify"),
3402 ])
3403 RIPSocketNumber                 = uint16("rip_socket_num", "RIP Socket Number")
3404 RIPSocketNumber.Display("BASE_HEX")
3405 RouterDownFlag                  = boolean8("router_dn_flag", "Router Down Flag")
3406 RPCccode                        = val_string16("rpc_c_code", "RPC Completion Code", [
3407         [ 0x0000, "Successful" ],
3408 ])        
3409 RTagNumber                      = uint32("r_tag_num", "Resource Tag Number")
3410 RTagNumber.Display("BASE_HEX")
3411 RpyNearestSrvFlag               = boolean8("rpy_nearest_srv_flag", "Reply to Nearest Server Flag")
3412
3413 SalvageableFileEntryNumber      = uint32("salvageable_file_entry_number", "Salvageable File Entry Number")
3414 SalvageableFileEntryNumber.Display("BASE_HEX")
3415 SAPSocketNumber                 = uint16("sap_socket_number", "SAP Socket Number")
3416 SAPSocketNumber.Display("BASE_HEX")
3417 ScanItems                       = uint32("scan_items", "Number of Items returned from Scan")
3418 SearchAttributes                = bitfield8("sattr", "Search Attributes", [
3419         bf_boolean8(0x01, "sattr_ronly", "Read-Only Files Allowed"),
3420         bf_boolean8(0x02, "sattr_hid", "Hidden Files Allowed"),
3421         bf_boolean8(0x04, "sattr_sys", "System Files Allowed"),
3422         bf_boolean8(0x08, "sattr_exonly", "Execute-Only Files Allowed"),
3423         bf_boolean8(0x10, "sattr_sub", "Subdirectories Only"),
3424         bf_boolean8(0x20, "sattr_archive", "Archive"),
3425         bf_boolean8(0x40, "sattr_execute_confirm", "Execute Confirm"),
3426         bf_boolean8(0x80, "sattr_shareable", "Shareable"),
3427 ])      
3428 SearchAttributesLow             = bitfield16("search_att_low", "Search Attributes", [
3429         bf_boolean16(0x0001, "search_att_read_only", "Read-Only"),
3430         bf_boolean16(0x0002, "search_att_hidden", "Hidden Files Allowed"),
3431         bf_boolean16(0x0004, "search_att_system", "System"),
3432         bf_boolean16(0x0008, "search_att_execute_only", "Execute-Only"),
3433         bf_boolean16(0x0010, "search_att_sub", "Subdirectories Only"),
3434         bf_boolean16(0x0020, "search_att_archive", "Archive"),
3435         bf_boolean16(0x0040, "search_att_execute_confirm", "Execute Confirm"),
3436         bf_boolean16(0x0080, "search_att_shareable", "Shareable"),
3437         bf_boolean16(0x8000, "search_attr_all_files", "All Files and Directories"),
3438 ])
3439 SearchBitMap                            = bitfield8("search_bit_map", "Search Bit Map", [
3440         bf_boolean8(0x01, "search_bit_map_hidden", "Hidden"),
3441         bf_boolean8(0x02, "search_bit_map_sys", "System"),
3442         bf_boolean8(0x04, "search_bit_map_sub", "Subdirectory"),
3443         bf_boolean8(0x08, "search_bit_map_files", "Files"),
3444 ])      
3445 SearchConnNumber                        = uint32("search_conn_number", "Search Connection Number")
3446 SearchInstance                          = uint32("search_instance", "Search Instance")
3447 SearchNumber                            = uint32("search_number", "Search Number")
3448 SearchPattern                           = nstring8("search_pattern", "Search Pattern")
3449 SearchSequence                          = bytes("search_sequence", "Search Sequence", 9)
3450 SearchSequenceWord                      = uint16("search_sequence_word", "Search Sequence", BE)
3451 Second                                  = uint8("s_second", "Seconds")
3452 SecondsRelativeToTheYear2000            = uint32("sec_rel_to_y2k", "Seconds Relative to the Year 2000") 
3453 SecretStoreVerb                         = val_string8("ss_verb", "Secret Store Verb",[
3454         [ 0x00, "Query Server" ],
3455         [ 0x01, "Read App Secrets" ],
3456         [ 0x02, "Write App Secrets" ],
3457         [ 0x03, "Add Secret ID" ],
3458         [ 0x04, "Remove Secret ID" ],
3459         [ 0x05, "Remove SecretStore" ],
3460         [ 0x06, "Enumerate Secret IDs" ],
3461         [ 0x07, "Unlock Store" ],
3462         [ 0x08, "Set Master Password" ],
3463         [ 0x09, "Get Service Information" ],
3464 ])        
3465 SecurityEquivalentList                  = fw_string("security_equiv_list", "Security Equivalent List", 128) 
3466 SecurityFlag                            = bitfield8("security_flag", "Security Flag", [
3467         bf_boolean8(0x01, "checksuming", "Checksumming"),
3468         bf_boolean8(0x02, "signature", "Signature"),
3469         bf_boolean8(0x04, "complete_signatures", "Complete Signatures"),
3470         bf_boolean8(0x08, "encryption", "Encryption"),
3471         bf_boolean8(0x80, "large_internet_packets", "Large Internet Packets (LIP) Disabled"),
3472 ])      
3473 SecurityRestrictionVersion              = uint8("security_restriction_version", "Security Restriction Version")
3474 SectorsPerBlock                         = uint8("sectors_per_block", "Sectors Per Block")
3475 SectorsPerCluster                       = uint16("sectors_per_cluster", "Sectors Per Cluster" )
3476 SectorsPerClusterLong                   = uint32("sectors_per_cluster_long", "Sectors Per Cluster" )
3477 SectorsPerTrack                         = uint8("sectors_per_track", "Sectors Per Track")
3478 SectorSize                              = uint32("sector_size", "Sector Size")
3479 SemaphoreHandle                         = uint32("semaphore_handle", "Semaphore Handle")
3480 SemaphoreName                           = nstring8("semaphore_name", "Semaphore Name")
3481 SemaphoreNameLen                        = uint8("semaphore_name_len", "Semaphore Name Len")
3482 SemaphoreOpenCount                      = uint8("semaphore_open_count", "Semaphore Open Count")
3483 SemaphoreShareCount                     = uint8("semaphore_share_count", "Semaphore Share Count")
3484 SemaphoreTimeOut                        = uint16("semaphore_time_out", "Semaphore Time Out")
3485 SemaphoreValue                          = uint16("semaphore_value", "Semaphore Value")
3486 SendStatus                              = val_string8("send_status", "Send Status", [
3487         [ 0x00, "Successful" ],
3488         [ 0x01, "Illegal Station Number" ],
3489         [ 0x02, "Client Not Logged In" ],
3490         [ 0x03, "Client Not Accepting Messages" ],
3491         [ 0x04, "Client Already has a Message" ],
3492         [ 0x96, "No Alloc Space for the Message" ],
3493         [ 0xfd, "Bad Station Number" ],
3494         [ 0xff, "Failure" ],
3495 ])
3496 SequenceByte                    = uint8("sequence_byte", "Sequence")
3497 SequenceNumber                  = uint32("sequence_number", "Sequence Number")
3498 SequenceNumber.Display("BASE_HEX")
3499 ServerAddress                   = bytes("server_address", "Server Address", 12)
3500 ServerAppNumber                 = uint16("server_app_num", "Server App Number")
3501 ServerIDList                    = uint32("server_id_list", "Server ID List")
3502 ServerID                        = uint32("server_id_number", "Server ID", BE )
3503 ServerID.Display("BASE_HEX")
3504 ServerInfoFlags                 = val_string16("server_info_flags", "Server Information Flags", [
3505         [ 0x0000, "This server is not a member of a Cluster" ],
3506         [ 0x0001, "This server is a member of a Cluster" ],
3507 ])
3508 serverListFlags                 = uint32("server_list_flags", "Server List Flags")
3509 ServerName                      = fw_string("server_name", "Server Name", 48)
3510 serverName50                    = fw_string("server_name50", "Server Name", 50)
3511 ServerNameLen                   = nstring8("server_name_len", "Server Name")
3512 ServerNameStringz               = stringz("server_name_stringz", "Server Name")
3513 ServerNetworkAddress            = bytes("server_network_address", "Server Network Address", 10)
3514 ServerNode                      = bytes("server_node", "Server Node", 6)
3515 ServerSerialNumber              = uint32("server_serial_number", "Server Serial Number")
3516 ServerStation                   = uint8("server_station", "Server Station")
3517 ServerStationLong               = uint32("server_station_long", "Server Station")
3518 ServerStationList               = uint8("server_station_list", "Server Station List")
3519 ServerStatusRecord              = fw_string("server_status_record", "Server Status Record", 64)
3520 ServerTaskNumber                = uint8("server_task_number", "Server Task Number")
3521 ServerTaskNumberLong            = uint32("server_task_number_long", "Server Task Number")
3522 ServerType                      = uint16("server_type", "Server Type")
3523 ServerType.Display("BASE_HEX")
3524 ServerUtilization               = uint32("server_utilization", "Server Utilization")
3525 ServerUtilizationPercentage     = uint8("server_utilization_percentage", "Server Utilization Percentage")
3526 ServiceType                     = val_string16("Service_type", "Service Type", [
3527         [ 0x0000,       "Unknown" ],
3528         [ 0x0001,       "User" ],
3529         [ 0x0002,       "User group" ],
3530         [ 0x0003,       "Print queue" ],
3531         [ 0x0004,       "NetWare file server" ],
3532         [ 0x0005,       "Job server" ],
3533         [ 0x0006,       "Gateway" ],
3534         [ 0x0007,       "Print server" ],
3535         [ 0x0008,       "Archive queue" ],
3536         [ 0x0009,       "Archive server" ],
3537         [ 0x000a,       "Job queue" ],
3538         [ 0x000b,       "Administration" ],
3539         [ 0x0021,       "NAS SNA gateway" ],
3540         [ 0x0026,       "Remote bridge server" ],
3541         [ 0x0027,       "TCP/IP gateway" ],
3542 ])
3543 SetCmdCategory                  = val_string8("set_cmd_catagory", "Set Command Catagory", [
3544         [ 0x00, "Communications" ],
3545         [ 0x01, "Memory" ],
3546         [ 0x02, "File Cache" ],
3547         [ 0x03, "Directory Cache" ],
3548         [ 0x04, "File System" ],
3549         [ 0x05, "Locks" ],
3550         [ 0x06, "Transaction Tracking" ],
3551         [ 0x07, "Disk" ],
3552         [ 0x08, "Time" ],
3553         [ 0x09, "NCP" ],
3554         [ 0x0a, "Miscellaneous" ],
3555         [ 0x0b, "Error Handling" ],
3556         [ 0x0c, "Directory Services" ],
3557         [ 0x0d, "MultiProcessor" ],
3558         [ 0x0e, "Service Location Protocol" ],
3559         [ 0x0f, "Licensing Services" ],
3560 ])        
3561 SetCmdFlags                             = bitfield8("set_cmd_flags", "Set Command Flags", [
3562         bf_boolean8(0x01, "cmd_flags_startup_only", "Startup.ncf Only"),
3563         bf_boolean8(0x02, "cmd_flags_hidden", "Hidden"),
3564         bf_boolean8(0x04, "cmd_flags_advanced", "Advanced"),
3565         bf_boolean8(0x08, "cmd_flags_later", "Restart Server Required to Take Effect"),
3566         bf_boolean8(0x80, "cmd_flags_secure", "Console Secured"),
3567 ])
3568 SetCmdName                      = stringz("set_cmd_name", "Set Command Name")
3569 SetCmdType                      = val_string8("set_cmd_type", "Set Command Type", [
3570         [ 0x00, "Numeric Value" ],
3571         [ 0x01, "Boolean Value" ],
3572         [ 0x02, "Ticks Value" ],
3573         [ 0x04, "Time Value" ],
3574         [ 0x05, "String Value" ],
3575         [ 0x06, "Trigger Value" ],
3576         [ 0x07, "Numeric Value" ],
3577 ])        
3578 SetCmdValueNum                  = uint32("set_cmd_value_num", "Set Command Value")
3579 SetCmdValueString               = stringz("set_cmd_value_string", "Set Command Value")
3580 SetParmName                     = stringz("set_parm_name", "Set Parameter Name")
3581 SFTErrorTable                   = bytes("sft_error_table", "SFT Error Table", 60)
3582 SFTSupportLevel                 = val_string8("sft_support_level", "SFT Support Level", [
3583         [ 0x01, "Server Offers Hot Disk Error Fixing" ],
3584         [ 0x02, "Server Offers Disk Mirroring and Transaction Tracking" ],
3585         [ 0x03, "Server Offers Physical Server Mirroring" ],
3586 ])
3587 ShareableLockCount              = uint16("shareable_lock_count", "Shareable Lock Count")
3588 SharedMemoryAddresses           = bytes("shared_memory_addresses", "Shared Memory Addresses", 10)
3589 ShortName                       = fw_string("short_name", "Short Name", 12)
3590 ShortStkName                    = fw_string("short_stack_name", "Short Stack Name", 16)
3591 SiblingCount                    = uint32("sibling_count", "Sibling Count")
3592 SMIDs                           = uint32("smids", "Storage Media ID's")
3593 SoftwareDescription             = fw_string("software_description", "Software Description", 65)
3594 SoftwareDriverType              = uint8("software_driver_type", "Software Driver Type")
3595 SoftwareMajorVersionNumber      = uint8("software_major_version_number", "Software Major Version Number")
3596 SoftwareMinorVersionNumber      = uint8("software_minor_version_number", "Software Minor Version Number")
3597 SourceDirHandle                 = uint8("source_dir_handle", "Source Directory Handle")
3598 sourceOriginateTime             = bytes("source_originate_time", "Source Originate Time", 8)
3599 sourceOriginateTime.Display("BASE_HEX")
3600 SourcePath                      = nstring8("source_path", "Source Path")
3601 SourcePathComponentCount        = uint8("source_component_count", "Source Path Component Count")
3602 sourceReturnTime                = bytes("source_return_time", "Source Return Time", 8)
3603 sourceReturnTime.Display("BASE_HEX")
3604 SpaceUsed                       = uint32("space_used", "Space Used")
3605 SpaceMigrated                   = uint32("space_migrated", "Space Migrated")
3606 SrcNameSpace                    = val_string8("src_name_space", "Source Name Space", [
3607         [ 0x00, "DOS Name Space" ],
3608         [ 0x01, "MAC Name Space" ],
3609         [ 0x02, "NFS Name Space" ],
3610         [ 0x04, "Long Name Space" ],
3611 ])
3612 SupModID                        = uint32("sup_mod_id", "Sup Mod ID")
3613 StackCount                      = uint32("stack_count", "Stack Count")
3614 StackFullNameStr                = nstring8("stack_full_name_str", "Stack Full Name")
3615 StackMajorVN                    = uint8("stack_major_vn", "Stack Major Version Number")
3616 StackMinorVN                    = uint8("stack_minor_vn", "Stack Minor Version Number")
3617 StackNumber                     = uint32("stack_number", "Stack Number")
3618 StartConnNumber                 = uint32("start_conn_num", "Starting Connection Number")
3619 StartingBlock                   = uint16("starting_block", "Starting Block")
3620 StartingNumber                  = uint32("starting_number", "Starting Number")
3621 StartingSearchNumber            = uint16("start_search_number", "Start Search Number")
3622 StartNumber                     = uint32("start_number", "Start Number")
3623 startNumberFlag                 = uint16("start_number_flag", "Start Number Flag")
3624 StartVolumeNumber               = uint32("start_volume_number", "Starting Volume Number")
3625 StationList                     = uint32("station_list", "Station List")
3626 StationNumber                   = bytes("station_number", "Station Number", 3)
3627 StatMajorVersion                = uint8("stat_major_version", "Statistics Table Major Version")
3628 StatMinorVersion                = uint8("stat_minor_version", "Statistics Table Minor Version")
3629 Status                          = bitfield16("status", "Status", [
3630         bf_boolean16(0x0001, "user_info_logged_in", "Logged In"),
3631         bf_boolean16(0x0002, "user_info_being_abort", "Being Aborted"),
3632         bf_boolean16(0x0004, "user_info_audited", "Audited"),
3633         bf_boolean16(0x0008, "user_info_need_sec", "Needs Security Change"),
3634         bf_boolean16(0x0010, "user_info_mac_station", "MAC Station"),
3635         bf_boolean16(0x0020, "user_info_temp_authen", "Temporary Authenticated"),
3636         bf_boolean16(0x0040, "user_info_audit_conn", "Audit Connection Recorded"),
3637         bf_boolean16(0x0080, "user_info_dsaudit_conn", "DS Audit Connection Recorded"),
3638         bf_boolean16(0x0100, "user_info_logout", "Logout in Progress"),
3639         bf_boolean16(0x0200, "user_info_int_login", "Internal Login"),
3640         bf_boolean16(0x0400, "user_info_bindery", "Bindery Connection"),
3641 ])
3642 StatusFlagBits                  = bitfield32("status_flag_bits", "Status Flag", [
3643         bf_boolean32(0x00000001, "status_flag_bits_suballoc", "Sub Allocation"),
3644         bf_boolean32(0x00000002, "status_flag_bits_comp", "Compression"),
3645         bf_boolean32(0x00000004, "status_flag_bits_migrate", "Migration"),
3646         bf_boolean32(0x00000008, "status_flag_bits_audit", "Audit"),
3647         bf_boolean32(0x00000010, "status_flag_bits_ro", "Read Only"),
3648         bf_boolean32(0x00000020, "status_flag_bits_im_purge", "Immediate Purge"),
3649         bf_boolean32(0x80000000, "status_flag_bits_nss", "NSS Volume"),
3650 ])
3651 SubAllocClusters                = uint32("sub_alloc_clusters", "Sub Alloc Clusters")
3652 SubAllocFreeableClusters        = uint32("sub_alloc_freeable_clusters", "Sub Alloc Freeable Clusters")
3653 Subdirectory                    = uint32("sub_directory", "Subdirectory")
3654 Subdirectory.Display("BASE_HEX")
3655 SuggestedFileSize               = uint32("suggested_file_size", "Suggested File Size")
3656 SupportModuleID                 = uint32("support_module_id", "Support Module ID")
3657 SynchName                       = nstring8("synch_name", "Synch Name")
3658 SystemIntervalMarker            = uint32("system_interval_marker", "System Interval Marker")
3659
3660 TabSize                         = uint8( "tab_size", "Tab Size" )
3661 TargetClientList                = uint8("target_client_list", "Target Client List")
3662 TargetConnectionNumber          = uint16("target_connection_number", "Target Connection Number")
3663 TargetDirectoryBase             = uint32("target_directory_base", "Target Directory Base")
3664 TargetDirHandle                 = uint8("target_dir_handle", "Target Directory Handle")
3665 TargetEntryID                   = uint32("target_entry_id", "Target Entry ID")
3666 TargetEntryID.Display("BASE_HEX")
3667 TargetExecutionTime             = bytes("target_execution_time", "Target Execution Time", 6)
3668 TargetFileHandle                = bytes("target_file_handle", "Target File Handle", 6)
3669 TargetFileOffset                = uint32("target_file_offset", "Target File Offset")
3670 TargetMessage                   = nstring8("target_message", "Message")
3671 TargetPrinter                   = uint8( "target_ptr", "Target Printer" )
3672 targetReceiveTime               = bytes("target_receive_time", "Target Receive Time", 8)
3673 targetReceiveTime.Display("BASE_HEX")
3674 TargetServerIDNumber            = uint32("target_server_id_number", "Target Server ID Number", BE )
3675 TargetServerIDNumber.Display("BASE_HEX")
3676 targetTransmitTime              = bytes("target_transmit_time", "Target Transmit Time", 8)
3677 targetTransmitTime.Display("BASE_HEX")
3678 TaskNumByte                     = uint8("task_num_byte", "Task Number")
3679 TaskNumber                      = uint32("task_number", "Task Number")
3680 TaskNumberWord                  = uint16("task_number_word", "Task Number")
3681 TextJobDescription              = fw_string("text_job_description", "Text Job Description", 50)
3682 ThrashingCount                  = uint16("thrashing_count", "Thrashing Count")
3683 TimeoutLimit                    = uint16("timeout_limit", "Timeout Limit")
3684 TimesyncStatus                  = bitfield32("timesync_status_flags", "Timesync Status", [
3685         bf_boolean32(0x00000001, "timesync_status_sync", "Time is Synchronized"),
3686         bf_boolean32(0x00000002, "timesync_status_net_sync", "Time is Synchronized to the Network"), 
3687         bf_boolean32(0x00000004, "timesync_status_active", "Time Synchronization is Active"),
3688         bf_boolean32(0x00000008, "timesync_status_external", "External Time Synchronization Active"),
3689         bf_val_str32(0x00000700, "timesync_status_server_type", "Time Server Type", [
3690                 [ 0x01, "Client Time Server" ],
3691                 [ 0x02, "Secondary Time Server" ],
3692                 [ 0x03, "Primary Time Server" ],
3693                 [ 0x04, "Reference Time Server" ],
3694                 [ 0x05, "Single Reference Time Server" ],
3695         ]),
3696         bf_boolean32(0x000f0000, "timesync_status_ext_sync", "External Clock Status"),
3697 ])        
3698 TimeToNet                       = uint16("time_to_net", "Time To Net")
3699 TotalBlocks                     = uint32("total_blocks", "Total Blocks")        
3700 TotalBlocksToDecompress         = uint32("total_blks_to_dcompress", "Total Blocks To Decompress")
3701 TotalBytesRead                  = bytes("user_info_ttl_bytes_rd", "Total Bytes Read", 6)
3702 TotalBytesWritten               = bytes("user_info_ttl_bytes_wrt", "Total Bytes Written", 6)
3703 TotalCacheWrites                = uint32("total_cache_writes", "Total Cache Writes")
3704 TotalChangedFATs                = uint32("total_changed_fats", "Total Changed FAT Entries")
3705 TotalCommonCnts                 = uint32("total_common_cnts", "Total Common Counts")
3706 TotalCntBlocks                  = uint32("total_cnt_blocks", "Total Count Blocks")
3707 TotalDataStreamDiskSpaceAlloc   = uint32("total_stream_size_struct_space_alloc", "Total Data Stream Disk Space Alloc")
3708 TotalDirectorySlots             = uint16("total_directory_slots", "Total Directory Slots")
3709 TotalDirectoryEntries           = uint32("total_dir_entries", "Total Directory Entries")
3710 TotalDynamicSpace               = uint32("total_dynamic_space", "Total Dynamic Space")
3711 TotalExtendedDirectoryExtants   = uint32("total_extended_directory_extants", "Total Extended Directory Extants")
3712 TotalFileServicePackets         = uint32("total_file_service_packets", "Total File Service Packets")
3713 TotalFilesOpened                = uint32("total_files_opened", "Total Files Opened")
3714 TotalLFSCounters                = uint32("total_lfs_counters", "Total LFS Counters")
3715 TotalOffspring                  = uint16("total_offspring", "Total Offspring")
3716 TotalOtherPackets               = uint32("total_other_packets", "Total Other Packets")
3717 TotalQueueJobs                  = uint32("total_queue_jobs", "Total Queue Jobs")
3718 TotalReadRequests               = uint32("total_read_requests", "Total Read Requests")
3719 TotalRequest                    = uint32("total_request", "Total Requests")
3720 TotalRequestPackets             = uint32("total_request_packets", "Total Request Packets")
3721 TotalRoutedPackets              = uint32("total_routed_packets", "Total Routed Packets")
3722 TotalRxPkts                     = uint32("total_rx_pkts", "Total Receive Packets")
3723 TotalServerMemory               = uint16("total_server_memory", "Total Server Memory", BE)
3724 TotalTransactionsBackedOut      = uint32("total_trans_backed_out", "Total Transactions Backed Out")
3725 TotalTransactionsPerformed      = uint32("total_trans_performed", "Total Transactions Performed")
3726 TotalTxPkts                     = uint32("total_tx_pkts", "Total Transmit Packets")
3727 TotalUnfilledBackoutRequests    = uint16("total_unfilled_backout_requests", "Total Unfilled Backout Requests")
3728 TotalVolumeClusters             = uint16("total_volume_clusters", "Total Volume Clusters")
3729 TotalWriteRequests              = uint32("total_write_requests", "Total Write Requests")
3730 TotalWriteTransactionsPerformed = uint32("total_write_trans_performed", "Total Write Transactions Performed")
3731 TrackOnFlag                     = boolean8("track_on_flag", "Track On Flag")
3732 TransactionDiskSpace            = uint16("transaction_disk_space", "Transaction Disk Space")
3733 TransactionFATAllocations       = uint32("transaction_fat_allocations", "Transaction FAT Allocations")
3734 TransactionFileSizeChanges      = uint32("transaction_file_size_changes", "Transaction File Size Changes")
3735 TransactionFilesTruncated       = uint32("transaction_files_truncated", "Transaction Files Truncated")
3736 TransactionNumber               = uint32("transaction_number", "Transaction Number")
3737 TransactionTrackingEnabled      = uint8("transaction_tracking_enabled", "Transaction Tracking Enabled")
3738 TransactionTrackingFlag         = uint16("tts_flag", "Transaction Tracking Flag")
3739 TransactionTrackingSupported    = uint8("transaction_tracking_supported", "Transaction Tracking Supported")
3740 TransactionVolumeNumber         = uint16("transaction_volume_number", "Transaction Volume Number")
3741 TransportType                   = val_string8("transport_type", "Communications Type", [
3742         [ 0x01, "Internet Packet Exchange (IPX)" ],
3743         [ 0x05, "User Datagram Protocol (UDP)" ],
3744         [ 0x06, "Transmission Control Protocol (TCP)" ],
3745 ])
3746 TreeLength                      = uint32("tree_length", "Tree Length")
3747 TreeName                        = nstring32("tree_name", "Tree Name")
3748 TreeName.NWUnicode()
3749 TrusteeRights                   = bitfield16("trustee_rights_low", "Trustee Rights", [
3750         bf_boolean16(0x0001, "trustee_rights_read", "Read"),
3751         bf_boolean16(0x0002, "trustee_rights_write", "Write"),
3752         bf_boolean16(0x0004, "trustee_rights_open", "Open"),
3753         bf_boolean16(0x0008, "trustee_rights_create", "Create"),
3754         bf_boolean16(0x0010, "trustee_rights_del", "Delete"),
3755         bf_boolean16(0x0020, "trustee_rights_parent", "Parental"),
3756         bf_boolean16(0x0040, "trustee_rights_search", "Search"),
3757         bf_boolean16(0x0080, "trustee_rights_modify", "Modify"),
3758         bf_boolean16(0x0100, "trustee_rights_super", "Supervisor"),
3759 ])
3760 TTSLevel                        = uint8("tts_level", "TTS Level")
3761 TrusteeSetNumber                = uint8("trustee_set_number", "Trustee Set Number")
3762 TrusteeID                       = uint32("trustee_id_set", "Trustee ID")
3763 TrusteeID.Display("BASE_HEX")
3764 ttlCompBlks                     = uint32("ttl_comp_blks", "Total Compression Blocks")
3765 TtlDSDskSpaceAlloc              = uint32("ttl_ds_disk_space_alloc", "Total Streams Space Allocated")
3766 TtlEAs                          = uint32("ttl_eas", "Total EA's")
3767 TtlEAsDataSize                  = uint32("ttl_eas_data_size", "Total EA's Data Size")
3768 TtlEAsKeySize                   = uint32("ttl_eas_key_size", "Total EA's Key Size")
3769 ttlIntermediateBlks             = uint32("ttl_inter_blks", "Total Intermediate Blocks")
3770 TtlMigratedSize                 = uint32("ttl_migrated_size", "Total Migrated Size")
3771 TtlNumOfRTags                   = uint32("ttl_num_of_r_tags", "Total Number of Resource Tags")
3772 TtlNumOfSetCmds                 = uint32("ttl_num_of_set_cmds", "Total Number of Set Commands")
3773 TtlValuesLength                 = uint32("ttl_values_length", "Total Values Length")
3774 TtlWriteDataSize                = uint32("ttl_write_data_size", "Total Write Data Size")
3775 TurboUsedForFileService         = uint16("turbo_used_for_file_service", "Turbo Used For File Service")
3776
3777 UnclaimedPkts                   = uint32("un_claimed_packets", "Unclaimed Packets")
3778 UnCompressableDataStreamsCount  = uint32("un_compressable_data_streams_count", "Uncompressable Data Streams Count")
3779 Undefined8                      = bytes("undefined_8", "Undefined", 8)
3780 Undefined28                     = bytes("undefined_28", "Undefined", 28)
3781 UndefinedWord                   = uint16("undefined_word", "Undefined")
3782 UniqueID                        = uint8("unique_id", "Unique ID")
3783 UnknownByte                     = uint8("unknown_byte", "Unknown Byte")
3784 Unused                          = uint8("un_used", "Unused")
3785 UnusedBlocks                    = uint32("unused_blocks", "Unused Blocks")
3786 UnUsedDirectoryEntries          = uint32("un_used_directory_entries", "Unused Directory Entries")
3787 UnusedDiskBlocks                = uint32("unused_disk_blocks", "Unused Disk Blocks")
3788 UnUsedExtendedDirectoryExtants  = uint32("un_used_extended_directory_extants", "Unused Extended Directory Extants")
3789 UpdateDate                      = uint16("update_date", "Update Date")
3790 UpdateDate.NWDate()
3791 UpdateID                        = uint32("update_id", "Update ID", BE)
3792 UpdateID.Display("BASE_HEX")
3793 UpdateTime                      = uint16("update_time", "Update Time")
3794 UpdateTime.NWTime()
3795 UseCount                        = val_string16("user_info_use_count", "Use Count", [
3796         [ 0x0000, "Connection is not in use" ],
3797         [ 0x0001, "Connection is in use" ],
3798 ])
3799 UsedBlocks                      = uint32("used_blocks", "Used Blocks")
3800 UserID                          = uint32("user_id", "User ID", BE)
3801 UserID.Display("BASE_HEX")
3802 UserLoginAllowed                = val_string8("user_login_allowed", "Login Status", [
3803         [ 0x00, "Client Login Disabled" ],
3804         [ 0x01, "Client Login Enabled" ],
3805 ])
3806
3807 UserName                        = nstring8("user_name", "User Name")
3808 UserName16                      = fw_string("user_name_16", "User Name", 16)
3809 UserName48                      = fw_string("user_name_48", "User Name", 48)
3810 UserType                        = uint16("user_type", "User Type")
3811 UTCTimeInSeconds                = uint32("uts_time_in_seconds", "UTC Time in Seconds")
3812
3813 ValueAvailable                  = val_string8("value_available", "Value Available", [
3814         [ 0x00, "Has No Value" ],
3815         [ 0xff, "Has Value" ],
3816 ])
3817 VAPVersion                      = uint8("vap_version", "VAP Version")
3818 VariableBitMask                 = uint32("variable_bit_mask", "Variable Bit Mask")
3819 VariableBitsDefined             = uint16("variable_bits_defined", "Variable Bits Defined")
3820 VConsoleRevision                = uint8("vconsole_rev", "Console Revision")
3821 VConsoleVersion                 = uint8("vconsole_ver", "Console Version")
3822 Verb                            = uint32("verb", "Verb")
3823 VerbData                        = uint8("verb_data", "Verb Data")
3824 version                         = uint32("version", "Version")
3825 VersionNumber                   = uint8("version_number", "Version")
3826 VertLocation                    = uint16("vert_location", "Vertical Location")
3827 VirtualConsoleVersion           = uint8("virtual_console_version", "Virtual Console Version")
3828 VolumeID                        = uint32("volume_id", "Volume ID")
3829 VolumeID.Display("BASE_HEX")
3830 VolInfoReplyLen                 = uint16("vol_info_reply_len", "Volume Information Reply Length")
3831 VolumeCachedFlag                = val_string8("volume_cached_flag", "Volume Cached Flag", [
3832         [ 0x00, "Volume is Not Cached" ],
3833         [ 0xff, "Volume is Cached" ],
3834 ])      
3835 VolumeDataStreams               = uint8("volume_data_streams", "Volume Data Streams")
3836 VolumeHashedFlag                = val_string8("volume_hashed_flag", "Volume Hashed Flag", [
3837         [ 0x00, "Volume is Not Hashed" ],
3838         [ 0xff, "Volume is Hashed" ],
3839 ])      
3840 VolumeLastModifiedDate          = uint16("volume_last_modified_date", "Volume Last Modified Date")
3841 VolumeLastModifiedDate.NWDate()
3842 VolumeLastModifiedTime          = uint16("volume_last_modified_time", "Volume Last Modified Time") 
3843 VolumeLastModifiedTime.NWTime()
3844 VolumeMountedFlag               = val_string8("volume_mounted_flag", "Volume Mounted Flag", [
3845         [ 0x00, "Volume is Not Mounted" ],
3846         [ 0xff, "Volume is Mounted" ],
3847 ])
3848 VolumeName                      = fw_string("volume_name", "Volume Name", 16)
3849 VolumeNameLen                   = nstring8("volume_name_len", "Volume Name")
3850 VolumeNameSpaces                = uint8("volume_name_spaces", "Volume Name Spaces")
3851 VolumeNameStringz               = stringz("volume_name_stringz", "Volume Name")
3852 VolumeNumber                    = uint8("volume_number", "Volume Number")
3853 VolumeNumberLong                = uint32("volume_number_long", "Volume Number")
3854 VolumeRemovableFlag             = val_string8("volume_removable_flag", "Volume Removable Flag", [
3855         [ 0x00, "Disk Cannot be Removed from Server" ],
3856         [ 0xff, "Disk Can be Removed from Server" ],
3857 ])
3858 VolumeRequestFlags              = val_string16("volume_request_flags", "Volume Request Flags", [
3859         [ 0x0000, "Return name with volume number" ],
3860         [ 0x0001, "Do not return name with volume number" ],
3861 ])
3862 VolumeSizeInClusters            = uint32("volume_size_in_clusters", "Volume Size in Clusters")
3863 VolumesSupportedMax             = uint16("volumes_supported_max", "Volumes Supported Max")
3864 VolumeType                      = val_string16("volume_type", "Volume Type", [
3865         [ 0x0000, "NetWare 386" ],
3866         [ 0x0001, "NetWare 286" ],
3867         [ 0x0002, "NetWare 386 Version 30" ],
3868         [ 0x0003, "NetWare 386 Version 31" ],
3869 ])
3870 WastedServerMemory              = uint16("wasted_server_memory", "Wasted Server Memory", BE)
3871 WaitTime                        = uint32("wait_time", "Wait Time")
3872
3873 Year                            = val_string8("year", "Year",[
3874         [ 0x50, "1980" ],
3875         [ 0x51, "1981" ],
3876         [ 0x52, "1982" ],
3877         [ 0x53, "1983" ],
3878         [ 0x54, "1984" ],
3879         [ 0x55, "1985" ],
3880         [ 0x56, "1986" ],
3881         [ 0x57, "1987" ],
3882         [ 0x58, "1988" ],
3883         [ 0x59, "1989" ],
3884         [ 0x5a, "1990" ],
3885         [ 0x5b, "1991" ],
3886         [ 0x5c, "1992" ],
3887         [ 0x5d, "1993" ],
3888         [ 0x5e, "1994" ],
3889         [ 0x5f, "1995" ],
3890         [ 0x60, "1996" ],
3891         [ 0x61, "1997" ],
3892         [ 0x62, "1998" ],
3893         [ 0x63, "1999" ],
3894         [ 0x64, "2000" ],
3895         [ 0x65, "2001" ],
3896         [ 0x66, "2002" ],
3897         [ 0x67, "2003" ],
3898         [ 0x68, "2004" ],
3899         [ 0x69, "2005" ],
3900         [ 0x6a, "2006" ],
3901         [ 0x6b, "2007" ],
3902         [ 0x6c, "2008" ],
3903         [ 0x6d, "2009" ],
3904         [ 0x6e, "2010" ],
3905         [ 0x6f, "2011" ],
3906         [ 0x70, "2012" ],
3907         [ 0x71, "2013" ],
3908         [ 0x72, "2014" ],
3909         [ 0x73, "2015" ],
3910         [ 0x74, "2016" ],
3911         [ 0x75, "2017" ],
3912         [ 0x76, "2018" ],
3913         [ 0x77, "2019" ],
3914         [ 0x78, "2020" ],
3915         [ 0x79, "2021" ],
3916         [ 0x7a, "2022" ],
3917         [ 0x7b, "2023" ],
3918         [ 0x7c, "2024" ],
3919         [ 0x7d, "2025" ],
3920         [ 0x7e, "2026" ],
3921         [ 0x7f, "2027" ],
3922         [ 0xc0, "1984" ],
3923         [ 0xc1, "1985" ],
3924         [ 0xc2, "1986" ],
3925         [ 0xc3, "1987" ],
3926         [ 0xc4, "1988" ],
3927         [ 0xc5, "1989" ],
3928         [ 0xc6, "1990" ],
3929         [ 0xc7, "1991" ],
3930         [ 0xc8, "1992" ],
3931         [ 0xc9, "1993" ],
3932         [ 0xca, "1994" ],
3933         [ 0xcb, "1995" ],
3934         [ 0xcc, "1996" ],
3935         [ 0xcd, "1997" ],
3936         [ 0xce, "1998" ],
3937         [ 0xcf, "1999" ],
3938         [ 0xd0, "2000" ],
3939         [ 0xd1, "2001" ],
3940         [ 0xd2, "2002" ],
3941         [ 0xd3, "2003" ],
3942         [ 0xd4, "2004" ],
3943         [ 0xd5, "2005" ],
3944         [ 0xd6, "2006" ],
3945         [ 0xd7, "2007" ],
3946         [ 0xd8, "2008" ],
3947         [ 0xd9, "2009" ],
3948         [ 0xda, "2010" ],
3949         [ 0xdb, "2011" ],
3950         [ 0xdc, "2012" ],
3951         [ 0xdd, "2013" ],
3952         [ 0xde, "2014" ],
3953         [ 0xdf, "2015" ],
3954 ])
3955 ##############################################################################
3956 # Structs
3957 ##############################################################################
3958                 
3959                 
3960 acctngInfo                      = struct("acctng_info_struct", [
3961         HoldTime,
3962         HoldAmount,
3963         ChargeAmount,
3964         HeldConnectTimeInMinutes,
3965         HeldRequests,
3966         HeldBytesRead,
3967         HeldBytesWritten,
3968 ],"Accounting Information")
3969 AFP10Struct                       = struct("afp_10_struct", [
3970         AFPEntryID,
3971         ParentID,
3972         AttributesDef16,
3973         DataForkLen,
3974         ResourceForkLen,
3975         TotalOffspring,
3976         CreationDate,
3977         LastAccessedDate,
3978         ModifiedDate,
3979         ModifiedTime,
3980         ArchivedDate,
3981         ArchivedTime,
3982         CreatorID,
3983         Reserved4,
3984         FinderAttr,
3985         HorizLocation,
3986         VertLocation,
3987         FileDirWindow,
3988         Reserved16,
3989         LongName,
3990         CreatorID,
3991         ShortName,
3992         AccessPrivileges,
3993 ], "AFP Information" )                
3994 AFP20Struct                       = struct("afp_20_struct", [
3995         AFPEntryID,
3996         ParentID,
3997         AttributesDef16,
3998         DataForkLen,
3999         ResourceForkLen,
4000         TotalOffspring,
4001         CreationDate,
4002         LastAccessedDate,
4003         ModifiedDate,
4004         ModifiedTime,
4005         ArchivedDate,
4006         ArchivedTime,
4007         CreatorID,
4008         Reserved4,
4009         FinderAttr,
4010         HorizLocation,
4011         VertLocation,
4012         FileDirWindow,
4013         Reserved16,
4014         LongName,
4015         CreatorID,
4016         ShortName,
4017         AccessPrivileges,
4018         Reserved,
4019         ProDOSInfo,
4020 ], "AFP Information" )                
4021 ArchiveDateStruct               = struct("archive_date_struct", [
4022         ArchivedDate,
4023 ])                
4024 ArchiveIdStruct                 = struct("archive_id_struct", [
4025         ArchiverID,
4026 ])                
4027 ArchiveInfoStruct               = struct("archive_info_struct", [
4028         ArchivedTime,
4029         ArchivedDate,
4030         ArchiverID,
4031 ], "Archive Information")
4032 ArchiveTimeStruct               = struct("archive_time_struct", [
4033         ArchivedTime,
4034 ])                
4035 AttributesStruct                = struct("attributes_struct", [
4036         AttributesDef32,
4037         FlagsDef,
4038 ], "Attributes")
4039 authInfo                        = struct("auth_info_struct", [
4040         Status,
4041         Reserved2,
4042         Privileges,
4043 ])
4044 BoardNameStruct                 = struct("board_name_struct", [
4045         DriverBoardName,
4046         DriverShortName,
4047         DriverLogicalName,
4048 ], "Board Name")        
4049 CacheInfo                       = struct("cache_info", [
4050         uint32("max_byte_cnt", "Maximum Byte Count"),
4051         uint32("min_num_of_cache_buff", "Minimum Number Of Cache Buffers"),
4052         uint32("min_cache_report_thresh", "Minimum Cache Report Threshold"),
4053         uint32("alloc_waiting", "Allocate Waiting Count"),
4054         uint32("ndirty_blocks", "Number of Dirty Blocks"),
4055         uint32("cache_dirty_wait_time", "Cache Dirty Wait Time"),
4056         uint32("cache_max_concur_writes", "Cache Maximum Concurrent Writes"),
4057         uint32("max_dirty_time", "Maximum Dirty Time"),
4058         uint32("num_dir_cache_buff", "Number Of Directory Cache Buffers"),
4059         uint32("cache_byte_to_block", "Cache Byte To Block Shift Factor"),
4060 ], "Cache Information")
4061 CommonLanStruc                  = struct("common_lan_struct", [
4062         boolean8("not_supported_mask", "Bit Counter Supported"),
4063         Reserved3,
4064         uint32("total_tx_packet_count", "Total Transmit Packet Count"),
4065         uint32("total_rx_packet_count", "Total Receive Packet Count"),
4066         uint32("no_ecb_available_count", "No ECB Available Count"),
4067         uint32("packet_tx_too_big_count", "Transmit Packet Too Big Count"),
4068         uint32("packet_tx_too_small_count", "Transmit Packet Too Small Count"),
4069         uint32("packet_rx_overflow_count", "Receive Packet Overflow Count"),
4070         uint32("packet_rx_too_big_count", "Receive Packet Too Big Count"),
4071         uint32("packet_rs_too_small_count", "Receive Packet Too Small Count"),
4072         uint32("packet_tx_misc_error_count", "Transmit Packet Misc Error Count"),
4073         uint32("packet_rx_misc_error_count", "Receive Packet Misc Error Count"),
4074         uint32("retry_tx_count", "Transmit Retry Count"),
4075         uint32("checksum_error_count", "Checksum Error Count"),
4076         uint32("hardware_rx_mismatch_count", "Hardware Receive Mismatch Count"),
4077 ], "Common LAN Information")
4078 CompDeCompStat                  = struct("comp_d_comp_stat", [ 
4079         uint32("cmphitickhigh", "Compress High Tick"),        
4080         uint32("cmphitickcnt", "Compress High Tick Count"),        
4081         uint32("cmpbyteincount", "Compress Byte In Count"),        
4082         uint32("cmpbyteoutcnt", "Compress Byte Out Count"),        
4083         uint32("cmphibyteincnt", "Compress High Byte In Count"),        
4084         uint32("cmphibyteoutcnt", "Compress High Byte Out Count"),        
4085         uint32("decphitickhigh", "DeCompress High Tick"),        
4086         uint32("decphitickcnt", "DeCompress High Tick Count"),        
4087         uint32("decpbyteincount", "DeCompress Byte In Count"),        
4088         uint32("decpbyteoutcnt", "DeCompress Byte Out Count"),        
4089         uint32("decphibyteincnt", "DeCompress High Byte In Count"),        
4090         uint32("decphibyteoutcnt", "DeCompress High Byte Out Count"),
4091 ], "Compression/Decompression Information")                
4092 ConnFileStruct                  = struct("conn_file_struct", [
4093         ConnectionNumberWord,
4094         TaskNumByte,
4095         LockType,
4096         AccessControl,
4097         LockFlag,
4098 ], "File Connection Information")
4099 ConnStruct                      = struct("conn_struct", [
4100         TaskNumByte,
4101         LockType,
4102         AccessControl,
4103         LockFlag,
4104         VolumeNumber,
4105         DirectoryEntryNumberWord,
4106         FileName14,
4107 ], "Connection Information")
4108 ConnTaskStruct                  = struct("conn_task_struct", [
4109         ConnectionNumberByte,
4110         TaskNumByte,
4111 ], "Task Information")
4112 Counters                        = struct("counters_struct", [
4113         uint32("read_exist_blck", "Read Existing Block Count"),
4114         uint32("read_exist_write_wait", "Read Existing Write Wait Count"),
4115         uint32("read_exist_part_read", "Read Existing Partial Read Count"),
4116         uint32("read_exist_read_err", "Read Existing Read Error Count"),
4117         uint32("wrt_blck_cnt", "Write Block Count"),
4118         uint32("wrt_entire_blck", "Write Entire Block Count"),
4119         uint32("internl_dsk_get", "Internal Disk Get Count"),
4120         uint32("internl_dsk_get_need_to_alloc", "Internal Disk Get Need To Allocate Count"),
4121         uint32("internl_dsk_get_someone_beat", "Internal Disk Get Someone Beat My Count"),
4122         uint32("internl_dsk_get_part_read", "Internal Disk Get Partial Read Count"),
4123         uint32("internl_dsk_get_read_err", "Internal Disk Get Read Error Count"),
4124         uint32("async_internl_dsk_get", "Async Internal Disk Get Count"),
4125         uint32("async_internl_dsk_get_need_to_alloc", "Async Internal Disk Get Need To Alloc"),
4126         uint32("async_internl_dsk_get_someone_beat", "Async Internal Disk Get Someone Beat Me"),
4127         uint32("err_doing_async_read", "Error Doing Async Read Count"),
4128         uint32("internl_dsk_get_no_read", "Internal Disk Get No Read Count"),
4129         uint32("internl_dsk_get_no_read_alloc", "Internal Disk Get No Read Allocate Count"),
4130         uint32("internl_dsk_get_no_read_someone_beat", "Internal Disk Get No Read Someone Beat Me Count"),
4131         uint32("internl_dsk_write", "Internal Disk Write Count"),
4132         uint32("internl_dsk_write_alloc", "Internal Disk Write Allocate Count"),
4133         uint32("internl_dsk_write_someone_beat", "Internal Disk Write Someone Beat Me Count"),
4134         uint32("write_err", "Write Error Count"),
4135         uint32("wait_on_sema", "Wait On Semaphore Count"),
4136         uint32("alloc_blck_i_had_to_wait_for", "Allocate Block I Had To Wait For Someone Count"),
4137         uint32("alloc_blck", "Allocate Block Count"),
4138         uint32("alloc_blck_i_had_to_wait", "Allocate Block I Had To Wait Count"),
4139 ], "Disk Counter Information")
4140 CPUInformation                  = struct("cpu_information", [
4141         PageTableOwnerFlag,
4142         CPUType,
4143         Reserved3,
4144         CoprocessorFlag,
4145         BusType,
4146         Reserved3,
4147         IOEngineFlag,
4148         Reserved3,
4149         FSEngineFlag,
4150         Reserved3, 
4151         NonDedFlag,
4152         Reserved3,
4153         CPUString,
4154         CoProcessorString,
4155         BusString,
4156 ], "CPU Information")
4157 CreationDateStruct              = struct("creation_date_struct", [
4158         CreationDate,
4159 ])                
4160 CreationInfoStruct              = struct("creation_info_struct", [
4161         CreationTime,
4162         CreationDate,
4163         CreatorID,
4164 ], "Creation Information")
4165 CreationTimeStruct              = struct("creation_time_struct", [
4166         CreationTime,
4167 ])
4168 CustomCntsInfo                  = struct("custom_cnts_info", [
4169         CustomVariableValue,
4170         CustomString,
4171 ], "Custom Counters" )        
4172 DataStreamInfo                  = struct("data_stream_info", [
4173         AssociatedNameSpace,
4174         DataStreamName
4175 ])
4176 DataStreamSizeStruct            = struct("data_stream_size_struct", [
4177         DataStreamSize,
4178 ])
4179 DirCacheInfo                    = struct("dir_cache_info", [
4180         uint32("min_time_since_file_delete", "Minimum Time Since File Delete"),
4181         uint32("abs_min_time_since_file_delete", "Absolute Minimum Time Since File Delete"),
4182         uint32("min_num_of_dir_cache_buff", "Minimum Number Of Directory Cache Buffers"),
4183         uint32("max_num_of_dir_cache_buff", "Maximum Number Of Directory Cache Buffers"),
4184         uint32("num_of_dir_cache_buff", "Number Of Directory Cache Buffers"),
4185         uint32("dc_min_non_ref_time", "DC Minimum Non-Referenced Time"),
4186         uint32("dc_wait_time_before_new_buff", "DC Wait Time Before New Buffer"),
4187         uint32("dc_max_concurrent_writes", "DC Maximum Concurrent Writes"),
4188         uint32("dc_dirty_wait_time", "DC Dirty Wait Time"),
4189         uint32("dc_double_read_flag", "DC Double Read Flag"),
4190         uint32("map_hash_node_count", "Map Hash Node Count"),
4191         uint32("space_restriction_node_count", "Space Restriction Node Count"),
4192         uint32("trustee_list_node_count", "Trustee List Node Count"),
4193         uint32("percent_of_vol_used_by_dirs", "Percent Of Volume Used By Directories"),
4194 ], "Directory Cache Information")
4195 DirEntryStruct                  = struct("dir_entry_struct", [
4196         DirectoryEntryNumber,
4197         DOSDirectoryEntryNumber,
4198         VolumeNumberLong,
4199 ], "Directory Entry Information")
4200 DirectoryInstance               = struct("directory_instance", [
4201         SearchSequenceWord,
4202         DirectoryID,
4203         DirectoryName14,
4204         DirectoryAttributes,
4205         DirectoryAccessRights,
4206         endian(CreationDate, BE),
4207         endian(AccessDate, BE),
4208         CreatorID,
4209         Reserved2,
4210         DirectoryStamp,
4211 ], "Directory Information")
4212 DMInfoLevel0                    = struct("dm_info_level_0", [
4213         uint32("io_flag", "IO Flag"),
4214         uint32("sm_info_size", "Storage Module Information Size"),
4215         uint32("avail_space", "Available Space"),
4216         uint32("used_space", "Used Space"),
4217         stringz("s_module_name", "Storage Module Name"),
4218         uint8("s_m_info", "Storage Media Information"),
4219 ])
4220 DMInfoLevel1                    = struct("dm_info_level_1", [
4221         NumberOfSMs,
4222         SMIDs,
4223 ])
4224 DMInfoLevel2                    = struct("dm_info_level_2", [
4225         Name,
4226 ])
4227 DOSDirectoryEntryStruct         = struct("dos_directory_entry_struct", [
4228         AttributesDef32,
4229         UniqueID,
4230         PurgeFlags,
4231         DestNameSpace,
4232         DirectoryNameLen,
4233         DirectoryName,
4234         CreationTime,
4235         CreationDate,
4236         CreatorID,
4237         ArchivedTime,
4238         ArchivedDate,
4239         ArchiverID,
4240         UpdateTime,
4241         UpdateDate,
4242         NextTrusteeEntry,
4243         Reserved48,
4244         InheritedRightsMask,
4245 ], "DOS Directory Information")
4246 DOSFileEntryStruct              = struct("dos_file_entry_struct", [
4247         AttributesDef32,
4248         UniqueID,
4249         PurgeFlags,
4250         DestNameSpace,
4251         NameLen,
4252         Name12,
4253         CreationTime,
4254         CreationDate,
4255         CreatorID,
4256         ArchivedTime,
4257         ArchivedDate,
4258         ArchiverID,
4259         UpdateTime,
4260         UpdateDate,
4261         UpdateID,
4262         FileSize,
4263         DataForkFirstFAT,
4264         NextTrusteeEntry,
4265         Reserved36,
4266         InheritedRightsMask,
4267         LastAccessedDate,
4268         Reserved28,
4269         PrimaryEntry,
4270         NameList,
4271 ], "DOS File Information")
4272 DSSpaceAllocateStruct           = struct("ds_space_alloc_struct", [
4273         DataStreamSpaceAlloc,
4274 ])
4275 DynMemStruct                    = struct("dyn_mem_struct", [
4276         uint32("dyn_mem_struct_total", "Total Dynamic Space" ),
4277         uint32("dyn_mem_struct_max", "Max Used Dynamic Space" ),
4278         uint32("dyn_mem_struct_cur", "Current Used Dynamic Space" ),
4279 ], "Dynamic Memory Information")
4280 EAInfoStruct                    = struct("ea_info_struct", [
4281         EADataSize,
4282         EACount,
4283         EAKeySize,
4284 ], "Extended Attribute Information")
4285 ExtraCacheCntrs                 = struct("extra_cache_cntrs", [
4286         uint32("internl_dsk_get_no_wait", "Internal Disk Get No Wait Count"),
4287         uint32("internl_dsk_get_no_wait_need", "Internal Disk Get No Wait Need To Allocate Count"),
4288         uint32("internl_dsk_get_no_wait_no_blk", "Internal Disk Get No Wait No Block Count"),
4289         uint32("id_get_no_read_no_wait", "ID Get No Read No Wait Count"),
4290         uint32("id_get_no_read_no_wait_sema", "ID Get No Read No Wait Semaphored Count"),
4291         uint32("id_get_no_read_no_wait_buffer", "ID Get No Read No Wait No Buffer Count"),
4292         uint32("id_get_no_read_no_wait_alloc", "ID Get No Read No Wait Allocate Count"),
4293         uint32("id_get_no_read_no_wait_no_alloc", "ID Get No Read No Wait No Alloc Count"),
4294         uint32("id_get_no_read_no_wait_no_alloc_sema", "ID Get No Read No Wait No Alloc Semaphored Count"),
4295         uint32("id_get_no_read_no_wait_no_alloc_alloc", "ID Get No Read No Wait No Alloc Allocate Count"),
4296 ], "Extra Cache Counters Information")
4297
4298
4299 ReferenceIDStruct               = struct("ref_id_struct", [
4300         CurrentReferenceID,
4301 ])
4302 NSAttributeStruct               = struct("ns_attrib_struct", [
4303         AttributesDef32,
4304 ])
4305 DStreamActual                   = struct("d_stream_actual", [
4306         Reserved12,
4307         # Need to look into how to format this correctly
4308 ])
4309 DStreamLogical                  = struct("d_string_logical", [
4310         Reserved12,
4311         # Need to look into how to format this correctly
4312 ])
4313 LastUpdatedInSecondsStruct      = struct("last_update_in_seconds_struct", [
4314         SecondsRelativeToTheYear2000,
4315 ]) 
4316 DOSNameStruct                   = struct("dos_name_struct", [
4317         FileName,
4318 ], "DOS File Name") 
4319 FlushTimeStruct                 = struct("flush_time_struct", [
4320         FlushTime,
4321 ]) 
4322 ParentBaseIDStruct              = struct("parent_base_id_struct", [
4323         ParentBaseID,
4324 ]) 
4325 MacFinderInfoStruct             = struct("mac_finder_info_struct", [
4326         MacFinderInfo,
4327 ]) 
4328 SiblingCountStruct              = struct("sibling_count_struct", [
4329         SiblingCount,
4330 ]) 
4331 EffectiveRightsStruct           = struct("eff_rights_struct", [
4332         EffectiveRights,
4333         Reserved3,     
4334 ]) 
4335 MacTimeStruct                   = struct("mac_time_struct", [
4336         MACCreateDate,
4337         MACCreateTime,
4338         MACBackupDate,
4339         MACBackupTime,
4340 ])
4341 LastAccessedTimeStruct          = struct("last_access_time_struct", [
4342         LastAccessedTime,      
4343 ])
4344
4345
4346
4347 FileAttributesStruct            = struct("file_attributes_struct", [
4348         AttributesDef32,
4349 ])
4350 FileInfoStruct                  = struct("file_info_struct", [
4351         ParentID,
4352         DirectoryEntryNumber,
4353         TotalBlocksToDecompress,
4354         CurrentBlockBeingDecompressed,
4355 ], "File Information")
4356 FileInstance                    = struct("file_instance", [
4357         SearchSequenceWord,
4358         DirectoryID,
4359         FileName14,
4360         AttributesDef,
4361         FileMode,
4362         FileSize,
4363         endian(CreationDate, BE),
4364         endian(AccessDate, BE),
4365         endian(UpdateDate, BE),
4366         endian(UpdateTime, BE),
4367 ], "File Instance")
4368 FileNameStruct                  = struct("file_name_struct", [
4369         FileName,
4370 ], "File Name")       
4371 FileServerCounters              = struct("file_server_counters", [
4372         uint16("too_many_hops", "Too Many Hops"),
4373         uint16("unknown_network", "Unknown Network"),
4374         uint16("no_space_for_service", "No Space For Service"),
4375         uint16("no_receive_buff", "No Receive Buffers"),
4376         uint16("not_my_network", "Not My Network"),
4377         uint32("netbios_progated", "NetBIOS Propagated Count"),
4378         uint32("ttl_pckts_srvcd", "Total Packets Serviced"),
4379         uint32("ttl_pckts_routed", "Total Packets Routed"),
4380 ], "File Server Counters")
4381 FileSystemInfo                  = struct("file_system_info", [
4382         uint32("fat_moved", "Number of times the OS has move the location of FAT"),
4383         uint32("fat_write_err", "Number of write errors in both original and mirrored copies of FAT"),
4384         uint32("someone_else_did_it_0", "Someone Else Did It Count 0"),
4385         uint32("someone_else_did_it_1", "Someone Else Did It Count 1"),
4386         uint32("someone_else_did_it_2", "Someone Else Did It Count 2"),
4387         uint32("i_ran_out_someone_else_did_it_0", "I Ran Out Someone Else Did It Count 0"),
4388         uint32("i_ran_out_someone_else_did_it_1", "I Ran Out Someone Else Did It Count 1"),
4389         uint32("i_ran_out_someone_else_did_it_2", "I Ran Out Someone Else Did It Count 2"),
4390         uint32("turbo_fat_build_failed", "Turbo FAT Build Failed Count"),
4391         uint32("extra_use_count_node_count", "Errors allocating a use count node for TTS"),
4392         uint32("extra_extra_use_count_node_count", "Errors allocating an additional use count node for TTS"),
4393         uint32("error_read_last_fat", "Error Reading Last FAT Count"),
4394         uint32("someone_else_using_this_file", "Someone Else Using This File Count"),
4395 ], "File System Information")
4396 GenericInfoDef                  = struct("generic_info_def", [
4397         fw_string("generic_label", "Label", 64),
4398         uint32("generic_ident_type", "Identification Type"),
4399         uint32("generic_ident_time", "Identification Time"),
4400         uint32("generic_media_type", "Media Type"),
4401         uint32("generic_cartridge_type", "Cartridge Type"),
4402         uint32("generic_unit_size", "Unit Size"),
4403         uint32("generic_block_size", "Block Size"),
4404         uint32("generic_capacity", "Capacity"),
4405         uint32("generic_pref_unit_size", "Preferred Unit Size"),
4406         fw_string("generic_name", "Name",64),
4407         uint32("generic_type", "Type"),
4408         uint32("generic_status", "Status"),
4409         uint32("generic_func_mask", "Function Mask"),
4410         uint32("generic_ctl_mask", "Control Mask"),
4411         uint32("generic_parent_count", "Parent Count"),
4412         uint32("generic_sib_count", "Sibling Count"),
4413         uint32("generic_child_count", "Child Count"),
4414         uint32("generic_spec_info_sz", "Specific Information Size"),
4415         uint32("generic_object_uniq_id", "Unique Object ID"),
4416         uint32("generic_media_slot", "Media Slot"),
4417 ], "Generic Information")
4418 HandleInfoLevel0                = struct("handle_info_level_0", [
4419 #        DataStream,
4420 ])
4421 HandleInfoLevel1                = struct("handle_info_level_1", [
4422         DataStream,
4423 ])        
4424 HandleInfoLevel2                = struct("handle_info_level_2", [
4425         DOSDirectoryBase,
4426         NameSpace,
4427         DataStream,
4428 ])        
4429 HandleInfoLevel3                = struct("handle_info_level_3", [
4430         DOSDirectoryBase,
4431         NameSpace,
4432 ])        
4433 HandleInfoLevel4                = struct("handle_info_level_4", [
4434         DOSDirectoryBase,
4435         NameSpace,
4436         ParentDirectoryBase,
4437         ParentDOSDirectoryBase,
4438 ])        
4439 HandleInfoLevel5                = struct("handle_info_level_5", [
4440         DOSDirectoryBase,
4441         NameSpace,
4442         DataStream,
4443         ParentDirectoryBase,
4444         ParentDOSDirectoryBase,
4445 ])        
4446 IPXInformation                  = struct("ipx_information", [
4447         uint32("ipx_send_pkt", "IPX Send Packet Count"),
4448         uint16("ipx_malform_pkt", "IPX Malformed Packet Count"),
4449         uint32("ipx_get_ecb_req", "IPX Get ECB Request Count"),
4450         uint32("ipx_get_ecb_fail", "IPX Get ECB Fail Count"),
4451         uint32("ipx_aes_event", "IPX AES Event Count"),
4452         uint16("ipx_postponed_aes", "IPX Postponed AES Count"),
4453         uint16("ipx_max_conf_sock", "IPX Max Configured Socket Count"),
4454         uint16("ipx_max_open_sock", "IPX Max Open Socket Count"),
4455         uint16("ipx_open_sock_fail", "IPX Open Socket Fail Count"),
4456         uint32("ipx_listen_ecb", "IPX Listen ECB Count"),
4457         uint16("ipx_ecb_cancel_fail", "IPX ECB Cancel Fail Count"),
4458         uint16("ipx_get_lcl_targ_fail", "IPX Get Local Target Fail Count"),
4459 ], "IPX Information")
4460 JobEntryTime                    = struct("job_entry_time", [
4461         Year,
4462         Month,
4463         Day,
4464         Hour,
4465         Minute,
4466         Second,
4467 ], "Job Entry Time")
4468 JobStruct                       = struct("job_struct", [
4469         ClientStation,
4470         ClientTaskNumber,
4471         ClientIDNumber,
4472         TargetServerIDNumber,
4473         TargetExecutionTime,
4474         JobEntryTime,
4475         JobNumber,
4476         JobType,
4477         JobPosition,
4478         JobControlFlags,
4479         JobFileName,
4480         JobFileHandle,
4481         ServerStation,
4482         ServerTaskNumber,
4483         ServerID,
4484         TextJobDescription,
4485         ClientRecordArea,
4486 ], "Job Information")
4487 JobStructNew                    = struct("job_struct_new", [
4488         RecordInUseFlag,
4489         PreviousRecord,
4490         NextRecord,
4491         ClientStationLong,
4492         ClientTaskNumberLong,
4493         ClientIDNumber,
4494         TargetServerIDNumber,
4495         TargetExecutionTime,
4496         JobEntryTime,
4497         JobNumberLong,
4498         JobType,
4499         JobPositionWord,
4500         JobControlFlagsWord,
4501         JobFileName,
4502         JobFileHandleLong,
4503         ServerStationLong,
4504         ServerTaskNumberLong,
4505         ServerID,
4506 ], "Job Information")                
4507 KnownRoutes                     = struct("known_routes", [
4508         NetIDNumber,
4509         HopsToNet,
4510         NetStatus,
4511         TimeToNet,
4512 ], "Known Routes")
4513 KnownServStruc                  = struct("known_server_struct", [
4514         ServerAddress,
4515         HopsToNet,
4516         ServerNameStringz,
4517 ], "Known Servers")                
4518 LANConfigInfo                   = struct("lan_cfg_info", [
4519         LANdriverCFG_MajorVersion,
4520         LANdriverCFG_MinorVersion,
4521         LANdriverNodeAddress,
4522         Reserved,
4523         LANdriverModeFlags,
4524         LANdriverBoardNumber,
4525         LANdriverBoardInstance,
4526         LANdriverMaximumSize,
4527         LANdriverMaxRecvSize,
4528         LANdriverRecvSize,
4529         LANdriverCardID,
4530         LANdriverMediaID,
4531         LANdriverTransportTime,
4532         LANdriverSrcRouting,
4533         LANdriverLineSpeed,
4534         LANdriverReserved,
4535         LANdriverMajorVersion,
4536         LANdriverMinorVersion,
4537         LANdriverFlags,
4538         LANdriverSendRetries,
4539         LANdriverLink,
4540         LANdriverSharingFlags,
4541         LANdriverSlot,
4542         LANdriverIOPortsAndRanges1,
4543         LANdriverIOPortsAndRanges2,
4544         LANdriverIOPortsAndRanges3,
4545         LANdriverIOPortsAndRanges4,
4546         LANdriverMemoryDecode0,
4547         LANdriverMemoryLength0,
4548         LANdriverMemoryDecode1,
4549         LANdriverMemoryLength1,
4550         LANdriverInterrupt1,
4551         LANdriverInterrupt2,
4552         LANdriverDMAUsage1,
4553         LANdriverDMAUsage2,
4554         LANdriverLogicalName,
4555         LANdriverIOReserved,
4556         LANdriverCardName,
4557 ], "LAN Configuration Information")
4558 LastAccessStruct                = struct("last_access_struct", [
4559         LastAccessedDate,
4560 ])
4561 lockInfo                        = struct("lock_info_struct", [
4562         LogicalLockThreshold,
4563         PhysicalLockThreshold,
4564         FileLockCount,
4565         RecordLockCount,
4566 ], "Lock Information")
4567 LockStruct                      = struct("lock_struct", [
4568         TaskNumByte,
4569         LockType,
4570         RecordStart,
4571         RecordEnd,
4572 ], "Locks")
4573 LoginTime                       = struct("login_time", [
4574         Year,
4575         Month,
4576         Day,
4577         Hour,
4578         Minute,
4579         Second,
4580         DayOfWeek,
4581 ], "Login Time")
4582 LogLockStruct                   = struct("log_lock_struct", [
4583         TaskNumByte,
4584         LockStatus,
4585         LockName,
4586 ], "Logical Locks")
4587 LogRecStruct                    = struct("log_rec_struct", [
4588         ConnectionNumberWord,
4589         TaskNumByte,
4590         LockStatus,
4591 ], "Logical Record Locks")
4592 LSLInformation                  = struct("lsl_information", [
4593         uint32("rx_buffers", "Receive Buffers"),
4594         uint32("rx_buffers_75", "Receive Buffers Warning Level"),
4595         uint32("rx_buffers_checked_out", "Receive Buffers Checked Out Count"),
4596         uint32("rx_buffer_size", "Receive Buffer Size"),
4597         uint32("max_phy_packet_size", "Maximum Physical Packet Size"),
4598         uint32("last_time_rx_buff_was_alloc", "Last Time a Receive Buffer was Allocated"),
4599         uint32("max_num_of_protocols", "Maximum Number of Protocols"),
4600         uint32("max_num_of_media_types", "Maximum Number of Media Types"),
4601         uint32("total_tx_packets", "Total Transmit Packets"),
4602         uint32("get_ecb_buf", "Get ECB Buffers"),
4603         uint32("get_ecb_fails", "Get ECB Failures"),
4604         uint32("aes_event_count", "AES Event Count"),
4605         uint32("post_poned_events", "Postponed Events"),
4606         uint32("ecb_cxl_fails", "ECB Cancel Failures"),
4607         uint32("valid_bfrs_reused", "Valid Buffers Reused"),
4608         uint32("enqueued_send_cnt", "Enqueued Send Count"),
4609         uint32("total_rx_packets", "Total Receive Packets"),
4610         uint32("unclaimed_packets", "Unclaimed Packets"),
4611         uint8("stat_table_major_version", "Statistics Table Major Version"),
4612         uint8("stat_table_minor_version", "Statistics Table Minor Version"),
4613 ], "LSL Information")
4614 MaximumSpaceStruct              = struct("max_space_struct", [
4615         MaxSpace,
4616 ])
4617 MemoryCounters                  = struct("memory_counters", [
4618         uint32("orig_num_cache_buff", "Original Number Of Cache Buffers"),
4619         uint32("curr_num_cache_buff", "Current Number Of Cache Buffers"),
4620         uint32("cache_dirty_block_thresh", "Cache Dirty Block Threshold"),
4621         uint32("wait_node", "Wait Node Count"),
4622         uint32("wait_node_alloc_fail", "Wait Node Alloc Failure Count"),
4623         uint32("move_cache_node", "Move Cache Node Count"),
4624         uint32("move_cache_node_from_avai", "Move Cache Node From Avail Count"),
4625         uint32("accel_cache_node_write", "Accelerate Cache Node Write Count"),
4626         uint32("rem_cache_node", "Remove Cache Node Count"),
4627         uint32("rem_cache_node_from_avail", "Remove Cache Node From Avail Count"),
4628 ], "Memory Counters")
4629 MLIDBoardInfo                   = struct("mlid_board_info", [           
4630         uint32("protocol_board_num", "Protocol Board Number"),
4631         uint16("protocol_number", "Protocol Number"),
4632         bytes("protocol_id", "Protocol ID", 6),
4633         nstring8("protocol_name", "Protocol Name"),
4634 ], "MLID Board Information")        
4635 ModifyInfoStruct                = struct("modify_info_struct", [
4636         ModifiedTime,
4637         ModifiedDate,
4638         ModifierID,
4639         LastAccessedDate,
4640 ], "Modification Information")
4641 nameInfo                        = struct("name_info_struct", [
4642         ObjectType,
4643         nstring8("login_name", "Login Name"),
4644 ], "Name Information")
4645 NCPNetworkAddress               = struct("ncp_network_address_struct", [
4646         TransportType,
4647         Reserved3,
4648         NetAddress,
4649 ], "Network Address")
4650
4651 netAddr                         = struct("net_addr_struct", [
4652         TransportType,
4653         nbytes32("transport_addr", "Transport Address"),
4654 ], "Network Address")
4655
4656 NetWareInformationStruct        = struct("netware_information_struct", [
4657         DataStreamSpaceAlloc,           # (Data Stream Alloc Bit)
4658         AttributesDef32,                # (Attributes Bit)
4659         FlagsDef,
4660         DataStreamSize,                 # (Data Stream Size Bit)
4661         TotalDataStreamDiskSpaceAlloc,  # (Total Stream Size Bit)
4662         NumberOfDataStreams,
4663         CreationTime,                   # (Creation Bit)
4664         CreationDate,
4665         CreatorID,
4666         ModifiedTime,                   # (Modify Bit)
4667         ModifiedDate,
4668         ModifierID,
4669         LastAccessedDate,
4670         ArchivedTime,                   # (Archive Bit)
4671         ArchivedDate,
4672         ArchiverID,
4673         InheritedRightsMask,            # (Rights Bit)
4674         DirectoryEntryNumber,           # (Directory Entry Bit)
4675         DOSDirectoryEntryNumber,
4676         VolumeNumberLong,
4677         EADataSize,                     # (Extended Attribute Bit)
4678         EACount,
4679         EAKeySize,
4680         CreatorNameSpaceNumber,         # (Name Space Bit)
4681         Reserved3,
4682 ], "NetWare Information")
4683 NLMInformation                  = struct("nlm_information", [
4684         IdentificationNumber,
4685         NLMFlags,
4686         Reserved3,
4687         NLMType,
4688         Reserved3,
4689         ParentID,
4690         MajorVersion,
4691         MinorVersion,
4692         Revision,
4693         Year,
4694         Reserved3,
4695         Month,
4696         Reserved3,
4697         Day,
4698         Reserved3,
4699         AllocAvailByte,
4700         AllocFreeCount,
4701         LastGarbCollect,
4702         MessageLanguage,
4703         NumberOfReferencedPublics,
4704 ], "NLM Information")
4705 NSInfoStruct                    = struct("ns_info_struct", [
4706         NameSpace,
4707         Reserved3,
4708 ])
4709 NWAuditStatus                   = struct("nw_audit_status", [
4710         AuditVersionDate,
4711         AuditFileVersionDate,
4712         val_string16("audit_enable_flag", "Auditing Enabled Flag", [
4713                 [ 0x0000, "Auditing Disabled" ],
4714                 [ 0x0100, "Auditing Enabled" ],
4715         ]),
4716         Reserved2,
4717         uint32("audit_file_size", "Audit File Size"),
4718         uint32("modified_counter", "Modified Counter"),
4719         uint32("audit_file_max_size", "Audit File Maximum Size"),
4720         uint32("audit_file_size_threshold", "Audit File Size Threshold"),
4721         uint32("audit_record_count", "Audit Record Count"),
4722         uint32("auditing_flags", "Auditing Flags"),
4723 ], "NetWare Audit Status")
4724 ObjectSecurityStruct            = struct("object_security_struct", [
4725         ObjectSecurity,
4726 ])
4727 ObjectFlagsStruct               = struct("object_flags_struct", [
4728         ObjectFlags,
4729 ])
4730 ObjectTypeStruct                = struct("object_type_struct", [
4731         ObjectType,
4732         Reserved2,
4733 ])
4734 ObjectNameStruct                = struct("object_name_struct", [
4735         ObjectNameStringz,
4736 ])
4737 ObjectIDStruct                  = struct("object_id_struct", [
4738         ObjectID, 
4739         Restriction,
4740 ])
4741 OpnFilesStruct                  = struct("opn_files_struct", [
4742         TaskNumberWord,
4743         LockType,
4744         AccessControl,
4745         LockFlag,
4746         VolumeNumber,
4747         DOSParentDirectoryEntry,
4748         DOSDirectoryEntry,
4749         ForkCount,
4750         NameSpace,
4751         FileName,
4752 ], "Open Files Information")
4753 OwnerIDStruct                   = struct("owner_id_struct", [
4754         CreatorID,
4755 ])                
4756 PacketBurstInformation          = struct("packet_burst_information", [
4757         uint32("big_invalid_slot", "Big Invalid Slot Count"),
4758         uint32("big_forged_packet", "Big Forged Packet Count"),
4759         uint32("big_invalid_packet", "Big Invalid Packet Count"),
4760         uint32("big_still_transmitting", "Big Still Transmitting Count"),
4761         uint32("still_doing_the_last_req", "Still Doing The Last Request Count"),
4762         uint32("invalid_control_req", "Invalid Control Request Count"),
4763         uint32("control_invalid_message_number", "Control Invalid Message Number Count"),
4764         uint32("control_being_torn_down", "Control Being Torn Down Count"),
4765         uint32("big_repeat_the_file_read", "Big Repeat the File Read Count"),
4766         uint32("big_send_extra_cc_count", "Big Send Extra CC Count"),
4767         uint32("big_return_abort_mess", "Big Return Abort Message Count"),
4768         uint32("big_read_invalid_mess", "Big Read Invalid Message Number Count"),
4769         uint32("big_read_do_it_over", "Big Read Do It Over Count"),
4770         uint32("big_read_being_torn_down", "Big Read Being Torn Down Count"),
4771         uint32("previous_control_packet", "Previous Control Packet Count"),
4772         uint32("send_hold_off_message", "Send Hold Off Message Count"),
4773         uint32("big_read_no_data_avail", "Big Read No Data Available Count"),
4774         uint32("big_read_trying_to_read", "Big Read Trying To Read Too Much Count"),
4775         uint32("async_read_error", "Async Read Error Count"),
4776         uint32("big_read_phy_read_err", "Big Read Physical Read Error Count"),
4777         uint32("ctl_bad_ack_frag_list", "Control Bad ACK Fragment List Count"),
4778         uint32("ctl_no_data_read", "Control No Data Read Count"),
4779         uint32("write_dup_req", "Write Duplicate Request Count"),
4780         uint32("shouldnt_be_ack_here", "Shouldn't Be ACKing Here Count"),
4781         uint32("write_incon_packet_len", "Write Inconsistent Packet Lengths Count"),
4782         uint32("first_packet_isnt_a_write", "First Packet Isn't A Write Count"),
4783         uint32("write_trash_dup_req", "Write Trashed Duplicate Request Count"),
4784         uint32("big_write_inv_message_num", "Big Write Invalid Message Number Count"),
4785         uint32("big_write_being_torn_down", "Big Write Being Torn Down Count"),
4786         uint32("big_write_being_abort", "Big Write Being Aborted Count"),
4787         uint32("zero_ack_frag", "Zero ACK Fragment Count"),
4788         uint32("write_curr_trans", "Write Currently Transmitting Count"),
4789         uint32("try_to_write_too_much", "Trying To Write Too Much Count"),
4790         uint32("write_out_of_mem_for_ctl_nodes", "Write Out Of Memory For Control Nodes Count"),
4791         uint32("write_didnt_need_this_frag", "Write Didn't Need This Fragment Count"),
4792         uint32("write_too_many_buf_check", "Write Too Many Buffers Checked Out Count"),
4793         uint32("write_timeout", "Write Time Out Count"),
4794         uint32("write_got_an_ack0", "Write Got An ACK Count 0"),
4795         uint32("write_got_an_ack1", "Write Got An ACK Count 1"),
4796         uint32("poll_abort_conn", "Poller Aborted The Connnection Count"),
4797         uint32("may_had_out_of_order", "Maybe Had Out Of Order Writes Count"),
4798         uint32("had_an_out_of_order", "Had An Out Of Order Write Count"),
4799         uint32("moved_the_ack_bit_dn", "Moved The ACK Bit Down Count"),
4800         uint32("bumped_out_of_order", "Bumped Out Of Order Write Count"),
4801         uint32("poll_rem_old_out_of_order", "Poller Removed Old Out Of Order Count"),
4802         uint32("write_didnt_need_but_req_ack", "Write Didn't Need But Requested ACK Count"),
4803         uint32("write_trash_packet", "Write Trashed Packet Count"),
4804         uint32("too_many_ack_frag", "Too Many ACK Fragments Count"),
4805         uint32("saved_an_out_of_order_packet", "Saved An Out Of Order Packet Count"),
4806         uint32("conn_being_aborted", "Connection Being Aborted Count"),
4807 ], "Packet Burst Information")
4808
4809 PadDSSpaceAllocate              = struct("pad_ds_space_alloc", [
4810     Reserved4,
4811 ])
4812 PadAttributes                   = struct("pad_attributes", [
4813     Reserved6,
4814 ])
4815 PadDataStreamSize               = struct("pad_data_stream_size", [
4816     Reserved4,
4817 ])    
4818 PadTotalStreamSize              = struct("pad_total_stream_size", [
4819     Reserved6,
4820 ])
4821 PadCreationInfo                 = struct("pad_creation_info", [
4822     Reserved8,
4823 ])
4824 PadModifyInfo                   = struct("pad_modify_info", [
4825     Reserved10,
4826 ])
4827 PadArchiveInfo                  = struct("pad_archive_info", [
4828     Reserved8,
4829 ])
4830 PadRightsInfo                   = struct("pad_rights_info", [
4831     Reserved2,
4832 ])
4833 PadDirEntry                     = struct("pad_dir_entry", [
4834     Reserved12,
4835 ])
4836 PadEAInfo                       = struct("pad_ea_info", [
4837     Reserved12,
4838 ])
4839 PadNSInfo                       = struct("pad_ns_info", [
4840     Reserved4,
4841 ])
4842 PhyLockStruct                   = struct("phy_lock_struct", [
4843         LoggedCount,
4844         ShareableLockCount,
4845         RecordStart,
4846         RecordEnd,
4847         LogicalConnectionNumber,
4848         TaskNumByte,
4849         LockType,
4850 ], "Physical Locks")
4851 printInfo                       = struct("print_info_struct", [
4852         PrintFlags,
4853         TabSize,
4854         Copies,
4855         PrintToFileFlag,
4856         BannerName,
4857         TargetPrinter,
4858         FormType,
4859 ], "Print Information")
4860 RightsInfoStruct                = struct("rights_info_struct", [
4861         InheritedRightsMask,
4862 ])
4863 RoutersInfo                     = struct("routers_info", [
4864         bytes("node", "Node", 6),
4865         ConnectedLAN,
4866         uint16("route_hops", "Hop Count"),
4867         uint16("route_time", "Route Time"),
4868 ], "Router Information")        
4869 RTagStructure                   = struct("r_tag_struct", [
4870         RTagNumber,
4871         ResourceSignature,
4872         ResourceCount,
4873         ResourceName,
4874 ], "Resource Tag")
4875 ScanInfoFileName                = struct("scan_info_file_name", [
4876         SalvageableFileEntryNumber,
4877         FileName,
4878 ])
4879 ScanInfoFileNoName              = struct("scan_info_file_no_name", [
4880         SalvageableFileEntryNumber,        
4881 ])        
4882 Segments                        = struct("segments", [
4883         uint32("volume_segment_dev_num", "Volume Segment Device Number"),
4884         uint32("volume_segment_offset", "Volume Segment Offset"),
4885         uint32("volume_segment_size", "Volume Segment Size"),
4886 ], "Volume Segment Information")            
4887 SemaInfoStruct                  = struct("sema_info_struct", [
4888         LogicalConnectionNumber,
4889         TaskNumByte,
4890 ])
4891 SemaStruct                      = struct("sema_struct", [
4892         OpenCount,
4893         SemaphoreValue,
4894         TaskNumByte,
4895         SemaphoreName,
4896 ], "Semaphore Information")
4897 ServerInfo                      = struct("server_info", [
4898         uint32("reply_canceled", "Reply Canceled Count"),
4899         uint32("write_held_off", "Write Held Off Count"),
4900         uint32("write_held_off_with_dup", "Write Held Off With Duplicate Request"),
4901         uint32("invalid_req_type", "Invalid Request Type Count"),
4902         uint32("being_aborted", "Being Aborted Count"),
4903         uint32("already_doing_realloc", "Already Doing Re-Allocate Count"),
4904         uint32("dealloc_invalid_slot", "De-Allocate Invalid Slot Count"),
4905         uint32("dealloc_being_proc", "De-Allocate Being Processed Count"),
4906         uint32("dealloc_forged_packet", "De-Allocate Forged Packet Count"),
4907         uint32("dealloc_still_transmit", "De-Allocate Still Transmitting Count"),
4908         uint32("start_station_error", "Start Station Error Count"),
4909         uint32("invalid_slot", "Invalid Slot Count"),
4910         uint32("being_processed", "Being Processed Count"),
4911         uint32("forged_packet", "Forged Packet Count"),
4912         uint32("still_transmitting", "Still Transmitting Count"),
4913         uint32("reexecute_request", "Re-Execute Request Count"),
4914         uint32("invalid_sequence_number", "Invalid Sequence Number Count"),
4915         uint32("dup_is_being_sent", "Duplicate Is Being Sent Already Count"),
4916         uint32("sent_pos_ack", "Sent Positive Acknowledge Count"),
4917         uint32("sent_a_dup_reply", "Sent A Duplicate Reply Count"),
4918         uint32("no_mem_for_station", "No Memory For Station Control Count"),
4919         uint32("no_avail_conns", "No Available Connections Count"),
4920         uint32("realloc_slot", "Re-Allocate Slot Count"),
4921         uint32("realloc_slot_came_too_soon", "Re-Allocate Slot Came Too Soon Count"),
4922 ], "Server Information")
4923 ServersSrcInfo                  = struct("servers_src_info", [
4924         ServerNode,
4925         ConnectedLAN,
4926         HopsToNet,
4927 ], "Source Server Information")
4928 SpaceStruct                     = struct("space_struct", [        
4929         Level,
4930         MaxSpace,
4931         CurrentSpace,
4932 ], "Space Information")        
4933 SPXInformation                  = struct("spx_information", [
4934         uint16("spx_max_conn", "SPX Max Connections Count"),
4935         uint16("spx_max_used_conn", "SPX Max Used Connections"),
4936         uint16("spx_est_conn_req", "SPX Establish Connection Requests"),
4937         uint16("spx_est_conn_fail", "SPX Establish Connection Fail"),
4938         uint16("spx_listen_con_req", "SPX Listen Connect Request"),
4939         uint16("spx_listen_con_fail", "SPX Listen Connect Fail"),
4940         uint32("spx_send", "SPX Send Count"),
4941         uint32("spx_window_choke", "SPX Window Choke Count"),
4942         uint16("spx_bad_send", "SPX Bad Send Count"),
4943         uint16("spx_send_fail", "SPX Send Fail Count"),
4944         uint16("spx_abort_conn", "SPX Aborted Connection"),
4945         uint32("spx_listen_pkt", "SPX Listen Packet Count"),
4946         uint16("spx_bad_listen", "SPX Bad Listen Count"),
4947         uint32("spx_incoming_pkt", "SPX Incoming Packet Count"),
4948         uint16("spx_bad_in_pkt", "SPX Bad In Packet Count"),
4949         uint16("spx_supp_pkt", "SPX Suppressed Packet Count"),
4950         uint16("spx_no_ses_listen", "SPX No Session Listen ECB Count"),
4951         uint16("spx_watch_dog", "SPX Watch Dog Destination Session Count"),
4952 ], "SPX Information")
4953 StackInfo                       = struct("stack_info", [
4954         StackNumber,
4955         fw_string("stack_short_name", "Stack Short Name", 16),
4956 ], "Stack Information")        
4957 statsInfo                       = struct("stats_info_struct", [
4958         TotalBytesRead,
4959         TotalBytesWritten,
4960         TotalRequest,
4961 ], "Statistics")
4962 theTimeStruct                   = struct("the_time_struct", [
4963         UTCTimeInSeconds,
4964         FractionalSeconds,
4965         TimesyncStatus,
4966 ])        
4967 timeInfo                        = struct("time_info", [
4968         Year,
4969         Month,
4970         Day,
4971         Hour,
4972         Minute,
4973         Second,
4974         DayOfWeek,
4975         uint32("login_expiration_time", "Login Expiration Time"),
4976 ])              
4977 TotalStreamSizeStruct           = struct("total_stream_size_struct", [
4978         TotalDataStreamDiskSpaceAlloc,
4979         NumberOfDataStreams,
4980 ])
4981 TrendCounters                   = struct("trend_counters", [
4982         uint32("num_of_cache_checks", "Number Of Cache Checks"),
4983         uint32("num_of_cache_hits", "Number Of Cache Hits"),
4984         uint32("num_of_dirty_cache_checks", "Number Of Dirty Cache Checks"),
4985         uint32("num_of_cache_dirty_checks", "Number Of Cache Dirty Checks"),
4986         uint32("cache_used_while_check", "Cache Used While Checking"),
4987         uint32("wait_till_dirty_blcks_dec", "Wait Till Dirty Blocks Decrease Count"),
4988         uint32("alloc_blck_frm_avail", "Allocate Block From Available Count"),
4989         uint32("alloc_blck_frm_lru", "Allocate Block From LRU Count"),
4990         uint32("alloc_blck_already_wait", "Allocate Block Already Waiting"),
4991         uint32("lru_sit_time", "LRU Sitting Time"),
4992         uint32("num_of_cache_check_no_wait", "Number Of Cache Check No Wait"),
4993         uint32("num_of_cache_hits_no_wait", "Number Of Cache Hits No Wait"),
4994 ], "Trend Counters")
4995 TrusteeStruct                   = struct("trustee_struct", [
4996         ObjectID,
4997         AccessRightsMaskWord,
4998 ])
4999 UpdateDateStruct                = struct("update_date_struct", [
5000         UpdateDate,
5001 ])
5002 UpdateIDStruct                  = struct("update_id_struct", [
5003         UpdateID,
5004 ])        
5005 UpdateTimeStruct                = struct("update_time_struct", [
5006         UpdateTime,
5007 ])                
5008 UserInformation                 = struct("user_info", [
5009         ConnectionNumber,
5010         UseCount,
5011         Reserved2,
5012         ConnectionServiceType,
5013         Year,
5014         Month,
5015         Day,
5016         Hour,
5017         Minute,
5018         Second,
5019         DayOfWeek,
5020         Status,
5021         Reserved2,
5022         ExpirationTime,
5023         ObjectType,
5024         Reserved2,
5025         TransactionTrackingFlag,
5026         LogicalLockThreshold,
5027         FileWriteFlags,
5028         FileWriteState,
5029         Reserved,
5030         FileLockCount,
5031         RecordLockCount,
5032         TotalBytesRead,
5033         TotalBytesWritten,
5034         TotalRequest,
5035         HeldRequests,
5036         HeldBytesRead,
5037         HeldBytesWritten,
5038 ], "User Information")
5039 VolInfoStructure                = struct("vol_info_struct", [
5040         VolumeType,
5041         Reserved2,
5042         StatusFlagBits,
5043         SectorSize,
5044         SectorsPerClusterLong,
5045         VolumeSizeInClusters,
5046         FreedClusters,
5047         SubAllocFreeableClusters,
5048         FreeableLimboSectors,
5049         NonFreeableLimboSectors,
5050         NonFreeableAvailableSubAllocSectors,
5051         NotUsableSubAllocSectors,
5052         SubAllocClusters,
5053         DataStreamsCount,
5054         LimboDataStreamsCount,
5055         OldestDeletedFileAgeInTicks,
5056         CompressedDataStreamsCount,
5057         CompressedLimboDataStreamsCount,
5058         UnCompressableDataStreamsCount,
5059         PreCompressedSectors,
5060         CompressedSectors,
5061         MigratedFiles,
5062         MigratedSectors,
5063         ClustersUsedByFAT,
5064         ClustersUsedByDirectories,
5065         ClustersUsedByExtendedDirectories,
5066         TotalDirectoryEntries,
5067         UnUsedDirectoryEntries,
5068         TotalExtendedDirectoryExtants,
5069         UnUsedExtendedDirectoryExtants,
5070         ExtendedAttributesDefined,
5071         ExtendedAttributeExtantsUsed,
5072         DirectoryServicesObjectID,
5073         VolumeLastModifiedTime,
5074         VolumeLastModifiedDate,
5075 ], "Volume Information")
5076 VolInfo2Struct                  = struct("vol_info_struct_2", [
5077         uint32("volume_active_count", "Volume Active Count"),
5078         uint32("volume_use_count", "Volume Use Count"),
5079         uint32("mac_root_ids", "MAC Root IDs"),
5080         VolumeLastModifiedTime,
5081         VolumeLastModifiedDate,
5082         uint32("volume_reference_count", "Volume Reference Count"),
5083         uint32("compression_lower_limit", "Compression Lower Limit"),
5084         uint32("outstanding_ios", "Outstanding IOs"),
5085         uint32("outstanding_compression_ios", "Outstanding Compression IOs"),
5086         uint32("compression_ios_limit", "Compression IOs Limit"),
5087 ], "Extended Volume Information")        
5088 VolumeStruct                    = struct("volume_struct", [
5089         VolumeNumberLong,
5090         VolumeNameLen,
5091 ])
5092
5093
5094 ##############################################################################
5095 # NCP Groups
5096 ##############################################################################
5097 def define_groups():
5098         groups['accounting']    = "Accounting"
5099         groups['afp']           = "AFP"
5100         groups['auditing']      = "Auditing"
5101         groups['bindery']       = "Bindery"
5102         groups['comm']          = "Communication"
5103         groups['connection']    = "Connection"
5104         groups['directory']     = "Directory"
5105         groups['extended']      = "Extended Attribute"
5106         groups['file']          = "File"
5107         groups['fileserver']    = "File Server"
5108         groups['message']       = "Message"
5109         groups['migration']     = "Data Migration"
5110         groups['misc']          = "Miscellaneous"
5111         groups['name']          = "Name Space"
5112         groups['nds']           = "NetWare Directory"
5113         groups['print']         = "Print"
5114         groups['queue']         = "Queue"
5115         groups['sync']          = "Synchronization"
5116         groups['tts']           = "Transaction Tracking"
5117         groups['qms']           = "Queue Management System (QMS)"
5118         groups['stats']         = "Server Statistics"
5119         groups['unknown']       = "Unknown"
5120
5121 ##############################################################################
5122 # NCP Errors
5123 ##############################################################################
5124 def define_errors():
5125         errors[0x0000] = "Ok"
5126         errors[0x0001] = "Transaction tracking is available"
5127         errors[0x0002] = "Ok. The data has been written"
5128         errors[0x0003] = "Calling Station is a Manager"
5129     
5130         errors[0x0100] = "One or more of the ConnectionNumbers in the send list are invalid"
5131         errors[0x0101] = "Invalid space limit"
5132         errors[0x0102] = "Insufficient disk space"
5133         errors[0x0103] = "Queue server cannot add jobs"
5134         errors[0x0104] = "Out of disk space"
5135         errors[0x0105] = "Semaphore overflow"
5136         errors[0x0106] = "Invalid Parameter"
5137         errors[0x0107] = "Invalid Number of Minutes to Delay"
5138         errors[0x0108] = "Invalid Start or Network Number"
5139         errors[0x0109] = "Cannot Obtain License"
5140     
5141         errors[0x0200] = "One or more clients in the send list are not logged in"
5142         errors[0x0201] = "Queue server cannot attach"
5143     
5144         errors[0x0300] = "One or more clients in the send list are not accepting messages"
5145     
5146         errors[0x0400] = "Client already has message"
5147         errors[0x0401] = "Queue server cannot service job"
5148     
5149         errors[0x7300] = "Revoke Handle Rights Not Found"
5150         errors[0x7900] = "Invalid Parameter in Request Packet"
5151         errors[0x7901] = "Nothing being Compressed"
5152         errors[0x7a00] = "Connection Already Temporary"
5153         errors[0x7b00] = "Connection Already Logged in"
5154         errors[0x7c00] = "Connection Not Authenticated"
5155         
5156         errors[0x7e00] = "NCP failed boundary check"
5157         errors[0x7e01] = "Invalid Length"
5158     
5159         errors[0x7f00] = "Lock Waiting"
5160         errors[0x8000] = "Lock fail"
5161         errors[0x8001] = "File in Use"
5162     
5163         errors[0x8100] = "A file handle could not be allocated by the file server"
5164         errors[0x8101] = "Out of File Handles"
5165         
5166         errors[0x8200] = "Unauthorized to open the file"
5167         errors[0x8300] = "Unable to read/write the volume. Possible bad sector on the file server"
5168         errors[0x8301] = "Hard I/O Error"
5169     
5170         errors[0x8400] = "Unauthorized to create the directory"
5171         errors[0x8401] = "Unauthorized to create the file"
5172     
5173         errors[0x8500] = "Unauthorized to delete the specified file"
5174         errors[0x8501] = "Unauthorized to overwrite an existing file in this directory"
5175     
5176         errors[0x8700] = "An unexpected character was encountered in the filename"
5177         errors[0x8701] = "Create Filename Error"
5178     
5179         errors[0x8800] = "Invalid file handle"
5180         errors[0x8900] = "Unauthorized to search this file/directory"
5181         errors[0x8a00] = "Unauthorized to delete this file/directory"
5182         errors[0x8b00] = "Unauthorized to rename a file in this directory"
5183     
5184         errors[0x8c00] = "No set privileges"
5185         errors[0x8c01] = "Unauthorized to modify a file in this directory"
5186         errors[0x8c02] = "Unauthorized to change the restriction on this volume"
5187     
5188         errors[0x8d00] = "Some of the affected files are in use by another client"
5189         errors[0x8d01] = "The affected file is in use"
5190     
5191         errors[0x8e00] = "All of the affected files are in use by another client"
5192         errors[0x8f00] = "Some of the affected files are read-only"
5193     
5194         errors[0x9000] = "An attempt to modify a read-only volume occurred"
5195         errors[0x9001] = "All of the affected files are read-only"
5196         errors[0x9002] = "Read Only Access to Volume"
5197     
5198         errors[0x9100] = "Some of the affected files already exist"
5199         errors[0x9101] = "Some Names Exist"
5200     
5201         errors[0x9200] = "Directory with the new name already exists"
5202         errors[0x9201] = "All of the affected files already exist"
5203     
5204         errors[0x9300] = "Unauthorized to read from this file"
5205         errors[0x9400] = "Unauthorized to write to this file"
5206         errors[0x9500] = "The affected file is detached"
5207     
5208         errors[0x9600] = "The file server has run out of memory to service this request"
5209         errors[0x9601] = "No alloc space for message"
5210         errors[0x9602] = "Server Out of Space"
5211     
5212         errors[0x9800] = "The affected volume is not mounted"
5213         errors[0x9801] = "The volume associated with Volume Number is not mounted"
5214         errors[0x9802] = "The resulting volume does not exist"
5215         errors[0x9803] = "The destination volume is not mounted"
5216         errors[0x9804] = "Disk Map Error"
5217     
5218         errors[0x9900] = "The file server has run out of directory space on the affected volume"
5219         errors[0x9a00] = "The request attempted to rename the affected file to another volume"
5220     
5221         errors[0x9b00] = "DirHandle is not associated with a valid directory path"
5222         errors[0x9b01] = "A resulting directory handle is not associated with a valid directory path"
5223         errors[0x9b02] = "The directory associated with DirHandle does not exist"
5224         errors[0x9b03] = "Bad directory handle"
5225     
5226         errors[0x9c00] = "The resulting path is not valid"
5227         errors[0x9c01] = "The resulting file path is not valid"
5228         errors[0x9c02] = "The resulting directory path is not valid"
5229         errors[0x9c03] = "Invalid path"
5230     
5231         errors[0x9d00] = "A directory handle was not available for allocation"
5232     
5233         errors[0x9e00] = "The name of the directory does not conform to a legal name for this name space"
5234         errors[0x9e01] = "The new directory name does not conform to a legal name for this name space"
5235         errors[0x9e02] = "Bad File Name"
5236     
5237         errors[0x9f00] = "The request attempted to delete a directory that is in use by another client"
5238     
5239         errors[0xa000] = "The request attempted to delete a directory that is not empty"
5240         errors[0xa100] = "An unrecoverable error occured on the affected directory"
5241     
5242         errors[0xa200] = "The request attempted to read from a file region that is physically locked"
5243         errors[0xa201] = "I/O Lock Error"
5244     
5245         errors[0xa400] = "Invalid directory rename attempted"
5246         errors[0xa500] = "Invalid open create mode"
5247         errors[0xa600] = "Auditor Access has been Removed"
5248         errors[0xa700] = "Error Auditing Version"
5249             
5250         errors[0xa800] = "Invalid Support Module ID"
5251         errors[0xa801] = "No Auditing Access Rights"
5252             
5253         errors[0xbe00] = "Invalid Data Stream"
5254         errors[0xbf00] = "Requests for this name space are not valid on this volume"
5255     
5256         errors[0xc000] = "Unauthorized to retrieve accounting data"
5257         
5258         errors[0xc100] = "The ACCOUNT_BALANCE property does not exist"
5259         errors[0xc101] = "No Account Balance"
5260         
5261         errors[0xc200] = "The object has exceeded its credit limit"
5262         errors[0xc300] = "Too many holds have been placed against this account"
5263         errors[0xc400] = "The client account has been disabled"
5264     
5265         errors[0xc500] = "Access to the account has been denied because of intruder detection"
5266         errors[0xc501] = "Login lockout"
5267         errors[0xc502] = "Server Login Locked"
5268     
5269         errors[0xc600] = "The caller does not have operator priviliges"
5270         errors[0xc601] = "The client does not have operator priviliges"
5271     
5272         errors[0xc800] = "Missing EA Key"
5273         errors[0xc900] = "EA Not Found"
5274         errors[0xca00] = "Invalid EA Handle Type"
5275         errors[0xcb00] = "EA No Key No Data"
5276         errors[0xcc00] = "EA Number Mismatch"
5277         errors[0xcd00] = "Extent Number Out of Range"
5278         errors[0xce00] = "EA Bad Directory Number"
5279         errors[0xcf00] = "Invalid EA Handle"
5280     
5281         errors[0xd000] = "Queue error"
5282         errors[0xd001] = "EA Position Out of Range"
5283         
5284         errors[0xd100] = "The queue does not exist"
5285         errors[0xd101] = "EA Access Denied"
5286     
5287         errors[0xd200] = "A queue server is not associated with this queue"
5288         errors[0xd201] = "A queue server is not associated with the selected queue"
5289         errors[0xd202] = "No queue server"
5290         errors[0xd203] = "Data Page Odd Size"
5291     
5292         errors[0xd300] = "No queue rights"
5293         errors[0xd301] = "EA Volume Not Mounted"
5294     
5295         errors[0xd400] = "The queue is full and cannot accept another request"
5296         errors[0xd401] = "The queue associated with ObjectId is full and cannot accept another request"
5297         errors[0xd402] = "Bad Page Boundary"
5298     
5299         errors[0xd500] = "A job does not exist in this queue"
5300         errors[0xd501] = "No queue job"
5301         errors[0xd502] = "The job associated with JobNumber does not exist in this queue"
5302         errors[0xd503] = "Inspect Failure"
5303     
5304         errors[0xd600] = "The file server does not allow unencrypted passwords"
5305         errors[0xd601] = "No job right"
5306         errors[0xd602] = "EA Already Claimed"
5307     
5308         errors[0xd700] = "Bad account"
5309         errors[0xd701] = "The old and new password strings are identical"
5310         errors[0xd702] = "The job is currently being serviced"
5311         errors[0xd703] = "The queue is currently servicing a job"
5312         errors[0xd704] = "Queue servicing"
5313         errors[0xd705] = "Odd Buffer Size"
5314     
5315         errors[0xd800] = "Queue not active"
5316         errors[0xd801] = "No Scorecards"
5317         
5318         errors[0xd900] = "The file server cannot accept another connection as it has reached its limit"
5319         errors[0xd901] = "The client is not security equivalent to one of the objects in the Q_SERVERS group property of the target queue"
5320         errors[0xd902] = "Station is not a server"
5321         errors[0xd903] = "Bad EDS Signature"
5322     
5323         errors[0xda00] = "Attempted to login to the file server during a restricted time period"
5324         errors[0xda01] = "Queue halted"
5325         errors[0xda02] = "EA Space Limit"
5326     
5327         errors[0xdb00] = "Attempted to login to the file server from an unauthorized workstation or network"
5328         errors[0xdb01] = "The queue cannot attach another queue server"
5329         errors[0xdb02] = "Maximum queue servers"
5330         errors[0xdb03] = "EA Key Corrupt"
5331     
5332         errors[0xdc00] = "Account Expired"
5333         errors[0xdc01] = "EA Key Limit"
5334         
5335         errors[0xdd00] = "Tally Corrupt"
5336         errors[0xde00] = "Attempted to login to the file server with an incorrect password"
5337         errors[0xdf00] = "Attempted to login to the file server with a password that has expired"
5338     
5339         errors[0xe000] = "No Login Connections Available"
5340         errors[0xe700] = "No disk track"
5341         errors[0xe800] = "Write to group"
5342         errors[0xe900] = "The object is already a member of the group property"
5343     
5344         errors[0xea00] = "No such member"
5345         errors[0xea01] = "The bindery object is not a member of the set"
5346         errors[0xea02] = "Non-existent member"
5347     
5348         errors[0xeb00] = "The property is not a set property"
5349     
5350         errors[0xec00] = "No such set"
5351         errors[0xec01] = "The set property does not exist"
5352     
5353         errors[0xed00] = "Property exists"
5354         errors[0xed01] = "The property already exists"
5355         errors[0xed02] = "An attempt was made to create a bindery object property that already exists"
5356     
5357         errors[0xee00] = "The object already exists"
5358         errors[0xee01] = "The bindery object already exists"
5359     
5360         errors[0xef00] = "Illegal name"
5361         errors[0xef01] = "Illegal characters in ObjectName field"
5362         errors[0xef02] = "Invalid name"
5363     
5364         errors[0xf000] = "A wildcard was detected in a field that does not support wildcards"
5365         errors[0xf001] = "An illegal wildcard was detected in ObjectName"
5366     
5367         errors[0xf100] = "The client does not have the rights to access this bindery object"
5368         errors[0xf101] = "Bindery security"
5369         errors[0xf102] = "Invalid bindery security"
5370     
5371         errors[0xf200] = "Unauthorized to read from this object"
5372         errors[0xf300] = "Unauthorized to rename this object"
5373     
5374         errors[0xf400] = "Unauthorized to delete this object"
5375         errors[0xf401] = "No object delete privileges"
5376         errors[0xf402] = "Unauthorized to delete this queue"
5377     
5378         errors[0xf500] = "Unauthorized to create this object"
5379         errors[0xf501] = "No object create"
5380     
5381         errors[0xf600] = "No property delete"
5382         errors[0xf601] = "Unauthorized to delete the property of this object"
5383         errors[0xf602] = "Unauthorized to delete this property"
5384     
5385         errors[0xf700] = "Unauthorized to create this property"
5386         errors[0xf701] = "No property create privilege"
5387     
5388         errors[0xf800] = "Unauthorized to write to this property"
5389         errors[0xf900] = "Unauthorized to read this property"
5390         errors[0xfa00] = "Temporary remap error"
5391     
5392         errors[0xfb00] = "No such property"
5393         errors[0xfb01] = "The file server does not support this request"
5394         errors[0xfb02] = "The specified property does not exist"
5395         errors[0xfb03] = "The PASSWORD property does not exist for this bindery object"
5396         errors[0xfb04] = "NDS NCP not available"
5397         errors[0xfb05] = "Bad Directory Handle"
5398         errors[0xfb06] = "Unknown Request"
5399         errors[0xfb07] = "Invalid Subfunction Request"
5400         errors[0xfb08] = "Attempt to use an invalid parameter (drive number, path, or flag value) during a set drive path call"
5401         errors[0xfb09] = "NMAS not installed on this server, NCP NOT Supported"
5402         errors[0xfb0a] = "Station Not Logged In"
5403     
5404         errors[0xfc00] = "The message queue cannot accept another message"
5405         errors[0xfc01] = "The trustee associated with ObjectId does not exist"
5406         errors[0xfc02] = "The specified bindery object does not exist"
5407         errors[0xfc03] = "The bindery object associated with ObjectID does not exist"
5408         errors[0xfc04] = "A bindery object does not exist that matches"
5409         errors[0xfc05] = "The specified queue does not exist"
5410         errors[0xfc06] = "No such object"
5411         errors[0xfc07] = "The queue associated with ObjectID does not exist"
5412     
5413         errors[0xfd00] = "Bad station number"
5414         errors[0xfd01] = "The connection associated with ConnectionNumber is not active"
5415         errors[0xfd02] = "Lock collision"
5416         errors[0xfd03] = "Transaction tracking is disabled"
5417     
5418         errors[0xfe00] = "I/O failure"
5419         errors[0xfe01] = "The files containing the bindery on the file server are locked"
5420         errors[0xfe02] = "A file with the specified name already exists in this directory"
5421         errors[0xfe03] = "No more restrictions were found"
5422         errors[0xfe04] = "The file server was unable to lock the file within the specified time limit"
5423         errors[0xfe05] = "The file server was unable to lock all files within the specified time limit"
5424         errors[0xfe06] = "The bindery object associated with ObjectID is not a valid trustee"
5425         errors[0xfe07] = "Directory locked"
5426         errors[0xfe08] = "Bindery locked"
5427         errors[0xfe09] = "Invalid semaphore name length"
5428         errors[0xfe0a] = "The file server was unable to complete the operation within the specified time limit"
5429         errors[0xfe0b] = "Transaction restart"
5430         errors[0xfe0c] = "Bad packet"
5431         errors[0xfe0d] = "Timeout"
5432         errors[0xfe0e] = "User Not Found"
5433         errors[0xfe0f] = "Trustee Not Found"
5434     
5435         errors[0xff00] = "Failure"
5436         errors[0xff01] = "Lock error"
5437         errors[0xff02] = "File not found"
5438         errors[0xff03] = "The file not found or cannot be unlocked"
5439         errors[0xff04] = "Record not found"
5440         errors[0xff05] = "The logical record was not found"
5441         errors[0xff06] = "The printer associated with Printer Number does not exist"
5442         errors[0xff07] = "No such printer"
5443         errors[0xff08] = "Unable to complete the request"
5444         errors[0xff09] = "Unauthorized to change privileges of this trustee"
5445         errors[0xff0a] = "No files matching the search criteria were found"
5446         errors[0xff0b] = "A file matching the search criteria was not found"
5447         errors[0xff0c] = "Verification failed"
5448         errors[0xff0d] = "Object associated with ObjectID is not a manager"
5449         errors[0xff0e] = "Invalid initial semaphore value"
5450         errors[0xff0f] = "The semaphore handle is not valid"
5451         errors[0xff10] = "SemaphoreHandle is not associated with a valid sempahore"
5452         errors[0xff11] = "Invalid semaphore handle"
5453         errors[0xff12] = "Transaction tracking is not available"
5454         errors[0xff13] = "The transaction has not yet been written to disk"
5455         errors[0xff14] = "Directory already exists"
5456         errors[0xff15] = "The file already exists and the deletion flag was not set"
5457         errors[0xff16] = "No matching files or directories were found"
5458         errors[0xff17] = "A file or directory matching the search criteria was not found"
5459         errors[0xff18] = "The file already exists"
5460         errors[0xff19] = "Failure, No files found"
5461         errors[0xff1a] = "Unlock Error"
5462         errors[0xff1b] = "I/O Bound Error"
5463         errors[0xff1c] = "Not Accepting Messages"
5464         errors[0xff1d] = "No More Salvageable Files in Directory"
5465         errors[0xff1e] = "Calling Station is Not a Manager"
5466         errors[0xff1f] = "Bindery Failure"
5467         errors[0xff20] = "NCP Extension Not Found"
5468
5469 ##############################################################################
5470 # Produce C code
5471 ##############################################################################
5472 def ExamineVars(vars, structs_hash, vars_hash):
5473         for var in vars:
5474                 if isinstance(var, struct):
5475                         structs_hash[var.HFName()] = var
5476                         struct_vars = var.Variables()
5477                         ExamineVars(struct_vars, structs_hash, vars_hash)
5478                 else:
5479                         vars_hash[repr(var)] = var
5480                         if isinstance(var, bitfield):
5481                                 sub_vars = var.SubVariables()
5482                                 ExamineVars(sub_vars, structs_hash, vars_hash)
5483
5484 def produce_code():
5485
5486         global errors
5487
5488         print "/*"
5489         print " * Generated automatically from %s" % (sys.argv[0])
5490         print " * Do not edit this file manually, as all changes will be lost."
5491         print " */\n"
5492
5493         print """
5494 /*
5495  * This program is free software; you can redistribute it and/or
5496  * modify it under the terms of the GNU General Public License
5497  * as published by the Free Software Foundation; either version 2
5498  * of the License, or (at your option) any later version.
5499  * 
5500  * This program is distributed in the hope that it will be useful,
5501  * but WITHOUT ANY WARRANTY; without even the implied warranty of
5502  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5503  * GNU General Public License for more details.
5504  * 
5505  * You should have received a copy of the GNU General Public License
5506  * along with this program; if not, write to the Free Software
5507  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
5508  */
5509
5510 #ifdef HAVE_CONFIG_H
5511 # include "config.h"
5512 #endif
5513
5514 #include <string.h>
5515 #include <glib.h>
5516 #include <epan/packet.h>
5517 #include <epan/conversation.h>
5518 #include "ptvcursor.h"
5519 #include "packet-ncp-int.h"
5520
5521 /* Function declarations for functions used in proto_register_ncp2222() */
5522 static void ncp_init_protocol(void);
5523 static void ncp_postseq_cleanup(void);
5524
5525 /* Endianness macros */
5526 #define BE              0
5527 #define LE              1
5528 #define NO_ENDIANNESS   0
5529
5530 #define NO_LENGTH       -1
5531
5532 /* We use this int-pointer as a special flag in ptvc_record's */
5533 static int ptvc_struct_int_storage;
5534 #define PTVC_STRUCT     (&ptvc_struct_int_storage)
5535
5536 /* Values used in the count-variable ("var"/"repeat") logic. */"""
5537
5538
5539         if global_highest_var > -1:
5540                 print "#define NUM_REPEAT_VARS\t%d" % (global_highest_var + 1)
5541                 print "guint repeat_vars[NUM_REPEAT_VARS];",
5542         else:
5543                 print "#define NUM_REPEAT_VARS\t0"
5544                 print "guint *repeat_vars = NULL;",
5545
5546         print """
5547 #define NO_VAR          NUM_REPEAT_VARS
5548 #define NO_REPEAT       NUM_REPEAT_VARS
5549
5550 #define REQ_COND_SIZE_CONSTANT  0
5551 #define REQ_COND_SIZE_VARIABLE  1
5552 #define NO_REQ_COND_SIZE        0
5553
5554
5555 #define NTREE   0x00020000
5556 #define NDEPTH  0x00000002
5557 #define NREV    0x00000004
5558 #define NFLAGS  0x00000008
5559
5560
5561
5562 static int hf_ncp_func = -1;
5563 static int hf_ncp_length = -1;
5564 static int hf_ncp_subfunc = -1;
5565 static int hf_ncp_fragment_handle = -1;
5566 static int hf_ncp_completion_code = -1;
5567 static int hf_ncp_connection_status = -1;
5568 static int hf_ncp_req_frame_num = -1;
5569 static int hf_ncp_req_frame_time = -1;
5570 static int hf_ncp_fragment_size = -1;
5571 static int hf_ncp_message_size = -1;
5572 static int hf_ncp_nds_flag = -1;
5573 static int hf_ncp_nds_verb = -1; 
5574 static int hf_ping_version = -1;
5575 static int hf_nds_version = -1;
5576 static int hf_nds_flags = -1;
5577 static int hf_nds_reply_depth = -1;
5578 static int hf_nds_reply_rev = -1;
5579 static int hf_nds_reply_flags = -1;
5580 static int hf_nds_p1type = -1;
5581 static int hf_nds_uint32value = -1;
5582 static int hf_nds_bit1 = -1;
5583 static int hf_nds_bit2 = -1;
5584 static int hf_nds_bit3 = -1;
5585 static int hf_nds_bit4 = -1;
5586 static int hf_nds_bit5 = -1;
5587 static int hf_nds_bit6 = -1;
5588 static int hf_nds_bit7 = -1;
5589 static int hf_nds_bit8 = -1;
5590 static int hf_nds_bit9 = -1;
5591 static int hf_nds_bit10 = -1;
5592 static int hf_nds_bit11 = -1;
5593 static int hf_nds_bit12 = -1;
5594 static int hf_nds_bit13 = -1;
5595 static int hf_nds_bit14 = -1;
5596 static int hf_nds_bit15 = -1;
5597 static int hf_nds_bit16 = -1;
5598 static int hf_bit1outflags = -1;
5599 static int hf_bit2outflags = -1;
5600 static int hf_bit3outflags = -1;
5601 static int hf_bit4outflags = -1;
5602 static int hf_bit5outflags = -1;
5603 static int hf_bit6outflags = -1;
5604 static int hf_bit7outflags = -1;
5605 static int hf_bit8outflags = -1;
5606 static int hf_bit9outflags = -1;
5607 static int hf_bit10outflags = -1;
5608 static int hf_bit11outflags = -1;
5609 static int hf_bit12outflags = -1;
5610 static int hf_bit13outflags = -1;
5611 static int hf_bit14outflags = -1;
5612 static int hf_bit15outflags = -1;
5613 static int hf_bit16outflags = -1;
5614 static int hf_bit1nflags = -1;
5615 static int hf_bit2nflags = -1;
5616 static int hf_bit3nflags = -1;
5617 static int hf_bit4nflags = -1;
5618 static int hf_bit5nflags = -1;
5619 static int hf_bit6nflags = -1;
5620 static int hf_bit7nflags = -1;
5621 static int hf_bit8nflags = -1;
5622 static int hf_bit9nflags = -1;
5623 static int hf_bit10nflags = -1;
5624 static int hf_bit11nflags = -1;
5625 static int hf_bit12nflags = -1;
5626 static int hf_bit13nflags = -1;
5627 static int hf_bit14nflags = -1;
5628 static int hf_bit15nflags = -1;
5629 static int hf_bit16nflags = -1;
5630 static int hf_bit1rflags = -1;
5631 static int hf_bit2rflags = -1;
5632 static int hf_bit3rflags = -1;
5633 static int hf_bit4rflags = -1;
5634 static int hf_bit5rflags = -1;
5635 static int hf_bit6rflags = -1;
5636 static int hf_bit7rflags = -1;
5637 static int hf_bit8rflags = -1;
5638 static int hf_bit9rflags = -1;
5639 static int hf_bit10rflags = -1;
5640 static int hf_bit11rflags = -1;
5641 static int hf_bit12rflags = -1;
5642 static int hf_bit13rflags = -1;
5643 static int hf_bit14rflags = -1;
5644 static int hf_bit15rflags = -1;
5645 static int hf_bit16rflags = -1;
5646 static int hf_bit1cflags = -1;
5647 static int hf_bit2cflags = -1;
5648 static int hf_bit3cflags = -1;
5649 static int hf_bit4cflags = -1;
5650 static int hf_bit5cflags = -1;
5651 static int hf_bit6cflags = -1;
5652 static int hf_bit7cflags = -1;
5653 static int hf_bit8cflags = -1;
5654 static int hf_bit9cflags = -1;
5655 static int hf_bit10cflags = -1;
5656 static int hf_bit11cflags = -1;
5657 static int hf_bit12cflags = -1;
5658 static int hf_bit13cflags = -1;
5659 static int hf_bit14cflags = -1;
5660 static int hf_bit15cflags = -1;
5661 static int hf_bit16cflags = -1;
5662 static int hf_bit1acflags = -1;
5663 static int hf_bit2acflags = -1;
5664 static int hf_bit3acflags = -1;
5665 static int hf_bit4acflags = -1;
5666 static int hf_bit5acflags = -1;
5667 static int hf_bit6acflags = -1;
5668 static int hf_bit7acflags = -1;
5669 static int hf_bit8acflags = -1;
5670 static int hf_bit9acflags = -1;
5671 static int hf_bit10acflags = -1;
5672 static int hf_bit11acflags = -1;
5673 static int hf_bit12acflags = -1;
5674 static int hf_bit13acflags = -1;
5675 static int hf_bit14acflags = -1;
5676 static int hf_bit15acflags = -1;
5677 static int hf_bit16acflags = -1;
5678 static int hf_bit1vflags = -1;
5679 static int hf_bit2vflags = -1;
5680 static int hf_bit3vflags = -1;
5681 static int hf_bit4vflags = -1;
5682 static int hf_bit5vflags = -1;
5683 static int hf_bit6vflags = -1;
5684 static int hf_bit7vflags = -1;
5685 static int hf_bit8vflags = -1;
5686 static int hf_bit9vflags = -1;
5687 static int hf_bit10vflags = -1;
5688 static int hf_bit11vflags = -1;
5689 static int hf_bit12vflags = -1;
5690 static int hf_bit13vflags = -1;
5691 static int hf_bit14vflags = -1;
5692 static int hf_bit15vflags = -1;
5693 static int hf_bit16vflags = -1;
5694 static int hf_bit1eflags = -1;
5695 static int hf_bit2eflags = -1;
5696 static int hf_bit3eflags = -1;
5697 static int hf_bit4eflags = -1;
5698 static int hf_bit5eflags = -1;
5699 static int hf_bit6eflags = -1;
5700 static int hf_bit7eflags = -1;
5701 static int hf_bit8eflags = -1;
5702 static int hf_bit9eflags = -1;
5703 static int hf_bit10eflags = -1;
5704 static int hf_bit11eflags = -1;
5705 static int hf_bit12eflags = -1;
5706 static int hf_bit13eflags = -1;
5707 static int hf_bit14eflags = -1;
5708 static int hf_bit15eflags = -1;
5709 static int hf_bit16eflags = -1;
5710 static int hf_bit1infoflagsl = -1;
5711 static int hf_bit2infoflagsl = -1;
5712 static int hf_bit3infoflagsl = -1;
5713 static int hf_bit4infoflagsl = -1;
5714 static int hf_bit5infoflagsl = -1;
5715 static int hf_bit6infoflagsl = -1;
5716 static int hf_bit7infoflagsl = -1;
5717 static int hf_bit8infoflagsl = -1;
5718 static int hf_bit9infoflagsl = -1;
5719 static int hf_bit10infoflagsl = -1;
5720 static int hf_bit11infoflagsl = -1;
5721 static int hf_bit12infoflagsl = -1;
5722 static int hf_bit13infoflagsl = -1;
5723 static int hf_bit14infoflagsl = -1;
5724 static int hf_bit15infoflagsl = -1;
5725 static int hf_bit16infoflagsl = -1;
5726 static int hf_bit1infoflagsh = -1;
5727 static int hf_bit2infoflagsh = -1;
5728 static int hf_bit3infoflagsh = -1;
5729 static int hf_bit4infoflagsh = -1;
5730 static int hf_bit5infoflagsh = -1;
5731 static int hf_bit6infoflagsh = -1;
5732 static int hf_bit7infoflagsh = -1;
5733 static int hf_bit8infoflagsh = -1;
5734 static int hf_bit9infoflagsh = -1;
5735 static int hf_bit10infoflagsh = -1;
5736 static int hf_bit11infoflagsh = -1;
5737 static int hf_bit12infoflagsh = -1;
5738 static int hf_bit13infoflagsh = -1;
5739 static int hf_bit14infoflagsh = -1;
5740 static int hf_bit15infoflagsh = -1;
5741 static int hf_bit16infoflagsh = -1;
5742 static int hf_bit1lflags = -1;
5743 static int hf_bit2lflags = -1;
5744 static int hf_bit3lflags = -1;
5745 static int hf_bit4lflags = -1;
5746 static int hf_bit5lflags = -1;
5747 static int hf_bit6lflags = -1;
5748 static int hf_bit7lflags = -1;
5749 static int hf_bit8lflags = -1;
5750 static int hf_bit9lflags = -1;
5751 static int hf_bit10lflags = -1;
5752 static int hf_bit11lflags = -1;
5753 static int hf_bit12lflags = -1;
5754 static int hf_bit13lflags = -1;
5755 static int hf_bit14lflags = -1;
5756 static int hf_bit15lflags = -1;
5757 static int hf_bit16lflags = -1;
5758 static int hf_bit1l1flagsl = -1;
5759 static int hf_bit2l1flagsl = -1;
5760 static int hf_bit3l1flagsl = -1;
5761 static int hf_bit4l1flagsl = -1;
5762 static int hf_bit5l1flagsl = -1;
5763 static int hf_bit6l1flagsl = -1;
5764 static int hf_bit7l1flagsl = -1;
5765 static int hf_bit8l1flagsl = -1;
5766 static int hf_bit9l1flagsl = -1;
5767 static int hf_bit10l1flagsl = -1;
5768 static int hf_bit11l1flagsl = -1;
5769 static int hf_bit12l1flagsl = -1;
5770 static int hf_bit13l1flagsl = -1;
5771 static int hf_bit14l1flagsl = -1;
5772 static int hf_bit15l1flagsl = -1;
5773 static int hf_bit16l1flagsl = -1;
5774 static int hf_bit1l1flagsh = -1;
5775 static int hf_bit2l1flagsh = -1;
5776 static int hf_bit3l1flagsh = -1;
5777 static int hf_bit4l1flagsh = -1;
5778 static int hf_bit5l1flagsh = -1;
5779 static int hf_bit6l1flagsh = -1;
5780 static int hf_bit7l1flagsh = -1;
5781 static int hf_bit8l1flagsh = -1;
5782 static int hf_bit9l1flagsh = -1;
5783 static int hf_bit10l1flagsh = -1;
5784 static int hf_bit11l1flagsh = -1;
5785 static int hf_bit12l1flagsh = -1;
5786 static int hf_bit13l1flagsh = -1;
5787 static int hf_bit14l1flagsh = -1;
5788 static int hf_bit15l1flagsh = -1;
5789 static int hf_bit16l1flagsh = -1;
5790 static int hf_nds_tree_name = -1;
5791 static int hf_nds_reply_error = -1;
5792 static int hf_nds_net = -1;
5793 static int hf_nds_node = -1;
5794 static int hf_nds_socket = -1;
5795 static int hf_add_ref_ip = -1;
5796 static int hf_add_ref_udp = -1;                                                     
5797 static int hf_add_ref_tcp = -1;
5798 static int hf_referral_record = -1;
5799 static int hf_referral_addcount = -1;
5800 static int hf_nds_port = -1;
5801 static int hf_mv_string = -1;
5802 static int hf_nds_syntax = -1;
5803 static int hf_value_string = -1;
5804 static int hf_nds_buffer_size = -1;
5805 static int hf_nds_ver = -1;
5806 static int hf_nds_nflags = -1;
5807 static int hf_nds_scope = -1;
5808 static int hf_nds_name = -1;
5809 static int hf_nds_comm_trans = -1;
5810 static int hf_nds_tree_trans = -1;
5811 static int hf_nds_iteration = -1;
5812 static int hf_nds_eid = -1;
5813 static int hf_nds_info_type = -1;
5814 static int hf_nds_all_attr = -1;
5815 static int hf_nds_req_flags = -1;
5816 static int hf_nds_attr = -1;
5817 static int hf_nds_crc = -1;
5818 static int hf_nds_referrals = -1;
5819 static int hf_nds_result_flags = -1;
5820 static int hf_nds_tag_string = -1;
5821 static int hf_value_bytes = -1;
5822 static int hf_replica_type = -1;
5823 static int hf_replica_state = -1;
5824 static int hf_replica_number = -1;
5825 static int hf_min_nds_ver = -1;
5826 static int hf_nds_ver_include = -1;
5827 static int hf_nds_ver_exclude = -1;
5828 static int hf_nds_es = -1;
5829 static int hf_es_type = -1;
5830 static int hf_delim_string = -1;
5831 static int hf_rdn_string = -1;
5832 static int hf_nds_revent = -1;
5833 static int hf_nds_rnum = -1; 
5834 static int hf_nds_name_type = -1;
5835 static int hf_nds_rflags = -1;
5836 static int hf_nds_eflags = -1;
5837 static int hf_nds_depth = -1;
5838 static int hf_nds_class_def_type = -1;
5839 static int hf_nds_classes = -1;
5840 static int hf_nds_return_all_classes = -1;
5841 static int hf_nds_stream_flags = -1;
5842 static int hf_nds_stream_name = -1;
5843 static int hf_nds_file_handle = -1;
5844 static int hf_nds_file_size = -1;
5845 static int hf_nds_dn_output_type = -1;
5846 static int hf_nds_nested_output_type = -1;
5847 static int hf_nds_output_delimiter = -1;
5848 static int hf_nds_output_entry_specifier = -1;
5849 static int hf_es_value = -1;
5850 static int hf_es_rdn_count = -1;
5851 static int hf_nds_replica_num = -1;
5852 static int hf_nds_event_num = -1;
5853 static int hf_es_seconds = -1;
5854 static int hf_nds_compare_results = -1;
5855 static int hf_nds_parent = -1;
5856 static int hf_nds_name_filter = -1;
5857 static int hf_nds_class_filter = -1;
5858 static int hf_nds_time_filter = -1;
5859 static int hf_nds_partition_root_id = -1;
5860 static int hf_nds_replicas = -1;
5861 static int hf_nds_purge = -1;
5862 static int hf_nds_local_partition = -1;
5863 static int hf_partition_busy = -1;
5864 static int hf_nds_number_of_changes = -1;
5865 static int hf_sub_count = -1;
5866 static int hf_nds_revision = -1;
5867 static int hf_nds_base_class = -1;
5868 static int hf_nds_relative_dn = -1;
5869 static int hf_nds_root_dn = -1;
5870 static int hf_nds_parent_dn = -1;
5871 static int hf_deref_base = -1;
5872 static int hf_nds_entry_info = -1;
5873 static int hf_nds_base = -1;
5874 static int hf_nds_privileges = -1;
5875 static int hf_nds_vflags = -1;
5876 static int hf_nds_value_len = -1;
5877 static int hf_nds_cflags = -1;
5878 static int hf_nds_acflags = -1;
5879 static int hf_nds_asn1 = -1;
5880 static int hf_nds_upper = -1;
5881 static int hf_nds_lower = -1;
5882 static int hf_nds_trustee_dn = -1;
5883 static int hf_nds_attribute_dn = -1;
5884 static int hf_nds_acl_add = -1;
5885 static int hf_nds_acl_del = -1;
5886 static int hf_nds_att_add = -1;
5887 static int hf_nds_att_del = -1;
5888 static int hf_nds_keep = -1;
5889 static int hf_nds_new_rdn = -1;
5890 static int hf_nds_time_delay = -1;
5891 static int hf_nds_root_name = -1;
5892 static int hf_nds_new_part_id = -1;
5893 static int hf_nds_child_part_id = -1;
5894 static int hf_nds_master_part_id = -1;
5895 static int hf_nds_target_name = -1;
5896 static int hf_nds_super = -1;
5897 static int hf_bit1pingflags2 = -1;
5898 static int hf_bit2pingflags2 = -1;
5899 static int hf_bit3pingflags2 = -1;
5900 static int hf_bit4pingflags2 = -1;
5901 static int hf_bit5pingflags2 = -1;
5902 static int hf_bit6pingflags2 = -1;
5903 static int hf_bit7pingflags2 = -1;
5904 static int hf_bit8pingflags2 = -1;
5905 static int hf_bit9pingflags2 = -1;
5906 static int hf_bit10pingflags2 = -1;
5907 static int hf_bit11pingflags2 = -1;
5908 static int hf_bit12pingflags2 = -1;
5909 static int hf_bit13pingflags2 = -1;
5910 static int hf_bit14pingflags2 = -1;
5911 static int hf_bit15pingflags2 = -1;
5912 static int hf_bit16pingflags2 = -1;
5913 static int hf_bit1pingflags1 = -1;
5914 static int hf_bit2pingflags1 = -1;
5915 static int hf_bit3pingflags1 = -1;
5916 static int hf_bit4pingflags1 = -1;
5917 static int hf_bit5pingflags1 = -1;
5918 static int hf_bit6pingflags1 = -1;
5919 static int hf_bit7pingflags1 = -1;
5920 static int hf_bit8pingflags1 = -1;
5921 static int hf_bit9pingflags1 = -1;
5922 static int hf_bit10pingflags1 = -1;
5923 static int hf_bit11pingflags1 = -1;
5924 static int hf_bit12pingflags1 = -1;
5925 static int hf_bit13pingflags1 = -1;
5926 static int hf_bit14pingflags1 = -1;
5927 static int hf_bit15pingflags1 = -1;
5928 static int hf_bit16pingflags1 = -1;
5929 static int hf_bit1pingpflags1 = -1;
5930 static int hf_bit2pingpflags1 = -1;
5931 static int hf_bit3pingpflags1 = -1;
5932 static int hf_bit4pingpflags1 = -1;
5933 static int hf_bit5pingpflags1 = -1;
5934 static int hf_bit6pingpflags1 = -1;
5935 static int hf_bit7pingpflags1 = -1;
5936 static int hf_bit8pingpflags1 = -1;
5937 static int hf_bit9pingpflags1 = -1;
5938 static int hf_bit10pingpflags1 = -1;
5939 static int hf_bit11pingpflags1 = -1;
5940 static int hf_bit12pingpflags1 = -1;
5941 static int hf_bit13pingpflags1 = -1;
5942 static int hf_bit14pingpflags1 = -1;
5943 static int hf_bit15pingpflags1 = -1;
5944 static int hf_bit16pingpflags1 = -1;
5945 static int hf_bit1pingvflags1 = -1;
5946 static int hf_bit2pingvflags1 = -1;
5947 static int hf_bit3pingvflags1 = -1;
5948 static int hf_bit4pingvflags1 = -1;
5949 static int hf_bit5pingvflags1 = -1;
5950 static int hf_bit6pingvflags1 = -1;
5951 static int hf_bit7pingvflags1 = -1;
5952 static int hf_bit8pingvflags1 = -1;
5953 static int hf_bit9pingvflags1 = -1;
5954 static int hf_bit10pingvflags1 = -1;
5955 static int hf_bit11pingvflags1 = -1;
5956 static int hf_bit12pingvflags1 = -1;
5957 static int hf_bit13pingvflags1 = -1;
5958 static int hf_bit14pingvflags1 = -1;
5959 static int hf_bit15pingvflags1 = -1;
5960 static int hf_bit16pingvflags1 = -1;
5961 static int hf_nds_letter_ver = -1;
5962 static int hf_nds_os_ver = -1;
5963 static int hf_nds_lic_flags = -1;
5964 static int hf_nds_ds_time = -1;
5965 static int hf_nds_ping_version = -1;
5966
5967
5968         """
5969                
5970         # Look at all packet types in the packets collection, and cull information
5971         # from them.
5972         errors_used_list = []
5973         errors_used_hash = {}
5974         groups_used_list = []
5975         groups_used_hash = {}
5976         variables_used_hash = {}
5977         structs_used_hash = {}
5978
5979         for pkt in packets:
5980                 # Determine which error codes are used.
5981                 codes = pkt.CompletionCodes()
5982                 for code in codes.Records():
5983                         if not errors_used_hash.has_key(code):
5984                                 errors_used_hash[code] = len(errors_used_list)
5985                                 errors_used_list.append(code)
5986
5987                 # Determine which groups are used.
5988                 group = pkt.Group()
5989                 if not groups_used_hash.has_key(group):
5990                         groups_used_hash[group] = len(groups_used_list)
5991                         groups_used_list.append(group)
5992
5993                 # Determine which variables are used.
5994                 vars = pkt.Variables()
5995                 ExamineVars(vars, structs_used_hash, variables_used_hash)
5996
5997
5998         # Print the hf variable declarations
5999         sorted_vars = variables_used_hash.values()
6000         sorted_vars.sort()
6001         for var in sorted_vars:
6002                 print "static int " + var.HFName() + " = -1;"
6003
6004
6005         # Print the value_string's
6006         for var in sorted_vars:
6007                 if isinstance(var, val_string):
6008                         print ""
6009                         print var.Code()
6010                            
6011         # Determine which error codes are not used
6012         errors_not_used = {}
6013         # Copy the keys from the error list...
6014         for code in errors.keys():
6015                 errors_not_used[code] = 1
6016         # ... and remove the ones that *were* used.
6017         for code in errors_used_list:
6018                 del errors_not_used[code]
6019
6020         # Print a remark showing errors not used
6021         list_errors_not_used = errors_not_used.keys()
6022         list_errors_not_used.sort()
6023         for code in list_errors_not_used:
6024                 print "/* Error 0x%04x not used: %s */" % (code, errors[code])
6025         print "\n"
6026
6027         # Print the errors table
6028         print "/* Error strings. */"
6029         print "static const char *ncp_errors[] = {"
6030         for code in errors_used_list:
6031                 print '\t/* %02d (0x%04x) */ "%s",' % (errors_used_hash[code], code, errors[code])
6032         print "};\n"
6033
6034
6035
6036
6037         # Determine which groups are not used
6038         groups_not_used = {}
6039         # Copy the keys from the group list...
6040         for group in groups.keys():
6041                 groups_not_used[group] = 1
6042         # ... and remove the ones that *were* used.
6043         for group in groups_used_list:
6044                 del groups_not_used[group]
6045
6046         # Print a remark showing groups not used
6047         list_groups_not_used = groups_not_used.keys()
6048         list_groups_not_used.sort()
6049         for group in list_groups_not_used:
6050                 print "/* Group not used: %s = %s */" % (group, groups[group])
6051         print "\n"
6052
6053         # Print the groups table
6054         print "/* Group strings. */"
6055         print "static const char *ncp_groups[] = {"
6056         for group in groups_used_list:
6057                 print '\t/* %02d (%s) */ "%s",' % (groups_used_hash[group], group, groups[group])
6058         print "};\n"
6059
6060         # Print the group macros
6061         for group in groups_used_list:
6062                 name = string.upper(group)
6063                 print "#define NCP_GROUP_%s\t%d" % (name, groups_used_hash[group])
6064         print "\n"
6065
6066
6067         # Print the conditional_records for all Request Conditions.
6068         num = 0
6069         print "/* Request-Condition dfilter records. The NULL pointer"
6070         print "   is replaced by a pointer to the created dfilter_t. */"
6071         if len(global_req_cond) == 0:
6072                 print "static conditional_record req_conds = NULL;"
6073         else:
6074                 print "static conditional_record req_conds[] = {"
6075                 for req_cond in global_req_cond.keys():
6076                         print "\t{ \"%s\", NULL }," % (req_cond,)
6077                         global_req_cond[req_cond] = num
6078                         num = num + 1
6079                 print "};"
6080         print "#define NUM_REQ_CONDS %d" % (num,)
6081         print "#define NO_REQ_COND   NUM_REQ_CONDS\n\n"
6082
6083
6084
6085         # Print PTVC's for bitfields
6086         ett_list = []
6087         print "/* PTVC records for bit-fields. */"
6088         for var in sorted_vars:
6089                 if isinstance(var, bitfield):
6090                         sub_vars_ptvc = var.SubVariablesPTVC()
6091                         print "/* %s */" % (sub_vars_ptvc.Name())
6092                         print sub_vars_ptvc.Code()
6093                         ett_list.append(sub_vars_ptvc.ETTName())
6094
6095
6096         # Print the PTVC's for structures
6097         print "/* PTVC records for structs. */"
6098         # Sort them
6099         svhash = {}
6100         for svar in structs_used_hash.values():
6101                 svhash[svar.HFName()] = svar
6102                 if svar.descr:
6103                         ett_list.append(svar.ETTName())
6104
6105         struct_vars = svhash.keys()
6106         struct_vars.sort()
6107         for varname in struct_vars:
6108                 var = svhash[varname]
6109                 print var.Code()
6110
6111         ett_list.sort()
6112
6113         # Print regular PTVC's
6114         print "/* PTVC records. These are re-used to save space. */"
6115         for ptvc in ptvc_lists.Members():
6116                 if not ptvc.Null() and not ptvc.Empty():
6117                         print ptvc.Code()
6118
6119         # Print error_equivalency tables
6120         print "/* Error-Equivalency Tables. These are re-used to save space. */"
6121         for compcodes in compcode_lists.Members():
6122                 errors = compcodes.Records()
6123                 # Make sure the record for error = 0x00 comes last.
6124                 print "static const error_equivalency %s[] = {" % (compcodes.Name())
6125                 for error in errors:
6126                         error_in_packet = error >> 8;
6127                         ncp_error_index = errors_used_hash[error]
6128                         print "\t{ 0x%02x, %d }, /* 0x%04x */" % (error_in_packet,
6129                                 ncp_error_index, error)
6130                 print "\t{ 0x00, -1 }\n};\n"
6131
6132
6133
6134         # Print integer arrays for all ncp_records that need
6135         # a list of req_cond_indexes. Do it "uniquely" to save space;
6136         # if multiple packets share the same set of req_cond's,
6137         # then they'll share the same integer array
6138         print "/* Request Condition Indexes */"
6139         # First, make them unique
6140         req_cond_collection = UniqueCollection("req_cond_collection")
6141         for pkt in packets:
6142                 req_conds = pkt.CalculateReqConds()
6143                 if req_conds:
6144                         unique_list = req_cond_collection.Add(req_conds)
6145                         pkt.SetReqConds(unique_list)
6146                 else:
6147                         pkt.SetReqConds(None)
6148
6149         # Print them
6150         for req_cond in req_cond_collection.Members():
6151                 print "static const int %s[] = {" % (req_cond.Name(),)
6152                 print "\t",
6153                 vals = []
6154                 for text in req_cond.Records():
6155                         vals.append(global_req_cond[text])
6156                 vals.sort()
6157                 for val in vals:
6158                         print "%s, " % (val,),
6159
6160                 print "-1 };"
6161                 print ""    
6162
6163
6164
6165         # Functions without length parameter
6166         funcs_without_length = {}
6167
6168         # Print info string structures
6169         print "/* Info Strings */"
6170         for pkt in packets:
6171                 if pkt.req_info_str:
6172                         name = pkt.InfoStrName() + "_req"
6173                         var = pkt.req_info_str[0]
6174                         print "static const info_string_t %s = {" % (name,)
6175                         print "\t&%s," % (var.HFName(),)
6176                         print '\t"%s",' % (pkt.req_info_str[1],)
6177                         print '\t"%s"' % (pkt.req_info_str[2],)
6178                         print "};\n"
6179
6180
6181
6182         # Print ncp_record packet records
6183         print "#define SUBFUNC_WITH_LENGTH      0x02"
6184         print "#define SUBFUNC_NO_LENGTH        0x01"
6185         print "#define NO_SUBFUNC               0x00"
6186
6187         print "/* ncp_record structs for packets */"
6188         print "static const ncp_record ncp_packets[] = {" 
6189         for pkt in packets:
6190                 if pkt.HasSubFunction():
6191                         func = pkt.FunctionCode('high')
6192                         if pkt.HasLength():
6193                                 subfunc_string = "SUBFUNC_WITH_LENGTH"
6194                                 # Ensure that the function either has a length param or not
6195                                 if funcs_without_length.has_key(func):
6196                                         sys.exit("Function 0x%04x sometimes has length param, sometimes not." \
6197                                                 % (pkt.FunctionCode(),))
6198                         else:
6199                                 subfunc_string = "SUBFUNC_NO_LENGTH"
6200                                 funcs_without_length[func] = 1
6201                 else:
6202                         subfunc_string = "NO_SUBFUNC"
6203                 print '\t{ 0x%02x, 0x%02x, %s, "%s",' % (pkt.FunctionCode('high'),
6204                         pkt.FunctionCode('low'), subfunc_string, pkt.Description()),
6205
6206                 print '\t%d /* %s */,' % (groups_used_hash[pkt.Group()], pkt.Group())
6207
6208                 ptvc = pkt.PTVCRequest()
6209                 if not ptvc.Null() and not ptvc.Empty():
6210                         ptvc_request = ptvc.Name()
6211                 else:
6212                         ptvc_request = 'NULL'
6213
6214                 ptvc = pkt.PTVCReply()
6215                 if not ptvc.Null() and not ptvc.Empty():
6216                         ptvc_reply = ptvc.Name()
6217                 else:
6218                         ptvc_reply = 'NULL'
6219
6220                 errors = pkt.CompletionCodes()
6221
6222                 req_conds_obj = pkt.GetReqConds()
6223                 if req_conds_obj:
6224                         req_conds = req_conds_obj.Name()
6225                 else:
6226                         req_conds = "NULL"
6227
6228                 if not req_conds_obj:
6229                         req_cond_size = "NO_REQ_COND_SIZE"
6230                 else:
6231                         req_cond_size = pkt.ReqCondSize()
6232                         if req_cond_size == None:
6233                                 msg.write("NCP packet %s nees a ReqCondSize*() call\n" \
6234                                         % (pkt.CName(),))
6235                                 sys.exit(1)
6236                 
6237                 if pkt.req_info_str:
6238                         req_info_str = "&" + pkt.InfoStrName() + "_req"
6239                 else:
6240                         req_info_str = "NULL"
6241
6242                 print '\t\t%s, %s, %s, %s, %s, %s },\n' % \
6243                         (ptvc_request, ptvc_reply, errors.Name(), req_conds,
6244                         req_cond_size, req_info_str)
6245
6246         print '\t{ 0, 0, 0, NULL, 0, NULL, NULL, NULL, NULL, NO_REQ_COND_SIZE, NULL }'
6247         print "};\n"
6248
6249         print "/* ncp funcs that require a subfunc */"
6250         print "static const guint8 ncp_func_requires_subfunc[] = {"
6251         hi_seen = {}
6252         for pkt in packets:
6253                 if pkt.HasSubFunction():
6254                         hi_func = pkt.FunctionCode('high')
6255                         if not hi_seen.has_key(hi_func):
6256                                 print "\t0x%02x," % (hi_func)
6257                                 hi_seen[hi_func] = 1
6258         print "\t0"
6259         print "};\n"
6260
6261
6262         print "/* ncp funcs that have no length parameter */"
6263         print "static const guint8 ncp_func_has_no_length_parameter[] = {"
6264         funcs = funcs_without_length.keys()
6265         funcs.sort()
6266         for func in funcs:
6267                 print "\t0x%02x," % (func,)
6268         print "\t0"
6269         print "};\n"
6270
6271         # final_registration_ncp2222()
6272         print """
6273 void
6274 final_registration_ncp2222(void)
6275 {
6276         int i;
6277         """
6278
6279         # Create dfilter_t's for conditional_record's  
6280         print """
6281         for (i = 0; i < NUM_REQ_CONDS; i++) {
6282                 if (!dfilter_compile((const gchar*)req_conds[i].dfilter_text,
6283                         &req_conds[i].dfilter)) {
6284                         g_message("NCP dissector failed to compiler dfilter: %s\\n",
6285                         req_conds[i].dfilter_text);
6286                         g_assert_not_reached();
6287                 }
6288         }
6289 }
6290         """
6291
6292         # proto_register_ncp2222()
6293         print """
6294 static const value_string ncp_nds_verb_vals[] = {
6295         { 1, "Resolve Name" },
6296         { 2, "Read Entry Information" },
6297         { 3, "Read" },
6298         { 4, "Compare" },
6299         { 5, "List" },
6300         { 6, "Search Entries" },
6301         { 7, "Add Entry" },
6302         { 8, "Remove Entry" },
6303         { 9, "Modify Entry" },
6304         { 10, "Modify RDN" },
6305         { 11, "Create Attribute" },
6306         { 12, "Read Attribute Definition" },
6307         { 13, "Remove Attribute Definition" },
6308         { 14, "Define Class" },
6309         { 15, "Read Class Definition" },
6310         { 16, "Modify Class Definition" },
6311         { 17, "Remove Class Definition" },
6312         { 18, "List Containable Classes" },
6313         { 19, "Get Effective Rights" },
6314         { 20, "Add Partition" },
6315         { 21, "Remove Partition" },
6316         { 22, "List Partitions" },
6317         { 23, "Split Partition" },
6318         { 24, "Join Partitions" },
6319         { 25, "Add Replica" },
6320         { 26, "Remove Replica" },
6321         { 27, "Open Stream" },
6322         { 28, "Search Filter" },
6323         { 29, "Create Subordinate Reference" },
6324         { 30, "Link Replica" },
6325         { 31, "Change Replica Type" },
6326         { 32, "Start Update Schema" },
6327         { 33, "End Update Schema" },
6328         { 34, "Update Schema" },
6329         { 35, "Start Update Replica" },
6330         { 36, "End Update Replica" },
6331         { 37, "Update Replica" },
6332         { 38, "Synchronize Partition" },
6333         { 39, "Synchronize Schema" },
6334         { 40, "Read Syntaxes" },
6335         { 41, "Get Replica Root ID" },
6336         { 42, "Begin Move Entry" },
6337         { 43, "Finish Move Entry" },
6338         { 44, "Release Moved Entry" },
6339         { 45, "Backup Entry" },
6340         { 46, "Restore Entry" },
6341         { 47, "Save DIB" },
6342         { 50, "Close Iteration" },
6343         { 51, "Unused" },
6344         { 52, "Audit Skulking" },
6345         { 53, "Get Server Address" },
6346         { 54, "Set Keys" },
6347         { 55, "Change Password" },
6348         { 56, "Verify Password" },
6349         { 57, "Begin Login" },
6350         { 58, "Finish Login" },
6351         { 59, "Begin Authentication" },
6352         { 60, "Finish Authentication" },
6353         { 61, "Logout" },
6354         { 62, "Repair Ring" },
6355         { 63, "Repair Timestamps" },
6356         { 64, "Create Back Link" },
6357         { 65, "Delete External Reference" },
6358         { 66, "Rename External Reference" },
6359         { 67, "Create Directory Entry" },
6360         { 68, "Remove Directory Entry" },
6361         { 69, "Designate New Master" },
6362         { 70, "Change Tree Name" },
6363         { 71, "Partition Entry Count" },
6364         { 72, "Check Login Restrictions" },
6365         { 73, "Start Join" },
6366         { 74, "Low Level Split" },
6367         { 75, "Low Level Join" },
6368         { 76, "Abort Low Level Join" },
6369         { 77, "Get All Servers" },
6370         { 255, "EDirectory Call" },
6371         { 0,  NULL }
6372 };
6373
6374 void
6375 proto_register_ncp2222(void)
6376 {
6377
6378         static hf_register_info hf[] = {
6379         { &hf_ncp_func,
6380         { "Function", "ncp.func", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
6381
6382         { &hf_ncp_length,
6383         { "Packet Length", "ncp.length", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
6384
6385         { &hf_ncp_subfunc,
6386         { "SubFunction", "ncp.subfunc", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
6387
6388         { &hf_ncp_completion_code,
6389         { "Completion Code", "ncp.completion_code", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
6390
6391         { &hf_ncp_fragment_handle,
6392         { "NDS Fragment Handle", "ncp.ndsfrag", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6393         
6394         { &hf_ncp_fragment_size,
6395         { "NDS Fragment Size", "ncp.ndsfragsize", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6396
6397         { &hf_ncp_message_size,
6398         { "Message Size", "ncp.ndsmessagesize", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6399         
6400         { &hf_ncp_nds_flag,
6401         { "Flags", "ncp.ndsflag", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6402         
6403         { &hf_ncp_nds_verb,      
6404         { "NDS Verb", "ncp.ndsverb", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
6405         
6406         { &hf_ping_version,
6407         { "NDS Version", "ncp.ping_version", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
6408         
6409         { &hf_nds_version,
6410         { "NDS Version", "ncp.nds_version", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6411         
6412         { &hf_nds_tree_name,                             
6413         { "Tree Name", "ncp.nds_tree_name", FT_STRING, BASE_DEC, NULL, 0x0, "", HFILL }},
6414                         
6415         /*
6416          * XXX - the page at
6417          *
6418          *      http://www.odyssea.com/whats_new/tcpipnet/tcpipnet.html
6419          *
6420          * says of the connection status "The Connection Code field may
6421          * contain values that indicate the status of the client host to
6422          * server connection.  A value of 1 in the fourth bit of this data
6423          * byte indicates that the server is unavailable (server was
6424          * downed).
6425          *
6426          * The page at
6427          *
6428          *      http://www.unm.edu/~network/presentations/course/appendix/appendix_f/tsld088.htm
6429          *
6430          * says that bit 0 is "bad service", bit 2 is "no connection
6431          * available", bit 4 is "service down", and bit 6 is "server
6432          * has a broadcast message waiting for the client".
6433          *
6434          * Should it be displayed in hex, and should those bits (and any
6435          * other bits with significance) be displayed as bitfields
6436          * underneath it?
6437          */
6438         { &hf_ncp_connection_status,
6439         { "Connection Status", "ncp.connection_status", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }},
6440
6441         { &hf_ncp_req_frame_num,
6442         { "Response to Request in Frame Number", "ncp.req_frame_num", FT_UINT32, BASE_DEC,
6443                 NULL, 0x0, "", HFILL }},
6444         
6445         { &hf_ncp_req_frame_time,
6446         { "Time from Request", "ncp.time", FT_RELATIVE_TIME, BASE_NONE,
6447                 NULL, 0x0, "Time between request and response in seconds", HFILL }},
6448         
6449         { &hf_nds_flags, 
6450         { "NDS Return Flags", "ncp.nds_flags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6451         
6452        
6453         { &hf_nds_reply_depth,
6454         { "Distance from Root", "ncp.ndsdepth", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6455         
6456         { &hf_nds_reply_rev,
6457         { "NDS Revision", "ncp.ndsrev", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6458         
6459         { &hf_nds_reply_flags,
6460         { "Flags", "ncp.ndsflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6461         
6462         { &hf_nds_p1type, 
6463         { "NDS Parameter Type", "ncp.p1type", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }},
6464         
6465         { &hf_nds_uint32value, 
6466         { "NDS Value", "ncp.uint32value", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6467
6468         { &hf_nds_bit1, 
6469         { "Typeless", "ncp.nds_bit1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6470
6471         { &hf_nds_bit2, 
6472         { "All Containers", "ncp.nds_bit2", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6473                      
6474         { &hf_nds_bit3, 
6475         { "Slashed", "ncp.nds_bit3", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6476         
6477         { &hf_nds_bit4, 
6478         { "Dotted", "ncp.nds_bit4", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6479         
6480         { &hf_nds_bit5, 
6481         { "Tuned", "ncp.nds_bit5", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6482         
6483         { &hf_nds_bit6, 
6484         { "Not Defined", "ncp.nds_bit6", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6485         
6486         { &hf_nds_bit7, 
6487         { "Not Defined", "ncp.nds_bit7", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6488         
6489         { &hf_nds_bit8, 
6490         { "Not Defined", "ncp.nds_bit8", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6491         
6492         { &hf_nds_bit9, 
6493         { "Not Defined", "ncp.nds_bit9", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6494         
6495         { &hf_nds_bit10, 
6496         { "Not Defined", "ncp.nds_bit10", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6497         
6498         { &hf_nds_bit11, 
6499         { "Not Defined", "ncp.nds_bit11", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6500         
6501         { &hf_nds_bit12, 
6502         { "Not Defined", "ncp.nds_bit12", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6503         
6504         { &hf_nds_bit13, 
6505         { "Not Defined", "ncp.nds_bit13", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6506         
6507         { &hf_nds_bit14, 
6508         { "Not Defined", "ncp.nds_bit14", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6509         
6510         { &hf_nds_bit15, 
6511         { "Not Defined", "ncp.nds_bit15", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6512         
6513         { &hf_nds_bit16, 
6514         { "Not Defined", "ncp.nds_bit16", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6515         
6516         { &hf_bit1outflags, 
6517         { "Output Flags", "ncp.bit1outflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6518
6519         { &hf_bit2outflags, 
6520         { "Entry ID", "ncp.bit2outflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6521                      
6522         { &hf_bit3outflags, 
6523         { "Replica State", "ncp.bit3outflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6524         
6525         { &hf_bit4outflags, 
6526         { "Modification Timestamp", "ncp.bit4outflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6527         
6528         { &hf_bit5outflags, 
6529         { "Purge Time", "ncp.bit5outflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6530         
6531         { &hf_bit6outflags, 
6532         { "Local Partition ID", "ncp.bit6outflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6533         
6534         { &hf_bit7outflags, 
6535         { "Distinguished Name", "ncp.bit7outflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6536         
6537         { &hf_bit8outflags, 
6538         { "Replica Type", "ncp.bit8outflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6539         
6540         { &hf_bit9outflags, 
6541         { "Partition Busy", "ncp.bit9outflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6542         
6543         { &hf_bit10outflags, 
6544         { "Not Defined", "ncp.bit10outflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6545         
6546         { &hf_bit11outflags, 
6547         { "Not Defined", "ncp.bit11outflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6548         
6549         { &hf_bit12outflags, 
6550         { "Not Defined", "ncp.bit12outflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6551         
6552         { &hf_bit13outflags, 
6553         { "Not Defined", "ncp.bit13outflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6554         
6555         { &hf_bit14outflags, 
6556         { "Not Defined", "ncp.bit14outflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6557         
6558         { &hf_bit15outflags, 
6559         { "Not Defined", "ncp.bit15outflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6560         
6561         { &hf_bit16outflags, 
6562         { "Not Defined", "ncp.bit16outflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6563         
6564         { &hf_bit1nflags, 
6565         { "Entry ID", "ncp.bit1nflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6566
6567         { &hf_bit2nflags, 
6568         { "Readable", "ncp.bit2nflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6569                      
6570         { &hf_bit3nflags, 
6571         { "Writeable", "ncp.bit3nflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6572         
6573         { &hf_bit4nflags, 
6574         { "Master", "ncp.bit4nflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6575         
6576         { &hf_bit5nflags, 
6577         { "Create ID", "ncp.bit5nflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6578         
6579         { &hf_bit6nflags, 
6580         { "Walk Tree", "ncp.bit6nflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6581         
6582         { &hf_bit7nflags, 
6583         { "Dereference Alias", "ncp.bit7nflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6584         
6585         { &hf_bit8nflags, 
6586         { "Not Defined", "ncp.bit8nflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6587         
6588         { &hf_bit9nflags, 
6589         { "Not Defined", "ncp.bit9nflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6590         
6591         { &hf_bit10nflags, 
6592         { "Not Defined", "ncp.bit10nflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6593         
6594         { &hf_bit11nflags, 
6595         { "Not Defined", "ncp.bit11nflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6596         
6597         { &hf_bit12nflags, 
6598         { "Not Defined", "ncp.bit12nflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6599         
6600         { &hf_bit13nflags, 
6601         { "Not Defined", "ncp.bit13nflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6602         
6603         { &hf_bit14nflags, 
6604         { "Prefer Referrals", "ncp.bit14nflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6605         
6606         { &hf_bit15nflags, 
6607         { "Prefer Only Referrals", "ncp.bit15nflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6608         
6609         { &hf_bit16nflags, 
6610         { "Not Defined", "ncp.bit16nflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6611         
6612         { &hf_bit1rflags, 
6613         { "Typeless", "ncp.bit1rflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6614
6615         { &hf_bit2rflags, 
6616         { "Slashed", "ncp.bit2rflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6617                      
6618         { &hf_bit3rflags, 
6619         { "Dotted", "ncp.bit3rflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6620         
6621         { &hf_bit4rflags, 
6622         { "Tuned", "ncp.bit4rflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6623         
6624         { &hf_bit5rflags, 
6625         { "Not Defined", "ncp.bit5rflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6626         
6627         { &hf_bit6rflags, 
6628         { "Not Defined", "ncp.bit6rflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6629         
6630         { &hf_bit7rflags, 
6631         { "Not Defined", "ncp.bit7rflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6632         
6633         { &hf_bit8rflags, 
6634         { "Not Defined", "ncp.bit8rflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6635         
6636         { &hf_bit9rflags, 
6637         { "Not Defined", "ncp.bit9rflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6638         
6639         { &hf_bit10rflags, 
6640         { "Not Defined", "ncp.bit10rflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6641         
6642         { &hf_bit11rflags, 
6643         { "Not Defined", "ncp.bit11rflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6644         
6645         { &hf_bit12rflags, 
6646         { "Not Defined", "ncp.bit12rflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6647         
6648         { &hf_bit13rflags, 
6649         { "Not Defined", "ncp.bit13rflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6650         
6651         { &hf_bit14rflags, 
6652         { "Not Defined", "ncp.bit14rflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6653         
6654         { &hf_bit15rflags, 
6655         { "Not Defined", "ncp.bit15rflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6656         
6657         { &hf_bit16rflags, 
6658         { "Not Defined", "ncp.bit16rflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6659         
6660         { &hf_bit1eflags, 
6661         { "Alias Entry", "ncp.bit1eflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6662
6663         { &hf_bit2eflags, 
6664         { "Partition Root", "ncp.bit2eflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6665                      
6666         { &hf_bit3eflags, 
6667         { "Container Entry", "ncp.bit3eflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6668         
6669         { &hf_bit4eflags, 
6670         { "Container Alias", "ncp.bit4eflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6671         
6672         { &hf_bit5eflags, 
6673         { "Matches List Filter", "ncp.bit5eflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6674         
6675         { &hf_bit6eflags, 
6676         { "Reference Entry", "ncp.bit6eflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6677         
6678         { &hf_bit7eflags, 
6679         { "40x Reference Entry", "ncp.bit7eflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6680         
6681         { &hf_bit8eflags, 
6682         { "Back Linked", "ncp.bit8eflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6683         
6684         { &hf_bit9eflags, 
6685         { "New Entry", "ncp.bit9eflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6686         
6687         { &hf_bit10eflags, 
6688         { "Temporary Reference", "ncp.bit10eflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6689         
6690         { &hf_bit11eflags, 
6691         { "Audited", "ncp.bit11eflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6692         
6693         { &hf_bit12eflags, 
6694         { "Entry Not Present", "ncp.bit12eflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6695         
6696         { &hf_bit13eflags, 
6697         { "Entry Verify CTS", "ncp.bit13eflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6698         
6699         { &hf_bit14eflags, 
6700         { "Entry Damaged", "ncp.bit14eflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6701         
6702         { &hf_bit15eflags, 
6703         { "Not Defined", "ncp.bit15rflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6704         
6705         { &hf_bit16eflags, 
6706         { "Not Defined", "ncp.bit16rflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6707
6708         { &hf_bit1infoflagsl, 
6709         { "Output Flags", "ncp.bit1infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6710
6711         { &hf_bit2infoflagsl, 
6712         { "Entry ID", "ncp.bit2infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6713                      
6714         { &hf_bit3infoflagsl, 
6715         { "Entry Flags", "ncp.bit3infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6716         
6717         { &hf_bit4infoflagsl, 
6718         { "Subordinate Count", "ncp.bit4infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6719         
6720         { &hf_bit5infoflagsl, 
6721         { "Modification Time", "ncp.bit5infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6722         
6723         { &hf_bit6infoflagsl, 
6724         { "Modification Timestamp", "ncp.bit6infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6725         
6726         { &hf_bit7infoflagsl, 
6727         { "Creation Timestamp", "ncp.bit7infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6728         
6729         { &hf_bit8infoflagsl, 
6730         { "Partition Root ID", "ncp.bit8infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6731         
6732         { &hf_bit9infoflagsl, 
6733         { "Parent ID", "ncp.bit9infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6734         
6735         { &hf_bit10infoflagsl, 
6736         { "Revision Count", "ncp.bit10infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6737         
6738         { &hf_bit11infoflagsl, 
6739         { "Replica Type", "ncp.bit11infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6740         
6741         { &hf_bit12infoflagsl, 
6742         { "Base Class", "ncp.bit12infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6743         
6744         { &hf_bit13infoflagsl, 
6745         { "Relative Distinguished Name", "ncp.bit13infoflagsl", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6746         
6747         { &hf_bit14infoflagsl, 
6748         { "Distinguished Name", "ncp.bit14infoflagsl", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6749         
6750         { &hf_bit15infoflagsl, 
6751         { "Root Distinguished Name", "ncp.bit15infoflagsl", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6752         
6753         { &hf_bit16infoflagsl, 
6754         { "Parent Distinguished Name", "ncp.bit16infoflagsl", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6755
6756         { &hf_bit1infoflagsh, 
6757         { "Purge Time", "ncp.bit1infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6758
6759         { &hf_bit2infoflagsh, 
6760         { "Dereference Base Class", "ncp.bit2infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6761                      
6762         { &hf_bit3infoflagsh, 
6763         { "Not Defined", "ncp.bit3infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6764         
6765         { &hf_bit4infoflagsh, 
6766         { "Not Defined", "ncp.bit4infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6767         
6768         { &hf_bit5infoflagsh, 
6769         { "Not Defined", "ncp.bit5infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6770         
6771         { &hf_bit6infoflagsh, 
6772         { "Not Defined", "ncp.bit6infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6773         
6774         { &hf_bit7infoflagsh, 
6775         { "Not Defined", "ncp.bit7infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6776         
6777         { &hf_bit8infoflagsh, 
6778         { "Not Defined", "ncp.bit8infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6779         
6780         { &hf_bit9infoflagsh, 
6781         { "Not Defined", "ncp.bit9infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6782         
6783         { &hf_bit10infoflagsh, 
6784         { "Not Defined", "ncp.bit10infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6785         
6786         { &hf_bit11infoflagsh, 
6787         { "Not Defined", "ncp.bit11infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6788         
6789         { &hf_bit12infoflagsh, 
6790         { "Not Defined", "ncp.bit12infoflagshs", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6791         
6792         { &hf_bit13infoflagsh, 
6793         { "Not Defined", "ncp.bit13infoflagsh", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6794         
6795         { &hf_bit14infoflagsh, 
6796         { "Not Defined", "ncp.bit14infoflagsh", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6797         
6798         { &hf_bit15infoflagsh, 
6799         { "Not Defined", "ncp.bit15infoflagsh", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6800         
6801         { &hf_bit16infoflagsh, 
6802         { "Not Defined", "ncp.bit16infoflagsh", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6803         
6804         { &hf_bit1lflags, 
6805         { "List Typeless", "ncp.bit1lflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6806
6807         { &hf_bit2lflags, 
6808         { "List Containers", "ncp.bit2lflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6809                      
6810         { &hf_bit3lflags, 
6811         { "List Slashed", "ncp.bit3lflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6812         
6813         { &hf_bit4lflags, 
6814         { "List Dotted", "ncp.bit4lflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6815         
6816         { &hf_bit5lflags, 
6817         { "Dereference Alias", "ncp.bit5lflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6818         
6819         { &hf_bit6lflags, 
6820         { "List All Containers", "ncp.bit6lflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6821         
6822         { &hf_bit7lflags, 
6823         { "List Obsolete", "ncp.bit7lflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6824         
6825         { &hf_bit8lflags, 
6826         { "List Tuned Output", "ncp.bit8lflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6827         
6828         { &hf_bit9lflags, 
6829         { "List External Reference", "ncp.bit9lflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6830         
6831         { &hf_bit10lflags, 
6832         { "Not Defined", "ncp.bit10lflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6833         
6834         { &hf_bit11lflags, 
6835         { "Not Defined", "ncp.bit11lflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6836         
6837         { &hf_bit12lflags, 
6838         { "Not Defined", "ncp.bit12lflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6839         
6840         { &hf_bit13lflags, 
6841         { "Not Defined", "ncp.bit13lflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6842         
6843         { &hf_bit14lflags, 
6844         { "Not Defined", "ncp.bit14lflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6845         
6846         { &hf_bit15lflags, 
6847         { "Not Defined", "ncp.bit15lflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6848         
6849         { &hf_bit16lflags, 
6850         { "Not Defined", "ncp.bit16lflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6851         
6852         { &hf_bit1l1flagsl, 
6853         { "Output Flags", "ncp.bit1l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6854
6855         { &hf_bit2l1flagsl, 
6856         { "Entry ID", "ncp.bit2l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6857                      
6858         { &hf_bit3l1flagsl, 
6859         { "Replica State", "ncp.bit3l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6860         
6861         { &hf_bit4l1flagsl, 
6862         { "Modification Timestamp", "ncp.bit4l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6863         
6864         { &hf_bit5l1flagsl, 
6865         { "Purge Time", "ncp.bit5l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6866         
6867         { &hf_bit6l1flagsl, 
6868         { "Local Partition ID", "ncp.bit6l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6869         
6870         { &hf_bit7l1flagsl, 
6871         { "Distinguished Name", "ncp.bit7l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6872         
6873         { &hf_bit8l1flagsl, 
6874         { "Replica Type", "ncp.bit8l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6875         
6876         { &hf_bit9l1flagsl, 
6877         { "Partition Busy", "ncp.bit9l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6878         
6879         { &hf_bit10l1flagsl, 
6880         { "Not Defined", "ncp.bit10l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6881         
6882         { &hf_bit11l1flagsl, 
6883         { "Not Defined", "ncp.bit11l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6884         
6885         { &hf_bit12l1flagsl, 
6886         { "Not Defined", "ncp.bit12l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6887         
6888         { &hf_bit13l1flagsl, 
6889         { "Not Defined", "ncp.bit13l1flagsl", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6890         
6891         { &hf_bit14l1flagsl, 
6892         { "Not Defined", "ncp.bit14l1flagsl", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6893         
6894         { &hf_bit15l1flagsl, 
6895         { "Not Defined", "ncp.bit15l1flagsl", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6896         
6897         { &hf_bit16l1flagsl, 
6898         { "Not Defined", "ncp.bit16l1flagsl", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6899
6900         { &hf_bit1l1flagsh, 
6901         { "Not Defined", "ncp.bit1l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6902
6903         { &hf_bit2l1flagsh, 
6904         { "Not Defined", "ncp.bit2l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6905                      
6906         { &hf_bit3l1flagsh, 
6907         { "Not Defined", "ncp.bit3l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6908         
6909         { &hf_bit4l1flagsh, 
6910         { "Not Defined", "ncp.bit4l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6911         
6912         { &hf_bit5l1flagsh, 
6913         { "Not Defined", "ncp.bit5l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6914         
6915         { &hf_bit6l1flagsh, 
6916         { "Not Defined", "ncp.bit6l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6917         
6918         { &hf_bit7l1flagsh, 
6919         { "Not Defined", "ncp.bit7l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6920         
6921         { &hf_bit8l1flagsh, 
6922         { "Not Defined", "ncp.bit8l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6923         
6924         { &hf_bit9l1flagsh, 
6925         { "Not Defined", "ncp.bit9l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6926         
6927         { &hf_bit10l1flagsh, 
6928         { "Not Defined", "ncp.bit10l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6929         
6930         { &hf_bit11l1flagsh, 
6931         { "Not Defined", "ncp.bit11l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6932         
6933         { &hf_bit12l1flagsh, 
6934         { "Not Defined", "ncp.bit12l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6935         
6936         { &hf_bit13l1flagsh, 
6937         { "Not Defined", "ncp.bit13l1flagsh", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6938         
6939         { &hf_bit14l1flagsh, 
6940         { "Not Defined", "ncp.bit14l1flagsh", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6941         
6942         { &hf_bit15l1flagsh, 
6943         { "Not Defined", "ncp.bit15l1flagsh", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6944         
6945         { &hf_bit16l1flagsh, 
6946         { "Not Defined", "ncp.bit16l1flagsh", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6947         
6948         { &hf_bit1vflags, 
6949         { "Naming", "ncp.bit1vflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6950
6951         { &hf_bit2vflags, 
6952         { "Base Class", "ncp.bit2vflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6953                      
6954         { &hf_bit3vflags, 
6955         { "Present", "ncp.bit3vflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6956         
6957         { &hf_bit4vflags, 
6958         { "Value Damaged", "ncp.bit4vflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6959         
6960         { &hf_bit5vflags, 
6961         { "Not Defined", "ncp.bit5vflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6962         
6963         { &hf_bit6vflags, 
6964         { "Not Defined", "ncp.bit6vflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6965         
6966         { &hf_bit7vflags, 
6967         { "Not Defined", "ncp.bit7vflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6968         
6969         { &hf_bit8vflags, 
6970         { "Not Defined", "ncp.bit8vflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6971         
6972         { &hf_bit9vflags, 
6973         { "Not Defined", "ncp.bit9vflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6974         
6975         { &hf_bit10vflags, 
6976         { "Not Defined", "ncp.bit10vflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6977         
6978         { &hf_bit11vflags, 
6979         { "Not Defined", "ncp.bit11vflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6980         
6981         { &hf_bit12vflags, 
6982         { "Not Defined", "ncp.bit12vflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6983         
6984         { &hf_bit13vflags, 
6985         { "Not Defined", "ncp.bit13vflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6986         
6987         { &hf_bit14vflags, 
6988         { "Not Defined", "ncp.bit14vflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6989         
6990         { &hf_bit15vflags, 
6991         { "Not Defined", "ncp.bit15vflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6992         
6993         { &hf_bit16vflags, 
6994         { "Not Defined", "ncp.bit16vflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6995         
6996         { &hf_bit1cflags, 
6997         { "Ambiguous Containment", "ncp.bit1cflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6998
6999         { &hf_bit2cflags, 
7000         { "Ambiguous Naming", "ncp.bit2cflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7001                      
7002         { &hf_bit3cflags, 
7003         { "Class Definition Cannot be Removed", "ncp.bit3cflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7004         
7005         { &hf_bit4cflags, 
7006         { "Effective Class", "ncp.bit4cflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7007         
7008         { &hf_bit5cflags, 
7009         { "Container Class", "ncp.bit5cflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7010         
7011         { &hf_bit6cflags, 
7012         { "Not Defined", "ncp.bit6cflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7013         
7014         { &hf_bit7cflags, 
7015         { "Not Defined", "ncp.bit7cflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7016         
7017         { &hf_bit8cflags, 
7018         { "Not Defined", "ncp.bit8cflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7019         
7020         { &hf_bit9cflags, 
7021         { "Not Defined", "ncp.bit9cflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7022         
7023         { &hf_bit10cflags, 
7024         { "Not Defined", "ncp.bit10cflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7025         
7026         { &hf_bit11cflags, 
7027         { "Not Defined", "ncp.bit11cflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7028         
7029         { &hf_bit12cflags, 
7030         { "Not Defined", "ncp.bit12cflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7031         
7032         { &hf_bit13cflags, 
7033         { "Not Defined", "ncp.bit13cflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7034         
7035         { &hf_bit14cflags, 
7036         { "Not Defined", "ncp.bit14cflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7037         
7038         { &hf_bit15cflags, 
7039         { "Not Defined", "ncp.bit15cflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7040         
7041         { &hf_bit16cflags, 
7042         { "Not Defined", "ncp.bit16cflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7043         
7044         { &hf_bit1acflags, 
7045         { "Single Valued", "ncp.bit1acflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7046
7047         { &hf_bit2acflags, 
7048         { "Sized", "ncp.bit2acflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7049                      
7050         { &hf_bit3acflags, 
7051         { "Non-Removable", "ncp.bit3acflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7052         
7053         { &hf_bit4acflags, 
7054         { "Read Only", "ncp.bit4acflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7055         
7056         { &hf_bit5acflags, 
7057         { "Hidden", "ncp.bit5acflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7058         
7059         { &hf_bit6acflags, 
7060         { "String", "ncp.bit6acflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7061         
7062         { &hf_bit7acflags, 
7063         { "Synchronize Immediate", "ncp.bit7acflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7064         
7065         { &hf_bit8acflags, 
7066         { "Public Read", "ncp.bit8acflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7067         
7068         { &hf_bit9acflags, 
7069         { "Server Read", "ncp.bit9acflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7070         
7071         { &hf_bit10acflags, 
7072         { "Write Managed", "ncp.bit10acflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7073         
7074         { &hf_bit11acflags, 
7075         { "Per Replica", "ncp.bit11acflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7076         
7077         { &hf_bit12acflags, 
7078         { "Never Schedule Synchronization", "ncp.bit12acflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7079         
7080         { &hf_bit13acflags, 
7081         { "Operational", "ncp.bit13acflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7082         
7083         { &hf_bit14acflags, 
7084         { "Not Defined", "ncp.bit14acflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7085         
7086         { &hf_bit15acflags, 
7087         { "Not Defined", "ncp.bit15acflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7088         
7089         { &hf_bit16acflags, 
7090         { "Not Defined", "ncp.bit16acflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7091         
7092         
7093         { &hf_nds_reply_error,
7094         { "NDS Error", "ncp.ndsreplyerror", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7095         
7096         { &hf_nds_net,
7097         { "Network","ncp.ndsnet", FT_IPXNET, BASE_NONE, NULL, 0x0, "", HFILL }},
7098
7099         { &hf_nds_node,
7100         { "Node",       "ncp.ndsnode", FT_ETHER, BASE_NONE, NULL, 0x0, "", HFILL }},
7101
7102         { &hf_nds_socket, 
7103         { "Socket",     "ncp.ndssocket", FT_UINT16, BASE_HEX, NULL, 0x0, "", HFILL }},
7104         
7105         { &hf_add_ref_ip,
7106         { "Address Referral", "ncp.ipref", FT_IPv4, BASE_DEC, NULL, 0x0, "", HFILL }},
7107         
7108         { &hf_add_ref_udp,
7109         { "Address Referral", "ncp.udpref", FT_IPv4, BASE_DEC, NULL, 0x0, "", HFILL }},
7110         
7111         { &hf_add_ref_tcp,
7112         { "Address Referral", "ncp.tcpref", FT_IPv4, BASE_DEC, NULL, 0x0, "", HFILL }},
7113         
7114         { &hf_referral_record,
7115         { "Referral Record", "ncp.ref_rec", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7116         
7117         { &hf_referral_addcount,
7118         { "Address Count", "ncp.ref_addcount", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7119         
7120         { &hf_nds_port,                                                                    
7121         { "Port", "ncp.ndsport", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7122         
7123         { &hf_mv_string,                                
7124         { "Attribute Name ", "ncp.mv_string", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7125                           
7126         { &hf_nds_syntax,                                
7127         { "Attribute Syntax ", "ncp.nds_syntax", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7128
7129         { &hf_value_string,                                
7130         { "Value ", "ncp.value_string", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7131         
7132     { &hf_nds_stream_name,                                
7133         { "Stream Name ", "ncp.nds_stream_name", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7134         
7135         { &hf_nds_buffer_size,
7136         { "NDS Reply Buffer Size", "ncp.nds_reply_buf", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7137         
7138         { &hf_nds_ver,
7139         { "NDS Version", "ncp.nds_ver", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7140         
7141         { &hf_nds_nflags,
7142         { "Flags", "ncp.nds_nflags", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7143         
7144     { &hf_nds_rflags,
7145         { "Request Flags", "ncp.nds_rflags", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7146     
7147     { &hf_nds_eflags,
7148         { "Entry Flags", "ncp.nds_eflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7149         
7150         { &hf_nds_scope,
7151         { "Scope", "ncp.nds_scope", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7152         
7153         { &hf_nds_name,
7154         { "Name", "ncp.nds_name", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7155         
7156     { &hf_nds_name_type,
7157         { "Name Type", "ncp.nds_name_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7158         
7159         { &hf_nds_comm_trans,
7160         { "Communications Transport", "ncp.nds_comm_trans", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7161         
7162         { &hf_nds_tree_trans,
7163         { "Tree Walker Transport", "ncp.nds_tree_trans", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7164         
7165         { &hf_nds_iteration,
7166         { "Iteration Handle", "ncp.nds_iteration", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7167         
7168     { &hf_nds_file_handle,
7169         { "File Handle", "ncp.nds_file_handle", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7170         
7171     { &hf_nds_file_size,
7172         { "File Size", "ncp.nds_file_size", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7173         
7174         { &hf_nds_eid,
7175         { "NDS EID", "ncp.nds_eid", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7176         
7177     { &hf_nds_depth,
7178         { "Distance object is from Root", "ncp.nds_depth", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7179         
7180         { &hf_nds_info_type,
7181         { "Info Type", "ncp.nds_info_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7182         
7183     { &hf_nds_class_def_type,
7184         { "Class Definition Type", "ncp.nds_class_def_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7185         
7186         { &hf_nds_all_attr,
7187         { "All Attributes", "ncp.nds_all_attr", FT_UINT32, BASE_DEC, NULL, 0x0, "Return all Attributes?", HFILL }},
7188         
7189     { &hf_nds_return_all_classes,
7190         { "All Classes", "ncp.nds_return_all_classes", FT_STRING, BASE_NONE, NULL, 0x0, "Return all Classes?", HFILL }},
7191         
7192         { &hf_nds_req_flags,                                       
7193         { "Request Flags", "ncp.nds_req_flags", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7194         
7195         { &hf_nds_attr,
7196         { "Attributes", "ncp.nds_attributes", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7197         
7198     { &hf_nds_classes,
7199         { "Classes", "ncp.nds_classes", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7200
7201         { &hf_nds_crc,
7202         { "CRC", "ncp.nds_crc", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7203         
7204         { &hf_nds_referrals,
7205         { "Referrals", "ncp.nds_referrals", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7206         
7207         { &hf_nds_result_flags,
7208         { "Result Flags", "ncp.nds_result_flags", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7209         
7210     { &hf_nds_stream_flags,
7211         { "Streams Flags", "ncp.nds_stream_flags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7212         
7213         { &hf_nds_tag_string,
7214         { "Tags", "ncp.nds_tags", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7215
7216         { &hf_value_bytes,
7217         { "Bytes", "ncp.value_bytes", FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL }},
7218
7219         { &hf_replica_type,
7220         { "Replica Type", "ncp.rtype", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7221
7222         { &hf_replica_state,
7223         { "Replica State", "ncp.rstate", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7224         
7225     { &hf_nds_rnum,
7226         { "Replica Number", "ncp.rnum", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7227
7228         { &hf_nds_revent,
7229         { "Event", "ncp.revent", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7230
7231         { &hf_replica_number,
7232         { "Replica Number", "ncp.rnum", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7233  
7234         { &hf_min_nds_ver,
7235         { "Minimum NDS Version", "ncp.min_nds_version", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7236
7237         { &hf_nds_ver_include,
7238         { "Include NDS Version", "ncp.inc_nds_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7239  
7240         { &hf_nds_ver_exclude,
7241         { "Exclude NDS Version", "ncp.exc_nds_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7242
7243         { &hf_nds_es,
7244         { "Input Entry Specifier", "ncp.nds_es", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7245         
7246         { &hf_es_type,
7247         { "Entry Specifier Type", "ncp.nds_es_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7248
7249         { &hf_rdn_string,
7250         { "RDN", "ncp.nds_rdn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7251
7252         { &hf_delim_string,
7253         { "Delimeter", "ncp.nds_delim", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7254                                  
7255     { &hf_nds_dn_output_type,
7256         { "Output Entry Specifier Type", "ncp.nds_out_es_type", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7257     
7258     { &hf_nds_nested_output_type,
7259         { "Nested Output Entry Specifier Type", "ncp.nds_nested_out_es", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7260     
7261     { &hf_nds_output_delimiter,
7262         { "Output Delimiter", "ncp.nds_out_delimiter", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7263     
7264     { &hf_nds_output_entry_specifier,
7265         { "Output Entry Specifier", "ncp.nds_out_es", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7266     
7267     { &hf_es_value,
7268         { "Entry Specifier Value", "ncp.nds_es_value", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7269
7270     { &hf_es_rdn_count,
7271         { "RDN Count", "ncp.nds_es_rdn_count", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7272     
7273     { &hf_nds_replica_num,
7274         { "Replica Number", "ncp.nds_replica_num", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7275     
7276     { &hf_es_seconds,
7277         { "Seconds", "ncp.nds_es_seconds", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7278
7279     { &hf_nds_event_num,
7280         { "Event Number", "ncp.nds_event_num", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7281
7282     { &hf_nds_compare_results,
7283         { "Compare Results", "ncp.nds_compare_results", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7284     
7285     { &hf_nds_parent,
7286         { "Parent ID", "ncp.nds_parent", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7287
7288     { &hf_nds_name_filter,
7289         { "Name Filter", "ncp.nds_name_filter", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7290
7291     { &hf_nds_class_filter,
7292         { "Class Filter", "ncp.nds_class_filter", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7293
7294     { &hf_nds_time_filter,
7295         { "Time Filter", "ncp.nds_time_filter", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7296
7297     { &hf_nds_partition_root_id,
7298         { "Partition Root ID", "ncp.nds_partition_root_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7299
7300     { &hf_nds_replicas,
7301         { "Replicas", "ncp.nds_replicas", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7302
7303     { &hf_nds_purge,
7304         { "Purge Time", "ncp.nds_purge", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7305
7306     { &hf_nds_local_partition,
7307         { "Local Partition ID", "ncp.nds_local_partition", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7308
7309     { &hf_partition_busy, 
7310     { "Partition Busy", "ncp.nds_partition_busy", FT_BOOLEAN, 16, NULL, 0x0, "", HFILL }},
7311
7312     { &hf_nds_number_of_changes,
7313         { "Number of Attribute Changes", "ncp.nds_number_of_changes", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7314     
7315     { &hf_sub_count,
7316         { "Subordinate Count", "ncp.sub_count", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7317     
7318     { &hf_nds_revision,
7319         { "Revision Count", "ncp.nds_rev_count", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7320     
7321     { &hf_nds_base_class,
7322         { "Base Class", "ncp.nds_base_class", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7323     
7324     { &hf_nds_relative_dn,
7325         { "Relative Distinguished Name", "ncp.nds_relative_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7326     
7327     { &hf_nds_root_dn,
7328         { "Root Distinguished Name", "ncp.nds_root_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7329     
7330     { &hf_nds_parent_dn,
7331         { "Parent Distinguished Name", "ncp.nds_parent_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7332     
7333     { &hf_deref_base, 
7334     { "Dereference Base Class", "ncp.nds_deref_base", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7335     
7336     { &hf_nds_base, 
7337     { "Base Class", "ncp.nds_base", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7338     
7339     { &hf_nds_super, 
7340     { "Super Class", "ncp.nds_super", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7341     
7342     { &hf_nds_entry_info, 
7343     { "Entry Information", "ncp.nds_entry_info", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7344     
7345     { &hf_nds_privileges, 
7346     { "Privileges", "ncp.nds_privileges", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7347     
7348     { &hf_nds_vflags, 
7349     { "Value Flags", "ncp.nds_vflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7350     
7351     { &hf_nds_value_len, 
7352     { "Value Length", "ncp.nds_vlength", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7353     
7354     { &hf_nds_cflags, 
7355     { "Class Flags", "ncp.nds_cflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7356         
7357     { &hf_nds_asn1,
7358         { "ASN.1 ID", "ncp.nds_asn1", FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL }},
7359
7360     { &hf_nds_acflags, 
7361     { "Attribute Constraint Flags", "ncp.nds_acflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7362     
7363     { &hf_nds_upper, 
7364     { "Upper Limit Value", "ncp.nds_upper", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7365     
7366     { &hf_nds_lower, 
7367     { "Lower Limit Value", "ncp.nds_lower", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7368     
7369     { &hf_nds_trustee_dn,
7370         { "Trustee Distinguished Name", "ncp.nds_trustee_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7371     
7372     { &hf_nds_attribute_dn,
7373         { "Attribute Name", "ncp.nds_attribute_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7374     
7375     { &hf_nds_acl_add,
7376         { "Access Control Lists to Add", "ncp.nds_acl_add", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7377     
7378     { &hf_nds_acl_del,
7379         { "Access Control Lists to Delete", "ncp.nds_acl_del", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7380     
7381     { &hf_nds_att_add,
7382         { "Attribute to Add", "ncp.nds_att_add", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7383     
7384     { &hf_nds_att_del,
7385         { "Attribute to Delete", "ncp.nds_att_del", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7386     
7387     { &hf_nds_keep, 
7388     { "Delete Original RDN", "ncp.nds_keep", FT_BOOLEAN, 32, NULL, 0x0, "", HFILL }},
7389     
7390     { &hf_nds_new_rdn,
7391         { "New Relative Distinguished Name", "ncp.nds_new_rdn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7392     
7393     { &hf_nds_time_delay,
7394         { "Time Delay", "ncp.nds_time_delay", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7395     
7396     { &hf_nds_root_name,
7397         { "Root Most Object Name", "ncp.nds_root_name", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7398     
7399     { &hf_nds_new_part_id,
7400         { "New Partition Root ID", "ncp.nds_new_part_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7401     
7402     { &hf_nds_child_part_id,
7403         { "Child Partition Root ID", "ncp.nds_child_part_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7404     
7405     { &hf_nds_master_part_id,
7406         { "Master Partition Root ID", "ncp.nds_master_part_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7407     
7408     { &hf_nds_target_name,
7409         { "Target Server Name", "ncp.nds_target_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7410
7411
7412         { &hf_bit1pingflags1, 
7413         { "Supported Fields", "ncp.bit1pingflags1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7414
7415         { &hf_bit2pingflags1, 
7416         { "Depth", "ncp.bit2pingflags1", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7417                      
7418         { &hf_bit3pingflags1, 
7419         { "Revision", "ncp.bit3pingflags1", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7420         
7421         { &hf_bit4pingflags1, 
7422         { "Flags", "ncp.bit4pingflags1", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7423         
7424         { &hf_bit5pingflags1, 
7425         { "Verification Flags", "ncp.bit5pingflags1", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7426         
7427         { &hf_bit6pingflags1, 
7428         { "Letter Version", "ncp.bit6pingflags1", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7429         
7430         { &hf_bit7pingflags1, 
7431         { "OS Version", "ncp.bit7pingflags1", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7432         
7433         { &hf_bit8pingflags1, 
7434         { "License Flags", "ncp.bit8pingflags1", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7435         
7436         { &hf_bit9pingflags1, 
7437         { "DS Time", "ncp.bit9pingflags1", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7438         
7439         { &hf_bit10pingflags1, 
7440         { "Not Defined", "ncp.bit10pingflags1", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7441         
7442         { &hf_bit11pingflags1, 
7443         { "Not Defined", "ncp.bit11pingflags1", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7444         
7445         { &hf_bit12pingflags1, 
7446         { "Not Defined", "ncp.bit12pingflags1", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7447         
7448         { &hf_bit13pingflags1, 
7449         { "Not Defined", "ncp.bit13pingflags1", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7450         
7451         { &hf_bit14pingflags1, 
7452         { "Not Defined", "ncp.bit14pingflags1", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7453         
7454         { &hf_bit15pingflags1, 
7455         { "Not Defined", "ncp.bit15pingflags1", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7456         
7457         { &hf_bit16pingflags1, 
7458         { "Not Defined", "ncp.bit16pingflags1", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7459
7460         { &hf_bit1pingflags2, 
7461         { "Sap Name", "ncp.bit1pingflags2", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7462
7463         { &hf_bit2pingflags2, 
7464         { "Tree Name", "ncp.bit2pingflags2", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7465                      
7466         { &hf_bit3pingflags2, 
7467         { "OS Name", "ncp.bit3pingflags2", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7468         
7469         { &hf_bit4pingflags2, 
7470         { "Hardware Name", "ncp.bit4pingflags2", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7471         
7472         { &hf_bit5pingflags2, 
7473         { "Vendor Name", "ncp.bit5pingflags2", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7474         
7475         { &hf_bit6pingflags2, 
7476         { "Not Defined", "ncp.bit6pingflags2", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7477         
7478         { &hf_bit7pingflags2, 
7479         { "Not Defined", "ncp.bit7pingflags2", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7480         
7481         { &hf_bit8pingflags2, 
7482         { "Not Defined", "ncp.bit8pingflags2", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7483         
7484         { &hf_bit9pingflags2, 
7485         { "Not Defined", "ncp.bit9pingflags2", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7486         
7487         { &hf_bit10pingflags2, 
7488         { "Not Defined", "ncp.bit10pingflags2", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7489         
7490         { &hf_bit11pingflags2, 
7491         { "Not Defined", "ncp.bit11pingflags2", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7492         
7493         { &hf_bit12pingflags2, 
7494         { "Not Defined", "ncp.bit12pingflags2", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7495         
7496         { &hf_bit13pingflags2, 
7497         { "Not Defined", "ncp.bit13pingflags2", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7498         
7499         { &hf_bit14pingflags2, 
7500         { "Not Defined", "ncp.bit14pingflags2", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7501         
7502         { &hf_bit15pingflags2, 
7503         { "Not Defined", "ncp.bit15pingflags2", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7504         
7505         { &hf_bit16pingflags2, 
7506         { "Not Defined", "ncp.bit16pingflags2", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7507      
7508         { &hf_bit1pingpflags1, 
7509         { "Root Most Master Replica", "ncp.bit1pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7510
7511         { &hf_bit2pingpflags1, 
7512         { "Time Synchronized", "ncp.bit2pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7513                      
7514         { &hf_bit3pingpflags1, 
7515         { "Not Defined", "ncp.bit3pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7516         
7517         { &hf_bit4pingpflags1, 
7518         { "Not Defined", "ncp.bit4pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7519         
7520         { &hf_bit5pingpflags1, 
7521         { "Not Defined", "ncp.bit5pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7522         
7523         { &hf_bit6pingpflags1, 
7524         { "Not Defined", "ncp.bit6pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7525         
7526         { &hf_bit7pingpflags1, 
7527         { "Not Defined", "ncp.bit7pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7528         
7529         { &hf_bit8pingpflags1, 
7530         { "Not Defined", "ncp.bit8pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7531         
7532         { &hf_bit9pingpflags1, 
7533         { "Not Defined", "ncp.bit9pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7534         
7535         { &hf_bit10pingpflags1, 
7536         { "Not Defined", "ncp.bit10pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7537         
7538         { &hf_bit11pingpflags1, 
7539         { "Not Defined", "ncp.bit11pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7540         
7541         { &hf_bit12pingpflags1, 
7542         { "Not Defined", "ncp.bit12pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7543         
7544         { &hf_bit13pingpflags1, 
7545         { "Not Defined", "ncp.bit13pingpflags1", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7546         
7547         { &hf_bit14pingpflags1, 
7548         { "Not Defined", "ncp.bit14pingpflags1", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7549         
7550         { &hf_bit15pingpflags1, 
7551         { "Not Defined", "ncp.bit15pingpflags1", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7552         
7553         { &hf_bit16pingpflags1, 
7554         { "Not Defined", "ncp.bit16pingpflags1", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7555     
7556         { &hf_bit1pingvflags1, 
7557         { "Checksum", "ncp.bit1pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7558
7559         { &hf_bit2pingvflags1, 
7560         { "CRC32", "ncp.bit2pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7561                      
7562         { &hf_bit3pingvflags1, 
7563         { "Not Defined", "ncp.bit3pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7564         
7565         { &hf_bit4pingvflags1, 
7566         { "Not Defined", "ncp.bit4pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7567         
7568         { &hf_bit5pingvflags1, 
7569         { "Not Defined", "ncp.bit5pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7570         
7571         { &hf_bit6pingvflags1, 
7572         { "Not Defined", "ncp.bit6pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7573         
7574         { &hf_bit7pingvflags1, 
7575         { "Not Defined", "ncp.bit7pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7576         
7577         { &hf_bit8pingvflags1, 
7578         { "Not Defined", "ncp.bit8pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7579         
7580         { &hf_bit9pingvflags1, 
7581         { "Not Defined", "ncp.bit9pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7582         
7583         { &hf_bit10pingvflags1, 
7584         { "Not Defined", "ncp.bit10pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7585         
7586         { &hf_bit11pingvflags1, 
7587         { "Not Defined", "ncp.bit11pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7588         
7589         { &hf_bit12pingvflags1, 
7590         { "Not Defined", "ncp.bit12pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7591         
7592         { &hf_bit13pingvflags1, 
7593         { "Not Defined", "ncp.bit13pingvflags1", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7594         
7595         { &hf_bit14pingvflags1, 
7596         { "Not Defined", "ncp.bit14pingvflags1", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7597         
7598         { &hf_bit15pingvflags1, 
7599         { "Not Defined", "ncp.bit15pingvflags1", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7600         
7601         { &hf_bit16pingvflags1, 
7602         { "Not Defined", "ncp.bit16pingvflags1", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7603
7604     { &hf_nds_letter_ver,
7605         { "Letter Version", "ncp.nds_letter_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7606     
7607     { &hf_nds_os_ver,
7608         { "OS Version", "ncp.nds_os_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7609     
7610     { &hf_nds_lic_flags,
7611         { "License Flags", "ncp.nds_lic_flags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7612     
7613     { &hf_nds_ds_time,
7614         { "DS Time", "ncp.nds_ds_time", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7615     
7616     { &hf_nds_ping_version,
7617         { "Ping Version", "ncp.nds_ping_version", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7618
7619
7620   
7621  """                
7622         # Print the registration code for the hf variables
7623         for var in sorted_vars:
7624                 print "\t{ &%s," % (var.HFName())
7625                 print "\t{ \"%s\", \"%s\", %s, %s, %s, 0x%x, \"\", HFILL }},\n" % \
7626                         (var.Description(), var.DFilter(),
7627                         var.EtherealFType(), var.Display(), var.ValuesName(),
7628                         var.Mask())
7629
7630         print "\t};\n"
7631  
7632         if ett_list:
7633                 print "\tstatic gint *ett[] = {"
7634
7635                 for ett in ett_list:
7636                         print "\t\t&%s," % (ett,)
7637
7638                 print "\t};\n"
7639                        
7640         print """
7641         proto_register_field_array(proto_ncp, hf, array_length(hf));
7642         """
7643
7644         if ett_list:
7645                 print """
7646         proto_register_subtree_array(ett, array_length(ett));
7647                 """
7648
7649         print """
7650         register_init_routine(&ncp_init_protocol);
7651         register_postseq_cleanup_routine(&ncp_postseq_cleanup);
7652         register_final_registration_routine(final_registration_ncp2222);
7653         """
7654
7655         
7656         # End of proto_register_ncp2222()
7657         print "}"
7658         print ""
7659         print '#include "packet-ncp2222.inc"'
7660
7661 def usage():
7662         print "Usage: ncp2222.py -o output_file"
7663         sys.exit(1)
7664
7665 def main():
7666         global compcode_lists
7667         global ptvc_lists
7668         global msg
7669
7670         optstring = "o:"
7671         out_filename = None
7672
7673         try:
7674                 opts, args = getopt.getopt(sys.argv[1:], optstring)
7675         except getopt.error:
7676                 usage()
7677
7678         for opt, arg in opts:
7679                 if opt == "-o":
7680                         out_filename = arg
7681                 else:
7682                         usage()
7683
7684         if len(args) != 0:
7685                 usage()
7686
7687         if not out_filename:
7688                 usage()
7689
7690         # Create the output file
7691         try:
7692                 out_file = open(out_filename, "w")
7693         except IOError, err:
7694                 sys.exit("Could not open %s for writing: %s" % (out_filename,
7695                         err))
7696
7697         # Set msg to current stdout
7698         msg = sys.stdout
7699
7700         # Set stdout to the output file
7701         sys.stdout = out_file
7702
7703         msg.write("Processing NCP definitions...\n")
7704         # Run the code, and if we catch any exception,
7705         # erase the output file.
7706         try:
7707                 compcode_lists  = UniqueCollection('Completion Code Lists')
7708                 ptvc_lists      = UniqueCollection('PTVC Lists')
7709
7710                 define_errors()
7711                 define_groups()         
7712                 
7713                 define_ncp2222()
7714
7715                 msg.write("Defined %d NCP types.\n" % (len(packets),))
7716                 produce_code()
7717         except:
7718                 traceback.print_exc(20, msg)
7719                 try:
7720                         out_file.close()
7721                 except IOError, err:
7722                         msg.write("Could not close %s: %s\n" % (out_filename, err))
7723
7724                 try:
7725                         if os.path.exists(out_filename):
7726                                 os.remove(out_filename)
7727                 except OSError, err:
7728                         msg.write("Could not remove %s: %s\n" % (out_filename, err))
7729
7730                 sys.exit(1)
7731
7732
7733
7734 def define_ncp2222():
7735         ##############################################################################
7736         # NCP Packets. Here I list functions and subfunctions in hexadecimal like the
7737         # NCP book (and I believe LanAlyzer does this too).
7738         # However, Novell lists these in decimal in their on-line documentation.
7739         ##############################################################################
7740         # 2222/01
7741         pkt = NCP(0x01, "File Set Lock", 'file')
7742         pkt.Request(7)
7743         pkt.Reply(8)
7744         pkt.CompletionCodes([0x0000])
7745         # 2222/02
7746         pkt = NCP(0x02, "File Release Lock", 'file')
7747         pkt.Request(7)
7748         pkt.Reply(8)
7749         pkt.CompletionCodes([0x0000, 0xff00])
7750         # 2222/03
7751         pkt = NCP(0x03, "Log File Exclusive", 'file')
7752         pkt.Request( (12, 267), [
7753                 rec( 7, 1, DirHandle ),
7754                 rec( 8, 1, LockFlag ),
7755                 rec( 9, 2, TimeoutLimit, BE ),
7756                 rec( 11, (1, 256), FilePath ),
7757         ])
7758         pkt.Reply(8)
7759         pkt.CompletionCodes([0x0000, 0x8200, 0x9600, 0xfe0d, 0xff01])
7760         # 2222/04
7761         pkt = NCP(0x04, "Lock File Set", 'file')
7762         pkt.Request( 9, [
7763                 rec( 7, 2, TimeoutLimit ),
7764         ])
7765         pkt.Reply(8)
7766         pkt.CompletionCodes([0x0000, 0xfe0d, 0xff01])
7767         ## 2222/05
7768         pkt = NCP(0x05, "Release File", 'file')
7769         pkt.Request( (9, 264), [
7770                 rec( 7, 1, DirHandle ),
7771                 rec( 8, (1, 256), FilePath ),
7772         ])
7773         pkt.Reply(8)
7774         pkt.CompletionCodes([0x0000, 0x9b00, 0x9c03, 0xff1a])
7775         # 2222/06
7776         pkt = NCP(0x06, "Release File Set", 'file')
7777         pkt.Request( 8, [
7778                 rec( 7, 1, LockFlag ),
7779         ])
7780         pkt.Reply(8)
7781         pkt.CompletionCodes([0x0000])
7782         # 2222/07
7783         pkt = NCP(0x07, "Clear File", 'file')
7784         pkt.Request( (9, 264), [
7785                 rec( 7, 1, DirHandle ),
7786                 rec( 8, (1, 256), FilePath ),
7787         ])
7788         pkt.Reply(8)
7789         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03,
7790                 0xa100, 0xfd00, 0xff1a])
7791         # 2222/08
7792         pkt = NCP(0x08, "Clear File Set", 'file')
7793         pkt.Request( 8, [
7794                 rec( 7, 1, LockFlag ),
7795         ])
7796         pkt.Reply(8)
7797         pkt.CompletionCodes([0x0000])
7798         # 2222/09
7799         pkt = NCP(0x09, "Log Logical Record", 'file')
7800         pkt.Request( (11, 138), [
7801                 rec( 7, 1, LockFlag ),
7802                 rec( 8, 2, TimeoutLimit, BE ),
7803                 rec( 10, (1, 128), LogicalRecordName ),
7804         ], info_str=(LogicalRecordName, "Log Logical Record: %s", ", %s"))
7805         pkt.Reply(8)
7806         pkt.CompletionCodes([0x0000, 0x9600, 0xfe0d, 0xff1a])
7807         # 2222/0A, 10
7808         pkt = NCP(0x0A, "Lock Logical Record Set", 'file')
7809         pkt.Request( 10, [
7810                 rec( 7, 1, LockFlag ),
7811                 rec( 8, 2, TimeoutLimit ),
7812         ])
7813         pkt.Reply(8)
7814         pkt.CompletionCodes([0x0000, 0xfe0d, 0xff1a])
7815         # 2222/0B, 11
7816         pkt = NCP(0x0B, "Clear Logical Record", 'file')
7817         pkt.Request( (8, 135), [
7818                 rec( 7, (1, 128), LogicalRecordName ),
7819         ], info_str=(LogicalRecordName, "Clear Logical Record: %s", ", %s"))
7820         pkt.Reply(8)
7821         pkt.CompletionCodes([0x0000, 0xff1a])
7822         # 2222/0C, 12
7823         pkt = NCP(0x0C, "Release Logical Record", 'file')
7824         pkt.Request( (8, 135), [
7825                 rec( 7, (1, 128), LogicalRecordName ),
7826         ], info_str=(LogicalRecordName, "Release Logical Record: %s", ", %s"))
7827         pkt.Reply(8)
7828         pkt.CompletionCodes([0x0000, 0xff1a])
7829         # 2222/0D, 13
7830         pkt = NCP(0x0D, "Release Logical Record Set", 'file')
7831         pkt.Request( 8, [
7832                 rec( 7, 1, LockFlag ),
7833         ])
7834         pkt.Reply(8)
7835         pkt.CompletionCodes([0x0000])
7836         # 2222/0E, 14
7837         pkt = NCP(0x0E, "Clear Logical Record Set", 'file')
7838         pkt.Request( 8, [
7839                 rec( 7, 1, LockFlag ),
7840         ])
7841         pkt.Reply(8)
7842         pkt.CompletionCodes([0x0000])
7843         # 2222/1100, 17/00
7844         pkt = NCP(0x1100, "Write to Spool File", 'qms')
7845         pkt.Request( (11, 16), [
7846                 rec( 10, ( 1, 6 ), Data ),
7847         ], info_str=(Data, "Write to Spool File: %s", ", %s"))
7848         pkt.Reply(8)
7849         pkt.CompletionCodes([0x0000, 0x0104, 0x8000, 0x8101, 0x8701, 0x8800,
7850                              0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9400, 0x9500,
7851                              0x9600, 0x9804, 0x9900, 0xa100, 0xa201, 0xff19])
7852         # 2222/1101, 17/01
7853         pkt = NCP(0x1101, "Close Spool File", 'qms')
7854         pkt.Request( 11, [
7855                 rec( 10, 1, AbortQueueFlag ),
7856         ])
7857         pkt.Reply(8)      
7858         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8701, 0x8800, 0x8d00,
7859                              0x8e00, 0x8f00, 0x9001, 0x9300, 0x9400, 0x9500,
7860                              0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03, 0x9d00,
7861                              0xa100, 0xd000, 0xd100, 0xd202, 0xd300, 0xd400,
7862                              0xda01, 0xe800, 0xea00, 0xeb00, 0xec00, 0xfc06,
7863                              0xfd00, 0xfe07, 0xff06])
7864         # 2222/1102, 17/02
7865         pkt = NCP(0x1102, "Set Spool File Flags", 'qms')
7866         pkt.Request( 30, [
7867                 rec( 10, 1, PrintFlags ),
7868                 rec( 11, 1, TabSize ),
7869                 rec( 12, 1, TargetPrinter ),
7870                 rec( 13, 1, Copies ),
7871                 rec( 14, 1, FormType ),
7872                 rec( 15, 1, Reserved ),
7873                 rec( 16, 14, BannerName ),
7874         ])
7875         pkt.Reply(8)
7876         pkt.CompletionCodes([0x0000, 0x9600, 0xd202, 0xd300, 0xe800, 0xea00,
7877                              0xeb00, 0xec00, 0xfc06, 0xfe07, 0xff06])
7878
7879         # 2222/1103, 17/03
7880         pkt = NCP(0x1103, "Spool A Disk File", 'qms')
7881         pkt.Request( (12, 23), [
7882                 rec( 10, 1, DirHandle ),
7883                 rec( 11, (1, 12), Data ),
7884         ], info_str=(Data, "Spool a Disk File: %s", ", %s"))
7885         pkt.Reply(8)
7886         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8701, 0x8800, 0x8d00,
7887                              0x8e00, 0x8f00, 0x9001, 0x9300, 0x9400, 0x9500,
7888                              0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03, 0x9d00,
7889                              0xa100, 0xd000, 0xd100, 0xd202, 0xd300, 0xd400,
7890                              0xda01, 0xe800, 0xea00, 0xeb00, 0xec00, 0xfc06,
7891                              0xfd00, 0xfe07, 0xff06])
7892
7893         # 2222/1106, 17/06
7894         pkt = NCP(0x1106, "Get Printer Status", 'qms')
7895         pkt.Request( 11, [
7896                 rec( 10, 1, TargetPrinter ),
7897         ])
7898         pkt.Reply(12, [
7899                 rec( 8, 1, PrinterHalted ),
7900                 rec( 9, 1, PrinterOffLine ),
7901                 rec( 10, 1, CurrentFormType ),
7902                 rec( 11, 1, RedirectedPrinter ),
7903         ])
7904         pkt.CompletionCodes([0x0000, 0x9600, 0xfb05, 0xfd00, 0xff06])
7905
7906         # 2222/1109, 17/09
7907         pkt = NCP(0x1109, "Create Spool File", 'qms')
7908         pkt.Request( (12, 23), [
7909                 rec( 10, 1, DirHandle ),
7910                 rec( 11, (1, 12), Data ),
7911         ], info_str=(Data, "Create Spool File: %s", ", %s"))
7912         pkt.Reply(8)
7913         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8400, 0x8701, 0x8d00,
7914                              0x8f00, 0x9001, 0x9400, 0x9600, 0x9804, 0x9900,
7915                              0x9b03, 0x9c03, 0xa100, 0xd000, 0xd100, 0xd202,
7916                              0xd300, 0xd400, 0xda01, 0xe800, 0xea00, 0xeb00,
7917                              0xec00, 0xfc06, 0xfd00, 0xfe07, 0xff06])
7918
7919         # 2222/110A, 17/10
7920         pkt = NCP(0x110A, "Get Printer's Queue", 'qms')
7921         pkt.Request( 11, [
7922                 rec( 10, 1, TargetPrinter ),
7923         ])
7924         pkt.Reply( 12, [
7925                 rec( 8, 4, ObjectID, BE ),
7926         ])
7927         pkt.CompletionCodes([0x0000, 0x9600, 0xff06])
7928
7929         # 2222/12, 18
7930         pkt = NCP(0x12, "Get Volume Info with Number", 'file')
7931         pkt.Request( 8, [
7932                 rec( 7, 1, VolumeNumber )
7933         ],info_str=(VolumeNumber, "Get Volume Information for Volume %d", ", %d"))
7934         pkt.Reply( 36, [
7935                 rec( 8, 2, SectorsPerCluster, BE ),
7936                 rec( 10, 2, TotalVolumeClusters, BE ),
7937                 rec( 12, 2, AvailableClusters, BE ),
7938                 rec( 14, 2, TotalDirectorySlots, BE ),
7939                 rec( 16, 2, AvailableDirectorySlots, BE ),
7940                 rec( 18, 16, VolumeName ),
7941                 rec( 34, 2, RemovableFlag, BE ),
7942         ])
7943         pkt.CompletionCodes([0x0000, 0x9804])
7944
7945         # 2222/13, 19
7946         pkt = NCP(0x13, "Get Station Number", 'connection')
7947         pkt.Request(7)
7948         pkt.Reply(11, [
7949                 rec( 8, 3, StationNumber )
7950         ])
7951         pkt.CompletionCodes([0x0000, 0xff00])
7952
7953         # 2222/14, 20
7954         pkt = NCP(0x14, "Get File Server Date And Time", 'fileserver')
7955         pkt.Request(7)
7956         pkt.Reply(15, [
7957                 rec( 8, 1, Year ),
7958                 rec( 9, 1, Month ),
7959                 rec( 10, 1, Day ),
7960                 rec( 11, 1, Hour ),
7961                 rec( 12, 1, Minute ),
7962                 rec( 13, 1, Second ),
7963                 rec( 14, 1, DayOfWeek ),
7964         ])
7965         pkt.CompletionCodes([0x0000])
7966
7967         # 2222/1500, 21/00
7968         pkt = NCP(0x1500, "Send Broadcast Message", 'message')
7969         pkt.Request((13, 70), [
7970                 rec( 10, 1, ClientListLen, var="x" ),
7971                 rec( 11, 1, TargetClientList, repeat="x" ),
7972                 rec( 12, (1, 58), TargetMessage ),
7973         ], info_str=(TargetMessage, "Send Broadcast Message: %s", ", %s"))
7974         pkt.Reply(10, [
7975                 rec( 8, 1, ClientListLen, var="x" ),
7976                 rec( 9, 1, SendStatus, repeat="x" )
7977         ])
7978         pkt.CompletionCodes([0x0000, 0xfd00])
7979
7980         # 2222/1501, 21/01
7981         pkt = NCP(0x1501, "Get Broadcast Message", 'message')
7982         pkt.Request(10)
7983         pkt.Reply((9,66), [
7984                 rec( 8, (1, 58), TargetMessage )
7985         ])
7986         pkt.CompletionCodes([0x0000, 0xfd00])
7987
7988         # 2222/1502, 21/02
7989         pkt = NCP(0x1502, "Disable Broadcasts", 'message')
7990         pkt.Request(10)
7991         pkt.Reply(8)
7992         pkt.CompletionCodes([0x0000])
7993
7994         # 2222/1503, 21/03
7995         pkt = NCP(0x1503, "Enable Broadcasts", 'message')
7996         pkt.Request(10)
7997         pkt.Reply(8)
7998         pkt.CompletionCodes([0x0000])
7999
8000         # 2222/1509, 21/09
8001         pkt = NCP(0x1509, "Broadcast To Console", 'message')
8002         pkt.Request((11, 68), [
8003                 rec( 10, (1, 58), TargetMessage )
8004         ], info_str=(TargetMessage, "Broadcast to Console: %s", ", %s"))
8005         pkt.Reply(8)
8006         pkt.CompletionCodes([0x0000])
8007         # 2222/150A, 21/10
8008         pkt = NCP(0x150A, "Send Broadcast Message", 'message')
8009         pkt.Request((17, 74), [
8010                 rec( 10, 2, ClientListCount, LE, var="x" ),
8011                 rec( 12, 4, ClientList, LE, repeat="x" ),
8012                 rec( 16, (1, 58), TargetMessage ),
8013         ], info_str=(TargetMessage, "Send Broadcast Message: %s", ", %s"))
8014         pkt.Reply(14, [
8015                 rec( 8, 2, ClientListCount, LE, var="x" ),
8016                 rec( 10, 4, ClientCompFlag, LE, repeat="x" ),
8017         ])
8018         pkt.CompletionCodes([0x0000, 0xfd00])
8019
8020         # 2222/150B, 21/11
8021         pkt = NCP(0x150B, "Get Broadcast Message", 'message')
8022         pkt.Request(10)
8023         pkt.Reply((9,66), [
8024                 rec( 8, (1, 58), TargetMessage )
8025         ])
8026         pkt.CompletionCodes([0x0000, 0xfd00])
8027
8028         # 2222/150C, 21/12
8029         pkt = NCP(0x150C, "Connection Message Control", 'message')
8030         pkt.Request(22, [
8031                 rec( 10, 1, ConnectionControlBits ),
8032                 rec( 11, 3, Reserved3 ),
8033                 rec( 14, 4, ConnectionListCount, LE, var="x" ),
8034                 rec( 18, 4, ConnectionList, LE, repeat="x" ),
8035         ])
8036         pkt.Reply(8)
8037         pkt.CompletionCodes([0x0000, 0xff00])
8038
8039         # 2222/1600, 22/0
8040         pkt = NCP(0x1600, "Set Directory Handle", 'fileserver')
8041         pkt.Request((13,267), [
8042                 rec( 10, 1, TargetDirHandle ),
8043                 rec( 11, 1, DirHandle ),
8044                 rec( 12, (1, 255), Path ),
8045         ], info_str=(Path, "Set Directory Handle to: %s", ", %s"))
8046         pkt.Reply(8)
8047         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8048                              0xfd00, 0xff00])
8049
8050
8051         # 2222/1601, 22/1
8052         pkt = NCP(0x1601, "Get Directory Path", 'fileserver')
8053         pkt.Request(11, [
8054                 rec( 10, 1, DirHandle ),
8055         ],info_str=(DirHandle, "Get Directory Path for Directory Handle %d", ", %d"))
8056         pkt.Reply((9,263), [
8057                 rec( 8, (1,255), Path ),
8058         ])
8059         pkt.CompletionCodes([0x0000, 0x9600, 0x9b00, 0x9c00, 0xa100])
8060
8061         # 2222/1602, 22/2
8062         pkt = NCP(0x1602, "Scan Directory Information", 'fileserver')
8063         pkt.Request((14,268), [
8064                 rec( 10, 1, DirHandle ),
8065                 rec( 11, 2, StartingSearchNumber, BE ),
8066                 rec( 13, (1, 255), Path ),
8067         ], info_str=(Path, "Scan Directory Information: %s", ", %s"))
8068         pkt.Reply(36, [
8069                 rec( 8, 16, DirectoryPath ),
8070                 rec( 24, 2, CreationDate, BE ),
8071                 rec( 26, 2, CreationTime, BE ),
8072                 rec( 28, 4, CreatorID, BE ),
8073                 rec( 32, 1, AccessRightsMask ),
8074                 rec( 33, 1, Reserved ),
8075                 rec( 34, 2, NextSearchNumber, BE ),
8076         ])
8077         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8078                              0xfd00, 0xff00])
8079
8080         # 2222/1603, 22/3
8081         pkt = NCP(0x1603, "Get Effective Directory Rights", 'fileserver')
8082         pkt.Request((14,268), [
8083                 rec( 10, 1, DirHandle ),
8084                 rec( 11, 2, StartingSearchNumber ),
8085                 rec( 13, (1, 255), Path ),
8086         ], info_str=(Path, "Get Effective Directory Rights: %s", ", %s"))
8087         pkt.Reply(9, [
8088                 rec( 8, 1, AccessRightsMask ),
8089         ])
8090         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8091                              0xfd00, 0xff00])
8092
8093         # 2222/1604, 22/4
8094         pkt = NCP(0x1604, "Modify Maximum Rights Mask", 'fileserver')
8095         pkt.Request((14,268), [
8096                 rec( 10, 1, DirHandle ),
8097                 rec( 11, 1, RightsGrantMask ),
8098                 rec( 12, 1, RightsRevokeMask ),
8099                 rec( 13, (1, 255), Path ),
8100         ], info_str=(Path, "Modify Maximum Rights Mask: %s", ", %s"))
8101         pkt.Reply(8)
8102         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8103                              0xfd00, 0xff00])
8104
8105         # 2222/1605, 22/5
8106         pkt = NCP(0x1605, "Get Volume Number", 'fileserver')
8107         pkt.Request((11, 265), [
8108                 rec( 10, (1,255), VolumeNameLen ),
8109         ], info_str=(VolumeNameLen, "Get Volume Number for: %s", ", %s"))
8110         pkt.Reply(9, [
8111                 rec( 8, 1, VolumeNumber ),
8112         ])
8113         pkt.CompletionCodes([0x0000, 0x9600, 0x9804])
8114
8115         # 2222/1606, 22/6
8116         pkt = NCP(0x1606, "Get Volume Name", 'fileserver')
8117         pkt.Request(11, [
8118                 rec( 10, 1, VolumeNumber ),
8119         ],info_str=(VolumeNumber, "Get Name for Volume %d", ", %d"))
8120         pkt.Reply((9, 263), [
8121                 rec( 8, (1,255), VolumeNameLen ),
8122         ])
8123         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0xff00])
8124
8125         # 2222/160A, 22/10
8126         pkt = NCP(0x160A, "Create Directory", 'fileserver')
8127         pkt.Request((13,267), [
8128                 rec( 10, 1, DirHandle ),
8129                 rec( 11, 1, AccessRightsMask ),
8130                 rec( 12, (1, 255), Path ),
8131         ], info_str=(Path, "Create Directory: %s", ", %s"))
8132         pkt.Reply(8)
8133         pkt.CompletionCodes([0x0000, 0x8400, 0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03,
8134                              0x9e00, 0xa100, 0xfd00, 0xff00])
8135
8136         # 2222/160B, 22/11
8137         pkt = NCP(0x160B, "Delete Directory", 'fileserver')
8138         pkt.Request((13,267), [
8139                 rec( 10, 1, DirHandle ),
8140                 rec( 11, 1, Reserved ),
8141                 rec( 12, (1, 255), Path ),
8142         ], info_str=(Path, "Delete Directory: %s", ", %s"))
8143         pkt.Reply(8)
8144         pkt.CompletionCodes([0x0000, 0x8a00, 0x9600, 0x9804, 0x9b03, 0x9c03,
8145                              0x9f00, 0xa000, 0xa100, 0xfd00, 0xff00])
8146
8147         # 2222/160C, 22/12
8148         pkt = NCP(0x160C, "Scan Directory for Trustees", 'fileserver')
8149         pkt.Request((13,267), [
8150                 rec( 10, 1, DirHandle ),
8151                 rec( 11, 1, TrusteeSetNumber ),
8152                 rec( 12, (1, 255), Path ),
8153         ], info_str=(Path, "Scan Directory for Trustees: %s", ", %s"))
8154         pkt.Reply(57, [
8155                 rec( 8, 16, DirectoryPath ),
8156                 rec( 24, 2, CreationDate, BE ),
8157                 rec( 26, 2, CreationTime, BE ),
8158                 rec( 28, 4, CreatorID ),
8159                 rec( 32, 4, TrusteeID, BE ),
8160                 rec( 36, 4, TrusteeID, BE ),
8161                 rec( 40, 4, TrusteeID, BE ),
8162                 rec( 44, 4, TrusteeID, BE ),
8163                 rec( 48, 4, TrusteeID, BE ),
8164                 rec( 52, 1, AccessRightsMask ),
8165                 rec( 53, 1, AccessRightsMask ),
8166                 rec( 54, 1, AccessRightsMask ),
8167                 rec( 55, 1, AccessRightsMask ),
8168                 rec( 56, 1, AccessRightsMask ),
8169         ])
8170         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9b03, 0x9c03,
8171                              0xa100, 0xfd00, 0xff00])
8172
8173         # 2222/160D, 22/13
8174         pkt = NCP(0x160D, "Add Trustee to Directory", 'fileserver')
8175         pkt.Request((17,271), [
8176                 rec( 10, 1, DirHandle ),
8177                 rec( 11, 4, TrusteeID, BE ),
8178                 rec( 15, 1, AccessRightsMask ),
8179                 rec( 16, (1, 255), Path ),
8180         ], info_str=(Path, "Add Trustee to Directory: %s", ", %s"))
8181         pkt.Reply(8)
8182         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03,
8183                              0xa100, 0xfc06, 0xfd00, 0xff00])
8184
8185         # 2222/160E, 22/14
8186         pkt = NCP(0x160E, "Delete Trustee from Directory", 'fileserver')
8187         pkt.Request((17,271), [
8188                 rec( 10, 1, DirHandle ),
8189                 rec( 11, 4, TrusteeID, BE ),
8190                 rec( 15, 1, Reserved ),
8191                 rec( 16, (1, 255), Path ),
8192         ], info_str=(Path, "Delete Trustee from Directory: %s", ", %s"))
8193         pkt.Reply(8)
8194         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03,
8195                              0xa100, 0xfc06, 0xfd00, 0xfe07, 0xff00])
8196
8197         # 2222/160F, 22/15
8198         pkt = NCP(0x160F, "Rename Directory", 'fileserver')
8199         pkt.Request((13, 521), [
8200                 rec( 10, 1, DirHandle ),
8201                 rec( 11, (1, 255), Path ),
8202                 rec( -1, (1, 255), NewPath ),
8203         ], info_str=(Path, "Rename Directory: %s", ", %s"))
8204         pkt.Reply(8)
8205         pkt.CompletionCodes([0x0000, 0x8b00, 0x9200, 0x9600, 0x9804, 0x9b03, 0x9c03,
8206                              0x9e00, 0xa100, 0xef00, 0xfd00, 0xff00])
8207                                                                         
8208         # 2222/1610, 22/16
8209         pkt = NCP(0x1610, "Purge Erased Files", 'file')
8210         pkt.Request(10)
8211         pkt.Reply(8)
8212         pkt.CompletionCodes([0x0000, 0x8100, 0x9600, 0x9804, 0xa100, 0xff00])
8213
8214         # 2222/1611, 22/17
8215         pkt = NCP(0x1611, "Recover Erased File", 'fileserver')
8216         pkt.Request(11, [
8217                 rec( 10, 1, DirHandle ),
8218         ],info_str=(DirHandle, "Recover Erased File from Directory Handle %d", ", %d"))
8219         pkt.Reply(38, [
8220                 rec( 8, 15, OldFileName ),
8221                 rec( 23, 15, NewFileName ),
8222         ])
8223         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03,
8224                              0xa100, 0xfd00, 0xff00])
8225         # 2222/1612, 22/18
8226         pkt = NCP(0x1612, "Alloc Permanent Directory Handle", 'fileserver')
8227         pkt.Request((13, 267), [
8228                 rec( 10, 1, DirHandle ),
8229                 rec( 11, 1, DirHandleName ),
8230                 rec( 12, (1,255), Path ),
8231         ], info_str=(Path, "Allocate Permanent Directory Handle: %s", ", %s"))
8232         pkt.Reply(10, [
8233                 rec( 8, 1, DirHandle ),
8234                 rec( 9, 1, AccessRightsMask ),
8235         ])
8236         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9900, 0x9c03, 0x9d00,
8237                              0xa100, 0xfd00, 0xff00])
8238         # 2222/1613, 22/19
8239         pkt = NCP(0x1613, "Alloc Temporary Directory Handle", 'fileserver')
8240         pkt.Request((13, 267), [
8241                 rec( 10, 1, DirHandle ),
8242                 rec( 11, 1, DirHandleName ),
8243                 rec( 12, (1,255), Path ),
8244         ], info_str=(Path, "Allocate Temporary Directory Handle: %s", ", %s"))
8245         pkt.Reply(10, [
8246                 rec( 8, 1, DirHandle ),
8247                 rec( 9, 1, AccessRightsMask ),
8248         ])
8249         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9900, 0x9c03, 0x9d00,
8250                              0xa100, 0xfd00, 0xff00])
8251         # 2222/1614, 22/20
8252         pkt = NCP(0x1614, "Deallocate Directory Handle", 'fileserver')
8253         pkt.Request(11, [
8254                 rec( 10, 1, DirHandle ),
8255         ],info_str=(DirHandle, "Deallocate Directory Handle %d", ", %d"))
8256         pkt.Reply(8)
8257         pkt.CompletionCodes([0x0000, 0x9b03])
8258         # 2222/1615, 22/21
8259         pkt = NCP(0x1615, "Get Volume Info with Handle", 'file')
8260         pkt.Request( 11, [
8261                 rec( 10, 1, DirHandle )
8262         ],info_str=(DirHandle, "Get Volume Information with Handle %d", ", %d"))
8263         pkt.Reply( 36, [
8264                 rec( 8, 2, SectorsPerCluster, BE ),
8265                 rec( 10, 2, TotalVolumeClusters, BE ),
8266                 rec( 12, 2, AvailableClusters, BE ),
8267                 rec( 14, 2, TotalDirectorySlots, BE ),
8268                 rec( 16, 2, AvailableDirectorySlots, BE ),
8269                 rec( 18, 16, VolumeName ),
8270                 rec( 34, 2, RemovableFlag, BE ),
8271         ])
8272         pkt.CompletionCodes([0x0000, 0xff00])
8273         # 2222/1616, 22/22
8274         pkt = NCP(0x1616, "Alloc Special Temporary Directory Handle", 'fileserver')
8275         pkt.Request((13, 267), [
8276                 rec( 10, 1, DirHandle ),
8277                 rec( 11, 1, DirHandleName ),
8278                 rec( 12, (1,255), Path ),
8279         ], info_str=(Path, "Allocate Special Temporary Directory Handle: %s", ", %s"))
8280         pkt.Reply(10, [
8281                 rec( 8, 1, DirHandle ),
8282                 rec( 9, 1, AccessRightsMask ),
8283         ])
8284         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9900, 0x9c03, 0x9d00,
8285                              0xa100, 0xfd00, 0xff00])
8286         # 2222/1617, 22/23
8287         pkt = NCP(0x1617, "Extract a Base Handle", 'fileserver')
8288         pkt.Request(11, [
8289                 rec( 10, 1, DirHandle ),
8290         ],info_str=(DirHandle, "Extract a Base Handle from Directory Handle %d", ", %d"))
8291         pkt.Reply(22, [
8292                 rec( 8, 10, ServerNetworkAddress ),
8293                 rec( 18, 4, DirHandleLong ),
8294         ])
8295         pkt.CompletionCodes([0x0000, 0x9600, 0x9b03])
8296         # 2222/1618, 22/24
8297         pkt = NCP(0x1618, "Restore an Extracted Base Handle", 'fileserver')
8298         pkt.Request(24, [
8299                 rec( 10, 10, ServerNetworkAddress ),
8300                 rec( 20, 4, DirHandleLong ),
8301         ])
8302         pkt.Reply(10, [
8303                 rec( 8, 1, DirHandle ),
8304                 rec( 9, 1, AccessRightsMask ),
8305         ])
8306         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c00, 0x9d00, 0xa100,
8307                              0xfd00, 0xff00])
8308         # 2222/1619, 22/25
8309         pkt = NCP(0x1619, "Set Directory Information", 'fileserver')
8310         pkt.Request((21, 275), [
8311                 rec( 10, 1, DirHandle ),
8312                 rec( 11, 2, CreationDate ),
8313                 rec( 13, 2, CreationTime ),
8314                 rec( 15, 4, CreatorID, BE ),
8315                 rec( 19, 1, AccessRightsMask ),
8316                 rec( 20, (1,255), Path ),
8317         ], info_str=(Path, "Set Directory Information: %s", ", %s"))
8318         pkt.Reply(8)
8319         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9b03, 0x9c00, 0xa100,
8320                              0xff16])
8321         # 2222/161A, 22/26
8322         pkt = NCP(0x161A, "Get Path Name of a Volume-Directory Number Pair", 'fileserver')
8323         pkt.Request(13, [
8324                 rec( 10, 1, VolumeNumber ),
8325                 rec( 11, 2, DirectoryEntryNumberWord ),
8326         ])
8327         pkt.Reply((9,263), [
8328                 rec( 8, (1,255), Path ),
8329                 ])
8330         pkt.CompletionCodes([0x0000, 0x9804, 0x9c00, 0xa100])
8331         # 2222/161B, 22/27
8332         pkt = NCP(0x161B, "Scan Salvageable Files", 'fileserver')
8333         pkt.Request(15, [
8334                 rec( 10, 1, DirHandle ),
8335                 rec( 11, 4, SequenceNumber ),
8336         ])
8337         pkt.Reply(140, [
8338                 rec( 8, 4, SequenceNumber ),
8339                 rec( 12, 2, Subdirectory ),
8340                 rec( 14, 2, Reserved2 ),
8341                 rec( 16, 4, AttributesDef32 ),
8342                 rec( 20, 1, UniqueID ),
8343                 rec( 21, 1, FlagsDef ),
8344                 rec( 22, 1, DestNameSpace ),
8345                 rec( 23, 1, FileNameLen ),
8346                 rec( 24, 12, FileName12 ),
8347                 rec( 36, 2, CreationTime ),
8348                 rec( 38, 2, CreationDate ),
8349                 rec( 40, 4, CreatorID, BE ),
8350                 rec( 44, 2, ArchivedTime ),
8351                 rec( 46, 2, ArchivedDate ),
8352                 rec( 48, 4, ArchiverID, BE ),
8353                 rec( 52, 2, UpdateTime ),
8354                 rec( 54, 2, UpdateDate ),
8355                 rec( 56, 4, UpdateID, BE ),
8356                 rec( 60, 4, FileSize, BE ),
8357                 rec( 64, 44, Reserved44 ),
8358                 rec( 108, 2, InheritedRightsMask ),
8359                 rec( 110, 2, LastAccessedDate ),
8360                 rec( 112, 4, DeletedFileTime ),
8361                 rec( 116, 2, DeletedTime ),
8362                 rec( 118, 2, DeletedDate ),
8363                 rec( 120, 4, DeletedID, BE ),
8364                 rec( 124, 16, Reserved16 ),
8365         ])
8366         pkt.CompletionCodes([0x0000, 0xfb01, 0xff1d])
8367         # 2222/161C, 22/28
8368         pkt = NCP(0x161C, "Recover Salvageable File", 'fileserver')
8369         pkt.Request((17,525), [
8370                 rec( 10, 1, DirHandle ),
8371                 rec( 11, 4, SequenceNumber ),
8372                 rec( 15, (1, 255), FileName ),
8373                 rec( -1, (1, 255), NewFileNameLen ),
8374         ], info_str=(FileName, "Recover File: %s", ", %s"))
8375         pkt.Reply(8)
8376         pkt.CompletionCodes([0x0000, 0x8401, 0x9c03, 0xfe02])
8377         # 2222/161D, 22/29
8378         pkt = NCP(0x161D, "Purge Salvageable File", 'fileserver')
8379         pkt.Request(15, [
8380                 rec( 10, 1, DirHandle ),
8381                 rec( 11, 4, SequenceNumber ),
8382         ])
8383         pkt.Reply(8)
8384         pkt.CompletionCodes([0x0000, 0x8500, 0x9c03])
8385         # 2222/161E, 22/30
8386         pkt = NCP(0x161E, "Scan a Directory", 'fileserver')
8387         pkt.Request((17, 271), [
8388                 rec( 10, 1, DirHandle ),
8389                 rec( 11, 1, DOSFileAttributes ),
8390                 rec( 12, 4, SequenceNumber ),
8391                 rec( 16, (1, 255), SearchPattern ),
8392         ], info_str=(SearchPattern, "Scan a Directory: %s", ", %s"))
8393         pkt.Reply(140, [
8394                 rec( 8, 4, SequenceNumber ),
8395                 rec( 12, 4, Subdirectory ),
8396                 rec( 16, 4, AttributesDef32 ),
8397                 rec( 20, 1, UniqueID, LE ),
8398                 rec( 21, 1, PurgeFlags ),
8399                 rec( 22, 1, DestNameSpace ),
8400                 rec( 23, 1, NameLen ),
8401                 rec( 24, 12, Name12 ),
8402                 rec( 36, 2, CreationTime ),
8403                 rec( 38, 2, CreationDate ),
8404                 rec( 40, 4, CreatorID, BE ),
8405                 rec( 44, 2, ArchivedTime ),
8406                 rec( 46, 2, ArchivedDate ),
8407                 rec( 48, 4, ArchiverID, BE ),
8408                 rec( 52, 2, UpdateTime ),
8409                 rec( 54, 2, UpdateDate ),
8410                 rec( 56, 4, UpdateID, BE ),
8411                 rec( 60, 4, FileSize, BE ),
8412                 rec( 64, 44, Reserved44 ),
8413                 rec( 108, 2, InheritedRightsMask ),
8414                 rec( 110, 2, LastAccessedDate ),
8415                 rec( 112, 28, Reserved28 ),
8416         ])
8417         pkt.CompletionCodes([0x0000, 0x8500, 0x9c03])
8418         # 2222/161F, 22/31
8419         pkt = NCP(0x161F, "Get Directory Entry", 'fileserver')
8420         pkt.Request(11, [
8421                 rec( 10, 1, DirHandle ),
8422         ])
8423         pkt.Reply(136, [
8424                 rec( 8, 4, Subdirectory ),
8425                 rec( 12, 4, AttributesDef32 ),
8426                 rec( 16, 1, UniqueID, LE ),
8427                 rec( 17, 1, PurgeFlags ),
8428                 rec( 18, 1, DestNameSpace ),
8429                 rec( 19, 1, NameLen ),
8430                 rec( 20, 12, Name12 ),
8431                 rec( 32, 2, CreationTime ),
8432                 rec( 34, 2, CreationDate ),
8433                 rec( 36, 4, CreatorID, BE ),
8434                 rec( 40, 2, ArchivedTime ),
8435                 rec( 42, 2, ArchivedDate ), 
8436                 rec( 44, 4, ArchiverID, BE ),
8437                 rec( 48, 2, UpdateTime ),
8438                 rec( 50, 2, UpdateDate ),
8439                 rec( 52, 4, NextTrusteeEntry, BE ),
8440                 rec( 56, 48, Reserved48 ),
8441                 rec( 104, 2, MaximumSpace ),
8442                 rec( 106, 2, InheritedRightsMask ),
8443                 rec( 108, 28, Undefined28 ),
8444         ])
8445         pkt.CompletionCodes([0x0000, 0x8900, 0xbf00, 0xfb00])
8446         # 2222/1620, 22/32
8447         pkt = NCP(0x1620, "Scan Volume's User Disk Restrictions", 'fileserver')
8448         pkt.Request(15, [
8449                 rec( 10, 1, VolumeNumber ),
8450                 rec( 11, 4, SequenceNumber ),
8451         ])
8452         pkt.Reply(17, [
8453                 rec( 8, 1, NumberOfEntries, var="x" ),
8454                 rec( 9, 8, ObjectIDStruct, repeat="x" ),
8455         ])
8456         pkt.CompletionCodes([0x0000, 0x9800])
8457         # 2222/1621, 22/33
8458         pkt = NCP(0x1621, "Add User Disk Space Restriction", 'fileserver')
8459         pkt.Request(19, [
8460                 rec( 10, 1, VolumeNumber ),
8461                 rec( 11, 4, ObjectID ),
8462                 rec( 15, 4, DiskSpaceLimit ),
8463         ])
8464         pkt.Reply(8)
8465         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9800])
8466         # 2222/1622, 22/34
8467         pkt = NCP(0x1622, "Remove User Disk Space Restrictions", 'fileserver')
8468         pkt.Request(15, [
8469                 rec( 10, 1, VolumeNumber ),
8470                 rec( 11, 4, ObjectID ),
8471         ])
8472         pkt.Reply(8)
8473         pkt.CompletionCodes([0x0000, 0x8c00, 0xfe0e])
8474         # 2222/1623, 22/35
8475         pkt = NCP(0x1623, "Get Directory Disk Space Restriction", 'fileserver')
8476         pkt.Request(11, [
8477                 rec( 10, 1, DirHandle ),
8478         ])
8479         pkt.Reply(18, [
8480                 rec( 8, 1, NumberOfEntries ),
8481                 rec( 9, 1, Level ),
8482                 rec( 10, 4, MaxSpace ),
8483                 rec( 14, 4, CurrentSpace ),
8484         ])
8485         pkt.CompletionCodes([0x0000])
8486         # 2222/1624, 22/36
8487         pkt = NCP(0x1624, "Set Directory Disk Space Restriction", 'fileserver')
8488         pkt.Request(15, [
8489                 rec( 10, 1, DirHandle ),
8490                 rec( 11, 4, DiskSpaceLimit ),
8491         ])
8492         pkt.Reply(8)
8493         pkt.CompletionCodes([0x0000, 0x0101, 0x8c00, 0xbf00])
8494         # 2222/1625, 22/37
8495         pkt = NCP(0x1625, "Set Directory Entry Information", 'fileserver')
8496         pkt.Request(NO_LENGTH_CHECK, [
8497                 #
8498                 # XXX - this didn't match what was in the spec for 22/37
8499                 # on the Novell Web site.
8500                 #
8501                 rec( 10, 1, DirHandle ),
8502                 rec( 11, 1, SearchAttributes ),
8503                 rec( 12, 4, SequenceNumber ),
8504                 rec( 16, 2, ChangeBits ),
8505                 rec( 18, 2, Reserved2 ),
8506                 rec( 20, 4, Subdirectory ),
8507                 srec(DOSDirectoryEntryStruct, req_cond="ncp.search_att_sub == TRUE"),
8508                 srec(DOSFileEntryStruct, req_cond="ncp.search_att_sub == FALSE"),
8509         ])
8510         pkt.Reply(8)
8511         pkt.ReqCondSizeConstant()
8512         pkt.CompletionCodes([0x0000, 0x0106, 0x8c00, 0xbf00])
8513         # 2222/1626, 22/38
8514         pkt = NCP(0x1626, "Scan File or Directory for Extended Trustees", 'fileserver')
8515         pkt.Request((13,267), [
8516                 rec( 10, 1, DirHandle ),
8517                 rec( 11, 1, SequenceByte ),
8518                 rec( 12, (1, 255), Path ),
8519         ], info_str=(Path, "Scan for Extended Trustees: %s", ", %s"))
8520         pkt.Reply(91, [
8521                 rec( 8, 1, NumberOfEntries, var="x" ),
8522                 rec( 9, 4, ObjectID ),
8523                 rec( 13, 4, ObjectID ),
8524                 rec( 17, 4, ObjectID ),
8525                 rec( 21, 4, ObjectID ),
8526                 rec( 25, 4, ObjectID ),
8527                 rec( 29, 4, ObjectID ),
8528                 rec( 33, 4, ObjectID ),
8529                 rec( 37, 4, ObjectID ),
8530                 rec( 41, 4, ObjectID ),
8531                 rec( 45, 4, ObjectID ),
8532                 rec( 49, 4, ObjectID ),
8533                 rec( 53, 4, ObjectID ),
8534                 rec( 57, 4, ObjectID ),
8535                 rec( 61, 4, ObjectID ),
8536                 rec( 65, 4, ObjectID ),
8537                 rec( 69, 4, ObjectID ),
8538                 rec( 73, 4, ObjectID ),
8539                 rec( 77, 4, ObjectID ),
8540                 rec( 81, 4, ObjectID ),
8541                 rec( 85, 4, ObjectID ),
8542                 rec( 89, 2, AccessRightsMaskWord, repeat="x" ),
8543         ])
8544         pkt.CompletionCodes([0x0000, 0x9800, 0x9b00, 0x9c00])
8545         # 2222/1627, 22/39
8546         pkt = NCP(0x1627, "Add Extended Trustee to Directory or File", 'fileserver')
8547         pkt.Request((18,272), [
8548                 rec( 10, 1, DirHandle ),
8549                 rec( 11, 4, ObjectID, BE ),
8550                 rec( 15, 2, TrusteeRights ),
8551                 rec( 17, (1, 255), Path ),
8552         ], info_str=(Path, "Add Extended Trustee: %s", ", %s"))
8553         pkt.Reply(8)
8554         pkt.CompletionCodes([0x0000, 0x9000])
8555         # 2222/1628, 22/40
8556         pkt = NCP(0x1628, "Scan Directory Disk Space", 'fileserver')
8557         pkt.Request((17,271), [
8558                 #
8559                 # XXX - this didn't match what was in the spec for 22/40
8560                 # on the Novell Web site.
8561                 #
8562                 rec( 10, 1, DirHandle ),
8563                 rec( 11, 1, SearchAttributes ),
8564                 rec( 12, 4, SequenceNumber ),
8565                 rec( 16, (1, 255), SearchPattern ),
8566         ], info_str=(SearchPattern, "Scan Directory Disk Space: %s", ", %s"))
8567         pkt.Reply((148), [
8568                 rec( 8, 4, SequenceNumber ),
8569                 rec( 12, 4, Subdirectory ),
8570                 rec( 16, 4, AttributesDef32 ),
8571                 rec( 20, 1, UniqueID ),
8572                 rec( 21, 1, PurgeFlags ),
8573                 rec( 22, 1, DestNameSpace ),
8574                 rec( 23, 1, NameLen ),
8575                 rec( 24, 12, Name12 ),
8576                 rec( 36, 2, CreationTime ),
8577                 rec( 38, 2, CreationDate ),
8578                 rec( 40, 4, CreatorID, BE ),
8579                 rec( 44, 2, ArchivedTime ),
8580                 rec( 46, 2, ArchivedDate ),
8581                 rec( 48, 4, ArchiverID, BE ),
8582                 rec( 52, 2, UpdateTime ),
8583                 rec( 54, 2, UpdateDate ),
8584                 rec( 56, 4, UpdateID, BE ),
8585                 rec( 60, 4, DataForkSize, BE ),
8586                 rec( 64, 4, DataForkFirstFAT, BE ),
8587                 rec( 68, 4, NextTrusteeEntry, BE ),
8588                 rec( 72, 36, Reserved36 ),
8589                 rec( 108, 2, InheritedRightsMask ),
8590                 rec( 110, 2, LastAccessedDate ),
8591                 rec( 112, 4, DeletedFileTime ),
8592                 rec( 116, 2, DeletedTime ),
8593                 rec( 118, 2, DeletedDate ),
8594                 rec( 120, 4, DeletedID, BE ),
8595                 rec( 124, 8, Undefined8 ),
8596                 rec( 132, 4, PrimaryEntry, LE ),
8597                 rec( 136, 4, NameList, LE ),
8598                 rec( 140, 4, OtherFileForkSize, BE ),
8599                 rec( 144, 4, OtherFileForkFAT, BE ),
8600         ])
8601         pkt.CompletionCodes([0x0000, 0x8900, 0x9c03, 0xfb01, 0xff00])
8602         # 2222/1629, 22/41
8603         pkt = NCP(0x1629, "Get Object Disk Usage and Restrictions", 'fileserver')
8604         pkt.Request(15, [
8605                 rec( 10, 1, VolumeNumber ),
8606                 rec( 11, 4, ObjectID, BE ),
8607         ])
8608         pkt.Reply(16, [
8609                 rec( 8, 4, Restriction ),
8610                 rec( 12, 4, InUse ),
8611         ])
8612         pkt.CompletionCodes([0x0000, 0x9802])
8613         # 2222/162A, 22/42
8614         pkt = NCP(0x162A, "Get Effective Rights for Directory Entry", 'fileserver')
8615         pkt.Request((12,266), [
8616                 rec( 10, 1, DirHandle ),
8617                 rec( 11, (1, 255), Path ),
8618         ], info_str=(Path, "Get Effective Rights: %s", ", %s"))
8619         pkt.Reply(10, [
8620                 rec( 8, 2, AccessRightsMaskWord ),
8621         ])
8622         pkt.CompletionCodes([0x0000, 0x9804, 0x9c03])
8623         # 2222/162B, 22/43
8624         pkt = NCP(0x162B, "Remove Extended Trustee from Dir or File", 'fileserver')
8625         pkt.Request((17,271), [
8626                 rec( 10, 1, DirHandle ),
8627                 rec( 11, 4, ObjectID, BE ),
8628                 rec( 15, 1, Unused ),
8629                 rec( 16, (1, 255), Path ),
8630         ], info_str=(Path, "Remove Extended Trustee from %s", ", %s"))
8631         pkt.Reply(8)
8632         pkt.CompletionCodes([0x0000, 0x9002, 0x9c03, 0xfe0f, 0xff09])
8633         # 2222/162C, 22/44
8634         pkt = NCP(0x162C, "Get Volume and Purge Information", 'file')
8635         pkt.Request( 11, [
8636                 rec( 10, 1, VolumeNumber )
8637         ],info_str=(VolumeNumber, "Get Volume and Purge Information for Volume %d", ", %d"))
8638         pkt.Reply( (38,53), [
8639                 rec( 8, 4, TotalBlocks ),
8640                 rec( 12, 4, FreeBlocks ),
8641                 rec( 16, 4, PurgeableBlocks ),
8642                 rec( 20, 4, NotYetPurgeableBlocks ),
8643                 rec( 24, 4, TotalDirectoryEntries ),
8644                 rec( 28, 4, AvailableDirEntries ),
8645                 rec( 32, 4, Reserved4 ),
8646                 rec( 36, 1, SectorsPerBlock ),
8647                 rec( 37, (1,16), VolumeNameLen ),
8648         ])
8649         pkt.CompletionCodes([0x0000])
8650         # 2222/162D, 22/45
8651         pkt = NCP(0x162D, "Get Directory Information", 'file')
8652         pkt.Request( 11, [
8653                 rec( 10, 1, DirHandle )
8654         ])
8655         pkt.Reply( (30, 45), [
8656                 rec( 8, 4, TotalBlocks ),
8657                 rec( 12, 4, AvailableBlocks ),
8658                 rec( 16, 4, TotalDirectoryEntries ),
8659                 rec( 20, 4, AvailableDirEntries ),
8660                 rec( 24, 4, Reserved4 ),
8661                 rec( 28, 1, SectorsPerBlock ),
8662                 rec( 29, (1,16), VolumeNameLen ),
8663         ])
8664         pkt.CompletionCodes([0x0000, 0x9b03])
8665         # 2222/162E, 22/46
8666         pkt = NCP(0x162E, "Rename Or Move", 'file')
8667         pkt.Request( (17,525), [
8668                 rec( 10, 1, SourceDirHandle ),
8669                 rec( 11, 1, SearchAttributes ),
8670                 rec( 12, 1, SourcePathComponentCount ),
8671                 rec( 13, (1,255), SourcePath ),
8672                 rec( -1, 1, DestDirHandle ),
8673                 rec( -1, 1, DestPathComponentCount ),
8674                 rec( -1, (1,255), DestPath ),
8675         ], info_str=(SourcePath, "Rename or Move: %s", ", %s"))
8676         pkt.Reply(8)
8677         pkt.CompletionCodes([0x0000, 0x0102, 0x8701, 0x8b00, 0x8d00, 0x8e00,
8678                              0x8f00, 0x9001, 0x9101, 0x9201, 0x9a00, 0x9b03,
8679                              0x9c03, 0xa400, 0xff17])
8680         # 2222/162F, 22/47
8681         pkt = NCP(0x162F, "Get Name Space Information", 'file')
8682         pkt.Request( 11, [
8683                 rec( 10, 1, VolumeNumber )
8684         ],info_str=(VolumeNumber, "Get Name Space Information for Volume %d", ", %d"))
8685         pkt.Reply( (15,523), [
8686                 #
8687                 # XXX - why does this not display anything at all
8688                 # if the stuff after the first IndexNumber is
8689                 # un-commented?
8690                 #
8691                 rec( 8, 1, DefinedNameSpaces, var="v" ),
8692                 rec( 9, (1,255), NameSpaceName, repeat="v" ),
8693                 rec( -1, 1, DefinedDataStreams, var="w" ),
8694                 rec( -1, (2,256), DataStreamInfo, repeat="w" ),
8695                 rec( -1, 1, LoadedNameSpaces, var="x" ),
8696                 rec( -1, 1, IndexNumber, repeat="x" ),
8697 #               rec( -1, 1, VolumeNameSpaces, var="y" ),
8698 #               rec( -1, 1, IndexNumber, repeat="y" ),
8699 #               rec( -1, 1, VolumeDataStreams, var="z" ),
8700 #               rec( -1, 1, IndexNumber, repeat="z" ),
8701         ])
8702         pkt.CompletionCodes([0x0000])
8703         # 2222/1630, 22/48
8704         pkt = NCP(0x1630, "Get Name Space Directory Entry", 'file')
8705         pkt.Request( 16, [
8706                 rec( 10, 1, VolumeNumber ),
8707                 rec( 11, 4, DOSSequence ),
8708                 rec( 15, 1, SrcNameSpace ),
8709         ])
8710         pkt.Reply( 112, [
8711                 rec( 8, 4, SequenceNumber ),
8712                 rec( 12, 4, Subdirectory ),
8713                 rec( 16, 4, AttributesDef32 ),
8714                 rec( 20, 1, UniqueID ),
8715                 rec( 21, 1, Flags ),
8716                 rec( 22, 1, SrcNameSpace ),
8717                 rec( 23, 1, NameLength ),
8718                 rec( 24, 12, Name12 ),
8719                 rec( 36, 2, CreationTime ),
8720                 rec( 38, 2, CreationDate ),
8721                 rec( 40, 4, CreatorID, BE ),
8722                 rec( 44, 2, ArchivedTime ),
8723                 rec( 46, 2, ArchivedDate ),
8724                 rec( 48, 4, ArchiverID ),
8725                 rec( 52, 2, UpdateTime ),
8726                 rec( 54, 2, UpdateDate ),
8727                 rec( 56, 4, UpdateID ),
8728                 rec( 60, 4, FileSize ),
8729                 rec( 64, 44, Reserved44 ),
8730                 rec( 108, 2, InheritedRightsMask ),
8731                 rec( 110, 2, LastAccessedDate ),
8732         ])
8733         pkt.CompletionCodes([0x0000, 0x8900, 0x9802, 0xbf00])
8734         # 2222/1631, 22/49
8735         pkt = NCP(0x1631, "Open Data Stream", 'file')
8736         pkt.Request( (15,269), [
8737                 rec( 10, 1, DataStream ),
8738                 rec( 11, 1, DirHandle ),
8739                 rec( 12, 1, AttributesDef ),
8740                 rec( 13, 1, OpenRights ),
8741                 rec( 14, (1, 255), FileName ),
8742         ], info_str=(FileName, "Open Data Stream: %s", ", %s"))
8743         pkt.Reply( 12, [
8744                 rec( 8, 4, CCFileHandle, BE ),
8745         ])
8746         pkt.CompletionCodes([0x0000, 0x8000, 0x8200, 0x9002, 0xbe00, 0xff00])
8747         # 2222/1632, 22/50
8748         pkt = NCP(0x1632, "Get Object Effective Rights for Directory Entry", 'file')
8749         pkt.Request( (16,270), [
8750                 rec( 10, 4, ObjectID, BE ),
8751                 rec( 14, 1, DirHandle ),
8752                 rec( 15, (1, 255), Path ),
8753         ], info_str=(Path, "Get Object Effective Rights: %s", ", %s"))
8754         pkt.Reply( 10, [
8755                 rec( 8, 2, TrusteeRights ),
8756         ])
8757         pkt.CompletionCodes([0x0000, 0x7e01, 0x9b00, 0x9c03])
8758         # 2222/1633, 22/51
8759         pkt = NCP(0x1633, "Get Extended Volume Information", 'file')
8760         pkt.Request( 11, [
8761                 rec( 10, 1, VolumeNumber ),
8762         ],info_str=(VolumeNumber, "Get Extended Volume Information for Volume %d", ", %d"))
8763         pkt.Reply( (139,266), [
8764                 rec( 8, 2, VolInfoReplyLen ),
8765                 rec( 10, 128, VolInfoStructure),
8766                 rec( 138, (1,128), VolumeNameLen ),
8767         ])
8768         pkt.CompletionCodes([0x0000, 0x7e01, 0x9804, 0xfb08, 0xff00])
8769         # 2222/1634, 22/52
8770         pkt = NCP(0x1634, "Get Mount Volume List", 'file')
8771         pkt.Request( 22, [
8772                 rec( 10, 4, StartVolumeNumber ),
8773                 rec( 14, 4, VolumeRequestFlags, LE ),
8774                 rec( 18, 4, SrcNameSpace ),
8775         ])
8776         pkt.Reply( 34, [
8777                 rec( 8, 4, ItemsInPacket, var="x" ),
8778                 rec( 12, 4, NextVolumeNumber ),
8779                 rec( 16, 18, VolumeStruct, repeat="x"),
8780         ])
8781         pkt.CompletionCodes([0x0000])
8782         # 2222/1700, 23/00
8783         pkt = NCP(0x1700, "Login User", 'file')
8784         pkt.Request( (12, 58), [
8785                 rec( 10, (1,16), UserName ),
8786                 rec( -1, (1,32), Password ),
8787         ], info_str=(UserName, "Login User: %s", ", %s"))
8788         pkt.Reply(8)
8789         pkt.CompletionCodes([0x0000, 0x9602, 0xc101, 0xc200, 0xc501, 0xd700,
8790                              0xd900, 0xda00, 0xdb00, 0xde00, 0xdf00, 0xe800,
8791                              0xec00, 0xed00, 0xef00, 0xf001, 0xf100, 0xf200,
8792                              0xf600, 0xfb00, 0xfc06, 0xfe07, 0xff00])
8793         # 2222/1701, 23/01
8794         pkt = NCP(0x1701, "Change User Password", 'file')
8795         pkt.Request( (13, 90), [
8796                 rec( 10, (1,16), UserName ),
8797                 rec( -1, (1,32), Password ),
8798                 rec( -1, (1,32), NewPassword ),
8799         ], info_str=(UserName, "Change Password for User: %s", ", %s"))
8800         pkt.Reply(8)
8801         pkt.CompletionCodes([0x0000, 0x9600, 0xd600, 0xf001, 0xf101, 0xf501,
8802                              0xfc06, 0xfe07, 0xff00])
8803         # 2222/1702, 23/02
8804         pkt = NCP(0x1702, "Get User Connection List", 'file')
8805         pkt.Request( (11, 26), [
8806                 rec( 10, (1,16), UserName ),
8807         ], info_str=(UserName, "Get User Connection: %s", ", %s"))
8808         pkt.Reply( (9, 136), [
8809                 rec( 8, (1, 128), ConnectionNumberList ),
8810         ])
8811         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
8812         # 2222/1703, 23/03
8813         pkt = NCP(0x1703, "Get User Number", 'file')
8814         pkt.Request( (11, 26), [
8815                 rec( 10, (1,16), UserName ),
8816         ], info_str=(UserName, "Get User Number: %s", ", %s"))
8817         pkt.Reply( 12, [
8818                 rec( 8, 4, ObjectID, BE ),
8819         ])
8820         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
8821         # 2222/1705, 23/05
8822         pkt = NCP(0x1705, "Get Station's Logged Info", 'file')
8823         pkt.Request( 11, [
8824                 rec( 10, 1, TargetConnectionNumber ),
8825         ],info_str=(TargetConnectionNumber, "Get Station's Logged Information on Connection %d", ", %d")) 
8826         pkt.Reply( 266, [
8827                 rec( 8, 16, UserName16 ),
8828                 rec( 24, 7, LoginTime ),
8829                 rec( 31, 39, FullName ),
8830                 rec( 70, 4, UserID, BE ),
8831                 rec( 74, 128, SecurityEquivalentList ),
8832                 rec( 202, 64, Reserved64 ),
8833         ])
8834         pkt.CompletionCodes([0x0000, 0x9602, 0xfc06, 0xfd00, 0xfe07, 0xff00])
8835         # 2222/1707, 23/07
8836         pkt = NCP(0x1707, "Get Group Number", 'file')
8837         pkt.Request( 14, [
8838                 rec( 10, 4, ObjectID, BE ),
8839         ])
8840         pkt.Reply( 62, [
8841                 rec( 8, 4, ObjectID, BE ),
8842                 rec( 12, 2, ObjectType, BE ),
8843                 rec( 14, 48, ObjectNameLen ),
8844         ])
8845         pkt.CompletionCodes([0x0000, 0x9602, 0xf101, 0xfc06, 0xfe07, 0xff00])
8846         # 2222/170C, 23/12
8847         pkt = NCP(0x170C, "Verify Serialization", 'file')
8848         pkt.Request( 14, [
8849                 rec( 10, 4, ServerSerialNumber ),
8850         ])
8851         pkt.Reply(8)
8852         pkt.CompletionCodes([0x0000, 0xff00])
8853         # 2222/170D, 23/13
8854         pkt = NCP(0x170D, "Log Network Message", 'file')
8855         pkt.Request( (11, 68), [
8856                 rec( 10, (1, 58), TargetMessage ),
8857         ], info_str=(TargetMessage, "Log Network Message: %s", ", %s"))
8858         pkt.Reply(8)
8859         pkt.CompletionCodes([0x0000, 0x8000, 0x8100, 0x8800, 0x8d00, 0x8e00, 0x8f00,
8860                              0x9001, 0x9400, 0x9600, 0x9804, 0x9900, 0x9b00, 0xa100,
8861                              0xa201, 0xff00])
8862         # 2222/170E, 23/14
8863         pkt = NCP(0x170E, "Get Disk Utilization", 'file')
8864         pkt.Request( 15, [
8865                 rec( 10, 1, VolumeNumber ),
8866                 rec( 11, 4, TrusteeID, BE ),
8867         ])
8868         pkt.Reply( 19, [
8869                 rec( 8, 1, VolumeNumber ),
8870                 rec( 9, 4, TrusteeID, BE ),
8871                 rec( 13, 2, DirectoryCount, BE ),
8872                 rec( 15, 2, FileCount, BE ),
8873                 rec( 17, 2, ClusterCount, BE ),
8874         ])
8875         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0xa100, 0xf200])
8876         # 2222/170F, 23/15
8877         pkt = NCP(0x170F, "Scan File Information", 'file')
8878         pkt.Request((15,269), [
8879                 rec( 10, 2, LastSearchIndex ),
8880                 rec( 12, 1, DirHandle ),
8881                 rec( 13, 1, SearchAttributes ),
8882                 rec( 14, (1, 255), FileName ),
8883         ], info_str=(FileName, "Scan File Information: %s", ", %s"))
8884         pkt.Reply( 102, [
8885                 rec( 8, 2, NextSearchIndex ),
8886                 rec( 10, 14, FileName14 ),
8887                 rec( 24, 2, AttributesDef16 ),
8888                 rec( 26, 4, FileSize, BE ),
8889                 rec( 30, 2, CreationDate, BE ),
8890                 rec( 32, 2, LastAccessedDate, BE ),
8891                 rec( 34, 2, ModifiedDate, BE ),
8892                 rec( 36, 2, ModifiedTime, BE ),
8893                 rec( 38, 4, CreatorID, BE ),
8894                 rec( 42, 2, ArchivedDate, BE ),
8895                 rec( 44, 2, ArchivedTime, BE ),
8896                 rec( 46, 56, Reserved56 ),
8897         ])
8898         pkt.CompletionCodes([0x0000, 0x8800, 0x8900, 0x9300, 0x9400, 0x9804, 0x9b00, 0x9c00,
8899                              0xa100, 0xfd00, 0xff17])
8900         # 2222/1710, 23/16
8901         pkt = NCP(0x1710, "Set File Information", 'file')
8902         pkt.Request((91,345), [
8903                 rec( 10, 2, AttributesDef16 ),
8904                 rec( 12, 4, FileSize, BE ),
8905                 rec( 16, 2, CreationDate, BE ),
8906                 rec( 18, 2, LastAccessedDate, BE ),
8907                 rec( 20, 2, ModifiedDate, BE ),
8908                 rec( 22, 2, ModifiedTime, BE ),
8909                 rec( 24, 4, CreatorID, BE ),
8910                 rec( 28, 2, ArchivedDate, BE ),
8911                 rec( 30, 2, ArchivedTime, BE ),
8912                 rec( 32, 56, Reserved56 ),
8913                 rec( 88, 1, DirHandle ),
8914                 rec( 89, 1, SearchAttributes ),
8915                 rec( 90, (1, 255), FileName ),
8916         ], info_str=(FileName, "Set Information for File: %s", ", %s"))
8917         pkt.Reply(8)
8918         pkt.CompletionCodes([0x0000, 0x8800, 0x8c00, 0x8e00, 0x9400, 0x9600, 0x9804,
8919                              0x9b03, 0x9c00, 0xa100, 0xa201, 0xfc06, 0xfd00, 0xfe07,
8920                              0xff17])
8921         # 2222/1711, 23/17
8922         pkt = NCP(0x1711, "Get File Server Information", 'fileserver')
8923         pkt.Request(10)
8924         pkt.Reply(136, [
8925                 rec( 8, 48, ServerName ),
8926                 rec( 56, 1, OSMajorVersion ),
8927                 rec( 57, 1, OSMinorVersion ),
8928                 rec( 58, 2, ConnectionsSupportedMax, BE ),
8929                 rec( 60, 2, ConnectionsInUse, BE ),
8930                 rec( 62, 2, VolumesSupportedMax, BE ),
8931                 rec( 64, 1, OSRevision ),
8932                 rec( 65, 1, SFTSupportLevel ),
8933                 rec( 66, 1, TTSLevel ),
8934                 rec( 67, 2, ConnectionsMaxUsed, BE ),
8935                 rec( 69, 1, AccountVersion ),
8936                 rec( 70, 1, VAPVersion ),
8937                 rec( 71, 1, QueueingVersion ),
8938                 rec( 72, 1, PrintServerVersion ),
8939                 rec( 73, 1, VirtualConsoleVersion ),
8940                 rec( 74, 1, SecurityRestrictionVersion ),
8941                 rec( 75, 1, InternetBridgeVersion ),
8942                 rec( 76, 1, MixedModePathFlag ),
8943                 rec( 77, 1, LocalLoginInfoCcode ),
8944                 rec( 78, 2, ProductMajorVersion, BE ),
8945                 rec( 80, 2, ProductMinorVersion, BE ),
8946                 rec( 82, 2, ProductRevisionVersion, BE ),
8947                 rec( 84, 1, OSLanguageID, LE ),
8948                 rec( 85, 51, Reserved51 ),
8949         ])
8950         pkt.CompletionCodes([0x0000, 0x9600])
8951         # 2222/1712, 23/18
8952         pkt = NCP(0x1712, "Get Network Serial Number", 'fileserver')
8953         pkt.Request(10)
8954         pkt.Reply(14, [
8955                 rec( 8, 4, ServerSerialNumber ),
8956                 rec( 12, 2, ApplicationNumber ),
8957         ])
8958         pkt.CompletionCodes([0x0000, 0x9600])
8959         # 2222/1713, 23/19
8960         pkt = NCP(0x1713, "Get Internet Address", 'fileserver')
8961         pkt.Request(11, [
8962                 rec( 10, 1, TargetConnectionNumber ),
8963         ],info_str=(TargetConnectionNumber, "Get Internet Address for Connection %d", ", %d"))
8964         pkt.Reply(20, [
8965                 rec( 8, 4, NetworkAddress, BE ),
8966                 rec( 12, 6, NetworkNodeAddress ),
8967                 rec( 18, 2, NetworkSocket, BE ),
8968         ])
8969         pkt.CompletionCodes([0x0000, 0xff00])
8970         # 2222/1714, 23/20
8971         pkt = NCP(0x1714, "Login Object", 'file')
8972         pkt.Request( (14, 60), [
8973                 rec( 10, 2, ObjectType, BE ),
8974                 rec( 12, (1,16), ClientName ),
8975                 rec( -1, (1,32), Password ),
8976         ], info_str=(UserName, "Login Object: %s", ", %s"))
8977         pkt.Reply(8)
8978         pkt.CompletionCodes([0x0000, 0x9602, 0xc101, 0xc200, 0xc501, 0xd600, 0xd700,
8979                              0xd900, 0xda00, 0xdb00, 0xde00, 0xdf00, 0xe800, 0xec00,
8980                              0xed00, 0xef00, 0xf001, 0xf100, 0xf200, 0xf600, 0xfb00,
8981                              0xfc06, 0xfe07, 0xff00])
8982         # 2222/1715, 23/21
8983         pkt = NCP(0x1715, "Get Object Connection List", 'file')
8984         pkt.Request( (13, 28), [
8985                 rec( 10, 2, ObjectType, BE ),
8986                 rec( 12, (1,16), ObjectName ),
8987         ], info_str=(UserName, "Get Object Connection List: %s", ", %s"))
8988         pkt.Reply( (9, 136), [
8989                 rec( 8, (1, 128), ConnectionNumberList ),
8990         ])
8991         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
8992         # 2222/1716, 23/22
8993         pkt = NCP(0x1716, "Get Station's Logged Info", 'file')
8994         pkt.Request( 11, [
8995                 rec( 10, 1, TargetConnectionNumber ),
8996         ])
8997         pkt.Reply( 70, [
8998                 rec( 8, 4, UserID, BE ),
8999                 rec( 12, 2, ObjectType, BE ),
9000                 rec( 14, 48, ObjectNameLen ),
9001                 rec( 62, 7, LoginTime ),       
9002                 rec( 69, 1, Reserved ),
9003         ])
9004         pkt.CompletionCodes([0x0000, 0x9602, 0xfb0a, 0xfc06, 0xfd00, 0xfe07, 0xff00])
9005         # 2222/1717, 23/23
9006         pkt = NCP(0x1717, "Get Login Key", 'file')
9007         pkt.Request(10)
9008         pkt.Reply( 16, [
9009                 rec( 8, 8, LoginKey ),
9010         ])
9011         pkt.CompletionCodes([0x0000, 0x9602])
9012         # 2222/1718, 23/24
9013         pkt = NCP(0x1718, "Keyed Object Login", 'file')
9014         pkt.Request( (21, 68), [
9015                 rec( 10, 8, LoginKey ),
9016                 rec( 18, 2, ObjectType, BE ),
9017                 rec( 20, (1,48), ObjectName ),
9018         ], info_str=(ObjectName, "Keyed Object Login: %s", ", %s"))
9019         pkt.Reply(8)
9020         pkt.CompletionCodes([0x0000, 0x9602, 0xc101, 0xc200, 0xc500, 0xd900, 0xda00,
9021                              0xdb00, 0xdc00, 0xde00])
9022         # 2222/171A, 23/26
9023         #
9024         # XXX - for NCP-over-IP, the NetworkAddress field appears to be
9025         # an IP address, rather than an IPX network address, and should
9026         # be dissected as an FT_IPv4 value; the NetworkNodeAddress and
9027         # NetworkSocket are 0.
9028         #
9029         # For NCP-over-IPX, it should probably be dissected as an
9030         # FT_IPXNET value.
9031         #
9032         pkt = NCP(0x171A, "Get Internet Address", 'fileserver')
9033         pkt.Request(11, [
9034                 rec( 10, 1, TargetConnectionNumber ),
9035         ])
9036         pkt.Reply(21, [
9037                 rec( 8, 4, NetworkAddress, BE ),
9038                 rec( 12, 6, NetworkNodeAddress ),
9039                 rec( 18, 2, NetworkSocket, BE ),
9040                 rec( 20, 1, ConnectionType ),
9041         ])
9042         pkt.CompletionCodes([0x0000])
9043         # 2222/171B, 23/27
9044         pkt = NCP(0x171B, "Get Object Connection List", 'file')
9045         pkt.Request( (17,64), [
9046                 rec( 10, 4, SearchConnNumber ),
9047                 rec( 14, 2, ObjectType, BE ),
9048                 rec( 16, (1,48), ObjectName ),
9049         ], info_str=(ObjectName, "Get Object Connection List: %s", ", %s"))
9050         pkt.Reply( (10,137), [
9051                 rec( 8, 1, ConnListLen, var="x" ),
9052                 rec( 9, (1,128), ConnectionNumberList, repeat="x" ),
9053         ])
9054         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
9055         # 2222/171C, 23/28
9056         pkt = NCP(0x171C, "Get Station's Logged Info", 'file')
9057         pkt.Request( 14, [
9058                 rec( 10, 4, TargetConnectionNumber ),
9059         ])
9060         pkt.Reply( 70, [
9061                 rec( 8, 4, UserID, BE ),
9062                 rec( 12, 2, ObjectType, BE ),
9063                 rec( 14, 48, ObjectNameLen ),
9064                 rec( 62, 7, LoginTime ),
9065                 rec( 69, 1, Reserved ),
9066         ])
9067         pkt.CompletionCodes([0x0000, 0x9602, 0xfb02, 0xfc06, 0xfd00, 0xfe07, 0xff00])
9068         # 2222/171D, 23/29
9069         pkt = NCP(0x171D, "Change Connection State", 'file')
9070         pkt.Request( 11, [
9071                 rec( 10, 1, RequestCode ),
9072         ])
9073         pkt.Reply(8)
9074         pkt.CompletionCodes([0x0000, 0x0109, 0x7a00, 0x7b00, 0x7c00, 0xe000, 0xfb06, 0xfd00])
9075         # 2222/171E, 23/30
9076         pkt = NCP(0x171E, "Set Watchdog Delay Interval", 'file')
9077         pkt.Request( 14, [
9078                 rec( 10, 4, NumberOfMinutesToDelay ),
9079         ])
9080         pkt.Reply(8)
9081         pkt.CompletionCodes([0x0000, 0x0107])
9082         # 2222/171F, 23/31
9083         pkt = NCP(0x171F, "Get Connection List From Object", 'file')
9084         pkt.Request( 18, [
9085                 rec( 10, 4, ObjectID, BE ),
9086                 rec( 14, 4, ConnectionNumber ),
9087         ])
9088         pkt.Reply( (9, 136), [
9089                 rec( 8, (1, 128), ConnectionNumberList ),
9090         ])
9091         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
9092         # 2222/1720, 23/32
9093         pkt = NCP(0x1720, "Scan Bindery Object (List)", 'bindery')
9094         pkt.Request((23,70), [
9095                 rec( 10, 4, NextObjectID, BE ),
9096                 rec( 14, 4, ObjectType, BE ),
9097                 rec( 18, 4, InfoFlags ),
9098                 rec( 22, (1,48), ObjectName ),
9099         ], info_str=(ObjectName, "Scan Bindery Object: %s", ", %s"))
9100         pkt.Reply(NO_LENGTH_CHECK, [
9101                 rec( 8, 4, ObjectInfoReturnCount ),
9102                 rec( 12, 4, NextObjectID, BE ),
9103                 rec( 16, 4, ObjectIDInfo ),
9104                 srec(ObjectTypeStruct, req_cond="ncp.info_flags_type == TRUE"),
9105                 srec(ObjectSecurityStruct, req_cond="ncp.info_flags_security == TRUE"),
9106                 srec(ObjectFlagsStruct, req_cond="ncp.info_flags_flags == TRUE"),
9107                 srec(ObjectNameStruct, req_cond="ncp.info_flags_name == TRUE"),
9108         ])
9109         pkt.ReqCondSizeVariable()
9110         pkt.CompletionCodes([0x0000, 0x9600, 0xef01, 0xfc02, 0xfe01, 0xff00])
9111         # 2222/1721, 23/33
9112         pkt = NCP(0x1721, "Generate GUIDs", 'nds')
9113         pkt.Request( 14, [
9114                 rec( 10, 4, ReturnInfoCount ),
9115         ])
9116         pkt.Reply(28, [
9117                 rec( 8, 4, ReturnInfoCount, var="x" ),
9118                 rec( 12, 16, GUID, repeat="x" ),
9119         ])
9120         pkt.CompletionCodes([0x0000])
9121         # 2222/1732, 23/50
9122         pkt = NCP(0x1732, "Create Bindery Object", 'bindery')
9123         pkt.Request( (15,62), [
9124                 rec( 10, 1, ObjectFlags ),
9125                 rec( 11, 1, ObjectSecurity ),
9126                 rec( 12, 2, ObjectType, BE ),
9127                 rec( 14, (1,48), ObjectName ),
9128         ], info_str=(ObjectName, "Create Bindery Object: %s", ", %s"))
9129         pkt.Reply(8)
9130         pkt.CompletionCodes([0x0000, 0x9600, 0xe700, 0xee00, 0xef00, 0xf101, 0xf501,
9131                              0xfc06, 0xfe07, 0xff00])
9132         # 2222/1733, 23/51
9133         pkt = NCP(0x1733, "Delete Bindery Object", 'bindery')
9134         pkt.Request( (13,60), [
9135                 rec( 10, 2, ObjectType, BE ),
9136                 rec( 12, (1,48), ObjectName ),
9137         ], info_str=(ObjectName, "Delete Bindery Object: %s", ", %s"))
9138         pkt.Reply(8)
9139         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf200, 0xf400, 0xf600, 0xfb00,
9140                              0xfc06, 0xfe07, 0xff00])
9141         # 2222/1734, 23/52
9142         pkt = NCP(0x1734, "Rename Bindery Object", 'bindery')
9143         pkt.Request( (14,108), [
9144                 rec( 10, 2, ObjectType, BE ),
9145                 rec( 12, (1,48), ObjectName ),
9146                 rec( -1, (1,48), NewObjectName ),
9147         ], info_str=(ObjectName, "Rename Bindery Object: %s", ", %s"))
9148         pkt.Reply(8)
9149         pkt.CompletionCodes([0x0000, 0x9600, 0xee00, 0xf000, 0xf300, 0xfc06, 0xfe07, 0xff00])
9150         # 2222/1735, 23/53
9151         pkt = NCP(0x1735, "Get Bindery Object ID", 'bindery')
9152         pkt.Request((13,60), [
9153                 rec( 10, 2, ObjectType, BE ),
9154                 rec( 12, (1,48), ObjectName ),
9155         ], info_str=(ObjectName, "Get Bindery Object: %s", ", %s"))
9156         pkt.Reply(62, [
9157                 rec( 8, 4, ObjectID, BE ),
9158                 rec( 12, 2, ObjectType, BE ),
9159                 rec( 14, 48, ObjectNameLen ),
9160         ])
9161         pkt.CompletionCodes([0x0000, 0x9600, 0xef01, 0xf000, 0xfc02, 0xfe01, 0xff00])
9162         # 2222/1736, 23/54
9163         pkt = NCP(0x1736, "Get Bindery Object Name", 'bindery')
9164         pkt.Request( 14, [
9165                 rec( 10, 4, ObjectID, BE ),
9166         ])
9167         pkt.Reply( 62, [
9168                 rec( 8, 4, ObjectID, BE ),
9169                 rec( 12, 2, ObjectType, BE ),
9170                 rec( 14, 48, ObjectNameLen ),
9171         ])
9172         pkt.CompletionCodes([0x0000, 0x9600, 0xf101, 0xfc02, 0xfe01, 0xff00])
9173         # 2222/1737, 23/55
9174         pkt = NCP(0x1737, "Scan Bindery Object", 'bindery')
9175         pkt.Request((17,64), [
9176                 rec( 10, 4, ObjectID, BE ),
9177                 rec( 14, 2, ObjectType, BE ),
9178                 rec( 16, (1,48), ObjectName ),
9179         ], info_str=(ObjectName, "Scan Bindery Object: %s", ", %s"))
9180         pkt.Reply(65, [
9181                 rec( 8, 4, ObjectID, BE ),
9182                 rec( 12, 2, ObjectType, BE ),
9183                 rec( 14, 48, ObjectNameLen ),
9184                 rec( 62, 1, ObjectFlags ),
9185                 rec( 63, 1, ObjectSecurity ),
9186                 rec( 64, 1, ObjectHasProperties ),
9187         ])
9188         pkt.CompletionCodes([0x0000, 0x9600, 0xef01, 0xfc02,
9189                              0xfe01, 0xff00])
9190         # 2222/1738, 23/56
9191         pkt = NCP(0x1738, "Change Bindery Object Security", 'bindery')
9192         pkt.Request((14,61), [
9193                 rec( 10, 1, ObjectSecurity ),
9194                 rec( 11, 2, ObjectType, BE ),
9195                 rec( 13, (1,48), ObjectName ),
9196         ], info_str=(ObjectName, "Change Bindery Object Security: %s", ", %s"))
9197         pkt.Reply(8)
9198         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf501, 0xfc02, 0xfe01, 0xff00])
9199         # 2222/1739, 23/57
9200         pkt = NCP(0x1739, "Create Property", 'bindery')
9201         pkt.Request((16,78), [
9202                 rec( 10, 2, ObjectType, BE ),
9203                 rec( 12, (1,48), ObjectName ),
9204                 rec( -1, 1, PropertyType ),
9205                 rec( -1, 1, ObjectSecurity ),
9206                 rec( -1, (1,16), PropertyName ),
9207         ], info_str=(PropertyName, "Create Property: %s", ", %s"))
9208         pkt.Reply(8)
9209         pkt.CompletionCodes([0x0000, 0x9600, 0xed00, 0xef00, 0xf000, 0xf101,
9210                              0xf200, 0xf600, 0xf700, 0xfb00, 0xfc02, 0xfe01,
9211                              0xff00])
9212         # 2222/173A, 23/58
9213         pkt = NCP(0x173A, "Delete Property", 'bindery')
9214         pkt.Request((14,76), [
9215                 rec( 10, 2, ObjectType, BE ),
9216                 rec( 12, (1,48), ObjectName ),
9217                 rec( -1, (1,16), PropertyName ),
9218         ], info_str=(PropertyName, "Delete Property: %s", ", %s"))
9219         pkt.Reply(8)
9220         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf600, 0xfb00, 0xfc02,
9221                              0xfe01, 0xff00])
9222         # 2222/173B, 23/59
9223         pkt = NCP(0x173B, "Change Property Security", 'bindery')
9224         pkt.Request((15,77), [
9225                 rec( 10, 2, ObjectType, BE ),
9226                 rec( 12, (1,48), ObjectName ),
9227                 rec( -1, 1, ObjectSecurity ),
9228                 rec( -1, (1,16), PropertyName ),
9229         ], info_str=(PropertyName, "Change Property Security: %s", ", %s"))
9230         pkt.Reply(8)
9231         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf200, 0xf600, 0xfb00,
9232                              0xfc02, 0xfe01, 0xff00])
9233         # 2222/173C, 23/60
9234         pkt = NCP(0x173C, "Scan Property", 'bindery')
9235         pkt.Request((18,80), [
9236                 rec( 10, 2, ObjectType, BE ),
9237                 rec( 12, (1,48), ObjectName ),
9238                 rec( -1, 4, LastInstance, BE ),
9239                 rec( -1, (1,16), PropertyName ),
9240         ], info_str=(PropertyName, "Scan Property: %s", ", %s"))
9241         pkt.Reply( 32, [
9242                 rec( 8, 16, PropertyName16 ),
9243                 rec( 24, 1, ObjectFlags ),
9244                 rec( 25, 1, ObjectSecurity ),
9245                 rec( 26, 4, SearchInstance, BE ),
9246                 rec( 30, 1, ValueAvailable ),
9247                 rec( 31, 1, MoreProperties ),
9248         ])
9249         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf200, 0xf600, 0xfb00,
9250                              0xfc02, 0xfe01, 0xff00])
9251         # 2222/173D, 23/61
9252         pkt = NCP(0x173D, "Read Property Value", 'bindery')
9253         pkt.Request((15,77), [
9254                 rec( 10, 2, ObjectType, BE ),
9255                 rec( 12, (1,48), ObjectName ),
9256                 rec( -1, 1, PropertySegment ),
9257                 rec( -1, (1,16), PropertyName ),
9258         ], info_str=(PropertyName, "Read Property Value: %s", ", %s"))
9259         pkt.Reply(138, [
9260                 rec( 8, 128, PropertyData ),
9261                 rec( 136, 1, PropertyHasMoreSegments ),
9262                 rec( 137, 1, PropertyType ),
9263         ])
9264         pkt.CompletionCodes([0x0000, 0x8800, 0x9300, 0x9600, 0xec01,
9265                              0xf000, 0xf100, 0xf900, 0xfb02, 0xfc02,
9266                              0xfe01, 0xff00])
9267         # 2222/173E, 23/62
9268         pkt = NCP(0x173E, "Write Property Value", 'bindery')
9269         pkt.Request((144,206), [
9270                 rec( 10, 2, ObjectType, BE ),
9271                 rec( 12, (1,48), ObjectName ),
9272                 rec( -1, 1, PropertySegment ),
9273                 rec( -1, 1, MoreFlag ),
9274                 rec( -1, (1,16), PropertyName ),
9275                 rec( -1, 128, PropertyValue ),
9276         ], info_str=(PropertyName, "Write Property Value: %s", ", %s"))
9277         pkt.Reply(8)
9278         pkt.CompletionCodes([0x0000, 0x9600, 0xe800, 0xec01, 0xf000, 0xf800,
9279                              0xfb02, 0xfc03, 0xfe01, 0xff00 ])
9280         # 2222/173F, 23/63
9281         pkt = NCP(0x173F, "Verify Bindery Object Password", 'bindery')
9282         pkt.Request((14,92), [
9283                 rec( 10, 2, ObjectType, BE ),
9284                 rec( 12, (1,48), ObjectName ),
9285                 rec( -1, (1,32), Password ),
9286         ], info_str=(ObjectName, "Verify Bindery Object Password: %s", ", %s"))
9287         pkt.Reply(8)
9288         pkt.CompletionCodes([0x0000, 0x9600, 0xe800, 0xec01, 0xf000, 0xf101,
9289                              0xfb02, 0xfc03, 0xfe01, 0xff00 ])
9290         # 2222/1740, 23/64
9291         pkt = NCP(0x1740, "Change Bindery Object Password", 'bindery')
9292         pkt.Request((15,124), [
9293                 rec( 10, 2, ObjectType, BE ),
9294                 rec( 12, (1,48), ObjectName ),
9295                 rec( -1, (1,32), Password ),
9296                 rec( -1, (1,32), NewPassword ),
9297         ], info_str=(ObjectName, "Change Bindery Object Password: %s", ", %s"))
9298         pkt.Reply(8)
9299         pkt.CompletionCodes([0x0000, 0x9600, 0xc501, 0xd701, 0xe800, 0xec01, 0xf001,
9300                              0xf100, 0xf800, 0xfb02, 0xfc03, 0xfe01, 0xff00])
9301         # 2222/1741, 23/65
9302         pkt = NCP(0x1741, "Add Bindery Object To Set", 'bindery')
9303         pkt.Request((17,126), [
9304                 rec( 10, 2, ObjectType, BE ),
9305                 rec( 12, (1,48), ObjectName ),
9306                 rec( -1, (1,16), PropertyName ),
9307                 rec( -1, 2, MemberType, BE ),
9308                 rec( -1, (1,48), MemberName ),
9309         ], info_str=(MemberName, "Add Bindery Object to Set: %s", ", %s"))
9310         pkt.Reply(8)
9311         pkt.CompletionCodes([0x0000, 0x9600, 0xe800, 0xe900, 0xea00, 0xeb00,
9312                              0xec01, 0xf000, 0xf800, 0xfb02, 0xfc03, 0xfe01,
9313                              0xff00])
9314         # 2222/1742, 23/66
9315         pkt = NCP(0x1742, "Delete Bindery Object From Set", 'bindery')
9316         pkt.Request((17,126), [
9317                 rec( 10, 2, ObjectType, BE ),
9318                 rec( 12, (1,48), ObjectName ),
9319                 rec( -1, (1,16), PropertyName ),
9320                 rec( -1, 2, MemberType, BE ),
9321                 rec( -1, (1,48), MemberName ),
9322         ], info_str=(MemberName, "Delete Bindery Object from Set: %s", ", %s"))
9323         pkt.Reply(8)
9324         pkt.CompletionCodes([0x0000, 0x9600, 0xeb00, 0xf000, 0xf800, 0xfb02,
9325                              0xfc03, 0xfe01, 0xff00])
9326         # 2222/1743, 23/67
9327         pkt = NCP(0x1743, "Is Bindery Object In Set", 'bindery')
9328         pkt.Request((17,126), [
9329                 rec( 10, 2, ObjectType, BE ),
9330                 rec( 12, (1,48), ObjectName ),
9331                 rec( -1, (1,16), PropertyName ),
9332                 rec( -1, 2, MemberType, BE ),
9333                 rec( -1, (1,48), MemberName ),
9334         ], info_str=(MemberName, "Is Bindery Object in Set: %s", ", %s"))
9335         pkt.Reply(8)
9336         pkt.CompletionCodes([0x0000, 0x9600, 0xea00, 0xeb00, 0xec01, 0xf000,
9337                              0xfb02, 0xfc03, 0xfe01, 0xff00])
9338         # 2222/1744, 23/68
9339         pkt = NCP(0x1744, "Close Bindery", 'bindery')
9340         pkt.Request(10)
9341         pkt.Reply(8)
9342         pkt.CompletionCodes([0x0000, 0xff00])
9343         # 2222/1745, 23/69
9344         pkt = NCP(0x1745, "Open Bindery", 'bindery')
9345         pkt.Request(10)
9346         pkt.Reply(8)
9347         pkt.CompletionCodes([0x0000, 0xff00])
9348         # 2222/1746, 23/70
9349         pkt = NCP(0x1746, "Get Bindery Access Level", 'bindery')
9350         pkt.Request(10)
9351         pkt.Reply(13, [
9352                 rec( 8, 1, ObjectSecurity ),
9353                 rec( 9, 4, LoggedObjectID, BE ),
9354         ])
9355         pkt.CompletionCodes([0x0000, 0x9600])
9356         # 2222/1747, 23/71
9357         pkt = NCP(0x1747, "Scan Bindery Object Trustee Paths", 'bindery')
9358         pkt.Request(17, [
9359                 rec( 10, 1, VolumeNumber ),
9360                 rec( 11, 2, LastSequenceNumber, BE ),
9361                 rec( 13, 4, ObjectID, BE ),
9362         ])
9363         pkt.Reply((16,270), [
9364                 rec( 8, 2, LastSequenceNumber, BE),
9365                 rec( 10, 4, ObjectID, BE ),
9366                 rec( 14, 1, ObjectSecurity ),
9367                 rec( 15, (1,255), Path ),
9368         ])
9369         pkt.CompletionCodes([0x0000, 0x9300, 0x9600, 0xa100, 0xf000, 0xf100,
9370                              0xf200, 0xfc02, 0xfe01, 0xff00])
9371         # 2222/1748, 23/72
9372         pkt = NCP(0x1748, "Get Bindery Object Access Level", 'bindery')
9373         pkt.Request(14, [
9374                 rec( 10, 4, ObjectID, BE ),
9375         ])
9376         pkt.Reply(9, [
9377                 rec( 8, 1, ObjectSecurity ),
9378         ])
9379         pkt.CompletionCodes([0x0000, 0x9600])
9380         # 2222/1749, 23/73
9381         pkt = NCP(0x1749, "Is Calling Station a Manager", 'bindery')
9382         pkt.Request(10)
9383         pkt.Reply(8)
9384         pkt.CompletionCodes([0x0003, 0xff1e])
9385         # 2222/174A, 23/74
9386         pkt = NCP(0x174A, "Keyed Verify Password", 'bindery')
9387         pkt.Request((21,68), [
9388                 rec( 10, 8, LoginKey ),
9389                 rec( 18, 2, ObjectType, BE ),
9390                 rec( 20, (1,48), ObjectName ),
9391         ], info_str=(ObjectName, "Keyed Verify Password: %s", ", %s"))
9392         pkt.Reply(8)
9393         pkt.CompletionCodes([0x0000, 0xc500, 0xfe01, 0xff0c])
9394         # 2222/174B, 23/75
9395         pkt = NCP(0x174B, "Keyed Change Password", 'bindery')
9396         pkt.Request((22,100), [
9397                 rec( 10, 8, LoginKey ),
9398                 rec( 18, 2, ObjectType, BE ),
9399                 rec( 20, (1,48), ObjectName ),
9400                 rec( -1, (1,32), Password ),
9401         ], info_str=(ObjectName, "Keyed Change Password: %s", ", %s"))
9402         pkt.Reply(8)
9403         pkt.CompletionCodes([0x0000, 0xc500, 0xfe01, 0xff0c])
9404         # 2222/174C, 23/76
9405         pkt = NCP(0x174C, "List Relations Of an Object", 'bindery')
9406         pkt.Request((18,80), [
9407                 rec( 10, 4, LastSeen, BE ),
9408                 rec( 14, 2, ObjectType, BE ),
9409                 rec( 16, (1,48), ObjectName ),
9410                 rec( -1, (1,16), PropertyName ),
9411         ], info_str=(ObjectName, "List Relations of an Object: %s", ", %s"))
9412         pkt.Reply(14, [
9413                 rec( 8, 2, RelationsCount, BE, var="x" ),
9414                 rec( 10, 4, ObjectID, BE, repeat="x" ),
9415         ])
9416         pkt.CompletionCodes([0x0000, 0xf000, 0xf200, 0xfe01, 0xff00])
9417         # 2222/1764, 23/100
9418         pkt = NCP(0x1764, "Create Queue", 'qms')
9419         pkt.Request((15,316), [
9420                 rec( 10, 2, QueueType, BE ),
9421                 rec( 12, (1,48), QueueName ),
9422                 rec( -1, 1, PathBase ),
9423                 rec( -1, (1,255), Path ),
9424         ], info_str=(QueueName, "Create Queue: %s", ", %s"))
9425         pkt.Reply(12, [
9426                 rec( 8, 4, QueueID, BE ),
9427         ])
9428         pkt.CompletionCodes([0x0000, 0x9600, 0x9900, 0xd000, 0xd100,
9429                              0xd200, 0xd300, 0xd400, 0xd500, 0xd601,
9430                              0xd703, 0xd800, 0xd902, 0xda01, 0xdb02,
9431                              0xee00, 0xff00])
9432         # 2222/1765, 23/101
9433         pkt = NCP(0x1765, "Destroy Queue", 'qms')
9434         pkt.Request(14, [
9435                 rec( 10, 4, QueueID, BE ),
9436         ])
9437         pkt.Reply(8)
9438         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9439                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9440                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9441         # 2222/1766, 23/102
9442         pkt = NCP(0x1766, "Read Queue Current Status", 'qms')
9443         pkt.Request(14, [
9444                 rec( 10, 4, QueueID, BE ),
9445         ])
9446         pkt.Reply(20, [
9447                 rec( 8, 4, QueueID, BE ),
9448                 rec( 12, 1, QueueStatus ),
9449                 rec( 13, 1, CurrentEntries ),
9450                 rec( 14, 1, CurrentServers, var="x" ),
9451                 rec( 15, 4, ServerIDList, repeat="x" ),
9452                 rec( 19, 1, ServerStationList, repeat="x" ),
9453         ])
9454         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9455                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9456                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9457         # 2222/1767, 23/103
9458         pkt = NCP(0x1767, "Set Queue Current Status", 'qms')
9459         pkt.Request(15, [
9460                 rec( 10, 4, QueueID, BE ),
9461                 rec( 14, 1, QueueStatus ),
9462         ])
9463         pkt.Reply(8)
9464         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9465                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9466                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07,
9467                              0xff00])
9468         # 2222/1768, 23/104
9469         pkt = NCP(0x1768, "Create Queue Job And File", 'qms')
9470         pkt.Request(264, [
9471                 rec( 10, 4, QueueID, BE ),
9472                 rec( 14, 250, JobStruct ),
9473         ])
9474         pkt.Reply(62, [
9475                 rec( 8, 1, ClientStation ),
9476                 rec( 9, 1, ClientTaskNumber ),
9477                 rec( 10, 4, ClientIDNumber, BE ),
9478                 rec( 14, 4, TargetServerIDNumber, BE ),
9479                 rec( 18, 6, TargetExecutionTime ),
9480                 rec( 24, 6, JobEntryTime ),
9481                 rec( 30, 2, JobNumber, BE ),
9482                 rec( 32, 2, JobType, BE ),
9483                 rec( 34, 1, JobPosition ),
9484                 rec( 35, 1, JobControlFlags ),
9485                 rec( 36, 14, JobFileName ),
9486                 rec( 50, 6, JobFileHandle ),
9487                 rec( 56, 1, ServerStation ),
9488                 rec( 57, 1, ServerTaskNumber ),
9489                 rec( 58, 4, ServerID, BE ),
9490         ])              
9491         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9492                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9493                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07,
9494                              0xff00])
9495         # 2222/1769, 23/105
9496         pkt = NCP(0x1769, "Close File And Start Queue Job", 'qms')
9497         pkt.Request(16, [
9498                 rec( 10, 4, QueueID, BE ),
9499                 rec( 14, 2, JobNumber, BE ),
9500         ])
9501         pkt.Reply(8)
9502         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9503                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9504                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9505         # 2222/176A, 23/106
9506         pkt = NCP(0x176A, "Remove Job From Queue", 'qms')
9507         pkt.Request(16, [
9508                 rec( 10, 4, QueueID, BE ),
9509                 rec( 14, 2, JobNumber, BE ),
9510         ])
9511         pkt.Reply(8)
9512         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9513                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9514                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9515         # 2222/176B, 23/107
9516         pkt = NCP(0x176B, "Get Queue Job List", 'qms')
9517         pkt.Request(14, [
9518                 rec( 10, 4, QueueID, BE ),
9519         ])
9520         pkt.Reply(12, [
9521                 rec( 8, 2, JobCount, BE, var="x" ),
9522                 rec( 10, 2, JobNumber, BE, repeat="x" ),
9523         ])
9524         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9525                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9526                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9527         # 2222/176C, 23/108
9528         pkt = NCP(0x176C, "Read Queue Job Entry", 'qms')
9529         pkt.Request(16, [
9530                 rec( 10, 4, QueueID, BE ),
9531                 rec( 14, 2, JobNumber, BE ),
9532         ])
9533         pkt.Reply(258, [
9534             rec( 8, 250, JobStruct ),
9535         ])              
9536         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9537                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9538                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9539         # 2222/176D, 23/109
9540         pkt = NCP(0x176D, "Change Queue Job Entry", 'qms')
9541         pkt.Request(260, [
9542             rec( 14, 250, JobStruct ),
9543         ])
9544         pkt.Reply(8)            
9545         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9546                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9547                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9548         # 2222/176E, 23/110
9549         pkt = NCP(0x176E, "Change Queue Job Position", 'qms')
9550         pkt.Request(17, [
9551                 rec( 10, 4, QueueID, BE ),
9552                 rec( 14, 2, JobNumber, BE ),
9553                 rec( 16, 1, NewPosition ),
9554         ])
9555         pkt.Reply(8)
9556         pkt.CompletionCodes([0x0000, 0x9600, 0xd000, 0xd100, 0xd500,
9557                              0xd601, 0xfe07, 0xff1f])
9558         # 2222/176F, 23/111
9559         pkt = NCP(0x176F, "Attach Queue Server To Queue", 'qms')
9560         pkt.Request(14, [
9561                 rec( 10, 4, QueueID, BE ),
9562         ])
9563         pkt.Reply(8)
9564         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9565                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9566                              0xd800, 0xd902, 0xda01, 0xdb02, 0xea00,
9567                              0xfc06, 0xff00])
9568         # 2222/1770, 23/112
9569         pkt = NCP(0x1770, "Detach Queue Server From Queue", 'qms')
9570         pkt.Request(14, [
9571                 rec( 10, 4, QueueID, BE ),
9572         ])
9573         pkt.Reply(8)
9574         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9575                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9576                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9577         # 2222/1771, 23/113
9578         pkt = NCP(0x1771, "Service Queue Job", 'qms')
9579         pkt.Request(16, [
9580                 rec( 10, 4, QueueID, BE ),
9581                 rec( 14, 2, ServiceType, BE ),
9582         ])
9583         pkt.Reply(62, [
9584                 rec( 8, 1, ClientStation ),
9585                 rec( 9, 1, ClientTaskNumber ),
9586                 rec( 10, 4, ClientIDNumber, BE ),
9587                 rec( 14, 4, TargetServerIDNumber, BE ),
9588                 rec( 18, 6, TargetExecutionTime ),
9589                 rec( 24, 6, JobEntryTime ),
9590                 rec( 30, 2, JobNumber, BE ),
9591                 rec( 32, 2, JobType, BE ),
9592                 rec( 34, 1, JobPosition ),
9593                 rec( 35, 1, JobControlFlags ),
9594                 rec( 36, 14, JobFileName ),
9595                 rec( 50, 6, JobFileHandle ),
9596                 rec( 56, 1, ServerStation ),
9597                 rec( 57, 1, ServerTaskNumber ),
9598                 rec( 58, 4, ServerID, BE ),
9599         ])              
9600         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9601                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9602                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9603         # 2222/1772, 23/114
9604         pkt = NCP(0x1772, "Finish Servicing Queue Job", 'qms')
9605         pkt.Request(20, [
9606                 rec( 10, 4, QueueID, BE ),
9607                 rec( 14, 2, JobNumber, BE ),
9608                 rec( 16, 4, ChargeInformation, BE ),
9609         ])
9610         pkt.Reply(8)            
9611         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9612                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9613                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9614         # 2222/1773, 23/115
9615         pkt = NCP(0x1773, "Abort Servicing Queue Job", 'qms')
9616         pkt.Request(16, [
9617                 rec( 10, 4, QueueID, BE ),
9618                 rec( 14, 2, JobNumber, BE ),
9619         ])
9620         pkt.Reply(8)            
9621         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9622                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9623                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9624         # 2222/1774, 23/116
9625         pkt = NCP(0x1774, "Change To Client Rights", 'qms')
9626         pkt.Request(16, [
9627                 rec( 10, 4, QueueID, BE ),
9628                 rec( 14, 2, JobNumber, BE ),
9629         ])
9630         pkt.Reply(8)            
9631         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9632                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9633                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9634         # 2222/1775, 23/117
9635         pkt = NCP(0x1775, "Restore Queue Server Rights", 'qms')
9636         pkt.Request(10)
9637         pkt.Reply(8)            
9638         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9639                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9640                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9641         # 2222/1776, 23/118
9642         pkt = NCP(0x1776, "Read Queue Server Current Status", 'qms')
9643         pkt.Request(19, [
9644                 rec( 10, 4, QueueID, BE ),
9645                 rec( 14, 4, ServerID, BE ),
9646                 rec( 18, 1, ServerStation ),
9647         ])
9648         pkt.Reply(72, [
9649                 rec( 8, 64, ServerStatusRecord ),
9650         ])
9651         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9652                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9653                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9654         # 2222/1777, 23/119
9655         pkt = NCP(0x1777, "Set Queue Server Current Status", 'qms')
9656         pkt.Request(78, [
9657                 rec( 10, 4, QueueID, BE ),
9658                 rec( 14, 64, ServerStatusRecord ),
9659         ])
9660         pkt.Reply(8)
9661         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9662                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9663                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9664         # 2222/1778, 23/120
9665         pkt = NCP(0x1778, "Get Queue Job File Size", 'qms')
9666         pkt.Request(16, [
9667                 rec( 10, 4, QueueID, BE ),
9668                 rec( 14, 2, JobNumber, BE ),
9669         ])
9670         pkt.Reply(20, [
9671                 rec( 8, 4, QueueID, BE ),
9672                 rec( 12, 4, JobNumberLong ),
9673                 rec( 16, 4, FileSize, BE ),
9674         ])
9675         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9676                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9677                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9678         # 2222/1779, 23/121
9679         pkt = NCP(0x1779, "Create Queue Job And File", 'qms')
9680         pkt.Request(264, [
9681                 rec( 10, 4, QueueID, BE ),
9682                 rec( 14, 250, JobStruct ),
9683         ])
9684         pkt.Reply(94, [
9685                 rec( 8, 86, JobStructNew ),
9686         ])              
9687         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9688                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9689                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9690         # 2222/177A, 23/122
9691         pkt = NCP(0x177A, "Read Queue Job Entry", 'qms')
9692         pkt.Request(18, [
9693                 rec( 10, 4, QueueID, BE ),
9694                 rec( 14, 4, JobNumberLong ),
9695         ])
9696         pkt.Reply(258, [
9697             rec( 8, 250, JobStruct ),
9698         ])              
9699         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9700                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9701                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9702         # 2222/177B, 23/123
9703         pkt = NCP(0x177B, "Change Queue Job Entry", 'qms')
9704         pkt.Request(264, [
9705                 rec( 10, 4, QueueID, BE ),
9706                 rec( 14, 250, JobStruct ),
9707         ])
9708         pkt.Reply(8)            
9709         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9710                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9711                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07, 0xff00])
9712         # 2222/177C, 23/124
9713         pkt = NCP(0x177C, "Service Queue Job", 'qms')
9714         pkt.Request(16, [
9715                 rec( 10, 4, QueueID, BE ),
9716                 rec( 14, 2, ServiceType ),
9717         ])
9718         pkt.Reply(94, [
9719             rec( 8, 86, JobStructNew ),
9720         ])              
9721         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9722                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9723                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9724         # 2222/177D, 23/125
9725         pkt = NCP(0x177D, "Read Queue Current Status", 'qms')
9726         pkt.Request(14, [
9727                 rec( 10, 4, QueueID, BE ),
9728         ])
9729         pkt.Reply(32, [
9730                 rec( 8, 4, QueueID, BE ),
9731                 rec( 12, 1, QueueStatus ),
9732                 rec( 13, 3, Reserved3 ),
9733                 rec( 16, 4, CurrentEntries ),
9734                 rec( 20, 4, CurrentServers, var="x" ),
9735                 rec( 24, 4, ServerIDList, repeat="x" ),
9736                 rec( 28, 4, ServerStationList, repeat="x" ),
9737         ])
9738         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9739                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9740                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9741         # 2222/177E, 23/126
9742         pkt = NCP(0x177E, "Set Queue Current Status", 'qms')
9743         pkt.Request(15, [
9744                 rec( 10, 4, QueueID, BE ),
9745                 rec( 14, 1, QueueStatus ),
9746         ])
9747         pkt.Reply(8)
9748         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9749                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9750                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9751         # 2222/177F, 23/127
9752         pkt = NCP(0x177F, "Close File And Start Queue Job", 'qms')
9753         pkt.Request(18, [
9754                 rec( 10, 4, QueueID, BE ),
9755                 rec( 14, 4, JobNumberLong ),
9756         ])
9757         pkt.Reply(8)
9758         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9759                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9760                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9761         # 2222/1780, 23/128
9762         pkt = NCP(0x1780, "Remove Job From Queue", 'qms')
9763         pkt.Request(18, [
9764                 rec( 10, 4, QueueID, BE ),
9765                 rec( 14, 4, JobNumberLong ),
9766         ])
9767         pkt.Reply(8)
9768         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9769                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9770                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9771         # 2222/1781, 23/129
9772         pkt = NCP(0x1781, "Get Queue Job List", 'qms')
9773         pkt.Request(18, [
9774                 rec( 10, 4, QueueID, BE ),
9775                 rec( 14, 4, JobNumberLong ),
9776         ])
9777         pkt.Reply(20, [
9778                 rec( 8, 4, TotalQueueJobs ),
9779                 rec( 12, 4, ReplyQueueJobNumbers, var="x" ),
9780                 rec( 16, 4, JobNumberList, repeat="x" ),
9781         ])
9782         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9783                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9784                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9785         # 2222/1782, 23/130
9786         pkt = NCP(0x1782, "Change Job Priority", 'qms')
9787         pkt.Request(22, [
9788                 rec( 10, 4, QueueID, BE ),
9789                 rec( 14, 4, JobNumberLong ),
9790                 rec( 18, 4, Priority ),
9791         ])
9792         pkt.Reply(8)
9793         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9794                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9795                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9796         # 2222/1783, 23/131
9797         pkt = NCP(0x1783, "Finish Servicing Queue Job", 'qms')
9798         pkt.Request(22, [
9799                 rec( 10, 4, QueueID, BE ),
9800                 rec( 14, 4, JobNumberLong ),
9801                 rec( 18, 4, ChargeInformation ),
9802         ])
9803         pkt.Reply(8)            
9804         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9805                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9806                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9807         # 2222/1784, 23/132
9808         pkt = NCP(0x1784, "Abort Servicing Queue Job", 'qms')
9809         pkt.Request(18, [
9810                 rec( 10, 4, QueueID, BE ),
9811                 rec( 14, 4, JobNumberLong ),
9812         ])
9813         pkt.Reply(8)            
9814         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9815                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9816                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9817         # 2222/1785, 23/133
9818         pkt = NCP(0x1785, "Change To Client Rights", 'qms')
9819         pkt.Request(18, [
9820                 rec( 10, 4, QueueID, BE ),
9821                 rec( 14, 4, JobNumberLong ),
9822         ])
9823         pkt.Reply(8)            
9824         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9825                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9826                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9827         # 2222/1786, 23/134
9828         pkt = NCP(0x1786, "Read Queue Server Current Status", 'qms')
9829         pkt.Request(22, [
9830                 rec( 10, 4, QueueID, BE ),
9831                 rec( 14, 4, ServerID, BE ),
9832                 rec( 18, 4, ServerStation ),
9833         ])
9834         pkt.Reply(72, [
9835                 rec( 8, 64, ServerStatusRecord ),
9836         ])
9837         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9838                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9839                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9840         # 2222/1787, 23/135
9841         pkt = NCP(0x1787, "Get Queue Job File Size", 'qms')
9842         pkt.Request(18, [
9843                 rec( 10, 4, QueueID, BE ),
9844                 rec( 14, 4, JobNumberLong ),
9845         ])
9846         pkt.Reply(20, [
9847                 rec( 8, 4, QueueID, BE ),
9848                 rec( 12, 4, JobNumberLong ),
9849                 rec( 16, 4, FileSize, BE ),
9850         ])
9851         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9852                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9853                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9854         # 2222/1788, 23/136
9855         pkt = NCP(0x1788, "Move Queue Job From Src Q to Dst Q", 'qms')
9856         pkt.Request(22, [
9857                 rec( 10, 4, QueueID, BE ),
9858                 rec( 14, 4, JobNumberLong ),
9859                 rec( 18, 4, DstQueueID, BE ),
9860         ])
9861         pkt.Reply(12, [
9862                 rec( 8, 4, JobNumberLong ),
9863         ])
9864         pkt.CompletionCodes([0x0000, 0x7e01, 0xfc06])
9865         # 2222/1789, 23/137
9866         pkt = NCP(0x1789, "Get Queue Jobs From Form List", 'qms')
9867         pkt.Request(24, [
9868                 rec( 10, 4, QueueID, BE ),
9869                 rec( 14, 4, QueueStartPosition ),
9870                 rec( 18, 4, FormTypeCnt, var="x" ),
9871                 rec( 22, 2, FormType, repeat="x" ),
9872         ])
9873         pkt.Reply(20, [
9874                 rec( 8, 4, TotalQueueJobs ),
9875                 rec( 12, 4, JobCount, var="x" ),
9876                 rec( 16, 4, JobNumberList, repeat="x" ),
9877         ])
9878         pkt.CompletionCodes([0x0000, 0x7e01, 0xfc06])
9879         # 2222/178A, 23/138
9880         pkt = NCP(0x178A, "Service Queue Job By Form List", 'qms')
9881         pkt.Request(24, [
9882                 rec( 10, 4, QueueID, BE ),
9883                 rec( 14, 4, QueueStartPosition ),
9884                 rec( 18, 4, FormTypeCnt, var= "x" ),
9885                 rec( 22, 2, FormType, repeat="x" ),
9886         ])
9887         pkt.Reply(94, [
9888            rec( 8, 86, JobStructNew ),
9889         ])              
9890         pkt.CompletionCodes([0x0000, 0x7e01, 0xfc06])
9891         # 2222/1796, 23/150
9892         pkt = NCP(0x1796, "Get Current Account Status", 'accounting')
9893         pkt.Request((13,60), [
9894                 rec( 10, 2, ObjectType, BE ),
9895                 rec( 12, (1,48), ObjectName ),
9896         ], info_str=(ObjectName, "Get Current Account Status: %s", ", %s"))
9897         pkt.Reply(264, [
9898                 rec( 8, 4, AccountBalance, BE ),
9899                 rec( 12, 4, CreditLimit, BE ),
9900                 rec( 16, 120, Reserved120 ),
9901                 rec( 136, 4, HolderID, BE ),
9902                 rec( 140, 4, HoldAmount, BE ),
9903                 rec( 144, 4, HolderID, BE ),
9904                 rec( 148, 4, HoldAmount, BE ),
9905                 rec( 152, 4, HolderID, BE ),
9906                 rec( 156, 4, HoldAmount, BE ),
9907                 rec( 160, 4, HolderID, BE ),
9908                 rec( 164, 4, HoldAmount, BE ),
9909                 rec( 168, 4, HolderID, BE ),
9910                 rec( 172, 4, HoldAmount, BE ),
9911                 rec( 176, 4, HolderID, BE ),
9912                 rec( 180, 4, HoldAmount, BE ),
9913                 rec( 184, 4, HolderID, BE ),
9914                 rec( 188, 4, HoldAmount, BE ),
9915                 rec( 192, 4, HolderID, BE ),
9916                 rec( 196, 4, HoldAmount, BE ),
9917                 rec( 200, 4, HolderID, BE ),
9918                 rec( 204, 4, HoldAmount, BE ),
9919                 rec( 208, 4, HolderID, BE ),
9920                 rec( 212, 4, HoldAmount, BE ),
9921                 rec( 216, 4, HolderID, BE ),
9922                 rec( 220, 4, HoldAmount, BE ),
9923                 rec( 224, 4, HolderID, BE ),
9924                 rec( 228, 4, HoldAmount, BE ),
9925                 rec( 232, 4, HolderID, BE ),
9926                 rec( 236, 4, HoldAmount, BE ),
9927                 rec( 240, 4, HolderID, BE ),
9928                 rec( 244, 4, HoldAmount, BE ),
9929                 rec( 248, 4, HolderID, BE ),
9930                 rec( 252, 4, HoldAmount, BE ),
9931                 rec( 256, 4, HolderID, BE ),
9932                 rec( 260, 4, HoldAmount, BE ),
9933         ])              
9934         pkt.CompletionCodes([0x0000, 0x9600, 0xc000, 0xc101, 0xc400, 0xe800,
9935                              0xea00, 0xeb00, 0xec00, 0xfc06, 0xfe07, 0xff00])
9936         # 2222/1797, 23/151
9937         pkt = NCP(0x1797, "Submit Account Charge", 'accounting')
9938         pkt.Request((26,327), [
9939                 rec( 10, 2, ServiceType, BE ),
9940                 rec( 12, 4, ChargeAmount, BE ),
9941                 rec( 16, 4, HoldCancelAmount, BE ),
9942                 rec( 20, 2, ObjectType, BE ),
9943                 rec( 22, 2, CommentType, BE ),
9944                 rec( 24, (1,48), ObjectName ),
9945                 rec( -1, (1,255), Comment ),
9946         ], info_str=(ObjectName, "Submit Account Charge: %s", ", %s"))
9947         pkt.Reply(8)            
9948         pkt.CompletionCodes([0x0000, 0x0102, 0x8800, 0x9400, 0x9600, 0xa201,
9949                              0xc000, 0xc101, 0xc200, 0xc400, 0xe800, 0xea00,
9950                              0xeb00, 0xec00, 0xfe07, 0xff00])
9951         # 2222/1798, 23/152
9952         pkt = NCP(0x1798, "Submit Account Hold", 'accounting')
9953         pkt.Request((17,64), [
9954                 rec( 10, 4, HoldCancelAmount, BE ),
9955                 rec( 14, 2, ObjectType, BE ),
9956                 rec( 16, (1,48), ObjectName ),
9957         ], info_str=(ObjectName, "Submit Account Hold: %s", ", %s"))
9958         pkt.Reply(8)            
9959         pkt.CompletionCodes([0x0000, 0x0102, 0x8800, 0x9400, 0x9600, 0xa201,
9960                              0xc000, 0xc101, 0xc200, 0xc400, 0xe800, 0xea00,
9961                              0xeb00, 0xec00, 0xfe07, 0xff00])
9962         # 2222/1799, 23/153
9963         pkt = NCP(0x1799, "Submit Account Note", 'accounting')
9964         pkt.Request((18,319), [
9965                 rec( 10, 2, ServiceType, BE ),
9966                 rec( 12, 2, ObjectType, BE ),
9967                 rec( 14, 2, CommentType, BE ),
9968                 rec( 16, (1,48), ObjectName ),
9969                 rec( -1, (1,255), Comment ),
9970         ], info_str=(ObjectName, "Submit Account Note: %s", ", %s"))
9971         pkt.Reply(8)            
9972         pkt.CompletionCodes([0x0000, 0x0102, 0x9600, 0xc000, 0xc101, 0xc400,
9973                              0xe800, 0xea00, 0xeb00, 0xec00, 0xf000, 0xfc06,
9974                              0xff00])
9975         # 2222/17c8, 23/200
9976         pkt = NCP(0x17c8, "Check Console Privileges", 'stats')
9977         pkt.Request(10)
9978         pkt.Reply(8)            
9979         pkt.CompletionCodes([0x0000, 0xc601])
9980         # 2222/17c9, 23/201
9981         pkt = NCP(0x17c9, "Get File Server Description Strings", 'stats')
9982         pkt.Request(10)
9983         pkt.Reply(520, [
9984                 rec( 8, 512, DescriptionStrings ),
9985         ])
9986         pkt.CompletionCodes([0x0000, 0x9600])
9987         # 2222/17CA, 23/202
9988         pkt = NCP(0x17CA, "Set File Server Date And Time", 'stats')
9989         pkt.Request(16, [
9990                 rec( 10, 1, Year ),
9991                 rec( 11, 1, Month ),
9992                 rec( 12, 1, Day ),
9993                 rec( 13, 1, Hour ),
9994                 rec( 14, 1, Minute ),
9995                 rec( 15, 1, Second ),
9996         ])
9997         pkt.Reply(8)
9998         pkt.CompletionCodes([0x0000, 0xc601])
9999         # 2222/17CB, 23/203
10000         pkt = NCP(0x17CB, "Disable File Server Login", 'stats')
10001         pkt.Request(10)
10002         pkt.Reply(8)
10003         pkt.CompletionCodes([0x0000, 0xc601])
10004         # 2222/17CC, 23/204
10005         pkt = NCP(0x17CC, "Enable File Server Login", 'stats')
10006         pkt.Request(10)
10007         pkt.Reply(8)
10008         pkt.CompletionCodes([0x0000, 0xc601])
10009         # 2222/17CD, 23/205
10010         pkt = NCP(0x17CD, "Get File Server Login Status", 'stats')
10011         pkt.Request(10)
10012         pkt.Reply(12, [
10013                 rec( 8, 4, UserLoginAllowed ),
10014         ])
10015         pkt.CompletionCodes([0x0000, 0x9600, 0xfb01])
10016         # 2222/17CF, 23/207
10017         pkt = NCP(0x17CF, "Disable Transaction Tracking", 'stats')
10018         pkt.Request(10)
10019         pkt.Reply(8)
10020         pkt.CompletionCodes([0x0000, 0xc601])
10021         # 2222/17D0, 23/208
10022         pkt = NCP(0x17D0, "Enable Transaction Tracking", 'stats')
10023         pkt.Request(10)
10024         pkt.Reply(8)
10025         pkt.CompletionCodes([0x0000, 0xc601])
10026         # 2222/17D1, 23/209
10027         pkt = NCP(0x17D1, "Send Console Broadcast", 'stats')
10028         pkt.Request((13,267), [
10029                 rec( 10, 1, NumberOfStations, var="x" ),
10030                 rec( 11, 1, StationList, repeat="x" ),
10031                 rec( 12, (1, 255), TargetMessage ),
10032         ], info_str=(TargetMessage, "Send Console Broadcast: %s", ", %s"))
10033         pkt.Reply(8)
10034         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10035         # 2222/17D2, 23/210
10036         pkt = NCP(0x17D2, "Clear Connection Number", 'stats')
10037         pkt.Request(11, [
10038                 rec( 10, 1, ConnectionNumber ),
10039         ],info_str=(ConnectionNumber, "Clear Connection Number %d", ", %d"))
10040         pkt.Reply(8)
10041         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10042         # 2222/17D3, 23/211
10043         pkt = NCP(0x17D3, "Down File Server", 'stats')
10044         pkt.Request(11, [
10045                 rec( 10, 1, ForceFlag ),
10046         ])
10047         pkt.Reply(8)
10048         pkt.CompletionCodes([0x0000, 0xc601, 0xff00])
10049         # 2222/17D4, 23/212
10050         pkt = NCP(0x17D4, "Get File System Statistics", 'stats')
10051         pkt.Request(10)
10052         pkt.Reply(50, [
10053                 rec( 8, 4, SystemIntervalMarker, BE ),
10054                 rec( 12, 2, ConfiguredMaxOpenFiles ),
10055                 rec( 14, 2, ActualMaxOpenFiles ),
10056                 rec( 16, 2, CurrentOpenFiles ),
10057                 rec( 18, 4, TotalFilesOpened ),
10058                 rec( 22, 4, TotalReadRequests ),
10059                 rec( 26, 4, TotalWriteRequests ),
10060                 rec( 30, 2, CurrentChangedFATs ),
10061                 rec( 32, 4, TotalChangedFATs ),
10062                 rec( 36, 2, FATWriteErrors ),
10063                 rec( 38, 2, FatalFATWriteErrors ),
10064                 rec( 40, 2, FATScanErrors ),
10065                 rec( 42, 2, ActualMaxIndexedFiles ),
10066                 rec( 44, 2, ActiveIndexedFiles ),
10067                 rec( 46, 2, AttachedIndexedFiles ),
10068                 rec( 48, 2, AvailableIndexedFiles ),
10069         ])
10070         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10071         # 2222/17D5, 23/213
10072         pkt = NCP(0x17D5, "Get Transaction Tracking Statistics", 'stats')
10073         pkt.Request((13,267), [
10074                 rec( 10, 2, LastRecordSeen ),
10075                 rec( 12, (1,255), SemaphoreName ),
10076         ])
10077         pkt.Reply(53, [
10078                 rec( 8, 4, SystemIntervalMarker, BE ),
10079                 rec( 12, 1, TransactionTrackingSupported ),
10080                 rec( 13, 1, TransactionTrackingEnabled ),
10081                 rec( 14, 2, TransactionVolumeNumber ),
10082                 rec( 16, 2, ConfiguredMaxSimultaneousTransactions ),
10083                 rec( 18, 2, ActualMaxSimultaneousTransactions ),
10084                 rec( 20, 2, CurrentTransactionCount ),
10085                 rec( 22, 4, TotalTransactionsPerformed ),
10086                 rec( 26, 4, TotalWriteTransactionsPerformed ),
10087                 rec( 30, 4, TotalTransactionsBackedOut ),
10088                 rec( 34, 2, TotalUnfilledBackoutRequests ),
10089                 rec( 36, 2, TransactionDiskSpace ),
10090                 rec( 38, 4, TransactionFATAllocations ),
10091                 rec( 42, 4, TransactionFileSizeChanges ),
10092                 rec( 46, 4, TransactionFilesTruncated ),
10093                 rec( 50, 1, NumberOfEntries, var="x" ),
10094                 rec( 51, 2, ConnTaskStruct, repeat="x" ),
10095         ])
10096         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10097         # 2222/17D6, 23/214
10098         pkt = NCP(0x17D6, "Read Disk Cache Statistics", 'stats')
10099         pkt.Request(10)
10100         pkt.Reply(86, [
10101                 rec( 8, 4, SystemIntervalMarker, BE ),
10102                 rec( 12, 2, CacheBufferCount ),
10103                 rec( 14, 2, CacheBufferSize ),
10104                 rec( 16, 2, DirtyCacheBuffers ),
10105                 rec( 18, 4, CacheReadRequests ),
10106                 rec( 22, 4, CacheWriteRequests ),
10107                 rec( 26, 4, CacheHits ),
10108                 rec( 30, 4, CacheMisses ),
10109                 rec( 34, 4, PhysicalReadRequests ),
10110                 rec( 38, 4, PhysicalWriteRequests ),
10111                 rec( 42, 2, PhysicalReadErrors ),
10112                 rec( 44, 2, PhysicalWriteErrors ),
10113                 rec( 46, 4, CacheGetRequests ),
10114                 rec( 50, 4, CacheFullWriteRequests ),
10115                 rec( 54, 4, CachePartialWriteRequests ),
10116                 rec( 58, 4, BackgroundDirtyWrites ),
10117                 rec( 62, 4, BackgroundAgedWrites ),
10118                 rec( 66, 4, TotalCacheWrites ),
10119                 rec( 70, 4, CacheAllocations ),
10120                 rec( 74, 2, ThrashingCount ),
10121                 rec( 76, 2, LRUBlockWasDirty ),
10122                 rec( 78, 2, ReadBeyondWrite ),
10123                 rec( 80, 2, FragmentWriteOccurred ),
10124                 rec( 82, 2, CacheHitOnUnavailableBlock ),
10125                 rec( 84, 2, CacheBlockScrapped ),
10126         ])
10127         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10128         # 2222/17D7, 23/215
10129         pkt = NCP(0x17D7, "Get Drive Mapping Table", 'stats')
10130         pkt.Request(10)
10131         pkt.Reply(184, [
10132                 rec( 8, 4, SystemIntervalMarker, BE ),
10133                 rec( 12, 1, SFTSupportLevel ),
10134                 rec( 13, 1, LogicalDriveCount ),
10135                 rec( 14, 1, PhysicalDriveCount ),
10136                 rec( 15, 1, DiskChannelTable ),
10137                 rec( 16, 4, Reserved4 ),
10138                 rec( 20, 2, PendingIOCommands, BE ),
10139                 rec( 22, 32, DriveMappingTable ),
10140                 rec( 54, 32, DriveMirrorTable ),
10141                 rec( 86, 32, DeadMirrorTable ),
10142                 rec( 118, 1, ReMirrorDriveNumber ),
10143                 rec( 119, 1, Filler ),
10144                 rec( 120, 4, ReMirrorCurrentOffset, BE ),
10145                 rec( 124, 60, SFTErrorTable ),
10146         ])
10147         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10148         # 2222/17D8, 23/216
10149         pkt = NCP(0x17D8, "Read Physical Disk Statistics", 'stats')
10150         pkt.Request(11, [
10151                 rec( 10, 1, PhysicalDiskNumber ),
10152         ])
10153         pkt.Reply(101, [
10154                 rec( 8, 4, SystemIntervalMarker, BE ),
10155                 rec( 12, 1, PhysicalDiskChannel ),
10156                 rec( 13, 1, DriveRemovableFlag ),
10157                 rec( 14, 1, PhysicalDriveType ),
10158                 rec( 15, 1, ControllerDriveNumber ),
10159                 rec( 16, 1, ControllerNumber ),
10160                 rec( 17, 1, ControllerType ),
10161                 rec( 18, 4, DriveSize ),
10162                 rec( 22, 2, DriveCylinders ),
10163                 rec( 24, 1, DriveHeads ),
10164                 rec( 25, 1, SectorsPerTrack ),
10165                 rec( 26, 64, DriveDefinitionString ),
10166                 rec( 90, 2, IOErrorCount ),
10167                 rec( 92, 4, HotFixTableStart ),
10168                 rec( 96, 2, HotFixTableSize ),
10169                 rec( 98, 2, HotFixBlocksAvailable ),
10170                 rec( 100, 1, HotFixDisabled ),
10171         ])
10172         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10173         # 2222/17D9, 23/217
10174         pkt = NCP(0x17D9, "Get Disk Channel Statistics", 'stats')
10175         pkt.Request(11, [
10176                 rec( 10, 1, DiskChannelNumber ),
10177         ])
10178         pkt.Reply(192, [
10179                 rec( 8, 4, SystemIntervalMarker, BE ),
10180                 rec( 12, 2, ChannelState, BE ),
10181                 rec( 14, 2, ChannelSynchronizationState, BE ),
10182                 rec( 16, 1, SoftwareDriverType ),
10183                 rec( 17, 1, SoftwareMajorVersionNumber ),
10184                 rec( 18, 1, SoftwareMinorVersionNumber ),
10185                 rec( 19, 65, SoftwareDescription ),
10186                 rec( 84, 8, IOAddressesUsed ),
10187                 rec( 92, 10, SharedMemoryAddresses ),
10188                 rec( 102, 4, InterruptNumbersUsed ),
10189                 rec( 106, 4, DMAChannelsUsed ),
10190                 rec( 110, 1, FlagBits ),
10191                 rec( 111, 1, Reserved ),
10192                 rec( 112, 80, ConfigurationDescription ),
10193         ])
10194         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10195         # 2222/17DB, 23/219
10196         pkt = NCP(0x17DB, "Get Connection's Open Files", 'file')
10197         pkt.Request(14, [
10198                 rec( 10, 2, ConnectionNumber ),
10199                 rec( 12, 2, LastRecordSeen, BE ),
10200         ])
10201         pkt.Reply(32, [
10202                 rec( 8, 2, NextRequestRecord ),
10203                 rec( 10, 1, NumberOfRecords, var="x" ),
10204                 rec( 11, 21, ConnStruct, repeat="x" ),
10205         ])
10206         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10207         # 2222/17DC, 23/220
10208         pkt = NCP(0x17DC, "Get Connection Using A File", 'file')
10209         pkt.Request((14,268), [
10210                 rec( 10, 2, LastRecordSeen, BE ),
10211                 rec( 12, 1, DirHandle ),
10212                 rec( 13, (1,255), Path ),
10213         ], info_str=(Path, "Get Connection Using File: %s", ", %s"))
10214         pkt.Reply(30, [
10215                 rec( 8, 2, UseCount, BE ),
10216                 rec( 10, 2, OpenCount, BE ),
10217                 rec( 12, 2, OpenForReadCount, BE ),
10218                 rec( 14, 2, OpenForWriteCount, BE ),
10219                 rec( 16, 2, DenyReadCount, BE ),
10220                 rec( 18, 2, DenyWriteCount, BE ),
10221                 rec( 20, 2, NextRequestRecord, BE ),
10222                 rec( 22, 1, Locked ),
10223                 rec( 23, 1, NumberOfRecords, var="x" ),
10224                 rec( 24, 6, ConnFileStruct, repeat="x" ),
10225         ])
10226         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10227         # 2222/17DD, 23/221
10228         pkt = NCP(0x17DD, "Get Physical Record Locks By Connection And File", 'file')
10229         pkt.Request(31, [
10230                 rec( 10, 2, TargetConnectionNumber ),
10231                 rec( 12, 2, LastRecordSeen, BE ),
10232                 rec( 14, 1, VolumeNumber ),
10233                 rec( 15, 2, DirectoryID ),
10234                 rec( 17, 14, FileName14 ),
10235         ], info_str=(FileName14, "Get Physical Record Locks by Connection and File: %s", ", %s"))
10236         pkt.Reply(22, [
10237                 rec( 8, 2, NextRequestRecord ),
10238                 rec( 10, 1, NumberOfLocks, var="x" ),
10239                 rec( 11, 1, Reserved ),
10240                 rec( 12, 10, LockStruct, repeat="x" ),
10241         ])
10242         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10243         # 2222/17DE, 23/222
10244         pkt = NCP(0x17DE, "Get Physical Record Locks By File", 'file')
10245         pkt.Request((14,268), [
10246                 rec( 10, 2, TargetConnectionNumber ),
10247                 rec( 12, 1, DirHandle ),
10248                 rec( 13, (1,255), Path ),
10249         ], info_str=(Path, "Get Physical Record Locks by File: %s", ", %s"))
10250         pkt.Reply(28, [
10251                 rec( 8, 2, NextRequestRecord ),
10252                 rec( 10, 1, NumberOfLocks, var="x" ),
10253                 rec( 11, 1, Reserved ),
10254                 rec( 12, 16, PhyLockStruct, repeat="x" ),
10255         ])
10256         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10257         # 2222/17DF, 23/223
10258         pkt = NCP(0x17DF, "Get Logical Records By Connection", 'file')
10259         pkt.Request(14, [
10260                 rec( 10, 2, TargetConnectionNumber ),
10261                 rec( 12, 2, LastRecordSeen, BE ),
10262         ])
10263         pkt.Reply((14,268), [
10264                 rec( 8, 2, NextRequestRecord ),
10265                 rec( 10, 1, NumberOfRecords, var="x" ),
10266                 rec( 11, (3, 257), LogLockStruct, repeat="x" ),
10267         ])
10268         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10269         # 2222/17E0, 23/224
10270         pkt = NCP(0x17E0, "Get Logical Record Information", 'file')
10271         pkt.Request((13,267), [
10272                 rec( 10, 2, LastRecordSeen ),
10273                 rec( 12, (1,255), LogicalRecordName ),
10274         ], info_str=(LogicalRecordName, "Get Logical Record Information: %s", ", %s"))
10275         pkt.Reply(20, [
10276                 rec( 8, 2, UseCount, BE ),
10277                 rec( 10, 2, ShareableLockCount, BE ),
10278                 rec( 12, 2, NextRequestRecord ),
10279                 rec( 14, 1, Locked ),
10280                 rec( 15, 1, NumberOfRecords, var="x" ),
10281                 rec( 16, 4, LogRecStruct, repeat="x" ),
10282         ])
10283         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10284         # 2222/17E1, 23/225
10285         pkt = NCP(0x17E1, "Get Connection's Semaphores", 'file')
10286         pkt.Request(14, [
10287                 rec( 10, 2, ConnectionNumber ),
10288                 rec( 12, 2, LastRecordSeen ),
10289         ])
10290         pkt.Reply((18,272), [
10291                 rec( 8, 2, NextRequestRecord ),
10292                 rec( 10, 2, NumberOfSemaphores, var="x" ),
10293                 rec( 12, (6,260), SemaStruct, repeat="x" ),
10294         ])
10295         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10296         # 2222/17E2, 23/226
10297         pkt = NCP(0x17E2, "Get Semaphore Information", 'file')
10298         pkt.Request((13,267), [
10299                 rec( 10, 2, LastRecordSeen ),
10300                 rec( 12, (1,255), SemaphoreName ),
10301         ], info_str=(SemaphoreName, "Get Semaphore Information: %s", ", %s"))
10302         pkt.Reply(17, [
10303                 rec( 8, 2, NextRequestRecord, BE ),
10304                 rec( 10, 2, OpenCount, BE ),
10305                 rec( 12, 1, SemaphoreValue ),
10306                 rec( 13, 1, NumberOfRecords, var="x" ),
10307                 rec( 14, 3, SemaInfoStruct, repeat="x" ),
10308         ])
10309         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10310         # 2222/17E3, 23/227
10311         pkt = NCP(0x17E3, "Get LAN Driver Configuration Information", 'stats')
10312         pkt.Request(11, [
10313                 rec( 10, 1, LANDriverNumber ),
10314         ])
10315         pkt.Reply(180, [
10316                 rec( 8, 4, NetworkAddress, BE ),
10317                 rec( 12, 6, HostAddress ),
10318                 rec( 18, 1, BoardInstalled ),
10319                 rec( 19, 1, OptionNumber ),
10320                 rec( 20, 160, ConfigurationText ),
10321         ])
10322         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10323         # 2222/17E5, 23/229
10324         pkt = NCP(0x17E5, "Get Connection Usage Statistics", 'stats')
10325         pkt.Request(12, [
10326                 rec( 10, 2, ConnectionNumber ),
10327         ])
10328         pkt.Reply(26, [
10329                 rec( 8, 2, NextRequestRecord ),
10330                 rec( 10, 6, BytesRead ),
10331                 rec( 16, 6, BytesWritten ),
10332                 rec( 22, 4, TotalRequestPackets ),
10333          ])
10334         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10335         # 2222/17E6, 23/230
10336         pkt = NCP(0x17E6, "Get Object's Remaining Disk Space", 'stats')
10337         pkt.Request(14, [
10338                 rec( 10, 4, ObjectID, BE ),
10339         ])
10340         pkt.Reply(21, [
10341                 rec( 8, 4, SystemIntervalMarker, BE ),
10342                 rec( 12, 4, ObjectID ),
10343                 rec( 16, 4, UnusedDiskBlocks, BE ),
10344                 rec( 20, 1, RestrictionsEnforced ),
10345          ])
10346         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])  
10347         # 2222/17E7, 23/231
10348         pkt = NCP(0x17E7, "Get File Server LAN I/O Statistics", 'stats')
10349         pkt.Request(10)
10350         pkt.Reply(74, [
10351                 rec( 8, 4, SystemIntervalMarker, BE ),
10352                 rec( 12, 2, ConfiguredMaxRoutingBuffers ),
10353                 rec( 14, 2, ActualMaxUsedRoutingBuffers ),
10354                 rec( 16, 2, CurrentlyUsedRoutingBuffers ),
10355                 rec( 18, 4, TotalFileServicePackets ),
10356                 rec( 22, 2, TurboUsedForFileService ),
10357                 rec( 24, 2, PacketsFromInvalidConnection ),
10358                 rec( 26, 2, BadLogicalConnectionCount ),
10359                 rec( 28, 2, PacketsReceivedDuringProcessing ),
10360                 rec( 30, 2, RequestsReprocessed ),
10361                 rec( 32, 2, PacketsWithBadSequenceNumber ),
10362                 rec( 34, 2, DuplicateRepliesSent ),
10363                 rec( 36, 2, PositiveAcknowledgesSent ),
10364                 rec( 38, 2, PacketsWithBadRequestType ),
10365                 rec( 40, 2, AttachDuringProcessing ),
10366                 rec( 42, 2, AttachWhileProcessingAttach ),
10367                 rec( 44, 2, ForgedDetachedRequests ),
10368                 rec( 46, 2, DetachForBadConnectionNumber ),
10369                 rec( 48, 2, DetachDuringProcessing ),
10370                 rec( 50, 2, RepliesCancelled ),
10371                 rec( 52, 2, PacketsDiscardedByHopCount ),
10372                 rec( 54, 2, PacketsDiscardedUnknownNet ),
10373                 rec( 56, 2, IncomingPacketDiscardedNoDGroup ),
10374                 rec( 58, 2, OutgoingPacketDiscardedNoTurboBuffer ),
10375                 rec( 60, 2, IPXNotMyNetwork ),
10376                 rec( 62, 4, NetBIOSBroadcastWasPropogated ),
10377                 rec( 66, 4, TotalOtherPackets ),
10378                 rec( 70, 4, TotalRoutedPackets ),
10379          ])
10380         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10381         # 2222/17E8, 23/232
10382         pkt = NCP(0x17E8, "Get File Server Misc Information", 'stats')
10383         pkt.Request(10)
10384         pkt.Reply(40, [
10385                 rec( 8, 4, SystemIntervalMarker, BE ),
10386                 rec( 12, 1, ProcessorType ),
10387                 rec( 13, 1, Reserved ),
10388                 rec( 14, 1, NumberOfServiceProcesses ),
10389                 rec( 15, 1, ServerUtilizationPercentage ),
10390                 rec( 16, 2, ConfiguredMaxBinderyObjects ),
10391                 rec( 18, 2, ActualMaxBinderyObjects ),
10392                 rec( 20, 2, CurrentUsedBinderyObjects ),
10393                 rec( 22, 2, TotalServerMemory ),
10394                 rec( 24, 2, WastedServerMemory ),
10395                 rec( 26, 2, NumberOfDynamicMemoryAreas, var="x" ),
10396                 rec( 28, 12, DynMemStruct, repeat="x" ),
10397          ])
10398         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10399         # 2222/17E9, 23/233
10400         pkt = NCP(0x17E9, "Get Volume Information", 'stats')
10401         pkt.Request(11, [
10402                 rec( 10, 1, VolumeNumber ),
10403         ],info_str=(VolumeNumber, "Get Information on Volume %d", ", %d"))
10404         pkt.Reply(48, [
10405                 rec( 8, 4, SystemIntervalMarker, BE ),
10406                 rec( 12, 1, VolumeNumber ),
10407                 rec( 13, 1, LogicalDriveNumber ),
10408                 rec( 14, 2, BlockSize ),
10409                 rec( 16, 2, StartingBlock ),
10410                 rec( 18, 2, TotalBlocks ),
10411                 rec( 20, 2, FreeBlocks ),
10412                 rec( 22, 2, TotalDirectoryEntries ),
10413                 rec( 24, 2, FreeDirectoryEntries ),
10414                 rec( 26, 2, ActualMaxUsedDirectoryEntries ),
10415                 rec( 28, 1, VolumeHashedFlag ),
10416                 rec( 29, 1, VolumeCachedFlag ),
10417                 rec( 30, 1, VolumeRemovableFlag ),
10418                 rec( 31, 1, VolumeMountedFlag ),
10419                 rec( 32, 16, VolumeName ),
10420          ])
10421         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10422         # 2222/17EA, 23/234
10423         pkt = NCP(0x17EA, "Get Connection's Task Information", 'stats')
10424         pkt.Request(12, [
10425                 rec( 10, 2, ConnectionNumber ),
10426         ])
10427         pkt.Reply(18, [
10428                 rec( 8, 2, NextRequestRecord ),
10429                 rec( 10, 4, NumberOfAttributes, var="x" ),
10430                 rec( 14, 4, Attributes, repeat="x" ),
10431          ])
10432         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10433         # 2222/17EB, 23/235
10434         pkt = NCP(0x17EB, "Get Connection's Open Files", 'file')
10435         pkt.Request(14, [
10436                 rec( 10, 2, ConnectionNumber ),
10437                 rec( 12, 2, LastRecordSeen ),
10438         ])
10439         pkt.Reply((29,283), [
10440                 rec( 8, 2, NextRequestRecord ),
10441                 rec( 10, 2, NumberOfRecords, var="x" ),
10442                 rec( 12, (17, 271), OpnFilesStruct, repeat="x" ),
10443         ])
10444         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10445         # 2222/17EC, 23/236
10446         pkt = NCP(0x17EC, "Get Connection Using A File", 'file')
10447         pkt.Request(18, [
10448                 rec( 10, 1, DataStreamNumber ),
10449                 rec( 11, 1, VolumeNumber ),
10450                 rec( 12, 4, DirectoryBase, LE ),
10451                 rec( 16, 2, LastRecordSeen ),
10452         ])
10453         pkt.Reply(33, [
10454                 rec( 8, 2, NextRequestRecord ),
10455                 rec( 10, 2, UseCount ),
10456                 rec( 12, 2, OpenCount ),
10457                 rec( 14, 2, OpenForReadCount ),
10458                 rec( 16, 2, OpenForWriteCount ),
10459                 rec( 18, 2, DenyReadCount ),
10460                 rec( 20, 2, DenyWriteCount ),
10461                 rec( 22, 1, Locked ),
10462                 rec( 23, 1, ForkCount ),
10463                 rec( 24, 2, NumberOfRecords, var="x" ),
10464                 rec( 26, 7, ConnStruct, repeat="x" ),
10465         ])
10466         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10467         # 2222/17ED, 23/237
10468         pkt = NCP(0x17ED, "Get Physical Record Locks By Connection And File", 'file')
10469         pkt.Request(20, [
10470                 rec( 10, 2, TargetConnectionNumber ),
10471                 rec( 12, 1, DataStreamNumber ),
10472                 rec( 13, 1, VolumeNumber ),
10473                 rec( 14, 4, DirectoryBase, LE ),
10474                 rec( 18, 2, LastRecordSeen ),
10475         ])
10476         pkt.Reply(23, [
10477                 rec( 8, 2, NextRequestRecord ),
10478                 rec( 10, 2, NumberOfLocks, var="x" ),
10479                 rec( 12, 11, LockStruct, repeat="x" ),
10480         ])
10481         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10482         # 2222/17EE, 23/238
10483         pkt = NCP(0x17EE, "Get Physical Record Locks By File", 'file')
10484         pkt.Request(18, [
10485                 rec( 10, 1, DataStreamNumber ),
10486                 rec( 11, 1, VolumeNumber ),
10487                 rec( 12, 4, DirectoryBase ),
10488                 rec( 16, 2, LastRecordSeen ),
10489         ])
10490         pkt.Reply(30, [
10491                 rec( 8, 2, NextRequestRecord ),
10492                 rec( 10, 2, NumberOfLocks, var="x" ),
10493                 rec( 12, 18, PhyLockStruct, repeat="x" ),
10494         ])
10495         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10496         # 2222/17EF, 23/239
10497         pkt = NCP(0x17EF, "Get Logical Records By Connection", 'file')
10498         pkt.Request(14, [
10499                 rec( 10, 2, TargetConnectionNumber ),
10500                 rec( 12, 2, LastRecordSeen ),
10501         ])
10502         pkt.Reply((16,270), [
10503                 rec( 8, 2, NextRequestRecord ),
10504                 rec( 10, 2, NumberOfRecords, var="x" ),
10505                 rec( 12, (4, 258), LogLockStruct, repeat="x" ),
10506         ])
10507         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10508         # 2222/17F0, 23/240
10509         pkt = NCP(0x17F0, "Get Logical Record Information (old)", 'file')
10510         pkt.Request((13,267), [
10511                 rec( 10, 2, LastRecordSeen ),
10512                 rec( 12, (1,255), LogicalRecordName ),
10513         ])
10514         pkt.Reply(22, [
10515                 rec( 8, 2, ShareableLockCount ),
10516                 rec( 10, 2, UseCount ),
10517                 rec( 12, 1, Locked ),
10518                 rec( 13, 2, NextRequestRecord ),
10519                 rec( 15, 2, NumberOfRecords, var="x" ),
10520                 rec( 17, 5, LogRecStruct, repeat="x" ),
10521         ])
10522         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10523         # 2222/17F1, 23/241
10524         pkt = NCP(0x17F1, "Get Connection's Semaphores", 'file')
10525         pkt.Request(14, [
10526                 rec( 10, 2, ConnectionNumber ),
10527                 rec( 12, 2, LastRecordSeen ),
10528         ])
10529         pkt.Reply((19,273), [
10530                 rec( 8, 2, NextRequestRecord ),
10531                 rec( 10, 2, NumberOfSemaphores, var="x" ),
10532                 rec( 12, (7, 261), SemaStruct, repeat="x" ),
10533         ])
10534         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10535         # 2222/17F2, 23/242
10536         pkt = NCP(0x17F2, "Get Semaphore Information", 'file')
10537         pkt.Request((13,267), [
10538                 rec( 10, 2, LastRecordSeen ),
10539                 rec( 12, (1,255), SemaphoreName ),
10540         ], info_str=(SemaphoreName, "Get Semaphore Information: %s", ", %s"))
10541         pkt.Reply(20, [
10542                 rec( 8, 2, NextRequestRecord ),
10543                 rec( 10, 2, OpenCount ),
10544                 rec( 12, 2, SemaphoreValue ),
10545                 rec( 14, 2, NumberOfRecords, var="x" ),
10546                 rec( 16, 4, SemaInfoStruct, repeat="x" ),
10547         ])
10548         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10549         # 2222/17F3, 23/243
10550         pkt = NCP(0x17F3, "Map Directory Number to Path", 'file')
10551         pkt.Request(16, [
10552                 rec( 10, 1, VolumeNumber ),
10553                 rec( 11, 4, DirectoryNumber ),
10554                 rec( 15, 1, NameSpace ),
10555         ])
10556         pkt.Reply((9,263), [
10557                 rec( 8, (1,255), Path ),
10558         ])
10559         pkt.CompletionCodes([0x0000, 0x9600, 0x9c00, 0xc601, 0xfd00, 0xff00])
10560         # 2222/17F4, 23/244
10561         pkt = NCP(0x17F4, "Convert Path to Dir Entry", 'file')
10562         pkt.Request((12,266), [
10563                 rec( 10, 1, DirHandle ),
10564                 rec( 11, (1,255), Path ),
10565         ], info_str=(Path, "Convert Path to Directory Entry: %s", ", %s"))
10566         pkt.Reply(13, [
10567                 rec( 8, 1, VolumeNumber ),
10568                 rec( 9, 4, DirectoryNumber ),
10569         ])
10570         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10571         # 2222/17FD, 23/253
10572         pkt = NCP(0x17FD, "Send Console Broadcast", 'stats')
10573         pkt.Request((16, 270), [
10574                 rec( 10, 1, NumberOfStations, var="x" ),
10575                 rec( 11, 4, StationList, repeat="x" ),
10576                 rec( 15, (1, 255), TargetMessage ),
10577         ], info_str=(TargetMessage, "Send Console Broadcast: %s", ", %s"))
10578         pkt.Reply(8)
10579         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10580         # 2222/17FE, 23/254
10581         pkt = NCP(0x17FE, "Clear Connection Number", 'stats')
10582         pkt.Request(14, [
10583                 rec( 10, 4, ConnectionNumber ),
10584         ])
10585         pkt.Reply(8)
10586         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10587         # 2222/18, 24
10588         pkt = NCP(0x18, "End of Job", 'connection')
10589         pkt.Request(7)
10590         pkt.Reply(8)
10591         pkt.CompletionCodes([0x0000])
10592         # 2222/19, 25
10593         pkt = NCP(0x19, "Logout", 'connection')
10594         pkt.Request(7)
10595         pkt.Reply(8)
10596         pkt.CompletionCodes([0x0000])
10597         # 2222/1A, 26
10598         pkt = NCP(0x1A, "Log Physical Record", 'file')
10599         pkt.Request(24, [
10600                 rec( 7, 1, LockFlag ),
10601                 rec( 8, 6, FileHandle ),
10602                 rec( 14, 4, LockAreasStartOffset, BE ),
10603                 rec( 18, 4, LockAreaLen, BE ),
10604                 rec( 22, 2, LockTimeout ),
10605         ])
10606         pkt.Reply(8)
10607         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
10608         # 2222/1B, 27
10609         pkt = NCP(0x1B, "Lock Physical Record Set", 'file')
10610         pkt.Request(10, [
10611                 rec( 7, 1, LockFlag ),
10612                 rec( 8, 2, LockTimeout ),
10613         ])
10614         pkt.Reply(8)
10615         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
10616         # 2222/1C, 28
10617         pkt = NCP(0x1C, "Release Physical Record", 'file')
10618         pkt.Request(22, [
10619                 rec( 7, 1, Reserved ),
10620                 rec( 8, 6, FileHandle ),
10621                 rec( 14, 4, LockAreasStartOffset ),
10622                 rec( 18, 4, LockAreaLen ),
10623         ])
10624         pkt.Reply(8)
10625         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10626         # 2222/1D, 29
10627         pkt = NCP(0x1D, "Release Physical Record Set", 'file')
10628         pkt.Request(8, [
10629                 rec( 7, 1, LockFlag ),
10630         ])
10631         pkt.Reply(8)
10632         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10633         # 2222/1E, 30   #Tested and fixed 6-14-02 GM
10634         pkt = NCP(0x1E, "Clear Physical Record", 'file')
10635         pkt.Request(22, [
10636                 rec( 7, 1, Reserved ),
10637                 rec( 8, 6, FileHandle ),
10638                 rec( 14, 4, LockAreasStartOffset, BE ),
10639                 rec( 18, 4, LockAreaLen, BE ),
10640         ])
10641         pkt.Reply(8)
10642         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10643         # 2222/1F, 31
10644         pkt = NCP(0x1F, "Clear Physical Record Set", 'file')
10645         pkt.Request(8, [
10646                 rec( 7, 1, LockFlag ),
10647         ])
10648         pkt.Reply(8)
10649         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10650         # 2222/2000, 32/00
10651         pkt = NCP(0x2000, "Open Semaphore", 'file', has_length=0)
10652         pkt.Request(10, [
10653                 rec( 8, 1, InitialSemaphoreValue ),
10654                 rec( 9, 1, SemaphoreNameLen ),
10655         ])
10656         pkt.Reply(13, [
10657                   rec( 8, 4, SemaphoreHandle, BE ),
10658                   rec( 12, 1, SemaphoreOpenCount ),
10659         ])
10660         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10661         # 2222/2001, 32/01
10662         pkt = NCP(0x2001, "Examine Semaphore", 'file', has_length=0)
10663         pkt.Request(12, [
10664                 rec( 8, 4, SemaphoreHandle, BE ),
10665         ])
10666         pkt.Reply(10, [
10667                   rec( 8, 1, SemaphoreValue ),
10668                   rec( 9, 1, SemaphoreOpenCount ),
10669         ])
10670         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10671         # 2222/2002, 32/02
10672         pkt = NCP(0x2002, "Wait On Semaphore", 'file', has_length=0)
10673         pkt.Request(14, [
10674                 rec( 8, 4, SemaphoreHandle, BE ),
10675                 rec( 12, 2, SemaphoreTimeOut, BE ), 
10676         ])
10677         pkt.Reply(8)
10678         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10679         # 2222/2003, 32/03
10680         pkt = NCP(0x2003, "Signal Semaphore", 'file', has_length=0)
10681         pkt.Request(12, [
10682                 rec( 8, 4, SemaphoreHandle, BE ),
10683         ])
10684         pkt.Reply(8)
10685         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10686         # 2222/2004, 32/04
10687         pkt = NCP(0x2004, "Close Semaphore", 'file', has_length=0)
10688         pkt.Request(12, [
10689                 rec( 8, 4, SemaphoreHandle, BE ),
10690         ])
10691         pkt.Reply(8)
10692         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10693         # 2222/21, 33
10694         pkt = NCP(0x21, "Negotiate Buffer Size", 'connection')
10695         pkt.Request(9, [
10696                 rec( 7, 2, BufferSize, BE ),
10697         ])
10698         pkt.Reply(10, [
10699                 rec( 8, 2, BufferSize, BE ),
10700         ])
10701         pkt.CompletionCodes([0x0000])
10702         # 2222/2200, 34/00
10703         pkt = NCP(0x2200, "TTS Is Available", 'tts', has_length=0)
10704         pkt.Request(8)
10705         pkt.Reply(8)
10706         pkt.CompletionCodes([0x0001, 0xfd03, 0xff12])
10707         # 2222/2201, 34/01
10708         pkt = NCP(0x2201, "TTS Begin Transaction", 'tts', has_length=0)
10709         pkt.Request(8)
10710         pkt.Reply(8)
10711         pkt.CompletionCodes([0x0000])
10712         # 2222/2202, 34/02
10713         pkt = NCP(0x2202, "TTS End Transaction", 'tts', has_length=0)
10714         pkt.Request(8)
10715         pkt.Reply(12, [
10716                   rec( 8, 4, TransactionNumber, BE ),
10717         ])                
10718         pkt.CompletionCodes([0x0000, 0xff01])
10719         # 2222/2203, 34/03
10720         pkt = NCP(0x2203, "TTS Abort Transaction", 'tts', has_length=0)
10721         pkt.Request(8)
10722         pkt.Reply(8)
10723         pkt.CompletionCodes([0x0000, 0xfd03, 0xfe0b, 0xff01])
10724         # 2222/2204, 34/04
10725         pkt = NCP(0x2204, "TTS Transaction Status", 'tts', has_length=0)
10726         pkt.Request(12, [
10727                   rec( 8, 4, TransactionNumber, BE ),
10728         ])              
10729         pkt.Reply(8)
10730         pkt.CompletionCodes([0x0000])
10731         # 2222/2205, 34/05
10732         pkt = NCP(0x2205, "TTS Get Application Thresholds", 'tts', has_length=0)
10733         pkt.Request(8)          
10734         pkt.Reply(10, [
10735                   rec( 8, 1, LogicalLockThreshold ),
10736                   rec( 9, 1, PhysicalLockThreshold ),
10737         ])
10738         pkt.CompletionCodes([0x0000])
10739         # 2222/2206, 34/06
10740         pkt = NCP(0x2206, "TTS Set Application Thresholds", 'tts', has_length=0)
10741         pkt.Request(10, [               
10742                   rec( 8, 1, LogicalLockThreshold ),
10743                   rec( 9, 1, PhysicalLockThreshold ),
10744         ])
10745         pkt.Reply(8)
10746         pkt.CompletionCodes([0x0000, 0x9600])
10747         # 2222/2207, 34/07
10748         pkt = NCP(0x2207, "TTS Get Workstation Thresholds", 'tts', has_length=0)
10749         pkt.Request(10, [               
10750                   rec( 8, 1, LogicalLockThreshold ),
10751                   rec( 9, 1, PhysicalLockThreshold ),
10752         ])
10753         pkt.Reply(8)
10754         pkt.CompletionCodes([0x0000])
10755         # 2222/2208, 34/08
10756         pkt = NCP(0x2208, "TTS Set Workstation Thresholds", 'tts', has_length=0)
10757         pkt.Request(10, [               
10758                   rec( 8, 1, LogicalLockThreshold ),
10759                   rec( 9, 1, PhysicalLockThreshold ),
10760         ])
10761         pkt.Reply(8)
10762         pkt.CompletionCodes([0x0000])
10763         # 2222/2209, 34/09
10764         pkt = NCP(0x2209, "TTS Get Transaction Bits", 'tts', has_length=0)
10765         pkt.Request(8)
10766         pkt.Reply(9, [
10767                 rec( 8, 1, ControlFlags ),
10768         ])
10769         pkt.CompletionCodes([0x0000])
10770         # 2222/220A, 34/10
10771         pkt = NCP(0x220A, "TTS Set Transaction Bits", 'tts', has_length=0)
10772         pkt.Request(9, [
10773                 rec( 8, 1, ControlFlags ),
10774         ])
10775         pkt.Reply(8)
10776         pkt.CompletionCodes([0x0000])
10777         # 2222/2301, 35/01
10778         pkt = NCP(0x2301, "AFP Create Directory", 'afp')
10779         pkt.Request((49, 303), [
10780                 rec( 10, 1, VolumeNumber ),
10781                 rec( 11, 4, BaseDirectoryID ),
10782                 rec( 15, 1, Reserved ),
10783                 rec( 16, 4, CreatorID ),
10784                 rec( 20, 4, Reserved4 ),
10785                 rec( 24, 2, FinderAttr ),
10786                 rec( 26, 2, HorizLocation ),
10787                 rec( 28, 2, VertLocation ),
10788                 rec( 30, 2, FileDirWindow ),
10789                 rec( 32, 16, Reserved16 ),
10790                 rec( 48, (1,255), Path ),
10791         ], info_str=(Path, "AFP Create Directory: %s", ", %s"))
10792         pkt.Reply(12, [
10793                 rec( 8, 4, NewDirectoryID ),
10794         ])
10795         pkt.CompletionCodes([0x0000, 0x8301, 0x8400, 0x8800, 0x9300, 0x9600, 0x9804,
10796                              0x9900, 0x9c03, 0x9e02, 0xa100, 0xa201, 0xfd00, 0xff18])
10797         # 2222/2302, 35/02
10798         pkt = NCP(0x2302, "AFP Create File", 'afp')
10799         pkt.Request((49, 303), [
10800                 rec( 10, 1, VolumeNumber ),
10801                 rec( 11, 4, BaseDirectoryID ),
10802                 rec( 15, 1, DeleteExistingFileFlag ),
10803                 rec( 16, 4, CreatorID, BE ),
10804                 rec( 20, 4, Reserved4 ),
10805                 rec( 24, 2, FinderAttr ),
10806                 rec( 26, 2, HorizLocation, BE ),
10807                 rec( 28, 2, VertLocation, BE ),
10808                 rec( 30, 2, FileDirWindow, BE ),
10809                 rec( 32, 16, Reserved16 ),
10810                 rec( 48, (1,255), Path ),
10811         ], info_str=(Path, "AFP Create File: %s", ", %s"))
10812         pkt.Reply(12, [
10813                 rec( 8, 4, NewDirectoryID ),
10814         ])
10815         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8301, 0x8400, 0x8701, 0x8800,
10816                              0x8a00, 0x8d00, 0x8e00, 0x8f00, 0x9300, 0x9600, 0x9804,
10817                              0x9900, 0x9b03, 0x9c03, 0x9e02, 0xa100, 0xa201, 0xfd00,
10818                              0xff18])
10819         # 2222/2303, 35/03
10820         pkt = NCP(0x2303, "AFP Delete", 'afp')
10821         pkt.Request((16,270), [
10822                 rec( 10, 1, VolumeNumber ),
10823                 rec( 11, 4, BaseDirectoryID ),
10824                 rec( 15, (1,255), Path ),
10825         ], info_str=(Path, "AFP Delete: %s", ", %s"))
10826         pkt.Reply(8)
10827         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x8a00, 0x8d00, 0x8e00, 0x8f00,
10828                              0x9000, 0x9300, 0x9600, 0x9804, 0x9b03, 0x9c03, 0x9e02,
10829                              0xa000, 0xa100, 0xa201, 0xfd00, 0xff19])
10830         # 2222/2304, 35/04
10831         pkt = NCP(0x2304, "AFP Get Entry ID From Name", 'afp')
10832         pkt.Request((16,270), [
10833                 rec( 10, 1, VolumeNumber ),
10834                 rec( 11, 4, BaseDirectoryID ),
10835                 rec( 15, (1,255), Path ),
10836         ], info_str=(Path, "AFP Get Entry from Name: %s", ", %s"))
10837         pkt.Reply(12, [
10838                 rec( 8, 4, TargetEntryID, BE ),
10839         ])
10840         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804, 0x9c03,
10841                              0xa100, 0xa201, 0xfd00, 0xff19])
10842         # 2222/2305, 35/05
10843         pkt = NCP(0x2305, "AFP Get File Information", 'afp')
10844         pkt.Request((18,272), [
10845                 rec( 10, 1, VolumeNumber ),
10846                 rec( 11, 4, BaseDirectoryID ),
10847                 rec( 15, 2, RequestBitMap, BE ),
10848                 rec( 17, (1,255), Path ),
10849         ], info_str=(Path, "AFP Get File Information: %s", ", %s"))
10850         pkt.Reply(121, [
10851                 rec( 8, 4, AFPEntryID, BE ),
10852                 rec( 12, 4, ParentID, BE ),
10853                 rec( 16, 2, AttributesDef16, LE ),
10854                 rec( 18, 4, DataForkLen, BE ),
10855                 rec( 22, 4, ResourceForkLen, BE ),
10856                 rec( 26, 2, TotalOffspring, BE  ),
10857                 rec( 28, 2, CreationDate, BE ),
10858                 rec( 30, 2, LastAccessedDate, BE ),
10859                 rec( 32, 2, ModifiedDate, BE ),
10860                 rec( 34, 2, ModifiedTime, BE ),
10861                 rec( 36, 2, ArchivedDate, BE ),
10862                 rec( 38, 2, ArchivedTime, BE ),
10863                 rec( 40, 4, CreatorID, BE ),
10864                 rec( 44, 4, Reserved4 ),
10865                 rec( 48, 2, FinderAttr ),
10866                 rec( 50, 2, HorizLocation ),
10867                 rec( 52, 2, VertLocation ),
10868                 rec( 54, 2, FileDirWindow ),
10869                 rec( 56, 16, Reserved16 ),
10870                 rec( 72, 32, LongName ),
10871                 rec( 104, 4, CreatorID, BE ),
10872                 rec( 108, 12, ShortName ),
10873                 rec( 120, 1, AccessPrivileges ),
10874         ])              
10875         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804, 0x9c03,
10876                              0xa100, 0xa201, 0xfd00, 0xff19])
10877         # 2222/2306, 35/06
10878         pkt = NCP(0x2306, "AFP Get Entry ID From NetWare Handle", 'afp')
10879         pkt.Request(16, [
10880                 rec( 10, 6, FileHandle ),
10881         ])
10882         pkt.Reply(14, [
10883                 rec( 8, 1, VolumeID ),
10884                 rec( 9, 4, TargetEntryID, BE ),
10885                 rec( 13, 1, ForkIndicator ),
10886         ])              
10887         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0xa201])
10888         # 2222/2307, 35/07
10889         pkt = NCP(0x2307, "AFP Rename", 'afp')
10890         pkt.Request((21, 529), [
10891                 rec( 10, 1, VolumeNumber ),
10892                 rec( 11, 4, MacSourceBaseID, BE ),
10893                 rec( 15, 4, MacDestinationBaseID, BE ),
10894                 rec( 19, (1,255), Path ),
10895                 rec( -1, (1,255), NewFileNameLen ),
10896         ], info_str=(Path, "AFP Rename: %s", ", %s"))
10897         pkt.Reply(8)            
10898         pkt.CompletionCodes([0x0000, 0x8301, 0x8401, 0x8800, 0x8b00, 0x8e00,
10899                              0x9001, 0x9201, 0x9300, 0x9600, 0x9804, 0x9900,
10900                              0x9c03, 0x9e00, 0xa100, 0xa201, 0xfd00, 0xff0a])
10901         # 2222/2308, 35/08
10902         pkt = NCP(0x2308, "AFP Open File Fork", 'afp')
10903         pkt.Request((18, 272), [
10904                 rec( 10, 1, VolumeNumber ),
10905                 rec( 11, 4, MacBaseDirectoryID ),
10906                 rec( 15, 1, ForkIndicator ),
10907                 rec( 16, 1, AccessMode ),
10908                 rec( 17, (1,255), Path ),
10909         ], info_str=(Path, "AFP Open File Fork: %s", ", %s"))
10910         pkt.Reply(22, [
10911                 rec( 8, 4, AFPEntryID, BE ),
10912                 rec( 12, 4, DataForkLen, BE ),
10913                 rec( 16, 6, NetWareAccessHandle ),
10914         ])
10915         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8301, 0x8800, 0x9300,
10916                              0x9400, 0x9600, 0x9804, 0x9900, 0x9c03, 0xa100,
10917                              0xa201, 0xfd00, 0xff16])
10918         # 2222/2309, 35/09
10919         pkt = NCP(0x2309, "AFP Set File Information", 'afp')
10920         pkt.Request((64, 318), [
10921                 rec( 10, 1, VolumeNumber ),
10922                 rec( 11, 4, MacBaseDirectoryID ),
10923                 rec( 15, 2, RequestBitMap, BE ),
10924                 rec( 17, 2, MacAttr, BE ),
10925                 rec( 19, 2, CreationDate, BE ),
10926                 rec( 21, 2, LastAccessedDate, BE ),
10927                 rec( 23, 2, ModifiedDate, BE ),
10928                 rec( 25, 2, ModifiedTime, BE ),
10929                 rec( 27, 2, ArchivedDate, BE ),
10930                 rec( 29, 2, ArchivedTime, BE ),
10931                 rec( 31, 4, CreatorID, BE ),
10932                 rec( 35, 4, Reserved4 ),
10933                 rec( 39, 2, FinderAttr ),
10934                 rec( 41, 2, HorizLocation ),
10935                 rec( 43, 2, VertLocation ),
10936                 rec( 45, 2, FileDirWindow ),
10937                 rec( 47, 16, Reserved16 ),
10938                 rec( 63, (1,255), Path ),
10939         ], info_str=(Path, "AFP Set File Information: %s", ", %s"))
10940         pkt.Reply(8)            
10941         pkt.CompletionCodes([0x0000, 0x0104, 0x8301, 0x8800, 0x9300, 0x9400,
10942                              0x9500, 0x9600, 0x9804, 0x9c03, 0xa100, 0xa201,
10943                              0xfd00, 0xff16])
10944         # 2222/230A, 35/10
10945         pkt = NCP(0x230A, "AFP Scan File Information", 'afp')
10946         pkt.Request((26, 280), [
10947                 rec( 10, 1, VolumeNumber ),
10948                 rec( 11, 4, MacBaseDirectoryID ),
10949                 rec( 15, 4, MacLastSeenID, BE ),
10950                 rec( 19, 2, DesiredResponseCount, BE ),
10951                 rec( 21, 2, SearchBitMap, BE ),
10952                 rec( 23, 2, RequestBitMap, BE ),
10953                 rec( 25, (1,255), Path ),
10954         ], info_str=(Path, "AFP Scan File Information: %s", ", %s"))
10955         pkt.Reply(123, [
10956                 rec( 8, 2, ActualResponseCount, BE, var="x" ),
10957                 rec( 10, 113, AFP10Struct, repeat="x" ),
10958         ])      
10959         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804,
10960                              0x9c03, 0xa100, 0xa201, 0xfd00, 0xff16])
10961         # 2222/230B, 35/11
10962         pkt = NCP(0x230B, "AFP Alloc Temporary Directory Handle", 'afp')
10963         pkt.Request((16,270), [
10964                 rec( 10, 1, VolumeNumber ),
10965                 rec( 11, 4, MacBaseDirectoryID ),
10966                 rec( 15, (1,255), Path ),
10967         ], info_str=(Path, "AFP Allocate Temporary Directory Handle: %s", ", %s"))
10968         pkt.Reply(10, [
10969                 rec( 8, 1, DirHandle ),
10970                 rec( 9, 1, AccessRightsMask ),
10971         ])
10972         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600,
10973                              0x9804, 0x9b03, 0x9c03, 0x9d00, 0xa100,
10974                              0xa201, 0xfd00, 0xff00])
10975         # 2222/230C, 35/12
10976         pkt = NCP(0x230C, "AFP Get Entry ID From Path Name", 'afp')
10977         pkt.Request((12,266), [
10978                 rec( 10, 1, DirHandle ),
10979                 rec( 11, (1,255), Path ),
10980         ], info_str=(Path, "AFP Get Entry ID from Path Name: %s", ", %s"))
10981         pkt.Reply(12, [
10982                 rec( 8, 4, AFPEntryID, BE ),
10983         ])
10984         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600,
10985                              0x9804, 0x9b03, 0x9c03, 0xa100, 0xa201,
10986                              0xfd00, 0xff00])
10987         # 2222/230D, 35/13
10988         pkt = NCP(0x230D, "AFP 2.0 Create Directory", 'afp')
10989         pkt.Request((55,309), [
10990                 rec( 10, 1, VolumeNumber ),
10991                 rec( 11, 4, BaseDirectoryID ),
10992                 rec( 15, 1, Reserved ),
10993                 rec( 16, 4, CreatorID, BE ),
10994                 rec( 20, 4, Reserved4 ),
10995                 rec( 24, 2, FinderAttr ),
10996                 rec( 26, 2, HorizLocation ),
10997                 rec( 28, 2, VertLocation ),
10998                 rec( 30, 2, FileDirWindow ),
10999                 rec( 32, 16, Reserved16 ),
11000                 rec( 48, 6, ProDOSInfo ),
11001                 rec( 54, (1,255), Path ),
11002         ], info_str=(Path, "AFP 2.0 Create Directory: %s", ", %s"))
11003         pkt.Reply(12, [
11004                 rec( 8, 4, NewDirectoryID ),
11005         ])
11006         pkt.CompletionCodes([0x0000, 0x8301, 0x8400, 0x8800, 0x9300,
11007                              0x9600, 0x9804, 0x9900, 0x9c03, 0x9e00,
11008                              0xa100, 0xa201, 0xfd00, 0xff00])
11009         # 2222/230E, 35/14
11010         pkt = NCP(0x230E, "AFP 2.0 Create File", 'afp')
11011         pkt.Request((55,309), [
11012                 rec( 10, 1, VolumeNumber ),
11013                 rec( 11, 4, BaseDirectoryID ),
11014                 rec( 15, 1, DeleteExistingFileFlag ),
11015                 rec( 16, 4, CreatorID, BE ),
11016                 rec( 20, 4, Reserved4 ),
11017                 rec( 24, 2, FinderAttr ),
11018                 rec( 26, 2, HorizLocation ),
11019                 rec( 28, 2, VertLocation ),
11020                 rec( 30, 2, FileDirWindow ),
11021                 rec( 32, 16, Reserved16 ),
11022                 rec( 48, 6, ProDOSInfo ),
11023                 rec( 54, (1,255), Path ),
11024         ], info_str=(Path, "AFP 2.0 Create File: %s", ", %s"))
11025         pkt.Reply(12, [
11026                 rec( 8, 4, NewDirectoryID ),
11027         ])
11028         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8301, 0x8400,
11029                              0x8701, 0x8800, 0x8a00, 0x8d00, 0x8e00,
11030                              0x8f00, 0x9001, 0x9300, 0x9600, 0x9804,
11031                              0x9900, 0x9b03, 0x9c03, 0x9e00, 0xa100,
11032                              0xa201, 0xfd00, 0xff00])
11033         # 2222/230F, 35/15
11034         pkt = NCP(0x230F, "AFP 2.0 Get File Or Directory Information", 'afp')
11035         pkt.Request((18,272), [
11036                 rec( 10, 1, VolumeNumber ),
11037                 rec( 11, 4, BaseDirectoryID ),
11038                 rec( 15, 2, RequestBitMap, BE ),
11039                 rec( 17, (1,255), Path ),
11040         ], info_str=(Path, "AFP 2.0 Get Information: %s", ", %s"))
11041         pkt.Reply(128, [
11042                 rec( 8, 4, AFPEntryID, BE ),
11043                 rec( 12, 4, ParentID, BE ),
11044                 rec( 16, 2, AttributesDef16 ),
11045                 rec( 18, 4, DataForkLen, BE ),
11046                 rec( 22, 4, ResourceForkLen, BE ),
11047                 rec( 26, 2, TotalOffspring, BE ),
11048                 rec( 28, 2, CreationDate, BE ),
11049                 rec( 30, 2, LastAccessedDate, BE ),
11050                 rec( 32, 2, ModifiedDate, BE ),
11051                 rec( 34, 2, ModifiedTime, BE ),
11052                 rec( 36, 2, ArchivedDate, BE ),
11053                 rec( 38, 2, ArchivedTime, BE ),
11054                 rec( 40, 4, CreatorID, BE ),
11055                 rec( 44, 4, Reserved4 ),
11056                 rec( 48, 2, FinderAttr ),
11057                 rec( 50, 2, HorizLocation ),
11058                 rec( 52, 2, VertLocation ),
11059                 rec( 54, 2, FileDirWindow ),
11060                 rec( 56, 16, Reserved16 ),
11061                 rec( 72, 32, LongName ),
11062                 rec( 104, 4, CreatorID, BE ),
11063                 rec( 108, 12, ShortName ),
11064                 rec( 120, 1, AccessPrivileges ),
11065                 rec( 121, 1, Reserved ),
11066                 rec( 122, 6, ProDOSInfo ),
11067         ])              
11068         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804, 0x9c03,
11069                              0xa100, 0xa201, 0xfd00, 0xff19])
11070         # 2222/2310, 35/16
11071         pkt = NCP(0x2310, "AFP 2.0 Set File Information", 'afp')
11072         pkt.Request((70, 324), [
11073                 rec( 10, 1, VolumeNumber ),
11074                 rec( 11, 4, MacBaseDirectoryID ),
11075                 rec( 15, 2, RequestBitMap, BE ),
11076                 rec( 17, 2, AttributesDef16 ),
11077                 rec( 19, 2, CreationDate, BE ),
11078                 rec( 21, 2, LastAccessedDate, BE ),
11079                 rec( 23, 2, ModifiedDate, BE ),
11080                 rec( 25, 2, ModifiedTime, BE ),
11081                 rec( 27, 2, ArchivedDate, BE ),
11082                 rec( 29, 2, ArchivedTime, BE ),
11083                 rec( 31, 4, CreatorID, BE ),
11084                 rec( 35, 4, Reserved4 ),
11085                 rec( 39, 2, FinderAttr ),
11086                 rec( 41, 2, HorizLocation ),
11087                 rec( 43, 2, VertLocation ),
11088                 rec( 45, 2, FileDirWindow ),
11089                 rec( 47, 16, Reserved16 ),
11090                 rec( 63, 6, ProDOSInfo ),
11091                 rec( 69, (1,255), Path ),
11092         ], info_str=(Path, "AFP 2.0 Set File Information: %s", ", %s"))
11093         pkt.Reply(8)            
11094         pkt.CompletionCodes([0x0000, 0x0104, 0x8301, 0x8800, 0x9300, 0x9400,
11095                              0x9500, 0x9600, 0x9804, 0x9c03, 0xa100, 0xa201,
11096                              0xfd00, 0xff16])
11097         # 2222/2311, 35/17
11098         pkt = NCP(0x2311, "AFP 2.0 Scan File Information", 'afp')
11099         pkt.Request((26, 280), [
11100                 rec( 10, 1, VolumeNumber ),
11101                 rec( 11, 4, MacBaseDirectoryID ),
11102                 rec( 15, 4, MacLastSeenID, BE ),
11103                 rec( 19, 2, DesiredResponseCount, BE ),
11104                 rec( 21, 2, SearchBitMap, BE ),
11105                 rec( 23, 2, RequestBitMap, BE ),
11106                 rec( 25, (1,255), Path ),
11107         ], info_str=(Path, "AFP 2.0 Scan File Information: %s", ", %s"))
11108         pkt.Reply(14, [
11109                 rec( 8, 2, ActualResponseCount, var="x" ),
11110                 rec( 10, 4, AFP20Struct, repeat="x" ),
11111         ])      
11112         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804,
11113                              0x9c03, 0xa100, 0xa201, 0xfd00, 0xff16])
11114         # 2222/2312, 35/18
11115         pkt = NCP(0x2312, "AFP Get DOS Name From Entry ID", 'afp')
11116         pkt.Request(15, [
11117                 rec( 10, 1, VolumeNumber ),
11118                 rec( 11, 4, AFPEntryID, BE ),
11119         ])
11120         pkt.Reply((9,263), [
11121                 rec( 8, (1,255), Path ),
11122         ])      
11123         pkt.CompletionCodes([0x0000, 0x8900, 0x9600, 0xbf00])
11124         # 2222/2313, 35/19
11125         pkt = NCP(0x2313, "AFP Get Macintosh Info On Deleted File", 'afp')
11126         pkt.Request(15, [
11127                 rec( 10, 1, VolumeNumber ),
11128                 rec( 11, 4, DirectoryNumber, BE ),
11129         ])
11130         pkt.Reply((51,305), [
11131                 rec( 8, 4, CreatorID, BE ),
11132                 rec( 12, 4, Reserved4 ),
11133                 rec( 16, 2, FinderAttr ),
11134                 rec( 18, 2, HorizLocation ),
11135                 rec( 20, 2, VertLocation ),
11136                 rec( 22, 2, FileDirWindow ),
11137                 rec( 24, 16, Reserved16 ),
11138                 rec( 40, 6, ProDOSInfo ),
11139                 rec( 46, 4, ResourceForkSize, BE ),
11140                 rec( 50, (1,255), FileName ),
11141         ])      
11142         pkt.CompletionCodes([0x0000, 0x9c03, 0xbf00])
11143         # 2222/2400, 36/00
11144         pkt = NCP(0x2400, "Get NCP Extension Information", 'fileserver')
11145         pkt.Request(14, [
11146                 rec( 10, 4, NCPextensionNumber, LE ),
11147         ])
11148         pkt.Reply((16,270), [
11149                 rec( 8, 4, NCPextensionNumber ),
11150                 rec( 12, 1, NCPextensionMajorVersion ),
11151                 rec( 13, 1, NCPextensionMinorVersion ),
11152                 rec( 14, 1, NCPextensionRevisionNumber ),
11153                 rec( 15, (1, 255), NCPextensionName ),
11154         ])      
11155         pkt.CompletionCodes([0x0000, 0xfe00])
11156         # 2222/2401, 36/01
11157         pkt = NCP(0x2401, "Get NCP Extension Maximum Data Size", 'fileserver')
11158         pkt.Request(10)
11159         pkt.Reply(10, [
11160                 rec( 8, 2, NCPdataSize ),
11161         ])      
11162         pkt.CompletionCodes([0x0000, 0xfe00])
11163         # 2222/2402, 36/02
11164         pkt = NCP(0x2402, "Get NCP Extension Information by Name", 'fileserver')
11165         pkt.Request((11, 265), [
11166                 rec( 10, (1,255), NCPextensionName ),
11167         ], info_str=(NCPextensionName, "Get NCP Extension Information by Name: %s", ", %s"))
11168         pkt.Reply((16,270), [
11169                 rec( 8, 4, NCPextensionNumber ),
11170                 rec( 12, 1, NCPextensionMajorVersion ),
11171                 rec( 13, 1, NCPextensionMinorVersion ),
11172                 rec( 14, 1, NCPextensionRevisionNumber ),
11173                 rec( 15, (1, 255), NCPextensionName ),
11174         ])      
11175         pkt.CompletionCodes([0x0000, 0xfe00, 0xff20])
11176         # 2222/2403, 36/03
11177         pkt = NCP(0x2403, "Get Number of Registered NCP Extensions", 'fileserver')
11178         pkt.Request(10)
11179         pkt.Reply(12, [
11180                 rec( 8, 4, NumberOfNCPExtensions ),
11181         ])      
11182         pkt.CompletionCodes([0x0000, 0xfe00])
11183         # 2222/2404, 36/04
11184         pkt = NCP(0x2404, "Get NCP Extension Registered Verbs List", 'fileserver')
11185         pkt.Request(14, [
11186                 rec( 10, 4, StartingNumber ),
11187         ])
11188         pkt.Reply(20, [
11189                 rec( 8, 4, ReturnedListCount, var="x" ),
11190                 rec( 12, 4, nextStartingNumber ),
11191                 rec( 16, 4, NCPExtensionNumbers, repeat="x" ),
11192         ])      
11193         pkt.CompletionCodes([0x0000, 0xfe00])
11194         # 2222/2405, 36/05
11195         pkt = NCP(0x2405, "Return NCP Extension Information", 'fileserver')
11196         pkt.Request(14, [
11197                 rec( 10, 4, NCPextensionNumber ),
11198         ])
11199         pkt.Reply((16,270), [
11200                 rec( 8, 4, NCPextensionNumber ),
11201                 rec( 12, 1, NCPextensionMajorVersion ),
11202                 rec( 13, 1, NCPextensionMinorVersion ),
11203                 rec( 14, 1, NCPextensionRevisionNumber ),
11204                 rec( 15, (1, 255), NCPextensionName ),
11205         ])      
11206         pkt.CompletionCodes([0x0000, 0xfe00])
11207         # 2222/2406, 36/06
11208         pkt = NCP(0x2406, "Return NCP Extension Maximum Data Size", 'fileserver')
11209         pkt.Request(10)
11210         pkt.Reply(12, [
11211                 rec( 8, 4, NCPdataSize ),
11212         ])      
11213         pkt.CompletionCodes([0x0000, 0xfe00])
11214         # 2222/25, 37
11215         pkt = NCP(0x25, "Execute NCP Extension", 'fileserver')
11216         pkt.Request(11, [
11217                 rec( 7, 4, NCPextensionNumber ),
11218                 # The following value is Unicode
11219                 #rec[ 13, (1,255), RequestData ],
11220         ])
11221         pkt.Reply(8)
11222                 # The following value is Unicode
11223                 #[ 8, (1, 255), ReplyBuffer ],
11224         pkt.CompletionCodes([0x0000, 0xee00, 0xfe00])
11225         # 2222/3B, 59
11226         pkt = NCP(0x3B, "Commit File", 'file', has_length=0 )
11227         pkt.Request(14, [
11228                 rec( 7, 1, Reserved ),
11229                 rec( 8, 6, FileHandle ),
11230         ])
11231         pkt.Reply(8)    
11232         pkt.CompletionCodes([0x0000, 0x8800, 0x9804, 0xff00])
11233         # 2222/3E, 62
11234         pkt = NCP(0x3E, "File Search Initialize", 'file', has_length=0 )
11235         pkt.Request((9, 263), [
11236                 rec( 7, 1, DirHandle ),
11237                 rec( 8, (1,255), Path ),
11238         ], info_str=(Path, "Initialize File Search: %s", ", %s"))
11239         pkt.Reply(14, [
11240                 rec( 8, 1, VolumeNumber ),
11241                 rec( 9, 2, DirectoryID ),
11242                 rec( 11, 2, SequenceNumber, BE ),
11243                 rec( 13, 1, AccessRightsMask ),
11244         ])
11245         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100,
11246                              0xfd00, 0xff16])
11247         # 2222/3F, 63
11248         pkt = NCP(0x3F, "File Search Continue", 'file', has_length=0 )
11249         pkt.Request((14, 268), [
11250                 rec( 7, 1, VolumeNumber ),
11251                 rec( 8, 2, DirectoryID ),
11252                 rec( 10, 2, SequenceNumber, BE ),
11253                 rec( 12, 1, SearchAttributes ),
11254                 rec( 13, (1,255), Path ),
11255         ], info_str=(Path, "File Search Continue: %s", ", %s"))
11256         pkt.Reply( NO_LENGTH_CHECK, [
11257                 #
11258                 # XXX - don't show this if we got back a non-zero
11259                 # completion code?  For example, 255 means "No
11260                 # matching files or directories were found", so
11261                 # presumably it can't show you a matching file or
11262                 # directory instance - it appears to just leave crap
11263                 # there.
11264                 #
11265                 srec( DirectoryInstance, req_cond="ncp.sattr_sub==TRUE"),
11266                 srec( FileInstance, req_cond="ncp.sattr_sub!=TRUE"),
11267         ])
11268         pkt.ReqCondSizeVariable()
11269         pkt.CompletionCodes([0x0000, 0xff16])
11270         # 2222/40, 64
11271         pkt = NCP(0x40, "Search for a File", 'file')
11272         pkt.Request((12, 266), [
11273                 rec( 7, 2, SequenceNumber, BE ),
11274                 rec( 9, 1, DirHandle ),
11275                 rec( 10, 1, SearchAttributes ),
11276                 rec( 11, (1,255), FileName ),
11277         ], info_str=(FileName, "Search for File: %s", ", %s"))
11278         pkt.Reply(40, [
11279                 rec( 8, 2, SequenceNumber, BE ),
11280                 rec( 10, 2, Reserved2 ),
11281                 rec( 12, 14, FileName14 ),
11282                 rec( 26, 1, AttributesDef ),
11283                 rec( 27, 1, FileExecuteType ),
11284                 rec( 28, 4, FileSize ),
11285                 rec( 32, 2, CreationDate, BE ),
11286                 rec( 34, 2, LastAccessedDate, BE ),
11287                 rec( 36, 2, ModifiedDate, BE ),
11288                 rec( 38, 2, ModifiedTime, BE ),
11289         ])
11290         pkt.CompletionCodes([0x0000, 0x8900, 0x9600, 0x9804, 0x9b03,
11291                              0x9c03, 0xa100, 0xfd00, 0xff16])
11292         # 2222/41, 65
11293         pkt = NCP(0x41, "Open File", 'file')
11294         pkt.Request((10, 264), [
11295                 rec( 7, 1, DirHandle ),
11296                 rec( 8, 1, SearchAttributes ),
11297                 rec( 9, (1,255), FileName ),
11298         ], info_str=(FileName, "Open File: %s", ", %s"))
11299         pkt.Reply(44, [
11300                 rec( 8, 6, FileHandle ),
11301                 rec( 14, 2, Reserved2 ),
11302                 rec( 16, 14, FileName14 ),
11303                 rec( 30, 1, AttributesDef ),
11304                 rec( 31, 1, FileExecuteType ),
11305                 rec( 32, 4, FileSize, BE ),
11306                 rec( 36, 2, CreationDate, BE ),
11307                 rec( 38, 2, LastAccessedDate, BE ),
11308                 rec( 40, 2, ModifiedDate, BE ),
11309                 rec( 42, 2, ModifiedTime, BE ),
11310         ])
11311         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8200, 0x9400,
11312                              0x9600, 0x9804, 0x9c03, 0xa100, 0xfd00,
11313                              0xff16])
11314         # 2222/42, 66
11315         pkt = NCP(0x42, "Close File", 'file')
11316         pkt.Request(14, [
11317                 rec( 7, 1, Reserved ),
11318                 rec( 8, 6, FileHandle ),
11319         ])
11320         pkt.Reply(8)
11321         pkt.CompletionCodes([0x0000, 0x8800, 0xff1a])
11322         # 2222/43, 67
11323         pkt = NCP(0x43, "Create File", 'file')
11324         pkt.Request((10, 264), [
11325                 rec( 7, 1, DirHandle ),
11326                 rec( 8, 1, AttributesDef ),
11327                 rec( 9, (1,255), FileName ),
11328         ], info_str=(FileName, "Create File: %s", ", %s"))
11329         pkt.Reply(44, [
11330                 rec( 8, 6, FileHandle ),
11331                 rec( 14, 2, Reserved2 ),
11332                 rec( 16, 14, FileName14 ),
11333                 rec( 30, 1, AttributesDef ),
11334                 rec( 31, 1, FileExecuteType ),
11335                 rec( 32, 4, FileSize, BE ),
11336                 rec( 36, 2, CreationDate, BE ),
11337                 rec( 38, 2, LastAccessedDate, BE ),
11338                 rec( 40, 2, ModifiedDate, BE ),
11339                 rec( 42, 2, ModifiedTime, BE ),
11340         ])
11341         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11342                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11343                              0x9804, 0x9900, 0x9b03, 0x9c03, 0xfd00,
11344                              0xff00])
11345         # 2222/44, 68
11346         pkt = NCP(0x44, "Erase File", 'file')
11347         pkt.Request((10, 264), [
11348                 rec( 7, 1, DirHandle ),
11349                 rec( 8, 1, SearchAttributes ),
11350                 rec( 9, (1,255), FileName ),
11351         ], info_str=(FileName, "Erase File: %s", ", %s"))
11352         pkt.Reply(8)
11353         pkt.CompletionCodes([0x0000, 0x8a00, 0x8d00, 0x8e00, 0x8f00,
11354                              0x9001, 0x9600, 0x9804, 0x9b03, 0x9c03,
11355                              0xa100, 0xfd00, 0xff00])
11356         # 2222/45, 69
11357         pkt = NCP(0x45, "Rename File", 'file')
11358         pkt.Request((12, 520), [
11359                 rec( 7, 1, DirHandle ),
11360                 rec( 8, 1, SearchAttributes ),
11361                 rec( 9, (1,255), FileName ),
11362                 rec( -1, 1, TargetDirHandle ),
11363                 rec( -1, (1, 255), NewFileNameLen ),
11364         ], info_str=(FileName, "Rename File: %s", ", %s"))
11365         pkt.Reply(8)
11366         pkt.CompletionCodes([0x0000, 0x8701, 0x8b00, 0x8d00, 0x8e00,
11367                              0x8f00, 0x9001, 0x9101, 0x9201, 0x9600,
11368                              0x9804, 0x9a00, 0x9b03, 0x9c03, 0xa100,
11369                              0xfd00, 0xff16])
11370         # 2222/46, 70
11371         pkt = NCP(0x46, "Set File Attributes", 'file')
11372         pkt.Request((11, 265), [
11373                 rec( 7, 1, AttributesDef ),
11374                 rec( 8, 1, DirHandle ),
11375                 rec( 9, 1, SearchAttributes ),
11376                 rec( 10, (1,255), FileName ),
11377         ], info_str=(FileName, "Set File Attributes: %s", ", %s"))
11378         pkt.Reply(8)
11379         pkt.CompletionCodes([0x0000, 0x8c00, 0x8d00, 0x8e00, 0x9600,
11380                              0x9804, 0x9b03, 0x9c03, 0xa100, 0xfd00,
11381                              0xff16])
11382         # 2222/47, 71
11383         pkt = NCP(0x47, "Get Current Size of File", 'file')
11384         pkt.Request(13, [
11385                 rec( 7, 6, FileHandle ),
11386         ])
11387         pkt.Reply(12, [
11388                 rec( 8, 4, FileSize, BE ),
11389         ])
11390         pkt.CompletionCodes([0x0000, 0x8800])
11391         # 2222/48, 72
11392         pkt = NCP(0x48, "Read From A File", 'file')
11393         pkt.Request(20, [
11394                 rec( 7, 1, Reserved ),
11395                 rec( 8, 6, FileHandle ),
11396                 rec( 14, 4, FileOffset, BE ), 
11397                 rec( 18, 2, MaxBytes, BE ),     
11398         ])
11399         pkt.Reply(10, [ 
11400                 rec( 8, 2, NumBytes, BE ),      
11401         ])
11402         pkt.CompletionCodes([0x0000, 0x8300, 0x8800, 0x9300, 0xff00])
11403         # 2222/49, 73
11404         pkt = NCP(0x49, "Write to a File", 'file')
11405         pkt.Request(20, [
11406                 rec( 7, 1, Reserved ),
11407                 rec( 8, 6, FileHandle ),
11408                 rec( 14, 4, FileOffset, BE ),
11409                 rec( 18, 2, MaxBytes, BE ),     
11410         ])
11411         pkt.Reply(8)
11412         pkt.CompletionCodes([0x0000, 0x0104, 0x8300, 0x8800, 0x9400, 0x9500, 0xa201, 0xff1b])
11413         # 2222/4A, 74
11414         pkt = NCP(0x4A, "Copy from One File to Another", 'file')
11415         pkt.Request(30, [
11416                 rec( 7, 1, Reserved ),
11417                 rec( 8, 6, FileHandle ),
11418                 rec( 14, 6, TargetFileHandle ),
11419                 rec( 20, 4, FileOffset, BE ),
11420                 rec( 24, 4, TargetFileOffset, BE ),
11421                 rec( 28, 2, BytesToCopy, BE ),
11422         ])
11423         pkt.Reply(12, [
11424                 rec( 8, 4, BytesActuallyTransferred, BE ),
11425         ])
11426         pkt.CompletionCodes([0x0000, 0x0104, 0x8300, 0x8800, 0x9300, 0x9400,
11427                              0x9500, 0x9600, 0xa201, 0xff1b])
11428         # 2222/4B, 75
11429         pkt = NCP(0x4B, "Set File Time Date Stamp", 'file')
11430         pkt.Request(18, [
11431                 rec( 7, 1, Reserved ),
11432                 rec( 8, 6, FileHandle ),
11433                 rec( 14, 2, FileTime, BE ),
11434                 rec( 16, 2, FileDate, BE ),
11435         ])
11436         pkt.Reply(8)
11437         pkt.CompletionCodes([0x0000, 0x8800, 0x9600])
11438         # 2222/4C, 76
11439         pkt = NCP(0x4C, "Open File", 'file')
11440         pkt.Request((11, 265), [
11441                 rec( 7, 1, DirHandle ),
11442                 rec( 8, 1, SearchAttributes ),
11443                 rec( 9, 1, AccessRightsMask ),
11444                 rec( 10, (1,255), FileName ),
11445         ], info_str=(FileName, "Open File: %s", ", %s"))
11446         pkt.Reply(44, [
11447                 rec( 8, 6, FileHandle ),
11448                 rec( 14, 2, Reserved2 ),
11449                 rec( 16, 14, FileName14 ),
11450                 rec( 30, 1, AttributesDef ),
11451                 rec( 31, 1, FileExecuteType ),
11452                 rec( 32, 4, FileSize, BE ),
11453                 rec( 36, 2, CreationDate, BE ),
11454                 rec( 38, 2, LastAccessedDate, BE ),
11455                 rec( 40, 2, ModifiedDate, BE ),
11456                 rec( 42, 2, ModifiedTime, BE ),
11457         ])
11458         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8200, 0x9400,
11459                              0x9600, 0x9804, 0x9c03, 0xa100, 0xfd00,
11460                              0xff16])
11461         # 2222/4D, 77
11462         pkt = NCP(0x4D, "Create File", 'file')
11463         pkt.Request((10, 264), [
11464                 rec( 7, 1, DirHandle ),
11465                 rec( 8, 1, AttributesDef ),
11466                 rec( 9, (1,255), FileName ),
11467         ], info_str=(FileName, "Create File: %s", ", %s"))
11468         pkt.Reply(44, [
11469                 rec( 8, 6, FileHandle ),
11470                 rec( 14, 2, Reserved2 ),
11471                 rec( 16, 14, FileName14 ),
11472                 rec( 30, 1, AttributesDef ),
11473                 rec( 31, 1, FileExecuteType ),
11474                 rec( 32, 4, FileSize, BE ),
11475                 rec( 36, 2, CreationDate, BE ),
11476                 rec( 38, 2, LastAccessedDate, BE ),
11477                 rec( 40, 2, ModifiedDate, BE ),
11478                 rec( 42, 2, ModifiedTime, BE ),
11479         ])
11480         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11481                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11482                              0x9804, 0x9900, 0x9b03, 0x9c03, 0xfd00,
11483                              0xff00])
11484         # 2222/4F, 79
11485         pkt = NCP(0x4F, "Set File Extended Attributes", 'file')
11486         pkt.Request((11, 265), [
11487                 rec( 7, 1, AttributesDef ),
11488                 rec( 8, 1, DirHandle ),
11489                 rec( 9, 1, AccessRightsMask ),
11490                 rec( 10, (1,255), FileName ),
11491         ], info_str=(FileName, "Set File Extended Attributes: %s", ", %s"))
11492         pkt.Reply(8)
11493         pkt.CompletionCodes([0x0000, 0x8c00, 0x8d00, 0x8e00, 0x9600,
11494                              0x9804, 0x9b03, 0x9c03, 0xa100, 0xfd00,
11495                              0xff16])
11496         # 2222/54, 84
11497         pkt = NCP(0x54, "Open/Create File", 'file')
11498         pkt.Request((12, 266), [
11499                 rec( 7, 1, DirHandle ),
11500                 rec( 8, 1, AttributesDef ),
11501                 rec( 9, 1, AccessRightsMask ),
11502                 rec( 10, 1, ActionFlag ),
11503                 rec( 11, (1,255), FileName ),
11504         ], info_str=(FileName, "Open/Create File: %s", ", %s"))
11505         pkt.Reply(44, [
11506                 rec( 8, 6, FileHandle ),
11507                 rec( 14, 2, Reserved2 ),
11508                 rec( 16, 14, FileName14 ),
11509                 rec( 30, 1, AttributesDef ),
11510                 rec( 31, 1, FileExecuteType ),
11511                 rec( 32, 4, FileSize, BE ),
11512                 rec( 36, 2, CreationDate, BE ),
11513                 rec( 38, 2, LastAccessedDate, BE ),
11514                 rec( 40, 2, ModifiedDate, BE ),
11515                 rec( 42, 2, ModifiedTime, BE ),
11516         ])
11517         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11518                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11519                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
11520         # 2222/55, 85
11521         pkt = NCP(0x55, "Get Sparse File Data Block Bit Map", 'file')
11522         pkt.Request(17, [
11523                 rec( 7, 6, FileHandle ),
11524                 rec( 13, 4, FileOffset ),
11525         ])
11526         pkt.Reply(528, [
11527                 rec( 8, 4, AllocationBlockSize ),
11528                 rec( 12, 4, Reserved4 ),
11529                 rec( 16, 512, BitMap ),
11530         ])
11531         pkt.CompletionCodes([0x0000, 0x8800])
11532         # 2222/5601, 86/01
11533         pkt = NCP(0x5601, "Close Extended Attribute Handle", 'file', has_length=0 )
11534         pkt.Request(14, [
11535                 rec( 8, 2, Reserved2 ),
11536                 rec( 10, 4, EAHandle ),
11537         ])
11538         pkt.Reply(8)
11539         pkt.CompletionCodes([0x0000, 0xcf00, 0xd301])
11540         # 2222/5602, 86/02
11541         pkt = NCP(0x5602, "Write Extended Attribute", 'file', has_length=0 )
11542         pkt.Request((35,97), [
11543                 rec( 8, 2, EAFlags ),
11544                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
11545                 rec( 14, 4, ReservedOrDirectoryNumber ),
11546                 rec( 18, 4, TtlWriteDataSize ),
11547                 rec( 22, 4, FileOffset ),
11548                 rec( 26, 4, EAAccessFlag ),
11549                 rec( 30, 2, EAValueLength, var='x' ),
11550                 rec( 32, (2,64), EAKey ),
11551                 rec( -1, 1, EAValueRep, repeat='x' ),
11552         ], info_str=(EAKey, "Write Extended Attribute: %s", ", %s"))
11553         pkt.Reply(20, [
11554                 rec( 8, 4, EAErrorCodes ),
11555                 rec( 12, 4, EABytesWritten ),
11556                 rec( 16, 4, NewEAHandle ),
11557         ])
11558         pkt.CompletionCodes([0x0000, 0xc800, 0xc900, 0xcb00, 0xce00, 0xcf00, 0xd101,
11559                              0xd203, 0xd301, 0xd402])
11560         # 2222/5603, 86/03
11561         pkt = NCP(0x5603, "Read Extended Attribute", 'file', has_length=0 )
11562         pkt.Request((28,538), [
11563                 rec( 8, 2, EAFlags ),
11564                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
11565                 rec( 14, 4, ReservedOrDirectoryNumber ),
11566                 rec( 18, 4, FileOffset ),
11567                 rec( 22, 4, InspectSize ),
11568                 rec( 26, (2,512), EAKey ),
11569         ], info_str=(EAKey, "Read Extended Attribute: %s", ", %s"))
11570         pkt.Reply((26,536), [
11571                 rec( 8, 4, EAErrorCodes ),
11572                 rec( 12, 4, TtlValuesLength ),
11573                 rec( 16, 4, NewEAHandle ),
11574                 rec( 20, 4, EAAccessFlag ),
11575                 rec( 24, (2,512), EAValue ),
11576         ])
11577         pkt.CompletionCodes([0x0000, 0xc900, 0xce00, 0xcf00, 0xd101,
11578                              0xd301])
11579         # 2222/5604, 86/04
11580         pkt = NCP(0x5604, "Enumerate Extended Attribute", 'file', has_length=0 )
11581         pkt.Request((26,536), [
11582                 rec( 8, 2, EAFlags ),
11583                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
11584                 rec( 14, 4, ReservedOrDirectoryNumber ),
11585                 rec( 18, 4, InspectSize ),
11586                 rec( 22, 2, SequenceNumber ),
11587                 rec( 24, (2,512), EAKey ),
11588         ], info_str=(EAKey, "Enumerate Extended Attribute: %s", ", %s"))
11589         pkt.Reply(28, [
11590                 rec( 8, 4, EAErrorCodes ),
11591                 rec( 12, 4, TtlEAs ),
11592                 rec( 16, 4, TtlEAsDataSize ),
11593                 rec( 20, 4, TtlEAsKeySize ),
11594                 rec( 24, 4, NewEAHandle ),
11595         ])
11596         pkt.CompletionCodes([0x0000, 0x8800, 0xc900, 0xce00, 0xcf00, 0xd101,
11597                              0xd301])
11598         # 2222/5605, 86/05
11599         pkt = NCP(0x5605, "Duplicate Extended Attributes", 'file', has_length=0 )
11600         pkt.Request(28, [
11601                 rec( 8, 2, EAFlags ),
11602                 rec( 10, 2, DstEAFlags ),
11603                 rec( 12, 4, EAHandleOrNetWareHandleOrVolume ),
11604                 rec( 16, 4, ReservedOrDirectoryNumber ),
11605                 rec( 20, 4, EAHandleOrNetWareHandleOrVolume ),
11606                 rec( 24, 4, ReservedOrDirectoryNumber ),
11607         ])
11608         pkt.Reply(20, [
11609                 rec( 8, 4, EADuplicateCount ),
11610                 rec( 12, 4, EADataSizeDuplicated ),
11611                 rec( 16, 4, EAKeySizeDuplicated ),
11612         ])
11613         pkt.CompletionCodes([0x0000, 0xd101])
11614         # 2222/5701, 87/01
11615         pkt = NCP(0x5701, "Open/Create File or Subdirectory", 'file', has_length=0)
11616         pkt.Request((30, 284), [
11617                 rec( 8, 1, NameSpace  ),
11618                 rec( 9, 1, OpenCreateMode ),
11619                 rec( 10, 2, SearchAttributesLow ),
11620                 rec( 12, 2, ReturnInfoMask ),
11621                 rec( 14, 2, ExtendedInfo ),
11622                 rec( 16, 4, AttributesDef32 ),
11623                 rec( 20, 2, DesiredAccessRights ),
11624                 rec( 22, 1, VolumeNumber ),
11625                 rec( 23, 4, DirectoryBase ),
11626                 rec( 27, 1, HandleFlag ),
11627                 rec( 28, 1, PathCount, var="x" ),
11628                 rec( 29, (1,255), Path, repeat="x" ),
11629         ], info_str=(Path, "Open or Create: %s", "/%s"))
11630         pkt.Reply( NO_LENGTH_CHECK, [
11631                 rec( 8, 4, FileHandle ),
11632                 rec( 12, 1, OpenCreateAction ),
11633                 rec( 13, 1, Reserved ),
11634                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
11635                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
11636                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
11637                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
11638                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
11639                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
11640                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
11641                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
11642                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
11643                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
11644                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
11645                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
11646                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
11647                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
11648                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
11649                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
11650                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
11651                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
11652                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
11653                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
11654                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
11655                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
11656                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
11657                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
11658                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
11659                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
11660                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
11661                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
11662                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
11663                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
11664                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
11665                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
11666                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
11667                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ), 
11668                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
11669                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
11670                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
11671                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ), 
11672                 srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ), 
11673                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ), 
11674                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ), 
11675                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ), 
11676                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ), 
11677                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ), 
11678                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
11679                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ), 
11680                 srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
11681         ])
11682         pkt.ReqCondSizeVariable()
11683         pkt.CompletionCodes([0x0000, 0x8001, 0x8101, 0x8401, 0x8501,
11684                              0x8701, 0x8900, 0x8d00, 0x8f00, 0x9001, 0x9600,
11685                              0x9804, 0x9b03, 0x9c03, 0xa500, 0xbf00, 0xfd00, 0xff16])
11686         # 2222/5702, 87/02
11687         pkt = NCP(0x5702, "Initialize Search", 'file', has_length=0)
11688         pkt.Request( (18,272), [
11689                 rec( 8, 1, NameSpace  ),
11690                 rec( 9, 1, Reserved ),
11691                 rec( 10, 1, VolumeNumber ),
11692                 rec( 11, 4, DirectoryBase ),
11693                 rec( 15, 1, HandleFlag ),
11694                 rec( 16, 1, PathCount, var="x" ),
11695                 rec( 17, (1,255), Path, repeat="x" ),
11696         ], info_str=(Path, "Set Search Pointer to: %s", "/%s"))
11697         pkt.Reply(17, [
11698                 rec( 8, 1, VolumeNumber ),
11699                 rec( 9, 4, DirectoryNumber ),
11700                 rec( 13, 4, DirectoryEntryNumber ),
11701         ])
11702         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11703                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11704                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11705         # 2222/5703, 87/03
11706         pkt = NCP(0x5703, "Search for File or Subdirectory", 'file', has_length=0)
11707         pkt.Request((26, 280), [
11708                 rec( 8, 1, NameSpace  ),
11709                 rec( 9, 1, DataStream ),
11710                 rec( 10, 2, SearchAttributesLow ),
11711                 rec( 12, 2, ReturnInfoMask ),
11712                 rec( 14, 2, ExtendedInfo ),
11713                 rec( 16, 9, SearchSequence ),
11714                 rec( 25, (1,255), SearchPattern ),
11715         ], info_str=(SearchPattern, "Search for: %s", "/%s"))
11716         pkt.Reply( NO_LENGTH_CHECK, [
11717                 rec( 8, 9, SearchSequence ),
11718                 rec( 17, 1, Reserved ),
11719                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
11720                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
11721                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
11722                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
11723                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
11724                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
11725                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
11726                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
11727                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
11728                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
11729                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
11730                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
11731                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
11732                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
11733                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
11734                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
11735                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
11736                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
11737                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
11738                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
11739                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
11740                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
11741                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
11742                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
11743                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
11744                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
11745                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
11746                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
11747                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
11748                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
11749                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
11750                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
11751                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
11752                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ), 
11753                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
11754                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
11755                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
11756                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ), 
11757                 srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ), 
11758                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ), 
11759                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ), 
11760                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ), 
11761                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ), 
11762                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ), 
11763                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
11764                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ), 
11765                 srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
11766         ])
11767         pkt.ReqCondSizeVariable()
11768         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11769                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11770                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11771         # 2222/5704, 87/04
11772         pkt = NCP(0x5704, "Rename Or Move a File or Subdirectory", 'file', has_length=0)
11773         pkt.Request((28, 536), [
11774                 rec( 8, 1, NameSpace  ),
11775                 rec( 9, 1, RenameFlag ),
11776                 rec( 10, 2, SearchAttributesLow ),
11777                 rec( 12, 1, VolumeNumber ),
11778                 rec( 13, 4, DirectoryBase ),
11779                 rec( 17, 1, HandleFlag ),
11780                 rec( 18, 1, PathCount, var="x" ),
11781                 rec( 19, 1, VolumeNumber ),
11782                 rec( 20, 4, DirectoryBase ),
11783                 rec( 24, 1, HandleFlag ),
11784                 rec( 25, 1, PathCount, var="y" ),
11785                 rec( 26, (1, 255), Path, repeat="x" ),
11786                 rec( -1, (1,255), Path, repeat="y" ),
11787         ], info_str=(Path, "Rename or Move: %s", "/%s"))
11788         pkt.Reply(8)
11789         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11790                              0x8701, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9200, 0x9600,
11791                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11792         # 2222/5705, 87/05
11793         pkt = NCP(0x5705, "Scan File or Subdirectory for Trustees", 'file', has_length=0)
11794         pkt.Request((24, 278), [
11795                 rec( 8, 1, NameSpace  ),
11796                 rec( 9, 1, Reserved ),
11797                 rec( 10, 2, SearchAttributesLow ),
11798                 rec( 12, 4, SequenceNumber ),
11799                 rec( 16, 1, VolumeNumber ),
11800                 rec( 17, 4, DirectoryBase ),
11801                 rec( 21, 1, HandleFlag ),
11802                 rec( 22, 1, PathCount, var="x" ),
11803                 rec( 23, (1, 255), Path, repeat="x" ),
11804         ], info_str=(Path, "Scan Trustees for: %s", "/%s"))
11805         pkt.Reply(20, [
11806                 rec( 8, 4, SequenceNumber ),
11807                 rec( 12, 2, ObjectIDCount, var="x" ),
11808                 rec( 14, 6, TrusteeStruct, repeat="x" ),
11809         ])
11810         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11811                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11812                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11813         # 2222/5706, 87/06
11814         pkt = NCP(0x5706, "Obtain File or SubDirectory Information", 'file', has_length=0)
11815         pkt.Request((24,278), [
11816                 rec( 10, 1, SrcNameSpace ),
11817                 rec( 11, 1, DestNameSpace ),
11818                 rec( 12, 2, SearchAttributesLow ),
11819                 rec( 14, 2, ReturnInfoMask, LE ),
11820                 rec( 16, 2, ExtendedInfo ),
11821                 rec( 18, 1, VolumeNumber ),
11822                 rec( 19, 4, DirectoryBase ),
11823                 rec( 23, 1, HandleFlag ),
11824                 rec( 24, 1, PathCount, var="x" ),
11825                 rec( 25, (1,255), Path, repeat="x",),
11826         ], info_str=(Path, "Obtain Info for: %s", "/%s"))
11827         pkt.Reply(NO_LENGTH_CHECK, [
11828             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
11829             srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
11830             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
11831             srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
11832             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
11833             srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
11834             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
11835             srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
11836             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
11837             srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
11838             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
11839             srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
11840             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
11841             srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
11842             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
11843             srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
11844             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
11845             srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
11846             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
11847             srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
11848             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
11849             srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
11850             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
11851             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
11852             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
11853             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
11854             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
11855             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
11856             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
11857             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
11858             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
11859             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
11860             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
11861             srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ), 
11862             srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
11863             srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
11864             srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
11865             srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ), 
11866             srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ), 
11867             srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ), 
11868             srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ), 
11869             srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ), 
11870             srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ), 
11871             srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ), 
11872             srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
11873             srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ), 
11874             srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
11875         ])
11876         pkt.ReqCondSizeVariable()
11877         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11878                              0x8701, 0x8900, 0x8d00, 0x8f00, 0x9001, 0x9600,
11879                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11880         # 2222/5707, 87/07
11881         pkt = NCP(0x5707, "Modify File or Subdirectory DOS Information", 'file', has_length=0)
11882         pkt.Request((62,316), [
11883                 rec( 8, 1, NameSpace ),
11884                 rec( 9, 1, Reserved ),
11885                 rec( 10, 2, SearchAttributesLow ),
11886                 rec( 12, 2, ModifyDOSInfoMask ),
11887                 rec( 14, 2, Reserved2 ),
11888                 rec( 16, 2, AttributesDef16 ),
11889                 rec( 18, 1, FileMode ),
11890                 rec( 19, 1, FileExtendedAttributes ),
11891                 rec( 20, 2, CreationDate ),
11892                 rec( 22, 2, CreationTime ),
11893                 rec( 24, 4, CreatorID, BE ),
11894                 rec( 28, 2, ModifiedDate ),
11895                 rec( 30, 2, ModifiedTime ),
11896                 rec( 32, 4, ModifierID, BE ),
11897                 rec( 36, 2, ArchivedDate ),
11898                 rec( 38, 2, ArchivedTime ),
11899                 rec( 40, 4, ArchiverID, BE ),
11900                 rec( 44, 2, LastAccessedDate ),
11901                 rec( 46, 2, InheritedRightsMask ),
11902                 rec( 48, 2, InheritanceRevokeMask ),
11903                 rec( 50, 4, MaxSpace ),
11904                 rec( 54, 1, VolumeNumber ),
11905                 rec( 55, 4, DirectoryBase ),
11906                 rec( 59, 1, HandleFlag ),
11907                 rec( 60, 1, PathCount, var="x" ),
11908                 rec( 61, (1,255), Path, repeat="x" ),
11909         ], info_str=(Path, "Modify DOS Information for: %s", "/%s"))
11910         pkt.Reply(8)
11911         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11912                              0x8701, 0x8c01, 0x8d00, 0x8f00, 0x9001, 0x9600,
11913                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11914         # 2222/5708, 87/08
11915         pkt = NCP(0x5708, "Delete a File or Subdirectory", 'file', has_length=0)
11916         pkt.Request((20,274), [
11917                 rec( 8, 1, NameSpace ),
11918                 rec( 9, 1, Reserved ),
11919                 rec( 10, 2, SearchAttributesLow ),
11920                 rec( 12, 1, VolumeNumber ),
11921                 rec( 13, 4, DirectoryBase ),
11922                 rec( 17, 1, HandleFlag ),
11923                 rec( 18, 1, PathCount, var="x" ),
11924                 rec( 19, (1,255), Path, repeat="x" ),
11925         ], info_str=(Path, "Delete: %s", "/%s"))
11926         pkt.Reply(8)
11927         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,  
11928                              0x8701, 0x8a00, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9600,
11929                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11930         # 2222/5709, 87/09
11931         pkt = NCP(0x5709, "Set Short Directory Handle", 'file', has_length=0)
11932         pkt.Request((20,274), [
11933                 rec( 8, 1, NameSpace ),
11934                 rec( 9, 1, DataStream ),
11935                 rec( 10, 1, DestDirHandle ),
11936                 rec( 11, 1, Reserved ),
11937                 rec( 12, 1, VolumeNumber ),
11938                 rec( 13, 4, DirectoryBase ),
11939                 rec( 17, 1, HandleFlag ),
11940                 rec( 18, 1, PathCount, var="x" ),
11941                 rec( 19, (1,255), Path, repeat="x" ),
11942         ], info_str=(Path, "Set Short Directory Handle to: %s", "/%s"))
11943         pkt.Reply(8)
11944         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11945                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11946                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11947         # 2222/570A, 87/10
11948         pkt = NCP(0x570A, "Add Trustee Set to File or Subdirectory", 'file', has_length=0)
11949         pkt.Request((31,285), [
11950                 rec( 8, 1, NameSpace ),
11951                 rec( 9, 1, Reserved ),
11952                 rec( 10, 2, SearchAttributesLow ),
11953                 rec( 12, 2, AccessRightsMaskWord ),
11954                 rec( 14, 2, ObjectIDCount, var="y" ),
11955                 rec( 16, 1, VolumeNumber ),
11956                 rec( 17, 4, DirectoryBase ),
11957                 rec( 21, 1, HandleFlag ),
11958                 rec( 22, 1, PathCount, var="x" ),
11959                 rec( 23, (1,255), Path, repeat="x" ),
11960                 rec( -1, 7, TrusteeStruct, repeat="y" ),
11961         ], info_str=(Path, "Add Trustee Set to: %s", "/%s"))
11962         pkt.Reply(8)
11963         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11964                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11965                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfc01, 0xfd00, 0xff16])
11966         # 2222/570B, 87/11
11967         pkt = NCP(0x570B, "Delete Trustee Set from File or SubDirectory", 'file', has_length=0)
11968         pkt.Request((27,281), [
11969                 rec( 8, 1, NameSpace ),
11970                 rec( 9, 1, Reserved ),
11971                 rec( 10, 2, ObjectIDCount, var="y" ),
11972                 rec( 12, 1, VolumeNumber ),
11973                 rec( 13, 4, DirectoryBase ),
11974                 rec( 17, 1, HandleFlag ),
11975                 rec( 18, 1, PathCount, var="x" ),
11976                 rec( 19, (1,255), Path, repeat="x" ),
11977                 rec( -1, 7, TrusteeStruct, repeat="y" ),
11978         ], info_str=(Path, "Delete Trustee Set from: %s", "/%s"))
11979         pkt.Reply(8)
11980         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11981                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11982                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11983         # 2222/570C, 87/12
11984         pkt = NCP(0x570C, "Allocate Short Directory Handle", 'file', has_length=0)
11985         pkt.Request((20,274), [
11986                 rec( 8, 1, NameSpace ),
11987                 rec( 9, 1, Reserved ),
11988                 rec( 10, 2, AllocateMode ),
11989                 rec( 12, 1, VolumeNumber ),
11990                 rec( 13, 4, DirectoryBase ),
11991                 rec( 17, 1, HandleFlag ),
11992                 rec( 18, 1, PathCount, var="x" ),
11993                 rec( 19, (1,255), Path, repeat="x" ),
11994         ], info_str=(Path, "Allocate Short Directory Handle to: %s", "/%s"))
11995         pkt.Reply(14, [
11996                 rec( 8, 1, DirHandle ),
11997                 rec( 9, 1, VolumeNumber ),
11998                 rec( 10, 4, Reserved4 ),
11999         ])
12000         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12001                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12002                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12003         # 2222/5710, 87/16
12004         pkt = NCP(0x5710, "Scan Salvageable Files", 'file', has_length=0)
12005         pkt.Request((26,280), [
12006                 rec( 8, 1, NameSpace ),
12007                 rec( 9, 1, DataStream ),
12008                 rec( 10, 2, ReturnInfoMask ),
12009                 rec( 12, 2, ExtendedInfo ),
12010                 rec( 14, 4, SequenceNumber ),
12011                 rec( 18, 1, VolumeNumber ),
12012                 rec( 19, 4, DirectoryBase ),
12013                 rec( 23, 1, HandleFlag ),
12014                 rec( 24, 1, PathCount, var="x" ),
12015                 rec( 25, (1,255), Path, repeat="x" ),
12016         ], info_str=(Path, "Scan for Deleted Files in: %s", "/%s"))
12017         pkt.Reply(NO_LENGTH_CHECK, [
12018                 rec( 8, 4, SequenceNumber ),
12019                 rec( 12, 2, DeletedTime ),
12020                 rec( 14, 2, DeletedDate ),
12021                 rec( 16, 4, DeletedID, BE ),
12022                 rec( 20, 4, VolumeID ),
12023                 rec( 24, 4, DirectoryBase ),
12024                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12025                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12026                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12027                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12028                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12029                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12030                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12031                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12032                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12033                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12034                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12035                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12036                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12037                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12038                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12039                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12040                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12041                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12042                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12043                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12044                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12045                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12046                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12047                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12048                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12049                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12050                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12051                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12052                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12053                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12054                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12055                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12056                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12057                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12058                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12059         ])
12060         pkt.ReqCondSizeVariable()
12061         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12062                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12063                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12064         # 2222/5711, 87/17
12065         pkt = NCP(0x5711, "Recover Salvageable File", 'file', has_length=0)
12066         pkt.Request((23,277), [
12067                 rec( 8, 1, NameSpace ),
12068                 rec( 9, 1, Reserved ),
12069                 rec( 10, 4, SequenceNumber ),
12070                 rec( 14, 4, VolumeID ),
12071                 rec( 18, 4, DirectoryBase ),
12072                 rec( 22, (1,255), FileName ),
12073         ], info_str=(FileName, "Recover Deleted File: %s", ", %s"))
12074         pkt.Reply(8)
12075         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12076                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12077                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12078         # 2222/5712, 87/18
12079         pkt = NCP(0x5712, "Purge Salvageable Files", 'file', has_length=0)
12080         pkt.Request(22, [
12081                 rec( 8, 1, NameSpace ),
12082                 rec( 9, 1, Reserved ),
12083                 rec( 10, 4, SequenceNumber ),
12084                 rec( 14, 4, VolumeID ),
12085                 rec( 18, 4, DirectoryBase ),
12086         ])
12087         pkt.Reply(8)
12088         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12089                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12090                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12091         # 2222/5713, 87/19
12092         pkt = NCP(0x5713, "Get Name Space Information", 'file', has_length=0)
12093         pkt.Request(18, [
12094                 rec( 8, 1, SrcNameSpace ),
12095                 rec( 9, 1, DestNameSpace ),
12096                 rec( 10, 1, Reserved ),
12097                 rec( 11, 1, VolumeNumber ),
12098                 rec( 12, 4, DirectoryBase ),
12099                 rec( 16, 2, NamesSpaceInfoMask ),
12100         ])
12101         pkt.Reply(NO_LENGTH_CHECK, [
12102             srec( FileNameStruct, req_cond="ncp.ns_info_mask_modify == TRUE" ),
12103             srec( FileAttributesStruct, req_cond="ncp.ns_info_mask_fatt == TRUE" ),
12104             srec( CreationDateStruct, req_cond="ncp.ns_info_mask_cdate == TRUE" ),
12105             srec( CreationTimeStruct, req_cond="ncp.ns_info_mask_ctime == TRUE" ),
12106             srec( OwnerIDStruct, req_cond="ncp.ns_info_mask_owner == TRUE" ),
12107             srec( ArchiveDateStruct, req_cond="ncp.ns_info_mask_adate == TRUE" ),
12108             srec( ArchiveTimeStruct, req_cond="ncp.ns_info_mask_atime == TRUE" ),
12109             srec( ArchiveIdStruct, req_cond="ncp.ns_info_mask_aid == TRUE" ),
12110             srec( UpdateDateStruct, req_cond="ncp.ns_info_mask_udate == TRUE" ),
12111             srec( UpdateTimeStruct, req_cond="ncp.ns_info_mask_utime == TRUE" ),
12112             srec( UpdateIDStruct, req_cond="ncp.ns_info_mask_uid == TRUE" ),
12113             srec( LastAccessStruct, req_cond="ncp.ns_info_mask_acc_date == TRUE" ),
12114             srec( RightsInfoStruct, req_cond="ncp.ns_info_mask_max_acc_mask == TRUE" ),
12115         ])
12116         pkt.ReqCondSizeVariable()
12117         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12118                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12119                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12120         # 2222/5714, 87/20
12121         pkt = NCP(0x5714, "Search for File or Subdirectory Set", 'file', has_length=0)
12122         pkt.Request((28, 282), [
12123                 rec( 8, 1, NameSpace  ),
12124                 rec( 9, 1, DataStream ),
12125                 rec( 10, 2, SearchAttributesLow ),
12126                 rec( 12, 2, ReturnInfoMask ),
12127                 rec( 14, 2, ExtendedInfo ),
12128                 rec( 16, 2, ReturnInfoCount ),
12129                 rec( 18, 9, SearchSequence ),
12130                 rec( 27, (1,255), SearchPattern ),
12131         ], info_str=(SearchPattern, "Search for: %s", ", %s"))
12132         pkt.Reply(NO_LENGTH_CHECK, [
12133                 rec( 8, 9, SearchSequence ),
12134                 rec( 17, 1, MoreFlag ),
12135                 rec( 18, 2, InfoCount ),
12136             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12137             srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12138             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12139             srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12140             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12141             srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12142             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12143             srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12144             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12145             srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12146             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12147             srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12148             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12149             srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12150             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12151             srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12152             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12153             srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12154             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12155             srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12156             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12157             srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12158             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12159             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12160             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12161             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12162             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12163             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12164             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12165             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 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( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12169             srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ), 
12170             srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
12171             srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
12172             srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
12173             srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ), 
12174             srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ), 
12175             srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ), 
12176             srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ), 
12177             srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ), 
12178             srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ), 
12179             srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ), 
12180             srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
12181             srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ), 
12182             srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
12183         ])
12184         pkt.ReqCondSizeVariable()
12185         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12186                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12187                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12188         # 2222/5715, 87/21
12189         pkt = NCP(0x5715, "Get Path String from Short Directory Handle", 'file', has_length=0)
12190         pkt.Request(10, [
12191                 rec( 8, 1, NameSpace ),
12192                 rec( 9, 1, DirHandle ),
12193         ])
12194         pkt.Reply((9,263), [
12195                 rec( 8, (1,255), Path ),
12196         ])
12197         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12198                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12199                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
12200         # 2222/5716, 87/22
12201         pkt = NCP(0x5716, "Generate Directory Base and Volume Number", 'file', has_length=0)
12202         pkt.Request((20,274), [
12203                 rec( 8, 1, SrcNameSpace ),
12204                 rec( 9, 1, DestNameSpace ),
12205                 rec( 10, 2, dstNSIndicator ),
12206                 rec( 12, 1, VolumeNumber ),
12207                 rec( 13, 4, DirectoryBase ),
12208                 rec( 17, 1, HandleFlag ),
12209                 rec( 18, 1, PathCount, var="x" ),
12210                 rec( 19, (1,255), Path, repeat="x" ),
12211         ], info_str=(Path, "Get Volume and Directory Base from: %s", "/%s"))
12212         pkt.Reply(17, [
12213                 rec( 8, 4, DirectoryBase ),
12214                 rec( 12, 4, DOSDirectoryBase ),
12215                 rec( 16, 1, VolumeNumber ),
12216         ])
12217         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12218                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12219                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12220         # 2222/5717, 87/23
12221         pkt = NCP(0x5717, "Query Name Space Information Format", 'file', has_length=0)
12222         pkt.Request(10, [
12223                 rec( 8, 1, NameSpace ),
12224                 rec( 9, 1, VolumeNumber ),
12225         ])
12226         pkt.Reply(58, [
12227                 rec( 8, 4, FixedBitMask ),
12228                 rec( 12, 4, VariableBitMask ),
12229                 rec( 16, 4, HugeBitMask ),
12230                 rec( 20, 2, FixedBitsDefined ),
12231                 rec( 22, 2, VariableBitsDefined ),
12232                 rec( 24, 2, HugeBitsDefined ),
12233                 rec( 26, 32, FieldsLenTable ),
12234         ])
12235         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12236                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12237                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12238         # 2222/5718, 87/24
12239         pkt = NCP(0x5718, "Get Name Spaces Loaded List from Volume Number", 'file', has_length=0)
12240         pkt.Request(10, [
12241                 rec( 8, 1, Reserved ),
12242                 rec( 9, 1, VolumeNumber ),
12243         ])
12244         pkt.Reply(11, [
12245                 rec( 8, 2, NumberOfNSLoaded, var="x" ),
12246                 rec( 10, 1, NameSpace, repeat="x" ),
12247         ])
12248         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12249                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12250                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12251         # 2222/5719, 87/25
12252         pkt = NCP(0x5719, "Set Name Space Information", 'file', has_length=0)
12253         pkt.Request(531, [
12254                 rec( 8, 1, SrcNameSpace ),
12255                 rec( 9, 1, DestNameSpace ),
12256                 rec( 10, 1, VolumeNumber ),
12257                 rec( 11, 4, DirectoryBase ),
12258                 rec( 15, 2, NamesSpaceInfoMask ),
12259                 rec( 17, 2, Reserved2 ),
12260                 rec( 19, 512, NSSpecificInfo ),
12261         ])
12262         pkt.Reply(8)
12263         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12264                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12265                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12266                              0xff16])
12267         # 2222/571A, 87/26
12268         pkt = NCP(0x571A, "Get Huge Name Space Information", 'file', has_length=0)
12269         pkt.Request(34, [
12270                 rec( 8, 1, NameSpace ),
12271                 rec( 9, 1, VolumeNumber ),
12272                 rec( 10, 4, DirectoryBase ),
12273                 rec( 14, 4, HugeBitMask ),
12274                 rec( 18, 16, HugeStateInfo ),
12275         ])
12276         pkt.Reply((25,279), [
12277                 rec( 8, 16, NextHugeStateInfo ),
12278                 rec( 24, (1,255), HugeData ),
12279         ])
12280         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12281                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12282                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12283                              0xff16])
12284         # 2222/571B, 87/27
12285         pkt = NCP(0x571B, "Set Huge Name Space Information", 'file', has_length=0)
12286         pkt.Request((35,289), [
12287                 rec( 8, 1, NameSpace ),
12288                 rec( 9, 1, VolumeNumber ),
12289                 rec( 10, 4, DirectoryBase ),
12290                 rec( 14, 4, HugeBitMask ),
12291                 rec( 18, 16, HugeStateInfo ),
12292                 rec( 34, (1,255), HugeData ),
12293         ])
12294         pkt.Reply(28, [
12295                 rec( 8, 16, NextHugeStateInfo ),
12296                 rec( 24, 4, HugeDataUsed ),
12297         ])
12298         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12299                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12300                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12301                              0xff16])
12302         # 2222/571C, 87/28
12303         pkt = NCP(0x571C, "Get Full Path String", 'file', has_length=0)
12304         pkt.Request((28,282), [
12305                 rec( 8, 1, SrcNameSpace ),
12306                 rec( 9, 1, DestNameSpace ),
12307                 rec( 10, 2, PathCookieFlags ),
12308                 rec( 12, 4, Cookie1 ),
12309                 rec( 16, 4, Cookie2 ),
12310                 rec( 20, 1, VolumeNumber ),
12311                 rec( 21, 4, DirectoryBase ),
12312                 rec( 25, 1, HandleFlag ),
12313                 rec( 26, 1, PathCount, var="x" ),
12314                 rec( 27, (1,255), Path, repeat="x" ),
12315         ], info_str=(Path, "Get Full Path from: %s", "/%s"))
12316         pkt.Reply((23,277), [
12317                 rec( 8, 2, PathCookieFlags ),
12318                 rec( 10, 4, Cookie1 ),
12319                 rec( 14, 4, Cookie2 ),
12320                 rec( 18, 2, PathComponentSize ),
12321                 rec( 20, 2, PathComponentCount, var='x' ),
12322                 rec( 22, (1,255), Path, repeat='x' ),
12323         ])
12324         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12325                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12326                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12327                              0xff16])
12328         # 2222/571D, 87/29
12329         pkt = NCP(0x571D, "Get Effective Directory Rights", 'file', has_length=0)
12330         pkt.Request((24, 278), [
12331                 rec( 8, 1, NameSpace  ),
12332                 rec( 9, 1, DestNameSpace ),
12333                 rec( 10, 2, SearchAttributesLow ),
12334                 rec( 12, 2, ReturnInfoMask ),
12335                 rec( 14, 2, ExtendedInfo ),
12336                 rec( 16, 1, VolumeNumber ),
12337                 rec( 17, 4, DirectoryBase ),
12338                 rec( 21, 1, HandleFlag ),
12339                 rec( 22, 1, PathCount, var="x" ),
12340                 rec( 23, (1,255), Path, repeat="x" ),
12341         ], info_str=(Path, "Get Effective Rights for: %s", "/%s"))
12342         pkt.Reply(NO_LENGTH_CHECK, [
12343                 rec( 8, 2, EffectiveRights ),
12344                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12345                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12346                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12347                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12348                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12349                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12350                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12351                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12352                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12353                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12354                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12355                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12356                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12357                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12358                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12359                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12360                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12361                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12362                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12363                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12364                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12365                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12366                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12367                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12368                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12369                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12370                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12371                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12372                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12373                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12374                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12375                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12376                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12377                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12378                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12379         ])
12380         pkt.ReqCondSizeVariable()
12381         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12382                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12383                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12384         # 2222/571E, 87/30
12385         pkt = NCP(0x571E, "Open/Create File or Subdirectory", 'file', has_length=0)
12386         pkt.Request((34, 288), [
12387                 rec( 8, 1, NameSpace  ),
12388                 rec( 9, 1, DataStream ),
12389                 rec( 10, 1, OpenCreateMode ),
12390                 rec( 11, 1, Reserved ),
12391                 rec( 12, 2, SearchAttributesLow ),
12392                 rec( 14, 2, Reserved2 ),
12393                 rec( 16, 2, ReturnInfoMask ),
12394                 rec( 18, 2, ExtendedInfo ),
12395                 rec( 20, 4, AttributesDef32 ),
12396                 rec( 24, 2, DesiredAccessRights ),
12397                 rec( 26, 1, VolumeNumber ),
12398                 rec( 27, 4, DirectoryBase ),
12399                 rec( 31, 1, HandleFlag ),
12400                 rec( 32, 1, PathCount, var="x" ),
12401                 rec( 33, (1,255), Path, repeat="x" ),
12402         ], info_str=(Path, "Open or Create File: %s", "/%s"))
12403         pkt.Reply(NO_LENGTH_CHECK, [
12404                 rec( 8, 4, FileHandle, BE ),
12405                 rec( 12, 1, OpenCreateAction ),
12406                 rec( 13, 1, Reserved ),
12407                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12408                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12409                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12410                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12411                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12412                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12413                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12414                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12415                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12416                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12417                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12418                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12419                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12420                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12421                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12422                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12423                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12424                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12425                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12426                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12427                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12428                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12429                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12430                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12431                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12432                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12433                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12434                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12435                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12436                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12437                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12438                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12439                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12440                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12441                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12442         ])
12443         pkt.ReqCondSizeVariable()
12444         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12445                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12446                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12447         # 2222/571F, 87/31
12448         pkt = NCP(0x571F, "Get File Information", 'file', has_length=0)
12449         pkt.Request(16, [
12450                 rec( 8, 6, FileHandle  ),
12451                 rec( 14, 1, HandleInfoLevel ),
12452                 rec( 15, 1, NameSpace ),
12453         ])
12454         pkt.Reply(NO_LENGTH_CHECK, [
12455                 rec( 8, 4, VolumeNumberLong ),
12456                 rec( 12, 4, DirectoryBase ),
12457                 srec(HandleInfoLevel0, req_cond="ncp.handle_info_level==0x00" ),
12458                 srec(HandleInfoLevel1, req_cond="ncp.handle_info_level==0x01" ),
12459                 srec(HandleInfoLevel2, req_cond="ncp.handle_info_level==0x02" ),
12460                 srec(HandleInfoLevel3, req_cond="ncp.handle_info_level==0x03" ),
12461                 srec(HandleInfoLevel4, req_cond="ncp.handle_info_level==0x04" ),
12462                 srec(HandleInfoLevel5, req_cond="ncp.handle_info_level==0x05" ),
12463         ])
12464         pkt.ReqCondSizeVariable()
12465         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12466                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12467                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12468         # 2222/5720, 87/32 
12469         pkt = NCP(0x5720, "Open/Create File or Subdirectory with Callback", 'file', has_length=0)
12470         pkt.Request((30, 284), [
12471                 rec( 8, 1, NameSpace  ),
12472                 rec( 9, 1, OpenCreateMode ),
12473                 rec( 10, 2, SearchAttributesLow ),
12474                 rec( 12, 2, ReturnInfoMask ),
12475                 rec( 14, 2, ExtendedInfo ),
12476                 rec( 16, 4, AttributesDef32 ),
12477                 rec( 20, 2, DesiredAccessRights ),
12478                 rec( 22, 1, VolumeNumber ),
12479                 rec( 23, 4, DirectoryBase ),
12480                 rec( 27, 1, HandleFlag ),
12481                 rec( 28, 1, PathCount, var="x" ),
12482                 rec( 29, (1,255), Path, repeat="x" ),
12483         ], info_str=(Path, "Open or Create with Op-Lock: %s", "/%s"))
12484         pkt.Reply( NO_LENGTH_CHECK, [
12485                 rec( 8, 4, FileHandle, BE ),
12486                 rec( 12, 1, OpenCreateAction ),
12487                 rec( 13, 1, OCRetFlags ),
12488                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12489                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12490                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12491                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12492                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12493                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12494                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12495                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12496                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12497                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12498                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12499                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12500                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12501                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12502                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12503                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12504                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12505                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12506                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12507                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12508                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12509                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12510                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12511                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12512                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12513                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12514                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12515                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12516                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12517                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12518                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12519                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12520                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12521                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ), 
12522                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
12523                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
12524                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
12525                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ), 
12526                 srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ), 
12527                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ), 
12528                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ), 
12529                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ), 
12530                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ), 
12531                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ), 
12532                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
12533                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ), 
12534                 srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
12535         ])
12536         pkt.ReqCondSizeVariable()
12537         pkt.CompletionCodes([0x0000, 0x7f00, 0x8000, 0x8101, 0x8401, 0x8501,
12538                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12539                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12540         # 2222/5721, 87/33
12541         pkt = NCP(0x5721, "Open/Create File or Subdirectory II with Callback", 'file', has_length=0)
12542         pkt.Request((34, 288), [
12543                 rec( 8, 1, NameSpace  ),
12544                 rec( 9, 1, DataStream ),
12545                 rec( 10, 1, OpenCreateMode ),
12546                 rec( 11, 1, Reserved ),
12547                 rec( 12, 2, SearchAttributesLow ),
12548                 rec( 14, 2, Reserved2 ),
12549                 rec( 16, 2, ReturnInfoMask ),
12550                 rec( 18, 2, ExtendedInfo ),
12551                 rec( 20, 4, AttributesDef32 ),
12552                 rec( 24, 2, DesiredAccessRights ),
12553                 rec( 26, 1, VolumeNumber ),
12554                 rec( 27, 4, DirectoryBase ),
12555                 rec( 31, 1, HandleFlag ),
12556                 rec( 32, 1, PathCount, var="x" ),
12557                 rec( 33, (1,255), Path, repeat="x" ),
12558         ], info_str=(FilePath, "Open or Create II with Op-Lock: %s", "/%s"))
12559         pkt.Reply((91,345), [
12560                 rec( 8, 4, FileHandle ),
12561                 rec( 12, 1, OpenCreateAction ),
12562                 rec( 13, 1, OCRetFlags ),
12563                 rec( 14, 4, DataStreamSpaceAlloc ),
12564                 rec( 18, 6, AttributesStruct ),
12565                 rec( 24, 4, DataStreamSize ),
12566                 rec( 28, 4, TtlDSDskSpaceAlloc ),
12567                 rec( 32, 2, NumberOfDataStreams ),
12568                 rec( 34, 2, CreationTime ),
12569                 rec( 36, 2, CreationDate ),
12570                 rec( 38, 4, CreatorID, BE ),
12571                 rec( 42, 2, ModifiedTime ),
12572                 rec( 44, 2, ModifiedDate ),
12573                 rec( 46, 4, ModifierID, BE ),
12574                 rec( 50, 2, LastAccessedDate ),
12575                 rec( 52, 2, ArchivedTime ),
12576                 rec( 54, 2, ArchivedDate ),
12577                 rec( 56, 4, ArchiverID, BE ),
12578                 rec( 60, 2, InheritedRightsMask ),
12579                 rec( 62, 4, DirectoryEntryNumber ),
12580                 rec( 66, 4, DOSDirectoryEntryNumber ),
12581                 rec( 70, 4, VolumeNumberLong ),
12582                 rec( 74, 4, EADataSize ),
12583                 rec( 78, 4, EACount ),
12584                 rec( 82, 4, EAKeySize ),
12585                 rec( 86, 1, CreatorNameSpaceNumber ),
12586                 rec( 87, 3, Reserved3 ),
12587                 rec( 90, (1,255), FileName ),
12588         ])
12589         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12590                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12591                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12592         # 2222/5722, 87/34
12593         pkt = NCP(0x5722, "Open CallBack Control (Op-Lock)", 'file', has_length=0)
12594         pkt.Request(13, [
12595                 rec( 10, 4, CCFileHandle ),
12596                 rec( 14, 1, CCFunction ),
12597         ])
12598         pkt.Reply(8)
12599         pkt.CompletionCodes([0x0000, 0x8800])
12600         # 2222/5723, 87/35
12601         pkt = NCP(0x5723, "Modify DOS Attributes on a File or Subdirectory", 'file', has_length=0)
12602         pkt.Request((28, 282), [
12603                 rec( 8, 1, NameSpace  ),
12604                 rec( 9, 1, Flags ),
12605                 rec( 10, 2, SearchAttributesLow ),
12606                 rec( 12, 2, ReturnInfoMask ),
12607                 rec( 14, 2, ExtendedInfo ),
12608                 rec( 16, 4, AttributesDef32 ),
12609                 rec( 20, 1, VolumeNumber ),
12610                 rec( 21, 4, DirectoryBase ),
12611                 rec( 25, 1, HandleFlag ),
12612                 rec( 26, 1, PathCount, var="x" ),
12613                 rec( 27, (1,255), Path, repeat="x" ),
12614         ], info_str=(Path, "Modify DOS Attributes for: %s", "/%s"))
12615         pkt.Reply(24, [
12616                 rec( 8, 4, ItemsChecked ),
12617                 rec( 12, 4, ItemsChanged ),
12618                 rec( 16, 4, AttributeValidFlag ),
12619                 rec( 20, 4, AttributesDef32 ),
12620         ])
12621         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12622                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12623                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12624         # 2222/5724, 87/36
12625         pkt = NCP(0x5724, "Log File", 'file', has_length=0)
12626         pkt.Request((28, 282), [
12627                 rec( 8, 1, NameSpace  ),
12628                 rec( 9, 1, Reserved ),
12629                 rec( 10, 2, Reserved2 ),
12630                 rec( 12, 1, LogFileFlagLow ),
12631                 rec( 13, 1, LogFileFlagHigh ),
12632                 rec( 14, 2, Reserved2 ),
12633                 rec( 16, 4, WaitTime ),
12634                 rec( 20, 1, VolumeNumber ),
12635                 rec( 21, 4, DirectoryBase ),
12636                 rec( 25, 1, HandleFlag ),
12637                 rec( 26, 1, PathCount, var="x" ),
12638                 rec( 27, (1,255), Path, repeat="x" ),
12639         ], info_str=(Path, "Lock File: %s", "/%s"))
12640         pkt.Reply(8)
12641         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12642                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12643                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12644         # 2222/5725, 87/37
12645         pkt = NCP(0x5725, "Release File", 'file', has_length=0)
12646         pkt.Request((20, 274), [
12647                 rec( 8, 1, NameSpace  ),
12648                 rec( 9, 1, Reserved ),
12649                 rec( 10, 2, Reserved2 ),
12650                 rec( 12, 1, VolumeNumber ),
12651                 rec( 13, 4, DirectoryBase ),
12652                 rec( 17, 1, HandleFlag ),
12653                 rec( 18, 1, PathCount, var="x" ),
12654                 rec( 19, (1,255), Path, repeat="x" ),
12655         ], info_str=(Path, "Release Lock on: %s", "/%s"))
12656         pkt.Reply(8)
12657         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12658                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12659                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12660         # 2222/5726, 87/38
12661         pkt = NCP(0x5726, "Clear File", 'file', has_length=0)
12662         pkt.Request((20, 274), [
12663                 rec( 8, 1, NameSpace  ),
12664                 rec( 9, 1, Reserved ),
12665                 rec( 10, 2, Reserved2 ),
12666                 rec( 12, 1, VolumeNumber ),
12667                 rec( 13, 4, DirectoryBase ),
12668                 rec( 17, 1, HandleFlag ),
12669                 rec( 18, 1, PathCount, var="x" ),
12670                 rec( 19, (1,255), Path, repeat="x" ),
12671         ], info_str=(Path, "Clear File: %s", "/%s"))
12672         pkt.Reply(8)
12673         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12674                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12675                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12676         # 2222/5727, 87/39
12677         pkt = NCP(0x5727, "Get Directory Disk Space Restriction", 'file', has_length=0)
12678         pkt.Request((19, 273), [
12679                 rec( 8, 1, NameSpace  ),
12680                 rec( 9, 2, Reserved2 ),
12681                 rec( 11, 1, VolumeNumber ),
12682                 rec( 12, 4, DirectoryBase ),
12683                 rec( 16, 1, HandleFlag ),
12684                 rec( 17, 1, PathCount, var="x" ),
12685                 rec( 18, (1,255), Path, repeat="x" ),
12686         ], info_str=(Path, "Get Disk Space Restriction for: %s", "/%s"))
12687         pkt.Reply(18, [
12688                 rec( 8, 1, NumberOfEntries, var="x" ),
12689                 rec( 9, 9, SpaceStruct, repeat="x" ),
12690         ])
12691         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12692                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12693                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12694                              0xff16])
12695         # 2222/5728, 87/40
12696         pkt = NCP(0x5728, "Search for File or Subdirectory Set (Extended Errors)", 'file', has_length=0)
12697         pkt.Request((28, 282), [
12698                 rec( 8, 1, NameSpace  ),
12699                 rec( 9, 1, DataStream ),
12700                 rec( 10, 2, SearchAttributesLow ),
12701                 rec( 12, 2, ReturnInfoMask ),
12702                 rec( 14, 2, ExtendedInfo ),
12703                 rec( 16, 2, ReturnInfoCount ),
12704                 rec( 18, 9, SearchSequence ),
12705                 rec( 27, (1,255), SearchPattern ),
12706         ], info_str=(SearchPattern, "Search for: %s", ", %s"))
12707         pkt.Reply(NO_LENGTH_CHECK, [
12708                 rec( 8, 9, SearchSequence ),
12709                 rec( 17, 1, MoreFlag ),
12710                 rec( 18, 2, InfoCount ),
12711                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12712                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12713                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12714                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12715                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12716                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12717                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12718                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12719                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12720                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12721                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12722                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12723                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12724                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12725                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12726                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12727                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12728                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12729                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12730                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12731                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12732                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12733                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12734                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12735                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12736                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12737                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12738                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12739                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12740                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12741                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12742                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12743                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12744                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12745                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12746         ])
12747         pkt.ReqCondSizeVariable()
12748         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12749                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12750                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12751         # 2222/5729, 87/41
12752         pkt = NCP(0x5729, "Scan Salvageable Files", 'file', has_length=0)
12753         pkt.Request((24,278), [
12754                 rec( 8, 1, NameSpace ),
12755                 rec( 9, 1, Reserved ),
12756                 rec( 10, 2, CtrlFlags, LE ),
12757                 rec( 12, 4, SequenceNumber ),
12758                 rec( 16, 1, VolumeNumber ),
12759                 rec( 17, 4, DirectoryBase ),
12760                 rec( 21, 1, HandleFlag ),
12761                 rec( 22, 1, PathCount, var="x" ),
12762                 rec( 23, (1,255), Path, repeat="x" ),
12763         ], info_str=(Path, "Scan Deleted Files: %s", "/%s"))
12764         pkt.Reply(NO_LENGTH_CHECK, [
12765                 rec( 8, 4, SequenceNumber ),
12766                 rec( 12, 4, DirectoryBase ),
12767                 rec( 16, 4, ScanItems, var="x" ),
12768                 srec(ScanInfoFileName, req_cond="ncp.ctrl_flags==0x0001", repeat="x" ),
12769                 srec(ScanInfoFileNoName, req_cond="ncp.ctrl_flags==0x0000", repeat="x" ),
12770         ])
12771         pkt.ReqCondSizeVariable()
12772         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12773                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12774                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12775         # 2222/572A, 87/42
12776         pkt = NCP(0x572A, "Purge Salvageable File List", 'file', has_length=0)
12777         pkt.Request(28, [
12778                 rec( 8, 1, NameSpace ),
12779                 rec( 9, 1, Reserved ),
12780                 rec( 10, 2, PurgeFlags ),
12781                 rec( 12, 4, VolumeNumberLong ),
12782                 rec( 16, 4, DirectoryBase ),
12783                 rec( 20, 4, PurgeCount, var="x" ),
12784                 rec( 24, 4, PurgeList, repeat="x" ),
12785         ])
12786         pkt.Reply(16, [
12787                 rec( 8, 4, PurgeCount, var="x" ),
12788                 rec( 12, 4, PurgeCcode, repeat="x" ),
12789         ])
12790         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12791                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12792                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12793         # 2222/572B, 87/43
12794         pkt = NCP(0x572B, "Revoke File Handle Rights", 'file', has_length=0)
12795         pkt.Request(17, [
12796                 rec( 8, 3, Reserved3 ),
12797                 rec( 11, 1, RevQueryFlag ),
12798                 rec( 12, 4, FileHandle ),
12799                 rec( 16, 1, RemoveOpenRights ),
12800         ])
12801         pkt.Reply(13, [
12802                 rec( 8, 4, FileHandle ),
12803                 rec( 12, 1, OpenRights ),
12804         ])
12805         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12806                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12807                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12808         # 2222/572C, 87/44
12809         pkt = NCP(0x572C, "Update File Handle Rights", 'file', has_length=0)
12810         pkt.Request(24, [
12811                 rec( 8, 2, Reserved2 ),
12812                 rec( 10, 1, VolumeNumber ),
12813                 rec( 11, 1, NameSpace ),
12814                 rec( 12, 4, DirectoryNumber ),
12815                 rec( 16, 2, AccessRightsMaskWord ),
12816                 rec( 18, 2, NewAccessRights ),
12817                 rec( 20, 4, FileHandle, BE ),
12818         ])
12819         pkt.Reply(16, [
12820                 rec( 8, 4, FileHandle, BE ),
12821                 rec( 12, 4, EffectiveRights ),
12822         ])
12823         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12824                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12825                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12826         # 2222/5742, 87/66
12827         pkt = NCP(0x5742, "Novell Advanced Auditing Service (NAAS)", 'auditing', has_length=0)
12828         pkt.Request(8)
12829         pkt.Reply(8)
12830         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12831                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12832                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12833         # 2222/5801, 8801
12834         pkt = NCP(0x5801, "Query Volume Audit Status", "auditing", has_length=0)
12835         pkt.Request(12, [
12836                 rec( 8, 4, ConnectionNumber ),
12837         ])
12838         pkt.Reply(40, [
12839                 rec(8, 32, NWAuditStatus ),
12840         ])
12841         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12842                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12843                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12844         # 2222/5802, 8802
12845         pkt = NCP(0x5802, "Add User Audit Property", "auditing", has_length=0)
12846         pkt.Request(25, [
12847                 rec(8, 4, AuditIDType ),
12848                 rec(12, 4, AuditID ),
12849                 rec(16, 4, AuditHandle ),
12850                 rec(20, 4, ObjectID ),
12851                 rec(24, 1, AuditFlag ),
12852         ])
12853         pkt.Reply(8)
12854         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12855                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12856                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12857         # 2222/5803, 8803
12858         pkt = NCP(0x5803, "Add Auditor Access", "auditing", has_length=0)
12859         pkt.Request(8)
12860         pkt.Reply(8)
12861         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12862                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12863                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12864         # 2222/5804, 8804
12865         pkt = NCP(0x5804, "Change Auditor Volume Password", "auditing", has_length=0)
12866         pkt.Request(8)
12867         pkt.Reply(8)
12868         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12869                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12870                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12871         # 2222/5805, 8805
12872         pkt = NCP(0x5805, "Check Auditor Access", "auditing", has_length=0)
12873         pkt.Request(8)
12874         pkt.Reply(8)
12875         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12876                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12877                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12878         # 2222/5806, 8806
12879         pkt = NCP(0x5806, "Delete User Audit Property", "auditing", has_length=0)
12880         pkt.Request(8)
12881         pkt.Reply(8)
12882         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12883                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12884                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12885         # 2222/5807, 8807
12886         pkt = NCP(0x5807, "Disable Auditing On A Volume", "auditing", has_length=0)
12887         pkt.Request(8)
12888         pkt.Reply(8)
12889         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12890                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12891                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12892         # 2222/5808, 8808
12893         pkt = NCP(0x5808, "Enable Auditing On A Volume", "auditing", has_length=0)
12894         pkt.Request(8)
12895         pkt.Reply(8)
12896         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12897                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12898                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12899         # 2222/5809, 8809
12900         pkt = NCP(0x5809, "Query User Being Audited", "auditing", has_length=0)
12901         pkt.Request(8)
12902         pkt.Reply(8)
12903         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12904                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12905                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12906         # 2222/580A, 88,10
12907         pkt = NCP(0x580A, "Read Audit Bit Map", "auditing", has_length=0)
12908         pkt.Request(8)
12909         pkt.Reply(8)
12910         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12911                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12912                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12913         # 2222/580B, 88,11
12914         pkt = NCP(0x580B, "Read Audit File Configuration Header", "auditing", has_length=0)
12915         pkt.Request(8)
12916         pkt.Reply(8)
12917         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12918                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12919                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12920         # 2222/580D, 88,13
12921         pkt = NCP(0x580D, "Remove Auditor Access", "auditing", has_length=0)
12922         pkt.Request(8)
12923         pkt.Reply(8)
12924         pkt.CompletionCodes([0x0000, 0x300, 0x8000, 0x8101, 0x8401, 0x8501,
12925                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12926                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12927         # 2222/580E, 88,14
12928         pkt = NCP(0x580E, "Reset Audit File", "auditing", has_length=0)
12929         pkt.Request(8)
12930         pkt.Reply(8)
12931         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12932                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12933                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12934                              
12935         # 2222/580F, 88,15
12936         pkt = NCP(0x580F, "Auditing NCP", "auditing", has_length=0)
12937         pkt.Request(8)
12938         pkt.Reply(8)
12939         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12940                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12941                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12942         # 2222/5810, 88,16
12943         pkt = NCP(0x5810, "Write Audit Bit Map", "auditing", has_length=0)
12944         pkt.Request(8)
12945         pkt.Reply(8)
12946         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12947                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12948                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12949         # 2222/5811, 88,17
12950         pkt = NCP(0x5811, "Write Audit File Configuration Header", "auditing", has_length=0)
12951         pkt.Request(8)
12952         pkt.Reply(8)
12953         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12954                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12955                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12956         # 2222/5812, 88,18
12957         pkt = NCP(0x5812, "Change Auditor Volume Password2", "auditing", has_length=0)
12958         pkt.Request(8)
12959         pkt.Reply(8)
12960         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12961                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12962                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12963         # 2222/5813, 88,19
12964         pkt = NCP(0x5813, "Return Audit Flags", "auditing", has_length=0)
12965         pkt.Request(8)
12966         pkt.Reply(8)
12967         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12968                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12969                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12970         # 2222/5814, 88,20
12971         pkt = NCP(0x5814, "Close Old Audit File", "auditing", has_length=0)
12972         pkt.Request(8)
12973         pkt.Reply(8)
12974         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12975                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12976                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12977         # 2222/5816, 88,22
12978         pkt = NCP(0x5816, "Check Level Two Access", "auditing", has_length=0)
12979         pkt.Request(8)
12980         pkt.Reply(8)
12981         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12982                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12983                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12984         # 2222/5817, 88,23
12985         pkt = NCP(0x5817, "Return Old Audit File List", "auditing", has_length=0)
12986         pkt.Request(8)
12987         pkt.Reply(8)
12988         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12989                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12990                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12991         # 2222/5818, 88,24
12992         pkt = NCP(0x5818, "Init Audit File Reads", "auditing", has_length=0)
12993         pkt.Request(8)
12994         pkt.Reply(8)
12995         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12996                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12997                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12998         # 2222/5819, 88,25
12999         pkt = NCP(0x5819, "Read Auditing File", "auditing", has_length=0)
13000         pkt.Request(8)
13001         pkt.Reply(8)
13002         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13003                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13004                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13005         # 2222/581A, 88,26
13006         pkt = NCP(0x581A, "Delete Old Audit File", "auditing", has_length=0)
13007         pkt.Request(8)
13008         pkt.Reply(8)
13009         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13010                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13011                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13012         # 2222/581E, 88,30
13013         pkt = NCP(0x581E, "Restart Volume auditing", "auditing", has_length=0)
13014         pkt.Request(8)
13015         pkt.Reply(8)
13016         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13017                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13018                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13019         # 2222/581F, 88,31
13020         pkt = NCP(0x581F, "Set Volume Password", "auditing", has_length=0)
13021         pkt.Request(8)
13022         pkt.Reply(8)
13023         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13024                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13025                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13026         # 2222/5A01, 90/00
13027         pkt = NCP(0x5A01, "Parse Tree", 'file')
13028         pkt.Request(26, [
13029                 rec( 10, 4, InfoMask ),
13030                 rec( 14, 4, Reserved4 ),
13031                 rec( 18, 4, Reserved4 ),
13032                 rec( 22, 4, limbCount ),
13033         ])
13034         pkt.Reply(32, [
13035                 rec( 8, 4, limbCount ),
13036                 rec( 12, 4, ItemsCount ),
13037                 rec( 16, 4, nextLimbScanNum ),
13038                 rec( 20, 4, CompletionCode ),
13039                 rec( 24, 1, FolderFlag ),
13040                 rec( 25, 3, Reserved ),
13041                 rec( 28, 4, DirectoryBase ),
13042         ])
13043         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13044                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13045                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
13046         # 2222/5A0A, 90/10
13047         pkt = NCP(0x5A0A, "Get Reference Count from Dir Entry Number", 'file')
13048         pkt.Request(19, [
13049                 rec( 10, 4, VolumeNumberLong ),
13050                 rec( 14, 4, DirectoryBase ),
13051                 rec( 18, 1, NameSpace ),
13052         ])
13053         pkt.Reply(12, [
13054                 rec( 8, 4, ReferenceCount ),
13055         ])
13056         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13057                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13058                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
13059         # 2222/5A0B, 90/11
13060         pkt = NCP(0x5A0B, "Get Reference Count from Dir Handle", 'file')
13061         pkt.Request(14, [
13062                 rec( 10, 4, DirHandle ),
13063         ])
13064         pkt.Reply(12, [
13065                 rec( 8, 4, ReferenceCount ),
13066         ])
13067         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13068                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13069                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
13070         # 2222/5A0C, 90/12
13071         pkt = NCP(0x5A0C, "Set Compressed File Size", 'file')
13072         pkt.Request(20, [
13073                 rec( 10, 6, FileHandle ),
13074                 rec( 16, 4, SuggestedFileSize ),
13075         ])
13076         pkt.Reply(16, [
13077                 rec( 8, 4, OldFileSize ),
13078                 rec( 12, 4, NewFileSize ),
13079         ])
13080         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13081                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13082                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
13083         # 2222/5A80, 90/128
13084         pkt = NCP(0x5A80, "Move File Data To Data Migration", 'file')
13085         pkt.Request(27, [
13086                 rec( 10, 4, VolumeNumberLong ),
13087                 rec( 14, 4, DirectoryEntryNumber ),
13088                 rec( 18, 1, NameSpace ),
13089                 rec( 19, 3, Reserved ),
13090                 rec( 22, 4, SupportModuleID ),
13091                 rec( 26, 1, DMFlags ),
13092         ])
13093         pkt.Reply(8)
13094         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13095                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13096                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13097         # 2222/5A81, 90/129
13098         pkt = NCP(0x5A81, "Data Migration File Information", 'file')
13099         pkt.Request(19, [
13100                 rec( 10, 4, VolumeNumberLong ),
13101                 rec( 14, 4, DirectoryEntryNumber ),
13102                 rec( 18, 1, NameSpace ),
13103         ])
13104         pkt.Reply(24, [
13105                 rec( 8, 4, SupportModuleID ),
13106                 rec( 12, 4, RestoreTime ),
13107                 rec( 16, 4, DMInfoEntries, var="x" ),
13108                 rec( 20, 4, DataSize, repeat="x" ),
13109         ])
13110         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13111                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13112                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13113         # 2222/5A82, 90/130
13114         pkt = NCP(0x5A82, "Volume Data Migration Status", 'file')
13115         pkt.Request(18, [
13116                 rec( 10, 4, VolumeNumberLong ),
13117                 rec( 14, 4, SupportModuleID ),
13118         ])
13119         pkt.Reply(32, [
13120                 rec( 8, 4, NumOfFilesMigrated ),
13121                 rec( 12, 4, TtlMigratedSize ),
13122                 rec( 16, 4, SpaceUsed ),
13123                 rec( 20, 4, LimboUsed ),
13124                 rec( 24, 4, SpaceMigrated ),
13125                 rec( 28, 4, FileLimbo ),
13126         ])
13127         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13128                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13129                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13130         # 2222/5A83, 90/131
13131         pkt = NCP(0x5A83, "Migrator Status Info", 'file')
13132         pkt.Request(10)
13133         pkt.Reply(20, [
13134                 rec( 8, 1, DMPresentFlag ),
13135                 rec( 9, 3, Reserved3 ),
13136                 rec( 12, 4, DMmajorVersion ),
13137                 rec( 16, 4, DMminorVersion ),
13138         ])
13139         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13140                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13141                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13142         # 2222/5A84, 90/132
13143         pkt = NCP(0x5A84, "Data Migration Support Module Information", 'file')
13144         pkt.Request(18, [
13145                 rec( 10, 1, DMInfoLevel ),
13146                 rec( 11, 3, Reserved3),
13147                 rec( 14, 4, SupportModuleID ),
13148         ])
13149         pkt.Reply(NO_LENGTH_CHECK, [
13150                 srec( DMInfoLevel0, req_cond="ncp.dm_info_level == 0x00" ),
13151                 srec( DMInfoLevel1, req_cond="ncp.dm_info_level == 0x01" ),
13152                 srec( DMInfoLevel2, req_cond="ncp.dm_info_level == 0x02" ),
13153         ])
13154         pkt.ReqCondSizeVariable()
13155         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13156                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13157                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13158         # 2222/5A85, 90/133
13159         pkt = NCP(0x5A85, "Move File Data From Data Migration", 'file')
13160         pkt.Request(19, [
13161                 rec( 10, 4, VolumeNumberLong ),
13162                 rec( 14, 4, DirectoryEntryNumber ),
13163                 rec( 18, 1, NameSpace ),
13164         ])
13165         pkt.Reply(8)
13166         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13167                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13168                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13169         # 2222/5A86, 90/134
13170         pkt = NCP(0x5A86, "Get/Set Default Read-Write Support Module ID", 'file')
13171         pkt.Request(18, [
13172                 rec( 10, 1, GetSetFlag ),
13173                 rec( 11, 3, Reserved3 ),
13174                 rec( 14, 4, SupportModuleID ),
13175         ])
13176         pkt.Reply(12, [
13177                 rec( 8, 4, SupportModuleID ),
13178         ])
13179         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13180                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13181                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13182         # 2222/5A87, 90/135
13183         pkt = NCP(0x5A87, "Data Migration Support Module Capacity Request", 'file')
13184         pkt.Request(22, [
13185                 rec( 10, 4, SupportModuleID ),
13186                 rec( 14, 4, VolumeNumberLong ),
13187                 rec( 18, 4, DirectoryBase ),
13188         ])
13189         pkt.Reply(20, [
13190                 rec( 8, 4, BlockSizeInSectors ),
13191                 rec( 12, 4, TotalBlocks ),
13192                 rec( 16, 4, UsedBlocks ),
13193         ])
13194         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13195                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13196                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13197         # 2222/5A88, 90/136
13198         pkt = NCP(0x5A88, "RTDM Request", 'file')
13199         pkt.Request(15, [
13200                 rec( 10, 4, Verb ),
13201                 rec( 14, 1, VerbData ),
13202         ])
13203         pkt.Reply(8)
13204         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13205                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13206                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13207         # 2222/5C, 92
13208         pkt = NCP(0x5C, "SecretStore Services", 'file')
13209         #Need info on this packet structure and SecretStore Verbs
13210         pkt.Request(7)
13211         pkt.Reply(8)
13212         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13213                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13214                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13215                              
13216         # 2222/5E, 94   
13217         pkt = NCP(0x5e, "NMAS Communications Packet", 'comm')
13218         pkt.Request(7)
13219         pkt.Reply(8)
13220         pkt.CompletionCodes([0x0000, 0xfb09])
13221         # 2222/61, 97
13222         pkt = NCP(0x61, "Get Big Packet NCP Max Packet Size", 'comm')
13223         pkt.Request(10, [
13224                 rec( 7, 2, ProposedMaxSize, BE ),
13225                 rec( 9, 1, SecurityFlag ),
13226         ],info_str=(ProposedMaxSize, "Get Big Max Packet Size - %d", ", %d"))
13227         pkt.Reply(13, [
13228                 rec( 8, 2, AcceptedMaxSize, BE ),
13229                 rec( 10, 2, EchoSocket, BE ),
13230                 rec( 12, 1, SecurityFlag ),
13231         ])
13232         pkt.CompletionCodes([0x0000])
13233         # 2222/63, 99
13234         pkt = NCP(0x63, "Undocumented Packet Burst", 'comm')
13235         pkt.Request(7)
13236         pkt.Reply(8)
13237         pkt.CompletionCodes([0x0000])
13238         # 2222/64, 100
13239         pkt = NCP(0x64, "Undocumented Packet Burst", 'comm')
13240         pkt.Request(7)
13241         pkt.Reply(8)
13242         pkt.CompletionCodes([0x0000])
13243         # 2222/65, 101
13244         pkt = NCP(0x65, "Packet Burst Connection Request", 'comm')
13245         pkt.Request(25, [
13246                 rec( 7, 4, LocalConnectionID ),
13247                 rec( 11, 4, LocalMaxPacketSize ),
13248                 rec( 15, 2, LocalTargetSocket ),
13249                 rec( 17, 4, LocalMaxSendSize ),
13250                 rec( 21, 4, LocalMaxRecvSize ),
13251         ])
13252         pkt.Reply(16, [
13253                 rec( 8, 4, RemoteTargetID ),
13254                 rec( 12, 4, RemoteMaxPacketSize ),
13255         ])
13256         pkt.CompletionCodes([0x0000])
13257         # 2222/66, 102
13258         pkt = NCP(0x66, "Undocumented Packet Burst", 'comm')
13259         pkt.Request(7)
13260         pkt.Reply(8)
13261         pkt.CompletionCodes([0x0000])
13262         # 2222/67, 103
13263         pkt = NCP(0x67, "Undocumented Packet Burst", 'comm')
13264         pkt.Request(7)
13265         pkt.Reply(8)
13266         pkt.CompletionCodes([0x0000])
13267         # 2222/6801, 104/01
13268         pkt = NCP(0x6801, "Ping for NDS NCP", "nds", has_length=0)
13269         pkt.Request(8)
13270         pkt.Reply(8)
13271         pkt.ReqCondSizeVariable()
13272         pkt.CompletionCodes([0x0000, 0x8100, 0xfb04, 0xfe0c])
13273         # 2222/6802, 104/02
13274         #
13275         # XXX - if FraggerHandle is not 0xffffffff, this is not the
13276         # first fragment, so we can only dissect this by reassembling;
13277         # the fields after "Fragment Handle" are bogus for non-0xffffffff
13278         # fragments, so we shouldn't dissect them.
13279         #
13280         # XXX - are there TotalRequest requests in the packet, and
13281         # does each of them have NDSFlags and NDSVerb fields, or
13282         # does only the first one have it?
13283         #
13284         pkt = NCP(0x6802, "Send NDS Fragmented Request/Reply", "nds", has_length=0)
13285         pkt.Request(8)
13286         pkt.Reply(8)
13287         pkt.ReqCondSizeVariable()
13288         pkt.CompletionCodes([0x0000])
13289         # 2222/6803, 104/03
13290         pkt = NCP(0x6803, "Fragment Close", "nds", has_length=0)
13291         pkt.Request(12, [
13292                 rec( 8, 4, FraggerHandle ),
13293         ])
13294         pkt.Reply(8)
13295         pkt.CompletionCodes([0x0000, 0xff00])
13296         # 2222/6804, 104/04
13297         pkt = NCP(0x6804, "Return Bindery Context", "nds", has_length=0)
13298         pkt.Request(8)
13299         pkt.Reply((9, 263), [
13300                 rec( 8, (1,255), binderyContext ),
13301         ])
13302         pkt.CompletionCodes([0x0000, 0xfe0c, 0xff00])
13303         # 2222/6805, 104/05
13304         pkt = NCP(0x6805, "Monitor NDS Connection", "nds", has_length=0)
13305         pkt.Request(8)
13306         pkt.Reply(8)
13307         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
13308         # 2222/6806, 104/06
13309         pkt = NCP(0x6806, "Return NDS Statistics", "nds", has_length=0)
13310         pkt.Request(10, [
13311                 rec( 8, 2, NDSRequestFlags ),
13312         ])
13313         pkt.Reply(8)
13314         #Need to investigate how to decode Statistics Return Value
13315         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
13316         # 2222/6807, 104/07
13317         pkt = NCP(0x6807, "Clear NDS Statistics", "nds", has_length=0)
13318         pkt.Request(8)
13319         pkt.Reply(8)
13320         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
13321         # 2222/6808, 104/08
13322         pkt = NCP(0x6808, "Reload NDS Software", "nds", has_length=0)
13323         pkt.Request(8)
13324         pkt.Reply(12, [
13325                 rec( 8, 4, NDSStatus ),
13326         ])
13327         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
13328         # 2222/68C8, 104/200
13329         pkt = NCP(0x68C8, "Query Container Audit Status", "auditing", has_length=0)
13330         pkt.Request(12, [
13331                 rec( 8, 4, ConnectionNumber ),
13332 #               rec( 12, 4, AuditIDType, LE ),
13333 #               rec( 16, 4, AuditID ),
13334 #               rec( 20, 2, BufferSize ),
13335         ])
13336         pkt.Reply(40, [
13337                 rec(8, 32, NWAuditStatus ),
13338         ])
13339         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13340         # 2222/68CA, 104/202
13341         pkt = NCP(0x68CA, "Add Auditor Access", "auditing", has_length=0)
13342         pkt.Request(8)
13343         pkt.Reply(8)
13344         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13345         # 2222/68CB, 104/203
13346         pkt = NCP(0x68CB, "Change Auditor Container Password", "auditing", has_length=0)
13347         pkt.Request(8)
13348         pkt.Reply(8)
13349         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13350         # 2222/68CC, 104/204
13351         pkt = NCP(0x68CC, "Check Auditor Access", "auditing", has_length=0)
13352         pkt.Request(8)
13353         pkt.Reply(8)
13354         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13355         # 2222/68CE, 104/206
13356         pkt = NCP(0x680CE, "Disable Container Auditing", "auditing", has_length=0)
13357         pkt.Request(8)
13358         pkt.Reply(8)
13359         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13360         # 2222/68CF, 104/207
13361         pkt = NCP(0x68CF, "Enable Container Auditing", "auditing", has_length=0)
13362         pkt.Request(8)
13363         pkt.Reply(8)
13364         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13365         # 2222/68D1, 104/209
13366         pkt = NCP(0x68D1, "Read Audit File Header", "auditing", has_length=0)
13367         pkt.Request(8)
13368         pkt.Reply(8)
13369         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13370         # 2222/68D3, 104/211
13371         pkt = NCP(0x68D3, "Remove Auditor Access", "auditing", has_length=0)
13372         pkt.Request(8)
13373         pkt.Reply(8)
13374         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13375         # 2222/68D4, 104/212
13376         pkt = NCP(0x68D4, "Reset Audit File", "auditing", has_length=0)
13377         pkt.Request(8)
13378         pkt.Reply(8)
13379         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13380         # 2222/68D6, 104/214
13381         pkt = NCP(0x68D6, "Write Audit File Configuration Header", "auditing", has_length=0)
13382         pkt.Request(8)
13383         pkt.Reply(8)
13384         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13385         # 2222/68D7, 104/215
13386         pkt = NCP(0x68D7, "Change Auditor Container Password2", "auditing", has_length=0)
13387         pkt.Request(8)
13388         pkt.Reply(8)
13389         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13390         # 2222/68D8, 104/216
13391         pkt = NCP(0x68D8, "Return Audit Flags", "auditing", has_length=0)
13392         pkt.Request(8)
13393         pkt.Reply(8)
13394         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13395         # 2222/68D9, 104/217
13396         pkt = NCP(0x68D9, "Close Old Audit File", "auditing", has_length=0)
13397         pkt.Request(8)
13398         pkt.Reply(8)
13399         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13400         # 2222/68DB, 104/219
13401         pkt = NCP(0x68DB, "Check Level Two Access", "auditing", has_length=0)
13402         pkt.Request(8)
13403         pkt.Reply(8)
13404         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13405         # 2222/68DC, 104/220
13406         pkt = NCP(0x68DC, "Check Object Audited", "auditing", has_length=0)
13407         pkt.Request(8)
13408         pkt.Reply(8)
13409         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13410         # 2222/68DD, 104/221
13411         pkt = NCP(0x68DD, "Change Object Audited", "auditing", has_length=0)
13412         pkt.Request(8)
13413         pkt.Reply(8)
13414         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13415         # 2222/68DE, 104/222
13416         pkt = NCP(0x68DE, "Return Old Audit File List", "auditing", has_length=0)
13417         pkt.Request(8)
13418         pkt.Reply(8)
13419         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13420         # 2222/68DF, 104/223
13421         pkt = NCP(0x68DF, "Init Audit File Reads", "auditing", has_length=0)
13422         pkt.Request(8)
13423         pkt.Reply(8)
13424         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13425         # 2222/68E0, 104/224
13426         pkt = NCP(0x68E0, "Read Auditing File", "auditing", has_length=0)
13427         pkt.Request(8)
13428         pkt.Reply(8)
13429         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13430         # 2222/68E1, 104/225
13431         pkt = NCP(0x68E1, "Delete Old Audit File", "auditing", has_length=0)
13432         pkt.Request(8)
13433         pkt.Reply(8)
13434         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13435         # 2222/68E5, 104/229
13436         pkt = NCP(0x68E5, "Set Audit Password", "auditing", has_length=0)
13437         pkt.Request(8)
13438         pkt.Reply(8)
13439         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13440         # 2222/68E7, 104/231
13441         pkt = NCP(0x68E7, "External Audit Append To File", "auditing", has_length=0)
13442         pkt.Request(8)
13443         pkt.Reply(8)
13444         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13445         # 2222/69, 105
13446         pkt = NCP(0x69, "Log File", 'file')
13447         pkt.Request( (12, 267), [
13448                 rec( 7, 1, DirHandle ),
13449                 rec( 8, 1, LockFlag ),
13450                 rec( 9, 2, TimeoutLimit ),
13451                 rec( 11, (1, 256), FilePath ),
13452         ], info_str=(FilePath, "Log File: %s", "/%s"))
13453         pkt.Reply(8)
13454         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x9600, 0xfe0d, 0xff01])
13455         # 2222/6A, 106
13456         pkt = NCP(0x6A, "Lock File Set", 'file')
13457         pkt.Request( 9, [
13458                 rec( 7, 2, TimeoutLimit ),
13459         ])
13460         pkt.Reply(8)
13461         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x9600, 0xfe0d, 0xff01])
13462         # 2222/6B, 107
13463         pkt = NCP(0x6B, "Log Logical Record", 'file')
13464         pkt.Request( (11, 266), [
13465                 rec( 7, 1, LockFlag ),
13466                 rec( 8, 2, TimeoutLimit ),
13467                 rec( 10, (1, 256), SynchName ),
13468         ], info_str=(SynchName, "Log Logical Record: %s", ", %s"))
13469         pkt.Reply(8)
13470         pkt.CompletionCodes([0x0000, 0x7f00, 0x9600, 0xfe0d, 0xff01])
13471         # 2222/6C, 108
13472         pkt = NCP(0x6C, "Log Logical Record", 'file')
13473         pkt.Request( 10, [
13474                 rec( 7, 1, LockFlag ),
13475                 rec( 8, 2, TimeoutLimit ),
13476         ])
13477         pkt.Reply(8)
13478         pkt.CompletionCodes([0x0000, 0x7f00, 0x9600, 0xfe0d, 0xff01])
13479         # 2222/6D, 109
13480         pkt = NCP(0x6D, "Log Physical Record", 'file')
13481         pkt.Request(24, [
13482                 rec( 7, 1, LockFlag ),
13483                 rec( 8, 6, FileHandle ),
13484                 rec( 14, 4, LockAreasStartOffset ),
13485                 rec( 18, 4, LockAreaLen ),
13486                 rec( 22, 2, LockTimeout ),
13487         ])
13488         pkt.Reply(8)
13489         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
13490         # 2222/6E, 110
13491         pkt = NCP(0x6E, "Lock Physical Record Set", 'file')
13492         pkt.Request(10, [
13493                 rec( 7, 1, LockFlag ),
13494                 rec( 8, 2, LockTimeout ),
13495         ])
13496         pkt.Reply(8)
13497         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
13498         # 2222/6F00, 111/00
13499         pkt = NCP(0x6F00, "Open/Create a Semaphore", 'file', has_length=0)
13500         pkt.Request((10,521), [
13501                 rec( 8, 1, InitialSemaphoreValue ),
13502                 rec( 9, (1, 512), SemaphoreName ),
13503         ], info_str=(SemaphoreName, "Open/Create Semaphore: %s", ", %s"))
13504         pkt.Reply(13, [
13505                   rec( 8, 4, SemaphoreHandle ),
13506                   rec( 12, 1, SemaphoreOpenCount ),
13507         ])
13508         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
13509         # 2222/6F01, 111/01
13510         pkt = NCP(0x6F01, "Examine Semaphore", 'file', has_length=0)
13511         pkt.Request(12, [
13512                 rec( 8, 4, SemaphoreHandle ),
13513         ])
13514         pkt.Reply(10, [
13515                   rec( 8, 1, SemaphoreValue ),
13516                   rec( 9, 1, SemaphoreOpenCount ),
13517         ])
13518         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
13519         # 2222/6F02, 111/02
13520         pkt = NCP(0x6F02, "Wait On (P) Semaphore", 'file', has_length=0)
13521         pkt.Request(14, [
13522                 rec( 8, 4, SemaphoreHandle ),
13523                 rec( 12, 2, LockTimeout ),
13524         ])
13525         pkt.Reply(8)
13526         pkt.CompletionCodes([0x0000, 0x9600, 0xfe04, 0xff01])
13527         # 2222/6F03, 111/03
13528         pkt = NCP(0x6F03, "Signal (V) Semaphore", 'file', has_length=0)
13529         pkt.Request(12, [
13530                 rec( 8, 4, SemaphoreHandle ),
13531         ])
13532         pkt.Reply(8)
13533         pkt.CompletionCodes([0x0000, 0x9600, 0xfe04, 0xff01])
13534         # 2222/6F04, 111/04
13535         pkt = NCP(0x6F04, "Close Semaphore", 'file', has_length=0)
13536         pkt.Request(12, [
13537                 rec( 8, 4, SemaphoreHandle ),
13538         ])
13539         pkt.Reply(10, [
13540                 rec( 8, 1, SemaphoreOpenCount ),
13541                 rec( 9, 1, SemaphoreShareCount ),
13542         ])
13543         pkt.CompletionCodes([0x0000, 0x9600, 0xfe04, 0xff01])
13544         # 2222/7201, 114/01
13545         pkt = NCP(0x7201, "Timesync Get Time", 'file')
13546         pkt.Request(10)
13547         pkt.Reply(32,[
13548                 rec( 8, 12, theTimeStruct ),
13549                 rec(20, 8, eventOffset ),
13550                 rec(28, 4, eventTime ),
13551         ])                
13552         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13553         # 2222/7202, 114/02
13554         pkt = NCP(0x7202, "Timesync Exchange Time", 'file')
13555         pkt.Request((63,112), [
13556                 rec( 10, 4, protocolFlags ),
13557                 rec( 14, 4, nodeFlags ),
13558                 rec( 18, 8, sourceOriginateTime ),
13559                 rec( 26, 8, targetReceiveTime ),
13560                 rec( 34, 8, targetTransmitTime ),
13561                 rec( 42, 8, sourceReturnTime ),
13562                 rec( 50, 8, eventOffset ),
13563                 rec( 58, 4, eventTime ),
13564                 rec( 62, (1,50), ServerNameLen ),
13565         ], info_str=(ServerNameLen, "Timesync Exchange Time: %s", ", %s"))
13566         pkt.Reply((64,113), [
13567                 rec( 8, 3, Reserved3 ),
13568                 rec( 11, 4, protocolFlags ),
13569                 rec( 15, 4, nodeFlags ),
13570                 rec( 19, 8, sourceOriginateTime ),
13571                 rec( 27, 8, targetReceiveTime ),
13572                 rec( 35, 8, targetTransmitTime ),
13573                 rec( 43, 8, sourceReturnTime ),
13574                 rec( 51, 8, eventOffset ),
13575                 rec( 59, 4, eventTime ),
13576                 rec( 63, (1,50), ServerNameLen ),
13577         ])
13578         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13579         # 2222/7205, 114/05
13580         pkt = NCP(0x7205, "Timesync Get Server List", 'file')
13581         pkt.Request(14, [
13582                 rec( 10, 4, StartNumber ),
13583         ])
13584         pkt.Reply(66, [
13585                 rec( 8, 4, nameType ),
13586                 rec( 12, 48, ServerName ),
13587                 rec( 60, 4, serverListFlags ),
13588                 rec( 64, 2, startNumberFlag ),
13589         ])
13590         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13591         # 2222/7206, 114/06
13592         pkt = NCP(0x7206, "Timesync Set Server List", 'file')
13593         pkt.Request(14, [
13594                 rec( 10, 4, StartNumber ),
13595         ])
13596         pkt.Reply(66, [
13597                 rec( 8, 4, nameType ),
13598                 rec( 12, 48, ServerName ),
13599                 rec( 60, 4, serverListFlags ),
13600                 rec( 64, 2, startNumberFlag ),
13601         ])
13602         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13603         # 2222/720C, 114/12
13604         pkt = NCP(0x720C, "Timesync Get Version", 'file')
13605         pkt.Request(10)
13606         pkt.Reply(12, [
13607                 rec( 8, 4, version ),
13608         ])
13609         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13610         # 2222/7B01, 123/01
13611         pkt = NCP(0x7B01, "Get Cache Information", 'stats')
13612         pkt.Request(12, [
13613                 rec(10, 1, VersionNumber),
13614                 rec(11, 1, RevisionNumber),
13615         ])
13616         pkt.Reply(288, [
13617                 rec(8, 4, CurrentServerTime, LE),
13618                 rec(12, 1, VConsoleVersion ),
13619                 rec(13, 1, VConsoleRevision ),
13620                 rec(14, 2, Reserved2 ),
13621                 rec(16, 104, Counters ),
13622                 rec(120, 40, ExtraCacheCntrs ),
13623                 rec(160, 40, MemoryCounters ),
13624                 rec(200, 48, TrendCounters ),
13625                 rec(248, 40, CacheInfo ),
13626         ])
13627         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xff00])
13628         # 2222/7B02, 123/02
13629         pkt = NCP(0x7B02, "Get File Server Information", 'stats')
13630         pkt.Request(10)
13631         pkt.Reply(150, [
13632                 rec(8, 4, CurrentServerTime ),
13633                 rec(12, 1, VConsoleVersion ),
13634                 rec(13, 1, VConsoleRevision ),
13635                 rec(14, 2, Reserved2 ),
13636                 rec(16, 4, NCPStaInUseCnt ),
13637                 rec(20, 4, NCPPeakStaInUse ),
13638                 rec(24, 4, NumOfNCPReqs ),
13639                 rec(28, 4, ServerUtilization ),
13640                 rec(32, 96, ServerInfo ),
13641                 rec(128, 22, FileServerCounters ),
13642         ])
13643         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13644         # 2222/7B03, 123/03
13645         pkt = NCP(0x7B03, "NetWare File System Information", 'stats')
13646         pkt.Request(11, [
13647                 rec(10, 1, FileSystemID ),
13648         ])
13649         pkt.Reply(68, [
13650                 rec(8, 4, CurrentServerTime ),
13651                 rec(12, 1, VConsoleVersion ),
13652                 rec(13, 1, VConsoleRevision ),
13653                 rec(14, 2, Reserved2 ),
13654                 rec(16, 52, FileSystemInfo ),
13655         ])
13656         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13657         # 2222/7B04, 123/04
13658         pkt = NCP(0x7B04, "User Information", 'stats')
13659         pkt.Request(14, [
13660                 rec(10, 4, ConnectionNumber ),
13661         ])
13662         pkt.Reply((85, 132), [
13663                 rec(8, 4, CurrentServerTime ),
13664                 rec(12, 1, VConsoleVersion ),
13665                 rec(13, 1, VConsoleRevision ),
13666                 rec(14, 2, Reserved2 ),
13667                 rec(16, 68, UserInformation ),
13668                 rec(84, (1, 48), UserName ),
13669         ])
13670         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13671         # 2222/7B05, 123/05
13672         pkt = NCP(0x7B05, "Packet Burst Information", 'stats')
13673         pkt.Request(10)
13674         pkt.Reply(216, [
13675                 rec(8, 4, CurrentServerTime ),
13676                 rec(12, 1, VConsoleVersion ),
13677                 rec(13, 1, VConsoleRevision ),
13678                 rec(14, 2, Reserved2 ),
13679                 rec(16, 200, PacketBurstInformation ),
13680         ])
13681         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13682         # 2222/7B06, 123/06
13683         pkt = NCP(0x7B06, "IPX SPX Information", 'stats')
13684         pkt.Request(10)
13685         pkt.Reply(94, [
13686                 rec(8, 4, CurrentServerTime ),
13687                 rec(12, 1, VConsoleVersion ),
13688                 rec(13, 1, VConsoleRevision ),
13689                 rec(14, 2, Reserved2 ),
13690                 rec(16, 34, IPXInformation ),
13691                 rec(50, 44, SPXInformation ),
13692         ])
13693         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13694         # 2222/7B07, 123/07
13695         pkt = NCP(0x7B07, "Garbage Collection Information", 'stats')
13696         pkt.Request(10)
13697         pkt.Reply(40, [
13698                 rec(8, 4, CurrentServerTime ),
13699                 rec(12, 1, VConsoleVersion ),
13700                 rec(13, 1, VConsoleRevision ),
13701                 rec(14, 2, Reserved2 ),
13702                 rec(16, 4, FailedAllocReqCnt ),
13703                 rec(20, 4, NumberOfAllocs ),
13704                 rec(24, 4, NoMoreMemAvlCnt ),
13705                 rec(28, 4, NumOfGarbageColl ),
13706                 rec(32, 4, FoundSomeMem ),
13707                 rec(36, 4, NumOfChecks ),
13708         ])
13709         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13710         # 2222/7B08, 123/08
13711         pkt = NCP(0x7B08, "CPU Information", 'stats')
13712         pkt.Request(14, [
13713                 rec(10, 4, CPUNumber ),
13714         ])
13715         pkt.Reply(51, [
13716                 rec(8, 4, CurrentServerTime ),
13717                 rec(12, 1, VConsoleVersion ),
13718                 rec(13, 1, VConsoleRevision ),
13719                 rec(14, 2, Reserved2 ),
13720                 rec(16, 4, NumberOfCPUs ),
13721                 rec(20, 31, CPUInformation ),
13722         ])      
13723         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13724         # 2222/7B09, 123/09
13725         pkt = NCP(0x7B09, "Volume Switch Information", 'stats')
13726         pkt.Request(14, [
13727                 rec(10, 4, StartNumber )
13728         ])
13729         pkt.Reply(28, [
13730                 rec(8, 4, CurrentServerTime ),
13731                 rec(12, 1, VConsoleVersion ),
13732                 rec(13, 1, VConsoleRevision ),
13733                 rec(14, 2, Reserved2 ),
13734                 rec(16, 4, TotalLFSCounters ),
13735                 rec(20, 4, CurrentLFSCounters, var="x"),
13736                 rec(24, 4, LFSCounters, repeat="x"),
13737         ])
13738         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13739         # 2222/7B0A, 123/10
13740         pkt = NCP(0x7B0A, "Get NLM Loaded List", 'stats')
13741         pkt.Request(14, [
13742                 rec(10, 4, StartNumber )
13743         ])
13744         pkt.Reply(28, [
13745                 rec(8, 4, CurrentServerTime ),
13746                 rec(12, 1, VConsoleVersion ),
13747                 rec(13, 1, VConsoleRevision ),
13748                 rec(14, 2, Reserved2 ),
13749                 rec(16, 4, NLMcount ),
13750                 rec(20, 4, NLMsInList, var="x" ),
13751                 rec(24, 4, NLMNumbers, repeat="x" ),
13752         ])
13753         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13754         # 2222/7B0B, 123/11
13755         pkt = NCP(0x7B0B, "NLM Information", 'stats')
13756         pkt.Request(14, [
13757                 rec(10, 4, NLMNumber ),
13758         ])
13759         pkt.Reply((79,841), [
13760                 rec(8, 4, CurrentServerTime ),
13761                 rec(12, 1, VConsoleVersion ),
13762                 rec(13, 1, VConsoleRevision ),
13763                 rec(14, 2, Reserved2 ),
13764                 rec(16, 60, NLMInformation ),
13765                 rec(76, (1,255), FileName ),
13766                 rec(-1, (1,255), Name ),
13767                 rec(-1, (1,255), Copyright ),
13768         ])
13769         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13770         # 2222/7B0C, 123/12
13771         pkt = NCP(0x7B0C, "Get Directory Cache Information", 'stats')
13772         pkt.Request(10)
13773         pkt.Reply(72, [
13774                 rec(8, 4, CurrentServerTime ),
13775                 rec(12, 1, VConsoleVersion ),
13776                 rec(13, 1, VConsoleRevision ),
13777                 rec(14, 2, Reserved2 ),
13778                 rec(16, 56, DirCacheInfo ),
13779         ])
13780         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13781         # 2222/7B0D, 123/13
13782         pkt = NCP(0x7B0D, "Get Operating System Version Information", 'stats')
13783         pkt.Request(10)
13784         pkt.Reply(70, [
13785                 rec(8, 4, CurrentServerTime ),
13786                 rec(12, 1, VConsoleVersion ),
13787                 rec(13, 1, VConsoleRevision ),
13788                 rec(14, 2, Reserved2 ),
13789                 rec(16, 1, OSMajorVersion ),
13790                 rec(17, 1, OSMinorVersion ),
13791                 rec(18, 1, OSRevision ),
13792                 rec(19, 1, AccountVersion ),
13793                 rec(20, 1, VAPVersion ),
13794                 rec(21, 1, QueueingVersion ),
13795                 rec(22, 1, SecurityRestrictionVersion ),
13796                 rec(23, 1, InternetBridgeVersion ),
13797                 rec(24, 4, MaxNumOfVol ),
13798                 rec(28, 4, MaxNumOfConn ),
13799                 rec(32, 4, MaxNumOfUsers ),
13800                 rec(36, 4, MaxNumOfNmeSps ),
13801                 rec(40, 4, MaxNumOfLANS ),
13802                 rec(44, 4, MaxNumOfMedias ),
13803                 rec(48, 4, MaxNumOfStacks ),
13804                 rec(52, 4, MaxDirDepth ),
13805                 rec(56, 4, MaxDataStreams ),
13806                 rec(60, 4, MaxNumOfSpoolPr ),
13807                 rec(64, 4, ServerSerialNumber ),
13808                 rec(68, 2, ServerAppNumber ),
13809         ])
13810         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13811         # 2222/7B0E, 123/14
13812         pkt = NCP(0x7B0E, "Get Active Connection List by Type", 'stats')
13813         pkt.Request(15, [
13814                 rec(10, 4, StartConnNumber ),
13815                 rec(14, 1, ConnectionType ),
13816         ])
13817         pkt.Reply(528, [
13818                 rec(8, 4, CurrentServerTime ),
13819                 rec(12, 1, VConsoleVersion ),
13820                 rec(13, 1, VConsoleRevision ),
13821                 rec(14, 2, Reserved2 ),
13822                 rec(16, 512, ActiveConnBitList ),
13823         ])
13824         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfd01, 0xff00])
13825         # 2222/7B0F, 123/15
13826         pkt = NCP(0x7B0F, "Get NLM Resource Tag List", 'stats')
13827         pkt.Request(18, [
13828                 rec(10, 4, NLMNumber ),
13829                 rec(14, 4, NLMStartNumber ),
13830         ])
13831         pkt.Reply(37, [
13832                 rec(8, 4, CurrentServerTime ),
13833                 rec(12, 1, VConsoleVersion ),
13834                 rec(13, 1, VConsoleRevision ),
13835                 rec(14, 2, Reserved2 ),
13836                 rec(16, 4, TtlNumOfRTags ),
13837                 rec(20, 4, CurNumOfRTags ),
13838                 rec(24, 13, RTagStructure ),
13839         ])
13840         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13841         # 2222/7B10, 123/16
13842         pkt = NCP(0x7B10, "Enumerate Connection Information from Connection List", 'stats')
13843         pkt.Request(22, [
13844                 rec(10, 1, EnumInfoMask),
13845                 rec(11, 3, Reserved3),
13846                 rec(14, 4, itemsInList, var="x"),
13847                 rec(18, 4, connList, repeat="x"),
13848         ])
13849         pkt.Reply(NO_LENGTH_CHECK, [
13850                 rec(8, 4, CurrentServerTime ),
13851                 rec(12, 1, VConsoleVersion ),
13852                 rec(13, 1, VConsoleRevision ),
13853                 rec(14, 2, Reserved2 ),
13854                 rec(16, 4, ItemsInPacket ),
13855                 srec(netAddr, req_cond="ncp.enum_info_transport==TRUE"),
13856                 srec(timeInfo, req_cond="ncp.enum_info_time==TRUE"),
13857                 srec(nameInfo, req_cond="ncp.enum_info_name==TRUE"),
13858                 srec(lockInfo, req_cond="ncp.enum_info_lock==TRUE"),
13859                 srec(printInfo, req_cond="ncp.enum_info_print==TRUE"),
13860                 srec(statsInfo, req_cond="ncp.enum_info_stats==TRUE"),
13861                 srec(acctngInfo, req_cond="ncp.enum_info_account==TRUE"),
13862                 srec(authInfo, req_cond="ncp.enum_info_auth==TRUE"),
13863         ])                
13864         pkt.ReqCondSizeVariable()
13865         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13866         # 2222/7B11, 123/17
13867         pkt = NCP(0x7B11, "Enumerate NCP Service Network Addresses", 'stats')
13868         pkt.Request(14, [
13869                 rec(10, 4, SearchNumber ),
13870         ])                
13871         pkt.Reply(60, [
13872                 rec(8, 4, CurrentServerTime ),
13873                 rec(12, 1, VConsoleVersion ),
13874                 rec(13, 1, VConsoleRevision ),
13875                 rec(14, 2, ServerInfoFlags ),
13876                 rec(16, 16, GUID ),
13877                 rec(32, 4, NextSearchNum ),
13878                 rec(36, 4, ItemsInPacket, var="x"), 
13879                 rec(40, 20, NCPNetworkAddress, repeat="x" ),
13880         ])
13881         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13882         # 2222/7B14, 123/20
13883         pkt = NCP(0x7B14, "Active LAN Board List", 'stats')
13884         pkt.Request(14, [
13885                 rec(10, 4, StartNumber ),
13886         ])               
13887         pkt.Reply(28, [
13888                 rec(8, 4, CurrentServerTime ),
13889                 rec(12, 1, VConsoleVersion ),
13890                 rec(13, 1, VConsoleRevision ),
13891                 rec(14, 2, Reserved2 ),
13892                 rec(16, 4, MaxNumOfLANS ),
13893                 rec(20, 4, ItemsInPacket, var="x"),
13894                 rec(24, 4, BoardNumbers, repeat="x"),
13895         ])                
13896         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13897         # 2222/7B15, 123/21
13898         pkt = NCP(0x7B15, "LAN Configuration Information", 'stats')
13899         pkt.Request(14, [
13900                 rec(10, 4, BoardNumber ),
13901         ])                
13902         pkt.Reply(152, [
13903                 rec(8, 4, CurrentServerTime ),
13904                 rec(12, 1, VConsoleVersion ),
13905                 rec(13, 1, VConsoleRevision ),
13906                 rec(14, 2, Reserved2 ),
13907                 rec(16,136, LANConfigInfo ),
13908         ])                
13909         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13910         # 2222/7B16, 123/22
13911         pkt = NCP(0x7B16, "LAN Common Counters Information", 'stats')
13912         pkt.Request(18, [
13913                 rec(10, 4, BoardNumber ),
13914                 rec(14, 4, BlockNumber ),
13915         ])                
13916         pkt.Reply(86, [
13917                 rec(8, 4, CurrentServerTime ),
13918                 rec(12, 1, VConsoleVersion ),
13919                 rec(13, 1, VConsoleRevision ),
13920                 rec(14, 1, StatMajorVersion ),
13921                 rec(15, 1, StatMinorVersion ),
13922                 rec(16, 4, TotalCommonCnts ),
13923                 rec(20, 4, TotalCntBlocks ),
13924                 rec(24, 4, CustomCounters ),
13925                 rec(28, 4, NextCntBlock ),
13926                 rec(32, 54, CommonLanStruc ),
13927         ])                
13928         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13929         # 2222/7B17, 123/23
13930         pkt = NCP(0x7B17, "LAN Custom Counters Information", 'stats')
13931         pkt.Request(18, [
13932                 rec(10, 4, BoardNumber ),
13933                 rec(14, 4, StartNumber ),
13934         ])                
13935         pkt.Reply(25, [
13936                 rec(8, 4, CurrentServerTime ),
13937                 rec(12, 1, VConsoleVersion ),
13938                 rec(13, 1, VConsoleRevision ),
13939                 rec(14, 2, Reserved2 ),
13940                 rec(16, 4, NumOfCCinPkt, var="x"),
13941                 rec(20, 5, CustomCntsInfo, repeat="x"),
13942         ])                
13943         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13944         # 2222/7B18, 123/24
13945         pkt = NCP(0x7B18, "LAN Name Information", 'stats')
13946         pkt.Request(14, [
13947                 rec(10, 4, BoardNumber ),
13948         ])                
13949         pkt.Reply(19, [
13950                 rec(8, 4, CurrentServerTime ),
13951                 rec(12, 1, VConsoleVersion ),
13952                 rec(13, 1, VConsoleRevision ),
13953                 rec(14, 2, Reserved2 ),
13954                 rec(16, 3, BoardNameStruct ),
13955         ])
13956         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13957         # 2222/7B19, 123/25
13958         pkt = NCP(0x7B19, "LSL Information", 'stats')
13959         pkt.Request(10)
13960         pkt.Reply(90, [
13961                 rec(8, 4, CurrentServerTime ),
13962                 rec(12, 1, VConsoleVersion ),
13963                 rec(13, 1, VConsoleRevision ),
13964                 rec(14, 2, Reserved2 ),
13965                 rec(16, 74, LSLInformation ),
13966         ])                
13967         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13968         # 2222/7B1A, 123/26
13969         pkt = NCP(0x7B1A, "LSL Logical Board Statistics", 'stats')
13970         pkt.Request(14, [
13971                 rec(10, 4, BoardNumber ),
13972         ])                
13973         pkt.Reply(28, [
13974                 rec(8, 4, CurrentServerTime ),
13975                 rec(12, 1, VConsoleVersion ),
13976                 rec(13, 1, VConsoleRevision ),
13977                 rec(14, 2, Reserved2 ),
13978                 rec(16, 4, LogTtlTxPkts ),
13979                 rec(20, 4, LogTtlRxPkts ),
13980                 rec(24, 4, UnclaimedPkts ),
13981         ])                
13982         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13983         # 2222/7B1B, 123/27
13984         pkt = NCP(0x7B1B, "MLID Board Information", 'stats')
13985         pkt.Request(14, [
13986                 rec(10, 4, BoardNumber ),
13987         ])                
13988         pkt.Reply(44, [
13989                 rec(8, 4, CurrentServerTime ),
13990                 rec(12, 1, VConsoleVersion ),
13991                 rec(13, 1, VConsoleRevision ),
13992                 rec(14, 1, Reserved ),
13993                 rec(15, 1, NumberOfProtocols ),
13994                 rec(16, 28, MLIDBoardInfo ),
13995         ])                        
13996         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13997         # 2222/7B1E, 123/30
13998         pkt = NCP(0x7B1E, "Get Media Manager Object Information", 'stats')
13999         pkt.Request(14, [
14000                 rec(10, 4, ObjectNumber ),
14001         ])                
14002         pkt.Reply(212, [
14003                 rec(8, 4, CurrentServerTime ),
14004                 rec(12, 1, VConsoleVersion ),
14005                 rec(13, 1, VConsoleRevision ),
14006                 rec(14, 2, Reserved2 ),
14007                 rec(16, 196, GenericInfoDef ),
14008         ])                
14009         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14010         # 2222/7B1F, 123/31
14011         pkt = NCP(0x7B1F, "Get Media Manager Objects List", 'stats')
14012         pkt.Request(15, [
14013                 rec(10, 4, StartNumber ),
14014                 rec(14, 1, MediaObjectType ),
14015         ])                
14016         pkt.Reply(28, [
14017                 rec(8, 4, CurrentServerTime ),
14018                 rec(12, 1, VConsoleVersion ),
14019                 rec(13, 1, VConsoleRevision ),
14020                 rec(14, 2, Reserved2 ),
14021                 rec(16, 4, nextStartingNumber ),
14022                 rec(20, 4, ObjectCount, var="x"),
14023                 rec(24, 4, ObjectID, repeat="x"),
14024         ])                
14025         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14026         # 2222/7B20, 123/32
14027         pkt = NCP(0x7B20, "Get Media Manager Object Childrens List", 'stats')
14028         pkt.Request(22, [
14029                 rec(10, 4, StartNumber ),
14030                 rec(14, 1, MediaObjectType ),
14031                 rec(15, 3, Reserved3 ),
14032                 rec(18, 4, ParentObjectNumber ),
14033         ])                
14034         pkt.Reply(28, [
14035                 rec(8, 4, CurrentServerTime ),
14036                 rec(12, 1, VConsoleVersion ),
14037                 rec(13, 1, VConsoleRevision ),
14038                 rec(14, 2, Reserved2 ),
14039                 rec(16, 4, nextStartingNumber ),
14040                 rec(20, 4, ObjectCount, var="x" ),
14041                 rec(24, 4, ObjectID, repeat="x" ),
14042         ])                
14043         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14044         # 2222/7B21, 123/33
14045         pkt = NCP(0x7B21, "Get Volume Segment List", 'stats')
14046         pkt.Request(14, [
14047                 rec(10, 4, VolumeNumberLong ),
14048         ])                
14049         pkt.Reply(32, [
14050                 rec(8, 4, CurrentServerTime ),
14051                 rec(12, 1, VConsoleVersion ),
14052                 rec(13, 1, VConsoleRevision ),
14053                 rec(14, 2, Reserved2 ),
14054                 rec(16, 4, NumOfSegments, var="x" ),
14055                 rec(20, 12, Segments, repeat="x" ),
14056         ])                
14057         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14058         # 2222/7B22, 123/34
14059         pkt = NCP(0x7B22, "Get Volume Information by Level", 'stats')
14060         pkt.Request(15, [
14061                 rec(10, 4, VolumeNumberLong ),
14062                 rec(14, 1, InfoLevelNumber ),
14063         ])                
14064         pkt.Reply(NO_LENGTH_CHECK, [
14065                 rec(8, 4, CurrentServerTime ),
14066                 rec(12, 1, VConsoleVersion ),
14067                 rec(13, 1, VConsoleRevision ),
14068                 rec(14, 2, Reserved2 ),
14069                 rec(16, 1, InfoLevelNumber ),
14070                 rec(17, 3, Reserved3 ),
14071                 srec(VolInfoStructure, req_cond="ncp.info_level_num==0x01"),
14072                 srec(VolInfo2Struct, req_cond="ncp.info_level_num==0x02"),
14073         ])                
14074         pkt.ReqCondSizeVariable()
14075         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14076         # 2222/7B28, 123/40
14077         pkt = NCP(0x7B28, "Active Protocol Stacks", 'stats')
14078         pkt.Request(14, [
14079                 rec(10, 4, StartNumber ),
14080         ])                
14081         pkt.Reply(48, [
14082                 rec(8, 4, CurrentServerTime ),
14083                 rec(12, 1, VConsoleVersion ),
14084                 rec(13, 1, VConsoleRevision ),
14085                 rec(14, 2, Reserved2 ),
14086                 rec(16, 4, MaxNumOfLANS ),
14087                 rec(20, 4, StackCount, var="x" ),
14088                 rec(24, 4, nextStartingNumber ),
14089                 rec(28, 20, StackInfo, repeat="x" ),
14090         ])                
14091         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14092         # 2222/7B29, 123/41
14093         pkt = NCP(0x7B29, "Get Protocol Stack Configuration Information", 'stats')
14094         pkt.Request(14, [
14095                 rec(10, 4, StackNumber ),
14096         ])                
14097         pkt.Reply((37,164), [
14098                 rec(8, 4, CurrentServerTime ),
14099                 rec(12, 1, VConsoleVersion ),
14100                 rec(13, 1, VConsoleRevision ),
14101                 rec(14, 2, Reserved2 ),
14102                 rec(16, 1, ConfigMajorVN ),
14103                 rec(17, 1, ConfigMinorVN ),
14104                 rec(18, 1, StackMajorVN ),
14105                 rec(19, 1, StackMinorVN ),
14106                 rec(20, 16, ShortStkName ),
14107                 rec(36, (1,128), StackFullNameStr ),
14108         ])                
14109         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14110         # 2222/7B2A, 123/42
14111         pkt = NCP(0x7B2A, "Get Protocol Stack Statistics Information", 'stats')
14112         pkt.Request(14, [
14113                 rec(10, 4, StackNumber ),
14114         ])                
14115         pkt.Reply(38, [
14116                 rec(8, 4, CurrentServerTime ),
14117                 rec(12, 1, VConsoleVersion ),
14118                 rec(13, 1, VConsoleRevision ),
14119                 rec(14, 2, Reserved2 ),
14120                 rec(16, 1, StatMajorVersion ),
14121                 rec(17, 1, StatMinorVersion ),
14122                 rec(18, 2, ComCnts ),
14123                 rec(20, 4, CounterMask ),
14124                 rec(24, 4, TotalTxPkts ),
14125                 rec(28, 4, TotalRxPkts ),
14126                 rec(32, 4, IgnoredRxPkts ),
14127                 rec(36, 2, CustomCnts ),
14128         ])                
14129         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14130         # 2222/7B2B, 123/43
14131         pkt = NCP(0x7B2B, "Get Protocol Stack Custom Information", 'stats')
14132         pkt.Request(18, [
14133                 rec(10, 4, StackNumber ),
14134                 rec(14, 4, StartNumber ),
14135         ])                
14136         pkt.Reply(25, [
14137                 rec(8, 4, CurrentServerTime ),
14138                 rec(12, 1, VConsoleVersion ),
14139                 rec(13, 1, VConsoleRevision ),
14140                 rec(14, 2, Reserved2 ),
14141                 rec(16, 4, CustomCount, var="x" ),
14142                 rec(20, 5, CustomCntsInfo, repeat="x" ),
14143         ])                
14144         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14145         # 2222/7B2C, 123/44
14146         pkt = NCP(0x7B2C, "Get Protocol Stack Numbers by Media Number", 'stats')
14147         pkt.Request(14, [
14148                 rec(10, 4, MediaNumber ),
14149         ])                
14150         pkt.Reply(24, [
14151                 rec(8, 4, CurrentServerTime ),
14152                 rec(12, 1, VConsoleVersion ),
14153                 rec(13, 1, VConsoleRevision ),
14154                 rec(14, 2, Reserved2 ),
14155                 rec(16, 4, StackCount, var="x" ),
14156                 rec(20, 4, StackNumber, repeat="x" ),
14157         ])                
14158         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14159         # 2222/7B2D, 123/45
14160         pkt = NCP(0x7B2D, "Get Protocol Stack Numbers by LAN Board Number", 'stats')
14161         pkt.Request(14, [
14162                 rec(10, 4, BoardNumber ),
14163         ])                
14164         pkt.Reply(24, [
14165                 rec(8, 4, CurrentServerTime ),
14166                 rec(12, 1, VConsoleVersion ),
14167                 rec(13, 1, VConsoleRevision ),
14168                 rec(14, 2, Reserved2 ),
14169                 rec(16, 4, StackCount, var="x" ),
14170                 rec(20, 4, StackNumber, repeat="x" ),
14171         ])                
14172         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14173         # 2222/7B2E, 123/46
14174         pkt = NCP(0x7B2E, "Get Media Name by Media Number", 'stats')
14175         pkt.Request(14, [
14176                 rec(10, 4, MediaNumber ),
14177         ])                
14178         pkt.Reply((17,144), [
14179                 rec(8, 4, CurrentServerTime ),
14180                 rec(12, 1, VConsoleVersion ),
14181                 rec(13, 1, VConsoleRevision ),
14182                 rec(14, 2, Reserved2 ),
14183                 rec(16, (1,128), MediaName ),
14184         ])                
14185         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14186         # 2222/7B2F, 123/47
14187         pkt = NCP(0x7B2F, "Get Loaded Media Number", 'stats')
14188         pkt.Request(10)
14189         pkt.Reply(28, [
14190                 rec(8, 4, CurrentServerTime ),
14191                 rec(12, 1, VConsoleVersion ),
14192                 rec(13, 1, VConsoleRevision ),
14193                 rec(14, 2, Reserved2 ),
14194                 rec(16, 4, MaxNumOfMedias ),
14195                 rec(20, 4, MediaListCount, var="x" ),
14196                 rec(24, 4, MediaList, repeat="x" ),
14197         ])                
14198         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14199         # 2222/7B32, 123/50
14200         pkt = NCP(0x7B32, "Get General Router and SAP Information", 'stats')
14201         pkt.Request(10)
14202         pkt.Reply(37, [
14203                 rec(8, 4, CurrentServerTime ),
14204                 rec(12, 1, VConsoleVersion ),
14205                 rec(13, 1, VConsoleRevision ),
14206                 rec(14, 2, Reserved2 ),
14207                 rec(16, 2, RIPSocketNumber ),
14208                 rec(18, 2, Reserved2 ),
14209                 rec(20, 1, RouterDownFlag ),
14210                 rec(21, 3, Reserved3 ),
14211                 rec(24, 1, TrackOnFlag ),
14212                 rec(25, 3, Reserved3 ),
14213                 rec(28, 1, ExtRouterActiveFlag ),
14214                 rec(29, 3, Reserved3 ),
14215                 rec(32, 2, SAPSocketNumber ),
14216                 rec(34, 2, Reserved2 ),
14217                 rec(36, 1, RpyNearestSrvFlag ),
14218         ])                
14219         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14220         # 2222/7B33, 123/51
14221         pkt = NCP(0x7B33, "Get Network Router Information", 'stats')
14222         pkt.Request(14, [
14223                 rec(10, 4, NetworkNumber ),
14224         ])                
14225         pkt.Reply(26, [
14226                 rec(8, 4, CurrentServerTime ),
14227                 rec(12, 1, VConsoleVersion ),
14228                 rec(13, 1, VConsoleRevision ),
14229                 rec(14, 2, Reserved2 ),
14230                 rec(16, 10, KnownRoutes ),
14231         ])                
14232         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
14233         # 2222/7B34, 123/52
14234         pkt = NCP(0x7B34, "Get Network Routers Information", 'stats')
14235         pkt.Request(18, [
14236                 rec(10, 4, NetworkNumber),
14237                 rec(14, 4, StartNumber ),
14238         ])                
14239         pkt.Reply(34, [
14240                 rec(8, 4, CurrentServerTime ),
14241                 rec(12, 1, VConsoleVersion ),
14242                 rec(13, 1, VConsoleRevision ),
14243                 rec(14, 2, Reserved2 ),
14244                 rec(16, 4, NumOfEntries, var="x" ),
14245                 rec(20, 14, RoutersInfo, repeat="x" ),
14246         ])                
14247         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
14248         # 2222/7B35, 123/53
14249         pkt = NCP(0x7B35, "Get Known Networks Information", 'stats')
14250         pkt.Request(14, [
14251                 rec(10, 4, StartNumber ),
14252         ])                
14253         pkt.Reply(30, [
14254                 rec(8, 4, CurrentServerTime ),
14255                 rec(12, 1, VConsoleVersion ),
14256                 rec(13, 1, VConsoleRevision ),
14257                 rec(14, 2, Reserved2 ),
14258                 rec(16, 4, NumOfEntries, var="x" ),
14259                 rec(20, 10, KnownRoutes, repeat="x" ),
14260         ])                
14261         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14262         # 2222/7B36, 123/54
14263         pkt = NCP(0x7B36, "Get Server Information", 'stats')
14264         pkt.Request((15,64), [
14265                 rec(10, 2, ServerType ),
14266                 rec(12, 2, Reserved2 ),
14267                 rec(14, (1,50), ServerNameLen ),
14268         ], info_str=(ServerNameLen, "Get Server Information: %s", ", %s"))
14269         pkt.Reply(30, [
14270                 rec(8, 4, CurrentServerTime ),
14271                 rec(12, 1, VConsoleVersion ),
14272                 rec(13, 1, VConsoleRevision ),
14273                 rec(14, 2, Reserved2 ),
14274                 rec(16, 12, ServerAddress ),
14275                 rec(28, 2, HopsToNet ),
14276         ])                
14277         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14278         # 2222/7B37, 123/55
14279         pkt = NCP(0x7B37, "Get Server Sources Information", 'stats')
14280         pkt.Request((19,68), [
14281                 rec(10, 4, StartNumber ),
14282                 rec(14, 2, ServerType ),
14283                 rec(16, 2, Reserved2 ),
14284                 rec(18, (1,50), ServerNameLen ),
14285         ], info_str=(ServerNameLen, "Get Server Sources Info: %s", ", %s"))                
14286         pkt.Reply(32, [
14287                 rec(8, 4, CurrentServerTime ),
14288                 rec(12, 1, VConsoleVersion ),
14289                 rec(13, 1, VConsoleRevision ),
14290                 rec(14, 2, Reserved2 ),
14291                 rec(16, 4, NumOfEntries, var="x" ),
14292                 rec(20, 12, ServersSrcInfo, repeat="x" ),
14293         ])                
14294         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
14295         # 2222/7B38, 123/56
14296         pkt = NCP(0x7B38, "Get Known Servers Information", 'stats')
14297         pkt.Request(16, [
14298                 rec(10, 4, StartNumber ),
14299                 rec(14, 2, ServerType ),
14300         ])                
14301         pkt.Reply(35, [
14302                 rec(8, 4, CurrentServerTime ),
14303                 rec(12, 1, VConsoleVersion ),
14304                 rec(13, 1, VConsoleRevision ),
14305                 rec(14, 2, Reserved2 ),
14306                 rec(16, 4, NumOfEntries, var="x" ),
14307                 rec(20, 15, KnownServStruc, repeat="x" ),
14308         ])                
14309         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
14310         # 2222/7B3C, 123/60
14311         pkt = NCP(0x7B3C, "Get Server Set Commands Information", 'stats')
14312         pkt.Request(14, [
14313                 rec(10, 4, StartNumber ),
14314         ])                
14315         pkt.Reply(NO_LENGTH_CHECK, [
14316                 rec(8, 4, CurrentServerTime ),
14317                 rec(12, 1, VConsoleVersion ),
14318                 rec(13, 1, VConsoleRevision ),
14319                 rec(14, 2, Reserved2 ),
14320                 rec(16, 4, TtlNumOfSetCmds ),
14321                 rec(20, 4, nextStartingNumber ),
14322                 rec(24, 1, SetCmdType ),
14323                 rec(25, 3, Reserved3 ),
14324                 rec(28, 1, SetCmdCategory ),
14325                 rec(29, 3, Reserved3 ),
14326                 rec(32, 1, SetCmdFlags ),
14327                 rec(33, 3, Reserved3 ),
14328                 rec(36, 100, SetCmdName ),
14329                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x00"),
14330                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x01"),
14331                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x02"),
14332                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x04"),
14333                 srec(SetCmdValueString, req_cond="ncp.set_cmd_type==0x05"),
14334                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x06"),
14335                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x07"),
14336         ])                
14337         pkt.ReqCondSizeVariable()
14338         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14339         # 2222/7B3D, 123/61
14340         pkt = NCP(0x7B3D, "Get Server Set Categories", 'stats')
14341         pkt.Request(14, [
14342                 rec(10, 4, StartNumber ),
14343         ])                
14344         pkt.Reply(124, [
14345                 rec(8, 4, CurrentServerTime ),
14346                 rec(12, 1, VConsoleVersion ),
14347                 rec(13, 1, VConsoleRevision ),
14348                 rec(14, 2, Reserved2 ),
14349                 rec(16, 4, NumberOfSetCategories ),
14350                 rec(20, 4, nextStartingNumber ),
14351                 rec(24, 100, CategoryName ),
14352         ])                
14353         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14354         # 2222/7B3E, 123/62
14355         pkt = NCP(0x7B3E, "Get Server Set Commands Information By Name", 'stats')
14356         pkt.Request(110, [
14357                 rec(10, 100, SetParmName ),
14358         ], info_str=(SetParmName, "Get Server Set Command Info for: %s", ", %s"))                
14359         pkt.Reply(NO_LENGTH_CHECK, [
14360                 rec(8, 4, CurrentServerTime ),
14361                 rec(12, 1, VConsoleVersion ),
14362                 rec(13, 1, VConsoleRevision ),
14363                 rec(14, 2, Reserved2 ),
14364                 rec(16, 4, TtlNumOfSetCmds ),
14365                 rec(20, 4, nextStartingNumber ),
14366                 rec(24, 1, SetCmdType ),
14367                 rec(25, 3, Reserved3 ),
14368                 rec(28, 1, SetCmdCategory ),
14369                 rec(29, 3, Reserved3 ),
14370                 rec(32, 1, SetCmdFlags ),
14371                 rec(33, 3, Reserved3 ),
14372                 rec(36, 100, SetCmdName ),
14373                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x00"),
14374                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x01"),
14375                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x02"),
14376                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x04"),
14377                 srec(SetCmdValueString, req_cond="ncp.set_cmd_type==0x05"),
14378                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x06"),
14379                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x07"),
14380         ])                
14381         pkt.ReqCondSizeVariable()
14382         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14383         # 2222/7B46, 123/70
14384         pkt = NCP(0x7B46, "Get Current Compressing File", 'stats')
14385         pkt.Request(14, [
14386                 rec(10, 4, VolumeNumberLong ),
14387         ])                
14388         pkt.Reply(56, [
14389                 rec(8, 4, ParentID ),
14390                 rec(12, 4, DirectoryEntryNumber ),
14391                 rec(16, 4, compressionStage ),
14392                 rec(20, 4, ttlIntermediateBlks ),
14393                 rec(24, 4, ttlCompBlks ),
14394                 rec(28, 4, curIntermediateBlks ),
14395                 rec(32, 4, curCompBlks ),
14396                 rec(36, 4, curInitialBlks ),
14397                 rec(40, 4, fileFlags ),
14398                 rec(44, 4, projectedCompSize ),
14399                 rec(48, 4, originalSize ),
14400                 rec(52, 4, compressVolume ),
14401         ])                
14402         pkt.CompletionCodes([0x0000, 0x7e00, 0x7901, 0xfb06, 0xff00])
14403         # 2222/7B47, 123/71
14404         pkt = NCP(0x7B47, "Get Current DeCompressing File Info List", 'stats')
14405         pkt.Request(14, [
14406                 rec(10, 4, VolumeNumberLong ),
14407         ])                
14408         pkt.Reply(28, [
14409                 rec(8, 4, FileListCount ),
14410                 rec(12, 16, FileInfoStruct ),
14411         ])                
14412         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
14413         # 2222/7B48, 123/72
14414         pkt = NCP(0x7B48, "Get Compression and Decompression Time and Counts", 'stats')
14415         pkt.Request(14, [
14416                 rec(10, 4, VolumeNumberLong ),
14417         ])                
14418         pkt.Reply(64, [
14419                 rec(8, 56, CompDeCompStat ),
14420         ])
14421         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
14422         # 2222/8301, 131/01
14423         pkt = NCP(0x8301, "RPC Load an NLM", 'fileserver')
14424         pkt.Request(285, [
14425                 rec(10, 4, NLMLoadOptions ),
14426                 rec(14, 16, Reserved16 ),
14427                 rec(30, 255, PathAndName ),
14428         ], info_str=(PathAndName, "RPC Load NLM: %s", ", %s"))                
14429         pkt.Reply(12, [
14430                 rec(8, 4, RPCccode ),
14431         ])                
14432         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14433         # 2222/8302, 131/02
14434         pkt = NCP(0x8302, "RPC Unload an NLM", 'fileserver')
14435         pkt.Request(100, [
14436                 rec(10, 20, Reserved20 ),
14437                 rec(30, 70, NLMName ),
14438         ], info_str=(NLMName, "RPC Unload NLM: %s", ", %s"))                
14439         pkt.Reply(12, [
14440                 rec(8, 4, RPCccode ),
14441         ])                
14442         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14443         # 2222/8303, 131/03
14444         pkt = NCP(0x8303, "RPC Mount Volume", 'fileserver')
14445         pkt.Request(100, [
14446                 rec(10, 20, Reserved20 ),
14447                 rec(30, 70, VolumeNameStringz ),
14448         ], info_str=(VolumeNameStringz, "RPC Mount Volume: %s", ", %s"))                
14449         pkt.Reply(32, [
14450                 rec(8, 4, RPCccode),
14451                 rec(12, 16, Reserved16 ),
14452                 rec(28, 4, VolumeNumberLong ),
14453         ])                
14454         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14455         # 2222/8304, 131/04
14456         pkt = NCP(0x8304, "RPC Dismount Volume", 'fileserver')
14457         pkt.Request(100, [
14458                 rec(10, 20, Reserved20 ),
14459                 rec(30, 70, VolumeNameStringz ),
14460         ], info_str=(VolumeNameStringz, "RPC Dismount Volume: %s", ", %s"))                
14461         pkt.Reply(12, [
14462                 rec(8, 4, RPCccode ), 
14463         ])                
14464         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14465         # 2222/8305, 131/05
14466         pkt = NCP(0x8305, "RPC Add Name Space To Volume", 'fileserver')
14467         pkt.Request(100, [
14468                 rec(10, 20, Reserved20 ),
14469                 rec(30, 70, AddNameSpaceAndVol ),
14470         ], info_str=(AddNameSpaceAndVol, "RPC Add Name Space to Volume: %s", ", %s"))                
14471         pkt.Reply(12, [
14472                 rec(8, 4, RPCccode ),
14473         ])                
14474         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14475         # 2222/8306, 131/06
14476         pkt = NCP(0x8306, "RPC Set Command Value", 'fileserver')
14477         pkt.Request(100, [
14478                 rec(10, 1, SetCmdType ),
14479                 rec(11, 3, Reserved3 ),
14480                 rec(14, 4, SetCmdValueNum ),
14481                 rec(18, 12, Reserved12 ),
14482                 rec(30, 70, SetCmdName ),
14483         ], info_str=(SetCmdName, "RPC Set Command Value: %s", ", %s"))                
14484         pkt.Reply(12, [
14485                 rec(8, 4, RPCccode ),
14486         ])                
14487         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14488         # 2222/8307, 131/07
14489         pkt = NCP(0x8307, "RPC Execute NCF File", 'fileserver')
14490         pkt.Request(285, [
14491                 rec(10, 20, Reserved20 ),
14492                 rec(30, 255, PathAndName ),
14493         ], info_str=(PathAndName, "RPC Execute NCF File: %s", ", %s"))                
14494         pkt.Reply(12, [
14495                 rec(8, 4, RPCccode ),
14496         ])                
14497         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14498 if __name__ == '__main__':
14499 #       import profile
14500 #       filename = "ncp.pstats"
14501 #       profile.run("main()", filename)
14502 #
14503 #       import pstats
14504 #       sys.stdout = msg
14505 #       p = pstats.Stats(filename)
14506 #
14507 #       print "Stats sorted by cumulative time"
14508 #       p.strip_dirs().sort_stats('cumulative').print_stats()
14509 #
14510 #       print "Function callees"
14511 #       p.print_callees()
14512         main()