Minor spelling etc updates.
[metze/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.40 2002/12/02 23:43:25 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 ##############################################################################
1169 # NCP Field Types. Defined in Appendix A of "Programmer's Guide..."
1170 ##############################################################################
1171 AbortQueueFlag                  = val_string8("abort_q_flag", "Abort Queue Flag", [
1172         [ 0x00, "Place at End of Queue" ],
1173         [ 0x01, "Do Not Place Spool File, Examine Flags" ],
1174 ])
1175 AcceptedMaxSize                 = uint16("accepted_max_size", "Accepted Max Size")
1176 AccessControl                   = val_string8("access_control", "Access Control", [
1177         [ 0x00, "Open for read by this client" ],
1178         [ 0x01, "Open for write by this client" ],
1179         [ 0x02, "Deny read requests from other stations" ],
1180         [ 0x03, "Deny write requests from other stations" ],
1181         [ 0x04, "File detached" ],
1182         [ 0x05, "TTS holding detach" ],
1183         [ 0x06, "TTS holding open" ],
1184 ])
1185 AccessDate                      = uint16("access_date", "Access Date")
1186 AccessDate.NWDate()
1187 AccessMode                      = bitfield8("access_mode", "Access Mode", [
1188         bf_boolean8(0x01, "acc_mode_read", "Read Access"),
1189         bf_boolean8(0x02, "acc_mode_write", "Write Access"),
1190         bf_boolean8(0x04, "acc_mode_deny_read", "Deny Read Access"),
1191         bf_boolean8(0x08, "acc_mode_deny_write", "Deny Write Access"),
1192         bf_boolean8(0x10, "acc_mode_comp", "Compatibility Mode"),
1193 ])
1194 AccessPrivileges                = bitfield8("access_privileges", "Access Privileges", [
1195         bf_boolean8(0x01, "acc_priv_read", "Read Privileges (files only)"),
1196         bf_boolean8(0x02, "acc_priv_write", "Write Privileges (files only)"),
1197         bf_boolean8(0x04, "acc_priv_open", "Open Privileges (files only)"),
1198         bf_boolean8(0x08, "acc_priv_create", "Create Privileges (files only)"),
1199         bf_boolean8(0x10, "acc_priv_delete", "Delete Privileges (files only)"),
1200         bf_boolean8(0x20, "acc_priv_parent", "Parental Privileges (directories only for creating, deleting, and renaming)"),
1201         bf_boolean8(0x40, "acc_priv_search", "Search Privileges (directories only)"),
1202         bf_boolean8(0x80, "acc_priv_modify", "Modify File Status Flags Privileges (files and directories)"),
1203 ])
1204 AccessRightsMask                = bitfield8("access_rights_mask", "Access Rights", [
1205         bf_boolean8(0x0001, "acc_rights_read", "Read Rights"),
1206         bf_boolean8(0x0002, "acc_rights_write", "Write Rights"),
1207         bf_boolean8(0x0004, "acc_rights_open", "Open Rights"),
1208         bf_boolean8(0x0008, "acc_rights_create", "Create Rights"),
1209         bf_boolean8(0x0010, "acc_rights_delete", "Delete Rights"),
1210         bf_boolean8(0x0020, "acc_rights_parent", "Parental Rights"),
1211         bf_boolean8(0x0040, "acc_rights_search", "Search Rights"),
1212         bf_boolean8(0x0080, "acc_rights_modify", "Modify Rights"),
1213 ])
1214 AccessRightsMaskWord            = bitfield16("access_rights_mask_word", "Access Rights", [
1215         bf_boolean16(0x0001, "acc_rights1_read", "Read Rights"),
1216         bf_boolean16(0x0002, "acc_rights1_write", "Write Rights"),
1217         bf_boolean16(0x0004, "acc_rights1_open", "Open Rights"),
1218         bf_boolean16(0x0008, "acc_rights1_create", "Create Rights"),
1219         bf_boolean16(0x0010, "acc_rights1_delete", "Delete Rights"),
1220         bf_boolean16(0x0020, "acc_rights1_parent", "Parental Rights"),
1221         bf_boolean16(0x0040, "acc_rights1_search", "Search Rights"),
1222         bf_boolean16(0x0080, "acc_rights1_modify", "Modify Rights"),
1223         bf_boolean16(0x0100, "acc_rights1_supervisor", "Supervisor Access Rights"),
1224 ])
1225 AccountBalance                  = uint32("account_balance", "Account Balance")
1226 AccountVersion                  = uint8("acct_version", "Acct Version")
1227 ActionFlag                      = bitfield8("action_flag", "Action Flag", [
1228         bf_boolean8(0x01, "act_flag_open", "Open"),
1229         bf_boolean8(0x02, "act_flag_replace", "Replace"),
1230         bf_boolean8(0x10, "act_flag_create", "Create"),
1231 ])
1232 ActiveConnBitList               = fw_string("active_conn_bit_list", "Active Connection List", 512)
1233 ActiveIndexedFiles              = uint16("active_indexed_files", "Active Indexed Files")
1234 ActualMaxBinderyObjects         = uint16("actual_max_bindery_objects", "Actual Max Bindery Objects")
1235 ActualMaxIndexedFiles           = uint16("actual_max_indexed_files", "Actual Max Indexed Files")
1236 ActualMaxOpenFiles              = uint16("actual_max_open_files", "Actual Max Open Files")
1237 ActualMaxSimultaneousTransactions = uint16("actual_max_sim_trans", "Actual Max Simultaneous Transactions")
1238 ActualMaxUsedDirectoryEntries   = uint16("actual_max_used_directory_entries", "Actual Max Used Directory Entries")
1239 ActualMaxUsedRoutingBuffers     = uint16("actual_max_used_routing_buffers", "Actual Max Used Routing Buffers")
1240 ActualResponseCount             = uint16("actual_response_count", "Actual Response Count")
1241 AddNameSpaceAndVol              = stringz("add_nm_spc_and_vol", "Add Name Space and Volume")
1242 AFPEntryID                      = uint32("afp_entry_id", "AFP Entry ID", BE)
1243 AFPEntryID.Display("BASE_HEX")
1244 AllocAvailByte                  = uint32("alloc_avail_byte", "Bytes Available for Allocation")
1245 AllocateMode                    = val_string16("allocate_mode", "Allocate Mode", [
1246         [ 0x0000, "Permanent Directory Handle" ],
1247         [ 0x0001, "Temporary Directory Handle" ],
1248         [ 0x0002, "Special Temporary Directory Handle" ],
1249 ])
1250 AllocationBlockSize             = uint32("allocation_block_size", "Allocation Block Size")
1251 AllocFreeCount                  = uint32("alloc_free_count", "Reclaimable Free Bytes")
1252 ApplicationNumber               = uint16("application_number", "Application Number")
1253 ArchivedTime                    = uint16("archived_time", "Archived Time")
1254 ArchivedTime.NWTime()
1255 ArchivedDate                    = uint16("archived_date", "Archived Date")
1256 ArchivedDate.NWDate()
1257 ArchiverID                      = uint32("archiver_id", "Archiver ID", BE)
1258 ArchiverID.Display("BASE_HEX")
1259 AssociatedNameSpace             = uint8("associated_name_space", "Associated Name Space")
1260 AttachDuringProcessing          = uint16("attach_during_processing", "Attach During Processing")
1261 AttachedIndexedFiles            = uint8("attached_indexed_files", "Attached Indexed Files")
1262 AttachWhileProcessingAttach     = uint16("attach_while_processing_attach", "Attach While Processing Attach")
1263 Attributes                      = uint32("attributes", "Attributes")
1264 AttributesDef                   = bitfield8("attr_def", "Attributes", [
1265         bf_boolean8(0x01, "att_def_ro", "Read Only"),
1266         bf_boolean8(0x02, "att_def_hidden", "Hidden"),
1267         bf_boolean8(0x04, "att_def_system", "System"),
1268         bf_boolean8(0x08, "att_def_execute", "Execute"),
1269         bf_boolean8(0x10, "att_def_sub_only", "Subdirectories Only"),
1270         bf_boolean8(0x20, "att_def_archive", "Archive"),
1271         bf_boolean8(0x80, "att_def_shareable", "Shareable"),
1272 ])
1273 AttributesDef16                 = bitfield16("attr_def_16", "Attributes", [
1274         bf_boolean16(0x0001, "att_def16_ro", "Read Only"),
1275         bf_boolean16(0x0002, "att_def16_hidden", "Hidden"),
1276         bf_boolean16(0x0004, "att_def16_system", "System"),
1277         bf_boolean16(0x0008, "att_def16_execute", "Execute"),
1278         bf_boolean16(0x0010, "att_def16_sub_only", "Subdirectories Only"),
1279         bf_boolean16(0x0020, "att_def16_archive", "Archive"),
1280         bf_boolean16(0x0080, "att_def16_shareable", "Shareable"),
1281         bf_boolean16(0x1000, "att_def16_transaction", "Transactional"),
1282         bf_boolean16(0x4000, "att_def16_read_audit", "Read Audit"),
1283         bf_boolean16(0x8000, "att_def16_write_audit", "Write Audit"),
1284 ])
1285 AttributesDef32                 = bitfield32("attr_def_32", "Attributes", [
1286         bf_boolean32(0x00000001, "att_def32_ro", "Read Only"),
1287         bf_boolean32(0x00000002, "att_def32_hidden", "Hidden"),
1288         bf_boolean32(0x00000004, "att_def32_system", "System"),
1289         bf_boolean32(0x00000008, "att_def32_execute", "Execute"),
1290         bf_boolean32(0x00000010, "att_def32_sub_only", "Subdirectories Only"),
1291         bf_boolean32(0x00000020, "att_def32_archive", "Archive"),
1292         bf_boolean32(0x00000080, "att_def32_shareable", "Shareable"),
1293         bf_boolean32(0x00001000, "att_def32_transaction", "Transactional"),
1294         bf_boolean32(0x00004000, "att_def32_read_audit", "Read Audit"),
1295         bf_boolean32(0x00008000, "att_def32_write_audit", "Write Audit"),
1296         bf_boolean32(0x00010000, "att_def_purge", "Purge"),
1297         bf_boolean32(0x00020000, "att_def_reninhibit", "Rename Inhibit"),
1298         bf_boolean32(0x00040000, "att_def_delinhibit", "Delete Inhibit"),
1299         bf_boolean32(0x00080000, "att_def_cpyinhibit", "Copy Inhibit"),
1300         bf_boolean32(0x02000000, "att_def_im_comp", "Immediate Compress"),
1301         bf_boolean32(0x04000000, "att_def_comp", "Compressed"),
1302 ])
1303 AttributeValidFlag              = uint32("attribute_valid_flag", "Attribute Valid Flag")
1304 AuditFileVersionDate            = uint16("audit_file_ver_date", "Audit File Version Date")
1305 AuditFileVersionDate.NWDate()
1306 AuditFlag                       = val_string8("audit_flag", "Audit Flag", [
1307         [ 0x00, "Do NOT audit object" ],
1308         [ 0x01, "Audit object" ],
1309 ])
1310 AuditHandle                     = uint32("audit_handle", "Audit File Handle")
1311 AuditHandle.Display("BASE_HEX")
1312 AuditID                         = uint32("audit_id", "Audit ID", BE)
1313 AuditID.Display("BASE_HEX")
1314 AuditIDType                     = val_string16("audit_id_type", "Audit ID Type", [
1315         [ 0x0000, "Volume" ],
1316         [ 0x0001, "Container" ],
1317 ])
1318 AuditVersionDate                = uint16("audit_ver_date", "Auditing Version Date")
1319 AuditVersionDate.NWDate()
1320 AvailableBlocks                 = uint32("available_blocks", "Available Blocks")
1321 AvailableClusters               = uint16("available_clusters", "Available Clusters")
1322 AvailableDirectorySlots         = uint16("available_directory_slots", "Available Directory Slots")
1323 AvailableDirEntries             = uint32("available_dir_entries", "Available Directory Entries")
1324 AvailableIndexedFiles           = uint16("available_indexed_files", "Available Indexed Files")
1325
1326 BackgroundAgedWrites            = uint32("background_aged_writes", "Background Aged Writes")
1327 BackgroundDirtyWrites           = uint32("background_dirty_writes", "Background Dirty Writes")
1328 BadLogicalConnectionCount       = uint16("bad_logical_connection_count", "Bad Logical Connection Count")
1329 BannerName                      = fw_string("banner_name", "Banner Name", 14)
1330 BaseDirectoryID                 = uint32("base_directory_id", "Base Directory ID")
1331 BaseDirectoryID.Display("BASE_HEX")
1332 binderyContext                  = nstring8("bindery_context", "Bindery Context")
1333 BitMap                          = bytes("bit_map", "Bit Map", 512)
1334 BlockNumber                     = uint32("block_number", "Block Number")
1335 BlockSize                       = uint16("block_size", "Block Size")
1336 BlockSizeInSectors              = uint32("block_size_in_sectors", "Block Size in Sectors")
1337 BoardInstalled                  = uint8("board_installed", "Board Installed")
1338 BoardNumber                     = uint32("board_number", "Board Number")
1339 BoardNumbers                    = uint32("board_numbers", "Board Numbers")
1340 BufferSize                      = uint16("buffer_size", "Buffer Size")
1341 BusString                       = stringz("bus_string", "Bus String")
1342 BusType                         = val_string8("bus_type", "Bus Type", [
1343         [0x00, "ISA"],
1344         [0x01, "Micro Channel" ],
1345         [0x02, "EISA"],
1346         [0x04, "PCI"],
1347         [0x08, "PCMCIA"],
1348         [0x10, "ISA"],
1349         [0x14, "ISA"],
1350 ])
1351 BytesActuallyTransferred        = uint32("bytes_actually_transferred", "Bytes Actually Transferred")
1352 BytesRead                       = fw_string("bytes_read", "Bytes Read", 6)
1353 BytesToCopy                     = uint32("bytes_to_copy", "Bytes to Copy")
1354 BytesWritten                    = fw_string("bytes_written", "Bytes Written", 6)
1355
1356 CacheAllocations                = uint32("cache_allocations", "Cache Allocations")
1357 CacheBlockScrapped              = uint16("cache_block_scrapped", "Cache Block Scrapped")
1358 CacheBufferCount                = uint16("cache_buffer_count", "Cache Buffer Count")
1359 CacheBufferSize                 = uint16("cache_buffer_size", "Cache Buffer Size")
1360 CacheFullWriteRequests          = uint32("cache_full_write_requests", "Cache Full Write Requests")
1361 CacheGetRequests                = uint32("cache_get_requests", "Cache Get Requests")
1362 CacheHitOnUnavailableBlock      = uint16("cache_hit_on_unavailable_block", "Cache Hit On Unavailable Block")
1363 CacheHits                       = uint32("cache_hits", "Cache Hits")
1364 CacheMisses                     = uint32("cache_misses", "Cache Misses")
1365 CachePartialWriteRequests       = uint32("cache_partial_write_requests", "Cache Partial Write Requests")
1366 CacheReadRequests               = uint32("cache_read_requests", "Cache Read Requests")
1367 CacheWriteRequests              = uint32("cache_write_requests", "Cache Write Requests")
1368 CategoryName                    = stringz("category_name", "Category Name")
1369 CCFileHandle                    = uint32("cc_file_handle", "File Handle")
1370 CCFileHandle.Display("BASE_HEX")
1371 CCFunction                      = val_string8("cc_function", "OP-Lock Flag", [
1372         [ 0x01, "Clear OP-Lock" ],
1373         [ 0x02, "Acknowledge Callback" ],
1374         [ 0x03, "Decline Callback" ],
1375 ])
1376 ChangeBits                      = bitfield16("change_bits", "Change Bits", [
1377         bf_boolean16(0x0001, "change_bits_modify", "Modify Name"),
1378         bf_boolean16(0x0002, "change_bits_fatt", "File Attributes"),
1379         bf_boolean16(0x0004, "change_bits_cdate", "Creation Date"),
1380         bf_boolean16(0x0008, "change_bits_ctime", "Creation Time"),
1381         bf_boolean16(0x0010, "change_bits_owner", "Owner ID"),
1382         bf_boolean16(0x0020, "change_bits_adate", "Archive Date"),
1383         bf_boolean16(0x0040, "change_bits_atime", "Archive Time"),
1384         bf_boolean16(0x0080, "change_bits_aid", "Archiver ID"),
1385         bf_boolean16(0x0100, "change_bits_udate", "Update Date"),
1386         bf_boolean16(0x0200, "change_bits_utime", "Update Time"),
1387         bf_boolean16(0x0400, "change_bits_uid", "Update ID"),
1388         bf_boolean16(0x0800, "change_bits_acc_date", "Access Date"),
1389         bf_boolean16(0x1000, "change_bits_max_acc_mask", "Maximum Access Mask"),
1390         bf_boolean16(0x2000, "change_bits_max_space", "Maximum Space"),
1391 ])
1392 ChannelState                    = val_string8("channel_state", "Channel State", [
1393         [ 0x00, "Channel is running" ],
1394         [ 0x01, "Channel is stopping" ],
1395         [ 0x02, "Channel is stopped" ],
1396         [ 0x03, "Channel is not functional" ],
1397 ])
1398 ChannelSynchronizationState     = val_string8("channel_synchronization_state", "Channel Synchronization State", [
1399         [ 0x00, "Channel is not being used" ],
1400         [ 0x02, "NetWare is using the channel; no one else wants it" ],
1401         [ 0x04, "NetWare is using the channel; someone else wants it" ],
1402         [ 0x06, "Someone else is using the channel; NetWare does not need it" ],
1403         [ 0x08, "Someone else is using the channel; NetWare needs it" ],
1404         [ 0x0A, "Someone else has released the channel; NetWare should use it" ],
1405 ])
1406 ChargeAmount                    = uint32("charge_amount", "Charge Amount")
1407 ChargeInformation               = uint32("charge_information", "Charge Information")
1408 ClientCompFlag                  = val_string16("client_comp_flag", "Completion Flag", [
1409         [ 0x0000, "Successful" ],
1410         [ 0x0001, "Illegal Station Number" ],
1411         [ 0x0002, "Client Not Logged In" ],
1412         [ 0x0003, "Client Not Accepting Messages" ],
1413         [ 0x0004, "Client Already has a Message" ],
1414         [ 0x0096, "No Alloc Space for the Message" ],
1415         [ 0x00fd, "Bad Station Number" ],
1416         [ 0x00ff, "Failure" ],
1417 ])      
1418 ClientIDNumber                  = uint32("client_id_number", "Client ID Number", BE)
1419 ClientIDNumber.Display("BASE_HEX")
1420 ClientList                      = uint32("client_list", "Client List")
1421 ClientListCount                 = uint16("client_list_cnt", "Client List Count")
1422 ClientListLen                   = uint8("client_list_len", "Client List Length")
1423 ClientRecordArea                = fw_string("client_record_area", "Client Record Area", 152)
1424 ClientStation                   = uint8("client_station", "Client Station")
1425 ClientStationLong               = uint32("client_station_long", "Client Station")
1426 ClientTaskNumber                = uint8("client_task_number", "Client Task Number")
1427 ClientTaskNumberLong            = uint32("client_task_number_long", "Client Task Number")
1428 ClusterCount                    = uint16("cluster_count", "Cluster Count")
1429 ClustersUsedByDirectories       = uint32("clusters_used_by_directories", "Clusters Used by Directories")
1430 ClustersUsedByExtendedDirectories = uint32("clusters_used_by_extended_dirs", "Clusters Used by Extended Directories")
1431 ClustersUsedByFAT               = uint32("clusters_used_by_fat", "Clusters Used by FAT")
1432 ComCnts                         = uint16("com_cnts", "Communication Counters")
1433 Comment                         = nstring8("comment", "Comment")
1434 CommentType                     = uint16("comment_type", "Comment Type")
1435 CompletionCode                  = uint32("ncompletion_code", "Completion Code")
1436 CompressedDataStreamsCount      = uint32("compressed_data_streams_count", "Compressed Data Streams Count")
1437 CompressedLimboDataStreamsCount = uint32("compressed_limbo_data_streams_count", "Compressed Limbo Data Streams Count")
1438 CompressedSectors               = uint32("compressed_sectors", "Compressed Sectors")
1439 compressionStage                = uint32("compression_stage", "Compression Stage")
1440 compressVolume                  = uint32("compress_volume", "Volume Compression")
1441 ConfigMajorVN                   = uint8("config_major_vn", "Configuration Major Version Number")
1442 ConfigMinorVN                   = uint8("config_minor_vn", "Configuration Minor Version Number")
1443 ConfigurationDescription        = fw_string("configuration_description", "Configuration Description", 80)
1444 ConfigurationText               = fw_string("configuration_text", "Configuration Text", 160)
1445 ConfiguredMaxBinderyObjects     = uint16("configured_max_bindery_objects", "Configured Max Bindery Objects")
1446 ConfiguredMaxOpenFiles          = uint16("configured_max_open_files", "Configured Max Open Files")
1447 ConfiguredMaxRoutingBuffers     = uint16("configured_max_routing_buffers", "Configured Max Routing Buffers")
1448 ConfiguredMaxSimultaneousTransactions = uint16("cfg_max_simultaneous_transactions", "Configured Max Simultaneous Transactions")
1449 ConnectedLAN                    = uint32("connected_lan", "LAN Adapter")
1450 ConnectionControlBits           = bitfield8("conn_ctrl_bits", "Connection Control", [
1451         bf_boolean8(0x01, "enable_brdcasts", "Enable Broadcasts"),
1452         bf_boolean8(0x02, "enable_personal_brdcasts", "Enable Personal Broadcasts"),
1453         bf_boolean8(0x04, "enable_wdog_messages", "Enable Watchdog Message"),
1454         bf_boolean8(0x10, "disable_brdcasts", "Disable Broadcasts"),
1455         bf_boolean8(0x20, "disable_personal_brdcasts", "Disable Personal Broadcasts"),
1456         bf_boolean8(0x40, "disable_wdog_messages", "Disable Watchdog Message"),
1457 ])
1458 ConnectionListCount             = uint32("conn_list_count", "Connection List Count")
1459 ConnectionList                  = uint32("connection_list", "Connection List")
1460 ConnectionNumber                = uint32("connection_number", "Connection Number", BE)
1461 ConnectionNumberList            = nstring8("connection_number_list", "Connection Number List")
1462 ConnectionNumberWord            = uint16("conn_number_word", "Connection Number")
1463 ConnectionNumberByte            = uint8("conn_number_byte", "Connection Number")
1464 ConnectionServiceType           = val_string8("connection_service_type","Connection Service Type",[
1465         [ 0x01, "CLIB backward Compatibility" ],
1466         [ 0x02, "NCP Connection" ],
1467         [ 0x03, "NLM Connection" ],
1468         [ 0x04, "AFP Connection" ],
1469         [ 0x05, "FTAM Connection" ],
1470         [ 0x06, "ANCP Connection" ],
1471         [ 0x07, "ACP Connection" ],
1472         [ 0x08, "SMB Connection" ],
1473         [ 0x09, "Winsock Connection" ],
1474 ])
1475 ConnectionsInUse                = uint16("connections_in_use", "Connections In Use")
1476 ConnectionsMaxUsed              = uint16("connections_max_used", "Connections Max Used")
1477 ConnectionsSupportedMax         = uint16("connections_supported_max", "Connections Supported Max")
1478 ConnectionType                  = val_string8("connection_type", "Connection Type", [
1479         [ 0x00, "Not in use" ],
1480         [ 0x02, "NCP" ],
1481         [ 0x11, "UDP (for IP)" ],
1482 ])
1483 ConnListLen                     = uint8("conn_list_len", "Connection List Length")
1484 Copyright                       = nstring8("copyright", "Copyright")
1485 connList                        = uint32("conn_list", "Connection List")
1486 ControlFlags                    = val_string8("control_flags", "Control Flags", [
1487         [ 0x00, "Forced Record Locking is Off" ],
1488         [ 0x01, "Forced Record Locking is On" ],
1489 ])
1490 ControllerDriveNumber           = uint8("controller_drive_number", "Controller Drive Number")
1491 ControllerNumber                = uint8("controller_number", "Controller Number")
1492 ControllerType                  = uint8("controller_type", "Controller Type")
1493 Cookie1                         = uint32("cookie_1", "Cookie 1")
1494 Cookie2                         = uint32("cookie_2", "Cookie 2")
1495 Copies                          = uint8( "copies", "Copies" )
1496 CoprocessorFlag                 = uint32("co_processor_flag", "CoProcessor Present Flag")
1497 CoProcessorString               = stringz("co_proc_string", "CoProcessor String")
1498 CounterMask                     = val_string8("counter_mask", "Counter Mask", [
1499         [ 0x00, "Counter is Valid" ],
1500         [ 0x01, "Counter is not Valid" ],
1501 ])        
1502 CPUNumber                       = uint32("cpu_number", "CPU Number")
1503 CPUString                       = stringz("cpu_string", "CPU String")
1504 CPUType                         = val_string8("cpu_type", "CPU Type", [
1505         [ 0x00, "80386" ],
1506         [ 0x01, "80486" ],
1507         [ 0x02, "Pentium" ],
1508         [ 0x03, "Pentium Pro" ],
1509 ])    
1510 CreationDate                    = uint16("creation_date", "Creation Date")
1511 CreationDate.NWDate()
1512 CreationTime                    = uint16("creation_time", "Creation Time")
1513 CreationTime.NWTime()
1514 CreatorID                       = uint32("creator_id", "Creator ID", BE)
1515 CreatorID.Display("BASE_HEX")
1516 CreatorNameSpaceNumber          = val_string8("creator_name_space_number", "Creator Name Space Number", [
1517         [ 0x00, "DOS Name Space" ],
1518         [ 0x01, "MAC Name Space" ],
1519         [ 0x02, "NFS Name Space" ],
1520         [ 0x04, "Long Name Space" ],
1521 ])
1522 CreditLimit                     = uint32("credit_limit", "Credit Limit")
1523 CtrlFlags                       = val_string16("ctrl_flags", "Control Flags", [
1524         [ 0x0000, "Do Not Return File Name" ],
1525         [ 0x0001, "Return File Name" ],
1526 ])      
1527 curCompBlks                     = uint32("cur_comp_blks", "Current Compression Blocks")
1528 curInitialBlks                  = uint32("cur_initial_blks", "Current Initial Blocks")
1529 curIntermediateBlks             = uint32("cur_inter_blks", "Current Intermediate Blocks")
1530 CurNumOfRTags                   = uint32("cur_num_of_r_tags", "Current Number of Resource Tags")
1531 CurrentBlockBeingDecompressed   = uint32("cur_blk_being_dcompress", "Current Block Being Decompressed")
1532 CurrentChangedFATs              = uint16("current_changed_fats", "Current Changed FAT Entries")
1533 CurrentEntries                  = uint32("current_entries", "Current Entries")
1534 CurrentFormType                 = uint8( "current_form_type", "Current Form Type" )
1535 CurrentLFSCounters              = uint32("current_lfs_counters", "Current LFS Counters")
1536 CurrentlyUsedRoutingBuffers     = uint16("currently_used_routing_buffers", "Currently Used Routing Buffers")
1537 CurrentOpenFiles                = uint16("current_open_files", "Current Open Files")
1538 CurrentReferenceID              = uint16("curr_ref_id", "Current Reference ID")
1539 CurrentServers                  = uint32("current_servers", "Current Servers")
1540 CurrentServerTime               = uint32("current_server_time", "Time Elapsed Since Server Was Brought Up")
1541 CurrentSpace                    = uint32("current_space", "Current Space")
1542 CurrentTransactionCount         = uint32("current_trans_count", "Current Transaction Count")
1543 CurrentUsedBinderyObjects       = uint16("current_used_bindery_objects", "Current Used Bindery Objects")
1544 CurrentUsedDynamicSpace         = uint32("current_used_dynamic_space", "Current Used Dynamic Space")
1545 CustomCnts                      = uint32("custom_cnts", "Custom Counters")
1546 CustomCount                     = uint32("custom_count", "Custom Count")
1547 CustomCounters                  = uint32("custom_counters", "Custom Counters")
1548 CustomString                    = nstring8("custom_string", "Custom String")
1549 CustomVariableValue             = uint32("custom_var_value", "Custom Variable Value")
1550
1551 Data                            = nstring8("data", "Data")
1552 DataForkFirstFAT                = uint32("data_fork_first_fat", "Data Fork First FAT Entry")
1553 DataForkLen                     = uint32("data_fork_len", "Data Fork Len")
1554 DataForkSize                    = uint32("data_fork_size", "Data Fork Size")
1555 DataSize                        = uint32("data_size", "Data Size")
1556 DataStream                      = val_string8("data_stream", "Data Stream", [
1557         [ 0x00, "Resource Fork or DOS" ],
1558         [ 0x01, "Data Fork" ],
1559 ])
1560 DataStreamName                  = nstring8("data_stream_name", "Data Stream Name")
1561 DataStreamNumber                = uint8("data_stream_number", "Data Stream Number")
1562 DataStreamsCount                = uint32("data_streams_count", "Data Streams Count")
1563 DataStreamSize                  = uint32("data_stream_size", "Size")
1564 DataStreamSpaceAlloc            = uint32( "data_stream_space_alloc", "Space Allocated for Data Stream" )
1565 Day                             = uint8("s_day", "Day")
1566 DayOfWeek                       = val_string8("s_day_of_week", "Day of Week", [
1567         [ 0x00, "Sunday" ],
1568         [ 0x01, "Monday" ],
1569         [ 0x02, "Tuesday" ],
1570         [ 0x03, "Wednesday" ],
1571         [ 0x04, "Thursday" ],
1572         [ 0x05, "Friday" ],
1573         [ 0x06, "Saturday" ],
1574 ])
1575 DeadMirrorTable                 = bytes("dead_mirror_table", "Dead Mirror Table", 32)
1576 DefinedDataStreams              = uint8("defined_data_streams", "Defined Data Streams")
1577 DefinedNameSpaces               = uint8("definded_name_spaces", "Defined Name Spaces")
1578 DeletedDate                     = uint16("deleted_date", "Deleted Date")
1579 DeletedDate.NWDate()
1580 DeletedFileTime                 = uint32( "deleted_file_time", "Deleted File Time")
1581 DeletedFileTime.Display("BASE_HEX")
1582 DeletedTime                     = uint16("deleted_time", "Deleted Time")
1583 DeletedTime.NWTime()
1584 DeletedID                       = uint32( "delete_id", "Deleted ID", BE)
1585 DeletedID.Display("BASE_HEX")
1586 DeleteExistingFileFlag          = val_string8("delete_existing_file_flag", "Delete Existing File Flag", [
1587         [ 0x00, "Do Not Delete Existing File" ],
1588         [ 0x01, "Delete Existing File" ],
1589 ])      
1590 DenyReadCount                   = uint16("deny_read_count", "Deny Read Count")
1591 DenyWriteCount                  = uint16("deny_write_count", "Deny Write Count")
1592 DescriptionStrings              = fw_string("description_string", "Description", 512)
1593 DesiredAccessRights             = bitfield16("desired_access_rights", "Desired Access Rights", [
1594         bf_boolean16(0x0001, "dsired_acc_rights_read_o", "Read Only"),
1595         bf_boolean16(0x0002, "dsired_acc_rights_write_o", "Write Only"),
1596         bf_boolean16(0x0004, "dsired_acc_rights_deny_r", "Deny Read"),
1597         bf_boolean16(0x0008, "dsired_acc_rights_deny_w", "Deny Write"),
1598         bf_boolean16(0x0010, "dsired_acc_rights_compat", "Compatibility"),
1599         bf_boolean16(0x0040, "dsired_acc_rights_w_thru", "File Write Through"),
1600         bf_boolean16(0x0400, "dsired_acc_rights_del_file_cls", "Delete File Close"),
1601 ])
1602 DesiredResponseCount            = uint16("desired_response_count", "Desired Response Count")
1603 DestDirHandle                   = uint8("dest_dir_handle", "Destination Directory Handle")
1604 DestNameSpace                   = val_string8("dest_name_space", "Destination Name Space", [
1605         [ 0x00, "DOS Name Space" ],
1606         [ 0x01, "MAC Name Space" ],
1607         [ 0x02, "NFS Name Space" ],
1608         [ 0x04, "Long Name Space" ],
1609 ])
1610 DestPathComponentCount          = uint8("dest_component_count", "Destination Path Component Count")
1611 DestPath                        = nstring8("dest_path", "Destination Path")
1612 DetachDuringProcessing          = uint16("detach_during_processing", "Detach During Processing")
1613 DetachForBadConnectionNumber    = uint16("detach_for_bad_connection_number", "Detach For Bad Connection Number")
1614 DirHandle                       = uint8("dir_handle", "Directory Handle")
1615 DirHandleName                   = uint8("dir_handle_name", "Handle Name")
1616 DirHandleLong                   = uint32("dir_handle_long", "Directory Handle")
1617 DirectoryAccessRights           = uint8("directory_access_rights", "Directory Access Rights")
1618 DirectoryAttributes             = uint8("directory_attributes", "Directory Attributes")
1619 DirectoryBase                   = uint32("dir_base", "Directory Base")
1620 DirectoryBase.Display("BASE_HEX")
1621 DirectoryCount                  = uint16("dir_count", "Directory Count")
1622 DirectoryEntryNumber            = uint32("directory_entry_number", "Directory Entry Number")
1623 DirectoryEntryNumber.Display('BASE_HEX')
1624 DirectoryEntryNumberWord        = uint16("directory_entry_number_word", "Directory Entry Number")
1625 DirectoryID                     = uint16("directory_id", "Directory ID")
1626 DirectoryID.Display("BASE_HEX")
1627 DirectoryName                   = fw_string("directory_name", "Directory Name",12)
1628 DirectoryName14                 = fw_string("directory_name_14", "Directory Name", 14)
1629 DirectoryNameLen                = uint8("directory_name_len", "Directory Name Length")
1630 DirectoryNumber                 = uint32("directory_number", "Directory Number")
1631 DirectoryNumber.Display("BASE_HEX")
1632 DirectoryPath                   = fw_string("directory_path", "Directory Path", 16)
1633 DirectoryServicesObjectID       = uint32("directory_services_object_id", "Directory Services Object ID")
1634 DirectoryServicesObjectID.Display("BASE_HEX")
1635 DirectoryStamp                  = uint16("directory_stamp", "Directory Stamp (0xD1D1)")
1636 DirtyCacheBuffers               = uint16("dirty_cache_buffers", "Dirty Cache Buffers")
1637 DiskChannelNumber               = uint8("disk_channel_number", "Disk Channel Number")
1638 DiskChannelTable                = val_string8("disk_channel_table", "Disk Channel Table", [
1639         [ 0x01, "XT" ],
1640         [ 0x02, "AT" ],
1641         [ 0x03, "SCSI" ],
1642         [ 0x04, "Disk Coprocessor" ],
1643 ])
1644 DiskSpaceLimit                  = uint32("disk_space_limit", "Disk Space Limit")
1645 DMAChannelsUsed                 = uint32("dma_channels_used", "DMA Channels Used")
1646 DMInfoEntries                   = uint32("dm_info_entries", "DM Info Entries")
1647 DMInfoLevel                     = val_string8("dm_info_level", "DM Info Level", [
1648         [ 0x00, "Return Detailed DM Support Module Information" ],
1649         [ 0x01, "Return Number of DM Support Modules" ],
1650         [ 0x02, "Return DM Support Modules Names" ],
1651 ])      
1652 DMFlags                         = val_string8("dm_flags", "DM Flags", [
1653         [ 0x00, "OnLine Media" ],
1654         [ 0x01, "OffLine Media" ],
1655 ])
1656 DMmajorVersion                  = uint32("dm_major_version", "DM Major Version")
1657 DMminorVersion                  = uint32("dm_minor_version", "DM Minor Version")
1658 DMPresentFlag                   = val_string8("dm_present_flag", "Data Migration Present Flag", [
1659         [ 0x00, "Data Migration NLM is not loaded" ],
1660         [ 0x01, "Data Migration NLM has been loaded and is running" ],
1661 ])      
1662 DOSDirectoryBase                = uint32("dos_directory_base", "DOS Directory Base")
1663 DOSDirectoryBase.Display("BASE_HEX")
1664 DOSDirectoryEntry               = uint32("dos_directory_entry", "DOS Directory Entry")
1665 DOSDirectoryEntry.Display("BASE_HEX")
1666 DOSDirectoryEntryNumber         = uint32("dos_directory_entry_number", "DOS Directory Entry Number")
1667 DOSDirectoryEntryNumber.Display('BASE_HEX')
1668 DOSFileAttributes               = uint8("dos_file_attributes", "DOS File Attributes")
1669 DOSParentDirectoryEntry         = uint32("dos_parent_directory_entry", "DOS Parent Directory Entry")
1670 DOSParentDirectoryEntry.Display('BASE_HEX')
1671 DOSSequence                     = uint32("dos_sequence", "DOS Sequence")
1672 DriveCylinders                  = uint16("drive_cylinders", "Drive Cylinders")
1673 DriveDefinitionString           = fw_string("drive_definition_string", "Drive Definition", 64)
1674 DriveHeads                      = uint8("drive_heads", "Drive Heads")
1675 DriveMappingTable               = bytes("drive_mapping_table", "Drive Mapping Table", 32)
1676 DriveMirrorTable                = bytes("drive_mirror_table", "Drive Mirror Table", 32)
1677 DriverBoardName                 = stringz("driver_board_name", "Driver Board Name")
1678 DriveRemovableFlag              = val_string8("drive_removable_flag", "Drive Removable Flag", [
1679         [ 0x00, "Nonremovable" ],
1680         [ 0xff, "Removable" ],
1681 ])
1682 DriverLogicalName               = stringz("driver_log_name", "Driver Logical Name")
1683 DriverShortName                 = stringz("driver_short_name", "Driver Short Name")
1684 DriveSize                       = uint32("drive_size", "Drive Size")
1685 DstEAFlags                      = val_string16("dst_ea_flags", "Destination EA Flags", [
1686         [ 0x0000, "Return EAHandle,Information Level 0" ],
1687         [ 0x0001, "Return NetWareHandle,Information Level 0" ],
1688         [ 0x0002, "Return Volume/Directory Number,Information Level 0" ],
1689         [ 0x0004, "Return EAHandle,Close Handle on Error,Information Level 0" ],
1690         [ 0x0005, "Return NetWareHandle,Close Handle on Error,Information Level 0" ],
1691         [ 0x0006, "Return Volume/Directory Number,Close Handle on Error,Information Level 0" ],
1692         [ 0x0010, "Return EAHandle,Information Level 1" ],
1693         [ 0x0011, "Return NetWareHandle,Information Level 1" ],
1694         [ 0x0012, "Return Volume/Directory Number,Information Level 1" ],
1695         [ 0x0014, "Return EAHandle,Close Handle on Error,Information Level 1" ],
1696         [ 0x0015, "Return NetWareHandle,Close Handle on Error,Information Level 1" ],
1697         [ 0x0016, "Return Volume/Directory Number,Close Handle on Error,Information Level 1" ],
1698         [ 0x0020, "Return EAHandle,Information Level 2" ],
1699         [ 0x0021, "Return NetWareHandle,Information Level 2" ],
1700         [ 0x0022, "Return Volume/Directory Number,Information Level 2" ],
1701         [ 0x0024, "Return EAHandle,Close Handle on Error,Information Level 2" ],
1702         [ 0x0025, "Return NetWareHandle,Close Handle on Error,Information Level 2" ],
1703         [ 0x0026, "Return Volume/Directory Number,Close Handle on Error,Information Level 2" ],
1704         [ 0x0030, "Return EAHandle,Information Level 3" ],
1705         [ 0x0031, "Return NetWareHandle,Information Level 3" ],
1706         [ 0x0032, "Return Volume/Directory Number,Information Level 3" ],
1707         [ 0x0034, "Return EAHandle,Close Handle on Error,Information Level 3" ],
1708         [ 0x0035, "Return NetWareHandle,Close Handle on Error,Information Level 3" ],
1709         [ 0x0036, "Return Volume/Directory Number,Close Handle on Error,Information Level 3" ],
1710         [ 0x0040, "Return EAHandle,Information Level 4" ],
1711         [ 0x0041, "Return NetWareHandle,Information Level 4" ],
1712         [ 0x0042, "Return Volume/Directory Number,Information Level 4" ],
1713         [ 0x0044, "Return EAHandle,Close Handle on Error,Information Level 4" ],
1714         [ 0x0045, "Return NetWareHandle,Close Handle on Error,Information Level 4" ],
1715         [ 0x0046, "Return Volume/Directory Number,Close Handle on Error,Information Level 4" ],
1716         [ 0x0050, "Return EAHandle,Information Level 5" ],
1717         [ 0x0051, "Return NetWareHandle,Information Level 5" ],
1718         [ 0x0052, "Return Volume/Directory Number,Information Level 5" ],
1719         [ 0x0054, "Return EAHandle,Close Handle on Error,Information Level 5" ],
1720         [ 0x0055, "Return NetWareHandle,Close Handle on Error,Information Level 5" ],
1721         [ 0x0056, "Return Volume/Directory Number,Close Handle on Error,Information Level 5" ],
1722         [ 0x0060, "Return EAHandle,Information Level 6" ],
1723         [ 0x0061, "Return NetWareHandle,Information Level 6" ],
1724         [ 0x0062, "Return Volume/Directory Number,Information Level 6" ],
1725         [ 0x0064, "Return EAHandle,Close Handle on Error,Information Level 6" ],
1726         [ 0x0065, "Return NetWareHandle,Close Handle on Error,Information Level 6" ],
1727         [ 0x0066, "Return Volume/Directory Number,Close Handle on Error,Information Level 6" ],
1728         [ 0x0070, "Return EAHandle,Information Level 7" ],
1729         [ 0x0071, "Return NetWareHandle,Information Level 7" ],
1730         [ 0x0072, "Return Volume/Directory Number,Information Level 7" ],
1731         [ 0x0074, "Return EAHandle,Close Handle on Error,Information Level 7" ],
1732         [ 0x0075, "Return NetWareHandle,Close Handle on Error,Information Level 7" ],
1733         [ 0x0076, "Return Volume/Directory Number,Close Handle on Error,Information Level 7" ],
1734         [ 0x0080, "Return EAHandle,Information Level 0,Immediate Close Handle" ],
1735         [ 0x0081, "Return NetWareHandle,Information Level 0,Immediate Close Handle" ],
1736         [ 0x0082, "Return Volume/Directory Number,Information Level 0,Immediate Close Handle" ],
1737         [ 0x0084, "Return EAHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1738         [ 0x0085, "Return NetWareHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1739         [ 0x0086, "Return Volume/Directory Number,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1740         [ 0x0090, "Return EAHandle,Information Level 1,Immediate Close Handle" ],
1741         [ 0x0091, "Return NetWareHandle,Information Level 1,Immediate Close Handle" ],
1742         [ 0x0092, "Return Volume/Directory Number,Information Level 1,Immediate Close Handle" ],
1743         [ 0x0094, "Return EAHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1744         [ 0x0095, "Return NetWareHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1745         [ 0x0096, "Return Volume/Directory Number,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1746         [ 0x00a0, "Return EAHandle,Information Level 2,Immediate Close Handle" ],
1747         [ 0x00a1, "Return NetWareHandle,Information Level 2,Immediate Close Handle" ],
1748         [ 0x00a2, "Return Volume/Directory Number,Information Level 2,Immediate Close Handle" ],
1749         [ 0x00a4, "Return EAHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1750         [ 0x00a5, "Return NetWareHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1751         [ 0x00a6, "Return Volume/Directory Number,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1752         [ 0x00b0, "Return EAHandle,Information Level 3,Immediate Close Handle" ],
1753         [ 0x00b1, "Return NetWareHandle,Information Level 3,Immediate Close Handle" ],
1754         [ 0x00b2, "Return Volume/Directory Number,Information Level 3,Immediate Close Handle" ],
1755         [ 0x00b4, "Return EAHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1756         [ 0x00b5, "Return NetWareHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1757         [ 0x00b6, "Return Volume/Directory Number,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1758         [ 0x00c0, "Return EAHandle,Information Level 4,Immediate Close Handle" ],
1759         [ 0x00c1, "Return NetWareHandle,Information Level 4,Immediate Close Handle" ],
1760         [ 0x00c2, "Return Volume/Directory Number,Information Level 4,Immediate Close Handle" ],
1761         [ 0x00c4, "Return EAHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1762         [ 0x00c5, "Return NetWareHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1763         [ 0x00c6, "Return Volume/Directory Number,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1764         [ 0x00d0, "Return EAHandle,Information Level 5,Immediate Close Handle" ],
1765         [ 0x00d1, "Return NetWareHandle,Information Level 5,Immediate Close Handle" ],
1766         [ 0x00d2, "Return Volume/Directory Number,Information Level 5,Immediate Close Handle" ],
1767         [ 0x00d4, "Return EAHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1768         [ 0x00d5, "Return NetWareHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1769         [ 0x00d6, "Return Volume/Directory Number,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1770         [ 0x00e0, "Return EAHandle,Information Level 6,Immediate Close Handle" ],
1771         [ 0x00e1, "Return NetWareHandle,Information Level 6,Immediate Close Handle" ],
1772         [ 0x00e2, "Return Volume/Directory Number,Information Level 6,Immediate Close Handle" ],
1773         [ 0x00e4, "Return EAHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1774         [ 0x00e5, "Return NetWareHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1775         [ 0x00e6, "Return Volume/Directory Number,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1776         [ 0x00f0, "Return EAHandle,Information Level 7,Immediate Close Handle" ],
1777         [ 0x00f1, "Return NetWareHandle,Information Level 7,Immediate Close Handle" ],
1778         [ 0x00f2, "Return Volume/Directory Number,Information Level 7,Immediate Close Handle" ],
1779         [ 0x00f4, "Return EAHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1780         [ 0x00f5, "Return NetWareHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1781         [ 0x00f6, "Return Volume/Directory Number,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1782 ])
1783 dstNSIndicator                  = val_string16("dst_ns_indicator", "Destination Name Space Indicator", [
1784         [ 0x0000, "Return Source Name Space Information" ],
1785         [ 0x0001, "Return Destination Name Space Information" ],
1786 ])      
1787 DstQueueID                      = uint32("dst_queue_id", "Destination Queue ID")
1788 DuplicateRepliesSent            = uint16("duplicate_replies_sent", "Duplicate Replies Sent")
1789
1790 EAAccessFlag                    = bitfield16("ea_access_flag", "EA Access Flag", [
1791         bf_boolean16(0x0001, "ea_permanent_memory", "Permanent Memory"),
1792         bf_boolean16(0x0002, "ea_deep_freeze", "Deep Freeze"),
1793         bf_boolean16(0x0004, "ea_in_progress", "In Progress"),
1794         bf_boolean16(0x0008, "ea_header_being_enlarged", "Header Being Enlarged"),
1795         bf_boolean16(0x0010, "ea_new_tally_used", "New Tally Used"),
1796         bf_boolean16(0x0020, "ea_tally_need_update", "Tally Need Update"),
1797         bf_boolean16(0x0040, "ea_score_card_present", "Score Card Present"),
1798         bf_boolean16(0x0080, "ea_need_bit_flag", "EA Need Bit Flag"),
1799         bf_boolean16(0x0100, "ea_write_privileges", "Write Privileges"),
1800         bf_boolean16(0x0200, "ea_read_privileges", "Read Privileges"),
1801         bf_boolean16(0x0400, "ea_delete_privileges", "Delete Privileges"),
1802         bf_boolean16(0x0800, "ea_system_ea_only", "System EA Only"),
1803         bf_boolean16(0x1000, "ea_write_in_progress", "Write In Progress"),
1804 ])
1805 EABytesWritten                  = uint32("ea_bytes_written", "Bytes Written")
1806 EACount                         = uint32("ea_count", "Count")
1807 EADataSize                      = uint32("ea_data_size", "Data Size")
1808 EADataSizeDuplicated            = uint32("ea_data_size_duplicated", "Data Size Duplicated")
1809 EADuplicateCount                = uint32("ea_duplicate_count", "Duplicate Count")
1810 EAErrorCodes                    = val_string16("ea_error_codes", "EA Error Codes", [
1811         [ 0x0000, "SUCCESSFUL" ],
1812         [ 0x00c8, "ERR_MISSING_EA_KEY" ],
1813         [ 0x00c9, "ERR_EA_NOT_FOUND" ],
1814         [ 0x00ca, "ERR_INVALID_EA_HANDLE_TYPE" ],
1815         [ 0x00cb, "ERR_EA_NO_KEY_NO_DATA" ],
1816         [ 0x00cc, "ERR_EA_NUMBER_MISMATCH" ],
1817         [ 0x00cd, "ERR_EXTENT_NUMBER_OUT_OF_RANGE" ],
1818         [ 0x00ce, "ERR_EA_BAD_DIR_NUM" ],
1819         [ 0x00cf, "ERR_INVALID_EA_HANDLE" ],
1820         [ 0x00d0, "ERR_EA_POSITION_OUT_OF_RANGE" ],
1821         [ 0x00d1, "ERR_EA_ACCESS_DENIED" ],
1822         [ 0x00d2, "ERR_DATA_PAGE_ODD_SIZE" ],
1823         [ 0x00d3, "ERR_EA_VOLUME_NOT_MOUNTED" ],
1824         [ 0x00d4, "ERR_BAD_PAGE_BOUNDARY" ],
1825         [ 0x00d5, "ERR_INSPECT_FAILURE" ],
1826         [ 0x00d6, "ERR_EA_ALREADY_CLAIMED" ],
1827         [ 0x00d7, "ERR_ODD_BUFFER_SIZE" ],
1828         [ 0x00d8, "ERR_NO_SCORECARDS" ],
1829         [ 0x00d9, "ERR_BAD_EDS_SIGNATURE" ],
1830         [ 0x00da, "ERR_EA_SPACE_LIMIT" ],
1831         [ 0x00db, "ERR_EA_KEY_CORRUPT" ],
1832         [ 0x00dc, "ERR_EA_KEY_LIMIT" ],
1833         [ 0x00dd, "ERR_TALLY_CORRUPT" ],
1834 ])
1835 EAFlags                         = val_string16("ea_flags", "EA Flags", [
1836         [ 0x0000, "Return EAHandle,Information Level 0" ],
1837         [ 0x0001, "Return NetWareHandle,Information Level 0" ],
1838         [ 0x0002, "Return Volume/Directory Number,Information Level 0" ],
1839         [ 0x0004, "Return EAHandle,Close Handle on Error,Information Level 0" ],
1840         [ 0x0005, "Return NetWareHandle,Close Handle on Error,Information Level 0" ],
1841         [ 0x0006, "Return Volume/Directory Number,Close Handle on Error,Information Level 0" ],
1842         [ 0x0010, "Return EAHandle,Information Level 1" ],
1843         [ 0x0011, "Return NetWareHandle,Information Level 1" ],
1844         [ 0x0012, "Return Volume/Directory Number,Information Level 1" ],
1845         [ 0x0014, "Return EAHandle,Close Handle on Error,Information Level 1" ],
1846         [ 0x0015, "Return NetWareHandle,Close Handle on Error,Information Level 1" ],
1847         [ 0x0016, "Return Volume/Directory Number,Close Handle on Error,Information Level 1" ],
1848         [ 0x0020, "Return EAHandle,Information Level 2" ],
1849         [ 0x0021, "Return NetWareHandle,Information Level 2" ],
1850         [ 0x0022, "Return Volume/Directory Number,Information Level 2" ],
1851         [ 0x0024, "Return EAHandle,Close Handle on Error,Information Level 2" ],
1852         [ 0x0025, "Return NetWareHandle,Close Handle on Error,Information Level 2" ],
1853         [ 0x0026, "Return Volume/Directory Number,Close Handle on Error,Information Level 2" ],
1854         [ 0x0030, "Return EAHandle,Information Level 3" ],
1855         [ 0x0031, "Return NetWareHandle,Information Level 3" ],
1856         [ 0x0032, "Return Volume/Directory Number,Information Level 3" ],
1857         [ 0x0034, "Return EAHandle,Close Handle on Error,Information Level 3" ],
1858         [ 0x0035, "Return NetWareHandle,Close Handle on Error,Information Level 3" ],
1859         [ 0x0036, "Return Volume/Directory Number,Close Handle on Error,Information Level 3" ],
1860         [ 0x0040, "Return EAHandle,Information Level 4" ],
1861         [ 0x0041, "Return NetWareHandle,Information Level 4" ],
1862         [ 0x0042, "Return Volume/Directory Number,Information Level 4" ],
1863         [ 0x0044, "Return EAHandle,Close Handle on Error,Information Level 4" ],
1864         [ 0x0045, "Return NetWareHandle,Close Handle on Error,Information Level 4" ],
1865         [ 0x0046, "Return Volume/Directory Number,Close Handle on Error,Information Level 4" ],
1866         [ 0x0050, "Return EAHandle,Information Level 5" ],
1867         [ 0x0051, "Return NetWareHandle,Information Level 5" ],
1868         [ 0x0052, "Return Volume/Directory Number,Information Level 5" ],
1869         [ 0x0054, "Return EAHandle,Close Handle on Error,Information Level 5" ],
1870         [ 0x0055, "Return NetWareHandle,Close Handle on Error,Information Level 5" ],
1871         [ 0x0056, "Return Volume/Directory Number,Close Handle on Error,Information Level 5" ],
1872         [ 0x0060, "Return EAHandle,Information Level 6" ],
1873         [ 0x0061, "Return NetWareHandle,Information Level 6" ],
1874         [ 0x0062, "Return Volume/Directory Number,Information Level 6" ],
1875         [ 0x0064, "Return EAHandle,Close Handle on Error,Information Level 6" ],
1876         [ 0x0065, "Return NetWareHandle,Close Handle on Error,Information Level 6" ],
1877         [ 0x0066, "Return Volume/Directory Number,Close Handle on Error,Information Level 6" ],
1878         [ 0x0070, "Return EAHandle,Information Level 7" ],
1879         [ 0x0071, "Return NetWareHandle,Information Level 7" ],
1880         [ 0x0072, "Return Volume/Directory Number,Information Level 7" ],
1881         [ 0x0074, "Return EAHandle,Close Handle on Error,Information Level 7" ],
1882         [ 0x0075, "Return NetWareHandle,Close Handle on Error,Information Level 7" ],
1883         [ 0x0076, "Return Volume/Directory Number,Close Handle on Error,Information Level 7" ],
1884         [ 0x0080, "Return EAHandle,Information Level 0,Immediate Close Handle" ],
1885         [ 0x0081, "Return NetWareHandle,Information Level 0,Immediate Close Handle" ],
1886         [ 0x0082, "Return Volume/Directory Number,Information Level 0,Immediate Close Handle" ],
1887         [ 0x0084, "Return EAHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1888         [ 0x0085, "Return NetWareHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1889         [ 0x0086, "Return Volume/Directory Number,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1890         [ 0x0090, "Return EAHandle,Information Level 1,Immediate Close Handle" ],
1891         [ 0x0091, "Return NetWareHandle,Information Level 1,Immediate Close Handle" ],
1892         [ 0x0092, "Return Volume/Directory Number,Information Level 1,Immediate Close Handle" ],
1893         [ 0x0094, "Return EAHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1894         [ 0x0095, "Return NetWareHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1895         [ 0x0096, "Return Volume/Directory Number,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1896         [ 0x00a0, "Return EAHandle,Information Level 2,Immediate Close Handle" ],
1897         [ 0x00a1, "Return NetWareHandle,Information Level 2,Immediate Close Handle" ],
1898         [ 0x00a2, "Return Volume/Directory Number,Information Level 2,Immediate Close Handle" ],
1899         [ 0x00a4, "Return EAHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1900         [ 0x00a5, "Return NetWareHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1901         [ 0x00a6, "Return Volume/Directory Number,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1902         [ 0x00b0, "Return EAHandle,Information Level 3,Immediate Close Handle" ],
1903         [ 0x00b1, "Return NetWareHandle,Information Level 3,Immediate Close Handle" ],
1904         [ 0x00b2, "Return Volume/Directory Number,Information Level 3,Immediate Close Handle" ],
1905         [ 0x00b4, "Return EAHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1906         [ 0x00b5, "Return NetWareHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1907         [ 0x00b6, "Return Volume/Directory Number,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1908         [ 0x00c0, "Return EAHandle,Information Level 4,Immediate Close Handle" ],
1909         [ 0x00c1, "Return NetWareHandle,Information Level 4,Immediate Close Handle" ],
1910         [ 0x00c2, "Return Volume/Directory Number,Information Level 4,Immediate Close Handle" ],
1911         [ 0x00c4, "Return EAHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1912         [ 0x00c5, "Return NetWareHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1913         [ 0x00c6, "Return Volume/Directory Number,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1914         [ 0x00d0, "Return EAHandle,Information Level 5,Immediate Close Handle" ],
1915         [ 0x00d1, "Return NetWareHandle,Information Level 5,Immediate Close Handle" ],
1916         [ 0x00d2, "Return Volume/Directory Number,Information Level 5,Immediate Close Handle" ],
1917         [ 0x00d4, "Return EAHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1918         [ 0x00d5, "Return NetWareHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1919         [ 0x00d6, "Return Volume/Directory Number,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1920         [ 0x00e0, "Return EAHandle,Information Level 6,Immediate Close Handle" ],
1921         [ 0x00e1, "Return NetWareHandle,Information Level 6,Immediate Close Handle" ],
1922         [ 0x00e2, "Return Volume/Directory Number,Information Level 6,Immediate Close Handle" ],
1923         [ 0x00e4, "Return EAHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1924         [ 0x00e5, "Return NetWareHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1925         [ 0x00e6, "Return Volume/Directory Number,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1926         [ 0x00f0, "Return EAHandle,Information Level 7,Immediate Close Handle" ],
1927         [ 0x00f1, "Return NetWareHandle,Information Level 7,Immediate Close Handle" ],
1928         [ 0x00f2, "Return Volume/Directory Number,Information Level 7,Immediate Close Handle" ],
1929         [ 0x00f4, "Return EAHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1930         [ 0x00f5, "Return NetWareHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1931         [ 0x00f6, "Return Volume/Directory Number,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1932 ])
1933 EAHandle                        = uint32("ea_handle", "EA Handle")
1934 EAHandle.Display("BASE_HEX")
1935 EAHandleOrNetWareHandleOrVolume = uint32("ea_handle_or_netware_handle_or_volume", "EAHandle or NetWare Handle or Volume (see EAFlags)")
1936 EAHandleOrNetWareHandleOrVolume.Display("BASE_HEX")
1937 EAKey                           = nstring16("ea_key", "EA Key")
1938 EAKeySize                       = uint32("ea_key_size", "Key Size")
1939 EAKeySizeDuplicated             = uint32("ea_key_size_duplicated", "Key Size Duplicated")
1940 EAValue                         = nstring16("ea_value", "EA Value")
1941 EAValueRep                      = fw_string("ea_value_rep", "EA Value", 1)
1942 EAValueLength                   = uint16("ea_value_length", "Value Length")
1943 EchoSocket                      = uint16("echo_socket", "Echo Socket")
1944 EchoSocket.Display('BASE_HEX')
1945 EffectiveRights                 = bitfield8("effective_rights", "Effective Rights", [
1946         bf_boolean8(0x01, "effective_rights_read", "Read Rights"),
1947         bf_boolean8(0x02, "effective_rights_write", "Write Rights"),
1948         bf_boolean8(0x04, "effective_rights_open", "Open Rights"),
1949         bf_boolean8(0x08, "effective_rights_create", "Create Rights"),
1950         bf_boolean8(0x10, "effective_rights_delete", "Delete Rights"),
1951         bf_boolean8(0x20, "effective_rights_parental", "Parental Rights"),
1952         bf_boolean8(0x40, "effective_rights_search", "Search Rights"),
1953         bf_boolean8(0x80, "effective_rights_modify", "Modify Rights"),
1954 ])
1955 EnumInfoMask                    = bitfield8("enum_info_mask", "Return Information Mask", [
1956         bf_boolean8(0x01, "enum_info_transport", "Transport Information"),
1957         bf_boolean8(0x02, "enum_info_time", "Time Information"),
1958         bf_boolean8(0x04, "enum_info_name", "Name Information"),
1959         bf_boolean8(0x08, "enum_info_lock", "Lock Information"),
1960         bf_boolean8(0x10, "enum_info_print", "Print Information"),
1961         bf_boolean8(0x20, "enum_info_stats", "Statistical Information"),
1962         bf_boolean8(0x40, "enum_info_account", "Accounting Information"),
1963         bf_boolean8(0x80, "enum_info_auth", "Authentication Information"),
1964 ])
1965
1966 eventOffset                     = bytes("event_offset", "Event Offset", 8)
1967 eventOffset.Display("BASE_HEX")
1968 eventTime                       = uint32("event_time", "Event Time")
1969 eventTime.Display("BASE_HEX")
1970 ExpirationTime                  = uint32("expiration_time", "Expiration Time")
1971 ExpirationTime.Display('BASE_HEX')
1972 ExtAttrDataSize                 = uint32("ext_attr_data_size", "Extended Attributes Data Size")
1973 ExtAttrCount                    = uint32("ext_attr_count", "Extended Attributes Count")
1974 ExtAttrKeySize                  = uint32("ext_attr_key_size", "Extended Attributes Key Size")
1975 ExtendedAttributesDefined       = uint32("extended_attributes_defined", "Extended Attributes Defined")
1976 ExtendedAttributeExtantsUsed    = uint32("extended_attribute_extants_used", "Extended Attribute Extants Used")
1977 ExtendedInfo                    = bitfield16("ext_info", "Extended Return Information", [
1978         bf_boolean16(0x0001, "ext_info_update", "Update"),
1979         bf_boolean16(0x0002, "ext_info_dos_name", "DOS Name"),
1980         bf_boolean16(0x0004, "ext_info_flush", "Flush"),
1981         bf_boolean16(0x0008, "ext_info_parental", "Parental"),
1982         bf_boolean16(0x0010, "ext_info_mac_finder", "MAC Finder"),
1983         bf_boolean16(0x0020, "ext_info_sibling", "Sibling"),
1984         bf_boolean16(0x0040, "ext_info_effective", "Effective"),
1985         bf_boolean16(0x0080, "ext_info_mac_date", "MAC Date"),
1986         bf_boolean16(0x0100, "ext_info_access", "Last Access"),
1987         bf_boolean16(0x0400, "ext_info_64_bit_fs", "64 Bit File Sizes"),
1988         bf_boolean16(0x8000, "ext_info_newstyle", "New Style"),
1989 ])
1990 ExtRouterActiveFlag             = boolean8("ext_router_active_flag", "External Router Active Flag")
1991
1992 FailedAllocReqCnt               = uint32("failed_alloc_req", "Failed Alloc Request Count")
1993 FatalFATWriteErrors             = uint16("fatal_fat_write_errors", "Fatal FAT Write Errors")
1994 FATScanErrors                   = uint16("fat_scan_errors", "FAT Scan Errors")
1995 FATWriteErrors                  = uint16("fat_write_errors", "FAT Write Errors")
1996 FieldsLenTable                  = bytes("fields_len_table", "Fields Len Table", 32)
1997 FileCount                       = uint16("file_count", "File Count")
1998 FileDate                        = uint16("file_date", "File Date")
1999 FileDate.NWDate()
2000 FileDirWindow                   = uint16("file_dir_win", "File/Dir Window")
2001 FileDirWindow.Display("BASE_HEX")
2002 FileExecuteType                 = uint8("file_execute_type", "File Execute Type")
2003 FileExtendedAttributes          = val_string8("file_ext_attr", "File Extended Attributes", [
2004         [ 0x00, "Search On All Read Only Opens" ],
2005         [ 0x01, "Search On Read Only Opens With No Path" ],
2006         [ 0x02, "Shell Default Search Mode" ],
2007         [ 0x03, "Search On All Opens With No Path" ],
2008         [ 0x04, "Do Not Search" ],
2009         [ 0x05, "Reserved" ],
2010         [ 0x06, "Search On All Opens" ],
2011         [ 0x07, "Reserved" ],
2012         [ 0x08, "Search On All Read Only Opens/Indexed" ],
2013         [ 0x09, "Search On Read Only Opens With No Path/Indexed" ],
2014         [ 0x0a, "Shell Default Search Mode/Indexed" ],
2015         [ 0x0b, "Search On All Opens With No Path/Indexed" ],
2016         [ 0x0c, "Do Not Search/Indexed" ],
2017         [ 0x0d, "Indexed" ],
2018         [ 0x0e, "Search On All Opens/Indexed" ],
2019         [ 0x0f, "Indexed" ],
2020         [ 0x10, "Search On All Read Only Opens/Transactional" ],
2021         [ 0x11, "Search On Read Only Opens With No Path/Transactional" ],
2022         [ 0x12, "Shell Default Search Mode/Transactional" ],
2023         [ 0x13, "Search On All Opens With No Path/Transactional" ],
2024         [ 0x14, "Do Not Search/Transactional" ],
2025         [ 0x15, "Transactional" ],
2026         [ 0x16, "Search On All Opens/Transactional" ],
2027         [ 0x17, "Transactional" ],
2028         [ 0x18, "Search On All Read Only Opens/Indexed/Transactional" ],
2029         [ 0x19, "Search On Read Only Opens With No Path/Indexed/Transactional" ],
2030         [ 0x1a, "Shell Default Search Mode/Indexed/Transactional" ],
2031         [ 0x1b, "Search On All Opens With No Path/Indexed/Transactional" ],
2032         [ 0x1c, "Do Not Search/Indexed/Transactional" ],
2033         [ 0x1d, "Indexed/Transactional" ],
2034         [ 0x1e, "Search On All Opens/Indexed/Transactional" ],
2035         [ 0x1f, "Indexed/Transactional" ],
2036         [ 0x40, "Search On All Read Only Opens/Read Audit" ],
2037         [ 0x41, "Search On Read Only Opens With No Path/Read Audit" ],
2038         [ 0x42, "Shell Default Search Mode/Read Audit" ],
2039         [ 0x43, "Search On All Opens With No Path/Read Audit" ],
2040         [ 0x44, "Do Not Search/Read Audit" ],
2041         [ 0x45, "Read Audit" ],
2042         [ 0x46, "Search On All Opens/Read Audit" ],
2043         [ 0x47, "Read Audit" ],
2044         [ 0x48, "Search On All Read Only Opens/Indexed/Read Audit" ],
2045         [ 0x49, "Search On Read Only Opens With No Path/Indexed/Read Audit" ],
2046         [ 0x4a, "Shell Default Search Mode/Indexed/Read Audit" ],
2047         [ 0x4b, "Search On All Opens With No Path/Indexed/Read Audit" ],
2048         [ 0x4c, "Do Not Search/Indexed/Read Audit" ],
2049         [ 0x4d, "Indexed/Read Audit" ],
2050         [ 0x4e, "Search On All Opens/Indexed/Read Audit" ],
2051         [ 0x4f, "Indexed/Read Audit" ],
2052         [ 0x50, "Search On All Read Only Opens/Transactional/Read Audit" ],
2053         [ 0x51, "Search On Read Only Opens With No Path/Transactional/Read Audit" ],
2054         [ 0x52, "Shell Default Search Mode/Transactional/Read Audit" ],
2055         [ 0x53, "Search On All Opens With No Path/Transactional/Read Audit" ],
2056         [ 0x54, "Do Not Search/Transactional/Read Audit" ],
2057         [ 0x55, "Transactional/Read Audit" ],
2058         [ 0x56, "Search On All Opens/Transactional/Read Audit" ],
2059         [ 0x57, "Transactional/Read Audit" ],
2060         [ 0x58, "Search On All Read Only Opens/Indexed/Transactional/Read Audit" ],
2061         [ 0x59, "Search On Read Only Opens With No Path/Indexed/Transactional/Read Audit" ],
2062         [ 0x5a, "Shell Default Search Mode/Indexed/Transactional/Read Audit" ],
2063         [ 0x5b, "Search On All Opens With No Path/Indexed/Transactional/Read Audit" ],
2064         [ 0x5c, "Do Not Search/Indexed/Transactional/Read Audit" ],
2065         [ 0x5d, "Indexed/Transactional/Read Audit" ],
2066         [ 0x5e, "Search On All Opens/Indexed/Transactional/Read Audit" ],
2067         [ 0x5f, "Indexed/Transactional/Read Audit" ],
2068         [ 0x80, "Search On All Read Only Opens/Write Audit" ],
2069         [ 0x81, "Search On Read Only Opens With No Path/Write Audit" ],
2070         [ 0x82, "Shell Default Search Mode/Write Audit" ],
2071         [ 0x83, "Search On All Opens With No Path/Write Audit" ],
2072         [ 0x84, "Do Not Search/Write Audit" ],
2073         [ 0x85, "Write Audit" ],
2074         [ 0x86, "Search On All Opens/Write Audit" ],
2075         [ 0x87, "Write Audit" ],
2076         [ 0x88, "Search On All Read Only Opens/Indexed/Write Audit" ],
2077         [ 0x89, "Search On Read Only Opens With No Path/Indexed/Write Audit" ],
2078         [ 0x8a, "Shell Default Search Mode/Indexed/Write Audit" ],
2079         [ 0x8b, "Search On All Opens With No Path/Indexed/Write Audit" ],
2080         [ 0x8c, "Do Not Search/Indexed/Write Audit" ],
2081         [ 0x8d, "Indexed/Write Audit" ],
2082         [ 0x8e, "Search On All Opens/Indexed/Write Audit" ],
2083         [ 0x8f, "Indexed/Write Audit" ],
2084         [ 0x90, "Search On All Read Only Opens/Transactional/Write Audit" ],
2085         [ 0x91, "Search On Read Only Opens With No Path/Transactional/Write Audit" ],
2086         [ 0x92, "Shell Default Search Mode/Transactional/Write Audit" ],
2087         [ 0x93, "Search On All Opens With No Path/Transactional/Write Audit" ],
2088         [ 0x94, "Do Not Search/Transactional/Write Audit" ],
2089         [ 0x95, "Transactional/Write Audit" ],
2090         [ 0x96, "Search On All Opens/Transactional/Write Audit" ],
2091         [ 0x97, "Transactional/Write Audit" ],
2092         [ 0x98, "Search On All Read Only Opens/Indexed/Transactional/Write Audit" ],
2093         [ 0x99, "Search On Read Only Opens With No Path/Indexed/Transactional/Write Audit" ],
2094         [ 0x9a, "Shell Default Search Mode/Indexed/Transactional/Write Audit" ],
2095         [ 0x9b, "Search On All Opens With No Path/Indexed/Transactional/Write Audit" ],
2096         [ 0x9c, "Do Not Search/Indexed/Transactional/Write Audit" ],
2097         [ 0x9d, "Indexed/Transactional/Write Audit" ],
2098         [ 0x9e, "Search On All Opens/Indexed/Transactional/Write Audit" ],
2099         [ 0x9f, "Indexed/Transactional/Write Audit" ],
2100         [ 0xa0, "Search On All Read Only Opens/Read Audit/Write Audit" ],
2101         [ 0xa1, "Search On Read Only Opens With No Path/Read Audit/Write Audit" ],
2102         [ 0xa2, "Shell Default Search Mode/Read Audit/Write Audit" ],
2103         [ 0xa3, "Search On All Opens With No Path/Read Audit/Write Audit" ],
2104         [ 0xa4, "Do Not Search/Read Audit/Write Audit" ],
2105         [ 0xa5, "Read Audit/Write Audit" ],
2106         [ 0xa6, "Search On All Opens/Read Audit/Write Audit" ],
2107         [ 0xa7, "Read Audit/Write Audit" ],
2108         [ 0xa8, "Search On All Read Only Opens/Indexed/Read Audit/Write Audit" ],
2109         [ 0xa9, "Search On Read Only Opens With No Path/Indexed/Read Audit/Write Audit" ],
2110         [ 0xaa, "Shell Default Search Mode/Indexed/Read Audit/Write Audit" ],
2111         [ 0xab, "Search On All Opens With No Path/Indexed/Read Audit/Write Audit" ],
2112         [ 0xac, "Do Not Search/Indexed/Read Audit/Write Audit" ],
2113         [ 0xad, "Indexed/Read Audit/Write Audit" ],
2114         [ 0xae, "Search On All Opens/Indexed/Read Audit/Write Audit" ],
2115         [ 0xaf, "Indexed/Read Audit/Write Audit" ],
2116         [ 0xb0, "Search On All Read Only Opens/Transactional/Read Audit/Write Audit" ],
2117         [ 0xb1, "Search On Read Only Opens With No Path/Transactional/Read Audit/Write Audit" ],
2118         [ 0xb2, "Shell Default Search Mode/Transactional/Read Audit/Write Audit" ],
2119         [ 0xb3, "Search On All Opens With No Path/Transactional/Read Audit/Write Audit" ],
2120         [ 0xb4, "Do Not Search/Transactional/Read Audit/Write Audit" ],
2121         [ 0xb5, "Transactional/Read Audit/Write Audit" ],
2122         [ 0xb6, "Search On All Opens/Transactional/Read Audit/Write Audit" ],
2123         [ 0xb7, "Transactional/Read Audit/Write Audit" ],
2124         [ 0xb8, "Search On All Read Only Opens/Indexed/Transactional/Read Audit/Write Audit" ],
2125         [ 0xb9, "Search On Read Only Opens With No Path/Indexed/Transactional/Read Audit/Write Audit" ],
2126         [ 0xba, "Shell Default Search Mode/Indexed/Transactional/Read Audit/Write Audit" ],
2127         [ 0xbb, "Search On All Opens With No Path/Indexed/Transactional/Read Audit/Write Audit" ],
2128         [ 0xbc, "Do Not Search/Indexed/Transactional/Read Audit/Write Audit" ],
2129         [ 0xbd, "Indexed/Transactional/Read Audit/Write Audit" ],
2130         [ 0xbe, "Search On All Opens/Indexed/Transactional/Read Audit/Write Audit" ],
2131         [ 0xbf, "Indexed/Transactional/Read Audit/Write Audit" ],
2132 ])
2133 fileFlags                       = uint32("file_flags", "File Flags")
2134 FileHandle                      = bytes("file_handle", "File Handle", 6)
2135 FileLimbo                       = uint32("file_limbo", "File Limbo")
2136 FileListCount                   = uint32("file_list_count", "File List Count")
2137 FileLock                        = val_string8("file_lock", "File Lock", [
2138         [ 0x00, "Not Locked" ],
2139         [ 0xfe, "Locked by file lock" ],
2140         [ 0xff, "Unknown" ],
2141 ])
2142 FileLockCount                   = uint16("file_lock_count", "File Lock Count")
2143 FileMode                        = uint8("file_mode", "File Mode")
2144 FileName                        = nstring8("file_name", "Filename")
2145 FileName12                      = fw_string("file_name_12", "Filename", 12)
2146 FileName14                      = fw_string("file_name_14", "Filename", 14)
2147 FileNameLen                     = uint8("file_name_len", "Filename Length")
2148 FileOffset                      = uint32("file_offset", "File Offset")
2149 FilePath                        = nstring8("file_path", "File Path")
2150 FileSize                        = uint32("file_size", "File Size")
2151 FileSystemID                    = uint8("file_system_id", "File System ID")
2152 FileTime                        = uint16("file_time", "File Time")
2153 FileTime.NWTime()
2154 FileWriteFlags                  = val_string8("file_write_flags", "File Write Flags", [
2155         [ 0x01, "Writing" ],
2156         [ 0x02, "Write aborted" ],
2157 ])
2158 FileWriteState                  = val_string8("file_write_state", "File Write State", [
2159         [ 0x00, "Not Writing" ],
2160         [ 0x01, "Write in Progress" ],
2161         [ 0x02, "Write Being Stopped" ],
2162 ])
2163 Filler                          = uint8("filler", "Filler")
2164 FinderAttr                      = bitfield16("finder_attr", "Finder Info Attributes", [
2165         bf_boolean16(0x0001, "finder_attr_desktop", "Object on Desktop"),
2166         bf_boolean16(0x2000, "finder_attr_invisible", "Object is Invisible"),
2167         bf_boolean16(0x4000, "finder_attr_bundle", "Object Has Bundle"),
2168 ])
2169 FixedBitMask                    = uint32("fixed_bit_mask", "Fixed Bit Mask")
2170 FixedBitsDefined                = uint16("fixed_bits_defined", "Fixed Bits Defined")
2171 FlagBits                        = uint8("flag_bits", "Flag Bits")
2172 Flags                           = uint8("flags", "Flags")
2173 FlagsDef                        = uint16("flags_def", "Flags")
2174 FlushTime                       = uint32("flush_time", "Flush Time")
2175 FolderFlag                      = val_string8("folder_flag", "Folder Flag", [
2176         [ 0x00, "Not a Folder" ],
2177         [ 0x01, "Folder" ],
2178 ])
2179 ForkCount                       = uint8("fork_count", "Fork Count")
2180 ForkIndicator                   = val_string8("fork_indicator", "Fork Indicator", [
2181         [ 0x00, "Data Fork" ],
2182         [ 0x01, "Resource Fork" ],
2183 ])
2184 ForceFlag                       = val_string8("force_flag", "Force Server Down Flag", [
2185         [ 0x00, "Down Server if No Files Are Open" ],
2186         [ 0xff, "Down Server Immediately, Auto-Close Open Files" ],
2187 ])
2188 ForgedDetachedRequests          = uint16("forged_detached_requests", "Forged Detached Requests")
2189 FormType                        = uint16( "form_type", "Form Type" )
2190 FormTypeCnt                     = uint32("form_type_count", "Form Types Count")
2191 FoundSomeMem                    = uint32("found_some_mem", "Found Some Memory")
2192 FractionalSeconds               = uint32("fractional_time", "Fractional Time in Seconds")
2193 FraggerHandle                   = uint32("fragger_handle", "Fragment Handle")
2194 FraggerHandle.Display('BASE_HEX')
2195 FragmentWriteOccurred           = uint16("fragment_write_occurred", "Fragment Write Occurred")
2196 FragSize                        = uint32("frag_size", "Fragment Size")
2197 FreeableLimboSectors            = uint32("freeable_limbo_sectors", "Freeable Limbo Sectors")
2198 FreeBlocks                      = uint32("free_blocks", "Free Blocks")
2199 FreedClusters                   = uint32("freed_clusters", "Freed Clusters")
2200 FreeDirectoryEntries            = uint16("free_directory_entries", "Free Directory Entries")
2201 FSEngineFlag                    = boolean8("fs_engine_flag", "FS Engine Flag")
2202 FullName                        = fw_string("full_name", "Full Name", 39)
2203
2204 GetSetFlag                      = val_string8("get_set_flag", "Get Set Flag", [
2205         [ 0x00, "Get the default support module ID" ],
2206         [ 0x01, "Set the default support module ID" ],
2207 ])      
2208 GUID                            = bytes("guid", "GUID", 16)
2209 GUID.Display("BASE_HEX")
2210
2211 HandleFlag                      = val_string8("handle_flag", "Handle Flag", [
2212         [ 0x00, "Short Directory Handle" ],
2213         [ 0x01, "Directory Base" ],
2214         [ 0xFF, "No Handle Present" ],
2215 ])
2216 HandleInfoLevel                 = val_string8("handle_info_level", "Handle Info Level", [
2217         [ 0x00, "Get Limited Information from a File Handle" ],
2218         [ 0x01, "Get Limited Information from a File Handle Using a Name Space" ],
2219         [ 0x02, "Get Information from a File Handle" ],
2220         [ 0x03, "Get Information from a Directory Handle" ],
2221         [ 0x04, "Get Complete Information from a Directory Handle" ],
2222         [ 0x05, "Get Complete Information from a File Handle" ],
2223 ])
2224 HeldBytesRead                   = bytes("held_bytes_read", "Held Bytes Read", 6)
2225 HeldBytesWritten                = bytes("held_bytes_write", "Held Bytes Written", 6)
2226 HeldConnectTimeInMinutes        = uint32("held_conn_time", "Held Connect Time in Minutes")
2227 HeldRequests                    = uint32("user_info_held_req", "Held Requests")
2228 HoldAmount                      = uint32("hold_amount", "Hold Amount")
2229 HoldCancelAmount                = uint32("hold_cancel_amount", "Hold Cancel Amount")
2230 HolderID                        = uint32("holder_id", "Holder ID")
2231 HolderID.Display("BASE_HEX")
2232 HoldTime                        = uint32("hold_time", "Hold Time")
2233 HopsToNet                       = uint16("hops_to_net", "Hop Count")
2234 HorizLocation                   = uint16("horiz_location", "Horizontal Location")
2235 HostAddress                     = bytes("host_address", "Host Address", 6)
2236 HotFixBlocksAvailable           = uint16("hot_fix_blocks_available", "Hot Fix Blocks Available")
2237 HotFixDisabled                  = val_string8("hot_fix_disabled", "Hot Fix Disabled", [
2238         [ 0x00, "Enabled" ],
2239         [ 0x01, "Disabled" ],
2240 ])
2241 HotFixTableSize                 = uint16("hot_fix_table_size", "Hot Fix Table Size")
2242 HotFixTableStart                = uint32("hot_fix_table_start", "Hot Fix Table Start")
2243 Hour                            = uint8("s_hour", "Hour")
2244 HugeBitMask                     = uint32("huge_bit_mask", "Huge Bit Mask")
2245 HugeBitsDefined                 = uint16("huge_bits_defined", "Huge Bits Defined")
2246 HugeData                        = nstring8("huge_data", "Huge Data")
2247 HugeDataUsed                    = uint32("huge_data_used", "Huge Data Used")
2248 HugeStateInfo                   = bytes("huge_state_info", "Huge State Info", 16)
2249
2250 IdentificationNumber            = uint32("identification_number", "Identification Number")
2251 IgnoredRxPkts                   = uint32("ignored_rx_pkts", "Ignored Receive Packets")
2252 IncomingPacketDiscardedNoDGroup = uint16("incoming_packet_discarded_no_dgroup", "Incoming Packet Discarded No DGroup")
2253 InfoCount                       = uint16("info_count", "Info Count")
2254 InfoFlags                       = bitfield32("info_flags", "Info Flags", [
2255         bf_boolean32(0x10000000, "info_flags_security", "Return Object Security"),
2256         bf_boolean32(0x20000000, "info_flags_flags", "Return Object Flags"),
2257         bf_boolean32(0x40000000, "info_flags_type", "Return Object Type"),
2258         bf_boolean32(0x80000000, "info_flags_name", "Return Object Name"),
2259 ])
2260 InfoLevelNumber                 = val_string8("info_level_num", "Information Level Number", [
2261         [ 0x01, "Volume Information Definition" ],
2262         [ 0x02, "Volume Information 2 Definition" ],
2263 ])        
2264 InfoMask                        = bitfield32("info_mask", "Information Mask", [
2265         bf_boolean32(0x00000001, "info_flags_dos_time", "DOS Time"),
2266         bf_boolean32(0x00000002, "info_flags_ref_count", "Reference Count"),
2267         bf_boolean32(0x00000004, "info_flags_dos_attr", "DOS Attributes"),
2268         bf_boolean32(0x00000008, "info_flags_ids", "ID's"),
2269         bf_boolean32(0x00000010, "info_flags_ds_sizes", "Data Stream Sizes"),
2270         bf_boolean32(0x00000020, "info_flags_ns_attr", "Name Space Attributes"),
2271         bf_boolean32(0x00000040, "info_flags_ea_present", "EA Present Flag"),
2272         bf_boolean32(0x00000080, "info_flags_all_attr", "All Attributes"),
2273         bf_boolean32(0x00000100, "info_flags_all_dirbase_num", "All Directory Base Numbers"),
2274         bf_boolean32(0x00000200, "info_flags_max_access_mask", "Maximum Access Mask"),
2275         bf_boolean32(0x00000400, "info_flags_flush_time", "Flush Time"),
2276         bf_boolean32(0x00000800, "info_flags_prnt_base_id", "Parent Base ID"),
2277         bf_boolean32(0x00001000, "info_flags_mac_finder", "Mac Finder Information"),
2278         bf_boolean32(0x00002000, "info_flags_sibling_cnt", "Sibling Count"),
2279         bf_boolean32(0x00004000, "info_flags_effect_rights", "Effective Rights"),
2280         bf_boolean32(0x00008000, "info_flags_mac_time", "Mac Time"),
2281         bf_boolean32(0x20000000, "info_mask_dosname", "DOS Name"),
2282         bf_boolean32(0x40000000, "info_mask_c_name_space", "Creator Name Space & Name"),
2283         bf_boolean32(0x80000000, "info_mask_name", "Name"),
2284 ])
2285 InheritedRightsMask             = bitfield16("inherited_rights_mask", "Inherited Rights Mask", [ 
2286         bf_boolean16(0x0001, "inh_rights_read", "Read Rights"),
2287         bf_boolean16(0x0002, "inh_rights_write", "Write Rights"),
2288         bf_boolean16(0x0004, "inh_rights_open", "Open Rights"),
2289         bf_boolean16(0x0008, "inh_rights_create", "Create Rights"),
2290         bf_boolean16(0x0010, "inh_rights_delete", "Delete Rights"),
2291         bf_boolean16(0x0020, "inh_rights_parent", "Change Access"),
2292         bf_boolean16(0x0040, "inh_rights_search", "See Files Flag"),
2293         bf_boolean16(0x0080, "inh_rights_modify", "Modify Rights"),
2294         bf_boolean16(0x0100, "inh_rights_supervisor", "Supervisor"),
2295 ])
2296 InheritanceRevokeMask           = bitfield16("inheritance_revoke_mask", "Revoke Rights Mask", [
2297         bf_boolean16(0x0001, "inh_revoke_read", "Read Rights"),
2298         bf_boolean16(0x0002, "inh_revoke_write", "Write Rights"),
2299         bf_boolean16(0x0004, "inh_revoke_open", "Open Rights"),
2300         bf_boolean16(0x0008, "inh_revoke_create", "Create Rights"),
2301         bf_boolean16(0x0010, "inh_revoke_delete", "Delete Rights"),
2302         bf_boolean16(0x0020, "inh_revoke_parent", "Change Access"),
2303         bf_boolean16(0x0040, "inh_revoke_search", "See Files Flag"),
2304         bf_boolean16(0x0080, "inh_revoke_modify", "Modify Rights"),
2305         bf_boolean16(0x0100, "inh_revoke_supervisor", "Supervisor"),
2306 ])
2307 InitialSemaphoreValue           = uint8("initial_semaphore_value", "Initial Semaphore Value")
2308 InspectSize                     = uint32("inspect_size", "Inspect Size")
2309 InternetBridgeVersion           = uint8("internet_bridge_version", "Internet Bridge Version")
2310 InterruptNumbersUsed            = uint32("interrupt_numbers_used", "Interrupt Numbers Used")
2311 InUse                           = uint32("in_use", "Bytes in Use")
2312 IOAddressesUsed                 = bytes("io_addresses_used", "IO Addresses Used", 8)
2313 IOErrorCount                    = uint16("io_error_count", "IO Error Count")
2314 IOEngineFlag                    = boolean8("io_engine_flag", "IO Engine Flag")
2315 IPXNotMyNetwork                 = uint16("ipx_not_my_network", "IPX Not My Network")
2316 ItemsChanged                    = uint32("items_changed", "Items Changed")
2317 ItemsChecked                    = uint32("items_checked", "Items Checked")
2318 ItemsCount                      = uint32("items_count", "Items Count")
2319 itemsInList                     = uint32("items_in_list", "Items in List")
2320 ItemsInPacket                   = uint32("items_in_packet", "Items in Packet")
2321
2322 JobControlFlags                 = bitfield8("job_control_flags", "Job Control Flags", [
2323         bf_boolean8(0x08, "job_control_job_recovery", "Job Recovery"),
2324         bf_boolean8(0x10, "job_control_reservice", "ReService Job"),
2325         bf_boolean8(0x20, "job_control_file_open", "File Open"),
2326         bf_boolean8(0x40, "job_control_user_hold", "User Hold"),
2327         bf_boolean8(0x80, "job_control_operator_hold", "Operator Hold"),
2328
2329 ])
2330 JobControlFlagsWord             = bitfield16("job_control_flags_word", "Job Control Flags", [
2331         bf_boolean16(0x0008, "job_control1_job_recovery", "Job Recovery"),
2332         bf_boolean16(0x0010, "job_control1_reservice", "ReService Job"),
2333         bf_boolean16(0x0020, "job_control1_file_open", "File Open"),
2334         bf_boolean16(0x0040, "job_control1_user_hold", "User Hold"),
2335         bf_boolean16(0x0080, "job_control1_operator_hold", "Operator Hold"),
2336
2337 ])
2338 JobCount                        = uint32("job_count", "Job Count")
2339 JobFileHandle                   = bytes("job_file_handle", "Job File Handle", 6)
2340 JobFileHandleLong               = uint32("job_file_handle_long", "Job File Handle")
2341 JobFileHandleLong.Display("BASE_HEX")
2342 JobFileName                     = fw_string("job_file_name", "Job File Name", 14)
2343 JobPosition                     = uint8("job_position", "Job Position")
2344 JobPositionWord                 = uint16("job_position_word", "Job Position")
2345 JobNumber                       = uint16("job_number", "Job Number", BE )
2346 JobNumberLong                   = uint32("job_number_long", "Job Number", BE )
2347 JobNumberList                   = uint32("job_number_list", "Job Number List")
2348 JobType                         = uint16("job_type", "Job Type", BE )
2349
2350 LANCustomVariablesCount         = uint32("lan_cust_var_count", "LAN Custom Variables Count")
2351 LANdriverBoardInstance          = uint16("lan_drv_bd_inst", "LAN Driver Board Instance")
2352 LANdriverBoardNumber            = uint16("lan_drv_bd_num", "LAN Driver Board Number")
2353 LANdriverCardID                 = uint16("lan_drv_card_id", "LAN Driver Card ID")
2354 LANdriverCardName               = fw_string("lan_drv_card_name", "LAN Driver Card Name", 28)
2355 LANdriverCFG_MajorVersion       = uint8("lan_dvr_cfg_major_vrs", "LAN Driver Config - Major Version")
2356 LANdriverCFG_MinorVersion       = uint8("lan_dvr_cfg_minor_vrs", "LAN Driver Config - Minor Version")
2357 LANdriverDMAUsage1              = uint8("lan_drv_dma_usage1", "Primary DMA Channel")
2358 LANdriverDMAUsage2              = uint8("lan_drv_dma_usage2", "Secondary DMA Channel")
2359 LANdriverFlags                  = uint16("lan_drv_flags", "LAN Driver Flags")
2360 LANdriverFlags.Display("BASE_HEX")        
2361 LANdriverInterrupt1             = uint8("lan_drv_interrupt1", "Primary Interrupt Vector")
2362 LANdriverInterrupt2             = uint8("lan_drv_interrupt2", "Secondary Interrupt Vector")
2363 LANdriverIOPortsAndRanges1      = uint16("lan_drv_io_ports_and_ranges_1", "Primary Base I/O Port")
2364 LANdriverIOPortsAndRanges2      = uint16("lan_drv_io_ports_and_ranges_2", "Number of I/O Ports")
2365 LANdriverIOPortsAndRanges3      = uint16("lan_drv_io_ports_and_ranges_3", "Secondary Base I/O Port")
2366 LANdriverIOPortsAndRanges4      = uint16("lan_drv_io_ports_and_ranges_4", "Number of I/O Ports")
2367 LANdriverIOReserved             = bytes("lan_drv_io_reserved", "LAN Driver IO Reserved", 14)
2368 LANdriverLineSpeed              = uint16("lan_drv_line_speed", "LAN Driver Line Speed")
2369 LANdriverLink                   = uint32("lan_drv_link", "LAN Driver Link")
2370 LANdriverLogicalName            = bytes("lan_drv_log_name", "LAN Driver Logical Name", 18)
2371 LANdriverMajorVersion           = uint8("lan_drv_major_ver", "LAN Driver Major Version")
2372 LANdriverMaximumSize            = uint32("lan_drv_max_size", "LAN Driver Maximum Size")
2373 LANdriverMaxRecvSize            = uint32("lan_drv_max_rcv_size", "LAN Driver Maximum Receive Size")
2374 LANdriverMediaID                = uint16("lan_drv_media_id", "LAN Driver Media ID")
2375 LANdriverMediaType              = fw_string("lan_drv_media_type", "LAN Driver Media Type", 40)
2376 LANdriverMemoryDecode0          = uint32("lan_drv_mem_decode_0", "LAN Driver Memory Decode 0")
2377 LANdriverMemoryDecode1          = uint32("lan_drv_mem_decode_1", "LAN Driver Memory Decode 1")
2378 LANdriverMemoryLength0          = uint16("lan_drv_mem_length_0", "LAN Driver Memory Length 0")
2379 LANdriverMemoryLength1          = uint16("lan_drv_mem_length_1", "LAN Driver Memory Length 1")
2380 LANdriverMinorVersion           = uint8("lan_drv_minor_ver", "LAN Driver Minor Version")
2381 LANdriverModeFlags              = val_string8("lan_dvr_mode_flags", "LAN Driver Mode Flags", [
2382         [0x80, "Canonical Address" ],
2383         [0x81, "Canonical Address" ],
2384         [0x82, "Canonical Address" ],
2385         [0x83, "Canonical Address" ],
2386         [0x84, "Canonical Address" ],
2387         [0x85, "Canonical Address" ],
2388         [0x86, "Canonical Address" ],
2389         [0x87, "Canonical Address" ],
2390         [0x88, "Canonical Address" ],
2391         [0x89, "Canonical Address" ],
2392         [0x8a, "Canonical Address" ],
2393         [0x8b, "Canonical Address" ],
2394         [0x8c, "Canonical Address" ],
2395         [0x8d, "Canonical Address" ],
2396         [0x8e, "Canonical Address" ],
2397         [0x8f, "Canonical Address" ],
2398         [0x90, "Canonical Address" ],
2399         [0x91, "Canonical Address" ],
2400         [0x92, "Canonical Address" ],
2401         [0x93, "Canonical Address" ],
2402         [0x94, "Canonical Address" ],
2403         [0x95, "Canonical Address" ],
2404         [0x96, "Canonical Address" ],
2405         [0x97, "Canonical Address" ],
2406         [0x98, "Canonical Address" ],
2407         [0x99, "Canonical Address" ],
2408         [0x9a, "Canonical Address" ],
2409         [0x9b, "Canonical Address" ],
2410         [0x9c, "Canonical Address" ],
2411         [0x9d, "Canonical Address" ],
2412         [0x9e, "Canonical Address" ],
2413         [0x9f, "Canonical Address" ],
2414         [0xa0, "Canonical Address" ],
2415         [0xa1, "Canonical Address" ],
2416         [0xa2, "Canonical Address" ],
2417         [0xa3, "Canonical Address" ],
2418         [0xa4, "Canonical Address" ],
2419         [0xa5, "Canonical Address" ],
2420         [0xa6, "Canonical Address" ],
2421         [0xa7, "Canonical Address" ],
2422         [0xa8, "Canonical Address" ],
2423         [0xa9, "Canonical Address" ],
2424         [0xaa, "Canonical Address" ],
2425         [0xab, "Canonical Address" ],
2426         [0xac, "Canonical Address" ],
2427         [0xad, "Canonical Address" ],
2428         [0xae, "Canonical Address" ],
2429         [0xaf, "Canonical Address" ],
2430         [0xb0, "Canonical Address" ],
2431         [0xb1, "Canonical Address" ],
2432         [0xb2, "Canonical Address" ],
2433         [0xb3, "Canonical Address" ],
2434         [0xb4, "Canonical Address" ],
2435         [0xb5, "Canonical Address" ],
2436         [0xb6, "Canonical Address" ],
2437         [0xb7, "Canonical Address" ],
2438         [0xb8, "Canonical Address" ],
2439         [0xb9, "Canonical Address" ],
2440         [0xba, "Canonical Address" ],
2441         [0xbb, "Canonical Address" ],
2442         [0xbc, "Canonical Address" ],
2443         [0xbd, "Canonical Address" ],
2444         [0xbe, "Canonical Address" ],
2445         [0xbf, "Canonical Address" ],
2446         [0xc0, "Non-Canonical Address" ],
2447         [0xc1, "Non-Canonical Address" ],
2448         [0xc2, "Non-Canonical Address" ],
2449         [0xc3, "Non-Canonical Address" ],
2450         [0xc4, "Non-Canonical Address" ],
2451         [0xc5, "Non-Canonical Address" ],
2452         [0xc6, "Non-Canonical Address" ],
2453         [0xc7, "Non-Canonical Address" ],
2454         [0xc8, "Non-Canonical Address" ],
2455         [0xc9, "Non-Canonical Address" ],
2456         [0xca, "Non-Canonical Address" ],
2457         [0xcb, "Non-Canonical Address" ],
2458         [0xcc, "Non-Canonical Address" ],
2459         [0xcd, "Non-Canonical Address" ],
2460         [0xce, "Non-Canonical Address" ],
2461         [0xcf, "Non-Canonical Address" ],
2462         [0xd0, "Non-Canonical Address" ],
2463         [0xd1, "Non-Canonical Address" ],
2464         [0xd2, "Non-Canonical Address" ],
2465         [0xd3, "Non-Canonical Address" ],
2466         [0xd4, "Non-Canonical Address" ],
2467         [0xd5, "Non-Canonical Address" ],
2468         [0xd6, "Non-Canonical Address" ],
2469         [0xd7, "Non-Canonical Address" ],
2470         [0xd8, "Non-Canonical Address" ],
2471         [0xd9, "Non-Canonical Address" ],
2472         [0xda, "Non-Canonical Address" ],
2473         [0xdb, "Non-Canonical Address" ],
2474         [0xdc, "Non-Canonical Address" ],
2475         [0xdd, "Non-Canonical Address" ],
2476         [0xde, "Non-Canonical Address" ],
2477         [0xdf, "Non-Canonical Address" ],
2478         [0xe0, "Non-Canonical Address" ],
2479         [0xe1, "Non-Canonical Address" ],
2480         [0xe2, "Non-Canonical Address" ],
2481         [0xe3, "Non-Canonical Address" ],
2482         [0xe4, "Non-Canonical Address" ],
2483         [0xe5, "Non-Canonical Address" ],
2484         [0xe6, "Non-Canonical Address" ],
2485         [0xe7, "Non-Canonical Address" ],
2486         [0xe8, "Non-Canonical Address" ],
2487         [0xe9, "Non-Canonical Address" ],
2488         [0xea, "Non-Canonical Address" ],
2489         [0xeb, "Non-Canonical Address" ],
2490         [0xec, "Non-Canonical Address" ],
2491         [0xed, "Non-Canonical Address" ],
2492         [0xee, "Non-Canonical Address" ],
2493         [0xef, "Non-Canonical Address" ],
2494         [0xf0, "Non-Canonical Address" ],
2495         [0xf1, "Non-Canonical Address" ],
2496         [0xf2, "Non-Canonical Address" ],
2497         [0xf3, "Non-Canonical Address" ],
2498         [0xf4, "Non-Canonical Address" ],
2499         [0xf5, "Non-Canonical Address" ],
2500         [0xf6, "Non-Canonical Address" ],
2501         [0xf7, "Non-Canonical Address" ],
2502         [0xf8, "Non-Canonical Address" ],
2503         [0xf9, "Non-Canonical Address" ],
2504         [0xfa, "Non-Canonical Address" ],
2505         [0xfb, "Non-Canonical Address" ],
2506         [0xfc, "Non-Canonical Address" ],
2507         [0xfd, "Non-Canonical Address" ],
2508         [0xfe, "Non-Canonical Address" ],
2509         [0xff, "Non-Canonical Address" ],
2510 ])        
2511 LANDriverNumber                 = uint8("lan_driver_number", "LAN Driver Number")
2512 LANdriverNodeAddress            = bytes("lan_dvr_node_addr", "LAN Driver Node Address", 6)
2513 LANdriverRecvSize               = uint32("lan_drv_rcv_size", "LAN Driver Receive Size")
2514 LANdriverReserved               = uint16("lan_drv_reserved", "LAN Driver Reserved")
2515 LANdriverSendRetries            = uint16("lan_drv_snd_retries", "LAN Driver Send Retries")
2516 LANdriverSharingFlags           = uint16("lan_drv_share", "LAN Driver Sharing Flags")
2517 LANdriverShortName              = fw_string("lan_drv_short_name", "LAN Driver Short Name", 40)
2518 LANdriverSlot                   = uint16("lan_drv_slot", "LAN Driver Slot")
2519 LANdriverSrcRouting             = uint32("lan_drv_src_route", "LAN Driver Source Routing")
2520 LANdriverTransportTime          = uint16("lan_drv_trans_time", "LAN Driver Transport Time")
2521 LastAccessedDate                = uint16("last_access_date", "Last Accessed Date")
2522 LastAccessedDate.NWDate()
2523 LastAccessedTime                = uint16("last_access_time", "Last Accessed Time")
2524 LastAccessedTime.NWTime()
2525 LastGarbCollect                 = uint32("last_garbage_collect", "Last Garbage Collection")
2526 LastInstance                    = uint32("last_instance", "Last Instance")
2527 LastRecordSeen                  = uint16("last_record_seen", "Last Record Seen")
2528 LastSearchIndex                 = uint16("last_search_index", "Search Index")
2529 LastSeen                        = uint32("last_seen", "Last Seen")
2530 LastSequenceNumber              = uint16("last_sequence_number", "Sequence Number")
2531 Level                           = uint8("level", "Level")
2532 LFSCounters                     = uint32("lfs_counters", "LFS Counters")
2533 LimboDataStreamsCount           = uint32("limbo_data_streams_count", "Limbo Data Streams Count")
2534 limbCount                       = uint32("limb_count", "Limb Count")
2535 LimboUsed                       = uint32("limbo_used", "Limbo Used")
2536 LocalConnectionID               = uint32("local_connection_id", "Local Connection ID")
2537 LocalConnectionID.Display("BASE_HEX")
2538 LocalMaxPacketSize              = uint32("local_max_packet_size", "Local Max Packet Size")
2539 LocalMaxSendSize                = uint32("local_max_send_size", "Local Max Send Size")
2540 LocalMaxRecvSize                = uint32("local_max_recv_size", "Local Max Recv Size")
2541 LocalLoginInfoCcode             = uint8("local_login_info_ccode", "Local Login Info C Code")
2542 LocalTargetSocket               = uint32("local_target_socket", "Local Target Socket")
2543 LocalTargetSocket.Display("BASE_HEX")
2544 LockAreaLen                     = uint32("lock_area_len", "Lock Area Length")
2545 LockAreasStartOffset            = uint32("lock_areas_start_offset", "Lock Areas Start Offset")
2546 LockTimeout                     = uint16("lock_timeout", "Lock Timeout")
2547 Locked                          = val_string8("locked", "Locked Flag", [
2548         [ 0x00, "Not Locked Exclusively" ],
2549         [ 0x01, "Locked Exclusively" ],
2550 ])
2551 LockFlag                        = val_string8("lock_flag", "Lock Flag", [
2552         [ 0x00, "Not Locked, Log for Future Exclusive Lock" ],
2553         [ 0x01, "Exclusive Lock (Read/Write)" ],
2554         [ 0x02, "Log for Future Shared Lock"],
2555         [ 0x03, "Shareable Lock (Read-Only)" ],
2556         [ 0xfe, "Locked by a File Lock" ],
2557         [ 0xff, "Locked by Begin Share File Set" ],
2558 ])
2559 LockName                        = nstring8("lock_name", "Lock Name")
2560 LockStatus                      = val_string8("lock_status", "Lock Status", [
2561         [ 0x00, "Locked Exclusive" ],
2562         [ 0x01, "Locked Shareable" ],
2563         [ 0x02, "Logged" ],
2564         [ 0x06, "Lock is Held by TTS"],
2565 ])
2566 LockType                        = val_string8("lock_type", "Lock Type", [
2567         [ 0x00, "Locked" ],
2568         [ 0x01, "Open Shareable" ],
2569         [ 0x02, "Logged" ],
2570         [ 0x03, "Open Normal" ],
2571         [ 0x06, "TTS Holding Lock" ],
2572         [ 0x07, "Transaction Flag Set on This File" ],
2573 ])
2574 LogFileFlagHigh                 = bitfield8("log_file_flag_high", "Log File Flag (byte 2)", [
2575         bf_boolean8(0x80, "log_flag_call_back", "Call Back Requested" ),
2576 ])
2577 LogFileFlagLow                  = bitfield8("log_file_flag_low", "Log File Flag", [
2578         bf_boolean8(0x01, "log_flag_lock_file", "Lock File Immediately" ), 
2579 ])      
2580 LoggedObjectID                  = uint32("logged_object_id", "Logged in Object ID")
2581 LoggedObjectID.Display("BASE_HEX")
2582 LoggedCount                     = uint16("logged_count", "Logged Count")
2583 LogicalConnectionNumber         = uint16("logical_connection_number", "Logical Connection Number", BE)
2584 LogicalDriveCount               = uint8("logical_drive_count", "Logical Drive Count")
2585 LogicalDriveNumber              = uint8("logical_drive_number", "Logical Drive Number")
2586 LogicalLockThreshold            = uint8("logical_lock_threshold", "LogicalLockThreshold")
2587 LogicalRecordName               = nstring8("logical_record_name", "Logical Record Name")
2588 LoginKey                        = bytes("login_key", "Login Key", 8)
2589 LogLockType                     = uint8("log_lock_type", "Log Lock Type")
2590 LogTtlRxPkts                    = uint32("log_ttl_rx_pkts", "Total Received Packets")
2591 LogTtlTxPkts                    = uint32("log_ttl_tx_pkts", "Total Transmitted Packets")
2592 LongName                        = fw_string("long_name", "Long Name", 32)
2593 LRUBlockWasDirty                = uint16("lru_block_was_dirty", "LRU Block Was Dirty")
2594
2595 MacAttr                         = bitfield16("mac_attr", "Attributes", [
2596         bf_boolean16(0x0001, "mac_attr_smode1", "Search Mode"),
2597         bf_boolean16(0x0002, "mac_attr_smode2", "Search Mode"),
2598         bf_boolean16(0x0004, "mac_attr_smode3", "Search Mode"),
2599         bf_boolean16(0x0010, "mac_attr_transaction", "Transaction"),
2600         bf_boolean16(0x0020, "mac_attr_index", "Index"),
2601         bf_boolean16(0x0040, "mac_attr_r_audit", "Read Audit"),
2602         bf_boolean16(0x0080, "mac_attr_w_audit", "Write Audit"),
2603         bf_boolean16(0x0100, "mac_attr_r_only", "Read Only"),
2604         bf_boolean16(0x0200, "mac_attr_hidden", "Hidden"),
2605         bf_boolean16(0x0400, "mac_attr_system", "System"),
2606         bf_boolean16(0x0800, "mac_attr_execute_only", "Execute Only"),
2607         bf_boolean16(0x1000, "mac_attr_subdirectory", "Subdirectory"),
2608         bf_boolean16(0x2000, "mac_attr_archive", "Archive"),
2609         bf_boolean16(0x8000, "mac_attr_share", "Shareable File"),
2610 ])
2611 MACBackupDate                   = uint16("mac_backup_date", "Mac Backup Date")
2612 MACBackupDate.NWDate()
2613 MACBackupTime                   = uint16("mac_backup_time", "Mac Backup Time")
2614 MACBackupTime.NWTime()
2615 MacBaseDirectoryID              = uint32("mac_base_directory_id", "Mac Base Directory ID")
2616 MacBaseDirectoryID.Display("BASE_HEX")
2617 MACCreateDate                   = uint16("mac_create_date", "Mac Create Date")
2618 MACCreateDate.NWDate()
2619 MACCreateTime                   = uint16("mac_create_time", "Mac Create Time")
2620 MACCreateTime.NWTime()
2621 MacDestinationBaseID            = uint32("mac_destination_base_id", "Mac Destination Base ID")
2622 MacDestinationBaseID.Display("BASE_HEX")
2623 MacFinderInfo                   = bytes("mac_finder_info", "Mac Finder Information", 32)
2624 MacLastSeenID                   = uint32("mac_last_seen_id", "Mac Last Seen ID")
2625 MacLastSeenID.Display("BASE_HEX")
2626 MacSourceBaseID                 = uint32("mac_source_base_id", "Mac Source Base ID")
2627 MacSourceBaseID.Display("BASE_HEX")
2628 MajorVersion                    = uint32("major_version", "Major Version")
2629 MaxBytes                        = uint16("max_bytes", "Maximum Number of Bytes")
2630 MaxDataStreams                  = uint32("max_data_streams", "Maximum Data Streams")
2631 MaxDirDepth                     = uint32("max_dir_depth", "Maximum Directory Depth")
2632 MaximumSpace                    = uint16("max_space", "Maximum Space")
2633 MaxNumOfConn                    = uint32("max_num_of_conn", "Maximum Number of Connections")
2634 MaxNumOfLANS                    = uint32("max_num_of_lans", "Maximum Number Of LAN's")
2635 MaxNumOfMedias                  = uint32("max_num_of_medias", "Maximum Number Of Media's")
2636 MaxNumOfNmeSps                  = uint32("max_num_of_nme_sps", "Maximum Number Of Name Spaces")
2637 MaxNumOfSpoolPr                 = uint32("max_num_of_spool_pr", "Maximum Number Of Spool Printers")
2638 MaxNumOfStacks                  = uint32("max_num_of_stacks", "Maximum Number Of Stacks")
2639 MaxNumOfUsers                   = uint32("max_num_of_users", "Maximum Number Of Users")
2640 MaxNumOfVol                     = uint32("max_num_of_vol", "Maximum Number of Volumes")
2641 MaxSpace                        = uint32("maxspace", "Maximum Space")
2642 MaxUsedDynamicSpace             = uint32("max_used_dynamic_space", "Max Used Dynamic Space")
2643 MediaList                       = uint32("media_list", "Media List")
2644 MediaListCount                  = uint32("media_list_count", "Media List Count")
2645 MediaName                       = nstring8("media_name", "Media Name")
2646 MediaNumber                     = uint32("media_number", "Media Number")
2647 MediaObjectType                 = val_string8("media_object_type", "Object Type", [
2648         [ 0x00, "Adapter" ],
2649         [ 0x01, "Changer" ],
2650         [ 0x02, "Removable Device" ],
2651         [ 0x03, "Device" ],
2652         [ 0x04, "Removable Media" ],
2653         [ 0x05, "Partition" ],
2654         [ 0x06, "Slot" ],
2655         [ 0x07, "Hotfix" ],
2656         [ 0x08, "Mirror" ],
2657         [ 0x09, "Parity" ],
2658         [ 0x0a, "Volume Segment" ],
2659         [ 0x0b, "Volume" ],
2660         [ 0x0c, "Clone" ],
2661         [ 0x0d, "Fixed Media" ],
2662         [ 0x0e, "Unknown" ],
2663 ])        
2664 MemberName                      = nstring8("member_name", "Member Name")
2665 MemberType                      = val_string8("member_type", "Member Type", [
2666         [ 0x0000,       "Unknown" ],
2667         [ 0x0001,       "User" ],
2668         [ 0x0002,       "User group" ],
2669         [ 0x0003,       "Print queue" ],
2670         [ 0x0004,       "NetWare file server" ],
2671         [ 0x0005,       "Job server" ],
2672         [ 0x0006,       "Gateway" ],
2673         [ 0x0007,       "Print server" ],
2674         [ 0x0008,       "Archive queue" ],
2675         [ 0x0009,       "Archive server" ],
2676         [ 0x000a,       "Job queue" ],
2677         [ 0x000b,       "Administration" ],
2678         [ 0x0021,       "NAS SNA gateway" ],
2679         [ 0x0026,       "Remote bridge server" ],
2680         [ 0x0027,       "TCP/IP gateway" ],
2681 ])
2682 MessageLanguage                 = uint32("message_language", "NLM Language")
2683 MigratedFiles                   = uint32("migrated_files", "Migrated Files")
2684 MigratedSectors                 = uint32("migrated_sectors", "Migrated Sectors")
2685 MinorVersion                    = uint32("minor_version", "Minor Version")
2686 Minute                          = uint8("s_minute", "Minutes")
2687 MixedModePathFlag               = uint8("mixed_mode_path_flag", "Mixed Mode Path Flag")
2688 ModifiedDate                    = uint16("modified_date", "Modified Date")
2689 ModifiedDate.NWDate()
2690 ModifiedTime                    = uint16("modified_time", "Modified Time")
2691 ModifiedTime.NWTime()
2692 ModifierID                      = uint32("modifier_id", "Modifier ID", BE)
2693 ModifierID.Display("BASE_HEX")
2694 ModifyDOSInfoMask               = bitfield16("modify_dos_info_mask", "Modify DOS Info Mask", [
2695         bf_boolean16(0x0002, "modify_dos_read", "Attributes"),
2696         bf_boolean16(0x0004, "modify_dos_write", "Creation Date"),
2697         bf_boolean16(0x0008, "modify_dos_open", "Creation Time"),
2698         bf_boolean16(0x0010, "modify_dos_create", "Creator ID"),
2699         bf_boolean16(0x0020, "modify_dos_delete", "Archive Date"),
2700         bf_boolean16(0x0040, "modify_dos_parent", "Archive Time"),
2701         bf_boolean16(0x0080, "modify_dos_search", "Archiver ID"),
2702         bf_boolean16(0x0100, "modify_dos_mdate", "Modify Date"),
2703         bf_boolean16(0x0200, "modify_dos_mtime", "Modify Time"),
2704         bf_boolean16(0x0400, "modify_dos_mid", "Modifier ID"),
2705         bf_boolean16(0x0800, "modify_dos_laccess", "Last Access"),
2706         bf_boolean16(0x1000, "modify_dos_inheritance", "Inheritance"),
2707         bf_boolean16(0x2000, "modify_dos_max_space", "Maximum Space"),
2708 ])      
2709 Month                           = val_string8("s_month", "Month", [
2710         [ 0x01, "January"],
2711         [ 0x02, "Febuary"],
2712         [ 0x03, "March"],
2713         [ 0x04, "April"],
2714         [ 0x05, "May"],
2715         [ 0x06, "June"],
2716         [ 0x07, "July"],
2717         [ 0x08, "August"],
2718         [ 0x09, "September"],
2719         [ 0x0a, "October"],
2720         [ 0x0b, "November"],
2721         [ 0x0c, "December"],
2722 ])
2723
2724 MoreFlag                        = val_string8("more_flag", "More Flag", [
2725         [ 0x00, "No More Segments/Entries Available" ],
2726         [ 0x01, "More Segments/Entries Available" ],
2727         [ 0xff, "More Segments/Entries Available" ],
2728 ])
2729 MoreProperties                  = val_string8("more_properties", "More Properties", [
2730         [ 0x00, "No More Properties Available" ],
2731         [ 0x01, "No More Properties Available" ],
2732         [ 0xff, "More Properties Available" ],
2733 ])
2734
2735 Name                            = nstring8("name", "Name")
2736 Name12                          = fw_string("name12", "Name", 12)
2737 NameLen                         = uint8("name_len", "Name Space Length")
2738 NameLength                      = uint8("name_length", "Name Length")
2739 NameList                        = uint32("name_list", "Name List")
2740 #
2741 # XXX - should this value be used to interpret the characters in names,
2742 # search patterns, and the like?
2743 #
2744 # We need to handle character sets better, e.g. translating strings
2745 # from whatever character set they are in the packet (DOS/Windows code
2746 # pages, ISO character sets, UNIX EUC character sets, UTF-8, UCS-2/Unicode,
2747 # Mac character sets, etc.) into UCS-4 or UTF-8 and storing them as such
2748 # in the protocol tree, and displaying them as best we can.
2749 #
2750 NameSpace                       = val_string8("name_space", "Name Space", [
2751         [ 0x00, "DOS" ],
2752         [ 0x01, "MAC" ],
2753         [ 0x02, "NFS" ],
2754         [ 0x03, "FTAM" ],
2755         [ 0x04, "OS/2, Long" ],
2756 ])
2757 NamesSpaceInfoMask                      = bitfield16("ns_info_mask", "Names Space Info Mask", [
2758         bf_boolean16(0x0001, "ns_info_mask_modify", "Modify Name"),
2759         bf_boolean16(0x0002, "ns_info_mask_fatt", "File Attributes"),
2760         bf_boolean16(0x0004, "ns_info_mask_cdate", "Creation Date"),
2761         bf_boolean16(0x0008, "ns_info_mask_ctime", "Creation Time"),
2762         bf_boolean16(0x0010, "ns_info_mask_owner", "Owner ID"),
2763         bf_boolean16(0x0020, "ns_info_mask_adate", "Archive Date"),
2764         bf_boolean16(0x0040, "ns_info_mask_atime", "Archive Time"),
2765         bf_boolean16(0x0080, "ns_info_mask_aid", "Archiver ID"),
2766         bf_boolean16(0x0100, "ns_info_mask_udate", "Update Date"),
2767         bf_boolean16(0x0200, "ns_info_mask_utime", "Update Time"),
2768         bf_boolean16(0x0400, "ns_info_mask_uid", "Update ID"),
2769         bf_boolean16(0x0800, "ns_info_mask_acc_date", "Access Date"),
2770         bf_boolean16(0x1000, "ns_info_mask_max_acc_mask", "Inheritance"),
2771         bf_boolean16(0x2000, "ns_info_mask_max_space", "Maximum Space"),
2772 ])
2773 NameSpaceName                   = nstring8("name_space_name", "Name Space Name")
2774 nameType                        = uint32("name_type", "nameType")
2775 NCPdataSize                     = uint32("ncp_data_size", "NCP Data Size")
2776 NCPextensionMajorVersion        = uint8("ncp_extension_major_version", "NCP Extension Major Version")
2777 NCPextensionMinorVersion        = uint8("ncp_extension_minor_version", "NCP Extension Minor Version")
2778 NCPextensionName                = nstring8("ncp_extension_name", "NCP Extension Name")
2779 NCPextensionNumber              = uint32("ncp_extension_number", "NCP Extension Number")
2780 NCPextensionNumber.Display("BASE_HEX")
2781 NCPExtensionNumbers             = uint32("ncp_extension_numbers", "NCP Extension Numbers")
2782 NCPextensionRevisionNumber      = uint8("ncp_extension_revision_number", "NCP Extension Revision Number")
2783 NCPPeakStaInUse                 = uint32("ncp_peak_sta_in_use", "Peak Number of Connections since Server was brought up")
2784 NCPStaInUseCnt                  = uint32("ncp_sta_in_use", "Number of Workstations Connected to Server")
2785 NDSRequestFlags                 = bitfield16("nds_request_flags", "NDS Request Flags", [
2786         bf_boolean16(0x0001, "nds_request_flags_output", "Output Fields"),
2787         bf_boolean16(0x0002, "nds_request_flags_no_such_entry", "No Such Entry"),
2788         bf_boolean16(0x0004, "nds_request_flags_local_entry", "Local Entry"),
2789         bf_boolean16(0x0008, "nds_request_flags_type_ref", "Type Referral"),
2790         bf_boolean16(0x0010, "nds_request_flags_alias_ref", "Alias Referral"),
2791         bf_boolean16(0x0020, "nds_request_flags_req_cnt", "Request Count"),
2792         bf_boolean16(0x0040, "nds_request_flags_req_data_size", "Request Data Size"),
2793         bf_boolean16(0x0080, "nds_request_flags_reply_data_size", "Reply Data Size"),
2794         bf_boolean16(0x0100, "nds_request_flags_trans_ref", "Transport Referral"),
2795         bf_boolean16(0x0200, "nds_request_flags_trans_ref2", "Transport Referral"),
2796         bf_boolean16(0x0400, "nds_request_flags_up_ref", "Up Referral"),
2797         bf_boolean16(0x0800, "nds_request_flags_dn_ref", "Down Referral"),
2798 ])      
2799 NDSStatus                       = uint32("nds_status", "NDS Status")
2800 NetBIOSBroadcastWasPropogated   = uint32("netbios_broadcast_was_propogated", "NetBIOS Broadcast Was Propogated")
2801 NetIDNumber                     = uint32("net_id_number", "Net ID Number")
2802 NetIDNumber.Display("BASE_HEX")
2803 NetAddress                      = nbytes32("address", "Address")
2804 NetStatus                       = uint16("net_status", "Network Status")
2805 NetWareAccessHandle             = bytes("netware_access_handle", "NetWare Access Handle", 6)
2806 NetworkAddress                  = uint32("network_address", "Network Address")
2807 NetworkAddress.Display("BASE_HEX")
2808 NetworkNodeAddress              = bytes("network_node_address", "Network Node Address", 6)
2809 NetworkNumber                   = uint32("network_number", "Network Number")
2810 NetworkNumber.Display("BASE_HEX")
2811 #
2812 # XXX - this should have the "ipx_socket_vals" value_string table
2813 # from "packet-ipx.c".
2814 #
2815 NetworkSocket                   = uint16("network_socket", "Network Socket")
2816 NetworkSocket.Display("BASE_HEX")
2817 NewAccessRights                 = bitfield16("new_access_rights_mask", "New Access Rights", [
2818         bf_boolean16(0x0001, "new_access_rights_read", "Read"),
2819         bf_boolean16(0x0002, "new_access_rights_write", "Write"),
2820         bf_boolean16(0x0004, "new_access_rights_open", "Open"),
2821         bf_boolean16(0x0008, "new_access_rights_create", "Create"),
2822         bf_boolean16(0x0010, "new_access_rights_delete", "Delete"),
2823         bf_boolean16(0x0020, "new_access_rights_parental", "Parental"),
2824         bf_boolean16(0x0040, "new_access_rights_search", "Search"),
2825         bf_boolean16(0x0080, "new_access_rights_modify", "Modify"),
2826         bf_boolean16(0x0100, "new_access_rights_supervisor", "Supervisor"),
2827 ])
2828 NewDirectoryID                  = uint32("new_directory_id", "New Directory ID")
2829 NewDirectoryID.Display("BASE_HEX")
2830 NewEAHandle                     = uint32("new_ea_handle", "New EA Handle")
2831 NewEAHandle.Display("BASE_HEX")
2832 NewFileName                     = fw_string("new_file_name", "New File Name", 14)
2833 NewFileNameLen                  = nstring8("new_file_name_len", "New File Name")
2834 NewFileSize                     = uint32("new_file_size", "New File Size")
2835 NewPassword                     = nstring8("new_password", "New Password")
2836 NewPath                         = nstring8("new_path", "New Path")
2837 NewPosition                     = uint8("new_position", "New Position")
2838 NewObjectName                   = nstring8("new_object_name", "New Object Name")
2839 NextCntBlock                    = uint32("next_cnt_block", "Next Count Block")
2840 NextHugeStateInfo               = bytes("next_huge_state_info", "Next Huge State Info", 16)
2841 nextLimbScanNum                 = uint32("next_limb_scan_num", "Next Limb Scan Number")
2842 NextObjectID                    = uint32("next_object_id", "Next Object ID", BE)
2843 NextObjectID.Display("BASE_HEX")
2844 NextRecord                      = uint32("next_record", "Next Record")
2845 NextRequestRecord               = uint16("next_request_record", "Next Request Record")
2846 NextSearchIndex                 = uint16("next_search_index", "Next Search Index")
2847 NextSearchNumber                = uint16("next_search_number", "Next Search Number")
2848 NextSearchNum                   = uint32("nxt_search_num", "Next Search Number")
2849 nextStartingNumber              = uint32("next_starting_number", "Next Starting Number")
2850 NextTrusteeEntry                = uint32("next_trustee_entry", "Next Trustee Entry")
2851 NextVolumeNumber                = uint32("next_volume_number", "Next Volume Number")
2852 NLMBuffer                       = nstring8("nlm_buffer", "Buffer")
2853 NLMcount                        = uint32("nlm_count", "NLM Count")
2854 NLMFlags                        = bitfield8("nlm_flags", "Flags", [
2855         bf_boolean8(0x01, "nlm_flags_reentrant", "ReEntrant"),
2856         bf_boolean8(0x02, "nlm_flags_multiple", "Can Load Multiple Times"),
2857         bf_boolean8(0x04, "nlm_flags_synchronize", "Synchronize Start"),
2858         bf_boolean8(0x08, "nlm_flags_pseudo", "PseudoPreemption"),
2859 ])
2860 NLMLoadOptions                  = uint32("nlm_load_options", "NLM Load Options")
2861 NLMName                         = stringz("nlm_name_stringz", "NLM Name")
2862 NLMNumber                       = uint32("nlm_number", "NLM Number")
2863 NLMNumbers                      = uint32("nlm_numbers", "NLM Numbers")
2864 NLMsInList                      = uint32("nlms_in_list", "NLM's in List")
2865 NLMStartNumber                  = uint32("nlm_start_num", "NLM Start Number")
2866 NLMType                         = val_string8("nlm_type", "NLM Type", [
2867         [ 0x00, "Generic NLM (.NLM)" ],
2868         [ 0x01, "LAN Driver (.LAN)" ],
2869         [ 0x02, "Disk Driver (.DSK)" ],
2870         [ 0x03, "Name Space Support Module (.NAM)" ],
2871         [ 0x04, "Utility or Support Program (.NLM)" ],
2872         [ 0x05, "Mirrored Server Link (.MSL)" ],
2873         [ 0x06, "OS NLM (.NLM)" ],
2874         [ 0x07, "Paged High OS NLM (.NLM)" ],
2875         [ 0x08, "Host Adapter Module (.HAM)" ],
2876         [ 0x09, "Custom Device Module (.CDM)" ],
2877         [ 0x0a, "File System Engine (.NLM)" ],
2878         [ 0x0b, "Real Mode NLM (.NLM)" ],
2879         [ 0x0c, "Hidden NLM (.NLM)" ],
2880         [ 0x15, "NICI Support (.NLM)" ],
2881         [ 0x16, "NICI Support (.NLM)" ],
2882         [ 0x17, "Cryptography (.NLM)" ],
2883         [ 0x18, "Encryption (.NLM)" ],
2884         [ 0x19, "NICI Support (.NLM)" ],
2885         [ 0x1c, "NICI Support (.NLM)" ],
2886 ])        
2887 nodeFlags                       = uint32("node_flags", "Node Flags")
2888 nodeFlags.Display("BASE_HEX")
2889 NoMoreMemAvlCnt                 = uint32("no_more_mem_avail", "No More Memory Available Count")
2890 NonDedFlag                      = boolean8("non_ded_flag", "Non Dedicated Flag")
2891 NonFreeableAvailableSubAllocSectors = uint32("non_freeable_avail_sub_alloc_sectors", "Non Freeable Available Sub Alloc Sectors")
2892 NonFreeableLimboSectors         = uint32("non_freeable_limbo_sectors", "Non Freeable Limbo Sectors")
2893 NotUsableSubAllocSectors        = uint32("not_usable_sub_alloc_sectors", "Not Usable Sub Alloc Sectors")
2894 NotYetPurgeableBlocks           = uint32("not_yet_purgeable_blocks", "Not Yet Purgeable Blocks")
2895 NSInfoBitMask                   = uint32("ns_info_bit_mask", "Name Space Info Bit Mask")
2896 NSSOAllInFlags                  = bitfield32("nsso_all_in_flags", "SecretStore All Input Flags",[
2897         bf_boolean32(0x00000010, "nsso_all_unicode", "Unicode Data"),
2898         bf_boolean32(0x00000080, "nsso_set_tree", "Set Tree"),
2899         bf_boolean32(0x00000200, "nsso_destroy_ctx", "Destroy Context"),
2900 ])
2901 NSSOGetServiceInFlags           = bitfield32("nsso_get_svc_in_flags", "SecretStore Get Service Flags",[
2902         bf_boolean32(0x00000100, "nsso_get_ctx", "Get Context"),
2903 ])
2904 NSSOReadInFlags                 = bitfield32("nsso_read_in_flags", "SecretStore Read Flags",[
2905         bf_boolean32(0x00000001, "nsso_rw_enh_prot", "Read/Write Enhanced Protection"),
2906         bf_boolean32(0x00000008, "nsso_repair", "Repair SecretStore"),
2907 ])
2908 NSSOReadOrUnlockInFlags         = bitfield32("nsso_read_or_unlock_in_flags", "SecretStore Read or Unlock Flags",[
2909         bf_boolean32(0x00000004, "nsso_ep_master_pwd", "Master Password used instead of ENH Password"),
2910 ])
2911 NSSOUnlockInFlags               = bitfield32("nsso_unlock_in_flags", "SecretStore Unlock Flags",[
2912         bf_boolean32(0x00000004, "nsso_rmv_lock", "Remove Lock from Store"),
2913 ])
2914 NSSOWriteInFlags                = bitfield32("nsso_write_in_flags", "SecretStore Write Flags",[
2915         bf_boolean32(0x00000001, "nsso_enh_prot", "Enhanced Protection"),
2916         bf_boolean32(0x00000002, "nsso_create_id", "Create ID"),
2917         bf_boolean32(0x00000040, "nsso_ep_pwd_used", "Enhanced Protection Password Used"),
2918 ])
2919 NSSOContextOutFlags             = bitfield32("nsso_cts_out_flags", "Type of Context",[ 
2920         bf_boolean32(0x00000001, "nsso_ds_ctx", "DSAPI Context"),
2921         bf_boolean32(0x00000080, "nsso_ldap_ctx", "LDAP Context"),
2922         bf_boolean32(0x00000200, "nsso_dc_ctx", "Reserved"),
2923 ])
2924 NSSOGetServiceOutFlags          = bitfield32("nsso_get_svc_out_flags", "SecretStore Status Flags",[ 
2925         bf_boolean32(0x00400000, "nsso_mstr_pwd", "Master Password Present"),
2926 ])
2927 NSSOGetServiceReadOutFlags      = bitfield32("nsso_get_svc_read_out_flags", "SecretStore Status Flags",[
2928         bf_boolean32(0x00800000, "nsso_mp_disabled", "Master Password Disabled"),
2929 ])
2930 NSSOReadOutFlags                = bitfield32("nsso_read_out_flags", "SecretStore Read Flags",[
2931         bf_boolean32(0x00010000, "nsso_secret_locked", "Enhanced Protection Lock on Secret"),
2932         bf_boolean32(0x00020000, "nsso_secret_not_init", "Secret Not Yet Initialized"),
2933         bf_boolean32(0x00040000, "nsso_secret_marked", "Secret Marked for Enhanced Protection"),
2934         bf_boolean32(0x00080000, "nsso_secret_not_sync", "Secret Not Yet Synchronized in NDS"),
2935         bf_boolean32(0x00200000, "nsso_secret_enh_pwd", "Enhanced Protection Password on Secret"),
2936 ])
2937 NSSOReadOutStatFlags            = bitfield32("nsso_read_out_stat_flags", "SecretStore Read Status Flags",[
2938         bf_boolean32(0x00100000, "nsso_admin_mod", "Admin Modified Secret Last"),
2939 ])
2940 NSSOVerb                        = val_string8("nsso_verb", "SecretStore Verb", [
2941         [ 0x00, "Query Server" ],
2942         [ 0x01, "Read App Secrets" ],
2943         [ 0x02, "Write App Secrets" ],
2944         [ 0x03, "Add Secret ID" ],
2945         [ 0x04, "Remove Secret ID" ],
2946         [ 0x05, "Remove SecretStore" ],
2947         [ 0x06, "Enumerate SecretID's" ],
2948         [ 0x07, "Unlock Store" ],
2949         [ 0x08, "Set Master Password" ],
2950         [ 0x09, "Get Service Information" ],
2951 ])        
2952 NSSpecificInfo                  = fw_string("ns_specific_info", "Name Space Specific Info", 512)                                         
2953 NumberOfAllocs                  = uint32("num_of_allocs", "Number of Allocations")
2954 NumberOfAttributes              = uint32("number_of_attributes", "Number of Attributes")
2955 NumberOfCPUs                    = uint32("number_of_cpus", "Number of CPU's")
2956 NumberOfDataStreams             = uint16("number_of_data_streams", "Number of Data Streams")
2957 NumberOfDynamicMemoryAreas      = uint16("number_of_dynamic_memory_areas", "Number Of Dynamic Memory Areas")
2958 NumberOfEntries                 = uint8("number_of_entries", "Number of Entries")
2959 NumberOfLocks                   = uint8("number_of_locks", "Number of Locks")
2960 NumberOfMinutesToDelay          = uint32("number_of_minutes_to_delay", "Number of Minutes to Delay")
2961 NumberOfNCPExtensions           = uint32("number_of_ncp_extensions", "Number Of NCP Extensions")
2962 NumberOfNSLoaded                = uint16("number_of_ns_loaded", "Number Of Name Spaces Loaded")
2963 NumberOfProtocols               = uint8("number_of_protocols", "Number of Protocols")
2964 NumberOfRecords                 = uint16("number_of_records", "Number of Records")
2965 NumberOfReferencedPublics       = uint32("num_of_ref_publics", "Number of Referenced Public Symbols") 
2966 NumberOfSemaphores              = uint16("number_of_semaphores", "Number Of Semaphores")
2967 NumberOfServiceProcesses        = uint8("number_of_service_processes", "Number Of Service Processes")
2968 NumberOfSetCategories           = uint32("number_of_set_categories", "Number Of Set Categories")
2969 NumberOfSMs                     = uint32("number_of_sms", "Number Of Storage Medias")
2970 NumberOfStations                = uint8("number_of_stations", "Number of Stations")
2971 NumBytes                        = uint16("num_bytes", "Number of Bytes")
2972 NumOfCCinPkt                    = uint32("num_of_cc_in_pkt", "Number of Custom Counters in Packet")
2973 NumOfChecks                     = uint32("num_of_checks", "Number of Checks")
2974 NumOfEntries                    = uint32("num_of_entries", "Number of Entries")
2975 NumOfFilesMigrated              = uint32("num_of_files_migrated", "Number Of Files Migrated")
2976 NumOfGarbageColl                = uint32("num_of_garb_coll", "Number of Garbage Collections")
2977 NumOfNCPReqs                    = uint32("num_of_ncp_reqs", "Number of NCP Requests since Server was brought up")
2978 NumOfSegments                   = uint32("num_of_segments", "Number of Segments")
2979
2980 ObjectCount                     = uint32("object_count", "Object Count")
2981 ObjectFlags                     = val_string8("object_flags", "Object Flags", [
2982         [ 0x00, "Dynamic object" ],
2983         [ 0x01, "Static object" ],
2984 ])
2985 ObjectHasProperties             = val_string8("object_has_properites", "Object Has Properties", [
2986         [ 0x00, "No properties" ],
2987         [ 0xff, "One or more properties" ],
2988 ])
2989 ObjectID                        = uint32("object_id", "Object ID", BE)
2990 ObjectID.Display('BASE_HEX')
2991 ObjectIDCount                   = uint16("object_id_count", "Object ID Count")
2992 ObjectIDInfo                    = uint32("object_id_info", "Object Information")
2993 ObjectInfoReturnCount           = uint32("object_info_rtn_count", "Object Information Count")
2994 ObjectName                      = nstring8("object_name", "Object Name")
2995 ObjectNameLen                   = fw_string("object_name_len", "Object Name", 48)
2996 ObjectNameStringz               = stringz("object_name_stringz", "Object Name")
2997 ObjectNumber                    = uint32("object_number", "Object Number")
2998 ObjectSecurity                  = val_string8("object_security", "Object Security", [
2999         [ 0x00, "Object Read (Anyone) / Object Write (Anyone)" ],
3000         [ 0x01, "Object Read (Logged in) / Object Write (Anyone)" ],
3001         [ 0x02, "Object Read (Logged in as Object) / Object Write (Anyone)" ],
3002         [ 0x03, "Object Read (Supervisor) / Object Write (Anyone)" ],
3003         [ 0x04, "Object Read (Operating System Only) / Object Write (Anyone)" ],
3004         [ 0x10, "Object Read (Anyone) / Object Write (Logged in)" ],
3005         [ 0x11, "Object Read (Logged in) / Object Write (Logged in)" ],
3006         [ 0x12, "Object Read (Logged in as Object) / Object Write (Logged in)" ],
3007         [ 0x13, "Object Read (Supervisor) / Object Write (Logged in)" ],
3008         [ 0x14, "Object Read (Operating System Only) / Object Write (Logged in)" ],
3009         [ 0x20, "Object Read (Anyone) / Object Write (Logged in as Object)" ],
3010         [ 0x21, "Object Read (Logged in) / Object Write (Logged in as Object)" ],
3011         [ 0x22, "Object Read (Logged in as Object) / Object Write (Logged in as Object)" ],
3012         [ 0x23, "Object Read (Supervisor) / Object Write (Logged in as Object)" ],
3013         [ 0x24, "Object Read (Operating System Only) / Object Write (Logged in as Object)" ],
3014         [ 0x30, "Object Read (Anyone) / Object Write (Supervisor)" ],
3015         [ 0x31, "Object Read (Logged in) / Object Write (Supervisor)" ],
3016         [ 0x32, "Object Read (Logged in as Object) / Object Write (Supervisor)" ],
3017         [ 0x33, "Object Read (Supervisor) / Object Write (Supervisor)" ],
3018         [ 0x34, "Object Read (Operating System Only) / Object Write (Supervisor)" ],
3019         [ 0x40, "Object Read (Anyone) / Object Write (Operating System Only)" ],
3020         [ 0x41, "Object Read (Logged in) / Object Write (Operating System Only)" ],
3021         [ 0x42, "Object Read (Logged in as Object) / Object Write (Operating System Only)" ],
3022         [ 0x43, "Object Read (Supervisor) / Object Write (Operating System Only)" ],
3023         [ 0x44, "Object Read (Operating System Only) / Object Write (Operating System Only)" ],
3024 ])
3025 #
3026 # XXX - should this use the "server_vals[]" value_string array from
3027 # "packet-ipx.c"?
3028 #
3029 # XXX - should this list be merged with that list?  There are some
3030 # oddities, e.g. this list has 0x03f5 for "Microsoft SQL Server", but
3031 # the list from "packet-ipx.c" has 0xf503 for that - is that just
3032 # byte-order confusion?
3033 #
3034 ObjectType                      = val_string16("object_type", "Object Type", [
3035         [ 0x0000,       "Unknown" ],
3036         [ 0x0001,       "User" ],
3037         [ 0x0002,       "User group" ],
3038         [ 0x0003,       "Print queue" ],
3039         [ 0x0004,       "NetWare file server" ],
3040         [ 0x0005,       "Job server" ],
3041         [ 0x0006,       "Gateway" ],
3042         [ 0x0007,       "Print server" ],
3043         [ 0x0008,       "Archive queue" ],
3044         [ 0x0009,       "Archive server" ],
3045         [ 0x000a,       "Job queue" ],
3046         [ 0x000b,       "Administration" ],
3047         [ 0x0021,       "NAS SNA gateway" ],
3048         [ 0x0026,       "Remote bridge server" ],
3049         [ 0x0027,       "TCP/IP gateway" ],
3050         [ 0x0047,       "Novell Print Server" ],
3051         [ 0x004b,       "Btrieve Server" ],
3052         [ 0x004c,       "NetWare SQL Server" ],
3053         [ 0x0064,       "ARCserve" ],
3054         [ 0x0066,       "ARCserve 3.0" ],
3055         [ 0x0076,       "NetWare SQL" ],
3056         [ 0x00a0,       "Gupta SQL Base Server" ],
3057         [ 0x00a1,       "Powerchute" ],
3058         [ 0x0107,       "NetWare Remote Console" ],
3059         [ 0x01cb,       "Shiva NetModem/E" ],
3060         [ 0x01cc,       "Shiva LanRover/E" ],
3061         [ 0x01cd,       "Shiva LanRover/T" ],
3062         [ 0x01d8,       "Castelle FAXPress Server" ],
3063         [ 0x01da,       "Castelle Print Server" ],
3064         [ 0x01dc,       "Castelle Fax Server" ],
3065         [ 0x0200,       "Novell SQL Server" ],
3066         [ 0x023a,       "NetWare Lanalyzer Agent" ],
3067         [ 0x023c,       "DOS Target Service Agent" ],
3068         [ 0x023f,       "NetWare Server Target Service Agent" ],
3069         [ 0x024f,       "Appletalk Remote Access Service" ],
3070         [ 0x0263,       "NetWare Management Agent" ],
3071         [ 0x0264,       "Global MHS" ],
3072         [ 0x0265,       "SNMP" ],
3073         [ 0x026a,       "NetWare Management/NMS Console" ],
3074         [ 0x026b,       "NetWare Time Synchronization" ],
3075         [ 0x0273,       "Nest Device" ],
3076         [ 0x0274,       "GroupWise Message Multiple Servers" ],
3077         [ 0x0278,       "NDS Replica Server" ],
3078         [ 0x0282,       "NDPS Service Registry Service" ],
3079         [ 0x028a,       "MPR/IPX Address Mapping Gateway" ],
3080         [ 0x028b,       "ManageWise" ],
3081         [ 0x0293,       "NetWare 6" ],
3082         [ 0x030c,       "HP JetDirect" ],
3083         [ 0x0328,       "Watcom SQL Server" ],
3084         [ 0x0355,       "Backup Exec" ],
3085         [ 0x039b,       "Lotus Notes" ],
3086         [ 0x03e1,       "Univel Server" ],
3087         [ 0x03f5,       "Microsoft SQL Server" ],
3088         [ 0x055e,       "Lexmark Print Server" ],
3089         [ 0x0640,       "Microsoft Gateway Services for NetWare" ],
3090         [ 0x064e,       "Microsoft Internet Information Server" ],
3091         [ 0x077b,       "Advantage Database Server" ],
3092         [ 0x07a7,       "Backup Exec Job Queue" ],
3093         [ 0x07a8,       "Backup Exec Job Manager" ],
3094         [ 0x07a9,       "Backup Exec Job Service" ],
3095         [ 0x8202,       "NDPS Broker" ],
3096         
3097 ])
3098 OCRetFlags                      = val_string8("o_c_ret_flags", "Open Create Return Flags", [
3099         [ 0x00, "No CallBack has been registered (No Op-Lock)" ],
3100         [ 0x01, "Request has been registered for CallBack (Op-Lock)" ],
3101 ])
3102 OldestDeletedFileAgeInTicks     = uint32("oldest_deleted_file_age_in_ticks", "Oldest Deleted File Age in Ticks")
3103 OldFileName                     = bytes("old_file_name", "Old File Name", 15)
3104 OldFileSize                     = uint32("old_file_size", "Old File Size")
3105 OpenCount                       = uint16("open_count", "Open Count")
3106 OpenCreateAction                = bitfield8("open_create_action", "Open Create Action", [
3107         bf_boolean8(0x01, "open_create_action_opened", "Opened"),
3108         bf_boolean8(0x02, "open_create_action_created", "Created"),
3109         bf_boolean8(0x04, "open_create_action_replaced", "Replaced"),
3110         bf_boolean8(0x08, "open_create_action_compressed", "Compressed"),
3111         bf_boolean8(0x80, "open_create_action_read_only", "Read Only"),
3112 ])      
3113 OpenCreateMode                  = bitfield8("open_create_mode", "Open Create Mode", [
3114         bf_boolean8(0x01, "open_create_mode_open", "Open existing file (file must exist)"),
3115         bf_boolean8(0x02, "open_create_mode_replace", "Replace existing file"),
3116         bf_boolean8(0x08, "open_create_mode_create", "Create new file or subdirectory (file or subdirectory cannot exist)"),
3117         bf_boolean8(0x80, "open_create_mode_oplock", "Open Callback (Op-Lock)"),
3118 ])
3119 OpenForReadCount                = uint16("open_for_read_count", "Open For Read Count")
3120 OpenForWriteCount               = uint16("open_for_write_count", "Open For Write Count")
3121 OpenRights                      = bitfield8("open_rights", "Open Rights", [
3122         bf_boolean8(0x01, "open_rights_read_only", "Read Only"),
3123         bf_boolean8(0x02, "open_rights_write_only", "Write Only"),
3124         bf_boolean8(0x04, "open_rights_deny_read", "Deny Read"),
3125         bf_boolean8(0x08, "open_rights_deny_write", "Deny Write"),
3126         bf_boolean8(0x10, "open_rights_compat", "Compatibility"),
3127         bf_boolean8(0x40, "open_rights_write_thru", "Write Through"),
3128 ])
3129 OptionNumber                    = uint8("option_number", "Option Number")
3130 originalSize                    = uint32("original_size", "Original Size")
3131 OSLanguageID                    = uint8("os_language_id", "OS Language ID")
3132 OSMajorVersion                  = uint8("os_major_version", "OS Major Version")
3133 OSMinorVersion                  = uint8("os_minor_version", "OS Minor Version")
3134 OSRevision                      = uint8("os_revision", "OS Revision")
3135 OtherFileForkSize               = uint32("other_file_fork_size", "Other File Fork Size")
3136 OtherFileForkFAT                = uint32("other_file_fork_fat", "Other File Fork FAT Entry")
3137 OutgoingPacketDiscardedNoTurboBuffer = uint16("outgoing_packet_discarded_no_turbo_buffer", "Outgoing Packet Discarded No Turbo Buffer")
3138
3139 PacketsDiscardedByHopCount      = uint16("packets_discarded_by_hop_count", "Packets Discarded By Hop Count")
3140 PacketsDiscardedUnknownNet      = uint16("packets_discarded_unknown_net", "Packets Discarded Unknown Net")
3141 PacketsFromInvalidConnection    = uint16("packets_from_invalid_connection", "Packets From Invalid Connection")
3142 PacketsReceivedDuringProcessing = uint16("packets_received_during_processing", "Packets Received During Processing")
3143 PacketsWithBadRequestType       = uint16("packets_with_bad_request_type", "Packets With Bad Request Type")
3144 PacketsWithBadSequenceNumber    = uint16("packets_with_bad_sequence_number", "Packets With Bad Sequence Number")
3145 PageTableOwnerFlag              = uint32("page_table_owner_flag", "Page Table Owner")
3146 ParentID                        = uint32("parent_id", "Parent ID")
3147 ParentID.Display("BASE_HEX")
3148 ParentBaseID                    = uint32("parent_base_id", "Parent Base ID")
3149 ParentBaseID.Display("BASE_HEX")
3150 ParentDirectoryBase             = uint32("parent_directory_base", "Parent Directory Base")
3151 ParentDOSDirectoryBase          = uint32("parent_dos_directory_base", "Parent DOS Directory Base")
3152 ParentObjectNumber              = uint32("parent_object_number", "Parent Object Number")
3153 ParentObjectNumber.Display("BASE_HEX")
3154 Password                        = nstring8("password", "Password")
3155 PathBase                        = uint8("path_base", "Path Base")
3156 PathComponentCount              = uint16("path_component_count", "Path Component Count")
3157 PathComponentSize               = uint16("path_component_size", "Path Component Size")
3158 PathCookieFlags                 = val_string16("path_cookie_flags", "Path Cookie Flags", [
3159         [ 0x0000, "Last component is Not a File Name" ],
3160         [ 0x0001, "Last component is a File Name" ],
3161 ])
3162 PathCount                       = uint8("path_count", "Path Count")
3163 Path                            = nstring8("path", "Path")
3164 PathAndName                     = stringz("path_and_name", "Path and Name")
3165 PendingIOCommands               = uint16("pending_io_commands", "Pending IO Commands")
3166 PhysicalDiskNumber              = uint8("physical_disk_number", "Physical Disk Number")
3167 PhysicalDriveCount              = uint8("physical_drive_count", "Physical Drive Count")
3168 PhysicalLockThreshold           = uint8("physical_lock_threshold", "Physical Lock Threshold")
3169 PingVersion                     = uint16("ping_version", "Ping Version")
3170 PositiveAcknowledgesSent        = uint16("positive_acknowledges_sent", "Positive Acknowledges Sent")
3171 PreCompressedSectors            = uint32("pre_compressed_sectors", "Precompressed Sectors")
3172 PreviousRecord                  = uint32("previous_record", "Previous Record")
3173 PrimaryEntry                    = uint32("primary_entry", "Primary Entry")
3174 PrintFlags                      = bitfield8("print_flags", "Print Flags", [
3175         bf_boolean8(0x08, "print_flags_ff", "Suppress Form Feeds"),
3176         bf_boolean8(0x10, "print_flags_cr", "Create"),
3177         bf_boolean8(0x20, "print_flags_del_spool", "Delete Spool File after Printing"),
3178         bf_boolean8(0x40, "print_flags_exp_tabs", "Expand Tabs in the File"),
3179         bf_boolean8(0x80, "print_flags_banner", "Print Banner Page"),
3180 ])
3181 PrinterHalted                   = val_string8("printer_halted", "Printer Halted", [
3182         [ 0x00, "Printer is not Halted" ],
3183         [ 0xff, "Printer is Halted" ],
3184 ])
3185 PrinterOffLine                  = val_string8( "printer_offline", "Printer Off-Line", [
3186         [ 0x00, "Printer is On-Line" ],
3187         [ 0xff, "Printer is Off-Line" ],
3188 ])
3189 PrintServerVersion              = uint8("print_server_version", "Print Server Version")
3190 Priority                        = uint32("priority", "Priority")
3191 Privileges                      = uint32("privileges", "Login Privileges")
3192 ProcessorType                   = val_string8("processor_type", "Processor Type", [
3193         [ 0x00, "Motorola 68000" ],
3194         [ 0x01, "Intel 8088 or 8086" ],
3195         [ 0x02, "Intel 80286" ],
3196 ])
3197 ProDOSInfo                      = bytes("pro_dos_info", "Pro DOS Info", 6)
3198 ProductMajorVersion             = uint16("product_major_version", "Product Major Version")
3199 ProductMinorVersion             = uint16("product_minor_version", "Product Minor Version")
3200 ProductRevisionVersion          = uint8("product_revision_version", "Product Revision Version")
3201 projectedCompSize               = uint32("projected_comp_size", "Projected Compression Size")
3202 PropertyHasMoreSegments         = val_string8("property_has_more_segments",
3203         "Property Has More Segments", [
3204         [ 0x00, "Is last segment" ],
3205         [ 0xff, "More segments are available" ],
3206 ])
3207 PropertyName                    = nstring8("property_name", "Property Name")
3208 PropertyName16                  = fw_string("property_name_16", "Property Name", 16)
3209 PropertyData                    = bytes("property_data", "Property Data", 128)
3210 PropertySegment                 = uint8("property_segment", "Property Segment")
3211 PropertyType                    = val_string8("property_type", "Property Type", [
3212         [ 0x00, "Display Static property" ],
3213         [ 0x01, "Display Dynamic property" ],
3214         [ 0x02, "Set Static property" ],
3215         [ 0x03, "Set Dynamic property" ],
3216 ])
3217 PropertyValue                   = fw_string("property_value", "Property Value", 128)
3218 ProposedMaxSize                 = uint16("proposed_max_size", "Proposed Max Size")
3219 protocolFlags                   = uint32("protocol_flags", "Protocol Flags")
3220 protocolFlags.Display("BASE_HEX")
3221 PurgeableBlocks                 = uint32("purgeable_blocks", "Purgeable Blocks")
3222 PurgeCcode                      = uint32("purge_c_code", "Purge Completion Code")
3223 PurgeCount                      = uint32("purge_count", "Purge Count")
3224 PurgeFlags                      = val_string16("purge_flags", "Purge Flags", [
3225         [ 0x0000, "Do not Purge All" ],
3226         [ 0x0001, "Purge All" ],
3227         [ 0xffff, "Do not Purge All" ],
3228 ])
3229 PurgeList                       = uint32("purge_list", "Purge List")
3230 PhysicalDiskChannel             = uint8("physical_disk_channel", "Physical Disk Channel")
3231 PhysicalDriveType               = val_string8("physical_drive_type", "Physical Drive Type", [
3232         [ 0x01, "XT" ],
3233         [ 0x02, "AT" ],
3234         [ 0x03, "SCSI" ],
3235         [ 0x04, "Disk Coprocessor" ],
3236         [ 0x05, "PS/2 with MFM Controller" ],
3237         [ 0x06, "PS/2 with ESDI Controller" ],
3238         [ 0x07, "Convergent Technology SBIC" ],
3239 ])      
3240 PhysicalReadErrors              = uint16("physical_read_errors", "Physical Read Errors")
3241 PhysicalReadRequests            = uint32("physical_read_requests", "Physical Read Requests")
3242 PhysicalWriteErrors             = uint16("physical_write_errors", "Physical Write Errors")
3243 PhysicalWriteRequests           = uint32("physical_write_requests", "Physical Write Requests")
3244 PrintToFileFlag                 = boolean8("print_to_file_flag", "Print to File Flag")
3245
3246 QueueID                         = uint32("queue_id", "Queue ID")
3247 QueueID.Display("BASE_HEX")
3248 QueueName                       = nstring8("queue_name", "Queue Name")
3249 QueueStartPosition              = uint32("queue_start_position", "Queue Start Position")
3250 QueueStatus                     = bitfield8("queue_status", "Queue Status", [
3251         bf_boolean8(0x01, "queue_status_new_jobs", "Operator does not want to add jobs to the queue"),
3252         bf_boolean8(0x02, "queue_status_pserver", "Operator does not want additional servers attaching"),
3253         bf_boolean8(0x04, "queue_status_svc_jobs", "Operator does not want servers to service jobs"),
3254 ])
3255 QueueType                       = uint16("queue_type", "Queue Type")
3256 QueueingVersion                 = uint8("qms_version", "QMS Version")
3257
3258 ReadBeyondWrite                 = uint16("read_beyond_write", "Read Beyond Write")
3259 RecordLockCount                 = uint16("rec_lock_count", "Record Lock Count")
3260 RecordStart                     = uint32("record_start", "Record Start")
3261 RecordEnd                       = uint32("record_end", "Record End")
3262 RecordInUseFlag                 = val_string16("record_in_use", "Record in Use", [
3263         [ 0x0000, "Record In Use" ],
3264         [ 0xffff, "Record Not In Use" ],
3265 ])      
3266 RedirectedPrinter               = uint8( "redirected_printer", "Redirected Printer" )
3267 ReferenceCount                  = uint32("reference_count", "Reference Count")
3268 RelationsCount                  = uint16("relations_count", "Relations Count")
3269 ReMirrorCurrentOffset           = uint32("re_mirror_current_offset", "ReMirror Current Offset")
3270 ReMirrorDriveNumber             = uint8("re_mirror_drive_number", "ReMirror Drive Number")
3271 RemoteMaxPacketSize             = uint32("remote_max_packet_size", "Remote Max Packet Size")
3272 RemoteTargetID                  = uint32("remote_target_id", "Remote Target ID")
3273 RemoteTargetID.Display("BASE_HEX")
3274 RemovableFlag                   = uint16("removable_flag", "Removable Flag")
3275 RemoveOpenRights                = bitfield8("remove_open_rights", "Remove Open Rights", [
3276         bf_boolean8(0x01, "remove_open_rights_ro", "Read Only"),
3277         bf_boolean8(0x02, "remove_open_rights_wo", "Write Only"),
3278         bf_boolean8(0x04, "remove_open_rights_dr", "Deny Read"),
3279         bf_boolean8(0x08, "remove_open_rights_dw", "Deny Write"),
3280         bf_boolean8(0x10, "remove_open_rights_comp", "Compatibility"),
3281         bf_boolean8(0x40, "remove_open_rights_write_thru", "Write Through"),
3282 ])
3283 RenameFlag                      = bitfield8("rename_flag", "Rename Flag", [
3284         bf_boolean8(0x01, "rename_flag_ren", "Rename to Myself allows file to be renamed to it's original name"),
3285         bf_boolean8(0x02, "rename_flag_comp", "Compatability allows files that are marked read only to be opened with read/write access"),
3286         bf_boolean8(0x04, "rename_flag_no", "Name Only renames only the specified name space entry name"),
3287 ])
3288 RepliesCancelled                = uint16("replies_cancelled", "Replies Cancelled")
3289 ReplyBuffer                     = nstring8("reply_buffer", "Reply Buffer")
3290 ReplyBufferSize                 = uint32("reply_buffer_size", "Reply Buffer Size")
3291 ReplyQueueJobNumbers            = uint32("reply_queue_job_numbers", "Reply Queue Job Numbers")
3292 RequestBitMap                   = bitfield16("request_bit_map", "Request Bit Map", [
3293         bf_boolean16(0x0001, "request_bit_map_ret_afp_ent", "AFP Entry ID"),
3294         bf_boolean16(0x0002, "request_bit_map_ret_data_fork", "Data Fork Length"),
3295         bf_boolean16(0x0004, "request_bit_map_ret_res_fork", "Resource Fork Length"),
3296         bf_boolean16(0x0008, "request_bit_map_ret_num_off", "Number of Offspring"),
3297         bf_boolean16(0x0010, "request_bit_map_ret_owner", "Owner ID"),
3298         bf_boolean16(0x0020, "request_bit_map_ret_short", "Short Name"),
3299         bf_boolean16(0x0040, "request_bit_map_ret_acc_priv", "Access Privileges"),
3300         bf_boolean16(0x0100, "request_bit_map_ratt", "Return Attributes"),
3301         bf_boolean16(0x0200, "request_bit_map_ret_afp_parent", "AFP Parent Entry ID"),
3302         bf_boolean16(0x0400, "request_bit_map_ret_cr_date", "Creation Date"),
3303         bf_boolean16(0x0800, "request_bit_map_ret_acc_date", "Access Date"),
3304         bf_boolean16(0x1000, "request_bit_map_ret_mod_date", "Modify Date&Time"),
3305         bf_boolean16(0x2000, "request_bit_map_ret_bak_date", "Backup Date&Time"),
3306         bf_boolean16(0x4000, "request_bit_map_ret_finder", "Finder Info"),
3307         bf_boolean16(0x8000, "request_bit_map_ret_long_nm", "Long Name"),
3308 ])              
3309 ResourceForkLen                 = uint32("resource_fork_len", "Resource Fork Len")
3310 RequestCode                     = val_string8("request_code", "Request Code", [
3311         [ 0x00, "Change Logged in to Temporary Authenticated" ],
3312         [ 0x01, "Change Temporary Authenticated to Logged in" ],
3313 ])
3314 RequestData                     = nstring8("request_data", "Request Data")
3315 RequestsReprocessed             = uint16("requests_reprocessed", "Requests Reprocessed")
3316 Reserved                        = uint8( "reserved", "Reserved" )
3317 Reserved2                       = bytes("reserved2", "Reserved", 2)
3318 Reserved3                       = bytes("reserved3", "Reserved", 3)
3319 Reserved4                       = bytes("reserved4", "Reserved", 4)
3320 Reserved6                       = bytes("reserved6", "Reserved", 6)
3321 Reserved8                       = bytes("reserved8", "Reserved", 8)
3322 Reserved10                      = bytes("reserved10", "Reserved", 10)
3323 Reserved12                      = bytes("reserved12", "Reserved", 12)
3324 Reserved16                      = bytes("reserved16", "Reserved", 16)
3325 Reserved20                      = bytes("reserved20", "Reserved", 20)
3326 Reserved28                      = bytes("reserved28", "Reserved", 28)
3327 Reserved36                      = bytes("reserved36", "Reserved", 36)
3328 Reserved44                      = bytes("reserved44", "Reserved", 44)
3329 Reserved48                      = bytes("reserved48", "Reserved", 48)
3330 Reserved51                      = bytes("reserved51", "Reserved", 51)
3331 Reserved56                      = bytes("reserved56", "Reserved", 56)
3332 Reserved64                      = bytes("reserved64", "Reserved", 64)
3333 Reserved120                     = bytes("reserved120", "Reserved", 120)                                  
3334 ReservedOrDirectoryNumber       = uint32("reserved_or_directory_number", "Reserved or Directory Number (see EAFlags)")
3335 ResourceCount                   = uint32("resource_count", "Resource Count")
3336 ResourceForkSize                = uint32("resource_fork_size", "Resource Fork Size")
3337 ResourceName                    = stringz("resource_name", "Resource Name")
3338 ResourceSignature               = fw_string("resource_sig", "Resource Signature", 4)
3339 RestoreTime                     = uint32("restore_time", "Restore Time")
3340 Restriction                     = uint32("restriction", "Disk Space Restriction")
3341 RestrictionsEnforced            = val_string8("restrictions_enforced", "Disk Restrictions Enforce Flag", [
3342         [ 0x00, "Enforced" ],
3343         [ 0xff, "Not Enforced" ],
3344 ])
3345 ReturnInfoCount                 = uint32("return_info_count", "Return Information Count")
3346 ReturnInfoMask                  = bitfield16("ret_info_mask", "Return Information", [
3347         bf_boolean16(0x0001, "ret_info_mask_fname", "Return File Name Information"),
3348         bf_boolean16(0x0002, "ret_info_mask_alloc", "Return Allocation Space Information"),
3349         bf_boolean16(0x0004, "ret_info_mask_attr", "Return Attribute Information"),
3350         bf_boolean16(0x0008, "ret_info_mask_size", "Return Size Information"),
3351         bf_boolean16(0x0010, "ret_info_mask_tspace", "Return Total Space Information"),
3352         bf_boolean16(0x0020, "ret_info_mask_eattr", "Return Extended Attributes Information"),
3353         bf_boolean16(0x0040, "ret_info_mask_arch", "Return Archive Information"),
3354         bf_boolean16(0x0080, "ret_info_mask_mod", "Return Modify Information"),
3355         bf_boolean16(0x0100, "ret_info_mask_create", "Return Creation Information"),
3356         bf_boolean16(0x0200, "ret_info_mask_ns", "Return Name Space Information"),
3357         bf_boolean16(0x0400, "ret_info_mask_dir", "Return Directory Information"),
3358         bf_boolean16(0x0800, "ret_info_mask_rights", "Return Rights Information"),
3359         bf_boolean16(0x1000, "ret_info_mask_id", "Return ID Information"),
3360         bf_boolean16(0x2000, "ret_info_mask_ns_attr", "Return Name Space Attributes Information"),
3361         bf_boolean16(0x4000, "ret_info_mask_actual", "Return Actual Information"),
3362         bf_boolean16(0x8000, "ret_info_mask_logical", "Return Logical Information"),
3363 ])
3364 ReturnedListCount               = uint32("returned_list_count", "Returned List Count")
3365 Revision                        = uint32("revision", "Revision")
3366 RevisionNumber                  = uint8("revision_number", "Revision")
3367 RevQueryFlag                    = val_string8("rev_query_flag", "Revoke Rights Query Flag", [
3368         [ 0x00, "Do not query the locks engine for access rights" ],
3369         [ 0x01, "Query the locks engine and return the access rights" ],
3370 ])
3371 RightsGrantMask                 = bitfield8("rights_grant_mask", "Grant Rights", [
3372         bf_boolean8(0x01, "rights_grant_mask_read", "Read"),
3373         bf_boolean8(0x02, "rights_grant_mask_write", "Write"),
3374         bf_boolean8(0x04, "rights_grant_mask_open", "Open"),
3375         bf_boolean8(0x08, "rights_grant_mask_create", "Create"),
3376         bf_boolean8(0x10, "rights_grant_mask_del", "Delete"),
3377         bf_boolean8(0x20, "rights_grant_mask_parent", "Parental"),
3378         bf_boolean8(0x40, "rights_grant_mask_search", "Search"),
3379         bf_boolean8(0x80, "rights_grant_mask_mod", "Modify"),
3380 ])
3381 RightsRevokeMask                = bitfield8("rights_revoke_mask", "Revoke Rights", [
3382         bf_boolean8(0x01, "rights_revoke_mask_read", "Read"),
3383         bf_boolean8(0x02, "rights_revoke_mask_write", "Write"),
3384         bf_boolean8(0x04, "rights_revoke_mask_open", "Open"),
3385         bf_boolean8(0x08, "rights_revoke_mask_create", "Create"),
3386         bf_boolean8(0x10, "rights_revoke_mask_del", "Delete"),
3387         bf_boolean8(0x20, "rights_revoke_mask_parent", "Parental"),
3388         bf_boolean8(0x40, "rights_revoke_mask_search", "Search"),
3389         bf_boolean8(0x80, "rights_revoke_mask_mod", "Modify"),
3390 ])
3391 RIPSocketNumber                 = uint16("rip_socket_num", "RIP Socket Number")
3392 RIPSocketNumber.Display("BASE_HEX")
3393 RouterDownFlag                  = boolean8("router_dn_flag", "Router Down Flag")
3394 RPCccode                        = val_string16("rpc_c_code", "RPC Completion Code", [
3395         [ 0x0000, "Successful" ],
3396 ])        
3397 RTagNumber                      = uint32("r_tag_num", "Resource Tag Number")
3398 RTagNumber.Display("BASE_HEX")
3399 RpyNearestSrvFlag               = boolean8("rpy_nearest_srv_flag", "Reply to Nearest Server Flag")
3400
3401 SalvageableFileEntryNumber      = uint32("salvageable_file_entry_number", "Salvageable File Entry Number")
3402 SalvageableFileEntryNumber.Display("BASE_HEX")
3403 SAPSocketNumber                 = uint16("sap_socket_number", "SAP Socket Number")
3404 SAPSocketNumber.Display("BASE_HEX")
3405 ScanItems                       = uint32("scan_items", "Number of Items returned from Scan")
3406 SearchAttributes                = bitfield8("sattr", "Search Attributes", [
3407         bf_boolean8(0x01, "sattr_hid", "Hidden"),
3408         bf_boolean8(0x02, "sattr_sys", "System"),
3409         bf_boolean8(0x04, "sattr_sub", "Subdirectory"),
3410 ])      
3411 SearchAttributesLow             = bitfield16("search_att_low", "Search Attributes", [
3412         bf_boolean16(0x0001, "search_att_read_only", "Read Only"),
3413         bf_boolean16(0x0002, "search_att_hidden", "Hidden"),
3414         bf_boolean16(0x0004, "search_att_system", "System"),
3415         bf_boolean16(0x0008, "search_att_execute_only", "Execute Only"),
3416         bf_boolean16(0x0010, "search_att_sub", "Subdirectory"),
3417         bf_boolean16(0x0020, "search_att_archive", "Archive"),
3418         bf_boolean16(0x0040, "search_att_execute_confrim", "Execute Confirm"),
3419         bf_boolean16(0x0080, "search_att_shareable", "Shareable"),
3420         bf_boolean16(0x8000, "search_attr_all_files", "All Files and Directories"),
3421 ])
3422 SearchBitMap                            = bitfield8("search_bit_map", "Search Bit Map", [
3423         bf_boolean8(0x01, "search_bit_map_hidden", "Hidden"),
3424         bf_boolean8(0x02, "search_bit_map_sys", "System"),
3425         bf_boolean8(0x04, "search_bit_map_sub", "Subdirectory"),
3426         bf_boolean8(0x08, "search_bit_map_files", "Files"),
3427 ])      
3428 SearchConnNumber                        = uint32("search_conn_number", "Search Connection Number")
3429 SearchInstance                          = uint32("search_instance", "Search Instance")
3430 SearchNumber                            = uint32("search_number", "Search Number")
3431 SearchPattern                           = nstring8("search_pattern", "Search Pattern")
3432 SearchSequence                          = bytes("search_sequence", "Search Sequence", 9)
3433 SearchSequenceWord                      = uint16("search_sequence_word", "Search Sequence")
3434 Second                                  = uint8("s_second", "Seconds")
3435 SecondsRelativeToTheYear2000            = uint32("sec_rel_to_y2k", "Seconds Relative to the Year 2000") 
3436 SecretStoreVerb                         = val_string8("ss_verb", "Secret Store Verb",[
3437         [ 0x00, "Query Server" ],
3438         [ 0x01, "Read App Secrets" ],
3439         [ 0x02, "Write App Secrets" ],
3440         [ 0x03, "Add Secret ID" ],
3441         [ 0x04, "Remove Secret ID" ],
3442         [ 0x05, "Remove SecretStore" ],
3443         [ 0x06, "Enumerate Secret IDs" ],
3444         [ 0x07, "Unlock Store" ],
3445         [ 0x08, "Set Master Password" ],
3446         [ 0x09, "Get Service Information" ],
3447 ])        
3448 SecurityEquivalentList                  = fw_string("security_equiv_list", "Security Equivalent List", 128) 
3449 SecurityFlag                            = bitfield8("security_flag", "Security Flag", [
3450         bf_boolean8(0x01, "checksuming", "Checksumming"),
3451         bf_boolean8(0x02, "signature", "Signature"),
3452         bf_boolean8(0x04, "complete_signatures", "Complete Signatures"),
3453         bf_boolean8(0x08, "encryption", "Encryption"),
3454         bf_boolean8(0x80, "large_internet_packets", "Large Internet Packets (LIP) Disabled"),
3455 ])      
3456 SecurityRestrictionVersion              = uint8("security_restriction_version", "Security Restriction Version")
3457 SectorsPerBlock                         = uint8("sectors_per_block", "Sectors Per Block")
3458 SectorsPerCluster                       = uint16("sectors_per_cluster", "Sectors Per Cluster" )
3459 SectorsPerClusterLong                   = uint32("sectors_per_cluster_long", "Sectors Per Cluster" )
3460 SectorsPerTrack                         = uint8("sectors_per_track", "Sectors Per Track")
3461 SectorSize                              = uint32("sector_size", "Sector Size")
3462 SemaphoreHandle                         = uint32("semaphore_handle", "Semaphore Handle")
3463 SemaphoreName                           = nstring8("semaphore_name", "Semaphore Name")
3464 SemaphoreNameLen                        = uint8("semaphore_name_len", "Semaphore Name Len")
3465 SemaphoreOpenCount                      = uint8("semaphore_open_count", "Semaphore Open Count")
3466 SemaphoreShareCount                     = uint8("semaphore_share_count", "Semaphore Share Count")
3467 SemaphoreTimeOut                        = uint16("semaphore_time_out", "Semaphore Time Out")
3468 SemaphoreValue                          = uint16("semaphore_value", "Semaphore Value")
3469 SendStatus                              = val_string8("send_status", "Send Status", [
3470         [ 0x00, "Successful" ],
3471         [ 0x01, "Illegal Station Number" ],
3472         [ 0x02, "Client Not Logged In" ],
3473         [ 0x03, "Client Not Accepting Messages" ],
3474         [ 0x04, "Client Already has a Message" ],
3475         [ 0x96, "No Alloc Space for the Message" ],
3476         [ 0xfd, "Bad Station Number" ],
3477         [ 0xff, "Failure" ],
3478 ])
3479 SequenceByte                    = uint8("sequence_byte", "Sequence")
3480 SequenceNumber                  = uint32("sequence_number", "Sequence Number")
3481 SequenceNumber.Display("BASE_HEX")
3482 ServerAddress                   = bytes("server_address", "Server Address", 12)
3483 ServerAppNumber                 = uint16("server_app_num", "Server App Number")
3484 ServerIDList                    = uint32("server_id_list", "Server ID List")
3485 ServerID                        = uint32("server_id_number", "Server ID", BE )
3486 ServerID.Display("BASE_HEX")
3487 ServerInfoFlags                 = val_string16("server_info_flags", "Server Information Flags", [
3488         [ 0x0000, "This server is not a member of a Cluster" ],
3489         [ 0x0001, "This server is a member of a Cluster" ],
3490 ])
3491 serverListFlags                 = uint32("server_list_flags", "Server List Flags")
3492 ServerName                      = fw_string("server_name", "Server Name", 48)
3493 serverName50                    = fw_string("server_name50", "Server Name", 50)
3494 ServerNameLen                   = nstring8("server_name_len", "Server Name")
3495 ServerNameStringz               = stringz("server_name_stringz", "Server Name")
3496 ServerNetworkAddress            = bytes("server_network_address", "Server Network Address", 10)
3497 ServerNode                      = bytes("server_node", "Server Node", 6)
3498 ServerSerialNumber              = uint32("server_serial_number", "Server Serial Number")
3499 ServerStation                   = uint8("server_station", "Server Station")
3500 ServerStationLong               = uint32("server_station_long", "Server Station")
3501 ServerStationList               = uint8("server_station_list", "Server Station List")
3502 ServerStatusRecord              = fw_string("server_status_record", "Server Status Record", 64)
3503 ServerTaskNumber                = uint8("server_task_number", "Server Task Number")
3504 ServerTaskNumberLong            = uint32("server_task_number_long", "Server Task Number")
3505 ServerType                      = uint16("server_type", "Server Type")
3506 ServerType.Display("BASE_HEX")
3507 ServerUtilization               = uint32("server_utilization", "Server Utilization")
3508 ServerUtilizationPercentage     = uint8("server_utilization_percentage", "Server Utilization Percentage")
3509 ServiceType                     = val_string16("Service_type", "Service Type", [
3510         [ 0x0000,       "Unknown" ],
3511         [ 0x0001,       "User" ],
3512         [ 0x0002,       "User group" ],
3513         [ 0x0003,       "Print queue" ],
3514         [ 0x0004,       "NetWare file server" ],
3515         [ 0x0005,       "Job server" ],
3516         [ 0x0006,       "Gateway" ],
3517         [ 0x0007,       "Print server" ],
3518         [ 0x0008,       "Archive queue" ],
3519         [ 0x0009,       "Archive server" ],
3520         [ 0x000a,       "Job queue" ],
3521         [ 0x000b,       "Administration" ],
3522         [ 0x0021,       "NAS SNA gateway" ],
3523         [ 0x0026,       "Remote bridge server" ],
3524         [ 0x0027,       "TCP/IP gateway" ],
3525 ])
3526 SetCmdCategory                  = val_string8("set_cmd_catagory", "Set Command Catagory", [
3527         [ 0x00, "Communications" ],
3528         [ 0x01, "Memory" ],
3529         [ 0x02, "File Cache" ],
3530         [ 0x03, "Directory Cache" ],
3531         [ 0x04, "File System" ],
3532         [ 0x05, "Locks" ],
3533         [ 0x06, "Transaction Tracking" ],
3534         [ 0x07, "Disk" ],
3535         [ 0x08, "Time" ],
3536         [ 0x09, "NCP" ],
3537         [ 0x0a, "Miscellaneous" ],
3538         [ 0x0b, "Error Handling" ],
3539         [ 0x0c, "Directory Services" ],
3540         [ 0x0d, "MultiProcessor" ],
3541         [ 0x0e, "Service Location Protocol" ],
3542         [ 0x0f, "Licensing Services" ],
3543 ])        
3544 SetCmdFlags                             = bitfield8("set_cmd_flags", "Set Command Flags", [
3545         bf_boolean8(0x01, "cmd_flags_startup_only", "Startup.ncf Only"),
3546         bf_boolean8(0x02, "cmd_flags_hidden", "Hidden"),
3547         bf_boolean8(0x04, "cmd_flags_advanced", "Advanced"),
3548         bf_boolean8(0x08, "cmd_flags_later", "Restart Server Required to Take Effect"),
3549         bf_boolean8(0x80, "cmd_flags_secure", "Console Secured"),
3550 ])
3551 SetCmdName                      = stringz("set_cmd_name", "Set Command Name")
3552 SetCmdType                      = val_string8("set_cmd_type", "Set Command Type", [
3553         [ 0x00, "Numeric Value" ],
3554         [ 0x01, "Boolean Value" ],
3555         [ 0x02, "Ticks Value" ],
3556         [ 0x04, "Time Value" ],
3557         [ 0x05, "String Value" ],
3558         [ 0x06, "Trigger Value" ],
3559         [ 0x07, "Numeric Value" ],
3560 ])        
3561 SetCmdValueNum                  = uint32("set_cmd_value_num", "Set Command Value")
3562 SetCmdValueString               = stringz("set_cmd_value_string", "Set Command Value")
3563 SetParmName                     = stringz("set_parm_name", "Set Parameter Name")
3564 SFTErrorTable                   = bytes("sft_error_table", "SFT Error Table", 60)
3565 SFTSupportLevel                 = val_string8("sft_support_level", "SFT Support Level", [
3566         [ 0x01, "Server Offers Hot Disk Error Fixing" ],
3567         [ 0x02, "Server Offers Disk Mirroring and Transaction Tracking" ],
3568         [ 0x03, "Server Offers Physical Server Mirroring" ],
3569 ])
3570 ShareableLockCount              = uint16("shareable_lock_count", "Shareable Lock Count")
3571 SharedMemoryAddresses           = bytes("shared_memory_addresses", "Shared Memory Addresses", 10)
3572 ShortName                       = fw_string("short_name", "Short Name", 12)
3573 ShortStkName                    = fw_string("short_stack_name", "Short Stack Name", 16)
3574 SiblingCount                    = uint32("sibling_count", "Sibling Count")
3575 SMIDs                           = uint32("smids", "Storage Media ID's")
3576 SoftwareDescription             = fw_string("software_description", "Software Description", 65)
3577 SoftwareDriverType              = uint8("software_driver_type", "Software Driver Type")
3578 SoftwareMajorVersionNumber      = uint8("software_major_version_number", "Software Major Version Number")
3579 SoftwareMinorVersionNumber      = uint8("software_minor_version_number", "Software Minor Version Number")
3580 SourceDirHandle                 = uint8("source_dir_handle", "Source Directory Handle")
3581 sourceOriginateTime             = bytes("source_originate_time", "Source Originate Time", 8)
3582 sourceOriginateTime.Display("BASE_HEX")
3583 SourcePath                      = nstring8("source_path", "Source Path")
3584 SourcePathComponentCount        = uint8("source_component_count", "Source Path Component Count")
3585 sourceReturnTime                = bytes("source_return_time", "Source Return Time", 8)
3586 sourceReturnTime.Display("BASE_HEX")
3587 SpaceUsed                       = uint32("space_used", "Space Used")
3588 SpaceMigrated                   = uint32("space_migrated", "Space Migrated")
3589 SrcNameSpace                    = val_string8("src_name_space", "Source Name Space", [
3590         [ 0x00, "DOS Name Space" ],
3591         [ 0x01, "MAC Name Space" ],
3592         [ 0x02, "NFS Name Space" ],
3593         [ 0x04, "Long Name Space" ],
3594 ])
3595 SupModID                        = uint32("sup_mod_id", "Sup Mod ID")
3596 StackCount                      = uint32("stack_count", "Stack Count")
3597 StackFullNameStr                = nstring8("stack_full_name_str", "Stack Full Name")
3598 StackMajorVN                    = uint8("stack_major_vn", "Stack Major Version Number")
3599 StackMinorVN                    = uint8("stack_minor_vn", "Stack Minor Version Number")
3600 StackNumber                     = uint32("stack_number", "Stack Number")
3601 StartConnNumber                 = uint32("start_conn_num", "Starting Connection Number")
3602 StartingBlock                   = uint16("starting_block", "Starting Block")
3603 StartingNumber                  = uint32("starting_number", "Starting Number")
3604 StartingSearchNumber            = uint16("start_search_number", "Start Search Number")
3605 StartNumber                     = uint32("start_number", "Start Number")
3606 startNumberFlag                 = uint16("start_number_flag", "Start Number Flag")
3607 StartVolumeNumber               = uint32("start_volume_number", "Starting Volume Number")
3608 StationList                     = uint32("station_list", "Station List")
3609 StationNumber                   = bytes("station_number", "Station Number", 3)
3610 StatMajorVersion                = uint8("stat_major_version", "Statistics Table Major Version")
3611 StatMinorVersion                = uint8("stat_minor_version", "Statistics Table Minor Version")
3612 Status                          = bitfield16("status", "Status", [
3613         bf_boolean16(0x0001, "user_info_logged_in", "Logged In"),
3614         bf_boolean16(0x0002, "user_info_being_abort", "Being Aborted"),
3615         bf_boolean16(0x0004, "user_info_audited", "Audited"),
3616         bf_boolean16(0x0008, "user_info_need_sec", "Needs Security Change"),
3617         bf_boolean16(0x0010, "user_info_mac_station", "MAC Station"),
3618         bf_boolean16(0x0020, "user_info_temp_authen", "Temporary Authenticated"),
3619         bf_boolean16(0x0040, "user_info_audit_conn", "Audit Connection Recorded"),
3620         bf_boolean16(0x0080, "user_info_dsaudit_conn", "DS Audit Connection Recorded"),
3621         bf_boolean16(0x0100, "user_info_logout", "Logout in Progress"),
3622         bf_boolean16(0x0200, "user_info_int_login", "Internal Login"),
3623         bf_boolean16(0x0400, "user_info_bindery", "Bindery Connection"),
3624 ])
3625 StatusFlagBits                  = bitfield32("status_flag_bits", "Status Flag", [
3626         bf_boolean32(0x00000001, "status_flag_bits_suballoc", "Sub Allocation"),
3627         bf_boolean32(0x00000002, "status_flag_bits_comp", "Compression"),
3628         bf_boolean32(0x00000004, "status_flag_bits_migrate", "Migration"),
3629         bf_boolean32(0x00000008, "status_flag_bits_audit", "Audit"),
3630         bf_boolean32(0x00000010, "status_flag_bits_ro", "Read Only"),
3631         bf_boolean32(0x00000020, "status_flag_bits_im_purge", "Immediate Purge"),
3632         bf_boolean32(0x80000000, "status_flag_bits_nss", "NSS Volume"),
3633 ])
3634 SubAllocClusters                = uint32("sub_alloc_clusters", "Sub Alloc Clusters")
3635 SubAllocFreeableClusters        = uint32("sub_alloc_freeable_clusters", "Sub Alloc Freeable Clusters")
3636 Subdirectory                    = uint32("sub_directory", "Subdirectory")
3637 Subdirectory.Display("BASE_HEX")
3638 SuggestedFileSize               = uint32("suggested_file_size", "Suggested File Size")
3639 SupportModuleID                 = uint32("support_module_id", "Support Module ID")
3640 SynchName                       = nstring8("synch_name", "Synch Name")
3641 SystemIntervalMarker            = uint32("system_interval_marker", "System Interval Marker")
3642
3643 TabSize                         = uint8( "tab_size", "Tab Size" )
3644 TargetClientList                = uint8("target_client_list", "Target Client List")
3645 TargetConnectionNumber          = uint16("target_connection_number", "Target Connection Number")
3646 TargetDirectoryBase             = uint32("target_directory_base", "Target Directory Base")
3647 TargetDirHandle                 = uint8("target_dir_handle", "Target Directory Handle")
3648 TargetEntryID                   = uint32("target_entry_id", "Target Entry ID")
3649 TargetEntryID.Display("BASE_HEX")
3650 TargetExecutionTime             = bytes("target_execution_time", "Target Execution Time", 6)
3651 TargetFileHandle                = bytes("target_file_handle", "Target File Handle", 6)
3652 TargetFileOffset                = uint32("target_file_offset", "Target File Offset")
3653 TargetMessage                   = nstring8("target_message", "Message")
3654 TargetPrinter                   = uint8( "target_ptr", "Target Printer" )
3655 targetReceiveTime               = bytes("target_receive_time", "Target Receive Time", 8)
3656 targetReceiveTime.Display("BASE_HEX")
3657 TargetServerIDNumber            = uint32("target_server_id_number", "Target Server ID Number", BE )
3658 TargetServerIDNumber.Display("BASE_HEX")
3659 targetTransmitTime              = bytes("target_transmit_time", "Target Transmit Time", 8)
3660 targetTransmitTime.Display("BASE_HEX")
3661 TaskNumByte                     = uint8("task_num_byte", "Task Number")
3662 TaskNumber                      = uint32("task_number", "Task Number")
3663 TaskNumberWord                  = uint16("task_number_word", "Task Number")
3664 TextJobDescription              = fw_string("text_job_description", "Text Job Description", 50)
3665 ThrashingCount                  = uint16("thrashing_count", "Thrashing Count")
3666 TimeoutLimit                    = uint16("timeout_limit", "Timeout Limit")
3667 TimesyncStatus                  = bitfield32("timesync_status_flags", "Timesync Status", [
3668         bf_boolean32(0x00000001, "timesync_status_sync", "Time is Synchronized"),
3669         bf_boolean32(0x00000002, "timesync_status_net_sync", "Time is Synchronized to the Network"), 
3670         bf_boolean32(0x00000004, "timesync_status_active", "Time Synchronization is Active"),
3671         bf_boolean32(0x00000008, "timesync_status_external", "External Time Synchronization Active"),
3672         bf_val_str32(0x00000700, "timesync_status_server_type", "Time Server Type", [
3673                 [ 0x01, "Client Time Server" ],
3674                 [ 0x02, "Secondary Time Server" ],
3675                 [ 0x03, "Primary Time Server" ],
3676                 [ 0x04, "Reference Time Server" ],
3677                 [ 0x05, "Single Reference Time Server" ],
3678         ]),
3679         bf_boolean32(0x000f0000, "timesync_status_ext_sync", "External Clock Status"),
3680 ])        
3681 TimeToNet                       = uint16("time_to_net", "Time To Net")
3682 TotalBlocks                     = uint32("total_blocks", "Total Blocks")        
3683 TotalBlocksToDecompress         = uint32("total_blks_to_dcompress", "Total Blocks To Decompress")
3684 TotalBytesRead                  = bytes("user_info_ttl_bytes_rd", "Total Bytes Read", 6)
3685 TotalBytesWritten               = bytes("user_info_ttl_bytes_wrt", "Total Bytes Written", 6)
3686 TotalCacheWrites                = uint32("total_cache_writes", "Total Cache Writes")
3687 TotalChangedFATs                = uint32("total_changed_fats", "Total Changed FAT Entries")
3688 TotalCommonCnts                 = uint32("total_common_cnts", "Total Common Counts")
3689 TotalCntBlocks                  = uint32("total_cnt_blocks", "Total Count Blocks")
3690 TotalDataStreamDiskSpaceAlloc   = uint32("total_stream_size_struct_space_alloc", "Total Data Stream Disk Space Alloc")
3691 TotalDirectorySlots             = uint16("total_directory_slots", "Total Directory Slots")
3692 TotalDirectoryEntries           = uint32("total_dir_entries", "Total Directory Entries")
3693 TotalDynamicSpace               = uint32("total_dynamic_space", "Total Dynamic Space")
3694 TotalExtendedDirectoryExtants   = uint32("total_extended_directory_extants", "Total Extended Directory Extants")
3695 TotalFileServicePackets         = uint32("total_file_service_packets", "Total File Service Packets")
3696 TotalFilesOpened                = uint32("total_files_opened", "Total Files Opened")
3697 TotalLFSCounters                = uint32("total_lfs_counters", "Total LFS Counters")
3698 TotalOffspring                  = uint16("total_offspring", "Total Offspring")
3699 TotalOtherPackets               = uint32("total_other_packets", "Total Other Packets")
3700 TotalQueueJobs                  = uint32("total_queue_jobs", "Total Queue Jobs")
3701 TotalReadRequests               = uint32("total_read_requests", "Total Read Requests")
3702 TotalRequest                    = uint32("total_request", "Total Requests")
3703 TotalRequestPackets             = uint32("total_request_packets", "Total Request Packets")
3704 TotalRoutedPackets              = uint32("total_routed_packets", "Total Routed Packets")
3705 TotalRxPkts                     = uint32("total_rx_pkts", "Total Receive Packets")
3706 TotalServerMemory               = uint16("total_server_memory", "Total Server Memory", BE)
3707 TotalTransactionsBackedOut      = uint32("total_trans_backed_out", "Total Transactions Backed Out")
3708 TotalTransactionsPerformed      = uint32("total_trans_performed", "Total Transactions Performed")
3709 TotalTxPkts                     = uint32("total_tx_pkts", "Total Transmit Packets")
3710 TotalUnfilledBackoutRequests    = uint16("total_unfilled_backout_requests", "Total Unfilled Backout Requests")
3711 TotalVolumeClusters             = uint16("total_volume_clusters", "Total Volume Clusters")
3712 TotalWriteRequests              = uint32("total_write_requests", "Total Write Requests")
3713 TotalWriteTransactionsPerformed = uint32("total_write_trans_performed", "Total Write Transactions Performed")
3714 TrackOnFlag                     = boolean8("track_on_flag", "Track On Flag")
3715 TransactionDiskSpace            = uint16("transaction_disk_space", "Transaction Disk Space")
3716 TransactionFATAllocations       = uint32("transaction_fat_allocations", "Transaction FAT Allocations")
3717 TransactionFileSizeChanges      = uint32("transaction_file_size_changes", "Transaction File Size Changes")
3718 TransactionFilesTruncated       = uint32("transaction_files_truncated", "Transaction Files Truncated")
3719 TransactionNumber               = uint32("transaction_number", "Transaction Number")
3720 TransactionTrackingEnabled      = uint8("transaction_tracking_enabled", "Transaction Tracking Enabled")
3721 TransactionTrackingFlag         = uint16("tts_flag", "Transaction Tracking Flag")
3722 TransactionTrackingSupported    = uint8("transaction_tracking_supported", "Transaction Tracking Supported")
3723 TransactionVolumeNumber         = uint16("transaction_volume_number", "Transaction Volume Number")
3724 TransportType                   = val_string8("transport_type", "Communications Type", [
3725         [ 0x01, "Internet Packet Exchange (IPX)" ],
3726         [ 0x05, "User Datagram Protocol (UDP)" ],
3727         [ 0x06, "Transmission Control Protocol (TCP)" ],
3728 ])
3729 TreeLength                      = uint32("tree_length", "Tree Length")
3730 TreeName                        = nstring32("tree_name", "Tree Name")
3731 TreeName.NWUnicode()
3732 TrusteeRights                   = bitfield16("trustee_rights_low", "Trustee Rights", [
3733         bf_boolean16(0x0001, "trustee_rights_read", "Read"),
3734         bf_boolean16(0x0002, "trustee_rights_write", "Write"),
3735         bf_boolean16(0x0004, "trustee_rights_open", "Open"),
3736         bf_boolean16(0x0008, "trustee_rights_create", "Create"),
3737         bf_boolean16(0x0010, "trustee_rights_del", "Delete"),
3738         bf_boolean16(0x0020, "trustee_rights_parent", "Parental"),
3739         bf_boolean16(0x0040, "trustee_rights_search", "Search"),
3740         bf_boolean16(0x0080, "trustee_rights_modify", "Modify"),
3741         bf_boolean16(0x0100, "trustee_rights_super", "Supervisor"),
3742 ])
3743 TTSLevel                        = uint8("tts_level", "TTS Level")
3744 TrusteeSetNumber                = uint8("trustee_set_number", "Trustee Set Number")
3745 TrusteeID                       = uint32("trustee_id_set", "Trustee ID")
3746 TrusteeID.Display("BASE_HEX")
3747 ttlCompBlks                     = uint32("ttl_comp_blks", "Total Compression Blocks")
3748 TtlDSDskSpaceAlloc              = uint32("ttl_ds_disk_space_alloc", "Total Streams Space Allocated")
3749 TtlEAs                          = uint32("ttl_eas", "Total EA's")
3750 TtlEAsDataSize                  = uint32("ttl_eas_data_size", "Total EA's Data Size")
3751 TtlEAsKeySize                   = uint32("ttl_eas_key_size", "Total EA's Key Size")
3752 ttlIntermediateBlks             = uint32("ttl_inter_blks", "Total Intermediate Blocks")
3753 TtlMigratedSize                 = uint32("ttl_migrated_size", "Total Migrated Size")
3754 TtlNumOfRTags                   = uint32("ttl_num_of_r_tags", "Total Number of Resource Tags")
3755 TtlNumOfSetCmds                 = uint32("ttl_num_of_set_cmds", "Total Number of Set Commands")
3756 TtlValuesLength                 = uint32("ttl_values_length", "Total Values Length")
3757 TtlWriteDataSize                = uint32("ttl_write_data_size", "Total Write Data Size")
3758 TurboUsedForFileService         = uint16("turbo_used_for_file_service", "Turbo Used For File Service")
3759
3760 UnclaimedPkts                   = uint32("un_claimed_packets", "Unclaimed Packets")
3761 UnCompressableDataStreamsCount  = uint32("un_compressable_data_streams_count", "Uncompressable Data Streams Count")
3762 Undefined8                      = bytes("undefined_8", "Undefined", 8)
3763 Undefined28                     = bytes("undefined_28", "Undefined", 28)
3764 UndefinedWord                   = uint16("undefined_word", "Undefined")
3765 UniqueID                        = uint8("unique_id", "Unique ID")
3766 UnknownByte                     = uint8("unknown_byte", "Unknown Byte")
3767 Unused                          = uint8("un_used", "Unused")
3768 UnusedBlocks                    = uint32("unused_blocks", "Unused Blocks")
3769 UnUsedDirectoryEntries          = uint32("un_used_directory_entries", "Unused Directory Entries")
3770 UnusedDiskBlocks                = uint32("unused_disk_blocks", "Unused Disk Blocks")
3771 UnUsedExtendedDirectoryExtants  = uint32("un_used_extended_directory_extants", "Unused Extended Directory Extants")
3772 UpdateDate                      = uint16("update_date", "Update Date")
3773 UpdateDate.NWDate()
3774 UpdateID                        = uint32("update_id", "Update ID")
3775 UpdateID.Display("BASE_HEX")
3776 UpdateTime                      = uint16("update_time", "Update Time")
3777 UpdateTime.NWTime()
3778 UseCount                        = val_string16("user_info_use_count", "Use Count", [
3779         [ 0x0000, "Connection is not in use" ],
3780         [ 0x0001, "Connection is in use" ],
3781 ])
3782 UsedBlocks                      = uint32("used_blocks", "Used Blocks")
3783 UserID                          = uint32("user_id", "User ID", BE)
3784 UserID.Display("BASE_HEX")
3785 UserLoginAllowed                = val_string8("user_login_allowed", "Login Status", [
3786         [ 0x00, "Client Login Disabled" ],
3787         [ 0x01, "Client Login Enabled" ],
3788 ])
3789
3790 UserName                        = nstring8("user_name", "User Name")
3791 UserName16                      = fw_string("user_name_16", "User Name", 16)
3792 UserName48                      = fw_string("user_name_48", "User Name", 48)
3793 UserType                        = uint16("user_type", "User Type")
3794 UTCTimeInSeconds                = uint32("uts_time_in_seconds", "UTC Time in Seconds")
3795
3796 ValueAvailable                  = val_string8("value_available", "Value Available", [
3797         [ 0x00, "Has No Value" ],
3798         [ 0xff, "Has Value" ],
3799 ])
3800 VAPVersion                      = uint8("vap_version", "VAP Version")
3801 VariableBitMask                 = uint32("variable_bit_mask", "Variable Bit Mask")
3802 VariableBitsDefined             = uint16("variable_bits_defined", "Variable Bits Defined")
3803 VConsoleRevision                = uint8("vconsole_rev", "Console Revision")
3804 VConsoleVersion                 = uint8("vconsole_ver", "Console Version")
3805 Verb                            = uint32("verb", "Verb")
3806 VerbData                        = uint8("verb_data", "Verb Data")
3807 version                         = uint32("version", "Version")
3808 VersionNumber                   = uint8("version_number", "Version")
3809 VertLocation                    = uint16("vert_location", "Vertical Location")
3810 VirtualConsoleVersion           = uint8("virtual_console_version", "Virtual Console Version")
3811 VolumeID                        = uint32("volume_id", "Volume ID")
3812 VolumeID.Display("BASE_HEX")
3813 VolInfoReplyLen                 = uint16("vol_info_reply_len", "Volume Information Reply Length")
3814 VolumeCachedFlag                = val_string8("volume_cached_flag", "Volume Cached Flag", [
3815         [ 0x00, "Volume is Not Cached" ],
3816         [ 0xff, "Volume is Cached" ],
3817 ])      
3818 VolumeHashedFlag                = val_string8("volume_hashed_flag", "Volume Hashed Flag", [
3819         [ 0x00, "Volume is Not Hashed" ],
3820         [ 0xff, "Volume is Hashed" ],
3821 ])      
3822 VolumeLastModifiedDate          = uint16("volume_last_modified_date", "Volume Last Modified Date")
3823 VolumeLastModifiedDate.NWDate()
3824 VolumeLastModifiedTime          = uint16("volume_last_modified_time", "Volume Last Modified Time") 
3825 VolumeLastModifiedTime.NWTime()
3826 VolumeMountedFlag               = val_string8("volume_mounted_flag", "Volume Mounted Flag", [
3827         [ 0x00, "Volume is Not Mounted" ],
3828         [ 0xff, "Volume is Mounted" ],
3829 ])
3830 VolumeName                      = fw_string("volume_name", "Volume Name", 16)
3831 VolumeNameLen                   = nstring8("volume_name_len", "Volume Name")
3832 VolumeNameStringz               = stringz("volume_name_stringz", "Volume Name")
3833 VolumeNumber                    = uint8("volume_number", "Volume Number")
3834 VolumeNumberLong                = uint32("volume_number_long", "Volume Number")
3835 VolumeRemovableFlag             = val_string8("volume_removable_flag", "Volume Removable Flag", [
3836         [ 0x00, "Disk Cannot be Removed from Server" ],
3837         [ 0xff, "Disk Can be Removed from Server" ],
3838 ])
3839 VolumeRequestFlags              = val_string16("volume_request_flags", "Volume Request Flags", [
3840         [ 0x0000, "Return name with volume number" ],
3841         [ 0x0001, "Do not return name with volume number" ],
3842 ])
3843 VolumeSizeInClusters            = uint32("volume_size_in_clusters", "Volume Size in Clusters")
3844 VolumesSupportedMax             = uint16("volumes_supported_max", "Volumes Supported Max")
3845 VolumeType                      = val_string16("volume_type", "Volume Type", [
3846         [ 0x0000, "NetWare 386" ],
3847         [ 0x0001, "NetWare 286" ],
3848         [ 0x0002, "NetWare 386 Version 30" ],
3849         [ 0x0003, "NetWare 386 Version 31" ],
3850 ])
3851 WastedServerMemory              = uint16("wasted_server_memory", "Wasted Server Memory", BE)
3852 WaitTime                        = uint32("wait_time", "Wait Time")
3853
3854 Year                            = val_string8("year", "Year",[
3855         [ 0x50, "1980" ],
3856         [ 0x51, "1981" ],
3857         [ 0x52, "1982" ],
3858         [ 0x53, "1983" ],
3859         [ 0x54, "1984" ],
3860         [ 0x55, "1985" ],
3861         [ 0x56, "1986" ],
3862         [ 0x57, "1987" ],
3863         [ 0x58, "1988" ],
3864         [ 0x59, "1989" ],
3865         [ 0x5a, "1990" ],
3866         [ 0x5b, "1991" ],
3867         [ 0x5c, "1992" ],
3868         [ 0x5d, "1993" ],
3869         [ 0x5e, "1994" ],
3870         [ 0x5f, "1995" ],
3871         [ 0x60, "1996" ],
3872         [ 0x61, "1997" ],
3873         [ 0x62, "1998" ],
3874         [ 0x63, "1999" ],
3875         [ 0x64, "2000" ],
3876         [ 0x65, "2001" ],
3877         [ 0x66, "2002" ],
3878         [ 0x67, "2003" ],
3879         [ 0x68, "2004" ],
3880         [ 0x69, "2005" ],
3881         [ 0x6a, "2006" ],
3882         [ 0x6b, "2007" ],
3883         [ 0x6c, "2008" ],
3884         [ 0x6d, "2009" ],
3885         [ 0x6e, "2010" ],
3886         [ 0x6f, "2011" ],
3887         [ 0x70, "2012" ],
3888         [ 0x71, "2013" ],
3889         [ 0x72, "2014" ],
3890         [ 0x73, "2015" ],
3891         [ 0x74, "2016" ],
3892         [ 0x75, "2017" ],
3893         [ 0x76, "2018" ],
3894         [ 0x77, "2019" ],
3895         [ 0x78, "2020" ],
3896         [ 0x79, "2021" ],
3897         [ 0x7a, "2022" ],
3898         [ 0x7b, "2023" ],
3899         [ 0x7c, "2024" ],
3900         [ 0x7d, "2025" ],
3901         [ 0x7e, "2026" ],
3902         [ 0x7f, "2027" ],
3903         [ 0xc0, "1984" ],
3904         [ 0xc1, "1985" ],
3905         [ 0xc2, "1986" ],
3906         [ 0xc3, "1987" ],
3907         [ 0xc4, "1988" ],
3908         [ 0xc5, "1989" ],
3909         [ 0xc6, "1990" ],
3910         [ 0xc7, "1991" ],
3911         [ 0xc8, "1992" ],
3912         [ 0xc9, "1993" ],
3913         [ 0xca, "1994" ],
3914         [ 0xcb, "1995" ],
3915         [ 0xcc, "1996" ],
3916         [ 0xcd, "1997" ],
3917         [ 0xce, "1998" ],
3918         [ 0xcf, "1999" ],
3919         [ 0xd0, "2000" ],
3920         [ 0xd1, "2001" ],
3921         [ 0xd2, "2002" ],
3922         [ 0xd3, "2003" ],
3923         [ 0xd4, "2004" ],
3924         [ 0xd5, "2005" ],
3925         [ 0xd6, "2006" ],
3926         [ 0xd7, "2007" ],
3927         [ 0xd8, "2008" ],
3928         [ 0xd9, "2009" ],
3929         [ 0xda, "2010" ],
3930         [ 0xdb, "2011" ],
3931         [ 0xdc, "2012" ],
3932         [ 0xdd, "2013" ],
3933         [ 0xde, "2014" ],
3934         [ 0xdf, "2015" ],
3935 ])
3936 ##############################################################################
3937 # Structs
3938 ##############################################################################
3939                 
3940                 
3941 acctngInfo                      = struct("acctng_info_struct", [
3942         HoldTime,
3943         HoldAmount,
3944         ChargeAmount,
3945         HeldConnectTimeInMinutes,
3946         HeldRequests,
3947         HeldBytesRead,
3948         HeldBytesWritten,
3949 ],"Accounting Information")
3950 AFP10Struct                       = struct("afp_10_struct", [
3951         AFPEntryID,
3952         ParentID,
3953         AttributesDef16,
3954         DataForkLen,
3955         ResourceForkLen,
3956         TotalOffspring,
3957         CreationDate,
3958         LastAccessedDate,
3959         ModifiedDate,
3960         ModifiedTime,
3961         ArchivedDate,
3962         ArchivedTime,
3963         CreatorID,
3964         Reserved4,
3965         FinderAttr,
3966         HorizLocation,
3967         VertLocation,
3968         FileDirWindow,
3969         Reserved16,
3970         LongName,
3971         CreatorID,
3972         ShortName,
3973         AccessPrivileges,
3974 ], "AFP Information" )                
3975 AFP20Struct                       = struct("afp_20_struct", [
3976         AFPEntryID,
3977         ParentID,
3978         AttributesDef16,
3979         DataForkLen,
3980         ResourceForkLen,
3981         TotalOffspring,
3982         CreationDate,
3983         LastAccessedDate,
3984         ModifiedDate,
3985         ModifiedTime,
3986         ArchivedDate,
3987         ArchivedTime,
3988         CreatorID,
3989         Reserved4,
3990         FinderAttr,
3991         HorizLocation,
3992         VertLocation,
3993         FileDirWindow,
3994         Reserved16,
3995         LongName,
3996         CreatorID,
3997         ShortName,
3998         AccessPrivileges,
3999         Reserved,
4000         ProDOSInfo,
4001 ], "AFP Information" )                
4002 ArchiveDateStruct               = struct("archive_date_struct", [
4003         ArchivedDate,
4004 ])                
4005 ArchiveIdStruct                 = struct("archive_id_struct", [
4006         ArchiverID,
4007 ])                
4008 ArchiveInfoStruct               = struct("archive_info_struct", [
4009         ArchivedTime,
4010         ArchivedDate,
4011         ArchiverID,
4012 ], "Archive Information")
4013 ArchiveTimeStruct               = struct("archive_time_struct", [
4014         ArchivedTime,
4015 ])                
4016 AttributesStruct                = struct("attributes_struct", [
4017         AttributesDef32,
4018         FlagsDef,
4019 ], "Attributes")
4020 authInfo                        = struct("auth_info_struct", [
4021         Status,
4022         Reserved2,
4023         Privileges,
4024 ])
4025 BoardNameStruct                 = struct("board_name_struct", [
4026         DriverBoardName,
4027         DriverShortName,
4028         DriverLogicalName,
4029 ], "Board Name")        
4030 CacheInfo                       = struct("cache_info", [
4031         uint32("max_byte_cnt", "Maximum Byte Count"),
4032         uint32("min_num_of_cache_buff", "Minimum Number Of Cache Buffers"),
4033         uint32("min_cache_report_thresh", "Minimum Cache Report Threshold"),
4034         uint32("alloc_waiting", "Allocate Waiting Count"),
4035         uint32("ndirty_blocks", "Number of Dirty Blocks"),
4036         uint32("cache_dirty_wait_time", "Cache Dirty Wait Time"),
4037         uint32("cache_max_concur_writes", "Cache Maximum Concurrent Writes"),
4038         uint32("max_dirty_time", "Maximum Dirty Time"),
4039         uint32("num_dir_cache_buff", "Number Of Directory Cache Buffers"),
4040         uint32("cache_byte_to_block", "Cache Byte To Block Shift Factor"),
4041 ], "Cache Information")
4042 CommonLanStruc                  = struct("common_lan_struct", [
4043         boolean8("not_supported_mask", "Bit Counter Supported"),
4044         Reserved3,
4045         uint32("total_tx_packet_count", "Total Transmit Packet Count"),
4046         uint32("total_rx_packet_count", "Total Receive Packet Count"),
4047         uint32("no_ecb_available_count", "No ECB Available Count"),
4048         uint32("packet_tx_too_big_count", "Transmit Packet Too Big Count"),
4049         uint32("packet_tx_too_small_count", "Transmit Packet Too Small Count"),
4050         uint32("packet_rx_overflow_count", "Receive Packet Overflow Count"),
4051         uint32("packet_rx_too_big_count", "Receive Packet Too Big Count"),
4052         uint32("packet_rs_too_small_count", "Receive Packet Too Small Count"),
4053         uint32("packet_tx_misc_error_count", "Transmit Packet Misc Error Count"),
4054         uint32("packet_rx_misc_error_count", "Receive Packet Misc Error Count"),
4055         uint32("retry_tx_count", "Transmit Retry Count"),
4056         uint32("checksum_error_count", "Checksum Error Count"),
4057         uint32("hardware_rx_mismatch_count", "Hardware Receive Mismatch Count"),
4058 ], "Common LAN Information")
4059 CompDeCompStat                  = struct("comp_d_comp_stat", [ 
4060         uint32("cmphitickhigh", "Compress High Tick"),        
4061         uint32("cmphitickcnt", "Compress High Tick Count"),        
4062         uint32("cmpbyteincount", "Compress Byte In Count"),        
4063         uint32("cmpbyteoutcnt", "Compress Byte Out Count"),        
4064         uint32("cmphibyteincnt", "Compress High Byte In Count"),        
4065         uint32("cmphibyteoutcnt", "Compress High Byte Out Count"),        
4066         uint32("decphitickhigh", "DeCompress High Tick"),        
4067         uint32("decphitickcnt", "DeCompress High Tick Count"),        
4068         uint32("decpbyteincount", "DeCompress Byte In Count"),        
4069         uint32("decpbyteoutcnt", "DeCompress Byte Out Count"),        
4070         uint32("decphibyteincnt", "DeCompress High Byte In Count"),        
4071         uint32("decphibyteoutcnt", "DeCompress High Byte Out Count"),
4072 ], "Compression/Decompression Information")                
4073 ConnFileStruct                  = struct("conn_file_struct", [
4074         ConnectionNumberWord,
4075         TaskNumByte,
4076         LockType,
4077         AccessControl,
4078         LockFlag,
4079 ], "File Connection Information")
4080 ConnStruct                      = struct("conn_struct", [
4081         TaskNumByte,
4082         LockType,
4083         AccessControl,
4084         LockFlag,
4085         VolumeNumber,
4086         DirectoryEntryNumberWord,
4087         FileName14,
4088 ], "Connection Information")
4089 ConnTaskStruct                  = struct("conn_task_struct", [
4090         ConnectionNumberByte,
4091         TaskNumByte,
4092 ], "Task Information")
4093 Counters                        = struct("counters_struct", [
4094         uint32("read_exist_blck", "Read Existing Block Count"),
4095         uint32("read_exist_write_wait", "Read Existing Write Wait Count"),
4096         uint32("read_exist_part_read", "Read Existing Partial Read Count"),
4097         uint32("read_exist_read_err", "Read Existing Read Error Count"),
4098         uint32("wrt_blck_cnt", "Write Block Count"),
4099         uint32("wrt_entire_blck", "Write Entire Block Count"),
4100         uint32("internl_dsk_get", "Internal Disk Get Count"),
4101         uint32("internl_dsk_get_need_to_alloc", "Internal Disk Get Need To Allocate Count"),
4102         uint32("internl_dsk_get_someone_beat", "Internal Disk Get Someone Beat My Count"),
4103         uint32("internl_dsk_get_part_read", "Internal Disk Get Partial Read Count"),
4104         uint32("internl_dsk_get_read_err", "Internal Disk Get Read Error Count"),
4105         uint32("async_internl_dsk_get", "Async Internal Disk Get Count"),
4106         uint32("async_internl_dsk_get_need_to_alloc", "Async Internal Disk Get Need To Alloc"),
4107         uint32("async_internl_dsk_get_someone_beat", "Async Internal Disk Get Someone Beat Me"),
4108         uint32("err_doing_async_read", "Error Doing Async Read Count"),
4109         uint32("internl_dsk_get_no_read", "Internal Disk Get No Read Count"),
4110         uint32("internl_dsk_get_no_read_alloc", "Internal Disk Get No Read Allocate Count"),
4111         uint32("internl_dsk_get_no_read_someone_beat", "Internal Disk Get No Read Someone Beat Me Count"),
4112         uint32("internl_dsk_write", "Internal Disk Write Count"),
4113         uint32("internl_dsk_write_alloc", "Internal Disk Write Allocate Count"),
4114         uint32("internl_dsk_write_someone_beat", "Internal Disk Write Someone Beat Me Count"),
4115         uint32("write_err", "Write Error Count"),
4116         uint32("wait_on_sema", "Wait On Semaphore Count"),
4117         uint32("alloc_blck_i_had_to_wait_for", "Allocate Block I Had To Wait For Someone Count"),
4118         uint32("alloc_blck", "Allocate Block Count"),
4119         uint32("alloc_blck_i_had_to_wait", "Allocate Block I Had To Wait Count"),
4120 ], "Disk Counter Information")
4121 CPUInformation                  = struct("cpu_information", [
4122         PageTableOwnerFlag,
4123         CPUType,
4124         Reserved3,
4125         CoprocessorFlag,
4126         BusType,
4127         Reserved3,
4128         IOEngineFlag,
4129         Reserved3,
4130         FSEngineFlag,
4131         Reserved3, 
4132         NonDedFlag,
4133         Reserved3,
4134         CPUString,
4135         CoProcessorString,
4136         BusString,
4137 ], "CPU Information")
4138 CreationDateStruct              = struct("creation_date_struct", [
4139         CreationDate,
4140 ])                
4141 CreationInfoStruct              = struct("creation_info_struct", [
4142         CreationTime,
4143         CreationDate,
4144         CreatorID,
4145 ], "Creation Information")
4146 CreationTimeStruct              = struct("creation_time_struct", [
4147         CreationTime,
4148 ])
4149 CustomCntsInfo                  = struct("custom_cnts_info", [
4150         CustomVariableValue,
4151         CustomString,
4152 ], "Custom Counters" )        
4153 DataStreamSizeStruct            = struct("data_stream_size_struct", [
4154         DataStreamSize,
4155 ])
4156 DirCacheInfo                    = struct("dir_cache_info", [
4157         uint32("min_time_since_file_delete", "Minimum Time Since File Delete"),
4158         uint32("abs_min_time_since_file_delete", "Absolute Minimum Time Since File Delete"),
4159         uint32("min_num_of_dir_cache_buff", "Minimum Number Of Directory Cache Buffers"),
4160         uint32("max_num_of_dir_cache_buff", "Maximum Number Of Directory Cache Buffers"),
4161         uint32("num_of_dir_cache_buff", "Number Of Directory Cache Buffers"),
4162         uint32("dc_min_non_ref_time", "DC Minimum Non-Referenced Time"),
4163         uint32("dc_wait_time_before_new_buff", "DC Wait Time Before New Buffer"),
4164         uint32("dc_max_concurrent_writes", "DC Maximum Concurrent Writes"),
4165         uint32("dc_dirty_wait_time", "DC Dirty Wait Time"),
4166         uint32("dc_double_read_flag", "DC Double Read Flag"),
4167         uint32("map_hash_node_count", "Map Hash Node Count"),
4168         uint32("space_restriction_node_count", "Space Restriction Node Count"),
4169         uint32("trustee_list_node_count", "Trustee List Node Count"),
4170         uint32("percent_of_vol_used_by_dirs", "Percent Of Volume Used By Directories"),
4171 ], "Directory Cache Information")
4172 DirEntryStruct                  = struct("dir_entry_struct", [
4173         DirectoryEntryNumber,
4174         DOSDirectoryEntryNumber,
4175         VolumeNumberLong,
4176 ], "Directory Entry Information")
4177 DirectoryInstance               = struct("directory_instance", [
4178         SearchSequenceWord,
4179         DirectoryID,
4180         Reserved2,
4181         DirectoryName14,
4182         DirectoryAttributes,
4183         DirectoryAccessRights,
4184         CreationDate,
4185         CreationTime,
4186         CreatorID,
4187         Reserved2,
4188         DirectoryStamp,
4189 ], "Directory Information")
4190 DMInfoLevel0                    = struct("dm_info_level_0", [
4191         uint32("io_flag", "IO Flag"),
4192         uint32("sm_info_size", "Storage Module Information Size"),
4193         uint32("avail_space", "Available Space"),
4194         uint32("used_space", "Used Space"),
4195         stringz("s_module_name", "Storage Module Name"),
4196         uint8("s_m_info", "Storage Media Information"),
4197 ])
4198 DMInfoLevel1                    = struct("dm_info_level_1", [
4199         NumberOfSMs,
4200         SMIDs,
4201 ])
4202 DMInfoLevel2                    = struct("dm_info_level_2", [
4203         Name,
4204 ])
4205 DOSDirectoryEntryStruct         = struct("dos_directory_entry_struct", [
4206         AttributesDef32,
4207         UniqueID,
4208         PurgeFlags,
4209         DestNameSpace,
4210         DirectoryNameLen,
4211         DirectoryName,
4212         CreationTime,
4213         CreationDate,
4214         CreatorID,
4215         ArchivedTime,
4216         ArchivedDate,
4217         ArchiverID,
4218         UpdateTime,
4219         UpdateDate,
4220         NextTrusteeEntry,
4221         Reserved48,
4222         InheritedRightsMask,
4223 ], "DOS Directory Information")
4224 DOSFileEntryStruct              = struct("dos_file_entry_struct", [
4225         AttributesDef32,
4226         UniqueID,
4227         PurgeFlags,
4228         DestNameSpace,
4229         NameLen,
4230         Name12,
4231         CreationTime,
4232         CreationDate,
4233         CreatorID,
4234         ArchivedTime,
4235         ArchivedDate,
4236         ArchiverID,
4237         UpdateTime,
4238         UpdateDate,
4239         UpdateID,
4240         FileSize,
4241         DataForkFirstFAT,
4242         NextTrusteeEntry,
4243         Reserved36,
4244         InheritedRightsMask,
4245         LastAccessedDate,
4246         Reserved28,
4247         PrimaryEntry,
4248         NameList,
4249 ], "DOS File Information")
4250 DSSpaceAllocateStruct           = struct("ds_space_alloc_struct", [
4251         DataStreamSpaceAlloc,
4252 ])
4253 DynMemStruct                    = struct("dyn_mem_struct", [
4254         uint32("dyn_mem_struct_total", "Total Dynamic Space" ),
4255         uint32("dyn_mem_struct_max", "Max Used Dynamic Space" ),
4256         uint32("dyn_mem_struct_cur", "Current Used Dynamic Space" ),
4257 ], "Dynamic Memory Information")
4258 EAInfoStruct                    = struct("ea_info_struct", [
4259         EADataSize,
4260         EACount,
4261         EAKeySize,
4262 ], "Extended Attribute Information")
4263 ExtraCacheCntrs                 = struct("extra_cache_cntrs", [
4264         uint32("internl_dsk_get_no_wait", "Internal Disk Get No Wait Count"),
4265         uint32("internl_dsk_get_no_wait_need", "Internal Disk Get No Wait Need To Allocate Count"),
4266         uint32("internl_dsk_get_no_wait_no_blk", "Internal Disk Get No Wait No Block Count"),
4267         uint32("id_get_no_read_no_wait", "ID Get No Read No Wait Count"),
4268         uint32("id_get_no_read_no_wait_sema", "ID Get No Read No Wait Semaphored Count"),
4269         uint32("id_get_no_read_no_wait_buffer", "ID Get No Read No Wait No Buffer Count"),
4270         uint32("id_get_no_read_no_wait_alloc", "ID Get No Read No Wait Allocate Count"),
4271         uint32("id_get_no_read_no_wait_no_alloc", "ID Get No Read No Wait No Alloc Count"),
4272         uint32("id_get_no_read_no_wait_no_alloc_sema", "ID Get No Read No Wait No Alloc Semaphored Count"),
4273         uint32("id_get_no_read_no_wait_no_alloc_alloc", "ID Get No Read No Wait No Alloc Allocate Count"),
4274 ], "Extra Cache Counters Information")
4275
4276
4277 ReferenceIDStruct               = struct("ref_id_struct", [
4278         CurrentReferenceID,
4279 ])
4280 NSAttributeStruct               = struct("ns_attrib_struct", [
4281         AttributesDef32,
4282 ])
4283 DStreamActual                   = struct("d_stream_actual", [
4284         Reserved12,
4285         # Need to look into how to format this correctly
4286 ])
4287 DStreamLogical                  = struct("d_string_logical", [
4288         Reserved12,
4289         # Need to look into how to format this correctly
4290 ])
4291 LastUpdatedInSecondsStruct      = struct("last_update_in_seconds_struct", [
4292         SecondsRelativeToTheYear2000,
4293 ]) 
4294 DOSNameStruct                   = struct("dos_name_struct", [
4295         FileName,
4296 ], "DOS File Name") 
4297 FlushTimeStruct                 = struct("flush_time_struct", [
4298         FlushTime,
4299 ]) 
4300 ParentBaseIDStruct              = struct("parent_base_id_struct", [
4301         ParentBaseID,
4302 ]) 
4303 MacFinderInfoStruct             = struct("mac_finder_info_struct", [
4304         MacFinderInfo,
4305 ]) 
4306 SiblingCountStruct              = struct("sibling_count_struct", [
4307         SiblingCount,
4308 ]) 
4309 EffectiveRightsStruct           = struct("eff_rights_struct", [
4310         EffectiveRights,
4311         Reserved3,     
4312 ]) 
4313 MacTimeStruct                   = struct("mac_time_struct", [
4314         MACCreateDate,
4315         MACCreateTime,
4316         MACBackupDate,
4317         MACBackupTime,
4318 ])
4319 LastAccessedTimeStruct          = struct("last_access_time_struct", [
4320         LastAccessedTime,      
4321 ])
4322
4323
4324
4325 FileAttributesStruct            = struct("file_attributes_struct", [
4326         AttributesDef32,
4327 ])
4328 FileInfoStruct                  = struct("file_info_struct", [
4329         ParentID,
4330         DirectoryEntryNumber,
4331         TotalBlocksToDecompress,
4332         CurrentBlockBeingDecompressed,
4333 ], "File Information")
4334 FileInstance                    = struct("file_instance", [
4335         SearchSequenceWord,
4336         DirectoryID,
4337         Reserved2,
4338         FileName14,
4339         AttributesDef,
4340         FileMode,
4341         FileSize,
4342         CreationDate,
4343         CreationTime,
4344         UpdateDate,
4345         UpdateTime,
4346 ], "File Instance")
4347 FileNameStruct                  = struct("file_name_struct", [
4348         FileName,
4349 ], "File Name")       
4350 FileServerCounters              = struct("file_server_counters", [
4351         uint16("too_many_hops", "Too Many Hops"),
4352         uint16("unknown_network", "Unknown Network"),
4353         uint16("no_space_for_service", "No Space For Service"),
4354         uint16("no_receive_buff", "No Receive Buffers"),
4355         uint16("not_my_network", "Not My Network"),
4356         uint32("netbios_progated", "NetBIOS Propagated Count"),
4357         uint32("ttl_pckts_srvcd", "Total Packets Serviced"),
4358         uint32("ttl_pckts_routed", "Total Packets Routed"),
4359 ], "File Server Counters")
4360 FileSystemInfo                  = struct("file_system_info", [
4361         uint32("fat_moved", "Number of times the OS has move the location of FAT"),
4362         uint32("fat_write_err", "Number of write errors in both original and mirrored copies of FAT"),
4363         uint32("someone_else_did_it_0", "Someone Else Did It Count 0"),
4364         uint32("someone_else_did_it_1", "Someone Else Did It Count 1"),
4365         uint32("someone_else_did_it_2", "Someone Else Did It Count 2"),
4366         uint32("i_ran_out_someone_else_did_it_0", "I Ran Out Someone Else Did It Count 0"),
4367         uint32("i_ran_out_someone_else_did_it_1", "I Ran Out Someone Else Did It Count 1"),
4368         uint32("i_ran_out_someone_else_did_it_2", "I Ran Out Someone Else Did It Count 2"),
4369         uint32("turbo_fat_build_failed", "Turbo FAT Build Failed Count"),
4370         uint32("extra_use_count_node_count", "Errors allocating a use count node for TTS"),
4371         uint32("extra_extra_use_count_node_count", "Errors allocating an additional use count node for TTS"),
4372         uint32("error_read_last_fat", "Error Reading Last FAT Count"),
4373         uint32("someone_else_using_this_file", "Someone Else Using This File Count"),
4374 ], "File System Information")
4375 GenericInfoDef                  = struct("generic_info_def", [
4376         fw_string("generic_label", "Label", 64),
4377         uint32("generic_ident_type", "Identification Type"),
4378         uint32("generic_ident_time", "Identification Time"),
4379         uint32("generic_media_type", "Media Type"),
4380         uint32("generic_cartridge_type", "Cartridge Type"),
4381         uint32("generic_unit_size", "Unit Size"),
4382         uint32("generic_block_size", "Block Size"),
4383         uint32("generic_capacity", "Capacity"),
4384         uint32("generic_pref_unit_size", "Preferred Unit Size"),
4385         fw_string("generic_name", "Name",64),
4386         uint32("generic_type", "Type"),
4387         uint32("generic_status", "Status"),
4388         uint32("generic_func_mask", "Function Mask"),
4389         uint32("generic_ctl_mask", "Control Mask"),
4390         uint32("generic_parent_count", "Parent Count"),
4391         uint32("generic_sib_count", "Sibling Count"),
4392         uint32("generic_child_count", "Child Count"),
4393         uint32("generic_spec_info_sz", "Specific Information Size"),
4394         uint32("generic_object_uniq_id", "Unique Object ID"),
4395         uint32("generic_media_slot", "Media Slot"),
4396 ], "Generic Information")
4397 HandleInfoLevel0                = struct("handle_info_level_0", [
4398 #        DataStream,
4399 ])
4400 HandleInfoLevel1                = struct("handle_info_level_1", [
4401         DataStream,
4402 ])        
4403 HandleInfoLevel2                = struct("handle_info_level_2", [
4404         DOSDirectoryBase,
4405         NameSpace,
4406         DataStream,
4407 ])        
4408 HandleInfoLevel3                = struct("handle_info_level_3", [
4409         DOSDirectoryBase,
4410         NameSpace,
4411 ])        
4412 HandleInfoLevel4                = struct("handle_info_level_4", [
4413         DOSDirectoryBase,
4414         NameSpace,
4415         ParentDirectoryBase,
4416         ParentDOSDirectoryBase,
4417 ])        
4418 HandleInfoLevel5                = struct("handle_info_level_5", [
4419         DOSDirectoryBase,
4420         NameSpace,
4421         DataStream,
4422         ParentDirectoryBase,
4423         ParentDOSDirectoryBase,
4424 ])        
4425 IPXInformation                  = struct("ipx_information", [
4426         uint32("ipx_send_pkt", "IPX Send Packet Count"),
4427         uint16("ipx_malform_pkt", "IPX Malformed Packet Count"),
4428         uint32("ipx_get_ecb_req", "IPX Get ECB Request Count"),
4429         uint32("ipx_get_ecb_fail", "IPX Get ECB Fail Count"),
4430         uint32("ipx_aes_event", "IPX AES Event Count"),
4431         uint16("ipx_postponed_aes", "IPX Postponed AES Count"),
4432         uint16("ipx_max_conf_sock", "IPX Max Configured Socket Count"),
4433         uint16("ipx_max_open_sock", "IPX Max Open Socket Count"),
4434         uint16("ipx_open_sock_fail", "IPX Open Socket Fail Count"),
4435         uint32("ipx_listen_ecb", "IPX Listen ECB Count"),
4436         uint16("ipx_ecb_cancel_fail", "IPX ECB Cancel Fail Count"),
4437         uint16("ipx_get_lcl_targ_fail", "IPX Get Local Target Fail Count"),
4438 ], "IPX Information")
4439 JobEntryTime                    = struct("job_entry_time", [
4440         Year,
4441         Month,
4442         Day,
4443         Hour,
4444         Minute,
4445         Second,
4446 ], "Job Entry Time")
4447 JobStruct                       = struct("job_struct", [
4448         ClientStation,
4449         ClientTaskNumber,
4450         ClientIDNumber,
4451         TargetServerIDNumber,
4452         TargetExecutionTime,
4453         JobEntryTime,
4454         JobNumber,
4455         JobType,
4456         JobPosition,
4457         JobControlFlags,
4458         JobFileName,
4459         JobFileHandle,
4460         ServerStation,
4461         ServerTaskNumber,
4462         ServerID,
4463         TextJobDescription,
4464         ClientRecordArea,
4465 ], "Job Information")
4466 JobStructNew                    = struct("job_struct_new", [
4467         RecordInUseFlag,
4468         PreviousRecord,
4469         NextRecord,
4470         ClientStationLong,
4471         ClientTaskNumberLong,
4472         ClientIDNumber,
4473         TargetServerIDNumber,
4474         TargetExecutionTime,
4475         JobEntryTime,
4476         JobNumberLong,
4477         JobType,
4478         JobPositionWord,
4479         JobControlFlagsWord,
4480         JobFileName,
4481         JobFileHandleLong,
4482         ServerStationLong,
4483         ServerTaskNumberLong,
4484         ServerID,
4485 ], "Job Information")                
4486 KnownRoutes                     = struct("known_routes", [
4487         NetIDNumber,
4488         HopsToNet,
4489         NetStatus,
4490         TimeToNet,
4491 ], "Known Routes")
4492 KnownServStruc                  = struct("known_server_struct", [
4493         ServerAddress,
4494         HopsToNet,
4495         ServerNameStringz,
4496 ], "Known Servers")                
4497 LANConfigInfo                   = struct("lan_cfg_info", [
4498         LANdriverCFG_MajorVersion,
4499         LANdriverCFG_MinorVersion,
4500         LANdriverNodeAddress,
4501         Reserved,
4502         LANdriverModeFlags,
4503         LANdriverBoardNumber,
4504         LANdriverBoardInstance,
4505         LANdriverMaximumSize,
4506         LANdriverMaxRecvSize,
4507         LANdriverRecvSize,
4508         LANdriverCardID,
4509         LANdriverMediaID,
4510         LANdriverTransportTime,
4511         LANdriverSrcRouting,
4512         LANdriverLineSpeed,
4513         LANdriverReserved,
4514         LANdriverMajorVersion,
4515         LANdriverMinorVersion,
4516         LANdriverFlags,
4517         LANdriverSendRetries,
4518         LANdriverLink,
4519         LANdriverSharingFlags,
4520         LANdriverSlot,
4521         LANdriverIOPortsAndRanges1,
4522         LANdriverIOPortsAndRanges2,
4523         LANdriverIOPortsAndRanges3,
4524         LANdriverIOPortsAndRanges4,
4525         LANdriverMemoryDecode0,
4526         LANdriverMemoryLength0,
4527         LANdriverMemoryDecode1,
4528         LANdriverMemoryLength1,
4529         LANdriverInterrupt1,
4530         LANdriverInterrupt2,
4531         LANdriverDMAUsage1,
4532         LANdriverDMAUsage2,
4533         LANdriverLogicalName,
4534         LANdriverIOReserved,
4535         LANdriverCardName,
4536 ], "LAN Configuration Information")
4537 LastAccessStruct                = struct("last_access_struct", [
4538         LastAccessedDate,
4539 ])
4540 lockInfo                        = struct("lock_info_struct", [
4541         LogicalLockThreshold,
4542         PhysicalLockThreshold,
4543         FileLockCount,
4544         RecordLockCount,
4545 ], "Lock Information")
4546 LockStruct                      = struct("lock_struct", [
4547         TaskNumByte,
4548         LockType,
4549         RecordStart,
4550         RecordEnd,
4551 ], "Locks")
4552 LoginTime                       = struct("login_time", [
4553         Year,
4554         Month,
4555         Day,
4556         Hour,
4557         Minute,
4558         Second,
4559         DayOfWeek,
4560 ], "Login Time")
4561 LogLockStruct                   = struct("log_lock_struct", [
4562         TaskNumByte,
4563         LockStatus,
4564         LockName,
4565 ], "Logical Locks")
4566 LogRecStruct                    = struct("log_rec_struct", [
4567         ConnectionNumberWord,
4568         TaskNumByte,
4569         LockStatus,
4570 ], "Logical Record Locks")
4571 LSLInformation                  = struct("lsl_information", [
4572         uint32("rx_buffers", "Receive Buffers"),
4573         uint32("rx_buffers_75", "Receive Buffers Warning Level"),
4574         uint32("rx_buffers_checked_out", "Receive Buffers Checked Out Count"),
4575         uint32("rx_buffer_size", "Receive Buffer Size"),
4576         uint32("max_phy_packet_size", "Maximum Physical Packet Size"),
4577         uint32("last_time_rx_buff_was_alloc", "Last Time a Receive Buffer was Allocated"),
4578         uint32("max_num_of_protocols", "Maximum Number of Protocols"),
4579         uint32("max_num_of_media_types", "Maximum Number of Media Types"),
4580         uint32("total_tx_packets", "Total Transmit Packets"),
4581         uint32("get_ecb_buf", "Get ECB Buffers"),
4582         uint32("get_ecb_fails", "Get ECB Failures"),
4583         uint32("aes_event_count", "AES Event Count"),
4584         uint32("post_poned_events", "Postponed Events"),
4585         uint32("ecb_cxl_fails", "ECB Cancel Failures"),
4586         uint32("valid_bfrs_reused", "Valid Buffers Reused"),
4587         uint32("enqueued_send_cnt", "Enqueued Send Count"),
4588         uint32("total_rx_packets", "Total Receive Packets"),
4589         uint32("unclaimed_packets", "Unclaimed Packets"),
4590         uint8("stat_table_major_version", "Statistics Table Major Version"),
4591         uint8("stat_table_minor_version", "Statistics Table Minor Version"),
4592 ], "LSL Information")
4593 MaximumSpaceStruct              = struct("max_space_struct", [
4594         MaxSpace,
4595 ])
4596 MemoryCounters                  = struct("memory_counters", [
4597         uint32("orig_num_cache_buff", "Original Number Of Cache Buffers"),
4598         uint32("curr_num_cache_buff", "Current Number Of Cache Buffers"),
4599         uint32("cache_dirty_block_thresh", "Cache Dirty Block Threshold"),
4600         uint32("wait_node", "Wait Node Count"),
4601         uint32("wait_node_alloc_fail", "Wait Node Alloc Failure Count"),
4602         uint32("move_cache_node", "Move Cache Node Count"),
4603         uint32("move_cache_node_from_avai", "Move Cache Node From Avail Count"),
4604         uint32("accel_cache_node_write", "Accelerate Cache Node Write Count"),
4605         uint32("rem_cache_node", "Remove Cache Node Count"),
4606         uint32("rem_cache_node_from_avail", "Remove Cache Node From Avail Count"),
4607 ], "Memory Counters")
4608 MLIDBoardInfo                   = struct("mlid_board_info", [           
4609         uint32("protocol_board_num", "Protocol Board Number"),
4610         uint16("protocol_number", "Protocol Number"),
4611         bytes("protocol_id", "Protocol ID", 6),
4612         nstring8("protocol_name", "Protocol Name"),
4613 ], "MLID Board Information")        
4614 ModifyInfoStruct                = struct("modify_info_struct", [
4615         ModifiedTime,
4616         ModifiedDate,
4617         ModifierID,
4618         LastAccessedDate,
4619 ], "Modification Information")
4620 nameInfo                        = struct("name_info_struct", [
4621         ObjectType,
4622         nstring8("login_name", "Login Name"),
4623 ], "Name Information")
4624 NCPNetworkAddress               = struct("ncp_network_address_struct", [
4625         TransportType,
4626         Reserved3,
4627         NetAddress,
4628 ], "Network Address")
4629
4630 netAddr                         = struct("net_addr_struct", [
4631         TransportType,
4632         nbytes32("transport_addr", "Transport Address"),
4633 ], "Network Address")
4634
4635 NetWareInformationStruct        = struct("netware_information_struct", [
4636         DataStreamSpaceAlloc,           # (Data Stream Alloc Bit)
4637         AttributesDef32,                # (Attributes Bit)
4638         FlagsDef,
4639         DataStreamSize,                 # (Data Stream Size Bit)
4640         TotalDataStreamDiskSpaceAlloc,  # (Total Stream Size Bit)
4641         NumberOfDataStreams,
4642         CreationTime,                   # (Creation Bit)
4643         CreationDate,
4644         CreatorID,
4645         ModifiedTime,                   # (Modify Bit)
4646         ModifiedDate,
4647         ModifierID,
4648         LastAccessedDate,
4649         ArchivedTime,                   # (Archive Bit)
4650         ArchivedDate,
4651         ArchiverID,
4652         InheritedRightsMask,            # (Rights Bit)
4653         DirectoryEntryNumber,           # (Directory Entry Bit)
4654         DOSDirectoryEntryNumber,
4655         VolumeNumberLong,
4656         EADataSize,                     # (Extended Attribute Bit)
4657         EACount,
4658         EAKeySize,
4659         CreatorNameSpaceNumber,         # (Name Space Bit)
4660         Reserved3,
4661 ], "NetWare Information")
4662 NLMInformation                  = struct("nlm_information", [
4663         IdentificationNumber,
4664         NLMFlags,
4665         Reserved3,
4666         NLMType,
4667         Reserved3,
4668         ParentID,
4669         MajorVersion,
4670         MinorVersion,
4671         Revision,
4672         Year,
4673         Reserved3,
4674         Month,
4675         Reserved3,
4676         Day,
4677         Reserved3,
4678         AllocAvailByte,
4679         AllocFreeCount,
4680         LastGarbCollect,
4681         MessageLanguage,
4682         NumberOfReferencedPublics,
4683 ], "NLM Information")
4684 NSInfoStruct                    = struct("ns_info_struct", [
4685         NameSpace,
4686         Reserved3,
4687 ])
4688 NWAuditStatus                   = struct("nw_audit_status", [
4689         AuditVersionDate,
4690         AuditFileVersionDate,
4691         val_string16("audit_enable_flag", "Auditing Enabled Flag", [
4692                 [ 0x0000, "Auditing Disabled" ],
4693                 [ 0x0100, "Auditing Enabled" ],
4694         ]),
4695         Reserved2,
4696         uint32("audit_file_size", "Audit File Size"),
4697         uint32("modified_counter", "Modified Counter"),
4698         uint32("audit_file_max_size", "Audit File Maximum Size"),
4699         uint32("audit_file_size_threshold", "Audit File Size Threshold"),
4700         uint32("audit_record_count", "Audit Record Count"),
4701         uint32("auditing_flags", "Auditing Flags"),
4702 ], "NetWare Audit Status")
4703 ObjectSecurityStruct            = struct("object_security_struct", [
4704         ObjectSecurity,
4705 ])
4706 ObjectFlagsStruct               = struct("object_flags_struct", [
4707         ObjectFlags,
4708 ])
4709 ObjectTypeStruct                = struct("object_type_struct", [
4710         ObjectType,
4711         Reserved2,
4712 ])
4713 ObjectNameStruct                = struct("object_name_struct", [
4714         ObjectNameStringz,
4715 ])
4716 ObjectIDStruct                  = struct("object_id_struct", [
4717         ObjectID, 
4718         Restriction,
4719 ])
4720 OpnFilesStruct                  = struct("opn_files_struct", [
4721         TaskNumberWord,
4722         LockType,
4723         AccessControl,
4724         LockFlag,
4725         VolumeNumber,
4726         DOSParentDirectoryEntry,
4727         DOSDirectoryEntry,
4728         ForkCount,
4729         NameSpace,
4730         FileName,
4731 ], "Open Files Information")
4732 OwnerIDStruct                   = struct("owner_id_struct", [
4733         CreatorID,
4734 ])                
4735 PacketBurstInformation          = struct("packet_burst_information", [
4736         uint32("big_invalid_slot", "Big Invalid Slot Count"),
4737         uint32("big_forged_packet", "Big Forged Packet Count"),
4738         uint32("big_invalid_packet", "Big Invalid Packet Count"),
4739         uint32("big_still_transmitting", "Big Still Transmitting Count"),
4740         uint32("still_doing_the_last_req", "Still Doing The Last Request Count"),
4741         uint32("invalid_control_req", "Invalid Control Request Count"),
4742         uint32("control_invalid_message_number", "Control Invalid Message Number Count"),
4743         uint32("control_being_torn_down", "Control Being Torn Down Count"),
4744         uint32("big_repeat_the_file_read", "Big Repeat the File Read Count"),
4745         uint32("big_send_extra_cc_count", "Big Send Extra CC Count"),
4746         uint32("big_return_abort_mess", "Big Return Abort Message Count"),
4747         uint32("big_read_invalid_mess", "Big Read Invalid Message Number Count"),
4748         uint32("big_read_do_it_over", "Big Read Do It Over Count"),
4749         uint32("big_read_being_torn_down", "Big Read Being Torn Down Count"),
4750         uint32("previous_control_packet", "Previous Control Packet Count"),
4751         uint32("send_hold_off_message", "Send Hold Off Message Count"),
4752         uint32("big_read_no_data_avail", "Big Read No Data Available Count"),
4753         uint32("big_read_trying_to_read", "Big Read Trying To Read Too Much Count"),
4754         uint32("async_read_error", "Async Read Error Count"),
4755         uint32("big_read_phy_read_err", "Big Read Physical Read Error Count"),
4756         uint32("ctl_bad_ack_frag_list", "Control Bad ACK Fragment List Count"),
4757         uint32("ctl_no_data_read", "Control No Data Read Count"),
4758         uint32("write_dup_req", "Write Duplicate Request Count"),
4759         uint32("shouldnt_be_ack_here", "Shouldn't Be ACKing Here Count"),
4760         uint32("write_incon_packet_len", "Write Inconsistent Packet Lengths Count"),
4761         uint32("first_packet_isnt_a_write", "First Packet Isn't A Write Count"),
4762         uint32("write_trash_dup_req", "Write Trashed Duplicate Request Count"),
4763         uint32("big_write_inv_message_num", "Big Write Invalid Message Number Count"),
4764         uint32("big_write_being_torn_down", "Big Write Being Torn Down Count"),
4765         uint32("big_write_being_abort", "Big Write Being Aborted Count"),
4766         uint32("zero_ack_frag", "Zero ACK Fragment Count"),
4767         uint32("write_curr_trans", "Write Currently Transmitting Count"),
4768         uint32("try_to_write_too_much", "Trying To Write Too Much Count"),
4769         uint32("write_out_of_mem_for_ctl_nodes", "Write Out Of Memory For Control Nodes Count"),
4770         uint32("write_didnt_need_this_frag", "Write Didn't Need This Fragment Count"),
4771         uint32("write_too_many_buf_check", "Write Too Many Buffers Checked Out Count"),
4772         uint32("write_timeout", "Write Time Out Count"),
4773         uint32("write_got_an_ack0", "Write Got An ACK Count 0"),
4774         uint32("write_got_an_ack1", "Write Got An ACK Count 1"),
4775         uint32("poll_abort_conn", "Poller Aborted The Connnection Count"),
4776         uint32("may_had_out_of_order", "Maybe Had Out Of Order Writes Count"),
4777         uint32("had_an_out_of_order", "Had An Out Of Order Write Count"),
4778         uint32("moved_the_ack_bit_dn", "Moved The ACK Bit Down Count"),
4779         uint32("bumped_out_of_order", "Bumped Out Of Order Write Count"),
4780         uint32("poll_rem_old_out_of_order", "Poller Removed Old Out Of Order Count"),
4781         uint32("write_didnt_need_but_req_ack", "Write Didn't Need But Requested ACK Count"),
4782         uint32("write_trash_packet", "Write Trashed Packet Count"),
4783         uint32("too_many_ack_frag", "Too Many ACK Fragments Count"),
4784         uint32("saved_an_out_of_order_packet", "Saved An Out Of Order Packet Count"),
4785         uint32("conn_being_aborted", "Connection Being Aborted Count"),
4786 ], "Packet Burst Information")
4787
4788 PadDSSpaceAllocate              = struct("pad_ds_space_alloc", [
4789     Reserved4,
4790 ])
4791 PadAttributes                   = struct("pad_attributes", [
4792     Reserved6,
4793 ])
4794 PadDataStreamSize               = struct("pad_data_stream_size", [
4795     Reserved4,
4796 ])    
4797 PadTotalStreamSize              = struct("pad_total_stream_size", [
4798     Reserved6,
4799 ])
4800 PadCreationInfo                 = struct("pad_creation_info", [
4801     Reserved8,
4802 ])
4803 PadModifyInfo                   = struct("pad_modify_info", [
4804     Reserved10,
4805 ])
4806 PadArchiveInfo                  = struct("pad_archive_info", [
4807     Reserved8,
4808 ])
4809 PadRightsInfo                   = struct("pad_rights_info", [
4810     Reserved2,
4811 ])
4812 PadDirEntry                     = struct("pad_dir_entry", [
4813     Reserved12,
4814 ])
4815 PadEAInfo                       = struct("pad_ea_info", [
4816     Reserved12,
4817 ])
4818 PadNSInfo                       = struct("pad_ns_info", [
4819     Reserved4,
4820 ])
4821 PhyLockStruct                   = struct("phy_lock_struct", [
4822         LoggedCount,
4823         ShareableLockCount,
4824         RecordStart,
4825         RecordEnd,
4826         LogicalConnectionNumber,
4827         TaskNumByte,
4828         LockType,
4829 ], "Physical Locks")
4830 printInfo                       = struct("print_info_struct", [
4831         PrintFlags,
4832         TabSize,
4833         Copies,
4834         PrintToFileFlag,
4835         BannerName,
4836         TargetPrinter,
4837         FormType,
4838 ], "Print Information")
4839 RightsInfoStruct                = struct("rights_info_struct", [
4840         InheritedRightsMask,
4841 ])
4842 RoutersInfo                     = struct("routers_info", [
4843         bytes("node", "Node", 6),
4844         ConnectedLAN,
4845         uint16("route_hops", "Hop Count"),
4846         uint16("route_time", "Route Time"),
4847 ], "Router Information")        
4848 RTagStructure                   = struct("r_tag_struct", [
4849         RTagNumber,
4850         ResourceSignature,
4851         ResourceCount,
4852         ResourceName,
4853 ], "Resource Tag")
4854 ScanInfoFileName                = struct("scan_info_file_name", [
4855         SalvageableFileEntryNumber,
4856         FileName,
4857 ])
4858 ScanInfoFileNoName              = struct("scan_info_file_no_name", [
4859         SalvageableFileEntryNumber,        
4860 ])        
4861 Segments                        = struct("segments", [
4862         uint32("volume_segment_dev_num", "Volume Segment Device Number"),
4863         uint32("volume_segment_offset", "Volume Segment Offset"),
4864         uint32("volume_segment_size", "Volume Segment Size"),
4865 ], "Volume Segment Information")            
4866 SemaInfoStruct                  = struct("sema_info_struct", [
4867         LogicalConnectionNumber,
4868         TaskNumByte,
4869 ])
4870 SemaStruct                      = struct("sema_struct", [
4871         OpenCount,
4872         SemaphoreValue,
4873         TaskNumByte,
4874         SemaphoreName,
4875 ], "Semaphore Information")
4876 ServerInfo                      = struct("server_info", [
4877         uint32("reply_canceled", "Reply Canceled Count"),
4878         uint32("write_held_off", "Write Held Off Count"),
4879         uint32("write_held_off_with_dup", "Write Held Off With Duplicate Request"),
4880         uint32("invalid_req_type", "Invalid Request Type Count"),
4881         uint32("being_aborted", "Being Aborted Count"),
4882         uint32("already_doing_realloc", "Already Doing Re-Allocate Count"),
4883         uint32("dealloc_invalid_slot", "De-Allocate Invalid Slot Count"),
4884         uint32("dealloc_being_proc", "De-Allocate Being Processed Count"),
4885         uint32("dealloc_forged_packet", "De-Allocate Forged Packet Count"),
4886         uint32("dealloc_still_transmit", "De-Allocate Still Transmitting Count"),
4887         uint32("start_station_error", "Start Station Error Count"),
4888         uint32("invalid_slot", "Invalid Slot Count"),
4889         uint32("being_processed", "Being Processed Count"),
4890         uint32("forged_packet", "Forged Packet Count"),
4891         uint32("still_transmitting", "Still Transmitting Count"),
4892         uint32("reexecute_request", "Re-Execute Request Count"),
4893         uint32("invalid_sequence_number", "Invalid Sequence Number Count"),
4894         uint32("dup_is_being_sent", "Duplicate Is Being Sent Already Count"),
4895         uint32("sent_pos_ack", "Sent Positive Acknowledge Count"),
4896         uint32("sent_a_dup_reply", "Sent A Duplicate Reply Count"),
4897         uint32("no_mem_for_station", "No Memory For Station Control Count"),
4898         uint32("no_avail_conns", "No Available Connections Count"),
4899         uint32("realloc_slot", "Re-Allocate Slot Count"),
4900         uint32("realloc_slot_came_too_soon", "Re-Allocate Slot Came Too Soon Count"),
4901 ], "Server Information")
4902 ServersSrcInfo                  = struct("servers_src_info", [
4903         ServerNode,
4904         ConnectedLAN,
4905         HopsToNet,
4906 ], "Source Server Information")
4907 SpaceStruct                     = struct("space_struct", [        
4908         Level,
4909         MaxSpace,
4910         CurrentSpace,
4911 ], "Space Information")        
4912 SPXInformation                  = struct("spx_information", [
4913         uint16("spx_max_conn", "SPX Max Connections Count"),
4914         uint16("spx_max_used_conn", "SPX Max Used Connections"),
4915         uint16("spx_est_conn_req", "SPX Establish Connection Requests"),
4916         uint16("spx_est_conn_fail", "SPX Establish Connection Fail"),
4917         uint16("spx_listen_con_req", "SPX Listen Connect Request"),
4918         uint16("spx_listen_con_fail", "SPX Listen Connect Fail"),
4919         uint32("spx_send", "SPX Send Count"),
4920         uint32("spx_window_choke", "SPX Window Choke Count"),
4921         uint16("spx_bad_send", "SPX Bad Send Count"),
4922         uint16("spx_send_fail", "SPX Send Fail Count"),
4923         uint16("spx_abort_conn", "SPX Aborted Connection"),
4924         uint32("spx_listen_pkt", "SPX Listen Packet Count"),
4925         uint16("spx_bad_listen", "SPX Bad Listen Count"),
4926         uint32("spx_incoming_pkt", "SPX Incoming Packet Count"),
4927         uint16("spx_bad_in_pkt", "SPX Bad In Packet Count"),
4928         uint16("spx_supp_pkt", "SPX Suppressed Packet Count"),
4929         uint16("spx_no_ses_listen", "SPX No Session Listen ECB Count"),
4930         uint16("spx_watch_dog", "SPX Watch Dog Destination Session Count"),
4931 ], "SPX Information")
4932 StackInfo                       = struct("stack_info", [
4933         StackNumber,
4934         fw_string("stack_short_name", "Stack Short Name", 16),
4935 ], "Stack Information")        
4936 statsInfo                       = struct("stats_info_struct", [
4937         TotalBytesRead,
4938         TotalBytesWritten,
4939         TotalRequest,
4940 ], "Statistics")
4941 theTimeStruct                   = struct("the_time_struct", [
4942         UTCTimeInSeconds,
4943         FractionalSeconds,
4944         TimesyncStatus,
4945 ])        
4946 timeInfo                        = struct("time_info", [
4947         Year,
4948         Month,
4949         Day,
4950         Hour,
4951         Minute,
4952         Second,
4953         DayOfWeek,
4954         uint32("login_expiration_time", "Login Expiration Time"),
4955 ])              
4956 TotalStreamSizeStruct           = struct("total_stream_size_struct", [
4957         TotalDataStreamDiskSpaceAlloc,
4958         NumberOfDataStreams,
4959 ])
4960 TrendCounters                   = struct("trend_counters", [
4961         uint32("num_of_cache_checks", "Number Of Cache Checks"),
4962         uint32("num_of_cache_hits", "Number Of Cache Hits"),
4963         uint32("num_of_dirty_cache_checks", "Number Of Dirty Cache Checks"),
4964         uint32("num_of_cache_dirty_checks", "Number Of Cache Dirty Checks"),
4965         uint32("cache_used_while_check", "Cache Used While Checking"),
4966         uint32("wait_till_dirty_blcks_dec", "Wait Till Dirty Blocks Decrease Count"),
4967         uint32("alloc_blck_frm_avail", "Allocate Block From Available Count"),
4968         uint32("alloc_blck_frm_lru", "Allocate Block From LRU Count"),
4969         uint32("alloc_blck_already_wait", "Allocate Block Already Waiting"),
4970         uint32("lru_sit_time", "LRU Sitting Time"),
4971         uint32("num_of_cache_check_no_wait", "Number Of Cache Check No Wait"),
4972         uint32("num_of_cache_hits_no_wait", "Number Of Cache Hits No Wait"),
4973 ], "Trend Counters")
4974 TrusteeStruct                   = struct("trustee_struct", [
4975         ObjectID,
4976         AccessRightsMaskWord,
4977 ])
4978 UpdateDateStruct                = struct("update_date_struct", [
4979         UpdateDate,
4980 ])
4981 UpdateIDStruct                  = struct("update_id_struct", [
4982         UpdateID,
4983 ])        
4984 UpdateTimeStruct                = struct("update_time_struct", [
4985         UpdateTime,
4986 ])                
4987 UserInformation                 = struct("user_info", [
4988         ConnectionNumber,
4989         UseCount,
4990         Reserved2,
4991         ConnectionServiceType,
4992         Year,
4993         Month,
4994         Day,
4995         Hour,
4996         Minute,
4997         Second,
4998         DayOfWeek,
4999         Status,
5000         Reserved2,
5001         ExpirationTime,
5002         ObjectType,
5003         Reserved2,
5004         TransactionTrackingFlag,
5005         LogicalLockThreshold,
5006         FileWriteFlags,
5007         FileWriteState,
5008         Reserved,
5009         FileLockCount,
5010         RecordLockCount,
5011         TotalBytesRead,
5012         TotalBytesWritten,
5013         TotalRequest,
5014         HeldRequests,
5015         HeldBytesRead,
5016         HeldBytesWritten,
5017 ], "User Information")
5018 VolInfoStructure                = struct("vol_info_struct", [
5019         VolumeType,
5020         Reserved2,
5021         StatusFlagBits,
5022         SectorSize,
5023         SectorsPerClusterLong,
5024         VolumeSizeInClusters,
5025         FreedClusters,
5026         SubAllocFreeableClusters,
5027         FreeableLimboSectors,
5028         NonFreeableLimboSectors,
5029         NonFreeableAvailableSubAllocSectors,
5030         NotUsableSubAllocSectors,
5031         SubAllocClusters,
5032         DataStreamsCount,
5033         LimboDataStreamsCount,
5034         OldestDeletedFileAgeInTicks,
5035         CompressedDataStreamsCount,
5036         CompressedLimboDataStreamsCount,
5037         UnCompressableDataStreamsCount,
5038         PreCompressedSectors,
5039         CompressedSectors,
5040         MigratedFiles,
5041         MigratedSectors,
5042         ClustersUsedByFAT,
5043         ClustersUsedByDirectories,
5044         ClustersUsedByExtendedDirectories,
5045         TotalDirectoryEntries,
5046         UnUsedDirectoryEntries,
5047         TotalExtendedDirectoryExtants,
5048         UnUsedExtendedDirectoryExtants,
5049         ExtendedAttributesDefined,
5050         ExtendedAttributeExtantsUsed,
5051         DirectoryServicesObjectID,
5052         VolumeLastModifiedTime,
5053         VolumeLastModifiedDate,
5054 ], "Volume Information")
5055 VolInfo2Struct                  = struct("vol_info_struct_2", [
5056         uint32("volume_active_count", "Volume Active Count"),
5057         uint32("volume_use_count", "Volume Use Count"),
5058         uint32("mac_root_ids", "MAC Root IDs"),
5059         VolumeLastModifiedTime,
5060         VolumeLastModifiedDate,
5061         uint32("volume_reference_count", "Volume Reference Count"),
5062         uint32("compression_lower_limit", "Compression Lower Limit"),
5063         uint32("outstanding_ios", "Outstanding IOs"),
5064         uint32("outstanding_compression_ios", "Outstanding Compression IOs"),
5065         uint32("compression_ios_limit", "Compression IOs Limit"),
5066 ], "Extended Volume Information")        
5067 VolumeStruct                    = struct("volume_struct", [
5068         VolumeNumberLong,
5069         VolumeNameLen,
5070 ])
5071
5072
5073 ##############################################################################
5074 # NCP Groups
5075 ##############################################################################
5076 def define_groups():
5077         groups['accounting']    = "Accounting"
5078         groups['afp']           = "AFP"
5079         groups['auditing']      = "Auditing"
5080         groups['bindery']       = "Bindery"
5081         groups['comm']          = "Communication"
5082         groups['connection']    = "Connection"
5083         groups['directory']     = "Directory"
5084         groups['extended']      = "Extended Attribute"
5085         groups['file']          = "File"
5086         groups['fileserver']    = "File Server"
5087         groups['message']       = "Message"
5088         groups['migration']     = "Data Migration"
5089         groups['misc']          = "Miscellaneous"
5090         groups['name']          = "Name Space"
5091         groups['nds']           = "NetWare Directory"
5092         groups['print']         = "Print"
5093         groups['queue']         = "Queue"
5094         groups['sync']          = "Synchronization"
5095         groups['tts']           = "Transaction Tracking"
5096         groups['qms']           = "Queue Management System (QMS)"
5097         groups['stats']         = "Server Statistics"
5098         groups['unknown']       = "Unknown"
5099
5100 ##############################################################################
5101 # NCP Errors
5102 ##############################################################################
5103 def define_errors():
5104         errors[0x0000] = "Ok"
5105         errors[0x0001] = "Transaction tracking is available"
5106         errors[0x0002] = "Ok. The data has been written"
5107         errors[0x0003] = "Calling Station is a Manager"
5108     
5109         errors[0x0100] = "One or more of the ConnectionNumbers in the send list are invalid"
5110         errors[0x0101] = "Invalid space limit"
5111         errors[0x0102] = "Insufficient disk space"
5112         errors[0x0103] = "Queue server cannot add jobs"
5113         errors[0x0104] = "Out of disk space"
5114         errors[0x0105] = "Semaphore overflow"
5115         errors[0x0106] = "Invalid Parameter"
5116         errors[0x0107] = "Invalid Number of Minutes to Delay"
5117         errors[0x0108] = "Invalid Start or Network Number"
5118         errors[0x0109] = "Cannot Obtain License"
5119     
5120         errors[0x0200] = "One or more clients in the send list are not logged in"
5121         errors[0x0201] = "Queue server cannot attach"
5122     
5123         errors[0x0300] = "One or more clients in the send list are not accepting messages"
5124     
5125         errors[0x0400] = "Client already has message"
5126         errors[0x0401] = "Queue server cannot service job"
5127     
5128         errors[0x7300] = "Revoke Handle Rights Not Found"
5129         errors[0x7900] = "Invalid Parameter in Request Packet"
5130         errors[0x7901] = "Nothing being Compressed"
5131         errors[0x7a00] = "Connection Already Temporary"
5132         errors[0x7b00] = "Connection Already Logged in"
5133         errors[0x7c00] = "Connection Not Authenticated"
5134         
5135         errors[0x7e00] = "NCP failed boundary check"
5136         errors[0x7e01] = "Invalid Length"
5137     
5138         errors[0x7f00] = "Lock Waiting"
5139         errors[0x8000] = "Lock fail"
5140         errors[0x8001] = "File in Use"
5141     
5142         errors[0x8100] = "A file handle could not be allocated by the file server"
5143         errors[0x8101] = "Out of File Handles"
5144         
5145         errors[0x8200] = "Unauthorized to open the file"
5146         errors[0x8300] = "Unable to read/write the volume. Possible bad sector on the file server"
5147         errors[0x8301] = "Hard I/O Error"
5148     
5149         errors[0x8400] = "Unauthorized to create the directory"
5150         errors[0x8401] = "Unauthorized to create the file"
5151     
5152         errors[0x8500] = "Unauthorized to delete the specified file"
5153         errors[0x8501] = "Unauthorized to overwrite an existing file in this directory"
5154     
5155         errors[0x8700] = "An unexpected character was encountered in the filename"
5156         errors[0x8701] = "Create Filename Error"
5157     
5158         errors[0x8800] = "Invalid file handle"
5159         errors[0x8900] = "Unauthorized to search this file/directory"
5160         errors[0x8a00] = "Unauthorized to delete this file/directory"
5161         errors[0x8b00] = "Unauthorized to rename a file in this directory"
5162     
5163         errors[0x8c00] = "No set privileges"
5164         errors[0x8c01] = "Unauthorized to modify a file in this directory"
5165         errors[0x8c02] = "Unauthorized to change the restriction on this volume"
5166     
5167         errors[0x8d00] = "Some of the affected files are in use by another client"
5168         errors[0x8d01] = "The affected file is in use"
5169     
5170         errors[0x8e00] = "All of the affected files are in use by another client"
5171         errors[0x8f00] = "Some of the affected files are read-only"
5172     
5173         errors[0x9000] = "An attempt to modify a read-only volume occurred"
5174         errors[0x9001] = "All of the affected files are read-only"
5175         errors[0x9002] = "Read Only Access to Volume"
5176     
5177         errors[0x9100] = "Some of the affected files already exist"
5178         errors[0x9101] = "Some Names Exist"
5179     
5180         errors[0x9200] = "Directory with the new name already exists"
5181         errors[0x9201] = "All of the affected files already exist"
5182     
5183         errors[0x9300] = "Unauthorized to read from this file"
5184         errors[0x9400] = "Unauthorized to write to this file"
5185         errors[0x9500] = "The affected file is detached"
5186     
5187         errors[0x9600] = "The file server has run out of memory to service this request"
5188         errors[0x9601] = "No alloc space for message"
5189         errors[0x9602] = "Server Out of Space"
5190     
5191         errors[0x9800] = "The affected volume is not mounted"
5192         errors[0x9801] = "The volume associated with Volume Number is not mounted"
5193         errors[0x9802] = "The resulting volume does not exist"
5194         errors[0x9803] = "The destination volume is not mounted"
5195         errors[0x9804] = "Disk Map Error"
5196     
5197         errors[0x9900] = "The file server has run out of directory space on the affected volume"
5198         errors[0x9a00] = "The request attempted to rename the affected file to another volume"
5199     
5200         errors[0x9b00] = "DirHandle is not associated with a valid directory path"
5201         errors[0x9b01] = "A resulting directory handle is not associated with a valid directory path"
5202         errors[0x9b02] = "The directory associated with DirHandle does not exist"
5203         errors[0x9b03] = "Bad directory handle"
5204     
5205         errors[0x9c00] = "The resulting path is not valid"
5206         errors[0x9c01] = "The resulting file path is not valid"
5207         errors[0x9c02] = "The resulting directory path is not valid"
5208         errors[0x9c03] = "Invalid path"
5209     
5210         errors[0x9d00] = "A directory handle was not available for allocation"
5211     
5212         errors[0x9e00] = "The name of the directory does not conform to a legal name for this name space"
5213         errors[0x9e01] = "The new directory name does not conform to a legal name for this name space"
5214         errors[0x9e02] = "Bad File Name"
5215     
5216         errors[0x9f00] = "The request attempted to delete a directory that is in use by another client"
5217     
5218         errors[0xa000] = "The request attempted to delete a directory that is not empty"
5219         errors[0xa100] = "An unrecoverable error occured on the affected directory"
5220     
5221         errors[0xa200] = "The request attempted to read from a file region that is physically locked"
5222         errors[0xa201] = "I/O Lock Error"
5223     
5224         errors[0xa400] = "Invalid directory rename attempted"
5225         errors[0xa500] = "Invalid open create mode"
5226         errors[0xa600] = "Auditor Access has been Removed"
5227         errors[0xa700] = "Error Auditing Version"
5228             
5229         errors[0xa800] = "Invalid Support Module ID"
5230         errors[0xa801] = "No Auditing Access Rights"
5231             
5232         errors[0xbe00] = "Invalid Data Stream"
5233         errors[0xbf00] = "Requests for this name space are not valid on this volume"
5234     
5235         errors[0xc000] = "Unauthorized to retrieve accounting data"
5236         
5237         errors[0xc100] = "The ACCOUNT_BALANCE property does not exist"
5238         errors[0xc101] = "No Account Balance"
5239         
5240         errors[0xc200] = "The object has exceeded its credit limit"
5241         errors[0xc300] = "Too many holds have been placed against this account"
5242         errors[0xc400] = "The client account has been disabled"
5243     
5244         errors[0xc500] = "Access to the account has been denied because of intruder detection"
5245         errors[0xc501] = "Login lockout"
5246         errors[0xc502] = "Server Login Locked"
5247     
5248         errors[0xc600] = "The caller does not have operator priviliges"
5249         errors[0xc601] = "The client does not have operator priviliges"
5250     
5251         errors[0xc800] = "Missing EA Key"
5252         errors[0xc900] = "EA Not Found"
5253         errors[0xca00] = "Invalid EA Handle Type"
5254         errors[0xcb00] = "EA No Key No Data"
5255         errors[0xcc00] = "EA Number Mismatch"
5256         errors[0xcd00] = "Extent Number Out of Range"
5257         errors[0xce00] = "EA Bad Directory Number"
5258         errors[0xcf00] = "Invalid EA Handle"
5259     
5260         errors[0xd000] = "Queue error"
5261         errors[0xd001] = "EA Position Out of Range"
5262         
5263         errors[0xd100] = "The queue does not exist"
5264         errors[0xd101] = "EA Access Denied"
5265     
5266         errors[0xd200] = "A queue server is not associated with this queue"
5267         errors[0xd201] = "A queue server is not associated with the selected queue"
5268         errors[0xd202] = "No queue server"
5269         errors[0xd203] = "Data Page Odd Size"
5270     
5271         errors[0xd300] = "No queue rights"
5272         errors[0xd301] = "EA Volume Not Mounted"
5273     
5274         errors[0xd400] = "The queue is full and cannot accept another request"
5275         errors[0xd401] = "The queue associated with ObjectId is full and cannot accept another request"
5276         errors[0xd402] = "Bad Page Boundary"
5277     
5278         errors[0xd500] = "A job does not exist in this queue"
5279         errors[0xd501] = "No queue job"
5280         errors[0xd502] = "The job associated with JobNumber does not exist in this queue"
5281         errors[0xd503] = "Inspect Failure"
5282     
5283         errors[0xd600] = "The file server does not allow unencrypted passwords"
5284         errors[0xd601] = "No job right"
5285         errors[0xd602] = "EA Already Claimed"
5286     
5287         errors[0xd700] = "Bad account"
5288         errors[0xd701] = "The old and new password strings are identical"
5289         errors[0xd702] = "The job is currently being serviced"
5290         errors[0xd703] = "The queue is currently servicing a job"
5291         errors[0xd704] = "Queue servicing"
5292         errors[0xd705] = "Odd Buffer Size"
5293     
5294         errors[0xd800] = "Queue not active"
5295         errors[0xd801] = "No Scorecards"
5296         
5297         errors[0xd900] = "The file server cannot accept another connection as it has reached its limit"
5298         errors[0xd901] = "The client is not security equivalent to one of the objects in the Q_SERVERS group property of the target queue"
5299         errors[0xd902] = "Station is not a server"
5300         errors[0xd903] = "Bad EDS Signature"
5301     
5302         errors[0xda00] = "Attempted to login to the file server during a restricted time period"
5303         errors[0xda01] = "Queue halted"
5304         errors[0xda02] = "EA Space Limit"
5305     
5306         errors[0xdb00] = "Attempted to login to the file server from an unauthorized workstation or network"
5307         errors[0xdb01] = "The queue cannot attach another queue server"
5308         errors[0xdb02] = "Maximum queue servers"
5309         errors[0xdb03] = "EA Key Corrupt"
5310     
5311         errors[0xdc00] = "Account Expired"
5312         errors[0xdc01] = "EA Key Limit"
5313         
5314         errors[0xdd00] = "Tally Corrupt"
5315         errors[0xde00] = "Attempted to login to the file server with an incorrect password"
5316         errors[0xdf00] = "Attempted to login to the file server with a password that has expired"
5317     
5318         errors[0xe000] = "No Login Connections Available"
5319         errors[0xe700] = "No disk track"
5320         errors[0xe800] = "Write to group"
5321         errors[0xe900] = "The object is already a member of the group property"
5322     
5323         errors[0xea00] = "No such member"
5324         errors[0xea01] = "The bindery object is not a member of the set"
5325         errors[0xea02] = "Non-existent member"
5326     
5327         errors[0xeb00] = "The property is not a set property"
5328     
5329         errors[0xec00] = "No such set"
5330         errors[0xec01] = "The set property does not exist"
5331     
5332         errors[0xed00] = "Property exists"
5333         errors[0xed01] = "The property already exists"
5334         errors[0xed02] = "An attempt was made to create a bindery object property that already exists"
5335     
5336         errors[0xee00] = "The object already exists"
5337         errors[0xee01] = "The bindery object already exists"
5338     
5339         errors[0xef00] = "Illegal name"
5340         errors[0xef01] = "Illegal characters in ObjectName field"
5341         errors[0xef02] = "Invalid name"
5342     
5343         errors[0xf000] = "A wildcard was detected in a field that does not support wildcards"
5344         errors[0xf001] = "An illegal wildcard was detected in ObjectName"
5345     
5346         errors[0xf100] = "The client does not have the rights to access this bindery object"
5347         errors[0xf101] = "Bindery security"
5348         errors[0xf102] = "Invalid bindery security"
5349     
5350         errors[0xf200] = "Unauthorized to read from this object"
5351         errors[0xf300] = "Unauthorized to rename this object"
5352     
5353         errors[0xf400] = "Unauthorized to delete this object"
5354         errors[0xf401] = "No object delete privileges"
5355         errors[0xf402] = "Unauthorized to delete this queue"
5356     
5357         errors[0xf500] = "Unauthorized to create this object"
5358         errors[0xf501] = "No object create"
5359     
5360         errors[0xf600] = "No property delete"
5361         errors[0xf601] = "Unauthorized to delete the property of this object"
5362         errors[0xf602] = "Unauthorized to delete this property"
5363     
5364         errors[0xf700] = "Unauthorized to create this property"
5365         errors[0xf701] = "No property create privilege"
5366     
5367         errors[0xf800] = "Unauthorized to write to this property"
5368         errors[0xf900] = "Unauthorized to read this property"
5369         errors[0xfa00] = "Temporary remap error"
5370     
5371         errors[0xfb00] = "No such property"
5372         errors[0xfb01] = "The file server does not support this request"
5373         errors[0xfb02] = "The specified property does not exist"
5374         errors[0xfb03] = "The PASSWORD property does not exist for this bindery object"
5375         errors[0xfb04] = "NDS NCP not available"
5376         errors[0xfb05] = "Bad Directory Handle"
5377         errors[0xfb06] = "Unknown Request"
5378         errors[0xfb07] = "Invalid Subfunction Request"
5379         errors[0xfb08] = "Attempt to use an invalid parameter (drive number, path, or flag value) during a set drive path call"
5380         errors[0xfb09] = "NMAS not installed on this server, NCP NOT Supported"
5381         errors[0xfb0a] = "Station Not Logged In"
5382     
5383         errors[0xfc00] = "The message queue cannot accept another message"
5384         errors[0xfc01] = "The trustee associated with ObjectId does not exist"
5385         errors[0xfc02] = "The specified bindery object does not exist"
5386         errors[0xfc03] = "The bindery object associated with ObjectID does not exist"
5387         errors[0xfc04] = "A bindery object does not exist that matches"
5388         errors[0xfc05] = "The specified queue does not exist"
5389         errors[0xfc06] = "No such object"
5390         errors[0xfc07] = "The queue associated with ObjectID does not exist"
5391     
5392         errors[0xfd00] = "Bad station number"
5393         errors[0xfd01] = "The connection associated with ConnectionNumber is not active"
5394         errors[0xfd02] = "Lock collision"
5395         errors[0xfd03] = "Transaction tracking is disabled"
5396     
5397         errors[0xfe00] = "I/O failure"
5398         errors[0xfe01] = "The files containing the bindery on the file server are locked"
5399         errors[0xfe02] = "A file with the specified name already exists in this directory"
5400         errors[0xfe03] = "No more restrictions were found"
5401         errors[0xfe04] = "The file server was unable to lock the file within the specified time limit"
5402         errors[0xfe05] = "The file server was unable to lock all files within the specified time limit"
5403         errors[0xfe06] = "The bindery object associated with ObjectID is not a valid trustee"
5404         errors[0xfe07] = "Directory locked"
5405         errors[0xfe08] = "Bindery locked"
5406         errors[0xfe09] = "Invalid semaphore name length"
5407         errors[0xfe0a] = "The file server was unable to complete the operation within the specified time limit"
5408         errors[0xfe0b] = "Transaction restart"
5409         errors[0xfe0c] = "Bad packet"
5410         errors[0xfe0d] = "Timeout"
5411         errors[0xfe0e] = "User Not Found"
5412         errors[0xfe0f] = "Trustee Not Found"
5413     
5414         errors[0xff00] = "Failure"
5415         errors[0xff01] = "Lock error"
5416         errors[0xff02] = "File not found"
5417         errors[0xff03] = "The file not found or cannot be unlocked"
5418         errors[0xff04] = "Record not found"
5419         errors[0xff05] = "The logical record was not found"
5420         errors[0xff06] = "The printer associated with Printer Number does not exist"
5421         errors[0xff07] = "No such printer"
5422         errors[0xff08] = "Unable to complete the request"
5423         errors[0xff09] = "Unauthorized to change privileges of this trustee"
5424         errors[0xff0a] = "No files matching the search criteria were found"
5425         errors[0xff0b] = "A file matching the search criteria was not found"
5426         errors[0xff0c] = "Verification failed"
5427         errors[0xff0d] = "Object associated with ObjectID is not a manager"
5428         errors[0xff0e] = "Invalid initial semaphore value"
5429         errors[0xff0f] = "The semaphore handle is not valid"
5430         errors[0xff10] = "SemaphoreHandle is not associated with a valid sempahore"
5431         errors[0xff11] = "Invalid semaphore handle"
5432         errors[0xff12] = "Transaction tracking is not available"
5433         errors[0xff13] = "The transaction has not yet been written to disk"
5434         errors[0xff14] = "Directory already exists"
5435         errors[0xff15] = "The file already exists and the deletion flag was not set"
5436         errors[0xff16] = "No matching files or directories were found"
5437         errors[0xff17] = "A file or directory matching the search criteria was not found"
5438         errors[0xff18] = "The file already exists"
5439         errors[0xff19] = "Failure, No files found"
5440         errors[0xff1a] = "Unlock Error"
5441         errors[0xff1b] = "I/O Bound Error"
5442         errors[0xff1c] = "Not Accepting Messages"
5443         errors[0xff1d] = "No More Salvageable Files in Directory"
5444         errors[0xff1e] = "Calling Station is Not a Manager"
5445         errors[0xff1f] = "Bindery Failure"
5446         errors[0xff20] = "NCP Extension Not Found"
5447
5448 ##############################################################################
5449 # Produce C code
5450 ##############################################################################
5451 def ExamineVars(vars, structs_hash, vars_hash):
5452         for var in vars:
5453                 if isinstance(var, struct):
5454                         structs_hash[var.HFName()] = var
5455                         struct_vars = var.Variables()
5456                         ExamineVars(struct_vars, structs_hash, vars_hash)
5457                 else:
5458                         vars_hash[repr(var)] = var
5459                         if isinstance(var, bitfield):
5460                                 sub_vars = var.SubVariables()
5461                                 ExamineVars(sub_vars, structs_hash, vars_hash)
5462
5463 def produce_code():
5464
5465         global errors
5466
5467         print "/*"
5468         print " * Generated automatically from %s" % (sys.argv[0])
5469         print " * Do not edit this file manually, as all changes will be lost."
5470         print " */\n"
5471
5472         print """
5473 /*
5474  * This program is free software; you can redistribute it and/or
5475  * modify it under the terms of the GNU General Public License
5476  * as published by the Free Software Foundation; either version 2
5477  * of the License, or (at your option) any later version.
5478  * 
5479  * This program is distributed in the hope that it will be useful,
5480  * but WITHOUT ANY WARRANTY; without even the implied warranty of
5481  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5482  * GNU General Public License for more details.
5483  * 
5484  * You should have received a copy of the GNU General Public License
5485  * along with this program; if not, write to the Free Software
5486  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
5487  */
5488
5489 #ifdef HAVE_CONFIG_H
5490 # include "config.h"
5491 #endif
5492
5493 #include <string.h>
5494 #include <glib.h>
5495 #include <epan/packet.h>
5496 #include <epan/conversation.h>
5497 #include "ptvcursor.h"
5498 #include "packet-ncp-int.h"
5499
5500 /* Function declarations for functions used in proto_register_ncp2222() */
5501 static void ncp_init_protocol(void);
5502 static void ncp_postseq_cleanup(void);
5503
5504 /* Endianness macros */
5505 #define BE              0
5506 #define LE              1
5507 #define NO_ENDIANNESS   0
5508
5509 #define NO_LENGTH       -1
5510
5511 /* We use this int-pointer as a special flag in ptvc_record's */
5512 static int ptvc_struct_int_storage;
5513 #define PTVC_STRUCT     (&ptvc_struct_int_storage)
5514
5515 /* Values used in the count-variable ("var"/"repeat") logic. */"""
5516
5517
5518         if global_highest_var > -1:
5519                 print "#define NUM_REPEAT_VARS\t%d" % (global_highest_var + 1)
5520                 print "guint repeat_vars[NUM_REPEAT_VARS];",
5521         else:
5522                 print "#define NUM_REPEAT_VARS\t0"
5523                 print "guint *repeat_vars = NULL;",
5524
5525         print """
5526 #define NO_VAR          NUM_REPEAT_VARS
5527 #define NO_REPEAT       NUM_REPEAT_VARS
5528
5529 #define REQ_COND_SIZE_CONSTANT  0
5530 #define REQ_COND_SIZE_VARIABLE  1
5531 #define NO_REQ_COND_SIZE        0
5532
5533
5534 #define NTREE   0x00020000
5535 #define NDEPTH  0x00000002
5536 #define NREV    0x00000004
5537 #define NFLAGS  0x00000008
5538
5539
5540
5541 static int hf_ncp_func = -1;
5542 static int hf_ncp_length = -1;
5543 static int hf_ncp_subfunc = -1;
5544 static int hf_ncp_fragment_handle = -1;
5545 static int hf_ncp_completion_code = -1;
5546 static int hf_ncp_connection_status = -1;
5547 static int hf_ncp_req_frame_num = -1;
5548 static int hf_ncp_fragment_size = -1;
5549 static int hf_ncp_message_size = -1;
5550 static int hf_ncp_nds_flag = -1;
5551 static int hf_ncp_nds_verb = -1; 
5552 static int hf_ping_version = -1;
5553 static int hf_nds_version = -1;
5554 static int hf_nds_flags = -1;
5555 static int hf_nds_reply_depth = -1;
5556 static int hf_nds_reply_rev = -1;
5557 static int hf_nds_reply_flags = -1;
5558 static int hf_nds_p1type = -1;
5559 static int hf_nds_uint32value = -1;
5560 static int hf_nds_bit1 = -1;
5561 static int hf_nds_bit2 = -1;
5562 static int hf_nds_bit3 = -1;
5563 static int hf_nds_bit4 = -1;
5564 static int hf_nds_bit5 = -1;
5565 static int hf_nds_bit6 = -1;
5566 static int hf_nds_bit7 = -1;
5567 static int hf_nds_bit8 = -1;
5568 static int hf_nds_bit9 = -1;
5569 static int hf_nds_bit10 = -1;
5570 static int hf_nds_bit11 = -1;
5571 static int hf_nds_bit12 = -1;
5572 static int hf_nds_bit13 = -1;
5573 static int hf_nds_bit14 = -1;
5574 static int hf_nds_bit15 = -1;
5575 static int hf_nds_bit16 = -1;
5576 static int hf_bit1outflags = -1;
5577 static int hf_bit2outflags = -1;
5578 static int hf_bit3outflags = -1;
5579 static int hf_bit4outflags = -1;
5580 static int hf_bit5outflags = -1;
5581 static int hf_bit6outflags = -1;
5582 static int hf_bit7outflags = -1;
5583 static int hf_bit8outflags = -1;
5584 static int hf_bit9outflags = -1;
5585 static int hf_bit10outflags = -1;
5586 static int hf_bit11outflags = -1;
5587 static int hf_bit12outflags = -1;
5588 static int hf_bit13outflags = -1;
5589 static int hf_bit14outflags = -1;
5590 static int hf_bit15outflags = -1;
5591 static int hf_bit16outflags = -1;
5592 static int hf_bit1nflags = -1;
5593 static int hf_bit2nflags = -1;
5594 static int hf_bit3nflags = -1;
5595 static int hf_bit4nflags = -1;
5596 static int hf_bit5nflags = -1;
5597 static int hf_bit6nflags = -1;
5598 static int hf_bit7nflags = -1;
5599 static int hf_bit8nflags = -1;
5600 static int hf_bit9nflags = -1;
5601 static int hf_bit10nflags = -1;
5602 static int hf_bit11nflags = -1;
5603 static int hf_bit12nflags = -1;
5604 static int hf_bit13nflags = -1;
5605 static int hf_bit14nflags = -1;
5606 static int hf_bit15nflags = -1;
5607 static int hf_bit16nflags = -1;
5608 static int hf_bit1rflags = -1;
5609 static int hf_bit2rflags = -1;
5610 static int hf_bit3rflags = -1;
5611 static int hf_bit4rflags = -1;
5612 static int hf_bit5rflags = -1;
5613 static int hf_bit6rflags = -1;
5614 static int hf_bit7rflags = -1;
5615 static int hf_bit8rflags = -1;
5616 static int hf_bit9rflags = -1;
5617 static int hf_bit10rflags = -1;
5618 static int hf_bit11rflags = -1;
5619 static int hf_bit12rflags = -1;
5620 static int hf_bit13rflags = -1;
5621 static int hf_bit14rflags = -1;
5622 static int hf_bit15rflags = -1;
5623 static int hf_bit16rflags = -1;
5624 static int hf_bit1cflags = -1;
5625 static int hf_bit2cflags = -1;
5626 static int hf_bit3cflags = -1;
5627 static int hf_bit4cflags = -1;
5628 static int hf_bit5cflags = -1;
5629 static int hf_bit6cflags = -1;
5630 static int hf_bit7cflags = -1;
5631 static int hf_bit8cflags = -1;
5632 static int hf_bit9cflags = -1;
5633 static int hf_bit10cflags = -1;
5634 static int hf_bit11cflags = -1;
5635 static int hf_bit12cflags = -1;
5636 static int hf_bit13cflags = -1;
5637 static int hf_bit14cflags = -1;
5638 static int hf_bit15cflags = -1;
5639 static int hf_bit16cflags = -1;
5640 static int hf_bit1acflags = -1;
5641 static int hf_bit2acflags = -1;
5642 static int hf_bit3acflags = -1;
5643 static int hf_bit4acflags = -1;
5644 static int hf_bit5acflags = -1;
5645 static int hf_bit6acflags = -1;
5646 static int hf_bit7acflags = -1;
5647 static int hf_bit8acflags = -1;
5648 static int hf_bit9acflags = -1;
5649 static int hf_bit10acflags = -1;
5650 static int hf_bit11acflags = -1;
5651 static int hf_bit12acflags = -1;
5652 static int hf_bit13acflags = -1;
5653 static int hf_bit14acflags = -1;
5654 static int hf_bit15acflags = -1;
5655 static int hf_bit16acflags = -1;
5656 static int hf_bit1vflags = -1;
5657 static int hf_bit2vflags = -1;
5658 static int hf_bit3vflags = -1;
5659 static int hf_bit4vflags = -1;
5660 static int hf_bit5vflags = -1;
5661 static int hf_bit6vflags = -1;
5662 static int hf_bit7vflags = -1;
5663 static int hf_bit8vflags = -1;
5664 static int hf_bit9vflags = -1;
5665 static int hf_bit10vflags = -1;
5666 static int hf_bit11vflags = -1;
5667 static int hf_bit12vflags = -1;
5668 static int hf_bit13vflags = -1;
5669 static int hf_bit14vflags = -1;
5670 static int hf_bit15vflags = -1;
5671 static int hf_bit16vflags = -1;
5672 static int hf_bit1eflags = -1;
5673 static int hf_bit2eflags = -1;
5674 static int hf_bit3eflags = -1;
5675 static int hf_bit4eflags = -1;
5676 static int hf_bit5eflags = -1;
5677 static int hf_bit6eflags = -1;
5678 static int hf_bit7eflags = -1;
5679 static int hf_bit8eflags = -1;
5680 static int hf_bit9eflags = -1;
5681 static int hf_bit10eflags = -1;
5682 static int hf_bit11eflags = -1;
5683 static int hf_bit12eflags = -1;
5684 static int hf_bit13eflags = -1;
5685 static int hf_bit14eflags = -1;
5686 static int hf_bit15eflags = -1;
5687 static int hf_bit16eflags = -1;
5688 static int hf_bit1infoflagsl = -1;
5689 static int hf_bit2infoflagsl = -1;
5690 static int hf_bit3infoflagsl = -1;
5691 static int hf_bit4infoflagsl = -1;
5692 static int hf_bit5infoflagsl = -1;
5693 static int hf_bit6infoflagsl = -1;
5694 static int hf_bit7infoflagsl = -1;
5695 static int hf_bit8infoflagsl = -1;
5696 static int hf_bit9infoflagsl = -1;
5697 static int hf_bit10infoflagsl = -1;
5698 static int hf_bit11infoflagsl = -1;
5699 static int hf_bit12infoflagsl = -1;
5700 static int hf_bit13infoflagsl = -1;
5701 static int hf_bit14infoflagsl = -1;
5702 static int hf_bit15infoflagsl = -1;
5703 static int hf_bit16infoflagsl = -1;
5704 static int hf_bit1infoflagsh = -1;
5705 static int hf_bit2infoflagsh = -1;
5706 static int hf_bit3infoflagsh = -1;
5707 static int hf_bit4infoflagsh = -1;
5708 static int hf_bit5infoflagsh = -1;
5709 static int hf_bit6infoflagsh = -1;
5710 static int hf_bit7infoflagsh = -1;
5711 static int hf_bit8infoflagsh = -1;
5712 static int hf_bit9infoflagsh = -1;
5713 static int hf_bit10infoflagsh = -1;
5714 static int hf_bit11infoflagsh = -1;
5715 static int hf_bit12infoflagsh = -1;
5716 static int hf_bit13infoflagsh = -1;
5717 static int hf_bit14infoflagsh = -1;
5718 static int hf_bit15infoflagsh = -1;
5719 static int hf_bit16infoflagsh = -1;
5720 static int hf_bit1lflags = -1;
5721 static int hf_bit2lflags = -1;
5722 static int hf_bit3lflags = -1;
5723 static int hf_bit4lflags = -1;
5724 static int hf_bit5lflags = -1;
5725 static int hf_bit6lflags = -1;
5726 static int hf_bit7lflags = -1;
5727 static int hf_bit8lflags = -1;
5728 static int hf_bit9lflags = -1;
5729 static int hf_bit10lflags = -1;
5730 static int hf_bit11lflags = -1;
5731 static int hf_bit12lflags = -1;
5732 static int hf_bit13lflags = -1;
5733 static int hf_bit14lflags = -1;
5734 static int hf_bit15lflags = -1;
5735 static int hf_bit16lflags = -1;
5736 static int hf_bit1l1flagsl = -1;
5737 static int hf_bit2l1flagsl = -1;
5738 static int hf_bit3l1flagsl = -1;
5739 static int hf_bit4l1flagsl = -1;
5740 static int hf_bit5l1flagsl = -1;
5741 static int hf_bit6l1flagsl = -1;
5742 static int hf_bit7l1flagsl = -1;
5743 static int hf_bit8l1flagsl = -1;
5744 static int hf_bit9l1flagsl = -1;
5745 static int hf_bit10l1flagsl = -1;
5746 static int hf_bit11l1flagsl = -1;
5747 static int hf_bit12l1flagsl = -1;
5748 static int hf_bit13l1flagsl = -1;
5749 static int hf_bit14l1flagsl = -1;
5750 static int hf_bit15l1flagsl = -1;
5751 static int hf_bit16l1flagsl = -1;
5752 static int hf_bit1l1flagsh = -1;
5753 static int hf_bit2l1flagsh = -1;
5754 static int hf_bit3l1flagsh = -1;
5755 static int hf_bit4l1flagsh = -1;
5756 static int hf_bit5l1flagsh = -1;
5757 static int hf_bit6l1flagsh = -1;
5758 static int hf_bit7l1flagsh = -1;
5759 static int hf_bit8l1flagsh = -1;
5760 static int hf_bit9l1flagsh = -1;
5761 static int hf_bit10l1flagsh = -1;
5762 static int hf_bit11l1flagsh = -1;
5763 static int hf_bit12l1flagsh = -1;
5764 static int hf_bit13l1flagsh = -1;
5765 static int hf_bit14l1flagsh = -1;
5766 static int hf_bit15l1flagsh = -1;
5767 static int hf_bit16l1flagsh = -1;
5768 static int hf_nds_tree_name = -1;
5769 static int hf_nds_reply_error = -1;
5770 static int hf_nds_net = -1;
5771 static int hf_nds_node = -1;
5772 static int hf_nds_socket = -1;
5773 static int hf_add_ref_ip = -1;
5774 static int hf_add_ref_udp = -1;                                                     
5775 static int hf_add_ref_tcp = -1;
5776 static int hf_referral_record = -1;
5777 static int hf_referral_addcount = -1;
5778 static int hf_nds_port = -1;
5779 static int hf_mv_string = -1;
5780 static int hf_nds_syntax = -1;
5781 static int hf_value_string = -1;
5782 static int hf_nds_buffer_size = -1;
5783 static int hf_nds_ver = -1;
5784 static int hf_nds_nflags = -1;
5785 static int hf_nds_scope = -1;
5786 static int hf_nds_name = -1;
5787 static int hf_nds_comm_trans = -1;
5788 static int hf_nds_tree_trans = -1;
5789 static int hf_nds_iteration = -1;
5790 static int hf_nds_eid = -1;
5791 static int hf_nds_info_type = -1;
5792 static int hf_nds_all_attr = -1;
5793 static int hf_nds_req_flags = -1;
5794 static int hf_nds_attr = -1;
5795 static int hf_nds_crc = -1;
5796 static int hf_nds_referrals = -1;
5797 static int hf_nds_result_flags = -1;
5798 static int hf_nds_tag_string = -1;
5799 static int hf_value_bytes = -1;
5800 static int hf_replica_type = -1;
5801 static int hf_replica_state = -1;
5802 static int hf_replica_number = -1;
5803 static int hf_min_nds_ver = -1;
5804 static int hf_nds_ver_include = -1;
5805 static int hf_nds_ver_exclude = -1;
5806 static int hf_nds_es = -1;
5807 static int hf_es_type = -1;
5808 static int hf_delim_string = -1;
5809 static int hf_rdn_string = -1;
5810 static int hf_nds_revent = -1;
5811 static int hf_nds_rnum = -1; 
5812 static int hf_nds_name_type = -1;
5813 static int hf_nds_rflags = -1;
5814 static int hf_nds_eflags = -1;
5815 static int hf_nds_depth = -1;
5816 static int hf_nds_class_def_type = -1;
5817 static int hf_nds_classes = -1;
5818 static int hf_nds_return_all_classes = -1;
5819 static int hf_nds_stream_flags = -1;
5820 static int hf_nds_stream_name = -1;
5821 static int hf_nds_file_handle = -1;
5822 static int hf_nds_file_size = -1;
5823 static int hf_nds_dn_output_type = -1;
5824 static int hf_nds_nested_output_type = -1;
5825 static int hf_nds_output_delimiter = -1;
5826 static int hf_nds_output_entry_specifier = -1;
5827 static int hf_es_value = -1;
5828 static int hf_es_rdn_count = -1;
5829 static int hf_nds_replica_num = -1;
5830 static int hf_nds_event_num = -1;
5831 static int hf_es_seconds = -1;
5832 static int hf_nds_compare_results = -1;
5833 static int hf_nds_parent = -1;
5834 static int hf_nds_name_filter = -1;
5835 static int hf_nds_class_filter = -1;
5836 static int hf_nds_time_filter = -1;
5837 static int hf_nds_partition_root_id = -1;
5838 static int hf_nds_replicas = -1;
5839 static int hf_nds_purge = -1;
5840 static int hf_nds_local_partition = -1;
5841 static int hf_partition_busy = -1;
5842 static int hf_nds_number_of_changes = -1;
5843 static int hf_sub_count = -1;
5844 static int hf_nds_revision = -1;
5845 static int hf_nds_base_class = -1;
5846 static int hf_nds_relative_dn = -1;
5847 static int hf_nds_root_dn = -1;
5848 static int hf_nds_parent_dn = -1;
5849 static int hf_deref_base = -1;
5850 static int hf_nds_entry_info = -1;
5851 static int hf_nds_base = -1;
5852 static int hf_nds_privileges = -1;
5853 static int hf_nds_vflags = -1;
5854 static int hf_nds_value_len = -1;
5855 static int hf_nds_cflags = -1;
5856 static int hf_nds_acflags = -1;
5857 static int hf_nds_asn1 = -1;
5858 static int hf_nds_upper = -1;
5859 static int hf_nds_lower = -1;
5860 static int hf_nds_trustee_dn = -1;
5861 static int hf_nds_attribute_dn = -1;
5862 static int hf_nds_acl_add = -1;
5863 static int hf_nds_acl_del = -1;
5864 static int hf_nds_att_add = -1;
5865 static int hf_nds_att_del = -1;
5866 static int hf_nds_keep = -1;
5867 static int hf_nds_new_rdn = -1;
5868 static int hf_nds_time_delay = -1;
5869 static int hf_nds_root_name = -1;
5870 static int hf_nds_new_part_id = -1;
5871 static int hf_nds_child_part_id = -1;
5872 static int hf_nds_master_part_id = -1;
5873 static int hf_nds_target_name = -1;
5874 static int hf_nds_super = -1;
5875 static int hf_bit1pingflags2 = -1;
5876 static int hf_bit2pingflags2 = -1;
5877 static int hf_bit3pingflags2 = -1;
5878 static int hf_bit4pingflags2 = -1;
5879 static int hf_bit5pingflags2 = -1;
5880 static int hf_bit6pingflags2 = -1;
5881 static int hf_bit7pingflags2 = -1;
5882 static int hf_bit8pingflags2 = -1;
5883 static int hf_bit9pingflags2 = -1;
5884 static int hf_bit10pingflags2 = -1;
5885 static int hf_bit11pingflags2 = -1;
5886 static int hf_bit12pingflags2 = -1;
5887 static int hf_bit13pingflags2 = -1;
5888 static int hf_bit14pingflags2 = -1;
5889 static int hf_bit15pingflags2 = -1;
5890 static int hf_bit16pingflags2 = -1;
5891 static int hf_bit1pingflags1 = -1;
5892 static int hf_bit2pingflags1 = -1;
5893 static int hf_bit3pingflags1 = -1;
5894 static int hf_bit4pingflags1 = -1;
5895 static int hf_bit5pingflags1 = -1;
5896 static int hf_bit6pingflags1 = -1;
5897 static int hf_bit7pingflags1 = -1;
5898 static int hf_bit8pingflags1 = -1;
5899 static int hf_bit9pingflags1 = -1;
5900 static int hf_bit10pingflags1 = -1;
5901 static int hf_bit11pingflags1 = -1;
5902 static int hf_bit12pingflags1 = -1;
5903 static int hf_bit13pingflags1 = -1;
5904 static int hf_bit14pingflags1 = -1;
5905 static int hf_bit15pingflags1 = -1;
5906 static int hf_bit16pingflags1 = -1;
5907 static int hf_bit1pingpflags1 = -1;
5908 static int hf_bit2pingpflags1 = -1;
5909 static int hf_bit3pingpflags1 = -1;
5910 static int hf_bit4pingpflags1 = -1;
5911 static int hf_bit5pingpflags1 = -1;
5912 static int hf_bit6pingpflags1 = -1;
5913 static int hf_bit7pingpflags1 = -1;
5914 static int hf_bit8pingpflags1 = -1;
5915 static int hf_bit9pingpflags1 = -1;
5916 static int hf_bit10pingpflags1 = -1;
5917 static int hf_bit11pingpflags1 = -1;
5918 static int hf_bit12pingpflags1 = -1;
5919 static int hf_bit13pingpflags1 = -1;
5920 static int hf_bit14pingpflags1 = -1;
5921 static int hf_bit15pingpflags1 = -1;
5922 static int hf_bit16pingpflags1 = -1;
5923 static int hf_bit1pingvflags1 = -1;
5924 static int hf_bit2pingvflags1 = -1;
5925 static int hf_bit3pingvflags1 = -1;
5926 static int hf_bit4pingvflags1 = -1;
5927 static int hf_bit5pingvflags1 = -1;
5928 static int hf_bit6pingvflags1 = -1;
5929 static int hf_bit7pingvflags1 = -1;
5930 static int hf_bit8pingvflags1 = -1;
5931 static int hf_bit9pingvflags1 = -1;
5932 static int hf_bit10pingvflags1 = -1;
5933 static int hf_bit11pingvflags1 = -1;
5934 static int hf_bit12pingvflags1 = -1;
5935 static int hf_bit13pingvflags1 = -1;
5936 static int hf_bit14pingvflags1 = -1;
5937 static int hf_bit15pingvflags1 = -1;
5938 static int hf_bit16pingvflags1 = -1;
5939 static int hf_nds_letter_ver = -1;
5940 static int hf_nds_os_ver = -1;
5941 static int hf_nds_lic_flags = -1;
5942 static int hf_nds_ds_time = -1;
5943 static int hf_nds_ping_version = -1;
5944
5945
5946         """
5947                
5948         # Look at all packet types in the packets collection, and cull information
5949         # from them.
5950         errors_used_list = []
5951         errors_used_hash = {}
5952         groups_used_list = []
5953         groups_used_hash = {}
5954         variables_used_hash = {}
5955         structs_used_hash = {}
5956
5957         for pkt in packets:
5958                 # Determine which error codes are used.
5959                 codes = pkt.CompletionCodes()
5960                 for code in codes.Records():
5961                         if not errors_used_hash.has_key(code):
5962                                 errors_used_hash[code] = len(errors_used_list)
5963                                 errors_used_list.append(code)
5964
5965                 # Determine which groups are used.
5966                 group = pkt.Group()
5967                 if not groups_used_hash.has_key(group):
5968                         groups_used_hash[group] = len(groups_used_list)
5969                         groups_used_list.append(group)
5970
5971                 # Determine which variables are used.
5972                 vars = pkt.Variables()
5973                 ExamineVars(vars, structs_used_hash, variables_used_hash)
5974
5975
5976         # Print the hf variable declarations
5977         sorted_vars = variables_used_hash.values()
5978         sorted_vars.sort()
5979         for var in sorted_vars:
5980                 print "static int " + var.HFName() + " = -1;"
5981
5982
5983         # Print the value_string's
5984         for var in sorted_vars:
5985                 if isinstance(var, val_string):
5986                         print ""
5987                         print var.Code()
5988                            
5989         # Determine which error codes are not used
5990         errors_not_used = {}
5991         # Copy the keys from the error list...
5992         for code in errors.keys():
5993                 errors_not_used[code] = 1
5994         # ... and remove the ones that *were* used.
5995         for code in errors_used_list:
5996                 del errors_not_used[code]
5997
5998         # Print a remark showing errors not used
5999         list_errors_not_used = errors_not_used.keys()
6000         list_errors_not_used.sort()
6001         for code in list_errors_not_used:
6002                 print "/* Error 0x%04x not used: %s */" % (code, errors[code])
6003         print "\n"
6004
6005         # Print the errors table
6006         print "/* Error strings. */"
6007         print "static const char *ncp_errors[] = {"
6008         for code in errors_used_list:
6009                 print '\t/* %02d (0x%04x) */ "%s",' % (errors_used_hash[code], code, errors[code])
6010         print "};\n"
6011
6012
6013
6014
6015         # Determine which groups are not used
6016         groups_not_used = {}
6017         # Copy the keys from the group list...
6018         for group in groups.keys():
6019                 groups_not_used[group] = 1
6020         # ... and remove the ones that *were* used.
6021         for group in groups_used_list:
6022                 del groups_not_used[group]
6023
6024         # Print a remark showing groups not used
6025         list_groups_not_used = groups_not_used.keys()
6026         list_groups_not_used.sort()
6027         for group in list_groups_not_used:
6028                 print "/* Group not used: %s = %s */" % (group, groups[group])
6029         print "\n"
6030
6031         # Print the groups table
6032         print "/* Group strings. */"
6033         print "static const char *ncp_groups[] = {"
6034         for group in groups_used_list:
6035                 print '\t/* %02d (%s) */ "%s",' % (groups_used_hash[group], group, groups[group])
6036         print "};\n"
6037
6038         # Print the group macros
6039         for group in groups_used_list:
6040                 name = string.upper(group)
6041                 print "#define NCP_GROUP_%s\t%d" % (name, groups_used_hash[group])
6042         print "\n"
6043
6044
6045         # Print the conditional_records for all Request Conditions.
6046         num = 0
6047         print "/* Request-Condition dfilter records. The NULL pointer"
6048         print "   is replaced by a pointer to the created dfilter_t. */"
6049         if len(global_req_cond) == 0:
6050                 print "static conditional_record req_conds = NULL;"
6051         else:
6052                 print "static conditional_record req_conds[] = {"
6053                 for req_cond in global_req_cond.keys():
6054                         print "\t{ \"%s\", NULL }," % (req_cond,)
6055                         global_req_cond[req_cond] = num
6056                         num = num + 1
6057                 print "};"
6058         print "#define NUM_REQ_CONDS %d" % (num,)
6059         print "#define NO_REQ_COND   NUM_REQ_CONDS\n\n"
6060
6061
6062
6063         # Print PTVC's for bitfields
6064         ett_list = []
6065         print "/* PTVC records for bit-fields. */"
6066         for var in sorted_vars:
6067                 if isinstance(var, bitfield):
6068                         sub_vars_ptvc = var.SubVariablesPTVC()
6069                         print "/* %s */" % (sub_vars_ptvc.Name())
6070                         print sub_vars_ptvc.Code()
6071                         ett_list.append(sub_vars_ptvc.ETTName())
6072
6073
6074         # Print the PTVC's for structures
6075         print "/* PTVC records for structs. */"
6076         # Sort them
6077         svhash = {}
6078         for svar in structs_used_hash.values():
6079                 svhash[svar.HFName()] = svar
6080                 if svar.descr:
6081                         ett_list.append(svar.ETTName())
6082
6083         struct_vars = svhash.keys()
6084         struct_vars.sort()
6085         for varname in struct_vars:
6086                 var = svhash[varname]
6087                 print var.Code()
6088
6089         ett_list.sort()
6090
6091         # Print regular PTVC's
6092         print "/* PTVC records. These are re-used to save space. */"
6093         for ptvc in ptvc_lists.Members():
6094                 if not ptvc.Null() and not ptvc.Empty():
6095                         print ptvc.Code()
6096
6097         # Print error_equivalency tables
6098         print "/* Error-Equivalency Tables. These are re-used to save space. */"
6099         for compcodes in compcode_lists.Members():
6100                 errors = compcodes.Records()
6101                 # Make sure the record for error = 0x00 comes last.
6102                 print "static const error_equivalency %s[] = {" % (compcodes.Name())
6103                 for error in errors:
6104                         error_in_packet = error >> 8;
6105                         ncp_error_index = errors_used_hash[error]
6106                         print "\t{ 0x%02x, %d }, /* 0x%04x */" % (error_in_packet,
6107                                 ncp_error_index, error)
6108                 print "\t{ 0x00, -1 }\n};\n"
6109
6110
6111
6112         # Print integer arrays for all ncp_records that need
6113         # a list of req_cond_indexes. Do it "uniquely" to save space;
6114         # if multiple packets share the same set of req_cond's,
6115         # then they'll share the same integer array
6116         print "/* Request Condition Indexes */"
6117         # First, make them unique
6118         req_cond_collection = UniqueCollection("req_cond_collection")
6119         for pkt in packets:
6120                 req_conds = pkt.CalculateReqConds()
6121                 if req_conds:
6122                         unique_list = req_cond_collection.Add(req_conds)
6123                         pkt.SetReqConds(unique_list)
6124                 else:
6125                         pkt.SetReqConds(None)
6126
6127         # Print them
6128         for req_cond in req_cond_collection.Members():
6129                 print "static const int %s[] = {" % (req_cond.Name(),)
6130                 print "\t",
6131                 vals = []
6132                 for text in req_cond.Records():
6133                         vals.append(global_req_cond[text])
6134                 vals.sort()
6135                 for val in vals:
6136                         print "%s, " % (val,),
6137
6138                 print "-1 };"
6139                 print ""    
6140
6141
6142
6143         # Functions without length parameter
6144         funcs_without_length = {}
6145
6146         # Print info string structures
6147         print "/* Info Strings */"
6148         for pkt in packets:
6149                 if pkt.req_info_str:
6150                         name = pkt.InfoStrName() + "_req"
6151                         var = pkt.req_info_str[0]
6152                         print "static const info_string_t %s = {" % (name,)
6153                         print "\t&%s," % (var.HFName(),)
6154                         print '\t"%s",' % (pkt.req_info_str[1],)
6155                         print '\t"%s"' % (pkt.req_info_str[2],)
6156                         print "};\n"
6157
6158
6159
6160         # Print ncp_record packet records
6161         print "#define SUBFUNC_WITH_LENGTH      0x02"
6162         print "#define SUBFUNC_NO_LENGTH        0x01"
6163         print "#define NO_SUBFUNC               0x00"
6164
6165         print "/* ncp_record structs for packets */"
6166         print "static const ncp_record ncp_packets[] = {" 
6167         for pkt in packets:
6168                 if pkt.HasSubFunction():
6169                         func = pkt.FunctionCode('high')
6170                         if pkt.HasLength():
6171                                 subfunc_string = "SUBFUNC_WITH_LENGTH"
6172                                 # Ensure that the function either has a length param or not
6173                                 if funcs_without_length.has_key(func):
6174                                         sys.exit("Function 0x%04x sometimes has length param, sometimes not." \
6175                                                 % (pkt.FunctionCode(),))
6176                         else:
6177                                 subfunc_string = "SUBFUNC_NO_LENGTH"
6178                                 funcs_without_length[func] = 1
6179                 else:
6180                         subfunc_string = "NO_SUBFUNC"
6181                 print '\t{ 0x%02x, 0x%02x, %s, "%s",' % (pkt.FunctionCode('high'),
6182                         pkt.FunctionCode('low'), subfunc_string, pkt.Description()),
6183
6184                 print '\t%d /* %s */,' % (groups_used_hash[pkt.Group()], pkt.Group())
6185
6186                 ptvc = pkt.PTVCRequest()
6187                 if not ptvc.Null() and not ptvc.Empty():
6188                         ptvc_request = ptvc.Name()
6189                 else:
6190                         ptvc_request = 'NULL'
6191
6192                 ptvc = pkt.PTVCReply()
6193                 if not ptvc.Null() and not ptvc.Empty():
6194                         ptvc_reply = ptvc.Name()
6195                 else:
6196                         ptvc_reply = 'NULL'
6197
6198                 errors = pkt.CompletionCodes()
6199
6200                 req_conds_obj = pkt.GetReqConds()
6201                 if req_conds_obj:
6202                         req_conds = req_conds_obj.Name()
6203                 else:
6204                         req_conds = "NULL"
6205
6206                 if not req_conds_obj:
6207                         req_cond_size = "NO_REQ_COND_SIZE"
6208                 else:
6209                         req_cond_size = pkt.ReqCondSize()
6210                         if req_cond_size == None:
6211                                 msg.write("NCP packet %s nees a ReqCondSize*() call\n" \
6212                                         % (pkt.CName(),))
6213                                 sys.exit(1)
6214                 
6215                 if pkt.req_info_str:
6216                         req_info_str = "&" + pkt.InfoStrName() + "_req"
6217                 else:
6218                         req_info_str = "NULL"
6219
6220                 print '\t\t%s, %s, %s, %s, %s, %s },\n' % \
6221                         (ptvc_request, ptvc_reply, errors.Name(), req_conds,
6222                         req_cond_size, req_info_str)
6223
6224         print '\t{ 0, 0, 0, NULL, 0, NULL, NULL, NULL, NULL, NO_REQ_COND_SIZE, NULL }'
6225         print "};\n"
6226
6227         print "/* ncp funcs that require a subfunc */"
6228         print "static const guint8 ncp_func_requires_subfunc[] = {"
6229         hi_seen = {}
6230         for pkt in packets:
6231                 if pkt.HasSubFunction():
6232                         hi_func = pkt.FunctionCode('high')
6233                         if not hi_seen.has_key(hi_func):
6234                                 print "\t0x%02x," % (hi_func)
6235                                 hi_seen[hi_func] = 1
6236         print "\t0"
6237         print "};\n"
6238
6239
6240         print "/* ncp funcs that have no length parameter */"
6241         print "static const guint8 ncp_func_has_no_length_parameter[] = {"
6242         funcs = funcs_without_length.keys()
6243         funcs.sort()
6244         for func in funcs:
6245                 print "\t0x%02x," % (func,)
6246         print "\t0"
6247         print "};\n"
6248
6249         # final_registration_ncp2222()
6250         print """
6251 void
6252 final_registration_ncp2222(void)
6253 {
6254         int i;
6255         """
6256
6257         # Create dfilter_t's for conditional_record's  
6258         print """
6259         for (i = 0; i < NUM_REQ_CONDS; i++) {
6260                 if (!dfilter_compile((const gchar*)req_conds[i].dfilter_text,
6261                         &req_conds[i].dfilter)) {
6262                         g_message("NCP dissector failed to compiler dfilter: %s\\n",
6263                         req_conds[i].dfilter_text);
6264                         g_assert_not_reached();
6265                 }
6266         }
6267 }
6268         """
6269
6270         # proto_register_ncp2222()
6271         print """
6272 static const value_string ncp_nds_verb_vals[] = {
6273         { 1, "Resolve Name" },
6274         { 2, "Read Entry Information" },
6275         { 3, "Read" },
6276         { 4, "Compare" },
6277         { 5, "List" },
6278         { 6, "Search Entries" },
6279         { 7, "Add Entry" },
6280         { 8, "Remove Entry" },
6281         { 9, "Modify Entry" },
6282         { 10, "Modify RDN" },
6283         { 11, "Create Attribute" },
6284         { 12, "Read Attribute Definition" },
6285         { 13, "Remove Attribute Definition" },
6286         { 14, "Define Class" },
6287         { 15, "Read Class Definition" },
6288         { 16, "Modify Class Definition" },
6289         { 17, "Remove Class Definition" },
6290         { 18, "List Containable Classes" },
6291         { 19, "Get Effective Rights" },
6292         { 20, "Add Partition" },
6293         { 21, "Remove Partition" },
6294         { 22, "List Partitions" },
6295         { 23, "Split Partition" },
6296         { 24, "Join Partitions" },
6297         { 25, "Add Replica" },
6298         { 26, "Remove Replica" },
6299         { 27, "Open Stream" },
6300         { 28, "Search Filter" },
6301         { 29, "Create Subordinate Reference" },
6302         { 30, "Link Replica" },
6303         { 31, "Change Replica Type" },
6304         { 32, "Start Update Schema" },
6305         { 33, "End Update Schema" },
6306         { 34, "Update Schema" },
6307         { 35, "Start Update Replica" },
6308         { 36, "End Update Replica" },
6309         { 37, "Update Replica" },
6310         { 38, "Synchronize Partition" },
6311         { 39, "Synchronize Schema" },
6312         { 40, "Read Syntaxes" },
6313         { 41, "Get Replica Root ID" },
6314         { 42, "Begin Move Entry" },
6315         { 43, "Finish Move Entry" },
6316         { 44, "Release Moved Entry" },
6317         { 45, "Backup Entry" },
6318         { 46, "Restore Entry" },
6319         { 47, "Save DIB" },
6320         { 50, "Close Iteration" },
6321         { 51, "Unused" },
6322         { 52, "Audit Skulking" },
6323         { 53, "Get Server Address" },
6324         { 54, "Set Keys" },
6325         { 55, "Change Password" },
6326         { 56, "Verify Password" },
6327         { 57, "Begin Login" },
6328         { 58, "Finish Login" },
6329         { 59, "Begin Authentication" },
6330         { 60, "Finish Authentication" },
6331         { 61, "Logout" },
6332         { 62, "Repair Ring" },
6333         { 63, "Repair Timestamps" },
6334         { 64, "Create Back Link" },
6335         { 65, "Delete External Reference" },
6336         { 66, "Rename External Reference" },
6337         { 67, "Create Directory Entry" },
6338         { 68, "Remove Directory Entry" },
6339         { 69, "Designate New Master" },
6340         { 70, "Change Tree Name" },
6341         { 71, "Partition Entry Count" },
6342         { 72, "Check Login Restrictions" },
6343         { 73, "Start Join" },
6344         { 74, "Low Level Split" },
6345         { 75, "Low Level Join" },
6346         { 76, "Abort Low Level Join" },
6347         { 77, "Get All Servers" },
6348         { 255, "EDirectory Call" },
6349         { 0,  NULL }
6350 };
6351
6352 void
6353 proto_register_ncp2222(void)
6354 {
6355
6356         static hf_register_info hf[] = {
6357         { &hf_ncp_func,
6358         { "Function", "ncp.func", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
6359
6360         { &hf_ncp_length,
6361         { "Packet Length", "ncp.length", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
6362
6363         { &hf_ncp_subfunc,
6364         { "SubFunction", "ncp.subfunc", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
6365
6366         { &hf_ncp_completion_code,
6367         { "Completion Code", "ncp.completion_code", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
6368
6369         { &hf_ncp_fragment_handle,
6370         { "NDS Fragment Handle", "ncp.ndsfrag", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6371         
6372         { &hf_ncp_fragment_size,
6373         { "NDS Fragment Size", "ncp.ndsfragsize", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6374
6375         { &hf_ncp_message_size,
6376         { "Message Size", "ncp.ndsmessagesize", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6377         
6378         { &hf_ncp_nds_flag,
6379         { "Flags", "ncp.ndsflag", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6380         
6381         { &hf_ncp_nds_verb,      
6382         { "NDS Verb", "ncp.ndsverb", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
6383         
6384         { &hf_ping_version,
6385         { "NDS Version", "ncp.ping_version", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
6386         
6387         { &hf_nds_version,
6388         { "NDS Version", "ncp.nds_version", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6389         
6390         { &hf_nds_tree_name,                             
6391         { "Tree Name", "ncp.nds_tree_name", FT_STRING, BASE_DEC, NULL, 0x0, "", HFILL }},
6392                         
6393         /*
6394          * XXX - the page at
6395          *
6396          *      http://www.odyssea.com/whats_new/tcpipnet/tcpipnet.html
6397          *
6398          * says of the connection status "The Connection Code field may
6399          * contain values that indicate the status of the client host to
6400          * server connection.  A value of 1 in the fourth bit of this data
6401          * byte indicates that the server is unavailable (server was
6402          * downed).
6403          *
6404          * The page at
6405          *
6406          *      http://www.unm.edu/~network/presentations/course/appendix/appendix_f/tsld088.htm
6407          *
6408          * says that bit 0 is "bad service", bit 2 is "no connection
6409          * available", bit 4 is "service down", and bit 6 is "server
6410          * has a broadcast message waiting for the client".
6411          *
6412          * Should it be displayed in hex, and should those bits (and any
6413          * other bits with significance) be displayed as bitfields
6414          * underneath it?
6415          */
6416         { &hf_ncp_connection_status,
6417         { "Connection Status", "ncp.connection_status", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }},
6418
6419         { &hf_ncp_req_frame_num,
6420         { "Response to Request in Frame Number", "ncp.req_frame_num", FT_UINT32, BASE_DEC,
6421                 NULL, 0x0, "", HFILL }},
6422         
6423         { &hf_nds_flags, 
6424         { "NDS Return Flags", "ncp.nds_flags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6425         
6426        
6427         { &hf_nds_reply_depth,
6428         { "Distance from Root", "ncp.ndsdepth", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6429         
6430         { &hf_nds_reply_rev,
6431         { "NDS Revision", "ncp.ndsrev", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6432         
6433         { &hf_nds_reply_flags,
6434         { "Flags", "ncp.ndsflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6435         
6436         { &hf_nds_p1type, 
6437         { "NDS Parameter Type", "ncp.p1type", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }},
6438         
6439         { &hf_nds_uint32value, 
6440         { "NDS Value", "ncp.uint32value", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6441
6442         { &hf_nds_bit1, 
6443         { "Typeless", "ncp.nds_bit1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6444
6445         { &hf_nds_bit2, 
6446         { "All Containers", "ncp.nds_bit2", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6447                      
6448         { &hf_nds_bit3, 
6449         { "Slashed", "ncp.nds_bit3", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6450         
6451         { &hf_nds_bit4, 
6452         { "Dotted", "ncp.nds_bit4", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6453         
6454         { &hf_nds_bit5, 
6455         { "Tuned", "ncp.nds_bit5", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6456         
6457         { &hf_nds_bit6, 
6458         { "Not Defined", "ncp.nds_bit6", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6459         
6460         { &hf_nds_bit7, 
6461         { "Not Defined", "ncp.nds_bit7", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6462         
6463         { &hf_nds_bit8, 
6464         { "Not Defined", "ncp.nds_bit8", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6465         
6466         { &hf_nds_bit9, 
6467         { "Not Defined", "ncp.nds_bit9", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6468         
6469         { &hf_nds_bit10, 
6470         { "Not Defined", "ncp.nds_bit10", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6471         
6472         { &hf_nds_bit11, 
6473         { "Not Defined", "ncp.nds_bit11", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6474         
6475         { &hf_nds_bit12, 
6476         { "Not Defined", "ncp.nds_bit12", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6477         
6478         { &hf_nds_bit13, 
6479         { "Not Defined", "ncp.nds_bit13", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6480         
6481         { &hf_nds_bit14, 
6482         { "Not Defined", "ncp.nds_bit14", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6483         
6484         { &hf_nds_bit15, 
6485         { "Not Defined", "ncp.nds_bit15", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6486         
6487         { &hf_nds_bit16, 
6488         { "Not Defined", "ncp.nds_bit16", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6489         
6490         { &hf_bit1outflags, 
6491         { "Output Flags", "ncp.bit1outflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6492
6493         { &hf_bit2outflags, 
6494         { "Entry ID", "ncp.bit2outflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6495                      
6496         { &hf_bit3outflags, 
6497         { "Replica State", "ncp.bit3outflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6498         
6499         { &hf_bit4outflags, 
6500         { "Modification Timestamp", "ncp.bit4outflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6501         
6502         { &hf_bit5outflags, 
6503         { "Purge Time", "ncp.bit5outflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6504         
6505         { &hf_bit6outflags, 
6506         { "Local Partition ID", "ncp.bit6outflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6507         
6508         { &hf_bit7outflags, 
6509         { "Distinguished Name", "ncp.bit7outflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6510         
6511         { &hf_bit8outflags, 
6512         { "Replica Type", "ncp.bit8outflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6513         
6514         { &hf_bit9outflags, 
6515         { "Partition Busy", "ncp.bit9outflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6516         
6517         { &hf_bit10outflags, 
6518         { "Not Defined", "ncp.bit10outflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6519         
6520         { &hf_bit11outflags, 
6521         { "Not Defined", "ncp.bit11outflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6522         
6523         { &hf_bit12outflags, 
6524         { "Not Defined", "ncp.bit12outflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6525         
6526         { &hf_bit13outflags, 
6527         { "Not Defined", "ncp.bit13outflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6528         
6529         { &hf_bit14outflags, 
6530         { "Not Defined", "ncp.bit14outflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6531         
6532         { &hf_bit15outflags, 
6533         { "Not Defined", "ncp.bit15outflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6534         
6535         { &hf_bit16outflags, 
6536         { "Not Defined", "ncp.bit16outflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6537         
6538         { &hf_bit1nflags, 
6539         { "Entry ID", "ncp.bit1nflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6540
6541         { &hf_bit2nflags, 
6542         { "Readable", "ncp.bit2nflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6543                      
6544         { &hf_bit3nflags, 
6545         { "Writeable", "ncp.bit3nflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6546         
6547         { &hf_bit4nflags, 
6548         { "Master", "ncp.bit4nflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6549         
6550         { &hf_bit5nflags, 
6551         { "Create ID", "ncp.bit5nflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6552         
6553         { &hf_bit6nflags, 
6554         { "Walk Tree", "ncp.bit6nflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6555         
6556         { &hf_bit7nflags, 
6557         { "Dereference Alias", "ncp.bit7nflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6558         
6559         { &hf_bit8nflags, 
6560         { "Not Defined", "ncp.bit8nflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6561         
6562         { &hf_bit9nflags, 
6563         { "Not Defined", "ncp.bit9nflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6564         
6565         { &hf_bit10nflags, 
6566         { "Not Defined", "ncp.bit10nflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6567         
6568         { &hf_bit11nflags, 
6569         { "Not Defined", "ncp.bit11nflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6570         
6571         { &hf_bit12nflags, 
6572         { "Not Defined", "ncp.bit12nflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6573         
6574         { &hf_bit13nflags, 
6575         { "Not Defined", "ncp.bit13nflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6576         
6577         { &hf_bit14nflags, 
6578         { "Prefer Referrals", "ncp.bit14nflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6579         
6580         { &hf_bit15nflags, 
6581         { "Prefer Only Referrals", "ncp.bit15nflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6582         
6583         { &hf_bit16nflags, 
6584         { "Not Defined", "ncp.bit16nflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6585         
6586         { &hf_bit1rflags, 
6587         { "Typeless", "ncp.bit1rflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6588
6589         { &hf_bit2rflags, 
6590         { "Slashed", "ncp.bit2rflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6591                      
6592         { &hf_bit3rflags, 
6593         { "Dotted", "ncp.bit3rflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6594         
6595         { &hf_bit4rflags, 
6596         { "Tuned", "ncp.bit4rflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6597         
6598         { &hf_bit5rflags, 
6599         { "Not Defined", "ncp.bit5rflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6600         
6601         { &hf_bit6rflags, 
6602         { "Not Defined", "ncp.bit6rflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6603         
6604         { &hf_bit7rflags, 
6605         { "Not Defined", "ncp.bit7rflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6606         
6607         { &hf_bit8rflags, 
6608         { "Not Defined", "ncp.bit8rflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6609         
6610         { &hf_bit9rflags, 
6611         { "Not Defined", "ncp.bit9rflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6612         
6613         { &hf_bit10rflags, 
6614         { "Not Defined", "ncp.bit10rflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6615         
6616         { &hf_bit11rflags, 
6617         { "Not Defined", "ncp.bit11rflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6618         
6619         { &hf_bit12rflags, 
6620         { "Not Defined", "ncp.bit12rflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6621         
6622         { &hf_bit13rflags, 
6623         { "Not Defined", "ncp.bit13rflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6624         
6625         { &hf_bit14rflags, 
6626         { "Not Defined", "ncp.bit14rflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6627         
6628         { &hf_bit15rflags, 
6629         { "Not Defined", "ncp.bit15rflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6630         
6631         { &hf_bit16rflags, 
6632         { "Not Defined", "ncp.bit16rflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6633         
6634         { &hf_bit1eflags, 
6635         { "Alias Entry", "ncp.bit1eflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6636
6637         { &hf_bit2eflags, 
6638         { "Partition Root", "ncp.bit2eflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6639                      
6640         { &hf_bit3eflags, 
6641         { "Container Entry", "ncp.bit3eflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6642         
6643         { &hf_bit4eflags, 
6644         { "Container Alias", "ncp.bit4eflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6645         
6646         { &hf_bit5eflags, 
6647         { "Matches List Filter", "ncp.bit5eflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6648         
6649         { &hf_bit6eflags, 
6650         { "Reference Entry", "ncp.bit6eflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6651         
6652         { &hf_bit7eflags, 
6653         { "40x Reference Entry", "ncp.bit7eflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6654         
6655         { &hf_bit8eflags, 
6656         { "Back Linked", "ncp.bit8eflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6657         
6658         { &hf_bit9eflags, 
6659         { "New Entry", "ncp.bit9eflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6660         
6661         { &hf_bit10eflags, 
6662         { "Temporary Reference", "ncp.bit10eflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6663         
6664         { &hf_bit11eflags, 
6665         { "Audited", "ncp.bit11eflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6666         
6667         { &hf_bit12eflags, 
6668         { "Entry Not Present", "ncp.bit12eflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6669         
6670         { &hf_bit13eflags, 
6671         { "Entry Verify CTS", "ncp.bit13eflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6672         
6673         { &hf_bit14eflags, 
6674         { "Entry Damaged", "ncp.bit14eflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6675         
6676         { &hf_bit15eflags, 
6677         { "Not Defined", "ncp.bit15rflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6678         
6679         { &hf_bit16eflags, 
6680         { "Not Defined", "ncp.bit16rflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6681
6682         { &hf_bit1infoflagsl, 
6683         { "Output Flags", "ncp.bit1infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6684
6685         { &hf_bit2infoflagsl, 
6686         { "Entry ID", "ncp.bit2infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6687                      
6688         { &hf_bit3infoflagsl, 
6689         { "Entry Flags", "ncp.bit3infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6690         
6691         { &hf_bit4infoflagsl, 
6692         { "Subordinate Count", "ncp.bit4infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6693         
6694         { &hf_bit5infoflagsl, 
6695         { "Modification Time", "ncp.bit5infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6696         
6697         { &hf_bit6infoflagsl, 
6698         { "Modification Timestamp", "ncp.bit6infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6699         
6700         { &hf_bit7infoflagsl, 
6701         { "Creation Timestamp", "ncp.bit7infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6702         
6703         { &hf_bit8infoflagsl, 
6704         { "Partition Root ID", "ncp.bit8infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6705         
6706         { &hf_bit9infoflagsl, 
6707         { "Parent ID", "ncp.bit9infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6708         
6709         { &hf_bit10infoflagsl, 
6710         { "Revision Count", "ncp.bit10infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6711         
6712         { &hf_bit11infoflagsl, 
6713         { "Replica Type", "ncp.bit11infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6714         
6715         { &hf_bit12infoflagsl, 
6716         { "Base Class", "ncp.bit12infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6717         
6718         { &hf_bit13infoflagsl, 
6719         { "Relative Distinguished Name", "ncp.bit13infoflagsl", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6720         
6721         { &hf_bit14infoflagsl, 
6722         { "Distinguished Name", "ncp.bit14infoflagsl", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6723         
6724         { &hf_bit15infoflagsl, 
6725         { "Root Distinguished Name", "ncp.bit15infoflagsl", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6726         
6727         { &hf_bit16infoflagsl, 
6728         { "Parent Distinguished Name", "ncp.bit16infoflagsl", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6729
6730         { &hf_bit1infoflagsh, 
6731         { "Purge Time", "ncp.bit1infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6732
6733         { &hf_bit2infoflagsh, 
6734         { "Dereference Base Class", "ncp.bit2infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6735                      
6736         { &hf_bit3infoflagsh, 
6737         { "Not Defined", "ncp.bit3infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6738         
6739         { &hf_bit4infoflagsh, 
6740         { "Not Defined", "ncp.bit4infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6741         
6742         { &hf_bit5infoflagsh, 
6743         { "Not Defined", "ncp.bit5infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6744         
6745         { &hf_bit6infoflagsh, 
6746         { "Not Defined", "ncp.bit6infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6747         
6748         { &hf_bit7infoflagsh, 
6749         { "Not Defined", "ncp.bit7infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6750         
6751         { &hf_bit8infoflagsh, 
6752         { "Not Defined", "ncp.bit8infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6753         
6754         { &hf_bit9infoflagsh, 
6755         { "Not Defined", "ncp.bit9infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6756         
6757         { &hf_bit10infoflagsh, 
6758         { "Not Defined", "ncp.bit10infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6759         
6760         { &hf_bit11infoflagsh, 
6761         { "Not Defined", "ncp.bit11infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6762         
6763         { &hf_bit12infoflagsh, 
6764         { "Not Defined", "ncp.bit12infoflagshs", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6765         
6766         { &hf_bit13infoflagsh, 
6767         { "Not Defined", "ncp.bit13infoflagsh", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6768         
6769         { &hf_bit14infoflagsh, 
6770         { "Not Defined", "ncp.bit14infoflagsh", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6771         
6772         { &hf_bit15infoflagsh, 
6773         { "Not Defined", "ncp.bit15infoflagsh", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6774         
6775         { &hf_bit16infoflagsh, 
6776         { "Not Defined", "ncp.bit16infoflagsh", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6777         
6778         { &hf_bit1lflags, 
6779         { "List Typeless", "ncp.bit1lflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6780
6781         { &hf_bit2lflags, 
6782         { "List Containers", "ncp.bit2lflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6783                      
6784         { &hf_bit3lflags, 
6785         { "List Slashed", "ncp.bit3lflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6786         
6787         { &hf_bit4lflags, 
6788         { "List Dotted", "ncp.bit4lflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6789         
6790         { &hf_bit5lflags, 
6791         { "Dereference Alias", "ncp.bit5lflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6792         
6793         { &hf_bit6lflags, 
6794         { "List All Containers", "ncp.bit6lflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6795         
6796         { &hf_bit7lflags, 
6797         { "List Obsolete", "ncp.bit7lflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6798         
6799         { &hf_bit8lflags, 
6800         { "List Tuned Output", "ncp.bit8lflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6801         
6802         { &hf_bit9lflags, 
6803         { "List External Reference", "ncp.bit9lflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6804         
6805         { &hf_bit10lflags, 
6806         { "Not Defined", "ncp.bit10lflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6807         
6808         { &hf_bit11lflags, 
6809         { "Not Defined", "ncp.bit11lflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6810         
6811         { &hf_bit12lflags, 
6812         { "Not Defined", "ncp.bit12lflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6813         
6814         { &hf_bit13lflags, 
6815         { "Not Defined", "ncp.bit13lflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6816         
6817         { &hf_bit14lflags, 
6818         { "Not Defined", "ncp.bit14lflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6819         
6820         { &hf_bit15lflags, 
6821         { "Not Defined", "ncp.bit15lflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6822         
6823         { &hf_bit16lflags, 
6824         { "Not Defined", "ncp.bit16lflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6825         
6826         { &hf_bit1l1flagsl, 
6827         { "Output Flags", "ncp.bit1l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6828
6829         { &hf_bit2l1flagsl, 
6830         { "Entry ID", "ncp.bit2l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6831                      
6832         { &hf_bit3l1flagsl, 
6833         { "Replica State", "ncp.bit3l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6834         
6835         { &hf_bit4l1flagsl, 
6836         { "Modification Timestamp", "ncp.bit4l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6837         
6838         { &hf_bit5l1flagsl, 
6839         { "Purge Time", "ncp.bit5l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6840         
6841         { &hf_bit6l1flagsl, 
6842         { "Local Partition ID", "ncp.bit6l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6843         
6844         { &hf_bit7l1flagsl, 
6845         { "Distinguished Name", "ncp.bit7l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6846         
6847         { &hf_bit8l1flagsl, 
6848         { "Replica Type", "ncp.bit8l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6849         
6850         { &hf_bit9l1flagsl, 
6851         { "Partition Busy", "ncp.bit9l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6852         
6853         { &hf_bit10l1flagsl, 
6854         { "Not Defined", "ncp.bit10l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6855         
6856         { &hf_bit11l1flagsl, 
6857         { "Not Defined", "ncp.bit11l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6858         
6859         { &hf_bit12l1flagsl, 
6860         { "Not Defined", "ncp.bit12l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6861         
6862         { &hf_bit13l1flagsl, 
6863         { "Not Defined", "ncp.bit13l1flagsl", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6864         
6865         { &hf_bit14l1flagsl, 
6866         { "Not Defined", "ncp.bit14l1flagsl", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6867         
6868         { &hf_bit15l1flagsl, 
6869         { "Not Defined", "ncp.bit15l1flagsl", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6870         
6871         { &hf_bit16l1flagsl, 
6872         { "Not Defined", "ncp.bit16l1flagsl", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6873
6874         { &hf_bit1l1flagsh, 
6875         { "Not Defined", "ncp.bit1l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6876
6877         { &hf_bit2l1flagsh, 
6878         { "Not Defined", "ncp.bit2l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6879                      
6880         { &hf_bit3l1flagsh, 
6881         { "Not Defined", "ncp.bit3l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6882         
6883         { &hf_bit4l1flagsh, 
6884         { "Not Defined", "ncp.bit4l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6885         
6886         { &hf_bit5l1flagsh, 
6887         { "Not Defined", "ncp.bit5l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6888         
6889         { &hf_bit6l1flagsh, 
6890         { "Not Defined", "ncp.bit6l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6891         
6892         { &hf_bit7l1flagsh, 
6893         { "Not Defined", "ncp.bit7l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6894         
6895         { &hf_bit8l1flagsh, 
6896         { "Not Defined", "ncp.bit8l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6897         
6898         { &hf_bit9l1flagsh, 
6899         { "Not Defined", "ncp.bit9l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6900         
6901         { &hf_bit10l1flagsh, 
6902         { "Not Defined", "ncp.bit10l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6903         
6904         { &hf_bit11l1flagsh, 
6905         { "Not Defined", "ncp.bit11l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6906         
6907         { &hf_bit12l1flagsh, 
6908         { "Not Defined", "ncp.bit12l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6909         
6910         { &hf_bit13l1flagsh, 
6911         { "Not Defined", "ncp.bit13l1flagsh", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6912         
6913         { &hf_bit14l1flagsh, 
6914         { "Not Defined", "ncp.bit14l1flagsh", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6915         
6916         { &hf_bit15l1flagsh, 
6917         { "Not Defined", "ncp.bit15l1flagsh", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6918         
6919         { &hf_bit16l1flagsh, 
6920         { "Not Defined", "ncp.bit16l1flagsh", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6921         
6922         { &hf_bit1vflags, 
6923         { "Naming", "ncp.bit1vflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6924
6925         { &hf_bit2vflags, 
6926         { "Base Class", "ncp.bit2vflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6927                      
6928         { &hf_bit3vflags, 
6929         { "Present", "ncp.bit3vflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6930         
6931         { &hf_bit4vflags, 
6932         { "Value Damaged", "ncp.bit4vflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6933         
6934         { &hf_bit5vflags, 
6935         { "Not Defined", "ncp.bit5vflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6936         
6937         { &hf_bit6vflags, 
6938         { "Not Defined", "ncp.bit6vflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6939         
6940         { &hf_bit7vflags, 
6941         { "Not Defined", "ncp.bit7vflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6942         
6943         { &hf_bit8vflags, 
6944         { "Not Defined", "ncp.bit8vflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6945         
6946         { &hf_bit9vflags, 
6947         { "Not Defined", "ncp.bit9vflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6948         
6949         { &hf_bit10vflags, 
6950         { "Not Defined", "ncp.bit10vflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6951         
6952         { &hf_bit11vflags, 
6953         { "Not Defined", "ncp.bit11vflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6954         
6955         { &hf_bit12vflags, 
6956         { "Not Defined", "ncp.bit12vflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6957         
6958         { &hf_bit13vflags, 
6959         { "Not Defined", "ncp.bit13vflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6960         
6961         { &hf_bit14vflags, 
6962         { "Not Defined", "ncp.bit14vflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6963         
6964         { &hf_bit15vflags, 
6965         { "Not Defined", "ncp.bit15vflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6966         
6967         { &hf_bit16vflags, 
6968         { "Not Defined", "ncp.bit16vflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6969         
6970         { &hf_bit1cflags, 
6971         { "Ambiguous Containment", "ncp.bit1cflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6972
6973         { &hf_bit2cflags, 
6974         { "Ambiguous Naming", "ncp.bit2cflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6975                      
6976         { &hf_bit3cflags, 
6977         { "Class Definition Cannot be Removed", "ncp.bit3cflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6978         
6979         { &hf_bit4cflags, 
6980         { "Effective Class", "ncp.bit4cflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6981         
6982         { &hf_bit5cflags, 
6983         { "Container Class", "ncp.bit5cflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6984         
6985         { &hf_bit6cflags, 
6986         { "Not Defined", "ncp.bit6cflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6987         
6988         { &hf_bit7cflags, 
6989         { "Not Defined", "ncp.bit7cflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6990         
6991         { &hf_bit8cflags, 
6992         { "Not Defined", "ncp.bit8cflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6993         
6994         { &hf_bit9cflags, 
6995         { "Not Defined", "ncp.bit9cflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6996         
6997         { &hf_bit10cflags, 
6998         { "Not Defined", "ncp.bit10cflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6999         
7000         { &hf_bit11cflags, 
7001         { "Not Defined", "ncp.bit11cflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7002         
7003         { &hf_bit12cflags, 
7004         { "Not Defined", "ncp.bit12cflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7005         
7006         { &hf_bit13cflags, 
7007         { "Not Defined", "ncp.bit13cflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7008         
7009         { &hf_bit14cflags, 
7010         { "Not Defined", "ncp.bit14cflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7011         
7012         { &hf_bit15cflags, 
7013         { "Not Defined", "ncp.bit15cflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7014         
7015         { &hf_bit16cflags, 
7016         { "Not Defined", "ncp.bit16cflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7017         
7018         { &hf_bit1acflags, 
7019         { "Single Valued", "ncp.bit1acflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7020
7021         { &hf_bit2acflags, 
7022         { "Sized", "ncp.bit2acflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7023                      
7024         { &hf_bit3acflags, 
7025         { "Non-Removable", "ncp.bit3acflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7026         
7027         { &hf_bit4acflags, 
7028         { "Read Only", "ncp.bit4acflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7029         
7030         { &hf_bit5acflags, 
7031         { "Hidden", "ncp.bit5acflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7032         
7033         { &hf_bit6acflags, 
7034         { "String", "ncp.bit6acflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7035         
7036         { &hf_bit7acflags, 
7037         { "Synchronize Immediate", "ncp.bit7acflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7038         
7039         { &hf_bit8acflags, 
7040         { "Public Read", "ncp.bit8acflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7041         
7042         { &hf_bit9acflags, 
7043         { "Server Read", "ncp.bit9acflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7044         
7045         { &hf_bit10acflags, 
7046         { "Write Managed", "ncp.bit10acflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7047         
7048         { &hf_bit11acflags, 
7049         { "Per Replica", "ncp.bit11acflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7050         
7051         { &hf_bit12acflags, 
7052         { "Never Schedule Synchronization", "ncp.bit12acflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7053         
7054         { &hf_bit13acflags, 
7055         { "Operational", "ncp.bit13acflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7056         
7057         { &hf_bit14acflags, 
7058         { "Not Defined", "ncp.bit14acflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7059         
7060         { &hf_bit15acflags, 
7061         { "Not Defined", "ncp.bit15acflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7062         
7063         { &hf_bit16acflags, 
7064         { "Not Defined", "ncp.bit16acflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7065         
7066         
7067         { &hf_nds_reply_error,
7068         { "NDS Error", "ncp.ndsreplyerror", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7069         
7070         { &hf_nds_net,
7071         { "Network","ncp.ndsnet", FT_IPXNET, BASE_NONE, NULL, 0x0, "", HFILL }},
7072
7073         { &hf_nds_node,
7074         { "Node",       "ncp.ndsnode", FT_ETHER, BASE_NONE, NULL, 0x0, "", HFILL }},
7075
7076         { &hf_nds_socket, 
7077         { "Socket",     "ncp.ndssocket", FT_UINT16, BASE_HEX, NULL, 0x0, "", HFILL }},
7078         
7079         { &hf_add_ref_ip,
7080         { "Address Referral", "ncp.ipref", FT_IPv4, BASE_DEC, NULL, 0x0, "", HFILL }},
7081         
7082         { &hf_add_ref_udp,
7083         { "Address Referral", "ncp.udpref", FT_IPv4, BASE_DEC, NULL, 0x0, "", HFILL }},
7084         
7085         { &hf_add_ref_tcp,
7086         { "Address Referral", "ncp.tcpref", FT_IPv4, BASE_DEC, NULL, 0x0, "", HFILL }},
7087         
7088         { &hf_referral_record,
7089         { "Referral Record", "ncp.ref_rec", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7090         
7091         { &hf_referral_addcount,
7092         { "Address Count", "ncp.ref_addcount", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7093         
7094         { &hf_nds_port,                                                                    
7095         { "Port", "ncp.ndsport", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7096         
7097         { &hf_mv_string,                                
7098         { "Attribute Name ", "ncp.mv_string", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7099                           
7100         { &hf_nds_syntax,                                
7101         { "Attribute Syntax ", "ncp.nds_syntax", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7102
7103         { &hf_value_string,                                
7104         { "Value ", "ncp.value_string", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7105         
7106     { &hf_nds_stream_name,                                
7107         { "Stream Name ", "ncp.nds_stream_name", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7108         
7109         { &hf_nds_buffer_size,
7110         { "NDS Reply Buffer Size", "ncp.nds_reply_buf", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7111         
7112         { &hf_nds_ver,
7113         { "NDS Version", "ncp.nds_ver", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7114         
7115         { &hf_nds_nflags,
7116         { "Flags", "ncp.nds_nflags", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7117         
7118     { &hf_nds_rflags,
7119         { "Request Flags", "ncp.nds_rflags", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7120     
7121     { &hf_nds_eflags,
7122         { "Entry Flags", "ncp.nds_eflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7123         
7124         { &hf_nds_scope,
7125         { "Scope", "ncp.nds_scope", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7126         
7127         { &hf_nds_name,
7128         { "Name", "ncp.nds_name", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7129         
7130     { &hf_nds_name_type,
7131         { "Name Type", "ncp.nds_name_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7132         
7133         { &hf_nds_comm_trans,
7134         { "Communications Transport", "ncp.nds_comm_trans", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7135         
7136         { &hf_nds_tree_trans,
7137         { "Tree Walker Transport", "ncp.nds_tree_trans", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7138         
7139         { &hf_nds_iteration,
7140         { "Iteration Handle", "ncp.nds_iteration", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7141         
7142     { &hf_nds_file_handle,
7143         { "File Handle", "ncp.nds_file_handle", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7144         
7145     { &hf_nds_file_size,
7146         { "File Size", "ncp.nds_file_size", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7147         
7148         { &hf_nds_eid,
7149         { "NDS EID", "ncp.nds_eid", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7150         
7151     { &hf_nds_depth,
7152         { "Distance object is from Root", "ncp.nds_depth", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7153         
7154         { &hf_nds_info_type,
7155         { "Info Type", "ncp.nds_info_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7156         
7157     { &hf_nds_class_def_type,
7158         { "Class Definition Type", "ncp.nds_class_def_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7159         
7160         { &hf_nds_all_attr,
7161         { "All Attributes", "ncp.nds_all_attr", FT_UINT32, BASE_DEC, NULL, 0x0, "Return all Attributes?", HFILL }},
7162         
7163     { &hf_nds_return_all_classes,
7164         { "All Classes", "ncp.nds_return_all_classes", FT_STRING, BASE_NONE, NULL, 0x0, "Return all Classes?", HFILL }},
7165         
7166         { &hf_nds_req_flags,                                       
7167         { "Request Flags", "ncp.nds_req_flags", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7168         
7169         { &hf_nds_attr,
7170         { "Attributes", "ncp.nds_attributes", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7171         
7172     { &hf_nds_classes,
7173         { "Classes", "ncp.nds_classes", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7174
7175         { &hf_nds_crc,
7176         { "CRC", "ncp.nds_crc", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7177         
7178         { &hf_nds_referrals,
7179         { "Referrals", "ncp.nds_referrals", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7180         
7181         { &hf_nds_result_flags,
7182         { "Result Flags", "ncp.nds_result_flags", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7183         
7184     { &hf_nds_stream_flags,
7185         { "Streams Flags", "ncp.nds_stream_flags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7186         
7187         { &hf_nds_tag_string,
7188         { "Tags", "ncp.nds_tags", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7189
7190         { &hf_value_bytes,
7191         { "Bytes", "ncp.value_bytes", FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL }},
7192
7193         { &hf_replica_type,
7194         { "Replica Type", "ncp.rtype", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7195
7196         { &hf_replica_state,
7197         { "Replica State", "ncp.rstate", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7198         
7199     { &hf_nds_rnum,
7200         { "Replica Number", "ncp.rnum", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7201
7202         { &hf_nds_revent,
7203         { "Event", "ncp.revent", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7204
7205         { &hf_replica_number,
7206         { "Replica Number", "ncp.rnum", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7207  
7208         { &hf_min_nds_ver,
7209         { "Minimum NDS Version", "ncp.min_nds_version", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7210
7211         { &hf_nds_ver_include,
7212         { "Include NDS Version", "ncp.inc_nds_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7213  
7214         { &hf_nds_ver_exclude,
7215         { "Exclude NDS Version", "ncp.exc_nds_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7216
7217         { &hf_nds_es,
7218         { "Input Entry Specifier", "ncp.nds_es", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7219         
7220         { &hf_es_type,
7221         { "Entry Specifier Type", "ncp.nds_es_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7222
7223         { &hf_rdn_string,
7224         { "RDN", "ncp.nds_rdn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7225
7226         { &hf_delim_string,
7227         { "Delimeter", "ncp.nds_delim", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7228                                  
7229     { &hf_nds_dn_output_type,
7230         { "Output Entry Specifier Type", "ncp.nds_out_es_type", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7231     
7232     { &hf_nds_nested_output_type,
7233         { "Nested Output Entry Specifier Type", "ncp.nds_nested_out_es", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7234     
7235     { &hf_nds_output_delimiter,
7236         { "Output Delimiter", "ncp.nds_out_delimiter", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7237     
7238     { &hf_nds_output_entry_specifier,
7239         { "Output Entry Specifier", "ncp.nds_out_es", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7240     
7241     { &hf_es_value,
7242         { "Entry Specifier Value", "ncp.nds_es_value", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7243
7244     { &hf_es_rdn_count,
7245         { "RDN Count", "ncp.nds_es_rdn_count", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7246     
7247     { &hf_nds_replica_num,
7248         { "Replica Number", "ncp.nds_replica_num", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7249     
7250     { &hf_es_seconds,
7251         { "Seconds", "ncp.nds_es_seconds", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7252
7253     { &hf_nds_event_num,
7254         { "Event Number", "ncp.nds_event_num", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7255
7256     { &hf_nds_compare_results,
7257         { "Compare Results", "ncp.nds_compare_results", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7258     
7259     { &hf_nds_parent,
7260         { "Parent ID", "ncp.nds_parent", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7261
7262     { &hf_nds_name_filter,
7263         { "Name Filter", "ncp.nds_name_filter", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7264
7265     { &hf_nds_class_filter,
7266         { "Class Filter", "ncp.nds_class_filter", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7267
7268     { &hf_nds_time_filter,
7269         { "Time Filter", "ncp.nds_time_filter", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7270
7271     { &hf_nds_partition_root_id,
7272         { "Partition Root ID", "ncp.nds_partition_root_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7273
7274     { &hf_nds_replicas,
7275         { "Replicas", "ncp.nds_replicas", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7276
7277     { &hf_nds_purge,
7278         { "Purge Time", "ncp.nds_purge", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7279
7280     { &hf_nds_local_partition,
7281         { "Local Partition ID", "ncp.nds_local_partition", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7282
7283     { &hf_partition_busy, 
7284     { "Partition Busy", "ncp.nds_partition_busy", FT_BOOLEAN, 16, NULL, 0x0, "", HFILL }},
7285
7286     { &hf_nds_number_of_changes,
7287         { "Number of Attribute Changes", "ncp.nds_number_of_changes", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7288     
7289     { &hf_sub_count,
7290         { "Subordinate Count", "ncp.sub_count", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7291     
7292     { &hf_nds_revision,
7293         { "Revision Count", "ncp.nds_rev_count", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7294     
7295     { &hf_nds_base_class,
7296         { "Base Class", "ncp.nds_base_class", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7297     
7298     { &hf_nds_relative_dn,
7299         { "Relative Distinguished Name", "ncp.nds_relative_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7300     
7301     { &hf_nds_root_dn,
7302         { "Root Distinguished Name", "ncp.nds_root_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7303     
7304     { &hf_nds_parent_dn,
7305         { "Parent Distinguished Name", "ncp.nds_parent_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7306     
7307     { &hf_deref_base, 
7308     { "Dereference Base Class", "ncp.nds_deref_base", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7309     
7310     { &hf_nds_base, 
7311     { "Base Class", "ncp.nds_base", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7312     
7313     { &hf_nds_super, 
7314     { "Super Class", "ncp.nds_super", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7315     
7316     { &hf_nds_entry_info, 
7317     { "Entry Information", "ncp.nds_entry_info", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7318     
7319     { &hf_nds_privileges, 
7320     { "Privileges", "ncp.nds_privileges", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7321     
7322     { &hf_nds_vflags, 
7323     { "Value Flags", "ncp.nds_vflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7324     
7325     { &hf_nds_value_len, 
7326     { "Value Length", "ncp.nds_vlength", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7327     
7328     { &hf_nds_cflags, 
7329     { "Class Flags", "ncp.nds_cflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7330         
7331     { &hf_nds_asn1,
7332         { "ASN.1 ID", "ncp.nds_asn1", FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL }},
7333
7334     { &hf_nds_acflags, 
7335     { "Attribute Constraint Flags", "ncp.nds_acflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7336     
7337     { &hf_nds_upper, 
7338     { "Upper Limit Value", "ncp.nds_upper", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7339     
7340     { &hf_nds_lower, 
7341     { "Lower Limit Value", "ncp.nds_lower", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7342     
7343     { &hf_nds_trustee_dn,
7344         { "Trustee Distinguished Name", "ncp.nds_trustee_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7345     
7346     { &hf_nds_attribute_dn,
7347         { "Attribute Name", "ncp.nds_attribute_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7348     
7349     { &hf_nds_acl_add,
7350         { "Access Control Lists to Add", "ncp.nds_acl_add", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7351     
7352     { &hf_nds_acl_del,
7353         { "Access Control Lists to Delete", "ncp.nds_acl_del", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7354     
7355     { &hf_nds_att_add,
7356         { "Attribute to Add", "ncp.nds_att_add", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7357     
7358     { &hf_nds_att_del,
7359         { "Attribute to Delete", "ncp.nds_att_del", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7360     
7361     { &hf_nds_keep, 
7362     { "Delete Original RDN", "ncp.nds_keep", FT_BOOLEAN, 32, NULL, 0x0, "", HFILL }},
7363     
7364     { &hf_nds_new_rdn,
7365         { "New Relative Distinguished Name", "ncp.nds_new_rdn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7366     
7367     { &hf_nds_time_delay,
7368         { "Time Delay", "ncp.nds_time_delay", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7369     
7370     { &hf_nds_root_name,
7371         { "Root Most Object Name", "ncp.nds_root_name", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7372     
7373     { &hf_nds_new_part_id,
7374         { "New Partition Root ID", "ncp.nds_new_part_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7375     
7376     { &hf_nds_child_part_id,
7377         { "Child Partition Root ID", "ncp.nds_child_part_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7378     
7379     { &hf_nds_master_part_id,
7380         { "Master Partition Root ID", "ncp.nds_master_part_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7381     
7382     { &hf_nds_target_name,
7383         { "Target Server Name", "ncp.nds_target_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7384
7385
7386         { &hf_bit1pingflags1, 
7387         { "Supported Fields", "ncp.bit1pingflags1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7388
7389         { &hf_bit2pingflags1, 
7390         { "Depth", "ncp.bit2pingflags1", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7391                      
7392         { &hf_bit3pingflags1, 
7393         { "Revision", "ncp.bit3pingflags1", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7394         
7395         { &hf_bit4pingflags1, 
7396         { "Flags", "ncp.bit4pingflags1", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7397         
7398         { &hf_bit5pingflags1, 
7399         { "Verification Flags", "ncp.bit5pingflags1", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7400         
7401         { &hf_bit6pingflags1, 
7402         { "Letter Version", "ncp.bit6pingflags1", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7403         
7404         { &hf_bit7pingflags1, 
7405         { "OS Version", "ncp.bit7pingflags1", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7406         
7407         { &hf_bit8pingflags1, 
7408         { "License Flags", "ncp.bit8pingflags1", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7409         
7410         { &hf_bit9pingflags1, 
7411         { "DS Time", "ncp.bit9pingflags1", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7412         
7413         { &hf_bit10pingflags1, 
7414         { "Not Defined", "ncp.bit10pingflags1", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7415         
7416         { &hf_bit11pingflags1, 
7417         { "Not Defined", "ncp.bit11pingflags1", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7418         
7419         { &hf_bit12pingflags1, 
7420         { "Not Defined", "ncp.bit12pingflags1", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7421         
7422         { &hf_bit13pingflags1, 
7423         { "Not Defined", "ncp.bit13pingflags1", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7424         
7425         { &hf_bit14pingflags1, 
7426         { "Not Defined", "ncp.bit14pingflags1", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7427         
7428         { &hf_bit15pingflags1, 
7429         { "Not Defined", "ncp.bit15pingflags1", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7430         
7431         { &hf_bit16pingflags1, 
7432         { "Not Defined", "ncp.bit16pingflags1", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7433
7434         { &hf_bit1pingflags2, 
7435         { "Sap Name", "ncp.bit1pingflags2", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7436
7437         { &hf_bit2pingflags2, 
7438         { "Tree Name", "ncp.bit2pingflags2", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7439                      
7440         { &hf_bit3pingflags2, 
7441         { "OS Name", "ncp.bit3pingflags2", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7442         
7443         { &hf_bit4pingflags2, 
7444         { "Hardware Name", "ncp.bit4pingflags2", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7445         
7446         { &hf_bit5pingflags2, 
7447         { "Vendor Name", "ncp.bit5pingflags2", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7448         
7449         { &hf_bit6pingflags2, 
7450         { "Not Defined", "ncp.bit6pingflags2", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7451         
7452         { &hf_bit7pingflags2, 
7453         { "Not Defined", "ncp.bit7pingflags2", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7454         
7455         { &hf_bit8pingflags2, 
7456         { "Not Defined", "ncp.bit8pingflags2", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7457         
7458         { &hf_bit9pingflags2, 
7459         { "Not Defined", "ncp.bit9pingflags2", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7460         
7461         { &hf_bit10pingflags2, 
7462         { "Not Defined", "ncp.bit10pingflags2", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7463         
7464         { &hf_bit11pingflags2, 
7465         { "Not Defined", "ncp.bit11pingflags2", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7466         
7467         { &hf_bit12pingflags2, 
7468         { "Not Defined", "ncp.bit12pingflags2", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7469         
7470         { &hf_bit13pingflags2, 
7471         { "Not Defined", "ncp.bit13pingflags2", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7472         
7473         { &hf_bit14pingflags2, 
7474         { "Not Defined", "ncp.bit14pingflags2", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7475         
7476         { &hf_bit15pingflags2, 
7477         { "Not Defined", "ncp.bit15pingflags2", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7478         
7479         { &hf_bit16pingflags2, 
7480         { "Not Defined", "ncp.bit16pingflags2", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7481      
7482         { &hf_bit1pingpflags1, 
7483         { "Root Most Master Replica", "ncp.bit1pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7484
7485         { &hf_bit2pingpflags1, 
7486         { "Time Synchronized", "ncp.bit2pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7487                      
7488         { &hf_bit3pingpflags1, 
7489         { "Not Defined", "ncp.bit3pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7490         
7491         { &hf_bit4pingpflags1, 
7492         { "Not Defined", "ncp.bit4pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7493         
7494         { &hf_bit5pingpflags1, 
7495         { "Not Defined", "ncp.bit5pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7496         
7497         { &hf_bit6pingpflags1, 
7498         { "Not Defined", "ncp.bit6pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7499         
7500         { &hf_bit7pingpflags1, 
7501         { "Not Defined", "ncp.bit7pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7502         
7503         { &hf_bit8pingpflags1, 
7504         { "Not Defined", "ncp.bit8pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7505         
7506         { &hf_bit9pingpflags1, 
7507         { "Not Defined", "ncp.bit9pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7508         
7509         { &hf_bit10pingpflags1, 
7510         { "Not Defined", "ncp.bit10pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7511         
7512         { &hf_bit11pingpflags1, 
7513         { "Not Defined", "ncp.bit11pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7514         
7515         { &hf_bit12pingpflags1, 
7516         { "Not Defined", "ncp.bit12pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7517         
7518         { &hf_bit13pingpflags1, 
7519         { "Not Defined", "ncp.bit13pingpflags1", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7520         
7521         { &hf_bit14pingpflags1, 
7522         { "Not Defined", "ncp.bit14pingpflags1", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7523         
7524         { &hf_bit15pingpflags1, 
7525         { "Not Defined", "ncp.bit15pingpflags1", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7526         
7527         { &hf_bit16pingpflags1, 
7528         { "Not Defined", "ncp.bit16pingpflags1", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7529     
7530         { &hf_bit1pingvflags1, 
7531         { "Checksum", "ncp.bit1pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7532
7533         { &hf_bit2pingvflags1, 
7534         { "CRC32", "ncp.bit2pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7535                      
7536         { &hf_bit3pingvflags1, 
7537         { "Not Defined", "ncp.bit3pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7538         
7539         { &hf_bit4pingvflags1, 
7540         { "Not Defined", "ncp.bit4pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7541         
7542         { &hf_bit5pingvflags1, 
7543         { "Not Defined", "ncp.bit5pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7544         
7545         { &hf_bit6pingvflags1, 
7546         { "Not Defined", "ncp.bit6pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7547         
7548         { &hf_bit7pingvflags1, 
7549         { "Not Defined", "ncp.bit7pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7550         
7551         { &hf_bit8pingvflags1, 
7552         { "Not Defined", "ncp.bit8pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7553         
7554         { &hf_bit9pingvflags1, 
7555         { "Not Defined", "ncp.bit9pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7556         
7557         { &hf_bit10pingvflags1, 
7558         { "Not Defined", "ncp.bit10pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7559         
7560         { &hf_bit11pingvflags1, 
7561         { "Not Defined", "ncp.bit11pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7562         
7563         { &hf_bit12pingvflags1, 
7564         { "Not Defined", "ncp.bit12pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7565         
7566         { &hf_bit13pingvflags1, 
7567         { "Not Defined", "ncp.bit13pingvflags1", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7568         
7569         { &hf_bit14pingvflags1, 
7570         { "Not Defined", "ncp.bit14pingvflags1", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7571         
7572         { &hf_bit15pingvflags1, 
7573         { "Not Defined", "ncp.bit15pingvflags1", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7574         
7575         { &hf_bit16pingvflags1, 
7576         { "Not Defined", "ncp.bit16pingvflags1", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7577
7578     { &hf_nds_letter_ver,
7579         { "Letter Version", "ncp.nds_letter_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7580     
7581     { &hf_nds_os_ver,
7582         { "OS Version", "ncp.nds_os_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7583     
7584     { &hf_nds_lic_flags,
7585         { "License Flags", "ncp.nds_lic_flags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7586     
7587     { &hf_nds_ds_time,
7588         { "DS Time", "ncp.nds_ds_time", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7589     
7590     { &hf_nds_ping_version,
7591         { "Ping Version", "ncp.nds_ping_version", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7592
7593
7594   
7595  """                
7596         # Print the registration code for the hf variables
7597         for var in sorted_vars:
7598                 print "\t{ &%s," % (var.HFName())
7599                 print "\t{ \"%s\", \"%s\", %s, %s, %s, 0x%x, \"\", HFILL }},\n" % \
7600                         (var.Description(), var.DFilter(),
7601                         var.EtherealFType(), var.Display(), var.ValuesName(),
7602                         var.Mask())
7603
7604         print "\t};\n"
7605  
7606         if ett_list:
7607                 print "\tstatic gint *ett[] = {"
7608
7609                 for ett in ett_list:
7610                         print "\t\t&%s," % (ett,)
7611
7612                 print "\t};\n"
7613                        
7614         print """
7615         proto_register_field_array(proto_ncp, hf, array_length(hf));
7616         """
7617
7618         if ett_list:
7619                 print """
7620         proto_register_subtree_array(ett, array_length(ett));
7621                 """
7622
7623         print """
7624         register_init_routine(&ncp_init_protocol);
7625         register_postseq_cleanup_routine(&ncp_postseq_cleanup);
7626         register_final_registration_routine(final_registration_ncp2222);
7627         """
7628
7629         
7630         # End of proto_register_ncp2222()
7631         print "}"
7632         print ""
7633         print '#include "packet-ncp2222.inc"'
7634
7635 def usage():
7636         print "Usage: ncp2222.py -o output_file"
7637         sys.exit(1)
7638
7639 def main():
7640         global compcode_lists
7641         global ptvc_lists
7642         global msg
7643
7644         optstring = "o:"
7645         out_filename = None
7646
7647         try:
7648                 opts, args = getopt.getopt(sys.argv[1:], optstring)
7649         except getopt.error:
7650                 usage()
7651
7652         for opt, arg in opts:
7653                 if opt == "-o":
7654                         out_filename = arg
7655                 else:
7656                         usage()
7657
7658         if len(args) != 0:
7659                 usage()
7660
7661         if not out_filename:
7662                 usage()
7663
7664         # Create the output file
7665         try:
7666                 out_file = open(out_filename, "w")
7667         except IOError, err:
7668                 sys.exit("Could not open %s for writing: %s" % (out_filename,
7669                         err))
7670
7671         # Set msg to current stdout
7672         msg = sys.stdout
7673
7674         # Set stdout to the output file
7675         sys.stdout = out_file
7676
7677         msg.write("Processing NCP definitions...\n")
7678         # Run the code, and if we catch any exception,
7679         # erase the output file.
7680         try:
7681                 compcode_lists  = UniqueCollection('Completion Code Lists')
7682                 ptvc_lists      = UniqueCollection('PTVC Lists')
7683
7684                 define_errors()
7685                 define_groups()         
7686                 
7687                 define_ncp2222()
7688
7689                 msg.write("Defined %d NCP types.\n" % (len(packets),))
7690                 produce_code()
7691         except:
7692                 traceback.print_exc(20, msg)
7693                 try:
7694                         out_file.close()
7695                 except IOError, err:
7696                         msg.write("Could not close %s: %s\n" % (out_filename, err))
7697
7698                 try:
7699                         if os.path.exists(out_filename):
7700                                 os.remove(out_filename)
7701                 except OSError, err:
7702                         msg.write("Could not remove %s: %s\n" % (out_filename, err))
7703
7704                 sys.exit(1)
7705
7706
7707
7708 def define_ncp2222():
7709         ##############################################################################
7710         # NCP Packets. Here I list functions and subfunctions in hexadecimal like the
7711         # NCP book (and I believe LanAlyzer does this too).
7712         # However, Novell lists these in decimal in their on-line documentation.
7713         ##############################################################################
7714         # 2222/01
7715         pkt = NCP(0x01, "File Set Lock", 'file')
7716         pkt.Request(7)
7717         pkt.Reply(8)
7718         pkt.CompletionCodes([0x0000])
7719         # 2222/02
7720         pkt = NCP(0x02, "File Release Lock", 'file')
7721         pkt.Request(7)
7722         pkt.Reply(8)
7723         pkt.CompletionCodes([0x0000, 0xff00])
7724         # 2222/03
7725         pkt = NCP(0x03, "Log File Exclusive", 'file')
7726         pkt.Request( (12, 267), [
7727                 rec( 7, 1, DirHandle ),
7728                 rec( 8, 1, LockFlag ),
7729                 rec( 9, 2, TimeoutLimit, BE ),
7730                 rec( 11, (1, 256), FilePath ),
7731         ])
7732         pkt.Reply(8)
7733         pkt.CompletionCodes([0x0000, 0x8200, 0x9600, 0xfe0d, 0xff01])
7734         # 2222/04
7735         pkt = NCP(0x04, "Lock File Set", 'file')
7736         pkt.Request( 9, [
7737                 rec( 7, 2, TimeoutLimit ),
7738         ])
7739         pkt.Reply(8)
7740         pkt.CompletionCodes([0x0000, 0xfe0d, 0xff01])
7741         ## 2222/05
7742         pkt = NCP(0x05, "Release File", 'file')
7743         pkt.Request( (9, 264), [
7744                 rec( 7, 1, DirHandle ),
7745                 rec( 8, (1, 256), FilePath ),
7746         ])
7747         pkt.Reply(8)
7748         pkt.CompletionCodes([0x0000, 0x9b00, 0x9c03, 0xff1a])
7749         # 2222/06
7750         pkt = NCP(0x06, "Release File Set", 'file')
7751         pkt.Request( 8, [
7752                 rec( 7, 1, LockFlag ),
7753         ])
7754         pkt.Reply(8)
7755         pkt.CompletionCodes([0x0000])
7756         # 2222/07
7757         pkt = NCP(0x07, "Clear File", 'file')
7758         pkt.Request( (9, 264), [
7759                 rec( 7, 1, DirHandle ),
7760                 rec( 8, (1, 256), FilePath ),
7761         ])
7762         pkt.Reply(8)
7763         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03,
7764                 0xa100, 0xfd00, 0xff1a])
7765         # 2222/08
7766         pkt = NCP(0x08, "Clear File Set", 'file')
7767         pkt.Request( 8, [
7768                 rec( 7, 1, LockFlag ),
7769         ])
7770         pkt.Reply(8)
7771         pkt.CompletionCodes([0x0000])
7772         # 2222/09
7773         pkt = NCP(0x09, "Log Logical Record", 'file')
7774         pkt.Request( (11, 138), [
7775                 rec( 7, 1, LockFlag ),
7776                 rec( 8, 2, TimeoutLimit, BE ),
7777                 rec( 10, (1, 128), LogicalRecordName ),
7778         ], info_str=(LogicalRecordName, "Log Logical Record: %s", ", %s"))
7779         pkt.Reply(8)
7780         pkt.CompletionCodes([0x0000, 0x9600, 0xfe0d, 0xff1a])
7781         # 2222/0A, 10
7782         pkt = NCP(0x0A, "Lock Logical Record Set", 'file')
7783         pkt.Request( 10, [
7784                 rec( 7, 1, LockFlag ),
7785                 rec( 8, 2, TimeoutLimit ),
7786         ])
7787         pkt.Reply(8)
7788         pkt.CompletionCodes([0x0000, 0xfe0d, 0xff1a])
7789         # 2222/0B, 11
7790         pkt = NCP(0x0B, "Clear Logical Record", 'file')
7791         pkt.Request( (8, 135), [
7792                 rec( 7, (1, 128), LogicalRecordName ),
7793         ], info_str=(LogicalRecordName, "Clear Logical Record: %s", ", %s"))
7794         pkt.Reply(8)
7795         pkt.CompletionCodes([0x0000, 0xff1a])
7796         # 2222/0C, 12
7797         pkt = NCP(0x0C, "Release Logical Record", 'file')
7798         pkt.Request( (8, 135), [
7799                 rec( 7, (1, 128), LogicalRecordName ),
7800         ], info_str=(LogicalRecordName, "Release Logical Record: %s", ", %s"))
7801         pkt.Reply(8)
7802         pkt.CompletionCodes([0x0000, 0xff1a])
7803         # 2222/0D, 13
7804         pkt = NCP(0x0D, "Release Logical Record Set", 'file')
7805         pkt.Request( 8, [
7806                 rec( 7, 1, LockFlag ),
7807         ])
7808         pkt.Reply(8)
7809         pkt.CompletionCodes([0x0000])
7810         # 2222/0E, 14
7811         pkt = NCP(0x0E, "Clear Logical Record Set", 'file')
7812         pkt.Request( 8, [
7813                 rec( 7, 1, LockFlag ),
7814         ])
7815         pkt.Reply(8)
7816         pkt.CompletionCodes([0x0000])
7817         # 2222/1100, 17/00
7818         pkt = NCP(0x1100, "Write to Spool File", 'qms')
7819         pkt.Request( (11, 16), [
7820                 rec( 10, ( 1, 6 ), Data ),
7821         ], info_str=(Data, "Write to Spool File: %s", ", %s"))
7822         pkt.Reply(8)
7823         pkt.CompletionCodes([0x0000, 0x0104, 0x8000, 0x8101, 0x8701, 0x8800,
7824                              0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9400, 0x9500,
7825                              0x9600, 0x9804, 0x9900, 0xa100, 0xa201, 0xff19])
7826         # 2222/1101, 17/01
7827         pkt = NCP(0x1101, "Close Spool File", 'qms')
7828         pkt.Request( 11, [
7829                 rec( 10, 1, AbortQueueFlag ),
7830         ])
7831         pkt.Reply(8)      
7832         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8701, 0x8800, 0x8d00,
7833                              0x8e00, 0x8f00, 0x9001, 0x9300, 0x9400, 0x9500,
7834                              0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03, 0x9d00,
7835                              0xa100, 0xd000, 0xd100, 0xd202, 0xd300, 0xd400,
7836                              0xda01, 0xe800, 0xea00, 0xeb00, 0xec00, 0xfc06,
7837                              0xfd00, 0xfe07, 0xff06])
7838         # 2222/1102, 17/02
7839         pkt = NCP(0x1102, "Set Spool File Flags", 'qms')
7840         pkt.Request( 30, [
7841                 rec( 10, 1, PrintFlags ),
7842                 rec( 11, 1, TabSize ),
7843                 rec( 12, 1, TargetPrinter ),
7844                 rec( 13, 1, Copies ),
7845                 rec( 14, 1, FormType ),
7846                 rec( 15, 1, Reserved ),
7847                 rec( 16, 14, BannerName ),
7848         ])
7849         pkt.Reply(8)
7850         pkt.CompletionCodes([0x0000, 0x9600, 0xd202, 0xd300, 0xe800, 0xea00,
7851                              0xeb00, 0xec00, 0xfc06, 0xfe07, 0xff06])
7852
7853         # 2222/1103, 17/03
7854         pkt = NCP(0x1103, "Spool A Disk File", 'qms')
7855         pkt.Request( (12, 23), [
7856                 rec( 10, 1, DirHandle ),
7857                 rec( 11, (1, 12), Data ),
7858         ], info_str=(Data, "Spool a Disk File: %s", ", %s"))
7859         pkt.Reply(8)
7860         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8701, 0x8800, 0x8d00,
7861                              0x8e00, 0x8f00, 0x9001, 0x9300, 0x9400, 0x9500,
7862                              0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03, 0x9d00,
7863                              0xa100, 0xd000, 0xd100, 0xd202, 0xd300, 0xd400,
7864                              0xda01, 0xe800, 0xea00, 0xeb00, 0xec00, 0xfc06,
7865                              0xfd00, 0xfe07, 0xff06])
7866
7867         # 2222/1106, 17/06
7868         pkt = NCP(0x1106, "Get Printer Status", 'qms')
7869         pkt.Request( 11, [
7870                 rec( 10, 1, TargetPrinter ),
7871         ])
7872         pkt.Reply(12, [
7873                 rec( 8, 1, PrinterHalted ),
7874                 rec( 9, 1, PrinterOffLine ),
7875                 rec( 10, 1, CurrentFormType ),
7876                 rec( 11, 1, RedirectedPrinter ),
7877         ])
7878         pkt.CompletionCodes([0x0000, 0x9600, 0xfb05, 0xfd00, 0xff06])
7879
7880         # 2222/1109, 17/09
7881         pkt = NCP(0x1109, "Create Spool File", 'qms')
7882         pkt.Request( (12, 23), [
7883                 rec( 10, 1, DirHandle ),
7884                 rec( 11, (1, 12), Data ),
7885         ], info_str=(Data, "Create Spool File: %s", ", %s"))
7886         pkt.Reply(8)
7887         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8400, 0x8701, 0x8d00,
7888                              0x8f00, 0x9001, 0x9400, 0x9600, 0x9804, 0x9900,
7889                              0x9b03, 0x9c03, 0xa100, 0xd000, 0xd100, 0xd202,
7890                              0xd300, 0xd400, 0xda01, 0xe800, 0xea00, 0xeb00,
7891                              0xec00, 0xfc06, 0xfd00, 0xfe07, 0xff06])
7892
7893         # 2222/110A, 17/10
7894         pkt = NCP(0x110A, "Get Printer's Queue", 'qms')
7895         pkt.Request( 11, [
7896                 rec( 10, 1, TargetPrinter ),
7897         ])
7898         pkt.Reply( 12, [
7899                 rec( 8, 4, ObjectID, BE ),
7900         ])
7901         pkt.CompletionCodes([0x0000, 0x9600, 0xff06])
7902
7903         # 2222/12, 18
7904         pkt = NCP(0x12, "Get Volume Info with Number", 'file')
7905         pkt.Request( 8, [
7906                 rec( 7, 1, VolumeNumber )
7907         ],info_str=(VolumeNumber, "Get Volume Information for Volume %d", ", %d"))
7908         pkt.Reply( 36, [
7909                 rec( 8, 2, SectorsPerCluster, BE ),
7910                 rec( 10, 2, TotalVolumeClusters, BE ),
7911                 rec( 12, 2, AvailableClusters, BE ),
7912                 rec( 14, 2, TotalDirectorySlots, BE ),
7913                 rec( 16, 2, AvailableDirectorySlots, BE ),
7914                 rec( 18, 16, VolumeName ),
7915                 rec( 34, 2, RemovableFlag, BE ),
7916         ])
7917         pkt.CompletionCodes([0x0000, 0x9804])
7918
7919         # 2222/13, 19
7920         pkt = NCP(0x13, "Get Station Number", 'connection')
7921         pkt.Request(7)
7922         pkt.Reply(11, [
7923                 rec( 8, 3, StationNumber )
7924         ])
7925         pkt.CompletionCodes([0x0000, 0xff00])
7926
7927         # 2222/14, 20
7928         pkt = NCP(0x14, "Get File Server Date And Time", 'fileserver')
7929         pkt.Request(7)
7930         pkt.Reply(15, [
7931                 rec( 8, 1, Year ),
7932                 rec( 9, 1, Month ),
7933                 rec( 10, 1, Day ),
7934                 rec( 11, 1, Hour ),
7935                 rec( 12, 1, Minute ),
7936                 rec( 13, 1, Second ),
7937                 rec( 14, 1, DayOfWeek ),
7938         ])
7939         pkt.CompletionCodes([0x0000])
7940
7941         # 2222/1500, 21/00
7942         pkt = NCP(0x1500, "Send Broadcast Message", 'message')
7943         pkt.Request((13, 70), [
7944                 rec( 10, 1, ClientListLen, var="x" ),
7945                 rec( 11, 1, TargetClientList, repeat="x" ),
7946                 rec( 12, (1, 58), TargetMessage ),
7947         ], info_str=(TargetMessage, "Send Broadcast Message: %s", ", %s"))
7948         pkt.Reply(10, [
7949                 rec( 8, 1, ClientListLen, var="x" ),
7950                 rec( 9, 1, SendStatus, repeat="x" )
7951         ])
7952         pkt.CompletionCodes([0x0000, 0xfd00])
7953
7954         # 2222/1501, 21/01
7955         pkt = NCP(0x1501, "Get Broadcast Message", 'message')
7956         pkt.Request(10)
7957         pkt.Reply((9,66), [
7958                 rec( 8, (1, 58), TargetMessage )
7959         ])
7960         pkt.CompletionCodes([0x0000, 0xfd00])
7961
7962         # 2222/1502, 21/02
7963         pkt = NCP(0x1502, "Disable Broadcasts", 'message')
7964         pkt.Request(10)
7965         pkt.Reply(8)
7966         pkt.CompletionCodes([0x0000])
7967
7968         # 2222/1503, 21/03
7969         pkt = NCP(0x1503, "Enable Broadcasts", 'message')
7970         pkt.Request(10)
7971         pkt.Reply(8)
7972         pkt.CompletionCodes([0x0000])
7973
7974         # 2222/1509, 21/09
7975         pkt = NCP(0x1509, "Broadcast To Console", 'message')
7976         pkt.Request((11, 68), [
7977                 rec( 10, (1, 58), TargetMessage )
7978         ], info_str=(TargetMessage, "Broadcast to Console: %s", ", %s"))
7979         pkt.Reply(8)
7980         pkt.CompletionCodes([0x0000])
7981         # 2222/150A, 21/10
7982         pkt = NCP(0x150A, "Send Broadcast Message", 'message')
7983         pkt.Request((17, 74), [
7984                 rec( 10, 2, ClientListCount, LE, var="x" ),
7985                 rec( 12, 4, ClientList, LE, repeat="x" ),
7986                 rec( 16, (1, 58), TargetMessage ),
7987         ], info_str=(TargetMessage, "Send Broadcast Message: %s", ", %s"))
7988         pkt.Reply(14, [
7989                 rec( 8, 2, ClientListCount, LE, var="x" ),
7990                 rec( 10, 4, ClientCompFlag, LE, repeat="x" ),
7991         ])
7992         pkt.CompletionCodes([0x0000, 0xfd00])
7993
7994         # 2222/150B, 21/11
7995         pkt = NCP(0x150B, "Get Broadcast Message", 'message')
7996         pkt.Request(10)
7997         pkt.Reply((9,66), [
7998                 rec( 8, (1, 58), TargetMessage )
7999         ])
8000         pkt.CompletionCodes([0x0000, 0xfd00])
8001
8002         # 2222/150C, 21/12
8003         pkt = NCP(0x150C, "Connection Message Control", 'message')
8004         pkt.Request(22, [
8005                 rec( 10, 1, ConnectionControlBits ),
8006                 rec( 11, 3, Reserved3 ),
8007                 rec( 14, 4, ConnectionListCount, LE, var="x" ),
8008                 rec( 18, 4, ConnectionList, LE, repeat="x" ),
8009         ])
8010         pkt.Reply(8)
8011         pkt.CompletionCodes([0x0000, 0xff00])
8012
8013         # 2222/1600, 22/0
8014         pkt = NCP(0x1600, "Set Directory Handle", 'fileserver')
8015         pkt.Request((13,267), [
8016                 rec( 10, 1, TargetDirHandle ),
8017                 rec( 11, 1, DirHandle ),
8018                 rec( 12, (1, 255), Path ),
8019         ], info_str=(Path, "Set Directory Handle to: %s", ", %s"))
8020         pkt.Reply(8)
8021         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8022                              0xfd00, 0xff00])
8023
8024
8025         # 2222/1601, 22/1
8026         pkt = NCP(0x1601, "Get Directory Path", 'fileserver')
8027         pkt.Request(11, [
8028                 rec( 10, 1, DirHandle ),
8029         ],info_str=(DirHandle, "Get Directory Path for Directory Handle %d", ", %d"))
8030         pkt.Reply((9,263), [
8031                 rec( 8, (1,255), Path ),
8032         ])
8033         pkt.CompletionCodes([0x0000, 0x9600, 0x9b00, 0x9c00, 0xa100])
8034
8035         # 2222/1602, 22/2
8036         pkt = NCP(0x1602, "Scan Directory Information", 'fileserver')
8037         pkt.Request((14,268), [
8038                 rec( 10, 1, DirHandle ),
8039                 rec( 11, 2, StartingSearchNumber, BE ),
8040                 rec( 13, (1, 255), Path ),
8041         ], info_str=(Path, "Scan Directory Information: %s", ", %s"))
8042         pkt.Reply(36, [
8043                 rec( 8, 16, DirectoryPath ),
8044                 rec( 24, 2, CreationDate, BE ),
8045                 rec( 26, 2, CreationTime, BE ),
8046                 rec( 28, 4, CreatorID, BE ),
8047                 rec( 32, 1, AccessRightsMask ),
8048                 rec( 33, 1, Reserved ),
8049                 rec( 34, 2, NextSearchNumber, BE ),
8050         ])
8051         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8052                              0xfd00, 0xff00])
8053
8054         # 2222/1603, 22/3
8055         pkt = NCP(0x1603, "Get Effective Directory Rights", 'fileserver')
8056         pkt.Request((14,268), [
8057                 rec( 10, 1, DirHandle ),
8058                 rec( 11, 2, StartingSearchNumber ),
8059                 rec( 13, (1, 255), Path ),
8060         ], info_str=(Path, "Get Effective Directory Rights: %s", ", %s"))
8061         pkt.Reply(9, [
8062                 rec( 8, 1, AccessRightsMask ),
8063         ])
8064         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8065                              0xfd00, 0xff00])
8066
8067         # 2222/1604, 22/4
8068         pkt = NCP(0x1604, "Modify Maximum Rights Mask", 'fileserver')
8069         pkt.Request((14,268), [
8070                 rec( 10, 1, DirHandle ),
8071                 rec( 11, 1, RightsGrantMask ),
8072                 rec( 12, 1, RightsRevokeMask ),
8073                 rec( 13, (1, 255), Path ),
8074         ], info_str=(Path, "Modify Maximum Rights Mask: %s", ", %s"))
8075         pkt.Reply(8)
8076         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8077                              0xfd00, 0xff00])
8078
8079         # 2222/1605, 22/5
8080         pkt = NCP(0x1605, "Get Volume Number", 'fileserver')
8081         pkt.Request((11, 265), [
8082                 rec( 10, (1,255), VolumeNameLen ),
8083         ], info_str=(VolumeNameLen, "Get Volume Number for: %s", ", %s"))
8084         pkt.Reply(9, [
8085                 rec( 8, 1, VolumeNumber ),
8086         ])
8087         pkt.CompletionCodes([0x0000, 0x9600, 0x9804])
8088
8089         # 2222/1606, 22/6
8090         pkt = NCP(0x1606, "Get Volume Name", 'fileserver')
8091         pkt.Request(11, [
8092                 rec( 10, 1, VolumeNumber ),
8093         ],info_str=(VolumeNumber, "Get Name for Volume %d", ", %d"))
8094         pkt.Reply((9, 263), [
8095                 rec( 8, (1,255), VolumeNameLen ),
8096         ])
8097         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0xff00])
8098
8099         # 2222/160A, 22/10
8100         pkt = NCP(0x160A, "Create Directory", 'fileserver')
8101         pkt.Request((13,267), [
8102                 rec( 10, 1, DirHandle ),
8103                 rec( 11, 1, AccessRightsMask ),
8104                 rec( 12, (1, 255), Path ),
8105         ], info_str=(Path, "Create Directory: %s", ", %s"))
8106         pkt.Reply(8)
8107         pkt.CompletionCodes([0x0000, 0x8400, 0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03,
8108                              0x9e00, 0xa100, 0xfd00, 0xff00])
8109
8110         # 2222/160B, 22/11
8111         pkt = NCP(0x160B, "Delete Directory", 'fileserver')
8112         pkt.Request((13,267), [
8113                 rec( 10, 1, DirHandle ),
8114                 rec( 11, 1, Reserved ),
8115                 rec( 12, (1, 255), Path ),
8116         ], info_str=(Path, "Delete Directory: %s", ", %s"))
8117         pkt.Reply(8)
8118         pkt.CompletionCodes([0x0000, 0x8a00, 0x9600, 0x9804, 0x9b03, 0x9c03,
8119                              0x9f00, 0xa000, 0xa100, 0xfd00, 0xff00])
8120
8121         # 2222/160C, 22/12
8122         pkt = NCP(0x160C, "Scan Directory for Trustees", 'fileserver')
8123         pkt.Request((13,267), [
8124                 rec( 10, 1, DirHandle ),
8125                 rec( 11, 1, TrusteeSetNumber ),
8126                 rec( 12, (1, 255), Path ),
8127         ], info_str=(Path, "Scan Directory for Trustees: %s", ", %s"))
8128         pkt.Reply(57, [
8129                 rec( 8, 16, DirectoryPath ),
8130                 rec( 24, 2, CreationDate, BE ),
8131                 rec( 26, 2, CreationTime, BE ),
8132                 rec( 28, 4, CreatorID ),
8133                 rec( 32, 4, TrusteeID, BE ),
8134                 rec( 36, 4, TrusteeID, BE ),
8135                 rec( 40, 4, TrusteeID, BE ),
8136                 rec( 44, 4, TrusteeID, BE ),
8137                 rec( 48, 4, TrusteeID, BE ),
8138                 rec( 52, 1, AccessRightsMask ),
8139                 rec( 53, 1, AccessRightsMask ),
8140                 rec( 54, 1, AccessRightsMask ),
8141                 rec( 55, 1, AccessRightsMask ),
8142                 rec( 56, 1, AccessRightsMask ),
8143         ])
8144         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9b03, 0x9c03,
8145                              0xa100, 0xfd00, 0xff00])
8146
8147         # 2222/160D, 22/13
8148         pkt = NCP(0x160D, "Add Trustee to Directory", 'fileserver')
8149         pkt.Request((17,271), [
8150                 rec( 10, 1, DirHandle ),
8151                 rec( 11, 4, TrusteeID, BE ),
8152                 rec( 15, 1, AccessRightsMask ),
8153                 rec( 16, (1, 255), Path ),
8154         ], info_str=(Path, "Add Trustee to Directory: %s", ", %s"))
8155         pkt.Reply(8)
8156         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03,
8157                              0xa100, 0xfc06, 0xfd00, 0xff00])
8158
8159         # 2222/160E, 22/14
8160         pkt = NCP(0x160E, "Delete Trustee from Directory", 'fileserver')
8161         pkt.Request((17,271), [
8162                 rec( 10, 1, DirHandle ),
8163                 rec( 11, 4, TrusteeID, BE ),
8164                 rec( 15, 1, Reserved ),
8165                 rec( 16, (1, 255), Path ),
8166         ], info_str=(Path, "Delete Trustee from Directory: %s", ", %s"))
8167         pkt.Reply(8)
8168         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03,
8169                              0xa100, 0xfc06, 0xfd00, 0xfe07, 0xff00])
8170
8171         # 2222/160F, 22/15
8172         pkt = NCP(0x160F, "Rename Directory", 'fileserver')
8173         pkt.Request((13, 521), [
8174                 rec( 10, 1, DirHandle ),
8175                 rec( 11, (1, 255), Path ),
8176                 rec( -1, (1, 255), NewPath ),
8177         ], info_str=(Path, "Rename Directory: %s", ", %s"))
8178         pkt.Reply(8)
8179         pkt.CompletionCodes([0x0000, 0x8b00, 0x9200, 0x9600, 0x9804, 0x9b03, 0x9c03,
8180                              0x9e00, 0xa100, 0xef00, 0xfd00, 0xff00])
8181                                                                         
8182         # 2222/1610, 22/16
8183         pkt = NCP(0x1610, "Purge Erased Files", 'file')
8184         pkt.Request(10)
8185         pkt.Reply(8)
8186         pkt.CompletionCodes([0x0000, 0x8100, 0x9600, 0x9804, 0xa100, 0xff00])
8187
8188         # 2222/1611, 22/17
8189         pkt = NCP(0x1611, "Recover Erased File", 'fileserver')
8190         pkt.Request(11, [
8191                 rec( 10, 1, DirHandle ),
8192         ],info_str=(DirHandle, "Recover Erased File from Directory Handle %d", ", %d"))
8193         pkt.Reply(38, [
8194                 rec( 8, 15, OldFileName ),
8195                 rec( 23, 15, NewFileName ),
8196         ])
8197         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03,
8198                              0xa100, 0xfd00, 0xff00])
8199         # 2222/1612, 22/18
8200         pkt = NCP(0x1612, "Alloc Permanent Directory Handle", 'fileserver')
8201         pkt.Request((13, 267), [
8202                 rec( 10, 1, DirHandle ),
8203                 rec( 11, 1, DirHandleName ),
8204                 rec( 12, (1,255), Path ),
8205         ], info_str=(Path, "Allocate Permanent Directory Handle: %s", ", %s"))
8206         pkt.Reply(10, [
8207                 rec( 8, 1, DirHandle ),
8208                 rec( 9, 1, AccessRightsMask ),
8209         ])
8210         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9900, 0x9c03, 0x9d00,
8211                              0xa100, 0xfd00, 0xff00])
8212         # 2222/1613, 22/19
8213         pkt = NCP(0x1613, "Alloc Temporary Directory Handle", 'fileserver')
8214         pkt.Request((13, 267), [
8215                 rec( 10, 1, DirHandle ),
8216                 rec( 11, 1, DirHandleName ),
8217                 rec( 12, (1,255), Path ),
8218         ], info_str=(Path, "Allocate Temporary Directory Handle: %s", ", %s"))
8219         pkt.Reply(10, [
8220                 rec( 8, 1, DirHandle ),
8221                 rec( 9, 1, AccessRightsMask ),
8222         ])
8223         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9900, 0x9c03, 0x9d00,
8224                              0xa100, 0xfd00, 0xff00])
8225         # 2222/1614, 22/20
8226         pkt = NCP(0x1614, "Deallocate Directory Handle", 'fileserver')
8227         pkt.Request(11, [
8228                 rec( 10, 1, DirHandle ),
8229         ],info_str=(DirHandle, "Deallocate Directory Handle %d", ", %d"))
8230         pkt.Reply(8)
8231         pkt.CompletionCodes([0x0000, 0x9b03])
8232         # 2222/1615, 22/21
8233         pkt = NCP(0x1615, "Get Volume Info with Handle", 'file')
8234         pkt.Request( 11, [
8235                 rec( 10, 1, DirHandle )
8236         ],info_str=(DirHandle, "Get Volume Information with Handle %d", ", %d"))
8237         pkt.Reply( 36, [
8238                 rec( 8, 2, SectorsPerCluster, BE ),
8239                 rec( 10, 2, TotalVolumeClusters, BE ),
8240                 rec( 12, 2, AvailableClusters, BE ),
8241                 rec( 14, 2, TotalDirectorySlots, BE ),
8242                 rec( 16, 2, AvailableDirectorySlots, BE ),
8243                 rec( 18, 16, VolumeName ),
8244                 rec( 34, 2, RemovableFlag, BE ),
8245         ])
8246         pkt.CompletionCodes([0x0000, 0xff00])
8247         # 2222/1616, 22/22
8248         pkt = NCP(0x1616, "Alloc Special Temporary Directory Handle", 'fileserver')
8249         pkt.Request((13, 267), [
8250                 rec( 10, 1, DirHandle ),
8251                 rec( 11, 1, DirHandleName ),
8252                 rec( 12, (1,255), Path ),
8253         ], info_str=(Path, "Allocate Special Temporary Directory Handle: %s", ", %s"))
8254         pkt.Reply(10, [
8255                 rec( 8, 1, DirHandle ),
8256                 rec( 9, 1, AccessRightsMask ),
8257         ])
8258         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9900, 0x9c03, 0x9d00,
8259                              0xa100, 0xfd00, 0xff00])
8260         # 2222/1617, 22/23
8261         pkt = NCP(0x1617, "Extract a Base Handle", 'fileserver')
8262         pkt.Request(11, [
8263                 rec( 10, 1, DirHandle ),
8264         ],info_str=(DirHandle, "Extract a Base Handle from Directory Handle %d", ", %d"))
8265         pkt.Reply(22, [
8266                 rec( 8, 10, ServerNetworkAddress ),
8267                 rec( 18, 4, DirHandleLong ),
8268         ])
8269         pkt.CompletionCodes([0x0000, 0x9600, 0x9b03])
8270         # 2222/1618, 22/24
8271         pkt = NCP(0x1618, "Restore an Extracted Base Handle", 'fileserver')
8272         pkt.Request(24, [
8273                 rec( 10, 10, ServerNetworkAddress ),
8274                 rec( 20, 4, DirHandleLong ),
8275         ])
8276         pkt.Reply(10, [
8277                 rec( 8, 1, DirHandle ),
8278                 rec( 9, 1, AccessRightsMask ),
8279         ])
8280         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c00, 0x9d00, 0xa100,
8281                              0xfd00, 0xff00])
8282         # 2222/1619, 22/25
8283         pkt = NCP(0x1619, "Set Directory Information", 'fileserver')
8284         pkt.Request((21, 275), [
8285                 rec( 10, 1, DirHandle ),
8286                 rec( 11, 2, CreationDate ),
8287                 rec( 13, 2, CreationTime ),
8288                 rec( 15, 4, CreatorID, BE ),
8289                 rec( 19, 1, AccessRightsMask ),
8290                 rec( 20, (1,255), Path ),
8291         ], info_str=(Path, "Set Directory Information: %s", ", %s"))
8292         pkt.Reply(8)
8293         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9b03, 0x9c00, 0xa100,
8294                              0xff16])
8295         # 2222/161A, 22/26
8296         pkt = NCP(0x161A, "Get Path Name of a Volume-Directory Number Pair", 'fileserver')
8297         pkt.Request(13, [
8298                 rec( 10, 1, VolumeNumber ),
8299                 rec( 11, 2, DirectoryEntryNumberWord ),
8300         ])
8301         pkt.Reply((9,263), [
8302                 rec( 8, (1,255), Path ),
8303                 ])
8304         pkt.CompletionCodes([0x0000, 0x9804, 0x9c00, 0xa100])
8305         # 2222/161B, 22/27
8306         pkt = NCP(0x161B, "Scan Salvageable Files", 'fileserver')
8307         pkt.Request(15, [
8308                 rec( 10, 1, DirHandle ),
8309                 rec( 11, 4, SequenceNumber ),
8310         ])
8311         pkt.Reply(140, [
8312                 rec( 8, 4, SequenceNumber ),
8313                 rec( 12, 2, Subdirectory ),
8314                 rec( 14, 2, Reserved2 ),
8315                 rec( 16, 4, AttributesDef32 ),
8316                 rec( 20, 1, UniqueID ),
8317                 rec( 21, 1, FlagsDef ),
8318                 rec( 22, 1, DestNameSpace ),
8319                 rec( 23, 1, FileNameLen ),
8320                 rec( 24, 12, FileName12 ),
8321                 rec( 36, 2, CreationTime ),
8322                 rec( 38, 2, CreationDate ),
8323                 rec( 40, 4, CreatorID, BE ),
8324                 rec( 44, 2, ArchivedTime ),
8325                 rec( 46, 2, ArchivedDate ),
8326                 rec( 48, 4, ArchiverID, BE ),
8327                 rec( 52, 2, UpdateTime ),
8328                 rec( 54, 2, UpdateDate ),
8329                 rec( 56, 4, UpdateID, BE ),
8330                 rec( 60, 4, FileSize, BE ),
8331                 rec( 64, 44, Reserved44 ),
8332                 rec( 108, 2, InheritedRightsMask ),
8333                 rec( 110, 2, LastAccessedDate ),
8334                 rec( 112, 4, DeletedFileTime ),
8335                 rec( 116, 2, DeletedTime ),
8336                 rec( 118, 2, DeletedDate ),
8337                 rec( 120, 4, DeletedID, BE ),
8338                 rec( 124, 16, Reserved16 ),
8339         ])
8340         pkt.CompletionCodes([0x0000, 0xfb01, 0xff1d])
8341         # 2222/161C, 22/28
8342         pkt = NCP(0x161C, "Recover Salvageable File", 'fileserver')
8343         pkt.Request((17,525), [
8344                 rec( 10, 1, DirHandle ),
8345                 rec( 11, 4, SequenceNumber ),
8346                 rec( 15, (1, 255), FileName ),
8347                 rec( -1, (1, 255), NewFileNameLen ),
8348         ], info_str=(FileName, "Recover File: %s", ", %s"))
8349         pkt.Reply(8)
8350         pkt.CompletionCodes([0x0000, 0x8401, 0x9c03, 0xfe02])
8351         # 2222/161D, 22/29
8352         pkt = NCP(0x161D, "Purge Salvageable File", 'fileserver')
8353         pkt.Request(15, [
8354                 rec( 10, 1, DirHandle ),
8355                 rec( 11, 4, SequenceNumber ),
8356         ])
8357         pkt.Reply(8)
8358         pkt.CompletionCodes([0x0000, 0x8500, 0x9c03])
8359         # 2222/161E, 22/30
8360         pkt = NCP(0x161E, "Scan a Directory", 'fileserver')
8361         pkt.Request((17, 271), [
8362                 rec( 10, 1, DirHandle ),
8363                 rec( 11, 1, DOSFileAttributes ),
8364                 rec( 12, 4, SequenceNumber ),
8365                 rec( 16, (1, 255), SearchPattern ),
8366         ], info_str=(SearchPattern, "Scan a Directory: %s", ", %s"))
8367         pkt.Reply(140, [
8368                 rec( 8, 4, SequenceNumber ),
8369                 rec( 12, 4, Subdirectory ),
8370                 rec( 16, 4, AttributesDef32 ),
8371                 rec( 20, 1, UniqueID, LE ),
8372                 rec( 21, 1, PurgeFlags ),
8373                 rec( 22, 1, DestNameSpace ),
8374                 rec( 23, 1, NameLen ),
8375                 rec( 24, 12, Name12 ),
8376                 rec( 36, 2, CreationTime ),
8377                 rec( 38, 2, CreationDate ),
8378                 rec( 40, 4, CreatorID, BE ),
8379                 rec( 44, 2, ArchivedTime ),
8380                 rec( 46, 2, ArchivedDate ),
8381                 rec( 48, 4, ArchiverID, BE ),
8382                 rec( 52, 2, UpdateTime ),
8383                 rec( 54, 2, UpdateDate ),
8384                 rec( 56, 4, UpdateID, BE ),
8385                 rec( 60, 4, FileSize, BE ),
8386                 rec( 64, 44, Reserved44 ),
8387                 rec( 108, 2, InheritedRightsMask ),
8388                 rec( 110, 2, LastAccessedDate ),
8389                 rec( 112, 28, Reserved28 ),
8390         ])
8391         pkt.CompletionCodes([0x0000, 0x8500, 0x9c03])
8392         # 2222/161F, 22/31
8393         pkt = NCP(0x161F, "Get Directory Entry", 'fileserver')
8394         pkt.Request(11, [
8395                 rec( 10, 1, DirHandle ),
8396         ])
8397         pkt.Reply(136, [
8398                 rec( 8, 4, Subdirectory ),
8399                 rec( 12, 4, AttributesDef32 ),
8400                 rec( 16, 1, UniqueID, LE ),
8401                 rec( 17, 1, PurgeFlags ),
8402                 rec( 18, 1, DestNameSpace ),
8403                 rec( 19, 1, NameLen ),
8404                 rec( 20, 12, Name12 ),
8405                 rec( 32, 2, CreationTime ),
8406                 rec( 34, 2, CreationDate ),
8407                 rec( 36, 4, CreatorID, BE ),
8408                 rec( 40, 2, ArchivedTime ),
8409                 rec( 42, 2, ArchivedDate ), 
8410                 rec( 44, 4, ArchiverID, BE ),
8411                 rec( 48, 2, UpdateTime ),
8412                 rec( 50, 2, UpdateDate ),
8413                 rec( 52, 4, NextTrusteeEntry, BE ),
8414                 rec( 56, 48, Reserved48 ),
8415                 rec( 104, 2, MaximumSpace ),
8416                 rec( 106, 2, InheritedRightsMask ),
8417                 rec( 108, 28, Undefined28 ),
8418         ])
8419         pkt.CompletionCodes([0x0000, 0x8900, 0xbf00, 0xfb00])
8420         # 2222/1620, 22/32
8421         pkt = NCP(0x1620, "Scan Volume's User Disk Restrictions", 'fileserver')
8422         pkt.Request(15, [
8423                 rec( 10, 1, VolumeNumber ),
8424                 rec( 11, 4, SequenceNumber ),
8425         ])
8426         pkt.Reply(17, [
8427                 rec( 8, 1, NumberOfEntries, var="x" ),
8428                 rec( 9, 8, ObjectIDStruct, repeat="x" ),
8429         ])
8430         pkt.CompletionCodes([0x0000, 0x9800])
8431         # 2222/1621, 22/33
8432         pkt = NCP(0x1621, "Add User Disk Space Restriction", 'fileserver')
8433         pkt.Request(19, [
8434                 rec( 10, 1, VolumeNumber ),
8435                 rec( 11, 4, ObjectID ),
8436                 rec( 15, 4, DiskSpaceLimit ),
8437         ])
8438         pkt.Reply(8)
8439         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9800])
8440         # 2222/1622, 22/34
8441         pkt = NCP(0x1622, "Remove User Disk Space Restrictions", 'fileserver')
8442         pkt.Request(15, [
8443                 rec( 10, 1, VolumeNumber ),
8444                 rec( 11, 4, ObjectID ),
8445         ])
8446         pkt.Reply(8)
8447         pkt.CompletionCodes([0x0000, 0x8c00, 0xfe0e])
8448         # 2222/1623, 22/35
8449         pkt = NCP(0x1623, "Get Directory Disk Space Restriction", 'fileserver')
8450         pkt.Request(11, [
8451                 rec( 10, 1, DirHandle ),
8452         ])
8453         pkt.Reply(18, [
8454                 rec( 8, 1, NumberOfEntries ),
8455                 rec( 9, 1, Level ),
8456                 rec( 10, 4, MaxSpace ),
8457                 rec( 14, 4, CurrentSpace ),
8458         ])
8459         pkt.CompletionCodes([0x0000])
8460         # 2222/1624, 22/36
8461         pkt = NCP(0x1624, "Set Directory Disk Space Restriction", 'fileserver')
8462         pkt.Request(15, [
8463                 rec( 10, 1, DirHandle ),
8464                 rec( 11, 4, DiskSpaceLimit ),
8465         ])
8466         pkt.Reply(8)
8467         pkt.CompletionCodes([0x0000, 0x0101, 0x8c00, 0xbf00])
8468         # 2222/1625, 22/37
8469         pkt = NCP(0x1625, "Set Directory Entry Information", 'fileserver')
8470         pkt.Request(NO_LENGTH_CHECK, [
8471                 rec( 10, 1, DirHandle ),
8472                 rec( 11, 2, SearchAttributesLow ),
8473                 rec( 13, 4, SequenceNumber ),
8474                 rec( 17, 2, ChangeBits ),
8475                 rec( 19, 2, Reserved2 ),
8476                 rec( 21, 4, Subdirectory ),
8477                 srec(DOSDirectoryEntryStruct, req_cond="ncp.search_att_sub == TRUE"),
8478                 srec(DOSFileEntryStruct, req_cond="ncp.search_att_sub == FALSE"),
8479         ])
8480         pkt.Reply(8)
8481         pkt.ReqCondSizeConstant()
8482         pkt.CompletionCodes([0x0000, 0x0106, 0x8c00, 0xbf00])
8483         # 2222/1626, 22/38
8484         pkt = NCP(0x1626, "Scan File or Directory for Extended Trustees", 'fileserver')
8485         pkt.Request((13,267), [
8486                 rec( 10, 1, DirHandle ),
8487                 rec( 11, 1, SequenceByte ),
8488                 rec( 12, (1, 255), Path ),
8489         ], info_str=(Path, "Scan for Extended Trustees: %s", ", %s"))
8490         pkt.Reply(91, [
8491                 rec( 8, 1, NumberOfEntries, var="x" ),
8492                 rec( 9, 4, ObjectID ),
8493                 rec( 13, 4, ObjectID ),
8494                 rec( 17, 4, ObjectID ),
8495                 rec( 21, 4, ObjectID ),
8496                 rec( 25, 4, ObjectID ),
8497                 rec( 29, 4, ObjectID ),
8498                 rec( 33, 4, ObjectID ),
8499                 rec( 37, 4, ObjectID ),
8500                 rec( 41, 4, ObjectID ),
8501                 rec( 45, 4, ObjectID ),
8502                 rec( 49, 4, ObjectID ),
8503                 rec( 53, 4, ObjectID ),
8504                 rec( 57, 4, ObjectID ),
8505                 rec( 61, 4, ObjectID ),
8506                 rec( 65, 4, ObjectID ),
8507                 rec( 69, 4, ObjectID ),
8508                 rec( 73, 4, ObjectID ),
8509                 rec( 77, 4, ObjectID ),
8510                 rec( 81, 4, ObjectID ),
8511                 rec( 85, 4, ObjectID ),
8512                 rec( 89, 2, AccessRightsMaskWord, repeat="x" ),
8513         ])
8514         pkt.CompletionCodes([0x0000, 0x9800, 0x9b00, 0x9c00])
8515         # 2222/1627, 22/39
8516         pkt = NCP(0x1627, "Add Extended Trustee to Directory or File", 'fileserver')
8517         pkt.Request((18,272), [
8518                 rec( 10, 1, DirHandle ),
8519                 rec( 11, 4, ObjectID, BE ),
8520                 rec( 15, 2, TrusteeRights ),
8521                 rec( 17, (1, 255), Path ),
8522         ], info_str=(Path, "Add Extended Trustee: %s", ", %s"))
8523         pkt.Reply(8)
8524         pkt.CompletionCodes([0x0000, 0x9000])
8525         # 2222/1628, 22/40
8526         pkt = NCP(0x1628, "Scan Directory Disk Space", 'fileserver')
8527         pkt.Request((15,269), [
8528                 rec( 10, 1, DirHandle ),
8529                 rec( 11, 2, SearchAttributesLow ),
8530                 rec( 13, 1, SequenceByte ),
8531                 rec( 14, (1, 255), SearchPattern ),
8532         ], info_str=(SearchPattern, "Scan Directory Disk Space: %s", ", %s"))
8533         pkt.Reply((148), [
8534                 rec( 8, 4, SequenceNumber ),
8535                 rec( 12, 4, Subdirectory ),
8536                 rec( 16, 4, AttributesDef32 ),
8537                 rec( 20, 1, UniqueID ),
8538                 rec( 21, 1, PurgeFlags ),
8539                 rec( 22, 1, DestNameSpace ),
8540                 rec( 23, 1, NameLen ),
8541                 rec( 24, 12, Name12 ),
8542                 rec( 36, 2, CreationTime ),
8543                 rec( 38, 2, CreationDate ),
8544                 rec( 40, 4, CreatorID, BE ),
8545                 rec( 44, 2, ArchivedTime ),
8546                 rec( 46, 2, ArchivedDate ),
8547                 rec( 48, 4, ArchiverID, BE ),
8548                 rec( 52, 2, UpdateTime ),
8549                 rec( 54, 2, UpdateDate ),
8550                 rec( 56, 4, UpdateID, BE ),
8551                 rec( 60, 4, DataForkSize, BE ),
8552                 rec( 64, 4, DataForkFirstFAT, BE ),
8553                 rec( 68, 4, NextTrusteeEntry, BE ),
8554                 rec( 72, 36, Reserved36 ),
8555                 rec( 108, 2, InheritedRightsMask ),
8556                 rec( 110, 2, LastAccessedDate ),
8557                 rec( 112, 4, DeletedFileTime ),
8558                 rec( 116, 2, DeletedTime ),
8559                 rec( 118, 2, DeletedDate ),
8560                 rec( 120, 4, DeletedID, BE ),
8561                 rec( 124, 8, Undefined8 ),
8562                 rec( 132, 4, PrimaryEntry, LE ),
8563                 rec( 136, 4, NameList, LE ),
8564                 rec( 140, 4, OtherFileForkSize, BE ),
8565                 rec( 144, 4, OtherFileForkFAT, BE ),
8566         ])
8567         pkt.CompletionCodes([0x0000, 0x8900, 0x9c03, 0xfb01, 0xff00])
8568         # 2222/1629, 22/41
8569         pkt = NCP(0x1629, "Get Object Disk Usage and Restrictions", 'fileserver')
8570         pkt.Request(15, [
8571                 rec( 10, 1, VolumeNumber ),
8572                 rec( 11, 4, ObjectID, BE ),
8573         ])
8574         pkt.Reply(16, [
8575                 rec( 8, 4, Restriction ),
8576                 rec( 12, 4, InUse ),
8577         ])
8578         pkt.CompletionCodes([0x0000, 0x9802])
8579         # 2222/162A, 22/42
8580         pkt = NCP(0x162A, "Get Effective Rights for Directory Entry", 'fileserver')
8581         pkt.Request((12,266), [
8582                 rec( 10, 1, DirHandle ),
8583                 rec( 11, (1, 255), Path ),
8584         ], info_str=(Path, "Get Effective Rights: %s", ", %s"))
8585         pkt.Reply(10, [
8586                 rec( 8, 2, AccessRightsMaskWord ),
8587         ])
8588         pkt.CompletionCodes([0x0000, 0x9804, 0x9c03])
8589         # 2222/162B, 22/43
8590         pkt = NCP(0x162B, "Remove Extended Trustee from Dir or File", 'fileserver')
8591         pkt.Request((17,271), [
8592                 rec( 10, 1, DirHandle ),
8593                 rec( 11, 4, ObjectID, BE ),
8594                 rec( 15, 1, Unused ),
8595                 rec( 16, (1, 255), Path ),
8596         ], info_str=(Path, "Remove Extended Trustee from %s", ", %s"))
8597         pkt.Reply(8)
8598         pkt.CompletionCodes([0x0000, 0x9002, 0x9c03, 0xfe0f, 0xff09])
8599         # 2222/162C, 22/44
8600         pkt = NCP(0x162C, "Get Volume and Purge Information", 'file')
8601         pkt.Request( 11, [
8602                 rec( 10, 1, VolumeNumber )
8603         ],info_str=(VolumeNumber, "Get Volume and Purge Information for Volume %d", ", %d"))
8604         pkt.Reply( (38,53), [
8605                 rec( 8, 4, TotalBlocks ),
8606                 rec( 12, 4, FreeBlocks ),
8607                 rec( 16, 4, PurgeableBlocks ),
8608                 rec( 20, 4, NotYetPurgeableBlocks ),
8609                 rec( 24, 4, TotalDirectoryEntries ),
8610                 rec( 28, 4, AvailableDirEntries ),
8611                 rec( 32, 4, Reserved4 ),
8612                 rec( 36, 1, SectorsPerBlock ),
8613                 rec( 37, (1,16), VolumeNameLen ),
8614         ])
8615         pkt.CompletionCodes([0x0000])
8616         # 2222/162D, 22/45
8617         pkt = NCP(0x162D, "Get Directory Information", 'file')
8618         pkt.Request( 11, [
8619                 rec( 10, 1, DirHandle )
8620         ])
8621         pkt.Reply( (30, 45), [
8622                 rec( 8, 4, TotalBlocks ),
8623                 rec( 12, 4, AvailableBlocks ),
8624                 rec( 16, 4, TotalDirectoryEntries ),
8625                 rec( 20, 4, AvailableDirEntries ),
8626                 rec( 24, 4, Reserved4 ),
8627                 rec( 28, 1, SectorsPerBlock ),
8628                 rec( 29, (1,16), VolumeNameLen ),
8629         ])
8630         pkt.CompletionCodes([0x0000, 0x9b03])
8631         # 2222/162E, 22/46
8632         pkt = NCP(0x162E, "Rename Or Move", 'file')
8633         pkt.Request( (17,525), [
8634                 rec( 10, 1, SourceDirHandle ),
8635                 rec( 11, 1, SearchAttributesLow ),
8636                 rec( 12, 1, SourcePathComponentCount ),
8637                 rec( 13, (1,255), SourcePath ),
8638                 rec( -1, 1, DestDirHandle ),
8639                 rec( -1, 1, DestPathComponentCount ),
8640                 rec( -1, (1,255), DestPath ),
8641         ], info_str=(SourcePath, "Rename or Move: %s", ", %s"))
8642         pkt.Reply(8)
8643         pkt.CompletionCodes([0x0000, 0x0102, 0x8701, 0x8b00, 0x8d00, 0x8e00,
8644                              0x8f00, 0x9001, 0x9101, 0x9201, 0x9a00, 0x9b03,
8645                              0x9c03, 0xa400, 0xff17])
8646         # 2222/162F, 22/47
8647         pkt = NCP(0x162F, "Get Name Space Information", 'file')
8648         pkt.Request( 11, [
8649                 rec( 10, 1, VolumeNumber )
8650         ],info_str=(VolumeNumber, "Get Name Space Information for Volume %d", ", %d"))
8651         pkt.Reply( (13,521), [
8652                 rec( 8, 1, DefinedNameSpaces ),
8653                 rec( 9, (1,255), NameSpaceName ),
8654                 rec( -1, 1, DefinedDataStreams ),
8655                 rec( -1, 1, AssociatedNameSpace ),
8656                 rec( -1, (1,255), DataStreamName ),
8657         ])
8658         pkt.CompletionCodes([0x0000])
8659         # 2222/1630, 22/48
8660         pkt = NCP(0x1630, "Get Name Space Directory Entry", 'file')
8661         pkt.Request( 16, [
8662                 rec( 10, 1, VolumeNumber ),
8663                 rec( 11, 4, DOSSequence ),
8664                 rec( 15, 1, SrcNameSpace ),
8665         ])
8666         pkt.Reply( 112, [
8667                 rec( 8, 4, SequenceNumber ),
8668                 rec( 12, 4, Subdirectory ),
8669                 rec( 16, 4, AttributesDef32 ),
8670                 rec( 20, 1, UniqueID ),
8671                 rec( 21, 1, Flags ),
8672                 rec( 22, 1, SrcNameSpace ),
8673                 rec( 23, 1, NameLength ),
8674                 rec( 24, 12, Name12 ),
8675                 rec( 36, 2, CreationTime ),
8676                 rec( 38, 2, CreationDate ),
8677                 rec( 40, 4, CreatorID, BE ),
8678                 rec( 44, 2, ArchivedTime ),
8679                 rec( 46, 2, ArchivedDate ),
8680                 rec( 48, 4, ArchiverID ),
8681                 rec( 52, 2, UpdateTime ),
8682                 rec( 54, 2, UpdateDate ),
8683                 rec( 56, 4, UpdateID ),
8684                 rec( 60, 4, FileSize ),
8685                 rec( 64, 44, Reserved44 ),
8686                 rec( 108, 2, InheritedRightsMask ),
8687                 rec( 110, 2, LastAccessedDate ),
8688         ])
8689         pkt.CompletionCodes([0x0000, 0x8900, 0x9802, 0xbf00])
8690         # 2222/1631, 22/49
8691         pkt = NCP(0x1631, "Open Data Stream", 'file')
8692         pkt.Request( (15,269), [
8693                 rec( 10, 1, DataStream ),
8694                 rec( 11, 1, DirHandle ),
8695                 rec( 12, 1, AttributesDef ),
8696                 rec( 13, 1, OpenRights ),
8697                 rec( 14, (1, 255), FileName ),
8698         ], info_str=(FileName, "Open Data Stream: %s", ", %s"))
8699         pkt.Reply( 12, [
8700                 rec( 8, 4, CCFileHandle, BE ),
8701         ])
8702         pkt.CompletionCodes([0x0000, 0x8000, 0x8200, 0x9002, 0xbe00, 0xff00])
8703         # 2222/1632, 22/50
8704         pkt = NCP(0x1632, "Get Object Effective Rights for Directory Entry", 'file')
8705         pkt.Request( (16,270), [
8706                 rec( 10, 4, ObjectID, BE ),
8707                 rec( 14, 1, DirHandle ),
8708                 rec( 15, (1, 255), Path ),
8709         ], info_str=(Path, "Get Object Effective Rights: %s", ", %s"))
8710         pkt.Reply( 10, [
8711                 rec( 8, 2, TrusteeRights ),
8712         ])
8713         pkt.CompletionCodes([0x0000, 0x7e01, 0x9b00, 0x9c03])
8714         # 2222/1633, 22/51
8715         pkt = NCP(0x1633, "Get Extended Volume Information", 'file')
8716         pkt.Request( 11, [
8717                 rec( 10, 1, VolumeNumber ),
8718         ],info_str=(VolumeNumber, "Get Extended Volume Information for Volume %d", ", %d"))
8719         pkt.Reply( (139,266), [
8720                 rec( 8, 2, VolInfoReplyLen ),
8721                 rec( 10, 128, VolInfoStructure),
8722                 rec( 138, (1,128), VolumeNameLen ),
8723         ])
8724         pkt.CompletionCodes([0x0000, 0x7e01, 0x9804, 0xfb08, 0xff00])
8725         # 2222/1634, 22/52
8726         pkt = NCP(0x1634, "Get Mount Volume List", 'file')
8727         pkt.Request( 22, [
8728                 rec( 10, 4, StartVolumeNumber ),
8729                 rec( 14, 4, VolumeRequestFlags, LE ),
8730                 rec( 18, 4, SrcNameSpace ),
8731         ])
8732         pkt.Reply( 34, [
8733                 rec( 8, 4, ItemsInPacket, var="x" ),
8734                 rec( 12, 4, NextVolumeNumber ),
8735                 rec( 16, 18, VolumeStruct, repeat="x"),
8736         ])
8737         pkt.CompletionCodes([0x0000])
8738         # 2222/1700, 23/00
8739         pkt = NCP(0x1700, "Login User", 'file')
8740         pkt.Request( (12, 58), [
8741                 rec( 10, (1,16), UserName ),
8742                 rec( -1, (1,32), Password ),
8743         ], info_str=(UserName, "Login User: %s", ", %s"))
8744         pkt.Reply(8)
8745         pkt.CompletionCodes([0x0000, 0x9602, 0xc101, 0xc200, 0xc501, 0xd700,
8746                              0xd900, 0xda00, 0xdb00, 0xde00, 0xdf00, 0xe800,
8747                              0xec00, 0xed00, 0xef00, 0xf001, 0xf100, 0xf200,
8748                              0xf600, 0xfb00, 0xfc06, 0xfe07, 0xff00])
8749         # 2222/1701, 23/01
8750         pkt = NCP(0x1701, "Change User Password", 'file')
8751         pkt.Request( (13, 90), [
8752                 rec( 10, (1,16), UserName ),
8753                 rec( -1, (1,32), Password ),
8754                 rec( -1, (1,32), NewPassword ),
8755         ], info_str=(UserName, "Change Password for User: %s", ", %s"))
8756         pkt.Reply(8)
8757         pkt.CompletionCodes([0x0000, 0x9600, 0xd600, 0xf001, 0xf101, 0xf501,
8758                              0xfc06, 0xfe07, 0xff00])
8759         # 2222/1702, 23/02
8760         pkt = NCP(0x1702, "Get User Connection List", 'file')
8761         pkt.Request( (11, 26), [
8762                 rec( 10, (1,16), UserName ),
8763         ], info_str=(UserName, "Get User Connection: %s", ", %s"))
8764         pkt.Reply( (9, 136), [
8765                 rec( 8, (1, 128), ConnectionNumberList ),
8766         ])
8767         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
8768         # 2222/1703, 23/03
8769         pkt = NCP(0x1703, "Get User Number", 'file')
8770         pkt.Request( (11, 26), [
8771                 rec( 10, (1,16), UserName ),
8772         ], info_str=(UserName, "Get User Number: %s", ", %s"))
8773         pkt.Reply( 12, [
8774                 rec( 8, 4, ObjectID, BE ),
8775         ])
8776         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
8777         # 2222/1705, 23/05
8778         pkt = NCP(0x1705, "Get Station's Logged Info", 'file')
8779         pkt.Request( 11, [
8780                 rec( 10, 1, TargetConnectionNumber ),
8781         ],info_str=(TargetConnectionNumber, "Get Station's Logged Information on Connection %d", ", %d")) 
8782         pkt.Reply( 266, [
8783                 rec( 8, 16, UserName16 ),
8784                 rec( 24, 7, LoginTime ),
8785                 rec( 31, 39, FullName ),
8786                 rec( 70, 4, UserID, BE ),
8787                 rec( 74, 128, SecurityEquivalentList ),
8788                 rec( 202, 64, Reserved64 ),
8789         ])
8790         pkt.CompletionCodes([0x0000, 0x9602, 0xfc06, 0xfd00, 0xfe07, 0xff00])
8791         # 2222/1707, 23/07
8792         pkt = NCP(0x1707, "Get Group Number", 'file')
8793         pkt.Request( 14, [
8794                 rec( 10, 4, ObjectID, BE ),
8795         ])
8796         pkt.Reply( 62, [
8797                 rec( 8, 4, ObjectID, BE ),
8798                 rec( 12, 2, ObjectType, BE ),
8799                 rec( 14, 48, ObjectNameLen ),
8800         ])
8801         pkt.CompletionCodes([0x0000, 0x9602, 0xf101, 0xfc06, 0xfe07, 0xff00])
8802         # 2222/170C, 23/12
8803         pkt = NCP(0x170C, "Verify Serialization", 'file')
8804         pkt.Request( 14, [
8805                 rec( 10, 4, ServerSerialNumber ),
8806         ])
8807         pkt.Reply(8)
8808         pkt.CompletionCodes([0x0000, 0xff00])
8809         # 2222/170D, 23/13
8810         pkt = NCP(0x170D, "Log Network Message", 'file')
8811         pkt.Request( (11, 68), [
8812                 rec( 10, (1, 58), TargetMessage ),
8813         ], info_str=(TargetMessage, "Log Network Message: %s", ", %s"))
8814         pkt.Reply(8)
8815         pkt.CompletionCodes([0x0000, 0x8000, 0x8100, 0x8800, 0x8d00, 0x8e00, 0x8f00,
8816                              0x9001, 0x9400, 0x9600, 0x9804, 0x9900, 0x9b00, 0xa100,
8817                              0xa201, 0xff00])
8818         # 2222/170E, 23/14
8819         pkt = NCP(0x170E, "Get Disk Utilization", 'file')
8820         pkt.Request( 15, [
8821                 rec( 10, 1, VolumeNumber ),
8822                 rec( 11, 4, TrusteeID, BE ),
8823         ])
8824         pkt.Reply( 19, [
8825                 rec( 8, 1, VolumeNumber ),
8826                 rec( 9, 4, TrusteeID, BE ),
8827                 rec( 13, 2, DirectoryCount, BE ),
8828                 rec( 15, 2, FileCount, BE ),
8829                 rec( 17, 2, ClusterCount, BE ),
8830         ])
8831         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0xa100, 0xf200])
8832         # 2222/170F, 23/15
8833         pkt = NCP(0x170F, "Scan File Information", 'file')
8834         pkt.Request((15,269), [
8835                 rec( 10, 2, LastSearchIndex ),
8836                 rec( 12, 1, DirHandle ),
8837                 rec( 13, 1, SearchAttributesLow ),
8838                 rec( 14, (1, 255), FileName ),
8839         ], info_str=(FileName, "Scan File Information: %s", ", %s"))
8840         pkt.Reply( 102, [
8841                 rec( 8, 2, NextSearchIndex ),
8842                 rec( 10, 14, FileName14 ),
8843                 rec( 24, 2, AttributesDef16 ),
8844                 rec( 26, 4, FileSize, BE ),
8845                 rec( 30, 2, CreationDate, BE ),
8846                 rec( 32, 2, LastAccessedDate, BE ),
8847                 rec( 34, 2, ModifiedDate, BE ),
8848                 rec( 36, 2, ModifiedTime, BE ),
8849                 rec( 38, 4, CreatorID, BE ),
8850                 rec( 42, 2, ArchivedDate, BE ),
8851                 rec( 44, 2, ArchivedTime, BE ),
8852                 rec( 46, 56, Reserved56 ),
8853         ])
8854         pkt.CompletionCodes([0x0000, 0x8800, 0x8900, 0x9300, 0x9400, 0x9804, 0x9b00, 0x9c00,
8855                              0xa100, 0xfd00, 0xff17])
8856         # 2222/1710, 23/16
8857         pkt = NCP(0x1710, "Set File Information", 'file')
8858         pkt.Request((91,345), [
8859                 rec( 10, 2, AttributesDef16 ),
8860                 rec( 12, 4, FileSize, BE ),
8861                 rec( 16, 2, CreationDate, BE ),
8862                 rec( 18, 2, LastAccessedDate, BE ),
8863                 rec( 20, 2, ModifiedDate, BE ),
8864                 rec( 22, 2, ModifiedTime, BE ),
8865                 rec( 24, 4, CreatorID, BE ),
8866                 rec( 28, 2, ArchivedDate, BE ),
8867                 rec( 30, 2, ArchivedTime, BE ),
8868                 rec( 32, 56, Reserved56 ),
8869                 rec( 88, 1, DirHandle ),
8870                 rec( 89, 1, SearchAttributesLow ),
8871                 rec( 90, (1, 255), FileName ),
8872         ], info_str=(FileName, "Set Information for File: %s", ", %s"))
8873         pkt.Reply(8)
8874         pkt.CompletionCodes([0x0000, 0x8800, 0x8c00, 0x8e00, 0x9400, 0x9600, 0x9804,
8875                              0x9b03, 0x9c00, 0xa100, 0xa201, 0xfc06, 0xfd00, 0xfe07,
8876                              0xff17])
8877         # 2222/1711, 23/17
8878         pkt = NCP(0x1711, "Get File Server Information", 'fileserver')
8879         pkt.Request(10)
8880         pkt.Reply(136, [
8881                 rec( 8, 48, ServerName ),
8882                 rec( 56, 1, OSMajorVersion ),
8883                 rec( 57, 1, OSMinorVersion ),
8884                 rec( 58, 2, ConnectionsSupportedMax, BE ),
8885                 rec( 60, 2, ConnectionsInUse, BE ),
8886                 rec( 62, 2, VolumesSupportedMax, BE ),
8887                 rec( 64, 1, OSRevision ),
8888                 rec( 65, 1, SFTSupportLevel ),
8889                 rec( 66, 1, TTSLevel ),
8890                 rec( 67, 2, ConnectionsMaxUsed, BE ),
8891                 rec( 69, 1, AccountVersion ),
8892                 rec( 70, 1, VAPVersion ),
8893                 rec( 71, 1, QueueingVersion ),
8894                 rec( 72, 1, PrintServerVersion ),
8895                 rec( 73, 1, VirtualConsoleVersion ),
8896                 rec( 74, 1, SecurityRestrictionVersion ),
8897                 rec( 75, 1, InternetBridgeVersion ),
8898                 rec( 76, 1, MixedModePathFlag ),
8899                 rec( 77, 1, LocalLoginInfoCcode ),
8900                 rec( 78, 2, ProductMajorVersion, BE ),
8901                 rec( 80, 2, ProductMinorVersion, BE ),
8902                 rec( 82, 2, ProductRevisionVersion, BE ),
8903                 rec( 84, 1, OSLanguageID, LE ),
8904                 rec( 85, 51, Reserved51 ),
8905         ])
8906         pkt.CompletionCodes([0x0000, 0x9600])
8907         # 2222/1712, 23/18
8908         pkt = NCP(0x1712, "Get Network Serial Number", 'fileserver')
8909         pkt.Request(10)
8910         pkt.Reply(14, [
8911                 rec( 8, 4, ServerSerialNumber ),
8912                 rec( 12, 2, ApplicationNumber ),
8913         ])
8914         pkt.CompletionCodes([0x0000, 0x9600])
8915         # 2222/1713, 23/19
8916         pkt = NCP(0x1713, "Get Internet Address", 'fileserver')
8917         pkt.Request(11, [
8918                 rec( 10, 1, TargetConnectionNumber ),
8919         ],info_str=(TargetConnectionNumber, "Get Internet Address for Connection %d", ", %d"))
8920         pkt.Reply(20, [
8921                 rec( 8, 4, NetworkAddress, BE ),
8922                 rec( 12, 6, NetworkNodeAddress ),
8923                 rec( 18, 2, NetworkSocket, BE ),
8924         ])
8925         pkt.CompletionCodes([0x0000, 0xff00])
8926         # 2222/1714, 23/20
8927         pkt = NCP(0x1714, "Login Object", 'file')
8928         pkt.Request( (12, 58), [
8929                 rec( 10, (1,16), UserName ),
8930                 rec( -1, (1,32), Password ),
8931         ], info_str=(UserName, "Login Object: %s", ", %s"))
8932         pkt.Reply(8)
8933         pkt.CompletionCodes([0x0000, 0x9602, 0xc101, 0xc200, 0xc501, 0xd600, 0xd700,
8934                              0xd900, 0xda00, 0xdb00, 0xde00, 0xdf00, 0xe800, 0xec00,
8935                              0xed00, 0xef00, 0xf001, 0xf100, 0xf200, 0xf600, 0xfb00,
8936                              0xfc06, 0xfe07, 0xff00])
8937         # 2222/1715, 23/21
8938         pkt = NCP(0x1715, "Get Object Connection List", 'file')
8939         pkt.Request( (11, 26), [
8940                 rec( 10, (1,16), UserName ),
8941         ], info_str=(UserName, "Get Object Connection List: %s", ", %s"))
8942         pkt.Reply( (9, 136), [
8943                 rec( 8, (1, 128), ConnectionNumberList ),
8944         ])
8945         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
8946         # 2222/1716, 23/22
8947         pkt = NCP(0x1716, "Get Station's Logged Info", 'file')
8948         pkt.Request( 11, [
8949                 rec( 10, 1, TargetConnectionNumber ),
8950         ])
8951         pkt.Reply( 70, [
8952                 rec( 8, 4, UserID, BE ),
8953                 rec( 12, 2, ObjectType, BE ),
8954                 rec( 14, 48, ObjectNameLen ),
8955                 rec( 62, 7, LoginTime ),       
8956                 rec( 69, 1, Reserved ),
8957         ])
8958         pkt.CompletionCodes([0x0000, 0x9602, 0xfb0a, 0xfc06, 0xfd00, 0xfe07, 0xff00])
8959         # 2222/1717, 23/23
8960         pkt = NCP(0x1717, "Get Login Key", 'file')
8961         pkt.Request(10)
8962         pkt.Reply( 16, [
8963                 rec( 8, 8, LoginKey ),
8964         ])
8965         pkt.CompletionCodes([0x0000, 0x9602])
8966         # 2222/1718, 23/24
8967         pkt = NCP(0x1718, "Keyed Object Login", 'file')
8968         pkt.Request( (21, 68), [
8969                 rec( 10, 8, LoginKey ),
8970                 rec( 18, 2, ObjectType, BE ),
8971                 rec( 20, (1,48), ObjectName ),
8972         ], info_str=(ObjectName, "Keyed Object Login: %s", ", %s"))
8973         pkt.Reply(8)
8974         pkt.CompletionCodes([0x0000, 0x9602, 0xc101, 0xc200, 0xc500, 0xd900, 0xda00,
8975                              0xdb00, 0xdc00, 0xde00])
8976         # 2222/171A, 23/26
8977         #
8978         # XXX - for NCP-over-IP, the NetworkAddress field appears to be
8979         # an IP address, rather than an IPX network address, and should
8980         # be dissected as an FT_IPv4 value; the NetworkNodeAddress and
8981         # NetworkSocket are 0.
8982         #
8983         # For NCP-over-IPX, it should probably be dissected as an
8984         # FT_IPXNET value.
8985         #
8986         pkt = NCP(0x171A, "Get Internet Address", 'fileserver')
8987         pkt.Request(11, [
8988                 rec( 10, 1, TargetConnectionNumber ),
8989         ])
8990         pkt.Reply(21, [
8991                 rec( 8, 4, NetworkAddress, BE ),
8992                 rec( 12, 6, NetworkNodeAddress ),
8993                 rec( 18, 2, NetworkSocket, BE ),
8994                 rec( 20, 1, ConnectionType ),
8995         ])
8996         pkt.CompletionCodes([0x0000])
8997         # 2222/171B, 23/27
8998         pkt = NCP(0x171B, "Get Object Connection List", 'file')
8999         pkt.Request( (17,64), [
9000                 rec( 10, 4, SearchConnNumber ),
9001                 rec( 14, 2, ObjectType, BE ),
9002                 rec( 16, (1,48), ObjectName ),
9003         ], info_str=(ObjectName, "Get Object Connection List: %s", ", %s"))
9004         pkt.Reply( (10,137), [
9005                 rec( 8, 1, ConnListLen, var="x" ),
9006                 rec( 9, (1,128), ConnectionNumberList, repeat="x" ),
9007         ])
9008         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
9009         # 2222/171C, 23/28
9010         pkt = NCP(0x171C, "Get Station's Logged Info", 'file')
9011         pkt.Request( 14, [
9012                 rec( 10, 4, TargetConnectionNumber ),
9013         ])
9014         pkt.Reply( 70, [
9015                 rec( 8, 4, UserID, BE ),
9016                 rec( 12, 2, ObjectType, BE ),
9017                 rec( 14, 48, ObjectNameLen ),
9018                 rec( 62, 7, LoginTime ),
9019                 rec( 69, 1, Reserved ),
9020         ])
9021         pkt.CompletionCodes([0x0000, 0x9602, 0xfb02, 0xfc06, 0xfd00, 0xfe07, 0xff00])
9022         # 2222/171D, 23/29
9023         pkt = NCP(0x171D, "Change Connection State", 'file')
9024         pkt.Request( 11, [
9025                 rec( 10, 1, RequestCode ),
9026         ])
9027         pkt.Reply(8)
9028         pkt.CompletionCodes([0x0000, 0x0109, 0x7a00, 0x7b00, 0x7c00, 0xe000, 0xfb06, 0xfd00])
9029         # 2222/171E, 23/30
9030         pkt = NCP(0x171E, "Set Watchdog Delay Interval", 'file')
9031         pkt.Request( 14, [
9032                 rec( 10, 4, NumberOfMinutesToDelay ),
9033         ])
9034         pkt.Reply(8)
9035         pkt.CompletionCodes([0x0000, 0x0107])
9036         # 2222/171F, 23/31
9037         pkt = NCP(0x171F, "Get Connection List From Object", 'file')
9038         pkt.Request( 18, [
9039                 rec( 10, 4, ObjectID, BE ),
9040                 rec( 14, 4, ConnectionNumber ),
9041         ])
9042         pkt.Reply( (9, 136), [
9043                 rec( 8, (1, 128), ConnectionNumberList ),
9044         ])
9045         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
9046         # 2222/1720, 23/32
9047         pkt = NCP(0x1720, "Scan Bindery Object (List)", 'bindery')
9048         pkt.Request((23,70), [
9049                 rec( 10, 4, NextObjectID, BE ),
9050                 rec( 14, 4, ObjectType, BE ),
9051                 rec( 18, 4, InfoFlags ),
9052                 rec( 22, (1,48), ObjectName ),
9053         ], info_str=(ObjectName, "Scan Bindery Object: %s", ", %s"))
9054         pkt.Reply(NO_LENGTH_CHECK, [
9055                 rec( 8, 4, ObjectInfoReturnCount ),
9056                 rec( 12, 4, NextObjectID, BE ),
9057                 rec( 16, 4, ObjectIDInfo ),
9058                 srec(ObjectTypeStruct, req_cond="ncp.info_flags_type == TRUE"),
9059                 srec(ObjectSecurityStruct, req_cond="ncp.info_flags_security == TRUE"),
9060                 srec(ObjectFlagsStruct, req_cond="ncp.info_flags_flags == TRUE"),
9061                 srec(ObjectNameStruct, req_cond="ncp.info_flags_name == TRUE"),
9062         ])
9063         pkt.ReqCondSizeVariable()
9064         pkt.CompletionCodes([0x0000, 0x9600, 0xef01, 0xfc02, 0xfe01, 0xff00])
9065         # 2222/1721, 23/33
9066         pkt = NCP(0x1721, "Generate GUIDs", 'nds')
9067         pkt.Request( 14, [
9068                 rec( 10, 4, ReturnInfoCount ),
9069         ])
9070         pkt.Reply(28, [
9071                 rec( 8, 4, ReturnInfoCount, var="x" ),
9072                 rec( 12, 16, GUID, repeat="x" ),
9073         ])
9074         pkt.CompletionCodes([0x0000])
9075         # 2222/1732, 23/50
9076         pkt = NCP(0x1732, "Create Bindery Object", 'bindery')
9077         pkt.Request( (15,62), [
9078                 rec( 10, 1, ObjectFlags ),
9079                 rec( 11, 1, ObjectSecurity ),
9080                 rec( 12, 2, ObjectType, BE ),
9081                 rec( 14, (1,48), ObjectName ),
9082         ], info_str=(ObjectName, "Create Bindery Object: %s", ", %s"))
9083         pkt.Reply(8)
9084         pkt.CompletionCodes([0x0000, 0x9600, 0xe700, 0xee00, 0xef00, 0xf101, 0xf501,
9085                              0xfc06, 0xfe07, 0xff00])
9086         # 2222/1733, 23/51
9087         pkt = NCP(0x1733, "Delete Bindery Object", 'bindery')
9088         pkt.Request( (13,60), [
9089                 rec( 10, 2, ObjectType, BE ),
9090                 rec( 12, (1,48), ObjectName ),
9091         ], info_str=(ObjectName, "Delete Bindery Object: %s", ", %s"))
9092         pkt.Reply(8)
9093         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf200, 0xf400, 0xf600, 0xfb00,
9094                              0xfc06, 0xfe07, 0xff00])
9095         # 2222/1734, 23/52
9096         pkt = NCP(0x1734, "Rename Bindery Object", 'bindery')
9097         pkt.Request( (14,108), [
9098                 rec( 10, 2, ObjectType, BE ),
9099                 rec( 12, (1,48), ObjectName ),
9100                 rec( -1, (1,48), NewObjectName ),
9101         ], info_str=(ObjectName, "Rename Bindery Object: %s", ", %s"))
9102         pkt.Reply(8)
9103         pkt.CompletionCodes([0x0000, 0x9600, 0xee00, 0xf000, 0xf300, 0xfc06, 0xfe07, 0xff00])
9104         # 2222/1735, 23/53
9105         pkt = NCP(0x1735, "Get Bindery Object ID", 'bindery')
9106         pkt.Request((13,60), [
9107                 rec( 10, 2, ObjectType, BE ),
9108                 rec( 12, (1,48), ObjectName ),
9109         ], info_str=(ObjectName, "Get Bindery Object: %s", ", %s"))
9110         pkt.Reply(62, [
9111                 rec( 8, 4, ObjectID, BE ),
9112                 rec( 12, 2, ObjectType, BE ),
9113                 rec( 14, 48, ObjectNameLen ),
9114         ])
9115         pkt.CompletionCodes([0x0000, 0x9600, 0xef01, 0xf000, 0xfc02, 0xfe01, 0xff00])
9116         # 2222/1736, 23/54
9117         pkt = NCP(0x1736, "Get Bindery Object Name", 'bindery')
9118         pkt.Request( 14, [
9119                 rec( 10, 4, ObjectID, BE ),
9120         ])
9121         pkt.Reply( 62, [
9122                 rec( 8, 4, ObjectID, BE ),
9123                 rec( 12, 2, ObjectType, BE ),
9124                 rec( 14, 48, ObjectNameLen ),
9125         ])
9126         pkt.CompletionCodes([0x0000, 0x9600, 0xf101, 0xfc02, 0xfe01, 0xff00])
9127         # 2222/1737, 23/55
9128         pkt = NCP(0x1737, "Scan Bindery Object", 'bindery')
9129         pkt.Request((17,64), [
9130                 rec( 10, 4, ObjectID, BE ),
9131                 rec( 14, 2, ObjectType, BE ),
9132                 rec( 16, (1,48), ObjectName ),
9133         ], info_str=(ObjectName, "Scan Bindery Object: %s", ", %s"))
9134         pkt.Reply(65, [
9135                 rec( 8, 4, ObjectID, BE ),
9136                 rec( 12, 2, ObjectType, BE ),
9137                 rec( 14, 48, ObjectNameLen ),
9138                 rec( 62, 1, ObjectFlags ),
9139                 rec( 63, 1, ObjectSecurity ),
9140                 rec( 64, 1, ObjectHasProperties ),
9141         ])
9142         pkt.CompletionCodes([0x0000, 0x9600, 0xef01, 0xfc02,
9143                              0xfe01, 0xff00])
9144         # 2222/1738, 23/56
9145         pkt = NCP(0x1738, "Change Bindery Object Security", 'bindery')
9146         pkt.Request((14,61), [
9147                 rec( 10, 1, ObjectSecurity ),
9148                 rec( 11, 2, ObjectType, BE ),
9149                 rec( 13, (1,48), ObjectName ),
9150         ], info_str=(ObjectName, "Change Bindery Object Security: %s", ", %s"))
9151         pkt.Reply(8)
9152         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf501, 0xfc02, 0xfe01, 0xff00])
9153         # 2222/1739, 23/57
9154         pkt = NCP(0x1739, "Create Property", 'bindery')
9155         pkt.Request((16,78), [
9156                 rec( 10, 2, ObjectType, BE ),
9157                 rec( 12, (1,48), ObjectName ),
9158                 rec( -1, 1, PropertyType ),
9159                 rec( -1, 1, ObjectSecurity ),
9160                 rec( -1, (1,16), PropertyName ),
9161         ], info_str=(PropertyName, "Create Property: %s", ", %s"))
9162         pkt.Reply(8)
9163         pkt.CompletionCodes([0x0000, 0x9600, 0xed00, 0xef00, 0xf000, 0xf101,
9164                              0xf200, 0xf600, 0xf700, 0xfb00, 0xfc02, 0xfe01,
9165                              0xff00])
9166         # 2222/173A, 23/58
9167         pkt = NCP(0x173A, "Delete Property", 'bindery')
9168         pkt.Request((14,76), [
9169                 rec( 10, 2, ObjectType, BE ),
9170                 rec( 12, (1,48), ObjectName ),
9171                 rec( -1, (1,16), PropertyName ),
9172         ], info_str=(PropertyName, "Delete Property: %s", ", %s"))
9173         pkt.Reply(8)
9174         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf600, 0xfb00, 0xfc02,
9175                              0xfe01, 0xff00])
9176         # 2222/173B, 23/59
9177         pkt = NCP(0x173B, "Change Property Security", 'bindery')
9178         pkt.Request((15,77), [
9179                 rec( 10, 2, ObjectType, BE ),
9180                 rec( 12, (1,48), ObjectName ),
9181                 rec( -1, 1, ObjectSecurity ),
9182                 rec( -1, (1,16), PropertyName ),
9183         ], info_str=(PropertyName, "Change Property Security: %s", ", %s"))
9184         pkt.Reply(8)
9185         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf200, 0xf600, 0xfb00,
9186                              0xfc02, 0xfe01, 0xff00])
9187         # 2222/173C, 23/60
9188         pkt = NCP(0x173C, "Scan Property", 'bindery')
9189         pkt.Request((18,80), [
9190                 rec( 10, 2, ObjectType, BE ),
9191                 rec( 12, (1,48), ObjectName ),
9192                 rec( -1, 4, LastInstance, BE ),
9193                 rec( -1, (1,16), PropertyName ),
9194         ], info_str=(PropertyName, "Scan Property: %s", ", %s"))
9195         pkt.Reply( 32, [
9196                 rec( 8, 16, PropertyName16 ),
9197                 rec( 24, 1, ObjectFlags ),
9198                 rec( 25, 1, ObjectSecurity ),
9199                 rec( 26, 4, SearchInstance, BE ),
9200                 rec( 30, 1, ValueAvailable ),
9201                 rec( 31, 1, MoreProperties ),
9202         ])
9203         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf200, 0xf600, 0xfb00,
9204                              0xfc02, 0xfe01, 0xff00])
9205         # 2222/173D, 23/61
9206         pkt = NCP(0x173D, "Read Property Value", 'bindery')
9207         pkt.Request((15,77), [
9208                 rec( 10, 2, ObjectType, BE ),
9209                 rec( 12, (1,48), ObjectName ),
9210                 rec( -1, 1, PropertySegment ),
9211                 rec( -1, (1,16), PropertyName ),
9212         ], info_str=(PropertyName, "Read Property Value: %s", ", %s"))
9213         pkt.Reply(138, [
9214                 rec( 8, 128, PropertyData ),
9215                 rec( 136, 1, PropertyHasMoreSegments ),
9216                 rec( 137, 1, PropertyType ),
9217         ])
9218         pkt.CompletionCodes([0x0000, 0x8800, 0x9300, 0x9600, 0xec01,
9219                              0xf000, 0xf100, 0xf900, 0xfb02, 0xfc02,
9220                              0xfe01, 0xff00])
9221         # 2222/173E, 23/62
9222         pkt = NCP(0x173E, "Write Property Value", 'bindery')
9223         pkt.Request((144,206), [
9224                 rec( 10, 2, ObjectType, BE ),
9225                 rec( 12, (1,48), ObjectName ),
9226                 rec( -1, 1, PropertySegment ),
9227                 rec( -1, 1, MoreFlag ),
9228                 rec( -1, (1,16), PropertyName ),
9229                 rec( -1, 128, PropertyValue ),
9230         ], info_str=(PropertyName, "Write Property Value: %s", ", %s"))
9231         pkt.Reply(8)
9232         pkt.CompletionCodes([0x0000, 0x9600, 0xe800, 0xec01, 0xf000, 0xf800,
9233                              0xfb02, 0xfc03, 0xfe01, 0xff00 ])
9234         # 2222/173F, 23/63
9235         pkt = NCP(0x173F, "Verify Bindery Object Password", 'bindery')
9236         pkt.Request((14,92), [
9237                 rec( 10, 2, ObjectType, BE ),
9238                 rec( 12, (1,48), ObjectName ),
9239                 rec( -1, (1,32), Password ),
9240         ], info_str=(ObjectName, "Verify Bindery Object Password: %s", ", %s"))
9241         pkt.Reply(8)
9242         pkt.CompletionCodes([0x0000, 0x9600, 0xe800, 0xec01, 0xf000, 0xf101,
9243                              0xfb02, 0xfc03, 0xfe01, 0xff00 ])
9244         # 2222/1740, 23/64
9245         pkt = NCP(0x1740, "Change Bindery Object Password", 'bindery')
9246         pkt.Request((15,124), [
9247                 rec( 10, 2, ObjectType, BE ),
9248                 rec( 12, (1,48), ObjectName ),
9249                 rec( -1, (1,32), Password ),
9250                 rec( -1, (1,32), NewPassword ),
9251         ], info_str=(ObjectName, "Change Bindery Object Password: %s", ", %s"))
9252         pkt.Reply(8)
9253         pkt.CompletionCodes([0x0000, 0x9600, 0xc501, 0xd701, 0xe800, 0xec01, 0xf001,
9254                              0xf100, 0xf800, 0xfb02, 0xfc03, 0xfe01, 0xff00])
9255         # 2222/1741, 23/65
9256         pkt = NCP(0x1741, "Add Bindery Object To Set", 'bindery')
9257         pkt.Request((19,128), [
9258                 rec( 10, 2, ObjectType, BE ),
9259                 rec( 12, (1,48), ObjectName ),
9260                 rec( -1, (1,16), PropertyName ),
9261                 rec( -1, 4, MemberType, BE ),
9262                 rec( -1, (1,48), MemberName ),
9263         ], info_str=(MemberName, "Add Bindery Object to Set: %s", ", %s"))
9264         pkt.Reply(8)
9265         pkt.CompletionCodes([0x0000, 0x9600, 0xe800, 0xe900, 0xea00, 0xeb00,
9266                              0xec01, 0xf000, 0xf800, 0xfb02, 0xfc03, 0xfe01,
9267                              0xff00])
9268         # 2222/1742, 23/66
9269         pkt = NCP(0x1742, "Delete Bindery Object From Set", 'bindery')
9270         pkt.Request((19,128), [
9271                 rec( 10, 2, ObjectType, BE ),
9272                 rec( 12, (1,48), ObjectName ),
9273                 rec( -1, (1,16), PropertyName ),
9274                 rec( -1, 4, MemberType, BE ),
9275                 rec( -1, (1,48), MemberName ),
9276         ], info_str=(MemberName, "Delete Bindery Object from Set: %s", ", %s"))
9277         pkt.Reply(8)
9278         pkt.CompletionCodes([0x0000, 0x9600, 0xeb00, 0xf000, 0xf800, 0xfb02,
9279                              0xfc03, 0xfe01, 0xff00])
9280         # 2222/1743, 23/67
9281         pkt = NCP(0x1743, "Is Bindery Object In Set", 'bindery')
9282         pkt.Request((19,128), [
9283                 rec( 10, 2, ObjectType, BE ),
9284                 rec( 12, (1,48), ObjectName ),
9285                 rec( -1, (1,16), PropertyName ),
9286                 rec( -1, 4, MemberType, BE ),
9287                 rec( -1, (1,48), MemberName ),
9288         ], info_str=(MemberName, "Is Bindery Object in Set: %s", ", %s"))
9289         pkt.Reply(8)
9290         pkt.CompletionCodes([0x0000, 0x9600, 0xea00, 0xeb00, 0xec01, 0xf000,
9291                              0xfb02, 0xfc03, 0xfe01, 0xff00])
9292         # 2222/1744, 23/68
9293         pkt = NCP(0x1744, "Close Bindery", 'bindery')
9294         pkt.Request(10)
9295         pkt.Reply(8)
9296         pkt.CompletionCodes([0x0000, 0xff00])
9297         # 2222/1745, 23/69
9298         pkt = NCP(0x1745, "Open Bindery", 'bindery')
9299         pkt.Request(10)
9300         pkt.Reply(8)
9301         pkt.CompletionCodes([0x0000, 0xff00])
9302         # 2222/1746, 23/70
9303         pkt = NCP(0x1746, "Get Bindery Access Level", 'bindery')
9304         pkt.Request(10)
9305         pkt.Reply(13, [
9306                 rec( 8, 1, ObjectSecurity ),
9307                 rec( 9, 4, LoggedObjectID, BE ),
9308         ])
9309         pkt.CompletionCodes([0x0000, 0x9600])
9310         # 2222/1747, 23/71
9311         pkt = NCP(0x1747, "Scan Bindery Object Trustee Paths", 'bindery')
9312         pkt.Request(17, [
9313                 rec( 10, 1, VolumeNumber ),
9314                 rec( 11, 2, LastSequenceNumber, BE ),
9315                 rec( 13, 4, ObjectID, BE ),
9316         ])
9317         pkt.Reply((16,270), [
9318                 rec( 8, 2, LastSequenceNumber, BE),
9319                 rec( 10, 4, ObjectID, BE ),
9320                 rec( 14, 1, ObjectSecurity ),
9321                 rec( 15, (1,255), Path ),
9322         ])
9323         pkt.CompletionCodes([0x0000, 0x9300, 0x9600, 0xa100, 0xf000, 0xf100,
9324                              0xf200, 0xfc02, 0xfe01, 0xff00])
9325         # 2222/1748, 23/72
9326         pkt = NCP(0x1748, "Get Bindery Object Access Level", 'bindery')
9327         pkt.Request(14, [
9328                 rec( 10, 4, ObjectID, BE ),
9329         ])
9330         pkt.Reply(9, [
9331                 rec( 8, 1, ObjectSecurity ),
9332         ])
9333         pkt.CompletionCodes([0x0000, 0x9600])
9334         # 2222/1749, 23/73
9335         pkt = NCP(0x1749, "Is Calling Station a Manager", 'bindery')
9336         pkt.Request(10)
9337         pkt.Reply(8)
9338         pkt.CompletionCodes([0x0003, 0xff1e])
9339         # 2222/174A, 23/74
9340         pkt = NCP(0x174A, "Keyed Verify Password", 'bindery')
9341         pkt.Request((21,68), [
9342                 rec( 10, 8, LoginKey ),
9343                 rec( 18, 2, ObjectType, BE ),
9344                 rec( 20, (1,48), ObjectName ),
9345         ], info_str=(ObjectName, "Keyed Verify Password: %s", ", %s"))
9346         pkt.Reply(8)
9347         pkt.CompletionCodes([0x0000, 0xc500, 0xfe01, 0xff0c])
9348         # 2222/174B, 23/75
9349         pkt = NCP(0x174B, "Keyed Change Password", 'bindery')
9350         pkt.Request((22,100), [
9351                 rec( 10, 8, LoginKey ),
9352                 rec( 18, 2, ObjectType, BE ),
9353                 rec( 20, (1,48), ObjectName ),
9354                 rec( -1, (1,32), Password ),
9355         ], info_str=(ObjectName, "Keyed Change Password: %s", ", %s"))
9356         pkt.Reply(8)
9357         pkt.CompletionCodes([0x0000, 0xc500, 0xfe01, 0xff0c])
9358         # 2222/174C, 23/76
9359         pkt = NCP(0x174C, "List Relations Of an Object", 'bindery')
9360         pkt.Request((18,80), [
9361                 rec( 10, 4, LastSeen, BE ),
9362                 rec( 14, 2, ObjectType, BE ),
9363                 rec( 16, (1,48), ObjectName ),
9364                 rec( -1, (1,16), PropertyName ),
9365         ], info_str=(ObjectName, "List Relations of an Object: %s", ", %s"))
9366         pkt.Reply(14, [
9367                 rec( 8, 2, RelationsCount, BE, var="x" ),
9368                 rec( 10, 4, ObjectID, BE, repeat="x" ),
9369         ])
9370         pkt.CompletionCodes([0x0000, 0xf000, 0xf200, 0xfe01, 0xff00])
9371         # 2222/1764, 23/100
9372         pkt = NCP(0x1764, "Create Queue", 'qms')
9373         pkt.Request((15,316), [
9374                 rec( 10, 2, QueueType, BE ),
9375                 rec( 12, (1,48), QueueName ),
9376                 rec( -1, 1, PathBase ),
9377                 rec( -1, (1,255), Path ),
9378         ], info_str=(QueueName, "Create Queue: %s", ", %s"))
9379         pkt.Reply(12, [
9380                 rec( 8, 4, QueueID, BE ),
9381         ])
9382         pkt.CompletionCodes([0x0000, 0x9600, 0x9900, 0xd000, 0xd100,
9383                              0xd200, 0xd300, 0xd400, 0xd500, 0xd601,
9384                              0xd703, 0xd800, 0xd902, 0xda01, 0xdb02,
9385                              0xee00, 0xff00])
9386         # 2222/1765, 23/101
9387         pkt = NCP(0x1765, "Destroy Queue", 'qms')
9388         pkt.Request(14, [
9389                 rec( 10, 4, QueueID, BE ),
9390         ])
9391         pkt.Reply(8)
9392         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9393                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9394                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9395         # 2222/1766, 23/102
9396         pkt = NCP(0x1766, "Read Queue Current Status", 'qms')
9397         pkt.Request(14, [
9398                 rec( 10, 4, QueueID, BE ),
9399         ])
9400         pkt.Reply(20, [
9401                 rec( 8, 4, QueueID, BE ),
9402                 rec( 12, 1, QueueStatus ),
9403                 rec( 13, 1, CurrentEntries ),
9404                 rec( 14, 1, CurrentServers, var="x" ),
9405                 rec( 15, 4, ServerIDList, repeat="x" ),
9406                 rec( 19, 1, ServerStationList, repeat="x" ),
9407         ])
9408         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9409                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9410                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9411         # 2222/1767, 23/103
9412         pkt = NCP(0x1767, "Set Queue Current Status", 'qms')
9413         pkt.Request(15, [
9414                 rec( 10, 4, QueueID, BE ),
9415                 rec( 14, 1, QueueStatus ),
9416         ])
9417         pkt.Reply(8)
9418         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9419                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9420                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07,
9421                              0xff00])
9422         # 2222/1768, 23/104
9423         pkt = NCP(0x1768, "Create Queue Job And File", 'qms')
9424         pkt.Request(264, [
9425                 rec( 10, 4, QueueID, BE ),
9426                 rec( 14, 250, JobStruct ),
9427         ])
9428         pkt.Reply(62, [
9429                 rec( 8, 1, ClientStation ),
9430                 rec( 9, 1, ClientTaskNumber ),
9431                 rec( 10, 4, ClientIDNumber, BE ),
9432                 rec( 14, 4, TargetServerIDNumber, BE ),
9433                 rec( 18, 6, TargetExecutionTime ),
9434                 rec( 24, 6, JobEntryTime ),
9435                 rec( 30, 2, JobNumber, BE ),
9436                 rec( 32, 2, JobType, BE ),
9437                 rec( 34, 1, JobPosition ),
9438                 rec( 35, 1, JobControlFlags ),
9439                 rec( 36, 14, JobFileName ),
9440                 rec( 50, 6, JobFileHandle ),
9441                 rec( 56, 1, ServerStation ),
9442                 rec( 57, 1, ServerTaskNumber ),
9443                 rec( 58, 4, ServerID, BE ),
9444         ])              
9445         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9446                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9447                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07,
9448                              0xff00])
9449         # 2222/1769, 23/105
9450         pkt = NCP(0x1769, "Close File And Start Queue Job", 'qms')
9451         pkt.Request(16, [
9452                 rec( 10, 4, QueueID, BE ),
9453                 rec( 14, 2, JobNumber, BE ),
9454         ])
9455         pkt.Reply(8)
9456         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9457                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9458                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9459         # 2222/176A, 23/106
9460         pkt = NCP(0x176A, "Remove Job From Queue", 'qms')
9461         pkt.Request(16, [
9462                 rec( 10, 4, QueueID, BE ),
9463                 rec( 14, 2, JobNumber, BE ),
9464         ])
9465         pkt.Reply(8)
9466         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9467                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9468                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9469         # 2222/176B, 23/107
9470         pkt = NCP(0x176B, "Get Queue Job List", 'qms')
9471         pkt.Request(14, [
9472                 rec( 10, 4, QueueID, BE ),
9473         ])
9474         pkt.Reply(12, [
9475                 rec( 8, 2, JobCount, BE, var="x" ),
9476                 rec( 10, 2, JobNumber, BE, repeat="x" ),
9477         ])
9478         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9479                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9480                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9481         # 2222/176C, 23/108
9482         pkt = NCP(0x176C, "Read Queue Job Entry", 'qms')
9483         pkt.Request(16, [
9484                 rec( 10, 4, QueueID, BE ),
9485                 rec( 14, 2, JobNumber, BE ),
9486         ])
9487         pkt.Reply(258, [
9488             rec( 8, 250, JobStruct ),
9489         ])              
9490         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9491                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9492                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9493         # 2222/176D, 23/109
9494         pkt = NCP(0x176D, "Change Queue Job Entry", 'qms')
9495         pkt.Request(260, [
9496             rec( 14, 250, JobStruct ),
9497         ])
9498         pkt.Reply(8)            
9499         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9500                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9501                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9502         # 2222/176E, 23/110
9503         pkt = NCP(0x176E, "Change Queue Job Position", 'qms')
9504         pkt.Request(17, [
9505                 rec( 10, 4, QueueID, BE ),
9506                 rec( 14, 2, JobNumber, BE ),
9507                 rec( 16, 1, NewPosition ),
9508         ])
9509         pkt.Reply(8)
9510         pkt.CompletionCodes([0x0000, 0x9600, 0xd000, 0xd100, 0xd500,
9511                              0xd601, 0xfe07, 0xff1f])
9512         # 2222/176F, 23/111
9513         pkt = NCP(0x176F, "Attach Queue Server To Queue", 'qms')
9514         pkt.Request(14, [
9515                 rec( 10, 4, QueueID, BE ),
9516         ])
9517         pkt.Reply(8)
9518         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9519                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9520                              0xd800, 0xd902, 0xda01, 0xdb02, 0xea00,
9521                              0xfc06, 0xff00])
9522         # 2222/1770, 23/112
9523         pkt = NCP(0x1770, "Detach Queue Server From Queue", 'qms')
9524         pkt.Request(14, [
9525                 rec( 10, 4, QueueID, BE ),
9526         ])
9527         pkt.Reply(8)
9528         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9529                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9530                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9531         # 2222/1771, 23/113
9532         pkt = NCP(0x1771, "Service Queue Job", 'qms')
9533         pkt.Request(16, [
9534                 rec( 10, 4, QueueID, BE ),
9535                 rec( 14, 2, ServiceType, BE ),
9536         ])
9537         pkt.Reply(62, [
9538                 rec( 8, 1, ClientStation ),
9539                 rec( 9, 1, ClientTaskNumber ),
9540                 rec( 10, 4, ClientIDNumber, BE ),
9541                 rec( 14, 4, TargetServerIDNumber, BE ),
9542                 rec( 18, 6, TargetExecutionTime ),
9543                 rec( 24, 6, JobEntryTime ),
9544                 rec( 30, 2, JobNumber, BE ),
9545                 rec( 32, 2, JobType, BE ),
9546                 rec( 34, 1, JobPosition ),
9547                 rec( 35, 1, JobControlFlags ),
9548                 rec( 36, 14, JobFileName ),
9549                 rec( 50, 6, JobFileHandle ),
9550                 rec( 56, 1, ServerStation ),
9551                 rec( 57, 1, ServerTaskNumber ),
9552                 rec( 58, 4, ServerID, BE ),
9553         ])              
9554         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9555                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9556                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9557         # 2222/1772, 23/114
9558         pkt = NCP(0x1772, "Finish Servicing Queue Job", 'qms')
9559         pkt.Request(20, [
9560                 rec( 10, 4, QueueID, BE ),
9561                 rec( 14, 2, JobNumber, BE ),
9562                 rec( 16, 4, ChargeInformation, BE ),
9563         ])
9564         pkt.Reply(8)            
9565         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9566                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9567                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9568         # 2222/1773, 23/115
9569         pkt = NCP(0x1773, "Abort Servicing Queue Job", 'qms')
9570         pkt.Request(16, [
9571                 rec( 10, 4, QueueID, BE ),
9572                 rec( 14, 2, JobNumber, BE ),
9573         ])
9574         pkt.Reply(8)            
9575         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9576                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9577                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9578         # 2222/1774, 23/116
9579         pkt = NCP(0x1774, "Change To Client Rights", 'qms')
9580         pkt.Request(16, [
9581                 rec( 10, 4, QueueID, BE ),
9582                 rec( 14, 2, JobNumber, BE ),
9583         ])
9584         pkt.Reply(8)            
9585         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9586                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9587                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9588         # 2222/1775, 23/117
9589         pkt = NCP(0x1775, "Restore Queue Server Rights", 'qms')
9590         pkt.Request(10)
9591         pkt.Reply(8)            
9592         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9593                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9594                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9595         # 2222/1776, 23/118
9596         pkt = NCP(0x1776, "Read Queue Server Current Status", 'qms')
9597         pkt.Request(19, [
9598                 rec( 10, 4, QueueID, BE ),
9599                 rec( 14, 4, ServerID, BE ),
9600                 rec( 18, 1, ServerStation ),
9601         ])
9602         pkt.Reply(72, [
9603                 rec( 8, 64, ServerStatusRecord ),
9604         ])
9605         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9606                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9607                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9608         # 2222/1777, 23/119
9609         pkt = NCP(0x1777, "Set Queue Server Current Status", 'qms')
9610         pkt.Request(78, [
9611                 rec( 10, 4, QueueID, BE ),
9612                 rec( 14, 64, ServerStatusRecord ),
9613         ])
9614         pkt.Reply(8)
9615         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9616                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9617                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9618         # 2222/1778, 23/120
9619         pkt = NCP(0x1778, "Get Queue Job File Size", 'qms')
9620         pkt.Request(16, [
9621                 rec( 10, 4, QueueID, BE ),
9622                 rec( 14, 2, JobNumber, BE ),
9623         ])
9624         pkt.Reply(20, [
9625                 rec( 8, 4, QueueID, BE ),
9626                 rec( 12, 4, JobNumberLong ),
9627                 rec( 16, 4, FileSize, BE ),
9628         ])
9629         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9630                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9631                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9632         # 2222/1779, 23/121
9633         pkt = NCP(0x1779, "Create Queue Job And File", 'qms')
9634         pkt.Request(264, [
9635                 rec( 10, 4, QueueID, BE ),
9636                 rec( 14, 250, JobStruct ),
9637         ])
9638         pkt.Reply(94, [
9639                 rec( 8, 86, JobStructNew ),
9640         ])              
9641         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9642                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9643                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9644         # 2222/177A, 23/122
9645         pkt = NCP(0x177A, "Read Queue Job Entry", 'qms')
9646         pkt.Request(18, [
9647                 rec( 10, 4, QueueID, BE ),
9648                 rec( 14, 4, JobNumberLong ),
9649         ])
9650         pkt.Reply(258, [
9651             rec( 8, 250, JobStruct ),
9652         ])              
9653         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9654                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9655                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9656         # 2222/177B, 23/123
9657         pkt = NCP(0x177B, "Change Queue Job Entry", 'qms')
9658         pkt.Request(264, [
9659                 rec( 10, 4, QueueID, BE ),
9660                 rec( 14, 250, JobStruct ),
9661         ])
9662         pkt.Reply(8)            
9663         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9664                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9665                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07, 0xff00])
9666         # 2222/177C, 23/124
9667         pkt = NCP(0x177C, "Service Queue Job", 'qms')
9668         pkt.Request(16, [
9669                 rec( 10, 4, QueueID, BE ),
9670                 rec( 14, 2, ServiceType ),
9671         ])
9672         pkt.Reply(94, [
9673             rec( 8, 86, JobStructNew ),
9674         ])              
9675         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9676                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9677                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9678         # 2222/177D, 23/125
9679         pkt = NCP(0x177D, "Read Queue Current Status", 'qms')
9680         pkt.Request(14, [
9681                 rec( 10, 4, QueueID, BE ),
9682         ])
9683         pkt.Reply(32, [
9684                 rec( 8, 4, QueueID, BE ),
9685                 rec( 12, 1, QueueStatus ),
9686                 rec( 13, 3, Reserved3 ),
9687                 rec( 16, 4, CurrentEntries ),
9688                 rec( 20, 4, CurrentServers, var="x" ),
9689                 rec( 24, 4, ServerIDList, repeat="x" ),
9690                 rec( 28, 4, ServerStationList, repeat="x" ),
9691         ])
9692         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9693                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9694                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9695         # 2222/177E, 23/126
9696         pkt = NCP(0x177E, "Set Queue Current Status", 'qms')
9697         pkt.Request(15, [
9698                 rec( 10, 4, QueueID, BE ),
9699                 rec( 14, 1, QueueStatus ),
9700         ])
9701         pkt.Reply(8)
9702         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9703                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9704                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9705         # 2222/177F, 23/127
9706         pkt = NCP(0x177F, "Close File And Start Queue Job", 'qms')
9707         pkt.Request(18, [
9708                 rec( 10, 4, QueueID, BE ),
9709                 rec( 14, 4, JobNumberLong ),
9710         ])
9711         pkt.Reply(8)
9712         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9713                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9714                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9715         # 2222/1780, 23/128
9716         pkt = NCP(0x1780, "Remove Job From Queue", 'qms')
9717         pkt.Request(18, [
9718                 rec( 10, 4, QueueID, BE ),
9719                 rec( 14, 4, JobNumberLong ),
9720         ])
9721         pkt.Reply(8)
9722         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9723                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9724                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9725         # 2222/1781, 23/129
9726         pkt = NCP(0x1781, "Get Queue Job List", 'qms')
9727         pkt.Request(18, [
9728                 rec( 10, 4, QueueID, BE ),
9729                 rec( 14, 4, JobNumberLong ),
9730         ])
9731         pkt.Reply(20, [
9732                 rec( 8, 4, TotalQueueJobs ),
9733                 rec( 12, 4, ReplyQueueJobNumbers, var="x" ),
9734                 rec( 16, 4, JobNumberList, repeat="x" ),
9735         ])
9736         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9737                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9738                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9739         # 2222/1782, 23/130
9740         pkt = NCP(0x1782, "Change Job Priority", 'qms')
9741         pkt.Request(22, [
9742                 rec( 10, 4, QueueID, BE ),
9743                 rec( 14, 4, JobNumberLong ),
9744                 rec( 18, 4, Priority ),
9745         ])
9746         pkt.Reply(8)
9747         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9748                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9749                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9750         # 2222/1783, 23/131
9751         pkt = NCP(0x1783, "Finish Servicing Queue Job", 'qms')
9752         pkt.Request(22, [
9753                 rec( 10, 4, QueueID, BE ),
9754                 rec( 14, 4, JobNumberLong ),
9755                 rec( 18, 4, ChargeInformation ),
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/1784, 23/132
9762         pkt = NCP(0x1784, "Abort Servicing Queue Job", '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, 0xff18])
9771         # 2222/1785, 23/133
9772         pkt = NCP(0x1785, "Change To Client Rights", 'qms')
9773         pkt.Request(18, [
9774                 rec( 10, 4, QueueID, BE ),
9775                 rec( 14, 4, JobNumberLong ),
9776         ])
9777         pkt.Reply(8)            
9778         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9779                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9780                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9781         # 2222/1786, 23/134
9782         pkt = NCP(0x1786, "Read Queue Server Current Status", 'qms')
9783         pkt.Request(22, [
9784                 rec( 10, 4, QueueID, BE ),
9785                 rec( 14, 4, ServerID, BE ),
9786                 rec( 18, 4, ServerStation ),
9787         ])
9788         pkt.Reply(72, [
9789                 rec( 8, 64, ServerStatusRecord ),
9790         ])
9791         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9792                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9793                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9794         # 2222/1787, 23/135
9795         pkt = NCP(0x1787, "Get Queue Job File Size", 'qms')
9796         pkt.Request(18, [
9797                 rec( 10, 4, QueueID, BE ),
9798                 rec( 14, 4, JobNumberLong ),
9799         ])
9800         pkt.Reply(20, [
9801                 rec( 8, 4, QueueID, BE ),
9802                 rec( 12, 4, JobNumberLong ),
9803                 rec( 16, 4, FileSize, BE ),
9804         ])
9805         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9806                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9807                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9808         # 2222/1788, 23/136
9809         pkt = NCP(0x1788, "Move Queue Job From Src Q to Dst Q", 'qms')
9810         pkt.Request(22, [
9811                 rec( 10, 4, QueueID, BE ),
9812                 rec( 14, 4, JobNumberLong ),
9813                 rec( 18, 4, DstQueueID, BE ),
9814         ])
9815         pkt.Reply(12, [
9816                 rec( 8, 4, JobNumberLong ),
9817         ])
9818         pkt.CompletionCodes([0x0000, 0x7e01, 0xfc06])
9819         # 2222/1789, 23/137
9820         pkt = NCP(0x1789, "Get Queue Jobs From Form List", 'qms')
9821         pkt.Request(24, [
9822                 rec( 10, 4, QueueID, BE ),
9823                 rec( 14, 4, QueueStartPosition ),
9824                 rec( 18, 4, FormTypeCnt, var="x" ),
9825                 rec( 22, 2, FormType, repeat="x" ),
9826         ])
9827         pkt.Reply(20, [
9828                 rec( 8, 4, TotalQueueJobs ),
9829                 rec( 12, 4, JobCount, var="x" ),
9830                 rec( 16, 4, JobNumberList, repeat="x" ),
9831         ])
9832         pkt.CompletionCodes([0x0000, 0x7e01, 0xfc06])
9833         # 2222/178A, 23/138
9834         pkt = NCP(0x178A, "Service Queue Job By Form List", 'qms')
9835         pkt.Request(24, [
9836                 rec( 10, 4, QueueID, BE ),
9837                 rec( 14, 4, QueueStartPosition ),
9838                 rec( 18, 4, FormTypeCnt, var= "x" ),
9839                 rec( 22, 2, FormType, repeat="x" ),
9840         ])
9841         pkt.Reply(94, [
9842            rec( 8, 86, JobStructNew ),
9843         ])              
9844         pkt.CompletionCodes([0x0000, 0x7e01, 0xfc06])
9845         # 2222/1796, 23/150
9846         pkt = NCP(0x1796, "Get Current Account Status", 'accounting')
9847         pkt.Request((13,60), [
9848                 rec( 10, 2, ObjectType, BE ),
9849                 rec( 12, (1,48), ObjectName ),
9850         ], info_str=(ObjectName, "Get Current Account Status: %s", ", %s"))
9851         pkt.Reply(264, [
9852                 rec( 8, 4, AccountBalance, BE ),
9853                 rec( 12, 4, CreditLimit, BE ),
9854                 rec( 16, 120, Reserved120 ),
9855                 rec( 136, 4, HolderID, BE ),
9856                 rec( 140, 4, HoldAmount, BE ),
9857                 rec( 144, 4, HolderID, BE ),
9858                 rec( 148, 4, HoldAmount, BE ),
9859                 rec( 152, 4, HolderID, BE ),
9860                 rec( 156, 4, HoldAmount, BE ),
9861                 rec( 160, 4, HolderID, BE ),
9862                 rec( 164, 4, HoldAmount, BE ),
9863                 rec( 168, 4, HolderID, BE ),
9864                 rec( 172, 4, HoldAmount, BE ),
9865                 rec( 176, 4, HolderID, BE ),
9866                 rec( 180, 4, HoldAmount, BE ),
9867                 rec( 184, 4, HolderID, BE ),
9868                 rec( 188, 4, HoldAmount, BE ),
9869                 rec( 192, 4, HolderID, BE ),
9870                 rec( 196, 4, HoldAmount, BE ),
9871                 rec( 200, 4, HolderID, BE ),
9872                 rec( 204, 4, HoldAmount, BE ),
9873                 rec( 208, 4, HolderID, BE ),
9874                 rec( 212, 4, HoldAmount, BE ),
9875                 rec( 216, 4, HolderID, BE ),
9876                 rec( 220, 4, HoldAmount, BE ),
9877                 rec( 224, 4, HolderID, BE ),
9878                 rec( 228, 4, HoldAmount, BE ),
9879                 rec( 232, 4, HolderID, BE ),
9880                 rec( 236, 4, HoldAmount, BE ),
9881                 rec( 240, 4, HolderID, BE ),
9882                 rec( 244, 4, HoldAmount, BE ),
9883                 rec( 248, 4, HolderID, BE ),
9884                 rec( 252, 4, HoldAmount, BE ),
9885                 rec( 256, 4, HolderID, BE ),
9886                 rec( 260, 4, HoldAmount, BE ),
9887         ])              
9888         pkt.CompletionCodes([0x0000, 0x9600, 0xc000, 0xc101, 0xc400, 0xe800,
9889                              0xea00, 0xeb00, 0xec00, 0xfc06, 0xfe07, 0xff00])
9890         # 2222/1797, 23/151
9891         pkt = NCP(0x1797, "Submit Account Charge", 'accounting')
9892         pkt.Request((26,327), [
9893                 rec( 10, 2, ServiceType, BE ),
9894                 rec( 12, 4, ChargeAmount, BE ),
9895                 rec( 16, 4, HoldCancelAmount, BE ),
9896                 rec( 20, 2, ObjectType, BE ),
9897                 rec( 22, 2, CommentType, BE ),
9898                 rec( 24, (1,48), ObjectName ),
9899                 rec( -1, (1,255), Comment ),
9900         ], info_str=(ObjectName, "Submit Account Charge: %s", ", %s"))
9901         pkt.Reply(8)            
9902         pkt.CompletionCodes([0x0000, 0x0102, 0x8800, 0x9400, 0x9600, 0xa201,
9903                              0xc000, 0xc101, 0xc200, 0xc400, 0xe800, 0xea00,
9904                              0xeb00, 0xec00, 0xfe07, 0xff00])
9905         # 2222/1798, 23/152
9906         pkt = NCP(0x1798, "Submit Account Hold", 'accounting')
9907         pkt.Request((17,64), [
9908                 rec( 10, 4, HoldCancelAmount, BE ),
9909                 rec( 14, 2, ObjectType, BE ),
9910                 rec( 16, (1,48), ObjectName ),
9911         ], info_str=(ObjectName, "Submit Account Hold: %s", ", %s"))
9912         pkt.Reply(8)            
9913         pkt.CompletionCodes([0x0000, 0x0102, 0x8800, 0x9400, 0x9600, 0xa201,
9914                              0xc000, 0xc101, 0xc200, 0xc400, 0xe800, 0xea00,
9915                              0xeb00, 0xec00, 0xfe07, 0xff00])
9916         # 2222/1799, 23/153
9917         pkt = NCP(0x1799, "Submit Account Note", 'accounting')
9918         pkt.Request((18,319), [
9919                 rec( 10, 2, ServiceType, BE ),
9920                 rec( 12, 2, ObjectType, BE ),
9921                 rec( 14, 2, CommentType, BE ),
9922                 rec( 16, (1,48), ObjectName ),
9923                 rec( -1, (1,255), Comment ),
9924         ], info_str=(ObjectName, "Submit Account Note: %s", ", %s"))
9925         pkt.Reply(8)            
9926         pkt.CompletionCodes([0x0000, 0x0102, 0x9600, 0xc000, 0xc101, 0xc400,
9927                              0xe800, 0xea00, 0xeb00, 0xec00, 0xf000, 0xfc06,
9928                              0xff00])
9929         # 2222/17c8, 23/200
9930         pkt = NCP(0x17c8, "Check Console Privileges", 'stats')
9931         pkt.Request(10)
9932         pkt.Reply(8)            
9933         pkt.CompletionCodes([0x0000, 0xc601])
9934         # 2222/17c9, 23/201
9935         pkt = NCP(0x17c9, "Get File Server Description Strings", 'stats')
9936         pkt.Request(10)
9937         pkt.Reply(520, [
9938                 rec( 8, 512, DescriptionStrings ),
9939         ])
9940         pkt.CompletionCodes([0x0000, 0x9600])
9941         # 2222/17CA, 23/202
9942         pkt = NCP(0x17CA, "Set File Server Date And Time", 'stats')
9943         pkt.Request(16, [
9944                 rec( 10, 1, Year ),
9945                 rec( 11, 1, Month ),
9946                 rec( 12, 1, Day ),
9947                 rec( 13, 1, Hour ),
9948                 rec( 14, 1, Minute ),
9949                 rec( 15, 1, Second ),
9950         ])
9951         pkt.Reply(8)
9952         pkt.CompletionCodes([0x0000, 0xc601])
9953         # 2222/17CB, 23/203
9954         pkt = NCP(0x17CB, "Disable File Server Login", 'stats')
9955         pkt.Request(10)
9956         pkt.Reply(8)
9957         pkt.CompletionCodes([0x0000, 0xc601])
9958         # 2222/17CC, 23/204
9959         pkt = NCP(0x17CC, "Enable File Server Login", 'stats')
9960         pkt.Request(10)
9961         pkt.Reply(8)
9962         pkt.CompletionCodes([0x0000, 0xc601])
9963         # 2222/17CD, 23/205
9964         pkt = NCP(0x17CD, "Get File Server Login Status", 'stats')
9965         pkt.Request(10)
9966         pkt.Reply(12, [
9967                 rec( 8, 4, UserLoginAllowed ),
9968         ])
9969         pkt.CompletionCodes([0x0000, 0x9600, 0xfb01])
9970         # 2222/17CF, 23/207
9971         pkt = NCP(0x17CF, "Disable Transaction Tracking", 'stats')
9972         pkt.Request(10)
9973         pkt.Reply(8)
9974         pkt.CompletionCodes([0x0000, 0xc601])
9975         # 2222/17D0, 23/208
9976         pkt = NCP(0x17D0, "Enable Transaction Tracking", 'stats')
9977         pkt.Request(10)
9978         pkt.Reply(8)
9979         pkt.CompletionCodes([0x0000, 0xc601])
9980         # 2222/17D1, 23/209
9981         pkt = NCP(0x17D1, "Send Console Broadcast", 'stats')
9982         pkt.Request((13,267), [
9983                 rec( 10, 1, NumberOfStations, var="x" ),
9984                 rec( 11, 1, StationList, repeat="x" ),
9985                 rec( 12, (1, 255), TargetMessage ),
9986         ], info_str=(TargetMessage, "Send Console Broadcast: %s", ", %s"))
9987         pkt.Reply(8)
9988         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
9989         # 2222/17D2, 23/210
9990         pkt = NCP(0x17D2, "Clear Connection Number", 'stats')
9991         pkt.Request(11, [
9992                 rec( 10, 1, ConnectionNumber ),
9993         ],info_str=(ConnectionNumber, "Clear Connection Number %d", ", %d"))
9994         pkt.Reply(8)
9995         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
9996         # 2222/17D3, 23/211
9997         pkt = NCP(0x17D3, "Down File Server", 'stats')
9998         pkt.Request(11, [
9999                 rec( 10, 1, ForceFlag ),
10000         ])
10001         pkt.Reply(8)
10002         pkt.CompletionCodes([0x0000, 0xc601, 0xff00])
10003         # 2222/17D4, 23/212
10004         pkt = NCP(0x17D4, "Get File System Statistics", 'stats')
10005         pkt.Request(10)
10006         pkt.Reply(50, [
10007                 rec( 8, 4, SystemIntervalMarker, BE ),
10008                 rec( 12, 2, ConfiguredMaxOpenFiles ),
10009                 rec( 14, 2, ActualMaxOpenFiles ),
10010                 rec( 16, 2, CurrentOpenFiles ),
10011                 rec( 18, 4, TotalFilesOpened ),
10012                 rec( 22, 4, TotalReadRequests ),
10013                 rec( 26, 4, TotalWriteRequests ),
10014                 rec( 30, 2, CurrentChangedFATs ),
10015                 rec( 32, 4, TotalChangedFATs ),
10016                 rec( 36, 2, FATWriteErrors ),
10017                 rec( 38, 2, FatalFATWriteErrors ),
10018                 rec( 40, 2, FATScanErrors ),
10019                 rec( 42, 2, ActualMaxIndexedFiles ),
10020                 rec( 44, 2, ActiveIndexedFiles ),
10021                 rec( 46, 2, AttachedIndexedFiles ),
10022                 rec( 48, 2, AvailableIndexedFiles ),
10023         ])
10024         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10025         # 2222/17D5, 23/213
10026         pkt = NCP(0x17D5, "Get Transaction Tracking Statistics", 'stats')
10027         pkt.Request((13,267), [
10028                 rec( 10, 2, LastRecordSeen ),
10029                 rec( 12, (1,255), SemaphoreName ),
10030         ])
10031         pkt.Reply(53, [
10032                 rec( 8, 4, SystemIntervalMarker, BE ),
10033                 rec( 12, 1, TransactionTrackingSupported ),
10034                 rec( 13, 1, TransactionTrackingEnabled ),
10035                 rec( 14, 2, TransactionVolumeNumber ),
10036                 rec( 16, 2, ConfiguredMaxSimultaneousTransactions ),
10037                 rec( 18, 2, ActualMaxSimultaneousTransactions ),
10038                 rec( 20, 2, CurrentTransactionCount ),
10039                 rec( 22, 4, TotalTransactionsPerformed ),
10040                 rec( 26, 4, TotalWriteTransactionsPerformed ),
10041                 rec( 30, 4, TotalTransactionsBackedOut ),
10042                 rec( 34, 2, TotalUnfilledBackoutRequests ),
10043                 rec( 36, 2, TransactionDiskSpace ),
10044                 rec( 38, 4, TransactionFATAllocations ),
10045                 rec( 42, 4, TransactionFileSizeChanges ),
10046                 rec( 46, 4, TransactionFilesTruncated ),
10047                 rec( 50, 1, NumberOfEntries, var="x" ),
10048                 rec( 51, 2, ConnTaskStruct, repeat="x" ),
10049         ])
10050         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10051         # 2222/17D6, 23/214
10052         pkt = NCP(0x17D6, "Read Disk Cache Statistics", 'stats')
10053         pkt.Request(10)
10054         pkt.Reply(86, [
10055                 rec( 8, 4, SystemIntervalMarker, BE ),
10056                 rec( 12, 2, CacheBufferCount ),
10057                 rec( 14, 2, CacheBufferSize ),
10058                 rec( 16, 2, DirtyCacheBuffers ),
10059                 rec( 18, 4, CacheReadRequests ),
10060                 rec( 22, 4, CacheWriteRequests ),
10061                 rec( 26, 4, CacheHits ),
10062                 rec( 30, 4, CacheMisses ),
10063                 rec( 34, 4, PhysicalReadRequests ),
10064                 rec( 38, 4, PhysicalWriteRequests ),
10065                 rec( 42, 2, PhysicalReadErrors ),
10066                 rec( 44, 2, PhysicalWriteErrors ),
10067                 rec( 46, 4, CacheGetRequests ),
10068                 rec( 50, 4, CacheFullWriteRequests ),
10069                 rec( 54, 4, CachePartialWriteRequests ),
10070                 rec( 58, 4, BackgroundDirtyWrites ),
10071                 rec( 62, 4, BackgroundAgedWrites ),
10072                 rec( 66, 4, TotalCacheWrites ),
10073                 rec( 70, 4, CacheAllocations ),
10074                 rec( 74, 2, ThrashingCount ),
10075                 rec( 76, 2, LRUBlockWasDirty ),
10076                 rec( 78, 2, ReadBeyondWrite ),
10077                 rec( 80, 2, FragmentWriteOccurred ),
10078                 rec( 82, 2, CacheHitOnUnavailableBlock ),
10079                 rec( 84, 2, CacheBlockScrapped ),
10080         ])
10081         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10082         # 2222/17D7, 23/215
10083         pkt = NCP(0x17D7, "Get Drive Mapping Table", 'stats')
10084         pkt.Request(10)
10085         pkt.Reply(184, [
10086                 rec( 8, 4, SystemIntervalMarker, BE ),
10087                 rec( 12, 1, SFTSupportLevel ),
10088                 rec( 13, 1, LogicalDriveCount ),
10089                 rec( 14, 1, PhysicalDriveCount ),
10090                 rec( 15, 1, DiskChannelTable ),
10091                 rec( 16, 4, Reserved4 ),
10092                 rec( 20, 2, PendingIOCommands, BE ),
10093                 rec( 22, 32, DriveMappingTable ),
10094                 rec( 54, 32, DriveMirrorTable ),
10095                 rec( 86, 32, DeadMirrorTable ),
10096                 rec( 118, 1, ReMirrorDriveNumber ),
10097                 rec( 119, 1, Filler ),
10098                 rec( 120, 4, ReMirrorCurrentOffset, BE ),
10099                 rec( 124, 60, SFTErrorTable ),
10100         ])
10101         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10102         # 2222/17D8, 23/216
10103         pkt = NCP(0x17D8, "Read Physical Disk Statistics", 'stats')
10104         pkt.Request(11, [
10105                 rec( 10, 1, PhysicalDiskNumber ),
10106         ])
10107         pkt.Reply(101, [
10108                 rec( 8, 4, SystemIntervalMarker, BE ),
10109                 rec( 12, 1, PhysicalDiskChannel ),
10110                 rec( 13, 1, DriveRemovableFlag ),
10111                 rec( 14, 1, PhysicalDriveType ),
10112                 rec( 15, 1, ControllerDriveNumber ),
10113                 rec( 16, 1, ControllerNumber ),
10114                 rec( 17, 1, ControllerType ),
10115                 rec( 18, 4, DriveSize ),
10116                 rec( 22, 2, DriveCylinders ),
10117                 rec( 24, 1, DriveHeads ),
10118                 rec( 25, 1, SectorsPerTrack ),
10119                 rec( 26, 64, DriveDefinitionString ),
10120                 rec( 90, 2, IOErrorCount ),
10121                 rec( 92, 4, HotFixTableStart ),
10122                 rec( 96, 2, HotFixTableSize ),
10123                 rec( 98, 2, HotFixBlocksAvailable ),
10124                 rec( 100, 1, HotFixDisabled ),
10125         ])
10126         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10127         # 2222/17D9, 23/217
10128         pkt = NCP(0x17D9, "Get Disk Channel Statistics", 'stats')
10129         pkt.Request(11, [
10130                 rec( 10, 1, DiskChannelNumber ),
10131         ])
10132         pkt.Reply(192, [
10133                 rec( 8, 4, SystemIntervalMarker, BE ),
10134                 rec( 12, 2, ChannelState, BE ),
10135                 rec( 14, 2, ChannelSynchronizationState, BE ),
10136                 rec( 16, 1, SoftwareDriverType ),
10137                 rec( 17, 1, SoftwareMajorVersionNumber ),
10138                 rec( 18, 1, SoftwareMinorVersionNumber ),
10139                 rec( 19, 65, SoftwareDescription ),
10140                 rec( 84, 8, IOAddressesUsed ),
10141                 rec( 92, 10, SharedMemoryAddresses ),
10142                 rec( 102, 4, InterruptNumbersUsed ),
10143                 rec( 106, 4, DMAChannelsUsed ),
10144                 rec( 110, 1, FlagBits ),
10145                 rec( 111, 1, Reserved ),
10146                 rec( 112, 80, ConfigurationDescription ),
10147         ])
10148         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10149         # 2222/17DB, 23/219
10150         pkt = NCP(0x17DB, "Get Connection's Open Files", 'file')
10151         pkt.Request(14, [
10152                 rec( 10, 2, ConnectionNumber ),
10153                 rec( 12, 2, LastRecordSeen, BE ),
10154         ])
10155         pkt.Reply(32, [
10156                 rec( 8, 2, NextRequestRecord ),
10157                 rec( 10, 1, NumberOfRecords, var="x" ),
10158                 rec( 11, 21, ConnStruct, repeat="x" ),
10159         ])
10160         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10161         # 2222/17DC, 23/220
10162         pkt = NCP(0x17DC, "Get Connection Using A File", 'file')
10163         pkt.Request((14,268), [
10164                 rec( 10, 2, LastRecordSeen, BE ),
10165                 rec( 12, 1, DirHandle ),
10166                 rec( 13, (1,255), Path ),
10167         ], info_str=(Path, "Get Connection Using File: %s", ", %s"))
10168         pkt.Reply(30, [
10169                 rec( 8, 2, UseCount, BE ),
10170                 rec( 10, 2, OpenCount, BE ),
10171                 rec( 12, 2, OpenForReadCount, BE ),
10172                 rec( 14, 2, OpenForWriteCount, BE ),
10173                 rec( 16, 2, DenyReadCount, BE ),
10174                 rec( 18, 2, DenyWriteCount, BE ),
10175                 rec( 20, 2, NextRequestRecord, BE ),
10176                 rec( 22, 1, Locked ),
10177                 rec( 23, 1, NumberOfRecords, var="x" ),
10178                 rec( 24, 6, ConnFileStruct, repeat="x" ),
10179         ])
10180         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10181         # 2222/17DD, 23/221
10182         pkt = NCP(0x17DD, "Get Physical Record Locks By Connection And File", 'file')
10183         pkt.Request(31, [
10184                 rec( 10, 2, TargetConnectionNumber ),
10185                 rec( 12, 2, LastRecordSeen, BE ),
10186                 rec( 14, 1, VolumeNumber ),
10187                 rec( 15, 2, DirectoryID ),
10188                 rec( 17, 14, FileName14 ),
10189         ], info_str=(FileName14, "Get Physical Record Locks by Connection and File: %s", ", %s"))
10190         pkt.Reply(22, [
10191                 rec( 8, 2, NextRequestRecord ),
10192                 rec( 10, 1, NumberOfLocks, var="x" ),
10193                 rec( 11, 1, Reserved ),
10194                 rec( 12, 10, LockStruct, repeat="x" ),
10195         ])
10196         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10197         # 2222/17DE, 23/222
10198         pkt = NCP(0x17DE, "Get Physical Record Locks By File", 'file')
10199         pkt.Request((14,268), [
10200                 rec( 10, 2, TargetConnectionNumber ),
10201                 rec( 12, 1, DirHandle ),
10202                 rec( 13, (1,255), Path ),
10203         ], info_str=(Path, "Get Physical Record Locks by File: %s", ", %s"))
10204         pkt.Reply(28, [
10205                 rec( 8, 2, NextRequestRecord ),
10206                 rec( 10, 1, NumberOfLocks, var="x" ),
10207                 rec( 11, 1, Reserved ),
10208                 rec( 12, 16, PhyLockStruct, repeat="x" ),
10209         ])
10210         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10211         # 2222/17DF, 23/223
10212         pkt = NCP(0x17DF, "Get Logical Records By Connection", 'file')
10213         pkt.Request(14, [
10214                 rec( 10, 2, TargetConnectionNumber ),
10215                 rec( 12, 2, LastRecordSeen, BE ),
10216         ])
10217         pkt.Reply((14,268), [
10218                 rec( 8, 2, NextRequestRecord ),
10219                 rec( 10, 1, NumberOfRecords, var="x" ),
10220                 rec( 11, (3, 257), LogLockStruct, repeat="x" ),
10221         ])
10222         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10223         # 2222/17E0, 23/224
10224         pkt = NCP(0x17E0, "Get Logical Record Information", 'file')
10225         pkt.Request((13,267), [
10226                 rec( 10, 2, LastRecordSeen ),
10227                 rec( 12, (1,255), LogicalRecordName ),
10228         ], info_str=(LogicalRecordName, "Get Logical Record Information: %s", ", %s"))
10229         pkt.Reply(20, [
10230                 rec( 8, 2, UseCount, BE ),
10231                 rec( 10, 2, ShareableLockCount, BE ),
10232                 rec( 12, 2, NextRequestRecord ),
10233                 rec( 14, 1, Locked ),
10234                 rec( 15, 1, NumberOfRecords, var="x" ),
10235                 rec( 16, 4, LogRecStruct, repeat="x" ),
10236         ])
10237         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10238         # 2222/17E1, 23/225
10239         pkt = NCP(0x17E1, "Get Connection's Semaphores", 'file')
10240         pkt.Request(14, [
10241                 rec( 10, 2, ConnectionNumber ),
10242                 rec( 12, 2, LastRecordSeen ),
10243         ])
10244         pkt.Reply((18,272), [
10245                 rec( 8, 2, NextRequestRecord ),
10246                 rec( 10, 2, NumberOfSemaphores, var="x" ),
10247                 rec( 12, (6,260), SemaStruct, repeat="x" ),
10248         ])
10249         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10250         # 2222/17E2, 23/226
10251         pkt = NCP(0x17E2, "Get Semaphore Information", 'file')
10252         pkt.Request((13,267), [
10253                 rec( 10, 2, LastRecordSeen ),
10254                 rec( 12, (1,255), SemaphoreName ),
10255         ], info_str=(SemaphoreName, "Get Semaphore Information: %s", ", %s"))
10256         pkt.Reply(17, [
10257                 rec( 8, 2, NextRequestRecord, BE ),
10258                 rec( 10, 2, OpenCount, BE ),
10259                 rec( 12, 1, SemaphoreValue ),
10260                 rec( 13, 1, NumberOfRecords, var="x" ),
10261                 rec( 14, 3, SemaInfoStruct, repeat="x" ),
10262         ])
10263         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10264         # 2222/17E3, 23/227
10265         pkt = NCP(0x17E3, "Get LAN Driver Configuration Information", 'stats')
10266         pkt.Request(11, [
10267                 rec( 10, 1, LANDriverNumber ),
10268         ])
10269         pkt.Reply(180, [
10270                 rec( 8, 4, NetworkAddress, BE ),
10271                 rec( 12, 6, HostAddress ),
10272                 rec( 18, 1, BoardInstalled ),
10273                 rec( 19, 1, OptionNumber ),
10274                 rec( 20, 160, ConfigurationText ),
10275         ])
10276         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10277         # 2222/17E5, 23/229
10278         pkt = NCP(0x17E5, "Get Connection Usage Statistics", 'stats')
10279         pkt.Request(12, [
10280                 rec( 10, 2, ConnectionNumber ),
10281         ])
10282         pkt.Reply(26, [
10283                 rec( 8, 2, NextRequestRecord ),
10284                 rec( 10, 6, BytesRead ),
10285                 rec( 16, 6, BytesWritten ),
10286                 rec( 22, 4, TotalRequestPackets ),
10287          ])
10288         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10289         # 2222/17E6, 23/230
10290         pkt = NCP(0x17E6, "Get Object's Remaining Disk Space", 'stats')
10291         pkt.Request(14, [
10292                 rec( 10, 4, ObjectID, BE ),
10293         ])
10294         pkt.Reply(21, [
10295                 rec( 8, 4, SystemIntervalMarker, BE ),
10296                 rec( 12, 4, ObjectID ),
10297                 rec( 16, 4, UnusedDiskBlocks, BE ),
10298                 rec( 20, 1, RestrictionsEnforced ),
10299          ])
10300         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])  
10301         # 2222/17E7, 23/231
10302         pkt = NCP(0x17E7, "Get File Server LAN I/O Statistics", 'stats')
10303         pkt.Request(10)
10304         pkt.Reply(74, [
10305                 rec( 8, 4, SystemIntervalMarker, BE ),
10306                 rec( 12, 2, ConfiguredMaxRoutingBuffers ),
10307                 rec( 14, 2, ActualMaxUsedRoutingBuffers ),
10308                 rec( 16, 2, CurrentlyUsedRoutingBuffers ),
10309                 rec( 18, 4, TotalFileServicePackets ),
10310                 rec( 22, 2, TurboUsedForFileService ),
10311                 rec( 24, 2, PacketsFromInvalidConnection ),
10312                 rec( 26, 2, BadLogicalConnectionCount ),
10313                 rec( 28, 2, PacketsReceivedDuringProcessing ),
10314                 rec( 30, 2, RequestsReprocessed ),
10315                 rec( 32, 2, PacketsWithBadSequenceNumber ),
10316                 rec( 34, 2, DuplicateRepliesSent ),
10317                 rec( 36, 2, PositiveAcknowledgesSent ),
10318                 rec( 38, 2, PacketsWithBadRequestType ),
10319                 rec( 40, 2, AttachDuringProcessing ),
10320                 rec( 42, 2, AttachWhileProcessingAttach ),
10321                 rec( 44, 2, ForgedDetachedRequests ),
10322                 rec( 46, 2, DetachForBadConnectionNumber ),
10323                 rec( 48, 2, DetachDuringProcessing ),
10324                 rec( 50, 2, RepliesCancelled ),
10325                 rec( 52, 2, PacketsDiscardedByHopCount ),
10326                 rec( 54, 2, PacketsDiscardedUnknownNet ),
10327                 rec( 56, 2, IncomingPacketDiscardedNoDGroup ),
10328                 rec( 58, 2, OutgoingPacketDiscardedNoTurboBuffer ),
10329                 rec( 60, 2, IPXNotMyNetwork ),
10330                 rec( 62, 4, NetBIOSBroadcastWasPropogated ),
10331                 rec( 66, 4, TotalOtherPackets ),
10332                 rec( 70, 4, TotalRoutedPackets ),
10333          ])
10334         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10335         # 2222/17E8, 23/232
10336         pkt = NCP(0x17E8, "Get File Server Misc Information", 'stats')
10337         pkt.Request(10)
10338         pkt.Reply(40, [
10339                 rec( 8, 4, SystemIntervalMarker, BE ),
10340                 rec( 12, 1, ProcessorType ),
10341                 rec( 13, 1, Reserved ),
10342                 rec( 14, 1, NumberOfServiceProcesses ),
10343                 rec( 15, 1, ServerUtilizationPercentage ),
10344                 rec( 16, 2, ConfiguredMaxBinderyObjects ),
10345                 rec( 18, 2, ActualMaxBinderyObjects ),
10346                 rec( 20, 2, CurrentUsedBinderyObjects ),
10347                 rec( 22, 2, TotalServerMemory ),
10348                 rec( 24, 2, WastedServerMemory ),
10349                 rec( 26, 2, NumberOfDynamicMemoryAreas, var="x" ),
10350                 rec( 28, 12, DynMemStruct, repeat="x" ),
10351          ])
10352         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10353         # 2222/17E9, 23/233
10354         pkt = NCP(0x17E9, "Get Volume Information", 'stats')
10355         pkt.Request(11, [
10356                 rec( 10, 1, VolumeNumber ),
10357         ],info_str=(VolumeNumber, "Get Information on Volume %d", ", %d"))
10358         pkt.Reply(48, [
10359                 rec( 8, 4, SystemIntervalMarker, BE ),
10360                 rec( 12, 1, VolumeNumber ),
10361                 rec( 13, 1, LogicalDriveNumber ),
10362                 rec( 14, 2, BlockSize ),
10363                 rec( 16, 2, StartingBlock ),
10364                 rec( 18, 2, TotalBlocks ),
10365                 rec( 20, 2, FreeBlocks ),
10366                 rec( 22, 2, TotalDirectoryEntries ),
10367                 rec( 24, 2, FreeDirectoryEntries ),
10368                 rec( 26, 2, ActualMaxUsedDirectoryEntries ),
10369                 rec( 28, 1, VolumeHashedFlag ),
10370                 rec( 29, 1, VolumeCachedFlag ),
10371                 rec( 30, 1, VolumeRemovableFlag ),
10372                 rec( 31, 1, VolumeMountedFlag ),
10373                 rec( 32, 16, VolumeName ),
10374          ])
10375         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10376         # 2222/17EA, 23/234
10377         pkt = NCP(0x17EA, "Get Connection's Task Information", 'stats')
10378         pkt.Request(12, [
10379                 rec( 10, 2, ConnectionNumber ),
10380         ])
10381         pkt.Reply(18, [
10382                 rec( 8, 2, NextRequestRecord ),
10383                 rec( 10, 4, NumberOfAttributes, var="x" ),
10384                 rec( 14, 4, Attributes, repeat="x" ),
10385          ])
10386         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10387         # 2222/17EB, 23/235
10388         pkt = NCP(0x17EB, "Get Connection's Open Files", 'file')
10389         pkt.Request(14, [
10390                 rec( 10, 2, ConnectionNumber ),
10391                 rec( 12, 2, LastRecordSeen ),
10392         ])
10393         pkt.Reply((29,283), [
10394                 rec( 8, 2, NextRequestRecord ),
10395                 rec( 10, 2, NumberOfRecords, var="x" ),
10396                 rec( 12, (17, 271), OpnFilesStruct, repeat="x" ),
10397         ])
10398         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10399         # 2222/17EC, 23/236
10400         pkt = NCP(0x17EC, "Get Connection Using A File", 'file')
10401         pkt.Request(18, [
10402                 rec( 10, 1, DataStreamNumber ),
10403                 rec( 11, 1, VolumeNumber ),
10404                 rec( 12, 4, DirectoryBase, LE ),
10405                 rec( 16, 2, LastRecordSeen ),
10406         ])
10407         pkt.Reply(33, [
10408                 rec( 8, 2, NextRequestRecord ),
10409                 rec( 10, 2, UseCount ),
10410                 rec( 12, 2, OpenCount ),
10411                 rec( 14, 2, OpenForReadCount ),
10412                 rec( 16, 2, OpenForWriteCount ),
10413                 rec( 18, 2, DenyReadCount ),
10414                 rec( 20, 2, DenyWriteCount ),
10415                 rec( 22, 1, Locked ),
10416                 rec( 23, 1, ForkCount ),
10417                 rec( 24, 2, NumberOfRecords, var="x" ),
10418                 rec( 26, 7, ConnStruct, repeat="x" ),
10419         ])
10420         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10421         # 2222/17ED, 23/237
10422         pkt = NCP(0x17ED, "Get Physical Record Locks By Connection And File", 'file')
10423         pkt.Request(20, [
10424                 rec( 10, 2, TargetConnectionNumber ),
10425                 rec( 12, 1, DataStreamNumber ),
10426                 rec( 13, 1, VolumeNumber ),
10427                 rec( 14, 4, DirectoryBase, LE ),
10428                 rec( 18, 2, LastRecordSeen ),
10429         ])
10430         pkt.Reply(23, [
10431                 rec( 8, 2, NextRequestRecord ),
10432                 rec( 10, 2, NumberOfLocks, var="x" ),
10433                 rec( 12, 11, LockStruct, repeat="x" ),
10434         ])
10435         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10436         # 2222/17EE, 23/238
10437         pkt = NCP(0x17EE, "Get Physical Record Locks By File", 'file')
10438         pkt.Request(18, [
10439                 rec( 10, 1, DataStreamNumber ),
10440                 rec( 11, 1, VolumeNumber ),
10441                 rec( 12, 4, DirectoryBase ),
10442                 rec( 16, 2, LastRecordSeen ),
10443         ])
10444         pkt.Reply(30, [
10445                 rec( 8, 2, NextRequestRecord ),
10446                 rec( 10, 2, NumberOfLocks, var="x" ),
10447                 rec( 12, 18, PhyLockStruct, repeat="x" ),
10448         ])
10449         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10450         # 2222/17EF, 23/239
10451         pkt = NCP(0x17EF, "Get Logical Records By Connection", 'file')
10452         pkt.Request(14, [
10453                 rec( 10, 2, TargetConnectionNumber ),
10454                 rec( 12, 2, LastRecordSeen ),
10455         ])
10456         pkt.Reply((16,270), [
10457                 rec( 8, 2, NextRequestRecord ),
10458                 rec( 10, 2, NumberOfRecords, var="x" ),
10459                 rec( 12, (4, 258), LogLockStruct, repeat="x" ),
10460         ])
10461         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10462         # 2222/17F0, 23/240
10463         pkt = NCP(0x17F0, "Get Logical Record Information (old)", 'file')
10464         pkt.Request((13,267), [
10465                 rec( 10, 2, LastRecordSeen ),
10466                 rec( 12, (1,255), LogicalRecordName ),
10467         ])
10468         pkt.Reply(22, [
10469                 rec( 8, 2, ShareableLockCount ),
10470                 rec( 10, 2, UseCount ),
10471                 rec( 12, 1, Locked ),
10472                 rec( 13, 2, NextRequestRecord ),
10473                 rec( 15, 2, NumberOfRecords, var="x" ),
10474                 rec( 17, 5, LogRecStruct, repeat="x" ),
10475         ])
10476         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10477         # 2222/17F1, 23/241
10478         pkt = NCP(0x17F1, "Get Connection's Semaphores", 'file')
10479         pkt.Request(14, [
10480                 rec( 10, 2, ConnectionNumber ),
10481                 rec( 12, 2, LastRecordSeen ),
10482         ])
10483         pkt.Reply((19,273), [
10484                 rec( 8, 2, NextRequestRecord ),
10485                 rec( 10, 2, NumberOfSemaphores, var="x" ),
10486                 rec( 12, (7, 261), SemaStruct, repeat="x" ),
10487         ])
10488         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10489         # 2222/17F2, 23/242
10490         pkt = NCP(0x17F2, "Get Semaphore Information", 'file')
10491         pkt.Request((13,267), [
10492                 rec( 10, 2, LastRecordSeen ),
10493                 rec( 12, (1,255), SemaphoreName ),
10494         ], info_str=(SemaphoreName, "Get Semaphore Information: %s", ", %s"))
10495         pkt.Reply(20, [
10496                 rec( 8, 2, NextRequestRecord ),
10497                 rec( 10, 2, OpenCount ),
10498                 rec( 12, 2, SemaphoreValue ),
10499                 rec( 14, 2, NumberOfRecords, var="x" ),
10500                 rec( 16, 4, SemaInfoStruct, repeat="x" ),
10501         ])
10502         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10503         # 2222/17F3, 23/243
10504         pkt = NCP(0x17F3, "Map Directory Number to Path", 'file')
10505         pkt.Request(16, [
10506                 rec( 10, 1, VolumeNumber ),
10507                 rec( 11, 4, DirectoryNumber ),
10508                 rec( 15, 1, NameSpace ),
10509         ])
10510         pkt.Reply((9,263), [
10511                 rec( 8, (1,255), Path ),
10512         ])
10513         pkt.CompletionCodes([0x0000, 0x9600, 0x9c00, 0xc601, 0xfd00, 0xff00])
10514         # 2222/17F4, 23/244
10515         pkt = NCP(0x17F4, "Convert Path to Dir Entry", 'file')
10516         pkt.Request((12,266), [
10517                 rec( 10, 1, DirHandle ),
10518                 rec( 11, (1,255), Path ),
10519         ], info_str=(Path, "Convert Path to Directory Entry: %s", ", %s"))
10520         pkt.Reply(13, [
10521                 rec( 8, 1, VolumeNumber ),
10522                 rec( 9, 4, DirectoryNumber ),
10523         ])
10524         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10525         # 2222/17FD, 23/253
10526         pkt = NCP(0x17FD, "Send Console Broadcast", 'stats')
10527         pkt.Request((16, 270), [
10528                 rec( 10, 1, NumberOfStations, var="x" ),
10529                 rec( 11, 4, StationList, repeat="x" ),
10530                 rec( 15, (1, 255), TargetMessage ),
10531         ], info_str=(TargetMessage, "Send Console Broadcast: %s", ", %s"))
10532         pkt.Reply(8)
10533         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10534         # 2222/17FE, 23/254
10535         pkt = NCP(0x17FE, "Clear Connection Number", 'stats')
10536         pkt.Request(14, [
10537                 rec( 10, 4, ConnectionNumber ),
10538         ])
10539         pkt.Reply(8)
10540         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10541         # 2222/18, 24
10542         pkt = NCP(0x18, "End of Job", 'connection')
10543         pkt.Request(7)
10544         pkt.Reply(8)
10545         pkt.CompletionCodes([0x0000])
10546         # 2222/19, 25
10547         pkt = NCP(0x19, "Logout", 'connection')
10548         pkt.Request(7)
10549         pkt.Reply(8)
10550         pkt.CompletionCodes([0x0000])
10551         # 2222/1A, 26
10552         pkt = NCP(0x1A, "Log Physical Record", 'file')
10553         pkt.Request(24, [
10554                 rec( 7, 1, LockFlag ),
10555                 rec( 8, 6, FileHandle ),
10556                 rec( 14, 4, LockAreasStartOffset, BE ),
10557                 rec( 18, 4, LockAreaLen, BE ),
10558                 rec( 22, 2, LockTimeout ),
10559         ])
10560         pkt.Reply(8)
10561         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
10562         # 2222/1B, 27
10563         pkt = NCP(0x1B, "Lock Physical Record Set", 'file')
10564         pkt.Request(10, [
10565                 rec( 7, 1, LockFlag ),
10566                 rec( 8, 2, LockTimeout ),
10567         ])
10568         pkt.Reply(8)
10569         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
10570         # 2222/1C, 28
10571         pkt = NCP(0x1C, "Release Physical Record", 'file')
10572         pkt.Request(22, [
10573                 rec( 7, 1, Reserved ),
10574                 rec( 8, 6, FileHandle ),
10575                 rec( 14, 4, LockAreasStartOffset ),
10576                 rec( 18, 4, LockAreaLen ),
10577         ])
10578         pkt.Reply(8)
10579         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10580         # 2222/1D, 29
10581         pkt = NCP(0x1D, "Release Physical Record Set", 'file')
10582         pkt.Request(8, [
10583                 rec( 7, 1, LockFlag ),
10584         ])
10585         pkt.Reply(8)
10586         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10587         # 2222/1E, 30   #Tested and fixed 6-14-02 GM
10588         pkt = NCP(0x1E, "Clear Physical Record", 'file')
10589         pkt.Request(22, [
10590                 rec( 7, 1, Reserved ),
10591                 rec( 8, 6, FileHandle ),
10592                 rec( 14, 4, LockAreasStartOffset, BE ),
10593                 rec( 18, 4, LockAreaLen, BE ),
10594         ])
10595         pkt.Reply(8)
10596         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10597         # 2222/1F, 31
10598         pkt = NCP(0x1F, "Clear Physical Record Set", 'file')
10599         pkt.Request(8, [
10600                 rec( 7, 1, LockFlag ),
10601         ])
10602         pkt.Reply(8)
10603         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10604         # 2222/2000, 32/00
10605         pkt = NCP(0x2000, "Open Semaphore", 'file', has_length=0)
10606         pkt.Request(10, [
10607                 rec( 8, 1, InitialSemaphoreValue ),
10608                 rec( 9, 1, SemaphoreNameLen ),
10609         ])
10610         pkt.Reply(13, [
10611                   rec( 8, 4, SemaphoreHandle, BE ),
10612                   rec( 12, 1, SemaphoreOpenCount ),
10613         ])
10614         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10615         # 2222/2001, 32/01
10616         pkt = NCP(0x2001, "Examine Semaphore", 'file', has_length=0)
10617         pkt.Request(12, [
10618                 rec( 8, 4, SemaphoreHandle, BE ),
10619         ])
10620         pkt.Reply(10, [
10621                   rec( 8, 1, SemaphoreValue ),
10622                   rec( 9, 1, SemaphoreOpenCount ),
10623         ])
10624         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10625         # 2222/2002, 32/02
10626         pkt = NCP(0x2002, "Wait On Semaphore", 'file', has_length=0)
10627         pkt.Request(14, [
10628                 rec( 8, 4, SemaphoreHandle, BE ),
10629                 rec( 12, 2, SemaphoreTimeOut, BE ), 
10630         ])
10631         pkt.Reply(8)
10632         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10633         # 2222/2003, 32/03
10634         pkt = NCP(0x2003, "Signal Semaphore", 'file', has_length=0)
10635         pkt.Request(12, [
10636                 rec( 8, 4, SemaphoreHandle, BE ),
10637         ])
10638         pkt.Reply(8)
10639         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10640         # 2222/2004, 32/04
10641         pkt = NCP(0x2004, "Close Semaphore", 'file', has_length=0)
10642         pkt.Request(12, [
10643                 rec( 8, 4, SemaphoreHandle, BE ),
10644         ])
10645         pkt.Reply(8)
10646         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10647         # 2222/21, 33
10648         pkt = NCP(0x21, "Negotiate Buffer Size", 'connection')
10649         pkt.Request(9, [
10650                 rec( 7, 2, BufferSize, BE ),
10651         ])
10652         pkt.Reply(10, [
10653                 rec( 8, 2, BufferSize, BE ),
10654         ])
10655         pkt.CompletionCodes([0x0000])
10656         # 2222/2200, 34/00
10657         pkt = NCP(0x2200, "TTS Is Available", 'tts', has_length=0)
10658         pkt.Request(8)
10659         pkt.Reply(8)
10660         pkt.CompletionCodes([0x0001, 0xfd03, 0xff12])
10661         # 2222/2201, 34/01
10662         pkt = NCP(0x2201, "TTS Begin Transaction", 'tts', has_length=0)
10663         pkt.Request(8)
10664         pkt.Reply(8)
10665         pkt.CompletionCodes([0x0000])
10666         # 2222/2202, 34/02
10667         pkt = NCP(0x2202, "TTS End Transaction", 'tts', has_length=0)
10668         pkt.Request(8)
10669         pkt.Reply(12, [
10670                   rec( 8, 4, TransactionNumber, BE ),
10671         ])                
10672         pkt.CompletionCodes([0x0000, 0xff01])
10673         # 2222/2203, 34/03
10674         pkt = NCP(0x2203, "TTS Abort Transaction", 'tts', has_length=0)
10675         pkt.Request(8)
10676         pkt.Reply(8)
10677         pkt.CompletionCodes([0x0000, 0xfd03, 0xfe0b, 0xff01])
10678         # 2222/2204, 34/04
10679         pkt = NCP(0x2204, "TTS Transaction Status", 'tts', has_length=0)
10680         pkt.Request(12, [
10681                   rec( 8, 4, TransactionNumber, BE ),
10682         ])              
10683         pkt.Reply(8)
10684         pkt.CompletionCodes([0x0000])
10685         # 2222/2205, 34/05
10686         pkt = NCP(0x2205, "TTS Get Application Thresholds", 'tts', has_length=0)
10687         pkt.Request(8)          
10688         pkt.Reply(10, [
10689                   rec( 8, 1, LogicalLockThreshold ),
10690                   rec( 9, 1, PhysicalLockThreshold ),
10691         ])
10692         pkt.CompletionCodes([0x0000])
10693         # 2222/2206, 34/06
10694         pkt = NCP(0x2206, "TTS Set Application Thresholds", 'tts', has_length=0)
10695         pkt.Request(10, [               
10696                   rec( 8, 1, LogicalLockThreshold ),
10697                   rec( 9, 1, PhysicalLockThreshold ),
10698         ])
10699         pkt.Reply(8)
10700         pkt.CompletionCodes([0x0000, 0x9600])
10701         # 2222/2207, 34/07
10702         pkt = NCP(0x2207, "TTS Get Workstation Thresholds", 'tts', has_length=0)
10703         pkt.Request(10, [               
10704                   rec( 8, 1, LogicalLockThreshold ),
10705                   rec( 9, 1, PhysicalLockThreshold ),
10706         ])
10707         pkt.Reply(8)
10708         pkt.CompletionCodes([0x0000])
10709         # 2222/2208, 34/08
10710         pkt = NCP(0x2208, "TTS Set Workstation Thresholds", 'tts', has_length=0)
10711         pkt.Request(10, [               
10712                   rec( 8, 1, LogicalLockThreshold ),
10713                   rec( 9, 1, PhysicalLockThreshold ),
10714         ])
10715         pkt.Reply(8)
10716         pkt.CompletionCodes([0x0000])
10717         # 2222/2209, 34/09
10718         pkt = NCP(0x2209, "TTS Get Transaction Bits", 'tts', has_length=0)
10719         pkt.Request(8)
10720         pkt.Reply(9, [
10721                 rec( 8, 1, ControlFlags ),
10722         ])
10723         pkt.CompletionCodes([0x0000])
10724         # 2222/220A, 34/10
10725         pkt = NCP(0x220A, "TTS Set Transaction Bits", 'tts', has_length=0)
10726         pkt.Request(9, [
10727                 rec( 8, 1, ControlFlags ),
10728         ])
10729         pkt.Reply(8)
10730         pkt.CompletionCodes([0x0000])
10731         # 2222/2301, 35/01
10732         pkt = NCP(0x2301, "AFP Create Directory", 'afp')
10733         pkt.Request((49, 303), [
10734                 rec( 10, 1, VolumeNumber ),
10735                 rec( 11, 4, BaseDirectoryID, BE ),
10736                 rec( 15, 1, Reserved ),
10737                 rec( 16, 4, CreatorID ),
10738                 rec( 20, 4, Reserved4 ),
10739                 rec( 24, 2, FinderAttr ),
10740                 rec( 26, 2, HorizLocation ),
10741                 rec( 28, 2, VertLocation ),
10742                 rec( 30, 2, FileDirWindow ),
10743                 rec( 32, 16, Reserved16 ),
10744                 rec( 48, (1,255), Path ),
10745         ], info_str=(Path, "AFP Create Directory: %s", ", %s"))
10746         pkt.Reply(12, [
10747                 rec( 8, 4, NewDirectoryID, BE ),
10748         ])
10749         pkt.CompletionCodes([0x0000, 0x8301, 0x8400, 0x8800, 0x9300, 0x9600, 0x9804,
10750                              0x9900, 0x9c03, 0x9e02, 0xa100, 0xa201, 0xfd00, 0xff18])
10751         # 2222/2302, 35/02
10752         pkt = NCP(0x2302, "AFP Create File", 'afp')
10753         pkt.Request((49, 303), [
10754                 rec( 10, 1, VolumeNumber ),
10755                 rec( 11, 4, BaseDirectoryID, BE ),
10756                 rec( 15, 1, DeleteExistingFileFlag ),
10757                 rec( 16, 4, CreatorID, BE ),
10758                 rec( 20, 4, Reserved4 ),
10759                 rec( 24, 2, FinderAttr ),
10760                 rec( 26, 2, HorizLocation, BE ),
10761                 rec( 28, 2, VertLocation, BE ),
10762                 rec( 30, 2, FileDirWindow, BE ),
10763                 rec( 32, 16, Reserved16 ),
10764                 rec( 48, (1,255), Path ),
10765         ], info_str=(Path, "AFP Create File: %s", ", %s"))
10766         pkt.Reply(12, [
10767                 rec( 8, 4, NewDirectoryID, BE ),
10768         ])
10769         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8301, 0x8400, 0x8701, 0x8800,
10770                              0x8a00, 0x8d00, 0x8e00, 0x8f00, 0x9300, 0x9600, 0x9804,
10771                              0x9900, 0x9b03, 0x9c03, 0x9e02, 0xa100, 0xa201, 0xfd00,
10772                              0xff18])
10773         # 2222/2303, 35/03
10774         pkt = NCP(0x2303, "AFP Delete", 'afp')
10775         pkt.Request((16,270), [
10776                 rec( 10, 1, VolumeNumber ),
10777                 rec( 11, 4, BaseDirectoryID, BE ),
10778                 rec( 15, (1,255), Path ),
10779         ], info_str=(Path, "AFP Delete: %s", ", %s"))
10780         pkt.Reply(8)
10781         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x8a00, 0x8d00, 0x8e00, 0x8f00,
10782                              0x9000, 0x9300, 0x9600, 0x9804, 0x9b03, 0x9c03, 0x9e02,
10783                              0xa000, 0xa100, 0xa201, 0xfd00, 0xff19])
10784         # 2222/2304, 35/04
10785         pkt = NCP(0x2304, "AFP Get Entry ID From Name", 'afp')
10786         pkt.Request((16,270), [
10787                 rec( 10, 1, VolumeNumber ),
10788                 rec( 11, 4, BaseDirectoryID, BE ),
10789                 rec( 15, (1,255), Path ),
10790         ], info_str=(Path, "AFP Get Entry from Name: %s", ", %s"))
10791         pkt.Reply(12, [
10792                 rec( 8, 4, TargetEntryID, BE ),
10793         ])
10794         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804, 0x9c03,
10795                              0xa100, 0xa201, 0xfd00, 0xff19])
10796         # 2222/2305, 35/05
10797         pkt = NCP(0x2305, "AFP Get File Information", 'afp')
10798         pkt.Request((18,272), [
10799                 rec( 10, 1, VolumeNumber ),
10800                 rec( 11, 4, BaseDirectoryID, BE ),
10801                 rec( 15, 2, RequestBitMap, BE ),
10802                 rec( 17, (1,255), Path ),
10803         ], info_str=(Path, "AFP Get File Information: %s", ", %s"))
10804         pkt.Reply(121, [
10805                 rec( 8, 4, AFPEntryID, BE ),
10806                 rec( 12, 4, ParentID, BE ),
10807                 rec( 16, 2, AttributesDef16, LE ),
10808                 rec( 18, 4, DataForkLen, BE ),
10809                 rec( 22, 4, ResourceForkLen, BE ),
10810                 rec( 26, 2, TotalOffspring, BE  ),
10811                 rec( 28, 2, CreationDate, BE ),
10812                 rec( 30, 2, LastAccessedDate, BE ),
10813                 rec( 32, 2, ModifiedDate, BE ),
10814                 rec( 34, 2, ModifiedTime, BE ),
10815                 rec( 36, 2, ArchivedDate, BE ),
10816                 rec( 38, 2, ArchivedTime, BE ),
10817                 rec( 40, 4, CreatorID, BE ),
10818                 rec( 44, 4, Reserved4 ),
10819                 rec( 48, 2, FinderAttr ),
10820                 rec( 50, 2, HorizLocation ),
10821                 rec( 52, 2, VertLocation ),
10822                 rec( 54, 2, FileDirWindow ),
10823                 rec( 56, 16, Reserved16 ),
10824                 rec( 72, 32, LongName ),
10825                 rec( 104, 4, CreatorID, BE ),
10826                 rec( 108, 12, ShortName ),
10827                 rec( 120, 1, AccessPrivileges ),
10828         ])              
10829         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804, 0x9c03,
10830                              0xa100, 0xa201, 0xfd00, 0xff19])
10831         # 2222/2306, 35/06
10832         pkt = NCP(0x2306, "AFP Get Entry ID From NetWare Handle", 'afp')
10833         pkt.Request(16, [
10834                 rec( 10, 6, FileHandle ),
10835         ])
10836         pkt.Reply(14, [
10837                 rec( 8, 1, VolumeID ),
10838                 rec( 9, 4, TargetEntryID, BE ),
10839                 rec( 13, 1, ForkIndicator ),
10840         ])              
10841         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0xa201])
10842         # 2222/2307, 35/07
10843         pkt = NCP(0x2307, "AFP Rename", 'afp')
10844         pkt.Request((21, 529), [
10845                 rec( 10, 1, VolumeNumber ),
10846                 rec( 11, 4, MacSourceBaseID, BE ),
10847                 rec( 15, 4, MacDestinationBaseID, BE ),
10848                 rec( 19, (1,255), Path ),
10849                 rec( -1, (1,255), NewFileNameLen ),
10850         ], info_str=(Path, "AFP Rename: %s", ", %s"))
10851         pkt.Reply(8)            
10852         pkt.CompletionCodes([0x0000, 0x8301, 0x8401, 0x8800, 0x8b00, 0x8e00,
10853                              0x9001, 0x9201, 0x9300, 0x9600, 0x9804, 0x9900,
10854                              0x9c03, 0x9e00, 0xa100, 0xa201, 0xfd00, 0xff0a])
10855         # 2222/2308, 35/08
10856         pkt = NCP(0x2308, "AFP Open File Fork", 'afp')
10857         pkt.Request((18, 272), [
10858                 rec( 10, 1, VolumeNumber ),
10859                 rec( 11, 4, MacBaseDirectoryID, BE ),
10860                 rec( 15, 1, ForkIndicator ),
10861                 rec( 16, 1, AccessMode ),
10862                 rec( 17, (1,255), Path ),
10863         ], info_str=(Path, "AFP Open File Fork: %s", ", %s"))
10864         pkt.Reply(22, [
10865                 rec( 8, 4, AFPEntryID, BE ),
10866                 rec( 12, 4, DataForkLen, BE ),
10867                 rec( 16, 6, NetWareAccessHandle ),
10868         ])
10869         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8301, 0x8800, 0x9300,
10870                              0x9400, 0x9600, 0x9804, 0x9900, 0x9c03, 0xa100,
10871                              0xa201, 0xfd00, 0xff16])
10872         # 2222/2309, 35/09
10873         pkt = NCP(0x2309, "AFP Set File Information", 'afp')
10874         pkt.Request((64, 318), [
10875                 rec( 10, 1, VolumeNumber ),
10876                 rec( 11, 4, MacBaseDirectoryID, BE ),
10877                 rec( 15, 2, RequestBitMap, BE ),
10878                 rec( 17, 2, MacAttr, BE ),
10879                 rec( 19, 2, CreationDate, BE ),
10880                 rec( 21, 2, LastAccessedDate, BE ),
10881                 rec( 23, 2, ModifiedDate, BE ),
10882                 rec( 25, 2, ModifiedTime, BE ),
10883                 rec( 27, 2, ArchivedDate, BE ),
10884                 rec( 29, 2, ArchivedTime, BE ),
10885                 rec( 31, 4, CreatorID, BE ),
10886                 rec( 35, 4, Reserved4 ),
10887                 rec( 39, 2, FinderAttr ),
10888                 rec( 41, 2, HorizLocation ),
10889                 rec( 43, 2, VertLocation ),
10890                 rec( 45, 2, FileDirWindow ),
10891                 rec( 47, 16, Reserved16 ),
10892                 rec( 63, (1,255), Path ),
10893         ], info_str=(Path, "AFP Set File Information: %s", ", %s"))
10894         pkt.Reply(8)            
10895         pkt.CompletionCodes([0x0000, 0x0104, 0x8301, 0x8800, 0x9300, 0x9400,
10896                              0x9500, 0x9600, 0x9804, 0x9c03, 0xa100, 0xa201,
10897                              0xfd00, 0xff16])
10898         # 2222/230A, 35/10
10899         pkt = NCP(0x230A, "AFP Scan File Information", 'afp')
10900         pkt.Request((26, 280), [
10901                 rec( 10, 1, VolumeNumber ),
10902                 rec( 11, 4, MacBaseDirectoryID, BE ),
10903                 rec( 15, 4, MacLastSeenID, BE ),
10904                 rec( 19, 2, DesiredResponseCount, BE ),
10905                 rec( 21, 2, SearchBitMap, BE ),
10906                 rec( 23, 2, RequestBitMap, BE ),
10907                 rec( 25, (1,255), Path ),
10908         ], info_str=(Path, "AFP Scan File Information: %s", ", %s"))
10909         pkt.Reply(123, [
10910                 rec( 8, 2, ActualResponseCount, BE, var="x" ),
10911                 rec( 10, 113, AFP10Struct, repeat="x" ),
10912         ])      
10913         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804,
10914                              0x9c03, 0xa100, 0xa201, 0xfd00, 0xff16])
10915         # 2222/230B, 35/11
10916         pkt = NCP(0x230B, "AFP Alloc Temporary Directory Handle", 'afp')
10917         pkt.Request((16,270), [
10918                 rec( 10, 1, VolumeNumber ),
10919                 rec( 11, 4, MacBaseDirectoryID, BE ),
10920                 rec( 15, (1,255), Path ),
10921         ], info_str=(Path, "AFP Allocate Temporary Directory Handle: %s", ", %s"))
10922         pkt.Reply(10, [
10923                 rec( 8, 1, DirHandle ),
10924                 rec( 9, 1, AccessRightsMask ),
10925         ])
10926         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600,
10927                              0x9804, 0x9b03, 0x9c03, 0x9d00, 0xa100,
10928                              0xa201, 0xfd00, 0xff00])
10929         # 2222/230C, 35/12
10930         pkt = NCP(0x230C, "AFP Get Entry ID From Path Name", 'afp')
10931         pkt.Request((12,266), [
10932                 rec( 10, 1, DirHandle ),
10933                 rec( 11, (1,255), Path ),
10934         ], info_str=(Path, "AFP Get Entry ID from Path Name: %s", ", %s"))
10935         pkt.Reply(12, [
10936                 rec( 8, 4, AFPEntryID, BE ),
10937         ])
10938         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600,
10939                              0x9804, 0x9b03, 0x9c03, 0xa100, 0xa201,
10940                              0xfd00, 0xff00])
10941         # 2222/230D, 35/13
10942         pkt = NCP(0x230D, "AFP 2.0 Create Directory", 'afp')
10943         pkt.Request((55,309), [
10944                 rec( 10, 1, VolumeNumber ),
10945                 rec( 11, 4, BaseDirectoryID, BE ),
10946                 rec( 15, 1, Reserved ),
10947                 rec( 16, 4, CreatorID, BE ),
10948                 rec( 20, 4, Reserved4 ),
10949                 rec( 24, 2, FinderAttr ),
10950                 rec( 26, 2, HorizLocation ),
10951                 rec( 28, 2, VertLocation ),
10952                 rec( 30, 2, FileDirWindow ),
10953                 rec( 32, 16, Reserved16 ),
10954                 rec( 48, 6, ProDOSInfo ),
10955                 rec( 54, (1,255), Path ),
10956         ], info_str=(Path, "AFP 2.0 Create Directory: %s", ", %s"))
10957         pkt.Reply(12, [
10958                 rec( 8, 4, NewDirectoryID, BE ),
10959         ])
10960         pkt.CompletionCodes([0x0000, 0x8301, 0x8400, 0x8800, 0x9300,
10961                              0x9600, 0x9804, 0x9900, 0x9c03, 0x9e00,
10962                              0xa100, 0xa201, 0xfd00, 0xff00])
10963         # 2222/230E, 35/14
10964         pkt = NCP(0x230E, "AFP 2.0 Create File", 'afp')
10965         pkt.Request((55,309), [
10966                 rec( 10, 1, VolumeNumber ),
10967                 rec( 11, 4, BaseDirectoryID, BE ),
10968                 rec( 15, 1, DeleteExistingFileFlag ),
10969                 rec( 16, 4, CreatorID, BE ),
10970                 rec( 20, 4, Reserved4 ),
10971                 rec( 24, 2, FinderAttr ),
10972                 rec( 26, 2, HorizLocation ),
10973                 rec( 28, 2, VertLocation ),
10974                 rec( 30, 2, FileDirWindow ),
10975                 rec( 32, 16, Reserved16 ),
10976                 rec( 48, 6, ProDOSInfo ),
10977                 rec( 54, (1,255), Path ),
10978         ], info_str=(Path, "AFP 2.0 Create File: %s", ", %s"))
10979         pkt.Reply(12, [
10980                 rec( 8, 4, NewDirectoryID, BE ),
10981         ])
10982         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8301, 0x8400,
10983                              0x8701, 0x8800, 0x8a00, 0x8d00, 0x8e00,
10984                              0x8f00, 0x9001, 0x9300, 0x9600, 0x9804,
10985                              0x9900, 0x9b03, 0x9c03, 0x9e00, 0xa100,
10986                              0xa201, 0xfd00, 0xff00])
10987         # 2222/230F, 35/15
10988         pkt = NCP(0x230F, "AFP 2.0 Get File Or Directory Information", 'afp')
10989         pkt.Request((18,272), [
10990                 rec( 10, 1, VolumeNumber ),
10991                 rec( 11, 4, BaseDirectoryID, BE ),
10992                 rec( 15, 2, RequestBitMap, BE ),
10993                 rec( 17, (1,255), Path ),
10994         ], info_str=(Path, "AFP 2.0 Get Information: %s", ", %s"))
10995         pkt.Reply(128, [
10996                 rec( 8, 4, AFPEntryID, BE ),
10997                 rec( 12, 4, ParentID, BE ),
10998                 rec( 16, 2, AttributesDef16 ),
10999                 rec( 18, 4, DataForkLen, BE ),
11000                 rec( 22, 4, ResourceForkLen, BE ),
11001                 rec( 26, 2, TotalOffspring, BE ),
11002                 rec( 28, 2, CreationDate, BE ),
11003                 rec( 30, 2, LastAccessedDate, BE ),
11004                 rec( 32, 2, ModifiedDate, BE ),
11005                 rec( 34, 2, ModifiedTime, BE ),
11006                 rec( 36, 2, ArchivedDate, BE ),
11007                 rec( 38, 2, ArchivedTime, BE ),
11008                 rec( 40, 4, CreatorID, BE ),
11009                 rec( 44, 4, Reserved4 ),
11010                 rec( 48, 2, FinderAttr ),
11011                 rec( 50, 2, HorizLocation ),
11012                 rec( 52, 2, VertLocation ),
11013                 rec( 54, 2, FileDirWindow ),
11014                 rec( 56, 16, Reserved16 ),
11015                 rec( 72, 32, LongName ),
11016                 rec( 104, 4, CreatorID, BE ),
11017                 rec( 108, 12, ShortName ),
11018                 rec( 120, 1, AccessPrivileges ),
11019                 rec( 121, 1, Reserved ),
11020                 rec( 122, 6, ProDOSInfo ),
11021         ])              
11022         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804, 0x9c03,
11023                              0xa100, 0xa201, 0xfd00, 0xff19])
11024         # 2222/2310, 35/16
11025         pkt = NCP(0x2310, "AFP 2.0 Set File Information", 'afp')
11026         pkt.Request((70, 324), [
11027                 rec( 10, 1, VolumeNumber ),
11028                 rec( 11, 4, MacBaseDirectoryID, BE ),
11029                 rec( 15, 2, RequestBitMap, BE ),
11030                 rec( 17, 2, AttributesDef16 ),
11031                 rec( 19, 2, CreationDate, BE ),
11032                 rec( 21, 2, LastAccessedDate, BE ),
11033                 rec( 23, 2, ModifiedDate, BE ),
11034                 rec( 25, 2, ModifiedTime, BE ),
11035                 rec( 27, 2, ArchivedDate, BE ),
11036                 rec( 29, 2, ArchivedTime, BE ),
11037                 rec( 31, 4, CreatorID, BE ),
11038                 rec( 35, 4, Reserved4 ),
11039                 rec( 39, 2, FinderAttr ),
11040                 rec( 41, 2, HorizLocation ),
11041                 rec( 43, 2, VertLocation ),
11042                 rec( 45, 2, FileDirWindow ),
11043                 rec( 47, 16, Reserved16 ),
11044                 rec( 63, 6, ProDOSInfo ),
11045                 rec( 69, (1,255), Path ),
11046         ], info_str=(Path, "AFP 2.0 Set File Information: %s", ", %s"))
11047         pkt.Reply(8)            
11048         pkt.CompletionCodes([0x0000, 0x0104, 0x8301, 0x8800, 0x9300, 0x9400,
11049                              0x9500, 0x9600, 0x9804, 0x9c03, 0xa100, 0xa201,
11050                              0xfd00, 0xff16])
11051         # 2222/2311, 35/17
11052         pkt = NCP(0x2311, "AFP 2.0 Scan File Information", 'afp')
11053         pkt.Request((26, 280), [
11054                 rec( 10, 1, VolumeNumber ),
11055                 rec( 11, 4, MacBaseDirectoryID, BE ),
11056                 rec( 15, 4, MacLastSeenID, BE ),
11057                 rec( 19, 2, DesiredResponseCount, BE ),
11058                 rec( 21, 2, SearchBitMap, BE ),
11059                 rec( 23, 2, RequestBitMap, BE ),
11060                 rec( 25, (1,255), Path ),
11061         ], info_str=(Path, "AFP 2.0 Scan File Information: %s", ", %s"))
11062         pkt.Reply(14, [
11063                 rec( 8, 2, ActualResponseCount, var="x" ),
11064                 rec( 10, 4, AFP20Struct, repeat="x" ),
11065         ])      
11066         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804,
11067                              0x9c03, 0xa100, 0xa201, 0xfd00, 0xff16])
11068         # 2222/2312, 35/18
11069         pkt = NCP(0x2312, "AFP Get DOS Name From Entry ID", 'afp')
11070         pkt.Request(15, [
11071                 rec( 10, 1, VolumeNumber ),
11072                 rec( 11, 4, AFPEntryID, BE ),
11073         ])
11074         pkt.Reply((9,263), [
11075                 rec( 8, (1,255), Path ),
11076         ])      
11077         pkt.CompletionCodes([0x0000, 0x8900, 0x9600, 0xbf00])
11078         # 2222/2313, 35/19
11079         pkt = NCP(0x2313, "AFP Get Macintosh Info On Deleted File", 'afp')
11080         pkt.Request(15, [
11081                 rec( 10, 1, VolumeNumber ),
11082                 rec( 11, 4, DirectoryNumber, BE ),
11083         ])
11084         pkt.Reply((51,305), [
11085                 rec( 8, 4, CreatorID, BE ),
11086                 rec( 12, 4, Reserved4 ),
11087                 rec( 16, 2, FinderAttr ),
11088                 rec( 18, 2, HorizLocation ),
11089                 rec( 20, 2, VertLocation ),
11090                 rec( 22, 2, FileDirWindow ),
11091                 rec( 24, 16, Reserved16 ),
11092                 rec( 40, 6, ProDOSInfo ),
11093                 rec( 46, 4, ResourceForkSize, BE ),
11094                 rec( 50, (1,255), FileName ),
11095         ])      
11096         pkt.CompletionCodes([0x0000, 0x9c03, 0xbf00])
11097         # 2222/2400, 36/00
11098         pkt = NCP(0x2400, "Get NCP Extension Information", 'fileserver')
11099         pkt.Request(14, [
11100                 rec( 10, 4, NCPextensionNumber, LE ),
11101         ])
11102         pkt.Reply((16,270), [
11103                 rec( 8, 4, NCPextensionNumber ),
11104                 rec( 12, 1, NCPextensionMajorVersion ),
11105                 rec( 13, 1, NCPextensionMinorVersion ),
11106                 rec( 14, 1, NCPextensionRevisionNumber ),
11107                 rec( 15, (1, 255), NCPextensionName ),
11108         ])      
11109         pkt.CompletionCodes([0x0000, 0xfe00])
11110         # 2222/2401, 36/01
11111         pkt = NCP(0x2401, "Get NCP Extension Maximum Data Size", 'fileserver')
11112         pkt.Request(10)
11113         pkt.Reply(10, [
11114                 rec( 8, 2, NCPdataSize ),
11115         ])      
11116         pkt.CompletionCodes([0x0000, 0xfe00])
11117         # 2222/2402, 36/02
11118         pkt = NCP(0x2402, "Get NCP Extension Information by Name", 'fileserver')
11119         pkt.Request((11, 265), [
11120                 rec( 10, (1,255), NCPextensionName ),
11121         ], info_str=(NCPextensionName, "Get NCP Extension Information by Name: %s", ", %s"))
11122         pkt.Reply((16,270), [
11123                 rec( 8, 4, NCPextensionNumber ),
11124                 rec( 12, 1, NCPextensionMajorVersion ),
11125                 rec( 13, 1, NCPextensionMinorVersion ),
11126                 rec( 14, 1, NCPextensionRevisionNumber ),
11127                 rec( 15, (1, 255), NCPextensionName ),
11128         ])      
11129         pkt.CompletionCodes([0x0000, 0xfe00, 0xff20])
11130         # 2222/2403, 36/03
11131         pkt = NCP(0x2403, "Get Number of Registered NCP Extensions", 'fileserver')
11132         pkt.Request(10)
11133         pkt.Reply(12, [
11134                 rec( 8, 4, NumberOfNCPExtensions ),
11135         ])      
11136         pkt.CompletionCodes([0x0000, 0xfe00])
11137         # 2222/2404, 36/04
11138         pkt = NCP(0x2404, "Get NCP Extension Registered Verbs List", 'fileserver')
11139         pkt.Request(14, [
11140                 rec( 10, 4, StartingNumber ),
11141         ])
11142         pkt.Reply(20, [
11143                 rec( 8, 4, ReturnedListCount, var="x" ),
11144                 rec( 12, 4, nextStartingNumber ),
11145                 rec( 16, 4, NCPExtensionNumbers, repeat="x" ),
11146         ])      
11147         pkt.CompletionCodes([0x0000, 0xfe00])
11148         # 2222/2405, 36/05
11149         pkt = NCP(0x2405, "Return NCP Extension Information", 'fileserver')
11150         pkt.Request(14, [
11151                 rec( 10, 4, NCPextensionNumber ),
11152         ])
11153         pkt.Reply((16,270), [
11154                 rec( 8, 4, NCPextensionNumber ),
11155                 rec( 12, 1, NCPextensionMajorVersion ),
11156                 rec( 13, 1, NCPextensionMinorVersion ),
11157                 rec( 14, 1, NCPextensionRevisionNumber ),
11158                 rec( 15, (1, 255), NCPextensionName ),
11159         ])      
11160         pkt.CompletionCodes([0x0000, 0xfe00])
11161         # 2222/2406, 36/06
11162         pkt = NCP(0x2406, "Return NCP Extension Maximum Data Size", 'fileserver')
11163         pkt.Request(10)
11164         pkt.Reply(12, [
11165                 rec( 8, 4, NCPdataSize ),
11166         ])      
11167         pkt.CompletionCodes([0x0000, 0xfe00])
11168         # 2222/25, 37
11169         pkt = NCP(0x25, "Execute NCP Extension", 'fileserver')
11170         pkt.Request(11, [
11171                 rec( 7, 4, NCPextensionNumber ),
11172                 # The following value is Unicode
11173                 #rec[ 13, (1,255), RequestData ],
11174         ])
11175         pkt.Reply(8)
11176                 # The following value is Unicode
11177                 #[ 8, (1, 255), ReplyBuffer ],
11178         pkt.CompletionCodes([0x0000, 0xee00, 0xfe00])
11179         # 2222/3B, 59
11180         pkt = NCP(0x3B, "Commit File", 'file', has_length=0 )
11181         pkt.Request(14, [
11182                 rec( 7, 1, Reserved ),
11183                 rec( 8, 6, FileHandle ),
11184         ])
11185         pkt.Reply(8)    
11186         pkt.CompletionCodes([0x0000, 0x8800, 0x9804, 0xff00])
11187         # 2222/3E, 62
11188         pkt = NCP(0x3E, "File Search Initialize", 'file', has_length=0 )
11189         pkt.Request((9, 263), [
11190                 rec( 7, 1, DirHandle ),
11191                 rec( 8, (1,255), Path ),
11192         ], info_str=(Path, "Initialize File Search: %s", ", %s"))
11193         pkt.Reply(14, [
11194                 rec( 8, 1, VolumeNumber ),
11195                 rec( 9, 2, DirectoryID, BE ),
11196                 rec( 11, 2, SequenceNumber, BE ),
11197                 rec( 13, 1, AccessRightsMask ),
11198         ])
11199         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100,
11200                              0xfd00, 0xff16])
11201         # 2222/3F, 63
11202         pkt = NCP(0x3F, "File Search Continue", 'file', has_length=0 )
11203         pkt.Request((14, 268), [
11204                 rec( 7, 1, VolumeNumber ),
11205                 rec( 8, 2, DirectoryID, BE ),
11206                 rec( 10, 2, SequenceNumber, BE ),
11207                 rec( 12, 1, SearchAttributes ),
11208                 rec( 13, (1,255), Path ),
11209         ], info_str=(Path, "File Search Continue: %s", ", %s"))
11210         pkt.Reply( NO_LENGTH_CHECK, [
11211                 srec( DirectoryInstance, req_cond="ncp.sattr_sub==TRUE"),
11212                 srec( FileInstance, req_cond="ncp.sattr_sub!=TRUE"),
11213         ])
11214         pkt.ReqCondSizeVariable()
11215         pkt.CompletionCodes([0x0000, 0xff16])
11216         # 2222/40, 64
11217         pkt = NCP(0x40, "Search for a File", 'file')
11218         pkt.Request((12, 266), [
11219                 rec( 7, 2, SequenceNumber, BE ),
11220                 rec( 9, 1, DirHandle ),
11221                 rec( 10, 1, SearchAttributes ),
11222                 rec( 11, (1,255), FileName ),
11223         ], info_str=(FileName, "Search for File: %s", ", %s"))
11224         pkt.Reply(40, [
11225                 rec( 8, 2, SequenceNumber, BE ),
11226                 rec( 10, 2, Reserved2 ),
11227                 rec( 12, 14, FileName14 ),
11228                 rec( 26, 1, AttributesDef ),
11229                 rec( 27, 1, FileExecuteType ),
11230                 rec( 28, 4, FileSize ),
11231                 rec( 32, 2, CreationDate, BE ),
11232                 rec( 34, 2, LastAccessedDate, BE ),
11233                 rec( 36, 2, ModifiedDate, BE ),
11234                 rec( 38, 2, ModifiedTime, BE ),
11235         ])
11236         pkt.CompletionCodes([0x0000, 0x8900, 0x9600, 0x9804, 0x9b03,
11237                              0x9c03, 0xa100, 0xfd00, 0xff16])
11238         # 2222/41, 65
11239         pkt = NCP(0x41, "Open File", 'file')
11240         pkt.Request((10, 264), [
11241                 rec( 7, 1, DirHandle ),
11242                 rec( 8, 1, SearchAttributes ),
11243                 rec( 9, (1,255), FileName ),
11244         ], info_str=(FileName, "Open File: %s", ", %s"))
11245         pkt.Reply(44, [
11246                 rec( 8, 6, FileHandle ),
11247                 rec( 14, 2, Reserved2 ),
11248                 rec( 16, 14, FileName14 ),
11249                 rec( 30, 1, AttributesDef ),
11250                 rec( 31, 1, FileExecuteType ),
11251                 rec( 32, 4, FileSize, BE ),
11252                 rec( 36, 2, CreationDate, BE ),
11253                 rec( 38, 2, LastAccessedDate, BE ),
11254                 rec( 40, 2, ModifiedDate, BE ),
11255                 rec( 42, 2, ModifiedTime, BE ),
11256         ])
11257         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8200, 0x9400,
11258                              0x9600, 0x9804, 0x9c03, 0xa100, 0xfd00,
11259                              0xff16])
11260         # 2222/42, 66
11261         pkt = NCP(0x42, "Close File", 'file')
11262         pkt.Request(14, [
11263                 rec( 7, 1, Reserved ),
11264                 rec( 8, 6, FileHandle ),
11265         ])
11266         pkt.Reply(8)
11267         pkt.CompletionCodes([0x0000, 0x8800, 0xff1a])
11268         # 2222/43, 67
11269         pkt = NCP(0x43, "Create File", 'file')
11270         pkt.Request((10, 264), [
11271                 rec( 7, 1, DirHandle ),
11272                 rec( 8, 1, AttributesDef ),
11273                 rec( 9, (1,255), FileName ),
11274         ], info_str=(FileName, "Create File: %s", ", %s"))
11275         pkt.Reply(44, [
11276                 rec( 8, 6, FileHandle ),
11277                 rec( 14, 2, Reserved2 ),
11278                 rec( 16, 14, FileName14 ),
11279                 rec( 30, 1, AttributesDef ),
11280                 rec( 31, 1, FileExecuteType ),
11281                 rec( 32, 4, FileSize, BE ),
11282                 rec( 36, 2, CreationDate, BE ),
11283                 rec( 38, 2, LastAccessedDate, BE ),
11284                 rec( 40, 2, ModifiedDate, BE ),
11285                 rec( 42, 2, ModifiedTime, BE ),
11286         ])
11287         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11288                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11289                              0x9804, 0x9900, 0x9b03, 0x9c03, 0xfd00,
11290                              0xff00])
11291         # 2222/44, 68
11292         pkt = NCP(0x44, "Erase File", 'file')
11293         pkt.Request((10, 264), [
11294                 rec( 7, 1, DirHandle ),
11295                 rec( 8, 1, SearchAttributes ),
11296                 rec( 9, (1,255), FileName ),
11297         ], info_str=(FileName, "Erase File: %s", ", %s"))
11298         pkt.Reply(8)
11299         pkt.CompletionCodes([0x0000, 0x8a00, 0x8d00, 0x8e00, 0x8f00,
11300                              0x9001, 0x9600, 0x9804, 0x9b03, 0x9c03,
11301                              0xa100, 0xfd00, 0xff00])
11302         # 2222/45, 69
11303         pkt = NCP(0x45, "Rename File", 'file')
11304         pkt.Request((12, 520), [
11305                 rec( 7, 1, DirHandle ),
11306                 rec( 8, 1, SearchAttributes ),
11307                 rec( 9, (1,255), FileName ),
11308                 rec( -1, 1, TargetDirHandle ),
11309                 rec( -1, (1, 255), NewFileNameLen ),
11310         ], info_str=(FileName, "Rename File: %s", ", %s"))
11311         pkt.Reply(8)
11312         pkt.CompletionCodes([0x0000, 0x8701, 0x8b00, 0x8d00, 0x8e00,
11313                              0x8f00, 0x9001, 0x9101, 0x9201, 0x9600,
11314                              0x9804, 0x9a00, 0x9b03, 0x9c03, 0xa100,
11315                              0xfd00, 0xff16])
11316         # 2222/46, 70
11317         pkt = NCP(0x46, "Set File Attributes", 'file')
11318         pkt.Request((11, 265), [
11319                 rec( 7, 1, AttributesDef ),
11320                 rec( 8, 1, DirHandle ),
11321                 rec( 9, 1, SearchAttributes ),
11322                 rec( 10, (1,255), FileName ),
11323         ], info_str=(FileName, "Set File Attributes: %s", ", %s"))
11324         pkt.Reply(8)
11325         pkt.CompletionCodes([0x0000, 0x8c00, 0x8d00, 0x8e00, 0x9600,
11326                              0x9804, 0x9b03, 0x9c03, 0xa100, 0xfd00,
11327                              0xff16])
11328         # 2222/47, 71
11329         pkt = NCP(0x47, "Get Current Size of File", 'file')
11330         pkt.Request(13, [
11331                 rec( 7, 6, FileHandle ),
11332         ])
11333         pkt.Reply(12, [
11334                 rec( 8, 4, FileSize, BE ),
11335         ])
11336         pkt.CompletionCodes([0x0000, 0x8800])
11337         # 2222/48, 72
11338         pkt = NCP(0x48, "Read From A File", 'file')
11339         pkt.Request(20, [
11340                 rec( 7, 1, Reserved ),
11341                 rec( 8, 6, FileHandle ),
11342                 rec( 14, 4, FileOffset, BE ), 
11343                 rec( 18, 2, MaxBytes, BE ),     
11344         ])
11345         pkt.Reply(10, [ 
11346                 rec( 8, 2, NumBytes, BE ),      
11347         ])
11348         pkt.CompletionCodes([0x0000, 0x8300, 0x8800, 0x9300, 0xff00])
11349         # 2222/49, 73
11350         pkt = NCP(0x49, "Write to a File", 'file')
11351         pkt.Request(20, [
11352                 rec( 7, 1, Reserved ),
11353                 rec( 8, 6, FileHandle ),
11354                 rec( 14, 4, FileOffset, BE ),
11355                 rec( 18, 2, MaxBytes, BE ),     
11356         ])
11357         pkt.Reply(8)
11358         pkt.CompletionCodes([0x0000, 0x0104, 0x8300, 0x8800, 0x9400, 0x9500, 0xa201, 0xff1b])
11359         # 2222/4A, 74
11360         pkt = NCP(0x4A, "Copy from One File to Another", 'file')
11361         pkt.Request(30, [
11362                 rec( 7, 1, Reserved ),
11363                 rec( 8, 6, FileHandle ),
11364                 rec( 14, 6, TargetFileHandle ),
11365                 rec( 20, 4, FileOffset, BE ),
11366                 rec( 24, 4, TargetFileOffset, BE ),
11367                 rec( 28, 2, BytesToCopy, BE ),
11368         ])
11369         pkt.Reply(12, [
11370                 rec( 8, 4, BytesActuallyTransferred, BE ),
11371         ])
11372         pkt.CompletionCodes([0x0000, 0x0104, 0x8300, 0x8800, 0x9300, 0x9400,
11373                              0x9500, 0x9600, 0xa201, 0xff1b])
11374         # 2222/4B, 75
11375         pkt = NCP(0x4B, "Set File Time Date Stamp", 'file')
11376         pkt.Request(18, [
11377                 rec( 7, 1, Reserved ),
11378                 rec( 8, 6, FileHandle ),
11379                 rec( 14, 2, FileTime, BE ),
11380                 rec( 16, 2, FileDate, BE ),
11381         ])
11382         pkt.Reply(8)
11383         pkt.CompletionCodes([0x0000, 0x8800, 0x9600])
11384         # 2222/4C, 76
11385         pkt = NCP(0x4C, "Open File", 'file')
11386         pkt.Request((11, 265), [
11387                 rec( 7, 1, DirHandle ),
11388                 rec( 8, 1, SearchAttributes ),
11389                 rec( 9, 1, AccessRightsMask ),
11390                 rec( 10, (1,255), FileName ),
11391         ], info_str=(FileName, "Open File: %s", ", %s"))
11392         pkt.Reply(44, [
11393                 rec( 8, 6, FileHandle ),
11394                 rec( 14, 2, Reserved2 ),
11395                 rec( 16, 14, FileName14 ),
11396                 rec( 30, 1, AttributesDef ),
11397                 rec( 31, 1, FileExecuteType ),
11398                 rec( 32, 4, FileSize, BE ),
11399                 rec( 36, 2, CreationDate, BE ),
11400                 rec( 38, 2, LastAccessedDate, BE ),
11401                 rec( 40, 2, ModifiedDate, BE ),
11402                 rec( 42, 2, ModifiedTime, BE ),
11403         ])
11404         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8200, 0x9400,
11405                              0x9600, 0x9804, 0x9c03, 0xa100, 0xfd00,
11406                              0xff16])
11407         # 2222/4D, 77
11408         pkt = NCP(0x4D, "Create File", 'file')
11409         pkt.Request((10, 264), [
11410                 rec( 7, 1, DirHandle ),
11411                 rec( 8, 1, AttributesDef ),
11412                 rec( 9, (1,255), FileName ),
11413         ], info_str=(FileName, "Create File: %s", ", %s"))
11414         pkt.Reply(44, [
11415                 rec( 8, 6, FileHandle ),
11416                 rec( 14, 2, Reserved2 ),
11417                 rec( 16, 14, FileName14 ),
11418                 rec( 30, 1, AttributesDef ),
11419                 rec( 31, 1, FileExecuteType ),
11420                 rec( 32, 4, FileSize, BE ),
11421                 rec( 36, 2, CreationDate, BE ),
11422                 rec( 38, 2, LastAccessedDate, BE ),
11423                 rec( 40, 2, ModifiedDate, BE ),
11424                 rec( 42, 2, ModifiedTime, BE ),
11425         ])
11426         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11427                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11428                              0x9804, 0x9900, 0x9b03, 0x9c03, 0xfd00,
11429                              0xff00])
11430         # 2222/4F, 79
11431         pkt = NCP(0x4F, "Set File Extended Attributes", 'file')
11432         pkt.Request((11, 265), [
11433                 rec( 7, 1, AttributesDef ),
11434                 rec( 8, 1, DirHandle ),
11435                 rec( 9, 1, AccessRightsMask ),
11436                 rec( 10, (1,255), FileName ),
11437         ], info_str=(FileName, "Set File Extended Attributes: %s", ", %s"))
11438         pkt.Reply(8)
11439         pkt.CompletionCodes([0x0000, 0x8c00, 0x8d00, 0x8e00, 0x9600,
11440                              0x9804, 0x9b03, 0x9c03, 0xa100, 0xfd00,
11441                              0xff16])
11442         # 2222/54, 84
11443         pkt = NCP(0x54, "Open/Create File", 'file')
11444         pkt.Request((12, 266), [
11445                 rec( 7, 1, DirHandle ),
11446                 rec( 8, 1, AttributesDef ),
11447                 rec( 9, 1, AccessRightsMask ),
11448                 rec( 10, 1, ActionFlag ),
11449                 rec( 11, (1,255), FileName ),
11450         ], info_str=(FileName, "Open/Create File: %s", ", %s"))
11451         pkt.Reply(44, [
11452                 rec( 8, 6, FileHandle ),
11453                 rec( 14, 2, Reserved2 ),
11454                 rec( 16, 14, FileName14 ),
11455                 rec( 30, 1, AttributesDef ),
11456                 rec( 31, 1, FileExecuteType ),
11457                 rec( 32, 4, FileSize, BE ),
11458                 rec( 36, 2, CreationDate, BE ),
11459                 rec( 38, 2, LastAccessedDate, BE ),
11460                 rec( 40, 2, ModifiedDate, BE ),
11461                 rec( 42, 2, ModifiedTime, BE ),
11462         ])
11463         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11464                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11465                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
11466         # 2222/55, 85
11467         pkt = NCP(0x55, "Get Sparse File Data Block Bit Map", 'file')
11468         pkt.Request(17, [
11469                 rec( 7, 6, FileHandle ),
11470                 rec( 13, 4, FileOffset ),
11471         ])
11472         pkt.Reply(528, [
11473                 rec( 8, 4, AllocationBlockSize ),
11474                 rec( 12, 4, Reserved4 ),
11475                 rec( 16, 512, BitMap ),
11476         ])
11477         pkt.CompletionCodes([0x0000, 0x8800])
11478         # 2222/5601, 86/01
11479         pkt = NCP(0x5601, "Close Extended Attribute Handle", 'file', has_length=0 )
11480         pkt.Request(14, [
11481                 rec( 8, 2, Reserved2 ),
11482                 rec( 10, 4, EAHandle ),
11483         ])
11484         pkt.Reply(8)
11485         pkt.CompletionCodes([0x0000, 0xcf00, 0xd301])
11486         # 2222/5602, 86/02
11487         pkt = NCP(0x5602, "Write Extended Attribute", 'file', has_length=0 )
11488         pkt.Request((35,97), [
11489                 rec( 8, 2, EAFlags ),
11490                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
11491                 rec( 14, 4, ReservedOrDirectoryNumber ),
11492                 rec( 18, 4, TtlWriteDataSize ),
11493                 rec( 22, 4, FileOffset ),
11494                 rec( 26, 4, EAAccessFlag ),
11495                 rec( 30, 2, EAValueLength, var='x' ),
11496                 rec( 32, (2,64), EAKey ),
11497                 rec( -1, 1, EAValueRep, repeat='x' ),
11498         ], info_str=(EAKey, "Write Extended Attribute: %s", ", %s"))
11499         pkt.Reply(20, [
11500                 rec( 8, 4, EAErrorCodes ),
11501                 rec( 12, 4, EABytesWritten ),
11502                 rec( 16, 4, NewEAHandle ),
11503         ])
11504         pkt.CompletionCodes([0x0000, 0xc800, 0xc900, 0xcb00, 0xce00, 0xcf00, 0xd101,
11505                              0xd203, 0xd301, 0xd402])
11506         # 2222/5603, 86/03
11507         pkt = NCP(0x5603, "Read Extended Attribute", 'file', has_length=0 )
11508         pkt.Request((28,538), [
11509                 rec( 8, 2, EAFlags ),
11510                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
11511                 rec( 14, 4, ReservedOrDirectoryNumber ),
11512                 rec( 18, 4, FileOffset ),
11513                 rec( 22, 4, InspectSize ),
11514                 rec( 26, (2,512), EAKey ),
11515         ], info_str=(EAKey, "Read Extended Attribute: %s", ", %s"))
11516         pkt.Reply((26,536), [
11517                 rec( 8, 4, EAErrorCodes ),
11518                 rec( 12, 4, TtlValuesLength ),
11519                 rec( 16, 4, NewEAHandle ),
11520                 rec( 20, 4, EAAccessFlag ),
11521                 rec( 24, (2,512), EAValue ),
11522         ])
11523         pkt.CompletionCodes([0x0000, 0xc900, 0xce00, 0xcf00, 0xd101,
11524                              0xd301])
11525         # 2222/5604, 86/04
11526         pkt = NCP(0x5604, "Enumerate Extended Attribute", 'file', has_length=0 )
11527         pkt.Request((26,536), [
11528                 rec( 8, 2, EAFlags ),
11529                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
11530                 rec( 14, 4, ReservedOrDirectoryNumber ),
11531                 rec( 18, 4, InspectSize ),
11532                 rec( 22, 2, SequenceNumber ),
11533                 rec( 24, (2,512), EAKey ),
11534         ], info_str=(EAKey, "Enumerate Extended Attribute: %s", ", %s"))
11535         pkt.Reply(28, [
11536                 rec( 8, 4, EAErrorCodes ),
11537                 rec( 12, 4, TtlEAs ),
11538                 rec( 16, 4, TtlEAsDataSize ),
11539                 rec( 20, 4, TtlEAsKeySize ),
11540                 rec( 24, 4, NewEAHandle ),
11541         ])
11542         pkt.CompletionCodes([0x0000, 0x8800, 0xc900, 0xce00, 0xcf00, 0xd101,
11543                              0xd301])
11544         # 2222/5605, 86/05
11545         pkt = NCP(0x5605, "Duplicate Extended Attributes", 'file', has_length=0 )
11546         pkt.Request(28, [
11547                 rec( 8, 2, EAFlags ),
11548                 rec( 10, 2, DstEAFlags ),
11549                 rec( 12, 4, EAHandleOrNetWareHandleOrVolume ),
11550                 rec( 16, 4, ReservedOrDirectoryNumber ),
11551                 rec( 20, 4, EAHandleOrNetWareHandleOrVolume ),
11552                 rec( 24, 4, ReservedOrDirectoryNumber ),
11553         ])
11554         pkt.Reply(20, [
11555                 rec( 8, 4, EADuplicateCount ),
11556                 rec( 12, 4, EADataSizeDuplicated ),
11557                 rec( 16, 4, EAKeySizeDuplicated ),
11558         ])
11559         pkt.CompletionCodes([0x0000, 0xd101])
11560         # 2222/5701, 87/01
11561         pkt = NCP(0x5701, "Open/Create File or Subdirectory", 'file', has_length=0)
11562         pkt.Request((30, 284), [
11563                 rec( 8, 1, NameSpace  ),
11564                 rec( 9, 1, OpenCreateMode ),
11565                 rec( 10, 2, SearchAttributesLow ),
11566                 rec( 12, 2, ReturnInfoMask ),
11567                 rec( 14, 2, ExtendedInfo ),
11568                 rec( 16, 4, AttributesDef32 ),
11569                 rec( 20, 2, DesiredAccessRights ),
11570                 rec( 22, 1, VolumeNumber ),
11571                 rec( 23, 4, DirectoryBase ),
11572                 rec( 27, 1, HandleFlag ),
11573                 rec( 28, 1, PathCount, var="x" ),
11574                 rec( 29, (1,255), Path, repeat="x" ),
11575         ], info_str=(Path, "Open or Create: %s", "/%s"))
11576         pkt.Reply( NO_LENGTH_CHECK, [
11577                 rec( 8, 4, FileHandle ),
11578                 rec( 12, 1, OpenCreateAction ),
11579                 rec( 13, 1, Reserved ),
11580                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
11581                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
11582                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
11583                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
11584                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
11585                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
11586                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
11587                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
11588                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
11589                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
11590                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
11591                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
11592                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
11593                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
11594                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
11595                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
11596                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
11597                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
11598                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
11599                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
11600                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
11601                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
11602                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
11603                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
11604                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
11605                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
11606                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
11607                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
11608                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
11609                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
11610                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
11611                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
11612                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
11613                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ), 
11614                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
11615                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
11616                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
11617                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ), 
11618                 srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ), 
11619                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ), 
11620                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ), 
11621                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ), 
11622                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ), 
11623                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ), 
11624                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
11625                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ), 
11626                 srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
11627         ])
11628         pkt.ReqCondSizeVariable()
11629         pkt.CompletionCodes([0x0000, 0x8001, 0x8101, 0x8401, 0x8501,
11630                              0x8701, 0x8900, 0x8d00, 0x8f00, 0x9001, 0x9600,
11631                              0x9804, 0x9b03, 0x9c03, 0xa500, 0xbf00, 0xfd00, 0xff16])
11632         # 2222/5702, 87/02
11633         pkt = NCP(0x5702, "Initialize Search", 'file', has_length=0)
11634         pkt.Request( (18,272), [
11635                 rec( 8, 1, NameSpace  ),
11636                 rec( 9, 1, Reserved ),
11637                 rec( 10, 1, VolumeNumber ),
11638                 rec( 11, 4, DirectoryBase ),
11639                 rec( 15, 1, HandleFlag ),
11640                 rec( 16, 1, PathCount, var="x" ),
11641                 rec( 17, (1,255), Path, repeat="x" ),
11642         ], info_str=(Path, "Set Search Pointer to: %s", "/%s"))
11643         pkt.Reply(17, [
11644                 rec( 8, 1, VolumeNumber ),
11645                 rec( 9, 4, DirectoryNumber ),
11646                 rec( 13, 4, DirectoryEntryNumber ),
11647         ])
11648         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11649                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11650                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11651         # 2222/5703, 87/03
11652         pkt = NCP(0x5703, "Search for File or Subdirectory", 'file', has_length=0)
11653         pkt.Request((26, 280), [
11654                 rec( 8, 1, NameSpace  ),
11655                 rec( 9, 1, DataStream ),
11656                 rec( 10, 2, SearchAttributesLow ),
11657                 rec( 12, 2, ReturnInfoMask ),
11658                 rec( 14, 2, ExtendedInfo ),
11659                 rec( 16, 9, SearchSequence ),
11660                 rec( 25, (1,255), SearchPattern ),
11661         ], info_str=(SearchPattern, "Search for: %s", "/%s"))
11662         pkt.Reply( NO_LENGTH_CHECK, [
11663                 rec( 8, 9, SearchSequence ),
11664                 rec( 17, 1, Reserved ),
11665                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
11666                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
11667                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
11668                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
11669                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
11670                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
11671                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
11672                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
11673                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
11674                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
11675                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
11676                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
11677                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
11678                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
11679                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
11680                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
11681                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
11682                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
11683                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
11684                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
11685                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
11686                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
11687                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
11688                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
11689                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
11690                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
11691                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
11692                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
11693                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
11694                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
11695                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
11696                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
11697                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
11698                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ), 
11699                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
11700                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
11701                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
11702                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ), 
11703                 srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ), 
11704                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ), 
11705                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ), 
11706                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ), 
11707                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ), 
11708                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ), 
11709                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
11710                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ), 
11711                 srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
11712         ])
11713         pkt.ReqCondSizeVariable()
11714         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11715                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11716                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11717         # 2222/5704, 87/04
11718         pkt = NCP(0x5704, "Rename Or Move a File or Subdirectory", 'file', has_length=0)
11719         pkt.Request((28, 536), [
11720                 rec( 8, 1, NameSpace  ),
11721                 rec( 9, 1, RenameFlag ),
11722                 rec( 10, 2, SearchAttributesLow ),
11723                 rec( 12, 1, VolumeNumber ),
11724                 rec( 13, 4, DirectoryBase ),
11725                 rec( 17, 1, HandleFlag ),
11726                 rec( 18, 1, PathCount, var="x" ),
11727                 rec( 19, 1, VolumeNumber ),
11728                 rec( 20, 4, DirectoryBase ),
11729                 rec( 24, 1, HandleFlag ),
11730                 rec( 25, 1, PathCount, var="y" ),
11731                 rec( 26, (1, 255), Path, repeat="x" ),
11732                 rec( -1, (1,255), Path, repeat="y" ),
11733         ], info_str=(Path, "Rename or Move: %s", "/%s"))
11734         pkt.Reply(8)
11735         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11736                              0x8701, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9200, 0x9600,
11737                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11738         # 2222/5705, 87/05
11739         pkt = NCP(0x5705, "Scan File or Subdirectory for Trustees", 'file', has_length=0)
11740         pkt.Request((24, 278), [
11741                 rec( 8, 1, NameSpace  ),
11742                 rec( 9, 1, Reserved ),
11743                 rec( 10, 2, SearchAttributesLow ),
11744                 rec( 12, 4, SequenceNumber ),
11745                 rec( 16, 1, VolumeNumber ),
11746                 rec( 17, 4, DirectoryBase ),
11747                 rec( 21, 1, HandleFlag ),
11748                 rec( 22, 1, PathCount, var="x" ),
11749                 rec( 23, (1, 255), Path, repeat="x" ),
11750         ], info_str=(Path, "Scan Trustees for: %s", "/%s"))
11751         pkt.Reply(20, [
11752                 rec( 8, 4, SequenceNumber ),
11753                 rec( 12, 2, ObjectIDCount, var="x" ),
11754                 rec( 14, 6, TrusteeStruct, repeat="x" ),
11755         ])
11756         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11757                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11758                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11759         # 2222/5706, 87/06
11760         pkt = NCP(0x5706, "Obtain File or SubDirectory Information", 'file', has_length=0)
11761         pkt.Request((24,278), [
11762                 rec( 10, 1, SrcNameSpace ),
11763                 rec( 11, 1, DestNameSpace ),
11764                 rec( 12, 2, SearchAttributesLow ),
11765                 rec( 14, 2, ReturnInfoMask, LE ),
11766                 rec( 16, 2, ExtendedInfo ),
11767                 rec( 18, 1, VolumeNumber ),
11768                 rec( 19, 4, DirectoryBase ),
11769                 rec( 23, 1, HandleFlag ),
11770                 rec( 24, 1, PathCount, var="x" ),
11771                 rec( 25, (1,255), Path, repeat="x",),
11772         ], info_str=(Path, "Obtain Info for: %s", "/%s"))
11773         pkt.Reply(NO_LENGTH_CHECK, [
11774             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
11775             srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
11776             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
11777             srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
11778             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
11779             srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
11780             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
11781             srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
11782             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
11783             srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
11784             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
11785             srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
11786             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
11787             srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
11788             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
11789             srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
11790             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
11791             srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
11792             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
11793             srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
11794             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
11795             srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
11796             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
11797             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
11798             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
11799             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
11800             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
11801             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
11802             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
11803             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
11804             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
11805             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
11806             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
11807             srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ), 
11808             srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
11809             srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
11810             srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
11811             srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ), 
11812             srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ), 
11813             srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ), 
11814             srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ), 
11815             srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ), 
11816             srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ), 
11817             srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ), 
11818             srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
11819             srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ), 
11820             srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
11821         ])
11822         pkt.ReqCondSizeVariable()
11823         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11824                              0x8701, 0x8900, 0x8d00, 0x8f00, 0x9001, 0x9600,
11825                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11826         # 2222/5707, 87/07
11827         pkt = NCP(0x5707, "Modify File or Subdirectory DOS Information", 'file', has_length=0)
11828         pkt.Request((62,316), [
11829                 rec( 8, 1, NameSpace ),
11830                 rec( 9, 1, Reserved ),
11831                 rec( 10, 2, SearchAttributesLow ),
11832                 rec( 12, 2, ModifyDOSInfoMask ),
11833                 rec( 14, 2, Reserved2 ),
11834                 rec( 16, 2, AttributesDef16 ),
11835                 rec( 18, 1, FileMode ),
11836                 rec( 19, 1, FileExtendedAttributes ),
11837                 rec( 20, 2, CreationDate ),
11838                 rec( 22, 2, CreationTime ),
11839                 rec( 24, 4, CreatorID, BE ),
11840                 rec( 28, 2, ModifiedDate ),
11841                 rec( 30, 2, ModifiedTime ),
11842                 rec( 32, 4, ModifierID, BE ),
11843                 rec( 36, 2, ArchivedDate ),
11844                 rec( 38, 2, ArchivedTime ),
11845                 rec( 40, 4, ArchiverID, BE ),
11846                 rec( 44, 2, LastAccessedDate ),
11847                 rec( 46, 2, InheritedRightsMask ),
11848                 rec( 48, 2, InheritanceRevokeMask ),
11849                 rec( 50, 4, MaxSpace ),
11850                 rec( 54, 1, VolumeNumber ),
11851                 rec( 55, 4, DirectoryBase ),
11852                 rec( 59, 1, HandleFlag ),
11853                 rec( 60, 1, PathCount, var="x" ),
11854                 rec( 61, (1,255), Path, repeat="x" ),
11855         ], info_str=(Path, "Modify DOS Information for: %s", "/%s"))
11856         pkt.Reply(8)
11857         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11858                              0x8701, 0x8c01, 0x8d00, 0x8f00, 0x9001, 0x9600,
11859                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11860         # 2222/5708, 87/08
11861         pkt = NCP(0x5708, "Delete a File or Subdirectory", 'file', has_length=0)
11862         pkt.Request((20,274), [
11863                 rec( 8, 1, NameSpace ),
11864                 rec( 9, 1, Reserved ),
11865                 rec( 10, 2, SearchAttributesLow ),
11866                 rec( 12, 1, VolumeNumber ),
11867                 rec( 13, 4, DirectoryBase ),
11868                 rec( 17, 1, HandleFlag ),
11869                 rec( 18, 1, PathCount, var="x" ),
11870                 rec( 19, (1,255), Path, repeat="x" ),
11871         ], info_str=(Path, "Delete: %s", "/%s"))
11872         pkt.Reply(8)
11873         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,  
11874                              0x8701, 0x8a00, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9600,
11875                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11876         # 2222/5709, 87/09
11877         pkt = NCP(0x5709, "Set Short Directory Handle", 'file', has_length=0)
11878         pkt.Request((20,274), [
11879                 rec( 8, 1, NameSpace ),
11880                 rec( 9, 1, DataStream ),
11881                 rec( 10, 1, DestDirHandle ),
11882                 rec( 11, 1, Reserved ),
11883                 rec( 12, 1, VolumeNumber ),
11884                 rec( 13, 4, DirectoryBase ),
11885                 rec( 17, 1, HandleFlag ),
11886                 rec( 18, 1, PathCount, var="x" ),
11887                 rec( 19, (1,255), Path, repeat="x" ),
11888         ], info_str=(Path, "Set Short Directory Handle to: %s", "/%s"))
11889         pkt.Reply(8)
11890         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11891                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11892                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11893         # 2222/570A, 87/10
11894         pkt = NCP(0x570A, "Add Trustee Set to File or Subdirectory", 'file', has_length=0)
11895         pkt.Request((31,285), [
11896                 rec( 8, 1, NameSpace ),
11897                 rec( 9, 1, Reserved ),
11898                 rec( 10, 2, SearchAttributesLow ),
11899                 rec( 12, 2, AccessRightsMaskWord ),
11900                 rec( 14, 2, ObjectIDCount, var="y" ),
11901                 rec( 16, 1, VolumeNumber ),
11902                 rec( 17, 4, DirectoryBase ),
11903                 rec( 21, 1, HandleFlag ),
11904                 rec( 22, 1, PathCount, var="x" ),
11905                 rec( 23, (1,255), Path, repeat="x" ),
11906                 rec( -1, 7, TrusteeStruct, repeat="y" ),
11907         ], info_str=(Path, "Add Trustee Set to: %s", "/%s"))
11908         pkt.Reply(8)
11909         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11910                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11911                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfc01, 0xfd00, 0xff16])
11912         # 2222/570B, 87/11
11913         pkt = NCP(0x570B, "Delete Trustee Set from File or SubDirectory", 'file', has_length=0)
11914         pkt.Request((27,281), [
11915                 rec( 8, 1, NameSpace ),
11916                 rec( 9, 1, Reserved ),
11917                 rec( 10, 2, ObjectIDCount, var="y" ),
11918                 rec( 12, 1, VolumeNumber ),
11919                 rec( 13, 4, DirectoryBase ),
11920                 rec( 17, 1, HandleFlag ),
11921                 rec( 18, 1, PathCount, var="x" ),
11922                 rec( 19, (1,255), Path, repeat="x" ),
11923                 rec( -1, 7, TrusteeStruct, repeat="y" ),
11924         ], info_str=(Path, "Delete Trustee Set from: %s", "/%s"))
11925         pkt.Reply(8)
11926         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11927                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11928                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11929         # 2222/570C, 87/12
11930         pkt = NCP(0x570C, "Allocate Short Directory Handle", 'file', has_length=0)
11931         pkt.Request((20,274), [
11932                 rec( 8, 1, NameSpace ),
11933                 rec( 9, 1, Reserved ),
11934                 rec( 10, 2, AllocateMode ),
11935                 rec( 12, 1, VolumeNumber ),
11936                 rec( 13, 4, DirectoryBase ),
11937                 rec( 17, 1, HandleFlag ),
11938                 rec( 18, 1, PathCount, var="x" ),
11939                 rec( 19, (1,255), Path, repeat="x" ),
11940         ], info_str=(Path, "Allocate Short Directory Handle to: %s", "/%s"))
11941         pkt.Reply(14, [
11942                 rec( 8, 1, DirHandle ),
11943                 rec( 9, 1, VolumeNumber ),
11944                 rec( 10, 4, Reserved4 ),
11945         ])
11946         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11947                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11948                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11949         # 2222/5710, 87/16
11950         pkt = NCP(0x5710, "Scan Salvageable Files", 'file', has_length=0)
11951         pkt.Request((26,280), [
11952                 rec( 8, 1, NameSpace ),
11953                 rec( 9, 1, DataStream ),
11954                 rec( 10, 2, ReturnInfoMask ),
11955                 rec( 12, 2, ExtendedInfo ),
11956                 rec( 14, 4, SequenceNumber ),
11957                 rec( 18, 1, VolumeNumber ),
11958                 rec( 19, 4, DirectoryBase ),
11959                 rec( 23, 1, HandleFlag ),
11960                 rec( 24, 1, PathCount, var="x" ),
11961                 rec( 25, (1,255), Path, repeat="x" ),
11962         ], info_str=(Path, "Scan for Deleted Files in: %s", "/%s"))
11963         pkt.Reply(NO_LENGTH_CHECK, [
11964                 rec( 8, 4, SequenceNumber ),
11965                 rec( 12, 2, DeletedTime ),
11966                 rec( 14, 2, DeletedDate ),
11967                 rec( 16, 4, DeletedID, BE ),
11968                 rec( 20, 4, VolumeID ),
11969                 rec( 24, 4, DirectoryBase ),
11970                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
11971                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
11972                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
11973                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
11974                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
11975                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
11976                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
11977                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
11978                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
11979                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
11980                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
11981                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
11982                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
11983                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
11984                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
11985                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
11986                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
11987                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
11988                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
11989                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
11990                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
11991                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
11992                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
11993                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
11994                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
11995                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
11996                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
11997                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
11998                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
11999                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12000                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12001                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12002                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12003                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12004                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12005         ])
12006         pkt.ReqCondSizeVariable()
12007         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12008                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12009                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12010         # 2222/5711, 87/17
12011         pkt = NCP(0x5711, "Recover Salvageable File", 'file', has_length=0)
12012         pkt.Request((23,277), [
12013                 rec( 8, 1, NameSpace ),
12014                 rec( 9, 1, Reserved ),
12015                 rec( 10, 4, SequenceNumber ),
12016                 rec( 14, 4, VolumeID ),
12017                 rec( 18, 4, DirectoryBase ),
12018                 rec( 22, (1,255), FileName ),
12019         ], info_str=(FileName, "Recover Deleted File: %s", ", %s"))
12020         pkt.Reply(8)
12021         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12022                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12023                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12024         # 2222/5712, 87/18
12025         pkt = NCP(0x5712, "Purge Salvageable Files", 'file', has_length=0)
12026         pkt.Request(22, [
12027                 rec( 8, 1, NameSpace ),
12028                 rec( 9, 1, Reserved ),
12029                 rec( 10, 4, SequenceNumber ),
12030                 rec( 14, 4, VolumeID ),
12031                 rec( 18, 4, DirectoryBase ),
12032         ])
12033         pkt.Reply(8)
12034         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12035                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12036                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12037         # 2222/5713, 87/19
12038         pkt = NCP(0x5713, "Get Name Space Information", 'file', has_length=0)
12039         pkt.Request(18, [
12040                 rec( 8, 1, SrcNameSpace ),
12041                 rec( 9, 1, DestNameSpace ),
12042                 rec( 10, 1, Reserved ),
12043                 rec( 11, 1, VolumeNumber ),
12044                 rec( 12, 4, DirectoryBase ),
12045                 rec( 16, 2, NamesSpaceInfoMask ),
12046         ])
12047         pkt.Reply(NO_LENGTH_CHECK, [
12048             srec( FileNameStruct, req_cond="ncp.ns_info_mask_modify == TRUE" ),
12049             srec( FileAttributesStruct, req_cond="ncp.ns_info_mask_fatt == TRUE" ),
12050             srec( CreationDateStruct, req_cond="ncp.ns_info_mask_cdate == TRUE" ),
12051             srec( CreationTimeStruct, req_cond="ncp.ns_info_mask_ctime == TRUE" ),
12052             srec( OwnerIDStruct, req_cond="ncp.ns_info_mask_owner == TRUE" ),
12053             srec( ArchiveDateStruct, req_cond="ncp.ns_info_mask_adate == TRUE" ),
12054             srec( ArchiveTimeStruct, req_cond="ncp.ns_info_mask_atime == TRUE" ),
12055             srec( ArchiveIdStruct, req_cond="ncp.ns_info_mask_aid == TRUE" ),
12056             srec( UpdateDateStruct, req_cond="ncp.ns_info_mask_udate == TRUE" ),
12057             srec( UpdateTimeStruct, req_cond="ncp.ns_info_mask_utime == TRUE" ),
12058             srec( UpdateIDStruct, req_cond="ncp.ns_info_mask_uid == TRUE" ),
12059             srec( LastAccessStruct, req_cond="ncp.ns_info_mask_acc_date == TRUE" ),
12060             srec( RightsInfoStruct, req_cond="ncp.ns_info_mask_max_acc_mask == TRUE" ),
12061         ])
12062         pkt.ReqCondSizeVariable()
12063         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12064                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12065                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12066         # 2222/5714, 87/20
12067         pkt = NCP(0x5714, "Search for File or Subdirectory Set", 'file', has_length=0)
12068         pkt.Request((28, 282), [
12069                 rec( 8, 1, NameSpace  ),
12070                 rec( 9, 1, DataStream ),
12071                 rec( 10, 2, SearchAttributesLow ),
12072                 rec( 12, 2, ReturnInfoMask ),
12073                 rec( 14, 2, ExtendedInfo ),
12074                 rec( 16, 2, ReturnInfoCount ),
12075                 rec( 18, 9, SearchSequence ),
12076                 rec( 27, (1,255), SearchPattern ),
12077         ], info_str=(SearchPattern, "Search for: %s", ", %s"))
12078         pkt.Reply(NO_LENGTH_CHECK, [
12079                 rec( 8, 9, SearchSequence ),
12080                 rec( 17, 1, MoreFlag ),
12081                 rec( 18, 2, InfoCount ),
12082             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12083             srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12084             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12085             srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12086             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12087             srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12088             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12089             srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12090             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12091             srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12092             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12093             srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12094             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12095             srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12096             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12097             srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12098             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12099             srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12100             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12101             srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12102             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12103             srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12104             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12105             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12106             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12107             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12108             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12109             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12110             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12111             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12112             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12113             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12114             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12115             srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ), 
12116             srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
12117             srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
12118             srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
12119             srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ), 
12120             srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ), 
12121             srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ), 
12122             srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ), 
12123             srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ), 
12124             srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ), 
12125             srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ), 
12126             srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
12127             srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ), 
12128             srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
12129         ])
12130         pkt.ReqCondSizeVariable()
12131         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12132                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12133                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12134         # 2222/5715, 87/21
12135         pkt = NCP(0x5715, "Get Path String from Short Directory Handle", 'file', has_length=0)
12136         pkt.Request(10, [
12137                 rec( 8, 1, NameSpace ),
12138                 rec( 9, 1, DirHandle ),
12139         ])
12140         pkt.Reply((9,263), [
12141                 rec( 8, (1,255), Path ),
12142         ])
12143         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12144                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12145                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
12146         # 2222/5716, 87/22
12147         pkt = NCP(0x5716, "Generate Directory Base and Volume Number", 'file', has_length=0)
12148         pkt.Request((20,274), [
12149                 rec( 8, 1, SrcNameSpace ),
12150                 rec( 9, 1, DestNameSpace ),
12151                 rec( 10, 2, dstNSIndicator ),
12152                 rec( 12, 1, VolumeNumber ),
12153                 rec( 13, 4, DirectoryBase ),
12154                 rec( 17, 1, HandleFlag ),
12155                 rec( 18, 1, PathCount, var="x" ),
12156                 rec( 19, (1,255), Path, repeat="x" ),
12157         ], info_str=(Path, "Get Volume and Directory Base from: %s", "/%s"))
12158         pkt.Reply(17, [
12159                 rec( 8, 4, DirectoryBase ),
12160                 rec( 12, 4, DOSDirectoryBase ),
12161                 rec( 16, 1, VolumeNumber ),
12162         ])
12163         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12164                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12165                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12166         # 2222/5717, 87/23
12167         pkt = NCP(0x5717, "Query Name Space Information Format", 'file', has_length=0)
12168         pkt.Request(10, [
12169                 rec( 8, 1, NameSpace ),
12170                 rec( 9, 1, VolumeNumber ),
12171         ])
12172         pkt.Reply(58, [
12173                 rec( 8, 4, FixedBitMask ),
12174                 rec( 12, 4, VariableBitMask ),
12175                 rec( 16, 4, HugeBitMask ),
12176                 rec( 20, 2, FixedBitsDefined ),
12177                 rec( 22, 2, VariableBitsDefined ),
12178                 rec( 24, 2, HugeBitsDefined ),
12179                 rec( 26, 32, FieldsLenTable ),
12180         ])
12181         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12182                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12183                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12184         # 2222/5718, 87/24
12185         pkt = NCP(0x5718, "Get Name Spaces Loaded List from Volume Number", 'file', has_length=0)
12186         pkt.Request(10, [
12187                 rec( 8, 1, Reserved ),
12188                 rec( 9, 1, VolumeNumber ),
12189         ])
12190         pkt.Reply(11, [
12191                 rec( 8, 2, NumberOfNSLoaded, var="x" ),
12192                 rec( 10, 1, NameSpace, repeat="x" ),
12193         ])
12194         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12195                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12196                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12197         # 2222/5719, 87/25
12198         pkt = NCP(0x5719, "Set Name Space Information", 'file', has_length=0)
12199         pkt.Request(531, [
12200                 rec( 8, 1, SrcNameSpace ),
12201                 rec( 9, 1, DestNameSpace ),
12202                 rec( 10, 1, VolumeNumber ),
12203                 rec( 11, 4, DirectoryBase ),
12204                 rec( 15, 2, NamesSpaceInfoMask ),
12205                 rec( 17, 2, Reserved2 ),
12206                 rec( 19, 512, NSSpecificInfo ),
12207         ])
12208         pkt.Reply(8)
12209         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12210                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12211                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12212                              0xff16])
12213         # 2222/571A, 87/26
12214         pkt = NCP(0x571A, "Get Huge Name Space Information", 'file', has_length=0)
12215         pkt.Request(34, [
12216                 rec( 8, 1, NameSpace ),
12217                 rec( 9, 1, VolumeNumber ),
12218                 rec( 10, 4, DirectoryBase ),
12219                 rec( 14, 4, HugeBitMask ),
12220                 rec( 18, 16, HugeStateInfo ),
12221         ])
12222         pkt.Reply((25,279), [
12223                 rec( 8, 16, NextHugeStateInfo ),
12224                 rec( 24, (1,255), HugeData ),
12225         ])
12226         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12227                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12228                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12229                              0xff16])
12230         # 2222/571B, 87/27
12231         pkt = NCP(0x571B, "Set Huge Name Space Information", 'file', has_length=0)
12232         pkt.Request((35,289), [
12233                 rec( 8, 1, NameSpace ),
12234                 rec( 9, 1, VolumeNumber ),
12235                 rec( 10, 4, DirectoryBase ),
12236                 rec( 14, 4, HugeBitMask ),
12237                 rec( 18, 16, HugeStateInfo ),
12238                 rec( 34, (1,255), HugeData ),
12239         ])
12240         pkt.Reply(28, [
12241                 rec( 8, 16, NextHugeStateInfo ),
12242                 rec( 24, 4, HugeDataUsed ),
12243         ])
12244         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12245                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12246                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12247                              0xff16])
12248         # 2222/571C, 87/28
12249         pkt = NCP(0x571C, "Get Full Path String", 'file', has_length=0)
12250         pkt.Request((28,282), [
12251                 rec( 8, 1, SrcNameSpace ),
12252                 rec( 9, 1, DestNameSpace ),
12253                 rec( 10, 2, PathCookieFlags ),
12254                 rec( 12, 4, Cookie1 ),
12255                 rec( 16, 4, Cookie2 ),
12256                 rec( 20, 1, VolumeNumber ),
12257                 rec( 21, 4, DirectoryBase ),
12258                 rec( 25, 1, HandleFlag ),
12259                 rec( 26, 1, PathCount, var="x" ),
12260                 rec( 27, (1,255), Path, repeat="x" ),
12261         ], info_str=(Path, "Get Full Path from: %s", "/%s"))
12262         pkt.Reply((23,277), [
12263                 rec( 8, 2, PathCookieFlags ),
12264                 rec( 10, 4, Cookie1 ),
12265                 rec( 14, 4, Cookie2 ),
12266                 rec( 18, 2, PathComponentSize ),
12267                 rec( 20, 2, PathComponentCount, var='x' ),
12268                 rec( 22, (1,255), Path, repeat='x' ),
12269         ])
12270         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12271                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12272                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12273                              0xff16])
12274         # 2222/571D, 87/29
12275         pkt = NCP(0x571D, "Get Effective Directory Rights", 'file', has_length=0)
12276         pkt.Request((24, 278), [
12277                 rec( 8, 1, NameSpace  ),
12278                 rec( 9, 1, DestNameSpace ),
12279                 rec( 10, 2, SearchAttributesLow ),
12280                 rec( 12, 2, ReturnInfoMask ),
12281                 rec( 14, 2, ExtendedInfo ),
12282                 rec( 16, 1, VolumeNumber ),
12283                 rec( 17, 4, DirectoryBase ),
12284                 rec( 21, 1, HandleFlag ),
12285                 rec( 22, 1, PathCount, var="x" ),
12286                 rec( 23, (1,255), Path, repeat="x" ),
12287         ], info_str=(Path, "Get Effective Rights for: %s", "/%s"))
12288         pkt.Reply(NO_LENGTH_CHECK, [
12289                 rec( 8, 2, EffectiveRights ),
12290                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12291                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12292                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12293                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12294                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12295                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12296                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12297                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12298                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12299                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12300                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12301                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12302                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12303                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12304                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12305                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12306                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12307                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12308                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12309                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12310                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12311                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12312                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12313                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12314                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12315                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12316                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12317                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12318                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12319                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12320                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12321                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12322                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12323                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12324                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12325         ])
12326         pkt.ReqCondSizeVariable()
12327         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12328                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12329                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12330         # 2222/571E, 87/30
12331         pkt = NCP(0x571E, "Open/Create File or Subdirectory", 'file', has_length=0)
12332         pkt.Request((34, 288), [
12333                 rec( 8, 1, NameSpace  ),
12334                 rec( 9, 1, DataStream ),
12335                 rec( 10, 1, OpenCreateMode ),
12336                 rec( 11, 1, Reserved ),
12337                 rec( 12, 2, SearchAttributesLow ),
12338                 rec( 14, 2, Reserved2 ),
12339                 rec( 16, 2, ReturnInfoMask ),
12340                 rec( 18, 2, ExtendedInfo ),
12341                 rec( 20, 4, AttributesDef32 ),
12342                 rec( 24, 2, DesiredAccessRights ),
12343                 rec( 26, 1, VolumeNumber ),
12344                 rec( 27, 4, DirectoryBase ),
12345                 rec( 31, 1, HandleFlag ),
12346                 rec( 32, 1, PathCount, var="x" ),
12347                 rec( 33, (1,255), Path, repeat="x" ),
12348         ], info_str=(Path, "Open or Create File: %s", "/%s"))
12349         pkt.Reply(NO_LENGTH_CHECK, [
12350                 rec( 8, 4, FileHandle, BE ),
12351                 rec( 12, 1, OpenCreateAction ),
12352                 rec( 13, 1, Reserved ),
12353                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12354                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12355                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12356                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12357                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12358                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12359                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12360                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12361                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12362                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12363                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12364                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12365                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12366                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12367                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12368                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12369                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12370                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12371                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12372                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12373                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12374                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12375                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12376                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12377                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12378                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12379                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12380                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12381                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12382                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12383                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12384                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12385                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12386                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12387                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12388         ])
12389         pkt.ReqCondSizeVariable()
12390         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12391                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12392                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12393         # 2222/571F, 87/31
12394         pkt = NCP(0x571F, "Get File Information", 'file', has_length=0)
12395         pkt.Request(16, [
12396                 rec( 8, 6, FileHandle  ),
12397                 rec( 14, 1, HandleInfoLevel ),
12398                 rec( 15, 1, NameSpace ),
12399         ])
12400         pkt.Reply(NO_LENGTH_CHECK, [
12401                 rec( 8, 4, VolumeNumberLong ),
12402                 rec( 12, 4, DirectoryBase ),
12403                 srec(HandleInfoLevel0, req_cond="ncp.handle_info_level==0x00" ),
12404                 srec(HandleInfoLevel1, req_cond="ncp.handle_info_level==0x01" ),
12405                 srec(HandleInfoLevel2, req_cond="ncp.handle_info_level==0x02" ),
12406                 srec(HandleInfoLevel3, req_cond="ncp.handle_info_level==0x03" ),
12407                 srec(HandleInfoLevel4, req_cond="ncp.handle_info_level==0x04" ),
12408                 srec(HandleInfoLevel5, req_cond="ncp.handle_info_level==0x05" ),
12409         ])
12410         pkt.ReqCondSizeVariable()
12411         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12412                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12413                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12414         # 2222/5720, 87/32 
12415         pkt = NCP(0x5720, "Open/Create File or Subdirectory with Callback", 'file', has_length=0)
12416         pkt.Request((30, 284), [
12417                 rec( 8, 1, NameSpace  ),
12418                 rec( 9, 1, OpenCreateMode ),
12419                 rec( 10, 2, SearchAttributesLow ),
12420                 rec( 12, 2, ReturnInfoMask ),
12421                 rec( 14, 2, ExtendedInfo ),
12422                 rec( 16, 4, AttributesDef32 ),
12423                 rec( 20, 2, DesiredAccessRights ),
12424                 rec( 22, 1, VolumeNumber ),
12425                 rec( 23, 4, DirectoryBase ),
12426                 rec( 27, 1, HandleFlag ),
12427                 rec( 28, 1, PathCount, var="x" ),
12428                 rec( 29, (1,255), Path, repeat="x" ),
12429         ], info_str=(Path, "Open or Create with Op-Lock: %s", "/%s"))
12430         pkt.Reply( NO_LENGTH_CHECK, [
12431                 rec( 8, 4, FileHandle, BE ),
12432                 rec( 12, 1, OpenCreateAction ),
12433                 rec( 13, 1, OCRetFlags ),
12434                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12435                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12436                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12437                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12438                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12439                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12440                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12441                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12442                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12443                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12444                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12445                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12446                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12447                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12448                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12449                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12450                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12451                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12452                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12453                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12454                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12455                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12456                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12457                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12458                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12459                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12460                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12461                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12462                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12463                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12464                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12465                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12466                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12467                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ), 
12468                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
12469                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
12470                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
12471                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ), 
12472                 srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ), 
12473                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ), 
12474                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ), 
12475                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ), 
12476                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ), 
12477                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ), 
12478                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
12479                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ), 
12480                 srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
12481         ])
12482         pkt.ReqCondSizeVariable()
12483         pkt.CompletionCodes([0x0000, 0x7f00, 0x8000, 0x8101, 0x8401, 0x8501,
12484                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12485                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12486         # 2222/5721, 87/33
12487         pkt = NCP(0x5721, "Open/Create File or Subdirectory II with Callback", 'file', has_length=0)
12488         pkt.Request((34, 288), [
12489                 rec( 8, 1, NameSpace  ),
12490                 rec( 9, 1, DataStream ),
12491                 rec( 10, 1, OpenCreateMode ),
12492                 rec( 11, 1, Reserved ),
12493                 rec( 12, 2, SearchAttributesLow ),
12494                 rec( 14, 2, Reserved2 ),
12495                 rec( 16, 2, ReturnInfoMask ),
12496                 rec( 18, 2, ExtendedInfo ),
12497                 rec( 20, 4, AttributesDef32 ),
12498                 rec( 24, 2, DesiredAccessRights ),
12499                 rec( 26, 1, VolumeNumber ),
12500                 rec( 27, 4, DirectoryBase ),
12501                 rec( 31, 1, HandleFlag ),
12502                 rec( 32, 1, PathCount, var="x" ),
12503                 rec( 33, (1,255), Path, repeat="x" ),
12504         ], info_str=(FilePath, "Open or Create II with Op-Lock: %s", "/%s"))
12505         pkt.Reply((91,345), [
12506                 rec( 8, 4, FileHandle ),
12507                 rec( 12, 1, OpenCreateAction ),
12508                 rec( 13, 1, OCRetFlags ),
12509                 rec( 14, 4, DataStreamSpaceAlloc ),
12510                 rec( 18, 6, AttributesStruct ),
12511                 rec( 24, 4, DataStreamSize ),
12512                 rec( 28, 4, TtlDSDskSpaceAlloc ),
12513                 rec( 32, 2, NumberOfDataStreams ),
12514                 rec( 34, 2, CreationTime ),
12515                 rec( 36, 2, CreationDate ),
12516                 rec( 38, 4, CreatorID, BE ),
12517                 rec( 42, 2, ModifiedTime ),
12518                 rec( 44, 2, ModifiedDate ),
12519                 rec( 46, 4, ModifierID, BE ),
12520                 rec( 50, 2, LastAccessedDate ),
12521                 rec( 52, 2, ArchivedTime ),
12522                 rec( 54, 2, ArchivedDate ),
12523                 rec( 56, 4, ArchiverID, BE ),
12524                 rec( 60, 2, InheritedRightsMask ),
12525                 rec( 62, 4, DirectoryEntryNumber ),
12526                 rec( 66, 4, DOSDirectoryEntryNumber ),
12527                 rec( 70, 4, VolumeNumberLong ),
12528                 rec( 74, 4, EADataSize ),
12529                 rec( 78, 4, EACount ),
12530                 rec( 82, 4, EAKeySize ),
12531                 rec( 86, 1, CreatorNameSpaceNumber ),
12532                 rec( 87, 3, Reserved3 ),
12533                 rec( 90, (1,255), FileName ),
12534         ])
12535         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12536                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12537                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12538         # 2222/5722, 87/34
12539         pkt = NCP(0x5722, "Open CallBack Control (Op-Lock)", 'file', has_length=0)
12540         pkt.Request(13, [
12541                 rec( 10, 4, CCFileHandle ),
12542                 rec( 14, 1, CCFunction ),
12543         ])
12544         pkt.Reply(8)
12545         pkt.CompletionCodes([0x0000, 0x8800])
12546         # 2222/5723, 87/35
12547         pkt = NCP(0x5723, "Modify DOS Attributes on a File or Subdirectory", 'file', has_length=0)
12548         pkt.Request((28, 282), [
12549                 rec( 8, 1, NameSpace  ),
12550                 rec( 9, 1, Flags ),
12551                 rec( 10, 2, SearchAttributesLow ),
12552                 rec( 12, 2, ReturnInfoMask ),
12553                 rec( 14, 2, ExtendedInfo ),
12554                 rec( 16, 4, AttributesDef32 ),
12555                 rec( 20, 1, VolumeNumber ),
12556                 rec( 21, 4, DirectoryBase ),
12557                 rec( 25, 1, HandleFlag ),
12558                 rec( 26, 1, PathCount, var="x" ),
12559                 rec( 27, (1,255), Path, repeat="x" ),
12560         ], info_str=(Path, "Modify DOS Attributes for: %s", "/%s"))
12561         pkt.Reply(24, [
12562                 rec( 8, 4, ItemsChecked ),
12563                 rec( 12, 4, ItemsChanged ),
12564                 rec( 16, 4, AttributeValidFlag ),
12565                 rec( 20, 4, AttributesDef32 ),
12566         ])
12567         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12568                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12569                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12570         # 2222/5724, 87/36
12571         pkt = NCP(0x5724, "Log File", 'file', has_length=0)
12572         pkt.Request((28, 282), [
12573                 rec( 8, 1, NameSpace  ),
12574                 rec( 9, 1, Reserved ),
12575                 rec( 10, 2, Reserved2 ),
12576                 rec( 12, 1, LogFileFlagLow ),
12577                 rec( 13, 1, LogFileFlagHigh ),
12578                 rec( 14, 2, Reserved2 ),
12579                 rec( 16, 4, WaitTime ),
12580                 rec( 20, 1, VolumeNumber ),
12581                 rec( 21, 4, DirectoryBase ),
12582                 rec( 25, 1, HandleFlag ),
12583                 rec( 26, 1, PathCount, var="x" ),
12584                 rec( 27, (1,255), Path, repeat="x" ),
12585         ], info_str=(Path, "Lock File: %s", "/%s"))
12586         pkt.Reply(8)
12587         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12588                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12589                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12590         # 2222/5725, 87/37
12591         pkt = NCP(0x5725, "Release File", 'file', has_length=0)
12592         pkt.Request((20, 274), [
12593                 rec( 8, 1, NameSpace  ),
12594                 rec( 9, 1, Reserved ),
12595                 rec( 10, 2, Reserved2 ),
12596                 rec( 12, 1, VolumeNumber ),
12597                 rec( 13, 4, DirectoryBase ),
12598                 rec( 17, 1, HandleFlag ),
12599                 rec( 18, 1, PathCount, var="x" ),
12600                 rec( 19, (1,255), Path, repeat="x" ),
12601         ], info_str=(Path, "Release Lock on: %s", "/%s"))
12602         pkt.Reply(8)
12603         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12604                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12605                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12606         # 2222/5726, 87/38
12607         pkt = NCP(0x5726, "Clear File", 'file', has_length=0)
12608         pkt.Request((20, 274), [
12609                 rec( 8, 1, NameSpace  ),
12610                 rec( 9, 1, Reserved ),
12611                 rec( 10, 2, Reserved2 ),
12612                 rec( 12, 1, VolumeNumber ),
12613                 rec( 13, 4, DirectoryBase ),
12614                 rec( 17, 1, HandleFlag ),
12615                 rec( 18, 1, PathCount, var="x" ),
12616                 rec( 19, (1,255), Path, repeat="x" ),
12617         ], info_str=(Path, "Clear File: %s", "/%s"))
12618         pkt.Reply(8)
12619         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12620                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12621                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12622         # 2222/5727, 87/39
12623         pkt = NCP(0x5727, "Get Directory Disk Space Restriction", 'file', has_length=0)
12624         pkt.Request((19, 273), [
12625                 rec( 8, 1, NameSpace  ),
12626                 rec( 9, 2, Reserved2 ),
12627                 rec( 11, 1, VolumeNumber ),
12628                 rec( 12, 4, DirectoryBase ),
12629                 rec( 16, 1, HandleFlag ),
12630                 rec( 17, 1, PathCount, var="x" ),
12631                 rec( 18, (1,255), Path, repeat="x" ),
12632         ], info_str=(Path, "Get Disk Space Restriction for: %s", "/%s"))
12633         pkt.Reply(18, [
12634                 rec( 8, 1, NumberOfEntries, var="x" ),
12635                 rec( 9, 9, SpaceStruct, repeat="x" ),
12636         ])
12637         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12638                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12639                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12640                              0xff16])
12641         # 2222/5728, 87/40
12642         pkt = NCP(0x5728, "Search for File or Subdirectory Set (Extended Errors)", 'file', has_length=0)
12643         pkt.Request((28, 282), [
12644                 rec( 8, 1, NameSpace  ),
12645                 rec( 9, 1, DataStream ),
12646                 rec( 10, 2, SearchAttributesLow ),
12647                 rec( 12, 2, ReturnInfoMask ),
12648                 rec( 14, 2, ExtendedInfo ),
12649                 rec( 16, 2, ReturnInfoCount ),
12650                 rec( 18, 9, SearchSequence ),
12651                 rec( 27, (1,255), SearchPattern ),
12652         ], info_str=(SearchPattern, "Search for: %s", ", %s"))
12653         pkt.Reply(NO_LENGTH_CHECK, [
12654                 rec( 8, 9, SearchSequence ),
12655                 rec( 17, 1, MoreFlag ),
12656                 rec( 18, 2, InfoCount ),
12657                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12658                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12659                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12660                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12661                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12662                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12663                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12664                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12665                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12666                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12667                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12668                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12669                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12670                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12671                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12672                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12673                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12674                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12675                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12676                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12677                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12678                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12679                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12680                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12681                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12682                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12683                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12684                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12685                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12686                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12687                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12688                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12689                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12690                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12691                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12692         ])
12693         pkt.ReqCondSizeVariable()
12694         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12695                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12696                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12697         # 2222/5729, 87/41
12698         pkt = NCP(0x5729, "Scan Salvageable Files", 'file', has_length=0)
12699         pkt.Request((24,278), [
12700                 rec( 8, 1, NameSpace ),
12701                 rec( 9, 1, Reserved ),
12702                 rec( 10, 2, CtrlFlags, LE ),
12703                 rec( 12, 4, SequenceNumber ),
12704                 rec( 16, 1, VolumeNumber ),
12705                 rec( 17, 4, DirectoryBase ),
12706                 rec( 21, 1, HandleFlag ),
12707                 rec( 22, 1, PathCount, var="x" ),
12708                 rec( 23, (1,255), Path, repeat="x" ),
12709         ], info_str=(Path, "Scan Deleted Files: %s", "/%s"))
12710         pkt.Reply(NO_LENGTH_CHECK, [
12711                 rec( 8, 4, SequenceNumber ),
12712                 rec( 12, 4, DirectoryBase ),
12713                 rec( 16, 4, ScanItems, var="x" ),
12714                 srec(ScanInfoFileName, req_cond="ncp.ctrl_flags==0x0001", repeat="x" ),
12715                 srec(ScanInfoFileNoName, req_cond="ncp.ctrl_flags==0x0000", repeat="x" ),
12716         ])
12717         pkt.ReqCondSizeVariable()
12718         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12719                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12720                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12721         # 2222/572A, 87/42
12722         pkt = NCP(0x572A, "Purge Salvageable File List", 'file', has_length=0)
12723         pkt.Request(28, [
12724                 rec( 8, 1, NameSpace ),
12725                 rec( 9, 1, Reserved ),
12726                 rec( 10, 2, PurgeFlags ),
12727                 rec( 12, 4, VolumeNumberLong ),
12728                 rec( 16, 4, DirectoryBase ),
12729                 rec( 20, 4, PurgeCount, var="x" ),
12730                 rec( 24, 4, PurgeList, repeat="x" ),
12731         ])
12732         pkt.Reply(16, [
12733                 rec( 8, 4, PurgeCount, var="x" ),
12734                 rec( 12, 4, PurgeCcode, repeat="x" ),
12735         ])
12736         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12737                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12738                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12739         # 2222/572B, 87/43
12740         pkt = NCP(0x572B, "Revoke File Handle Rights", 'file', has_length=0)
12741         pkt.Request(17, [
12742                 rec( 8, 3, Reserved3 ),
12743                 rec( 11, 1, RevQueryFlag ),
12744                 rec( 12, 4, FileHandle ),
12745                 rec( 16, 1, RemoveOpenRights ),
12746         ])
12747         pkt.Reply(13, [
12748                 rec( 8, 4, FileHandle ),
12749                 rec( 12, 1, OpenRights ),
12750         ])
12751         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12752                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12753                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12754         # 2222/572C, 87/44
12755         pkt = NCP(0x572C, "Update File Handle Rights", 'file', has_length=0)
12756         pkt.Request(24, [
12757                 rec( 8, 2, Reserved2 ),
12758                 rec( 10, 1, VolumeNumber ),
12759                 rec( 11, 1, NameSpace ),
12760                 rec( 12, 4, DirectoryNumber ),
12761                 rec( 16, 2, AccessRightsMaskWord ),
12762                 rec( 18, 2, NewAccessRights ),
12763                 rec( 20, 4, FileHandle, BE ),
12764         ])
12765         pkt.Reply(16, [
12766                 rec( 8, 4, FileHandle, BE ),
12767                 rec( 12, 4, EffectiveRights ),
12768         ])
12769         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12770                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12771                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12772         # 2222/5742, 87/66
12773         pkt = NCP(0x5742, "Novell Advanced Auditing Service (NAAS)", 'auditing', has_length=0)
12774         pkt.Request(8)
12775         pkt.Reply(8)
12776         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12777                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12778                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12779         # 2222/5801, 8801
12780         pkt = NCP(0x5801, "Query Volume Audit Status", "auditing", has_length=0)
12781         pkt.Request(12, [
12782                 rec( 8, 4, ConnectionNumber ),
12783         ])
12784         pkt.Reply(40, [
12785                 rec(8, 32, NWAuditStatus ),
12786         ])
12787         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12788                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12789                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12790         # 2222/5802, 8802
12791         pkt = NCP(0x5802, "Add User Audit Property", "auditing", has_length=0)
12792         pkt.Request(25, [
12793                 rec(8, 4, AuditIDType ),
12794                 rec(12, 4, AuditID ),
12795                 rec(16, 4, AuditHandle ),
12796                 rec(20, 4, ObjectID ),
12797                 rec(24, 1, AuditFlag ),
12798         ])
12799         pkt.Reply(8)
12800         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12801                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12802                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12803         # 2222/5803, 8803
12804         pkt = NCP(0x5803, "Add Auditor Access", "auditing", has_length=0)
12805         pkt.Request(8)
12806         pkt.Reply(8)
12807         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12808                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12809                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12810         # 2222/5804, 8804
12811         pkt = NCP(0x5804, "Change Auditor Volume Password", "auditing", has_length=0)
12812         pkt.Request(8)
12813         pkt.Reply(8)
12814         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12815                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12816                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12817         # 2222/5805, 8805
12818         pkt = NCP(0x5805, "Check Auditor Access", "auditing", has_length=0)
12819         pkt.Request(8)
12820         pkt.Reply(8)
12821         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12822                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12823                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12824         # 2222/5806, 8806
12825         pkt = NCP(0x5806, "Delete User Audit Property", "auditing", has_length=0)
12826         pkt.Request(8)
12827         pkt.Reply(8)
12828         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12829                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12830                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12831         # 2222/5807, 8807
12832         pkt = NCP(0x5807, "Disable Auditing On A Volume", "auditing", has_length=0)
12833         pkt.Request(8)
12834         pkt.Reply(8)
12835         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12836                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12837                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12838         # 2222/5808, 8808
12839         pkt = NCP(0x5808, "Enable Auditing On A Volume", "auditing", has_length=0)
12840         pkt.Request(8)
12841         pkt.Reply(8)
12842         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12843                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12844                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12845         # 2222/5809, 8809
12846         pkt = NCP(0x5809, "Query User Being Audited", "auditing", has_length=0)
12847         pkt.Request(8)
12848         pkt.Reply(8)
12849         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12850                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12851                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12852         # 2222/580A, 88,10
12853         pkt = NCP(0x580A, "Read Audit Bit Map", "auditing", has_length=0)
12854         pkt.Request(8)
12855         pkt.Reply(8)
12856         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12857                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12858                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12859         # 2222/580B, 88,11
12860         pkt = NCP(0x580B, "Read Audit File Configuration Header", "auditing", has_length=0)
12861         pkt.Request(8)
12862         pkt.Reply(8)
12863         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12864                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12865                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12866         # 2222/580D, 88,13
12867         pkt = NCP(0x580D, "Remove Auditor Access", "auditing", has_length=0)
12868         pkt.Request(8)
12869         pkt.Reply(8)
12870         pkt.CompletionCodes([0x0000, 0x300, 0x8000, 0x8101, 0x8401, 0x8501,
12871                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12872                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12873         # 2222/580E, 88,14
12874         pkt = NCP(0x580E, "Reset Audit File", "auditing", has_length=0)
12875         pkt.Request(8)
12876         pkt.Reply(8)
12877         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12878                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12879                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12880                              
12881         # 2222/580F, 88,15
12882         pkt = NCP(0x580F, "Auditing NCP", "auditing", has_length=0)
12883         pkt.Request(8)
12884         pkt.Reply(8)
12885         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12886                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12887                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12888         # 2222/5810, 88,16
12889         pkt = NCP(0x5810, "Write Audit Bit Map", "auditing", has_length=0)
12890         pkt.Request(8)
12891         pkt.Reply(8)
12892         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12893                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12894                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12895         # 2222/5811, 88,17
12896         pkt = NCP(0x5811, "Write Audit File Configuration Header", "auditing", has_length=0)
12897         pkt.Request(8)
12898         pkt.Reply(8)
12899         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12900                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12901                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12902         # 2222/5812, 88,18
12903         pkt = NCP(0x5812, "Change Auditor Volume Password2", "auditing", has_length=0)
12904         pkt.Request(8)
12905         pkt.Reply(8)
12906         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12907                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12908                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12909         # 2222/5813, 88,19
12910         pkt = NCP(0x5813, "Return Audit Flags", "auditing", has_length=0)
12911         pkt.Request(8)
12912         pkt.Reply(8)
12913         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12914                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12915                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12916         # 2222/5814, 88,20
12917         pkt = NCP(0x5814, "Close Old Audit File", "auditing", has_length=0)
12918         pkt.Request(8)
12919         pkt.Reply(8)
12920         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12921                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12922                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12923         # 2222/5816, 88,22
12924         pkt = NCP(0x5816, "Check Level Two Access", "auditing", has_length=0)
12925         pkt.Request(8)
12926         pkt.Reply(8)
12927         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12928                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12929                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12930         # 2222/5817, 88,23
12931         pkt = NCP(0x5817, "Return Old Audit File List", "auditing", has_length=0)
12932         pkt.Request(8)
12933         pkt.Reply(8)
12934         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12935                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12936                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12937         # 2222/5818, 88,24
12938         pkt = NCP(0x5818, "Init Audit File Reads", "auditing", has_length=0)
12939         pkt.Request(8)
12940         pkt.Reply(8)
12941         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12942                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12943                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12944         # 2222/5819, 88,25
12945         pkt = NCP(0x5819, "Read Auditing File", "auditing", has_length=0)
12946         pkt.Request(8)
12947         pkt.Reply(8)
12948         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12949                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12950                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12951         # 2222/581A, 88,26
12952         pkt = NCP(0x581A, "Delete Old Audit File", "auditing", has_length=0)
12953         pkt.Request(8)
12954         pkt.Reply(8)
12955         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12956                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12957                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12958         # 2222/581E, 88,30
12959         pkt = NCP(0x581E, "Restart Volume auditing", "auditing", has_length=0)
12960         pkt.Request(8)
12961         pkt.Reply(8)
12962         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12963                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12964                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12965         # 2222/581F, 88,31
12966         pkt = NCP(0x581F, "Set Volume Password", "auditing", has_length=0)
12967         pkt.Request(8)
12968         pkt.Reply(8)
12969         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12970                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12971                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12972         # 2222/5A01, 90/00
12973         pkt = NCP(0x5A01, "Parse Tree", 'file')
12974         pkt.Request(26, [
12975                 rec( 10, 4, InfoMask ),
12976                 rec( 14, 4, Reserved4 ),
12977                 rec( 18, 4, Reserved4 ),
12978                 rec( 22, 4, limbCount ),
12979         ])
12980         pkt.Reply(32, [
12981                 rec( 8, 4, limbCount ),
12982                 rec( 12, 4, ItemsCount ),
12983                 rec( 16, 4, nextLimbScanNum ),
12984                 rec( 20, 4, CompletionCode ),
12985                 rec( 24, 1, FolderFlag ),
12986                 rec( 25, 3, Reserved ),
12987                 rec( 28, 4, DirectoryBase ),
12988         ])
12989         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
12990                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12991                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
12992         # 2222/5A0A, 90/10
12993         pkt = NCP(0x5A0A, "Get Reference Count from Dir Entry Number", 'file')
12994         pkt.Request(19, [
12995                 rec( 10, 4, VolumeNumberLong ),
12996                 rec( 14, 4, DirectoryBase ),
12997                 rec( 18, 1, NameSpace ),
12998         ])
12999         pkt.Reply(12, [
13000                 rec( 8, 4, ReferenceCount ),
13001         ])
13002         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13003                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13004                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
13005         # 2222/5A0B, 90/11
13006         pkt = NCP(0x5A0B, "Get Reference Count from Dir Handle", 'file')
13007         pkt.Request(14, [
13008                 rec( 10, 4, DirHandle ),
13009         ])
13010         pkt.Reply(12, [
13011                 rec( 8, 4, ReferenceCount ),
13012         ])
13013         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13014                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13015                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
13016         # 2222/5A0C, 90/12
13017         pkt = NCP(0x5A0C, "Set Compressed File Size", 'file')
13018         pkt.Request(20, [
13019                 rec( 10, 6, FileHandle ),
13020                 rec( 16, 4, SuggestedFileSize ),
13021         ])
13022         pkt.Reply(16, [
13023                 rec( 8, 4, OldFileSize ),
13024                 rec( 12, 4, NewFileSize ),
13025         ])
13026         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13027                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13028                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
13029         # 2222/5A80, 90/128
13030         pkt = NCP(0x5A80, "Move File Data To Data Migration", 'file')
13031         pkt.Request(27, [
13032                 rec( 10, 4, VolumeNumberLong ),
13033                 rec( 14, 4, DirectoryEntryNumber ),
13034                 rec( 18, 1, NameSpace ),
13035                 rec( 19, 3, Reserved ),
13036                 rec( 22, 4, SupportModuleID ),
13037                 rec( 26, 1, DMFlags ),
13038         ])
13039         pkt.Reply(8)
13040         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13041                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13042                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13043         # 2222/5A81, 90/129
13044         pkt = NCP(0x5A81, "Data Migration File Information", 'file')
13045         pkt.Request(19, [
13046                 rec( 10, 4, VolumeNumberLong ),
13047                 rec( 14, 4, DirectoryEntryNumber ),
13048                 rec( 18, 1, NameSpace ),
13049         ])
13050         pkt.Reply(24, [
13051                 rec( 8, 4, SupportModuleID ),
13052                 rec( 12, 4, RestoreTime ),
13053                 rec( 16, 4, DMInfoEntries, var="x" ),
13054                 rec( 20, 4, DataSize, repeat="x" ),
13055         ])
13056         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13057                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13058                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13059         # 2222/5A82, 90/130
13060         pkt = NCP(0x5A82, "Volume Data Migration Status", 'file')
13061         pkt.Request(18, [
13062                 rec( 10, 4, VolumeNumberLong ),
13063                 rec( 14, 4, SupportModuleID ),
13064         ])
13065         pkt.Reply(32, [
13066                 rec( 8, 4, NumOfFilesMigrated ),
13067                 rec( 12, 4, TtlMigratedSize ),
13068                 rec( 16, 4, SpaceUsed ),
13069                 rec( 20, 4, LimboUsed ),
13070                 rec( 24, 4, SpaceMigrated ),
13071                 rec( 28, 4, FileLimbo ),
13072         ])
13073         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13074                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13075                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13076         # 2222/5A83, 90/131
13077         pkt = NCP(0x5A83, "Migrator Status Info", 'file')
13078         pkt.Request(10)
13079         pkt.Reply(20, [
13080                 rec( 8, 1, DMPresentFlag ),
13081                 rec( 9, 3, Reserved3 ),
13082                 rec( 12, 4, DMmajorVersion ),
13083                 rec( 16, 4, DMminorVersion ),
13084         ])
13085         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13086                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13087                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13088         # 2222/5A84, 90/132
13089         pkt = NCP(0x5A84, "Data Migration Support Module Information", 'file')
13090         pkt.Request(18, [
13091                 rec( 10, 1, DMInfoLevel ),
13092                 rec( 11, 3, Reserved3),
13093                 rec( 14, 4, SupportModuleID ),
13094         ])
13095         pkt.Reply(NO_LENGTH_CHECK, [
13096                 srec( DMInfoLevel0, req_cond="ncp.dm_info_level == 0x00" ),
13097                 srec( DMInfoLevel1, req_cond="ncp.dm_info_level == 0x01" ),
13098                 srec( DMInfoLevel2, req_cond="ncp.dm_info_level == 0x02" ),
13099         ])
13100         pkt.ReqCondSizeVariable()
13101         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13102                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13103                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13104         # 2222/5A85, 90/133
13105         pkt = NCP(0x5A85, "Move File Data From Data Migration", 'file')
13106         pkt.Request(19, [
13107                 rec( 10, 4, VolumeNumberLong ),
13108                 rec( 14, 4, DirectoryEntryNumber ),
13109                 rec( 18, 1, NameSpace ),
13110         ])
13111         pkt.Reply(8)
13112         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13113                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13114                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13115         # 2222/5A86, 90/134
13116         pkt = NCP(0x5A86, "Get/Set Default Read-Write Support Module ID", 'file')
13117         pkt.Request(18, [
13118                 rec( 10, 1, GetSetFlag ),
13119                 rec( 11, 3, Reserved3 ),
13120                 rec( 14, 4, SupportModuleID ),
13121         ])
13122         pkt.Reply(12, [
13123                 rec( 8, 4, SupportModuleID ),
13124         ])
13125         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13126                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13127                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13128         # 2222/5A87, 90/135
13129         pkt = NCP(0x5A87, "Data Migration Support Module Capacity Request", 'file')
13130         pkt.Request(22, [
13131                 rec( 10, 4, SupportModuleID ),
13132                 rec( 14, 4, VolumeNumberLong ),
13133                 rec( 18, 4, DirectoryBase ),
13134         ])
13135         pkt.Reply(20, [
13136                 rec( 8, 4, BlockSizeInSectors ),
13137                 rec( 12, 4, TotalBlocks ),
13138                 rec( 16, 4, UsedBlocks ),
13139         ])
13140         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13141                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13142                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13143         # 2222/5A88, 90/136
13144         pkt = NCP(0x5A88, "RTDM Request", 'file')
13145         pkt.Request(15, [
13146                 rec( 10, 4, Verb ),
13147                 rec( 14, 1, VerbData ),
13148         ])
13149         pkt.Reply(8)
13150         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13151                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13152                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13153         # 2222/5C, 92
13154         pkt = NCP(0x5C, "SecretStore Services", 'file')
13155         #Need info on this packet structure and SecretStore Verbs
13156         pkt.Request(7)
13157         pkt.Reply(8)
13158         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13159                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13160                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13161                              
13162         # 2222/5E, 94   
13163         pkt = NCP(0x5e, "NMAS Communications Packet", 'comm')
13164         pkt.Request(7)
13165         pkt.Reply(8)
13166         pkt.CompletionCodes([0x0000, 0xfb09])
13167         # 2222/61, 97
13168         pkt = NCP(0x61, "Get Big Packet NCP Max Packet Size", 'comm')
13169         pkt.Request(10, [
13170                 rec( 7, 2, ProposedMaxSize, BE ),
13171                 rec( 9, 1, SecurityFlag ),
13172         ],info_str=(ProposedMaxSize, "Get Big Max Packet Size - %d", ", %d"))
13173         pkt.Reply(13, [
13174                 rec( 8, 2, AcceptedMaxSize, BE ),
13175                 rec( 10, 2, EchoSocket, BE ),
13176                 rec( 12, 1, SecurityFlag ),
13177         ])
13178         pkt.CompletionCodes([0x0000])
13179         # 2222/63, 99
13180         pkt = NCP(0x63, "Undocumented Packet Burst", 'comm')
13181         pkt.Request(7)
13182         pkt.Reply(8)
13183         pkt.CompletionCodes([0x0000])
13184         # 2222/64, 100
13185         pkt = NCP(0x64, "Undocumented Packet Burst", 'comm')
13186         pkt.Request(7)
13187         pkt.Reply(8)
13188         pkt.CompletionCodes([0x0000])
13189         # 2222/65, 101
13190         pkt = NCP(0x65, "Packet Burst Connection Request", 'comm')
13191         pkt.Request(25, [
13192                 rec( 7, 4, LocalConnectionID ),
13193                 rec( 11, 4, LocalMaxPacketSize ),
13194                 rec( 15, 2, LocalTargetSocket ),
13195                 rec( 17, 4, LocalMaxSendSize ),
13196                 rec( 21, 4, LocalMaxRecvSize ),
13197         ])
13198         pkt.Reply(16, [
13199                 rec( 8, 4, RemoteTargetID ),
13200                 rec( 12, 4, RemoteMaxPacketSize ),
13201         ])
13202         pkt.CompletionCodes([0x0000])
13203         # 2222/66, 102
13204         pkt = NCP(0x66, "Undocumented Packet Burst", 'comm')
13205         pkt.Request(7)
13206         pkt.Reply(8)
13207         pkt.CompletionCodes([0x0000])
13208         # 2222/67, 103
13209         pkt = NCP(0x67, "Undocumented Packet Burst", 'comm')
13210         pkt.Request(7)
13211         pkt.Reply(8)
13212         pkt.CompletionCodes([0x0000])
13213         # 2222/6801, 104/01
13214         pkt = NCP(0x6801, "Ping for NDS NCP", "nds", has_length=0)
13215         pkt.Request(8)
13216         pkt.Reply(8)
13217         pkt.ReqCondSizeVariable()
13218         pkt.CompletionCodes([0x0000, 0x8100, 0xfb04, 0xfe0c])
13219         # 2222/6802, 104/02
13220         #
13221         # XXX - if FraggerHandle is not 0xffffffff, this is not the
13222         # first fragment, so we can only dissect this by reassembling;
13223         # the fields after "Fragment Handle" are bogus for non-0xffffffff
13224         # fragments, so we shouldn't dissect them.
13225         #
13226         # XXX - are there TotalRequest requests in the packet, and
13227         # does each of them have NDSFlags and NDSVerb fields, or
13228         # does only the first one have it?
13229         #
13230         pkt = NCP(0x6802, "Send NDS Fragmented Request/Reply", "nds", has_length=0)
13231         pkt.Request(8)
13232         pkt.Reply(8)
13233         pkt.ReqCondSizeVariable()
13234         pkt.CompletionCodes([0x0000])
13235         # 2222/6803, 104/03
13236         pkt = NCP(0x6803, "Fragment Close", "nds", has_length=0)
13237         pkt.Request(12, [
13238                 rec( 8, 4, FraggerHandle ),
13239         ])
13240         pkt.Reply(8)
13241         pkt.CompletionCodes([0x0000, 0xff00])
13242         # 2222/6804, 104/04
13243         pkt = NCP(0x6804, "Return Bindery Context", "nds", has_length=0)
13244         pkt.Request(8)
13245         pkt.Reply((9, 263), [
13246                 rec( 8, (1,255), binderyContext ),
13247         ])
13248         pkt.CompletionCodes([0x0000, 0xfe0c, 0xff00])
13249         # 2222/6805, 104/05
13250         pkt = NCP(0x6805, "Monitor NDS Connection", "nds", has_length=0)
13251         pkt.Request(8)
13252         pkt.Reply(8)
13253         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
13254         # 2222/6806, 104/06
13255         pkt = NCP(0x6806, "Return NDS Statistics", "nds", has_length=0)
13256         pkt.Request(10, [
13257                 rec( 8, 2, NDSRequestFlags ),
13258         ])
13259         pkt.Reply(8)
13260         #Need to investigate how to decode Statistics Return Value
13261         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
13262         # 2222/6807, 104/07
13263         pkt = NCP(0x6807, "Clear NDS Statistics", "nds", has_length=0)
13264         pkt.Request(8)
13265         pkt.Reply(8)
13266         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
13267         # 2222/6808, 104/08
13268         pkt = NCP(0x6808, "Reload NDS Software", "nds", has_length=0)
13269         pkt.Request(8)
13270         pkt.Reply(12, [
13271                 rec( 8, 4, NDSStatus ),
13272         ])
13273         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
13274         # 2222/68C8, 104/200
13275         pkt = NCP(0x68C8, "Query Container Audit Status", "auditing", has_length=0)
13276         pkt.Request(12, [
13277                 rec( 8, 4, ConnectionNumber ),
13278 #               rec( 12, 4, AuditIDType, LE ),
13279 #               rec( 16, 4, AuditID ),
13280 #               rec( 20, 2, BufferSize ),
13281         ])
13282         pkt.Reply(40, [
13283                 rec(8, 32, NWAuditStatus ),
13284         ])
13285         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13286         # 2222/68CA, 104/202
13287         pkt = NCP(0x68CA, "Add Auditor Access", "auditing", has_length=0)
13288         pkt.Request(8)
13289         pkt.Reply(8)
13290         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13291         # 2222/68CB, 104/203
13292         pkt = NCP(0x68CB, "Change Auditor Container Password", "auditing", has_length=0)
13293         pkt.Request(8)
13294         pkt.Reply(8)
13295         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13296         # 2222/68CC, 104/204
13297         pkt = NCP(0x68CC, "Check Auditor Access", "auditing", has_length=0)
13298         pkt.Request(8)
13299         pkt.Reply(8)
13300         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13301         # 2222/68CE, 104/206
13302         pkt = NCP(0x680CE, "Disable Container Auditing", "auditing", has_length=0)
13303         pkt.Request(8)
13304         pkt.Reply(8)
13305         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13306         # 2222/68CF, 104/207
13307         pkt = NCP(0x68CF, "Enable Container Auditing", "auditing", has_length=0)
13308         pkt.Request(8)
13309         pkt.Reply(8)
13310         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13311         # 2222/68D1, 104/209
13312         pkt = NCP(0x68D1, "Read Audit File Header", "auditing", has_length=0)
13313         pkt.Request(8)
13314         pkt.Reply(8)
13315         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13316         # 2222/68D3, 104/211
13317         pkt = NCP(0x68D3, "Remove Auditor Access", "auditing", has_length=0)
13318         pkt.Request(8)
13319         pkt.Reply(8)
13320         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13321         # 2222/68D4, 104/212
13322         pkt = NCP(0x68D4, "Reset Audit File", "auditing", has_length=0)
13323         pkt.Request(8)
13324         pkt.Reply(8)
13325         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13326         # 2222/68D6, 104/214
13327         pkt = NCP(0x68D6, "Write Audit File Configuration Header", "auditing", has_length=0)
13328         pkt.Request(8)
13329         pkt.Reply(8)
13330         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13331         # 2222/68D7, 104/215
13332         pkt = NCP(0x68D7, "Change Auditor Container Password2", "auditing", has_length=0)
13333         pkt.Request(8)
13334         pkt.Reply(8)
13335         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13336         # 2222/68D8, 104/216
13337         pkt = NCP(0x68D8, "Return Audit Flags", "auditing", has_length=0)
13338         pkt.Request(8)
13339         pkt.Reply(8)
13340         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13341         # 2222/68D9, 104/217
13342         pkt = NCP(0x68D9, "Close Old Audit File", "auditing", has_length=0)
13343         pkt.Request(8)
13344         pkt.Reply(8)
13345         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13346         # 2222/68DB, 104/219
13347         pkt = NCP(0x68DB, "Check Level Two Access", "auditing", has_length=0)
13348         pkt.Request(8)
13349         pkt.Reply(8)
13350         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13351         # 2222/68DC, 104/220
13352         pkt = NCP(0x68DC, "Check Object Audited", "auditing", has_length=0)
13353         pkt.Request(8)
13354         pkt.Reply(8)
13355         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13356         # 2222/68DD, 104/221
13357         pkt = NCP(0x68DD, "Change Object Audited", "auditing", has_length=0)
13358         pkt.Request(8)
13359         pkt.Reply(8)
13360         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13361         # 2222/68DE, 104/222
13362         pkt = NCP(0x68DE, "Return Old Audit File List", "auditing", has_length=0)
13363         pkt.Request(8)
13364         pkt.Reply(8)
13365         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13366         # 2222/68DF, 104/223
13367         pkt = NCP(0x68DF, "Init Audit File Reads", "auditing", has_length=0)
13368         pkt.Request(8)
13369         pkt.Reply(8)
13370         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13371         # 2222/68E0, 104/224
13372         pkt = NCP(0x68E0, "Read Auditing File", "auditing", has_length=0)
13373         pkt.Request(8)
13374         pkt.Reply(8)
13375         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13376         # 2222/68E1, 104/225
13377         pkt = NCP(0x68E1, "Delete Old Audit File", "auditing", has_length=0)
13378         pkt.Request(8)
13379         pkt.Reply(8)
13380         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13381         # 2222/68E5, 104/229
13382         pkt = NCP(0x68E5, "Set Audit Password", "auditing", has_length=0)
13383         pkt.Request(8)
13384         pkt.Reply(8)
13385         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13386         # 2222/68E7, 104/231
13387         pkt = NCP(0x68E7, "External Audit Append To File", "auditing", has_length=0)
13388         pkt.Request(8)
13389         pkt.Reply(8)
13390         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13391         # 2222/69, 105
13392         pkt = NCP(0x69, "Log File", 'file')
13393         pkt.Request( (12, 267), [
13394                 rec( 7, 1, DirHandle ),
13395                 rec( 8, 1, LockFlag ),
13396                 rec( 9, 2, TimeoutLimit ),
13397                 rec( 11, (1, 256), FilePath ),
13398         ], info_str=(FilePath, "Log File: %s", "/%s"))
13399         pkt.Reply(8)
13400         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x9600, 0xfe0d, 0xff01])
13401         # 2222/6A, 106
13402         pkt = NCP(0x6A, "Lock File Set", 'file')
13403         pkt.Request( 9, [
13404                 rec( 7, 2, TimeoutLimit ),
13405         ])
13406         pkt.Reply(8)
13407         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x9600, 0xfe0d, 0xff01])
13408         # 2222/6B, 107
13409         pkt = NCP(0x6B, "Log Logical Record", 'file')
13410         pkt.Request( (11, 266), [
13411                 rec( 7, 1, LockFlag ),
13412                 rec( 8, 2, TimeoutLimit ),
13413                 rec( 10, (1, 256), SynchName ),
13414         ], info_str=(SynchName, "Log Logical Record: %s", ", %s"))
13415         pkt.Reply(8)
13416         pkt.CompletionCodes([0x0000, 0x7f00, 0x9600, 0xfe0d, 0xff01])
13417         # 2222/6C, 108
13418         pkt = NCP(0x6C, "Log Logical Record", 'file')
13419         pkt.Request( 10, [
13420                 rec( 7, 1, LockFlag ),
13421                 rec( 8, 2, TimeoutLimit ),
13422         ])
13423         pkt.Reply(8)
13424         pkt.CompletionCodes([0x0000, 0x7f00, 0x9600, 0xfe0d, 0xff01])
13425         # 2222/6D, 109
13426         pkt = NCP(0x6D, "Log Physical Record", 'file')
13427         pkt.Request(24, [
13428                 rec( 7, 1, LockFlag ),
13429                 rec( 8, 6, FileHandle ),
13430                 rec( 14, 4, LockAreasStartOffset ),
13431                 rec( 18, 4, LockAreaLen ),
13432                 rec( 22, 2, LockTimeout ),
13433         ])
13434         pkt.Reply(8)
13435         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
13436         # 2222/6E, 110
13437         pkt = NCP(0x6E, "Lock Physical Record Set", 'file')
13438         pkt.Request(10, [
13439                 rec( 7, 1, LockFlag ),
13440                 rec( 8, 2, LockTimeout ),
13441         ])
13442         pkt.Reply(8)
13443         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
13444         # 2222/6F00, 111/00
13445         pkt = NCP(0x6F00, "Open/Create a Semaphore", 'file', has_length=0)
13446         pkt.Request((10,521), [
13447                 rec( 8, 1, InitialSemaphoreValue ),
13448                 rec( 9, (1, 512), SemaphoreName ),
13449         ], info_str=(SemaphoreName, "Open/Create Semaphore: %s", ", %s"))
13450         pkt.Reply(13, [
13451                   rec( 8, 4, SemaphoreHandle ),
13452                   rec( 12, 1, SemaphoreOpenCount ),
13453         ])
13454         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
13455         # 2222/6F01, 111/01
13456         pkt = NCP(0x6F01, "Examine Semaphore", 'file', has_length=0)
13457         pkt.Request(12, [
13458                 rec( 8, 4, SemaphoreHandle ),
13459         ])
13460         pkt.Reply(10, [
13461                   rec( 8, 1, SemaphoreValue ),
13462                   rec( 9, 1, SemaphoreOpenCount ),
13463         ])
13464         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
13465         # 2222/6F02, 111/02
13466         pkt = NCP(0x6F02, "Wait On (P) Semaphore", 'file', has_length=0)
13467         pkt.Request(14, [
13468                 rec( 8, 4, SemaphoreHandle ),
13469                 rec( 12, 2, LockTimeout ),
13470         ])
13471         pkt.Reply(8)
13472         pkt.CompletionCodes([0x0000, 0x9600, 0xfe04, 0xff01])
13473         # 2222/6F03, 111/03
13474         pkt = NCP(0x6F03, "Signal (V) Semaphore", 'file', has_length=0)
13475         pkt.Request(12, [
13476                 rec( 8, 4, SemaphoreHandle ),
13477         ])
13478         pkt.Reply(8)
13479         pkt.CompletionCodes([0x0000, 0x9600, 0xfe04, 0xff01])
13480         # 2222/6F04, 111/04
13481         pkt = NCP(0x6F04, "Close Semaphore", 'file', has_length=0)
13482         pkt.Request(12, [
13483                 rec( 8, 4, SemaphoreHandle ),
13484         ])
13485         pkt.Reply(10, [
13486                 rec( 8, 1, SemaphoreOpenCount ),
13487                 rec( 9, 1, SemaphoreShareCount ),
13488         ])
13489         pkt.CompletionCodes([0x0000, 0x9600, 0xfe04, 0xff01])
13490         # 2222/7201, 114/01
13491         pkt = NCP(0x7201, "Timesync Get Time", 'file')
13492         pkt.Request(10)
13493         pkt.Reply(32,[
13494                 rec( 8, 12, theTimeStruct ),
13495                 rec(20, 8, eventOffset ),
13496                 rec(28, 4, eventTime ),
13497         ])                
13498         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13499         # 2222/7202, 114/02
13500         pkt = NCP(0x7202, "Timesync Exchange Time", 'file')
13501         pkt.Request((63,112), [
13502                 rec( 10, 4, protocolFlags ),
13503                 rec( 14, 4, nodeFlags ),
13504                 rec( 18, 8, sourceOriginateTime ),
13505                 rec( 26, 8, targetReceiveTime ),
13506                 rec( 34, 8, targetTransmitTime ),
13507                 rec( 42, 8, sourceReturnTime ),
13508                 rec( 50, 8, eventOffset ),
13509                 rec( 58, 4, eventTime ),
13510                 rec( 62, (1,50), ServerNameLen ),
13511         ], info_str=(ServerNameLen, "Timesync Exchange Time: %s", ", %s"))
13512         pkt.Reply((64,113), [
13513                 rec( 8, 3, Reserved3 ),
13514                 rec( 11, 4, protocolFlags ),
13515                 rec( 15, 4, nodeFlags ),
13516                 rec( 19, 8, sourceOriginateTime ),
13517                 rec( 27, 8, targetReceiveTime ),
13518                 rec( 35, 8, targetTransmitTime ),
13519                 rec( 43, 8, sourceReturnTime ),
13520                 rec( 51, 8, eventOffset ),
13521                 rec( 59, 4, eventTime ),
13522                 rec( 63, (1,50), ServerNameLen ),
13523         ])
13524         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13525         # 2222/7205, 114/05
13526         pkt = NCP(0x7205, "Timesync Get Server List", 'file')
13527         pkt.Request(14, [
13528                 rec( 10, 4, StartNumber ),
13529         ])
13530         pkt.Reply(66, [
13531                 rec( 8, 4, nameType ),
13532                 rec( 12, 48, ServerName ),
13533                 rec( 60, 4, serverListFlags ),
13534                 rec( 64, 2, startNumberFlag ),
13535         ])
13536         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13537         # 2222/7206, 114/06
13538         pkt = NCP(0x7206, "Timesync Set Server List", 'file')
13539         pkt.Request(14, [
13540                 rec( 10, 4, StartNumber ),
13541         ])
13542         pkt.Reply(66, [
13543                 rec( 8, 4, nameType ),
13544                 rec( 12, 48, ServerName ),
13545                 rec( 60, 4, serverListFlags ),
13546                 rec( 64, 2, startNumberFlag ),
13547         ])
13548         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13549         # 2222/720C, 114/12
13550         pkt = NCP(0x720C, "Timesync Get Version", 'file')
13551         pkt.Request(10)
13552         pkt.Reply(12, [
13553                 rec( 8, 4, version ),
13554         ])
13555         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13556         # 2222/7B01, 123/01
13557         pkt = NCP(0x7B01, "Get Cache Information", 'stats')
13558         pkt.Request(12, [
13559                 rec(10, 1, VersionNumber),
13560                 rec(11, 1, RevisionNumber),
13561         ])
13562         pkt.Reply(288, [
13563                 rec(8, 4, CurrentServerTime, LE),
13564                 rec(12, 1, VConsoleVersion ),
13565                 rec(13, 1, VConsoleRevision ),
13566                 rec(14, 2, Reserved2 ),
13567                 rec(16, 104, Counters ),
13568                 rec(120, 40, ExtraCacheCntrs ),
13569                 rec(160, 40, MemoryCounters ),
13570                 rec(200, 48, TrendCounters ),
13571                 rec(248, 40, CacheInfo ),
13572         ])
13573         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xff00])
13574         # 2222/7B02, 123/02
13575         pkt = NCP(0x7B02, "Get File Server Information", 'stats')
13576         pkt.Request(10)
13577         pkt.Reply(150, [
13578                 rec(8, 4, CurrentServerTime ),
13579                 rec(12, 1, VConsoleVersion ),
13580                 rec(13, 1, VConsoleRevision ),
13581                 rec(14, 2, Reserved2 ),
13582                 rec(16, 4, NCPStaInUseCnt ),
13583                 rec(20, 4, NCPPeakStaInUse ),
13584                 rec(24, 4, NumOfNCPReqs ),
13585                 rec(28, 4, ServerUtilization ),
13586                 rec(32, 96, ServerInfo ),
13587                 rec(128, 22, FileServerCounters ),
13588         ])
13589         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13590         # 2222/7B03, 123/03
13591         pkt = NCP(0x7B03, "NetWare File System Information", 'stats')
13592         pkt.Request(11, [
13593                 rec(10, 1, FileSystemID ),
13594         ])
13595         pkt.Reply(68, [
13596                 rec(8, 4, CurrentServerTime ),
13597                 rec(12, 1, VConsoleVersion ),
13598                 rec(13, 1, VConsoleRevision ),
13599                 rec(14, 2, Reserved2 ),
13600                 rec(16, 52, FileSystemInfo ),
13601         ])
13602         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13603         # 2222/7B04, 123/04
13604         pkt = NCP(0x7B04, "User Information", 'stats')
13605         pkt.Request(14, [
13606                 rec(10, 4, ConnectionNumber ),
13607         ])
13608         pkt.Reply((85, 132), [
13609                 rec(8, 4, CurrentServerTime ),
13610                 rec(12, 1, VConsoleVersion ),
13611                 rec(13, 1, VConsoleRevision ),
13612                 rec(14, 2, Reserved2 ),
13613                 rec(16, 68, UserInformation ),
13614                 rec(84, (1, 48), UserName ),
13615         ])
13616         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13617         # 2222/7B05, 123/05
13618         pkt = NCP(0x7B05, "Packet Burst Information", 'stats')
13619         pkt.Request(10)
13620         pkt.Reply(216, [
13621                 rec(8, 4, CurrentServerTime ),
13622                 rec(12, 1, VConsoleVersion ),
13623                 rec(13, 1, VConsoleRevision ),
13624                 rec(14, 2, Reserved2 ),
13625                 rec(16, 200, PacketBurstInformation ),
13626         ])
13627         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13628         # 2222/7B06, 123/06
13629         pkt = NCP(0x7B06, "IPX SPX Information", 'stats')
13630         pkt.Request(10)
13631         pkt.Reply(94, [
13632                 rec(8, 4, CurrentServerTime ),
13633                 rec(12, 1, VConsoleVersion ),
13634                 rec(13, 1, VConsoleRevision ),
13635                 rec(14, 2, Reserved2 ),
13636                 rec(16, 34, IPXInformation ),
13637                 rec(50, 44, SPXInformation ),
13638         ])
13639         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13640         # 2222/7B07, 123/07
13641         pkt = NCP(0x7B07, "Garbage Collection Information", 'stats')
13642         pkt.Request(10)
13643         pkt.Reply(40, [
13644                 rec(8, 4, CurrentServerTime ),
13645                 rec(12, 1, VConsoleVersion ),
13646                 rec(13, 1, VConsoleRevision ),
13647                 rec(14, 2, Reserved2 ),
13648                 rec(16, 4, FailedAllocReqCnt ),
13649                 rec(20, 4, NumberOfAllocs ),
13650                 rec(24, 4, NoMoreMemAvlCnt ),
13651                 rec(28, 4, NumOfGarbageColl ),
13652                 rec(32, 4, FoundSomeMem ),
13653                 rec(36, 4, NumOfChecks ),
13654         ])
13655         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13656         # 2222/7B08, 123/08
13657         pkt = NCP(0x7B08, "CPU Information", 'stats')
13658         pkt.Request(14, [
13659                 rec(10, 4, CPUNumber ),
13660         ])
13661         pkt.Reply(51, [
13662                 rec(8, 4, CurrentServerTime ),
13663                 rec(12, 1, VConsoleVersion ),
13664                 rec(13, 1, VConsoleRevision ),
13665                 rec(14, 2, Reserved2 ),
13666                 rec(16, 4, NumberOfCPUs ),
13667                 rec(20, 31, CPUInformation ),
13668         ])      
13669         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13670         # 2222/7B09, 123/09
13671         pkt = NCP(0x7B09, "Volume Switch Information", 'stats')
13672         pkt.Request(14, [
13673                 rec(10, 4, StartNumber )
13674         ])
13675         pkt.Reply(28, [
13676                 rec(8, 4, CurrentServerTime ),
13677                 rec(12, 1, VConsoleVersion ),
13678                 rec(13, 1, VConsoleRevision ),
13679                 rec(14, 2, Reserved2 ),
13680                 rec(16, 4, TotalLFSCounters ),
13681                 rec(20, 4, CurrentLFSCounters, var="x"),
13682                 rec(24, 4, LFSCounters, repeat="x"),
13683         ])
13684         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13685         # 2222/7B0A, 123/10
13686         pkt = NCP(0x7B0A, "Get NLM Loaded List", 'stats')
13687         pkt.Request(14, [
13688                 rec(10, 4, StartNumber )
13689         ])
13690         pkt.Reply(28, [
13691                 rec(8, 4, CurrentServerTime ),
13692                 rec(12, 1, VConsoleVersion ),
13693                 rec(13, 1, VConsoleRevision ),
13694                 rec(14, 2, Reserved2 ),
13695                 rec(16, 4, NLMcount ),
13696                 rec(20, 4, NLMsInList, var="x" ),
13697                 rec(24, 4, NLMNumbers, repeat="x" ),
13698         ])
13699         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13700         # 2222/7B0B, 123/11
13701         pkt = NCP(0x7B0B, "NLM Information", 'stats')
13702         pkt.Request(14, [
13703                 rec(10, 4, NLMNumber ),
13704         ])
13705         pkt.Reply((79,841), [
13706                 rec(8, 4, CurrentServerTime ),
13707                 rec(12, 1, VConsoleVersion ),
13708                 rec(13, 1, VConsoleRevision ),
13709                 rec(14, 2, Reserved2 ),
13710                 rec(16, 60, NLMInformation ),
13711                 rec(76, (1,255), FileName ),
13712                 rec(-1, (1,255), Name ),
13713                 rec(-1, (1,255), Copyright ),
13714         ])
13715         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13716         # 2222/7B0C, 123/12
13717         pkt = NCP(0x7B0C, "Get Directory Cache Information", 'stats')
13718         pkt.Request(10)
13719         pkt.Reply(72, [
13720                 rec(8, 4, CurrentServerTime ),
13721                 rec(12, 1, VConsoleVersion ),
13722                 rec(13, 1, VConsoleRevision ),
13723                 rec(14, 2, Reserved2 ),
13724                 rec(16, 56, DirCacheInfo ),
13725         ])
13726         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13727         # 2222/7B0D, 123/13
13728         pkt = NCP(0x7B0D, "Get Operating System Version Information", 'stats')
13729         pkt.Request(10)
13730         pkt.Reply(70, [
13731                 rec(8, 4, CurrentServerTime ),
13732                 rec(12, 1, VConsoleVersion ),
13733                 rec(13, 1, VConsoleRevision ),
13734                 rec(14, 2, Reserved2 ),
13735                 rec(16, 1, OSMajorVersion ),
13736                 rec(17, 1, OSMinorVersion ),
13737                 rec(18, 1, OSRevision ),
13738                 rec(19, 1, AccountVersion ),
13739                 rec(20, 1, VAPVersion ),
13740                 rec(21, 1, QueueingVersion ),
13741                 rec(22, 1, SecurityRestrictionVersion ),
13742                 rec(23, 1, InternetBridgeVersion ),
13743                 rec(24, 4, MaxNumOfVol ),
13744                 rec(28, 4, MaxNumOfConn ),
13745                 rec(32, 4, MaxNumOfUsers ),
13746                 rec(36, 4, MaxNumOfNmeSps ),
13747                 rec(40, 4, MaxNumOfLANS ),
13748                 rec(44, 4, MaxNumOfMedias ),
13749                 rec(48, 4, MaxNumOfStacks ),
13750                 rec(52, 4, MaxDirDepth ),
13751                 rec(56, 4, MaxDataStreams ),
13752                 rec(60, 4, MaxNumOfSpoolPr ),
13753                 rec(64, 4, ServerSerialNumber ),
13754                 rec(68, 2, ServerAppNumber ),
13755         ])
13756         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13757         # 2222/7B0E, 123/14
13758         pkt = NCP(0x7B0E, "Get Active Connection List by Type", 'stats')
13759         pkt.Request(15, [
13760                 rec(10, 4, StartConnNumber ),
13761                 rec(14, 1, ConnectionType ),
13762         ])
13763         pkt.Reply(528, [
13764                 rec(8, 4, CurrentServerTime ),
13765                 rec(12, 1, VConsoleVersion ),
13766                 rec(13, 1, VConsoleRevision ),
13767                 rec(14, 2, Reserved2 ),
13768                 rec(16, 512, ActiveConnBitList ),
13769         ])
13770         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfd01, 0xff00])
13771         # 2222/7B0F, 123/15
13772         pkt = NCP(0x7B0F, "Get NLM Resource Tag List", 'stats')
13773         pkt.Request(18, [
13774                 rec(10, 4, NLMNumber ),
13775                 rec(14, 4, NLMStartNumber ),
13776         ])
13777         pkt.Reply(37, [
13778                 rec(8, 4, CurrentServerTime ),
13779                 rec(12, 1, VConsoleVersion ),
13780                 rec(13, 1, VConsoleRevision ),
13781                 rec(14, 2, Reserved2 ),
13782                 rec(16, 4, TtlNumOfRTags ),
13783                 rec(20, 4, CurNumOfRTags ),
13784                 rec(24, 13, RTagStructure ),
13785         ])
13786         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13787         # 2222/7B10, 123/16
13788         pkt = NCP(0x7B10, "Enumerate Connection Information from Connection List", 'stats')
13789         pkt.Request(22, [
13790                 rec(10, 1, EnumInfoMask),
13791                 rec(11, 3, Reserved3),
13792                 rec(14, 4, itemsInList, var="x"),
13793                 rec(18, 4, connList, repeat="x"),
13794         ])
13795         pkt.Reply(NO_LENGTH_CHECK, [
13796                 rec(8, 4, CurrentServerTime ),
13797                 rec(12, 1, VConsoleVersion ),
13798                 rec(13, 1, VConsoleRevision ),
13799                 rec(14, 2, Reserved2 ),
13800                 rec(16, 4, ItemsInPacket ),
13801                 srec(netAddr, req_cond="ncp.enum_info_transport==TRUE"),
13802                 srec(timeInfo, req_cond="ncp.enum_info_time==TRUE"),
13803                 srec(nameInfo, req_cond="ncp.enum_info_name==TRUE"),
13804                 srec(lockInfo, req_cond="ncp.enum_info_lock==TRUE"),
13805                 srec(printInfo, req_cond="ncp.enum_info_print==TRUE"),
13806                 srec(statsInfo, req_cond="ncp.enum_info_stats==TRUE"),
13807                 srec(acctngInfo, req_cond="ncp.enum_info_account==TRUE"),
13808                 srec(authInfo, req_cond="ncp.enum_info_auth==TRUE"),
13809         ])                
13810         pkt.ReqCondSizeVariable()
13811         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13812         # 2222/7B11, 123/17
13813         pkt = NCP(0x7B11, "Enumerate NCP Service Network Addresses", 'stats')
13814         pkt.Request(14, [
13815                 rec(10, 4, SearchNumber ),
13816         ])                
13817         pkt.Reply(60, [
13818                 rec(8, 4, CurrentServerTime ),
13819                 rec(12, 1, VConsoleVersion ),
13820                 rec(13, 1, VConsoleRevision ),
13821                 rec(14, 2, ServerInfoFlags ),
13822                 rec(16, 16, GUID ),
13823                 rec(32, 4, NextSearchNum ),
13824                 rec(36, 4, ItemsInPacket, var="x"), 
13825                 rec(40, 20, NCPNetworkAddress, repeat="x" ),
13826         ])
13827         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13828         # 2222/7B14, 123/20
13829         pkt = NCP(0x7B14, "Active LAN Board List", 'stats')
13830         pkt.Request(14, [
13831                 rec(10, 4, StartNumber ),
13832         ])               
13833         pkt.Reply(28, [
13834                 rec(8, 4, CurrentServerTime ),
13835                 rec(12, 1, VConsoleVersion ),
13836                 rec(13, 1, VConsoleRevision ),
13837                 rec(14, 2, Reserved2 ),
13838                 rec(16, 4, MaxNumOfLANS ),
13839                 rec(20, 4, ItemsInPacket, var="x"),
13840                 rec(24, 4, BoardNumbers, repeat="x"),
13841         ])                
13842         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13843         # 2222/7B15, 123/21
13844         pkt = NCP(0x7B15, "LAN Configuration Information", 'stats')
13845         pkt.Request(14, [
13846                 rec(10, 4, BoardNumber ),
13847         ])                
13848         pkt.Reply(152, [
13849                 rec(8, 4, CurrentServerTime ),
13850                 rec(12, 1, VConsoleVersion ),
13851                 rec(13, 1, VConsoleRevision ),
13852                 rec(14, 2, Reserved2 ),
13853                 rec(16,136, LANConfigInfo ),
13854         ])                
13855         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13856         # 2222/7B16, 123/22
13857         pkt = NCP(0x7B16, "LAN Common Counters Information", 'stats')
13858         pkt.Request(18, [
13859                 rec(10, 4, BoardNumber ),
13860                 rec(14, 4, BlockNumber ),
13861         ])                
13862         pkt.Reply(86, [
13863                 rec(8, 4, CurrentServerTime ),
13864                 rec(12, 1, VConsoleVersion ),
13865                 rec(13, 1, VConsoleRevision ),
13866                 rec(14, 1, StatMajorVersion ),
13867                 rec(15, 1, StatMinorVersion ),
13868                 rec(16, 4, TotalCommonCnts ),
13869                 rec(20, 4, TotalCntBlocks ),
13870                 rec(24, 4, CustomCounters ),
13871                 rec(28, 4, NextCntBlock ),
13872                 rec(32, 54, CommonLanStruc ),
13873         ])                
13874         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13875         # 2222/7B17, 123/23
13876         pkt = NCP(0x7B17, "LAN Custom Counters Information", 'stats')
13877         pkt.Request(18, [
13878                 rec(10, 4, BoardNumber ),
13879                 rec(14, 4, StartNumber ),
13880         ])                
13881         pkt.Reply(25, [
13882                 rec(8, 4, CurrentServerTime ),
13883                 rec(12, 1, VConsoleVersion ),
13884                 rec(13, 1, VConsoleRevision ),
13885                 rec(14, 2, Reserved2 ),
13886                 rec(16, 4, NumOfCCinPkt, var="x"),
13887                 rec(20, 5, CustomCntsInfo, repeat="x"),
13888         ])                
13889         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13890         # 2222/7B18, 123/24
13891         pkt = NCP(0x7B18, "LAN Name Information", 'stats')
13892         pkt.Request(14, [
13893                 rec(10, 4, BoardNumber ),
13894         ])                
13895         pkt.Reply(19, [
13896                 rec(8, 4, CurrentServerTime ),
13897                 rec(12, 1, VConsoleVersion ),
13898                 rec(13, 1, VConsoleRevision ),
13899                 rec(14, 2, Reserved2 ),
13900                 rec(16, 3, BoardNameStruct ),
13901         ])
13902         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13903         # 2222/7B19, 123/25
13904         pkt = NCP(0x7B19, "LSL Information", 'stats')
13905         pkt.Request(10)
13906         pkt.Reply(90, [
13907                 rec(8, 4, CurrentServerTime ),
13908                 rec(12, 1, VConsoleVersion ),
13909                 rec(13, 1, VConsoleRevision ),
13910                 rec(14, 2, Reserved2 ),
13911                 rec(16, 74, LSLInformation ),
13912         ])                
13913         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13914         # 2222/7B1A, 123/26
13915         pkt = NCP(0x7B1A, "LSL Logical Board Statistics", 'stats')
13916         pkt.Request(14, [
13917                 rec(10, 4, BoardNumber ),
13918         ])                
13919         pkt.Reply(28, [
13920                 rec(8, 4, CurrentServerTime ),
13921                 rec(12, 1, VConsoleVersion ),
13922                 rec(13, 1, VConsoleRevision ),
13923                 rec(14, 2, Reserved2 ),
13924                 rec(16, 4, LogTtlTxPkts ),
13925                 rec(20, 4, LogTtlRxPkts ),
13926                 rec(24, 4, UnclaimedPkts ),
13927         ])                
13928         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13929         # 2222/7B1B, 123/27
13930         pkt = NCP(0x7B1B, "MLID Board Information", 'stats')
13931         pkt.Request(14, [
13932                 rec(10, 4, BoardNumber ),
13933         ])                
13934         pkt.Reply(44, [
13935                 rec(8, 4, CurrentServerTime ),
13936                 rec(12, 1, VConsoleVersion ),
13937                 rec(13, 1, VConsoleRevision ),
13938                 rec(14, 1, Reserved ),
13939                 rec(15, 1, NumberOfProtocols ),
13940                 rec(16, 28, MLIDBoardInfo ),
13941         ])                        
13942         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13943         # 2222/7B1E, 123/30
13944         pkt = NCP(0x7B1E, "Get Media Manager Object Information", 'stats')
13945         pkt.Request(14, [
13946                 rec(10, 4, ObjectNumber ),
13947         ])                
13948         pkt.Reply(212, [
13949                 rec(8, 4, CurrentServerTime ),
13950                 rec(12, 1, VConsoleVersion ),
13951                 rec(13, 1, VConsoleRevision ),
13952                 rec(14, 2, Reserved2 ),
13953                 rec(16, 196, GenericInfoDef ),
13954         ])                
13955         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13956         # 2222/7B1F, 123/31
13957         pkt = NCP(0x7B1F, "Get Media Manager Objects List", 'stats')
13958         pkt.Request(15, [
13959                 rec(10, 4, StartNumber ),
13960                 rec(14, 1, MediaObjectType ),
13961         ])                
13962         pkt.Reply(28, [
13963                 rec(8, 4, CurrentServerTime ),
13964                 rec(12, 1, VConsoleVersion ),
13965                 rec(13, 1, VConsoleRevision ),
13966                 rec(14, 2, Reserved2 ),
13967                 rec(16, 4, nextStartingNumber ),
13968                 rec(20, 4, ObjectCount, var="x"),
13969                 rec(24, 4, ObjectID, repeat="x"),
13970         ])                
13971         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13972         # 2222/7B20, 123/32
13973         pkt = NCP(0x7B20, "Get Media Manager Object Childrens List", 'stats')
13974         pkt.Request(22, [
13975                 rec(10, 4, StartNumber ),
13976                 rec(14, 1, MediaObjectType ),
13977                 rec(15, 3, Reserved3 ),
13978                 rec(18, 4, ParentObjectNumber ),
13979         ])                
13980         pkt.Reply(28, [
13981                 rec(8, 4, CurrentServerTime ),
13982                 rec(12, 1, VConsoleVersion ),
13983                 rec(13, 1, VConsoleRevision ),
13984                 rec(14, 2, Reserved2 ),
13985                 rec(16, 4, nextStartingNumber ),
13986                 rec(20, 4, ObjectCount, var="x" ),
13987                 rec(24, 4, ObjectID, repeat="x" ),
13988         ])                
13989         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13990         # 2222/7B21, 123/33
13991         pkt = NCP(0x7B21, "Get Volume Segment List", 'stats')
13992         pkt.Request(14, [
13993                 rec(10, 4, VolumeNumberLong ),
13994         ])                
13995         pkt.Reply(32, [
13996                 rec(8, 4, CurrentServerTime ),
13997                 rec(12, 1, VConsoleVersion ),
13998                 rec(13, 1, VConsoleRevision ),
13999                 rec(14, 2, Reserved2 ),
14000                 rec(16, 4, NumOfSegments, var="x" ),
14001                 rec(20, 12, Segments, repeat="x" ),
14002         ])                
14003         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14004         # 2222/7B22, 123/34
14005         pkt = NCP(0x7B22, "Get Volume Information by Level", 'stats')
14006         pkt.Request(15, [
14007                 rec(10, 4, VolumeNumberLong ),
14008                 rec(14, 1, InfoLevelNumber ),
14009         ])                
14010         pkt.Reply(NO_LENGTH_CHECK, [
14011                 rec(8, 4, CurrentServerTime ),
14012                 rec(12, 1, VConsoleVersion ),
14013                 rec(13, 1, VConsoleRevision ),
14014                 rec(14, 2, Reserved2 ),
14015                 rec(16, 1, InfoLevelNumber ),
14016                 rec(17, 3, Reserved3 ),
14017                 srec(VolInfoStructure, req_cond="ncp.info_level_num==0x01"),
14018                 srec(VolInfo2Struct, req_cond="ncp.info_level_num==0x02"),
14019         ])                
14020         pkt.ReqCondSizeVariable()
14021         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14022         # 2222/7B28, 123/40
14023         pkt = NCP(0x7B28, "Active Protocol Stacks", 'stats')
14024         pkt.Request(14, [
14025                 rec(10, 4, StartNumber ),
14026         ])                
14027         pkt.Reply(48, [
14028                 rec(8, 4, CurrentServerTime ),
14029                 rec(12, 1, VConsoleVersion ),
14030                 rec(13, 1, VConsoleRevision ),
14031                 rec(14, 2, Reserved2 ),
14032                 rec(16, 4, MaxNumOfLANS ),
14033                 rec(20, 4, StackCount, var="x" ),
14034                 rec(24, 4, nextStartingNumber ),
14035                 rec(28, 20, StackInfo, repeat="x" ),
14036         ])                
14037         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14038         # 2222/7B29, 123/41
14039         pkt = NCP(0x7B29, "Get Protocol Stack Configuration Information", 'stats')
14040         pkt.Request(14, [
14041                 rec(10, 4, StackNumber ),
14042         ])                
14043         pkt.Reply((37,164), [
14044                 rec(8, 4, CurrentServerTime ),
14045                 rec(12, 1, VConsoleVersion ),
14046                 rec(13, 1, VConsoleRevision ),
14047                 rec(14, 2, Reserved2 ),
14048                 rec(16, 1, ConfigMajorVN ),
14049                 rec(17, 1, ConfigMinorVN ),
14050                 rec(18, 1, StackMajorVN ),
14051                 rec(19, 1, StackMinorVN ),
14052                 rec(20, 16, ShortStkName ),
14053                 rec(36, (1,128), StackFullNameStr ),
14054         ])                
14055         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14056         # 2222/7B2A, 123/42
14057         pkt = NCP(0x7B2A, "Get Protocol Stack Statistics Information", 'stats')
14058         pkt.Request(14, [
14059                 rec(10, 4, StackNumber ),
14060         ])                
14061         pkt.Reply(38, [
14062                 rec(8, 4, CurrentServerTime ),
14063                 rec(12, 1, VConsoleVersion ),
14064                 rec(13, 1, VConsoleRevision ),
14065                 rec(14, 2, Reserved2 ),
14066                 rec(16, 1, StatMajorVersion ),
14067                 rec(17, 1, StatMinorVersion ),
14068                 rec(18, 2, ComCnts ),
14069                 rec(20, 4, CounterMask ),
14070                 rec(24, 4, TotalTxPkts ),
14071                 rec(28, 4, TotalRxPkts ),
14072                 rec(32, 4, IgnoredRxPkts ),
14073                 rec(36, 2, CustomCnts ),
14074         ])                
14075         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14076         # 2222/7B2B, 123/43
14077         pkt = NCP(0x7B2B, "Get Protocol Stack Custom Information", 'stats')
14078         pkt.Request(18, [
14079                 rec(10, 4, StackNumber ),
14080                 rec(14, 4, StartNumber ),
14081         ])                
14082         pkt.Reply(25, [
14083                 rec(8, 4, CurrentServerTime ),
14084                 rec(12, 1, VConsoleVersion ),
14085                 rec(13, 1, VConsoleRevision ),
14086                 rec(14, 2, Reserved2 ),
14087                 rec(16, 4, CustomCount, var="x" ),
14088                 rec(20, 5, CustomCntsInfo, repeat="x" ),
14089         ])                
14090         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14091         # 2222/7B2C, 123/44
14092         pkt = NCP(0x7B2C, "Get Protocol Stack Numbers by Media Number", 'stats')
14093         pkt.Request(14, [
14094                 rec(10, 4, MediaNumber ),
14095         ])                
14096         pkt.Reply(24, [
14097                 rec(8, 4, CurrentServerTime ),
14098                 rec(12, 1, VConsoleVersion ),
14099                 rec(13, 1, VConsoleRevision ),
14100                 rec(14, 2, Reserved2 ),
14101                 rec(16, 4, StackCount, var="x" ),
14102                 rec(20, 4, StackNumber, repeat="x" ),
14103         ])                
14104         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14105         # 2222/7B2D, 123/45
14106         pkt = NCP(0x7B2D, "Get Protocol Stack Numbers by LAN Board Number", 'stats')
14107         pkt.Request(14, [
14108                 rec(10, 4, BoardNumber ),
14109         ])                
14110         pkt.Reply(24, [
14111                 rec(8, 4, CurrentServerTime ),
14112                 rec(12, 1, VConsoleVersion ),
14113                 rec(13, 1, VConsoleRevision ),
14114                 rec(14, 2, Reserved2 ),
14115                 rec(16, 4, StackCount, var="x" ),
14116                 rec(20, 4, StackNumber, repeat="x" ),
14117         ])                
14118         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14119         # 2222/7B2E, 123/46
14120         pkt = NCP(0x7B2E, "Get Media Name by Media Number", 'stats')
14121         pkt.Request(14, [
14122                 rec(10, 4, MediaNumber ),
14123         ])                
14124         pkt.Reply((17,144), [
14125                 rec(8, 4, CurrentServerTime ),
14126                 rec(12, 1, VConsoleVersion ),
14127                 rec(13, 1, VConsoleRevision ),
14128                 rec(14, 2, Reserved2 ),
14129                 rec(16, (1,128), MediaName ),
14130         ])                
14131         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14132         # 2222/7B2F, 123/47
14133         pkt = NCP(0x7B2F, "Get Loaded Media Number", 'stats')
14134         pkt.Request(10)
14135         pkt.Reply(28, [
14136                 rec(8, 4, CurrentServerTime ),
14137                 rec(12, 1, VConsoleVersion ),
14138                 rec(13, 1, VConsoleRevision ),
14139                 rec(14, 2, Reserved2 ),
14140                 rec(16, 4, MaxNumOfMedias ),
14141                 rec(20, 4, MediaListCount, var="x" ),
14142                 rec(24, 4, MediaList, repeat="x" ),
14143         ])                
14144         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14145         # 2222/7B32, 123/50
14146         pkt = NCP(0x7B32, "Get General Router and SAP Information", 'stats')
14147         pkt.Request(10)
14148         pkt.Reply(37, [
14149                 rec(8, 4, CurrentServerTime ),
14150                 rec(12, 1, VConsoleVersion ),
14151                 rec(13, 1, VConsoleRevision ),
14152                 rec(14, 2, Reserved2 ),
14153                 rec(16, 2, RIPSocketNumber ),
14154                 rec(18, 2, Reserved2 ),
14155                 rec(20, 1, RouterDownFlag ),
14156                 rec(21, 3, Reserved3 ),
14157                 rec(24, 1, TrackOnFlag ),
14158                 rec(25, 3, Reserved3 ),
14159                 rec(28, 1, ExtRouterActiveFlag ),
14160                 rec(29, 3, Reserved3 ),
14161                 rec(32, 2, SAPSocketNumber ),
14162                 rec(34, 2, Reserved2 ),
14163                 rec(36, 1, RpyNearestSrvFlag ),
14164         ])                
14165         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14166         # 2222/7B33, 123/51
14167         pkt = NCP(0x7B33, "Get Network Router Information", 'stats')
14168         pkt.Request(14, [
14169                 rec(10, 4, NetworkNumber ),
14170         ])                
14171         pkt.Reply(26, [
14172                 rec(8, 4, CurrentServerTime ),
14173                 rec(12, 1, VConsoleVersion ),
14174                 rec(13, 1, VConsoleRevision ),
14175                 rec(14, 2, Reserved2 ),
14176                 rec(16, 10, KnownRoutes ),
14177         ])                
14178         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
14179         # 2222/7B34, 123/52
14180         pkt = NCP(0x7B34, "Get Network Routers Information", 'stats')
14181         pkt.Request(18, [
14182                 rec(10, 4, NetworkNumber),
14183                 rec(14, 4, StartNumber ),
14184         ])                
14185         pkt.Reply(34, [
14186                 rec(8, 4, CurrentServerTime ),
14187                 rec(12, 1, VConsoleVersion ),
14188                 rec(13, 1, VConsoleRevision ),
14189                 rec(14, 2, Reserved2 ),
14190                 rec(16, 4, NumOfEntries, var="x" ),
14191                 rec(20, 14, RoutersInfo, repeat="x" ),
14192         ])                
14193         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
14194         # 2222/7B35, 123/53
14195         pkt = NCP(0x7B35, "Get Known Networks Information", 'stats')
14196         pkt.Request(14, [
14197                 rec(10, 4, StartNumber ),
14198         ])                
14199         pkt.Reply(30, [
14200                 rec(8, 4, CurrentServerTime ),
14201                 rec(12, 1, VConsoleVersion ),
14202                 rec(13, 1, VConsoleRevision ),
14203                 rec(14, 2, Reserved2 ),
14204                 rec(16, 4, NumOfEntries, var="x" ),
14205                 rec(20, 10, KnownRoutes, repeat="x" ),
14206         ])                
14207         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14208         # 2222/7B36, 123/54
14209         pkt = NCP(0x7B36, "Get Server Information", 'stats')
14210         pkt.Request((15,64), [
14211                 rec(10, 2, ServerType ),
14212                 rec(12, 2, Reserved2 ),
14213                 rec(14, (1,50), ServerNameLen ),
14214         ], info_str=(ServerNameLen, "Get Server Information: %s", ", %s"))
14215         pkt.Reply(30, [
14216                 rec(8, 4, CurrentServerTime ),
14217                 rec(12, 1, VConsoleVersion ),
14218                 rec(13, 1, VConsoleRevision ),
14219                 rec(14, 2, Reserved2 ),
14220                 rec(16, 12, ServerAddress ),
14221                 rec(28, 2, HopsToNet ),
14222         ])                
14223         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14224         # 2222/7B37, 123/55
14225         pkt = NCP(0x7B37, "Get Server Sources Information", 'stats')
14226         pkt.Request((19,68), [
14227                 rec(10, 4, StartNumber ),
14228                 rec(14, 2, ServerType ),
14229                 rec(16, 2, Reserved2 ),
14230                 rec(18, (1,50), ServerNameLen ),
14231         ], info_str=(ServerNameLen, "Get Server Sources Info: %s", ", %s"))                
14232         pkt.Reply(32, [
14233                 rec(8, 4, CurrentServerTime ),
14234                 rec(12, 1, VConsoleVersion ),
14235                 rec(13, 1, VConsoleRevision ),
14236                 rec(14, 2, Reserved2 ),
14237                 rec(16, 4, NumOfEntries, var="x" ),
14238                 rec(20, 12, ServersSrcInfo, repeat="x" ),
14239         ])                
14240         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
14241         # 2222/7B38, 123/56
14242         pkt = NCP(0x7B38, "Get Known Servers Information", 'stats')
14243         pkt.Request(16, [
14244                 rec(10, 4, StartNumber ),
14245                 rec(14, 2, ServerType ),
14246         ])                
14247         pkt.Reply(35, [
14248                 rec(8, 4, CurrentServerTime ),
14249                 rec(12, 1, VConsoleVersion ),
14250                 rec(13, 1, VConsoleRevision ),
14251                 rec(14, 2, Reserved2 ),
14252                 rec(16, 4, NumOfEntries, var="x" ),
14253                 rec(20, 15, KnownServStruc, repeat="x" ),
14254         ])                
14255         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
14256         # 2222/7B3C, 123/60
14257         pkt = NCP(0x7B3C, "Get Server Set Commands Information", 'stats')
14258         pkt.Request(14, [
14259                 rec(10, 4, StartNumber ),
14260         ])                
14261         pkt.Reply(NO_LENGTH_CHECK, [
14262                 rec(8, 4, CurrentServerTime ),
14263                 rec(12, 1, VConsoleVersion ),
14264                 rec(13, 1, VConsoleRevision ),
14265                 rec(14, 2, Reserved2 ),
14266                 rec(16, 4, TtlNumOfSetCmds ),
14267                 rec(20, 4, nextStartingNumber ),
14268                 rec(24, 1, SetCmdType ),
14269                 rec(25, 3, Reserved3 ),
14270                 rec(28, 1, SetCmdCategory ),
14271                 rec(29, 3, Reserved3 ),
14272                 rec(32, 1, SetCmdFlags ),
14273                 rec(33, 3, Reserved3 ),
14274                 rec(36, 100, SetCmdName ),
14275                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x00"),
14276                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x01"),
14277                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x02"),
14278                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x04"),
14279                 srec(SetCmdValueString, req_cond="ncp.set_cmd_type==0x05"),
14280                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x06"),
14281                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x07"),
14282         ])                
14283         pkt.ReqCondSizeVariable()
14284         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14285         # 2222/7B3D, 123/61
14286         pkt = NCP(0x7B3D, "Get Server Set Categories", 'stats')
14287         pkt.Request(14, [
14288                 rec(10, 4, StartNumber ),
14289         ])                
14290         pkt.Reply(124, [
14291                 rec(8, 4, CurrentServerTime ),
14292                 rec(12, 1, VConsoleVersion ),
14293                 rec(13, 1, VConsoleRevision ),
14294                 rec(14, 2, Reserved2 ),
14295                 rec(16, 4, NumberOfSetCategories ),
14296                 rec(20, 4, nextStartingNumber ),
14297                 rec(24, 100, CategoryName ),
14298         ])                
14299         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14300         # 2222/7B3E, 123/62
14301         pkt = NCP(0x7B3E, "Get Server Set Commands Information By Name", 'stats')
14302         pkt.Request(110, [
14303                 rec(10, 100, SetParmName ),
14304         ], info_str=(SetParmName, "Get Server Set Command Info for: %s", ", %s"))                
14305         pkt.Reply(NO_LENGTH_CHECK, [
14306                 rec(8, 4, CurrentServerTime ),
14307                 rec(12, 1, VConsoleVersion ),
14308                 rec(13, 1, VConsoleRevision ),
14309                 rec(14, 2, Reserved2 ),
14310                 rec(16, 4, TtlNumOfSetCmds ),
14311                 rec(20, 4, nextStartingNumber ),
14312                 rec(24, 1, SetCmdType ),
14313                 rec(25, 3, Reserved3 ),
14314                 rec(28, 1, SetCmdCategory ),
14315                 rec(29, 3, Reserved3 ),
14316                 rec(32, 1, SetCmdFlags ),
14317                 rec(33, 3, Reserved3 ),
14318                 rec(36, 100, SetCmdName ),
14319                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x00"),
14320                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x01"),
14321                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x02"),
14322                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x04"),
14323                 srec(SetCmdValueString, req_cond="ncp.set_cmd_type==0x05"),
14324                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x06"),
14325                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x07"),
14326         ])                
14327         pkt.ReqCondSizeVariable()
14328         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14329         # 2222/7B46, 123/70
14330         pkt = NCP(0x7B46, "Get Current Compressing File", 'stats')
14331         pkt.Request(14, [
14332                 rec(10, 4, VolumeNumberLong ),
14333         ])                
14334         pkt.Reply(56, [
14335                 rec(8, 4, ParentID ),
14336                 rec(12, 4, DirectoryEntryNumber ),
14337                 rec(16, 4, compressionStage ),
14338                 rec(20, 4, ttlIntermediateBlks ),
14339                 rec(24, 4, ttlCompBlks ),
14340                 rec(28, 4, curIntermediateBlks ),
14341                 rec(32, 4, curCompBlks ),
14342                 rec(36, 4, curInitialBlks ),
14343                 rec(40, 4, fileFlags ),
14344                 rec(44, 4, projectedCompSize ),
14345                 rec(48, 4, originalSize ),
14346                 rec(52, 4, compressVolume ),
14347         ])                
14348         pkt.CompletionCodes([0x0000, 0x7e00, 0x7901, 0xfb06, 0xff00])
14349         # 2222/7B47, 123/71
14350         pkt = NCP(0x7B47, "Get Current DeCompressing File Info List", 'stats')
14351         pkt.Request(14, [
14352                 rec(10, 4, VolumeNumberLong ),
14353         ])                
14354         pkt.Reply(28, [
14355                 rec(8, 4, FileListCount ),
14356                 rec(12, 16, FileInfoStruct ),
14357         ])                
14358         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
14359         # 2222/7B48, 123/72
14360         pkt = NCP(0x7B48, "Get Compression and Decompression Time and Counts", 'stats')
14361         pkt.Request(14, [
14362                 rec(10, 4, VolumeNumberLong ),
14363         ])                
14364         pkt.Reply(64, [
14365                 rec(8, 56, CompDeCompStat ),
14366         ])
14367         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
14368         # 2222/8301, 131/01
14369         pkt = NCP(0x8301, "RPC Load an NLM", 'fileserver')
14370         pkt.Request(285, [
14371                 rec(10, 4, NLMLoadOptions ),
14372                 rec(14, 16, Reserved16 ),
14373                 rec(30, 255, PathAndName ),
14374         ], info_str=(PathAndName, "RPC Load NLM: %s", ", %s"))                
14375         pkt.Reply(12, [
14376                 rec(8, 4, RPCccode ),
14377         ])                
14378         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14379         # 2222/8302, 131/02
14380         pkt = NCP(0x8302, "RPC Unload an NLM", 'fileserver')
14381         pkt.Request(100, [
14382                 rec(10, 20, Reserved20 ),
14383                 rec(30, 70, NLMName ),
14384         ], info_str=(NLMName, "RPC Unload NLM: %s", ", %s"))                
14385         pkt.Reply(12, [
14386                 rec(8, 4, RPCccode ),
14387         ])                
14388         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14389         # 2222/8303, 131/03
14390         pkt = NCP(0x8303, "RPC Mount Volume", 'fileserver')
14391         pkt.Request(100, [
14392                 rec(10, 20, Reserved20 ),
14393                 rec(30, 70, VolumeNameStringz ),
14394         ], info_str=(VolumeNameStringz, "RPC Mount Volume: %s", ", %s"))                
14395         pkt.Reply(32, [
14396                 rec(8, 4, RPCccode),
14397                 rec(12, 16, Reserved16 ),
14398                 rec(28, 4, VolumeNumberLong ),
14399         ])                
14400         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14401         # 2222/8304, 131/04
14402         pkt = NCP(0x8304, "RPC Dismount Volume", 'fileserver')
14403         pkt.Request(100, [
14404                 rec(10, 20, Reserved20 ),
14405                 rec(30, 70, VolumeNameStringz ),
14406         ], info_str=(VolumeNameStringz, "RPC Dismount Volume: %s", ", %s"))                
14407         pkt.Reply(12, [
14408                 rec(8, 4, RPCccode ), 
14409         ])                
14410         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14411         # 2222/8305, 131/05
14412         pkt = NCP(0x8305, "RPC Add Name Space To Volume", 'fileserver')
14413         pkt.Request(100, [
14414                 rec(10, 20, Reserved20 ),
14415                 rec(30, 70, AddNameSpaceAndVol ),
14416         ], info_str=(AddNameSpaceAndVol, "RPC Add Name Space to Volume: %s", ", %s"))                
14417         pkt.Reply(12, [
14418                 rec(8, 4, RPCccode ),
14419         ])                
14420         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14421         # 2222/8306, 131/06
14422         pkt = NCP(0x8306, "RPC Set Command Value", 'fileserver')
14423         pkt.Request(100, [
14424                 rec(10, 1, SetCmdType ),
14425                 rec(11, 3, Reserved3 ),
14426                 rec(14, 4, SetCmdValueNum ),
14427                 rec(18, 12, Reserved12 ),
14428                 rec(30, 70, SetCmdName ),
14429         ], info_str=(SetCmdName, "RPC Set Command Value: %s", ", %s"))                
14430         pkt.Reply(12, [
14431                 rec(8, 4, RPCccode ),
14432         ])                
14433         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14434         # 2222/8307, 131/07
14435         pkt = NCP(0x8307, "RPC Execute NCF File", 'fileserver')
14436         pkt.Request(285, [
14437                 rec(10, 20, Reserved20 ),
14438                 rec(30, 255, PathAndName ),
14439         ], info_str=(PathAndName, "RPC Execute NCF File: %s", ", %s"))                
14440         pkt.Reply(12, [
14441                 rec(8, 4, RPCccode ),
14442         ])                
14443         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14444 if __name__ == '__main__':
14445 #       import profile
14446 #       filename = "ncp.pstats"
14447 #       profile.run("main()", filename)
14448 #
14449 #       import pstats
14450 #       sys.stdout = msg
14451 #       p = pstats.Stats(filename)
14452 #
14453 #       print "Stats sorted by cumulative time"
14454 #       p.strip_dirs().sort_stats('cumulative').print_stats()
14455 #
14456 #       print "Function callees"
14457 #       p.print_callees()
14458         main()