Eliminate the packet_info pointer argument from routines that don't use
[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/ncp.htm  (where you can download an
19 *.exe file which installs a PDF, although you may have to create a login
20 to do this)
21
22 or
23
24 http://developer.novell.com/ndk/doc/ncp/
25 for a badly-formatted HTML version of the same PDF.
26
27
28 $Id: ncp2222.py,v 1.55 2003/04/08 00:07:01 guy Exp $
29
30
31 Portions Copyright (c) 2000-2002 by Gilbert Ramirez <gram@alumni.rice.edu>.
32 Portions Copyright (c) Novell, Inc. 2000-2003.
33
34 This program is free software; you can redistribute it and/or
35 modify it under the terms of the GNU General Public License
36 as published by the Free Software Foundation; either version 2
37 of the License, or (at your option) any later version.
38  
39 This program is distributed in the hope that it will be useful,
40 but WITHOUT ANY WARRANTY; without even the implied warranty of
41 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
42 GNU General Public License for more details.
43  
44 You should have received a copy of the GNU General Public License
45 along with this program; if not, write to the Free Software
46 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
47 """
48
49 import os
50 import sys
51 import string
52 import getopt
53 import traceback
54
55 errors          = {}
56 groups          = {}
57 packets         = []
58 compcode_lists  = None
59 ptvc_lists      = None
60 msg             = None
61
62 REC_START       = 0
63 REC_LENGTH      = 1
64 REC_FIELD       = 2
65 REC_ENDIANNESS  = 3
66 REC_VAR         = 4
67 REC_REPEAT      = 5
68 REC_REQ_COND    = 6
69
70 NO_VAR          = -1
71 NO_REPEAT       = -1
72 NO_REQ_COND     = -1
73 NO_LENGTH_CHECK = -2
74
75
76 PROTO_LENGTH_UNKNOWN    = -1
77
78 global_highest_var = -1
79 global_req_cond = {}
80
81
82 REQ_COND_SIZE_VARIABLE = "REQ_COND_SIZE_VARIABLE"
83 REQ_COND_SIZE_CONSTANT = "REQ_COND_SIZE_CONSTANT"
84
85 ##############################################################################
86 # Global containers
87 ##############################################################################
88
89 class UniqueCollection:
90         """The UniqueCollection class stores objects which can be compared to other
91         objects of the same class. If two objects in the collection are equivalent,
92         only one is stored."""
93
94         def __init__(self, name):
95                 "Constructor"
96                 self.name = name
97                 self.members = []
98                 self.member_reprs = {}
99
100         def Add(self, object):
101                 """Add an object to the members lists, if a comparable object
102                 doesn't already exist. The object that is in the member list, that is
103                 either the object that was added or the comparable object that was
104                 already in the member list, is returned."""
105
106                 r = repr(object)
107                 # Is 'object' a duplicate of some other member?
108                 if self.member_reprs.has_key(r):
109                         return self.member_reprs[r]
110                 else:
111                         self.member_reprs[r] = object
112                         self.members.append(object)
113                         return object
114
115         def Members(self):
116                 "Returns the list of members."
117                 return self.members
118
119         def HasMember(self, object):
120                 "Does the list of members contain the object?"
121                 if self.members_reprs.has_key(repr(object)):
122                         return 1
123                 else:
124                         return 0
125
126 # This list needs to be defined before the NCP types are defined,
127 # because the NCP types are defined in the global scope, not inside
128 # a function's scope.
129 ptvc_lists      = UniqueCollection('PTVC Lists')
130
131 ##############################################################################
132
133 class NamedList:
134         "NamedList's keep track of PTVC's and Completion Codes"
135         def __init__(self, name, list):
136                 "Constructor"
137                 self.name = name
138                 self.list = list
139
140         def __cmp__(self, other):
141                 "Compare this NamedList to another"
142
143                 if isinstance(other, NamedList):
144                         return cmp(self.list, other.list)
145                 else:
146                         return 0
147
148
149         def Name(self, new_name = None):
150                 "Get/Set name of list"
151                 if new_name != None:
152                         self.name = new_name
153                 return self.name
154
155         def Records(self):
156                 "Returns record lists"
157                 return self.list
158
159         def Null(self):
160                 "Is there no list (different from an empty list)?"
161                 return self.list == None
162
163         def Empty(self):
164                 "It the list empty (different from a null list)?"
165                 assert(not self.Null())
166
167                 if self.list:
168                         return 0
169                 else:
170                         return 1
171
172         def __repr__(self):
173                 return repr(self.list)
174
175 class PTVC(NamedList):
176         """ProtoTree TVBuff Cursor List ("PTVC List") Class"""
177
178         def __init__(self, name, records):
179                 "Constructor"
180                 NamedList.__init__(self, name, [])
181
182                 global global_highest_var
183
184                 expected_offset = None
185                 highest_var = -1
186
187                 named_vars = {}
188
189                 # Make a PTVCRecord object for each list in 'records'
190                 for record in records:
191                         offset = record[REC_START]
192                         length = record[REC_LENGTH]
193                         field = record[REC_FIELD]
194                         endianness = record[REC_ENDIANNESS]
195
196                         # Variable
197                         var_name = record[REC_VAR]
198                         if var_name:
199                                 # Did we already define this var?
200                                 if named_vars.has_key(var_name):
201                                         sys.exit("%s has multiple %s vars." % \
202                                                 (name, var_name))
203
204                                 highest_var = highest_var + 1
205                                 var = highest_var
206                                 if highest_var > global_highest_var:
207                                     global_highest_var = highest_var
208                                 named_vars[var_name] = var
209                         else:
210                                 var = NO_VAR
211
212                         # Repeat
213                         repeat_name = record[REC_REPEAT]
214                         if repeat_name:
215                                 # Do we have this var?
216                                 if not named_vars.has_key(repeat_name):
217                                         sys.exit("%s does not have %s var defined." % \
218                                                 (name, var_name))
219                                 repeat = named_vars[repeat_name]
220                         else:
221                                 repeat = NO_REPEAT
222
223                         # Request Condition
224                         req_cond = record[REC_REQ_COND]
225                         if req_cond != NO_REQ_COND:
226                                 global_req_cond[req_cond] = None
227
228                         ptvc_rec = PTVCRecord(field, length, endianness, var, repeat, req_cond)
229
230                         if expected_offset == None:
231                                 expected_offset = offset
232
233                         elif expected_offset == -1:
234                                 pass
235
236                         elif expected_offset != offset and offset != -1:
237                                 msg.write("Expected offset in %s for %s to be %d\n" % \
238                                         (name, field.HFName(), expected_offset))
239                                 sys.exit(1)
240
241                         # We can't make a PTVC list from a variable-length
242                         # packet, unless the fields can tell us at run time
243                         # how long the packet is. That is, nstring8 is fine, since
244                         # the field has an integer telling us how long the string is.
245                         # Fields that don't have a length determinable at run-time
246                         # cannot be variable-length.
247                         if type(ptvc_rec.Length()) == type(()):
248                                 if isinstance(ptvc_rec.Field(), nstring):
249                                         expected_offset = -1
250                                         pass
251                                 elif isinstance(ptvc_rec.Field(), nbytes):
252                                         expected_offset = -1
253                                         pass
254                                 elif isinstance(ptvc_rec.Field(), struct):
255                                         expected_offset = -1
256                                         pass
257                                 else:
258                                         field = ptvc_rec.Field()
259                                         assert 0, "Cannot make PTVC from %s, type %s" % \
260                                                 (field.HFName(), field)
261
262                         elif expected_offset > -1:
263                                 if ptvc_rec.Length() < 0:
264                                         expected_offset = -1
265                                 else:
266                                         expected_offset = expected_offset + ptvc_rec.Length()
267
268
269                         self.list.append(ptvc_rec)
270
271         def ETTName(self):
272                 return "ett_%s" % (self.Name(),)
273
274
275         def Code(self):
276                 x =  "static const ptvc_record %s[] = {\n" % (self.Name())
277                 for ptvc_rec in self.list:
278                         x = x +  "\t%s,\n" % (ptvc_rec.Code())
279                 x = x + "\t{ NULL, 0, NULL, NO_ENDIANNESS, NO_VAR, NO_REPEAT, NO_REQ_COND, NCP_FMT_NONE }\n"
280                 x = x + "};\n"
281                 return x
282
283         def __repr__(self):
284                 x = ""
285                 for ptvc_rec in self.list:
286                         x = x + repr(ptvc_rec)
287                 return x
288
289
290 class PTVCBitfield(PTVC):
291         def __init__(self, name, vars):
292                 NamedList.__init__(self, name, [])
293
294                 for var in vars:
295                         ptvc_rec = PTVCRecord(var, var.Length(), var.Endianness(),
296                                 NO_VAR, NO_REPEAT, NO_REQ_COND)
297                         self.list.append(ptvc_rec)
298
299         def Code(self):
300                 ett_name = self.ETTName()
301                 x = "static gint %s;\n" % (ett_name,)
302
303                 x = x + "static const ptvc_record ptvc_%s[] = {\n" % (self.Name())
304                 for ptvc_rec in self.list:
305                         x = x +  "\t%s,\n" % (ptvc_rec.Code())
306                 x = x + "\t{ NULL, 0, NULL, NO_ENDIANNESS, NO_VAR, NO_REPEAT, NO_REQ_COND, NCP_FMT_NONE }\n"
307                 x = x + "};\n"
308
309                 x = x + "static const sub_ptvc_record %s = {\n" % (self.Name(),)
310                 x = x + "\t&%s,\n" % (ett_name,)
311                 x = x + "\tNULL,\n"
312                 x = x + "\tptvc_%s,\n" % (self.Name(),)
313                 x = x + "};\n"
314                 return x
315
316
317 class PTVCRecord:
318         def __init__(self, field, length, endianness, var, repeat, req_cond):
319                 "Constructor"
320                 self.field      = field
321                 self.length     = length
322                 self.endianness = endianness
323                 self.var        = var
324                 self.repeat     = repeat
325                 self.req_cond   = req_cond
326
327         def __cmp__(self, other):
328                 "Comparison operator"
329                 if self.field != other.field:
330                         return 1
331                 elif self.length < other.length:
332                         return -1
333                 elif self.length > other.length:
334                         return 1
335                 elif self.endianness != other.endianness:
336                         return 1
337                 else:
338                         return 0
339
340         def Code(self):
341                 # Nice textual representations
342                 if self.var == NO_VAR:
343                         var = "NO_VAR"
344                 else:
345                         var = self.var
346
347                 if self.repeat == NO_REPEAT:
348                         repeat = "NO_REPEAT"
349                 else:
350                         repeat = self.repeat
351
352                 if self.req_cond == NO_REQ_COND:
353                         req_cond = "NO_REQ_COND"
354                 else:
355                         req_cond = global_req_cond[self.req_cond]
356                         assert req_cond != None
357
358                 if isinstance(self.field, struct):
359                         return self.field.ReferenceString(var, repeat, req_cond)
360                 else:
361                         return self.RegularCode(var, repeat, req_cond)
362
363         def RegularCode(self, var, repeat, req_cond):
364                 "String representation"
365                 endianness = 'BE'
366                 if self.endianness == LE:
367                         endianness = 'LE'
368
369                 length = None
370
371                 if type(self.length) == type(0):
372                         length = self.length
373                 else:
374                         # This is for cases where a length is needed
375                         # in order to determine a following variable-length,
376                         # like nstring8, where 1 byte is needed in order
377                         # to determine the variable length.
378                         var_length = self.field.Length()
379                         if var_length > 0:
380                                 length = var_length
381
382                 if length == PROTO_LENGTH_UNKNOWN:
383                         # XXX length = "PROTO_LENGTH_UNKNOWN"
384                         pass
385
386                 assert length, "Length not handled for %s" % (self.field.HFName(),)
387
388                 sub_ptvc_name = self.field.PTVCName()
389                 if sub_ptvc_name != "NULL":
390                         sub_ptvc_name = "&%s" % (sub_ptvc_name,)
391
392
393                 return "{ &%s, %s, %s, %s, %s, %s, %s, %s }" % \
394                         (self.field.HFName(), length, sub_ptvc_name, 
395                         endianness, var, repeat, req_cond,
396                         self.field.SpecialFmt())
397
398         def Offset(self):
399                 return self.offset
400
401         def Length(self):
402                 return self.length
403
404         def Field(self):
405                 return self.field
406
407         def __repr__(self):
408                 return "{%s len=%s end=%s var=%s rpt=%s rqc=%s}" % \
409                         (self.field.HFName(), self.length,
410                         self.endianness, self.var, self.repeat, self.req_cond)
411
412 ##############################################################################
413
414 class NCP:
415         "NCP Packet class"
416         def __init__(self, func_code, description, group, has_length=1):
417                 "Constructor"
418                 self.func_code          = func_code
419                 self.description        = description
420                 self.group              = group
421                 self.codes              = None
422                 self.request_records    = None
423                 self.reply_records      = None
424                 self.has_length         = has_length
425                 self.req_cond_size      = None
426                 self.req_info_str       = None
427
428                 if not groups.has_key(group):
429                         msg.write("NCP 0x%x has invalid group '%s'\n" % \
430                                 (self.func_code, group))
431                         sys.exit(1)
432
433                 if self.HasSubFunction():
434                         # NCP Function with SubFunction
435                         self.start_offset = 10
436                 else:
437                         # Simple NCP Function
438                         self.start_offset = 7
439
440         def ReqCondSize(self):
441                 return self.req_cond_size
442
443         def ReqCondSizeVariable(self):
444                 self.req_cond_size = REQ_COND_SIZE_VARIABLE
445
446         def ReqCondSizeConstant(self):
447                 self.req_cond_size = REQ_COND_SIZE_CONSTANT
448
449         def FunctionCode(self, part=None):
450                 "Returns the function code for this NCP packet."
451                 if part == None:
452                         return self.func_code
453                 elif part == 'high':
454                         if self.HasSubFunction():
455                                 return (self.func_code & 0xff00) >> 8
456                         else:
457                                 return self.func_code
458                 elif part == 'low':
459                         if self.HasSubFunction():
460                                 return self.func_code & 0x00ff
461                         else:
462                                 return 0x00
463                 else:
464                         msg.write("Unknown directive '%s' for function_code()\n" % (part))
465                         sys.exit(1)
466
467         def HasSubFunction(self):
468                 "Does this NPC packet require a subfunction field?"
469                 if self.func_code <= 0xff:
470                         return 0
471                 else:
472                         return 1
473
474         def HasLength(self):
475                 return self.has_length
476
477         def Description(self):
478                 return self.description
479
480         def Group(self):
481                 return self.group
482
483         def PTVCRequest(self):
484                 return self.ptvc_request
485
486         def PTVCReply(self):
487                 return self.ptvc_reply
488
489         def Request(self, size, records=[], **kwargs):
490                 self.request_size = size
491                 self.request_records = records
492                 if self.HasSubFunction():
493                         if self.HasLength():
494                                 self.CheckRecords(size, records, "Request", 10)
495                         else:
496                                 self.CheckRecords(size, records, "Request", 8)
497                 else:
498                         self.CheckRecords(size, records, "Request", 7)
499                 self.ptvc_request = self.MakePTVC(records, "request")
500
501                 if kwargs.has_key("info_str"):
502                         self.req_info_str = kwargs["info_str"]
503
504         def Reply(self, size, records=[]):
505                 self.reply_size = size
506                 self.reply_records = records
507                 self.CheckRecords(size, records, "Reply", 8)
508                 self.ptvc_reply = self.MakePTVC(records, "reply")
509
510         def CheckRecords(self, size, records, descr, min_hdr_length):
511                 "Simple sanity check"
512                 if size == NO_LENGTH_CHECK:
513                         return
514                 min = size
515                 max = size
516                 if type(size) == type(()):
517                         min = size[0]
518                         max = size[1]
519
520                 lower = min_hdr_length
521                 upper = min_hdr_length
522
523                 for record in records:
524                         rec_size = record[REC_LENGTH]
525                         rec_lower = rec_size
526                         rec_upper = rec_size
527                         if type(rec_size) == type(()):
528                                 rec_lower = rec_size[0]
529                                 rec_upper = rec_size[1]
530
531                         lower = lower + rec_lower
532                         upper = upper + rec_upper
533
534                 error = 0
535                 if min != lower:
536                         msg.write("%s records for 2222/0x%x sum to %d bytes minimum, but param1 shows %d\n" \
537                                 % (descr, self.FunctionCode(), lower, min))
538                         error = 1
539                 if max != upper:
540                         msg.write("%s records for 2222/0x%x sum to %d bytes maximum, but param1 shows %d\n" \
541                                 % (descr, self.FunctionCode(), upper, max))
542                         error = 1
543
544                 if error == 1:
545                         sys.exit(1)
546
547
548         def MakePTVC(self, records, name_suffix):
549                 """Makes a PTVC out of a request or reply record list. Possibly adds
550                 it to the global list of PTVCs (the global list is a UniqueCollection,
551                 so an equivalent PTVC may already be in the global list)."""
552
553                 name = "%s_%s" % (self.CName(), name_suffix)
554                 ptvc = PTVC(name, records)
555                 return ptvc_lists.Add(ptvc)
556
557         def CName(self):
558                 "Returns a C symbol based on the NCP function code"
559                 return "ncp_0x%x" % (self.func_code)
560
561         def InfoStrName(self):
562                 "Returns a C symbol based on the NCP function code, for the info_str"
563                 return "info_str_0x%x" % (self.func_code)
564
565         def Variables(self):
566                 """Returns a list of variables used in the request and reply records.
567                 A variable is listed only once, even if it is used twice (once in
568                 the request, once in the reply)."""
569
570                 variables = {}
571                 if self.request_records:
572                         for record in self.request_records:
573                                 var = record[REC_FIELD]
574                                 variables[var.HFName()] = var
575
576                                 sub_vars = var.SubVariables()
577                                 for sv in sub_vars:
578                                         variables[sv.HFName()] = sv
579
580                 if self.reply_records:
581                         for record in self.reply_records:
582                                 var = record[REC_FIELD]
583                                 variables[var.HFName()] = var
584
585                                 sub_vars = var.SubVariables()
586                                 for sv in sub_vars:
587                                         variables[sv.HFName()] = sv
588
589                 return variables.values()
590
591         def CalculateReqConds(self):
592                 """Returns a list of request conditions (dfilter text) used
593                 in the reply records. A request condition is listed only once,
594                 even it it used twice. """
595                 texts = {}
596                 if self.reply_records:
597                         for record in self.reply_records:
598                                 text = record[REC_REQ_COND]
599                                 if text != NO_REQ_COND:
600                                         texts[text] = None
601
602                 if len(texts) == 0:
603                         self.req_conds = None
604                         return None
605
606                 dfilter_texts = texts.keys()
607                 dfilter_texts.sort()
608                 name = "%s_req_cond_indexes" % (self.CName(),)
609                 return NamedList(name, dfilter_texts)
610
611         def GetReqConds(self):
612                 return self.req_conds
613
614         def SetReqConds(self, new_val):
615                 self.req_conds = new_val
616
617
618         def CompletionCodes(self, codes=None):
619                 """Sets or returns the list of completion
620                 codes. Internally, a NamedList is used to store the
621                 completion codes, but the caller of this function never
622                 realizes that because Python lists are the input and
623                 output."""
624
625                 if codes == None:
626                         return self.codes
627
628                 # Sanity check
629                 okay = 1
630                 for code in codes:
631                         if not errors.has_key(code):
632                                 msg.write("Errors table does not have key 0x%04x for NCP=0x%x\n" % (code,
633                                         self.func_code))
634                                 okay = 0
635
636                 # Delay the exit until here so that the programmer can get
637                 # the complete list of missing error codes
638                 if not okay:
639                         sys.exit(1)
640
641                 # Create CompletionCode (NamedList) object and possible
642                 # add it to  the global list of completion code lists.
643                 name = "%s_errors" % (self.CName(),)
644                 codes.sort()
645                 codes_list = NamedList(name, codes)
646                 self.codes = compcode_lists.Add(codes_list)
647
648                 self.Finalize()
649
650         def Finalize(self):
651                 """Adds the NCP object to the global collection of NCP
652                 objects. This is done automatically after setting the
653                 CompletionCode list. Yes, this is a shortcut, but it makes
654                 our list of NCP packet definitions look neater, since an
655                 explicit "add to global list of packets" is not needed."""
656
657                 # Add packet to global collection of packets
658                 packets.append(self)
659
660 def rec(start, length, field, endianness=None, **kw):
661         return _rec(start, length, field, endianness, kw)
662
663 def srec(field, endianness=None, **kw):
664         return _rec(-1, -1, field, endianness, kw)
665
666 def _rec(start, length, field, endianness, kw):
667         # If endianness not explicitly given, use the field's
668         # default endiannes.
669         if endianness == None:
670                 endianness = field.Endianness()
671
672         # Setting a var?
673         if kw.has_key("var"):
674                 # Is the field an INT ?
675                 if not isinstance(field, CountingNumber):
676                         sys.exit("Field %s used as count variable, but not integer." \
677                                 % (field.HFName()))
678                 var = kw["var"]
679         else:
680                 var = None
681
682         # If 'var' not used, 'repeat' can be used.
683         if not var and kw.has_key("repeat"):
684                 repeat = kw["repeat"]
685         else:
686                 repeat = None
687
688         # Request-condition ?
689         if kw.has_key("req_cond"):
690                 req_cond = kw["req_cond"]
691         else:
692                 req_cond = NO_REQ_COND
693
694         return [start, length, field, endianness, var, repeat, req_cond]
695
696
697
698
699 ##############################################################################
700
701 LE              = 1             # Little-Endian
702 BE              = 0             # Big-Endian
703 NA              = -1            # Not Applicable
704
705 class Type:
706         " Virtual class for NCP field types"
707         type            = "Type"
708         ftype           = None
709         disp            = "BASE_DEC"
710         endianness      = NA
711         values          = []
712
713         def __init__(self, abbrev, descr, bytes, endianness = NA):
714                 self.abbrev = abbrev
715                 self.descr = descr
716                 self.bytes = bytes
717                 self.endianness = endianness
718                 self.hfname = "hf_ncp_" + self.abbrev
719                 self.special_fmt = "NCP_FMT_NONE"
720
721         def Length(self):
722                 return self.bytes
723
724         def Abbreviation(self):
725                 return self.abbrev
726
727         def Description(self):
728                 return self.descr
729
730         def HFName(self):
731                 return self.hfname
732
733         def DFilter(self):
734                 return "ncp." + self.abbrev
735
736         def EtherealFType(self):
737                 return self.ftype
738
739         def Display(self, newval=None):
740                 if newval != None:
741                         self.disp = newval
742                 return self.disp
743
744         def ValuesName(self):
745                 return "NULL"
746
747         def Mask(self):
748                 return 0
749
750         def Endianness(self):
751                 return self.endianness
752
753         def SubVariables(self):
754                 return []
755
756         def PTVCName(self):
757                 return "NULL"
758
759         def NWDate(self):
760                 self.special_fmt = "NCP_FMT_NW_DATE"
761
762         def NWTime(self):
763                 self.special_fmt = "NCP_FMT_NW_TIME"
764                 
765         def NWUnicode(self):
766                 self.special_fmt = "NCP_FMT_UNICODE"                
767                 
768         def SpecialFmt(self):
769                 return self.special_fmt
770
771         def __cmp__(self, other):
772                 return cmp(self.hfname, other.hfname)
773
774 class struct(PTVC, Type):
775         def __init__(self, name, items, descr=None):
776                 name = "struct_%s" % (name,)
777                 NamedList.__init__(self, name, [])
778
779                 self.bytes = 0
780                 self.descr = descr
781                 for item in items:
782                         if isinstance(item, Type):
783                                 field = item
784                                 length = field.Length()
785                                 endianness = field.Endianness()
786                                 var = NO_VAR
787                                 repeat = NO_REPEAT
788                                 req_cond = NO_REQ_COND
789                         elif type(item) == type([]):
790                                 field = item[REC_FIELD]
791                                 length = item[REC_LENGTH]
792                                 endianness = item[REC_ENDIANNESS]
793                                 var = item[REC_VAR]
794                                 repeat = item[REC_REPEAT]
795                                 req_cond = item[REC_REQ_COND]
796                         else:
797                                 assert 0, "Item %s item not handled." % (item,)
798
799                         ptvc_rec = PTVCRecord(field, length, endianness, var,
800                                 repeat, req_cond)
801                         self.list.append(ptvc_rec)
802                         self.bytes = self.bytes + field.Length()
803
804                 self.hfname = self.name
805
806         def Variables(self):
807                 vars = []
808                 for ptvc_rec in self.list:
809                         vars.append(ptvc_rec.Field())
810                 return vars
811
812         def ReferenceString(self, var, repeat, req_cond):
813                 return "{ PTVC_STRUCT, NO_LENGTH, &%s, NO_ENDIANNESS, %s, %s, %s, NCP_FMT_NONE }" % \
814                         (self.name, var, repeat, req_cond)
815
816         def Code(self):
817                 ett_name = self.ETTName()
818                 x = "static gint %s;\n" % (ett_name,)
819                 x = x + "static const ptvc_record ptvc_%s[] = {\n" % (self.name,)
820                 for ptvc_rec in self.list:
821                         x = x +  "\t%s,\n" % (ptvc_rec.Code())
822                 x = x + "\t{ NULL, NO_LENGTH, NULL, NO_ENDIANNESS, NO_VAR, NO_REPEAT, NO_REQ_COND, NCP_FMT_NONE }\n"
823                 x = x + "};\n"
824
825                 x = x + "static const sub_ptvc_record %s = {\n" % (self.name,)
826                 x = x + "\t&%s,\n" % (ett_name,)
827                 if self.descr:
828                         x = x + '\t"%s",\n' % (self.descr,)
829                 else:
830                         x = x + "\tNULL,\n"
831                 x = x + "\tptvc_%s,\n" % (self.Name(),)
832                 x = x + "};\n"
833                 return x
834
835         def __cmp__(self, other):
836                 return cmp(self.HFName(), other.HFName())
837
838
839 class byte(Type):
840         type    = "byte"
841         ftype   = "FT_UINT8"
842         def __init__(self, abbrev, descr):
843                 Type.__init__(self, abbrev, descr, 1)
844
845 class CountingNumber:
846         pass
847
848 # Same as above. Both are provided for convenience
849 class uint8(Type, CountingNumber):
850         type    = "uint8"
851         ftype   = "FT_UINT8"
852         bytes   = 1
853         def __init__(self, abbrev, descr):
854                 Type.__init__(self, abbrev, descr, 1)
855
856 class uint16(Type, CountingNumber):
857         type    = "uint16"
858         ftype   = "FT_UINT16"
859         def __init__(self, abbrev, descr, endianness = LE):
860                 Type.__init__(self, abbrev, descr, 2, endianness)
861
862 class uint24(Type, CountingNumber):
863         type    = "uint24"
864         ftype   = "FT_UINT24"
865         def __init__(self, abbrev, descr, endianness = LE):
866                 Type.__init__(self, abbrev, descr, 3, endianness)
867
868 class uint32(Type, CountingNumber):
869         type    = "uint32"
870         ftype   = "FT_UINT32"
871         def __init__(self, abbrev, descr, endianness = LE):
872                 Type.__init__(self, abbrev, descr, 4, endianness)
873
874 class boolean8(uint8):
875         type    = "boolean8"
876         ftype   = "FT_BOOLEAN"
877
878 class boolean16(uint16):
879         type    = "boolean16"
880         ftype   = "FT_BOOLEAN"
881
882 class boolean24(uint24):
883         type    = "boolean24"
884         ftype   = "FT_BOOLEAN"
885
886 class boolean32(uint32):
887         type    = "boolean32"
888         ftype   = "FT_BOOLEAN"
889
890 class nstring:
891         pass
892
893 class nstring8(Type, nstring):
894         """A string of up to (2^8)-1 characters. The first byte
895         gives the string length."""
896
897         type    = "nstring8"
898         ftype   = "FT_UINT_STRING"
899         def __init__(self, abbrev, descr):
900                 Type.__init__(self, abbrev, descr, 1)
901
902 class nstring16(Type, nstring):
903         """A string of up to (2^16)-2 characters. The first 2 bytes
904         gives the string length."""
905
906         type    = "nstring16"
907         ftype   = "FT_UINT_STRING"
908         def __init__(self, abbrev, descr, endianness = LE):
909                 Type.__init__(self, abbrev, descr, 2, endianness)
910
911 class nstring32(Type, nstring):
912         """A string of up to (2^32)-4 characters. The first 4 bytes
913         gives the string length."""
914
915         type    = "nstring32"
916         ftype   = "FT_UINT_STRING"
917         def __init__(self, abbrev, descr, endianness = LE):
918                 Type.__init__(self, abbrev, descr, 4, endianness)
919
920 class fw_string(Type):
921         """A fixed-width string of n bytes."""
922
923         type    = "fw_string"
924         ftype   = "FT_STRING"
925
926         def __init__(self, abbrev, descr, bytes):
927                 Type.__init__(self, abbrev, descr, bytes)
928
929
930 class stringz(Type):
931         "NUL-terminated string, with a maximum length"
932
933         type    = "stringz"
934         ftype   = "FT_STRINGZ"
935         def __init__(self, abbrev, descr):
936                 Type.__init__(self, abbrev, descr, PROTO_LENGTH_UNKNOWN)
937
938 class val_string(Type):
939         """Abstract class for val_stringN, where N is number
940         of bits that key takes up."""
941
942         type    = "val_string"
943         disp    = 'BASE_HEX'
944
945         def __init__(self, abbrev, descr, val_string_array, endianness = LE):
946                 Type.__init__(self, abbrev, descr, self.bytes, endianness)
947                 self.values = val_string_array
948
949         def Code(self):
950                 result = "static const value_string %s[] = {\n" \
951                                 % (self.ValuesCName())
952                 for val_record in self.values:
953                         value   = val_record[0]
954                         text    = val_record[1]
955                         value_repr = self.value_format % value
956                         result = result + '\t{ %s,\t"%s" },\n' \
957                                         % (value_repr, text)
958
959                 value_repr = self.value_format % 0
960                 result = result + "\t{ %s,\tNULL },\n" % (value_repr)
961                 result = result + "};\n"
962                 REC_VAL_STRING_RES = self.value_format % value
963                 return result
964
965         def ValuesCName(self):
966                 return "ncp_%s_vals" % (self.abbrev)
967
968         def ValuesName(self):
969                 return "VALS(%s)" % (self.ValuesCName())
970
971 class val_string8(val_string):
972         type            = "val_string8"
973         ftype           = "FT_UINT8"
974         bytes           = 1
975         value_format    = "0x%02x"
976
977 class val_string16(val_string):
978         type            = "val_string16"
979         ftype           = "FT_UINT16"
980         bytes           = 2
981         value_format    = "0x%04x"
982
983 class val_string32(val_string):
984         type            = "val_string32"
985         ftype           = "FT_UINT32"
986         bytes           = 4
987         value_format    = "0x%08x"
988
989 class bytes(Type):
990         type    = 'bytes'
991         ftype   = 'FT_BYTES'
992
993         def __init__(self, abbrev, descr, bytes):
994                 Type.__init__(self, abbrev, descr, bytes, NA)
995
996 class nbytes:
997         pass
998
999 class nbytes8(Type, nbytes):
1000         """A series of up to (2^8)-1 bytes. The first byte
1001         gives the byte-string length."""
1002
1003         type    = "nbytes8"
1004         ftype   = "FT_UINT_BYTES"
1005         def __init__(self, abbrev, descr, endianness = LE):
1006                 Type.__init__(self, abbrev, descr, 1, endianness)
1007
1008 class nbytes16(Type, nbytes):
1009         """A series of up to (2^16)-2 bytes. The first 2 bytes
1010         gives the byte-string length."""
1011
1012         type    = "nbytes16"
1013         ftype   = "FT_UINT_BYTES"
1014         def __init__(self, abbrev, descr, endianness = LE):
1015                 Type.__init__(self, abbrev, descr, 2, endianness)
1016
1017 class nbytes32(Type, nbytes):
1018         """A series of up to (2^32)-4 bytes. The first 4 bytes
1019         gives the byte-string length."""
1020
1021         type    = "nbytes32"
1022         ftype   = "FT_UINT_BYTES"
1023         def __init__(self, abbrev, descr, endianness = LE):
1024                 Type.__init__(self, abbrev, descr, 4, endianness)
1025
1026 class bf_uint(Type):
1027         type    = "bf_uint"
1028         disp    = None
1029
1030         def __init__(self, bitmask, abbrev, descr, endianness=LE):
1031                 Type.__init__(self, abbrev, descr, self.bytes, endianness)
1032                 self.bitmask = bitmask
1033
1034         def Mask(self):
1035                 return self.bitmask
1036
1037 class bf_val_str(bf_uint):
1038         type    = "bf_uint"
1039         disp    = None
1040
1041         def __init__(self, bitmask, abbrev, descr, val_string_array, endiannes=LE):
1042                 bf_uint.__init__(self, bitmask, abbrev, descr, endiannes)
1043                 self.values = val_string_array
1044
1045         def ValuesName(self):
1046                 return "VALS(%s)" % (self.ValuesCName())
1047
1048 class bf_val_str8(bf_val_str, val_string8):
1049         type    = "bf_val_str8"
1050         ftype   = "FT_UINT8"
1051         disp    = "BASE_HEX"
1052         bytes   = 1
1053
1054 class bf_val_str16(bf_val_str, val_string16):
1055         type    = "bf_val_str16"
1056         ftype   = "FT_UINT16"
1057         disp    = "BASE_HEX"
1058         bytes   = 2
1059
1060 class bf_val_str32(bf_val_str, val_string32):
1061         type    = "bf_val_str32"
1062         ftype   = "FT_UINT32"
1063         disp    = "BASE_HEX"
1064         bytes   = 4
1065
1066 class bf_boolean:
1067     pass
1068
1069 class bf_boolean8(bf_uint, boolean8, bf_boolean):
1070         type    = "bf_boolean8"
1071         ftype   = "FT_BOOLEAN"
1072         disp    = "8"
1073         bytes   = 1
1074
1075 class bf_boolean16(bf_uint, boolean16, bf_boolean):
1076         type    = "bf_boolean16"
1077         ftype   = "FT_BOOLEAN"
1078         disp    = "16"
1079         bytes   = 2
1080
1081 class bf_boolean24(bf_uint, boolean24, bf_boolean):
1082         type    = "bf_boolean24"
1083         ftype   = "FT_BOOLEAN"
1084         disp    = "24"
1085         bytes   = 3
1086
1087 class bf_boolean32(bf_uint, boolean32, bf_boolean):
1088         type    = "bf_boolean32"
1089         ftype   = "FT_BOOLEAN"
1090         disp    = "32"
1091         bytes   = 4
1092
1093 class bitfield(Type):
1094         type    = "bitfield"
1095         disp    = 'BASE_HEX'
1096
1097         def __init__(self, vars):
1098                 var_hash = {}
1099                 for var in vars:
1100                         if isinstance(var, bf_boolean):
1101                                 if not isinstance(var, self.bf_type):
1102                                         print "%s must be of type %s" % \
1103                                                 (var.Abbreviation(),
1104                                                 self.bf_type)
1105                                         sys.exit(1)
1106                         var_hash[var.bitmask] = var
1107
1108                 bitmasks = var_hash.keys()
1109                 bitmasks.sort()
1110                 bitmasks.reverse()
1111
1112                 ordered_vars = []
1113                 for bitmask in bitmasks:
1114                         var = var_hash[bitmask]
1115                         ordered_vars.append(var)
1116
1117                 self.vars = ordered_vars
1118                 self.ptvcname = "ncp_%s_bitfield" % (self.abbrev,)
1119                 self.hfname = "hf_ncp_%s" % (self.abbrev,)
1120                 self.sub_ptvc = PTVCBitfield(self.PTVCName(), self.vars)
1121
1122         def SubVariables(self):
1123                 return self.vars
1124
1125         def SubVariablesPTVC(self):
1126                 return self.sub_ptvc
1127
1128         def PTVCName(self):
1129                 return self.ptvcname
1130
1131
1132 class bitfield8(bitfield, uint8):
1133         type    = "bitfield8"
1134         ftype   = "FT_UINT8"
1135         bf_type = bf_boolean8
1136
1137         def __init__(self, abbrev, descr, vars):
1138                 uint8.__init__(self, abbrev, descr)
1139                 bitfield.__init__(self, vars)
1140
1141 class bitfield16(bitfield, uint16):
1142         type    = "bitfield16"
1143         ftype   = "FT_UINT16"
1144         bf_type = bf_boolean16
1145
1146         def __init__(self, abbrev, descr, vars, endianness=LE):
1147                 uint16.__init__(self, abbrev, descr, endianness)
1148                 bitfield.__init__(self, vars)
1149
1150 class bitfield24(bitfield, uint24):
1151         type    = "bitfield24"
1152         ftype   = "FT_UINT24"
1153         bf_type = bf_boolean24
1154
1155         def __init__(self, abbrev, descr, vars, endianness=LE):
1156                 uint24.__init__(self, abbrev, descr, endianness)
1157                 bitfield.__init__(self, vars)
1158
1159 class bitfield32(bitfield, uint32):
1160         type    = "bitfield32"
1161         ftype   = "FT_UINT32"
1162         bf_type = bf_boolean32
1163
1164         def __init__(self, abbrev, descr, vars, endianness=LE):
1165                 uint32.__init__(self, abbrev, descr, endianness)
1166                 bitfield.__init__(self, vars)
1167
1168 #
1169 # Force the endianness of a field to a non-default value; used in
1170 # the list of fields of a structure.
1171 #
1172 def endian(field, endianness):
1173         return [-1, field.Length(), field, endianness, NO_VAR, NO_REPEAT, NO_REQ_COND]
1174
1175 ##############################################################################
1176 # NCP Field Types. Defined in Appendix A of "Programmer's Guide..."
1177 ##############################################################################
1178 AbortQueueFlag                  = val_string8("abort_q_flag", "Abort Queue Flag", [
1179         [ 0x00, "Place at End of Queue" ],
1180         [ 0x01, "Do Not Place Spool File, Examine Flags" ],
1181 ])
1182 AcceptedMaxSize                 = uint16("accepted_max_size", "Accepted Max Size")
1183 AccessControl                   = val_string8("access_control", "Access Control", [
1184         [ 0x00, "Open for read by this client" ],
1185         [ 0x01, "Open for write by this client" ],
1186         [ 0x02, "Deny read requests from other stations" ],
1187         [ 0x03, "Deny write requests from other stations" ],
1188         [ 0x04, "File detached" ],
1189         [ 0x05, "TTS holding detach" ],
1190         [ 0x06, "TTS holding open" ],
1191 ])
1192 AccessDate                      = uint16("access_date", "Access Date")
1193 AccessDate.NWDate()
1194 AccessMode                      = bitfield8("access_mode", "Access Mode", [
1195         bf_boolean8(0x01, "acc_mode_read", "Read Access"),
1196         bf_boolean8(0x02, "acc_mode_write", "Write Access"),
1197         bf_boolean8(0x04, "acc_mode_deny_read", "Deny Read Access"),
1198         bf_boolean8(0x08, "acc_mode_deny_write", "Deny Write Access"),
1199         bf_boolean8(0x10, "acc_mode_comp", "Compatibility Mode"),
1200 ])
1201 AccessPrivileges                = bitfield8("access_privileges", "Access Privileges", [
1202         bf_boolean8(0x01, "acc_priv_read", "Read Privileges (files only)"),
1203         bf_boolean8(0x02, "acc_priv_write", "Write Privileges (files only)"),
1204         bf_boolean8(0x04, "acc_priv_open", "Open Privileges (files only)"),
1205         bf_boolean8(0x08, "acc_priv_create", "Create Privileges (files only)"),
1206         bf_boolean8(0x10, "acc_priv_delete", "Delete Privileges (files only)"),
1207         bf_boolean8(0x20, "acc_priv_parent", "Parental Privileges (directories only for creating, deleting, and renaming)"),
1208         bf_boolean8(0x40, "acc_priv_search", "Search Privileges (directories only)"),
1209         bf_boolean8(0x80, "acc_priv_modify", "Modify File Status Flags Privileges (files and directories)"),
1210 ])
1211 AccessRightsMask                = bitfield8("access_rights_mask", "Access Rights", [
1212         bf_boolean8(0x0001, "acc_rights_read", "Read Rights"),
1213         bf_boolean8(0x0002, "acc_rights_write", "Write Rights"),
1214         bf_boolean8(0x0004, "acc_rights_open", "Open Rights"),
1215         bf_boolean8(0x0008, "acc_rights_create", "Create Rights"),
1216         bf_boolean8(0x0010, "acc_rights_delete", "Delete Rights"),
1217         bf_boolean8(0x0020, "acc_rights_parent", "Parental Rights"),
1218         bf_boolean8(0x0040, "acc_rights_search", "Search Rights"),
1219         bf_boolean8(0x0080, "acc_rights_modify", "Modify Rights"),
1220 ])
1221 AccessRightsMaskWord            = bitfield16("access_rights_mask_word", "Access Rights", [
1222         bf_boolean16(0x0001, "acc_rights1_read", "Read Rights"),
1223         bf_boolean16(0x0002, "acc_rights1_write", "Write Rights"),
1224         bf_boolean16(0x0004, "acc_rights1_open", "Open Rights"),
1225         bf_boolean16(0x0008, "acc_rights1_create", "Create Rights"),
1226         bf_boolean16(0x0010, "acc_rights1_delete", "Delete Rights"),
1227         bf_boolean16(0x0020, "acc_rights1_parent", "Parental Rights"),
1228         bf_boolean16(0x0040, "acc_rights1_search", "Search Rights"),
1229         bf_boolean16(0x0080, "acc_rights1_modify", "Modify Rights"),
1230         bf_boolean16(0x0100, "acc_rights1_supervisor", "Supervisor Access Rights"),
1231 ])
1232 AccountBalance                  = uint32("account_balance", "Account Balance")
1233 AccountVersion                  = uint8("acct_version", "Acct Version")
1234 ActionFlag                      = bitfield8("action_flag", "Action Flag", [
1235         bf_boolean8(0x01, "act_flag_open", "Open"),
1236         bf_boolean8(0x02, "act_flag_replace", "Replace"),
1237         bf_boolean8(0x10, "act_flag_create", "Create"),
1238 ])
1239 ActiveConnBitList               = fw_string("active_conn_bit_list", "Active Connection List", 512)
1240 ActiveIndexedFiles              = uint16("active_indexed_files", "Active Indexed Files")
1241 ActualMaxBinderyObjects         = uint16("actual_max_bindery_objects", "Actual Max Bindery Objects")
1242 ActualMaxIndexedFiles           = uint16("actual_max_indexed_files", "Actual Max Indexed Files")
1243 ActualMaxOpenFiles              = uint16("actual_max_open_files", "Actual Max Open Files")
1244 ActualMaxSimultaneousTransactions = uint16("actual_max_sim_trans", "Actual Max Simultaneous Transactions")
1245 ActualMaxUsedDirectoryEntries   = uint16("actual_max_used_directory_entries", "Actual Max Used Directory Entries")
1246 ActualMaxUsedRoutingBuffers     = uint16("actual_max_used_routing_buffers", "Actual Max Used Routing Buffers")
1247 ActualResponseCount             = uint16("actual_response_count", "Actual Response Count")
1248 AddNameSpaceAndVol              = stringz("add_nm_spc_and_vol", "Add Name Space and Volume")
1249 AFPEntryID                      = uint32("afp_entry_id", "AFP Entry ID", BE)
1250 AFPEntryID.Display("BASE_HEX")
1251 AllocAvailByte                  = uint32("alloc_avail_byte", "Bytes Available for Allocation")
1252 AllocateMode                    = val_string16("allocate_mode", "Allocate Mode", [
1253         [ 0x0000, "Permanent Directory Handle" ],
1254         [ 0x0001, "Temporary Directory Handle" ],
1255         [ 0x0002, "Special Temporary Directory Handle" ],
1256 ])
1257 AllocationBlockSize             = uint32("allocation_block_size", "Allocation Block Size")
1258 AllocFreeCount                  = uint32("alloc_free_count", "Reclaimable Free Bytes")
1259 ApplicationNumber               = uint16("application_number", "Application Number")
1260 ArchivedTime                    = uint16("archived_time", "Archived Time")
1261 ArchivedTime.NWTime()
1262 ArchivedDate                    = uint16("archived_date", "Archived Date")
1263 ArchivedDate.NWDate()
1264 ArchiverID                      = uint32("archiver_id", "Archiver ID", BE)
1265 ArchiverID.Display("BASE_HEX")
1266 AssociatedNameSpace             = uint8("associated_name_space", "Associated Name Space")
1267 AttachDuringProcessing          = uint16("attach_during_processing", "Attach During Processing")
1268 AttachedIndexedFiles            = uint8("attached_indexed_files", "Attached Indexed Files")
1269 AttachWhileProcessingAttach     = uint16("attach_while_processing_attach", "Attach While Processing Attach")
1270 Attributes                      = uint32("attributes", "Attributes")
1271 AttributesDef                   = bitfield8("attr_def", "Attributes", [
1272         bf_boolean8(0x01, "att_def_ro", "Read Only"),
1273         bf_boolean8(0x02, "att_def_hidden", "Hidden"),
1274         bf_boolean8(0x04, "att_def_system", "System"),
1275         bf_boolean8(0x08, "att_def_execute", "Execute"),
1276         bf_boolean8(0x10, "att_def_sub_only", "Subdirectory"),
1277         bf_boolean8(0x20, "att_def_archive", "Archive"),
1278         bf_boolean8(0x80, "att_def_shareable", "Shareable"),
1279 ])
1280 AttributesDef16                 = bitfield16("attr_def_16", "Attributes", [
1281         bf_boolean16(0x0001, "att_def16_ro", "Read Only"),
1282         bf_boolean16(0x0002, "att_def16_hidden", "Hidden"),
1283         bf_boolean16(0x0004, "att_def16_system", "System"),
1284         bf_boolean16(0x0008, "att_def16_execute", "Execute"),
1285         bf_boolean16(0x0010, "att_def16_sub_only", "Subdirectory"),
1286         bf_boolean16(0x0020, "att_def16_archive", "Archive"),
1287         bf_boolean16(0x0080, "att_def16_shareable", "Shareable"),
1288         bf_boolean16(0x1000, "att_def16_transaction", "Transactional"),
1289         bf_boolean16(0x4000, "att_def16_read_audit", "Read Audit"),
1290         bf_boolean16(0x8000, "att_def16_write_audit", "Write Audit"),
1291 ])
1292 AttributesDef32                 = bitfield32("attr_def_32", "Attributes", [
1293         bf_boolean32(0x00000001, "att_def32_ro", "Read Only"),
1294         bf_boolean32(0x00000002, "att_def32_hidden", "Hidden"),
1295         bf_boolean32(0x00000004, "att_def32_system", "System"),
1296         bf_boolean32(0x00000008, "att_def32_execute", "Execute"),
1297         bf_boolean32(0x00000010, "att_def32_sub_only", "Subdirectory"),
1298         bf_boolean32(0x00000020, "att_def32_archive", "Archive"),
1299         bf_boolean32(0x00000080, "att_def32_shareable", "Shareable"),
1300         bf_boolean32(0x00001000, "att_def32_transaction", "Transactional"),
1301         bf_boolean32(0x00004000, "att_def32_read_audit", "Read Audit"),
1302         bf_boolean32(0x00008000, "att_def32_write_audit", "Write Audit"),
1303         bf_boolean32(0x00010000, "att_def_purge", "Purge"),
1304         bf_boolean32(0x00020000, "att_def_reninhibit", "Rename Inhibit"),
1305         bf_boolean32(0x00040000, "att_def_delinhibit", "Delete Inhibit"),
1306         bf_boolean32(0x00080000, "att_def_cpyinhibit", "Copy Inhibit"),
1307         bf_boolean32(0x02000000, "att_def_im_comp", "Immediate Compress"),
1308         bf_boolean32(0x04000000, "att_def_comp", "Compressed"),
1309 ])
1310 AttributeValidFlag              = uint32("attribute_valid_flag", "Attribute Valid Flag")
1311 AuditFileVersionDate            = uint16("audit_file_ver_date", "Audit File Version Date")
1312 AuditFileVersionDate.NWDate()
1313 AuditFlag                       = val_string8("audit_flag", "Audit Flag", [
1314         [ 0x00, "Do NOT audit object" ],
1315         [ 0x01, "Audit object" ],
1316 ])
1317 AuditHandle                     = uint32("audit_handle", "Audit File Handle")
1318 AuditHandle.Display("BASE_HEX")
1319 AuditID                         = uint32("audit_id", "Audit ID", BE)
1320 AuditID.Display("BASE_HEX")
1321 AuditIDType                     = val_string16("audit_id_type", "Audit ID Type", [
1322         [ 0x0000, "Volume" ],
1323         [ 0x0001, "Container" ],
1324 ])
1325 AuditVersionDate                = uint16("audit_ver_date", "Auditing Version Date")
1326 AuditVersionDate.NWDate()
1327 AvailableBlocks                 = uint32("available_blocks", "Available Blocks")
1328 AvailableClusters               = uint16("available_clusters", "Available Clusters")
1329 AvailableDirectorySlots         = uint16("available_directory_slots", "Available Directory Slots")
1330 AvailableDirEntries             = uint32("available_dir_entries", "Available Directory Entries")
1331 AvailableIndexedFiles           = uint16("available_indexed_files", "Available Indexed Files")
1332
1333 BackgroundAgedWrites            = uint32("background_aged_writes", "Background Aged Writes")
1334 BackgroundDirtyWrites           = uint32("background_dirty_writes", "Background Dirty Writes")
1335 BadLogicalConnectionCount       = uint16("bad_logical_connection_count", "Bad Logical Connection Count")
1336 BannerName                      = fw_string("banner_name", "Banner Name", 14)
1337 BaseDirectoryID                 = uint32("base_directory_id", "Base Directory ID", BE)
1338 BaseDirectoryID.Display("BASE_HEX")
1339 binderyContext                  = nstring8("bindery_context", "Bindery Context")
1340 BitMap                          = bytes("bit_map", "Bit Map", 512)
1341 BlockNumber                     = uint32("block_number", "Block Number")
1342 BlockSize                       = uint16("block_size", "Block Size")
1343 BlockSizeInSectors              = uint32("block_size_in_sectors", "Block Size in Sectors")
1344 BoardInstalled                  = uint8("board_installed", "Board Installed")
1345 BoardNumber                     = uint32("board_number", "Board Number")
1346 BoardNumbers                    = uint32("board_numbers", "Board Numbers")
1347 BufferSize                      = uint16("buffer_size", "Buffer Size")
1348 BusString                       = stringz("bus_string", "Bus String")
1349 BusType                         = val_string8("bus_type", "Bus Type", [
1350         [0x00, "ISA"],
1351         [0x01, "Micro Channel" ],
1352         [0x02, "EISA"],
1353         [0x04, "PCI"],
1354         [0x08, "PCMCIA"],
1355         [0x10, "ISA"],
1356         [0x14, "ISA"],
1357 ])
1358 BytesActuallyTransferred        = uint32("bytes_actually_transferred", "Bytes Actually Transferred")
1359 BytesRead                       = fw_string("bytes_read", "Bytes Read", 6)
1360 BytesToCopy                     = uint32("bytes_to_copy", "Bytes to Copy")
1361 BytesWritten                    = fw_string("bytes_written", "Bytes Written", 6)
1362
1363 CacheAllocations                = uint32("cache_allocations", "Cache Allocations")
1364 CacheBlockScrapped              = uint16("cache_block_scrapped", "Cache Block Scrapped")
1365 CacheBufferCount                = uint16("cache_buffer_count", "Cache Buffer Count")
1366 CacheBufferSize                 = uint16("cache_buffer_size", "Cache Buffer Size")
1367 CacheFullWriteRequests          = uint32("cache_full_write_requests", "Cache Full Write Requests")
1368 CacheGetRequests                = uint32("cache_get_requests", "Cache Get Requests")
1369 CacheHitOnUnavailableBlock      = uint16("cache_hit_on_unavailable_block", "Cache Hit On Unavailable Block")
1370 CacheHits                       = uint32("cache_hits", "Cache Hits")
1371 CacheMisses                     = uint32("cache_misses", "Cache Misses")
1372 CachePartialWriteRequests       = uint32("cache_partial_write_requests", "Cache Partial Write Requests")
1373 CacheReadRequests               = uint32("cache_read_requests", "Cache Read Requests")
1374 CacheWriteRequests              = uint32("cache_write_requests", "Cache Write Requests")
1375 CategoryName                    = stringz("category_name", "Category Name")
1376 CCFileHandle                    = uint32("cc_file_handle", "File Handle")
1377 CCFileHandle.Display("BASE_HEX")
1378 CCFunction                      = val_string8("cc_function", "OP-Lock Flag", [
1379         [ 0x01, "Clear OP-Lock" ],
1380         [ 0x02, "Acknowledge Callback" ],
1381         [ 0x03, "Decline Callback" ],
1382     [ 0x04, "Level 2" ],
1383 ])
1384 ChangeBits                      = bitfield16("change_bits", "Change Bits", [
1385         bf_boolean16(0x0001, "change_bits_modify", "Modify Name"),
1386         bf_boolean16(0x0002, "change_bits_fatt", "File Attributes"),
1387         bf_boolean16(0x0004, "change_bits_cdate", "Creation Date"),
1388         bf_boolean16(0x0008, "change_bits_ctime", "Creation Time"),
1389         bf_boolean16(0x0010, "change_bits_owner", "Owner ID"),
1390         bf_boolean16(0x0020, "change_bits_adate", "Archive Date"),
1391         bf_boolean16(0x0040, "change_bits_atime", "Archive Time"),
1392         bf_boolean16(0x0080, "change_bits_aid", "Archiver ID"),
1393         bf_boolean16(0x0100, "change_bits_udate", "Update Date"),
1394         bf_boolean16(0x0200, "change_bits_utime", "Update Time"),
1395         bf_boolean16(0x0400, "change_bits_uid", "Update ID"),
1396         bf_boolean16(0x0800, "change_bits_acc_date", "Access Date"),
1397         bf_boolean16(0x1000, "change_bits_max_acc_mask", "Maximum Access Mask"),
1398         bf_boolean16(0x2000, "change_bits_max_space", "Maximum Space"),
1399 ])
1400 ChannelState                    = val_string8("channel_state", "Channel State", [
1401         [ 0x00, "Channel is running" ],
1402         [ 0x01, "Channel is stopping" ],
1403         [ 0x02, "Channel is stopped" ],
1404         [ 0x03, "Channel is not functional" ],
1405 ])
1406 ChannelSynchronizationState     = val_string8("channel_synchronization_state", "Channel Synchronization State", [
1407         [ 0x00, "Channel is not being used" ],
1408         [ 0x02, "NetWare is using the channel; no one else wants it" ],
1409         [ 0x04, "NetWare is using the channel; someone else wants it" ],
1410         [ 0x06, "Someone else is using the channel; NetWare does not need it" ],
1411         [ 0x08, "Someone else is using the channel; NetWare needs it" ],
1412         [ 0x0A, "Someone else has released the channel; NetWare should use it" ],
1413 ])
1414 ChargeAmount                    = uint32("charge_amount", "Charge Amount")
1415 ChargeInformation               = uint32("charge_information", "Charge Information")
1416 ClientCompFlag                  = val_string16("client_comp_flag", "Completion Flag", [
1417         [ 0x0000, "Successful" ],
1418         [ 0x0001, "Illegal Station Number" ],
1419         [ 0x0002, "Client Not Logged In" ],
1420         [ 0x0003, "Client Not Accepting Messages" ],
1421         [ 0x0004, "Client Already has a Message" ],
1422         [ 0x0096, "No Alloc Space for the Message" ],
1423         [ 0x00fd, "Bad Station Number" ],
1424         [ 0x00ff, "Failure" ],
1425 ])      
1426 ClientIDNumber                  = uint32("client_id_number", "Client ID Number", BE)
1427 ClientIDNumber.Display("BASE_HEX")
1428 ClientList                      = uint32("client_list", "Client List")
1429 ClientListCount                 = uint16("client_list_cnt", "Client List Count")
1430 ClientListLen                   = uint8("client_list_len", "Client List Length")
1431 ClientName                      = nstring8("client_name", "Client Name")
1432 ClientRecordArea                = fw_string("client_record_area", "Client Record Area", 152)
1433 ClientStation                   = uint8("client_station", "Client Station")
1434 ClientStationLong               = uint32("client_station_long", "Client Station")
1435 ClientTaskNumber                = uint8("client_task_number", "Client Task Number")
1436 ClientTaskNumberLong            = uint32("client_task_number_long", "Client Task Number")
1437 ClusterCount                    = uint16("cluster_count", "Cluster Count")
1438 ClustersUsedByDirectories       = uint32("clusters_used_by_directories", "Clusters Used by Directories")
1439 ClustersUsedByExtendedDirectories = uint32("clusters_used_by_extended_dirs", "Clusters Used by Extended Directories")
1440 ClustersUsedByFAT               = uint32("clusters_used_by_fat", "Clusters Used by FAT")
1441 ComCnts                         = uint16("com_cnts", "Communication Counters")
1442 Comment                         = nstring8("comment", "Comment")
1443 CommentType                     = uint16("comment_type", "Comment Type")
1444 CompletionCode                  = uint32("ncompletion_code", "Completion Code")
1445 CompressedDataStreamsCount      = uint32("compressed_data_streams_count", "Compressed Data Streams Count")
1446 CompressedLimboDataStreamsCount = uint32("compressed_limbo_data_streams_count", "Compressed Limbo Data Streams Count")
1447 CompressedSectors               = uint32("compressed_sectors", "Compressed Sectors")
1448 compressionStage                = uint32("compression_stage", "Compression Stage")
1449 compressVolume                  = uint32("compress_volume", "Volume Compression")
1450 ConfigMajorVN                   = uint8("config_major_vn", "Configuration Major Version Number")
1451 ConfigMinorVN                   = uint8("config_minor_vn", "Configuration Minor Version Number")
1452 ConfigurationDescription        = fw_string("configuration_description", "Configuration Description", 80)
1453 ConfigurationText               = fw_string("configuration_text", "Configuration Text", 160)
1454 ConfiguredMaxBinderyObjects     = uint16("configured_max_bindery_objects", "Configured Max Bindery Objects")
1455 ConfiguredMaxOpenFiles          = uint16("configured_max_open_files", "Configured Max Open Files")
1456 ConfiguredMaxRoutingBuffers     = uint16("configured_max_routing_buffers", "Configured Max Routing Buffers")
1457 ConfiguredMaxSimultaneousTransactions = uint16("cfg_max_simultaneous_transactions", "Configured Max Simultaneous Transactions")
1458 ConnectedLAN                    = uint32("connected_lan", "LAN Adapter")
1459 ConnectionControlBits           = bitfield8("conn_ctrl_bits", "Connection Control", [
1460         bf_boolean8(0x01, "enable_brdcasts", "Enable Broadcasts"),
1461         bf_boolean8(0x02, "enable_personal_brdcasts", "Enable Personal Broadcasts"),
1462         bf_boolean8(0x04, "enable_wdog_messages", "Enable Watchdog Message"),
1463         bf_boolean8(0x10, "disable_brdcasts", "Disable Broadcasts"),
1464         bf_boolean8(0x20, "disable_personal_brdcasts", "Disable Personal Broadcasts"),
1465         bf_boolean8(0x40, "disable_wdog_messages", "Disable Watchdog Message"),
1466 ])
1467 ConnectionListCount             = uint32("conn_list_count", "Connection List Count")
1468 ConnectionList                  = uint32("connection_list", "Connection List")
1469 ConnectionNumber                = uint32("connection_number", "Connection Number", BE)
1470 ConnectionNumberList            = nstring8("connection_number_list", "Connection Number List")
1471 ConnectionNumberWord            = uint16("conn_number_word", "Connection Number")
1472 ConnectionNumberByte            = uint8("conn_number_byte", "Connection Number")
1473 ConnectionServiceType           = val_string8("connection_service_type","Connection Service Type",[
1474         [ 0x01, "CLIB backward Compatibility" ],
1475         [ 0x02, "NCP Connection" ],
1476         [ 0x03, "NLM Connection" ],
1477         [ 0x04, "AFP Connection" ],
1478         [ 0x05, "FTAM Connection" ],
1479         [ 0x06, "ANCP Connection" ],
1480         [ 0x07, "ACP Connection" ],
1481         [ 0x08, "SMB Connection" ],
1482         [ 0x09, "Winsock Connection" ],
1483 ])
1484 ConnectionsInUse                = uint16("connections_in_use", "Connections In Use")
1485 ConnectionsMaxUsed              = uint16("connections_max_used", "Connections Max Used")
1486 ConnectionsSupportedMax         = uint16("connections_supported_max", "Connections Supported Max")
1487 ConnectionType                  = val_string8("connection_type", "Connection Type", [
1488         [ 0x00, "Not in use" ],
1489         [ 0x02, "NCP" ],
1490         [ 0x11, "UDP (for IP)" ],
1491 ])
1492 ConnListLen                     = uint8("conn_list_len", "Connection List Length")
1493 Copyright                       = nstring8("copyright", "Copyright")
1494 connList                        = uint32("conn_list", "Connection List")
1495 ControlFlags                    = val_string8("control_flags", "Control Flags", [
1496         [ 0x00, "Forced Record Locking is Off" ],
1497         [ 0x01, "Forced Record Locking is On" ],
1498 ])
1499 ControllerDriveNumber           = uint8("controller_drive_number", "Controller Drive Number")
1500 ControllerNumber                = uint8("controller_number", "Controller Number")
1501 ControllerType                  = uint8("controller_type", "Controller Type")
1502 Cookie1                         = uint32("cookie_1", "Cookie 1")
1503 Cookie2                         = uint32("cookie_2", "Cookie 2")
1504 Copies                          = uint8( "copies", "Copies" )
1505 CoprocessorFlag                 = uint32("co_processor_flag", "CoProcessor Present Flag")
1506 CoProcessorString               = stringz("co_proc_string", "CoProcessor String")
1507 CounterMask                     = val_string8("counter_mask", "Counter Mask", [
1508         [ 0x00, "Counter is Valid" ],
1509         [ 0x01, "Counter is not Valid" ],
1510 ])        
1511 CPUNumber                       = uint32("cpu_number", "CPU Number")
1512 CPUString                       = stringz("cpu_string", "CPU String")
1513 CPUType                         = val_string8("cpu_type", "CPU Type", [
1514         [ 0x00, "80386" ],
1515         [ 0x01, "80486" ],
1516         [ 0x02, "Pentium" ],
1517         [ 0x03, "Pentium Pro" ],
1518 ])    
1519 CreationDate                    = uint16("creation_date", "Creation Date")
1520 CreationDate.NWDate()
1521 CreationTime                    = uint16("creation_time", "Creation Time")
1522 CreationTime.NWTime()
1523 CreatorID                       = uint32("creator_id", "Creator ID", BE)
1524 CreatorID.Display("BASE_HEX")
1525 CreatorNameSpaceNumber          = val_string8("creator_name_space_number", "Creator Name Space Number", [
1526         [ 0x00, "DOS Name Space" ],
1527         [ 0x01, "MAC Name Space" ],
1528         [ 0x02, "NFS Name Space" ],
1529         [ 0x04, "Long Name Space" ],
1530 ])
1531 CreditLimit                     = uint32("credit_limit", "Credit Limit")
1532 CtrlFlags                       = val_string16("ctrl_flags", "Control Flags", [
1533         [ 0x0000, "Do Not Return File Name" ],
1534         [ 0x0001, "Return File Name" ],
1535 ])      
1536 curCompBlks                     = uint32("cur_comp_blks", "Current Compression Blocks")
1537 curInitialBlks                  = uint32("cur_initial_blks", "Current Initial Blocks")
1538 curIntermediateBlks             = uint32("cur_inter_blks", "Current Intermediate Blocks")
1539 CurNumOfRTags                   = uint32("cur_num_of_r_tags", "Current Number of Resource Tags")
1540 CurrentBlockBeingDecompressed   = uint32("cur_blk_being_dcompress", "Current Block Being Decompressed")
1541 CurrentChangedFATs              = uint16("current_changed_fats", "Current Changed FAT Entries")
1542 CurrentEntries                  = uint32("current_entries", "Current Entries")
1543 CurrentFormType                 = uint8( "current_form_type", "Current Form Type" )
1544 CurrentLFSCounters              = uint32("current_lfs_counters", "Current LFS Counters")
1545 CurrentlyUsedRoutingBuffers     = uint16("currently_used_routing_buffers", "Currently Used Routing Buffers")
1546 CurrentOpenFiles                = uint16("current_open_files", "Current Open Files")
1547 CurrentReferenceID              = uint16("curr_ref_id", "Current Reference ID")
1548 CurrentServers                  = uint32("current_servers", "Current Servers")
1549 CurrentServerTime               = uint32("current_server_time", "Time Elapsed Since Server Was Brought Up")
1550 CurrentSpace                    = uint32("current_space", "Current Space")
1551 CurrentTransactionCount         = uint32("current_trans_count", "Current Transaction Count")
1552 CurrentUsedBinderyObjects       = uint16("current_used_bindery_objects", "Current Used Bindery Objects")
1553 CurrentUsedDynamicSpace         = uint32("current_used_dynamic_space", "Current Used Dynamic Space")
1554 CustomCnts                      = uint32("custom_cnts", "Custom Counters")
1555 CustomCount                     = uint32("custom_count", "Custom Count")
1556 CustomCounters                  = uint32("custom_counters", "Custom Counters")
1557 CustomString                    = nstring8("custom_string", "Custom String")
1558 CustomVariableValue             = uint32("custom_var_value", "Custom Variable Value")
1559
1560 Data                            = nstring8("data", "Data")
1561 DataForkFirstFAT                = uint32("data_fork_first_fat", "Data Fork First FAT Entry")
1562 DataForkLen                     = uint32("data_fork_len", "Data Fork Len")
1563 DataForkSize                    = uint32("data_fork_size", "Data Fork Size")
1564 DataSize                        = uint32("data_size", "Data Size")
1565 DataStream                      = val_string8("data_stream", "Data Stream", [
1566         [ 0x00, "Resource Fork or DOS" ],
1567         [ 0x01, "Data Fork" ],
1568 ])
1569 DataStreamName                  = nstring8("data_stream_name", "Data Stream Name")
1570 DataStreamNumber                = uint8("data_stream_number", "Data Stream Number")
1571 DataStreamsCount                = uint32("data_streams_count", "Data Streams Count")
1572 DataStreamSize                  = uint32("data_stream_size", "Size")
1573 DataStreamSpaceAlloc            = uint32( "data_stream_space_alloc", "Space Allocated for Data Stream" )
1574 Day                             = uint8("s_day", "Day")
1575 DayOfWeek                       = val_string8("s_day_of_week", "Day of Week", [
1576         [ 0x00, "Sunday" ],
1577         [ 0x01, "Monday" ],
1578         [ 0x02, "Tuesday" ],
1579         [ 0x03, "Wednesday" ],
1580         [ 0x04, "Thursday" ],
1581         [ 0x05, "Friday" ],
1582         [ 0x06, "Saturday" ],
1583 ])
1584 DeadMirrorTable                 = bytes("dead_mirror_table", "Dead Mirror Table", 32)
1585 DefinedDataStreams              = uint8("defined_data_streams", "Defined Data Streams")
1586 DefinedNameSpaces               = uint8("defined_name_spaces", "Defined Name Spaces")
1587 DeletedDate                     = uint16("deleted_date", "Deleted Date")
1588 DeletedDate.NWDate()
1589 DeletedFileTime                 = uint32( "deleted_file_time", "Deleted File Time")
1590 DeletedFileTime.Display("BASE_HEX")
1591 DeletedTime                     = uint16("deleted_time", "Deleted Time")
1592 DeletedTime.NWTime()
1593 DeletedID                       = uint32( "delete_id", "Deleted ID", BE)
1594 DeletedID.Display("BASE_HEX")
1595 DeleteExistingFileFlag          = val_string8("delete_existing_file_flag", "Delete Existing File Flag", [
1596         [ 0x00, "Do Not Delete Existing File" ],
1597         [ 0x01, "Delete Existing File" ],
1598 ])      
1599 DenyReadCount                   = uint16("deny_read_count", "Deny Read Count")
1600 DenyWriteCount                  = uint16("deny_write_count", "Deny Write Count")
1601 DescriptionStrings              = fw_string("description_string", "Description", 512)
1602 DesiredAccessRights             = bitfield16("desired_access_rights", "Desired Access Rights", [
1603         bf_boolean16(0x0001, "dsired_acc_rights_read_o", "Read Only"),
1604         bf_boolean16(0x0002, "dsired_acc_rights_write_o", "Write Only"),
1605         bf_boolean16(0x0004, "dsired_acc_rights_deny_r", "Deny Read"),
1606         bf_boolean16(0x0008, "dsired_acc_rights_deny_w", "Deny Write"),
1607         bf_boolean16(0x0010, "dsired_acc_rights_compat", "Compatibility"),
1608         bf_boolean16(0x0040, "dsired_acc_rights_w_thru", "File Write Through"),
1609         bf_boolean16(0x0400, "dsired_acc_rights_del_file_cls", "Delete File Close"),
1610 ])
1611 DesiredResponseCount            = uint16("desired_response_count", "Desired Response Count")
1612 DestDirHandle                   = uint8("dest_dir_handle", "Destination Directory Handle")
1613 DestNameSpace                   = val_string8("dest_name_space", "Destination Name Space", [
1614         [ 0x00, "DOS Name Space" ],
1615         [ 0x01, "MAC Name Space" ],
1616         [ 0x02, "NFS Name Space" ],
1617         [ 0x04, "Long Name Space" ],
1618 ])
1619 DestPathComponentCount          = uint8("dest_component_count", "Destination Path Component Count")
1620 DestPath                        = nstring8("dest_path", "Destination Path")
1621 DetachDuringProcessing          = uint16("detach_during_processing", "Detach During Processing")
1622 DetachForBadConnectionNumber    = uint16("detach_for_bad_connection_number", "Detach For Bad Connection Number")
1623 DirHandle                       = uint8("dir_handle", "Directory Handle")
1624 DirHandleName                   = uint8("dir_handle_name", "Handle Name")
1625 DirHandleLong                   = uint32("dir_handle_long", "Directory Handle")
1626 DirectoryAccessRights           = uint8("directory_access_rights", "Directory Access Rights")
1627 #
1628 # XXX - what do the bits mean here?
1629 #
1630 DirectoryAttributes             = uint8("directory_attributes", "Directory Attributes")
1631 DirectoryBase                   = uint32("dir_base", "Directory Base")
1632 DirectoryBase.Display("BASE_HEX")
1633 DirectoryCount                  = uint16("dir_count", "Directory Count")
1634 DirectoryEntryNumber            = uint32("directory_entry_number", "Directory Entry Number")
1635 DirectoryEntryNumber.Display('BASE_HEX')
1636 DirectoryEntryNumberWord        = uint16("directory_entry_number_word", "Directory Entry Number")
1637 DirectoryID                     = uint16("directory_id", "Directory ID", BE)
1638 DirectoryID.Display("BASE_HEX")
1639 DirectoryName                   = fw_string("directory_name", "Directory Name",12)
1640 DirectoryName14                 = fw_string("directory_name_14", "Directory Name", 14)
1641 DirectoryNameLen                = uint8("directory_name_len", "Directory Name Length")
1642 DirectoryNumber                 = uint32("directory_number", "Directory Number")
1643 DirectoryNumber.Display("BASE_HEX")
1644 DirectoryPath                   = fw_string("directory_path", "Directory Path", 16)
1645 DirectoryServicesObjectID       = uint32("directory_services_object_id", "Directory Services Object ID")
1646 DirectoryServicesObjectID.Display("BASE_HEX")
1647 DirectoryStamp                  = uint16("directory_stamp", "Directory Stamp (0xD1D1)")
1648 DirtyCacheBuffers               = uint16("dirty_cache_buffers", "Dirty Cache Buffers")
1649 DiskChannelNumber               = uint8("disk_channel_number", "Disk Channel Number")
1650 DiskChannelTable                = val_string8("disk_channel_table", "Disk Channel Table", [
1651         [ 0x01, "XT" ],
1652         [ 0x02, "AT" ],
1653         [ 0x03, "SCSI" ],
1654         [ 0x04, "Disk Coprocessor" ],
1655 ])
1656 DiskSpaceLimit                  = uint32("disk_space_limit", "Disk Space Limit")
1657 DMAChannelsUsed                 = uint32("dma_channels_used", "DMA Channels Used")
1658 DMInfoEntries                   = uint32("dm_info_entries", "DM Info Entries")
1659 DMInfoLevel                     = val_string8("dm_info_level", "DM Info Level", [
1660         [ 0x00, "Return Detailed DM Support Module Information" ],
1661         [ 0x01, "Return Number of DM Support Modules" ],
1662         [ 0x02, "Return DM Support Modules Names" ],
1663 ])      
1664 DMFlags                         = val_string8("dm_flags", "DM Flags", [
1665         [ 0x00, "OnLine Media" ],
1666         [ 0x01, "OffLine Media" ],
1667 ])
1668 DMmajorVersion                  = uint32("dm_major_version", "DM Major Version")
1669 DMminorVersion                  = uint32("dm_minor_version", "DM Minor Version")
1670 DMPresentFlag                   = val_string8("dm_present_flag", "Data Migration Present Flag", [
1671         [ 0x00, "Data Migration NLM is not loaded" ],
1672         [ 0x01, "Data Migration NLM has been loaded and is running" ],
1673 ])      
1674 DOSDirectoryBase                = uint32("dos_directory_base", "DOS Directory Base")
1675 DOSDirectoryBase.Display("BASE_HEX")
1676 DOSDirectoryEntry               = uint32("dos_directory_entry", "DOS Directory Entry")
1677 DOSDirectoryEntry.Display("BASE_HEX")
1678 DOSDirectoryEntryNumber         = uint32("dos_directory_entry_number", "DOS Directory Entry Number")
1679 DOSDirectoryEntryNumber.Display('BASE_HEX')
1680 DOSFileAttributes               = uint8("dos_file_attributes", "DOS File Attributes")
1681 DOSParentDirectoryEntry         = uint32("dos_parent_directory_entry", "DOS Parent Directory Entry")
1682 DOSParentDirectoryEntry.Display('BASE_HEX')
1683 DOSSequence                     = uint32("dos_sequence", "DOS Sequence")
1684 DriveCylinders                  = uint16("drive_cylinders", "Drive Cylinders")
1685 DriveDefinitionString           = fw_string("drive_definition_string", "Drive Definition", 64)
1686 DriveHeads                      = uint8("drive_heads", "Drive Heads")
1687 DriveMappingTable               = bytes("drive_mapping_table", "Drive Mapping Table", 32)
1688 DriveMirrorTable                = bytes("drive_mirror_table", "Drive Mirror Table", 32)
1689 DriverBoardName                 = stringz("driver_board_name", "Driver Board Name")
1690 DriveRemovableFlag              = val_string8("drive_removable_flag", "Drive Removable Flag", [
1691         [ 0x00, "Nonremovable" ],
1692         [ 0xff, "Removable" ],
1693 ])
1694 DriverLogicalName               = stringz("driver_log_name", "Driver Logical Name")
1695 DriverShortName                 = stringz("driver_short_name", "Driver Short Name")
1696 DriveSize                       = uint32("drive_size", "Drive Size")
1697 DstEAFlags                      = val_string16("dst_ea_flags", "Destination EA Flags", [
1698         [ 0x0000, "Return EAHandle,Information Level 0" ],
1699         [ 0x0001, "Return NetWareHandle,Information Level 0" ],
1700         [ 0x0002, "Return Volume/Directory Number,Information Level 0" ],
1701         [ 0x0004, "Return EAHandle,Close Handle on Error,Information Level 0" ],
1702         [ 0x0005, "Return NetWareHandle,Close Handle on Error,Information Level 0" ],
1703         [ 0x0006, "Return Volume/Directory Number,Close Handle on Error,Information Level 0" ],
1704         [ 0x0010, "Return EAHandle,Information Level 1" ],
1705         [ 0x0011, "Return NetWareHandle,Information Level 1" ],
1706         [ 0x0012, "Return Volume/Directory Number,Information Level 1" ],
1707         [ 0x0014, "Return EAHandle,Close Handle on Error,Information Level 1" ],
1708         [ 0x0015, "Return NetWareHandle,Close Handle on Error,Information Level 1" ],
1709         [ 0x0016, "Return Volume/Directory Number,Close Handle on Error,Information Level 1" ],
1710         [ 0x0020, "Return EAHandle,Information Level 2" ],
1711         [ 0x0021, "Return NetWareHandle,Information Level 2" ],
1712         [ 0x0022, "Return Volume/Directory Number,Information Level 2" ],
1713         [ 0x0024, "Return EAHandle,Close Handle on Error,Information Level 2" ],
1714         [ 0x0025, "Return NetWareHandle,Close Handle on Error,Information Level 2" ],
1715         [ 0x0026, "Return Volume/Directory Number,Close Handle on Error,Information Level 2" ],
1716         [ 0x0030, "Return EAHandle,Information Level 3" ],
1717         [ 0x0031, "Return NetWareHandle,Information Level 3" ],
1718         [ 0x0032, "Return Volume/Directory Number,Information Level 3" ],
1719         [ 0x0034, "Return EAHandle,Close Handle on Error,Information Level 3" ],
1720         [ 0x0035, "Return NetWareHandle,Close Handle on Error,Information Level 3" ],
1721         [ 0x0036, "Return Volume/Directory Number,Close Handle on Error,Information Level 3" ],
1722         [ 0x0040, "Return EAHandle,Information Level 4" ],
1723         [ 0x0041, "Return NetWareHandle,Information Level 4" ],
1724         [ 0x0042, "Return Volume/Directory Number,Information Level 4" ],
1725         [ 0x0044, "Return EAHandle,Close Handle on Error,Information Level 4" ],
1726         [ 0x0045, "Return NetWareHandle,Close Handle on Error,Information Level 4" ],
1727         [ 0x0046, "Return Volume/Directory Number,Close Handle on Error,Information Level 4" ],
1728         [ 0x0050, "Return EAHandle,Information Level 5" ],
1729         [ 0x0051, "Return NetWareHandle,Information Level 5" ],
1730         [ 0x0052, "Return Volume/Directory Number,Information Level 5" ],
1731         [ 0x0054, "Return EAHandle,Close Handle on Error,Information Level 5" ],
1732         [ 0x0055, "Return NetWareHandle,Close Handle on Error,Information Level 5" ],
1733         [ 0x0056, "Return Volume/Directory Number,Close Handle on Error,Information Level 5" ],
1734         [ 0x0060, "Return EAHandle,Information Level 6" ],
1735         [ 0x0061, "Return NetWareHandle,Information Level 6" ],
1736         [ 0x0062, "Return Volume/Directory Number,Information Level 6" ],
1737         [ 0x0064, "Return EAHandle,Close Handle on Error,Information Level 6" ],
1738         [ 0x0065, "Return NetWareHandle,Close Handle on Error,Information Level 6" ],
1739         [ 0x0066, "Return Volume/Directory Number,Close Handle on Error,Information Level 6" ],
1740         [ 0x0070, "Return EAHandle,Information Level 7" ],
1741         [ 0x0071, "Return NetWareHandle,Information Level 7" ],
1742         [ 0x0072, "Return Volume/Directory Number,Information Level 7" ],
1743         [ 0x0074, "Return EAHandle,Close Handle on Error,Information Level 7" ],
1744         [ 0x0075, "Return NetWareHandle,Close Handle on Error,Information Level 7" ],
1745         [ 0x0076, "Return Volume/Directory Number,Close Handle on Error,Information Level 7" ],
1746         [ 0x0080, "Return EAHandle,Information Level 0,Immediate Close Handle" ],
1747         [ 0x0081, "Return NetWareHandle,Information Level 0,Immediate Close Handle" ],
1748         [ 0x0082, "Return Volume/Directory Number,Information Level 0,Immediate Close Handle" ],
1749         [ 0x0084, "Return EAHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1750         [ 0x0085, "Return NetWareHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1751         [ 0x0086, "Return Volume/Directory Number,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1752         [ 0x0090, "Return EAHandle,Information Level 1,Immediate Close Handle" ],
1753         [ 0x0091, "Return NetWareHandle,Information Level 1,Immediate Close Handle" ],
1754         [ 0x0092, "Return Volume/Directory Number,Information Level 1,Immediate Close Handle" ],
1755         [ 0x0094, "Return EAHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1756         [ 0x0095, "Return NetWareHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1757         [ 0x0096, "Return Volume/Directory Number,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1758         [ 0x00a0, "Return EAHandle,Information Level 2,Immediate Close Handle" ],
1759         [ 0x00a1, "Return NetWareHandle,Information Level 2,Immediate Close Handle" ],
1760         [ 0x00a2, "Return Volume/Directory Number,Information Level 2,Immediate Close Handle" ],
1761         [ 0x00a4, "Return EAHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1762         [ 0x00a5, "Return NetWareHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1763         [ 0x00a6, "Return Volume/Directory Number,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1764         [ 0x00b0, "Return EAHandle,Information Level 3,Immediate Close Handle" ],
1765         [ 0x00b1, "Return NetWareHandle,Information Level 3,Immediate Close Handle" ],
1766         [ 0x00b2, "Return Volume/Directory Number,Information Level 3,Immediate Close Handle" ],
1767         [ 0x00b4, "Return EAHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1768         [ 0x00b5, "Return NetWareHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1769         [ 0x00b6, "Return Volume/Directory Number,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1770         [ 0x00c0, "Return EAHandle,Information Level 4,Immediate Close Handle" ],
1771         [ 0x00c1, "Return NetWareHandle,Information Level 4,Immediate Close Handle" ],
1772         [ 0x00c2, "Return Volume/Directory Number,Information Level 4,Immediate Close Handle" ],
1773         [ 0x00c4, "Return EAHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1774         [ 0x00c5, "Return NetWareHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1775         [ 0x00c6, "Return Volume/Directory Number,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1776         [ 0x00d0, "Return EAHandle,Information Level 5,Immediate Close Handle" ],
1777         [ 0x00d1, "Return NetWareHandle,Information Level 5,Immediate Close Handle" ],
1778         [ 0x00d2, "Return Volume/Directory Number,Information Level 5,Immediate Close Handle" ],
1779         [ 0x00d4, "Return EAHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1780         [ 0x00d5, "Return NetWareHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1781         [ 0x00d6, "Return Volume/Directory Number,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1782         [ 0x00e0, "Return EAHandle,Information Level 6,Immediate Close Handle" ],
1783         [ 0x00e1, "Return NetWareHandle,Information Level 6,Immediate Close Handle" ],
1784         [ 0x00e2, "Return Volume/Directory Number,Information Level 6,Immediate Close Handle" ],
1785         [ 0x00e4, "Return EAHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1786         [ 0x00e5, "Return NetWareHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1787         [ 0x00e6, "Return Volume/Directory Number,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1788         [ 0x00f0, "Return EAHandle,Information Level 7,Immediate Close Handle" ],
1789         [ 0x00f1, "Return NetWareHandle,Information Level 7,Immediate Close Handle" ],
1790         [ 0x00f2, "Return Volume/Directory Number,Information Level 7,Immediate Close Handle" ],
1791         [ 0x00f4, "Return EAHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1792         [ 0x00f5, "Return NetWareHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1793         [ 0x00f6, "Return Volume/Directory Number,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1794 ])
1795 dstNSIndicator                  = val_string16("dst_ns_indicator", "Destination Name Space Indicator", [
1796         [ 0x0000, "Return Source Name Space Information" ],
1797         [ 0x0001, "Return Destination Name Space Information" ],
1798 ])      
1799 DstQueueID                      = uint32("dst_queue_id", "Destination Queue ID")
1800 DuplicateRepliesSent            = uint16("duplicate_replies_sent", "Duplicate Replies Sent")
1801
1802 EAAccessFlag                    = bitfield16("ea_access_flag", "EA Access Flag", [
1803         bf_boolean16(0x0001, "ea_permanent_memory", "Permanent Memory"),
1804         bf_boolean16(0x0002, "ea_deep_freeze", "Deep Freeze"),
1805         bf_boolean16(0x0004, "ea_in_progress", "In Progress"),
1806         bf_boolean16(0x0008, "ea_header_being_enlarged", "Header Being Enlarged"),
1807         bf_boolean16(0x0010, "ea_new_tally_used", "New Tally Used"),
1808         bf_boolean16(0x0020, "ea_tally_need_update", "Tally Need Update"),
1809         bf_boolean16(0x0040, "ea_score_card_present", "Score Card Present"),
1810         bf_boolean16(0x0080, "ea_need_bit_flag", "EA Need Bit Flag"),
1811         bf_boolean16(0x0100, "ea_write_privileges", "Write Privileges"),
1812         bf_boolean16(0x0200, "ea_read_privileges", "Read Privileges"),
1813         bf_boolean16(0x0400, "ea_delete_privileges", "Delete Privileges"),
1814         bf_boolean16(0x0800, "ea_system_ea_only", "System EA Only"),
1815         bf_boolean16(0x1000, "ea_write_in_progress", "Write In Progress"),
1816 ])
1817 EABytesWritten                  = uint32("ea_bytes_written", "Bytes Written")
1818 EACount                         = uint32("ea_count", "Count")
1819 EADataSize                      = uint32("ea_data_size", "Data Size")
1820 EADataSizeDuplicated            = uint32("ea_data_size_duplicated", "Data Size Duplicated")
1821 EADuplicateCount                = uint32("ea_duplicate_count", "Duplicate Count")
1822 EAErrorCodes                    = val_string16("ea_error_codes", "EA Error Codes", [
1823         [ 0x0000, "SUCCESSFUL" ],
1824         [ 0x00c8, "ERR_MISSING_EA_KEY" ],
1825         [ 0x00c9, "ERR_EA_NOT_FOUND" ],
1826         [ 0x00ca, "ERR_INVALID_EA_HANDLE_TYPE" ],
1827         [ 0x00cb, "ERR_EA_NO_KEY_NO_DATA" ],
1828         [ 0x00cc, "ERR_EA_NUMBER_MISMATCH" ],
1829         [ 0x00cd, "ERR_EXTENT_NUMBER_OUT_OF_RANGE" ],
1830         [ 0x00ce, "ERR_EA_BAD_DIR_NUM" ],
1831         [ 0x00cf, "ERR_INVALID_EA_HANDLE" ],
1832         [ 0x00d0, "ERR_EA_POSITION_OUT_OF_RANGE" ],
1833         [ 0x00d1, "ERR_EA_ACCESS_DENIED" ],
1834         [ 0x00d2, "ERR_DATA_PAGE_ODD_SIZE" ],
1835         [ 0x00d3, "ERR_EA_VOLUME_NOT_MOUNTED" ],
1836         [ 0x00d4, "ERR_BAD_PAGE_BOUNDARY" ],
1837         [ 0x00d5, "ERR_INSPECT_FAILURE" ],
1838         [ 0x00d6, "ERR_EA_ALREADY_CLAIMED" ],
1839         [ 0x00d7, "ERR_ODD_BUFFER_SIZE" ],
1840         [ 0x00d8, "ERR_NO_SCORECARDS" ],
1841         [ 0x00d9, "ERR_BAD_EDS_SIGNATURE" ],
1842         [ 0x00da, "ERR_EA_SPACE_LIMIT" ],
1843         [ 0x00db, "ERR_EA_KEY_CORRUPT" ],
1844         [ 0x00dc, "ERR_EA_KEY_LIMIT" ],
1845         [ 0x00dd, "ERR_TALLY_CORRUPT" ],
1846 ])
1847 EAFlags                         = val_string16("ea_flags", "EA Flags", [
1848         [ 0x0000, "Return EAHandle,Information Level 0" ],
1849         [ 0x0001, "Return NetWareHandle,Information Level 0" ],
1850         [ 0x0002, "Return Volume/Directory Number,Information Level 0" ],
1851         [ 0x0004, "Return EAHandle,Close Handle on Error,Information Level 0" ],
1852         [ 0x0005, "Return NetWareHandle,Close Handle on Error,Information Level 0" ],
1853         [ 0x0006, "Return Volume/Directory Number,Close Handle on Error,Information Level 0" ],
1854         [ 0x0010, "Return EAHandle,Information Level 1" ],
1855         [ 0x0011, "Return NetWareHandle,Information Level 1" ],
1856         [ 0x0012, "Return Volume/Directory Number,Information Level 1" ],
1857         [ 0x0014, "Return EAHandle,Close Handle on Error,Information Level 1" ],
1858         [ 0x0015, "Return NetWareHandle,Close Handle on Error,Information Level 1" ],
1859         [ 0x0016, "Return Volume/Directory Number,Close Handle on Error,Information Level 1" ],
1860         [ 0x0020, "Return EAHandle,Information Level 2" ],
1861         [ 0x0021, "Return NetWareHandle,Information Level 2" ],
1862         [ 0x0022, "Return Volume/Directory Number,Information Level 2" ],
1863         [ 0x0024, "Return EAHandle,Close Handle on Error,Information Level 2" ],
1864         [ 0x0025, "Return NetWareHandle,Close Handle on Error,Information Level 2" ],
1865         [ 0x0026, "Return Volume/Directory Number,Close Handle on Error,Information Level 2" ],
1866         [ 0x0030, "Return EAHandle,Information Level 3" ],
1867         [ 0x0031, "Return NetWareHandle,Information Level 3" ],
1868         [ 0x0032, "Return Volume/Directory Number,Information Level 3" ],
1869         [ 0x0034, "Return EAHandle,Close Handle on Error,Information Level 3" ],
1870         [ 0x0035, "Return NetWareHandle,Close Handle on Error,Information Level 3" ],
1871         [ 0x0036, "Return Volume/Directory Number,Close Handle on Error,Information Level 3" ],
1872         [ 0x0040, "Return EAHandle,Information Level 4" ],
1873         [ 0x0041, "Return NetWareHandle,Information Level 4" ],
1874         [ 0x0042, "Return Volume/Directory Number,Information Level 4" ],
1875         [ 0x0044, "Return EAHandle,Close Handle on Error,Information Level 4" ],
1876         [ 0x0045, "Return NetWareHandle,Close Handle on Error,Information Level 4" ],
1877         [ 0x0046, "Return Volume/Directory Number,Close Handle on Error,Information Level 4" ],
1878         [ 0x0050, "Return EAHandle,Information Level 5" ],
1879         [ 0x0051, "Return NetWareHandle,Information Level 5" ],
1880         [ 0x0052, "Return Volume/Directory Number,Information Level 5" ],
1881         [ 0x0054, "Return EAHandle,Close Handle on Error,Information Level 5" ],
1882         [ 0x0055, "Return NetWareHandle,Close Handle on Error,Information Level 5" ],
1883         [ 0x0056, "Return Volume/Directory Number,Close Handle on Error,Information Level 5" ],
1884         [ 0x0060, "Return EAHandle,Information Level 6" ],
1885         [ 0x0061, "Return NetWareHandle,Information Level 6" ],
1886         [ 0x0062, "Return Volume/Directory Number,Information Level 6" ],
1887         [ 0x0064, "Return EAHandle,Close Handle on Error,Information Level 6" ],
1888         [ 0x0065, "Return NetWareHandle,Close Handle on Error,Information Level 6" ],
1889         [ 0x0066, "Return Volume/Directory Number,Close Handle on Error,Information Level 6" ],
1890         [ 0x0070, "Return EAHandle,Information Level 7" ],
1891         [ 0x0071, "Return NetWareHandle,Information Level 7" ],
1892         [ 0x0072, "Return Volume/Directory Number,Information Level 7" ],
1893         [ 0x0074, "Return EAHandle,Close Handle on Error,Information Level 7" ],
1894         [ 0x0075, "Return NetWareHandle,Close Handle on Error,Information Level 7" ],
1895         [ 0x0076, "Return Volume/Directory Number,Close Handle on Error,Information Level 7" ],
1896         [ 0x0080, "Return EAHandle,Information Level 0,Immediate Close Handle" ],
1897         [ 0x0081, "Return NetWareHandle,Information Level 0,Immediate Close Handle" ],
1898         [ 0x0082, "Return Volume/Directory Number,Information Level 0,Immediate Close Handle" ],
1899         [ 0x0084, "Return EAHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1900         [ 0x0085, "Return NetWareHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1901         [ 0x0086, "Return Volume/Directory Number,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1902         [ 0x0090, "Return EAHandle,Information Level 1,Immediate Close Handle" ],
1903         [ 0x0091, "Return NetWareHandle,Information Level 1,Immediate Close Handle" ],
1904         [ 0x0092, "Return Volume/Directory Number,Information Level 1,Immediate Close Handle" ],
1905         [ 0x0094, "Return EAHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1906         [ 0x0095, "Return NetWareHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1907         [ 0x0096, "Return Volume/Directory Number,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1908         [ 0x00a0, "Return EAHandle,Information Level 2,Immediate Close Handle" ],
1909         [ 0x00a1, "Return NetWareHandle,Information Level 2,Immediate Close Handle" ],
1910         [ 0x00a2, "Return Volume/Directory Number,Information Level 2,Immediate Close Handle" ],
1911         [ 0x00a4, "Return EAHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1912         [ 0x00a5, "Return NetWareHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1913         [ 0x00a6, "Return Volume/Directory Number,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1914         [ 0x00b0, "Return EAHandle,Information Level 3,Immediate Close Handle" ],
1915         [ 0x00b1, "Return NetWareHandle,Information Level 3,Immediate Close Handle" ],
1916         [ 0x00b2, "Return Volume/Directory Number,Information Level 3,Immediate Close Handle" ],
1917         [ 0x00b4, "Return EAHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1918         [ 0x00b5, "Return NetWareHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1919         [ 0x00b6, "Return Volume/Directory Number,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1920         [ 0x00c0, "Return EAHandle,Information Level 4,Immediate Close Handle" ],
1921         [ 0x00c1, "Return NetWareHandle,Information Level 4,Immediate Close Handle" ],
1922         [ 0x00c2, "Return Volume/Directory Number,Information Level 4,Immediate Close Handle" ],
1923         [ 0x00c4, "Return EAHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1924         [ 0x00c5, "Return NetWareHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1925         [ 0x00c6, "Return Volume/Directory Number,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1926         [ 0x00d0, "Return EAHandle,Information Level 5,Immediate Close Handle" ],
1927         [ 0x00d1, "Return NetWareHandle,Information Level 5,Immediate Close Handle" ],
1928         [ 0x00d2, "Return Volume/Directory Number,Information Level 5,Immediate Close Handle" ],
1929         [ 0x00d4, "Return EAHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1930         [ 0x00d5, "Return NetWareHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1931         [ 0x00d6, "Return Volume/Directory Number,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1932         [ 0x00e0, "Return EAHandle,Information Level 6,Immediate Close Handle" ],
1933         [ 0x00e1, "Return NetWareHandle,Information Level 6,Immediate Close Handle" ],
1934         [ 0x00e2, "Return Volume/Directory Number,Information Level 6,Immediate Close Handle" ],
1935         [ 0x00e4, "Return EAHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1936         [ 0x00e5, "Return NetWareHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1937         [ 0x00e6, "Return Volume/Directory Number,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1938         [ 0x00f0, "Return EAHandle,Information Level 7,Immediate Close Handle" ],
1939         [ 0x00f1, "Return NetWareHandle,Information Level 7,Immediate Close Handle" ],
1940         [ 0x00f2, "Return Volume/Directory Number,Information Level 7,Immediate Close Handle" ],
1941         [ 0x00f4, "Return EAHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1942         [ 0x00f5, "Return NetWareHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1943         [ 0x00f6, "Return Volume/Directory Number,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1944 ])
1945 EAHandle                        = uint32("ea_handle", "EA Handle")
1946 EAHandle.Display("BASE_HEX")
1947 EAHandleOrNetWareHandleOrVolume = uint32("ea_handle_or_netware_handle_or_volume", "EAHandle or NetWare Handle or Volume (see EAFlags)")
1948 EAHandleOrNetWareHandleOrVolume.Display("BASE_HEX")
1949 EAKey                           = nstring16("ea_key", "EA Key")
1950 EAKeySize                       = uint32("ea_key_size", "Key Size")
1951 EAKeySizeDuplicated             = uint32("ea_key_size_duplicated", "Key Size Duplicated")
1952 EAValue                         = nstring16("ea_value", "EA Value")
1953 EAValueRep                      = fw_string("ea_value_rep", "EA Value", 1)
1954 EAValueLength                   = uint16("ea_value_length", "Value Length")
1955 EchoSocket                      = uint16("echo_socket", "Echo Socket")
1956 EchoSocket.Display('BASE_HEX')
1957 EffectiveRights                 = bitfield8("effective_rights", "Effective Rights", [
1958         bf_boolean8(0x01, "effective_rights_read", "Read Rights"),
1959         bf_boolean8(0x02, "effective_rights_write", "Write Rights"),
1960         bf_boolean8(0x04, "effective_rights_open", "Open Rights"),
1961         bf_boolean8(0x08, "effective_rights_create", "Create Rights"),
1962         bf_boolean8(0x10, "effective_rights_delete", "Delete Rights"),
1963         bf_boolean8(0x20, "effective_rights_parental", "Parental Rights"),
1964         bf_boolean8(0x40, "effective_rights_search", "Search Rights"),
1965         bf_boolean8(0x80, "effective_rights_modify", "Modify Rights"),
1966 ])
1967 EnumInfoMask                    = bitfield8("enum_info_mask", "Return Information Mask", [
1968         bf_boolean8(0x01, "enum_info_transport", "Transport Information"),
1969         bf_boolean8(0x02, "enum_info_time", "Time Information"),
1970         bf_boolean8(0x04, "enum_info_name", "Name Information"),
1971         bf_boolean8(0x08, "enum_info_lock", "Lock Information"),
1972         bf_boolean8(0x10, "enum_info_print", "Print Information"),
1973         bf_boolean8(0x20, "enum_info_stats", "Statistical Information"),
1974         bf_boolean8(0x40, "enum_info_account", "Accounting Information"),
1975         bf_boolean8(0x80, "enum_info_auth", "Authentication Information"),
1976 ])
1977
1978 eventOffset                     = bytes("event_offset", "Event Offset", 8)
1979 eventOffset.Display("BASE_HEX")
1980 eventTime                       = uint32("event_time", "Event Time")
1981 eventTime.Display("BASE_HEX")
1982 ExpirationTime                  = uint32("expiration_time", "Expiration Time")
1983 ExpirationTime.Display('BASE_HEX')
1984 ExtAttrDataSize                 = uint32("ext_attr_data_size", "Extended Attributes Data Size")
1985 ExtAttrCount                    = uint32("ext_attr_count", "Extended Attributes Count")
1986 ExtAttrKeySize                  = uint32("ext_attr_key_size", "Extended Attributes Key Size")
1987 ExtendedAttributesDefined       = uint32("extended_attributes_defined", "Extended Attributes Defined")
1988 ExtendedAttributeExtantsUsed    = uint32("extended_attribute_extants_used", "Extended Attribute Extants Used")
1989 ExtendedInfo                    = bitfield16("ext_info", "Extended Return Information", [
1990         bf_boolean16(0x0001, "ext_info_update", "Update"),
1991         bf_boolean16(0x0002, "ext_info_dos_name", "DOS Name"),
1992         bf_boolean16(0x0004, "ext_info_flush", "Flush"),
1993         bf_boolean16(0x0008, "ext_info_parental", "Parental"),
1994         bf_boolean16(0x0010, "ext_info_mac_finder", "MAC Finder"),
1995         bf_boolean16(0x0020, "ext_info_sibling", "Sibling"),
1996         bf_boolean16(0x0040, "ext_info_effective", "Effective"),
1997         bf_boolean16(0x0080, "ext_info_mac_date", "MAC Date"),
1998         bf_boolean16(0x0100, "ext_info_access", "Last Access"),
1999         bf_boolean16(0x0400, "ext_info_64_bit_fs", "64 Bit File Sizes"),
2000         bf_boolean16(0x8000, "ext_info_newstyle", "New Style"),
2001 ])
2002 ExtRouterActiveFlag             = boolean8("ext_router_active_flag", "External Router Active Flag")
2003
2004 FailedAllocReqCnt               = uint32("failed_alloc_req", "Failed Alloc Request Count")
2005 FatalFATWriteErrors             = uint16("fatal_fat_write_errors", "Fatal FAT Write Errors")
2006 FATScanErrors                   = uint16("fat_scan_errors", "FAT Scan Errors")
2007 FATWriteErrors                  = uint16("fat_write_errors", "FAT Write Errors")
2008 FieldsLenTable                  = bytes("fields_len_table", "Fields Len Table", 32)
2009 FileCount                       = uint16("file_count", "File Count")
2010 FileDate                        = uint16("file_date", "File Date")
2011 FileDate.NWDate()
2012 FileDirWindow                   = uint16("file_dir_win", "File/Dir Window")
2013 FileDirWindow.Display("BASE_HEX")
2014 FileExecuteType                 = uint8("file_execute_type", "File Execute Type")
2015 FileExtendedAttributes          = val_string8("file_ext_attr", "File Extended Attributes", [
2016         [ 0x00, "Search On All Read Only Opens" ],
2017         [ 0x01, "Search On Read Only Opens With No Path" ],
2018         [ 0x02, "Shell Default Search Mode" ],
2019         [ 0x03, "Search On All Opens With No Path" ],
2020         [ 0x04, "Do Not Search" ],
2021         [ 0x05, "Reserved" ],
2022         [ 0x06, "Search On All Opens" ],
2023         [ 0x07, "Reserved" ],
2024         [ 0x08, "Search On All Read Only Opens/Indexed" ],
2025         [ 0x09, "Search On Read Only Opens With No Path/Indexed" ],
2026         [ 0x0a, "Shell Default Search Mode/Indexed" ],
2027         [ 0x0b, "Search On All Opens With No Path/Indexed" ],
2028         [ 0x0c, "Do Not Search/Indexed" ],
2029         [ 0x0d, "Indexed" ],
2030         [ 0x0e, "Search On All Opens/Indexed" ],
2031         [ 0x0f, "Indexed" ],
2032         [ 0x10, "Search On All Read Only Opens/Transactional" ],
2033         [ 0x11, "Search On Read Only Opens With No Path/Transactional" ],
2034         [ 0x12, "Shell Default Search Mode/Transactional" ],
2035         [ 0x13, "Search On All Opens With No Path/Transactional" ],
2036         [ 0x14, "Do Not Search/Transactional" ],
2037         [ 0x15, "Transactional" ],
2038         [ 0x16, "Search On All Opens/Transactional" ],
2039         [ 0x17, "Transactional" ],
2040         [ 0x18, "Search On All Read Only Opens/Indexed/Transactional" ],
2041         [ 0x19, "Search On Read Only Opens With No Path/Indexed/Transactional" ],
2042         [ 0x1a, "Shell Default Search Mode/Indexed/Transactional" ],
2043         [ 0x1b, "Search On All Opens With No Path/Indexed/Transactional" ],
2044         [ 0x1c, "Do Not Search/Indexed/Transactional" ],
2045         [ 0x1d, "Indexed/Transactional" ],
2046         [ 0x1e, "Search On All Opens/Indexed/Transactional" ],
2047         [ 0x1f, "Indexed/Transactional" ],
2048         [ 0x40, "Search On All Read Only Opens/Read Audit" ],
2049         [ 0x41, "Search On Read Only Opens With No Path/Read Audit" ],
2050         [ 0x42, "Shell Default Search Mode/Read Audit" ],
2051         [ 0x43, "Search On All Opens With No Path/Read Audit" ],
2052         [ 0x44, "Do Not Search/Read Audit" ],
2053         [ 0x45, "Read Audit" ],
2054         [ 0x46, "Search On All Opens/Read Audit" ],
2055         [ 0x47, "Read Audit" ],
2056         [ 0x48, "Search On All Read Only Opens/Indexed/Read Audit" ],
2057         [ 0x49, "Search On Read Only Opens With No Path/Indexed/Read Audit" ],
2058         [ 0x4a, "Shell Default Search Mode/Indexed/Read Audit" ],
2059         [ 0x4b, "Search On All Opens With No Path/Indexed/Read Audit" ],
2060         [ 0x4c, "Do Not Search/Indexed/Read Audit" ],
2061         [ 0x4d, "Indexed/Read Audit" ],
2062         [ 0x4e, "Search On All Opens/Indexed/Read Audit" ],
2063         [ 0x4f, "Indexed/Read Audit" ],
2064         [ 0x50, "Search On All Read Only Opens/Transactional/Read Audit" ],
2065         [ 0x51, "Search On Read Only Opens With No Path/Transactional/Read Audit" ],
2066         [ 0x52, "Shell Default Search Mode/Transactional/Read Audit" ],
2067         [ 0x53, "Search On All Opens With No Path/Transactional/Read Audit" ],
2068         [ 0x54, "Do Not Search/Transactional/Read Audit" ],
2069         [ 0x55, "Transactional/Read Audit" ],
2070         [ 0x56, "Search On All Opens/Transactional/Read Audit" ],
2071         [ 0x57, "Transactional/Read Audit" ],
2072         [ 0x58, "Search On All Read Only Opens/Indexed/Transactional/Read Audit" ],
2073         [ 0x59, "Search On Read Only Opens With No Path/Indexed/Transactional/Read Audit" ],
2074         [ 0x5a, "Shell Default Search Mode/Indexed/Transactional/Read Audit" ],
2075         [ 0x5b, "Search On All Opens With No Path/Indexed/Transactional/Read Audit" ],
2076         [ 0x5c, "Do Not Search/Indexed/Transactional/Read Audit" ],
2077         [ 0x5d, "Indexed/Transactional/Read Audit" ],
2078         [ 0x5e, "Search On All Opens/Indexed/Transactional/Read Audit" ],
2079         [ 0x5f, "Indexed/Transactional/Read Audit" ],
2080         [ 0x80, "Search On All Read Only Opens/Write Audit" ],
2081         [ 0x81, "Search On Read Only Opens With No Path/Write Audit" ],
2082         [ 0x82, "Shell Default Search Mode/Write Audit" ],
2083         [ 0x83, "Search On All Opens With No Path/Write Audit" ],
2084         [ 0x84, "Do Not Search/Write Audit" ],
2085         [ 0x85, "Write Audit" ],
2086         [ 0x86, "Search On All Opens/Write Audit" ],
2087         [ 0x87, "Write Audit" ],
2088         [ 0x88, "Search On All Read Only Opens/Indexed/Write Audit" ],
2089         [ 0x89, "Search On Read Only Opens With No Path/Indexed/Write Audit" ],
2090         [ 0x8a, "Shell Default Search Mode/Indexed/Write Audit" ],
2091         [ 0x8b, "Search On All Opens With No Path/Indexed/Write Audit" ],
2092         [ 0x8c, "Do Not Search/Indexed/Write Audit" ],
2093         [ 0x8d, "Indexed/Write Audit" ],
2094         [ 0x8e, "Search On All Opens/Indexed/Write Audit" ],
2095         [ 0x8f, "Indexed/Write Audit" ],
2096         [ 0x90, "Search On All Read Only Opens/Transactional/Write Audit" ],
2097         [ 0x91, "Search On Read Only Opens With No Path/Transactional/Write Audit" ],
2098         [ 0x92, "Shell Default Search Mode/Transactional/Write Audit" ],
2099         [ 0x93, "Search On All Opens With No Path/Transactional/Write Audit" ],
2100         [ 0x94, "Do Not Search/Transactional/Write Audit" ],
2101         [ 0x95, "Transactional/Write Audit" ],
2102         [ 0x96, "Search On All Opens/Transactional/Write Audit" ],
2103         [ 0x97, "Transactional/Write Audit" ],
2104         [ 0x98, "Search On All Read Only Opens/Indexed/Transactional/Write Audit" ],
2105         [ 0x99, "Search On Read Only Opens With No Path/Indexed/Transactional/Write Audit" ],
2106         [ 0x9a, "Shell Default Search Mode/Indexed/Transactional/Write Audit" ],
2107         [ 0x9b, "Search On All Opens With No Path/Indexed/Transactional/Write Audit" ],
2108         [ 0x9c, "Do Not Search/Indexed/Transactional/Write Audit" ],
2109         [ 0x9d, "Indexed/Transactional/Write Audit" ],
2110         [ 0x9e, "Search On All Opens/Indexed/Transactional/Write Audit" ],
2111         [ 0x9f, "Indexed/Transactional/Write Audit" ],
2112         [ 0xa0, "Search On All Read Only Opens/Read Audit/Write Audit" ],
2113         [ 0xa1, "Search On Read Only Opens With No Path/Read Audit/Write Audit" ],
2114         [ 0xa2, "Shell Default Search Mode/Read Audit/Write Audit" ],
2115         [ 0xa3, "Search On All Opens With No Path/Read Audit/Write Audit" ],
2116         [ 0xa4, "Do Not Search/Read Audit/Write Audit" ],
2117         [ 0xa5, "Read Audit/Write Audit" ],
2118         [ 0xa6, "Search On All Opens/Read Audit/Write Audit" ],
2119         [ 0xa7, "Read Audit/Write Audit" ],
2120         [ 0xa8, "Search On All Read Only Opens/Indexed/Read Audit/Write Audit" ],
2121         [ 0xa9, "Search On Read Only Opens With No Path/Indexed/Read Audit/Write Audit" ],
2122         [ 0xaa, "Shell Default Search Mode/Indexed/Read Audit/Write Audit" ],
2123         [ 0xab, "Search On All Opens With No Path/Indexed/Read Audit/Write Audit" ],
2124         [ 0xac, "Do Not Search/Indexed/Read Audit/Write Audit" ],
2125         [ 0xad, "Indexed/Read Audit/Write Audit" ],
2126         [ 0xae, "Search On All Opens/Indexed/Read Audit/Write Audit" ],
2127         [ 0xaf, "Indexed/Read Audit/Write Audit" ],
2128         [ 0xb0, "Search On All Read Only Opens/Transactional/Read Audit/Write Audit" ],
2129         [ 0xb1, "Search On Read Only Opens With No Path/Transactional/Read Audit/Write Audit" ],
2130         [ 0xb2, "Shell Default Search Mode/Transactional/Read Audit/Write Audit" ],
2131         [ 0xb3, "Search On All Opens With No Path/Transactional/Read Audit/Write Audit" ],
2132         [ 0xb4, "Do Not Search/Transactional/Read Audit/Write Audit" ],
2133         [ 0xb5, "Transactional/Read Audit/Write Audit" ],
2134         [ 0xb6, "Search On All Opens/Transactional/Read Audit/Write Audit" ],
2135         [ 0xb7, "Transactional/Read Audit/Write Audit" ],
2136         [ 0xb8, "Search On All Read Only Opens/Indexed/Transactional/Read Audit/Write Audit" ],
2137         [ 0xb9, "Search On Read Only Opens With No Path/Indexed/Transactional/Read Audit/Write Audit" ],
2138         [ 0xba, "Shell Default Search Mode/Indexed/Transactional/Read Audit/Write Audit" ],
2139         [ 0xbb, "Search On All Opens With No Path/Indexed/Transactional/Read Audit/Write Audit" ],
2140         [ 0xbc, "Do Not Search/Indexed/Transactional/Read Audit/Write Audit" ],
2141         [ 0xbd, "Indexed/Transactional/Read Audit/Write Audit" ],
2142         [ 0xbe, "Search On All Opens/Indexed/Transactional/Read Audit/Write Audit" ],
2143         [ 0xbf, "Indexed/Transactional/Read Audit/Write Audit" ],
2144 ])
2145 fileFlags                       = uint32("file_flags", "File Flags")
2146 FileHandle                      = bytes("file_handle", "File Handle", 6)
2147 FileLimbo                       = uint32("file_limbo", "File Limbo")
2148 FileListCount                   = uint32("file_list_count", "File List Count")
2149 FileLock                        = val_string8("file_lock", "File Lock", [
2150         [ 0x00, "Not Locked" ],
2151         [ 0xfe, "Locked by file lock" ],
2152         [ 0xff, "Unknown" ],
2153 ])
2154 FileLockCount                   = uint16("file_lock_count", "File Lock Count")
2155 FileMode                        = uint8("file_mode", "File Mode")
2156 FileName                        = nstring8("file_name", "Filename")
2157 FileName12                      = fw_string("file_name_12", "Filename", 12)
2158 FileName14                      = fw_string("file_name_14", "Filename", 14)
2159 FileNameLen                     = uint8("file_name_len", "Filename Length")
2160 FileOffset                      = uint32("file_offset", "File Offset")
2161 FilePath                        = nstring8("file_path", "File Path")
2162 FileSize                        = uint32("file_size", "File Size", BE)
2163 FileSystemID                    = uint8("file_system_id", "File System ID")
2164 FileTime                        = uint16("file_time", "File Time")
2165 FileTime.NWTime()
2166 FileWriteFlags                  = val_string8("file_write_flags", "File Write Flags", [
2167         [ 0x01, "Writing" ],
2168         [ 0x02, "Write aborted" ],
2169 ])
2170 FileWriteState                  = val_string8("file_write_state", "File Write State", [
2171         [ 0x00, "Not Writing" ],
2172         [ 0x01, "Write in Progress" ],
2173         [ 0x02, "Write Being Stopped" ],
2174 ])
2175 Filler                          = uint8("filler", "Filler")
2176 FinderAttr                      = bitfield16("finder_attr", "Finder Info Attributes", [
2177         bf_boolean16(0x0001, "finder_attr_desktop", "Object on Desktop"),
2178         bf_boolean16(0x2000, "finder_attr_invisible", "Object is Invisible"),
2179         bf_boolean16(0x4000, "finder_attr_bundle", "Object Has Bundle"),
2180 ])
2181 FixedBitMask                    = uint32("fixed_bit_mask", "Fixed Bit Mask")
2182 FixedBitsDefined                = uint16("fixed_bits_defined", "Fixed Bits Defined")
2183 FlagBits                        = uint8("flag_bits", "Flag Bits")
2184 Flags                           = uint8("flags", "Flags")
2185 FlagsDef                        = uint16("flags_def", "Flags")
2186 FlushTime                       = uint32("flush_time", "Flush Time")
2187 FolderFlag                      = val_string8("folder_flag", "Folder Flag", [
2188         [ 0x00, "Not a Folder" ],
2189         [ 0x01, "Folder" ],
2190 ])
2191 ForkCount                       = uint8("fork_count", "Fork Count")
2192 ForkIndicator                   = val_string8("fork_indicator", "Fork Indicator", [
2193         [ 0x00, "Data Fork" ],
2194         [ 0x01, "Resource Fork" ],
2195 ])
2196 ForceFlag                       = val_string8("force_flag", "Force Server Down Flag", [
2197         [ 0x00, "Down Server if No Files Are Open" ],
2198         [ 0xff, "Down Server Immediately, Auto-Close Open Files" ],
2199 ])
2200 ForgedDetachedRequests          = uint16("forged_detached_requests", "Forged Detached Requests")
2201 FormType                        = uint16( "form_type", "Form Type" )
2202 FormTypeCnt                     = uint32("form_type_count", "Form Types Count")
2203 FoundSomeMem                    = uint32("found_some_mem", "Found Some Memory")
2204 FractionalSeconds               = uint32("fractional_time", "Fractional Time in Seconds")
2205 FraggerHandle                   = uint32("fragger_handle", "Fragment Handle")
2206 FraggerHandle.Display('BASE_HEX')
2207 FragmentWriteOccurred           = uint16("fragment_write_occurred", "Fragment Write Occurred")
2208 FragSize                        = uint32("frag_size", "Fragment Size")
2209 FreeableLimboSectors            = uint32("freeable_limbo_sectors", "Freeable Limbo Sectors")
2210 FreeBlocks                      = uint32("free_blocks", "Free Blocks")
2211 FreedClusters                   = uint32("freed_clusters", "Freed Clusters")
2212 FreeDirectoryEntries            = uint16("free_directory_entries", "Free Directory Entries")
2213 FSEngineFlag                    = boolean8("fs_engine_flag", "FS Engine Flag")
2214 FullName                        = fw_string("full_name", "Full Name", 39)
2215
2216 GetSetFlag                      = val_string8("get_set_flag", "Get Set Flag", [
2217         [ 0x00, "Get the default support module ID" ],
2218         [ 0x01, "Set the default support module ID" ],
2219 ])      
2220 GUID                            = bytes("guid", "GUID", 16)
2221 GUID.Display("BASE_HEX")
2222
2223 HandleFlag                      = val_string8("handle_flag", "Handle Flag", [
2224         [ 0x00, "Short Directory Handle" ],
2225         [ 0x01, "Directory Base" ],
2226         [ 0xFF, "No Handle Present" ],
2227 ])
2228 HandleInfoLevel                 = val_string8("handle_info_level", "Handle Info Level", [
2229         [ 0x00, "Get Limited Information from a File Handle" ],
2230         [ 0x01, "Get Limited Information from a File Handle Using a Name Space" ],
2231         [ 0x02, "Get Information from a File Handle" ],
2232         [ 0x03, "Get Information from a Directory Handle" ],
2233         [ 0x04, "Get Complete Information from a Directory Handle" ],
2234         [ 0x05, "Get Complete Information from a File Handle" ],
2235 ])
2236 HeldBytesRead                   = bytes("held_bytes_read", "Held Bytes Read", 6)
2237 HeldBytesWritten                = bytes("held_bytes_write", "Held Bytes Written", 6)
2238 HeldConnectTimeInMinutes        = uint32("held_conn_time", "Held Connect Time in Minutes")
2239 HeldRequests                    = uint32("user_info_held_req", "Held Requests")
2240 HoldAmount                      = uint32("hold_amount", "Hold Amount")
2241 HoldCancelAmount                = uint32("hold_cancel_amount", "Hold Cancel Amount")
2242 HolderID                        = uint32("holder_id", "Holder ID")
2243 HolderID.Display("BASE_HEX")
2244 HoldTime                        = uint32("hold_time", "Hold Time")
2245 HopsToNet                       = uint16("hops_to_net", "Hop Count")
2246 HorizLocation                   = uint16("horiz_location", "Horizontal Location")
2247 HostAddress                     = bytes("host_address", "Host Address", 6)
2248 HotFixBlocksAvailable           = uint16("hot_fix_blocks_available", "Hot Fix Blocks Available")
2249 HotFixDisabled                  = val_string8("hot_fix_disabled", "Hot Fix Disabled", [
2250         [ 0x00, "Enabled" ],
2251         [ 0x01, "Disabled" ],
2252 ])
2253 HotFixTableSize                 = uint16("hot_fix_table_size", "Hot Fix Table Size")
2254 HotFixTableStart                = uint32("hot_fix_table_start", "Hot Fix Table Start")
2255 Hour                            = uint8("s_hour", "Hour")
2256 HugeBitMask                     = uint32("huge_bit_mask", "Huge Bit Mask")
2257 HugeBitsDefined                 = uint16("huge_bits_defined", "Huge Bits Defined")
2258 HugeData                        = nstring8("huge_data", "Huge Data")
2259 HugeDataUsed                    = uint32("huge_data_used", "Huge Data Used")
2260 HugeStateInfo                   = bytes("huge_state_info", "Huge State Info", 16)
2261
2262 IdentificationNumber            = uint32("identification_number", "Identification Number")
2263 IgnoredRxPkts                   = uint32("ignored_rx_pkts", "Ignored Receive Packets")
2264 IncomingPacketDiscardedNoDGroup = uint16("incoming_packet_discarded_no_dgroup", "Incoming Packet Discarded No DGroup")
2265 IndexNumber                     = uint8("index_number", "Index Number")
2266 InfoCount                       = uint16("info_count", "Info Count")
2267 InfoFlags                       = bitfield32("info_flags", "Info Flags", [
2268         bf_boolean32(0x10000000, "info_flags_security", "Return Object Security"),
2269         bf_boolean32(0x20000000, "info_flags_flags", "Return Object Flags"),
2270         bf_boolean32(0x40000000, "info_flags_type", "Return Object Type"),
2271         bf_boolean32(0x80000000, "info_flags_name", "Return Object Name"),
2272 ])
2273 InfoLevelNumber                 = val_string8("info_level_num", "Information Level Number", [
2274         [ 0x01, "Volume Information Definition" ],
2275         [ 0x02, "Volume Information 2 Definition" ],
2276 ])        
2277 InfoMask                        = bitfield32("info_mask", "Information Mask", [
2278         bf_boolean32(0x00000001, "info_flags_dos_time", "DOS Time"),
2279         bf_boolean32(0x00000002, "info_flags_ref_count", "Reference Count"),
2280         bf_boolean32(0x00000004, "info_flags_dos_attr", "DOS Attributes"),
2281         bf_boolean32(0x00000008, "info_flags_ids", "ID's"),
2282         bf_boolean32(0x00000010, "info_flags_ds_sizes", "Data Stream Sizes"),
2283         bf_boolean32(0x00000020, "info_flags_ns_attr", "Name Space Attributes"),
2284         bf_boolean32(0x00000040, "info_flags_ea_present", "EA Present Flag"),
2285         bf_boolean32(0x00000080, "info_flags_all_attr", "All Attributes"),
2286         bf_boolean32(0x00000100, "info_flags_all_dirbase_num", "All Directory Base Numbers"),
2287         bf_boolean32(0x00000200, "info_flags_max_access_mask", "Maximum Access Mask"),
2288         bf_boolean32(0x00000400, "info_flags_flush_time", "Flush Time"),
2289         bf_boolean32(0x00000800, "info_flags_prnt_base_id", "Parent Base ID"),
2290         bf_boolean32(0x00001000, "info_flags_mac_finder", "Mac Finder Information"),
2291         bf_boolean32(0x00002000, "info_flags_sibling_cnt", "Sibling Count"),
2292         bf_boolean32(0x00004000, "info_flags_effect_rights", "Effective Rights"),
2293         bf_boolean32(0x00008000, "info_flags_mac_time", "Mac Time"),
2294         bf_boolean32(0x20000000, "info_mask_dosname", "DOS Name"),
2295         bf_boolean32(0x40000000, "info_mask_c_name_space", "Creator Name Space & Name"),
2296         bf_boolean32(0x80000000, "info_mask_name", "Name"),
2297 ])
2298 InheritedRightsMask             = bitfield16("inherited_rights_mask", "Inherited Rights Mask", [ 
2299         bf_boolean16(0x0001, "inh_rights_read", "Read Rights"),
2300         bf_boolean16(0x0002, "inh_rights_write", "Write Rights"),
2301         bf_boolean16(0x0004, "inh_rights_open", "Open Rights"),
2302         bf_boolean16(0x0008, "inh_rights_create", "Create Rights"),
2303         bf_boolean16(0x0010, "inh_rights_delete", "Delete Rights"),
2304         bf_boolean16(0x0020, "inh_rights_parent", "Change Access"),
2305         bf_boolean16(0x0040, "inh_rights_search", "See Files Flag"),
2306         bf_boolean16(0x0080, "inh_rights_modify", "Modify Rights"),
2307         bf_boolean16(0x0100, "inh_rights_supervisor", "Supervisor"),
2308 ])
2309 InheritanceRevokeMask           = bitfield16("inheritance_revoke_mask", "Revoke Rights Mask", [
2310         bf_boolean16(0x0001, "inh_revoke_read", "Read Rights"),
2311         bf_boolean16(0x0002, "inh_revoke_write", "Write Rights"),
2312         bf_boolean16(0x0004, "inh_revoke_open", "Open Rights"),
2313         bf_boolean16(0x0008, "inh_revoke_create", "Create Rights"),
2314         bf_boolean16(0x0010, "inh_revoke_delete", "Delete Rights"),
2315         bf_boolean16(0x0020, "inh_revoke_parent", "Change Access"),
2316         bf_boolean16(0x0040, "inh_revoke_search", "See Files Flag"),
2317         bf_boolean16(0x0080, "inh_revoke_modify", "Modify Rights"),
2318         bf_boolean16(0x0100, "inh_revoke_supervisor", "Supervisor"),
2319 ])
2320 InitialSemaphoreValue           = uint8("initial_semaphore_value", "Initial Semaphore Value")
2321 InspectSize                     = uint32("inspect_size", "Inspect Size")
2322 InternetBridgeVersion           = uint8("internet_bridge_version", "Internet Bridge Version")
2323 InterruptNumbersUsed            = uint32("interrupt_numbers_used", "Interrupt Numbers Used")
2324 InUse                           = uint32("in_use", "Bytes in Use")
2325 IOAddressesUsed                 = bytes("io_addresses_used", "IO Addresses Used", 8)
2326 IOErrorCount                    = uint16("io_error_count", "IO Error Count")
2327 IOEngineFlag                    = boolean8("io_engine_flag", "IO Engine Flag")
2328 IPXNotMyNetwork                 = uint16("ipx_not_my_network", "IPX Not My Network")
2329 ItemsChanged                    = uint32("items_changed", "Items Changed")
2330 ItemsChecked                    = uint32("items_checked", "Items Checked")
2331 ItemsCount                      = uint32("items_count", "Items Count")
2332 itemsInList                     = uint32("items_in_list", "Items in List")
2333 ItemsInPacket                   = uint32("items_in_packet", "Items in Packet")
2334
2335 JobControlFlags                 = bitfield8("job_control_flags", "Job Control Flags", [
2336         bf_boolean8(0x08, "job_control_job_recovery", "Job Recovery"),
2337         bf_boolean8(0x10, "job_control_reservice", "ReService Job"),
2338         bf_boolean8(0x20, "job_control_file_open", "File Open"),
2339         bf_boolean8(0x40, "job_control_user_hold", "User Hold"),
2340         bf_boolean8(0x80, "job_control_operator_hold", "Operator Hold"),
2341
2342 ])
2343 JobControlFlagsWord             = bitfield16("job_control_flags_word", "Job Control Flags", [
2344         bf_boolean16(0x0008, "job_control1_job_recovery", "Job Recovery"),
2345         bf_boolean16(0x0010, "job_control1_reservice", "ReService Job"),
2346         bf_boolean16(0x0020, "job_control1_file_open", "File Open"),
2347         bf_boolean16(0x0040, "job_control1_user_hold", "User Hold"),
2348         bf_boolean16(0x0080, "job_control1_operator_hold", "Operator Hold"),
2349
2350 ])
2351 JobCount                        = uint32("job_count", "Job Count")
2352 JobFileHandle                   = bytes("job_file_handle", "Job File Handle", 6)
2353 JobFileHandleLong               = uint32("job_file_handle_long", "Job File Handle")
2354 JobFileHandleLong.Display("BASE_HEX")
2355 JobFileName                     = fw_string("job_file_name", "Job File Name", 14)
2356 JobPosition                     = uint8("job_position", "Job Position")
2357 JobPositionWord                 = uint16("job_position_word", "Job Position")
2358 JobNumber                       = uint16("job_number", "Job Number", BE )
2359 JobNumberLong                   = uint32("job_number_long", "Job Number", BE )
2360 JobNumberList                   = uint32("job_number_list", "Job Number List")
2361 JobType                         = uint16("job_type", "Job Type", BE )
2362
2363 LANCustomVariablesCount         = uint32("lan_cust_var_count", "LAN Custom Variables Count")
2364 LANdriverBoardInstance          = uint16("lan_drv_bd_inst", "LAN Driver Board Instance")
2365 LANdriverBoardNumber            = uint16("lan_drv_bd_num", "LAN Driver Board Number")
2366 LANdriverCardID                 = uint16("lan_drv_card_id", "LAN Driver Card ID")
2367 LANdriverCardName               = fw_string("lan_drv_card_name", "LAN Driver Card Name", 28)
2368 LANdriverCFG_MajorVersion       = uint8("lan_dvr_cfg_major_vrs", "LAN Driver Config - Major Version")
2369 LANdriverCFG_MinorVersion       = uint8("lan_dvr_cfg_minor_vrs", "LAN Driver Config - Minor Version")
2370 LANdriverDMAUsage1              = uint8("lan_drv_dma_usage1", "Primary DMA Channel")
2371 LANdriverDMAUsage2              = uint8("lan_drv_dma_usage2", "Secondary DMA Channel")
2372 LANdriverFlags                  = uint16("lan_drv_flags", "LAN Driver Flags")
2373 LANdriverFlags.Display("BASE_HEX")        
2374 LANdriverInterrupt1             = uint8("lan_drv_interrupt1", "Primary Interrupt Vector")
2375 LANdriverInterrupt2             = uint8("lan_drv_interrupt2", "Secondary Interrupt Vector")
2376 LANdriverIOPortsAndRanges1      = uint16("lan_drv_io_ports_and_ranges_1", "Primary Base I/O Port")
2377 LANdriverIOPortsAndRanges2      = uint16("lan_drv_io_ports_and_ranges_2", "Number of I/O Ports")
2378 LANdriverIOPortsAndRanges3      = uint16("lan_drv_io_ports_and_ranges_3", "Secondary Base I/O Port")
2379 LANdriverIOPortsAndRanges4      = uint16("lan_drv_io_ports_and_ranges_4", "Number of I/O Ports")
2380 LANdriverIOReserved             = bytes("lan_drv_io_reserved", "LAN Driver IO Reserved", 14)
2381 LANdriverLineSpeed              = uint16("lan_drv_line_speed", "LAN Driver Line Speed")
2382 LANdriverLink                   = uint32("lan_drv_link", "LAN Driver Link")
2383 LANdriverLogicalName            = bytes("lan_drv_log_name", "LAN Driver Logical Name", 18)
2384 LANdriverMajorVersion           = uint8("lan_drv_major_ver", "LAN Driver Major Version")
2385 LANdriverMaximumSize            = uint32("lan_drv_max_size", "LAN Driver Maximum Size")
2386 LANdriverMaxRecvSize            = uint32("lan_drv_max_rcv_size", "LAN Driver Maximum Receive Size")
2387 LANdriverMediaID                = uint16("lan_drv_media_id", "LAN Driver Media ID")
2388 LANdriverMediaType              = fw_string("lan_drv_media_type", "LAN Driver Media Type", 40)
2389 LANdriverMemoryDecode0          = uint32("lan_drv_mem_decode_0", "LAN Driver Memory Decode 0")
2390 LANdriverMemoryDecode1          = uint32("lan_drv_mem_decode_1", "LAN Driver Memory Decode 1")
2391 LANdriverMemoryLength0          = uint16("lan_drv_mem_length_0", "LAN Driver Memory Length 0")
2392 LANdriverMemoryLength1          = uint16("lan_drv_mem_length_1", "LAN Driver Memory Length 1")
2393 LANdriverMinorVersion           = uint8("lan_drv_minor_ver", "LAN Driver Minor Version")
2394 LANdriverModeFlags              = val_string8("lan_dvr_mode_flags", "LAN Driver Mode Flags", [
2395         [0x80, "Canonical Address" ],
2396         [0x81, "Canonical Address" ],
2397         [0x82, "Canonical Address" ],
2398         [0x83, "Canonical Address" ],
2399         [0x84, "Canonical Address" ],
2400         [0x85, "Canonical Address" ],
2401         [0x86, "Canonical Address" ],
2402         [0x87, "Canonical Address" ],
2403         [0x88, "Canonical Address" ],
2404         [0x89, "Canonical Address" ],
2405         [0x8a, "Canonical Address" ],
2406         [0x8b, "Canonical Address" ],
2407         [0x8c, "Canonical Address" ],
2408         [0x8d, "Canonical Address" ],
2409         [0x8e, "Canonical Address" ],
2410         [0x8f, "Canonical Address" ],
2411         [0x90, "Canonical Address" ],
2412         [0x91, "Canonical Address" ],
2413         [0x92, "Canonical Address" ],
2414         [0x93, "Canonical Address" ],
2415         [0x94, "Canonical Address" ],
2416         [0x95, "Canonical Address" ],
2417         [0x96, "Canonical Address" ],
2418         [0x97, "Canonical Address" ],
2419         [0x98, "Canonical Address" ],
2420         [0x99, "Canonical Address" ],
2421         [0x9a, "Canonical Address" ],
2422         [0x9b, "Canonical Address" ],
2423         [0x9c, "Canonical Address" ],
2424         [0x9d, "Canonical Address" ],
2425         [0x9e, "Canonical Address" ],
2426         [0x9f, "Canonical Address" ],
2427         [0xa0, "Canonical Address" ],
2428         [0xa1, "Canonical Address" ],
2429         [0xa2, "Canonical Address" ],
2430         [0xa3, "Canonical Address" ],
2431         [0xa4, "Canonical Address" ],
2432         [0xa5, "Canonical Address" ],
2433         [0xa6, "Canonical Address" ],
2434         [0xa7, "Canonical Address" ],
2435         [0xa8, "Canonical Address" ],
2436         [0xa9, "Canonical Address" ],
2437         [0xaa, "Canonical Address" ],
2438         [0xab, "Canonical Address" ],
2439         [0xac, "Canonical Address" ],
2440         [0xad, "Canonical Address" ],
2441         [0xae, "Canonical Address" ],
2442         [0xaf, "Canonical Address" ],
2443         [0xb0, "Canonical Address" ],
2444         [0xb1, "Canonical Address" ],
2445         [0xb2, "Canonical Address" ],
2446         [0xb3, "Canonical Address" ],
2447         [0xb4, "Canonical Address" ],
2448         [0xb5, "Canonical Address" ],
2449         [0xb6, "Canonical Address" ],
2450         [0xb7, "Canonical Address" ],
2451         [0xb8, "Canonical Address" ],
2452         [0xb9, "Canonical Address" ],
2453         [0xba, "Canonical Address" ],
2454         [0xbb, "Canonical Address" ],
2455         [0xbc, "Canonical Address" ],
2456         [0xbd, "Canonical Address" ],
2457         [0xbe, "Canonical Address" ],
2458         [0xbf, "Canonical Address" ],
2459         [0xc0, "Non-Canonical Address" ],
2460         [0xc1, "Non-Canonical Address" ],
2461         [0xc2, "Non-Canonical Address" ],
2462         [0xc3, "Non-Canonical Address" ],
2463         [0xc4, "Non-Canonical Address" ],
2464         [0xc5, "Non-Canonical Address" ],
2465         [0xc6, "Non-Canonical Address" ],
2466         [0xc7, "Non-Canonical Address" ],
2467         [0xc8, "Non-Canonical Address" ],
2468         [0xc9, "Non-Canonical Address" ],
2469         [0xca, "Non-Canonical Address" ],
2470         [0xcb, "Non-Canonical Address" ],
2471         [0xcc, "Non-Canonical Address" ],
2472         [0xcd, "Non-Canonical Address" ],
2473         [0xce, "Non-Canonical Address" ],
2474         [0xcf, "Non-Canonical Address" ],
2475         [0xd0, "Non-Canonical Address" ],
2476         [0xd1, "Non-Canonical Address" ],
2477         [0xd2, "Non-Canonical Address" ],
2478         [0xd3, "Non-Canonical Address" ],
2479         [0xd4, "Non-Canonical Address" ],
2480         [0xd5, "Non-Canonical Address" ],
2481         [0xd6, "Non-Canonical Address" ],
2482         [0xd7, "Non-Canonical Address" ],
2483         [0xd8, "Non-Canonical Address" ],
2484         [0xd9, "Non-Canonical Address" ],
2485         [0xda, "Non-Canonical Address" ],
2486         [0xdb, "Non-Canonical Address" ],
2487         [0xdc, "Non-Canonical Address" ],
2488         [0xdd, "Non-Canonical Address" ],
2489         [0xde, "Non-Canonical Address" ],
2490         [0xdf, "Non-Canonical Address" ],
2491         [0xe0, "Non-Canonical Address" ],
2492         [0xe1, "Non-Canonical Address" ],
2493         [0xe2, "Non-Canonical Address" ],
2494         [0xe3, "Non-Canonical Address" ],
2495         [0xe4, "Non-Canonical Address" ],
2496         [0xe5, "Non-Canonical Address" ],
2497         [0xe6, "Non-Canonical Address" ],
2498         [0xe7, "Non-Canonical Address" ],
2499         [0xe8, "Non-Canonical Address" ],
2500         [0xe9, "Non-Canonical Address" ],
2501         [0xea, "Non-Canonical Address" ],
2502         [0xeb, "Non-Canonical Address" ],
2503         [0xec, "Non-Canonical Address" ],
2504         [0xed, "Non-Canonical Address" ],
2505         [0xee, "Non-Canonical Address" ],
2506         [0xef, "Non-Canonical Address" ],
2507         [0xf0, "Non-Canonical Address" ],
2508         [0xf1, "Non-Canonical Address" ],
2509         [0xf2, "Non-Canonical Address" ],
2510         [0xf3, "Non-Canonical Address" ],
2511         [0xf4, "Non-Canonical Address" ],
2512         [0xf5, "Non-Canonical Address" ],
2513         [0xf6, "Non-Canonical Address" ],
2514         [0xf7, "Non-Canonical Address" ],
2515         [0xf8, "Non-Canonical Address" ],
2516         [0xf9, "Non-Canonical Address" ],
2517         [0xfa, "Non-Canonical Address" ],
2518         [0xfb, "Non-Canonical Address" ],
2519         [0xfc, "Non-Canonical Address" ],
2520         [0xfd, "Non-Canonical Address" ],
2521         [0xfe, "Non-Canonical Address" ],
2522         [0xff, "Non-Canonical Address" ],
2523 ])        
2524 LANDriverNumber                 = uint8("lan_driver_number", "LAN Driver Number")
2525 LANdriverNodeAddress            = bytes("lan_dvr_node_addr", "LAN Driver Node Address", 6)
2526 LANdriverRecvSize               = uint32("lan_drv_rcv_size", "LAN Driver Receive Size")
2527 LANdriverReserved               = uint16("lan_drv_reserved", "LAN Driver Reserved")
2528 LANdriverSendRetries            = uint16("lan_drv_snd_retries", "LAN Driver Send Retries")
2529 LANdriverSharingFlags           = uint16("lan_drv_share", "LAN Driver Sharing Flags")
2530 LANdriverShortName              = fw_string("lan_drv_short_name", "LAN Driver Short Name", 40)
2531 LANdriverSlot                   = uint16("lan_drv_slot", "LAN Driver Slot")
2532 LANdriverSrcRouting             = uint32("lan_drv_src_route", "LAN Driver Source Routing")
2533 LANdriverTransportTime          = uint16("lan_drv_trans_time", "LAN Driver Transport Time")
2534 LastAccessedDate                = uint16("last_access_date", "Last Accessed Date")
2535 LastAccessedDate.NWDate()
2536 LastAccessedTime                = uint16("last_access_time", "Last Accessed Time")
2537 LastAccessedTime.NWTime()
2538 LastGarbCollect                 = uint32("last_garbage_collect", "Last Garbage Collection")
2539 LastInstance                    = uint32("last_instance", "Last Instance")
2540 LastRecordSeen                  = uint16("last_record_seen", "Last Record Seen")
2541 LastSearchIndex                 = uint16("last_search_index", "Search Index")
2542 LastSeen                        = uint32("last_seen", "Last Seen")
2543 LastSequenceNumber              = uint16("last_sequence_number", "Sequence Number")
2544 Level                           = uint8("level", "Level")
2545 LFSCounters                     = uint32("lfs_counters", "LFS Counters")
2546 LimboDataStreamsCount           = uint32("limbo_data_streams_count", "Limbo Data Streams Count")
2547 limbCount                       = uint32("limb_count", "Limb Count")
2548 LimboUsed                       = uint32("limbo_used", "Limbo Used")
2549 LoadedNameSpaces                = uint8("loaded_name_spaces", "Loaded Name Spaces")
2550 LocalConnectionID               = uint32("local_connection_id", "Local Connection ID")
2551 LocalConnectionID.Display("BASE_HEX")
2552 LocalMaxPacketSize              = uint32("local_max_packet_size", "Local Max Packet Size")
2553 LocalMaxSendSize                = uint32("local_max_send_size", "Local Max Send Size")
2554 LocalMaxRecvSize                = uint32("local_max_recv_size", "Local Max Recv Size")
2555 LocalLoginInfoCcode             = uint8("local_login_info_ccode", "Local Login Info C Code")
2556 LocalTargetSocket               = uint32("local_target_socket", "Local Target Socket")
2557 LocalTargetSocket.Display("BASE_HEX")
2558 LockAreaLen                     = uint32("lock_area_len", "Lock Area Length")
2559 LockAreasStartOffset            = uint32("lock_areas_start_offset", "Lock Areas Start Offset")
2560 LockTimeout                     = uint16("lock_timeout", "Lock Timeout")
2561 Locked                          = val_string8("locked", "Locked Flag", [
2562         [ 0x00, "Not Locked Exclusively" ],
2563         [ 0x01, "Locked Exclusively" ],
2564 ])
2565 LockFlag                        = val_string8("lock_flag", "Lock Flag", [
2566         [ 0x00, "Not Locked, Log for Future Exclusive Lock" ],
2567         [ 0x01, "Exclusive Lock (Read/Write)" ],
2568         [ 0x02, "Log for Future Shared Lock"],
2569         [ 0x03, "Shareable Lock (Read-Only)" ],
2570         [ 0xfe, "Locked by a File Lock" ],
2571         [ 0xff, "Locked by Begin Share File Set" ],
2572 ])
2573 LockName                        = nstring8("lock_name", "Lock Name")
2574 LockStatus                      = val_string8("lock_status", "Lock Status", [
2575         [ 0x00, "Locked Exclusive" ],
2576         [ 0x01, "Locked Shareable" ],
2577         [ 0x02, "Logged" ],
2578         [ 0x06, "Lock is Held by TTS"],
2579 ])
2580 LockType                        = val_string8("lock_type", "Lock Type", [
2581         [ 0x00, "Locked" ],
2582         [ 0x01, "Open Shareable" ],
2583         [ 0x02, "Logged" ],
2584         [ 0x03, "Open Normal" ],
2585         [ 0x06, "TTS Holding Lock" ],
2586         [ 0x07, "Transaction Flag Set on This File" ],
2587 ])
2588 LogFileFlagHigh                 = bitfield8("log_file_flag_high", "Log File Flag (byte 2)", [
2589         bf_boolean8(0x80, "log_flag_call_back", "Call Back Requested" ),
2590 ])
2591 LogFileFlagLow                  = bitfield8("log_file_flag_low", "Log File Flag", [
2592         bf_boolean8(0x01, "log_flag_lock_file", "Lock File Immediately" ), 
2593 ])      
2594 LoggedObjectID                  = uint32("logged_object_id", "Logged in Object ID")
2595 LoggedObjectID.Display("BASE_HEX")
2596 LoggedCount                     = uint16("logged_count", "Logged Count")
2597 LogicalConnectionNumber         = uint16("logical_connection_number", "Logical Connection Number", BE)
2598 LogicalDriveCount               = uint8("logical_drive_count", "Logical Drive Count")
2599 LogicalDriveNumber              = uint8("logical_drive_number", "Logical Drive Number")
2600 LogicalLockThreshold            = uint8("logical_lock_threshold", "LogicalLockThreshold")
2601 LogicalRecordName               = nstring8("logical_record_name", "Logical Record Name")
2602 LoginKey                        = bytes("login_key", "Login Key", 8)
2603 LogLockType                     = uint8("log_lock_type", "Log Lock Type")
2604 LogTtlRxPkts                    = uint32("log_ttl_rx_pkts", "Total Received Packets")
2605 LogTtlTxPkts                    = uint32("log_ttl_tx_pkts", "Total Transmitted Packets")
2606 LongName                        = fw_string("long_name", "Long Name", 32)
2607 LRUBlockWasDirty                = uint16("lru_block_was_dirty", "LRU Block Was Dirty")
2608
2609 MacAttr                         = bitfield16("mac_attr", "Attributes", [
2610         bf_boolean16(0x0001, "mac_attr_smode1", "Search Mode"),
2611         bf_boolean16(0x0002, "mac_attr_smode2", "Search Mode"),
2612         bf_boolean16(0x0004, "mac_attr_smode3", "Search Mode"),
2613         bf_boolean16(0x0010, "mac_attr_transaction", "Transaction"),
2614         bf_boolean16(0x0020, "mac_attr_index", "Index"),
2615         bf_boolean16(0x0040, "mac_attr_r_audit", "Read Audit"),
2616         bf_boolean16(0x0080, "mac_attr_w_audit", "Write Audit"),
2617         bf_boolean16(0x0100, "mac_attr_r_only", "Read Only"),
2618         bf_boolean16(0x0200, "mac_attr_hidden", "Hidden"),
2619         bf_boolean16(0x0400, "mac_attr_system", "System"),
2620         bf_boolean16(0x0800, "mac_attr_execute_only", "Execute Only"),
2621         bf_boolean16(0x1000, "mac_attr_subdirectory", "Subdirectory"),
2622         bf_boolean16(0x2000, "mac_attr_archive", "Archive"),
2623         bf_boolean16(0x8000, "mac_attr_share", "Shareable File"),
2624 ])
2625 MACBackupDate                   = uint16("mac_backup_date", "Mac Backup Date")
2626 MACBackupDate.NWDate()
2627 MACBackupTime                   = uint16("mac_backup_time", "Mac Backup Time")
2628 MACBackupTime.NWTime()
2629 MacBaseDirectoryID              = uint32("mac_base_directory_id", "Mac Base Directory ID", BE)
2630 MacBaseDirectoryID.Display("BASE_HEX")
2631 MACCreateDate                   = uint16("mac_create_date", "Mac Create Date")
2632 MACCreateDate.NWDate()
2633 MACCreateTime                   = uint16("mac_create_time", "Mac Create Time")
2634 MACCreateTime.NWTime()
2635 MacDestinationBaseID            = uint32("mac_destination_base_id", "Mac Destination Base ID")
2636 MacDestinationBaseID.Display("BASE_HEX")
2637 MacFinderInfo                   = bytes("mac_finder_info", "Mac Finder Information", 32)
2638 MacLastSeenID                   = uint32("mac_last_seen_id", "Mac Last Seen ID")
2639 MacLastSeenID.Display("BASE_HEX")
2640 MacSourceBaseID                 = uint32("mac_source_base_id", "Mac Source Base ID")
2641 MacSourceBaseID.Display("BASE_HEX")
2642 MajorVersion                    = uint32("major_version", "Major Version")
2643 MaxBytes                        = uint16("max_bytes", "Maximum Number of Bytes")
2644 MaxDataStreams                  = uint32("max_data_streams", "Maximum Data Streams")
2645 MaxDirDepth                     = uint32("max_dir_depth", "Maximum Directory Depth")
2646 MaximumSpace                    = uint16("max_space", "Maximum Space")
2647 MaxNumOfConn                    = uint32("max_num_of_conn", "Maximum Number of Connections")
2648 MaxNumOfLANS                    = uint32("max_num_of_lans", "Maximum Number Of LAN's")
2649 MaxNumOfMedias                  = uint32("max_num_of_medias", "Maximum Number Of Media's")
2650 MaxNumOfNmeSps                  = uint32("max_num_of_nme_sps", "Maximum Number Of Name Spaces")
2651 MaxNumOfSpoolPr                 = uint32("max_num_of_spool_pr", "Maximum Number Of Spool Printers")
2652 MaxNumOfStacks                  = uint32("max_num_of_stacks", "Maximum Number Of Stacks")
2653 MaxNumOfUsers                   = uint32("max_num_of_users", "Maximum Number Of Users")
2654 MaxNumOfVol                     = uint32("max_num_of_vol", "Maximum Number of Volumes")
2655 MaxSpace                        = uint32("maxspace", "Maximum Space")
2656 MaxUsedDynamicSpace             = uint32("max_used_dynamic_space", "Max Used Dynamic Space")
2657 MediaList                       = uint32("media_list", "Media List")
2658 MediaListCount                  = uint32("media_list_count", "Media List Count")
2659 MediaName                       = nstring8("media_name", "Media Name")
2660 MediaNumber                     = uint32("media_number", "Media Number")
2661 MediaObjectType                 = val_string8("media_object_type", "Object Type", [
2662         [ 0x00, "Adapter" ],
2663         [ 0x01, "Changer" ],
2664         [ 0x02, "Removable Device" ],
2665         [ 0x03, "Device" ],
2666         [ 0x04, "Removable Media" ],
2667         [ 0x05, "Partition" ],
2668         [ 0x06, "Slot" ],
2669         [ 0x07, "Hotfix" ],
2670         [ 0x08, "Mirror" ],
2671         [ 0x09, "Parity" ],
2672         [ 0x0a, "Volume Segment" ],
2673         [ 0x0b, "Volume" ],
2674         [ 0x0c, "Clone" ],
2675         [ 0x0d, "Fixed Media" ],
2676         [ 0x0e, "Unknown" ],
2677 ])        
2678 MemberName                      = nstring8("member_name", "Member Name")
2679 MemberType                      = val_string16("member_type", "Member Type", [
2680         [ 0x0000,       "Unknown" ],
2681         [ 0x0001,       "User" ],
2682         [ 0x0002,       "User group" ],
2683         [ 0x0003,       "Print queue" ],
2684         [ 0x0004,       "NetWare file server" ],
2685         [ 0x0005,       "Job server" ],
2686         [ 0x0006,       "Gateway" ],
2687         [ 0x0007,       "Print server" ],
2688         [ 0x0008,       "Archive queue" ],
2689         [ 0x0009,       "Archive server" ],
2690         [ 0x000a,       "Job queue" ],
2691         [ 0x000b,       "Administration" ],
2692         [ 0x0021,       "NAS SNA gateway" ],
2693         [ 0x0026,       "Remote bridge server" ],
2694         [ 0x0027,       "TCP/IP gateway" ],
2695 ])
2696 MessageLanguage                 = uint32("message_language", "NLM Language")
2697 MigratedFiles                   = uint32("migrated_files", "Migrated Files")
2698 MigratedSectors                 = uint32("migrated_sectors", "Migrated Sectors")
2699 MinorVersion                    = uint32("minor_version", "Minor Version")
2700 Minute                          = uint8("s_minute", "Minutes")
2701 MixedModePathFlag               = uint8("mixed_mode_path_flag", "Mixed Mode Path Flag")
2702 ModifiedDate                    = uint16("modified_date", "Modified Date")
2703 ModifiedDate.NWDate()
2704 ModifiedTime                    = uint16("modified_time", "Modified Time")
2705 ModifiedTime.NWTime()
2706 ModifierID                      = uint32("modifier_id", "Modifier ID", BE)
2707 ModifierID.Display("BASE_HEX")
2708 ModifyDOSInfoMask               = bitfield16("modify_dos_info_mask", "Modify DOS Info Mask", [
2709         bf_boolean16(0x0002, "modify_dos_read", "Attributes"),
2710         bf_boolean16(0x0004, "modify_dos_write", "Creation Date"),
2711         bf_boolean16(0x0008, "modify_dos_open", "Creation Time"),
2712         bf_boolean16(0x0010, "modify_dos_create", "Creator ID"),
2713         bf_boolean16(0x0020, "modify_dos_delete", "Archive Date"),
2714         bf_boolean16(0x0040, "modify_dos_parent", "Archive Time"),
2715         bf_boolean16(0x0080, "modify_dos_search", "Archiver ID"),
2716         bf_boolean16(0x0100, "modify_dos_mdate", "Modify Date"),
2717         bf_boolean16(0x0200, "modify_dos_mtime", "Modify Time"),
2718         bf_boolean16(0x0400, "modify_dos_mid", "Modifier ID"),
2719         bf_boolean16(0x0800, "modify_dos_laccess", "Last Access"),
2720         bf_boolean16(0x1000, "modify_dos_inheritance", "Inheritance"),
2721         bf_boolean16(0x2000, "modify_dos_max_space", "Maximum Space"),
2722 ])      
2723 Month                           = val_string8("s_month", "Month", [
2724         [ 0x01, "January"],
2725         [ 0x02, "Febuary"],
2726         [ 0x03, "March"],
2727         [ 0x04, "April"],
2728         [ 0x05, "May"],
2729         [ 0x06, "June"],
2730         [ 0x07, "July"],
2731         [ 0x08, "August"],
2732         [ 0x09, "September"],
2733         [ 0x0a, "October"],
2734         [ 0x0b, "November"],
2735         [ 0x0c, "December"],
2736 ])
2737
2738 MoreFlag                        = val_string8("more_flag", "More Flag", [
2739         [ 0x00, "No More Segments/Entries Available" ],
2740         [ 0x01, "More Segments/Entries Available" ],
2741         [ 0xff, "More Segments/Entries Available" ],
2742 ])
2743 MoreProperties                  = val_string8("more_properties", "More Properties", [
2744         [ 0x00, "No More Properties Available" ],
2745         [ 0x01, "No More Properties Available" ],
2746         [ 0xff, "More Properties Available" ],
2747 ])
2748
2749 Name                            = nstring8("name", "Name")
2750 Name12                          = fw_string("name12", "Name", 12)
2751 NameLen                         = uint8("name_len", "Name Space Length")
2752 NameLength                      = uint8("name_length", "Name Length")
2753 NameList                        = uint32("name_list", "Name List")
2754 #
2755 # XXX - should this value be used to interpret the characters in names,
2756 # search patterns, and the like?
2757 #
2758 # We need to handle character sets better, e.g. translating strings
2759 # from whatever character set they are in the packet (DOS/Windows code
2760 # pages, ISO character sets, UNIX EUC character sets, UTF-8, UCS-2/Unicode,
2761 # Mac character sets, etc.) into UCS-4 or UTF-8 and storing them as such
2762 # in the protocol tree, and displaying them as best we can.
2763 #
2764 NameSpace                       = val_string8("name_space", "Name Space", [
2765         [ 0x00, "DOS" ],
2766         [ 0x01, "MAC" ],
2767         [ 0x02, "NFS" ],
2768         [ 0x03, "FTAM" ],
2769         [ 0x04, "OS/2, Long" ],
2770 ])
2771 NamesSpaceInfoMask                      = bitfield16("ns_info_mask", "Names Space Info Mask", [
2772         bf_boolean16(0x0001, "ns_info_mask_modify", "Modify Name"),
2773         bf_boolean16(0x0002, "ns_info_mask_fatt", "File Attributes"),
2774         bf_boolean16(0x0004, "ns_info_mask_cdate", "Creation Date"),
2775         bf_boolean16(0x0008, "ns_info_mask_ctime", "Creation Time"),
2776         bf_boolean16(0x0010, "ns_info_mask_owner", "Owner ID"),
2777         bf_boolean16(0x0020, "ns_info_mask_adate", "Archive Date"),
2778         bf_boolean16(0x0040, "ns_info_mask_atime", "Archive Time"),
2779         bf_boolean16(0x0080, "ns_info_mask_aid", "Archiver ID"),
2780         bf_boolean16(0x0100, "ns_info_mask_udate", "Update Date"),
2781         bf_boolean16(0x0200, "ns_info_mask_utime", "Update Time"),
2782         bf_boolean16(0x0400, "ns_info_mask_uid", "Update ID"),
2783         bf_boolean16(0x0800, "ns_info_mask_acc_date", "Access Date"),
2784         bf_boolean16(0x1000, "ns_info_mask_max_acc_mask", "Inheritance"),
2785         bf_boolean16(0x2000, "ns_info_mask_max_space", "Maximum Space"),
2786 ])
2787 NameSpaceName                   = nstring8("name_space_name", "Name Space Name")
2788 nameType                        = uint32("name_type", "nameType")
2789 NCPdataSize                     = uint32("ncp_data_size", "NCP Data Size")
2790 NCPextensionMajorVersion        = uint8("ncp_extension_major_version", "NCP Extension Major Version")
2791 NCPextensionMinorVersion        = uint8("ncp_extension_minor_version", "NCP Extension Minor Version")
2792 NCPextensionName                = nstring8("ncp_extension_name", "NCP Extension Name")
2793 NCPextensionNumber              = uint32("ncp_extension_number", "NCP Extension Number")
2794 NCPextensionNumber.Display("BASE_HEX")
2795 NCPExtensionNumbers             = uint32("ncp_extension_numbers", "NCP Extension Numbers")
2796 NCPextensionRevisionNumber      = uint8("ncp_extension_revision_number", "NCP Extension Revision Number")
2797 NCPPeakStaInUse                 = uint32("ncp_peak_sta_in_use", "Peak Number of Connections since Server was brought up")
2798 NCPStaInUseCnt                  = uint32("ncp_sta_in_use", "Number of Workstations Connected to Server")
2799 NDSRequestFlags                 = bitfield16("nds_request_flags", "NDS Request Flags", [
2800         bf_boolean16(0x0001, "nds_request_flags_output", "Output Fields"),
2801         bf_boolean16(0x0002, "nds_request_flags_no_such_entry", "No Such Entry"),
2802         bf_boolean16(0x0004, "nds_request_flags_local_entry", "Local Entry"),
2803         bf_boolean16(0x0008, "nds_request_flags_type_ref", "Type Referral"),
2804         bf_boolean16(0x0010, "nds_request_flags_alias_ref", "Alias Referral"),
2805         bf_boolean16(0x0020, "nds_request_flags_req_cnt", "Request Count"),
2806         bf_boolean16(0x0040, "nds_request_flags_req_data_size", "Request Data Size"),
2807         bf_boolean16(0x0080, "nds_request_flags_reply_data_size", "Reply Data Size"),
2808         bf_boolean16(0x0100, "nds_request_flags_trans_ref", "Transport Referral"),
2809         bf_boolean16(0x0200, "nds_request_flags_trans_ref2", "Transport Referral"),
2810         bf_boolean16(0x0400, "nds_request_flags_up_ref", "Up Referral"),
2811         bf_boolean16(0x0800, "nds_request_flags_dn_ref", "Down Referral"),
2812 ])      
2813 NDSStatus                       = uint32("nds_status", "NDS Status")
2814 NetBIOSBroadcastWasPropogated   = uint32("netbios_broadcast_was_propogated", "NetBIOS Broadcast Was Propogated")
2815 NetIDNumber                     = uint32("net_id_number", "Net ID Number")
2816 NetIDNumber.Display("BASE_HEX")
2817 NetAddress                      = nbytes32("address", "Address")
2818 NetStatus                       = uint16("net_status", "Network Status")
2819 NetWareAccessHandle             = bytes("netware_access_handle", "NetWare Access Handle", 6)
2820 NetworkAddress                  = uint32("network_address", "Network Address")
2821 NetworkAddress.Display("BASE_HEX")
2822 NetworkNodeAddress              = bytes("network_node_address", "Network Node Address", 6)
2823 NetworkNumber                   = uint32("network_number", "Network Number")
2824 NetworkNumber.Display("BASE_HEX")
2825 #
2826 # XXX - this should have the "ipx_socket_vals" value_string table
2827 # from "packet-ipx.c".
2828 #
2829 NetworkSocket                   = uint16("network_socket", "Network Socket")
2830 NetworkSocket.Display("BASE_HEX")
2831 NewAccessRights                 = bitfield16("new_access_rights_mask", "New Access Rights", [
2832         bf_boolean16(0x0001, "new_access_rights_read", "Read"),
2833         bf_boolean16(0x0002, "new_access_rights_write", "Write"),
2834         bf_boolean16(0x0004, "new_access_rights_open", "Open"),
2835         bf_boolean16(0x0008, "new_access_rights_create", "Create"),
2836         bf_boolean16(0x0010, "new_access_rights_delete", "Delete"),
2837         bf_boolean16(0x0020, "new_access_rights_parental", "Parental"),
2838         bf_boolean16(0x0040, "new_access_rights_search", "Search"),
2839         bf_boolean16(0x0080, "new_access_rights_modify", "Modify"),
2840         bf_boolean16(0x0100, "new_access_rights_supervisor", "Supervisor"),
2841 ])
2842 NewDirectoryID                  = uint32("new_directory_id", "New Directory ID", BE)
2843 NewDirectoryID.Display("BASE_HEX")
2844 NewEAHandle                     = uint32("new_ea_handle", "New EA Handle")
2845 NewEAHandle.Display("BASE_HEX")
2846 NewFileName                     = fw_string("new_file_name", "New File Name", 14)
2847 NewFileNameLen                  = nstring8("new_file_name_len", "New File Name")
2848 NewFileSize                     = uint32("new_file_size", "New File Size")
2849 NewPassword                     = nstring8("new_password", "New Password")
2850 NewPath                         = nstring8("new_path", "New Path")
2851 NewPosition                     = uint8("new_position", "New Position")
2852 NewObjectName                   = nstring8("new_object_name", "New Object Name")
2853 NextCntBlock                    = uint32("next_cnt_block", "Next Count Block")
2854 NextHugeStateInfo               = bytes("next_huge_state_info", "Next Huge State Info", 16)
2855 nextLimbScanNum                 = uint32("next_limb_scan_num", "Next Limb Scan Number")
2856 NextObjectID                    = uint32("next_object_id", "Next Object ID", BE)
2857 NextObjectID.Display("BASE_HEX")
2858 NextRecord                      = uint32("next_record", "Next Record")
2859 NextRequestRecord               = uint16("next_request_record", "Next Request Record")
2860 NextSearchIndex                 = uint16("next_search_index", "Next Search Index")
2861 NextSearchNumber                = uint16("next_search_number", "Next Search Number")
2862 NextSearchNum                   = uint32("nxt_search_num", "Next Search Number")
2863 nextStartingNumber              = uint32("next_starting_number", "Next Starting Number")
2864 NextTrusteeEntry                = uint32("next_trustee_entry", "Next Trustee Entry")
2865 NextVolumeNumber                = uint32("next_volume_number", "Next Volume Number")
2866 NLMBuffer                       = nstring8("nlm_buffer", "Buffer")
2867 NLMcount                        = uint32("nlm_count", "NLM Count")
2868 NLMFlags                        = bitfield8("nlm_flags", "Flags", [
2869         bf_boolean8(0x01, "nlm_flags_reentrant", "ReEntrant"),
2870         bf_boolean8(0x02, "nlm_flags_multiple", "Can Load Multiple Times"),
2871         bf_boolean8(0x04, "nlm_flags_synchronize", "Synchronize Start"),
2872         bf_boolean8(0x08, "nlm_flags_pseudo", "PseudoPreemption"),
2873 ])
2874 NLMLoadOptions                  = uint32("nlm_load_options", "NLM Load Options")
2875 NLMName                         = stringz("nlm_name_stringz", "NLM Name")
2876 NLMNumber                       = uint32("nlm_number", "NLM Number")
2877 NLMNumbers                      = uint32("nlm_numbers", "NLM Numbers")
2878 NLMsInList                      = uint32("nlms_in_list", "NLM's in List")
2879 NLMStartNumber                  = uint32("nlm_start_num", "NLM Start Number")
2880 NLMType                         = val_string8("nlm_type", "NLM Type", [
2881         [ 0x00, "Generic NLM (.NLM)" ],
2882         [ 0x01, "LAN Driver (.LAN)" ],
2883         [ 0x02, "Disk Driver (.DSK)" ],
2884         [ 0x03, "Name Space Support Module (.NAM)" ],
2885         [ 0x04, "Utility or Support Program (.NLM)" ],
2886         [ 0x05, "Mirrored Server Link (.MSL)" ],
2887         [ 0x06, "OS NLM (.NLM)" ],
2888         [ 0x07, "Paged High OS NLM (.NLM)" ],
2889         [ 0x08, "Host Adapter Module (.HAM)" ],
2890         [ 0x09, "Custom Device Module (.CDM)" ],
2891         [ 0x0a, "File System Engine (.NLM)" ],
2892         [ 0x0b, "Real Mode NLM (.NLM)" ],
2893         [ 0x0c, "Hidden NLM (.NLM)" ],
2894         [ 0x15, "NICI Support (.NLM)" ],
2895         [ 0x16, "NICI Support (.NLM)" ],
2896         [ 0x17, "Cryptography (.NLM)" ],
2897         [ 0x18, "Encryption (.NLM)" ],
2898         [ 0x19, "NICI Support (.NLM)" ],
2899         [ 0x1c, "NICI Support (.NLM)" ],
2900 ])        
2901 nodeFlags                       = uint32("node_flags", "Node Flags")
2902 nodeFlags.Display("BASE_HEX")
2903 NoMoreMemAvlCnt                 = uint32("no_more_mem_avail", "No More Memory Available Count")
2904 NonDedFlag                      = boolean8("non_ded_flag", "Non Dedicated Flag")
2905 NonFreeableAvailableSubAllocSectors = uint32("non_freeable_avail_sub_alloc_sectors", "Non Freeable Available Sub Alloc Sectors")
2906 NonFreeableLimboSectors         = uint32("non_freeable_limbo_sectors", "Non Freeable Limbo Sectors")
2907 NotUsableSubAllocSectors        = uint32("not_usable_sub_alloc_sectors", "Not Usable Sub Alloc Sectors")
2908 NotYetPurgeableBlocks           = uint32("not_yet_purgeable_blocks", "Not Yet Purgeable Blocks")
2909 NSInfoBitMask                   = uint32("ns_info_bit_mask", "Name Space Info Bit Mask")
2910 NSSOAllInFlags                  = bitfield32("nsso_all_in_flags", "SecretStore All Input Flags",[
2911         bf_boolean32(0x00000010, "nsso_all_unicode", "Unicode Data"),
2912         bf_boolean32(0x00000080, "nsso_set_tree", "Set Tree"),
2913         bf_boolean32(0x00000200, "nsso_destroy_ctx", "Destroy Context"),
2914 ])
2915 NSSOGetServiceInFlags           = bitfield32("nsso_get_svc_in_flags", "SecretStore Get Service Flags",[
2916         bf_boolean32(0x00000100, "nsso_get_ctx", "Get Context"),
2917 ])
2918 NSSOReadInFlags                 = bitfield32("nsso_read_in_flags", "SecretStore Read Flags",[
2919         bf_boolean32(0x00000001, "nsso_rw_enh_prot", "Read/Write Enhanced Protection"),
2920         bf_boolean32(0x00000008, "nsso_repair", "Repair SecretStore"),
2921 ])
2922 NSSOReadOrUnlockInFlags         = bitfield32("nsso_read_or_unlock_in_flags", "SecretStore Read or Unlock Flags",[
2923         bf_boolean32(0x00000004, "nsso_ep_master_pwd", "Master Password used instead of ENH Password"),
2924 ])
2925 NSSOUnlockInFlags               = bitfield32("nsso_unlock_in_flags", "SecretStore Unlock Flags",[
2926         bf_boolean32(0x00000004, "nsso_rmv_lock", "Remove Lock from Store"),
2927 ])
2928 NSSOWriteInFlags                = bitfield32("nsso_write_in_flags", "SecretStore Write Flags",[
2929         bf_boolean32(0x00000001, "nsso_enh_prot", "Enhanced Protection"),
2930         bf_boolean32(0x00000002, "nsso_create_id", "Create ID"),
2931         bf_boolean32(0x00000040, "nsso_ep_pwd_used", "Enhanced Protection Password Used"),
2932 ])
2933 NSSOContextOutFlags             = bitfield32("nsso_cts_out_flags", "Type of Context",[ 
2934         bf_boolean32(0x00000001, "nsso_ds_ctx", "DSAPI Context"),
2935         bf_boolean32(0x00000080, "nsso_ldap_ctx", "LDAP Context"),
2936         bf_boolean32(0x00000200, "nsso_dc_ctx", "Reserved"),
2937 ])
2938 NSSOGetServiceOutFlags          = bitfield32("nsso_get_svc_out_flags", "SecretStore Status Flags",[ 
2939         bf_boolean32(0x00400000, "nsso_mstr_pwd", "Master Password Present"),
2940 ])
2941 NSSOGetServiceReadOutFlags      = bitfield32("nsso_get_svc_read_out_flags", "SecretStore Status Flags",[
2942         bf_boolean32(0x00800000, "nsso_mp_disabled", "Master Password Disabled"),
2943 ])
2944 NSSOReadOutFlags                = bitfield32("nsso_read_out_flags", "SecretStore Read Flags",[
2945         bf_boolean32(0x00010000, "nsso_secret_locked", "Enhanced Protection Lock on Secret"),
2946         bf_boolean32(0x00020000, "nsso_secret_not_init", "Secret Not Yet Initialized"),
2947         bf_boolean32(0x00040000, "nsso_secret_marked", "Secret Marked for Enhanced Protection"),
2948         bf_boolean32(0x00080000, "nsso_secret_not_sync", "Secret Not Yet Synchronized in NDS"),
2949         bf_boolean32(0x00200000, "nsso_secret_enh_pwd", "Enhanced Protection Password on Secret"),
2950 ])
2951 NSSOReadOutStatFlags            = bitfield32("nsso_read_out_stat_flags", "SecretStore Read Status Flags",[
2952         bf_boolean32(0x00100000, "nsso_admin_mod", "Admin Modified Secret Last"),
2953 ])
2954 NSSOVerb                        = val_string8("nsso_verb", "SecretStore Verb", [
2955         [ 0x00, "Query Server" ],
2956         [ 0x01, "Read App Secrets" ],
2957         [ 0x02, "Write App Secrets" ],
2958         [ 0x03, "Add Secret ID" ],
2959         [ 0x04, "Remove Secret ID" ],
2960         [ 0x05, "Remove SecretStore" ],
2961         [ 0x06, "Enumerate SecretID's" ],
2962         [ 0x07, "Unlock Store" ],
2963         [ 0x08, "Set Master Password" ],
2964         [ 0x09, "Get Service Information" ],
2965 ])        
2966 NSSpecificInfo                  = fw_string("ns_specific_info", "Name Space Specific Info", 512)                                         
2967 NumberOfAllocs                  = uint32("num_of_allocs", "Number of Allocations")
2968 NumberOfAttributes              = uint32("number_of_attributes", "Number of Attributes")
2969 NumberOfCPUs                    = uint32("number_of_cpus", "Number of CPU's")
2970 NumberOfDataStreams             = uint16("number_of_data_streams", "Number of Data Streams")
2971 NumberOfDynamicMemoryAreas      = uint16("number_of_dynamic_memory_areas", "Number Of Dynamic Memory Areas")
2972 NumberOfEntries                 = uint8("number_of_entries", "Number of Entries")
2973 NumberOfLocks                   = uint8("number_of_locks", "Number of Locks")
2974 NumberOfMinutesToDelay          = uint32("number_of_minutes_to_delay", "Number of Minutes to Delay")
2975 NumberOfNCPExtensions           = uint32("number_of_ncp_extensions", "Number Of NCP Extensions")
2976 NumberOfNSLoaded                = uint16("number_of_ns_loaded", "Number Of Name Spaces Loaded")
2977 NumberOfProtocols               = uint8("number_of_protocols", "Number of Protocols")
2978 NumberOfRecords                 = uint16("number_of_records", "Number of Records")
2979 NumberOfReferencedPublics       = uint32("num_of_ref_publics", "Number of Referenced Public Symbols") 
2980 NumberOfSemaphores              = uint16("number_of_semaphores", "Number Of Semaphores")
2981 NumberOfServiceProcesses        = uint8("number_of_service_processes", "Number Of Service Processes")
2982 NumberOfSetCategories           = uint32("number_of_set_categories", "Number Of Set Categories")
2983 NumberOfSMs                     = uint32("number_of_sms", "Number Of Storage Medias")
2984 NumberOfStations                = uint8("number_of_stations", "Number of Stations")
2985 NumBytes                        = uint16("num_bytes", "Number of Bytes")
2986 NumOfCCinPkt                    = uint32("num_of_cc_in_pkt", "Number of Custom Counters in Packet")
2987 NumOfChecks                     = uint32("num_of_checks", "Number of Checks")
2988 NumOfEntries                    = uint32("num_of_entries", "Number of Entries")
2989 NumOfFilesMigrated              = uint32("num_of_files_migrated", "Number Of Files Migrated")
2990 NumOfGarbageColl                = uint32("num_of_garb_coll", "Number of Garbage Collections")
2991 NumOfNCPReqs                    = uint32("num_of_ncp_reqs", "Number of NCP Requests since Server was brought up")
2992 NumOfSegments                   = uint32("num_of_segments", "Number of Segments")
2993
2994 ObjectCount                     = uint32("object_count", "Object Count")
2995 ObjectFlags                     = val_string8("object_flags", "Object Flags", [
2996         [ 0x00, "Dynamic object" ],
2997         [ 0x01, "Static object" ],
2998 ])
2999 ObjectHasProperties             = val_string8("object_has_properites", "Object Has Properties", [
3000         [ 0x00, "No properties" ],
3001         [ 0xff, "One or more properties" ],
3002 ])
3003 ObjectID                        = uint32("object_id", "Object ID", BE)
3004 ObjectID.Display('BASE_HEX')
3005 ObjectIDCount                   = uint16("object_id_count", "Object ID Count")
3006 ObjectIDInfo                    = uint32("object_id_info", "Object Information")
3007 ObjectInfoReturnCount           = uint32("object_info_rtn_count", "Object Information Count")
3008 ObjectName                      = nstring8("object_name", "Object Name")
3009 ObjectNameLen                   = fw_string("object_name_len", "Object Name", 48)
3010 ObjectNameStringz               = stringz("object_name_stringz", "Object Name")
3011 ObjectNumber                    = uint32("object_number", "Object Number")
3012 ObjectSecurity                  = val_string8("object_security", "Object Security", [
3013         [ 0x00, "Object Read (Anyone) / Object Write (Anyone)" ],
3014         [ 0x01, "Object Read (Logged in) / Object Write (Anyone)" ],
3015         [ 0x02, "Object Read (Logged in as Object) / Object Write (Anyone)" ],
3016         [ 0x03, "Object Read (Supervisor) / Object Write (Anyone)" ],
3017         [ 0x04, "Object Read (Operating System Only) / Object Write (Anyone)" ],
3018         [ 0x10, "Object Read (Anyone) / Object Write (Logged in)" ],
3019         [ 0x11, "Object Read (Logged in) / Object Write (Logged in)" ],
3020         [ 0x12, "Object Read (Logged in as Object) / Object Write (Logged in)" ],
3021         [ 0x13, "Object Read (Supervisor) / Object Write (Logged in)" ],
3022         [ 0x14, "Object Read (Operating System Only) / Object Write (Logged in)" ],
3023         [ 0x20, "Object Read (Anyone) / Object Write (Logged in as Object)" ],
3024         [ 0x21, "Object Read (Logged in) / Object Write (Logged in as Object)" ],
3025         [ 0x22, "Object Read (Logged in as Object) / Object Write (Logged in as Object)" ],
3026         [ 0x23, "Object Read (Supervisor) / Object Write (Logged in as Object)" ],
3027         [ 0x24, "Object Read (Operating System Only) / Object Write (Logged in as Object)" ],
3028         [ 0x30, "Object Read (Anyone) / Object Write (Supervisor)" ],
3029         [ 0x31, "Object Read (Logged in) / Object Write (Supervisor)" ],
3030         [ 0x32, "Object Read (Logged in as Object) / Object Write (Supervisor)" ],
3031         [ 0x33, "Object Read (Supervisor) / Object Write (Supervisor)" ],
3032         [ 0x34, "Object Read (Operating System Only) / Object Write (Supervisor)" ],
3033         [ 0x40, "Object Read (Anyone) / Object Write (Operating System Only)" ],
3034         [ 0x41, "Object Read (Logged in) / Object Write (Operating System Only)" ],
3035         [ 0x42, "Object Read (Logged in as Object) / Object Write (Operating System Only)" ],
3036         [ 0x43, "Object Read (Supervisor) / Object Write (Operating System Only)" ],
3037         [ 0x44, "Object Read (Operating System Only) / Object Write (Operating System Only)" ],
3038 ])
3039 #
3040 # XXX - should this use the "server_vals[]" value_string array from
3041 # "packet-ipx.c"?
3042 #
3043 # XXX - should this list be merged with that list?  There are some
3044 # oddities, e.g. this list has 0x03f5 for "Microsoft SQL Server", but
3045 # the list from "packet-ipx.c" has 0xf503 for that - is that just
3046 # byte-order confusion?
3047 #
3048 ObjectType                      = val_string16("object_type", "Object Type", [
3049         [ 0x0000,       "Unknown" ],
3050         [ 0x0001,       "User" ],
3051         [ 0x0002,       "User group" ],
3052         [ 0x0003,       "Print queue" ],
3053         [ 0x0004,       "NetWare file server" ],
3054         [ 0x0005,       "Job server" ],
3055         [ 0x0006,       "Gateway" ],
3056         [ 0x0007,       "Print server" ],
3057         [ 0x0008,       "Archive queue" ],
3058         [ 0x0009,       "Archive server" ],
3059         [ 0x000a,       "Job queue" ],
3060         [ 0x000b,       "Administration" ],
3061         [ 0x0021,       "NAS SNA gateway" ],
3062         [ 0x0026,       "Remote bridge server" ],
3063         [ 0x0027,       "TCP/IP gateway" ],
3064         [ 0x0047,       "Novell Print Server" ],
3065         [ 0x004b,       "Btrieve Server" ],
3066         [ 0x004c,       "NetWare SQL Server" ],
3067         [ 0x0064,       "ARCserve" ],
3068         [ 0x0066,       "ARCserve 3.0" ],
3069         [ 0x0076,       "NetWare SQL" ],
3070         [ 0x00a0,       "Gupta SQL Base Server" ],
3071         [ 0x00a1,       "Powerchute" ],
3072         [ 0x0107,       "NetWare Remote Console" ],
3073         [ 0x01cb,       "Shiva NetModem/E" ],
3074         [ 0x01cc,       "Shiva LanRover/E" ],
3075         [ 0x01cd,       "Shiva LanRover/T" ],
3076         [ 0x01d8,       "Castelle FAXPress Server" ],
3077         [ 0x01da,       "Castelle Print Server" ],
3078         [ 0x01dc,       "Castelle Fax Server" ],
3079         [ 0x0200,       "Novell SQL Server" ],
3080         [ 0x023a,       "NetWare Lanalyzer Agent" ],
3081         [ 0x023c,       "DOS Target Service Agent" ],
3082         [ 0x023f,       "NetWare Server Target Service Agent" ],
3083         [ 0x024f,       "Appletalk Remote Access Service" ],
3084         [ 0x0263,       "NetWare Management Agent" ],
3085         [ 0x0264,       "Global MHS" ],
3086         [ 0x0265,       "SNMP" ],
3087         [ 0x026a,       "NetWare Management/NMS Console" ],
3088         [ 0x026b,       "NetWare Time Synchronization" ],
3089         [ 0x0273,       "Nest Device" ],
3090         [ 0x0274,       "GroupWise Message Multiple Servers" ],
3091         [ 0x0278,       "NDS Replica Server" ],
3092         [ 0x0282,       "NDPS Service Registry Service" ],
3093         [ 0x028a,       "MPR/IPX Address Mapping Gateway" ],
3094         [ 0x028b,       "ManageWise" ],
3095         [ 0x0293,       "NetWare 6" ],
3096         [ 0x030c,       "HP JetDirect" ],
3097         [ 0x0328,       "Watcom SQL Server" ],
3098         [ 0x0355,       "Backup Exec" ],
3099         [ 0x039b,       "Lotus Notes" ],
3100         [ 0x03e1,       "Univel Server" ],
3101         [ 0x03f5,       "Microsoft SQL Server" ],
3102         [ 0x055e,       "Lexmark Print Server" ],
3103         [ 0x0640,       "Microsoft Gateway Services for NetWare" ],
3104         [ 0x064e,       "Microsoft Internet Information Server" ],
3105         [ 0x077b,       "Advantage Database Server" ],
3106         [ 0x07a7,       "Backup Exec Job Queue" ],
3107         [ 0x07a8,       "Backup Exec Job Manager" ],
3108         [ 0x07a9,       "Backup Exec Job Service" ],
3109         [ 0x5555,       "Site Lock" ],
3110         [ 0x8202,       "NDPS Broker" ],
3111 ])
3112 OCRetFlags                      = val_string8("o_c_ret_flags", "Open Create Return Flags", [
3113         [ 0x00, "No CallBack has been registered (No Op-Lock)" ],
3114         [ 0x01, "Request has been registered for CallBack (Op-Lock)" ],
3115 ])
3116 OldestDeletedFileAgeInTicks     = uint32("oldest_deleted_file_age_in_ticks", "Oldest Deleted File Age in Ticks")
3117 OldFileName                     = bytes("old_file_name", "Old File Name", 15)
3118 OldFileSize                     = uint32("old_file_size", "Old File Size")
3119 OpenCount                       = uint16("open_count", "Open Count")
3120 OpenCreateAction                = bitfield8("open_create_action", "Open Create Action", [
3121         bf_boolean8(0x01, "open_create_action_opened", "Opened"),
3122         bf_boolean8(0x02, "open_create_action_created", "Created"),
3123         bf_boolean8(0x04, "open_create_action_replaced", "Replaced"),
3124         bf_boolean8(0x08, "open_create_action_compressed", "Compressed"),
3125         bf_boolean8(0x80, "open_create_action_read_only", "Read Only"),
3126 ])      
3127 OpenCreateMode                  = bitfield8("open_create_mode", "Open Create Mode", [
3128         bf_boolean8(0x01, "open_create_mode_open", "Open existing file (file must exist)"),
3129         bf_boolean8(0x02, "open_create_mode_replace", "Replace existing file"),
3130         bf_boolean8(0x08, "open_create_mode_create", "Create new file or subdirectory (file or subdirectory cannot exist)"),
3131         bf_boolean8(0x80, "open_create_mode_oplock", "Open Callback (Op-Lock)"),
3132 ])
3133 OpenForReadCount                = uint16("open_for_read_count", "Open For Read Count")
3134 OpenForWriteCount               = uint16("open_for_write_count", "Open For Write Count")
3135 OpenRights                      = bitfield8("open_rights", "Open Rights", [
3136         bf_boolean8(0x01, "open_rights_read_only", "Read Only"),
3137         bf_boolean8(0x02, "open_rights_write_only", "Write Only"),
3138         bf_boolean8(0x04, "open_rights_deny_read", "Deny Read"),
3139         bf_boolean8(0x08, "open_rights_deny_write", "Deny Write"),
3140         bf_boolean8(0x10, "open_rights_compat", "Compatibility"),
3141         bf_boolean8(0x40, "open_rights_write_thru", "Write Through"),
3142 ])
3143 OptionNumber                    = uint8("option_number", "Option Number")
3144 originalSize                    = uint32("original_size", "Original Size")
3145 OSLanguageID                    = uint8("os_language_id", "OS Language ID")
3146 OSMajorVersion                  = uint8("os_major_version", "OS Major Version")
3147 OSMinorVersion                  = uint8("os_minor_version", "OS Minor Version")
3148 OSRevision                      = uint8("os_revision", "OS Revision")
3149 OtherFileForkSize               = uint32("other_file_fork_size", "Other File Fork Size")
3150 OtherFileForkFAT                = uint32("other_file_fork_fat", "Other File Fork FAT Entry")
3151 OutgoingPacketDiscardedNoTurboBuffer = uint16("outgoing_packet_discarded_no_turbo_buffer", "Outgoing Packet Discarded No Turbo Buffer")
3152
3153 PacketsDiscardedByHopCount      = uint16("packets_discarded_by_hop_count", "Packets Discarded By Hop Count")
3154 PacketsDiscardedUnknownNet      = uint16("packets_discarded_unknown_net", "Packets Discarded Unknown Net")
3155 PacketsFromInvalidConnection    = uint16("packets_from_invalid_connection", "Packets From Invalid Connection")
3156 PacketsReceivedDuringProcessing = uint16("packets_received_during_processing", "Packets Received During Processing")
3157 PacketsWithBadRequestType       = uint16("packets_with_bad_request_type", "Packets With Bad Request Type")
3158 PacketsWithBadSequenceNumber    = uint16("packets_with_bad_sequence_number", "Packets With Bad Sequence Number")
3159 PageTableOwnerFlag              = uint32("page_table_owner_flag", "Page Table Owner")
3160 ParentID                        = uint32("parent_id", "Parent ID")
3161 ParentID.Display("BASE_HEX")
3162 ParentBaseID                    = uint32("parent_base_id", "Parent Base ID")
3163 ParentBaseID.Display("BASE_HEX")
3164 ParentDirectoryBase             = uint32("parent_directory_base", "Parent Directory Base")
3165 ParentDOSDirectoryBase          = uint32("parent_dos_directory_base", "Parent DOS Directory Base")
3166 ParentObjectNumber              = uint32("parent_object_number", "Parent Object Number")
3167 ParentObjectNumber.Display("BASE_HEX")
3168 Password                        = nstring8("password", "Password")
3169 PathBase                        = uint8("path_base", "Path Base")
3170 PathComponentCount              = uint16("path_component_count", "Path Component Count")
3171 PathComponentSize               = uint16("path_component_size", "Path Component Size")
3172 PathCookieFlags                 = val_string16("path_cookie_flags", "Path Cookie Flags", [
3173         [ 0x0000, "Last component is Not a File Name" ],
3174         [ 0x0001, "Last component is a File Name" ],
3175 ])
3176 PathCount                       = uint8("path_count", "Path Count")
3177 Path                            = nstring8("path", "Path")
3178 PathAndName                     = stringz("path_and_name", "Path and Name")
3179 PendingIOCommands               = uint16("pending_io_commands", "Pending IO Commands")
3180 PhysicalDiskNumber              = uint8("physical_disk_number", "Physical Disk Number")
3181 PhysicalDriveCount              = uint8("physical_drive_count", "Physical Drive Count")
3182 PhysicalLockThreshold           = uint8("physical_lock_threshold", "Physical Lock Threshold")
3183 PingVersion                     = uint16("ping_version", "Ping Version")
3184 PositiveAcknowledgesSent        = uint16("positive_acknowledges_sent", "Positive Acknowledges Sent")
3185 PreCompressedSectors            = uint32("pre_compressed_sectors", "Precompressed Sectors")
3186 PreviousRecord                  = uint32("previous_record", "Previous Record")
3187 PrimaryEntry                    = uint32("primary_entry", "Primary Entry")
3188 PrintFlags                      = bitfield8("print_flags", "Print Flags", [
3189         bf_boolean8(0x08, "print_flags_ff", "Suppress Form Feeds"),
3190         bf_boolean8(0x10, "print_flags_cr", "Create"),
3191         bf_boolean8(0x20, "print_flags_del_spool", "Delete Spool File after Printing"),
3192         bf_boolean8(0x40, "print_flags_exp_tabs", "Expand Tabs in the File"),
3193         bf_boolean8(0x80, "print_flags_banner", "Print Banner Page"),
3194 ])
3195 PrinterHalted                   = val_string8("printer_halted", "Printer Halted", [
3196         [ 0x00, "Printer is not Halted" ],
3197         [ 0xff, "Printer is Halted" ],
3198 ])
3199 PrinterOffLine                  = val_string8( "printer_offline", "Printer Off-Line", [
3200         [ 0x00, "Printer is On-Line" ],
3201         [ 0xff, "Printer is Off-Line" ],
3202 ])
3203 PrintServerVersion              = uint8("print_server_version", "Print Server Version")
3204 Priority                        = uint32("priority", "Priority")
3205 Privileges                      = uint32("privileges", "Login Privileges")
3206 ProcessorType                   = val_string8("processor_type", "Processor Type", [
3207         [ 0x00, "Motorola 68000" ],
3208         [ 0x01, "Intel 8088 or 8086" ],
3209         [ 0x02, "Intel 80286" ],
3210 ])
3211 ProDOSInfo                      = bytes("pro_dos_info", "Pro DOS Info", 6)
3212 ProductMajorVersion             = uint16("product_major_version", "Product Major Version")
3213 ProductMinorVersion             = uint16("product_minor_version", "Product Minor Version")
3214 ProductRevisionVersion          = uint8("product_revision_version", "Product Revision Version")
3215 projectedCompSize               = uint32("projected_comp_size", "Projected Compression Size")
3216 PropertyHasMoreSegments         = val_string8("property_has_more_segments",
3217         "Property Has More Segments", [
3218         [ 0x00, "Is last segment" ],
3219         [ 0xff, "More segments are available" ],
3220 ])
3221 PropertyName                    = nstring8("property_name", "Property Name")
3222 PropertyName16                  = fw_string("property_name_16", "Property Name", 16)
3223 PropertyData                    = bytes("property_data", "Property Data", 128)
3224 PropertySegment                 = uint8("property_segment", "Property Segment")
3225 PropertyType                    = val_string8("property_type", "Property Type", [
3226         [ 0x00, "Display Static property" ],
3227         [ 0x01, "Display Dynamic property" ],
3228         [ 0x02, "Set Static property" ],
3229         [ 0x03, "Set Dynamic property" ],
3230 ])
3231 PropertyValue                   = fw_string("property_value", "Property Value", 128)
3232 ProposedMaxSize                 = uint16("proposed_max_size", "Proposed Max Size")
3233 protocolFlags                   = uint32("protocol_flags", "Protocol Flags")
3234 protocolFlags.Display("BASE_HEX")
3235 PurgeableBlocks                 = uint32("purgeable_blocks", "Purgeable Blocks")
3236 PurgeCcode                      = uint32("purge_c_code", "Purge Completion Code")
3237 PurgeCount                      = uint32("purge_count", "Purge Count")
3238 PurgeFlags                      = val_string16("purge_flags", "Purge Flags", [
3239         [ 0x0000, "Do not Purge All" ],
3240         [ 0x0001, "Purge All" ],
3241         [ 0xffff, "Do not Purge All" ],
3242 ])
3243 PurgeList                       = uint32("purge_list", "Purge List")
3244 PhysicalDiskChannel             = uint8("physical_disk_channel", "Physical Disk Channel")
3245 PhysicalDriveType               = val_string8("physical_drive_type", "Physical Drive Type", [
3246         [ 0x01, "XT" ],
3247         [ 0x02, "AT" ],
3248         [ 0x03, "SCSI" ],
3249         [ 0x04, "Disk Coprocessor" ],
3250         [ 0x05, "PS/2 with MFM Controller" ],
3251         [ 0x06, "PS/2 with ESDI Controller" ],
3252         [ 0x07, "Convergent Technology SBIC" ],
3253 ])      
3254 PhysicalReadErrors              = uint16("physical_read_errors", "Physical Read Errors")
3255 PhysicalReadRequests            = uint32("physical_read_requests", "Physical Read Requests")
3256 PhysicalWriteErrors             = uint16("physical_write_errors", "Physical Write Errors")
3257 PhysicalWriteRequests           = uint32("physical_write_requests", "Physical Write Requests")
3258 PrintToFileFlag                 = boolean8("print_to_file_flag", "Print to File Flag")
3259
3260 QueueID                         = uint32("queue_id", "Queue ID")
3261 QueueID.Display("BASE_HEX")
3262 QueueName                       = nstring8("queue_name", "Queue Name")
3263 QueueStartPosition              = uint32("queue_start_position", "Queue Start Position")
3264 QueueStatus                     = bitfield8("queue_status", "Queue Status", [
3265         bf_boolean8(0x01, "queue_status_new_jobs", "Operator does not want to add jobs to the queue"),
3266         bf_boolean8(0x02, "queue_status_pserver", "Operator does not want additional servers attaching"),
3267         bf_boolean8(0x04, "queue_status_svc_jobs", "Operator does not want servers to service jobs"),
3268 ])
3269 QueueType                       = uint16("queue_type", "Queue Type")
3270 QueueingVersion                 = uint8("qms_version", "QMS Version")
3271
3272 ReadBeyondWrite                 = uint16("read_beyond_write", "Read Beyond Write")
3273 RecordLockCount                 = uint16("rec_lock_count", "Record Lock Count")
3274 RecordStart                     = uint32("record_start", "Record Start")
3275 RecordEnd                       = uint32("record_end", "Record End")
3276 RecordInUseFlag                 = val_string16("record_in_use", "Record in Use", [
3277         [ 0x0000, "Record In Use" ],
3278         [ 0xffff, "Record Not In Use" ],
3279 ])      
3280 RedirectedPrinter               = uint8( "redirected_printer", "Redirected Printer" )
3281 ReferenceCount                  = uint32("reference_count", "Reference Count")
3282 RelationsCount                  = uint16("relations_count", "Relations Count")
3283 ReMirrorCurrentOffset           = uint32("re_mirror_current_offset", "ReMirror Current Offset")
3284 ReMirrorDriveNumber             = uint8("re_mirror_drive_number", "ReMirror Drive Number")
3285 RemoteMaxPacketSize             = uint32("remote_max_packet_size", "Remote Max Packet Size")
3286 RemoteTargetID                  = uint32("remote_target_id", "Remote Target ID")
3287 RemoteTargetID.Display("BASE_HEX")
3288 RemovableFlag                   = uint16("removable_flag", "Removable Flag")
3289 RemoveOpenRights                = bitfield8("remove_open_rights", "Remove Open Rights", [
3290         bf_boolean8(0x01, "remove_open_rights_ro", "Read Only"),
3291         bf_boolean8(0x02, "remove_open_rights_wo", "Write Only"),
3292         bf_boolean8(0x04, "remove_open_rights_dr", "Deny Read"),
3293         bf_boolean8(0x08, "remove_open_rights_dw", "Deny Write"),
3294         bf_boolean8(0x10, "remove_open_rights_comp", "Compatibility"),
3295         bf_boolean8(0x40, "remove_open_rights_write_thru", "Write Through"),
3296 ])
3297 RenameFlag                      = bitfield8("rename_flag", "Rename Flag", [
3298         bf_boolean8(0x01, "rename_flag_ren", "Rename to Myself allows file to be renamed to it's original name"),
3299         bf_boolean8(0x02, "rename_flag_comp", "Compatability allows files that are marked read only to be opened with read/write access"),
3300         bf_boolean8(0x04, "rename_flag_no", "Name Only renames only the specified name space entry name"),
3301 ])
3302 RepliesCancelled                = uint16("replies_cancelled", "Replies Cancelled")
3303 ReplyBuffer                     = nstring8("reply_buffer", "Reply Buffer")
3304 ReplyBufferSize                 = uint32("reply_buffer_size", "Reply Buffer Size")
3305 ReplyQueueJobNumbers            = uint32("reply_queue_job_numbers", "Reply Queue Job Numbers")
3306 RequestBitMap                   = bitfield16("request_bit_map", "Request Bit Map", [
3307         bf_boolean16(0x0001, "request_bit_map_ret_afp_ent", "AFP Entry ID"),
3308         bf_boolean16(0x0002, "request_bit_map_ret_data_fork", "Data Fork Length"),
3309         bf_boolean16(0x0004, "request_bit_map_ret_res_fork", "Resource Fork Length"),
3310         bf_boolean16(0x0008, "request_bit_map_ret_num_off", "Number of Offspring"),
3311         bf_boolean16(0x0010, "request_bit_map_ret_owner", "Owner ID"),
3312         bf_boolean16(0x0020, "request_bit_map_ret_short", "Short Name"),
3313         bf_boolean16(0x0040, "request_bit_map_ret_acc_priv", "Access Privileges"),
3314         bf_boolean16(0x0100, "request_bit_map_ratt", "Return Attributes"),
3315         bf_boolean16(0x0200, "request_bit_map_ret_afp_parent", "AFP Parent Entry ID"),
3316         bf_boolean16(0x0400, "request_bit_map_ret_cr_date", "Creation Date"),
3317         bf_boolean16(0x0800, "request_bit_map_ret_acc_date", "Access Date"),
3318         bf_boolean16(0x1000, "request_bit_map_ret_mod_date", "Modify Date&Time"),
3319         bf_boolean16(0x2000, "request_bit_map_ret_bak_date", "Backup Date&Time"),
3320         bf_boolean16(0x4000, "request_bit_map_ret_finder", "Finder Info"),
3321         bf_boolean16(0x8000, "request_bit_map_ret_long_nm", "Long Name"),
3322 ])              
3323 ResourceForkLen                 = uint32("resource_fork_len", "Resource Fork Len")
3324 RequestCode                     = val_string8("request_code", "Request Code", [
3325         [ 0x00, "Change Logged in to Temporary Authenticated" ],
3326         [ 0x01, "Change Temporary Authenticated to Logged in" ],
3327 ])
3328 RequestData                     = nstring8("request_data", "Request Data")
3329 RequestsReprocessed             = uint16("requests_reprocessed", "Requests Reprocessed")
3330 Reserved                        = uint8( "reserved", "Reserved" )
3331 Reserved2                       = bytes("reserved2", "Reserved", 2)
3332 Reserved3                       = bytes("reserved3", "Reserved", 3)
3333 Reserved4                       = bytes("reserved4", "Reserved", 4)
3334 Reserved6                       = bytes("reserved6", "Reserved", 6)
3335 Reserved8                       = bytes("reserved8", "Reserved", 8)
3336 Reserved10                      = bytes("reserved10", "Reserved", 10)
3337 Reserved12                      = bytes("reserved12", "Reserved", 12)
3338 Reserved16                      = bytes("reserved16", "Reserved", 16)
3339 Reserved20                      = bytes("reserved20", "Reserved", 20)
3340 Reserved28                      = bytes("reserved28", "Reserved", 28)
3341 Reserved36                      = bytes("reserved36", "Reserved", 36)
3342 Reserved44                      = bytes("reserved44", "Reserved", 44)
3343 Reserved48                      = bytes("reserved48", "Reserved", 48)
3344 Reserved51                      = bytes("reserved51", "Reserved", 51)
3345 Reserved56                      = bytes("reserved56", "Reserved", 56)
3346 Reserved64                      = bytes("reserved64", "Reserved", 64)
3347 Reserved120                     = bytes("reserved120", "Reserved", 120)                                  
3348 ReservedOrDirectoryNumber       = uint32("reserved_or_directory_number", "Reserved or Directory Number (see EAFlags)")
3349 ResourceCount                   = uint32("resource_count", "Resource Count")
3350 ResourceForkSize                = uint32("resource_fork_size", "Resource Fork Size")
3351 ResourceName                    = stringz("resource_name", "Resource Name")
3352 ResourceSignature               = fw_string("resource_sig", "Resource Signature", 4)
3353 RestoreTime                     = uint32("restore_time", "Restore Time")
3354 Restriction                     = uint32("restriction", "Disk Space Restriction")
3355 RestrictionsEnforced            = val_string8("restrictions_enforced", "Disk Restrictions Enforce Flag", [
3356         [ 0x00, "Enforced" ],
3357         [ 0xff, "Not Enforced" ],
3358 ])
3359 ReturnInfoCount                 = uint32("return_info_count", "Return Information Count")
3360 ReturnInfoMask                  = bitfield16("ret_info_mask", "Return Information", [
3361         bf_boolean16(0x0001, "ret_info_mask_fname", "Return File Name Information"),
3362         bf_boolean16(0x0002, "ret_info_mask_alloc", "Return Allocation Space Information"),
3363         bf_boolean16(0x0004, "ret_info_mask_attr", "Return Attribute Information"),
3364         bf_boolean16(0x0008, "ret_info_mask_size", "Return Size Information"),
3365         bf_boolean16(0x0010, "ret_info_mask_tspace", "Return Total Space Information"),
3366         bf_boolean16(0x0020, "ret_info_mask_eattr", "Return Extended Attributes Information"),
3367         bf_boolean16(0x0040, "ret_info_mask_arch", "Return Archive Information"),
3368         bf_boolean16(0x0080, "ret_info_mask_mod", "Return Modify Information"),
3369         bf_boolean16(0x0100, "ret_info_mask_create", "Return Creation Information"),
3370         bf_boolean16(0x0200, "ret_info_mask_ns", "Return Name Space Information"),
3371         bf_boolean16(0x0400, "ret_info_mask_dir", "Return Directory Information"),
3372         bf_boolean16(0x0800, "ret_info_mask_rights", "Return Rights Information"),
3373         bf_boolean16(0x1000, "ret_info_mask_id", "Return ID Information"),
3374         bf_boolean16(0x2000, "ret_info_mask_ns_attr", "Return Name Space Attributes Information"),
3375         bf_boolean16(0x4000, "ret_info_mask_actual", "Return Actual Information"),
3376         bf_boolean16(0x8000, "ret_info_mask_logical", "Return Logical Information"),
3377 ])
3378 ReturnedListCount               = uint32("returned_list_count", "Returned List Count")
3379 Revision                        = uint32("revision", "Revision")
3380 RevisionNumber                  = uint8("revision_number", "Revision")
3381 RevQueryFlag                    = val_string8("rev_query_flag", "Revoke Rights Query Flag", [
3382         [ 0x00, "Do not query the locks engine for access rights" ],
3383         [ 0x01, "Query the locks engine and return the access rights" ],
3384 ])
3385 RightsGrantMask                 = bitfield8("rights_grant_mask", "Grant Rights", [
3386         bf_boolean8(0x01, "rights_grant_mask_read", "Read"),
3387         bf_boolean8(0x02, "rights_grant_mask_write", "Write"),
3388         bf_boolean8(0x04, "rights_grant_mask_open", "Open"),
3389         bf_boolean8(0x08, "rights_grant_mask_create", "Create"),
3390         bf_boolean8(0x10, "rights_grant_mask_del", "Delete"),
3391         bf_boolean8(0x20, "rights_grant_mask_parent", "Parental"),
3392         bf_boolean8(0x40, "rights_grant_mask_search", "Search"),
3393         bf_boolean8(0x80, "rights_grant_mask_mod", "Modify"),
3394 ])
3395 RightsRevokeMask                = bitfield8("rights_revoke_mask", "Revoke Rights", [
3396         bf_boolean8(0x01, "rights_revoke_mask_read", "Read"),
3397         bf_boolean8(0x02, "rights_revoke_mask_write", "Write"),
3398         bf_boolean8(0x04, "rights_revoke_mask_open", "Open"),
3399         bf_boolean8(0x08, "rights_revoke_mask_create", "Create"),
3400         bf_boolean8(0x10, "rights_revoke_mask_del", "Delete"),
3401         bf_boolean8(0x20, "rights_revoke_mask_parent", "Parental"),
3402         bf_boolean8(0x40, "rights_revoke_mask_search", "Search"),
3403         bf_boolean8(0x80, "rights_revoke_mask_mod", "Modify"),
3404 ])
3405 RIPSocketNumber                 = uint16("rip_socket_num", "RIP Socket Number")
3406 RIPSocketNumber.Display("BASE_HEX")
3407 RouterDownFlag                  = boolean8("router_dn_flag", "Router Down Flag")
3408 RPCccode                        = val_string16("rpc_c_code", "RPC Completion Code", [
3409         [ 0x0000, "Successful" ],
3410 ])        
3411 RTagNumber                      = uint32("r_tag_num", "Resource Tag Number")
3412 RTagNumber.Display("BASE_HEX")
3413 RpyNearestSrvFlag               = boolean8("rpy_nearest_srv_flag", "Reply to Nearest Server Flag")
3414
3415 SalvageableFileEntryNumber      = uint32("salvageable_file_entry_number", "Salvageable File Entry Number")
3416 SalvageableFileEntryNumber.Display("BASE_HEX")
3417 SAPSocketNumber                 = uint16("sap_socket_number", "SAP Socket Number")
3418 SAPSocketNumber.Display("BASE_HEX")
3419 ScanItems                       = uint32("scan_items", "Number of Items returned from Scan")
3420 SearchAttributes                = bitfield8("sattr", "Search Attributes", [
3421         bf_boolean8(0x01, "sattr_ronly", "Read-Only Files Allowed"),
3422         bf_boolean8(0x02, "sattr_hid", "Hidden Files Allowed"),
3423         bf_boolean8(0x04, "sattr_sys", "System Files Allowed"),
3424         bf_boolean8(0x08, "sattr_exonly", "Execute-Only Files Allowed"),
3425         bf_boolean8(0x10, "sattr_sub", "Subdirectories Only"),
3426         bf_boolean8(0x20, "sattr_archive", "Archive"),
3427         bf_boolean8(0x40, "sattr_execute_confirm", "Execute Confirm"),
3428         bf_boolean8(0x80, "sattr_shareable", "Shareable"),
3429 ])      
3430 SearchAttributesLow             = bitfield16("search_att_low", "Search Attributes", [
3431         bf_boolean16(0x0001, "search_att_read_only", "Read-Only"),
3432         bf_boolean16(0x0002, "search_att_hidden", "Hidden Files Allowed"),
3433         bf_boolean16(0x0004, "search_att_system", "System"),
3434         bf_boolean16(0x0008, "search_att_execute_only", "Execute-Only"),
3435         bf_boolean16(0x0010, "search_att_sub", "Subdirectories Only"),
3436         bf_boolean16(0x0020, "search_att_archive", "Archive"),
3437         bf_boolean16(0x0040, "search_att_execute_confirm", "Execute Confirm"),
3438         bf_boolean16(0x0080, "search_att_shareable", "Shareable"),
3439         bf_boolean16(0x8000, "search_attr_all_files", "All Files and Directories"),
3440 ])
3441 SearchBitMap                            = bitfield8("search_bit_map", "Search Bit Map", [
3442         bf_boolean8(0x01, "search_bit_map_hidden", "Hidden"),
3443         bf_boolean8(0x02, "search_bit_map_sys", "System"),
3444         bf_boolean8(0x04, "search_bit_map_sub", "Subdirectory"),
3445         bf_boolean8(0x08, "search_bit_map_files", "Files"),
3446 ])      
3447 SearchConnNumber                        = uint32("search_conn_number", "Search Connection Number")
3448 SearchInstance                          = uint32("search_instance", "Search Instance")
3449 SearchNumber                            = uint32("search_number", "Search Number")
3450 SearchPattern                           = nstring8("search_pattern", "Search Pattern")
3451 SearchSequence                          = bytes("search_sequence", "Search Sequence", 9)
3452 SearchSequenceWord                      = uint16("search_sequence_word", "Search Sequence", BE)
3453 Second                                  = uint8("s_second", "Seconds")
3454 SecondsRelativeToTheYear2000            = uint32("sec_rel_to_y2k", "Seconds Relative to the Year 2000") 
3455 SecretStoreVerb                         = val_string8("ss_verb", "Secret Store Verb",[
3456         [ 0x00, "Query Server" ],
3457         [ 0x01, "Read App Secrets" ],
3458         [ 0x02, "Write App Secrets" ],
3459         [ 0x03, "Add Secret ID" ],
3460         [ 0x04, "Remove Secret ID" ],
3461         [ 0x05, "Remove SecretStore" ],
3462         [ 0x06, "Enumerate Secret IDs" ],
3463         [ 0x07, "Unlock Store" ],
3464         [ 0x08, "Set Master Password" ],
3465         [ 0x09, "Get Service Information" ],
3466 ])        
3467 SecurityEquivalentList                  = fw_string("security_equiv_list", "Security Equivalent List", 128) 
3468 SecurityFlag                            = bitfield8("security_flag", "Security Flag", [
3469         bf_boolean8(0x01, "checksuming", "Checksumming"),
3470         bf_boolean8(0x02, "signature", "Signature"),
3471         bf_boolean8(0x04, "complete_signatures", "Complete Signatures"),
3472         bf_boolean8(0x08, "encryption", "Encryption"),
3473         bf_boolean8(0x80, "large_internet_packets", "Large Internet Packets (LIP) Disabled"),
3474 ])      
3475 SecurityRestrictionVersion              = uint8("security_restriction_version", "Security Restriction Version")
3476 SectorsPerBlock                         = uint8("sectors_per_block", "Sectors Per Block")
3477 SectorsPerCluster                       = uint16("sectors_per_cluster", "Sectors Per Cluster" )
3478 SectorsPerClusterLong                   = uint32("sectors_per_cluster_long", "Sectors Per Cluster" )
3479 SectorsPerTrack                         = uint8("sectors_per_track", "Sectors Per Track")
3480 SectorSize                              = uint32("sector_size", "Sector Size")
3481 SemaphoreHandle                         = uint32("semaphore_handle", "Semaphore Handle")
3482 SemaphoreName                           = nstring8("semaphore_name", "Semaphore Name")
3483 SemaphoreNameLen                        = uint8("semaphore_name_len", "Semaphore Name Len")
3484 SemaphoreOpenCount                      = uint8("semaphore_open_count", "Semaphore Open Count")
3485 SemaphoreShareCount                     = uint8("semaphore_share_count", "Semaphore Share Count")
3486 SemaphoreTimeOut                        = uint16("semaphore_time_out", "Semaphore Time Out")
3487 SemaphoreValue                          = uint16("semaphore_value", "Semaphore Value")
3488 SendStatus                              = val_string8("send_status", "Send Status", [
3489         [ 0x00, "Successful" ],
3490         [ 0x01, "Illegal Station Number" ],
3491         [ 0x02, "Client Not Logged In" ],
3492         [ 0x03, "Client Not Accepting Messages" ],
3493         [ 0x04, "Client Already has a Message" ],
3494         [ 0x96, "No Alloc Space for the Message" ],
3495         [ 0xfd, "Bad Station Number" ],
3496         [ 0xff, "Failure" ],
3497 ])
3498 SequenceByte                    = uint8("sequence_byte", "Sequence")
3499 SequenceNumber                  = uint32("sequence_number", "Sequence Number")
3500 SequenceNumber.Display("BASE_HEX")
3501 ServerAddress                   = bytes("server_address", "Server Address", 12)
3502 ServerAppNumber                 = uint16("server_app_num", "Server App Number")
3503 ServerIDList                    = uint32("server_id_list", "Server ID List")
3504 ServerID                        = uint32("server_id_number", "Server ID", BE )
3505 ServerID.Display("BASE_HEX")
3506 ServerInfoFlags                 = val_string16("server_info_flags", "Server Information Flags", [
3507         [ 0x0000, "This server is not a member of a Cluster" ],
3508         [ 0x0001, "This server is a member of a Cluster" ],
3509 ])
3510 serverListFlags                 = uint32("server_list_flags", "Server List Flags")
3511 ServerName                      = fw_string("server_name", "Server Name", 48)
3512 serverName50                    = fw_string("server_name50", "Server Name", 50)
3513 ServerNameLen                   = nstring8("server_name_len", "Server Name")
3514 ServerNameStringz               = stringz("server_name_stringz", "Server Name")
3515 ServerNetworkAddress            = bytes("server_network_address", "Server Network Address", 10)
3516 ServerNode                      = bytes("server_node", "Server Node", 6)
3517 ServerSerialNumber              = uint32("server_serial_number", "Server Serial Number")
3518 ServerStation                   = uint8("server_station", "Server Station")
3519 ServerStationLong               = uint32("server_station_long", "Server Station")
3520 ServerStationList               = uint8("server_station_list", "Server Station List")
3521 ServerStatusRecord              = fw_string("server_status_record", "Server Status Record", 64)
3522 ServerTaskNumber                = uint8("server_task_number", "Server Task Number")
3523 ServerTaskNumberLong            = uint32("server_task_number_long", "Server Task Number")
3524 ServerType                      = uint16("server_type", "Server Type")
3525 ServerType.Display("BASE_HEX")
3526 ServerUtilization               = uint32("server_utilization", "Server Utilization")
3527 ServerUtilizationPercentage     = uint8("server_utilization_percentage", "Server Utilization Percentage")
3528 ServiceType                     = val_string16("Service_type", "Service Type", [
3529         [ 0x0000,       "Unknown" ],
3530         [ 0x0001,       "User" ],
3531         [ 0x0002,       "User group" ],
3532         [ 0x0003,       "Print queue" ],
3533         [ 0x0004,       "NetWare file server" ],
3534         [ 0x0005,       "Job server" ],
3535         [ 0x0006,       "Gateway" ],
3536         [ 0x0007,       "Print server" ],
3537         [ 0x0008,       "Archive queue" ],
3538         [ 0x0009,       "Archive server" ],
3539         [ 0x000a,       "Job queue" ],
3540         [ 0x000b,       "Administration" ],
3541         [ 0x0021,       "NAS SNA gateway" ],
3542         [ 0x0026,       "Remote bridge server" ],
3543         [ 0x0027,       "TCP/IP gateway" ],
3544 ])
3545 SetCmdCategory                  = val_string8("set_cmd_catagory", "Set Command Catagory", [
3546         [ 0x00, "Communications" ],
3547         [ 0x01, "Memory" ],
3548         [ 0x02, "File Cache" ],
3549         [ 0x03, "Directory Cache" ],
3550         [ 0x04, "File System" ],
3551         [ 0x05, "Locks" ],
3552         [ 0x06, "Transaction Tracking" ],
3553         [ 0x07, "Disk" ],
3554         [ 0x08, "Time" ],
3555         [ 0x09, "NCP" ],
3556         [ 0x0a, "Miscellaneous" ],
3557         [ 0x0b, "Error Handling" ],
3558         [ 0x0c, "Directory Services" ],
3559         [ 0x0d, "MultiProcessor" ],
3560         [ 0x0e, "Service Location Protocol" ],
3561         [ 0x0f, "Licensing Services" ],
3562 ])        
3563 SetCmdFlags                             = bitfield8("set_cmd_flags", "Set Command Flags", [
3564         bf_boolean8(0x01, "cmd_flags_startup_only", "Startup.ncf Only"),
3565         bf_boolean8(0x02, "cmd_flags_hidden", "Hidden"),
3566         bf_boolean8(0x04, "cmd_flags_advanced", "Advanced"),
3567         bf_boolean8(0x08, "cmd_flags_later", "Restart Server Required to Take Effect"),
3568         bf_boolean8(0x80, "cmd_flags_secure", "Console Secured"),
3569 ])
3570 SetCmdName                      = stringz("set_cmd_name", "Set Command Name")
3571 SetCmdType                      = val_string8("set_cmd_type", "Set Command Type", [
3572         [ 0x00, "Numeric Value" ],
3573         [ 0x01, "Boolean Value" ],
3574         [ 0x02, "Ticks Value" ],
3575         [ 0x04, "Time Value" ],
3576         [ 0x05, "String Value" ],
3577         [ 0x06, "Trigger Value" ],
3578         [ 0x07, "Numeric Value" ],
3579 ])        
3580 SetCmdValueNum                  = uint32("set_cmd_value_num", "Set Command Value")
3581 SetCmdValueString               = stringz("set_cmd_value_string", "Set Command Value")
3582 SetParmName                     = stringz("set_parm_name", "Set Parameter Name")
3583 SFTErrorTable                   = bytes("sft_error_table", "SFT Error Table", 60)
3584 SFTSupportLevel                 = val_string8("sft_support_level", "SFT Support Level", [
3585         [ 0x01, "Server Offers Hot Disk Error Fixing" ],
3586         [ 0x02, "Server Offers Disk Mirroring and Transaction Tracking" ],
3587         [ 0x03, "Server Offers Physical Server Mirroring" ],
3588 ])
3589 ShareableLockCount              = uint16("shareable_lock_count", "Shareable Lock Count")
3590 SharedMemoryAddresses           = bytes("shared_memory_addresses", "Shared Memory Addresses", 10)
3591 ShortName                       = fw_string("short_name", "Short Name", 12)
3592 ShortStkName                    = fw_string("short_stack_name", "Short Stack Name", 16)
3593 SiblingCount                    = uint32("sibling_count", "Sibling Count")
3594 SMIDs                           = uint32("smids", "Storage Media ID's")
3595 SoftwareDescription             = fw_string("software_description", "Software Description", 65)
3596 SoftwareDriverType              = uint8("software_driver_type", "Software Driver Type")
3597 SoftwareMajorVersionNumber      = uint8("software_major_version_number", "Software Major Version Number")
3598 SoftwareMinorVersionNumber      = uint8("software_minor_version_number", "Software Minor Version Number")
3599 SourceDirHandle                 = uint8("source_dir_handle", "Source Directory Handle")
3600 sourceOriginateTime             = bytes("source_originate_time", "Source Originate Time", 8)
3601 sourceOriginateTime.Display("BASE_HEX")
3602 SourcePath                      = nstring8("source_path", "Source Path")
3603 SourcePathComponentCount        = uint8("source_component_count", "Source Path Component Count")
3604 sourceReturnTime                = bytes("source_return_time", "Source Return Time", 8)
3605 sourceReturnTime.Display("BASE_HEX")
3606 SpaceUsed                       = uint32("space_used", "Space Used")
3607 SpaceMigrated                   = uint32("space_migrated", "Space Migrated")
3608 SrcNameSpace                    = val_string8("src_name_space", "Source Name Space", [
3609         [ 0x00, "DOS Name Space" ],
3610         [ 0x01, "MAC Name Space" ],
3611         [ 0x02, "NFS Name Space" ],
3612         [ 0x04, "Long Name Space" ],
3613 ])
3614 SupModID                        = uint32("sup_mod_id", "Sup Mod ID")
3615 StackCount                      = uint32("stack_count", "Stack Count")
3616 StackFullNameStr                = nstring8("stack_full_name_str", "Stack Full Name")
3617 StackMajorVN                    = uint8("stack_major_vn", "Stack Major Version Number")
3618 StackMinorVN                    = uint8("stack_minor_vn", "Stack Minor Version Number")
3619 StackNumber                     = uint32("stack_number", "Stack Number")
3620 StartConnNumber                 = uint32("start_conn_num", "Starting Connection Number")
3621 StartingBlock                   = uint16("starting_block", "Starting Block")
3622 StartingNumber                  = uint32("starting_number", "Starting Number")
3623 StartingSearchNumber            = uint16("start_search_number", "Start Search Number")
3624 StartNumber                     = uint32("start_number", "Start Number")
3625 startNumberFlag                 = uint16("start_number_flag", "Start Number Flag")
3626 StartVolumeNumber               = uint32("start_volume_number", "Starting Volume Number")
3627 StationList                     = uint32("station_list", "Station List")
3628 StationNumber                   = bytes("station_number", "Station Number", 3)
3629 StatMajorVersion                = uint8("stat_major_version", "Statistics Table Major Version")
3630 StatMinorVersion                = uint8("stat_minor_version", "Statistics Table Minor Version")
3631 Status                          = bitfield16("status", "Status", [
3632         bf_boolean16(0x0001, "user_info_logged_in", "Logged In"),
3633         bf_boolean16(0x0002, "user_info_being_abort", "Being Aborted"),
3634         bf_boolean16(0x0004, "user_info_audited", "Audited"),
3635         bf_boolean16(0x0008, "user_info_need_sec", "Needs Security Change"),
3636         bf_boolean16(0x0010, "user_info_mac_station", "MAC Station"),
3637         bf_boolean16(0x0020, "user_info_temp_authen", "Temporary Authenticated"),
3638         bf_boolean16(0x0040, "user_info_audit_conn", "Audit Connection Recorded"),
3639         bf_boolean16(0x0080, "user_info_dsaudit_conn", "DS Audit Connection Recorded"),
3640         bf_boolean16(0x0100, "user_info_logout", "Logout in Progress"),
3641         bf_boolean16(0x0200, "user_info_int_login", "Internal Login"),
3642         bf_boolean16(0x0400, "user_info_bindery", "Bindery Connection"),
3643 ])
3644 StatusFlagBits                  = bitfield32("status_flag_bits", "Status Flag", [
3645         bf_boolean32(0x00000001, "status_flag_bits_suballoc", "Sub Allocation"),
3646         bf_boolean32(0x00000002, "status_flag_bits_comp", "Compression"),
3647         bf_boolean32(0x00000004, "status_flag_bits_migrate", "Migration"),
3648         bf_boolean32(0x00000008, "status_flag_bits_audit", "Audit"),
3649         bf_boolean32(0x00000010, "status_flag_bits_ro", "Read Only"),
3650         bf_boolean32(0x00000020, "status_flag_bits_im_purge", "Immediate Purge"),
3651         bf_boolean32(0x80000000, "status_flag_bits_nss", "NSS Volume"),
3652 ])
3653 SubAllocClusters                = uint32("sub_alloc_clusters", "Sub Alloc Clusters")
3654 SubAllocFreeableClusters        = uint32("sub_alloc_freeable_clusters", "Sub Alloc Freeable Clusters")
3655 Subdirectory                    = uint32("sub_directory", "Subdirectory")
3656 Subdirectory.Display("BASE_HEX")
3657 SuggestedFileSize               = uint32("suggested_file_size", "Suggested File Size")
3658 SupportModuleID                 = uint32("support_module_id", "Support Module ID")
3659 SynchName                       = nstring8("synch_name", "Synch Name")
3660 SystemIntervalMarker            = uint32("system_interval_marker", "System Interval Marker")
3661
3662 TabSize                         = uint8( "tab_size", "Tab Size" )
3663 TargetClientList                = uint8("target_client_list", "Target Client List")
3664 TargetConnectionNumber          = uint16("target_connection_number", "Target Connection Number")
3665 TargetDirectoryBase             = uint32("target_directory_base", "Target Directory Base")
3666 TargetDirHandle                 = uint8("target_dir_handle", "Target Directory Handle")
3667 TargetEntryID                   = uint32("target_entry_id", "Target Entry ID")
3668 TargetEntryID.Display("BASE_HEX")
3669 TargetExecutionTime             = bytes("target_execution_time", "Target Execution Time", 6)
3670 TargetFileHandle                = bytes("target_file_handle", "Target File Handle", 6)
3671 TargetFileOffset                = uint32("target_file_offset", "Target File Offset")
3672 TargetMessage                   = nstring8("target_message", "Message")
3673 TargetPrinter                   = uint8( "target_ptr", "Target Printer" )
3674 targetReceiveTime               = bytes("target_receive_time", "Target Receive Time", 8)
3675 targetReceiveTime.Display("BASE_HEX")
3676 TargetServerIDNumber            = uint32("target_server_id_number", "Target Server ID Number", BE )
3677 TargetServerIDNumber.Display("BASE_HEX")
3678 targetTransmitTime              = bytes("target_transmit_time", "Target Transmit Time", 8)
3679 targetTransmitTime.Display("BASE_HEX")
3680 TaskNumByte                     = uint8("task_num_byte", "Task Number")
3681 TaskNumber                      = uint32("task_number", "Task Number")
3682 TaskNumberWord                  = uint16("task_number_word", "Task Number")
3683 TextJobDescription              = fw_string("text_job_description", "Text Job Description", 50)
3684 ThrashingCount                  = uint16("thrashing_count", "Thrashing Count")
3685 TimeoutLimit                    = uint16("timeout_limit", "Timeout Limit")
3686 TimesyncStatus                  = bitfield32("timesync_status_flags", "Timesync Status", [
3687         bf_boolean32(0x00000001, "timesync_status_sync", "Time is Synchronized"),
3688         bf_boolean32(0x00000002, "timesync_status_net_sync", "Time is Synchronized to the Network"), 
3689         bf_boolean32(0x00000004, "timesync_status_active", "Time Synchronization is Active"),
3690         bf_boolean32(0x00000008, "timesync_status_external", "External Time Synchronization Active"),
3691         bf_val_str32(0x00000700, "timesync_status_server_type", "Time Server Type", [
3692                 [ 0x01, "Client Time Server" ],
3693                 [ 0x02, "Secondary Time Server" ],
3694                 [ 0x03, "Primary Time Server" ],
3695                 [ 0x04, "Reference Time Server" ],
3696                 [ 0x05, "Single Reference Time Server" ],
3697         ]),
3698         bf_boolean32(0x000f0000, "timesync_status_ext_sync", "External Clock Status"),
3699 ])        
3700 TimeToNet                       = uint16("time_to_net", "Time To Net")
3701 TotalBlocks                     = uint32("total_blocks", "Total Blocks")        
3702 TotalBlocksToDecompress         = uint32("total_blks_to_dcompress", "Total Blocks To Decompress")
3703 TotalBytesRead                  = bytes("user_info_ttl_bytes_rd", "Total Bytes Read", 6)
3704 TotalBytesWritten               = bytes("user_info_ttl_bytes_wrt", "Total Bytes Written", 6)
3705 TotalCacheWrites                = uint32("total_cache_writes", "Total Cache Writes")
3706 TotalChangedFATs                = uint32("total_changed_fats", "Total Changed FAT Entries")
3707 TotalCommonCnts                 = uint32("total_common_cnts", "Total Common Counts")
3708 TotalCntBlocks                  = uint32("total_cnt_blocks", "Total Count Blocks")
3709 TotalDataStreamDiskSpaceAlloc   = uint32("total_stream_size_struct_space_alloc", "Total Data Stream Disk Space Alloc")
3710 TotalDirectorySlots             = uint16("total_directory_slots", "Total Directory Slots")
3711 TotalDirectoryEntries           = uint32("total_dir_entries", "Total Directory Entries")
3712 TotalDynamicSpace               = uint32("total_dynamic_space", "Total Dynamic Space")
3713 TotalExtendedDirectoryExtants   = uint32("total_extended_directory_extants", "Total Extended Directory Extants")
3714 TotalFileServicePackets         = uint32("total_file_service_packets", "Total File Service Packets")
3715 TotalFilesOpened                = uint32("total_files_opened", "Total Files Opened")
3716 TotalLFSCounters                = uint32("total_lfs_counters", "Total LFS Counters")
3717 TotalOffspring                  = uint16("total_offspring", "Total Offspring")
3718 TotalOtherPackets               = uint32("total_other_packets", "Total Other Packets")
3719 TotalQueueJobs                  = uint32("total_queue_jobs", "Total Queue Jobs")
3720 TotalReadRequests               = uint32("total_read_requests", "Total Read Requests")
3721 TotalRequest                    = uint32("total_request", "Total Requests")
3722 TotalRequestPackets             = uint32("total_request_packets", "Total Request Packets")
3723 TotalRoutedPackets              = uint32("total_routed_packets", "Total Routed Packets")
3724 TotalRxPkts                     = uint32("total_rx_pkts", "Total Receive Packets")
3725 TotalServerMemory               = uint16("total_server_memory", "Total Server Memory", BE)
3726 TotalTransactionsBackedOut      = uint32("total_trans_backed_out", "Total Transactions Backed Out")
3727 TotalTransactionsPerformed      = uint32("total_trans_performed", "Total Transactions Performed")
3728 TotalTxPkts                     = uint32("total_tx_pkts", "Total Transmit Packets")
3729 TotalUnfilledBackoutRequests    = uint16("total_unfilled_backout_requests", "Total Unfilled Backout Requests")
3730 TotalVolumeClusters             = uint16("total_volume_clusters", "Total Volume Clusters")
3731 TotalWriteRequests              = uint32("total_write_requests", "Total Write Requests")
3732 TotalWriteTransactionsPerformed = uint32("total_write_trans_performed", "Total Write Transactions Performed")
3733 TrackOnFlag                     = boolean8("track_on_flag", "Track On Flag")
3734 TransactionDiskSpace            = uint16("transaction_disk_space", "Transaction Disk Space")
3735 TransactionFATAllocations       = uint32("transaction_fat_allocations", "Transaction FAT Allocations")
3736 TransactionFileSizeChanges      = uint32("transaction_file_size_changes", "Transaction File Size Changes")
3737 TransactionFilesTruncated       = uint32("transaction_files_truncated", "Transaction Files Truncated")
3738 TransactionNumber               = uint32("transaction_number", "Transaction Number")
3739 TransactionTrackingEnabled      = uint8("transaction_tracking_enabled", "Transaction Tracking Enabled")
3740 TransactionTrackingFlag         = uint16("tts_flag", "Transaction Tracking Flag")
3741 TransactionTrackingSupported    = uint8("transaction_tracking_supported", "Transaction Tracking Supported")
3742 TransactionVolumeNumber         = uint16("transaction_volume_number", "Transaction Volume Number")
3743 TransportType                   = val_string8("transport_type", "Communications Type", [
3744         [ 0x01, "Internet Packet Exchange (IPX)" ],
3745         [ 0x05, "User Datagram Protocol (UDP)" ],
3746         [ 0x06, "Transmission Control Protocol (TCP)" ],
3747 ])
3748 TreeLength                      = uint32("tree_length", "Tree Length")
3749 TreeName                        = nstring32("tree_name", "Tree Name")
3750 TreeName.NWUnicode()
3751 TrusteeRights                   = bitfield16("trustee_rights_low", "Trustee Rights", [
3752         bf_boolean16(0x0001, "trustee_rights_read", "Read"),
3753         bf_boolean16(0x0002, "trustee_rights_write", "Write"),
3754         bf_boolean16(0x0004, "trustee_rights_open", "Open"),
3755         bf_boolean16(0x0008, "trustee_rights_create", "Create"),
3756         bf_boolean16(0x0010, "trustee_rights_del", "Delete"),
3757         bf_boolean16(0x0020, "trustee_rights_parent", "Parental"),
3758         bf_boolean16(0x0040, "trustee_rights_search", "Search"),
3759         bf_boolean16(0x0080, "trustee_rights_modify", "Modify"),
3760         bf_boolean16(0x0100, "trustee_rights_super", "Supervisor"),
3761 ])
3762 TTSLevel                        = uint8("tts_level", "TTS Level")
3763 TrusteeSetNumber                = uint8("trustee_set_number", "Trustee Set Number")
3764 TrusteeID                       = uint32("trustee_id_set", "Trustee ID")
3765 TrusteeID.Display("BASE_HEX")
3766 ttlCompBlks                     = uint32("ttl_comp_blks", "Total Compression Blocks")
3767 TtlDSDskSpaceAlloc              = uint32("ttl_ds_disk_space_alloc", "Total Streams Space Allocated")
3768 TtlEAs                          = uint32("ttl_eas", "Total EA's")
3769 TtlEAsDataSize                  = uint32("ttl_eas_data_size", "Total EA's Data Size")
3770 TtlEAsKeySize                   = uint32("ttl_eas_key_size", "Total EA's Key Size")
3771 ttlIntermediateBlks             = uint32("ttl_inter_blks", "Total Intermediate Blocks")
3772 TtlMigratedSize                 = uint32("ttl_migrated_size", "Total Migrated Size")
3773 TtlNumOfRTags                   = uint32("ttl_num_of_r_tags", "Total Number of Resource Tags")
3774 TtlNumOfSetCmds                 = uint32("ttl_num_of_set_cmds", "Total Number of Set Commands")
3775 TtlValuesLength                 = uint32("ttl_values_length", "Total Values Length")
3776 TtlWriteDataSize                = uint32("ttl_write_data_size", "Total Write Data Size")
3777 TurboUsedForFileService         = uint16("turbo_used_for_file_service", "Turbo Used For File Service")
3778
3779 UnclaimedPkts                   = uint32("un_claimed_packets", "Unclaimed Packets")
3780 UnCompressableDataStreamsCount  = uint32("un_compressable_data_streams_count", "Uncompressable Data Streams Count")
3781 Undefined8                      = bytes("undefined_8", "Undefined", 8)
3782 Undefined28                     = bytes("undefined_28", "Undefined", 28)
3783 UndefinedWord                   = uint16("undefined_word", "Undefined")
3784 UniqueID                        = uint8("unique_id", "Unique ID")
3785 UnknownByte                     = uint8("unknown_byte", "Unknown Byte")
3786 Unused                          = uint8("un_used", "Unused")
3787 UnusedBlocks                    = uint32("unused_blocks", "Unused Blocks")
3788 UnUsedDirectoryEntries          = uint32("un_used_directory_entries", "Unused Directory Entries")
3789 UnusedDiskBlocks                = uint32("unused_disk_blocks", "Unused Disk Blocks")
3790 UnUsedExtendedDirectoryExtants  = uint32("un_used_extended_directory_extants", "Unused Extended Directory Extants")
3791 UpdateDate                      = uint16("update_date", "Update Date")
3792 UpdateDate.NWDate()
3793 UpdateID                        = uint32("update_id", "Update ID", BE)
3794 UpdateID.Display("BASE_HEX")
3795 UpdateTime                      = uint16("update_time", "Update Time")
3796 UpdateTime.NWTime()
3797 UseCount                        = val_string16("user_info_use_count", "Use Count", [
3798         [ 0x0000, "Connection is not in use" ],
3799         [ 0x0001, "Connection is in use" ],
3800 ])
3801 UsedBlocks                      = uint32("used_blocks", "Used Blocks")
3802 UserID                          = uint32("user_id", "User ID", BE)
3803 UserID.Display("BASE_HEX")
3804 UserLoginAllowed                = val_string8("user_login_allowed", "Login Status", [
3805         [ 0x00, "Client Login Disabled" ],
3806         [ 0x01, "Client Login Enabled" ],
3807 ])
3808
3809 UserName                        = nstring8("user_name", "User Name")
3810 UserName16                      = fw_string("user_name_16", "User Name", 16)
3811 UserName48                      = fw_string("user_name_48", "User Name", 48)
3812 UserType                        = uint16("user_type", "User Type")
3813 UTCTimeInSeconds                = uint32("uts_time_in_seconds", "UTC Time in Seconds")
3814
3815 ValueAvailable                  = val_string8("value_available", "Value Available", [
3816         [ 0x00, "Has No Value" ],
3817         [ 0xff, "Has Value" ],
3818 ])
3819 VAPVersion                      = uint8("vap_version", "VAP Version")
3820 VariableBitMask                 = uint32("variable_bit_mask", "Variable Bit Mask")
3821 VariableBitsDefined             = uint16("variable_bits_defined", "Variable Bits Defined")
3822 VConsoleRevision                = uint8("vconsole_rev", "Console Revision")
3823 VConsoleVersion                 = uint8("vconsole_ver", "Console Version")
3824 Verb                            = uint32("verb", "Verb")
3825 VerbData                        = uint8("verb_data", "Verb Data")
3826 version                         = uint32("version", "Version")
3827 VersionNumber                   = uint8("version_number", "Version")
3828 VertLocation                    = uint16("vert_location", "Vertical Location")
3829 VirtualConsoleVersion           = uint8("virtual_console_version", "Virtual Console Version")
3830 VolumeID                        = uint32("volume_id", "Volume ID")
3831 VolumeID.Display("BASE_HEX")
3832 VolInfoReplyLen                 = uint16("vol_info_reply_len", "Volume Information Reply Length")
3833 VolumeCachedFlag                = val_string8("volume_cached_flag", "Volume Cached Flag", [
3834         [ 0x00, "Volume is Not Cached" ],
3835         [ 0xff, "Volume is Cached" ],
3836 ])      
3837 VolumeDataStreams               = uint8("volume_data_streams", "Volume Data Streams")
3838 VolumeHashedFlag                = val_string8("volume_hashed_flag", "Volume Hashed Flag", [
3839         [ 0x00, "Volume is Not Hashed" ],
3840         [ 0xff, "Volume is Hashed" ],
3841 ])      
3842 VolumeLastModifiedDate          = uint16("volume_last_modified_date", "Volume Last Modified Date")
3843 VolumeLastModifiedDate.NWDate()
3844 VolumeLastModifiedTime          = uint16("volume_last_modified_time", "Volume Last Modified Time") 
3845 VolumeLastModifiedTime.NWTime()
3846 VolumeMountedFlag               = val_string8("volume_mounted_flag", "Volume Mounted Flag", [
3847         [ 0x00, "Volume is Not Mounted" ],
3848         [ 0xff, "Volume is Mounted" ],
3849 ])
3850 VolumeName                      = fw_string("volume_name", "Volume Name", 16)
3851 VolumeNameLen                   = nstring8("volume_name_len", "Volume Name")
3852 VolumeNameSpaces                = uint8("volume_name_spaces", "Volume Name Spaces")
3853 VolumeNameStringz               = stringz("volume_name_stringz", "Volume Name")
3854 VolumeNumber                    = uint8("volume_number", "Volume Number")
3855 VolumeNumberLong                = uint32("volume_number_long", "Volume Number")
3856 VolumeRemovableFlag             = val_string8("volume_removable_flag", "Volume Removable Flag", [
3857         [ 0x00, "Disk Cannot be Removed from Server" ],
3858         [ 0xff, "Disk Can be Removed from Server" ],
3859 ])
3860 VolumeRequestFlags              = val_string16("volume_request_flags", "Volume Request Flags", [
3861         [ 0x0000, "Return name with volume number" ],
3862         [ 0x0001, "Do not return name with volume number" ],
3863 ])
3864 VolumeSizeInClusters            = uint32("volume_size_in_clusters", "Volume Size in Clusters")
3865 VolumesSupportedMax             = uint16("volumes_supported_max", "Volumes Supported Max")
3866 VolumeType                      = val_string16("volume_type", "Volume Type", [
3867         [ 0x0000, "NetWare 386" ],
3868         [ 0x0001, "NetWare 286" ],
3869         [ 0x0002, "NetWare 386 Version 30" ],
3870         [ 0x0003, "NetWare 386 Version 31" ],
3871 ])
3872 WastedServerMemory              = uint16("wasted_server_memory", "Wasted Server Memory", BE)
3873 WaitTime                        = uint32("wait_time", "Wait Time")
3874
3875 Year                            = val_string8("year", "Year",[
3876         [ 0x50, "1980" ],
3877         [ 0x51, "1981" ],
3878         [ 0x52, "1982" ],
3879         [ 0x53, "1983" ],
3880         [ 0x54, "1984" ],
3881         [ 0x55, "1985" ],
3882         [ 0x56, "1986" ],
3883         [ 0x57, "1987" ],
3884         [ 0x58, "1988" ],
3885         [ 0x59, "1989" ],
3886         [ 0x5a, "1990" ],
3887         [ 0x5b, "1991" ],
3888         [ 0x5c, "1992" ],
3889         [ 0x5d, "1993" ],
3890         [ 0x5e, "1994" ],
3891         [ 0x5f, "1995" ],
3892         [ 0x60, "1996" ],
3893         [ 0x61, "1997" ],
3894         [ 0x62, "1998" ],
3895         [ 0x63, "1999" ],
3896         [ 0x64, "2000" ],
3897         [ 0x65, "2001" ],
3898         [ 0x66, "2002" ],
3899         [ 0x67, "2003" ],
3900         [ 0x68, "2004" ],
3901         [ 0x69, "2005" ],
3902         [ 0x6a, "2006" ],
3903         [ 0x6b, "2007" ],
3904         [ 0x6c, "2008" ],
3905         [ 0x6d, "2009" ],
3906         [ 0x6e, "2010" ],
3907         [ 0x6f, "2011" ],
3908         [ 0x70, "2012" ],
3909         [ 0x71, "2013" ],
3910         [ 0x72, "2014" ],
3911         [ 0x73, "2015" ],
3912         [ 0x74, "2016" ],
3913         [ 0x75, "2017" ],
3914         [ 0x76, "2018" ],
3915         [ 0x77, "2019" ],
3916         [ 0x78, "2020" ],
3917         [ 0x79, "2021" ],
3918         [ 0x7a, "2022" ],
3919         [ 0x7b, "2023" ],
3920         [ 0x7c, "2024" ],
3921         [ 0x7d, "2025" ],
3922         [ 0x7e, "2026" ],
3923         [ 0x7f, "2027" ],
3924         [ 0xc0, "1984" ],
3925         [ 0xc1, "1985" ],
3926         [ 0xc2, "1986" ],
3927         [ 0xc3, "1987" ],
3928         [ 0xc4, "1988" ],
3929         [ 0xc5, "1989" ],
3930         [ 0xc6, "1990" ],
3931         [ 0xc7, "1991" ],
3932         [ 0xc8, "1992" ],
3933         [ 0xc9, "1993" ],
3934         [ 0xca, "1994" ],
3935         [ 0xcb, "1995" ],
3936         [ 0xcc, "1996" ],
3937         [ 0xcd, "1997" ],
3938         [ 0xce, "1998" ],
3939         [ 0xcf, "1999" ],
3940         [ 0xd0, "2000" ],
3941         [ 0xd1, "2001" ],
3942         [ 0xd2, "2002" ],
3943         [ 0xd3, "2003" ],
3944         [ 0xd4, "2004" ],
3945         [ 0xd5, "2005" ],
3946         [ 0xd6, "2006" ],
3947         [ 0xd7, "2007" ],
3948         [ 0xd8, "2008" ],
3949         [ 0xd9, "2009" ],
3950         [ 0xda, "2010" ],
3951         [ 0xdb, "2011" ],
3952         [ 0xdc, "2012" ],
3953         [ 0xdd, "2013" ],
3954         [ 0xde, "2014" ],
3955         [ 0xdf, "2015" ],
3956 ])
3957 ##############################################################################
3958 # Structs
3959 ##############################################################################
3960                 
3961                 
3962 acctngInfo                      = struct("acctng_info_struct", [
3963         HoldTime,
3964         HoldAmount,
3965         ChargeAmount,
3966         HeldConnectTimeInMinutes,
3967         HeldRequests,
3968         HeldBytesRead,
3969         HeldBytesWritten,
3970 ],"Accounting Information")
3971 AFP10Struct                       = struct("afp_10_struct", [
3972         AFPEntryID,
3973         ParentID,
3974         AttributesDef16,
3975         DataForkLen,
3976         ResourceForkLen,
3977         TotalOffspring,
3978         CreationDate,
3979         LastAccessedDate,
3980         ModifiedDate,
3981         ModifiedTime,
3982         ArchivedDate,
3983         ArchivedTime,
3984         CreatorID,
3985         Reserved4,
3986         FinderAttr,
3987         HorizLocation,
3988         VertLocation,
3989         FileDirWindow,
3990         Reserved16,
3991         LongName,
3992         CreatorID,
3993         ShortName,
3994         AccessPrivileges,
3995 ], "AFP Information" )                
3996 AFP20Struct                       = struct("afp_20_struct", [
3997         AFPEntryID,
3998         ParentID,
3999         AttributesDef16,
4000         DataForkLen,
4001         ResourceForkLen,
4002         TotalOffspring,
4003         CreationDate,
4004         LastAccessedDate,
4005         ModifiedDate,
4006         ModifiedTime,
4007         ArchivedDate,
4008         ArchivedTime,
4009         CreatorID,
4010         Reserved4,
4011         FinderAttr,
4012         HorizLocation,
4013         VertLocation,
4014         FileDirWindow,
4015         Reserved16,
4016         LongName,
4017         CreatorID,
4018         ShortName,
4019         AccessPrivileges,
4020         Reserved,
4021         ProDOSInfo,
4022 ], "AFP Information" )                
4023 ArchiveDateStruct               = struct("archive_date_struct", [
4024         ArchivedDate,
4025 ])                
4026 ArchiveIdStruct                 = struct("archive_id_struct", [
4027         ArchiverID,
4028 ])                
4029 ArchiveInfoStruct               = struct("archive_info_struct", [
4030         ArchivedTime,
4031         ArchivedDate,
4032         ArchiverID,
4033 ], "Archive Information")
4034 ArchiveTimeStruct               = struct("archive_time_struct", [
4035         ArchivedTime,
4036 ])                
4037 AttributesStruct                = struct("attributes_struct", [
4038         AttributesDef32,
4039         FlagsDef,
4040 ], "Attributes")
4041 authInfo                        = struct("auth_info_struct", [
4042         Status,
4043         Reserved2,
4044         Privileges,
4045 ])
4046 BoardNameStruct                 = struct("board_name_struct", [
4047         DriverBoardName,
4048         DriverShortName,
4049         DriverLogicalName,
4050 ], "Board Name")        
4051 CacheInfo                       = struct("cache_info", [
4052         uint32("max_byte_cnt", "Maximum Byte Count"),
4053         uint32("min_num_of_cache_buff", "Minimum Number Of Cache Buffers"),
4054         uint32("min_cache_report_thresh", "Minimum Cache Report Threshold"),
4055         uint32("alloc_waiting", "Allocate Waiting Count"),
4056         uint32("ndirty_blocks", "Number of Dirty Blocks"),
4057         uint32("cache_dirty_wait_time", "Cache Dirty Wait Time"),
4058         uint32("cache_max_concur_writes", "Cache Maximum Concurrent Writes"),
4059         uint32("max_dirty_time", "Maximum Dirty Time"),
4060         uint32("num_dir_cache_buff", "Number Of Directory Cache Buffers"),
4061         uint32("cache_byte_to_block", "Cache Byte To Block Shift Factor"),
4062 ], "Cache Information")
4063 CommonLanStruc                  = struct("common_lan_struct", [
4064         boolean8("not_supported_mask", "Bit Counter Supported"),
4065         Reserved3,
4066         uint32("total_tx_packet_count", "Total Transmit Packet Count"),
4067         uint32("total_rx_packet_count", "Total Receive Packet Count"),
4068         uint32("no_ecb_available_count", "No ECB Available Count"),
4069         uint32("packet_tx_too_big_count", "Transmit Packet Too Big Count"),
4070         uint32("packet_tx_too_small_count", "Transmit Packet Too Small Count"),
4071         uint32("packet_rx_overflow_count", "Receive Packet Overflow Count"),
4072         uint32("packet_rx_too_big_count", "Receive Packet Too Big Count"),
4073         uint32("packet_rs_too_small_count", "Receive Packet Too Small Count"),
4074         uint32("packet_tx_misc_error_count", "Transmit Packet Misc Error Count"),
4075         uint32("packet_rx_misc_error_count", "Receive Packet Misc Error Count"),
4076         uint32("retry_tx_count", "Transmit Retry Count"),
4077         uint32("checksum_error_count", "Checksum Error Count"),
4078         uint32("hardware_rx_mismatch_count", "Hardware Receive Mismatch Count"),
4079 ], "Common LAN Information")
4080 CompDeCompStat                  = struct("comp_d_comp_stat", [ 
4081         uint32("cmphitickhigh", "Compress High Tick"),        
4082         uint32("cmphitickcnt", "Compress High Tick Count"),        
4083         uint32("cmpbyteincount", "Compress Byte In Count"),        
4084         uint32("cmpbyteoutcnt", "Compress Byte Out Count"),        
4085         uint32("cmphibyteincnt", "Compress High Byte In Count"),        
4086         uint32("cmphibyteoutcnt", "Compress High Byte Out Count"),        
4087         uint32("decphitickhigh", "DeCompress High Tick"),        
4088         uint32("decphitickcnt", "DeCompress High Tick Count"),        
4089         uint32("decpbyteincount", "DeCompress Byte In Count"),        
4090         uint32("decpbyteoutcnt", "DeCompress Byte Out Count"),        
4091         uint32("decphibyteincnt", "DeCompress High Byte In Count"),        
4092         uint32("decphibyteoutcnt", "DeCompress High Byte Out Count"),
4093 ], "Compression/Decompression Information")                
4094 ConnFileStruct                  = struct("conn_file_struct", [
4095         ConnectionNumberWord,
4096         TaskNumByte,
4097         LockType,
4098         AccessControl,
4099         LockFlag,
4100 ], "File Connection Information")
4101 ConnStruct                      = struct("conn_struct", [
4102         TaskNumByte,
4103         LockType,
4104         AccessControl,
4105         LockFlag,
4106         VolumeNumber,
4107         DirectoryEntryNumberWord,
4108         FileName14,
4109 ], "Connection Information")
4110 ConnTaskStruct                  = struct("conn_task_struct", [
4111         ConnectionNumberByte,
4112         TaskNumByte,
4113 ], "Task Information")
4114 Counters                        = struct("counters_struct", [
4115         uint32("read_exist_blck", "Read Existing Block Count"),
4116         uint32("read_exist_write_wait", "Read Existing Write Wait Count"),
4117         uint32("read_exist_part_read", "Read Existing Partial Read Count"),
4118         uint32("read_exist_read_err", "Read Existing Read Error Count"),
4119         uint32("wrt_blck_cnt", "Write Block Count"),
4120         uint32("wrt_entire_blck", "Write Entire Block Count"),
4121         uint32("internl_dsk_get", "Internal Disk Get Count"),
4122         uint32("internl_dsk_get_need_to_alloc", "Internal Disk Get Need To Allocate Count"),
4123         uint32("internl_dsk_get_someone_beat", "Internal Disk Get Someone Beat My Count"),
4124         uint32("internl_dsk_get_part_read", "Internal Disk Get Partial Read Count"),
4125         uint32("internl_dsk_get_read_err", "Internal Disk Get Read Error Count"),
4126         uint32("async_internl_dsk_get", "Async Internal Disk Get Count"),
4127         uint32("async_internl_dsk_get_need_to_alloc", "Async Internal Disk Get Need To Alloc"),
4128         uint32("async_internl_dsk_get_someone_beat", "Async Internal Disk Get Someone Beat Me"),
4129         uint32("err_doing_async_read", "Error Doing Async Read Count"),
4130         uint32("internl_dsk_get_no_read", "Internal Disk Get No Read Count"),
4131         uint32("internl_dsk_get_no_read_alloc", "Internal Disk Get No Read Allocate Count"),
4132         uint32("internl_dsk_get_no_read_someone_beat", "Internal Disk Get No Read Someone Beat Me Count"),
4133         uint32("internl_dsk_write", "Internal Disk Write Count"),
4134         uint32("internl_dsk_write_alloc", "Internal Disk Write Allocate Count"),
4135         uint32("internl_dsk_write_someone_beat", "Internal Disk Write Someone Beat Me Count"),
4136         uint32("write_err", "Write Error Count"),
4137         uint32("wait_on_sema", "Wait On Semaphore Count"),
4138         uint32("alloc_blck_i_had_to_wait_for", "Allocate Block I Had To Wait For Someone Count"),
4139         uint32("alloc_blck", "Allocate Block Count"),
4140         uint32("alloc_blck_i_had_to_wait", "Allocate Block I Had To Wait Count"),
4141 ], "Disk Counter Information")
4142 CPUInformation                  = struct("cpu_information", [
4143         PageTableOwnerFlag,
4144         CPUType,
4145         Reserved3,
4146         CoprocessorFlag,
4147         BusType,
4148         Reserved3,
4149         IOEngineFlag,
4150         Reserved3,
4151         FSEngineFlag,
4152         Reserved3, 
4153         NonDedFlag,
4154         Reserved3,
4155         CPUString,
4156         CoProcessorString,
4157         BusString,
4158 ], "CPU Information")
4159 CreationDateStruct              = struct("creation_date_struct", [
4160         CreationDate,
4161 ])                
4162 CreationInfoStruct              = struct("creation_info_struct", [
4163         CreationTime,
4164         CreationDate,
4165         CreatorID,
4166 ], "Creation Information")
4167 CreationTimeStruct              = struct("creation_time_struct", [
4168         CreationTime,
4169 ])
4170 CustomCntsInfo                  = struct("custom_cnts_info", [
4171         CustomVariableValue,
4172         CustomString,
4173 ], "Custom Counters" )        
4174 DataStreamInfo                  = struct("data_stream_info", [
4175         AssociatedNameSpace,
4176         DataStreamName
4177 ])
4178 DataStreamSizeStruct            = struct("data_stream_size_struct", [
4179         DataStreamSize,
4180 ])
4181 DirCacheInfo                    = struct("dir_cache_info", [
4182         uint32("min_time_since_file_delete", "Minimum Time Since File Delete"),
4183         uint32("abs_min_time_since_file_delete", "Absolute Minimum Time Since File Delete"),
4184         uint32("min_num_of_dir_cache_buff", "Minimum Number Of Directory Cache Buffers"),
4185         uint32("max_num_of_dir_cache_buff", "Maximum Number Of Directory Cache Buffers"),
4186         uint32("num_of_dir_cache_buff", "Number Of Directory Cache Buffers"),
4187         uint32("dc_min_non_ref_time", "DC Minimum Non-Referenced Time"),
4188         uint32("dc_wait_time_before_new_buff", "DC Wait Time Before New Buffer"),
4189         uint32("dc_max_concurrent_writes", "DC Maximum Concurrent Writes"),
4190         uint32("dc_dirty_wait_time", "DC Dirty Wait Time"),
4191         uint32("dc_double_read_flag", "DC Double Read Flag"),
4192         uint32("map_hash_node_count", "Map Hash Node Count"),
4193         uint32("space_restriction_node_count", "Space Restriction Node Count"),
4194         uint32("trustee_list_node_count", "Trustee List Node Count"),
4195         uint32("percent_of_vol_used_by_dirs", "Percent Of Volume Used By Directories"),
4196 ], "Directory Cache Information")
4197 DirEntryStruct                  = struct("dir_entry_struct", [
4198         DirectoryEntryNumber,
4199         DOSDirectoryEntryNumber,
4200         VolumeNumberLong,
4201 ], "Directory Entry Information")
4202 DirectoryInstance               = struct("directory_instance", [
4203         SearchSequenceWord,
4204         DirectoryID,
4205         DirectoryName14,
4206         DirectoryAttributes,
4207         DirectoryAccessRights,
4208         endian(CreationDate, BE),
4209         endian(AccessDate, BE),
4210         CreatorID,
4211         Reserved2,
4212         DirectoryStamp,
4213 ], "Directory Information")
4214 DMInfoLevel0                    = struct("dm_info_level_0", [
4215         uint32("io_flag", "IO Flag"),
4216         uint32("sm_info_size", "Storage Module Information Size"),
4217         uint32("avail_space", "Available Space"),
4218         uint32("used_space", "Used Space"),
4219         stringz("s_module_name", "Storage Module Name"),
4220         uint8("s_m_info", "Storage Media Information"),
4221 ])
4222 DMInfoLevel1                    = struct("dm_info_level_1", [
4223         NumberOfSMs,
4224         SMIDs,
4225 ])
4226 DMInfoLevel2                    = struct("dm_info_level_2", [
4227         Name,
4228 ])
4229 DOSDirectoryEntryStruct         = struct("dos_directory_entry_struct", [
4230         AttributesDef32,
4231         UniqueID,
4232         PurgeFlags,
4233         DestNameSpace,
4234         DirectoryNameLen,
4235         DirectoryName,
4236         CreationTime,
4237         CreationDate,
4238         CreatorID,
4239         ArchivedTime,
4240         ArchivedDate,
4241         ArchiverID,
4242         UpdateTime,
4243         UpdateDate,
4244         NextTrusteeEntry,
4245         Reserved48,
4246         InheritedRightsMask,
4247 ], "DOS Directory Information")
4248 DOSFileEntryStruct              = struct("dos_file_entry_struct", [
4249         AttributesDef32,
4250         UniqueID,
4251         PurgeFlags,
4252         DestNameSpace,
4253         NameLen,
4254         Name12,
4255         CreationTime,
4256         CreationDate,
4257         CreatorID,
4258         ArchivedTime,
4259         ArchivedDate,
4260         ArchiverID,
4261         UpdateTime,
4262         UpdateDate,
4263         UpdateID,
4264         FileSize,
4265         DataForkFirstFAT,
4266         NextTrusteeEntry,
4267         Reserved36,
4268         InheritedRightsMask,
4269         LastAccessedDate,
4270         Reserved28,
4271         PrimaryEntry,
4272         NameList,
4273 ], "DOS File Information")
4274 DSSpaceAllocateStruct           = struct("ds_space_alloc_struct", [
4275         DataStreamSpaceAlloc,
4276 ])
4277 DynMemStruct                    = struct("dyn_mem_struct", [
4278         uint32("dyn_mem_struct_total", "Total Dynamic Space" ),
4279         uint32("dyn_mem_struct_max", "Max Used Dynamic Space" ),
4280         uint32("dyn_mem_struct_cur", "Current Used Dynamic Space" ),
4281 ], "Dynamic Memory Information")
4282 EAInfoStruct                    = struct("ea_info_struct", [
4283         EADataSize,
4284         EACount,
4285         EAKeySize,
4286 ], "Extended Attribute Information")
4287 ExtraCacheCntrs                 = struct("extra_cache_cntrs", [
4288         uint32("internl_dsk_get_no_wait", "Internal Disk Get No Wait Count"),
4289         uint32("internl_dsk_get_no_wait_need", "Internal Disk Get No Wait Need To Allocate Count"),
4290         uint32("internl_dsk_get_no_wait_no_blk", "Internal Disk Get No Wait No Block Count"),
4291         uint32("id_get_no_read_no_wait", "ID Get No Read No Wait Count"),
4292         uint32("id_get_no_read_no_wait_sema", "ID Get No Read No Wait Semaphored Count"),
4293         uint32("id_get_no_read_no_wait_buffer", "ID Get No Read No Wait No Buffer Count"),
4294         uint32("id_get_no_read_no_wait_alloc", "ID Get No Read No Wait Allocate Count"),
4295         uint32("id_get_no_read_no_wait_no_alloc", "ID Get No Read No Wait No Alloc Count"),
4296         uint32("id_get_no_read_no_wait_no_alloc_sema", "ID Get No Read No Wait No Alloc Semaphored Count"),
4297         uint32("id_get_no_read_no_wait_no_alloc_alloc", "ID Get No Read No Wait No Alloc Allocate Count"),
4298 ], "Extra Cache Counters Information")
4299
4300
4301 ReferenceIDStruct               = struct("ref_id_struct", [
4302         CurrentReferenceID,
4303 ])
4304 NSAttributeStruct               = struct("ns_attrib_struct", [
4305         AttributesDef32,
4306 ])
4307 DStreamActual                   = struct("d_stream_actual", [
4308         Reserved12,
4309         # Need to look into how to format this correctly
4310 ])
4311 DStreamLogical                  = struct("d_string_logical", [
4312         Reserved12,
4313         # Need to look into how to format this correctly
4314 ])
4315 LastUpdatedInSecondsStruct      = struct("last_update_in_seconds_struct", [
4316         SecondsRelativeToTheYear2000,
4317 ]) 
4318 DOSNameStruct                   = struct("dos_name_struct", [
4319         FileName,
4320 ], "DOS File Name") 
4321 FlushTimeStruct                 = struct("flush_time_struct", [
4322         FlushTime,
4323 ]) 
4324 ParentBaseIDStruct              = struct("parent_base_id_struct", [
4325         ParentBaseID,
4326 ]) 
4327 MacFinderInfoStruct             = struct("mac_finder_info_struct", [
4328         MacFinderInfo,
4329 ]) 
4330 SiblingCountStruct              = struct("sibling_count_struct", [
4331         SiblingCount,
4332 ]) 
4333 EffectiveRightsStruct           = struct("eff_rights_struct", [
4334         EffectiveRights,
4335         Reserved3,     
4336 ]) 
4337 MacTimeStruct                   = struct("mac_time_struct", [
4338         MACCreateDate,
4339         MACCreateTime,
4340         MACBackupDate,
4341         MACBackupTime,
4342 ])
4343 LastAccessedTimeStruct          = struct("last_access_time_struct", [
4344         LastAccessedTime,      
4345 ])
4346
4347
4348
4349 FileAttributesStruct            = struct("file_attributes_struct", [
4350         AttributesDef32,
4351 ])
4352 FileInfoStruct                  = struct("file_info_struct", [
4353         ParentID,
4354         DirectoryEntryNumber,
4355         TotalBlocksToDecompress,
4356         CurrentBlockBeingDecompressed,
4357 ], "File Information")
4358 FileInstance                    = struct("file_instance", [
4359         SearchSequenceWord,
4360         DirectoryID,
4361         FileName14,
4362         AttributesDef,
4363         FileMode,
4364         FileSize,
4365         endian(CreationDate, BE),
4366         endian(AccessDate, BE),
4367         endian(UpdateDate, BE),
4368         endian(UpdateTime, BE),
4369 ], "File Instance")
4370 FileNameStruct                  = struct("file_name_struct", [
4371         FileName,
4372 ], "File Name")       
4373 FileServerCounters              = struct("file_server_counters", [
4374         uint16("too_many_hops", "Too Many Hops"),
4375         uint16("unknown_network", "Unknown Network"),
4376         uint16("no_space_for_service", "No Space For Service"),
4377         uint16("no_receive_buff", "No Receive Buffers"),
4378         uint16("not_my_network", "Not My Network"),
4379         uint32("netbios_progated", "NetBIOS Propagated Count"),
4380         uint32("ttl_pckts_srvcd", "Total Packets Serviced"),
4381         uint32("ttl_pckts_routed", "Total Packets Routed"),
4382 ], "File Server Counters")
4383 FileSystemInfo                  = struct("file_system_info", [
4384         uint32("fat_moved", "Number of times the OS has move the location of FAT"),
4385         uint32("fat_write_err", "Number of write errors in both original and mirrored copies of FAT"),
4386         uint32("someone_else_did_it_0", "Someone Else Did It Count 0"),
4387         uint32("someone_else_did_it_1", "Someone Else Did It Count 1"),
4388         uint32("someone_else_did_it_2", "Someone Else Did It Count 2"),
4389         uint32("i_ran_out_someone_else_did_it_0", "I Ran Out Someone Else Did It Count 0"),
4390         uint32("i_ran_out_someone_else_did_it_1", "I Ran Out Someone Else Did It Count 1"),
4391         uint32("i_ran_out_someone_else_did_it_2", "I Ran Out Someone Else Did It Count 2"),
4392         uint32("turbo_fat_build_failed", "Turbo FAT Build Failed Count"),
4393         uint32("extra_use_count_node_count", "Errors allocating a use count node for TTS"),
4394         uint32("extra_extra_use_count_node_count", "Errors allocating an additional use count node for TTS"),
4395         uint32("error_read_last_fat", "Error Reading Last FAT Count"),
4396         uint32("someone_else_using_this_file", "Someone Else Using This File Count"),
4397 ], "File System Information")
4398 GenericInfoDef                  = struct("generic_info_def", [
4399         fw_string("generic_label", "Label", 64),
4400         uint32("generic_ident_type", "Identification Type"),
4401         uint32("generic_ident_time", "Identification Time"),
4402         uint32("generic_media_type", "Media Type"),
4403         uint32("generic_cartridge_type", "Cartridge Type"),
4404         uint32("generic_unit_size", "Unit Size"),
4405         uint32("generic_block_size", "Block Size"),
4406         uint32("generic_capacity", "Capacity"),
4407         uint32("generic_pref_unit_size", "Preferred Unit Size"),
4408         fw_string("generic_name", "Name",64),
4409         uint32("generic_type", "Type"),
4410         uint32("generic_status", "Status"),
4411         uint32("generic_func_mask", "Function Mask"),
4412         uint32("generic_ctl_mask", "Control Mask"),
4413         uint32("generic_parent_count", "Parent Count"),
4414         uint32("generic_sib_count", "Sibling Count"),
4415         uint32("generic_child_count", "Child Count"),
4416         uint32("generic_spec_info_sz", "Specific Information Size"),
4417         uint32("generic_object_uniq_id", "Unique Object ID"),
4418         uint32("generic_media_slot", "Media Slot"),
4419 ], "Generic Information")
4420 HandleInfoLevel0                = struct("handle_info_level_0", [
4421 #        DataStream,
4422 ])
4423 HandleInfoLevel1                = struct("handle_info_level_1", [
4424         DataStream,
4425 ])        
4426 HandleInfoLevel2                = struct("handle_info_level_2", [
4427         DOSDirectoryBase,
4428         NameSpace,
4429         DataStream,
4430 ])        
4431 HandleInfoLevel3                = struct("handle_info_level_3", [
4432         DOSDirectoryBase,
4433         NameSpace,
4434 ])        
4435 HandleInfoLevel4                = struct("handle_info_level_4", [
4436         DOSDirectoryBase,
4437         NameSpace,
4438         ParentDirectoryBase,
4439         ParentDOSDirectoryBase,
4440 ])        
4441 HandleInfoLevel5                = struct("handle_info_level_5", [
4442         DOSDirectoryBase,
4443         NameSpace,
4444         DataStream,
4445         ParentDirectoryBase,
4446         ParentDOSDirectoryBase,
4447 ])        
4448 IPXInformation                  = struct("ipx_information", [
4449         uint32("ipx_send_pkt", "IPX Send Packet Count"),
4450         uint16("ipx_malform_pkt", "IPX Malformed Packet Count"),
4451         uint32("ipx_get_ecb_req", "IPX Get ECB Request Count"),
4452         uint32("ipx_get_ecb_fail", "IPX Get ECB Fail Count"),
4453         uint32("ipx_aes_event", "IPX AES Event Count"),
4454         uint16("ipx_postponed_aes", "IPX Postponed AES Count"),
4455         uint16("ipx_max_conf_sock", "IPX Max Configured Socket Count"),
4456         uint16("ipx_max_open_sock", "IPX Max Open Socket Count"),
4457         uint16("ipx_open_sock_fail", "IPX Open Socket Fail Count"),
4458         uint32("ipx_listen_ecb", "IPX Listen ECB Count"),
4459         uint16("ipx_ecb_cancel_fail", "IPX ECB Cancel Fail Count"),
4460         uint16("ipx_get_lcl_targ_fail", "IPX Get Local Target Fail Count"),
4461 ], "IPX Information")
4462 JobEntryTime                    = struct("job_entry_time", [
4463         Year,
4464         Month,
4465         Day,
4466         Hour,
4467         Minute,
4468         Second,
4469 ], "Job Entry Time")
4470 JobStruct                       = struct("job_struct", [
4471         ClientStation,
4472         ClientTaskNumber,
4473         ClientIDNumber,
4474         TargetServerIDNumber,
4475         TargetExecutionTime,
4476         JobEntryTime,
4477         JobNumber,
4478         JobType,
4479         JobPosition,
4480         JobControlFlags,
4481         JobFileName,
4482         JobFileHandle,
4483         ServerStation,
4484         ServerTaskNumber,
4485         ServerID,
4486         TextJobDescription,
4487         ClientRecordArea,
4488 ], "Job Information")
4489 JobStructNew                    = struct("job_struct_new", [
4490         RecordInUseFlag,
4491         PreviousRecord,
4492         NextRecord,
4493         ClientStationLong,
4494         ClientTaskNumberLong,
4495         ClientIDNumber,
4496         TargetServerIDNumber,
4497         TargetExecutionTime,
4498         JobEntryTime,
4499         JobNumberLong,
4500         JobType,
4501         JobPositionWord,
4502         JobControlFlagsWord,
4503         JobFileName,
4504         JobFileHandleLong,
4505         ServerStationLong,
4506         ServerTaskNumberLong,
4507         ServerID,
4508 ], "Job Information")                
4509 KnownRoutes                     = struct("known_routes", [
4510         NetIDNumber,
4511         HopsToNet,
4512         NetStatus,
4513         TimeToNet,
4514 ], "Known Routes")
4515 KnownServStruc                  = struct("known_server_struct", [
4516         ServerAddress,
4517         HopsToNet,
4518         ServerNameStringz,
4519 ], "Known Servers")                
4520 LANConfigInfo                   = struct("lan_cfg_info", [
4521         LANdriverCFG_MajorVersion,
4522         LANdriverCFG_MinorVersion,
4523         LANdriverNodeAddress,
4524         Reserved,
4525         LANdriverModeFlags,
4526         LANdriverBoardNumber,
4527         LANdriverBoardInstance,
4528         LANdriverMaximumSize,
4529         LANdriverMaxRecvSize,
4530         LANdriverRecvSize,
4531         LANdriverCardID,
4532         LANdriverMediaID,
4533         LANdriverTransportTime,
4534         LANdriverSrcRouting,
4535         LANdriverLineSpeed,
4536         LANdriverReserved,
4537         LANdriverMajorVersion,
4538         LANdriverMinorVersion,
4539         LANdriverFlags,
4540         LANdriverSendRetries,
4541         LANdriverLink,
4542         LANdriverSharingFlags,
4543         LANdriverSlot,
4544         LANdriverIOPortsAndRanges1,
4545         LANdriverIOPortsAndRanges2,
4546         LANdriverIOPortsAndRanges3,
4547         LANdriverIOPortsAndRanges4,
4548         LANdriverMemoryDecode0,
4549         LANdriverMemoryLength0,
4550         LANdriverMemoryDecode1,
4551         LANdriverMemoryLength1,
4552         LANdriverInterrupt1,
4553         LANdriverInterrupt2,
4554         LANdriverDMAUsage1,
4555         LANdriverDMAUsage2,
4556         LANdriverLogicalName,
4557         LANdriverIOReserved,
4558         LANdriverCardName,
4559 ], "LAN Configuration Information")
4560 LastAccessStruct                = struct("last_access_struct", [
4561         LastAccessedDate,
4562 ])
4563 lockInfo                        = struct("lock_info_struct", [
4564         LogicalLockThreshold,
4565         PhysicalLockThreshold,
4566         FileLockCount,
4567         RecordLockCount,
4568 ], "Lock Information")
4569 LockStruct                      = struct("lock_struct", [
4570         TaskNumByte,
4571         LockType,
4572         RecordStart,
4573         RecordEnd,
4574 ], "Locks")
4575 LoginTime                       = struct("login_time", [
4576         Year,
4577         Month,
4578         Day,
4579         Hour,
4580         Minute,
4581         Second,
4582         DayOfWeek,
4583 ], "Login Time")
4584 LogLockStruct                   = struct("log_lock_struct", [
4585         TaskNumByte,
4586         LockStatus,
4587         LockName,
4588 ], "Logical Locks")
4589 LogRecStruct                    = struct("log_rec_struct", [
4590         ConnectionNumberWord,
4591         TaskNumByte,
4592         LockStatus,
4593 ], "Logical Record Locks")
4594 LSLInformation                  = struct("lsl_information", [
4595         uint32("rx_buffers", "Receive Buffers"),
4596         uint32("rx_buffers_75", "Receive Buffers Warning Level"),
4597         uint32("rx_buffers_checked_out", "Receive Buffers Checked Out Count"),
4598         uint32("rx_buffer_size", "Receive Buffer Size"),
4599         uint32("max_phy_packet_size", "Maximum Physical Packet Size"),
4600         uint32("last_time_rx_buff_was_alloc", "Last Time a Receive Buffer was Allocated"),
4601         uint32("max_num_of_protocols", "Maximum Number of Protocols"),
4602         uint32("max_num_of_media_types", "Maximum Number of Media Types"),
4603         uint32("total_tx_packets", "Total Transmit Packets"),
4604         uint32("get_ecb_buf", "Get ECB Buffers"),
4605         uint32("get_ecb_fails", "Get ECB Failures"),
4606         uint32("aes_event_count", "AES Event Count"),
4607         uint32("post_poned_events", "Postponed Events"),
4608         uint32("ecb_cxl_fails", "ECB Cancel Failures"),
4609         uint32("valid_bfrs_reused", "Valid Buffers Reused"),
4610         uint32("enqueued_send_cnt", "Enqueued Send Count"),
4611         uint32("total_rx_packets", "Total Receive Packets"),
4612         uint32("unclaimed_packets", "Unclaimed Packets"),
4613         uint8("stat_table_major_version", "Statistics Table Major Version"),
4614         uint8("stat_table_minor_version", "Statistics Table Minor Version"),
4615 ], "LSL Information")
4616 MaximumSpaceStruct              = struct("max_space_struct", [
4617         MaxSpace,
4618 ])
4619 MemoryCounters                  = struct("memory_counters", [
4620         uint32("orig_num_cache_buff", "Original Number Of Cache Buffers"),
4621         uint32("curr_num_cache_buff", "Current Number Of Cache Buffers"),
4622         uint32("cache_dirty_block_thresh", "Cache Dirty Block Threshold"),
4623         uint32("wait_node", "Wait Node Count"),
4624         uint32("wait_node_alloc_fail", "Wait Node Alloc Failure Count"),
4625         uint32("move_cache_node", "Move Cache Node Count"),
4626         uint32("move_cache_node_from_avai", "Move Cache Node From Avail Count"),
4627         uint32("accel_cache_node_write", "Accelerate Cache Node Write Count"),
4628         uint32("rem_cache_node", "Remove Cache Node Count"),
4629         uint32("rem_cache_node_from_avail", "Remove Cache Node From Avail Count"),
4630 ], "Memory Counters")
4631 MLIDBoardInfo                   = struct("mlid_board_info", [           
4632         uint32("protocol_board_num", "Protocol Board Number"),
4633         uint16("protocol_number", "Protocol Number"),
4634         bytes("protocol_id", "Protocol ID", 6),
4635         nstring8("protocol_name", "Protocol Name"),
4636 ], "MLID Board Information")        
4637 ModifyInfoStruct                = struct("modify_info_struct", [
4638         ModifiedTime,
4639         ModifiedDate,
4640         ModifierID,
4641         LastAccessedDate,
4642 ], "Modification Information")
4643 nameInfo                        = struct("name_info_struct", [
4644         ObjectType,
4645         nstring8("login_name", "Login Name"),
4646 ], "Name Information")
4647 NCPNetworkAddress               = struct("ncp_network_address_struct", [
4648         TransportType,
4649         Reserved3,
4650         NetAddress,
4651 ], "Network Address")
4652
4653 netAddr                         = struct("net_addr_struct", [
4654         TransportType,
4655         nbytes32("transport_addr", "Transport Address"),
4656 ], "Network Address")
4657
4658 NetWareInformationStruct        = struct("netware_information_struct", [
4659         DataStreamSpaceAlloc,           # (Data Stream Alloc Bit)
4660         AttributesDef32,                # (Attributes Bit)
4661         FlagsDef,
4662         DataStreamSize,                 # (Data Stream Size Bit)
4663         TotalDataStreamDiskSpaceAlloc,  # (Total Stream Size Bit)
4664         NumberOfDataStreams,
4665         CreationTime,                   # (Creation Bit)
4666         CreationDate,
4667         CreatorID,
4668         ModifiedTime,                   # (Modify Bit)
4669         ModifiedDate,
4670         ModifierID,
4671         LastAccessedDate,
4672         ArchivedTime,                   # (Archive Bit)
4673         ArchivedDate,
4674         ArchiverID,
4675         InheritedRightsMask,            # (Rights Bit)
4676         DirectoryEntryNumber,           # (Directory Entry Bit)
4677         DOSDirectoryEntryNumber,
4678         VolumeNumberLong,
4679         EADataSize,                     # (Extended Attribute Bit)
4680         EACount,
4681         EAKeySize,
4682         CreatorNameSpaceNumber,         # (Name Space Bit)
4683         Reserved3,
4684 ], "NetWare Information")
4685 NLMInformation                  = struct("nlm_information", [
4686         IdentificationNumber,
4687         NLMFlags,
4688         Reserved3,
4689         NLMType,
4690         Reserved3,
4691         ParentID,
4692         MajorVersion,
4693         MinorVersion,
4694         Revision,
4695         Year,
4696         Reserved3,
4697         Month,
4698         Reserved3,
4699         Day,
4700         Reserved3,
4701         AllocAvailByte,
4702         AllocFreeCount,
4703         LastGarbCollect,
4704         MessageLanguage,
4705         NumberOfReferencedPublics,
4706 ], "NLM Information")
4707 NSInfoStruct                    = struct("ns_info_struct", [
4708         NameSpace,
4709         Reserved3,
4710 ])
4711 NWAuditStatus                   = struct("nw_audit_status", [
4712         AuditVersionDate,
4713         AuditFileVersionDate,
4714         val_string16("audit_enable_flag", "Auditing Enabled Flag", [
4715                 [ 0x0000, "Auditing Disabled" ],
4716                 [ 0x0100, "Auditing Enabled" ],
4717         ]),
4718         Reserved2,
4719         uint32("audit_file_size", "Audit File Size"),
4720         uint32("modified_counter", "Modified Counter"),
4721         uint32("audit_file_max_size", "Audit File Maximum Size"),
4722         uint32("audit_file_size_threshold", "Audit File Size Threshold"),
4723         uint32("audit_record_count", "Audit Record Count"),
4724         uint32("auditing_flags", "Auditing Flags"),
4725 ], "NetWare Audit Status")
4726 ObjectSecurityStruct            = struct("object_security_struct", [
4727         ObjectSecurity,
4728 ])
4729 ObjectFlagsStruct               = struct("object_flags_struct", [
4730         ObjectFlags,
4731 ])
4732 ObjectTypeStruct                = struct("object_type_struct", [
4733         ObjectType,
4734         Reserved2,
4735 ])
4736 ObjectNameStruct                = struct("object_name_struct", [
4737         ObjectNameStringz,
4738 ])
4739 ObjectIDStruct                  = struct("object_id_struct", [
4740         ObjectID, 
4741         Restriction,
4742 ])
4743 OpnFilesStruct                  = struct("opn_files_struct", [
4744         TaskNumberWord,
4745         LockType,
4746         AccessControl,
4747         LockFlag,
4748         VolumeNumber,
4749         DOSParentDirectoryEntry,
4750         DOSDirectoryEntry,
4751         ForkCount,
4752         NameSpace,
4753         FileName,
4754 ], "Open Files Information")
4755 OwnerIDStruct                   = struct("owner_id_struct", [
4756         CreatorID,
4757 ])                
4758 PacketBurstInformation          = struct("packet_burst_information", [
4759         uint32("big_invalid_slot", "Big Invalid Slot Count"),
4760         uint32("big_forged_packet", "Big Forged Packet Count"),
4761         uint32("big_invalid_packet", "Big Invalid Packet Count"),
4762         uint32("big_still_transmitting", "Big Still Transmitting Count"),
4763         uint32("still_doing_the_last_req", "Still Doing The Last Request Count"),
4764         uint32("invalid_control_req", "Invalid Control Request Count"),
4765         uint32("control_invalid_message_number", "Control Invalid Message Number Count"),
4766         uint32("control_being_torn_down", "Control Being Torn Down Count"),
4767         uint32("big_repeat_the_file_read", "Big Repeat the File Read Count"),
4768         uint32("big_send_extra_cc_count", "Big Send Extra CC Count"),
4769         uint32("big_return_abort_mess", "Big Return Abort Message Count"),
4770         uint32("big_read_invalid_mess", "Big Read Invalid Message Number Count"),
4771         uint32("big_read_do_it_over", "Big Read Do It Over Count"),
4772         uint32("big_read_being_torn_down", "Big Read Being Torn Down Count"),
4773         uint32("previous_control_packet", "Previous Control Packet Count"),
4774         uint32("send_hold_off_message", "Send Hold Off Message Count"),
4775         uint32("big_read_no_data_avail", "Big Read No Data Available Count"),
4776         uint32("big_read_trying_to_read", "Big Read Trying To Read Too Much Count"),
4777         uint32("async_read_error", "Async Read Error Count"),
4778         uint32("big_read_phy_read_err", "Big Read Physical Read Error Count"),
4779         uint32("ctl_bad_ack_frag_list", "Control Bad ACK Fragment List Count"),
4780         uint32("ctl_no_data_read", "Control No Data Read Count"),
4781         uint32("write_dup_req", "Write Duplicate Request Count"),
4782         uint32("shouldnt_be_ack_here", "Shouldn't Be ACKing Here Count"),
4783         uint32("write_incon_packet_len", "Write Inconsistent Packet Lengths Count"),
4784         uint32("first_packet_isnt_a_write", "First Packet Isn't A Write Count"),
4785         uint32("write_trash_dup_req", "Write Trashed Duplicate Request Count"),
4786         uint32("big_write_inv_message_num", "Big Write Invalid Message Number Count"),
4787         uint32("big_write_being_torn_down", "Big Write Being Torn Down Count"),
4788         uint32("big_write_being_abort", "Big Write Being Aborted Count"),
4789         uint32("zero_ack_frag", "Zero ACK Fragment Count"),
4790         uint32("write_curr_trans", "Write Currently Transmitting Count"),
4791         uint32("try_to_write_too_much", "Trying To Write Too Much Count"),
4792         uint32("write_out_of_mem_for_ctl_nodes", "Write Out Of Memory For Control Nodes Count"),
4793         uint32("write_didnt_need_this_frag", "Write Didn't Need This Fragment Count"),
4794         uint32("write_too_many_buf_check", "Write Too Many Buffers Checked Out Count"),
4795         uint32("write_timeout", "Write Time Out Count"),
4796         uint32("write_got_an_ack0", "Write Got An ACK Count 0"),
4797         uint32("write_got_an_ack1", "Write Got An ACK Count 1"),
4798         uint32("poll_abort_conn", "Poller Aborted The Connnection Count"),
4799         uint32("may_had_out_of_order", "Maybe Had Out Of Order Writes Count"),
4800         uint32("had_an_out_of_order", "Had An Out Of Order Write Count"),
4801         uint32("moved_the_ack_bit_dn", "Moved The ACK Bit Down Count"),
4802         uint32("bumped_out_of_order", "Bumped Out Of Order Write Count"),
4803         uint32("poll_rem_old_out_of_order", "Poller Removed Old Out Of Order Count"),
4804         uint32("write_didnt_need_but_req_ack", "Write Didn't Need But Requested ACK Count"),
4805         uint32("write_trash_packet", "Write Trashed Packet Count"),
4806         uint32("too_many_ack_frag", "Too Many ACK Fragments Count"),
4807         uint32("saved_an_out_of_order_packet", "Saved An Out Of Order Packet Count"),
4808         uint32("conn_being_aborted", "Connection Being Aborted Count"),
4809 ], "Packet Burst Information")
4810
4811 PadDSSpaceAllocate              = struct("pad_ds_space_alloc", [
4812     Reserved4,
4813 ])
4814 PadAttributes                   = struct("pad_attributes", [
4815     Reserved6,
4816 ])
4817 PadDataStreamSize               = struct("pad_data_stream_size", [
4818     Reserved4,
4819 ])    
4820 PadTotalStreamSize              = struct("pad_total_stream_size", [
4821     Reserved6,
4822 ])
4823 PadCreationInfo                 = struct("pad_creation_info", [
4824     Reserved8,
4825 ])
4826 PadModifyInfo                   = struct("pad_modify_info", [
4827     Reserved10,
4828 ])
4829 PadArchiveInfo                  = struct("pad_archive_info", [
4830     Reserved8,
4831 ])
4832 PadRightsInfo                   = struct("pad_rights_info", [
4833     Reserved2,
4834 ])
4835 PadDirEntry                     = struct("pad_dir_entry", [
4836     Reserved12,
4837 ])
4838 PadEAInfo                       = struct("pad_ea_info", [
4839     Reserved12,
4840 ])
4841 PadNSInfo                       = struct("pad_ns_info", [
4842     Reserved4,
4843 ])
4844 PhyLockStruct                   = struct("phy_lock_struct", [
4845         LoggedCount,
4846         ShareableLockCount,
4847         RecordStart,
4848         RecordEnd,
4849         LogicalConnectionNumber,
4850         TaskNumByte,
4851         LockType,
4852 ], "Physical Locks")
4853 printInfo                       = struct("print_info_struct", [
4854         PrintFlags,
4855         TabSize,
4856         Copies,
4857         PrintToFileFlag,
4858         BannerName,
4859         TargetPrinter,
4860         FormType,
4861 ], "Print Information")
4862 RightsInfoStruct                = struct("rights_info_struct", [
4863         InheritedRightsMask,
4864 ])
4865 RoutersInfo                     = struct("routers_info", [
4866         bytes("node", "Node", 6),
4867         ConnectedLAN,
4868         uint16("route_hops", "Hop Count"),
4869         uint16("route_time", "Route Time"),
4870 ], "Router Information")        
4871 RTagStructure                   = struct("r_tag_struct", [
4872         RTagNumber,
4873         ResourceSignature,
4874         ResourceCount,
4875         ResourceName,
4876 ], "Resource Tag")
4877 ScanInfoFileName                = struct("scan_info_file_name", [
4878         SalvageableFileEntryNumber,
4879         FileName,
4880 ])
4881 ScanInfoFileNoName              = struct("scan_info_file_no_name", [
4882         SalvageableFileEntryNumber,        
4883 ])        
4884 Segments                        = struct("segments", [
4885         uint32("volume_segment_dev_num", "Volume Segment Device Number"),
4886         uint32("volume_segment_offset", "Volume Segment Offset"),
4887         uint32("volume_segment_size", "Volume Segment Size"),
4888 ], "Volume Segment Information")            
4889 SemaInfoStruct                  = struct("sema_info_struct", [
4890         LogicalConnectionNumber,
4891         TaskNumByte,
4892 ])
4893 SemaStruct                      = struct("sema_struct", [
4894         OpenCount,
4895         SemaphoreValue,
4896         TaskNumByte,
4897         SemaphoreName,
4898 ], "Semaphore Information")
4899 ServerInfo                      = struct("server_info", [
4900         uint32("reply_canceled", "Reply Canceled Count"),
4901         uint32("write_held_off", "Write Held Off Count"),
4902         uint32("write_held_off_with_dup", "Write Held Off With Duplicate Request"),
4903         uint32("invalid_req_type", "Invalid Request Type Count"),
4904         uint32("being_aborted", "Being Aborted Count"),
4905         uint32("already_doing_realloc", "Already Doing Re-Allocate Count"),
4906         uint32("dealloc_invalid_slot", "De-Allocate Invalid Slot Count"),
4907         uint32("dealloc_being_proc", "De-Allocate Being Processed Count"),
4908         uint32("dealloc_forged_packet", "De-Allocate Forged Packet Count"),
4909         uint32("dealloc_still_transmit", "De-Allocate Still Transmitting Count"),
4910         uint32("start_station_error", "Start Station Error Count"),
4911         uint32("invalid_slot", "Invalid Slot Count"),
4912         uint32("being_processed", "Being Processed Count"),
4913         uint32("forged_packet", "Forged Packet Count"),
4914         uint32("still_transmitting", "Still Transmitting Count"),
4915         uint32("reexecute_request", "Re-Execute Request Count"),
4916         uint32("invalid_sequence_number", "Invalid Sequence Number Count"),
4917         uint32("dup_is_being_sent", "Duplicate Is Being Sent Already Count"),
4918         uint32("sent_pos_ack", "Sent Positive Acknowledge Count"),
4919         uint32("sent_a_dup_reply", "Sent A Duplicate Reply Count"),
4920         uint32("no_mem_for_station", "No Memory For Station Control Count"),
4921         uint32("no_avail_conns", "No Available Connections Count"),
4922         uint32("realloc_slot", "Re-Allocate Slot Count"),
4923         uint32("realloc_slot_came_too_soon", "Re-Allocate Slot Came Too Soon Count"),
4924 ], "Server Information")
4925 ServersSrcInfo                  = struct("servers_src_info", [
4926         ServerNode,
4927         ConnectedLAN,
4928         HopsToNet,
4929 ], "Source Server Information")
4930 SpaceStruct                     = struct("space_struct", [        
4931         Level,
4932         MaxSpace,
4933         CurrentSpace,
4934 ], "Space Information")        
4935 SPXInformation                  = struct("spx_information", [
4936         uint16("spx_max_conn", "SPX Max Connections Count"),
4937         uint16("spx_max_used_conn", "SPX Max Used Connections"),
4938         uint16("spx_est_conn_req", "SPX Establish Connection Requests"),
4939         uint16("spx_est_conn_fail", "SPX Establish Connection Fail"),
4940         uint16("spx_listen_con_req", "SPX Listen Connect Request"),
4941         uint16("spx_listen_con_fail", "SPX Listen Connect Fail"),
4942         uint32("spx_send", "SPX Send Count"),
4943         uint32("spx_window_choke", "SPX Window Choke Count"),
4944         uint16("spx_bad_send", "SPX Bad Send Count"),
4945         uint16("spx_send_fail", "SPX Send Fail Count"),
4946         uint16("spx_abort_conn", "SPX Aborted Connection"),
4947         uint32("spx_listen_pkt", "SPX Listen Packet Count"),
4948         uint16("spx_bad_listen", "SPX Bad Listen Count"),
4949         uint32("spx_incoming_pkt", "SPX Incoming Packet Count"),
4950         uint16("spx_bad_in_pkt", "SPX Bad In Packet Count"),
4951         uint16("spx_supp_pkt", "SPX Suppressed Packet Count"),
4952         uint16("spx_no_ses_listen", "SPX No Session Listen ECB Count"),
4953         uint16("spx_watch_dog", "SPX Watch Dog Destination Session Count"),
4954 ], "SPX Information")
4955 StackInfo                       = struct("stack_info", [
4956         StackNumber,
4957         fw_string("stack_short_name", "Stack Short Name", 16),
4958 ], "Stack Information")        
4959 statsInfo                       = struct("stats_info_struct", [
4960         TotalBytesRead,
4961         TotalBytesWritten,
4962         TotalRequest,
4963 ], "Statistics")
4964 theTimeStruct                   = struct("the_time_struct", [
4965         UTCTimeInSeconds,
4966         FractionalSeconds,
4967         TimesyncStatus,
4968 ])        
4969 timeInfo                        = struct("time_info", [
4970         Year,
4971         Month,
4972         Day,
4973         Hour,
4974         Minute,
4975         Second,
4976         DayOfWeek,
4977         uint32("login_expiration_time", "Login Expiration Time"),
4978 ])              
4979 TotalStreamSizeStruct           = struct("total_stream_size_struct", [
4980         TotalDataStreamDiskSpaceAlloc,
4981         NumberOfDataStreams,
4982 ])
4983 TrendCounters                   = struct("trend_counters", [
4984         uint32("num_of_cache_checks", "Number Of Cache Checks"),
4985         uint32("num_of_cache_hits", "Number Of Cache Hits"),
4986         uint32("num_of_dirty_cache_checks", "Number Of Dirty Cache Checks"),
4987         uint32("num_of_cache_dirty_checks", "Number Of Cache Dirty Checks"),
4988         uint32("cache_used_while_check", "Cache Used While Checking"),
4989         uint32("wait_till_dirty_blcks_dec", "Wait Till Dirty Blocks Decrease Count"),
4990         uint32("alloc_blck_frm_avail", "Allocate Block From Available Count"),
4991         uint32("alloc_blck_frm_lru", "Allocate Block From LRU Count"),
4992         uint32("alloc_blck_already_wait", "Allocate Block Already Waiting"),
4993         uint32("lru_sit_time", "LRU Sitting Time"),
4994         uint32("num_of_cache_check_no_wait", "Number Of Cache Check No Wait"),
4995         uint32("num_of_cache_hits_no_wait", "Number Of Cache Hits No Wait"),
4996 ], "Trend Counters")
4997 TrusteeStruct                   = struct("trustee_struct", [
4998         ObjectID,
4999         AccessRightsMaskWord,
5000 ])
5001 UpdateDateStruct                = struct("update_date_struct", [
5002         UpdateDate,
5003 ])
5004 UpdateIDStruct                  = struct("update_id_struct", [
5005         UpdateID,
5006 ])        
5007 UpdateTimeStruct                = struct("update_time_struct", [
5008         UpdateTime,
5009 ])                
5010 UserInformation                 = struct("user_info", [
5011         ConnectionNumber,
5012         UseCount,
5013         Reserved2,
5014         ConnectionServiceType,
5015         Year,
5016         Month,
5017         Day,
5018         Hour,
5019         Minute,
5020         Second,
5021         DayOfWeek,
5022         Status,
5023         Reserved2,
5024         ExpirationTime,
5025         ObjectType,
5026         Reserved2,
5027         TransactionTrackingFlag,
5028         LogicalLockThreshold,
5029         FileWriteFlags,
5030         FileWriteState,
5031         Reserved,
5032         FileLockCount,
5033         RecordLockCount,
5034         TotalBytesRead,
5035         TotalBytesWritten,
5036         TotalRequest,
5037         HeldRequests,
5038         HeldBytesRead,
5039         HeldBytesWritten,
5040 ], "User Information")
5041 VolInfoStructure                = struct("vol_info_struct", [
5042         VolumeType,
5043         Reserved2,
5044         StatusFlagBits,
5045         SectorSize,
5046         SectorsPerClusterLong,
5047         VolumeSizeInClusters,
5048         FreedClusters,
5049         SubAllocFreeableClusters,
5050         FreeableLimboSectors,
5051         NonFreeableLimboSectors,
5052         NonFreeableAvailableSubAllocSectors,
5053         NotUsableSubAllocSectors,
5054         SubAllocClusters,
5055         DataStreamsCount,
5056         LimboDataStreamsCount,
5057         OldestDeletedFileAgeInTicks,
5058         CompressedDataStreamsCount,
5059         CompressedLimboDataStreamsCount,
5060         UnCompressableDataStreamsCount,
5061         PreCompressedSectors,
5062         CompressedSectors,
5063         MigratedFiles,
5064         MigratedSectors,
5065         ClustersUsedByFAT,
5066         ClustersUsedByDirectories,
5067         ClustersUsedByExtendedDirectories,
5068         TotalDirectoryEntries,
5069         UnUsedDirectoryEntries,
5070         TotalExtendedDirectoryExtants,
5071         UnUsedExtendedDirectoryExtants,
5072         ExtendedAttributesDefined,
5073         ExtendedAttributeExtantsUsed,
5074         DirectoryServicesObjectID,
5075         VolumeLastModifiedTime,
5076         VolumeLastModifiedDate,
5077 ], "Volume Information")
5078 VolInfo2Struct                  = struct("vol_info_struct_2", [
5079         uint32("volume_active_count", "Volume Active Count"),
5080         uint32("volume_use_count", "Volume Use Count"),
5081         uint32("mac_root_ids", "MAC Root IDs"),
5082         VolumeLastModifiedTime,
5083         VolumeLastModifiedDate,
5084         uint32("volume_reference_count", "Volume Reference Count"),
5085         uint32("compression_lower_limit", "Compression Lower Limit"),
5086         uint32("outstanding_ios", "Outstanding IOs"),
5087         uint32("outstanding_compression_ios", "Outstanding Compression IOs"),
5088         uint32("compression_ios_limit", "Compression IOs Limit"),
5089 ], "Extended Volume Information")        
5090 VolumeStruct                    = struct("volume_struct", [
5091         VolumeNumberLong,
5092         VolumeNameLen,
5093 ])
5094
5095
5096 ##############################################################################
5097 # NCP Groups
5098 ##############################################################################
5099 def define_groups():
5100         groups['accounting']    = "Accounting"
5101         groups['afp']           = "AFP"
5102         groups['auditing']      = "Auditing"
5103         groups['bindery']       = "Bindery"
5104         groups['comm']          = "Communication"
5105         groups['connection']    = "Connection"
5106         groups['directory']     = "Directory"
5107         groups['extended']      = "Extended Attribute"
5108         groups['file']          = "File"
5109         groups['fileserver']    = "File Server"
5110         groups['message']       = "Message"
5111         groups['migration']     = "Data Migration"
5112         groups['misc']          = "Miscellaneous"
5113         groups['name']          = "Name Space"
5114         groups['nds']           = "NetWare Directory"
5115         groups['print']         = "Print"
5116         groups['queue']         = "Queue"
5117         groups['sync']          = "Synchronization"
5118         groups['tts']           = "Transaction Tracking"
5119         groups['qms']           = "Queue Management System (QMS)"
5120         groups['stats']         = "Server Statistics"
5121         groups['unknown']       = "Unknown"
5122
5123 ##############################################################################
5124 # NCP Errors
5125 ##############################################################################
5126 def define_errors():
5127         errors[0x0000] = "Ok"
5128         errors[0x0001] = "Transaction tracking is available"
5129         errors[0x0002] = "Ok. The data has been written"
5130         errors[0x0003] = "Calling Station is a Manager"
5131     
5132         errors[0x0100] = "One or more of the ConnectionNumbers in the send list are invalid"
5133         errors[0x0101] = "Invalid space limit"
5134         errors[0x0102] = "Insufficient disk space"
5135         errors[0x0103] = "Queue server cannot add jobs"
5136         errors[0x0104] = "Out of disk space"
5137         errors[0x0105] = "Semaphore overflow"
5138         errors[0x0106] = "Invalid Parameter"
5139         errors[0x0107] = "Invalid Number of Minutes to Delay"
5140         errors[0x0108] = "Invalid Start or Network Number"
5141         errors[0x0109] = "Cannot Obtain License"
5142     
5143         errors[0x0200] = "One or more clients in the send list are not logged in"
5144         errors[0x0201] = "Queue server cannot attach"
5145     
5146         errors[0x0300] = "One or more clients in the send list are not accepting messages"
5147     
5148         errors[0x0400] = "Client already has message"
5149         errors[0x0401] = "Queue server cannot service job"
5150     
5151         errors[0x7300] = "Revoke Handle Rights Not Found"
5152         errors[0x7900] = "Invalid Parameter in Request Packet"
5153         errors[0x7901] = "Nothing being Compressed"
5154         errors[0x7a00] = "Connection Already Temporary"
5155         errors[0x7b00] = "Connection Already Logged in"
5156         errors[0x7c00] = "Connection Not Authenticated"
5157         
5158         errors[0x7e00] = "NCP failed boundary check"
5159         errors[0x7e01] = "Invalid Length"
5160     
5161         errors[0x7f00] = "Lock Waiting"
5162         errors[0x8000] = "Lock fail"
5163         errors[0x8001] = "File in Use"
5164     
5165         errors[0x8100] = "A file handle could not be allocated by the file server"
5166         errors[0x8101] = "Out of File Handles"
5167         
5168         errors[0x8200] = "Unauthorized to open the file"
5169         errors[0x8300] = "Unable to read/write the volume. Possible bad sector on the file server"
5170         errors[0x8301] = "Hard I/O Error"
5171     
5172         errors[0x8400] = "Unauthorized to create the directory"
5173         errors[0x8401] = "Unauthorized to create the file"
5174     
5175         errors[0x8500] = "Unauthorized to delete the specified file"
5176         errors[0x8501] = "Unauthorized to overwrite an existing file in this directory"
5177     
5178         errors[0x8700] = "An unexpected character was encountered in the filename"
5179         errors[0x8701] = "Create Filename Error"
5180     
5181         errors[0x8800] = "Invalid file handle"
5182         errors[0x8900] = "Unauthorized to search this file/directory"
5183         errors[0x8a00] = "Unauthorized to delete this file/directory"
5184         errors[0x8b00] = "Unauthorized to rename a file in this directory"
5185     
5186         errors[0x8c00] = "No set privileges"
5187         errors[0x8c01] = "Unauthorized to modify a file in this directory"
5188         errors[0x8c02] = "Unauthorized to change the restriction on this volume"
5189     
5190         errors[0x8d00] = "Some of the affected files are in use by another client"
5191         errors[0x8d01] = "The affected file is in use"
5192     
5193         errors[0x8e00] = "All of the affected files are in use by another client"
5194         errors[0x8f00] = "Some of the affected files are read-only"
5195     
5196         errors[0x9000] = "An attempt to modify a read-only volume occurred"
5197         errors[0x9001] = "All of the affected files are read-only"
5198         errors[0x9002] = "Read Only Access to Volume"
5199     
5200         errors[0x9100] = "Some of the affected files already exist"
5201         errors[0x9101] = "Some Names Exist"
5202     
5203         errors[0x9200] = "Directory with the new name already exists"
5204         errors[0x9201] = "All of the affected files already exist"
5205     
5206         errors[0x9300] = "Unauthorized to read from this file"
5207         errors[0x9400] = "Unauthorized to write to this file"
5208         errors[0x9500] = "The affected file is detached"
5209     
5210         errors[0x9600] = "The file server has run out of memory to service this request"
5211         errors[0x9601] = "No alloc space for message"
5212         errors[0x9602] = "Server Out of Space"
5213     
5214         errors[0x9800] = "The affected volume is not mounted"
5215         errors[0x9801] = "The volume associated with Volume Number is not mounted"
5216         errors[0x9802] = "The resulting volume does not exist"
5217         errors[0x9803] = "The destination volume is not mounted"
5218         errors[0x9804] = "Disk Map Error"
5219     
5220         errors[0x9900] = "The file server has run out of directory space on the affected volume"
5221         errors[0x9a00] = "Invalid request to rename the affected file to another volume"
5222     
5223         errors[0x9b00] = "DirHandle is not associated with a valid directory path"
5224         errors[0x9b01] = "A resulting directory handle is not associated with a valid directory path"
5225         errors[0x9b02] = "The directory associated with DirHandle does not exist"
5226         errors[0x9b03] = "Bad directory handle"
5227     
5228         errors[0x9c00] = "The resulting path is not valid"
5229         errors[0x9c01] = "The resulting file path is not valid"
5230         errors[0x9c02] = "The resulting directory path is not valid"
5231         errors[0x9c03] = "Invalid path"
5232     
5233         errors[0x9d00] = "A directory handle was not available for allocation"
5234     
5235         errors[0x9e00] = "The name of the directory does not conform to a legal name for this name space"
5236         errors[0x9e01] = "The new directory name does not conform to a legal name for this name space"
5237         errors[0x9e02] = "Bad File Name"
5238     
5239         errors[0x9f00] = "The request attempted to delete a directory that is in use by another client"
5240     
5241         errors[0xa000] = "The request attempted to delete a directory that is not empty"
5242         errors[0xa100] = "An unrecoverable error occured on the affected directory"
5243     
5244         errors[0xa200] = "The request attempted to read from a file region that is physically locked"
5245         errors[0xa201] = "I/O Lock Error"
5246     
5247         errors[0xa400] = "Invalid directory rename attempted"
5248         errors[0xa500] = "Invalid open create mode"
5249         errors[0xa600] = "Auditor Access has been Removed"
5250         errors[0xa700] = "Error Auditing Version"
5251             
5252         errors[0xa800] = "Invalid Support Module ID"
5253         errors[0xa801] = "No Auditing Access Rights"
5254         errors[0xa802] = "No Access Rights"
5255             
5256         errors[0xbe00] = "Invalid Data Stream"
5257         errors[0xbf00] = "Requests for this name space are not valid on this volume"
5258     
5259         errors[0xc000] = "Unauthorized to retrieve accounting data"
5260         
5261         errors[0xc100] = "The ACCOUNT_BALANCE property does not exist"
5262         errors[0xc101] = "No Account Balance"
5263         
5264         errors[0xc200] = "The object has exceeded its credit limit"
5265         errors[0xc300] = "Too many holds have been placed against this account"
5266         errors[0xc400] = "The client account has been disabled"
5267     
5268         errors[0xc500] = "Access to the account has been denied because of intruder detection"
5269         errors[0xc501] = "Login lockout"
5270         errors[0xc502] = "Server Login Locked"
5271     
5272         errors[0xc600] = "The caller does not have operator priviliges"
5273         errors[0xc601] = "The client does not have operator priviliges"
5274     
5275         errors[0xc800] = "Missing EA Key"
5276         errors[0xc900] = "EA Not Found"
5277         errors[0xca00] = "Invalid EA Handle Type"
5278         errors[0xcb00] = "EA No Key No Data"
5279         errors[0xcc00] = "EA Number Mismatch"
5280         errors[0xcd00] = "Extent Number Out of Range"
5281         errors[0xce00] = "EA Bad Directory Number"
5282         errors[0xcf00] = "Invalid EA Handle"
5283     
5284         errors[0xd000] = "Queue error"
5285         errors[0xd001] = "EA Position Out of Range"
5286         
5287         errors[0xd100] = "The queue does not exist"
5288         errors[0xd101] = "EA Access Denied"
5289     
5290         errors[0xd200] = "A queue server is not associated with this queue"
5291         errors[0xd201] = "A queue server is not associated with the selected queue"
5292         errors[0xd202] = "No queue server"
5293         errors[0xd203] = "Data Page Odd Size"
5294     
5295         errors[0xd300] = "No queue rights"
5296         errors[0xd301] = "EA Volume Not Mounted"
5297     
5298         errors[0xd400] = "The queue is full and cannot accept another request"
5299         errors[0xd401] = "The queue associated with ObjectId is full and cannot accept another request"
5300         errors[0xd402] = "Bad Page Boundary"
5301     
5302         errors[0xd500] = "A job does not exist in this queue"
5303         errors[0xd501] = "No queue job"
5304         errors[0xd502] = "The job associated with JobNumber does not exist in this queue"
5305         errors[0xd503] = "Inspect Failure"
5306         errors[0xd504] = "Unknown NCP Extension Number"
5307     
5308         errors[0xd600] = "The file server does not allow unencrypted passwords"
5309         errors[0xd601] = "No job right"
5310         errors[0xd602] = "EA Already Claimed"
5311     
5312         errors[0xd700] = "Bad account"
5313         errors[0xd701] = "The old and new password strings are identical"
5314         errors[0xd702] = "The job is currently being serviced"
5315         errors[0xd703] = "The queue is currently servicing a job"
5316         errors[0xd704] = "Queue servicing"
5317         errors[0xd705] = "Odd Buffer Size"
5318     
5319         errors[0xd800] = "Queue not active"
5320         errors[0xd801] = "No Scorecards"
5321         
5322         errors[0xd900] = "The file server cannot accept another connection as it has reached its limit"
5323         errors[0xd901] = "The client is not security equivalent to one of the objects in the Q_SERVERS group property of the target queue"
5324         errors[0xd902] = "Station is not a server"
5325         errors[0xd903] = "Bad EDS Signature"
5326     
5327         errors[0xda00] = "Attempted to login to the file server during a restricted time period"
5328         errors[0xda01] = "Queue halted"
5329         errors[0xda02] = "EA Space Limit"
5330     
5331         errors[0xdb00] = "Attempted to login to the file server from an unauthorized workstation or network"
5332         errors[0xdb01] = "The queue cannot attach another queue server"
5333         errors[0xdb02] = "Maximum queue servers"
5334         errors[0xdb03] = "EA Key Corrupt"
5335     
5336         errors[0xdc00] = "Account Expired"
5337         errors[0xdc01] = "EA Key Limit"
5338         
5339         errors[0xdd00] = "Tally Corrupt"
5340         errors[0xde00] = "Attempted to login to the file server with an incorrect password"
5341         errors[0xdf00] = "Attempted to login to the file server with a password that has expired"
5342     
5343         errors[0xe000] = "No Login Connections Available"
5344         errors[0xe700] = "No disk track"
5345         errors[0xe800] = "Write to group"
5346         errors[0xe900] = "The object is already a member of the group property"
5347     
5348         errors[0xea00] = "No such member"
5349         errors[0xea01] = "The bindery object is not a member of the set"
5350         errors[0xea02] = "Non-existent member"
5351     
5352         errors[0xeb00] = "The property is not a set property"
5353     
5354         errors[0xec00] = "No such set"
5355         errors[0xec01] = "The set property does not exist"
5356     
5357         errors[0xed00] = "Property exists"
5358         errors[0xed01] = "The property already exists"
5359         errors[0xed02] = "An attempt was made to create a bindery object property that already exists"
5360     
5361         errors[0xee00] = "The object already exists"
5362         errors[0xee01] = "The bindery object already exists"
5363     
5364         errors[0xef00] = "Illegal name"
5365         errors[0xef01] = "Illegal characters in ObjectName field"
5366         errors[0xef02] = "Invalid name"
5367     
5368         errors[0xf000] = "A wildcard was detected in a field that does not support wildcards"
5369         errors[0xf001] = "An illegal wildcard was detected in ObjectName"
5370     
5371         errors[0xf100] = "The client does not have the rights to access this bindery object"
5372         errors[0xf101] = "Bindery security"
5373         errors[0xf102] = "Invalid bindery security"
5374     
5375         errors[0xf200] = "Unauthorized to read from this object"
5376         errors[0xf300] = "Unauthorized to rename this object"
5377     
5378         errors[0xf400] = "Unauthorized to delete this object"
5379         errors[0xf401] = "No object delete privileges"
5380         errors[0xf402] = "Unauthorized to delete this queue"
5381     
5382         errors[0xf500] = "Unauthorized to create this object"
5383         errors[0xf501] = "No object create"
5384     
5385         errors[0xf600] = "No property delete"
5386         errors[0xf601] = "Unauthorized to delete the property of this object"
5387         errors[0xf602] = "Unauthorized to delete this property"
5388     
5389         errors[0xf700] = "Unauthorized to create this property"
5390         errors[0xf701] = "No property create privilege"
5391     
5392         errors[0xf800] = "Unauthorized to write to this property"
5393         errors[0xf900] = "Unauthorized to read this property"
5394         errors[0xfa00] = "Temporary remap error"
5395     
5396         errors[0xfb00] = "No such property"
5397         errors[0xfb01] = "The file server does not support this request"
5398         errors[0xfb02] = "The specified property does not exist"
5399         errors[0xfb03] = "The PASSWORD property does not exist for this bindery object"
5400         errors[0xfb04] = "NDS NCP not available"
5401         errors[0xfb05] = "Bad Directory Handle"
5402         errors[0xfb06] = "Unknown Request"
5403         errors[0xfb07] = "Invalid Subfunction Request"
5404         errors[0xfb08] = "Attempt to use an invalid parameter (drive number, path, or flag value) during a set drive path call"
5405         errors[0xfb09] = "NMAS not running on this server, NCP NOT Supported"
5406         errors[0xfb0a] = "Station Not Logged In"
5407         errors[0xfb0b] = "Secret Store not running on this server, NCP Not supported"
5408     
5409         errors[0xfc00] = "The message queue cannot accept another message"
5410         errors[0xfc01] = "The trustee associated with ObjectId does not exist"
5411         errors[0xfc02] = "The specified bindery object does not exist"
5412         errors[0xfc03] = "The bindery object associated with ObjectID does not exist"
5413         errors[0xfc04] = "A bindery object does not exist that matches"
5414         errors[0xfc05] = "The specified queue does not exist"
5415         errors[0xfc06] = "No such object"
5416         errors[0xfc07] = "The queue associated with ObjectID does not exist"
5417     
5418         errors[0xfd00] = "Bad station number"
5419         errors[0xfd01] = "The connection associated with ConnectionNumber is not active"
5420         errors[0xfd02] = "Lock collision"
5421         errors[0xfd03] = "Transaction tracking is disabled"
5422     
5423         errors[0xfe00] = "I/O failure"
5424         errors[0xfe01] = "The files containing the bindery on the file server are locked"
5425         errors[0xfe02] = "A file with the specified name already exists in this directory"
5426         errors[0xfe03] = "No more restrictions were found"
5427         errors[0xfe04] = "The file server was unable to lock the file within the specified time limit"
5428         errors[0xfe05] = "The file server was unable to lock all files within the specified time limit"
5429         errors[0xfe06] = "The bindery object associated with ObjectID is not a valid trustee"
5430         errors[0xfe07] = "Directory locked"
5431         errors[0xfe08] = "Bindery locked"
5432         errors[0xfe09] = "Invalid semaphore name length"
5433         errors[0xfe0a] = "The file server was unable to complete the operation within the specified time limit"
5434         errors[0xfe0b] = "Transaction restart"
5435         errors[0xfe0c] = "Bad packet"
5436         errors[0xfe0d] = "Timeout"
5437         errors[0xfe0e] = "User Not Found"
5438         errors[0xfe0f] = "Trustee Not Found"
5439     
5440         errors[0xff00] = "Failure"
5441         errors[0xff01] = "Lock error"
5442         errors[0xff02] = "File not found"
5443         errors[0xff03] = "The file not found or cannot be unlocked"
5444         errors[0xff04] = "Record not found"
5445         errors[0xff05] = "The logical record was not found"
5446         errors[0xff06] = "The printer associated with Printer Number does not exist"
5447         errors[0xff07] = "No such printer"
5448         errors[0xff08] = "Unable to complete the request"
5449         errors[0xff09] = "Unauthorized to change privileges of this trustee"
5450         errors[0xff0a] = "No files matching the search criteria were found"
5451         errors[0xff0b] = "A file matching the search criteria was not found"
5452         errors[0xff0c] = "Verification failed"
5453         errors[0xff0d] = "Object associated with ObjectID is not a manager"
5454         errors[0xff0e] = "Invalid initial semaphore value"
5455         errors[0xff0f] = "The semaphore handle is not valid"
5456         errors[0xff10] = "SemaphoreHandle is not associated with a valid sempahore"
5457         errors[0xff11] = "Invalid semaphore handle"
5458         errors[0xff12] = "Transaction tracking is not available"
5459         errors[0xff13] = "The transaction has not yet been written to disk"
5460         errors[0xff14] = "Directory already exists"
5461         errors[0xff15] = "The file already exists and the deletion flag was not set"
5462         errors[0xff16] = "No matching files or directories were found"
5463         errors[0xff17] = "A file or directory matching the search criteria was not found"
5464         errors[0xff18] = "The file already exists"
5465         errors[0xff19] = "Failure, No files found"
5466         errors[0xff1a] = "Unlock Error"
5467         errors[0xff1b] = "I/O Bound Error"
5468         errors[0xff1c] = "Not Accepting Messages"
5469         errors[0xff1d] = "No More Salvageable Files in Directory"
5470         errors[0xff1e] = "Calling Station is Not a Manager"
5471         errors[0xff1f] = "Bindery Failure"
5472         errors[0xff20] = "NCP Extension Not Found"
5473
5474 ##############################################################################
5475 # Produce C code
5476 ##############################################################################
5477 def ExamineVars(vars, structs_hash, vars_hash):
5478         for var in vars:
5479                 if isinstance(var, struct):
5480                         structs_hash[var.HFName()] = var
5481                         struct_vars = var.Variables()
5482                         ExamineVars(struct_vars, structs_hash, vars_hash)
5483                 else:
5484                         vars_hash[repr(var)] = var
5485                         if isinstance(var, bitfield):
5486                                 sub_vars = var.SubVariables()
5487                                 ExamineVars(sub_vars, structs_hash, vars_hash)
5488
5489 def produce_code():
5490
5491         global errors
5492
5493         print "/*"
5494         print " * Generated automatically from %s" % (sys.argv[0])
5495         print " * Do not edit this file manually, as all changes will be lost."
5496         print " */\n"
5497
5498         print """
5499 /*
5500  * Portions Copyright (c) Gilbert Ramirez 2000-2002
5501  * Portions Copyright (c) Novell, Inc. 2000-2003
5502  *
5503  * This program is free software; you can redistribute it and/or
5504  * modify it under the terms of the GNU General Public License
5505  * as published by the Free Software Foundation; either version 2
5506  * of the License, or (at your option) any later version.
5507  * 
5508  * This program is distributed in the hope that it will be useful,
5509  * but WITHOUT ANY WARRANTY; without even the implied warranty of
5510  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5511  * GNU General Public License for more details.
5512  * 
5513  * You should have received a copy of the GNU General Public License
5514  * along with this program; if not, write to the Free Software
5515  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
5516  */
5517
5518 #ifdef HAVE_CONFIG_H
5519 # include "config.h"
5520 #endif
5521
5522 #include <string.h>
5523 #include <glib.h>
5524 #include <epan/packet.h>
5525 #include <epan/conversation.h>
5526 #include "ptvcursor.h"
5527 #include "packet-ncp-int.h"
5528 #include <epan/strutil.h>
5529
5530 /* Function declarations for functions used in proto_register_ncp2222() */
5531 static void ncp_init_protocol(void);
5532 static void ncp_postseq_cleanup(void);
5533
5534 /* Endianness macros */
5535 #define BE              0
5536 #define LE              1
5537 #define NO_ENDIANNESS   0
5538
5539 #define NO_LENGTH       -1
5540
5541 /* We use this int-pointer as a special flag in ptvc_record's */
5542 static int ptvc_struct_int_storage;
5543 #define PTVC_STRUCT     (&ptvc_struct_int_storage)
5544
5545 /* Values used in the count-variable ("var"/"repeat") logic. */"""
5546
5547
5548         if global_highest_var > -1:
5549                 print "#define NUM_REPEAT_VARS\t%d" % (global_highest_var + 1)
5550                 print "guint repeat_vars[NUM_REPEAT_VARS];",
5551         else:
5552                 print "#define NUM_REPEAT_VARS\t0"
5553                 print "guint *repeat_vars = NULL;",
5554
5555         print """
5556 #define NO_VAR          NUM_REPEAT_VARS
5557 #define NO_REPEAT       NUM_REPEAT_VARS
5558
5559 #define REQ_COND_SIZE_CONSTANT  0
5560 #define REQ_COND_SIZE_VARIABLE  1
5561 #define NO_REQ_COND_SIZE        0
5562
5563
5564 #define NTREE   0x00020000
5565 #define NDEPTH  0x00000002
5566 #define NREV    0x00000004
5567 #define NFLAGS  0x00000008
5568
5569
5570
5571 static int hf_ncp_func = -1;
5572 static int hf_ncp_length = -1;
5573 static int hf_ncp_subfunc = -1;
5574 static int hf_ncp_fragment_handle = -1;
5575 static int hf_ncp_completion_code = -1;
5576 static int hf_ncp_connection_status = -1;
5577 static int hf_ncp_req_frame_num = -1;
5578 static int hf_ncp_req_frame_time = -1;
5579 static int hf_ncp_fragment_size = -1;
5580 static int hf_ncp_message_size = -1;
5581 static int hf_ncp_nds_flag = -1;
5582 static int hf_ncp_nds_verb = -1; 
5583 static int hf_ping_version = -1;
5584 static int hf_nds_version = -1;
5585 static int hf_nds_flags = -1;
5586 static int hf_nds_reply_depth = -1;
5587 static int hf_nds_reply_rev = -1;
5588 static int hf_nds_reply_flags = -1;
5589 static int hf_nds_p1type = -1;
5590 static int hf_nds_uint32value = -1;
5591 static int hf_nds_bit1 = -1;
5592 static int hf_nds_bit2 = -1;
5593 static int hf_nds_bit3 = -1;
5594 static int hf_nds_bit4 = -1;
5595 static int hf_nds_bit5 = -1;
5596 static int hf_nds_bit6 = -1;
5597 static int hf_nds_bit7 = -1;
5598 static int hf_nds_bit8 = -1;
5599 static int hf_nds_bit9 = -1;
5600 static int hf_nds_bit10 = -1;
5601 static int hf_nds_bit11 = -1;
5602 static int hf_nds_bit12 = -1;
5603 static int hf_nds_bit13 = -1;
5604 static int hf_nds_bit14 = -1;
5605 static int hf_nds_bit15 = -1;
5606 static int hf_nds_bit16 = -1;
5607 static int hf_bit1outflags = -1;
5608 static int hf_bit2outflags = -1;
5609 static int hf_bit3outflags = -1;
5610 static int hf_bit4outflags = -1;
5611 static int hf_bit5outflags = -1;
5612 static int hf_bit6outflags = -1;
5613 static int hf_bit7outflags = -1;
5614 static int hf_bit8outflags = -1;
5615 static int hf_bit9outflags = -1;
5616 static int hf_bit10outflags = -1;
5617 static int hf_bit11outflags = -1;
5618 static int hf_bit12outflags = -1;
5619 static int hf_bit13outflags = -1;
5620 static int hf_bit14outflags = -1;
5621 static int hf_bit15outflags = -1;
5622 static int hf_bit16outflags = -1;
5623 static int hf_bit1nflags = -1;
5624 static int hf_bit2nflags = -1;
5625 static int hf_bit3nflags = -1;
5626 static int hf_bit4nflags = -1;
5627 static int hf_bit5nflags = -1;
5628 static int hf_bit6nflags = -1;
5629 static int hf_bit7nflags = -1;
5630 static int hf_bit8nflags = -1;
5631 static int hf_bit9nflags = -1;
5632 static int hf_bit10nflags = -1;
5633 static int hf_bit11nflags = -1;
5634 static int hf_bit12nflags = -1;
5635 static int hf_bit13nflags = -1;
5636 static int hf_bit14nflags = -1;
5637 static int hf_bit15nflags = -1;
5638 static int hf_bit16nflags = -1;
5639 static int hf_bit1rflags = -1;
5640 static int hf_bit2rflags = -1;
5641 static int hf_bit3rflags = -1;
5642 static int hf_bit4rflags = -1;
5643 static int hf_bit5rflags = -1;
5644 static int hf_bit6rflags = -1;
5645 static int hf_bit7rflags = -1;
5646 static int hf_bit8rflags = -1;
5647 static int hf_bit9rflags = -1;
5648 static int hf_bit10rflags = -1;
5649 static int hf_bit11rflags = -1;
5650 static int hf_bit12rflags = -1;
5651 static int hf_bit13rflags = -1;
5652 static int hf_bit14rflags = -1;
5653 static int hf_bit15rflags = -1;
5654 static int hf_bit16rflags = -1;
5655 static int hf_bit1cflags = -1;
5656 static int hf_bit2cflags = -1;
5657 static int hf_bit3cflags = -1;
5658 static int hf_bit4cflags = -1;
5659 static int hf_bit5cflags = -1;
5660 static int hf_bit6cflags = -1;
5661 static int hf_bit7cflags = -1;
5662 static int hf_bit8cflags = -1;
5663 static int hf_bit9cflags = -1;
5664 static int hf_bit10cflags = -1;
5665 static int hf_bit11cflags = -1;
5666 static int hf_bit12cflags = -1;
5667 static int hf_bit13cflags = -1;
5668 static int hf_bit14cflags = -1;
5669 static int hf_bit15cflags = -1;
5670 static int hf_bit16cflags = -1;
5671 static int hf_bit1acflags = -1;
5672 static int hf_bit2acflags = -1;
5673 static int hf_bit3acflags = -1;
5674 static int hf_bit4acflags = -1;
5675 static int hf_bit5acflags = -1;
5676 static int hf_bit6acflags = -1;
5677 static int hf_bit7acflags = -1;
5678 static int hf_bit8acflags = -1;
5679 static int hf_bit9acflags = -1;
5680 static int hf_bit10acflags = -1;
5681 static int hf_bit11acflags = -1;
5682 static int hf_bit12acflags = -1;
5683 static int hf_bit13acflags = -1;
5684 static int hf_bit14acflags = -1;
5685 static int hf_bit15acflags = -1;
5686 static int hf_bit16acflags = -1;
5687 static int hf_bit1vflags = -1;
5688 static int hf_bit2vflags = -1;
5689 static int hf_bit3vflags = -1;
5690 static int hf_bit4vflags = -1;
5691 static int hf_bit5vflags = -1;
5692 static int hf_bit6vflags = -1;
5693 static int hf_bit7vflags = -1;
5694 static int hf_bit8vflags = -1;
5695 static int hf_bit9vflags = -1;
5696 static int hf_bit10vflags = -1;
5697 static int hf_bit11vflags = -1;
5698 static int hf_bit12vflags = -1;
5699 static int hf_bit13vflags = -1;
5700 static int hf_bit14vflags = -1;
5701 static int hf_bit15vflags = -1;
5702 static int hf_bit16vflags = -1;
5703 static int hf_bit1eflags = -1;
5704 static int hf_bit2eflags = -1;
5705 static int hf_bit3eflags = -1;
5706 static int hf_bit4eflags = -1;
5707 static int hf_bit5eflags = -1;
5708 static int hf_bit6eflags = -1;
5709 static int hf_bit7eflags = -1;
5710 static int hf_bit8eflags = -1;
5711 static int hf_bit9eflags = -1;
5712 static int hf_bit10eflags = -1;
5713 static int hf_bit11eflags = -1;
5714 static int hf_bit12eflags = -1;
5715 static int hf_bit13eflags = -1;
5716 static int hf_bit14eflags = -1;
5717 static int hf_bit15eflags = -1;
5718 static int hf_bit16eflags = -1;
5719 static int hf_bit1infoflagsl = -1;
5720 static int hf_bit2infoflagsl = -1;
5721 static int hf_bit3infoflagsl = -1;
5722 static int hf_bit4infoflagsl = -1;
5723 static int hf_bit5infoflagsl = -1;
5724 static int hf_bit6infoflagsl = -1;
5725 static int hf_bit7infoflagsl = -1;
5726 static int hf_bit8infoflagsl = -1;
5727 static int hf_bit9infoflagsl = -1;
5728 static int hf_bit10infoflagsl = -1;
5729 static int hf_bit11infoflagsl = -1;
5730 static int hf_bit12infoflagsl = -1;
5731 static int hf_bit13infoflagsl = -1;
5732 static int hf_bit14infoflagsl = -1;
5733 static int hf_bit15infoflagsl = -1;
5734 static int hf_bit16infoflagsl = -1;
5735 static int hf_bit1infoflagsh = -1;
5736 static int hf_bit2infoflagsh = -1;
5737 static int hf_bit3infoflagsh = -1;
5738 static int hf_bit4infoflagsh = -1;
5739 static int hf_bit5infoflagsh = -1;
5740 static int hf_bit6infoflagsh = -1;
5741 static int hf_bit7infoflagsh = -1;
5742 static int hf_bit8infoflagsh = -1;
5743 static int hf_bit9infoflagsh = -1;
5744 static int hf_bit10infoflagsh = -1;
5745 static int hf_bit11infoflagsh = -1;
5746 static int hf_bit12infoflagsh = -1;
5747 static int hf_bit13infoflagsh = -1;
5748 static int hf_bit14infoflagsh = -1;
5749 static int hf_bit15infoflagsh = -1;
5750 static int hf_bit16infoflagsh = -1;
5751 static int hf_bit1lflags = -1;
5752 static int hf_bit2lflags = -1;
5753 static int hf_bit3lflags = -1;
5754 static int hf_bit4lflags = -1;
5755 static int hf_bit5lflags = -1;
5756 static int hf_bit6lflags = -1;
5757 static int hf_bit7lflags = -1;
5758 static int hf_bit8lflags = -1;
5759 static int hf_bit9lflags = -1;
5760 static int hf_bit10lflags = -1;
5761 static int hf_bit11lflags = -1;
5762 static int hf_bit12lflags = -1;
5763 static int hf_bit13lflags = -1;
5764 static int hf_bit14lflags = -1;
5765 static int hf_bit15lflags = -1;
5766 static int hf_bit16lflags = -1;
5767 static int hf_bit1l1flagsl = -1;
5768 static int hf_bit2l1flagsl = -1;
5769 static int hf_bit3l1flagsl = -1;
5770 static int hf_bit4l1flagsl = -1;
5771 static int hf_bit5l1flagsl = -1;
5772 static int hf_bit6l1flagsl = -1;
5773 static int hf_bit7l1flagsl = -1;
5774 static int hf_bit8l1flagsl = -1;
5775 static int hf_bit9l1flagsl = -1;
5776 static int hf_bit10l1flagsl = -1;
5777 static int hf_bit11l1flagsl = -1;
5778 static int hf_bit12l1flagsl = -1;
5779 static int hf_bit13l1flagsl = -1;
5780 static int hf_bit14l1flagsl = -1;
5781 static int hf_bit15l1flagsl = -1;
5782 static int hf_bit16l1flagsl = -1;
5783 static int hf_bit1l1flagsh = -1;
5784 static int hf_bit2l1flagsh = -1;
5785 static int hf_bit3l1flagsh = -1;
5786 static int hf_bit4l1flagsh = -1;
5787 static int hf_bit5l1flagsh = -1;
5788 static int hf_bit6l1flagsh = -1;
5789 static int hf_bit7l1flagsh = -1;
5790 static int hf_bit8l1flagsh = -1;
5791 static int hf_bit9l1flagsh = -1;
5792 static int hf_bit10l1flagsh = -1;
5793 static int hf_bit11l1flagsh = -1;
5794 static int hf_bit12l1flagsh = -1;
5795 static int hf_bit13l1flagsh = -1;
5796 static int hf_bit14l1flagsh = -1;
5797 static int hf_bit15l1flagsh = -1;
5798 static int hf_bit16l1flagsh = -1;
5799 static int hf_nds_tree_name = -1;
5800 static int hf_nds_reply_error = -1;
5801 static int hf_nds_net = -1;
5802 static int hf_nds_node = -1;
5803 static int hf_nds_socket = -1;
5804 static int hf_add_ref_ip = -1;
5805 static int hf_add_ref_udp = -1;                                                     
5806 static int hf_add_ref_tcp = -1;
5807 static int hf_referral_record = -1;
5808 static int hf_referral_addcount = -1;
5809 static int hf_nds_port = -1;
5810 static int hf_mv_string = -1;
5811 static int hf_nds_syntax = -1;
5812 static int hf_value_string = -1;
5813 static int hf_nds_buffer_size = -1;
5814 static int hf_nds_ver = -1;
5815 static int hf_nds_nflags = -1;
5816 static int hf_nds_scope = -1;
5817 static int hf_nds_name = -1;
5818 static int hf_nds_comm_trans = -1;
5819 static int hf_nds_tree_trans = -1;
5820 static int hf_nds_iteration = -1;
5821 static int hf_nds_eid = -1;
5822 static int hf_nds_info_type = -1;
5823 static int hf_nds_all_attr = -1;
5824 static int hf_nds_req_flags = -1;
5825 static int hf_nds_attr = -1;
5826 static int hf_nds_crc = -1;
5827 static int hf_nds_referrals = -1;
5828 static int hf_nds_result_flags = -1;
5829 static int hf_nds_tag_string = -1;
5830 static int hf_value_bytes = -1;
5831 static int hf_replica_type = -1;
5832 static int hf_replica_state = -1;
5833 static int hf_replica_number = -1;
5834 static int hf_min_nds_ver = -1;
5835 static int hf_nds_ver_include = -1;
5836 static int hf_nds_ver_exclude = -1;
5837 static int hf_nds_es = -1;
5838 static int hf_es_type = -1;
5839 static int hf_delim_string = -1;
5840 static int hf_rdn_string = -1;
5841 static int hf_nds_revent = -1;
5842 static int hf_nds_rnum = -1; 
5843 static int hf_nds_name_type = -1;
5844 static int hf_nds_rflags = -1;
5845 static int hf_nds_eflags = -1;
5846 static int hf_nds_depth = -1;
5847 static int hf_nds_class_def_type = -1;
5848 static int hf_nds_classes = -1;
5849 static int hf_nds_return_all_classes = -1;
5850 static int hf_nds_stream_flags = -1;
5851 static int hf_nds_stream_name = -1;
5852 static int hf_nds_file_handle = -1;
5853 static int hf_nds_file_size = -1;
5854 static int hf_nds_dn_output_type = -1;
5855 static int hf_nds_nested_output_type = -1;
5856 static int hf_nds_output_delimiter = -1;
5857 static int hf_nds_output_entry_specifier = -1;
5858 static int hf_es_value = -1;
5859 static int hf_es_rdn_count = -1;
5860 static int hf_nds_replica_num = -1;
5861 static int hf_nds_event_num = -1;
5862 static int hf_es_seconds = -1;
5863 static int hf_nds_compare_results = -1;
5864 static int hf_nds_parent = -1;
5865 static int hf_nds_name_filter = -1;
5866 static int hf_nds_class_filter = -1;
5867 static int hf_nds_time_filter = -1;
5868 static int hf_nds_partition_root_id = -1;
5869 static int hf_nds_replicas = -1;
5870 static int hf_nds_purge = -1;
5871 static int hf_nds_local_partition = -1;
5872 static int hf_partition_busy = -1;
5873 static int hf_nds_number_of_changes = -1;
5874 static int hf_sub_count = -1;
5875 static int hf_nds_revision = -1;
5876 static int hf_nds_base_class = -1;
5877 static int hf_nds_relative_dn = -1;
5878 static int hf_nds_root_dn = -1;
5879 static int hf_nds_parent_dn = -1;
5880 static int hf_deref_base = -1;
5881 static int hf_nds_entry_info = -1;
5882 static int hf_nds_base = -1;
5883 static int hf_nds_privileges = -1;
5884 static int hf_nds_vflags = -1;
5885 static int hf_nds_value_len = -1;
5886 static int hf_nds_cflags = -1;
5887 static int hf_nds_acflags = -1;
5888 static int hf_nds_asn1 = -1;
5889 static int hf_nds_upper = -1;
5890 static int hf_nds_lower = -1;
5891 static int hf_nds_trustee_dn = -1;
5892 static int hf_nds_attribute_dn = -1;
5893 static int hf_nds_acl_add = -1;
5894 static int hf_nds_acl_del = -1;
5895 static int hf_nds_att_add = -1;
5896 static int hf_nds_att_del = -1;
5897 static int hf_nds_keep = -1;
5898 static int hf_nds_new_rdn = -1;
5899 static int hf_nds_time_delay = -1;
5900 static int hf_nds_root_name = -1;
5901 static int hf_nds_new_part_id = -1;
5902 static int hf_nds_child_part_id = -1;
5903 static int hf_nds_master_part_id = -1;
5904 static int hf_nds_target_name = -1;
5905 static int hf_nds_super = -1;
5906 static int hf_bit1pingflags2 = -1;
5907 static int hf_bit2pingflags2 = -1;
5908 static int hf_bit3pingflags2 = -1;
5909 static int hf_bit4pingflags2 = -1;
5910 static int hf_bit5pingflags2 = -1;
5911 static int hf_bit6pingflags2 = -1;
5912 static int hf_bit7pingflags2 = -1;
5913 static int hf_bit8pingflags2 = -1;
5914 static int hf_bit9pingflags2 = -1;
5915 static int hf_bit10pingflags2 = -1;
5916 static int hf_bit11pingflags2 = -1;
5917 static int hf_bit12pingflags2 = -1;
5918 static int hf_bit13pingflags2 = -1;
5919 static int hf_bit14pingflags2 = -1;
5920 static int hf_bit15pingflags2 = -1;
5921 static int hf_bit16pingflags2 = -1;
5922 static int hf_bit1pingflags1 = -1;
5923 static int hf_bit2pingflags1 = -1;
5924 static int hf_bit3pingflags1 = -1;
5925 static int hf_bit4pingflags1 = -1;
5926 static int hf_bit5pingflags1 = -1;
5927 static int hf_bit6pingflags1 = -1;
5928 static int hf_bit7pingflags1 = -1;
5929 static int hf_bit8pingflags1 = -1;
5930 static int hf_bit9pingflags1 = -1;
5931 static int hf_bit10pingflags1 = -1;
5932 static int hf_bit11pingflags1 = -1;
5933 static int hf_bit12pingflags1 = -1;
5934 static int hf_bit13pingflags1 = -1;
5935 static int hf_bit14pingflags1 = -1;
5936 static int hf_bit15pingflags1 = -1;
5937 static int hf_bit16pingflags1 = -1;
5938 static int hf_bit1pingpflags1 = -1;
5939 static int hf_bit2pingpflags1 = -1;
5940 static int hf_bit3pingpflags1 = -1;
5941 static int hf_bit4pingpflags1 = -1;
5942 static int hf_bit5pingpflags1 = -1;
5943 static int hf_bit6pingpflags1 = -1;
5944 static int hf_bit7pingpflags1 = -1;
5945 static int hf_bit8pingpflags1 = -1;
5946 static int hf_bit9pingpflags1 = -1;
5947 static int hf_bit10pingpflags1 = -1;
5948 static int hf_bit11pingpflags1 = -1;
5949 static int hf_bit12pingpflags1 = -1;
5950 static int hf_bit13pingpflags1 = -1;
5951 static int hf_bit14pingpflags1 = -1;
5952 static int hf_bit15pingpflags1 = -1;
5953 static int hf_bit16pingpflags1 = -1;
5954 static int hf_bit1pingvflags1 = -1;
5955 static int hf_bit2pingvflags1 = -1;
5956 static int hf_bit3pingvflags1 = -1;
5957 static int hf_bit4pingvflags1 = -1;
5958 static int hf_bit5pingvflags1 = -1;
5959 static int hf_bit6pingvflags1 = -1;
5960 static int hf_bit7pingvflags1 = -1;
5961 static int hf_bit8pingvflags1 = -1;
5962 static int hf_bit9pingvflags1 = -1;
5963 static int hf_bit10pingvflags1 = -1;
5964 static int hf_bit11pingvflags1 = -1;
5965 static int hf_bit12pingvflags1 = -1;
5966 static int hf_bit13pingvflags1 = -1;
5967 static int hf_bit14pingvflags1 = -1;
5968 static int hf_bit15pingvflags1 = -1;
5969 static int hf_bit16pingvflags1 = -1;
5970 static int hf_nds_letter_ver = -1;
5971 static int hf_nds_os_ver = -1;
5972 static int hf_nds_lic_flags = -1;
5973 static int hf_nds_ds_time = -1;
5974 static int hf_nds_ping_version = -1;
5975 static int hf_nds_search_scope = -1;
5976 static int hf_nds_num_objects = -1;
5977 static int hf_bit1siflags = -1;
5978 static int hf_bit2siflags = -1;
5979 static int hf_bit3siflags = -1;
5980 static int hf_bit4siflags = -1;
5981 static int hf_bit5siflags = -1;
5982 static int hf_bit6siflags = -1;
5983 static int hf_bit7siflags = -1;
5984 static int hf_bit8siflags = -1;
5985 static int hf_bit9siflags = -1;
5986 static int hf_bit10siflags = -1;
5987 static int hf_bit11siflags = -1;
5988 static int hf_bit12siflags = -1;
5989 static int hf_bit13siflags = -1;
5990 static int hf_bit14siflags = -1;
5991 static int hf_bit15siflags = -1;
5992 static int hf_bit16siflags = -1;
5993
5994
5995         """
5996                
5997         # Look at all packet types in the packets collection, and cull information
5998         # from them.
5999         errors_used_list = []
6000         errors_used_hash = {}
6001         groups_used_list = []
6002         groups_used_hash = {}
6003         variables_used_hash = {}
6004         structs_used_hash = {}
6005
6006         for pkt in packets:
6007                 # Determine which error codes are used.
6008                 codes = pkt.CompletionCodes()
6009                 for code in codes.Records():
6010                         if not errors_used_hash.has_key(code):
6011                                 errors_used_hash[code] = len(errors_used_list)
6012                                 errors_used_list.append(code)
6013
6014                 # Determine which groups are used.
6015                 group = pkt.Group()
6016                 if not groups_used_hash.has_key(group):
6017                         groups_used_hash[group] = len(groups_used_list)
6018                         groups_used_list.append(group)
6019
6020                 # Determine which variables are used.
6021                 vars = pkt.Variables()
6022                 ExamineVars(vars, structs_used_hash, variables_used_hash)
6023
6024
6025         # Print the hf variable declarations
6026         sorted_vars = variables_used_hash.values()
6027         sorted_vars.sort()
6028         for var in sorted_vars:
6029                 print "static int " + var.HFName() + " = -1;"
6030
6031
6032         # Print the value_string's
6033         for var in sorted_vars:
6034                 if isinstance(var, val_string):
6035                         print ""
6036                         print var.Code()
6037                            
6038         # Determine which error codes are not used
6039         errors_not_used = {}
6040         # Copy the keys from the error list...
6041         for code in errors.keys():
6042                 errors_not_used[code] = 1
6043         # ... and remove the ones that *were* used.
6044         for code in errors_used_list:
6045                 del errors_not_used[code]
6046
6047         # Print a remark showing errors not used
6048         list_errors_not_used = errors_not_used.keys()
6049         list_errors_not_used.sort()
6050         for code in list_errors_not_used:
6051                 print "/* Error 0x%04x not used: %s */" % (code, errors[code])
6052         print "\n"
6053
6054         # Print the errors table
6055         print "/* Error strings. */"
6056         print "static const char *ncp_errors[] = {"
6057         for code in errors_used_list:
6058                 print '\t/* %02d (0x%04x) */ "%s",' % (errors_used_hash[code], code, errors[code])
6059         print "};\n"
6060
6061
6062
6063
6064         # Determine which groups are not used
6065         groups_not_used = {}
6066         # Copy the keys from the group list...
6067         for group in groups.keys():
6068                 groups_not_used[group] = 1
6069         # ... and remove the ones that *were* used.
6070         for group in groups_used_list:
6071                 del groups_not_used[group]
6072
6073         # Print a remark showing groups not used
6074         list_groups_not_used = groups_not_used.keys()
6075         list_groups_not_used.sort()
6076         for group in list_groups_not_used:
6077                 print "/* Group not used: %s = %s */" % (group, groups[group])
6078         print "\n"
6079
6080         # Print the groups table
6081         print "/* Group strings. */"
6082         print "static const char *ncp_groups[] = {"
6083         for group in groups_used_list:
6084                 print '\t/* %02d (%s) */ "%s",' % (groups_used_hash[group], group, groups[group])
6085         print "};\n"
6086
6087         # Print the group macros
6088         for group in groups_used_list:
6089                 name = string.upper(group)
6090                 print "#define NCP_GROUP_%s\t%d" % (name, groups_used_hash[group])
6091         print "\n"
6092
6093
6094         # Print the conditional_records for all Request Conditions.
6095         num = 0
6096         print "/* Request-Condition dfilter records. The NULL pointer"
6097         print "   is replaced by a pointer to the created dfilter_t. */"
6098         if len(global_req_cond) == 0:
6099                 print "static conditional_record req_conds = NULL;"
6100         else:
6101                 print "static conditional_record req_conds[] = {"
6102                 for req_cond in global_req_cond.keys():
6103                         print "\t{ \"%s\", NULL }," % (req_cond,)
6104                         global_req_cond[req_cond] = num
6105                         num = num + 1
6106                 print "};"
6107         print "#define NUM_REQ_CONDS %d" % (num,)
6108         print "#define NO_REQ_COND   NUM_REQ_CONDS\n\n"
6109
6110
6111
6112         # Print PTVC's for bitfields
6113         ett_list = []
6114         print "/* PTVC records for bit-fields. */"
6115         for var in sorted_vars:
6116                 if isinstance(var, bitfield):
6117                         sub_vars_ptvc = var.SubVariablesPTVC()
6118                         print "/* %s */" % (sub_vars_ptvc.Name())
6119                         print sub_vars_ptvc.Code()
6120                         ett_list.append(sub_vars_ptvc.ETTName())
6121
6122
6123         # Print the PTVC's for structures
6124         print "/* PTVC records for structs. */"
6125         # Sort them
6126         svhash = {}
6127         for svar in structs_used_hash.values():
6128                 svhash[svar.HFName()] = svar
6129                 if svar.descr:
6130                         ett_list.append(svar.ETTName())
6131
6132         struct_vars = svhash.keys()
6133         struct_vars.sort()
6134         for varname in struct_vars:
6135                 var = svhash[varname]
6136                 print var.Code()
6137
6138         ett_list.sort()
6139
6140         # Print regular PTVC's
6141         print "/* PTVC records. These are re-used to save space. */"
6142         for ptvc in ptvc_lists.Members():
6143                 if not ptvc.Null() and not ptvc.Empty():
6144                         print ptvc.Code()
6145
6146         # Print error_equivalency tables
6147         print "/* Error-Equivalency Tables. These are re-used to save space. */"
6148         for compcodes in compcode_lists.Members():
6149                 errors = compcodes.Records()
6150                 # Make sure the record for error = 0x00 comes last.
6151                 print "static const error_equivalency %s[] = {" % (compcodes.Name())
6152                 for error in errors:
6153                         error_in_packet = error >> 8;
6154                         ncp_error_index = errors_used_hash[error]
6155                         print "\t{ 0x%02x, %d }, /* 0x%04x */" % (error_in_packet,
6156                                 ncp_error_index, error)
6157                 print "\t{ 0x00, -1 }\n};\n"
6158
6159
6160
6161         # Print integer arrays for all ncp_records that need
6162         # a list of req_cond_indexes. Do it "uniquely" to save space;
6163         # if multiple packets share the same set of req_cond's,
6164         # then they'll share the same integer array
6165         print "/* Request Condition Indexes */"
6166         # First, make them unique
6167         req_cond_collection = UniqueCollection("req_cond_collection")
6168         for pkt in packets:
6169                 req_conds = pkt.CalculateReqConds()
6170                 if req_conds:
6171                         unique_list = req_cond_collection.Add(req_conds)
6172                         pkt.SetReqConds(unique_list)
6173                 else:
6174                         pkt.SetReqConds(None)
6175
6176         # Print them
6177         for req_cond in req_cond_collection.Members():
6178                 print "static const int %s[] = {" % (req_cond.Name(),)
6179                 print "\t",
6180                 vals = []
6181                 for text in req_cond.Records():
6182                         vals.append(global_req_cond[text])
6183                 vals.sort()
6184                 for val in vals:
6185                         print "%s, " % (val,),
6186
6187                 print "-1 };"
6188                 print ""    
6189
6190
6191
6192         # Functions without length parameter
6193         funcs_without_length = {}
6194
6195         # Print info string structures
6196         print "/* Info Strings */"
6197         for pkt in packets:
6198                 if pkt.req_info_str:
6199                         name = pkt.InfoStrName() + "_req"
6200                         var = pkt.req_info_str[0]
6201                         print "static const info_string_t %s = {" % (name,)
6202                         print "\t&%s," % (var.HFName(),)
6203                         print '\t"%s",' % (pkt.req_info_str[1],)
6204                         print '\t"%s"' % (pkt.req_info_str[2],)
6205                         print "};\n"
6206
6207
6208
6209         # Print ncp_record packet records
6210         print "#define SUBFUNC_WITH_LENGTH      0x02"
6211         print "#define SUBFUNC_NO_LENGTH        0x01"
6212         print "#define NO_SUBFUNC               0x00"
6213
6214         print "/* ncp_record structs for packets */"
6215         print "static const ncp_record ncp_packets[] = {" 
6216         for pkt in packets:
6217                 if pkt.HasSubFunction():
6218                         func = pkt.FunctionCode('high')
6219                         if pkt.HasLength():
6220                                 subfunc_string = "SUBFUNC_WITH_LENGTH"
6221                                 # Ensure that the function either has a length param or not
6222                                 if funcs_without_length.has_key(func):
6223                                         sys.exit("Function 0x%04x sometimes has length param, sometimes not." \
6224                                                 % (pkt.FunctionCode(),))
6225                         else:
6226                                 subfunc_string = "SUBFUNC_NO_LENGTH"
6227                                 funcs_without_length[func] = 1
6228                 else:
6229                         subfunc_string = "NO_SUBFUNC"
6230                 print '\t{ 0x%02x, 0x%02x, %s, "%s",' % (pkt.FunctionCode('high'),
6231                         pkt.FunctionCode('low'), subfunc_string, pkt.Description()),
6232
6233                 print '\t%d /* %s */,' % (groups_used_hash[pkt.Group()], pkt.Group())
6234
6235                 ptvc = pkt.PTVCRequest()
6236                 if not ptvc.Null() and not ptvc.Empty():
6237                         ptvc_request = ptvc.Name()
6238                 else:
6239                         ptvc_request = 'NULL'
6240
6241                 ptvc = pkt.PTVCReply()
6242                 if not ptvc.Null() and not ptvc.Empty():
6243                         ptvc_reply = ptvc.Name()
6244                 else:
6245                         ptvc_reply = 'NULL'
6246
6247                 errors = pkt.CompletionCodes()
6248
6249                 req_conds_obj = pkt.GetReqConds()
6250                 if req_conds_obj:
6251                         req_conds = req_conds_obj.Name()
6252                 else:
6253                         req_conds = "NULL"
6254
6255                 if not req_conds_obj:
6256                         req_cond_size = "NO_REQ_COND_SIZE"
6257                 else:
6258                         req_cond_size = pkt.ReqCondSize()
6259                         if req_cond_size == None:
6260                                 msg.write("NCP packet %s nees a ReqCondSize*() call\n" \
6261                                         % (pkt.CName(),))
6262                                 sys.exit(1)
6263                 
6264                 if pkt.req_info_str:
6265                         req_info_str = "&" + pkt.InfoStrName() + "_req"
6266                 else:
6267                         req_info_str = "NULL"
6268
6269                 print '\t\t%s, %s, %s, %s, %s, %s },\n' % \
6270                         (ptvc_request, ptvc_reply, errors.Name(), req_conds,
6271                         req_cond_size, req_info_str)
6272
6273         print '\t{ 0, 0, 0, NULL, 0, NULL, NULL, NULL, NULL, NO_REQ_COND_SIZE, NULL }'
6274         print "};\n"
6275
6276         print "/* ncp funcs that require a subfunc */"
6277         print "static const guint8 ncp_func_requires_subfunc[] = {"
6278         hi_seen = {}
6279         for pkt in packets:
6280                 if pkt.HasSubFunction():
6281                         hi_func = pkt.FunctionCode('high')
6282                         if not hi_seen.has_key(hi_func):
6283                                 print "\t0x%02x," % (hi_func)
6284                                 hi_seen[hi_func] = 1
6285         print "\t0"
6286         print "};\n"
6287
6288
6289         print "/* ncp funcs that have no length parameter */"
6290         print "static const guint8 ncp_func_has_no_length_parameter[] = {"
6291         funcs = funcs_without_length.keys()
6292         funcs.sort()
6293         for func in funcs:
6294                 print "\t0x%02x," % (func,)
6295         print "\t0"
6296         print "};\n"
6297
6298         # final_registration_ncp2222()
6299         print """
6300 void
6301 final_registration_ncp2222(void)
6302 {
6303         int i;
6304         """
6305
6306         # Create dfilter_t's for conditional_record's  
6307         print """
6308         for (i = 0; i < NUM_REQ_CONDS; i++) {
6309                 if (!dfilter_compile((const gchar*)req_conds[i].dfilter_text,
6310                         &req_conds[i].dfilter)) {
6311                         g_message("NCP dissector failed to compiler dfilter: %s\\n",
6312                         req_conds[i].dfilter_text);
6313                         g_assert_not_reached();
6314                 }
6315         }
6316 }
6317         """
6318
6319         # proto_register_ncp2222()
6320         print """
6321 static const value_string ncp_nds_verb_vals[] = {
6322         { 1, "Resolve Name" },
6323         { 2, "Read Entry Information" },
6324         { 3, "Read" },
6325         { 4, "Compare" },
6326         { 5, "List" },
6327         { 6, "Search Entries" },
6328         { 7, "Add Entry" },
6329         { 8, "Remove Entry" },
6330         { 9, "Modify Entry" },
6331         { 10, "Modify RDN" },
6332         { 11, "Create Attribute" },
6333         { 12, "Read Attribute Definition" },
6334         { 13, "Remove Attribute Definition" },
6335         { 14, "Define Class" },
6336         { 15, "Read Class Definition" },
6337         { 16, "Modify Class Definition" },
6338         { 17, "Remove Class Definition" },
6339         { 18, "List Containable Classes" },
6340         { 19, "Get Effective Rights" },
6341         { 20, "Add Partition" },
6342         { 21, "Remove Partition" },
6343         { 22, "List Partitions" },
6344         { 23, "Split Partition" },
6345         { 24, "Join Partitions" },
6346         { 25, "Add Replica" },
6347         { 26, "Remove Replica" },
6348         { 27, "Open Stream" },
6349         { 28, "Search Filter" },
6350         { 29, "Create Subordinate Reference" },
6351         { 30, "Link Replica" },
6352         { 31, "Change Replica Type" },
6353         { 32, "Start Update Schema" },
6354         { 33, "End Update Schema" },
6355         { 34, "Update Schema" },
6356         { 35, "Start Update Replica" },
6357         { 36, "End Update Replica" },
6358         { 37, "Update Replica" },
6359         { 38, "Synchronize Partition" },
6360         { 39, "Synchronize Schema" },
6361         { 40, "Read Syntaxes" },
6362         { 41, "Get Replica Root ID" },
6363         { 42, "Begin Move Entry" },
6364         { 43, "Finish Move Entry" },
6365         { 44, "Release Moved Entry" },
6366         { 45, "Backup Entry" },
6367         { 46, "Restore Entry" },
6368         { 47, "Save DIB" },
6369         { 50, "Close Iteration" },
6370         { 51, "Unused" },
6371         { 52, "Audit Skulking" },
6372         { 53, "Get Server Address" },
6373         { 54, "Set Keys" },
6374         { 55, "Change Password" },
6375         { 56, "Verify Password" },
6376         { 57, "Begin Login" },
6377         { 58, "Finish Login" },
6378         { 59, "Begin Authentication" },
6379         { 60, "Finish Authentication" },
6380         { 61, "Logout" },
6381         { 62, "Repair Ring" },
6382         { 63, "Repair Timestamps" },
6383         { 64, "Create Back Link" },
6384         { 65, "Delete External Reference" },
6385         { 66, "Rename External Reference" },
6386         { 67, "Create Directory Entry" },
6387         { 68, "Remove Directory Entry" },
6388         { 69, "Designate New Master" },
6389         { 70, "Change Tree Name" },
6390         { 71, "Partition Entry Count" },
6391         { 72, "Check Login Restrictions" },
6392         { 73, "Start Join" },
6393         { 74, "Low Level Split" },
6394         { 75, "Low Level Join" },
6395         { 76, "Abort Low Level Join" },
6396         { 77, "Get All Servers" },
6397         { 255, "EDirectory Call" },
6398         { 0,  NULL }
6399 };
6400
6401 void
6402 proto_register_ncp2222(void)
6403 {
6404
6405         static hf_register_info hf[] = {
6406         { &hf_ncp_func,
6407         { "Function", "ncp.func", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
6408
6409         { &hf_ncp_length,
6410         { "Packet Length", "ncp.length", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
6411
6412         { &hf_ncp_subfunc,
6413         { "SubFunction", "ncp.subfunc", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
6414
6415         { &hf_ncp_completion_code,
6416         { "Completion Code", "ncp.completion_code", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
6417
6418         { &hf_ncp_fragment_handle,
6419         { "NDS Fragment Handle", "ncp.ndsfrag", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6420         
6421         { &hf_ncp_fragment_size,
6422         { "NDS Fragment Size", "ncp.ndsfragsize", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6423
6424         { &hf_ncp_message_size,
6425         { "Message Size", "ncp.ndsmessagesize", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6426         
6427         { &hf_ncp_nds_flag,
6428         { "Flags", "ncp.ndsflag", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6429         
6430         { &hf_ncp_nds_verb,      
6431         { "NDS Verb", "ncp.ndsverb", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
6432         
6433         { &hf_ping_version,
6434         { "NDS Version", "ncp.ping_version", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
6435         
6436         { &hf_nds_version,
6437         { "NDS Version", "ncp.nds_version", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6438         
6439         { &hf_nds_tree_name,                             
6440         { "Tree Name", "ncp.nds_tree_name", FT_STRING, BASE_DEC, NULL, 0x0, "", HFILL }},
6441                         
6442         /*
6443          * XXX - the page at
6444          *
6445          *      http://www.odyssea.com/whats_new/tcpipnet/tcpipnet.html
6446          *
6447          * says of the connection status "The Connection Code field may
6448          * contain values that indicate the status of the client host to
6449          * server connection.  A value of 1 in the fourth bit of this data
6450          * byte indicates that the server is unavailable (server was
6451          * downed).
6452          *
6453          * The page at
6454          *
6455          *      http://www.unm.edu/~network/presentations/course/appendix/appendix_f/tsld088.htm
6456          *
6457          * says that bit 0 is "bad service", bit 2 is "no connection
6458          * available", bit 4 is "service down", and bit 6 is "server
6459          * has a broadcast message waiting for the client".
6460          *
6461          * Should it be displayed in hex, and should those bits (and any
6462          * other bits with significance) be displayed as bitfields
6463          * underneath it?
6464          */
6465         { &hf_ncp_connection_status,
6466         { "Connection Status", "ncp.connection_status", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }},
6467
6468         { &hf_ncp_req_frame_num,
6469         { "Response to Request in Frame Number", "ncp.req_frame_num", FT_FRAMENUM, BASE_NONE,
6470                 NULL, 0x0, "", HFILL }},
6471         
6472         { &hf_ncp_req_frame_time,
6473         { "Time from Request", "ncp.time", FT_RELATIVE_TIME, BASE_NONE,
6474                 NULL, 0x0, "Time between request and response in seconds", HFILL }},
6475         
6476         { &hf_nds_flags, 
6477         { "NDS Return Flags", "ncp.nds_flags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6478         
6479        
6480         { &hf_nds_reply_depth,
6481         { "Distance from Root", "ncp.ndsdepth", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6482         
6483         { &hf_nds_reply_rev,
6484         { "NDS Revision", "ncp.ndsrev", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6485         
6486         { &hf_nds_reply_flags,
6487         { "Flags", "ncp.ndsflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6488         
6489         { &hf_nds_p1type, 
6490         { "NDS Parameter Type", "ncp.p1type", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }},
6491         
6492         { &hf_nds_uint32value, 
6493         { "NDS Value", "ncp.uint32value", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6494
6495         { &hf_nds_bit1, 
6496         { "Typeless", "ncp.nds_bit1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6497
6498         { &hf_nds_bit2, 
6499         { "All Containers", "ncp.nds_bit2", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6500                      
6501         { &hf_nds_bit3, 
6502         { "Slashed", "ncp.nds_bit3", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6503         
6504         { &hf_nds_bit4, 
6505         { "Dotted", "ncp.nds_bit4", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6506         
6507         { &hf_nds_bit5, 
6508         { "Tuned", "ncp.nds_bit5", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6509         
6510         { &hf_nds_bit6, 
6511         { "Not Defined", "ncp.nds_bit6", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6512         
6513         { &hf_nds_bit7, 
6514         { "Not Defined", "ncp.nds_bit7", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6515         
6516         { &hf_nds_bit8, 
6517         { "Not Defined", "ncp.nds_bit8", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6518         
6519         { &hf_nds_bit9, 
6520         { "Not Defined", "ncp.nds_bit9", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6521         
6522         { &hf_nds_bit10, 
6523         { "Not Defined", "ncp.nds_bit10", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6524         
6525         { &hf_nds_bit11, 
6526         { "Not Defined", "ncp.nds_bit11", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6527         
6528         { &hf_nds_bit12, 
6529         { "Not Defined", "ncp.nds_bit12", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6530         
6531         { &hf_nds_bit13, 
6532         { "Not Defined", "ncp.nds_bit13", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6533         
6534         { &hf_nds_bit14, 
6535         { "Not Defined", "ncp.nds_bit14", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6536         
6537         { &hf_nds_bit15, 
6538         { "Not Defined", "ncp.nds_bit15", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6539         
6540         { &hf_nds_bit16, 
6541         { "Not Defined", "ncp.nds_bit16", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6542         
6543         { &hf_bit1outflags, 
6544         { "Output Flags", "ncp.bit1outflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6545
6546         { &hf_bit2outflags, 
6547         { "Entry ID", "ncp.bit2outflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6548                      
6549         { &hf_bit3outflags, 
6550         { "Replica State", "ncp.bit3outflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6551         
6552         { &hf_bit4outflags, 
6553         { "Modification Timestamp", "ncp.bit4outflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6554         
6555         { &hf_bit5outflags, 
6556         { "Purge Time", "ncp.bit5outflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6557         
6558         { &hf_bit6outflags, 
6559         { "Local Partition ID", "ncp.bit6outflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6560         
6561         { &hf_bit7outflags, 
6562         { "Distinguished Name", "ncp.bit7outflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6563         
6564         { &hf_bit8outflags, 
6565         { "Replica Type", "ncp.bit8outflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6566         
6567         { &hf_bit9outflags, 
6568         { "Partition Busy", "ncp.bit9outflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6569         
6570         { &hf_bit10outflags, 
6571         { "Not Defined", "ncp.bit10outflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6572         
6573         { &hf_bit11outflags, 
6574         { "Not Defined", "ncp.bit11outflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6575         
6576         { &hf_bit12outflags, 
6577         { "Not Defined", "ncp.bit12outflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6578         
6579         { &hf_bit13outflags, 
6580         { "Not Defined", "ncp.bit13outflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6581         
6582         { &hf_bit14outflags, 
6583         { "Not Defined", "ncp.bit14outflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6584         
6585         { &hf_bit15outflags, 
6586         { "Not Defined", "ncp.bit15outflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6587         
6588         { &hf_bit16outflags, 
6589         { "Not Defined", "ncp.bit16outflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6590         
6591         { &hf_bit1nflags, 
6592         { "Entry ID", "ncp.bit1nflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6593
6594         { &hf_bit2nflags, 
6595         { "Readable", "ncp.bit2nflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6596                      
6597         { &hf_bit3nflags, 
6598         { "Writeable", "ncp.bit3nflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6599         
6600         { &hf_bit4nflags, 
6601         { "Master", "ncp.bit4nflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6602         
6603         { &hf_bit5nflags, 
6604         { "Create ID", "ncp.bit5nflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6605         
6606         { &hf_bit6nflags, 
6607         { "Walk Tree", "ncp.bit6nflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6608         
6609         { &hf_bit7nflags, 
6610         { "Dereference Alias", "ncp.bit7nflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6611         
6612         { &hf_bit8nflags, 
6613         { "Not Defined", "ncp.bit8nflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6614         
6615         { &hf_bit9nflags, 
6616         { "Not Defined", "ncp.bit9nflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6617         
6618         { &hf_bit10nflags, 
6619         { "Not Defined", "ncp.bit10nflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6620         
6621         { &hf_bit11nflags, 
6622         { "Not Defined", "ncp.bit11nflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6623         
6624         { &hf_bit12nflags, 
6625         { "Not Defined", "ncp.bit12nflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6626         
6627         { &hf_bit13nflags, 
6628         { "Not Defined", "ncp.bit13nflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6629         
6630         { &hf_bit14nflags, 
6631         { "Prefer Referrals", "ncp.bit14nflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6632         
6633         { &hf_bit15nflags, 
6634         { "Prefer Only Referrals", "ncp.bit15nflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6635         
6636         { &hf_bit16nflags, 
6637         { "Not Defined", "ncp.bit16nflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6638         
6639         { &hf_bit1rflags, 
6640         { "Typeless", "ncp.bit1rflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6641
6642         { &hf_bit2rflags, 
6643         { "Slashed", "ncp.bit2rflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6644                      
6645         { &hf_bit3rflags, 
6646         { "Dotted", "ncp.bit3rflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6647         
6648         { &hf_bit4rflags, 
6649         { "Tuned", "ncp.bit4rflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6650         
6651         { &hf_bit5rflags, 
6652         { "Not Defined", "ncp.bit5rflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6653         
6654         { &hf_bit6rflags, 
6655         { "Not Defined", "ncp.bit6rflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6656         
6657         { &hf_bit7rflags, 
6658         { "Not Defined", "ncp.bit7rflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6659         
6660         { &hf_bit8rflags, 
6661         { "Not Defined", "ncp.bit8rflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6662         
6663         { &hf_bit9rflags, 
6664         { "Not Defined", "ncp.bit9rflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6665         
6666         { &hf_bit10rflags, 
6667         { "Not Defined", "ncp.bit10rflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6668         
6669         { &hf_bit11rflags, 
6670         { "Not Defined", "ncp.bit11rflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6671         
6672         { &hf_bit12rflags, 
6673         { "Not Defined", "ncp.bit12rflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6674         
6675         { &hf_bit13rflags, 
6676         { "Not Defined", "ncp.bit13rflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6677         
6678         { &hf_bit14rflags, 
6679         { "Not Defined", "ncp.bit14rflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6680         
6681         { &hf_bit15rflags, 
6682         { "Not Defined", "ncp.bit15rflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6683         
6684         { &hf_bit16rflags, 
6685         { "Not Defined", "ncp.bit16rflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6686         
6687         { &hf_bit1eflags, 
6688         { "Alias Entry", "ncp.bit1eflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6689
6690         { &hf_bit2eflags, 
6691         { "Partition Root", "ncp.bit2eflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6692                      
6693         { &hf_bit3eflags, 
6694         { "Container Entry", "ncp.bit3eflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6695         
6696         { &hf_bit4eflags, 
6697         { "Container Alias", "ncp.bit4eflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6698         
6699         { &hf_bit5eflags, 
6700         { "Matches List Filter", "ncp.bit5eflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6701         
6702         { &hf_bit6eflags, 
6703         { "Reference Entry", "ncp.bit6eflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6704         
6705         { &hf_bit7eflags, 
6706         { "40x Reference Entry", "ncp.bit7eflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6707         
6708         { &hf_bit8eflags, 
6709         { "Back Linked", "ncp.bit8eflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6710         
6711         { &hf_bit9eflags, 
6712         { "New Entry", "ncp.bit9eflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6713         
6714         { &hf_bit10eflags, 
6715         { "Temporary Reference", "ncp.bit10eflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6716         
6717         { &hf_bit11eflags, 
6718         { "Audited", "ncp.bit11eflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6719         
6720         { &hf_bit12eflags, 
6721         { "Entry Not Present", "ncp.bit12eflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6722         
6723         { &hf_bit13eflags, 
6724         { "Entry Verify CTS", "ncp.bit13eflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6725         
6726         { &hf_bit14eflags, 
6727         { "Entry Damaged", "ncp.bit14eflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6728         
6729         { &hf_bit15eflags, 
6730         { "Not Defined", "ncp.bit15rflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6731         
6732         { &hf_bit16eflags, 
6733         { "Not Defined", "ncp.bit16rflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6734
6735         { &hf_bit1infoflagsl, 
6736         { "Output Flags", "ncp.bit1infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6737
6738         { &hf_bit2infoflagsl, 
6739         { "Entry ID", "ncp.bit2infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6740                      
6741         { &hf_bit3infoflagsl, 
6742         { "Entry Flags", "ncp.bit3infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6743         
6744         { &hf_bit4infoflagsl, 
6745         { "Subordinate Count", "ncp.bit4infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6746         
6747         { &hf_bit5infoflagsl, 
6748         { "Modification Time", "ncp.bit5infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6749         
6750         { &hf_bit6infoflagsl, 
6751         { "Modification Timestamp", "ncp.bit6infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6752         
6753         { &hf_bit7infoflagsl, 
6754         { "Creation Timestamp", "ncp.bit7infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6755         
6756         { &hf_bit8infoflagsl, 
6757         { "Partition Root ID", "ncp.bit8infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6758         
6759         { &hf_bit9infoflagsl, 
6760         { "Parent ID", "ncp.bit9infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6761         
6762         { &hf_bit10infoflagsl, 
6763         { "Revision Count", "ncp.bit10infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6764         
6765         { &hf_bit11infoflagsl, 
6766         { "Replica Type", "ncp.bit11infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6767         
6768         { &hf_bit12infoflagsl, 
6769         { "Base Class", "ncp.bit12infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6770         
6771         { &hf_bit13infoflagsl, 
6772         { "Relative Distinguished Name", "ncp.bit13infoflagsl", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6773         
6774         { &hf_bit14infoflagsl, 
6775         { "Distinguished Name", "ncp.bit14infoflagsl", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6776         
6777         { &hf_bit15infoflagsl, 
6778         { "Root Distinguished Name", "ncp.bit15infoflagsl", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6779         
6780         { &hf_bit16infoflagsl, 
6781         { "Parent Distinguished Name", "ncp.bit16infoflagsl", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6782
6783         { &hf_bit1infoflagsh, 
6784         { "Purge Time", "ncp.bit1infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6785
6786         { &hf_bit2infoflagsh, 
6787         { "Dereference Base Class", "ncp.bit2infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6788                      
6789         { &hf_bit3infoflagsh, 
6790         { "Not Defined", "ncp.bit3infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6791         
6792         { &hf_bit4infoflagsh, 
6793         { "Not Defined", "ncp.bit4infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6794         
6795         { &hf_bit5infoflagsh, 
6796         { "Not Defined", "ncp.bit5infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6797         
6798         { &hf_bit6infoflagsh, 
6799         { "Not Defined", "ncp.bit6infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6800         
6801         { &hf_bit7infoflagsh, 
6802         { "Not Defined", "ncp.bit7infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6803         
6804         { &hf_bit8infoflagsh, 
6805         { "Not Defined", "ncp.bit8infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6806         
6807         { &hf_bit9infoflagsh, 
6808         { "Not Defined", "ncp.bit9infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6809         
6810         { &hf_bit10infoflagsh, 
6811         { "Not Defined", "ncp.bit10infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6812         
6813         { &hf_bit11infoflagsh, 
6814         { "Not Defined", "ncp.bit11infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6815         
6816         { &hf_bit12infoflagsh, 
6817         { "Not Defined", "ncp.bit12infoflagshs", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6818         
6819         { &hf_bit13infoflagsh, 
6820         { "Not Defined", "ncp.bit13infoflagsh", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6821         
6822         { &hf_bit14infoflagsh, 
6823         { "Not Defined", "ncp.bit14infoflagsh", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6824         
6825         { &hf_bit15infoflagsh, 
6826         { "Not Defined", "ncp.bit15infoflagsh", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6827         
6828         { &hf_bit16infoflagsh, 
6829         { "Not Defined", "ncp.bit16infoflagsh", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6830         
6831         { &hf_bit1lflags, 
6832         { "List Typeless", "ncp.bit1lflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6833
6834         { &hf_bit2lflags, 
6835         { "List Containers", "ncp.bit2lflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6836                      
6837         { &hf_bit3lflags, 
6838         { "List Slashed", "ncp.bit3lflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6839         
6840         { &hf_bit4lflags, 
6841         { "List Dotted", "ncp.bit4lflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6842         
6843         { &hf_bit5lflags, 
6844         { "Dereference Alias", "ncp.bit5lflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6845         
6846         { &hf_bit6lflags, 
6847         { "List All Containers", "ncp.bit6lflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6848         
6849         { &hf_bit7lflags, 
6850         { "List Obsolete", "ncp.bit7lflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6851         
6852         { &hf_bit8lflags, 
6853         { "List Tuned Output", "ncp.bit8lflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6854         
6855         { &hf_bit9lflags, 
6856         { "List External Reference", "ncp.bit9lflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6857         
6858         { &hf_bit10lflags, 
6859         { "Not Defined", "ncp.bit10lflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6860         
6861         { &hf_bit11lflags, 
6862         { "Not Defined", "ncp.bit11lflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6863         
6864         { &hf_bit12lflags, 
6865         { "Not Defined", "ncp.bit12lflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6866         
6867         { &hf_bit13lflags, 
6868         { "Not Defined", "ncp.bit13lflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6869         
6870         { &hf_bit14lflags, 
6871         { "Not Defined", "ncp.bit14lflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6872         
6873         { &hf_bit15lflags, 
6874         { "Not Defined", "ncp.bit15lflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6875         
6876         { &hf_bit16lflags, 
6877         { "Not Defined", "ncp.bit16lflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6878         
6879         { &hf_bit1l1flagsl, 
6880         { "Output Flags", "ncp.bit1l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6881
6882         { &hf_bit2l1flagsl, 
6883         { "Entry ID", "ncp.bit2l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6884                      
6885         { &hf_bit3l1flagsl, 
6886         { "Replica State", "ncp.bit3l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6887         
6888         { &hf_bit4l1flagsl, 
6889         { "Modification Timestamp", "ncp.bit4l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6890         
6891         { &hf_bit5l1flagsl, 
6892         { "Purge Time", "ncp.bit5l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6893         
6894         { &hf_bit6l1flagsl, 
6895         { "Local Partition ID", "ncp.bit6l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6896         
6897         { &hf_bit7l1flagsl, 
6898         { "Distinguished Name", "ncp.bit7l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6899         
6900         { &hf_bit8l1flagsl, 
6901         { "Replica Type", "ncp.bit8l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6902         
6903         { &hf_bit9l1flagsl, 
6904         { "Partition Busy", "ncp.bit9l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6905         
6906         { &hf_bit10l1flagsl, 
6907         { "Not Defined", "ncp.bit10l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6908         
6909         { &hf_bit11l1flagsl, 
6910         { "Not Defined", "ncp.bit11l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6911         
6912         { &hf_bit12l1flagsl, 
6913         { "Not Defined", "ncp.bit12l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6914         
6915         { &hf_bit13l1flagsl, 
6916         { "Not Defined", "ncp.bit13l1flagsl", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6917         
6918         { &hf_bit14l1flagsl, 
6919         { "Not Defined", "ncp.bit14l1flagsl", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6920         
6921         { &hf_bit15l1flagsl, 
6922         { "Not Defined", "ncp.bit15l1flagsl", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6923         
6924         { &hf_bit16l1flagsl, 
6925         { "Not Defined", "ncp.bit16l1flagsl", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6926
6927         { &hf_bit1l1flagsh, 
6928         { "Not Defined", "ncp.bit1l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6929
6930         { &hf_bit2l1flagsh, 
6931         { "Not Defined", "ncp.bit2l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6932                      
6933         { &hf_bit3l1flagsh, 
6934         { "Not Defined", "ncp.bit3l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6935         
6936         { &hf_bit4l1flagsh, 
6937         { "Not Defined", "ncp.bit4l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6938         
6939         { &hf_bit5l1flagsh, 
6940         { "Not Defined", "ncp.bit5l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6941         
6942         { &hf_bit6l1flagsh, 
6943         { "Not Defined", "ncp.bit6l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6944         
6945         { &hf_bit7l1flagsh, 
6946         { "Not Defined", "ncp.bit7l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6947         
6948         { &hf_bit8l1flagsh, 
6949         { "Not Defined", "ncp.bit8l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6950         
6951         { &hf_bit9l1flagsh, 
6952         { "Not Defined", "ncp.bit9l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6953         
6954         { &hf_bit10l1flagsh, 
6955         { "Not Defined", "ncp.bit10l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6956         
6957         { &hf_bit11l1flagsh, 
6958         { "Not Defined", "ncp.bit11l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6959         
6960         { &hf_bit12l1flagsh, 
6961         { "Not Defined", "ncp.bit12l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6962         
6963         { &hf_bit13l1flagsh, 
6964         { "Not Defined", "ncp.bit13l1flagsh", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6965         
6966         { &hf_bit14l1flagsh, 
6967         { "Not Defined", "ncp.bit14l1flagsh", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6968         
6969         { &hf_bit15l1flagsh, 
6970         { "Not Defined", "ncp.bit15l1flagsh", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6971         
6972         { &hf_bit16l1flagsh, 
6973         { "Not Defined", "ncp.bit16l1flagsh", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6974         
6975         { &hf_bit1vflags, 
6976         { "Naming", "ncp.bit1vflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6977
6978         { &hf_bit2vflags, 
6979         { "Base Class", "ncp.bit2vflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6980                      
6981         { &hf_bit3vflags, 
6982         { "Present", "ncp.bit3vflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6983         
6984         { &hf_bit4vflags, 
6985         { "Value Damaged", "ncp.bit4vflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6986         
6987         { &hf_bit5vflags, 
6988         { "Not Defined", "ncp.bit5vflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6989         
6990         { &hf_bit6vflags, 
6991         { "Not Defined", "ncp.bit6vflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6992         
6993         { &hf_bit7vflags, 
6994         { "Not Defined", "ncp.bit7vflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6995         
6996         { &hf_bit8vflags, 
6997         { "Not Defined", "ncp.bit8vflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6998         
6999         { &hf_bit9vflags, 
7000         { "Not Defined", "ncp.bit9vflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7001         
7002         { &hf_bit10vflags, 
7003         { "Not Defined", "ncp.bit10vflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7004         
7005         { &hf_bit11vflags, 
7006         { "Not Defined", "ncp.bit11vflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7007         
7008         { &hf_bit12vflags, 
7009         { "Not Defined", "ncp.bit12vflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7010         
7011         { &hf_bit13vflags, 
7012         { "Not Defined", "ncp.bit13vflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7013         
7014         { &hf_bit14vflags, 
7015         { "Not Defined", "ncp.bit14vflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7016         
7017         { &hf_bit15vflags, 
7018         { "Not Defined", "ncp.bit15vflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7019         
7020         { &hf_bit16vflags, 
7021         { "Not Defined", "ncp.bit16vflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7022         
7023         { &hf_bit1cflags, 
7024         { "Ambiguous Containment", "ncp.bit1cflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7025
7026         { &hf_bit2cflags, 
7027         { "Ambiguous Naming", "ncp.bit2cflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7028                      
7029         { &hf_bit3cflags, 
7030         { "Class Definition Cannot be Removed", "ncp.bit3cflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7031         
7032         { &hf_bit4cflags, 
7033         { "Effective Class", "ncp.bit4cflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7034         
7035         { &hf_bit5cflags, 
7036         { "Container Class", "ncp.bit5cflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7037         
7038         { &hf_bit6cflags, 
7039         { "Not Defined", "ncp.bit6cflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7040         
7041         { &hf_bit7cflags, 
7042         { "Not Defined", "ncp.bit7cflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7043         
7044         { &hf_bit8cflags, 
7045         { "Not Defined", "ncp.bit8cflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7046         
7047         { &hf_bit9cflags, 
7048         { "Not Defined", "ncp.bit9cflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7049         
7050         { &hf_bit10cflags, 
7051         { "Not Defined", "ncp.bit10cflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7052         
7053         { &hf_bit11cflags, 
7054         { "Not Defined", "ncp.bit11cflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7055         
7056         { &hf_bit12cflags, 
7057         { "Not Defined", "ncp.bit12cflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7058         
7059         { &hf_bit13cflags, 
7060         { "Not Defined", "ncp.bit13cflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7061         
7062         { &hf_bit14cflags, 
7063         { "Not Defined", "ncp.bit14cflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7064         
7065         { &hf_bit15cflags, 
7066         { "Not Defined", "ncp.bit15cflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7067         
7068         { &hf_bit16cflags, 
7069         { "Not Defined", "ncp.bit16cflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7070         
7071         { &hf_bit1acflags, 
7072         { "Single Valued", "ncp.bit1acflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7073
7074         { &hf_bit2acflags, 
7075         { "Sized", "ncp.bit2acflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7076                      
7077         { &hf_bit3acflags, 
7078         { "Non-Removable", "ncp.bit3acflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7079         
7080         { &hf_bit4acflags, 
7081         { "Read Only", "ncp.bit4acflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7082         
7083         { &hf_bit5acflags, 
7084         { "Hidden", "ncp.bit5acflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7085         
7086         { &hf_bit6acflags, 
7087         { "String", "ncp.bit6acflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7088         
7089         { &hf_bit7acflags, 
7090         { "Synchronize Immediate", "ncp.bit7acflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7091         
7092         { &hf_bit8acflags, 
7093         { "Public Read", "ncp.bit8acflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7094         
7095         { &hf_bit9acflags, 
7096         { "Server Read", "ncp.bit9acflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7097         
7098         { &hf_bit10acflags, 
7099         { "Write Managed", "ncp.bit10acflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7100         
7101         { &hf_bit11acflags, 
7102         { "Per Replica", "ncp.bit11acflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7103         
7104         { &hf_bit12acflags, 
7105         { "Never Schedule Synchronization", "ncp.bit12acflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7106         
7107         { &hf_bit13acflags, 
7108         { "Operational", "ncp.bit13acflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7109         
7110         { &hf_bit14acflags, 
7111         { "Not Defined", "ncp.bit14acflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7112         
7113         { &hf_bit15acflags, 
7114         { "Not Defined", "ncp.bit15acflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7115         
7116         { &hf_bit16acflags, 
7117         { "Not Defined", "ncp.bit16acflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7118         
7119         
7120         { &hf_nds_reply_error,
7121         { "NDS Error", "ncp.ndsreplyerror", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7122         
7123         { &hf_nds_net,
7124         { "Network","ncp.ndsnet", FT_IPXNET, BASE_NONE, NULL, 0x0, "", HFILL }},
7125
7126         { &hf_nds_node,
7127         { "Node",       "ncp.ndsnode", FT_ETHER, BASE_NONE, NULL, 0x0, "", HFILL }},
7128
7129         { &hf_nds_socket, 
7130         { "Socket",     "ncp.ndssocket", FT_UINT16, BASE_HEX, NULL, 0x0, "", HFILL }},
7131         
7132         { &hf_add_ref_ip,
7133         { "Address Referral", "ncp.ipref", FT_IPv4, BASE_DEC, NULL, 0x0, "", HFILL }},
7134         
7135         { &hf_add_ref_udp,
7136         { "Address Referral", "ncp.udpref", FT_IPv4, BASE_DEC, NULL, 0x0, "", HFILL }},
7137         
7138         { &hf_add_ref_tcp,
7139         { "Address Referral", "ncp.tcpref", FT_IPv4, BASE_DEC, NULL, 0x0, "", HFILL }},
7140         
7141         { &hf_referral_record,
7142         { "Referral Record", "ncp.ref_rec", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7143         
7144         { &hf_referral_addcount,
7145         { "Address Count", "ncp.ref_addcount", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7146         
7147         { &hf_nds_port,                                                                    
7148         { "Port", "ncp.ndsport", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7149         
7150         { &hf_mv_string,                                
7151         { "Attribute Name ", "ncp.mv_string", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7152                           
7153         { &hf_nds_syntax,                                
7154         { "Attribute Syntax ", "ncp.nds_syntax", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7155
7156         { &hf_value_string,                                
7157         { "Value ", "ncp.value_string", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7158         
7159     { &hf_nds_stream_name,                                
7160         { "Stream Name ", "ncp.nds_stream_name", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7161         
7162         { &hf_nds_buffer_size,
7163         { "NDS Reply Buffer Size", "ncp.nds_reply_buf", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7164         
7165         { &hf_nds_ver,
7166         { "NDS Version", "ncp.nds_ver", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7167         
7168         { &hf_nds_nflags,
7169         { "Flags", "ncp.nds_nflags", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7170         
7171     { &hf_nds_rflags,
7172         { "Request Flags", "ncp.nds_rflags", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7173     
7174     { &hf_nds_eflags,
7175         { "Entry Flags", "ncp.nds_eflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7176         
7177         { &hf_nds_scope,
7178         { "Scope", "ncp.nds_scope", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7179         
7180         { &hf_nds_name,
7181         { "Name", "ncp.nds_name", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7182         
7183     { &hf_nds_name_type,
7184         { "Name Type", "ncp.nds_name_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7185         
7186         { &hf_nds_comm_trans,
7187         { "Communications Transport", "ncp.nds_comm_trans", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7188         
7189         { &hf_nds_tree_trans,
7190         { "Tree Walker Transport", "ncp.nds_tree_trans", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7191         
7192         { &hf_nds_iteration,
7193         { "Iteration Handle", "ncp.nds_iteration", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7194         
7195     { &hf_nds_file_handle,
7196         { "File Handle", "ncp.nds_file_handle", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7197         
7198     { &hf_nds_file_size,
7199         { "File Size", "ncp.nds_file_size", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7200         
7201         { &hf_nds_eid,
7202         { "NDS EID", "ncp.nds_eid", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7203         
7204     { &hf_nds_depth,
7205         { "Distance object is from Root", "ncp.nds_depth", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7206         
7207         { &hf_nds_info_type,
7208         { "Info Type", "ncp.nds_info_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7209         
7210     { &hf_nds_class_def_type,
7211         { "Class Definition Type", "ncp.nds_class_def_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7212         
7213         { &hf_nds_all_attr,
7214         { "All Attributes", "ncp.nds_all_attr", FT_UINT32, BASE_DEC, NULL, 0x0, "Return all Attributes?", HFILL }},
7215         
7216     { &hf_nds_return_all_classes,
7217         { "All Classes", "ncp.nds_return_all_classes", FT_STRING, BASE_NONE, NULL, 0x0, "Return all Classes?", HFILL }},
7218         
7219         { &hf_nds_req_flags,                                       
7220         { "Request Flags", "ncp.nds_req_flags", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7221         
7222         { &hf_nds_attr,
7223         { "Attributes", "ncp.nds_attributes", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7224         
7225     { &hf_nds_classes,
7226         { "Classes", "ncp.nds_classes", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7227
7228         { &hf_nds_crc,
7229         { "CRC", "ncp.nds_crc", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7230         
7231         { &hf_nds_referrals,
7232         { "Referrals", "ncp.nds_referrals", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7233         
7234         { &hf_nds_result_flags,
7235         { "Result Flags", "ncp.nds_result_flags", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7236         
7237     { &hf_nds_stream_flags,
7238         { "Streams Flags", "ncp.nds_stream_flags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7239         
7240         { &hf_nds_tag_string,
7241         { "Tags", "ncp.nds_tags", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7242
7243         { &hf_value_bytes,
7244         { "Bytes", "ncp.value_bytes", FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL }},
7245
7246         { &hf_replica_type,
7247         { "Replica Type", "ncp.rtype", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7248
7249         { &hf_replica_state,
7250         { "Replica State", "ncp.rstate", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7251         
7252     { &hf_nds_rnum,
7253         { "Replica Number", "ncp.rnum", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7254
7255         { &hf_nds_revent,
7256         { "Event", "ncp.revent", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7257
7258         { &hf_replica_number,
7259         { "Replica Number", "ncp.rnum", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7260  
7261         { &hf_min_nds_ver,
7262         { "Minimum NDS Version", "ncp.min_nds_version", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7263
7264         { &hf_nds_ver_include,
7265         { "Include NDS Version", "ncp.inc_nds_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7266  
7267         { &hf_nds_ver_exclude,
7268         { "Exclude NDS Version", "ncp.exc_nds_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7269
7270         { &hf_nds_es,
7271         { "Input Entry Specifier", "ncp.nds_es", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7272         
7273         { &hf_es_type,
7274         { "Entry Specifier Type", "ncp.nds_es_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7275
7276         { &hf_rdn_string,
7277         { "RDN", "ncp.nds_rdn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7278
7279         { &hf_delim_string,
7280         { "Delimeter", "ncp.nds_delim", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7281                                  
7282     { &hf_nds_dn_output_type,
7283         { "Output Entry Specifier Type", "ncp.nds_out_es_type", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7284     
7285     { &hf_nds_nested_output_type,
7286         { "Nested Output Entry Specifier Type", "ncp.nds_nested_out_es", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7287     
7288     { &hf_nds_output_delimiter,
7289         { "Output Delimiter", "ncp.nds_out_delimiter", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7290     
7291     { &hf_nds_output_entry_specifier,
7292         { "Output Entry Specifier", "ncp.nds_out_es", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7293     
7294     { &hf_es_value,
7295         { "Entry Specifier Value", "ncp.nds_es_value", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7296
7297     { &hf_es_rdn_count,
7298         { "RDN Count", "ncp.nds_es_rdn_count", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7299     
7300     { &hf_nds_replica_num,
7301         { "Replica Number", "ncp.nds_replica_num", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7302     
7303     { &hf_es_seconds,
7304         { "Seconds", "ncp.nds_es_seconds", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7305
7306     { &hf_nds_event_num,
7307         { "Event Number", "ncp.nds_event_num", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7308
7309     { &hf_nds_compare_results,
7310         { "Compare Results", "ncp.nds_compare_results", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7311     
7312     { &hf_nds_parent,
7313         { "Parent ID", "ncp.nds_parent", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7314
7315     { &hf_nds_name_filter,
7316         { "Name Filter", "ncp.nds_name_filter", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7317
7318     { &hf_nds_class_filter,
7319         { "Class Filter", "ncp.nds_class_filter", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7320
7321     { &hf_nds_time_filter,
7322         { "Time Filter", "ncp.nds_time_filter", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7323
7324     { &hf_nds_partition_root_id,
7325         { "Partition Root ID", "ncp.nds_partition_root_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7326
7327     { &hf_nds_replicas,
7328         { "Replicas", "ncp.nds_replicas", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7329
7330     { &hf_nds_purge,
7331         { "Purge Time", "ncp.nds_purge", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7332
7333     { &hf_nds_local_partition,
7334         { "Local Partition ID", "ncp.nds_local_partition", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7335
7336     { &hf_partition_busy, 
7337     { "Partition Busy", "ncp.nds_partition_busy", FT_BOOLEAN, 16, NULL, 0x0, "", HFILL }},
7338
7339     { &hf_nds_number_of_changes,
7340         { "Number of Attribute Changes", "ncp.nds_number_of_changes", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7341     
7342     { &hf_sub_count,
7343         { "Subordinate Count", "ncp.sub_count", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7344     
7345     { &hf_nds_revision,
7346         { "Revision Count", "ncp.nds_rev_count", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7347     
7348     { &hf_nds_base_class,
7349         { "Base Class", "ncp.nds_base_class", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7350     
7351     { &hf_nds_relative_dn,
7352         { "Relative Distinguished Name", "ncp.nds_relative_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7353     
7354     { &hf_nds_root_dn,
7355         { "Root Distinguished Name", "ncp.nds_root_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7356     
7357     { &hf_nds_parent_dn,
7358         { "Parent Distinguished Name", "ncp.nds_parent_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7359     
7360     { &hf_deref_base, 
7361     { "Dereference Base Class", "ncp.nds_deref_base", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7362     
7363     { &hf_nds_base, 
7364     { "Base Class", "ncp.nds_base", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7365     
7366     { &hf_nds_super, 
7367     { "Super Class", "ncp.nds_super", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7368     
7369     { &hf_nds_entry_info, 
7370     { "Entry Information", "ncp.nds_entry_info", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7371     
7372     { &hf_nds_privileges, 
7373     { "Privileges", "ncp.nds_privileges", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7374     
7375     { &hf_nds_vflags, 
7376     { "Value Flags", "ncp.nds_vflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7377     
7378     { &hf_nds_value_len, 
7379     { "Value Length", "ncp.nds_vlength", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7380     
7381     { &hf_nds_cflags, 
7382     { "Class Flags", "ncp.nds_cflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7383         
7384     { &hf_nds_asn1,
7385         { "ASN.1 ID", "ncp.nds_asn1", FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL }},
7386
7387     { &hf_nds_acflags, 
7388     { "Attribute Constraint Flags", "ncp.nds_acflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7389     
7390     { &hf_nds_upper, 
7391     { "Upper Limit Value", "ncp.nds_upper", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7392     
7393     { &hf_nds_lower, 
7394     { "Lower Limit Value", "ncp.nds_lower", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7395     
7396     { &hf_nds_trustee_dn,
7397         { "Trustee Distinguished Name", "ncp.nds_trustee_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7398     
7399     { &hf_nds_attribute_dn,
7400         { "Attribute Name", "ncp.nds_attribute_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7401     
7402     { &hf_nds_acl_add,
7403         { "Access Control Lists to Add", "ncp.nds_acl_add", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7404     
7405     { &hf_nds_acl_del,
7406         { "Access Control Lists to Delete", "ncp.nds_acl_del", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7407     
7408     { &hf_nds_att_add,
7409         { "Attribute to Add", "ncp.nds_att_add", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7410     
7411     { &hf_nds_att_del,
7412         { "Attribute to Delete", "ncp.nds_att_del", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7413     
7414     { &hf_nds_keep, 
7415     { "Delete Original RDN", "ncp.nds_keep", FT_BOOLEAN, 32, NULL, 0x0, "", HFILL }},
7416     
7417     { &hf_nds_new_rdn,
7418         { "New Relative Distinguished Name", "ncp.nds_new_rdn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7419     
7420     { &hf_nds_time_delay,
7421         { "Time Delay", "ncp.nds_time_delay", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7422     
7423     { &hf_nds_root_name,
7424         { "Root Most Object Name", "ncp.nds_root_name", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7425     
7426     { &hf_nds_new_part_id,
7427         { "New Partition Root ID", "ncp.nds_new_part_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7428     
7429     { &hf_nds_child_part_id,
7430         { "Child Partition Root ID", "ncp.nds_child_part_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7431     
7432     { &hf_nds_master_part_id,
7433         { "Master Partition Root ID", "ncp.nds_master_part_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7434     
7435     { &hf_nds_target_name,
7436         { "Target Server Name", "ncp.nds_target_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7437
7438
7439         { &hf_bit1pingflags1, 
7440         { "Supported Fields", "ncp.bit1pingflags1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7441
7442         { &hf_bit2pingflags1, 
7443         { "Depth", "ncp.bit2pingflags1", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7444                      
7445         { &hf_bit3pingflags1, 
7446         { "Revision", "ncp.bit3pingflags1", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7447         
7448         { &hf_bit4pingflags1, 
7449         { "Flags", "ncp.bit4pingflags1", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7450         
7451         { &hf_bit5pingflags1, 
7452         { "Verification Flags", "ncp.bit5pingflags1", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7453         
7454         { &hf_bit6pingflags1, 
7455         { "Letter Version", "ncp.bit6pingflags1", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7456         
7457         { &hf_bit7pingflags1, 
7458         { "OS Version", "ncp.bit7pingflags1", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7459         
7460         { &hf_bit8pingflags1, 
7461         { "License Flags", "ncp.bit8pingflags1", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7462         
7463         { &hf_bit9pingflags1, 
7464         { "DS Time", "ncp.bit9pingflags1", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7465         
7466         { &hf_bit10pingflags1, 
7467         { "Not Defined", "ncp.bit10pingflags1", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7468         
7469         { &hf_bit11pingflags1, 
7470         { "Not Defined", "ncp.bit11pingflags1", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7471         
7472         { &hf_bit12pingflags1, 
7473         { "Not Defined", "ncp.bit12pingflags1", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7474         
7475         { &hf_bit13pingflags1, 
7476         { "Not Defined", "ncp.bit13pingflags1", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7477         
7478         { &hf_bit14pingflags1, 
7479         { "Not Defined", "ncp.bit14pingflags1", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7480         
7481         { &hf_bit15pingflags1, 
7482         { "Not Defined", "ncp.bit15pingflags1", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7483         
7484         { &hf_bit16pingflags1, 
7485         { "Not Defined", "ncp.bit16pingflags1", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7486
7487         { &hf_bit1pingflags2, 
7488         { "Sap Name", "ncp.bit1pingflags2", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7489
7490         { &hf_bit2pingflags2, 
7491         { "Tree Name", "ncp.bit2pingflags2", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7492                      
7493         { &hf_bit3pingflags2, 
7494         { "OS Name", "ncp.bit3pingflags2", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7495         
7496         { &hf_bit4pingflags2, 
7497         { "Hardware Name", "ncp.bit4pingflags2", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7498         
7499         { &hf_bit5pingflags2, 
7500         { "Vendor Name", "ncp.bit5pingflags2", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7501         
7502         { &hf_bit6pingflags2, 
7503         { "Not Defined", "ncp.bit6pingflags2", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7504         
7505         { &hf_bit7pingflags2, 
7506         { "Not Defined", "ncp.bit7pingflags2", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7507         
7508         { &hf_bit8pingflags2, 
7509         { "Not Defined", "ncp.bit8pingflags2", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7510         
7511         { &hf_bit9pingflags2, 
7512         { "Not Defined", "ncp.bit9pingflags2", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7513         
7514         { &hf_bit10pingflags2, 
7515         { "Not Defined", "ncp.bit10pingflags2", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7516         
7517         { &hf_bit11pingflags2, 
7518         { "Not Defined", "ncp.bit11pingflags2", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7519         
7520         { &hf_bit12pingflags2, 
7521         { "Not Defined", "ncp.bit12pingflags2", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7522         
7523         { &hf_bit13pingflags2, 
7524         { "Not Defined", "ncp.bit13pingflags2", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7525         
7526         { &hf_bit14pingflags2, 
7527         { "Not Defined", "ncp.bit14pingflags2", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7528         
7529         { &hf_bit15pingflags2, 
7530         { "Not Defined", "ncp.bit15pingflags2", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7531         
7532         { &hf_bit16pingflags2, 
7533         { "Not Defined", "ncp.bit16pingflags2", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7534      
7535         { &hf_bit1pingpflags1, 
7536         { "Root Most Master Replica", "ncp.bit1pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7537
7538         { &hf_bit2pingpflags1, 
7539         { "Time Synchronized", "ncp.bit2pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7540                      
7541         { &hf_bit3pingpflags1, 
7542         { "Not Defined", "ncp.bit3pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7543         
7544         { &hf_bit4pingpflags1, 
7545         { "Not Defined", "ncp.bit4pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7546         
7547         { &hf_bit5pingpflags1, 
7548         { "Not Defined", "ncp.bit5pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7549         
7550         { &hf_bit6pingpflags1, 
7551         { "Not Defined", "ncp.bit6pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7552         
7553         { &hf_bit7pingpflags1, 
7554         { "Not Defined", "ncp.bit7pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7555         
7556         { &hf_bit8pingpflags1, 
7557         { "Not Defined", "ncp.bit8pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7558         
7559         { &hf_bit9pingpflags1, 
7560         { "Not Defined", "ncp.bit9pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7561         
7562         { &hf_bit10pingpflags1, 
7563         { "Not Defined", "ncp.bit10pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7564         
7565         { &hf_bit11pingpflags1, 
7566         { "Not Defined", "ncp.bit11pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7567         
7568         { &hf_bit12pingpflags1, 
7569         { "Not Defined", "ncp.bit12pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7570         
7571         { &hf_bit13pingpflags1, 
7572         { "Not Defined", "ncp.bit13pingpflags1", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7573         
7574         { &hf_bit14pingpflags1, 
7575         { "Not Defined", "ncp.bit14pingpflags1", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7576         
7577         { &hf_bit15pingpflags1, 
7578         { "Not Defined", "ncp.bit15pingpflags1", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7579         
7580         { &hf_bit16pingpflags1, 
7581         { "Not Defined", "ncp.bit16pingpflags1", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7582     
7583         { &hf_bit1pingvflags1, 
7584         { "Checksum", "ncp.bit1pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7585
7586         { &hf_bit2pingvflags1, 
7587         { "CRC32", "ncp.bit2pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7588                      
7589         { &hf_bit3pingvflags1, 
7590         { "Not Defined", "ncp.bit3pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7591         
7592         { &hf_bit4pingvflags1, 
7593         { "Not Defined", "ncp.bit4pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7594         
7595         { &hf_bit5pingvflags1, 
7596         { "Not Defined", "ncp.bit5pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7597         
7598         { &hf_bit6pingvflags1, 
7599         { "Not Defined", "ncp.bit6pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7600         
7601         { &hf_bit7pingvflags1, 
7602         { "Not Defined", "ncp.bit7pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7603         
7604         { &hf_bit8pingvflags1, 
7605         { "Not Defined", "ncp.bit8pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7606         
7607         { &hf_bit9pingvflags1, 
7608         { "Not Defined", "ncp.bit9pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7609         
7610         { &hf_bit10pingvflags1, 
7611         { "Not Defined", "ncp.bit10pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7612         
7613         { &hf_bit11pingvflags1, 
7614         { "Not Defined", "ncp.bit11pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7615         
7616         { &hf_bit12pingvflags1, 
7617         { "Not Defined", "ncp.bit12pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7618         
7619         { &hf_bit13pingvflags1, 
7620         { "Not Defined", "ncp.bit13pingvflags1", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7621         
7622         { &hf_bit14pingvflags1, 
7623         { "Not Defined", "ncp.bit14pingvflags1", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7624         
7625         { &hf_bit15pingvflags1, 
7626         { "Not Defined", "ncp.bit15pingvflags1", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7627         
7628         { &hf_bit16pingvflags1, 
7629         { "Not Defined", "ncp.bit16pingvflags1", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7630
7631     { &hf_nds_letter_ver,
7632         { "Letter Version", "ncp.nds_letter_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7633     
7634     { &hf_nds_os_ver,
7635         { "OS Version", "ncp.nds_os_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7636     
7637     { &hf_nds_lic_flags,
7638         { "License Flags", "ncp.nds_lic_flags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7639     
7640     { &hf_nds_ds_time,
7641         { "DS Time", "ncp.nds_ds_time", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7642     
7643     { &hf_nds_ping_version,
7644         { "Ping Version", "ncp.nds_ping_version", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7645
7646     { &hf_nds_search_scope,
7647         { "Search Scope", "ncp.nds_search_scope", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7648
7649     { &hf_nds_num_objects,
7650         { "Number of Objects to Search", "ncp.nds_num_objects", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7651
7652
7653         { &hf_bit1siflags, 
7654         { "Names", "ncp.bit1siflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7655
7656         { &hf_bit2siflags, 
7657         { "Names and Values", "ncp.bit2siflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7658                      
7659         { &hf_bit3siflags, 
7660         { "Effective Privileges", "ncp.bit3siflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7661         
7662         { &hf_bit4siflags, 
7663         { "Value Info", "ncp.bit4siflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7664         
7665         { &hf_bit5siflags, 
7666         { "Abbreviated Value", "ncp.bit5siflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7667         
7668         { &hf_bit6siflags, 
7669         { "Not Defined", "ncp.bit6siflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7670         
7671         { &hf_bit7siflags, 
7672         { "Not Defined", "ncp.bit7siflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7673         
7674         { &hf_bit8siflags, 
7675         { "Not Defined", "ncp.bit8siflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7676         
7677         { &hf_bit9siflags, 
7678         { "Expanded Class", "ncp.bit9siflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7679         
7680         { &hf_bit10siflags, 
7681         { "Not Defined", "ncp.bit10siflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7682         
7683         { &hf_bit11siflags, 
7684         { "Not Defined", "ncp.bit11siflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7685         
7686         { &hf_bit12siflags, 
7687         { "Not Defined", "ncp.bit12siflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7688         
7689         { &hf_bit13siflags, 
7690         { "Not Defined", "ncp.bit13siflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7691         
7692         { &hf_bit14siflags, 
7693         { "Not Defined", "ncp.bit14siflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7694         
7695         { &hf_bit15siflags, 
7696         { "Not Defined", "ncp.bit15siflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7697         
7698         { &hf_bit16siflags, 
7699         { "Not Defined", "ncp.bit16siflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7700
7701
7702
7703  """                
7704         # Print the registration code for the hf variables
7705         for var in sorted_vars:
7706                 print "\t{ &%s," % (var.HFName())
7707                 print "\t{ \"%s\", \"%s\", %s, %s, %s, 0x%x, \"\", HFILL }},\n" % \
7708                         (var.Description(), var.DFilter(),
7709                         var.EtherealFType(), var.Display(), var.ValuesName(),
7710                         var.Mask())
7711
7712         print "\t};\n"
7713  
7714         if ett_list:
7715                 print "\tstatic gint *ett[] = {"
7716
7717                 for ett in ett_list:
7718                         print "\t\t&%s," % (ett,)
7719
7720                 print "\t};\n"
7721                        
7722         print """
7723         proto_register_field_array(proto_ncp, hf, array_length(hf));
7724         """
7725
7726         if ett_list:
7727                 print """
7728         proto_register_subtree_array(ett, array_length(ett));
7729                 """
7730
7731         print """
7732         register_init_routine(&ncp_init_protocol);
7733         register_postseq_cleanup_routine(&ncp_postseq_cleanup);
7734         register_final_registration_routine(final_registration_ncp2222);
7735         """
7736
7737         
7738         # End of proto_register_ncp2222()
7739         print "}"
7740         print ""
7741         print '#include "packet-ncp2222.inc"'
7742
7743 def usage():
7744         print "Usage: ncp2222.py -o output_file"
7745         sys.exit(1)
7746
7747 def main():
7748         global compcode_lists
7749         global ptvc_lists
7750         global msg
7751
7752         optstring = "o:"
7753         out_filename = None
7754
7755         try:
7756                 opts, args = getopt.getopt(sys.argv[1:], optstring)
7757         except getopt.error:
7758                 usage()
7759
7760         for opt, arg in opts:
7761                 if opt == "-o":
7762                         out_filename = arg
7763                 else:
7764                         usage()
7765
7766         if len(args) != 0:
7767                 usage()
7768
7769         if not out_filename:
7770                 usage()
7771
7772         # Create the output file
7773         try:
7774                 out_file = open(out_filename, "w")
7775         except IOError, err:
7776                 sys.exit("Could not open %s for writing: %s" % (out_filename,
7777                         err))
7778
7779         # Set msg to current stdout
7780         msg = sys.stdout
7781
7782         # Set stdout to the output file
7783         sys.stdout = out_file
7784
7785         msg.write("Processing NCP definitions...\n")
7786         # Run the code, and if we catch any exception,
7787         # erase the output file.
7788         try:
7789                 compcode_lists  = UniqueCollection('Completion Code Lists')
7790                 ptvc_lists      = UniqueCollection('PTVC Lists')
7791
7792                 define_errors()
7793                 define_groups()         
7794                 
7795                 define_ncp2222()
7796
7797                 msg.write("Defined %d NCP types.\n" % (len(packets),))
7798                 produce_code()
7799         except:
7800                 traceback.print_exc(20, msg)
7801                 try:
7802                         out_file.close()
7803                 except IOError, err:
7804                         msg.write("Could not close %s: %s\n" % (out_filename, err))
7805
7806                 try:
7807                         if os.path.exists(out_filename):
7808                                 os.remove(out_filename)
7809                 except OSError, err:
7810                         msg.write("Could not remove %s: %s\n" % (out_filename, err))
7811
7812                 sys.exit(1)
7813
7814
7815
7816 def define_ncp2222():
7817         ##############################################################################
7818         # NCP Packets. Here I list functions and subfunctions in hexadecimal like the
7819         # NCP book (and I believe LanAlyzer does this too).
7820         # However, Novell lists these in decimal in their on-line documentation.
7821         ##############################################################################
7822         # 2222/01
7823         pkt = NCP(0x01, "File Set Lock", 'file')
7824         pkt.Request(7)
7825         pkt.Reply(8)
7826         pkt.CompletionCodes([0x0000])
7827         # 2222/02
7828         pkt = NCP(0x02, "File Release Lock", 'file')
7829         pkt.Request(7)
7830         pkt.Reply(8)
7831         pkt.CompletionCodes([0x0000, 0xff00])
7832         # 2222/03
7833         pkt = NCP(0x03, "Log File Exclusive", 'file')
7834         pkt.Request( (12, 267), [
7835                 rec( 7, 1, DirHandle ),
7836                 rec( 8, 1, LockFlag ),
7837                 rec( 9, 2, TimeoutLimit, BE ),
7838                 rec( 11, (1, 256), FilePath ),
7839         ])
7840         pkt.Reply(8)
7841         pkt.CompletionCodes([0x0000, 0x8200, 0x9600, 0xfe0d, 0xff01])
7842         # 2222/04
7843         pkt = NCP(0x04, "Lock File Set", 'file')
7844         pkt.Request( 9, [
7845                 rec( 7, 2, TimeoutLimit ),
7846         ])
7847         pkt.Reply(8)
7848         pkt.CompletionCodes([0x0000, 0xfe0d, 0xff01])
7849         ## 2222/05
7850         pkt = NCP(0x05, "Release File", 'file')
7851         pkt.Request( (9, 264), [
7852                 rec( 7, 1, DirHandle ),
7853                 rec( 8, (1, 256), FilePath ),
7854         ])
7855         pkt.Reply(8)
7856         pkt.CompletionCodes([0x0000, 0x9b00, 0x9c03, 0xff1a])
7857         # 2222/06
7858         pkt = NCP(0x06, "Release File Set", 'file')
7859         pkt.Request( 8, [
7860                 rec( 7, 1, LockFlag ),
7861         ])
7862         pkt.Reply(8)
7863         pkt.CompletionCodes([0x0000])
7864         # 2222/07
7865         pkt = NCP(0x07, "Clear File", 'file')
7866         pkt.Request( (9, 264), [
7867                 rec( 7, 1, DirHandle ),
7868                 rec( 8, (1, 256), FilePath ),
7869         ])
7870         pkt.Reply(8)
7871         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03,
7872                 0xa100, 0xfd00, 0xff1a])
7873         # 2222/08
7874         pkt = NCP(0x08, "Clear File Set", 'file')
7875         pkt.Request( 8, [
7876                 rec( 7, 1, LockFlag ),
7877         ])
7878         pkt.Reply(8)
7879         pkt.CompletionCodes([0x0000])
7880         # 2222/09
7881         pkt = NCP(0x09, "Log Logical Record", 'file')
7882         pkt.Request( (11, 138), [
7883                 rec( 7, 1, LockFlag ),
7884                 rec( 8, 2, TimeoutLimit, BE ),
7885                 rec( 10, (1, 128), LogicalRecordName ),
7886         ], info_str=(LogicalRecordName, "Log Logical Record: %s", ", %s"))
7887         pkt.Reply(8)
7888         pkt.CompletionCodes([0x0000, 0x9600, 0xfe0d, 0xff1a])
7889         # 2222/0A, 10
7890         pkt = NCP(0x0A, "Lock Logical Record Set", 'file')
7891         pkt.Request( 10, [
7892                 rec( 7, 1, LockFlag ),
7893                 rec( 8, 2, TimeoutLimit ),
7894         ])
7895         pkt.Reply(8)
7896         pkt.CompletionCodes([0x0000, 0xfe0d, 0xff1a])
7897         # 2222/0B, 11
7898         pkt = NCP(0x0B, "Clear Logical Record", 'file')
7899         pkt.Request( (8, 135), [
7900                 rec( 7, (1, 128), LogicalRecordName ),
7901         ], info_str=(LogicalRecordName, "Clear Logical Record: %s", ", %s"))
7902         pkt.Reply(8)
7903         pkt.CompletionCodes([0x0000, 0xff1a])
7904         # 2222/0C, 12
7905         pkt = NCP(0x0C, "Release Logical Record", 'file')
7906         pkt.Request( (8, 135), [
7907                 rec( 7, (1, 128), LogicalRecordName ),
7908         ], info_str=(LogicalRecordName, "Release Logical Record: %s", ", %s"))
7909         pkt.Reply(8)
7910         pkt.CompletionCodes([0x0000, 0xff1a])
7911         # 2222/0D, 13
7912         pkt = NCP(0x0D, "Release Logical Record Set", 'file')
7913         pkt.Request( 8, [
7914                 rec( 7, 1, LockFlag ),
7915         ])
7916         pkt.Reply(8)
7917         pkt.CompletionCodes([0x0000])
7918         # 2222/0E, 14
7919         pkt = NCP(0x0E, "Clear Logical Record Set", 'file')
7920         pkt.Request( 8, [
7921                 rec( 7, 1, LockFlag ),
7922         ])
7923         pkt.Reply(8)
7924         pkt.CompletionCodes([0x0000])
7925         # 2222/1100, 17/00
7926         pkt = NCP(0x1100, "Write to Spool File", 'qms')
7927         pkt.Request( (11, 16), [
7928                 rec( 10, ( 1, 6 ), Data ),
7929         ], info_str=(Data, "Write to Spool File: %s", ", %s"))
7930         pkt.Reply(8)
7931         pkt.CompletionCodes([0x0000, 0x0104, 0x8000, 0x8101, 0x8701, 0x8800,
7932                              0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9400, 0x9500,
7933                              0x9600, 0x9804, 0x9900, 0xa100, 0xa201, 0xff19])
7934         # 2222/1101, 17/01
7935         pkt = NCP(0x1101, "Close Spool File", 'qms')
7936         pkt.Request( 11, [
7937                 rec( 10, 1, AbortQueueFlag ),
7938         ])
7939         pkt.Reply(8)      
7940         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8701, 0x8800, 0x8d00,
7941                              0x8e00, 0x8f00, 0x9001, 0x9300, 0x9400, 0x9500,
7942                              0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03, 0x9d00,
7943                              0xa100, 0xd000, 0xd100, 0xd202, 0xd300, 0xd400,
7944                              0xda01, 0xe800, 0xea00, 0xeb00, 0xec00, 0xfc06,
7945                              0xfd00, 0xfe07, 0xff06])
7946         # 2222/1102, 17/02
7947         pkt = NCP(0x1102, "Set Spool File Flags", 'qms')
7948         pkt.Request( 30, [
7949                 rec( 10, 1, PrintFlags ),
7950                 rec( 11, 1, TabSize ),
7951                 rec( 12, 1, TargetPrinter ),
7952                 rec( 13, 1, Copies ),
7953                 rec( 14, 1, FormType ),
7954                 rec( 15, 1, Reserved ),
7955                 rec( 16, 14, BannerName ),
7956         ])
7957         pkt.Reply(8)
7958         pkt.CompletionCodes([0x0000, 0x9600, 0xd202, 0xd300, 0xe800, 0xea00,
7959                              0xeb00, 0xec00, 0xfc06, 0xfe07, 0xff06])
7960
7961         # 2222/1103, 17/03
7962         pkt = NCP(0x1103, "Spool A Disk File", 'qms')
7963         pkt.Request( (12, 23), [
7964                 rec( 10, 1, DirHandle ),
7965                 rec( 11, (1, 12), Data ),
7966         ], info_str=(Data, "Spool a Disk File: %s", ", %s"))
7967         pkt.Reply(8)
7968         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8701, 0x8800, 0x8d00,
7969                              0x8e00, 0x8f00, 0x9001, 0x9300, 0x9400, 0x9500,
7970                              0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03, 0x9d00,
7971                              0xa100, 0xd000, 0xd100, 0xd202, 0xd300, 0xd400,
7972                              0xda01, 0xe800, 0xea00, 0xeb00, 0xec00, 0xfc06,
7973                              0xfd00, 0xfe07, 0xff06])
7974
7975         # 2222/1106, 17/06
7976         pkt = NCP(0x1106, "Get Printer Status", 'qms')
7977         pkt.Request( 11, [
7978                 rec( 10, 1, TargetPrinter ),
7979         ])
7980         pkt.Reply(12, [
7981                 rec( 8, 1, PrinterHalted ),
7982                 rec( 9, 1, PrinterOffLine ),
7983                 rec( 10, 1, CurrentFormType ),
7984                 rec( 11, 1, RedirectedPrinter ),
7985         ])
7986         pkt.CompletionCodes([0x0000, 0x9600, 0xfb05, 0xfd00, 0xff06])
7987
7988         # 2222/1109, 17/09
7989         pkt = NCP(0x1109, "Create Spool File", 'qms')
7990         pkt.Request( (12, 23), [
7991                 rec( 10, 1, DirHandle ),
7992                 rec( 11, (1, 12), Data ),
7993         ], info_str=(Data, "Create Spool File: %s", ", %s"))
7994         pkt.Reply(8)
7995         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8400, 0x8701, 0x8d00,
7996                              0x8f00, 0x9001, 0x9400, 0x9600, 0x9804, 0x9900,
7997                              0x9b03, 0x9c03, 0xa100, 0xd000, 0xd100, 0xd202,
7998                              0xd300, 0xd400, 0xda01, 0xe800, 0xea00, 0xeb00,
7999                              0xec00, 0xfc06, 0xfd00, 0xfe07, 0xff06])
8000
8001         # 2222/110A, 17/10
8002         pkt = NCP(0x110A, "Get Printer's Queue", 'qms')
8003         pkt.Request( 11, [
8004                 rec( 10, 1, TargetPrinter ),
8005         ])
8006         pkt.Reply( 12, [
8007                 rec( 8, 4, ObjectID, BE ),
8008         ])
8009         pkt.CompletionCodes([0x0000, 0x9600, 0xff06])
8010
8011         # 2222/12, 18
8012         pkt = NCP(0x12, "Get Volume Info with Number", 'file')
8013         pkt.Request( 8, [
8014                 rec( 7, 1, VolumeNumber )
8015         ],info_str=(VolumeNumber, "Get Volume Information for Volume %d", ", %d"))
8016         pkt.Reply( 36, [
8017                 rec( 8, 2, SectorsPerCluster, BE ),
8018                 rec( 10, 2, TotalVolumeClusters, BE ),
8019                 rec( 12, 2, AvailableClusters, BE ),
8020                 rec( 14, 2, TotalDirectorySlots, BE ),
8021                 rec( 16, 2, AvailableDirectorySlots, BE ),
8022                 rec( 18, 16, VolumeName ),
8023                 rec( 34, 2, RemovableFlag, BE ),
8024         ])
8025         pkt.CompletionCodes([0x0000, 0x9804])
8026
8027         # 2222/13, 19
8028         pkt = NCP(0x13, "Get Station Number", 'connection')
8029         pkt.Request(7)
8030         pkt.Reply(11, [
8031                 rec( 8, 3, StationNumber )
8032         ])
8033         pkt.CompletionCodes([0x0000, 0xff00])
8034
8035         # 2222/14, 20
8036         pkt = NCP(0x14, "Get File Server Date And Time", 'fileserver')
8037         pkt.Request(7)
8038         pkt.Reply(15, [
8039                 rec( 8, 1, Year ),
8040                 rec( 9, 1, Month ),
8041                 rec( 10, 1, Day ),
8042                 rec( 11, 1, Hour ),
8043                 rec( 12, 1, Minute ),
8044                 rec( 13, 1, Second ),
8045                 rec( 14, 1, DayOfWeek ),
8046         ])
8047         pkt.CompletionCodes([0x0000])
8048
8049         # 2222/1500, 21/00
8050         pkt = NCP(0x1500, "Send Broadcast Message", 'message')
8051         pkt.Request((13, 70), [
8052                 rec( 10, 1, ClientListLen, var="x" ),
8053                 rec( 11, 1, TargetClientList, repeat="x" ),
8054                 rec( 12, (1, 58), TargetMessage ),
8055         ], info_str=(TargetMessage, "Send Broadcast Message: %s", ", %s"))
8056         pkt.Reply(10, [
8057                 rec( 8, 1, ClientListLen, var="x" ),
8058                 rec( 9, 1, SendStatus, repeat="x" )
8059         ])
8060         pkt.CompletionCodes([0x0000, 0xfd00])
8061
8062         # 2222/1501, 21/01
8063         pkt = NCP(0x1501, "Get Broadcast Message", 'message')
8064         pkt.Request(10)
8065         pkt.Reply((9,66), [
8066                 rec( 8, (1, 58), TargetMessage )
8067         ])
8068         pkt.CompletionCodes([0x0000, 0xfd00])
8069
8070         # 2222/1502, 21/02
8071         pkt = NCP(0x1502, "Disable Broadcasts", 'message')
8072         pkt.Request(10)
8073         pkt.Reply(8)
8074         pkt.CompletionCodes([0x0000, 0xfb0a])
8075
8076         # 2222/1503, 21/03
8077         pkt = NCP(0x1503, "Enable Broadcasts", 'message')
8078         pkt.Request(10)
8079         pkt.Reply(8)
8080         pkt.CompletionCodes([0x0000])
8081
8082         # 2222/1509, 21/09
8083         pkt = NCP(0x1509, "Broadcast To Console", 'message')
8084         pkt.Request((11, 68), [
8085                 rec( 10, (1, 58), TargetMessage )
8086         ], info_str=(TargetMessage, "Broadcast to Console: %s", ", %s"))
8087         pkt.Reply(8)
8088         pkt.CompletionCodes([0x0000])
8089         # 2222/150A, 21/10
8090         pkt = NCP(0x150A, "Send Broadcast Message", 'message')
8091         pkt.Request((17, 74), [
8092                 rec( 10, 2, ClientListCount, LE, var="x" ),
8093                 rec( 12, 4, ClientList, LE, repeat="x" ),
8094                 rec( 16, (1, 58), TargetMessage ),
8095         ], info_str=(TargetMessage, "Send Broadcast Message: %s", ", %s"))
8096         pkt.Reply(14, [
8097                 rec( 8, 2, ClientListCount, LE, var="x" ),
8098                 rec( 10, 4, ClientCompFlag, LE, repeat="x" ),
8099         ])
8100         pkt.CompletionCodes([0x0000, 0xfd00])
8101
8102         # 2222/150B, 21/11
8103         pkt = NCP(0x150B, "Get Broadcast Message", 'message')
8104         pkt.Request(10)
8105         pkt.Reply((9,66), [
8106                 rec( 8, (1, 58), TargetMessage )
8107         ])
8108         pkt.CompletionCodes([0x0000, 0xfd00])
8109
8110         # 2222/150C, 21/12
8111         pkt = NCP(0x150C, "Connection Message Control", 'message')
8112         pkt.Request(22, [
8113                 rec( 10, 1, ConnectionControlBits ),
8114                 rec( 11, 3, Reserved3 ),
8115                 rec( 14, 4, ConnectionListCount, LE, var="x" ),
8116                 rec( 18, 4, ConnectionList, LE, repeat="x" ),
8117         ])
8118         pkt.Reply(8)
8119         pkt.CompletionCodes([0x0000, 0xff00])
8120
8121         # 2222/1600, 22/0
8122         pkt = NCP(0x1600, "Set Directory Handle", 'fileserver')
8123         pkt.Request((13,267), [
8124                 rec( 10, 1, TargetDirHandle ),
8125                 rec( 11, 1, DirHandle ),
8126                 rec( 12, (1, 255), Path ),
8127         ], info_str=(Path, "Set Directory Handle to: %s", ", %s"))
8128         pkt.Reply(8)
8129         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8130                              0xfd00, 0xff00])
8131
8132
8133         # 2222/1601, 22/1
8134         pkt = NCP(0x1601, "Get Directory Path", 'fileserver')
8135         pkt.Request(11, [
8136                 rec( 10, 1, DirHandle ),
8137         ],info_str=(DirHandle, "Get Directory Path for Directory Handle %d", ", %d"))
8138         pkt.Reply((9,263), [
8139                 rec( 8, (1,255), Path ),
8140         ])
8141         pkt.CompletionCodes([0x0000, 0x9600, 0x9b00, 0x9c00, 0xa100])
8142
8143         # 2222/1602, 22/2
8144         pkt = NCP(0x1602, "Scan Directory Information", 'fileserver')
8145         pkt.Request((14,268), [
8146                 rec( 10, 1, DirHandle ),
8147                 rec( 11, 2, StartingSearchNumber, BE ),
8148                 rec( 13, (1, 255), Path ),
8149         ], info_str=(Path, "Scan Directory Information: %s", ", %s"))
8150         pkt.Reply(36, [
8151                 rec( 8, 16, DirectoryPath ),
8152                 rec( 24, 2, CreationDate, BE ),
8153                 rec( 26, 2, CreationTime, BE ),
8154                 rec( 28, 4, CreatorID, BE ),
8155                 rec( 32, 1, AccessRightsMask ),
8156                 rec( 33, 1, Reserved ),
8157                 rec( 34, 2, NextSearchNumber, BE ),
8158         ])
8159         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8160                              0xfd00, 0xff00])
8161
8162         # 2222/1603, 22/3
8163         pkt = NCP(0x1603, "Get Effective Directory Rights", 'fileserver')
8164         pkt.Request((14,268), [
8165                 rec( 10, 1, DirHandle ),
8166                 rec( 11, 2, StartingSearchNumber ),
8167                 rec( 13, (1, 255), Path ),
8168         ], info_str=(Path, "Get Effective Directory Rights: %s", ", %s"))
8169         pkt.Reply(9, [
8170                 rec( 8, 1, AccessRightsMask ),
8171         ])
8172         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8173                              0xfd00, 0xff00])
8174
8175         # 2222/1604, 22/4
8176         pkt = NCP(0x1604, "Modify Maximum Rights Mask", 'fileserver')
8177         pkt.Request((14,268), [
8178                 rec( 10, 1, DirHandle ),
8179                 rec( 11, 1, RightsGrantMask ),
8180                 rec( 12, 1, RightsRevokeMask ),
8181                 rec( 13, (1, 255), Path ),
8182         ], info_str=(Path, "Modify Maximum Rights Mask: %s", ", %s"))
8183         pkt.Reply(8)
8184         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8185                              0xfd00, 0xff00])
8186
8187         # 2222/1605, 22/5
8188         pkt = NCP(0x1605, "Get Volume Number", 'fileserver')
8189         pkt.Request((11, 265), [
8190                 rec( 10, (1,255), VolumeNameLen ),
8191         ], info_str=(VolumeNameLen, "Get Volume Number for: %s", ", %s"))
8192         pkt.Reply(9, [
8193                 rec( 8, 1, VolumeNumber ),
8194         ])
8195         pkt.CompletionCodes([0x0000, 0x9600, 0x9804])
8196
8197         # 2222/1606, 22/6
8198         pkt = NCP(0x1606, "Get Volume Name", 'fileserver')
8199         pkt.Request(11, [
8200                 rec( 10, 1, VolumeNumber ),
8201         ],info_str=(VolumeNumber, "Get Name for Volume %d", ", %d"))
8202         pkt.Reply((9, 263), [
8203                 rec( 8, (1,255), VolumeNameLen ),
8204         ])
8205         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0xff00])
8206
8207         # 2222/160A, 22/10
8208         pkt = NCP(0x160A, "Create Directory", 'fileserver')
8209         pkt.Request((13,267), [
8210                 rec( 10, 1, DirHandle ),
8211                 rec( 11, 1, AccessRightsMask ),
8212                 rec( 12, (1, 255), Path ),
8213         ], info_str=(Path, "Create Directory: %s", ", %s"))
8214         pkt.Reply(8)
8215         pkt.CompletionCodes([0x0000, 0x8400, 0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03,
8216                              0x9e00, 0xa100, 0xfd00, 0xff00])
8217
8218         # 2222/160B, 22/11
8219         pkt = NCP(0x160B, "Delete Directory", 'fileserver')
8220         pkt.Request((13,267), [
8221                 rec( 10, 1, DirHandle ),
8222                 rec( 11, 1, Reserved ),
8223                 rec( 12, (1, 255), Path ),
8224         ], info_str=(Path, "Delete Directory: %s", ", %s"))
8225         pkt.Reply(8)
8226         pkt.CompletionCodes([0x0000, 0x8a00, 0x9600, 0x9804, 0x9b03, 0x9c03,
8227                              0x9f00, 0xa000, 0xa100, 0xfd00, 0xff00])
8228
8229         # 2222/160C, 22/12
8230         pkt = NCP(0x160C, "Scan Directory for Trustees", 'fileserver')
8231         pkt.Request((13,267), [
8232                 rec( 10, 1, DirHandle ),
8233                 rec( 11, 1, TrusteeSetNumber ),
8234                 rec( 12, (1, 255), Path ),
8235         ], info_str=(Path, "Scan Directory for Trustees: %s", ", %s"))
8236         pkt.Reply(57, [
8237                 rec( 8, 16, DirectoryPath ),
8238                 rec( 24, 2, CreationDate, BE ),
8239                 rec( 26, 2, CreationTime, BE ),
8240                 rec( 28, 4, CreatorID ),
8241                 rec( 32, 4, TrusteeID, BE ),
8242                 rec( 36, 4, TrusteeID, BE ),
8243                 rec( 40, 4, TrusteeID, BE ),
8244                 rec( 44, 4, TrusteeID, BE ),
8245                 rec( 48, 4, TrusteeID, BE ),
8246                 rec( 52, 1, AccessRightsMask ),
8247                 rec( 53, 1, AccessRightsMask ),
8248                 rec( 54, 1, AccessRightsMask ),
8249                 rec( 55, 1, AccessRightsMask ),
8250                 rec( 56, 1, AccessRightsMask ),
8251         ])
8252         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9b03, 0x9c03,
8253                              0xa100, 0xfd00, 0xff00])
8254
8255         # 2222/160D, 22/13
8256         pkt = NCP(0x160D, "Add Trustee to Directory", 'fileserver')
8257         pkt.Request((17,271), [
8258                 rec( 10, 1, DirHandle ),
8259                 rec( 11, 4, TrusteeID, BE ),
8260                 rec( 15, 1, AccessRightsMask ),
8261                 rec( 16, (1, 255), Path ),
8262         ], info_str=(Path, "Add Trustee to Directory: %s", ", %s"))
8263         pkt.Reply(8)
8264         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03,
8265                              0xa100, 0xfc06, 0xfd00, 0xff00])
8266
8267         # 2222/160E, 22/14
8268         pkt = NCP(0x160E, "Delete Trustee from Directory", 'fileserver')
8269         pkt.Request((17,271), [
8270                 rec( 10, 1, DirHandle ),
8271                 rec( 11, 4, TrusteeID, BE ),
8272                 rec( 15, 1, Reserved ),
8273                 rec( 16, (1, 255), Path ),
8274         ], info_str=(Path, "Delete Trustee from Directory: %s", ", %s"))
8275         pkt.Reply(8)
8276         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03,
8277                              0xa100, 0xfc06, 0xfd00, 0xfe07, 0xff00])
8278
8279         # 2222/160F, 22/15
8280         pkt = NCP(0x160F, "Rename Directory", 'fileserver')
8281         pkt.Request((13, 521), [
8282                 rec( 10, 1, DirHandle ),
8283                 rec( 11, (1, 255), Path ),
8284                 rec( -1, (1, 255), NewPath ),
8285         ], info_str=(Path, "Rename Directory: %s", ", %s"))
8286         pkt.Reply(8)
8287         pkt.CompletionCodes([0x0000, 0x8b00, 0x9200, 0x9600, 0x9804, 0x9b03, 0x9c03,
8288                              0x9e00, 0xa100, 0xef00, 0xfd00, 0xff00])
8289                                                                         
8290         # 2222/1610, 22/16
8291         pkt = NCP(0x1610, "Purge Erased Files", 'file')
8292         pkt.Request(10)
8293         pkt.Reply(8)
8294         pkt.CompletionCodes([0x0000, 0x8100, 0x9600, 0x9804, 0xa100, 0xff00])
8295
8296         # 2222/1611, 22/17
8297         pkt = NCP(0x1611, "Recover Erased File", 'fileserver')
8298         pkt.Request(11, [
8299                 rec( 10, 1, DirHandle ),
8300         ],info_str=(DirHandle, "Recover Erased File from Directory Handle %d", ", %d"))
8301         pkt.Reply(38, [
8302                 rec( 8, 15, OldFileName ),
8303                 rec( 23, 15, NewFileName ),
8304         ])
8305         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03,
8306                              0xa100, 0xfd00, 0xff00])
8307         # 2222/1612, 22/18
8308         pkt = NCP(0x1612, "Alloc Permanent Directory Handle", 'fileserver')
8309         pkt.Request((13, 267), [
8310                 rec( 10, 1, DirHandle ),
8311                 rec( 11, 1, DirHandleName ),
8312                 rec( 12, (1,255), Path ),
8313         ], info_str=(Path, "Allocate Permanent Directory Handle: %s", ", %s"))
8314         pkt.Reply(10, [
8315                 rec( 8, 1, DirHandle ),
8316                 rec( 9, 1, AccessRightsMask ),
8317         ])
8318         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9900, 0x9c03, 0x9d00,
8319                              0xa100, 0xfd00, 0xff00])
8320         # 2222/1613, 22/19
8321         pkt = NCP(0x1613, "Alloc Temporary Directory Handle", 'fileserver')
8322         pkt.Request((13, 267), [
8323                 rec( 10, 1, DirHandle ),
8324                 rec( 11, 1, DirHandleName ),
8325                 rec( 12, (1,255), Path ),
8326         ], info_str=(Path, "Allocate Temporary Directory Handle: %s", ", %s"))
8327         pkt.Reply(10, [
8328                 rec( 8, 1, DirHandle ),
8329                 rec( 9, 1, AccessRightsMask ),
8330         ])
8331         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9900, 0x9c03, 0x9d00,
8332                              0xa100, 0xfd00, 0xff00])
8333         # 2222/1614, 22/20
8334         pkt = NCP(0x1614, "Deallocate Directory Handle", 'fileserver')
8335         pkt.Request(11, [
8336                 rec( 10, 1, DirHandle ),
8337         ],info_str=(DirHandle, "Deallocate Directory Handle %d", ", %d"))
8338         pkt.Reply(8)
8339         pkt.CompletionCodes([0x0000, 0x9b03])
8340         # 2222/1615, 22/21
8341         pkt = NCP(0x1615, "Get Volume Info with Handle", 'file')
8342         pkt.Request( 11, [
8343                 rec( 10, 1, DirHandle )
8344         ],info_str=(DirHandle, "Get Volume Information with Handle %d", ", %d"))
8345         pkt.Reply( 36, [
8346                 rec( 8, 2, SectorsPerCluster, BE ),
8347                 rec( 10, 2, TotalVolumeClusters, BE ),
8348                 rec( 12, 2, AvailableClusters, BE ),
8349                 rec( 14, 2, TotalDirectorySlots, BE ),
8350                 rec( 16, 2, AvailableDirectorySlots, BE ),
8351                 rec( 18, 16, VolumeName ),
8352                 rec( 34, 2, RemovableFlag, BE ),
8353         ])
8354         pkt.CompletionCodes([0x0000, 0xff00])
8355         # 2222/1616, 22/22
8356         pkt = NCP(0x1616, "Alloc Special Temporary Directory Handle", 'fileserver')
8357         pkt.Request((13, 267), [
8358                 rec( 10, 1, DirHandle ),
8359                 rec( 11, 1, DirHandleName ),
8360                 rec( 12, (1,255), Path ),
8361         ], info_str=(Path, "Allocate Special Temporary Directory Handle: %s", ", %s"))
8362         pkt.Reply(10, [
8363                 rec( 8, 1, DirHandle ),
8364                 rec( 9, 1, AccessRightsMask ),
8365         ])
8366         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9900, 0x9c03, 0x9d00,
8367                              0xa100, 0xfd00, 0xff00])
8368         # 2222/1617, 22/23
8369         pkt = NCP(0x1617, "Extract a Base Handle", 'fileserver')
8370         pkt.Request(11, [
8371                 rec( 10, 1, DirHandle ),
8372         ],info_str=(DirHandle, "Extract a Base Handle from Directory Handle %d", ", %d"))
8373         pkt.Reply(22, [
8374                 rec( 8, 10, ServerNetworkAddress ),
8375                 rec( 18, 4, DirHandleLong ),
8376         ])
8377         pkt.CompletionCodes([0x0000, 0x9600, 0x9b03])
8378         # 2222/1618, 22/24
8379         pkt = NCP(0x1618, "Restore an Extracted Base Handle", 'fileserver')
8380         pkt.Request(24, [
8381                 rec( 10, 10, ServerNetworkAddress ),
8382                 rec( 20, 4, DirHandleLong ),
8383         ])
8384         pkt.Reply(10, [
8385                 rec( 8, 1, DirHandle ),
8386                 rec( 9, 1, AccessRightsMask ),
8387         ])
8388         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c00, 0x9d00, 0xa100,
8389                              0xfd00, 0xff00])
8390         # 2222/1619, 22/25
8391         pkt = NCP(0x1619, "Set Directory Information", 'fileserver')
8392         pkt.Request((21, 275), [
8393                 rec( 10, 1, DirHandle ),
8394                 rec( 11, 2, CreationDate ),
8395                 rec( 13, 2, CreationTime ),
8396                 rec( 15, 4, CreatorID, BE ),
8397                 rec( 19, 1, AccessRightsMask ),
8398                 rec( 20, (1,255), Path ),
8399         ], info_str=(Path, "Set Directory Information: %s", ", %s"))
8400         pkt.Reply(8)
8401         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9b03, 0x9c00, 0xa100,
8402                              0xff16])
8403         # 2222/161A, 22/26
8404         pkt = NCP(0x161A, "Get Path Name of a Volume-Directory Number Pair", 'fileserver')
8405         pkt.Request(13, [
8406                 rec( 10, 1, VolumeNumber ),
8407                 rec( 11, 2, DirectoryEntryNumberWord ),
8408         ])
8409         pkt.Reply((9,263), [
8410                 rec( 8, (1,255), Path ),
8411                 ])
8412         pkt.CompletionCodes([0x0000, 0x9804, 0x9c00, 0xa100])
8413         # 2222/161B, 22/27
8414         pkt = NCP(0x161B, "Scan Salvageable Files", 'fileserver')
8415         pkt.Request(15, [
8416                 rec( 10, 1, DirHandle ),
8417                 rec( 11, 4, SequenceNumber ),
8418         ])
8419         pkt.Reply(140, [
8420                 rec( 8, 4, SequenceNumber ),
8421                 rec( 12, 2, Subdirectory ),
8422                 rec( 14, 2, Reserved2 ),
8423                 rec( 16, 4, AttributesDef32 ),
8424                 rec( 20, 1, UniqueID ),
8425                 rec( 21, 1, FlagsDef ),
8426                 rec( 22, 1, DestNameSpace ),
8427                 rec( 23, 1, FileNameLen ),
8428                 rec( 24, 12, FileName12 ),
8429                 rec( 36, 2, CreationTime ),
8430                 rec( 38, 2, CreationDate ),
8431                 rec( 40, 4, CreatorID, BE ),
8432                 rec( 44, 2, ArchivedTime ),
8433                 rec( 46, 2, ArchivedDate ),
8434                 rec( 48, 4, ArchiverID, BE ),
8435                 rec( 52, 2, UpdateTime ),
8436                 rec( 54, 2, UpdateDate ),
8437                 rec( 56, 4, UpdateID, BE ),
8438                 rec( 60, 4, FileSize, BE ),
8439                 rec( 64, 44, Reserved44 ),
8440                 rec( 108, 2, InheritedRightsMask ),
8441                 rec( 110, 2, LastAccessedDate ),
8442                 rec( 112, 4, DeletedFileTime ),
8443                 rec( 116, 2, DeletedTime ),
8444                 rec( 118, 2, DeletedDate ),
8445                 rec( 120, 4, DeletedID, BE ),
8446                 rec( 124, 16, Reserved16 ),
8447         ])
8448         pkt.CompletionCodes([0x0000, 0xfb01, 0xff1d])
8449         # 2222/161C, 22/28
8450         pkt = NCP(0x161C, "Recover Salvageable File", 'fileserver')
8451         pkt.Request((17,525), [
8452                 rec( 10, 1, DirHandle ),
8453                 rec( 11, 4, SequenceNumber ),
8454                 rec( 15, (1, 255), FileName ),
8455                 rec( -1, (1, 255), NewFileNameLen ),
8456         ], info_str=(FileName, "Recover File: %s", ", %s"))
8457         pkt.Reply(8)
8458         pkt.CompletionCodes([0x0000, 0x8401, 0x9c03, 0xfe02])
8459         # 2222/161D, 22/29
8460         pkt = NCP(0x161D, "Purge Salvageable File", 'fileserver')
8461         pkt.Request(15, [
8462                 rec( 10, 1, DirHandle ),
8463                 rec( 11, 4, SequenceNumber ),
8464         ])
8465         pkt.Reply(8)
8466         pkt.CompletionCodes([0x0000, 0x8500, 0x9c03])
8467         # 2222/161E, 22/30
8468         pkt = NCP(0x161E, "Scan a Directory", 'fileserver')
8469         pkt.Request((17, 271), [
8470                 rec( 10, 1, DirHandle ),
8471                 rec( 11, 1, DOSFileAttributes ),
8472                 rec( 12, 4, SequenceNumber ),
8473                 rec( 16, (1, 255), SearchPattern ),
8474         ], info_str=(SearchPattern, "Scan a Directory: %s", ", %s"))
8475         pkt.Reply(140, [
8476                 rec( 8, 4, SequenceNumber ),
8477                 rec( 12, 4, Subdirectory ),
8478                 rec( 16, 4, AttributesDef32 ),
8479                 rec( 20, 1, UniqueID, LE ),
8480                 rec( 21, 1, PurgeFlags ),
8481                 rec( 22, 1, DestNameSpace ),
8482                 rec( 23, 1, NameLen ),
8483                 rec( 24, 12, Name12 ),
8484                 rec( 36, 2, CreationTime ),
8485                 rec( 38, 2, CreationDate ),
8486                 rec( 40, 4, CreatorID, BE ),
8487                 rec( 44, 2, ArchivedTime ),
8488                 rec( 46, 2, ArchivedDate ),
8489                 rec( 48, 4, ArchiverID, BE ),
8490                 rec( 52, 2, UpdateTime ),
8491                 rec( 54, 2, UpdateDate ),
8492                 rec( 56, 4, UpdateID, BE ),
8493                 rec( 60, 4, FileSize, BE ),
8494                 rec( 64, 44, Reserved44 ),
8495                 rec( 108, 2, InheritedRightsMask ),
8496                 rec( 110, 2, LastAccessedDate ),
8497                 rec( 112, 28, Reserved28 ),
8498         ])
8499         pkt.CompletionCodes([0x0000, 0x8500, 0x9c03])
8500         # 2222/161F, 22/31
8501         pkt = NCP(0x161F, "Get Directory Entry", 'fileserver')
8502         pkt.Request(11, [
8503                 rec( 10, 1, DirHandle ),
8504         ])
8505         pkt.Reply(136, [
8506                 rec( 8, 4, Subdirectory ),
8507                 rec( 12, 4, AttributesDef32 ),
8508                 rec( 16, 1, UniqueID, LE ),
8509                 rec( 17, 1, PurgeFlags ),
8510                 rec( 18, 1, DestNameSpace ),
8511                 rec( 19, 1, NameLen ),
8512                 rec( 20, 12, Name12 ),
8513                 rec( 32, 2, CreationTime ),
8514                 rec( 34, 2, CreationDate ),
8515                 rec( 36, 4, CreatorID, BE ),
8516                 rec( 40, 2, ArchivedTime ),
8517                 rec( 42, 2, ArchivedDate ), 
8518                 rec( 44, 4, ArchiverID, BE ),
8519                 rec( 48, 2, UpdateTime ),
8520                 rec( 50, 2, UpdateDate ),
8521                 rec( 52, 4, NextTrusteeEntry, BE ),
8522                 rec( 56, 48, Reserved48 ),
8523                 rec( 104, 2, MaximumSpace ),
8524                 rec( 106, 2, InheritedRightsMask ),
8525                 rec( 108, 28, Undefined28 ),
8526         ])
8527         pkt.CompletionCodes([0x0000, 0x8900, 0xbf00, 0xfb00])
8528         # 2222/1620, 22/32
8529         pkt = NCP(0x1620, "Scan Volume's User Disk Restrictions", 'fileserver')
8530         pkt.Request(15, [
8531                 rec( 10, 1, VolumeNumber ),
8532                 rec( 11, 4, SequenceNumber ),
8533         ])
8534         pkt.Reply(17, [
8535                 rec( 8, 1, NumberOfEntries, var="x" ),
8536                 rec( 9, 8, ObjectIDStruct, repeat="x" ),
8537         ])
8538         pkt.CompletionCodes([0x0000, 0x9800])
8539         # 2222/1621, 22/33
8540         pkt = NCP(0x1621, "Add User Disk Space Restriction", 'fileserver')
8541         pkt.Request(19, [
8542                 rec( 10, 1, VolumeNumber ),
8543                 rec( 11, 4, ObjectID ),
8544                 rec( 15, 4, DiskSpaceLimit ),
8545         ])
8546         pkt.Reply(8)
8547         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9800])
8548         # 2222/1622, 22/34
8549         pkt = NCP(0x1622, "Remove User Disk Space Restrictions", 'fileserver')
8550         pkt.Request(15, [
8551                 rec( 10, 1, VolumeNumber ),
8552                 rec( 11, 4, ObjectID ),
8553         ])
8554         pkt.Reply(8)
8555         pkt.CompletionCodes([0x0000, 0x8c00, 0xfe0e])
8556         # 2222/1623, 22/35
8557         pkt = NCP(0x1623, "Get Directory Disk Space Restriction", 'fileserver')
8558         pkt.Request(11, [
8559                 rec( 10, 1, DirHandle ),
8560         ])
8561         pkt.Reply(18, [
8562                 rec( 8, 1, NumberOfEntries ),
8563                 rec( 9, 1, Level ),
8564                 rec( 10, 4, MaxSpace ),
8565                 rec( 14, 4, CurrentSpace ),
8566         ])
8567         pkt.CompletionCodes([0x0000])
8568         # 2222/1624, 22/36
8569         pkt = NCP(0x1624, "Set Directory Disk Space Restriction", 'fileserver')
8570         pkt.Request(15, [
8571                 rec( 10, 1, DirHandle ),
8572                 rec( 11, 4, DiskSpaceLimit ),
8573         ])
8574         pkt.Reply(8)
8575         pkt.CompletionCodes([0x0000, 0x0101, 0x8c00, 0xbf00])
8576         # 2222/1625, 22/37
8577         pkt = NCP(0x1625, "Set Directory Entry Information", 'fileserver')
8578         pkt.Request(NO_LENGTH_CHECK, [
8579                 #
8580                 # XXX - this didn't match what was in the spec for 22/37
8581                 # on the Novell Web site.
8582                 #
8583                 rec( 10, 1, DirHandle ),
8584                 rec( 11, 1, SearchAttributes ),
8585                 rec( 12, 4, SequenceNumber ),
8586                 rec( 16, 2, ChangeBits ),
8587                 rec( 18, 2, Reserved2 ),
8588                 rec( 20, 4, Subdirectory ),
8589                 srec(DOSDirectoryEntryStruct, req_cond="ncp.search_att_sub == TRUE"),
8590                 srec(DOSFileEntryStruct, req_cond="ncp.search_att_sub == FALSE"),
8591         ])
8592         pkt.Reply(8)
8593         pkt.ReqCondSizeConstant()
8594         pkt.CompletionCodes([0x0000, 0x0106, 0x8c00, 0xbf00])
8595         # 2222/1626, 22/38
8596         pkt = NCP(0x1626, "Scan File or Directory for Extended Trustees", 'fileserver')
8597         pkt.Request((13,267), [
8598                 rec( 10, 1, DirHandle ),
8599                 rec( 11, 1, SequenceByte ),
8600                 rec( 12, (1, 255), Path ),
8601         ], info_str=(Path, "Scan for Extended Trustees: %s", ", %s"))
8602         pkt.Reply(91, [
8603                 rec( 8, 1, NumberOfEntries, var="x" ),
8604                 rec( 9, 4, ObjectID ),
8605                 rec( 13, 4, ObjectID ),
8606                 rec( 17, 4, ObjectID ),
8607                 rec( 21, 4, ObjectID ),
8608                 rec( 25, 4, ObjectID ),
8609                 rec( 29, 4, ObjectID ),
8610                 rec( 33, 4, ObjectID ),
8611                 rec( 37, 4, ObjectID ),
8612                 rec( 41, 4, ObjectID ),
8613                 rec( 45, 4, ObjectID ),
8614                 rec( 49, 4, ObjectID ),
8615                 rec( 53, 4, ObjectID ),
8616                 rec( 57, 4, ObjectID ),
8617                 rec( 61, 4, ObjectID ),
8618                 rec( 65, 4, ObjectID ),
8619                 rec( 69, 4, ObjectID ),
8620                 rec( 73, 4, ObjectID ),
8621                 rec( 77, 4, ObjectID ),
8622                 rec( 81, 4, ObjectID ),
8623                 rec( 85, 4, ObjectID ),
8624                 rec( 89, 2, AccessRightsMaskWord, repeat="x" ),
8625         ])
8626         pkt.CompletionCodes([0x0000, 0x9800, 0x9b00, 0x9c00])
8627         # 2222/1627, 22/39
8628         pkt = NCP(0x1627, "Add Extended Trustee to Directory or File", 'fileserver')
8629         pkt.Request((18,272), [
8630                 rec( 10, 1, DirHandle ),
8631                 rec( 11, 4, ObjectID, BE ),
8632                 rec( 15, 2, TrusteeRights ),
8633                 rec( 17, (1, 255), Path ),
8634         ], info_str=(Path, "Add Extended Trustee: %s", ", %s"))
8635         pkt.Reply(8)
8636         pkt.CompletionCodes([0x0000, 0x9000])
8637         # 2222/1628, 22/40
8638         pkt = NCP(0x1628, "Scan Directory Disk Space", 'fileserver')
8639         pkt.Request((17,271), [
8640                 rec( 10, 1, DirHandle ),
8641                 rec( 11, 1, SearchAttributes ),
8642                 rec( 12, 4, SequenceNumber ),
8643                 rec( 16, (1, 255), SearchPattern ),
8644         ], info_str=(SearchPattern, "Scan Directory Disk Space: %s", ", %s"))
8645         pkt.Reply((148), [
8646                 rec( 8, 4, SequenceNumber ),
8647                 rec( 12, 4, Subdirectory ),
8648                 rec( 16, 4, AttributesDef32 ),
8649                 rec( 20, 1, UniqueID ),
8650                 rec( 21, 1, PurgeFlags ),
8651                 rec( 22, 1, DestNameSpace ),
8652                 rec( 23, 1, NameLen ),
8653                 rec( 24, 12, Name12 ),
8654                 rec( 36, 2, CreationTime ),
8655                 rec( 38, 2, CreationDate ),
8656                 rec( 40, 4, CreatorID, BE ),
8657                 rec( 44, 2, ArchivedTime ),
8658                 rec( 46, 2, ArchivedDate ),
8659                 rec( 48, 4, ArchiverID, BE ),
8660                 rec( 52, 2, UpdateTime ),
8661                 rec( 54, 2, UpdateDate ),
8662                 rec( 56, 4, UpdateID, BE ),
8663                 rec( 60, 4, DataForkSize, BE ),
8664                 rec( 64, 4, DataForkFirstFAT, BE ),
8665                 rec( 68, 4, NextTrusteeEntry, BE ),
8666                 rec( 72, 36, Reserved36 ),
8667                 rec( 108, 2, InheritedRightsMask ),
8668                 rec( 110, 2, LastAccessedDate ),
8669                 rec( 112, 4, DeletedFileTime ),
8670                 rec( 116, 2, DeletedTime ),
8671                 rec( 118, 2, DeletedDate ),
8672                 rec( 120, 4, DeletedID, BE ),
8673                 rec( 124, 8, Undefined8 ),
8674                 rec( 132, 4, PrimaryEntry, LE ),
8675                 rec( 136, 4, NameList, LE ),
8676                 rec( 140, 4, OtherFileForkSize, BE ),
8677                 rec( 144, 4, OtherFileForkFAT, BE ),
8678         ])
8679         pkt.CompletionCodes([0x0000, 0x8900, 0x9c03, 0xfb01, 0xff00])
8680         # 2222/1629, 22/41
8681         pkt = NCP(0x1629, "Get Object Disk Usage and Restrictions", 'fileserver')
8682         pkt.Request(15, [
8683                 rec( 10, 1, VolumeNumber ),
8684                 rec( 11, 4, ObjectID, BE ),
8685         ])
8686         pkt.Reply(16, [
8687                 rec( 8, 4, Restriction ),
8688                 rec( 12, 4, InUse ),
8689         ])
8690         pkt.CompletionCodes([0x0000, 0x9802])
8691         # 2222/162A, 22/42
8692         pkt = NCP(0x162A, "Get Effective Rights for Directory Entry", 'fileserver')
8693         pkt.Request((12,266), [
8694                 rec( 10, 1, DirHandle ),
8695                 rec( 11, (1, 255), Path ),
8696         ], info_str=(Path, "Get Effective Rights: %s", ", %s"))
8697         pkt.Reply(10, [
8698                 rec( 8, 2, AccessRightsMaskWord ),
8699         ])
8700         pkt.CompletionCodes([0x0000, 0x9804, 0x9c03])
8701         # 2222/162B, 22/43
8702         pkt = NCP(0x162B, "Remove Extended Trustee from Dir or File", 'fileserver')
8703         pkt.Request((17,271), [
8704                 rec( 10, 1, DirHandle ),
8705                 rec( 11, 4, ObjectID, BE ),
8706                 rec( 15, 1, Unused ),
8707                 rec( 16, (1, 255), Path ),
8708         ], info_str=(Path, "Remove Extended Trustee from %s", ", %s"))
8709         pkt.Reply(8)
8710         pkt.CompletionCodes([0x0000, 0x9002, 0x9c03, 0xfe0f, 0xff09])
8711         # 2222/162C, 22/44
8712         pkt = NCP(0x162C, "Get Volume and Purge Information", 'file')
8713         pkt.Request( 11, [
8714                 rec( 10, 1, VolumeNumber )
8715         ],info_str=(VolumeNumber, "Get Volume and Purge Information for Volume %d", ", %d"))
8716         pkt.Reply( (38,53), [
8717                 rec( 8, 4, TotalBlocks ),
8718                 rec( 12, 4, FreeBlocks ),
8719                 rec( 16, 4, PurgeableBlocks ),
8720                 rec( 20, 4, NotYetPurgeableBlocks ),
8721                 rec( 24, 4, TotalDirectoryEntries ),
8722                 rec( 28, 4, AvailableDirEntries ),
8723                 rec( 32, 4, Reserved4 ),
8724                 rec( 36, 1, SectorsPerBlock ),
8725                 rec( 37, (1,16), VolumeNameLen ),
8726         ])
8727         pkt.CompletionCodes([0x0000])
8728         # 2222/162D, 22/45
8729         pkt = NCP(0x162D, "Get Directory Information", 'file')
8730         pkt.Request( 11, [
8731                 rec( 10, 1, DirHandle )
8732         ])
8733         pkt.Reply( (30, 45), [
8734                 rec( 8, 4, TotalBlocks ),
8735                 rec( 12, 4, AvailableBlocks ),
8736                 rec( 16, 4, TotalDirectoryEntries ),
8737                 rec( 20, 4, AvailableDirEntries ),
8738                 rec( 24, 4, Reserved4 ),
8739                 rec( 28, 1, SectorsPerBlock ),
8740                 rec( 29, (1,16), VolumeNameLen ),
8741         ])
8742         pkt.CompletionCodes([0x0000, 0x9b03])
8743         # 2222/162E, 22/46
8744         pkt = NCP(0x162E, "Rename Or Move", 'file')
8745         pkt.Request( (17,525), [
8746                 rec( 10, 1, SourceDirHandle ),
8747                 rec( 11, 1, SearchAttributes ),
8748                 rec( 12, 1, SourcePathComponentCount ),
8749                 rec( 13, (1,255), SourcePath ),
8750                 rec( -1, 1, DestDirHandle ),
8751                 rec( -1, 1, DestPathComponentCount ),
8752                 rec( -1, (1,255), DestPath ),
8753         ], info_str=(SourcePath, "Rename or Move: %s", ", %s"))
8754         pkt.Reply(8)
8755         pkt.CompletionCodes([0x0000, 0x0102, 0x8701, 0x8b00, 0x8d00, 0x8e00,
8756                              0x8f00, 0x9001, 0x9101, 0x9201, 0x9a00, 0x9b03,
8757                              0x9c03, 0xa400, 0xff17])
8758         # 2222/162F, 22/47
8759         pkt = NCP(0x162F, "Get Name Space Information", 'file')
8760         pkt.Request( 11, [
8761                 rec( 10, 1, VolumeNumber )
8762         ],info_str=(VolumeNumber, "Get Name Space Information for Volume %d", ", %d"))
8763         pkt.Reply( (15,523), [
8764                 #
8765                 # XXX - why does this not display anything at all
8766                 # if the stuff after the first IndexNumber is
8767                 # un-commented?
8768                 #
8769                 rec( 8, 1, DefinedNameSpaces, var="v" ),
8770                 rec( 9, (1,255), NameSpaceName, repeat="v" ),
8771                 rec( -1, 1, DefinedDataStreams, var="w" ),
8772                 rec( -1, (2,256), DataStreamInfo, repeat="w" ),
8773                 rec( -1, 1, LoadedNameSpaces, var="x" ),
8774                 rec( -1, 1, IndexNumber, repeat="x" ),
8775 #               rec( -1, 1, VolumeNameSpaces, var="y" ),
8776 #               rec( -1, 1, IndexNumber, repeat="y" ),
8777 #               rec( -1, 1, VolumeDataStreams, var="z" ),
8778 #               rec( -1, 1, IndexNumber, repeat="z" ),
8779         ])
8780         pkt.CompletionCodes([0x0000, 0xff00])
8781         # 2222/1630, 22/48
8782         pkt = NCP(0x1630, "Get Name Space Directory Entry", 'file')
8783         pkt.Request( 16, [
8784                 rec( 10, 1, VolumeNumber ),
8785                 rec( 11, 4, DOSSequence ),
8786                 rec( 15, 1, SrcNameSpace ),
8787         ])
8788         pkt.Reply( 112, [
8789                 rec( 8, 4, SequenceNumber ),
8790                 rec( 12, 4, Subdirectory ),
8791                 rec( 16, 4, AttributesDef32 ),
8792                 rec( 20, 1, UniqueID ),
8793                 rec( 21, 1, Flags ),
8794                 rec( 22, 1, SrcNameSpace ),
8795                 rec( 23, 1, NameLength ),
8796                 rec( 24, 12, Name12 ),
8797                 rec( 36, 2, CreationTime ),
8798                 rec( 38, 2, CreationDate ),
8799                 rec( 40, 4, CreatorID, BE ),
8800                 rec( 44, 2, ArchivedTime ),
8801                 rec( 46, 2, ArchivedDate ),
8802                 rec( 48, 4, ArchiverID ),
8803                 rec( 52, 2, UpdateTime ),
8804                 rec( 54, 2, UpdateDate ),
8805                 rec( 56, 4, UpdateID ),
8806                 rec( 60, 4, FileSize ),
8807                 rec( 64, 44, Reserved44 ),
8808                 rec( 108, 2, InheritedRightsMask ),
8809                 rec( 110, 2, LastAccessedDate ),
8810         ])
8811         pkt.CompletionCodes([0x0000, 0x8900, 0x9802, 0xbf00])
8812         # 2222/1631, 22/49
8813         pkt = NCP(0x1631, "Open Data Stream", 'file')
8814         pkt.Request( (15,269), [
8815                 rec( 10, 1, DataStream ),
8816                 rec( 11, 1, DirHandle ),
8817                 rec( 12, 1, AttributesDef ),
8818                 rec( 13, 1, OpenRights ),
8819                 rec( 14, (1, 255), FileName ),
8820         ], info_str=(FileName, "Open Data Stream: %s", ", %s"))
8821         pkt.Reply( 12, [
8822                 rec( 8, 4, CCFileHandle, BE ),
8823         ])
8824         pkt.CompletionCodes([0x0000, 0x8000, 0x8200, 0x9002, 0xbe00, 0xff00])
8825         # 2222/1632, 22/50
8826         pkt = NCP(0x1632, "Get Object Effective Rights for Directory Entry", 'file')
8827         pkt.Request( (16,270), [
8828                 rec( 10, 4, ObjectID, BE ),
8829                 rec( 14, 1, DirHandle ),
8830                 rec( 15, (1, 255), Path ),
8831         ], info_str=(Path, "Get Object Effective Rights: %s", ", %s"))
8832         pkt.Reply( 10, [
8833                 rec( 8, 2, TrusteeRights ),
8834         ])
8835         pkt.CompletionCodes([0x0000, 0x7e01, 0x9b00, 0x9c03])
8836         # 2222/1633, 22/51
8837         pkt = NCP(0x1633, "Get Extended Volume Information", 'file')
8838         pkt.Request( 11, [
8839                 rec( 10, 1, VolumeNumber ),
8840         ],info_str=(VolumeNumber, "Get Extended Volume Information for Volume %d", ", %d"))
8841         pkt.Reply( (139,266), [
8842                 rec( 8, 2, VolInfoReplyLen ),
8843                 rec( 10, 128, VolInfoStructure),
8844                 rec( 138, (1,128), VolumeNameLen ),
8845         ])
8846         pkt.CompletionCodes([0x0000, 0x7e01, 0x9804, 0xfb08, 0xff00])
8847         # 2222/1634, 22/52
8848         pkt = NCP(0x1634, "Get Mount Volume List", 'file')
8849         pkt.Request( 22, [
8850                 rec( 10, 4, StartVolumeNumber ),
8851                 rec( 14, 4, VolumeRequestFlags, LE ),
8852                 rec( 18, 4, SrcNameSpace ),
8853         ])
8854         pkt.Reply( 34, [
8855                 rec( 8, 4, ItemsInPacket, var="x" ),
8856                 rec( 12, 4, NextVolumeNumber ),
8857                 rec( 16, 18, VolumeStruct, repeat="x"),
8858         ])
8859         pkt.CompletionCodes([0x0000])
8860         # 2222/1700, 23/00
8861         pkt = NCP(0x1700, "Login User", 'file')
8862         pkt.Request( (12, 58), [
8863                 rec( 10, (1,16), UserName ),
8864                 rec( -1, (1,32), Password ),
8865         ], info_str=(UserName, "Login User: %s", ", %s"))
8866         pkt.Reply(8)
8867         pkt.CompletionCodes([0x0000, 0x9602, 0xc101, 0xc200, 0xc501, 0xd700,
8868                              0xd900, 0xda00, 0xdb00, 0xde00, 0xdf00, 0xe800,
8869                              0xec00, 0xed00, 0xef00, 0xf001, 0xf100, 0xf200,
8870                              0xf600, 0xfb00, 0xfc06, 0xfe07, 0xff00])
8871         # 2222/1701, 23/01
8872         pkt = NCP(0x1701, "Change User Password", 'file')
8873         pkt.Request( (13, 90), [
8874                 rec( 10, (1,16), UserName ),
8875                 rec( -1, (1,32), Password ),
8876                 rec( -1, (1,32), NewPassword ),
8877         ], info_str=(UserName, "Change Password for User: %s", ", %s"))
8878         pkt.Reply(8)
8879         pkt.CompletionCodes([0x0000, 0x9600, 0xd600, 0xf001, 0xf101, 0xf501,
8880                              0xfc06, 0xfe07, 0xff00])
8881         # 2222/1702, 23/02
8882         pkt = NCP(0x1702, "Get User Connection List", 'file')
8883         pkt.Request( (11, 26), [
8884                 rec( 10, (1,16), UserName ),
8885         ], info_str=(UserName, "Get User Connection: %s", ", %s"))
8886         pkt.Reply( (9, 136), [
8887                 rec( 8, (1, 128), ConnectionNumberList ),
8888         ])
8889         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
8890         # 2222/1703, 23/03
8891         pkt = NCP(0x1703, "Get User Number", 'file')
8892         pkt.Request( (11, 26), [
8893                 rec( 10, (1,16), UserName ),
8894         ], info_str=(UserName, "Get User Number: %s", ", %s"))
8895         pkt.Reply( 12, [
8896                 rec( 8, 4, ObjectID, BE ),
8897         ])
8898         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
8899         # 2222/1705, 23/05
8900         pkt = NCP(0x1705, "Get Station's Logged Info", 'file')
8901         pkt.Request( 11, [
8902                 rec( 10, 1, TargetConnectionNumber ),
8903         ],info_str=(TargetConnectionNumber, "Get Station's Logged Information on Connection %d", ", %d")) 
8904         pkt.Reply( 266, [
8905                 rec( 8, 16, UserName16 ),
8906                 rec( 24, 7, LoginTime ),
8907                 rec( 31, 39, FullName ),
8908                 rec( 70, 4, UserID, BE ),
8909                 rec( 74, 128, SecurityEquivalentList ),
8910                 rec( 202, 64, Reserved64 ),
8911         ])
8912         pkt.CompletionCodes([0x0000, 0x9602, 0xfc06, 0xfd00, 0xfe07, 0xff00])
8913         # 2222/1707, 23/07
8914         pkt = NCP(0x1707, "Get Group Number", 'file')
8915         pkt.Request( 14, [
8916                 rec( 10, 4, ObjectID, BE ),
8917         ])
8918         pkt.Reply( 62, [
8919                 rec( 8, 4, ObjectID, BE ),
8920                 rec( 12, 2, ObjectType, BE ),
8921                 rec( 14, 48, ObjectNameLen ),
8922         ])
8923         pkt.CompletionCodes([0x0000, 0x9602, 0xf101, 0xfc06, 0xfe07, 0xff00])
8924         # 2222/170C, 23/12
8925         pkt = NCP(0x170C, "Verify Serialization", 'file')
8926         pkt.Request( 14, [
8927                 rec( 10, 4, ServerSerialNumber ),
8928         ])
8929         pkt.Reply(8)
8930         pkt.CompletionCodes([0x0000, 0xff00])
8931         # 2222/170D, 23/13
8932         pkt = NCP(0x170D, "Log Network Message", 'file')
8933         pkt.Request( (11, 68), [
8934                 rec( 10, (1, 58), TargetMessage ),
8935         ], info_str=(TargetMessage, "Log Network Message: %s", ", %s"))
8936         pkt.Reply(8)
8937         pkt.CompletionCodes([0x0000, 0x8000, 0x8100, 0x8800, 0x8d00, 0x8e00, 0x8f00,
8938                              0x9001, 0x9400, 0x9600, 0x9804, 0x9900, 0x9b00, 0xa100,
8939                              0xa201, 0xff00])
8940         # 2222/170E, 23/14
8941         pkt = NCP(0x170E, "Get Disk Utilization", 'file')
8942         pkt.Request( 15, [
8943                 rec( 10, 1, VolumeNumber ),
8944                 rec( 11, 4, TrusteeID, BE ),
8945         ])
8946         pkt.Reply( 19, [
8947                 rec( 8, 1, VolumeNumber ),
8948                 rec( 9, 4, TrusteeID, BE ),
8949                 rec( 13, 2, DirectoryCount, BE ),
8950                 rec( 15, 2, FileCount, BE ),
8951                 rec( 17, 2, ClusterCount, BE ),
8952         ])
8953         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0xa100, 0xf200])
8954         # 2222/170F, 23/15
8955         pkt = NCP(0x170F, "Scan File Information", 'file')
8956         pkt.Request((15,269), [
8957                 rec( 10, 2, LastSearchIndex ),
8958                 rec( 12, 1, DirHandle ),
8959                 rec( 13, 1, SearchAttributes ),
8960                 rec( 14, (1, 255), FileName ),
8961         ], info_str=(FileName, "Scan File Information: %s", ", %s"))
8962         pkt.Reply( 102, [
8963                 rec( 8, 2, NextSearchIndex ),
8964                 rec( 10, 14, FileName14 ),
8965                 rec( 24, 2, AttributesDef16 ),
8966                 rec( 26, 4, FileSize, BE ),
8967                 rec( 30, 2, CreationDate, BE ),
8968                 rec( 32, 2, LastAccessedDate, BE ),
8969                 rec( 34, 2, ModifiedDate, BE ),
8970                 rec( 36, 2, ModifiedTime, BE ),
8971                 rec( 38, 4, CreatorID, BE ),
8972                 rec( 42, 2, ArchivedDate, BE ),
8973                 rec( 44, 2, ArchivedTime, BE ),
8974                 rec( 46, 56, Reserved56 ),
8975         ])
8976         pkt.CompletionCodes([0x0000, 0x8800, 0x8900, 0x9300, 0x9400, 0x9804, 0x9b00, 0x9c00,
8977                              0xa100, 0xfd00, 0xff17])
8978         # 2222/1710, 23/16
8979         pkt = NCP(0x1710, "Set File Information", 'file')
8980         pkt.Request((91,345), [
8981                 rec( 10, 2, AttributesDef16 ),
8982                 rec( 12, 4, FileSize, BE ),
8983                 rec( 16, 2, CreationDate, BE ),
8984                 rec( 18, 2, LastAccessedDate, BE ),
8985                 rec( 20, 2, ModifiedDate, BE ),
8986                 rec( 22, 2, ModifiedTime, BE ),
8987                 rec( 24, 4, CreatorID, BE ),
8988                 rec( 28, 2, ArchivedDate, BE ),
8989                 rec( 30, 2, ArchivedTime, BE ),
8990                 rec( 32, 56, Reserved56 ),
8991                 rec( 88, 1, DirHandle ),
8992                 rec( 89, 1, SearchAttributes ),
8993                 rec( 90, (1, 255), FileName ),
8994         ], info_str=(FileName, "Set Information for File: %s", ", %s"))
8995         pkt.Reply(8)
8996         pkt.CompletionCodes([0x0000, 0x8800, 0x8c00, 0x8e00, 0x9400, 0x9600, 0x9804,
8997                              0x9b03, 0x9c00, 0xa100, 0xa201, 0xfc06, 0xfd00, 0xfe07,
8998                              0xff17])
8999         # 2222/1711, 23/17
9000         pkt = NCP(0x1711, "Get File Server Information", 'fileserver')
9001         pkt.Request(10)
9002         pkt.Reply(136, [
9003                 rec( 8, 48, ServerName ),
9004                 rec( 56, 1, OSMajorVersion ),
9005                 rec( 57, 1, OSMinorVersion ),
9006                 rec( 58, 2, ConnectionsSupportedMax, BE ),
9007                 rec( 60, 2, ConnectionsInUse, BE ),
9008                 rec( 62, 2, VolumesSupportedMax, BE ),
9009                 rec( 64, 1, OSRevision ),
9010                 rec( 65, 1, SFTSupportLevel ),
9011                 rec( 66, 1, TTSLevel ),
9012                 rec( 67, 2, ConnectionsMaxUsed, BE ),
9013                 rec( 69, 1, AccountVersion ),
9014                 rec( 70, 1, VAPVersion ),
9015                 rec( 71, 1, QueueingVersion ),
9016                 rec( 72, 1, PrintServerVersion ),
9017                 rec( 73, 1, VirtualConsoleVersion ),
9018                 rec( 74, 1, SecurityRestrictionVersion ),
9019                 rec( 75, 1, InternetBridgeVersion ),
9020                 rec( 76, 1, MixedModePathFlag ),
9021                 rec( 77, 1, LocalLoginInfoCcode ),
9022                 rec( 78, 2, ProductMajorVersion, BE ),
9023                 rec( 80, 2, ProductMinorVersion, BE ),
9024                 rec( 82, 2, ProductRevisionVersion, BE ),
9025                 rec( 84, 1, OSLanguageID, LE ),
9026                 rec( 85, 51, Reserved51 ),
9027         ])
9028         pkt.CompletionCodes([0x0000, 0x9600])
9029         # 2222/1712, 23/18
9030         pkt = NCP(0x1712, "Get Network Serial Number", 'fileserver')
9031         pkt.Request(10)
9032         pkt.Reply(14, [
9033                 rec( 8, 4, ServerSerialNumber ),
9034                 rec( 12, 2, ApplicationNumber ),
9035         ])
9036         pkt.CompletionCodes([0x0000, 0x9600])
9037         # 2222/1713, 23/19
9038         pkt = NCP(0x1713, "Get Internet Address", 'fileserver')
9039         pkt.Request(11, [
9040                 rec( 10, 1, TargetConnectionNumber ),
9041         ],info_str=(TargetConnectionNumber, "Get Internet Address for Connection %d", ", %d"))
9042         pkt.Reply(20, [
9043                 rec( 8, 4, NetworkAddress, BE ),
9044                 rec( 12, 6, NetworkNodeAddress ),
9045                 rec( 18, 2, NetworkSocket, BE ),
9046         ])
9047         pkt.CompletionCodes([0x0000, 0xff00])
9048         # 2222/1714, 23/20
9049         pkt = NCP(0x1714, "Login Object", 'file')
9050         pkt.Request( (14, 60), [
9051                 rec( 10, 2, ObjectType, BE ),
9052                 rec( 12, (1,16), ClientName ),
9053                 rec( -1, (1,32), Password ),
9054         ], info_str=(UserName, "Login Object: %s", ", %s"))
9055         pkt.Reply(8)
9056         pkt.CompletionCodes([0x0000, 0x9602, 0xc101, 0xc200, 0xc501, 0xd600, 0xd700,
9057                              0xd900, 0xda00, 0xdb00, 0xde00, 0xdf00, 0xe800, 0xec00,
9058                              0xed00, 0xef00, 0xf001, 0xf100, 0xf200, 0xf600, 0xfb00,
9059                              0xfc06, 0xfe07, 0xff00])
9060         # 2222/1715, 23/21
9061         pkt = NCP(0x1715, "Get Object Connection List", 'file')
9062         pkt.Request( (13, 28), [
9063                 rec( 10, 2, ObjectType, BE ),
9064                 rec( 12, (1,16), ObjectName ),
9065         ], info_str=(UserName, "Get Object Connection List: %s", ", %s"))
9066         pkt.Reply( (9, 136), [
9067                 rec( 8, (1, 128), ConnectionNumberList ),
9068         ])
9069         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
9070         # 2222/1716, 23/22
9071         pkt = NCP(0x1716, "Get Station's Logged Info", 'file')
9072         pkt.Request( 11, [
9073                 rec( 10, 1, TargetConnectionNumber ),
9074         ])
9075         pkt.Reply( 70, [
9076                 rec( 8, 4, UserID, BE ),
9077                 rec( 12, 2, ObjectType, BE ),
9078                 rec( 14, 48, ObjectNameLen ),
9079                 rec( 62, 7, LoginTime ),       
9080                 rec( 69, 1, Reserved ),
9081         ])
9082         pkt.CompletionCodes([0x0000, 0x9602, 0xfb0a, 0xfc06, 0xfd00, 0xfe07, 0xff00])
9083         # 2222/1717, 23/23
9084         pkt = NCP(0x1717, "Get Login Key", 'file')
9085         pkt.Request(10)
9086         pkt.Reply( 16, [
9087                 rec( 8, 8, LoginKey ),
9088         ])
9089         pkt.CompletionCodes([0x0000, 0x9602])
9090         # 2222/1718, 23/24
9091         pkt = NCP(0x1718, "Keyed Object Login", 'file')
9092         pkt.Request( (21, 68), [
9093                 rec( 10, 8, LoginKey ),
9094                 rec( 18, 2, ObjectType, BE ),
9095                 rec( 20, (1,48), ObjectName ),
9096         ], info_str=(ObjectName, "Keyed Object Login: %s", ", %s"))
9097         pkt.Reply(8)
9098         pkt.CompletionCodes([0x0000, 0x9602, 0xc101, 0xc200, 0xc500, 0xd900, 0xda00,
9099                              0xdb00, 0xdc00, 0xde00, 0xff00])
9100         # 2222/171A, 23/26
9101         #
9102         # XXX - for NCP-over-IP, the NetworkAddress field appears to be
9103         # an IP address, rather than an IPX network address, and should
9104         # be dissected as an FT_IPv4 value; the NetworkNodeAddress and
9105         # NetworkSocket are 0.
9106         #
9107         # For NCP-over-IPX, it should probably be dissected as an
9108         # FT_IPXNET value.
9109         #
9110         pkt = NCP(0x171A, "Get Internet Address", 'fileserver')
9111         pkt.Request(11, [
9112                 rec( 10, 1, TargetConnectionNumber ),
9113         ])
9114         pkt.Reply(21, [
9115                 rec( 8, 4, NetworkAddress, BE ),
9116                 rec( 12, 6, NetworkNodeAddress ),
9117                 rec( 18, 2, NetworkSocket, BE ),
9118                 rec( 20, 1, ConnectionType ),
9119         ])
9120         pkt.CompletionCodes([0x0000])
9121         # 2222/171B, 23/27
9122         pkt = NCP(0x171B, "Get Object Connection List", 'file')
9123         pkt.Request( (17,64), [
9124                 rec( 10, 4, SearchConnNumber ),
9125                 rec( 14, 2, ObjectType, BE ),
9126                 rec( 16, (1,48), ObjectName ),
9127         ], info_str=(ObjectName, "Get Object Connection List: %s", ", %s"))
9128         pkt.Reply( (10,137), [
9129                 rec( 8, 1, ConnListLen, var="x" ),
9130                 rec( 9, (1,128), ConnectionNumberList, repeat="x" ),
9131         ])
9132         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
9133         # 2222/171C, 23/28
9134         pkt = NCP(0x171C, "Get Station's Logged Info", 'file')
9135         pkt.Request( 14, [
9136                 rec( 10, 4, TargetConnectionNumber ),
9137         ])
9138         pkt.Reply( 70, [
9139                 rec( 8, 4, UserID, BE ),
9140                 rec( 12, 2, ObjectType, BE ),
9141                 rec( 14, 48, ObjectNameLen ),
9142                 rec( 62, 7, LoginTime ),
9143                 rec( 69, 1, Reserved ),
9144         ])
9145         pkt.CompletionCodes([0x0000, 0x9602, 0xfb02, 0xfc06, 0xfd00, 0xfe07, 0xff00])
9146         # 2222/171D, 23/29
9147         pkt = NCP(0x171D, "Change Connection State", 'file')
9148         pkt.Request( 11, [
9149                 rec( 10, 1, RequestCode ),
9150         ])
9151         pkt.Reply(8)
9152         pkt.CompletionCodes([0x0000, 0x0109, 0x7a00, 0x7b00, 0x7c00, 0xe000, 0xfb06, 0xfd00])
9153         # 2222/171E, 23/30
9154         pkt = NCP(0x171E, "Set Watchdog Delay Interval", 'file')
9155         pkt.Request( 14, [
9156                 rec( 10, 4, NumberOfMinutesToDelay ),
9157         ])
9158         pkt.Reply(8)
9159         pkt.CompletionCodes([0x0000, 0x0107])
9160         # 2222/171F, 23/31
9161         pkt = NCP(0x171F, "Get Connection List From Object", 'file')
9162         pkt.Request( 18, [
9163                 rec( 10, 4, ObjectID, BE ),
9164                 rec( 14, 4, ConnectionNumber ),
9165         ])
9166         pkt.Reply( (9, 136), [
9167                 rec( 8, (1, 128), ConnectionNumberList ),
9168         ])
9169         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
9170         # 2222/1720, 23/32
9171         pkt = NCP(0x1720, "Scan Bindery Object (List)", 'bindery')
9172         pkt.Request((23,70), [
9173                 rec( 10, 4, NextObjectID, BE ),
9174                 rec( 14, 4, ObjectType, BE ),
9175                 rec( 18, 4, InfoFlags ),
9176                 rec( 22, (1,48), ObjectName ),
9177         ], info_str=(ObjectName, "Scan Bindery Object: %s", ", %s"))
9178         pkt.Reply(NO_LENGTH_CHECK, [
9179                 rec( 8, 4, ObjectInfoReturnCount ),
9180                 rec( 12, 4, NextObjectID, BE ),
9181                 rec( 16, 4, ObjectIDInfo ),
9182                 srec(ObjectTypeStruct, req_cond="ncp.info_flags_type == TRUE"),
9183                 srec(ObjectSecurityStruct, req_cond="ncp.info_flags_security == TRUE"),
9184                 srec(ObjectFlagsStruct, req_cond="ncp.info_flags_flags == TRUE"),
9185                 srec(ObjectNameStruct, req_cond="ncp.info_flags_name == TRUE"),
9186         ])
9187         pkt.ReqCondSizeVariable()
9188         pkt.CompletionCodes([0x0000, 0x9600, 0xef01, 0xfc02, 0xfe01, 0xff00])
9189         # 2222/1721, 23/33
9190         pkt = NCP(0x1721, "Generate GUIDs", 'nds')
9191         pkt.Request( 14, [
9192                 rec( 10, 4, ReturnInfoCount ),
9193         ])
9194         pkt.Reply(28, [
9195                 rec( 8, 4, ReturnInfoCount, var="x" ),
9196                 rec( 12, 16, GUID, repeat="x" ),
9197         ])
9198         pkt.CompletionCodes([0x0000])
9199         # 2222/1732, 23/50
9200         pkt = NCP(0x1732, "Create Bindery Object", 'bindery')
9201         pkt.Request( (15,62), [
9202                 rec( 10, 1, ObjectFlags ),
9203                 rec( 11, 1, ObjectSecurity ),
9204                 rec( 12, 2, ObjectType, BE ),
9205                 rec( 14, (1,48), ObjectName ),
9206         ], info_str=(ObjectName, "Create Bindery Object: %s", ", %s"))
9207         pkt.Reply(8)
9208         pkt.CompletionCodes([0x0000, 0x9600, 0xe700, 0xee00, 0xef00, 0xf101, 0xf501,
9209                              0xfc06, 0xfe07, 0xff00])
9210         # 2222/1733, 23/51
9211         pkt = NCP(0x1733, "Delete Bindery Object", 'bindery')
9212         pkt.Request( (13,60), [
9213                 rec( 10, 2, ObjectType, BE ),
9214                 rec( 12, (1,48), ObjectName ),
9215         ], info_str=(ObjectName, "Delete Bindery Object: %s", ", %s"))
9216         pkt.Reply(8)
9217         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf200, 0xf400, 0xf600, 0xfb00,
9218                              0xfc06, 0xfe07, 0xff00])
9219         # 2222/1734, 23/52
9220         pkt = NCP(0x1734, "Rename Bindery Object", 'bindery')
9221         pkt.Request( (14,108), [
9222                 rec( 10, 2, ObjectType, BE ),
9223                 rec( 12, (1,48), ObjectName ),
9224                 rec( -1, (1,48), NewObjectName ),
9225         ], info_str=(ObjectName, "Rename Bindery Object: %s", ", %s"))
9226         pkt.Reply(8)
9227         pkt.CompletionCodes([0x0000, 0x9600, 0xee00, 0xf000, 0xf300, 0xfc06, 0xfe07, 0xff00])
9228         # 2222/1735, 23/53
9229         pkt = NCP(0x1735, "Get Bindery Object ID", 'bindery')
9230         pkt.Request((13,60), [
9231                 rec( 10, 2, ObjectType, BE ),
9232                 rec( 12, (1,48), ObjectName ),
9233         ], info_str=(ObjectName, "Get Bindery Object: %s", ", %s"))
9234         pkt.Reply(62, [
9235                 rec( 8, 4, ObjectID, BE ),
9236                 rec( 12, 2, ObjectType, BE ),
9237                 rec( 14, 48, ObjectNameLen ),
9238         ])
9239         pkt.CompletionCodes([0x0000, 0x9600, 0xef01, 0xf000, 0xfc02, 0xfe01, 0xff00])
9240         # 2222/1736, 23/54
9241         pkt = NCP(0x1736, "Get Bindery Object Name", 'bindery')
9242         pkt.Request( 14, [
9243                 rec( 10, 4, ObjectID, BE ),
9244         ])
9245         pkt.Reply( 62, [
9246                 rec( 8, 4, ObjectID, BE ),
9247                 rec( 12, 2, ObjectType, BE ),
9248                 rec( 14, 48, ObjectNameLen ),
9249         ])
9250         pkt.CompletionCodes([0x0000, 0x9600, 0xf101, 0xfc02, 0xfe01, 0xff00])
9251         # 2222/1737, 23/55
9252         pkt = NCP(0x1737, "Scan Bindery Object", 'bindery')
9253         pkt.Request((17,64), [
9254                 rec( 10, 4, ObjectID, BE ),
9255                 rec( 14, 2, ObjectType, BE ),
9256                 rec( 16, (1,48), ObjectName ),
9257         ], info_str=(ObjectName, "Scan Bindery Object: %s", ", %s"))
9258         pkt.Reply(65, [
9259                 rec( 8, 4, ObjectID, BE ),
9260                 rec( 12, 2, ObjectType, BE ),
9261                 rec( 14, 48, ObjectNameLen ),
9262                 rec( 62, 1, ObjectFlags ),
9263                 rec( 63, 1, ObjectSecurity ),
9264                 rec( 64, 1, ObjectHasProperties ),
9265         ])
9266         pkt.CompletionCodes([0x0000, 0x9600, 0xef01, 0xfc02,
9267                              0xfe01, 0xff00])
9268         # 2222/1738, 23/56
9269         pkt = NCP(0x1738, "Change Bindery Object Security", 'bindery')
9270         pkt.Request((14,61), [
9271                 rec( 10, 1, ObjectSecurity ),
9272                 rec( 11, 2, ObjectType, BE ),
9273                 rec( 13, (1,48), ObjectName ),
9274         ], info_str=(ObjectName, "Change Bindery Object Security: %s", ", %s"))
9275         pkt.Reply(8)
9276         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf501, 0xfc02, 0xfe01, 0xff00])
9277         # 2222/1739, 23/57
9278         pkt = NCP(0x1739, "Create Property", 'bindery')
9279         pkt.Request((16,78), [
9280                 rec( 10, 2, ObjectType, BE ),
9281                 rec( 12, (1,48), ObjectName ),
9282                 rec( -1, 1, PropertyType ),
9283                 rec( -1, 1, ObjectSecurity ),
9284                 rec( -1, (1,16), PropertyName ),
9285         ], info_str=(PropertyName, "Create Property: %s", ", %s"))
9286         pkt.Reply(8)
9287         pkt.CompletionCodes([0x0000, 0x9600, 0xed00, 0xef00, 0xf000, 0xf101,
9288                              0xf200, 0xf600, 0xf700, 0xfb00, 0xfc02, 0xfe01,
9289                              0xff00])
9290         # 2222/173A, 23/58
9291         pkt = NCP(0x173A, "Delete Property", 'bindery')
9292         pkt.Request((14,76), [
9293                 rec( 10, 2, ObjectType, BE ),
9294                 rec( 12, (1,48), ObjectName ),
9295                 rec( -1, (1,16), PropertyName ),
9296         ], info_str=(PropertyName, "Delete Property: %s", ", %s"))
9297         pkt.Reply(8)
9298         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf600, 0xfb00, 0xfc02,
9299                              0xfe01, 0xff00])
9300         # 2222/173B, 23/59
9301         pkt = NCP(0x173B, "Change Property Security", 'bindery')
9302         pkt.Request((15,77), [
9303                 rec( 10, 2, ObjectType, BE ),
9304                 rec( 12, (1,48), ObjectName ),
9305                 rec( -1, 1, ObjectSecurity ),
9306                 rec( -1, (1,16), PropertyName ),
9307         ], info_str=(PropertyName, "Change Property Security: %s", ", %s"))
9308         pkt.Reply(8)
9309         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf200, 0xf600, 0xfb00,
9310                              0xfc02, 0xfe01, 0xff00])
9311         # 2222/173C, 23/60
9312         pkt = NCP(0x173C, "Scan Property", 'bindery')
9313         pkt.Request((18,80), [
9314                 rec( 10, 2, ObjectType, BE ),
9315                 rec( 12, (1,48), ObjectName ),
9316                 rec( -1, 4, LastInstance, BE ),
9317                 rec( -1, (1,16), PropertyName ),
9318         ], info_str=(PropertyName, "Scan Property: %s", ", %s"))
9319         pkt.Reply( 32, [
9320                 rec( 8, 16, PropertyName16 ),
9321                 rec( 24, 1, ObjectFlags ),
9322                 rec( 25, 1, ObjectSecurity ),
9323                 rec( 26, 4, SearchInstance, BE ),
9324                 rec( 30, 1, ValueAvailable ),
9325                 rec( 31, 1, MoreProperties ),
9326         ])
9327         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf200, 0xf600, 0xfb00,
9328                              0xfc02, 0xfe01, 0xff00])
9329         # 2222/173D, 23/61
9330         pkt = NCP(0x173D, "Read Property Value", 'bindery')
9331         pkt.Request((15,77), [
9332                 rec( 10, 2, ObjectType, BE ),
9333                 rec( 12, (1,48), ObjectName ),
9334                 rec( -1, 1, PropertySegment ),
9335                 rec( -1, (1,16), PropertyName ),
9336         ], info_str=(PropertyName, "Read Property Value: %s", ", %s"))
9337         pkt.Reply(138, [
9338                 rec( 8, 128, PropertyData ),
9339                 rec( 136, 1, PropertyHasMoreSegments ),
9340                 rec( 137, 1, PropertyType ),
9341         ])
9342         pkt.CompletionCodes([0x0000, 0x8800, 0x9300, 0x9600, 0xec01,
9343                              0xf000, 0xf100, 0xf900, 0xfb02, 0xfc02,
9344                              0xfe01, 0xff00])
9345         # 2222/173E, 23/62
9346         pkt = NCP(0x173E, "Write Property Value", 'bindery')
9347         pkt.Request((144,206), [
9348                 rec( 10, 2, ObjectType, BE ),
9349                 rec( 12, (1,48), ObjectName ),
9350                 rec( -1, 1, PropertySegment ),
9351                 rec( -1, 1, MoreFlag ),
9352                 rec( -1, (1,16), PropertyName ),
9353                 #
9354                 # XXX - don't show this if MoreFlag isn't set?
9355                 # In at least some packages where it's not set,
9356                 # PropertyValue appears to be garbage.
9357                 #
9358                 rec( -1, 128, PropertyValue ),
9359         ], info_str=(PropertyName, "Write Property Value: %s", ", %s"))
9360         pkt.Reply(8)
9361         pkt.CompletionCodes([0x0000, 0x9600, 0xe800, 0xec01, 0xf000, 0xf800,
9362                              0xfb02, 0xfc03, 0xfe01, 0xff00 ])
9363         # 2222/173F, 23/63
9364         pkt = NCP(0x173F, "Verify Bindery Object Password", 'bindery')
9365         pkt.Request((14,92), [
9366                 rec( 10, 2, ObjectType, BE ),
9367                 rec( 12, (1,48), ObjectName ),
9368                 rec( -1, (1,32), Password ),
9369         ], info_str=(ObjectName, "Verify Bindery Object Password: %s", ", %s"))
9370         pkt.Reply(8)
9371         pkt.CompletionCodes([0x0000, 0x9600, 0xe800, 0xec01, 0xf000, 0xf101,
9372                              0xfb02, 0xfc03, 0xfe01, 0xff00 ])
9373         # 2222/1740, 23/64
9374         pkt = NCP(0x1740, "Change Bindery Object Password", 'bindery')
9375         pkt.Request((15,124), [
9376                 rec( 10, 2, ObjectType, BE ),
9377                 rec( 12, (1,48), ObjectName ),
9378                 rec( -1, (1,32), Password ),
9379                 rec( -1, (1,32), NewPassword ),
9380         ], info_str=(ObjectName, "Change Bindery Object Password: %s", ", %s"))
9381         pkt.Reply(8)
9382         pkt.CompletionCodes([0x0000, 0x9600, 0xc501, 0xd701, 0xe800, 0xec01, 0xf001,
9383                              0xf100, 0xf800, 0xfb02, 0xfc03, 0xfe01, 0xff00])
9384         # 2222/1741, 23/65
9385         pkt = NCP(0x1741, "Add Bindery Object To Set", 'bindery')
9386         pkt.Request((17,126), [
9387                 rec( 10, 2, ObjectType, BE ),
9388                 rec( 12, (1,48), ObjectName ),
9389                 rec( -1, (1,16), PropertyName ),
9390                 rec( -1, 2, MemberType, BE ),
9391                 rec( -1, (1,48), MemberName ),
9392         ], info_str=(MemberName, "Add Bindery Object to Set: %s", ", %s"))
9393         pkt.Reply(8)
9394         pkt.CompletionCodes([0x0000, 0x9600, 0xe800, 0xe900, 0xea00, 0xeb00,
9395                              0xec01, 0xf000, 0xf800, 0xfb02, 0xfc03, 0xfe01,
9396                              0xff00])
9397         # 2222/1742, 23/66
9398         pkt = NCP(0x1742, "Delete Bindery Object From Set", 'bindery')
9399         pkt.Request((17,126), [
9400                 rec( 10, 2, ObjectType, BE ),
9401                 rec( 12, (1,48), ObjectName ),
9402                 rec( -1, (1,16), PropertyName ),
9403                 rec( -1, 2, MemberType, BE ),
9404                 rec( -1, (1,48), MemberName ),
9405         ], info_str=(MemberName, "Delete Bindery Object from Set: %s", ", %s"))
9406         pkt.Reply(8)
9407         pkt.CompletionCodes([0x0000, 0x9600, 0xeb00, 0xf000, 0xf800, 0xfb02,
9408                              0xfc03, 0xfe01, 0xff00])
9409         # 2222/1743, 23/67
9410         pkt = NCP(0x1743, "Is Bindery Object In Set", 'bindery')
9411         pkt.Request((17,126), [
9412                 rec( 10, 2, ObjectType, BE ),
9413                 rec( 12, (1,48), ObjectName ),
9414                 rec( -1, (1,16), PropertyName ),
9415                 rec( -1, 2, MemberType, BE ),
9416                 rec( -1, (1,48), MemberName ),
9417         ], info_str=(MemberName, "Is Bindery Object in Set: %s", ", %s"))
9418         pkt.Reply(8)
9419         pkt.CompletionCodes([0x0000, 0x9600, 0xea00, 0xeb00, 0xec01, 0xf000,
9420                              0xfb02, 0xfc03, 0xfe01, 0xff00])
9421         # 2222/1744, 23/68
9422         pkt = NCP(0x1744, "Close Bindery", 'bindery')
9423         pkt.Request(10)
9424         pkt.Reply(8)
9425         pkt.CompletionCodes([0x0000, 0xff00])
9426         # 2222/1745, 23/69
9427         pkt = NCP(0x1745, "Open Bindery", 'bindery')
9428         pkt.Request(10)
9429         pkt.Reply(8)
9430         pkt.CompletionCodes([0x0000, 0xff00])
9431         # 2222/1746, 23/70
9432         pkt = NCP(0x1746, "Get Bindery Access Level", 'bindery')
9433         pkt.Request(10)
9434         pkt.Reply(13, [
9435                 rec( 8, 1, ObjectSecurity ),
9436                 rec( 9, 4, LoggedObjectID, BE ),
9437         ])
9438         pkt.CompletionCodes([0x0000, 0x9600])
9439         # 2222/1747, 23/71
9440         pkt = NCP(0x1747, "Scan Bindery Object Trustee Paths", 'bindery')
9441         pkt.Request(17, [
9442                 rec( 10, 1, VolumeNumber ),
9443                 rec( 11, 2, LastSequenceNumber, BE ),
9444                 rec( 13, 4, ObjectID, BE ),
9445         ])
9446         pkt.Reply((16,270), [
9447                 rec( 8, 2, LastSequenceNumber, BE),
9448                 rec( 10, 4, ObjectID, BE ),
9449                 rec( 14, 1, ObjectSecurity ),
9450                 rec( 15, (1,255), Path ),
9451         ])
9452         pkt.CompletionCodes([0x0000, 0x9300, 0x9600, 0xa100, 0xf000, 0xf100,
9453                              0xf200, 0xfc02, 0xfe01, 0xff00])
9454         # 2222/1748, 23/72
9455         pkt = NCP(0x1748, "Get Bindery Object Access Level", 'bindery')
9456         pkt.Request(14, [
9457                 rec( 10, 4, ObjectID, BE ),
9458         ])
9459         pkt.Reply(9, [
9460                 rec( 8, 1, ObjectSecurity ),
9461         ])
9462         pkt.CompletionCodes([0x0000, 0x9600])
9463         # 2222/1749, 23/73
9464         pkt = NCP(0x1749, "Is Calling Station a Manager", 'bindery')
9465         pkt.Request(10)
9466         pkt.Reply(8)
9467         pkt.CompletionCodes([0x0003, 0xff1e])
9468         # 2222/174A, 23/74
9469         pkt = NCP(0x174A, "Keyed Verify Password", 'bindery')
9470         pkt.Request((21,68), [
9471                 rec( 10, 8, LoginKey ),
9472                 rec( 18, 2, ObjectType, BE ),
9473                 rec( 20, (1,48), ObjectName ),
9474         ], info_str=(ObjectName, "Keyed Verify Password: %s", ", %s"))
9475         pkt.Reply(8)
9476         pkt.CompletionCodes([0x0000, 0xc500, 0xfe01, 0xff0c])
9477         # 2222/174B, 23/75
9478         pkt = NCP(0x174B, "Keyed Change Password", 'bindery')
9479         pkt.Request((22,100), [
9480                 rec( 10, 8, LoginKey ),
9481                 rec( 18, 2, ObjectType, BE ),
9482                 rec( 20, (1,48), ObjectName ),
9483                 rec( -1, (1,32), Password ),
9484         ], info_str=(ObjectName, "Keyed Change Password: %s", ", %s"))
9485         pkt.Reply(8)
9486         pkt.CompletionCodes([0x0000, 0xc500, 0xfe01, 0xff0c])
9487         # 2222/174C, 23/76
9488         pkt = NCP(0x174C, "List Relations Of an Object", 'bindery')
9489         pkt.Request((18,80), [
9490                 rec( 10, 4, LastSeen, BE ),
9491                 rec( 14, 2, ObjectType, BE ),
9492                 rec( 16, (1,48), ObjectName ),
9493                 rec( -1, (1,16), PropertyName ),
9494         ], info_str=(ObjectName, "List Relations of an Object: %s", ", %s"))
9495         pkt.Reply(14, [
9496                 rec( 8, 2, RelationsCount, BE, var="x" ),
9497                 rec( 10, 4, ObjectID, BE, repeat="x" ),
9498         ])
9499         pkt.CompletionCodes([0x0000, 0xf000, 0xf200, 0xfe01, 0xff00])
9500         # 2222/1764, 23/100
9501         pkt = NCP(0x1764, "Create Queue", 'qms')
9502         pkt.Request((15,316), [
9503                 rec( 10, 2, QueueType, BE ),
9504                 rec( 12, (1,48), QueueName ),
9505                 rec( -1, 1, PathBase ),
9506                 rec( -1, (1,255), Path ),
9507         ], info_str=(QueueName, "Create Queue: %s", ", %s"))
9508         pkt.Reply(12, [
9509                 rec( 8, 4, QueueID ),
9510         ])
9511         pkt.CompletionCodes([0x0000, 0x9600, 0x9900, 0xd000, 0xd100,
9512                              0xd200, 0xd300, 0xd400, 0xd500, 0xd601,
9513                              0xd703, 0xd800, 0xd902, 0xda01, 0xdb02,
9514                              0xee00, 0xff00])
9515         # 2222/1765, 23/101
9516         pkt = NCP(0x1765, "Destroy Queue", 'qms')
9517         pkt.Request(14, [
9518                 rec( 10, 4, QueueID ),
9519         ])
9520         pkt.Reply(8)
9521         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9522                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9523                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9524         # 2222/1766, 23/102
9525         pkt = NCP(0x1766, "Read Queue Current Status", 'qms')
9526         pkt.Request(14, [
9527                 rec( 10, 4, QueueID ),
9528         ])
9529         pkt.Reply(20, [
9530                 rec( 8, 4, QueueID ),
9531                 rec( 12, 1, QueueStatus ),
9532                 rec( 13, 1, CurrentEntries ),
9533                 rec( 14, 1, CurrentServers, var="x" ),
9534                 rec( 15, 4, ServerIDList, repeat="x" ),
9535                 rec( 19, 1, ServerStationList, repeat="x" ),
9536         ])
9537         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9538                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9539                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9540         # 2222/1767, 23/103
9541         pkt = NCP(0x1767, "Set Queue Current Status", 'qms')
9542         pkt.Request(15, [
9543                 rec( 10, 4, QueueID ),
9544                 rec( 14, 1, QueueStatus ),
9545         ])
9546         pkt.Reply(8)
9547         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9548                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9549                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07,
9550                              0xff00])
9551         # 2222/1768, 23/104
9552         pkt = NCP(0x1768, "Create Queue Job And File", 'qms')
9553         pkt.Request(264, [
9554                 rec( 10, 4, QueueID ),
9555                 rec( 14, 250, JobStruct ),
9556         ])
9557         pkt.Reply(62, [
9558                 rec( 8, 1, ClientStation ),
9559                 rec( 9, 1, ClientTaskNumber ),
9560                 rec( 10, 4, ClientIDNumber, BE ),
9561                 rec( 14, 4, TargetServerIDNumber, BE ),
9562                 rec( 18, 6, TargetExecutionTime ),
9563                 rec( 24, 6, JobEntryTime ),
9564                 rec( 30, 2, JobNumber, BE ),
9565                 rec( 32, 2, JobType, BE ),
9566                 rec( 34, 1, JobPosition ),
9567                 rec( 35, 1, JobControlFlags ),
9568                 rec( 36, 14, JobFileName ),
9569                 rec( 50, 6, JobFileHandle ),
9570                 rec( 56, 1, ServerStation ),
9571                 rec( 57, 1, ServerTaskNumber ),
9572                 rec( 58, 4, ServerID, BE ),
9573         ])              
9574         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9575                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9576                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07,
9577                              0xff00])
9578         # 2222/1769, 23/105
9579         pkt = NCP(0x1769, "Close File And Start Queue Job", 'qms')
9580         pkt.Request(16, [
9581                 rec( 10, 4, QueueID ),
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, 0xff00])
9588         # 2222/176A, 23/106
9589         pkt = NCP(0x176A, "Remove Job From Queue", 'qms')
9590         pkt.Request(16, [
9591                 rec( 10, 4, QueueID ),
9592                 rec( 14, 2, JobNumber, BE ),
9593         ])
9594         pkt.Reply(8)
9595         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9596                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9597                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9598         # 2222/176B, 23/107
9599         pkt = NCP(0x176B, "Get Queue Job List", 'qms')
9600         pkt.Request(14, [
9601                 rec( 10, 4, QueueID ),
9602         ])
9603         pkt.Reply(12, [
9604                 rec( 8, 2, JobCount, BE, var="x" ),
9605                 rec( 10, 2, JobNumber, BE, repeat="x" ),
9606         ])
9607         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9608                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9609                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9610         # 2222/176C, 23/108
9611         pkt = NCP(0x176C, "Read Queue Job Entry", 'qms')
9612         pkt.Request(16, [
9613                 rec( 10, 4, QueueID ),
9614                 rec( 14, 2, JobNumber, BE ),
9615         ])
9616         pkt.Reply(258, [
9617             rec( 8, 250, JobStruct ),
9618         ])              
9619         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9620                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9621                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9622         # 2222/176D, 23/109
9623         pkt = NCP(0x176D, "Change Queue Job Entry", 'qms')
9624         pkt.Request(260, [
9625             rec( 14, 250, JobStruct ),
9626         ])
9627         pkt.Reply(8)            
9628         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9629                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9630                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9631         # 2222/176E, 23/110
9632         pkt = NCP(0x176E, "Change Queue Job Position", 'qms')
9633         pkt.Request(17, [
9634                 rec( 10, 4, QueueID ),
9635                 rec( 14, 2, JobNumber, BE ),
9636                 rec( 16, 1, NewPosition ),
9637         ])
9638         pkt.Reply(8)
9639         pkt.CompletionCodes([0x0000, 0x9600, 0xd000, 0xd100, 0xd500,
9640                              0xd601, 0xfe07, 0xff1f])
9641         # 2222/176F, 23/111
9642         pkt = NCP(0x176F, "Attach Queue Server To Queue", 'qms')
9643         pkt.Request(14, [
9644                 rec( 10, 4, QueueID ),
9645         ])
9646         pkt.Reply(8)
9647         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9648                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9649                              0xd800, 0xd902, 0xda01, 0xdb02, 0xea00,
9650                              0xfc06, 0xff00])
9651         # 2222/1770, 23/112
9652         pkt = NCP(0x1770, "Detach Queue Server From Queue", 'qms')
9653         pkt.Request(14, [
9654                 rec( 10, 4, QueueID ),
9655         ])
9656         pkt.Reply(8)
9657         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9658                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9659                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9660         # 2222/1771, 23/113
9661         pkt = NCP(0x1771, "Service Queue Job", 'qms')
9662         pkt.Request(16, [
9663                 rec( 10, 4, QueueID ),
9664                 rec( 14, 2, ServiceType, BE ),
9665         ])
9666         pkt.Reply(62, [
9667                 rec( 8, 1, ClientStation ),
9668                 rec( 9, 1, ClientTaskNumber ),
9669                 rec( 10, 4, ClientIDNumber, BE ),
9670                 rec( 14, 4, TargetServerIDNumber, BE ),
9671                 rec( 18, 6, TargetExecutionTime ),
9672                 rec( 24, 6, JobEntryTime ),
9673                 rec( 30, 2, JobNumber, BE ),
9674                 rec( 32, 2, JobType, BE ),
9675                 rec( 34, 1, JobPosition ),
9676                 rec( 35, 1, JobControlFlags ),
9677                 rec( 36, 14, JobFileName ),
9678                 rec( 50, 6, JobFileHandle ),
9679                 rec( 56, 1, ServerStation ),
9680                 rec( 57, 1, ServerTaskNumber ),
9681                 rec( 58, 4, ServerID, BE ),
9682         ])              
9683         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9684                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9685                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9686         # 2222/1772, 23/114
9687         pkt = NCP(0x1772, "Finish Servicing Queue Job", 'qms')
9688         pkt.Request(20, [
9689                 rec( 10, 4, QueueID ),
9690                 rec( 14, 2, JobNumber, BE ),
9691                 rec( 16, 4, ChargeInformation, BE ),
9692         ])
9693         pkt.Reply(8)            
9694         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9695                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9696                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9697         # 2222/1773, 23/115
9698         pkt = NCP(0x1773, "Abort Servicing Queue Job", 'qms')
9699         pkt.Request(16, [
9700                 rec( 10, 4, QueueID ),
9701                 rec( 14, 2, JobNumber, BE ),
9702         ])
9703         pkt.Reply(8)            
9704         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9705                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9706                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9707         # 2222/1774, 23/116
9708         pkt = NCP(0x1774, "Change To Client Rights", 'qms')
9709         pkt.Request(16, [
9710                 rec( 10, 4, QueueID ),
9711                 rec( 14, 2, JobNumber, BE ),
9712         ])
9713         pkt.Reply(8)            
9714         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9715                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9716                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9717         # 2222/1775, 23/117
9718         pkt = NCP(0x1775, "Restore Queue Server Rights", 'qms')
9719         pkt.Request(10)
9720         pkt.Reply(8)            
9721         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9722                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9723                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9724         # 2222/1776, 23/118
9725         pkt = NCP(0x1776, "Read Queue Server Current Status", 'qms')
9726         pkt.Request(19, [
9727                 rec( 10, 4, QueueID ),
9728                 rec( 14, 4, ServerID, BE ),
9729                 rec( 18, 1, ServerStation ),
9730         ])
9731         pkt.Reply(72, [
9732                 rec( 8, 64, ServerStatusRecord ),
9733         ])
9734         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9735                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9736                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9737         # 2222/1777, 23/119
9738         pkt = NCP(0x1777, "Set Queue Server Current Status", 'qms')
9739         pkt.Request(78, [
9740                 rec( 10, 4, QueueID ),
9741                 rec( 14, 64, ServerStatusRecord ),
9742         ])
9743         pkt.Reply(8)
9744         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9745                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9746                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9747         # 2222/1778, 23/120
9748         pkt = NCP(0x1778, "Get Queue Job File Size", 'qms')
9749         pkt.Request(16, [
9750                 rec( 10, 4, QueueID ),
9751                 rec( 14, 2, JobNumber, BE ),
9752         ])
9753         pkt.Reply(20, [
9754                 rec( 8, 4, QueueID ),
9755                 rec( 12, 4, JobNumberLong ),
9756                 rec( 16, 4, FileSize, BE ),
9757         ])
9758         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9759                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9760                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9761         # 2222/1779, 23/121
9762         pkt = NCP(0x1779, "Create Queue Job And File", 'qms')
9763         pkt.Request(264, [
9764                 rec( 10, 4, QueueID ),
9765                 rec( 14, 250, JobStruct ),
9766         ])
9767         pkt.Reply(94, [
9768                 rec( 8, 86, JobStructNew ),
9769         ])              
9770         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9771                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9772                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9773         # 2222/177A, 23/122
9774         pkt = NCP(0x177A, "Read Queue Job Entry", 'qms')
9775         pkt.Request(18, [
9776                 rec( 10, 4, QueueID ),
9777                 rec( 14, 4, JobNumberLong ),
9778         ])
9779         pkt.Reply(258, [
9780             rec( 8, 250, JobStruct ),
9781         ])              
9782         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9783                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9784                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9785         # 2222/177B, 23/123
9786         pkt = NCP(0x177B, "Change Queue Job Entry", 'qms')
9787         pkt.Request(264, [
9788                 rec( 10, 4, QueueID ),
9789                 rec( 14, 250, JobStruct ),
9790         ])
9791         pkt.Reply(8)            
9792         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9793                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9794                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07, 0xff00])
9795         # 2222/177C, 23/124
9796         pkt = NCP(0x177C, "Service Queue Job", 'qms')
9797         pkt.Request(16, [
9798                 rec( 10, 4, QueueID ),
9799                 rec( 14, 2, ServiceType ),
9800         ])
9801         pkt.Reply(94, [
9802             rec( 8, 86, JobStructNew ),
9803         ])              
9804         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9805                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9806                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9807         # 2222/177D, 23/125
9808         pkt = NCP(0x177D, "Read Queue Current Status", 'qms')
9809         pkt.Request(14, [
9810                 rec( 10, 4, QueueID ),
9811         ])
9812         pkt.Reply(32, [
9813                 rec( 8, 4, QueueID ),
9814                 rec( 12, 1, QueueStatus ),
9815                 rec( 13, 3, Reserved3 ),
9816                 rec( 16, 4, CurrentEntries ),
9817                 rec( 20, 4, CurrentServers, var="x" ),
9818                 rec( 24, 4, ServerIDList, repeat="x" ),
9819                 rec( 28, 4, ServerStationList, repeat="x" ),
9820         ])
9821         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9822                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9823                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9824         # 2222/177E, 23/126
9825         pkt = NCP(0x177E, "Set Queue Current Status", 'qms')
9826         pkt.Request(15, [
9827                 rec( 10, 4, QueueID ),
9828                 rec( 14, 1, QueueStatus ),
9829         ])
9830         pkt.Reply(8)
9831         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9832                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9833                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9834         # 2222/177F, 23/127
9835         pkt = NCP(0x177F, "Close File And Start Queue Job", 'qms')
9836         pkt.Request(18, [
9837                 rec( 10, 4, QueueID ),
9838                 rec( 14, 4, JobNumberLong ),
9839         ])
9840         pkt.Reply(8)
9841         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9842                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9843                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9844         # 2222/1780, 23/128
9845         pkt = NCP(0x1780, "Remove Job From Queue", 'qms')
9846         pkt.Request(18, [
9847                 rec( 10, 4, QueueID ),
9848                 rec( 14, 4, JobNumberLong ),
9849         ])
9850         pkt.Reply(8)
9851         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9852                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9853                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9854         # 2222/1781, 23/129
9855         pkt = NCP(0x1781, "Get Queue Job List", 'qms')
9856         pkt.Request(18, [
9857                 rec( 10, 4, QueueID ),
9858                 rec( 14, 4, JobNumberLong ),
9859         ])
9860         pkt.Reply(20, [
9861                 rec( 8, 4, TotalQueueJobs ),
9862                 rec( 12, 4, ReplyQueueJobNumbers, var="x" ),
9863                 rec( 16, 4, JobNumberList, repeat="x" ),
9864         ])
9865         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9866                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9867                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9868         # 2222/1782, 23/130
9869         pkt = NCP(0x1782, "Change Job Priority", 'qms')
9870         pkt.Request(22, [
9871                 rec( 10, 4, QueueID ),
9872                 rec( 14, 4, JobNumberLong ),
9873                 rec( 18, 4, Priority ),
9874         ])
9875         pkt.Reply(8)
9876         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9877                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9878                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9879         # 2222/1783, 23/131
9880         pkt = NCP(0x1783, "Finish Servicing Queue Job", 'qms')
9881         pkt.Request(22, [
9882                 rec( 10, 4, QueueID ),
9883                 rec( 14, 4, JobNumberLong ),
9884                 rec( 18, 4, ChargeInformation ),
9885         ])
9886         pkt.Reply(8)            
9887         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9888                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9889                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9890         # 2222/1784, 23/132
9891         pkt = NCP(0x1784, "Abort Servicing Queue Job", 'qms')
9892         pkt.Request(18, [
9893                 rec( 10, 4, QueueID ),
9894                 rec( 14, 4, JobNumberLong ),
9895         ])
9896         pkt.Reply(8)            
9897         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9898                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9899                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9900         # 2222/1785, 23/133
9901         pkt = NCP(0x1785, "Change To Client Rights", 'qms')
9902         pkt.Request(18, [
9903                 rec( 10, 4, QueueID ),
9904                 rec( 14, 4, JobNumberLong ),
9905         ])
9906         pkt.Reply(8)            
9907         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9908                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9909                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9910         # 2222/1786, 23/134
9911         pkt = NCP(0x1786, "Read Queue Server Current Status", 'qms')
9912         pkt.Request(22, [
9913                 rec( 10, 4, QueueID ),
9914                 rec( 14, 4, ServerID, BE ),
9915                 rec( 18, 4, ServerStation ),
9916         ])
9917         pkt.Reply(72, [
9918                 rec( 8, 64, ServerStatusRecord ),
9919         ])
9920         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9921                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9922                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9923         # 2222/1787, 23/135
9924         pkt = NCP(0x1787, "Get Queue Job File Size", 'qms')
9925         pkt.Request(18, [
9926                 rec( 10, 4, QueueID ),
9927                 rec( 14, 4, JobNumberLong ),
9928         ])
9929         pkt.Reply(20, [
9930                 rec( 8, 4, QueueID ),
9931                 rec( 12, 4, JobNumberLong ),
9932                 rec( 16, 4, FileSize, BE ),
9933         ])
9934         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9935                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9936                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9937         # 2222/1788, 23/136
9938         pkt = NCP(0x1788, "Move Queue Job From Src Q to Dst Q", 'qms')
9939         pkt.Request(22, [
9940                 rec( 10, 4, QueueID ),
9941                 rec( 14, 4, JobNumberLong ),
9942                 rec( 18, 4, DstQueueID ),
9943         ])
9944         pkt.Reply(12, [
9945                 rec( 8, 4, JobNumberLong ),
9946         ])
9947         pkt.CompletionCodes([0x0000, 0x7e01, 0xfc06])
9948         # 2222/1789, 23/137
9949         pkt = NCP(0x1789, "Get Queue Jobs From Form List", 'qms')
9950         pkt.Request(24, [
9951                 rec( 10, 4, QueueID ),
9952                 rec( 14, 4, QueueStartPosition ),
9953                 rec( 18, 4, FormTypeCnt, var="x" ),
9954                 rec( 22, 2, FormType, repeat="x" ),
9955         ])
9956         pkt.Reply(20, [
9957                 rec( 8, 4, TotalQueueJobs ),
9958                 rec( 12, 4, JobCount, var="x" ),
9959                 rec( 16, 4, JobNumberList, repeat="x" ),
9960         ])
9961         pkt.CompletionCodes([0x0000, 0x7e01, 0xfc06])
9962         # 2222/178A, 23/138
9963         pkt = NCP(0x178A, "Service Queue Job By Form List", 'qms')
9964         pkt.Request(24, [
9965                 rec( 10, 4, QueueID ),
9966                 rec( 14, 4, QueueStartPosition ),
9967                 rec( 18, 4, FormTypeCnt, var= "x" ),
9968                 rec( 22, 2, FormType, repeat="x" ),
9969         ])
9970         pkt.Reply(94, [
9971            rec( 8, 86, JobStructNew ),
9972         ])              
9973         pkt.CompletionCodes([0x0000, 0x7e01, 0xfc06])
9974         # 2222/1796, 23/150
9975         pkt = NCP(0x1796, "Get Current Account Status", 'accounting')
9976         pkt.Request((13,60), [
9977                 rec( 10, 2, ObjectType, BE ),
9978                 rec( 12, (1,48), ObjectName ),
9979         ], info_str=(ObjectName, "Get Current Account Status: %s", ", %s"))
9980         pkt.Reply(264, [
9981                 rec( 8, 4, AccountBalance, BE ),
9982                 rec( 12, 4, CreditLimit, BE ),
9983                 rec( 16, 120, Reserved120 ),
9984                 rec( 136, 4, HolderID, BE ),
9985                 rec( 140, 4, HoldAmount, BE ),
9986                 rec( 144, 4, HolderID, BE ),
9987                 rec( 148, 4, HoldAmount, BE ),
9988                 rec( 152, 4, HolderID, BE ),
9989                 rec( 156, 4, HoldAmount, BE ),
9990                 rec( 160, 4, HolderID, BE ),
9991                 rec( 164, 4, HoldAmount, BE ),
9992                 rec( 168, 4, HolderID, BE ),
9993                 rec( 172, 4, HoldAmount, BE ),
9994                 rec( 176, 4, HolderID, BE ),
9995                 rec( 180, 4, HoldAmount, BE ),
9996                 rec( 184, 4, HolderID, BE ),
9997                 rec( 188, 4, HoldAmount, BE ),
9998                 rec( 192, 4, HolderID, BE ),
9999                 rec( 196, 4, HoldAmount, BE ),
10000                 rec( 200, 4, HolderID, BE ),
10001                 rec( 204, 4, HoldAmount, BE ),
10002                 rec( 208, 4, HolderID, BE ),
10003                 rec( 212, 4, HoldAmount, BE ),
10004                 rec( 216, 4, HolderID, BE ),
10005                 rec( 220, 4, HoldAmount, BE ),
10006                 rec( 224, 4, HolderID, BE ),
10007                 rec( 228, 4, HoldAmount, BE ),
10008                 rec( 232, 4, HolderID, BE ),
10009                 rec( 236, 4, HoldAmount, BE ),
10010                 rec( 240, 4, HolderID, BE ),
10011                 rec( 244, 4, HoldAmount, BE ),
10012                 rec( 248, 4, HolderID, BE ),
10013                 rec( 252, 4, HoldAmount, BE ),
10014                 rec( 256, 4, HolderID, BE ),
10015                 rec( 260, 4, HoldAmount, BE ),
10016         ])              
10017         pkt.CompletionCodes([0x0000, 0x9600, 0xc000, 0xc101, 0xc400, 0xe800,
10018                              0xea00, 0xeb00, 0xec00, 0xfc06, 0xfe07, 0xff00])
10019         # 2222/1797, 23/151
10020         pkt = NCP(0x1797, "Submit Account Charge", 'accounting')
10021         pkt.Request((26,327), [
10022                 rec( 10, 2, ServiceType, BE ),
10023                 rec( 12, 4, ChargeAmount, BE ),
10024                 rec( 16, 4, HoldCancelAmount, BE ),
10025                 rec( 20, 2, ObjectType, BE ),
10026                 rec( 22, 2, CommentType, BE ),
10027                 rec( 24, (1,48), ObjectName ),
10028                 rec( -1, (1,255), Comment ),
10029         ], info_str=(ObjectName, "Submit Account Charge: %s", ", %s"))
10030         pkt.Reply(8)            
10031         pkt.CompletionCodes([0x0000, 0x0102, 0x8800, 0x9400, 0x9600, 0xa201,
10032                              0xc000, 0xc101, 0xc200, 0xc400, 0xe800, 0xea00,
10033                              0xeb00, 0xec00, 0xfe07, 0xff00])
10034         # 2222/1798, 23/152
10035         pkt = NCP(0x1798, "Submit Account Hold", 'accounting')
10036         pkt.Request((17,64), [
10037                 rec( 10, 4, HoldCancelAmount, BE ),
10038                 rec( 14, 2, ObjectType, BE ),
10039                 rec( 16, (1,48), ObjectName ),
10040         ], info_str=(ObjectName, "Submit Account Hold: %s", ", %s"))
10041         pkt.Reply(8)            
10042         pkt.CompletionCodes([0x0000, 0x0102, 0x8800, 0x9400, 0x9600, 0xa201,
10043                              0xc000, 0xc101, 0xc200, 0xc400, 0xe800, 0xea00,
10044                              0xeb00, 0xec00, 0xfe07, 0xff00])
10045         # 2222/1799, 23/153
10046         pkt = NCP(0x1799, "Submit Account Note", 'accounting')
10047         pkt.Request((18,319), [
10048                 rec( 10, 2, ServiceType, BE ),
10049                 rec( 12, 2, ObjectType, BE ),
10050                 rec( 14, 2, CommentType, BE ),
10051                 rec( 16, (1,48), ObjectName ),
10052                 rec( -1, (1,255), Comment ),
10053         ], info_str=(ObjectName, "Submit Account Note: %s", ", %s"))
10054         pkt.Reply(8)            
10055         pkt.CompletionCodes([0x0000, 0x0102, 0x9600, 0xc000, 0xc101, 0xc400,
10056                              0xe800, 0xea00, 0xeb00, 0xec00, 0xf000, 0xfc06,
10057                              0xff00])
10058         # 2222/17c8, 23/200
10059         pkt = NCP(0x17c8, "Check Console Privileges", 'stats')
10060         pkt.Request(10)
10061         pkt.Reply(8)            
10062         pkt.CompletionCodes([0x0000, 0xc601])
10063         # 2222/17c9, 23/201
10064         pkt = NCP(0x17c9, "Get File Server Description Strings", 'stats')
10065         pkt.Request(10)
10066         pkt.Reply(520, [
10067                 rec( 8, 512, DescriptionStrings ),
10068         ])
10069         pkt.CompletionCodes([0x0000, 0x9600])
10070         # 2222/17CA, 23/202
10071         pkt = NCP(0x17CA, "Set File Server Date And Time", 'stats')
10072         pkt.Request(16, [
10073                 rec( 10, 1, Year ),
10074                 rec( 11, 1, Month ),
10075                 rec( 12, 1, Day ),
10076                 rec( 13, 1, Hour ),
10077                 rec( 14, 1, Minute ),
10078                 rec( 15, 1, Second ),
10079         ])
10080         pkt.Reply(8)
10081         pkt.CompletionCodes([0x0000, 0xc601])
10082         # 2222/17CB, 23/203
10083         pkt = NCP(0x17CB, "Disable File Server Login", 'stats')
10084         pkt.Request(10)
10085         pkt.Reply(8)
10086         pkt.CompletionCodes([0x0000, 0xc601])
10087         # 2222/17CC, 23/204
10088         pkt = NCP(0x17CC, "Enable File Server Login", 'stats')
10089         pkt.Request(10)
10090         pkt.Reply(8)
10091         pkt.CompletionCodes([0x0000, 0xc601])
10092         # 2222/17CD, 23/205
10093         pkt = NCP(0x17CD, "Get File Server Login Status", 'stats')
10094         pkt.Request(10)
10095         pkt.Reply(12, [
10096                 rec( 8, 4, UserLoginAllowed ),
10097         ])
10098         pkt.CompletionCodes([0x0000, 0x9600, 0xfb01])
10099         # 2222/17CF, 23/207
10100         pkt = NCP(0x17CF, "Disable Transaction Tracking", 'stats')
10101         pkt.Request(10)
10102         pkt.Reply(8)
10103         pkt.CompletionCodes([0x0000, 0xc601])
10104         # 2222/17D0, 23/208
10105         pkt = NCP(0x17D0, "Enable Transaction Tracking", 'stats')
10106         pkt.Request(10)
10107         pkt.Reply(8)
10108         pkt.CompletionCodes([0x0000, 0xc601])
10109         # 2222/17D1, 23/209
10110         pkt = NCP(0x17D1, "Send Console Broadcast", 'stats')
10111         pkt.Request((13,267), [
10112                 rec( 10, 1, NumberOfStations, var="x" ),
10113                 rec( 11, 1, StationList, repeat="x" ),
10114                 rec( 12, (1, 255), TargetMessage ),
10115         ], info_str=(TargetMessage, "Send Console Broadcast: %s", ", %s"))
10116         pkt.Reply(8)
10117         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10118         # 2222/17D2, 23/210
10119         pkt = NCP(0x17D2, "Clear Connection Number", 'stats')
10120         pkt.Request(11, [
10121                 rec( 10, 1, ConnectionNumber ),
10122         ],info_str=(ConnectionNumber, "Clear Connection Number %d", ", %d"))
10123         pkt.Reply(8)
10124         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10125         # 2222/17D3, 23/211
10126         pkt = NCP(0x17D3, "Down File Server", 'stats')
10127         pkt.Request(11, [
10128                 rec( 10, 1, ForceFlag ),
10129         ])
10130         pkt.Reply(8)
10131         pkt.CompletionCodes([0x0000, 0xc601, 0xff00])
10132         # 2222/17D4, 23/212
10133         pkt = NCP(0x17D4, "Get File System Statistics", 'stats')
10134         pkt.Request(10)
10135         pkt.Reply(50, [
10136                 rec( 8, 4, SystemIntervalMarker, BE ),
10137                 rec( 12, 2, ConfiguredMaxOpenFiles ),
10138                 rec( 14, 2, ActualMaxOpenFiles ),
10139                 rec( 16, 2, CurrentOpenFiles ),
10140                 rec( 18, 4, TotalFilesOpened ),
10141                 rec( 22, 4, TotalReadRequests ),
10142                 rec( 26, 4, TotalWriteRequests ),
10143                 rec( 30, 2, CurrentChangedFATs ),
10144                 rec( 32, 4, TotalChangedFATs ),
10145                 rec( 36, 2, FATWriteErrors ),
10146                 rec( 38, 2, FatalFATWriteErrors ),
10147                 rec( 40, 2, FATScanErrors ),
10148                 rec( 42, 2, ActualMaxIndexedFiles ),
10149                 rec( 44, 2, ActiveIndexedFiles ),
10150                 rec( 46, 2, AttachedIndexedFiles ),
10151                 rec( 48, 2, AvailableIndexedFiles ),
10152         ])
10153         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10154         # 2222/17D5, 23/213
10155         pkt = NCP(0x17D5, "Get Transaction Tracking Statistics", 'stats')
10156         pkt.Request((13,267), [
10157                 rec( 10, 2, LastRecordSeen ),
10158                 rec( 12, (1,255), SemaphoreName ),
10159         ])
10160         pkt.Reply(53, [
10161                 rec( 8, 4, SystemIntervalMarker, BE ),
10162                 rec( 12, 1, TransactionTrackingSupported ),
10163                 rec( 13, 1, TransactionTrackingEnabled ),
10164                 rec( 14, 2, TransactionVolumeNumber ),
10165                 rec( 16, 2, ConfiguredMaxSimultaneousTransactions ),
10166                 rec( 18, 2, ActualMaxSimultaneousTransactions ),
10167                 rec( 20, 2, CurrentTransactionCount ),
10168                 rec( 22, 4, TotalTransactionsPerformed ),
10169                 rec( 26, 4, TotalWriteTransactionsPerformed ),
10170                 rec( 30, 4, TotalTransactionsBackedOut ),
10171                 rec( 34, 2, TotalUnfilledBackoutRequests ),
10172                 rec( 36, 2, TransactionDiskSpace ),
10173                 rec( 38, 4, TransactionFATAllocations ),
10174                 rec( 42, 4, TransactionFileSizeChanges ),
10175                 rec( 46, 4, TransactionFilesTruncated ),
10176                 rec( 50, 1, NumberOfEntries, var="x" ),
10177                 rec( 51, 2, ConnTaskStruct, repeat="x" ),
10178         ])
10179         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10180         # 2222/17D6, 23/214
10181         pkt = NCP(0x17D6, "Read Disk Cache Statistics", 'stats')
10182         pkt.Request(10)
10183         pkt.Reply(86, [
10184                 rec( 8, 4, SystemIntervalMarker, BE ),
10185                 rec( 12, 2, CacheBufferCount ),
10186                 rec( 14, 2, CacheBufferSize ),
10187                 rec( 16, 2, DirtyCacheBuffers ),
10188                 rec( 18, 4, CacheReadRequests ),
10189                 rec( 22, 4, CacheWriteRequests ),
10190                 rec( 26, 4, CacheHits ),
10191                 rec( 30, 4, CacheMisses ),
10192                 rec( 34, 4, PhysicalReadRequests ),
10193                 rec( 38, 4, PhysicalWriteRequests ),
10194                 rec( 42, 2, PhysicalReadErrors ),
10195                 rec( 44, 2, PhysicalWriteErrors ),
10196                 rec( 46, 4, CacheGetRequests ),
10197                 rec( 50, 4, CacheFullWriteRequests ),
10198                 rec( 54, 4, CachePartialWriteRequests ),
10199                 rec( 58, 4, BackgroundDirtyWrites ),
10200                 rec( 62, 4, BackgroundAgedWrites ),
10201                 rec( 66, 4, TotalCacheWrites ),
10202                 rec( 70, 4, CacheAllocations ),
10203                 rec( 74, 2, ThrashingCount ),
10204                 rec( 76, 2, LRUBlockWasDirty ),
10205                 rec( 78, 2, ReadBeyondWrite ),
10206                 rec( 80, 2, FragmentWriteOccurred ),
10207                 rec( 82, 2, CacheHitOnUnavailableBlock ),
10208                 rec( 84, 2, CacheBlockScrapped ),
10209         ])
10210         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10211         # 2222/17D7, 23/215
10212         pkt = NCP(0x17D7, "Get Drive Mapping Table", 'stats')
10213         pkt.Request(10)
10214         pkt.Reply(184, [
10215                 rec( 8, 4, SystemIntervalMarker, BE ),
10216                 rec( 12, 1, SFTSupportLevel ),
10217                 rec( 13, 1, LogicalDriveCount ),
10218                 rec( 14, 1, PhysicalDriveCount ),
10219                 rec( 15, 1, DiskChannelTable ),
10220                 rec( 16, 4, Reserved4 ),
10221                 rec( 20, 2, PendingIOCommands, BE ),
10222                 rec( 22, 32, DriveMappingTable ),
10223                 rec( 54, 32, DriveMirrorTable ),
10224                 rec( 86, 32, DeadMirrorTable ),
10225                 rec( 118, 1, ReMirrorDriveNumber ),
10226                 rec( 119, 1, Filler ),
10227                 rec( 120, 4, ReMirrorCurrentOffset, BE ),
10228                 rec( 124, 60, SFTErrorTable ),
10229         ])
10230         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10231         # 2222/17D8, 23/216
10232         pkt = NCP(0x17D8, "Read Physical Disk Statistics", 'stats')
10233         pkt.Request(11, [
10234                 rec( 10, 1, PhysicalDiskNumber ),
10235         ])
10236         pkt.Reply(101, [
10237                 rec( 8, 4, SystemIntervalMarker, BE ),
10238                 rec( 12, 1, PhysicalDiskChannel ),
10239                 rec( 13, 1, DriveRemovableFlag ),
10240                 rec( 14, 1, PhysicalDriveType ),
10241                 rec( 15, 1, ControllerDriveNumber ),
10242                 rec( 16, 1, ControllerNumber ),
10243                 rec( 17, 1, ControllerType ),
10244                 rec( 18, 4, DriveSize ),
10245                 rec( 22, 2, DriveCylinders ),
10246                 rec( 24, 1, DriveHeads ),
10247                 rec( 25, 1, SectorsPerTrack ),
10248                 rec( 26, 64, DriveDefinitionString ),
10249                 rec( 90, 2, IOErrorCount ),
10250                 rec( 92, 4, HotFixTableStart ),
10251                 rec( 96, 2, HotFixTableSize ),
10252                 rec( 98, 2, HotFixBlocksAvailable ),
10253                 rec( 100, 1, HotFixDisabled ),
10254         ])
10255         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10256         # 2222/17D9, 23/217
10257         pkt = NCP(0x17D9, "Get Disk Channel Statistics", 'stats')
10258         pkt.Request(11, [
10259                 rec( 10, 1, DiskChannelNumber ),
10260         ])
10261         pkt.Reply(192, [
10262                 rec( 8, 4, SystemIntervalMarker, BE ),
10263                 rec( 12, 2, ChannelState, BE ),
10264                 rec( 14, 2, ChannelSynchronizationState, BE ),
10265                 rec( 16, 1, SoftwareDriverType ),
10266                 rec( 17, 1, SoftwareMajorVersionNumber ),
10267                 rec( 18, 1, SoftwareMinorVersionNumber ),
10268                 rec( 19, 65, SoftwareDescription ),
10269                 rec( 84, 8, IOAddressesUsed ),
10270                 rec( 92, 10, SharedMemoryAddresses ),
10271                 rec( 102, 4, InterruptNumbersUsed ),
10272                 rec( 106, 4, DMAChannelsUsed ),
10273                 rec( 110, 1, FlagBits ),
10274                 rec( 111, 1, Reserved ),
10275                 rec( 112, 80, ConfigurationDescription ),
10276         ])
10277         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10278         # 2222/17DB, 23/219
10279         pkt = NCP(0x17DB, "Get Connection's Open Files", 'file')
10280         pkt.Request(14, [
10281                 rec( 10, 2, ConnectionNumber ),
10282                 rec( 12, 2, LastRecordSeen, BE ),
10283         ])
10284         pkt.Reply(32, [
10285                 rec( 8, 2, NextRequestRecord ),
10286                 rec( 10, 1, NumberOfRecords, var="x" ),
10287                 rec( 11, 21, ConnStruct, repeat="x" ),
10288         ])
10289         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10290         # 2222/17DC, 23/220
10291         pkt = NCP(0x17DC, "Get Connection Using A File", 'file')
10292         pkt.Request((14,268), [
10293                 rec( 10, 2, LastRecordSeen, BE ),
10294                 rec( 12, 1, DirHandle ),
10295                 rec( 13, (1,255), Path ),
10296         ], info_str=(Path, "Get Connection Using File: %s", ", %s"))
10297         pkt.Reply(30, [
10298                 rec( 8, 2, UseCount, BE ),
10299                 rec( 10, 2, OpenCount, BE ),
10300                 rec( 12, 2, OpenForReadCount, BE ),
10301                 rec( 14, 2, OpenForWriteCount, BE ),
10302                 rec( 16, 2, DenyReadCount, BE ),
10303                 rec( 18, 2, DenyWriteCount, BE ),
10304                 rec( 20, 2, NextRequestRecord, BE ),
10305                 rec( 22, 1, Locked ),
10306                 rec( 23, 1, NumberOfRecords, var="x" ),
10307                 rec( 24, 6, ConnFileStruct, repeat="x" ),
10308         ])
10309         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10310         # 2222/17DD, 23/221
10311         pkt = NCP(0x17DD, "Get Physical Record Locks By Connection And File", 'file')
10312         pkt.Request(31, [
10313                 rec( 10, 2, TargetConnectionNumber ),
10314                 rec( 12, 2, LastRecordSeen, BE ),
10315                 rec( 14, 1, VolumeNumber ),
10316                 rec( 15, 2, DirectoryID ),
10317                 rec( 17, 14, FileName14 ),
10318         ], info_str=(FileName14, "Get Physical Record Locks by Connection and File: %s", ", %s"))
10319         pkt.Reply(22, [
10320                 rec( 8, 2, NextRequestRecord ),
10321                 rec( 10, 1, NumberOfLocks, var="x" ),
10322                 rec( 11, 1, Reserved ),
10323                 rec( 12, 10, LockStruct, repeat="x" ),
10324         ])
10325         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10326         # 2222/17DE, 23/222
10327         pkt = NCP(0x17DE, "Get Physical Record Locks By File", 'file')
10328         pkt.Request((14,268), [
10329                 rec( 10, 2, TargetConnectionNumber ),
10330                 rec( 12, 1, DirHandle ),
10331                 rec( 13, (1,255), Path ),
10332         ], info_str=(Path, "Get Physical Record Locks by File: %s", ", %s"))
10333         pkt.Reply(28, [
10334                 rec( 8, 2, NextRequestRecord ),
10335                 rec( 10, 1, NumberOfLocks, var="x" ),
10336                 rec( 11, 1, Reserved ),
10337                 rec( 12, 16, PhyLockStruct, repeat="x" ),
10338         ])
10339         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10340         # 2222/17DF, 23/223
10341         pkt = NCP(0x17DF, "Get Logical Records By Connection", 'file')
10342         pkt.Request(14, [
10343                 rec( 10, 2, TargetConnectionNumber ),
10344                 rec( 12, 2, LastRecordSeen, BE ),
10345         ])
10346         pkt.Reply((14,268), [
10347                 rec( 8, 2, NextRequestRecord ),
10348                 rec( 10, 1, NumberOfRecords, var="x" ),
10349                 rec( 11, (3, 257), LogLockStruct, repeat="x" ),
10350         ])
10351         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10352         # 2222/17E0, 23/224
10353         pkt = NCP(0x17E0, "Get Logical Record Information", 'file')
10354         pkt.Request((13,267), [
10355                 rec( 10, 2, LastRecordSeen ),
10356                 rec( 12, (1,255), LogicalRecordName ),
10357         ], info_str=(LogicalRecordName, "Get Logical Record Information: %s", ", %s"))
10358         pkt.Reply(20, [
10359                 rec( 8, 2, UseCount, BE ),
10360                 rec( 10, 2, ShareableLockCount, BE ),
10361                 rec( 12, 2, NextRequestRecord ),
10362                 rec( 14, 1, Locked ),
10363                 rec( 15, 1, NumberOfRecords, var="x" ),
10364                 rec( 16, 4, LogRecStruct, repeat="x" ),
10365         ])
10366         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10367         # 2222/17E1, 23/225
10368         pkt = NCP(0x17E1, "Get Connection's Semaphores", 'file')
10369         pkt.Request(14, [
10370                 rec( 10, 2, ConnectionNumber ),
10371                 rec( 12, 2, LastRecordSeen ),
10372         ])
10373         pkt.Reply((18,272), [
10374                 rec( 8, 2, NextRequestRecord ),
10375                 rec( 10, 2, NumberOfSemaphores, var="x" ),
10376                 rec( 12, (6,260), SemaStruct, repeat="x" ),
10377         ])
10378         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10379         # 2222/17E2, 23/226
10380         pkt = NCP(0x17E2, "Get Semaphore Information", 'file')
10381         pkt.Request((13,267), [
10382                 rec( 10, 2, LastRecordSeen ),
10383                 rec( 12, (1,255), SemaphoreName ),
10384         ], info_str=(SemaphoreName, "Get Semaphore Information: %s", ", %s"))
10385         pkt.Reply(17, [
10386                 rec( 8, 2, NextRequestRecord, BE ),
10387                 rec( 10, 2, OpenCount, BE ),
10388                 rec( 12, 1, SemaphoreValue ),
10389                 rec( 13, 1, NumberOfRecords, var="x" ),
10390                 rec( 14, 3, SemaInfoStruct, repeat="x" ),
10391         ])
10392         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10393         # 2222/17E3, 23/227
10394         pkt = NCP(0x17E3, "Get LAN Driver Configuration Information", 'stats')
10395         pkt.Request(11, [
10396                 rec( 10, 1, LANDriverNumber ),
10397         ])
10398         pkt.Reply(180, [
10399                 rec( 8, 4, NetworkAddress, BE ),
10400                 rec( 12, 6, HostAddress ),
10401                 rec( 18, 1, BoardInstalled ),
10402                 rec( 19, 1, OptionNumber ),
10403                 rec( 20, 160, ConfigurationText ),
10404         ])
10405         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10406         # 2222/17E5, 23/229
10407         pkt = NCP(0x17E5, "Get Connection Usage Statistics", 'stats')
10408         pkt.Request(12, [
10409                 rec( 10, 2, ConnectionNumber ),
10410         ])
10411         pkt.Reply(26, [
10412                 rec( 8, 2, NextRequestRecord ),
10413                 rec( 10, 6, BytesRead ),
10414                 rec( 16, 6, BytesWritten ),
10415                 rec( 22, 4, TotalRequestPackets ),
10416          ])
10417         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10418         # 2222/17E6, 23/230
10419         pkt = NCP(0x17E6, "Get Object's Remaining Disk Space", 'stats')
10420         pkt.Request(14, [
10421                 rec( 10, 4, ObjectID, BE ),
10422         ])
10423         pkt.Reply(21, [
10424                 rec( 8, 4, SystemIntervalMarker, BE ),
10425                 rec( 12, 4, ObjectID ),
10426                 rec( 16, 4, UnusedDiskBlocks, BE ),
10427                 rec( 20, 1, RestrictionsEnforced ),
10428          ])
10429         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])  
10430         # 2222/17E7, 23/231
10431         pkt = NCP(0x17E7, "Get File Server LAN I/O Statistics", 'stats')
10432         pkt.Request(10)
10433         pkt.Reply(74, [
10434                 rec( 8, 4, SystemIntervalMarker, BE ),
10435                 rec( 12, 2, ConfiguredMaxRoutingBuffers ),
10436                 rec( 14, 2, ActualMaxUsedRoutingBuffers ),
10437                 rec( 16, 2, CurrentlyUsedRoutingBuffers ),
10438                 rec( 18, 4, TotalFileServicePackets ),
10439                 rec( 22, 2, TurboUsedForFileService ),
10440                 rec( 24, 2, PacketsFromInvalidConnection ),
10441                 rec( 26, 2, BadLogicalConnectionCount ),
10442                 rec( 28, 2, PacketsReceivedDuringProcessing ),
10443                 rec( 30, 2, RequestsReprocessed ),
10444                 rec( 32, 2, PacketsWithBadSequenceNumber ),
10445                 rec( 34, 2, DuplicateRepliesSent ),
10446                 rec( 36, 2, PositiveAcknowledgesSent ),
10447                 rec( 38, 2, PacketsWithBadRequestType ),
10448                 rec( 40, 2, AttachDuringProcessing ),
10449                 rec( 42, 2, AttachWhileProcessingAttach ),
10450                 rec( 44, 2, ForgedDetachedRequests ),
10451                 rec( 46, 2, DetachForBadConnectionNumber ),
10452                 rec( 48, 2, DetachDuringProcessing ),
10453                 rec( 50, 2, RepliesCancelled ),
10454                 rec( 52, 2, PacketsDiscardedByHopCount ),
10455                 rec( 54, 2, PacketsDiscardedUnknownNet ),
10456                 rec( 56, 2, IncomingPacketDiscardedNoDGroup ),
10457                 rec( 58, 2, OutgoingPacketDiscardedNoTurboBuffer ),
10458                 rec( 60, 2, IPXNotMyNetwork ),
10459                 rec( 62, 4, NetBIOSBroadcastWasPropogated ),
10460                 rec( 66, 4, TotalOtherPackets ),
10461                 rec( 70, 4, TotalRoutedPackets ),
10462          ])
10463         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10464         # 2222/17E8, 23/232
10465         pkt = NCP(0x17E8, "Get File Server Misc Information", 'stats')
10466         pkt.Request(10)
10467         pkt.Reply(40, [
10468                 rec( 8, 4, SystemIntervalMarker, BE ),
10469                 rec( 12, 1, ProcessorType ),
10470                 rec( 13, 1, Reserved ),
10471                 rec( 14, 1, NumberOfServiceProcesses ),
10472                 rec( 15, 1, ServerUtilizationPercentage ),
10473                 rec( 16, 2, ConfiguredMaxBinderyObjects ),
10474                 rec( 18, 2, ActualMaxBinderyObjects ),
10475                 rec( 20, 2, CurrentUsedBinderyObjects ),
10476                 rec( 22, 2, TotalServerMemory ),
10477                 rec( 24, 2, WastedServerMemory ),
10478                 rec( 26, 2, NumberOfDynamicMemoryAreas, var="x" ),
10479                 rec( 28, 12, DynMemStruct, repeat="x" ),
10480          ])
10481         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10482         # 2222/17E9, 23/233
10483         pkt = NCP(0x17E9, "Get Volume Information", 'stats')
10484         pkt.Request(11, [
10485                 rec( 10, 1, VolumeNumber ),
10486         ],info_str=(VolumeNumber, "Get Information on Volume %d", ", %d"))
10487         pkt.Reply(48, [
10488                 rec( 8, 4, SystemIntervalMarker, BE ),
10489                 rec( 12, 1, VolumeNumber ),
10490                 rec( 13, 1, LogicalDriveNumber ),
10491                 rec( 14, 2, BlockSize ),
10492                 rec( 16, 2, StartingBlock ),
10493                 rec( 18, 2, TotalBlocks ),
10494                 rec( 20, 2, FreeBlocks ),
10495                 rec( 22, 2, TotalDirectoryEntries ),
10496                 rec( 24, 2, FreeDirectoryEntries ),
10497                 rec( 26, 2, ActualMaxUsedDirectoryEntries ),
10498                 rec( 28, 1, VolumeHashedFlag ),
10499                 rec( 29, 1, VolumeCachedFlag ),
10500                 rec( 30, 1, VolumeRemovableFlag ),
10501                 rec( 31, 1, VolumeMountedFlag ),
10502                 rec( 32, 16, VolumeName ),
10503          ])
10504         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10505         # 2222/17EA, 23/234
10506         pkt = NCP(0x17EA, "Get Connection's Task Information", 'stats')
10507         pkt.Request(12, [
10508                 rec( 10, 2, ConnectionNumber ),
10509         ])
10510         pkt.Reply(18, [
10511                 rec( 8, 2, NextRequestRecord ),
10512                 rec( 10, 4, NumberOfAttributes, var="x" ),
10513                 rec( 14, 4, Attributes, repeat="x" ),
10514          ])
10515         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10516         # 2222/17EB, 23/235
10517         pkt = NCP(0x17EB, "Get Connection's Open Files", 'file')
10518         pkt.Request(14, [
10519                 rec( 10, 2, ConnectionNumber ),
10520                 rec( 12, 2, LastRecordSeen ),
10521         ])
10522         pkt.Reply((29,283), [
10523                 rec( 8, 2, NextRequestRecord ),
10524                 rec( 10, 2, NumberOfRecords, var="x" ),
10525                 rec( 12, (17, 271), OpnFilesStruct, repeat="x" ),
10526         ])
10527         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10528         # 2222/17EC, 23/236
10529         pkt = NCP(0x17EC, "Get Connection Using A File", 'file')
10530         pkt.Request(18, [
10531                 rec( 10, 1, DataStreamNumber ),
10532                 rec( 11, 1, VolumeNumber ),
10533                 rec( 12, 4, DirectoryBase, LE ),
10534                 rec( 16, 2, LastRecordSeen ),
10535         ])
10536         pkt.Reply(33, [
10537                 rec( 8, 2, NextRequestRecord ),
10538                 rec( 10, 2, UseCount ),
10539                 rec( 12, 2, OpenCount ),
10540                 rec( 14, 2, OpenForReadCount ),
10541                 rec( 16, 2, OpenForWriteCount ),
10542                 rec( 18, 2, DenyReadCount ),
10543                 rec( 20, 2, DenyWriteCount ),
10544                 rec( 22, 1, Locked ),
10545                 rec( 23, 1, ForkCount ),
10546                 rec( 24, 2, NumberOfRecords, var="x" ),
10547                 rec( 26, 7, ConnStruct, repeat="x" ),
10548         ])
10549         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10550         # 2222/17ED, 23/237
10551         pkt = NCP(0x17ED, "Get Physical Record Locks By Connection And File", 'file')
10552         pkt.Request(20, [
10553                 rec( 10, 2, TargetConnectionNumber ),
10554                 rec( 12, 1, DataStreamNumber ),
10555                 rec( 13, 1, VolumeNumber ),
10556                 rec( 14, 4, DirectoryBase, LE ),
10557                 rec( 18, 2, LastRecordSeen ),
10558         ])
10559         pkt.Reply(23, [
10560                 rec( 8, 2, NextRequestRecord ),
10561                 rec( 10, 2, NumberOfLocks, var="x" ),
10562                 rec( 12, 11, LockStruct, repeat="x" ),
10563         ])
10564         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10565         # 2222/17EE, 23/238
10566         pkt = NCP(0x17EE, "Get Physical Record Locks By File", 'file')
10567         pkt.Request(18, [
10568                 rec( 10, 1, DataStreamNumber ),
10569                 rec( 11, 1, VolumeNumber ),
10570                 rec( 12, 4, DirectoryBase ),
10571                 rec( 16, 2, LastRecordSeen ),
10572         ])
10573         pkt.Reply(30, [
10574                 rec( 8, 2, NextRequestRecord ),
10575                 rec( 10, 2, NumberOfLocks, var="x" ),
10576                 rec( 12, 18, PhyLockStruct, repeat="x" ),
10577         ])
10578         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10579         # 2222/17EF, 23/239
10580         pkt = NCP(0x17EF, "Get Logical Records By Connection", 'file')
10581         pkt.Request(14, [
10582                 rec( 10, 2, TargetConnectionNumber ),
10583                 rec( 12, 2, LastRecordSeen ),
10584         ])
10585         pkt.Reply((16,270), [
10586                 rec( 8, 2, NextRequestRecord ),
10587                 rec( 10, 2, NumberOfRecords, var="x" ),
10588                 rec( 12, (4, 258), LogLockStruct, repeat="x" ),
10589         ])
10590         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10591         # 2222/17F0, 23/240
10592         pkt = NCP(0x17F0, "Get Logical Record Information (old)", 'file')
10593         pkt.Request((13,267), [
10594                 rec( 10, 2, LastRecordSeen ),
10595                 rec( 12, (1,255), LogicalRecordName ),
10596         ])
10597         pkt.Reply(22, [
10598                 rec( 8, 2, ShareableLockCount ),
10599                 rec( 10, 2, UseCount ),
10600                 rec( 12, 1, Locked ),
10601                 rec( 13, 2, NextRequestRecord ),
10602                 rec( 15, 2, NumberOfRecords, var="x" ),
10603                 rec( 17, 5, LogRecStruct, repeat="x" ),
10604         ])
10605         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10606         # 2222/17F1, 23/241
10607         pkt = NCP(0x17F1, "Get Connection's Semaphores", 'file')
10608         pkt.Request(14, [
10609                 rec( 10, 2, ConnectionNumber ),
10610                 rec( 12, 2, LastRecordSeen ),
10611         ])
10612         pkt.Reply((19,273), [
10613                 rec( 8, 2, NextRequestRecord ),
10614                 rec( 10, 2, NumberOfSemaphores, var="x" ),
10615                 rec( 12, (7, 261), SemaStruct, repeat="x" ),
10616         ])
10617         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10618         # 2222/17F2, 23/242
10619         pkt = NCP(0x17F2, "Get Semaphore Information", 'file')
10620         pkt.Request((13,267), [
10621                 rec( 10, 2, LastRecordSeen ),
10622                 rec( 12, (1,255), SemaphoreName ),
10623         ], info_str=(SemaphoreName, "Get Semaphore Information: %s", ", %s"))
10624         pkt.Reply(20, [
10625                 rec( 8, 2, NextRequestRecord ),
10626                 rec( 10, 2, OpenCount ),
10627                 rec( 12, 2, SemaphoreValue ),
10628                 rec( 14, 2, NumberOfRecords, var="x" ),
10629                 rec( 16, 4, SemaInfoStruct, repeat="x" ),
10630         ])
10631         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10632         # 2222/17F3, 23/243
10633         pkt = NCP(0x17F3, "Map Directory Number to Path", 'file')
10634         pkt.Request(16, [
10635                 rec( 10, 1, VolumeNumber ),
10636                 rec( 11, 4, DirectoryNumber ),
10637                 rec( 15, 1, NameSpace ),
10638         ])
10639         pkt.Reply((9,263), [
10640                 rec( 8, (1,255), Path ),
10641         ])
10642         pkt.CompletionCodes([0x0000, 0x9600, 0x9c00, 0xc601, 0xfd00, 0xff00])
10643         # 2222/17F4, 23/244
10644         pkt = NCP(0x17F4, "Convert Path to Dir Entry", 'file')
10645         pkt.Request((12,266), [
10646                 rec( 10, 1, DirHandle ),
10647                 rec( 11, (1,255), Path ),
10648         ], info_str=(Path, "Convert Path to Directory Entry: %s", ", %s"))
10649         pkt.Reply(13, [
10650                 rec( 8, 1, VolumeNumber ),
10651                 rec( 9, 4, DirectoryNumber ),
10652         ])
10653         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10654         # 2222/17FD, 23/253
10655         pkt = NCP(0x17FD, "Send Console Broadcast", 'stats')
10656         pkt.Request((16, 270), [
10657                 rec( 10, 1, NumberOfStations, var="x" ),
10658                 rec( 11, 4, StationList, repeat="x" ),
10659                 rec( 15, (1, 255), TargetMessage ),
10660         ], info_str=(TargetMessage, "Send Console Broadcast: %s", ", %s"))
10661         pkt.Reply(8)
10662         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10663         # 2222/17FE, 23/254
10664         pkt = NCP(0x17FE, "Clear Connection Number", 'stats')
10665         pkt.Request(14, [
10666                 rec( 10, 4, ConnectionNumber ),
10667         ])
10668         pkt.Reply(8)
10669         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10670         # 2222/18, 24
10671         pkt = NCP(0x18, "End of Job", 'connection')
10672         pkt.Request(7)
10673         pkt.Reply(8)
10674         pkt.CompletionCodes([0x0000])
10675         # 2222/19, 25
10676         pkt = NCP(0x19, "Logout", 'connection')
10677         pkt.Request(7)
10678         pkt.Reply(8)
10679         pkt.CompletionCodes([0x0000])
10680         # 2222/1A, 26
10681         pkt = NCP(0x1A, "Log Physical Record", 'file')
10682         pkt.Request(24, [
10683                 rec( 7, 1, LockFlag ),
10684                 rec( 8, 6, FileHandle ),
10685                 rec( 14, 4, LockAreasStartOffset, BE ),
10686                 rec( 18, 4, LockAreaLen, BE ),
10687                 rec( 22, 2, LockTimeout ),
10688         ])
10689         pkt.Reply(8)
10690         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
10691         # 2222/1B, 27
10692         pkt = NCP(0x1B, "Lock Physical Record Set", 'file')
10693         pkt.Request(10, [
10694                 rec( 7, 1, LockFlag ),
10695                 rec( 8, 2, LockTimeout ),
10696         ])
10697         pkt.Reply(8)
10698         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
10699         # 2222/1C, 28
10700         pkt = NCP(0x1C, "Release Physical Record", 'file')
10701         pkt.Request(22, [
10702                 rec( 7, 1, Reserved ),
10703                 rec( 8, 6, FileHandle ),
10704                 rec( 14, 4, LockAreasStartOffset ),
10705                 rec( 18, 4, LockAreaLen ),
10706         ])
10707         pkt.Reply(8)
10708         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10709         # 2222/1D, 29
10710         pkt = NCP(0x1D, "Release Physical Record Set", 'file')
10711         pkt.Request(8, [
10712                 rec( 7, 1, LockFlag ),
10713         ])
10714         pkt.Reply(8)
10715         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10716         # 2222/1E, 30   #Tested and fixed 6-14-02 GM
10717         pkt = NCP(0x1E, "Clear Physical Record", 'file')
10718         pkt.Request(22, [
10719                 rec( 7, 1, Reserved ),
10720                 rec( 8, 6, FileHandle ),
10721                 rec( 14, 4, LockAreasStartOffset, BE ),
10722                 rec( 18, 4, LockAreaLen, BE ),
10723         ])
10724         pkt.Reply(8)
10725         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10726         # 2222/1F, 31
10727         pkt = NCP(0x1F, "Clear Physical Record Set", 'file')
10728         pkt.Request(8, [
10729                 rec( 7, 1, LockFlag ),
10730         ])
10731         pkt.Reply(8)
10732         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10733         # 2222/2000, 32/00
10734         pkt = NCP(0x2000, "Open Semaphore", 'file', has_length=0)
10735         pkt.Request(10, [
10736                 rec( 8, 1, InitialSemaphoreValue ),
10737                 rec( 9, 1, SemaphoreNameLen ),
10738         ])
10739         pkt.Reply(13, [
10740                   rec( 8, 4, SemaphoreHandle, BE ),
10741                   rec( 12, 1, SemaphoreOpenCount ),
10742         ])
10743         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10744         # 2222/2001, 32/01
10745         pkt = NCP(0x2001, "Examine Semaphore", 'file', has_length=0)
10746         pkt.Request(12, [
10747                 rec( 8, 4, SemaphoreHandle, BE ),
10748         ])
10749         pkt.Reply(10, [
10750                   rec( 8, 1, SemaphoreValue ),
10751                   rec( 9, 1, SemaphoreOpenCount ),
10752         ])
10753         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10754         # 2222/2002, 32/02
10755         pkt = NCP(0x2002, "Wait On Semaphore", 'file', has_length=0)
10756         pkt.Request(14, [
10757                 rec( 8, 4, SemaphoreHandle, BE ),
10758                 rec( 12, 2, SemaphoreTimeOut, BE ), 
10759         ])
10760         pkt.Reply(8)
10761         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10762         # 2222/2003, 32/03
10763         pkt = NCP(0x2003, "Signal Semaphore", 'file', has_length=0)
10764         pkt.Request(12, [
10765                 rec( 8, 4, SemaphoreHandle, BE ),
10766         ])
10767         pkt.Reply(8)
10768         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10769         # 2222/2004, 32/04
10770         pkt = NCP(0x2004, "Close Semaphore", 'file', has_length=0)
10771         pkt.Request(12, [
10772                 rec( 8, 4, SemaphoreHandle, BE ),
10773         ])
10774         pkt.Reply(8)
10775         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10776         # 2222/21, 33
10777         pkt = NCP(0x21, "Negotiate Buffer Size", 'connection')
10778         pkt.Request(9, [
10779                 rec( 7, 2, BufferSize, BE ),
10780         ])
10781         pkt.Reply(10, [
10782                 rec( 8, 2, BufferSize, BE ),
10783         ])
10784         pkt.CompletionCodes([0x0000])
10785         # 2222/2200, 34/00
10786         pkt = NCP(0x2200, "TTS Is Available", 'tts', has_length=0)
10787         pkt.Request(8)
10788         pkt.Reply(8)
10789         pkt.CompletionCodes([0x0001, 0xfd03, 0xff12])
10790         # 2222/2201, 34/01
10791         pkt = NCP(0x2201, "TTS Begin Transaction", 'tts', has_length=0)
10792         pkt.Request(8)
10793         pkt.Reply(8)
10794         pkt.CompletionCodes([0x0000])
10795         # 2222/2202, 34/02
10796         pkt = NCP(0x2202, "TTS End Transaction", 'tts', has_length=0)
10797         pkt.Request(8)
10798         pkt.Reply(12, [
10799                   rec( 8, 4, TransactionNumber, BE ),
10800         ])                
10801         pkt.CompletionCodes([0x0000, 0xff01])
10802         # 2222/2203, 34/03
10803         pkt = NCP(0x2203, "TTS Abort Transaction", 'tts', has_length=0)
10804         pkt.Request(8)
10805         pkt.Reply(8)
10806         pkt.CompletionCodes([0x0000, 0xfd03, 0xfe0b, 0xff01])
10807         # 2222/2204, 34/04
10808         pkt = NCP(0x2204, "TTS Transaction Status", 'tts', has_length=0)
10809         pkt.Request(12, [
10810                   rec( 8, 4, TransactionNumber, BE ),
10811         ])              
10812         pkt.Reply(8)
10813         pkt.CompletionCodes([0x0000])
10814         # 2222/2205, 34/05
10815         pkt = NCP(0x2205, "TTS Get Application Thresholds", 'tts', has_length=0)
10816         pkt.Request(8)          
10817         pkt.Reply(10, [
10818                   rec( 8, 1, LogicalLockThreshold ),
10819                   rec( 9, 1, PhysicalLockThreshold ),
10820         ])
10821         pkt.CompletionCodes([0x0000])
10822         # 2222/2206, 34/06
10823         pkt = NCP(0x2206, "TTS Set Application Thresholds", 'tts', has_length=0)
10824         pkt.Request(10, [               
10825                   rec( 8, 1, LogicalLockThreshold ),
10826                   rec( 9, 1, PhysicalLockThreshold ),
10827         ])
10828         pkt.Reply(8)
10829         pkt.CompletionCodes([0x0000, 0x9600])
10830         # 2222/2207, 34/07
10831         pkt = NCP(0x2207, "TTS Get Workstation Thresholds", 'tts', has_length=0)
10832         pkt.Request(10, [               
10833                   rec( 8, 1, LogicalLockThreshold ),
10834                   rec( 9, 1, PhysicalLockThreshold ),
10835         ])
10836         pkt.Reply(8)
10837         pkt.CompletionCodes([0x0000])
10838         # 2222/2208, 34/08
10839         pkt = NCP(0x2208, "TTS Set Workstation Thresholds", 'tts', has_length=0)
10840         pkt.Request(10, [               
10841                   rec( 8, 1, LogicalLockThreshold ),
10842                   rec( 9, 1, PhysicalLockThreshold ),
10843         ])
10844         pkt.Reply(8)
10845         pkt.CompletionCodes([0x0000])
10846         # 2222/2209, 34/09
10847         pkt = NCP(0x2209, "TTS Get Transaction Bits", 'tts', has_length=0)
10848         pkt.Request(8)
10849         pkt.Reply(9, [
10850                 rec( 8, 1, ControlFlags ),
10851         ])
10852         pkt.CompletionCodes([0x0000])
10853         # 2222/220A, 34/10
10854         pkt = NCP(0x220A, "TTS Set Transaction Bits", 'tts', has_length=0)
10855         pkt.Request(9, [
10856                 rec( 8, 1, ControlFlags ),
10857         ])
10858         pkt.Reply(8)
10859         pkt.CompletionCodes([0x0000])
10860         # 2222/2301, 35/01
10861         pkt = NCP(0x2301, "AFP Create Directory", 'afp')
10862         pkt.Request((49, 303), [
10863                 rec( 10, 1, VolumeNumber ),
10864                 rec( 11, 4, BaseDirectoryID ),
10865                 rec( 15, 1, Reserved ),
10866                 rec( 16, 4, CreatorID ),
10867                 rec( 20, 4, Reserved4 ),
10868                 rec( 24, 2, FinderAttr ),
10869                 rec( 26, 2, HorizLocation ),
10870                 rec( 28, 2, VertLocation ),
10871                 rec( 30, 2, FileDirWindow ),
10872                 rec( 32, 16, Reserved16 ),
10873                 rec( 48, (1,255), Path ),
10874         ], info_str=(Path, "AFP Create Directory: %s", ", %s"))
10875         pkt.Reply(12, [
10876                 rec( 8, 4, NewDirectoryID ),
10877         ])
10878         pkt.CompletionCodes([0x0000, 0x8301, 0x8400, 0x8800, 0x9300, 0x9600, 0x9804,
10879                              0x9900, 0x9c03, 0x9e02, 0xa100, 0xa201, 0xfd00, 0xff18])
10880         # 2222/2302, 35/02
10881         pkt = NCP(0x2302, "AFP Create File", 'afp')
10882         pkt.Request((49, 303), [
10883                 rec( 10, 1, VolumeNumber ),
10884                 rec( 11, 4, BaseDirectoryID ),
10885                 rec( 15, 1, DeleteExistingFileFlag ),
10886                 rec( 16, 4, CreatorID, BE ),
10887                 rec( 20, 4, Reserved4 ),
10888                 rec( 24, 2, FinderAttr ),
10889                 rec( 26, 2, HorizLocation, BE ),
10890                 rec( 28, 2, VertLocation, BE ),
10891                 rec( 30, 2, FileDirWindow, BE ),
10892                 rec( 32, 16, Reserved16 ),
10893                 rec( 48, (1,255), Path ),
10894         ], info_str=(Path, "AFP Create File: %s", ", %s"))
10895         pkt.Reply(12, [
10896                 rec( 8, 4, NewDirectoryID ),
10897         ])
10898         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8301, 0x8400, 0x8701, 0x8800,
10899                              0x8a00, 0x8d00, 0x8e00, 0x8f00, 0x9300, 0x9600, 0x9804,
10900                              0x9900, 0x9b03, 0x9c03, 0x9e02, 0xa100, 0xa201, 0xfd00,
10901                              0xff18])
10902         # 2222/2303, 35/03
10903         pkt = NCP(0x2303, "AFP Delete", 'afp')
10904         pkt.Request((16,270), [
10905                 rec( 10, 1, VolumeNumber ),
10906                 rec( 11, 4, BaseDirectoryID ),
10907                 rec( 15, (1,255), Path ),
10908         ], info_str=(Path, "AFP Delete: %s", ", %s"))
10909         pkt.Reply(8)
10910         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x8a00, 0x8d00, 0x8e00, 0x8f00,
10911                              0x9000, 0x9300, 0x9600, 0x9804, 0x9b03, 0x9c03, 0x9e02,
10912                              0xa000, 0xa100, 0xa201, 0xfd00, 0xff19])
10913         # 2222/2304, 35/04
10914         pkt = NCP(0x2304, "AFP Get Entry ID From Name", 'afp')
10915         pkt.Request((16,270), [
10916                 rec( 10, 1, VolumeNumber ),
10917                 rec( 11, 4, BaseDirectoryID ),
10918                 rec( 15, (1,255), Path ),
10919         ], info_str=(Path, "AFP Get Entry from Name: %s", ", %s"))
10920         pkt.Reply(12, [
10921                 rec( 8, 4, TargetEntryID, BE ),
10922         ])
10923         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804, 0x9c03,
10924                              0xa100, 0xa201, 0xfd00, 0xff19])
10925         # 2222/2305, 35/05
10926         pkt = NCP(0x2305, "AFP Get File Information", 'afp')
10927         pkt.Request((18,272), [
10928                 rec( 10, 1, VolumeNumber ),
10929                 rec( 11, 4, BaseDirectoryID ),
10930                 rec( 15, 2, RequestBitMap, BE ),
10931                 rec( 17, (1,255), Path ),
10932         ], info_str=(Path, "AFP Get File Information: %s", ", %s"))
10933         pkt.Reply(121, [
10934                 rec( 8, 4, AFPEntryID, BE ),
10935                 rec( 12, 4, ParentID, BE ),
10936                 rec( 16, 2, AttributesDef16, LE ),
10937                 rec( 18, 4, DataForkLen, BE ),
10938                 rec( 22, 4, ResourceForkLen, BE ),
10939                 rec( 26, 2, TotalOffspring, BE  ),
10940                 rec( 28, 2, CreationDate, BE ),
10941                 rec( 30, 2, LastAccessedDate, BE ),
10942                 rec( 32, 2, ModifiedDate, BE ),
10943                 rec( 34, 2, ModifiedTime, BE ),
10944                 rec( 36, 2, ArchivedDate, BE ),
10945                 rec( 38, 2, ArchivedTime, BE ),
10946                 rec( 40, 4, CreatorID, BE ),
10947                 rec( 44, 4, Reserved4 ),
10948                 rec( 48, 2, FinderAttr ),
10949                 rec( 50, 2, HorizLocation ),
10950                 rec( 52, 2, VertLocation ),
10951                 rec( 54, 2, FileDirWindow ),
10952                 rec( 56, 16, Reserved16 ),
10953                 rec( 72, 32, LongName ),
10954                 rec( 104, 4, CreatorID, BE ),
10955                 rec( 108, 12, ShortName ),
10956                 rec( 120, 1, AccessPrivileges ),
10957         ])              
10958         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804, 0x9c03,
10959                              0xa100, 0xa201, 0xfd00, 0xff19])
10960         # 2222/2306, 35/06
10961         pkt = NCP(0x2306, "AFP Get Entry ID From NetWare Handle", 'afp')
10962         pkt.Request(16, [
10963                 rec( 10, 6, FileHandle ),
10964         ])
10965         pkt.Reply(14, [
10966                 rec( 8, 1, VolumeID ),
10967                 rec( 9, 4, TargetEntryID, BE ),
10968                 rec( 13, 1, ForkIndicator ),
10969         ])              
10970         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0xa201])
10971         # 2222/2307, 35/07
10972         pkt = NCP(0x2307, "AFP Rename", 'afp')
10973         pkt.Request((21, 529), [
10974                 rec( 10, 1, VolumeNumber ),
10975                 rec( 11, 4, MacSourceBaseID, BE ),
10976                 rec( 15, 4, MacDestinationBaseID, BE ),
10977                 rec( 19, (1,255), Path ),
10978                 rec( -1, (1,255), NewFileNameLen ),
10979         ], info_str=(Path, "AFP Rename: %s", ", %s"))
10980         pkt.Reply(8)            
10981         pkt.CompletionCodes([0x0000, 0x8301, 0x8401, 0x8800, 0x8b00, 0x8e00,
10982                              0x9001, 0x9201, 0x9300, 0x9600, 0x9804, 0x9900,
10983                              0x9c03, 0x9e00, 0xa100, 0xa201, 0xfd00, 0xff0a])
10984         # 2222/2308, 35/08
10985         pkt = NCP(0x2308, "AFP Open File Fork", 'afp')
10986         pkt.Request((18, 272), [
10987                 rec( 10, 1, VolumeNumber ),
10988                 rec( 11, 4, MacBaseDirectoryID ),
10989                 rec( 15, 1, ForkIndicator ),
10990                 rec( 16, 1, AccessMode ),
10991                 rec( 17, (1,255), Path ),
10992         ], info_str=(Path, "AFP Open File Fork: %s", ", %s"))
10993         pkt.Reply(22, [
10994                 rec( 8, 4, AFPEntryID, BE ),
10995                 rec( 12, 4, DataForkLen, BE ),
10996                 rec( 16, 6, NetWareAccessHandle ),
10997         ])
10998         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8301, 0x8800, 0x9300,
10999                              0x9400, 0x9600, 0x9804, 0x9900, 0x9c03, 0xa100,
11000                              0xa201, 0xfd00, 0xff16])
11001         # 2222/2309, 35/09
11002         pkt = NCP(0x2309, "AFP Set File Information", 'afp')
11003         pkt.Request((64, 318), [
11004                 rec( 10, 1, VolumeNumber ),
11005                 rec( 11, 4, MacBaseDirectoryID ),
11006                 rec( 15, 2, RequestBitMap, BE ),
11007                 rec( 17, 2, MacAttr, BE ),
11008                 rec( 19, 2, CreationDate, BE ),
11009                 rec( 21, 2, LastAccessedDate, BE ),
11010                 rec( 23, 2, ModifiedDate, BE ),
11011                 rec( 25, 2, ModifiedTime, BE ),
11012                 rec( 27, 2, ArchivedDate, BE ),
11013                 rec( 29, 2, ArchivedTime, BE ),
11014                 rec( 31, 4, CreatorID, BE ),
11015                 rec( 35, 4, Reserved4 ),
11016                 rec( 39, 2, FinderAttr ),
11017                 rec( 41, 2, HorizLocation ),
11018                 rec( 43, 2, VertLocation ),
11019                 rec( 45, 2, FileDirWindow ),
11020                 rec( 47, 16, Reserved16 ),
11021                 rec( 63, (1,255), Path ),
11022         ], info_str=(Path, "AFP Set File Information: %s", ", %s"))
11023         pkt.Reply(8)            
11024         pkt.CompletionCodes([0x0000, 0x0104, 0x8301, 0x8800, 0x9300, 0x9400,
11025                              0x9500, 0x9600, 0x9804, 0x9c03, 0xa100, 0xa201,
11026                              0xfd00, 0xff16])
11027         # 2222/230A, 35/10
11028         pkt = NCP(0x230A, "AFP Scan File Information", 'afp')
11029         pkt.Request((26, 280), [
11030                 rec( 10, 1, VolumeNumber ),
11031                 rec( 11, 4, MacBaseDirectoryID ),
11032                 rec( 15, 4, MacLastSeenID, BE ),
11033                 rec( 19, 2, DesiredResponseCount, BE ),
11034                 rec( 21, 2, SearchBitMap, BE ),
11035                 rec( 23, 2, RequestBitMap, BE ),
11036                 rec( 25, (1,255), Path ),
11037         ], info_str=(Path, "AFP Scan File Information: %s", ", %s"))
11038         pkt.Reply(123, [
11039                 rec( 8, 2, ActualResponseCount, BE, var="x" ),
11040                 rec( 10, 113, AFP10Struct, repeat="x" ),
11041         ])      
11042         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804,
11043                              0x9c03, 0xa100, 0xa201, 0xfd00, 0xff16])
11044         # 2222/230B, 35/11
11045         pkt = NCP(0x230B, "AFP Alloc Temporary Directory Handle", 'afp')
11046         pkt.Request((16,270), [
11047                 rec( 10, 1, VolumeNumber ),
11048                 rec( 11, 4, MacBaseDirectoryID ),
11049                 rec( 15, (1,255), Path ),
11050         ], info_str=(Path, "AFP Allocate Temporary Directory Handle: %s", ", %s"))
11051         pkt.Reply(10, [
11052                 rec( 8, 1, DirHandle ),
11053                 rec( 9, 1, AccessRightsMask ),
11054         ])
11055         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600,
11056                              0x9804, 0x9b03, 0x9c03, 0x9d00, 0xa100,
11057                              0xa201, 0xfd00, 0xff00])
11058         # 2222/230C, 35/12
11059         pkt = NCP(0x230C, "AFP Get Entry ID From Path Name", 'afp')
11060         pkt.Request((12,266), [
11061                 rec( 10, 1, DirHandle ),
11062                 rec( 11, (1,255), Path ),
11063         ], info_str=(Path, "AFP Get Entry ID from Path Name: %s", ", %s"))
11064         pkt.Reply(12, [
11065                 rec( 8, 4, AFPEntryID, BE ),
11066         ])
11067         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600,
11068                              0x9804, 0x9b03, 0x9c03, 0xa100, 0xa201,
11069                              0xfd00, 0xff00])
11070         # 2222/230D, 35/13
11071         pkt = NCP(0x230D, "AFP 2.0 Create Directory", 'afp')
11072         pkt.Request((55,309), [
11073                 rec( 10, 1, VolumeNumber ),
11074                 rec( 11, 4, BaseDirectoryID ),
11075                 rec( 15, 1, Reserved ),
11076                 rec( 16, 4, CreatorID, BE ),
11077                 rec( 20, 4, Reserved4 ),
11078                 rec( 24, 2, FinderAttr ),
11079                 rec( 26, 2, HorizLocation ),
11080                 rec( 28, 2, VertLocation ),
11081                 rec( 30, 2, FileDirWindow ),
11082                 rec( 32, 16, Reserved16 ),
11083                 rec( 48, 6, ProDOSInfo ),
11084                 rec( 54, (1,255), Path ),
11085         ], info_str=(Path, "AFP 2.0 Create Directory: %s", ", %s"))
11086         pkt.Reply(12, [
11087                 rec( 8, 4, NewDirectoryID ),
11088         ])
11089         pkt.CompletionCodes([0x0000, 0x8301, 0x8400, 0x8800, 0x9300,
11090                              0x9600, 0x9804, 0x9900, 0x9c03, 0x9e00,
11091                              0xa100, 0xa201, 0xfd00, 0xff00])
11092         # 2222/230E, 35/14
11093         pkt = NCP(0x230E, "AFP 2.0 Create File", 'afp')
11094         pkt.Request((55,309), [
11095                 rec( 10, 1, VolumeNumber ),
11096                 rec( 11, 4, BaseDirectoryID ),
11097                 rec( 15, 1, DeleteExistingFileFlag ),
11098                 rec( 16, 4, CreatorID, BE ),
11099                 rec( 20, 4, Reserved4 ),
11100                 rec( 24, 2, FinderAttr ),
11101                 rec( 26, 2, HorizLocation ),
11102                 rec( 28, 2, VertLocation ),
11103                 rec( 30, 2, FileDirWindow ),
11104                 rec( 32, 16, Reserved16 ),
11105                 rec( 48, 6, ProDOSInfo ),
11106                 rec( 54, (1,255), Path ),
11107         ], info_str=(Path, "AFP 2.0 Create File: %s", ", %s"))
11108         pkt.Reply(12, [
11109                 rec( 8, 4, NewDirectoryID ),
11110         ])
11111         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8301, 0x8400,
11112                              0x8701, 0x8800, 0x8a00, 0x8d00, 0x8e00,
11113                              0x8f00, 0x9001, 0x9300, 0x9600, 0x9804,
11114                              0x9900, 0x9b03, 0x9c03, 0x9e00, 0xa100,
11115                              0xa201, 0xfd00, 0xff00])
11116         # 2222/230F, 35/15
11117         pkt = NCP(0x230F, "AFP 2.0 Get File Or Directory Information", 'afp')
11118         pkt.Request((18,272), [
11119                 rec( 10, 1, VolumeNumber ),
11120                 rec( 11, 4, BaseDirectoryID ),
11121                 rec( 15, 2, RequestBitMap, BE ),
11122                 rec( 17, (1,255), Path ),
11123         ], info_str=(Path, "AFP 2.0 Get Information: %s", ", %s"))
11124         pkt.Reply(128, [
11125                 rec( 8, 4, AFPEntryID, BE ),
11126                 rec( 12, 4, ParentID, BE ),
11127                 rec( 16, 2, AttributesDef16 ),
11128                 rec( 18, 4, DataForkLen, BE ),
11129                 rec( 22, 4, ResourceForkLen, BE ),
11130                 rec( 26, 2, TotalOffspring, BE ),
11131                 rec( 28, 2, CreationDate, BE ),
11132                 rec( 30, 2, LastAccessedDate, BE ),
11133                 rec( 32, 2, ModifiedDate, BE ),
11134                 rec( 34, 2, ModifiedTime, BE ),
11135                 rec( 36, 2, ArchivedDate, BE ),
11136                 rec( 38, 2, ArchivedTime, BE ),
11137                 rec( 40, 4, CreatorID, BE ),
11138                 rec( 44, 4, Reserved4 ),
11139                 rec( 48, 2, FinderAttr ),
11140                 rec( 50, 2, HorizLocation ),
11141                 rec( 52, 2, VertLocation ),
11142                 rec( 54, 2, FileDirWindow ),
11143                 rec( 56, 16, Reserved16 ),
11144                 rec( 72, 32, LongName ),
11145                 rec( 104, 4, CreatorID, BE ),
11146                 rec( 108, 12, ShortName ),
11147                 rec( 120, 1, AccessPrivileges ),
11148                 rec( 121, 1, Reserved ),
11149                 rec( 122, 6, ProDOSInfo ),
11150         ])              
11151         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804, 0x9c03,
11152                              0xa100, 0xa201, 0xfd00, 0xff19])
11153         # 2222/2310, 35/16
11154         pkt = NCP(0x2310, "AFP 2.0 Set File Information", 'afp')
11155         pkt.Request((70, 324), [
11156                 rec( 10, 1, VolumeNumber ),
11157                 rec( 11, 4, MacBaseDirectoryID ),
11158                 rec( 15, 2, RequestBitMap, BE ),
11159                 rec( 17, 2, AttributesDef16 ),
11160                 rec( 19, 2, CreationDate, BE ),
11161                 rec( 21, 2, LastAccessedDate, BE ),
11162                 rec( 23, 2, ModifiedDate, BE ),
11163                 rec( 25, 2, ModifiedTime, BE ),
11164                 rec( 27, 2, ArchivedDate, BE ),
11165                 rec( 29, 2, ArchivedTime, BE ),
11166                 rec( 31, 4, CreatorID, BE ),
11167                 rec( 35, 4, Reserved4 ),
11168                 rec( 39, 2, FinderAttr ),
11169                 rec( 41, 2, HorizLocation ),
11170                 rec( 43, 2, VertLocation ),
11171                 rec( 45, 2, FileDirWindow ),
11172                 rec( 47, 16, Reserved16 ),
11173                 rec( 63, 6, ProDOSInfo ),
11174                 rec( 69, (1,255), Path ),
11175         ], info_str=(Path, "AFP 2.0 Set File Information: %s", ", %s"))
11176         pkt.Reply(8)            
11177         pkt.CompletionCodes([0x0000, 0x0104, 0x8301, 0x8800, 0x9300, 0x9400,
11178                              0x9500, 0x9600, 0x9804, 0x9c03, 0xa100, 0xa201,
11179                              0xfd00, 0xff16])
11180         # 2222/2311, 35/17
11181         pkt = NCP(0x2311, "AFP 2.0 Scan File Information", 'afp')
11182         pkt.Request((26, 280), [
11183                 rec( 10, 1, VolumeNumber ),
11184                 rec( 11, 4, MacBaseDirectoryID ),
11185                 rec( 15, 4, MacLastSeenID, BE ),
11186                 rec( 19, 2, DesiredResponseCount, BE ),
11187                 rec( 21, 2, SearchBitMap, BE ),
11188                 rec( 23, 2, RequestBitMap, BE ),
11189                 rec( 25, (1,255), Path ),
11190         ], info_str=(Path, "AFP 2.0 Scan File Information: %s", ", %s"))
11191         pkt.Reply(14, [
11192                 rec( 8, 2, ActualResponseCount, var="x" ),
11193                 rec( 10, 4, AFP20Struct, repeat="x" ),
11194         ])      
11195         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804,
11196                              0x9c03, 0xa100, 0xa201, 0xfd00, 0xff16])
11197         # 2222/2312, 35/18
11198         pkt = NCP(0x2312, "AFP Get DOS Name From Entry ID", 'afp')
11199         pkt.Request(15, [
11200                 rec( 10, 1, VolumeNumber ),
11201                 rec( 11, 4, AFPEntryID, BE ),
11202         ])
11203         pkt.Reply((9,263), [
11204                 rec( 8, (1,255), Path ),
11205         ])      
11206         pkt.CompletionCodes([0x0000, 0x8900, 0x9600, 0xbf00])
11207         # 2222/2313, 35/19
11208         pkt = NCP(0x2313, "AFP Get Macintosh Info On Deleted File", 'afp')
11209         pkt.Request(15, [
11210                 rec( 10, 1, VolumeNumber ),
11211                 rec( 11, 4, DirectoryNumber, BE ),
11212         ])
11213         pkt.Reply((51,305), [
11214                 rec( 8, 4, CreatorID, BE ),
11215                 rec( 12, 4, Reserved4 ),
11216                 rec( 16, 2, FinderAttr ),
11217                 rec( 18, 2, HorizLocation ),
11218                 rec( 20, 2, VertLocation ),
11219                 rec( 22, 2, FileDirWindow ),
11220                 rec( 24, 16, Reserved16 ),
11221                 rec( 40, 6, ProDOSInfo ),
11222                 rec( 46, 4, ResourceForkSize, BE ),
11223                 rec( 50, (1,255), FileName ),
11224         ])      
11225         pkt.CompletionCodes([0x0000, 0x9c03, 0xbf00])
11226         # 2222/2400, 36/00
11227         pkt = NCP(0x2400, "Get NCP Extension Information", 'fileserver')
11228         pkt.Request(14, [
11229                 rec( 10, 4, NCPextensionNumber, LE ),
11230         ])
11231         pkt.Reply((16,270), [
11232                 rec( 8, 4, NCPextensionNumber ),
11233                 rec( 12, 1, NCPextensionMajorVersion ),
11234                 rec( 13, 1, NCPextensionMinorVersion ),
11235                 rec( 14, 1, NCPextensionRevisionNumber ),
11236                 rec( 15, (1, 255), NCPextensionName ),
11237         ])      
11238         pkt.CompletionCodes([0x0000, 0xfe00])
11239         # 2222/2401, 36/01
11240         pkt = NCP(0x2401, "Get NCP Extension Maximum Data Size", 'fileserver')
11241         pkt.Request(10)
11242         pkt.Reply(10, [
11243                 rec( 8, 2, NCPdataSize ),
11244         ])      
11245         pkt.CompletionCodes([0x0000, 0xfe00])
11246         # 2222/2402, 36/02
11247         pkt = NCP(0x2402, "Get NCP Extension Information by Name", 'fileserver')
11248         pkt.Request((11, 265), [
11249                 rec( 10, (1,255), NCPextensionName ),
11250         ], info_str=(NCPextensionName, "Get NCP Extension Information by Name: %s", ", %s"))
11251         pkt.Reply((16,270), [
11252                 rec( 8, 4, NCPextensionNumber ),
11253                 rec( 12, 1, NCPextensionMajorVersion ),
11254                 rec( 13, 1, NCPextensionMinorVersion ),
11255                 rec( 14, 1, NCPextensionRevisionNumber ),
11256                 rec( 15, (1, 255), NCPextensionName ),
11257         ])      
11258         pkt.CompletionCodes([0x0000, 0xfe00, 0xff20])
11259         # 2222/2403, 36/03
11260         pkt = NCP(0x2403, "Get Number of Registered NCP Extensions", 'fileserver')
11261         pkt.Request(10)
11262         pkt.Reply(12, [
11263                 rec( 8, 4, NumberOfNCPExtensions ),
11264         ])      
11265         pkt.CompletionCodes([0x0000, 0xfe00])
11266         # 2222/2404, 36/04
11267         pkt = NCP(0x2404, "Get NCP Extension Registered Verbs List", 'fileserver')
11268         pkt.Request(14, [
11269                 rec( 10, 4, StartingNumber ),
11270         ])
11271         pkt.Reply(20, [
11272                 rec( 8, 4, ReturnedListCount, var="x" ),
11273                 rec( 12, 4, nextStartingNumber ),
11274                 rec( 16, 4, NCPExtensionNumbers, repeat="x" ),
11275         ])      
11276         pkt.CompletionCodes([0x0000, 0xfe00])
11277         # 2222/2405, 36/05
11278         pkt = NCP(0x2405, "Return NCP Extension Information", 'fileserver')
11279         pkt.Request(14, [
11280                 rec( 10, 4, NCPextensionNumber ),
11281         ])
11282         pkt.Reply((16,270), [
11283                 rec( 8, 4, NCPextensionNumber ),
11284                 rec( 12, 1, NCPextensionMajorVersion ),
11285                 rec( 13, 1, NCPextensionMinorVersion ),
11286                 rec( 14, 1, NCPextensionRevisionNumber ),
11287                 rec( 15, (1, 255), NCPextensionName ),
11288         ])      
11289         pkt.CompletionCodes([0x0000, 0xfe00])
11290         # 2222/2406, 36/06
11291         pkt = NCP(0x2406, "Return NCP Extension Maximum Data Size", 'fileserver')
11292         pkt.Request(10)
11293         pkt.Reply(12, [
11294                 rec( 8, 4, NCPdataSize ),
11295         ])      
11296         pkt.CompletionCodes([0x0000, 0xfe00])
11297         # 2222/25, 37
11298         pkt = NCP(0x25, "Execute NCP Extension", 'fileserver')
11299         pkt.Request(11, [
11300                 rec( 7, 4, NCPextensionNumber ),
11301                 # The following value is Unicode
11302                 #rec[ 13, (1,255), RequestData ],
11303         ])
11304         pkt.Reply(8)
11305                 # The following value is Unicode
11306                 #[ 8, (1, 255), ReplyBuffer ],
11307         pkt.CompletionCodes([0x0000, 0xd504, 0xee00, 0xfe00])
11308         # 2222/3B, 59
11309         pkt = NCP(0x3B, "Commit File", 'file', has_length=0 )
11310         pkt.Request(14, [
11311                 rec( 7, 1, Reserved ),
11312                 rec( 8, 6, FileHandle ),
11313         ], info_str=(FileHandle, "Commit File - 0x%s", ", %s"))
11314         pkt.Reply(8)    
11315         pkt.CompletionCodes([0x0000, 0x8800, 0x9804, 0xff00])
11316         # 2222/3E, 62
11317         pkt = NCP(0x3E, "File Search Initialize", 'file', has_length=0 )
11318         pkt.Request((9, 263), [
11319                 rec( 7, 1, DirHandle ),
11320                 rec( 8, (1,255), Path ),
11321         ], info_str=(Path, "Initialize File Search: %s", ", %s"))
11322         pkt.Reply(14, [
11323                 rec( 8, 1, VolumeNumber ),
11324                 rec( 9, 2, DirectoryID ),
11325                 rec( 11, 2, SequenceNumber, BE ),
11326                 rec( 13, 1, AccessRightsMask ),
11327         ])
11328         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100,
11329                              0xfd00, 0xff16])
11330         # 2222/3F, 63
11331         pkt = NCP(0x3F, "File Search Continue", 'file', has_length=0 )
11332         pkt.Request((14, 268), [
11333                 rec( 7, 1, VolumeNumber ),
11334                 rec( 8, 2, DirectoryID ),
11335                 rec( 10, 2, SequenceNumber, BE ),
11336                 rec( 12, 1, SearchAttributes ),
11337                 rec( 13, (1,255), Path ),
11338         ], info_str=(Path, "File Search Continue: %s", ", %s"))
11339         pkt.Reply( NO_LENGTH_CHECK, [
11340                 #
11341                 # XXX - don't show this if we got back a non-zero
11342                 # completion code?  For example, 255 means "No
11343                 # matching files or directories were found", so
11344                 # presumably it can't show you a matching file or
11345                 # directory instance - it appears to just leave crap
11346                 # there.
11347                 #
11348                 srec( DirectoryInstance, req_cond="ncp.sattr_sub==TRUE"),
11349                 srec( FileInstance, req_cond="ncp.sattr_sub!=TRUE"),
11350         ])
11351         pkt.ReqCondSizeVariable()
11352         pkt.CompletionCodes([0x0000, 0xff16])
11353         # 2222/40, 64
11354         pkt = NCP(0x40, "Search for a File", 'file')
11355         pkt.Request((12, 266), [
11356                 rec( 7, 2, SequenceNumber, BE ),
11357                 rec( 9, 1, DirHandle ),
11358                 rec( 10, 1, SearchAttributes ),
11359                 rec( 11, (1,255), FileName ),
11360         ], info_str=(FileName, "Search for File: %s", ", %s"))
11361         pkt.Reply(40, [
11362                 rec( 8, 2, SequenceNumber, BE ),
11363                 rec( 10, 2, Reserved2 ),
11364                 rec( 12, 14, FileName14 ),
11365                 rec( 26, 1, AttributesDef ),
11366                 rec( 27, 1, FileExecuteType ),
11367                 rec( 28, 4, FileSize ),
11368                 rec( 32, 2, CreationDate, BE ),
11369                 rec( 34, 2, LastAccessedDate, BE ),
11370                 rec( 36, 2, ModifiedDate, BE ),
11371                 rec( 38, 2, ModifiedTime, BE ),
11372         ])
11373         pkt.CompletionCodes([0x0000, 0x8900, 0x9600, 0x9804, 0x9b03,
11374                              0x9c03, 0xa100, 0xfd00, 0xff16])
11375         # 2222/41, 65
11376         pkt = NCP(0x41, "Open File", 'file')
11377         pkt.Request((10, 264), [
11378                 rec( 7, 1, DirHandle ),
11379                 rec( 8, 1, SearchAttributes ),
11380                 rec( 9, (1,255), FileName ),
11381         ], info_str=(FileName, "Open File: %s", ", %s"))
11382         pkt.Reply(44, [
11383                 rec( 8, 6, FileHandle ),
11384                 rec( 14, 2, Reserved2 ),
11385                 rec( 16, 14, FileName14 ),
11386                 rec( 30, 1, AttributesDef ),
11387                 rec( 31, 1, FileExecuteType ),
11388                 rec( 32, 4, FileSize, BE ),
11389                 rec( 36, 2, CreationDate, BE ),
11390                 rec( 38, 2, LastAccessedDate, BE ),
11391                 rec( 40, 2, ModifiedDate, BE ),
11392                 rec( 42, 2, ModifiedTime, BE ),
11393         ])
11394         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8200, 0x9400,
11395                              0x9600, 0x9804, 0x9c03, 0xa100, 0xfd00,
11396                              0xff16])
11397         # 2222/42, 66
11398         pkt = NCP(0x42, "Close File", 'file')
11399         pkt.Request(14, [
11400                 rec( 7, 1, Reserved ),
11401                 rec( 8, 6, FileHandle ),
11402         ], info_str=(FileHandle, "Close File - 0x%s", ", %s"))
11403         pkt.Reply(8)
11404         pkt.CompletionCodes([0x0000, 0x8800, 0xff1a])
11405         # 2222/43, 67
11406         pkt = NCP(0x43, "Create File", 'file')
11407         pkt.Request((10, 264), [
11408                 rec( 7, 1, DirHandle ),
11409                 rec( 8, 1, AttributesDef ),
11410                 rec( 9, (1,255), FileName ),
11411         ], info_str=(FileName, "Create File: %s", ", %s"))
11412         pkt.Reply(44, [
11413                 rec( 8, 6, FileHandle ),
11414                 rec( 14, 2, Reserved2 ),
11415                 rec( 16, 14, FileName14 ),
11416                 rec( 30, 1, AttributesDef ),
11417                 rec( 31, 1, FileExecuteType ),
11418                 rec( 32, 4, FileSize, BE ),
11419                 rec( 36, 2, CreationDate, BE ),
11420                 rec( 38, 2, LastAccessedDate, BE ),
11421                 rec( 40, 2, ModifiedDate, BE ),
11422                 rec( 42, 2, ModifiedTime, BE ),
11423         ])
11424         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11425                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11426                              0x9804, 0x9900, 0x9b03, 0x9c03, 0xfd00,
11427                              0xff00])
11428         # 2222/44, 68
11429         pkt = NCP(0x44, "Erase File", 'file')
11430         pkt.Request((10, 264), [
11431                 rec( 7, 1, DirHandle ),
11432                 rec( 8, 1, SearchAttributes ),
11433                 rec( 9, (1,255), FileName ),
11434         ], info_str=(FileName, "Erase File: %s", ", %s"))
11435         pkt.Reply(8)
11436         pkt.CompletionCodes([0x0000, 0x8a00, 0x8d00, 0x8e00, 0x8f00,
11437                              0x9001, 0x9600, 0x9804, 0x9b03, 0x9c03,
11438                              0xa100, 0xfd00, 0xff00])
11439         # 2222/45, 69
11440         pkt = NCP(0x45, "Rename File", 'file')
11441         pkt.Request((12, 520), [
11442                 rec( 7, 1, DirHandle ),
11443                 rec( 8, 1, SearchAttributes ),
11444                 rec( 9, (1,255), FileName ),
11445                 rec( -1, 1, TargetDirHandle ),
11446                 rec( -1, (1, 255), NewFileNameLen ),
11447         ], info_str=(FileName, "Rename File: %s", ", %s"))
11448         pkt.Reply(8)
11449         pkt.CompletionCodes([0x0000, 0x8701, 0x8b00, 0x8d00, 0x8e00,
11450                              0x8f00, 0x9001, 0x9101, 0x9201, 0x9600,
11451                              0x9804, 0x9a00, 0x9b03, 0x9c03, 0xa100,
11452                              0xfd00, 0xff16])
11453         # 2222/46, 70
11454         pkt = NCP(0x46, "Set File Attributes", 'file')
11455         pkt.Request((11, 265), [
11456                 rec( 7, 1, AttributesDef ),
11457                 rec( 8, 1, DirHandle ),
11458                 rec( 9, 1, SearchAttributes ),
11459                 rec( 10, (1,255), FileName ),
11460         ], info_str=(FileName, "Set File Attributes: %s", ", %s"))
11461         pkt.Reply(8)
11462         pkt.CompletionCodes([0x0000, 0x8c00, 0x8d00, 0x8e00, 0x9600,
11463                              0x9804, 0x9b03, 0x9c03, 0xa100, 0xfd00,
11464                              0xff16])
11465         # 2222/47, 71
11466         pkt = NCP(0x47, "Get Current Size of File", 'file')
11467         pkt.Request(14, [
11468         rec(7, 1, Reserved ),
11469                 rec( 8, 6, FileHandle ),
11470         ], info_str=(FileHandle, "Get Current Size of File - 0x%s", ", %s"))
11471         pkt.Reply(12, [
11472                 rec( 8, 4, FileSize, BE ),
11473         ])
11474         pkt.CompletionCodes([0x0000, 0x8800])
11475         # 2222/48, 72
11476         pkt = NCP(0x48, "Read From A File", 'file')
11477         pkt.Request(20, [
11478                 rec( 7, 1, Reserved ),
11479                 rec( 8, 6, FileHandle ),
11480                 rec( 14, 4, FileOffset, BE ), 
11481                 rec( 18, 2, MaxBytes, BE ),                                
11482         ], info_str=(FileHandle, "Read From File - 0x%s", ", %s"))
11483         pkt.Reply(10, [ 
11484                 rec( 8, 2, NumBytes, BE ),      
11485         ])
11486         pkt.CompletionCodes([0x0000, 0x8300, 0x8800, 0x9300, 0xff1b])
11487         # 2222/49, 73
11488         pkt = NCP(0x49, "Write to a File", 'file')
11489         pkt.Request(20, [
11490                 rec( 7, 1, Reserved ),
11491                 rec( 8, 6, FileHandle ),
11492                 rec( 14, 4, FileOffset, BE ),
11493                 rec( 18, 2, MaxBytes, BE ),     
11494         ], info_str=(FileHandle, "Write to a File - 0x%s", ", %s"))
11495         pkt.Reply(8)
11496         pkt.CompletionCodes([0x0000, 0x0104, 0x8300, 0x8800, 0x9400, 0x9500, 0xa201, 0xff1b])
11497         # 2222/4A, 74
11498         pkt = NCP(0x4A, "Copy from One File to Another", 'file')
11499         pkt.Request(30, [
11500                 rec( 7, 1, Reserved ),
11501                 rec( 8, 6, FileHandle ),
11502                 rec( 14, 6, TargetFileHandle ),
11503                 rec( 20, 4, FileOffset, BE ),
11504                 rec( 24, 4, TargetFileOffset, BE ),
11505                 rec( 28, 2, BytesToCopy, BE ),
11506         ])
11507         pkt.Reply(12, [
11508                 rec( 8, 4, BytesActuallyTransferred, BE ),
11509         ])
11510         pkt.CompletionCodes([0x0000, 0x0104, 0x8300, 0x8800, 0x9300, 0x9400,
11511                              0x9500, 0x9600, 0xa201, 0xff1b])
11512         # 2222/4B, 75
11513         pkt = NCP(0x4B, "Set File Time Date Stamp", 'file')
11514         pkt.Request(18, [
11515                 rec( 7, 1, Reserved ),
11516                 rec( 8, 6, FileHandle ),
11517                 rec( 14, 2, FileTime, BE ),
11518                 rec( 16, 2, FileDate, BE ),
11519         ], info_str=(FileHandle, "Set Time and Date Stamp for File - 0x%s", ", %s"))
11520         pkt.Reply(8)
11521         pkt.CompletionCodes([0x0000, 0x8800, 0x9600])
11522         # 2222/4C, 76
11523         pkt = NCP(0x4C, "Open File", 'file')
11524         pkt.Request((11, 265), [
11525                 rec( 7, 1, DirHandle ),
11526                 rec( 8, 1, SearchAttributes ),
11527                 rec( 9, 1, AccessRightsMask ),
11528                 rec( 10, (1,255), FileName ),
11529         ], info_str=(FileName, "Open File: %s", ", %s"))
11530         pkt.Reply(44, [
11531                 rec( 8, 6, FileHandle ),
11532                 rec( 14, 2, Reserved2 ),
11533                 rec( 16, 14, FileName14 ),
11534                 rec( 30, 1, AttributesDef ),
11535                 rec( 31, 1, FileExecuteType ),
11536                 rec( 32, 4, FileSize, BE ),
11537                 rec( 36, 2, CreationDate, BE ),
11538                 rec( 38, 2, LastAccessedDate, BE ),
11539                 rec( 40, 2, ModifiedDate, BE ),
11540                 rec( 42, 2, ModifiedTime, BE ),
11541         ])
11542         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8200, 0x9400,
11543                              0x9600, 0x9804, 0x9c03, 0xa100, 0xfd00,
11544                              0xff16])
11545         # 2222/4D, 77
11546         pkt = NCP(0x4D, "Create File", 'file')
11547         pkt.Request((10, 264), [
11548                 rec( 7, 1, DirHandle ),
11549                 rec( 8, 1, AttributesDef ),
11550                 rec( 9, (1,255), FileName ),
11551         ], info_str=(FileName, "Create File: %s", ", %s"))
11552         pkt.Reply(44, [
11553                 rec( 8, 6, FileHandle ),
11554                 rec( 14, 2, Reserved2 ),
11555                 rec( 16, 14, FileName14 ),
11556                 rec( 30, 1, AttributesDef ),
11557                 rec( 31, 1, FileExecuteType ),
11558                 rec( 32, 4, FileSize, BE ),
11559                 rec( 36, 2, CreationDate, BE ),
11560                 rec( 38, 2, LastAccessedDate, BE ),
11561                 rec( 40, 2, ModifiedDate, BE ),
11562                 rec( 42, 2, ModifiedTime, BE ),
11563         ])
11564         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11565                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11566                              0x9804, 0x9900, 0x9b03, 0x9c03, 0xfd00,
11567                              0xff00])
11568         # 2222/4F, 79
11569         pkt = NCP(0x4F, "Set File Extended Attributes", 'file')
11570         pkt.Request((11, 265), [
11571                 rec( 7, 1, AttributesDef ),
11572                 rec( 8, 1, DirHandle ),
11573                 rec( 9, 1, AccessRightsMask ),
11574                 rec( 10, (1,255), FileName ),
11575         ], info_str=(FileName, "Set File Extended Attributes: %s", ", %s"))
11576         pkt.Reply(8)
11577         pkt.CompletionCodes([0x0000, 0x8c00, 0x8d00, 0x8e00, 0x9600,
11578                              0x9804, 0x9b03, 0x9c03, 0xa100, 0xfd00,
11579                              0xff16])
11580         # 2222/54, 84
11581         pkt = NCP(0x54, "Open/Create File", 'file')
11582         pkt.Request((12, 266), [
11583                 rec( 7, 1, DirHandle ),
11584                 rec( 8, 1, AttributesDef ),
11585                 rec( 9, 1, AccessRightsMask ),
11586                 rec( 10, 1, ActionFlag ),
11587                 rec( 11, (1,255), FileName ),
11588         ], info_str=(FileName, "Open/Create File: %s", ", %s"))
11589         pkt.Reply(44, [
11590                 rec( 8, 6, FileHandle ),
11591                 rec( 14, 2, Reserved2 ),
11592                 rec( 16, 14, FileName14 ),
11593                 rec( 30, 1, AttributesDef ),
11594                 rec( 31, 1, FileExecuteType ),
11595                 rec( 32, 4, FileSize, BE ),
11596                 rec( 36, 2, CreationDate, BE ),
11597                 rec( 38, 2, LastAccessedDate, BE ),
11598                 rec( 40, 2, ModifiedDate, BE ),
11599                 rec( 42, 2, ModifiedTime, BE ),
11600         ])
11601         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11602                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11603                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
11604         # 2222/55, 85
11605         pkt = NCP(0x55, "Get Sparse File Data Block Bit Map", 'file')
11606         pkt.Request(17, [
11607                 rec( 7, 6, FileHandle ),
11608                 rec( 13, 4, FileOffset ),
11609         ], info_str=(FileHandle, "Get Sparse File Data Block Bitmap for File - 0x%s", ", %s"))
11610         pkt.Reply(528, [
11611                 rec( 8, 4, AllocationBlockSize ),
11612                 rec( 12, 4, Reserved4 ),
11613                 rec( 16, 512, BitMap ),
11614         ])
11615         pkt.CompletionCodes([0x0000, 0x8800])
11616         # 2222/5601, 86/01
11617         pkt = NCP(0x5601, "Close Extended Attribute Handle", 'file', has_length=0 )
11618         pkt.Request(14, [
11619                 rec( 8, 2, Reserved2 ),
11620                 rec( 10, 4, EAHandle ),
11621         ])
11622         pkt.Reply(8)
11623         pkt.CompletionCodes([0x0000, 0xcf00, 0xd301])
11624         # 2222/5602, 86/02
11625         pkt = NCP(0x5602, "Write Extended Attribute", 'file', has_length=0 )
11626         pkt.Request((35,97), [
11627                 rec( 8, 2, EAFlags ),
11628                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
11629                 rec( 14, 4, ReservedOrDirectoryNumber ),
11630                 rec( 18, 4, TtlWriteDataSize ),
11631                 rec( 22, 4, FileOffset ),
11632                 rec( 26, 4, EAAccessFlag ),
11633                 rec( 30, 2, EAValueLength, var='x' ),
11634                 rec( 32, (2,64), EAKey ),
11635                 rec( -1, 1, EAValueRep, repeat='x' ),
11636         ], info_str=(EAKey, "Write Extended Attribute: %s", ", %s"))
11637         pkt.Reply(20, [
11638                 rec( 8, 4, EAErrorCodes ),
11639                 rec( 12, 4, EABytesWritten ),
11640                 rec( 16, 4, NewEAHandle ),
11641         ])
11642         pkt.CompletionCodes([0x0000, 0xc800, 0xc900, 0xcb00, 0xce00, 0xcf00, 0xd101,
11643                              0xd203, 0xd301, 0xd402])
11644         # 2222/5603, 86/03
11645         pkt = NCP(0x5603, "Read Extended Attribute", 'file', has_length=0 )
11646         pkt.Request((28,538), [
11647                 rec( 8, 2, EAFlags ),
11648                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
11649                 rec( 14, 4, ReservedOrDirectoryNumber ),
11650                 rec( 18, 4, FileOffset ),
11651                 rec( 22, 4, InspectSize ),
11652                 rec( 26, (2,512), EAKey ),
11653         ], info_str=(EAKey, "Read Extended Attribute: %s", ", %s"))
11654         pkt.Reply((26,536), [
11655                 rec( 8, 4, EAErrorCodes ),
11656                 rec( 12, 4, TtlValuesLength ),
11657                 rec( 16, 4, NewEAHandle ),
11658                 rec( 20, 4, EAAccessFlag ),
11659                 rec( 24, (2,512), EAValue ),
11660         ])
11661         pkt.CompletionCodes([0x0000, 0xc900, 0xce00, 0xcf00, 0xd101,
11662                              0xd301])
11663         # 2222/5604, 86/04
11664         pkt = NCP(0x5604, "Enumerate Extended Attribute", 'file', has_length=0 )
11665         pkt.Request((26,536), [
11666                 rec( 8, 2, EAFlags ),
11667                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
11668                 rec( 14, 4, ReservedOrDirectoryNumber ),
11669                 rec( 18, 4, InspectSize ),
11670                 rec( 22, 2, SequenceNumber ),
11671                 rec( 24, (2,512), EAKey ),
11672         ], info_str=(EAKey, "Enumerate Extended Attribute: %s", ", %s"))
11673         pkt.Reply(28, [
11674                 rec( 8, 4, EAErrorCodes ),
11675                 rec( 12, 4, TtlEAs ),
11676                 rec( 16, 4, TtlEAsDataSize ),
11677                 rec( 20, 4, TtlEAsKeySize ),
11678                 rec( 24, 4, NewEAHandle ),
11679         ])
11680         pkt.CompletionCodes([0x0000, 0x8800, 0xc900, 0xce00, 0xcf00, 0xd101,
11681                              0xd301])
11682         # 2222/5605, 86/05
11683         pkt = NCP(0x5605, "Duplicate Extended Attributes", 'file', has_length=0 )
11684         pkt.Request(28, [
11685                 rec( 8, 2, EAFlags ),
11686                 rec( 10, 2, DstEAFlags ),
11687                 rec( 12, 4, EAHandleOrNetWareHandleOrVolume ),
11688                 rec( 16, 4, ReservedOrDirectoryNumber ),
11689                 rec( 20, 4, EAHandleOrNetWareHandleOrVolume ),
11690                 rec( 24, 4, ReservedOrDirectoryNumber ),
11691         ])
11692         pkt.Reply(20, [
11693                 rec( 8, 4, EADuplicateCount ),
11694                 rec( 12, 4, EADataSizeDuplicated ),
11695                 rec( 16, 4, EAKeySizeDuplicated ),
11696         ])
11697         pkt.CompletionCodes([0x0000, 0xd101])
11698         # 2222/5701, 87/01
11699         pkt = NCP(0x5701, "Open/Create File or Subdirectory", 'file', has_length=0)
11700         pkt.Request((30, 284), [
11701                 rec( 8, 1, NameSpace  ),
11702                 rec( 9, 1, OpenCreateMode ),
11703                 rec( 10, 2, SearchAttributesLow ),
11704                 rec( 12, 2, ReturnInfoMask ),
11705                 rec( 14, 2, ExtendedInfo ),
11706                 rec( 16, 4, AttributesDef32 ),
11707                 rec( 20, 2, DesiredAccessRights ),
11708                 rec( 22, 1, VolumeNumber ),
11709                 rec( 23, 4, DirectoryBase ),
11710                 rec( 27, 1, HandleFlag ),
11711                 rec( 28, 1, PathCount, var="x" ),
11712                 rec( 29, (1,255), Path, repeat="x" ),
11713         ], info_str=(Path, "Open or Create: %s", "/%s"))
11714         pkt.Reply( NO_LENGTH_CHECK, [
11715                 rec( 8, 4, FileHandle ),
11716                 rec( 12, 1, OpenCreateAction ),
11717                 rec( 13, 1, Reserved ),
11718                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
11719                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
11720                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
11721                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
11722                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
11723                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
11724                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
11725                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
11726                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
11727                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
11728                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
11729                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
11730                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
11731                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
11732                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
11733                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
11734                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
11735                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
11736                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
11737                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
11738                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
11739                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
11740                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
11741                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
11742                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
11743                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
11744                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
11745                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
11746                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
11747                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
11748                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
11749                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
11750                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
11751                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ), 
11752                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
11753                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
11754                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
11755                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ), 
11756                 srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ), 
11757                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ), 
11758                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ), 
11759                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ), 
11760                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ), 
11761                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ), 
11762                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
11763                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ), 
11764                 srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
11765         ])
11766         pkt.ReqCondSizeVariable()
11767         pkt.CompletionCodes([0x0000, 0x8001, 0x8101, 0x8401, 0x8501,
11768                              0x8701, 0x8900, 0x8d00, 0x8f00, 0x9001, 0x9600,
11769                              0x9804, 0x9b03, 0x9c03, 0xa500, 0xa802, 0xbf00, 0xfd00, 0xff16])
11770         # 2222/5702, 87/02
11771         pkt = NCP(0x5702, "Initialize Search", 'file', has_length=0)
11772         pkt.Request( (18,272), [
11773                 rec( 8, 1, NameSpace  ),
11774                 rec( 9, 1, Reserved ),
11775                 rec( 10, 1, VolumeNumber ),
11776                 rec( 11, 4, DirectoryBase ),
11777                 rec( 15, 1, HandleFlag ),
11778                 rec( 16, 1, PathCount, var="x" ),
11779                 rec( 17, (1,255), Path, repeat="x" ),
11780         ], info_str=(Path, "Set Search Pointer to: %s", "/%s"))
11781         pkt.Reply(17, [
11782                 rec( 8, 1, VolumeNumber ),
11783                 rec( 9, 4, DirectoryNumber ),
11784                 rec( 13, 4, DirectoryEntryNumber ),
11785         ])
11786         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11787                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11788                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11789         # 2222/5703, 87/03
11790         pkt = NCP(0x5703, "Search for File or Subdirectory", 'file', has_length=0)
11791         pkt.Request((26, 280), [
11792                 rec( 8, 1, NameSpace  ),
11793                 rec( 9, 1, DataStream ),
11794                 rec( 10, 2, SearchAttributesLow ),
11795                 rec( 12, 2, ReturnInfoMask ),
11796                 rec( 14, 2, ExtendedInfo ),
11797                 rec( 16, 9, SearchSequence ),
11798                 rec( 25, (1,255), SearchPattern ),
11799         ], info_str=(SearchPattern, "Search for: %s", "/%s"))
11800         pkt.Reply( NO_LENGTH_CHECK, [
11801                 rec( 8, 9, SearchSequence ),
11802                 rec( 17, 1, Reserved ),
11803                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
11804                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
11805                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
11806                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
11807                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
11808                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
11809                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
11810                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
11811                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
11812                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
11813                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
11814                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
11815                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
11816                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
11817                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
11818                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
11819                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
11820                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
11821                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
11822                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
11823                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
11824                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
11825                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
11826                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
11827                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
11828                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
11829                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
11830                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
11831                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
11832                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
11833                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
11834                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
11835                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
11836                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ), 
11837                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
11838                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
11839                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
11840                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ), 
11841                 srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ), 
11842                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ), 
11843                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ), 
11844                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ), 
11845                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ), 
11846                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ), 
11847                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
11848                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ), 
11849                 srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
11850         ])
11851         pkt.ReqCondSizeVariable()
11852         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11853                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11854                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11855         # 2222/5704, 87/04
11856         pkt = NCP(0x5704, "Rename Or Move a File or Subdirectory", 'file', has_length=0)
11857         pkt.Request((28, 536), [
11858                 rec( 8, 1, NameSpace  ),
11859                 rec( 9, 1, RenameFlag ),
11860                 rec( 10, 2, SearchAttributesLow ),
11861                 rec( 12, 1, VolumeNumber ),
11862                 rec( 13, 4, DirectoryBase ),
11863                 rec( 17, 1, HandleFlag ),
11864                 rec( 18, 1, PathCount, var="x" ),
11865                 rec( 19, 1, VolumeNumber ),
11866                 rec( 20, 4, DirectoryBase ),
11867                 rec( 24, 1, HandleFlag ),
11868                 rec( 25, 1, PathCount, var="y" ),
11869                 rec( 26, (1, 255), Path, repeat="x" ),
11870                 rec( -1, (1,255), Path, repeat="y" ),
11871         ], info_str=(Path, "Rename or Move: %s", "/%s"))
11872         pkt.Reply(8)
11873         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11874                              0x8701, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9200, 0x9600,
11875                              0x9804, 0x9a00, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11876         # 2222/5705, 87/05
11877         pkt = NCP(0x5705, "Scan File or Subdirectory for Trustees", 'file', has_length=0)
11878         pkt.Request((24, 278), [
11879                 rec( 8, 1, NameSpace  ),
11880                 rec( 9, 1, Reserved ),
11881                 rec( 10, 2, SearchAttributesLow ),
11882                 rec( 12, 4, SequenceNumber ),
11883                 rec( 16, 1, VolumeNumber ),
11884                 rec( 17, 4, DirectoryBase ),
11885                 rec( 21, 1, HandleFlag ),
11886                 rec( 22, 1, PathCount, var="x" ),
11887                 rec( 23, (1, 255), Path, repeat="x" ),
11888         ], info_str=(Path, "Scan Trustees for: %s", "/%s"))
11889         pkt.Reply(20, [
11890                 rec( 8, 4, SequenceNumber ),
11891                 rec( 12, 2, ObjectIDCount, var="x" ),
11892                 rec( 14, 6, TrusteeStruct, repeat="x" ),
11893         ])
11894         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11895                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11896                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11897         # 2222/5706, 87/06
11898         pkt = NCP(0x5706, "Obtain File or SubDirectory Information", 'file', has_length=0)
11899         pkt.Request((24,278), [
11900                 rec( 10, 1, SrcNameSpace ),
11901                 rec( 11, 1, DestNameSpace ),
11902                 rec( 12, 2, SearchAttributesLow ),
11903                 rec( 14, 2, ReturnInfoMask, LE ),
11904                 rec( 16, 2, ExtendedInfo ),
11905                 rec( 18, 1, VolumeNumber ),
11906                 rec( 19, 4, DirectoryBase ),
11907                 rec( 23, 1, HandleFlag ),
11908                 rec( 24, 1, PathCount, var="x" ),
11909                 rec( 25, (1,255), Path, repeat="x",),
11910         ], info_str=(Path, "Obtain Info for: %s", "/%s"))
11911         pkt.Reply(NO_LENGTH_CHECK, [
11912             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
11913             srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
11914             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
11915             srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
11916             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
11917             srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
11918             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
11919             srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
11920             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
11921             srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
11922             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
11923             srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
11924             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
11925             srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
11926             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
11927             srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
11928             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
11929             srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
11930             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
11931             srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
11932             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
11933             srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
11934             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
11935             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
11936             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
11937             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
11938             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
11939             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
11940             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
11941             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
11942             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
11943             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
11944             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
11945             srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ), 
11946             srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
11947             srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
11948             srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
11949             srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ), 
11950             srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ), 
11951             srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ), 
11952             srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ), 
11953             srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ), 
11954             srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ), 
11955             srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ), 
11956             srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
11957             srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ), 
11958             srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
11959         ])
11960         pkt.ReqCondSizeVariable()
11961         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11962                              0x8701, 0x8900, 0x8d00, 0x8f00, 0x9001, 0x9600,
11963                              0x9804, 0x9b03, 0x9c03, 0xa802, 0xbf00, 0xfd00, 0xff16])
11964         # 2222/5707, 87/07
11965         pkt = NCP(0x5707, "Modify File or Subdirectory DOS Information", 'file', has_length=0)
11966         pkt.Request((62,316), [
11967                 rec( 8, 1, NameSpace ),
11968                 rec( 9, 1, Reserved ),
11969                 rec( 10, 2, SearchAttributesLow ),
11970                 rec( 12, 2, ModifyDOSInfoMask ),
11971                 rec( 14, 2, Reserved2 ),
11972                 rec( 16, 2, AttributesDef16 ),
11973                 rec( 18, 1, FileMode ),
11974                 rec( 19, 1, FileExtendedAttributes ),
11975                 rec( 20, 2, CreationDate ),
11976                 rec( 22, 2, CreationTime ),
11977                 rec( 24, 4, CreatorID, BE ),
11978                 rec( 28, 2, ModifiedDate ),
11979                 rec( 30, 2, ModifiedTime ),
11980                 rec( 32, 4, ModifierID, BE ),
11981                 rec( 36, 2, ArchivedDate ),
11982                 rec( 38, 2, ArchivedTime ),
11983                 rec( 40, 4, ArchiverID, BE ),
11984                 rec( 44, 2, LastAccessedDate ),
11985                 rec( 46, 2, InheritedRightsMask ),
11986                 rec( 48, 2, InheritanceRevokeMask ),
11987                 rec( 50, 4, MaxSpace ),
11988                 rec( 54, 1, VolumeNumber ),
11989                 rec( 55, 4, DirectoryBase ),
11990                 rec( 59, 1, HandleFlag ),
11991                 rec( 60, 1, PathCount, var="x" ),
11992                 rec( 61, (1,255), Path, repeat="x" ),
11993         ], info_str=(Path, "Modify DOS Information for: %s", "/%s"))
11994         pkt.Reply(8)
11995         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11996                              0x8701, 0x8c01, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9600,
11997                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11998         # 2222/5708, 87/08
11999         pkt = NCP(0x5708, "Delete a File or Subdirectory", 'file', has_length=0)
12000         pkt.Request((20,274), [
12001                 rec( 8, 1, NameSpace ),
12002                 rec( 9, 1, Reserved ),
12003                 rec( 10, 2, SearchAttributesLow ),
12004                 rec( 12, 1, VolumeNumber ),
12005                 rec( 13, 4, DirectoryBase ),
12006                 rec( 17, 1, HandleFlag ),
12007                 rec( 18, 1, PathCount, var="x" ),
12008                 rec( 19, (1,255), Path, repeat="x" ),
12009         ], info_str=(Path, "Delete a File or Subdirectory: %s", "/%s"))
12010         pkt.Reply(8)
12011         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,  
12012                              0x8701, 0x8900, 0x8a00, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9600,
12013                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12014         # 2222/5709, 87/09
12015         pkt = NCP(0x5709, "Set Short Directory Handle", 'file', has_length=0)
12016         pkt.Request((20,274), [
12017                 rec( 8, 1, NameSpace ),
12018                 rec( 9, 1, DataStream ),
12019                 rec( 10, 1, DestDirHandle ),
12020                 rec( 11, 1, Reserved ),
12021                 rec( 12, 1, VolumeNumber ),
12022                 rec( 13, 4, DirectoryBase ),
12023                 rec( 17, 1, HandleFlag ),
12024                 rec( 18, 1, PathCount, var="x" ),
12025                 rec( 19, (1,255), Path, repeat="x" ),
12026         ], info_str=(Path, "Set Short Directory Handle to: %s", "/%s"))
12027         pkt.Reply(8)
12028         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12029                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12030                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12031         # 2222/570A, 87/10
12032         pkt = NCP(0x570A, "Add Trustee Set to File or Subdirectory", 'file', has_length=0)
12033         pkt.Request((31,285), [
12034                 rec( 8, 1, NameSpace ),
12035                 rec( 9, 1, Reserved ),
12036                 rec( 10, 2, SearchAttributesLow ),
12037                 rec( 12, 2, AccessRightsMaskWord ),
12038                 rec( 14, 2, ObjectIDCount, var="y" ),
12039                 rec( 16, 1, VolumeNumber ),
12040                 rec( 17, 4, DirectoryBase ),
12041                 rec( 21, 1, HandleFlag ),
12042                 rec( 22, 1, PathCount, var="x" ),
12043                 rec( 23, (1,255), Path, repeat="x" ),
12044                 rec( -1, 7, TrusteeStruct, repeat="y" ),
12045         ], info_str=(Path, "Add Trustee Set to: %s", "/%s"))
12046         pkt.Reply(8)
12047         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12048                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12049                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfc01, 0xfd00, 0xff16])
12050         # 2222/570B, 87/11
12051         pkt = NCP(0x570B, "Delete Trustee Set from File or SubDirectory", 'file', has_length=0)
12052         pkt.Request((27,281), [
12053                 rec( 8, 1, NameSpace ),
12054                 rec( 9, 1, Reserved ),
12055                 rec( 10, 2, ObjectIDCount, var="y" ),
12056                 rec( 12, 1, VolumeNumber ),
12057                 rec( 13, 4, DirectoryBase ),
12058                 rec( 17, 1, HandleFlag ),
12059                 rec( 18, 1, PathCount, var="x" ),
12060                 rec( 19, (1,255), Path, repeat="x" ),
12061                 rec( -1, 7, TrusteeStruct, repeat="y" ),
12062         ], info_str=(Path, "Delete Trustee Set from: %s", "/%s"))
12063         pkt.Reply(8)
12064         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12065                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12066                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12067         # 2222/570C, 87/12
12068         pkt = NCP(0x570C, "Allocate Short Directory Handle", 'file', has_length=0)
12069         pkt.Request((20,274), [
12070                 rec( 8, 1, NameSpace ),
12071                 rec( 9, 1, Reserved ),
12072                 rec( 10, 2, AllocateMode ),
12073                 rec( 12, 1, VolumeNumber ),
12074                 rec( 13, 4, DirectoryBase ),
12075                 rec( 17, 1, HandleFlag ),
12076                 rec( 18, 1, PathCount, var="x" ),
12077                 rec( 19, (1,255), Path, repeat="x" ),
12078         ], info_str=(Path, "Allocate Short Directory Handle to: %s", "/%s"))
12079         pkt.Reply(14, [
12080                 rec( 8, 1, DirHandle ),
12081                 rec( 9, 1, VolumeNumber ),
12082                 rec( 10, 4, Reserved4 ),
12083         ])
12084         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12085                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12086                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12087         # 2222/5710, 87/16
12088         pkt = NCP(0x5710, "Scan Salvageable Files", 'file', has_length=0)
12089         pkt.Request((26,280), [
12090                 rec( 8, 1, NameSpace ),
12091                 rec( 9, 1, DataStream ),
12092                 rec( 10, 2, ReturnInfoMask ),
12093                 rec( 12, 2, ExtendedInfo ),
12094                 rec( 14, 4, SequenceNumber ),
12095                 rec( 18, 1, VolumeNumber ),
12096                 rec( 19, 4, DirectoryBase ),
12097                 rec( 23, 1, HandleFlag ),
12098                 rec( 24, 1, PathCount, var="x" ),
12099                 rec( 25, (1,255), Path, repeat="x" ),
12100         ], info_str=(Path, "Scan for Deleted Files in: %s", "/%s"))
12101         pkt.Reply(NO_LENGTH_CHECK, [
12102                 rec( 8, 4, SequenceNumber ),
12103                 rec( 12, 2, DeletedTime ),
12104                 rec( 14, 2, DeletedDate ),
12105                 rec( 16, 4, DeletedID, BE ),
12106                 rec( 20, 4, VolumeID ),
12107                 rec( 24, 4, DirectoryBase ),
12108                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12109                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12110                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12111                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12112                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12113                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12114                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12115                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12116                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12117                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12118                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12119                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12120                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12121                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12122                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12123                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12124                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12125                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12126                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12127                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12128                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12129                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12130                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12131                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12132                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12133                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12134                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12135                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12136                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12137                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12138                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12139                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12140                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12141                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12142                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12143         ])
12144         pkt.ReqCondSizeVariable()
12145         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12146                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12147                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12148         # 2222/5711, 87/17
12149         pkt = NCP(0x5711, "Recover Salvageable File", 'file', has_length=0)
12150         pkt.Request((23,277), [
12151                 rec( 8, 1, NameSpace ),
12152                 rec( 9, 1, Reserved ),
12153                 rec( 10, 4, SequenceNumber ),
12154                 rec( 14, 4, VolumeID ),
12155                 rec( 18, 4, DirectoryBase ),
12156                 rec( 22, (1,255), FileName ),
12157         ], info_str=(FileName, "Recover Deleted File: %s", ", %s"))
12158         pkt.Reply(8)
12159         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12160                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12161                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12162         # 2222/5712, 87/18
12163         pkt = NCP(0x5712, "Purge Salvageable Files", 'file', has_length=0)
12164         pkt.Request(22, [
12165                 rec( 8, 1, NameSpace ),
12166                 rec( 9, 1, Reserved ),
12167                 rec( 10, 4, SequenceNumber ),
12168                 rec( 14, 4, VolumeID ),
12169                 rec( 18, 4, DirectoryBase ),
12170         ])
12171         pkt.Reply(8)
12172         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12173                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12174                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12175         # 2222/5713, 87/19
12176         pkt = NCP(0x5713, "Get Name Space Information", 'file', has_length=0)
12177         pkt.Request(18, [
12178                 rec( 8, 1, SrcNameSpace ),
12179                 rec( 9, 1, DestNameSpace ),
12180                 rec( 10, 1, Reserved ),
12181                 rec( 11, 1, VolumeNumber ),
12182                 rec( 12, 4, DirectoryBase ),
12183                 rec( 16, 2, NamesSpaceInfoMask ),
12184         ])
12185         pkt.Reply(NO_LENGTH_CHECK, [
12186             srec( FileNameStruct, req_cond="ncp.ns_info_mask_modify == TRUE" ),
12187             srec( FileAttributesStruct, req_cond="ncp.ns_info_mask_fatt == TRUE" ),
12188             srec( CreationDateStruct, req_cond="ncp.ns_info_mask_cdate == TRUE" ),
12189             srec( CreationTimeStruct, req_cond="ncp.ns_info_mask_ctime == TRUE" ),
12190             srec( OwnerIDStruct, req_cond="ncp.ns_info_mask_owner == TRUE" ),
12191             srec( ArchiveDateStruct, req_cond="ncp.ns_info_mask_adate == TRUE" ),
12192             srec( ArchiveTimeStruct, req_cond="ncp.ns_info_mask_atime == TRUE" ),
12193             srec( ArchiveIdStruct, req_cond="ncp.ns_info_mask_aid == TRUE" ),
12194             srec( UpdateDateStruct, req_cond="ncp.ns_info_mask_udate == TRUE" ),
12195             srec( UpdateTimeStruct, req_cond="ncp.ns_info_mask_utime == TRUE" ),
12196             srec( UpdateIDStruct, req_cond="ncp.ns_info_mask_uid == TRUE" ),
12197             srec( LastAccessStruct, req_cond="ncp.ns_info_mask_acc_date == TRUE" ),
12198             srec( RightsInfoStruct, req_cond="ncp.ns_info_mask_max_acc_mask == TRUE" ),
12199         ])
12200         pkt.ReqCondSizeVariable()
12201         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12202                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12203                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12204         # 2222/5714, 87/20
12205         pkt = NCP(0x5714, "Search for File or Subdirectory Set", 'file', has_length=0)
12206         pkt.Request((28, 282), [
12207                 rec( 8, 1, NameSpace  ),
12208                 rec( 9, 1, DataStream ),
12209                 rec( 10, 2, SearchAttributesLow ),
12210                 rec( 12, 2, ReturnInfoMask ),
12211                 rec( 14, 2, ExtendedInfo ),
12212                 rec( 16, 2, ReturnInfoCount ),
12213                 rec( 18, 9, SearchSequence ),
12214                 rec( 27, (1,255), SearchPattern ),
12215         ])
12216         pkt.Reply(NO_LENGTH_CHECK, [
12217                 rec( 8, 9, SearchSequence ),
12218                 rec( 17, 1, MoreFlag ),
12219                 rec( 18, 2, InfoCount ),
12220             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12221             srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12222             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12223             srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12224             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12225             srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12226             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12227             srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12228             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12229             srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12230             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12231             srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12232             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12233             srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12234             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12235             srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12236             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12237             srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12238             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12239             srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12240             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12241             srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12242             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12243             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12244             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12245             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12246             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12247             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12248             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12249             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12250             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12251             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12252             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12253             srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ), 
12254             srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
12255             srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
12256             srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
12257             srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ), 
12258             srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ), 
12259             srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ), 
12260             srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ), 
12261             srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ), 
12262             srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ), 
12263             srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ), 
12264             srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
12265             srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ), 
12266             srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
12267         ])
12268         pkt.ReqCondSizeVariable()
12269         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12270                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12271                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12272         # 2222/5715, 87/21
12273         pkt = NCP(0x5715, "Get Path String from Short Directory Handle", 'file', has_length=0)
12274         pkt.Request(10, [
12275                 rec( 8, 1, NameSpace ),
12276                 rec( 9, 1, DirHandle ),
12277         ])
12278         pkt.Reply((9,263), [
12279                 rec( 8, (1,255), Path ),
12280         ])
12281         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12282                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12283                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
12284         # 2222/5716, 87/22
12285         pkt = NCP(0x5716, "Generate Directory Base and Volume Number", 'file', has_length=0)
12286         pkt.Request((20,274), [
12287                 rec( 8, 1, SrcNameSpace ),
12288                 rec( 9, 1, DestNameSpace ),
12289                 rec( 10, 2, dstNSIndicator ),
12290                 rec( 12, 1, VolumeNumber ),
12291                 rec( 13, 4, DirectoryBase ),
12292                 rec( 17, 1, HandleFlag ),
12293                 rec( 18, 1, PathCount, var="x" ),
12294                 rec( 19, (1,255), Path, repeat="x" ),
12295         ], info_str=(Path, "Get Volume and Directory Base from: %s", "/%s"))
12296         pkt.Reply(17, [
12297                 rec( 8, 4, DirectoryBase ),
12298                 rec( 12, 4, DOSDirectoryBase ),
12299                 rec( 16, 1, VolumeNumber ),
12300         ])
12301         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12302                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12303                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12304         # 2222/5717, 87/23
12305         pkt = NCP(0x5717, "Query Name Space Information Format", 'file', has_length=0)
12306         pkt.Request(10, [
12307                 rec( 8, 1, NameSpace ),
12308                 rec( 9, 1, VolumeNumber ),
12309         ])
12310         pkt.Reply(58, [
12311                 rec( 8, 4, FixedBitMask ),
12312                 rec( 12, 4, VariableBitMask ),
12313                 rec( 16, 4, HugeBitMask ),
12314                 rec( 20, 2, FixedBitsDefined ),
12315                 rec( 22, 2, VariableBitsDefined ),
12316                 rec( 24, 2, HugeBitsDefined ),
12317                 rec( 26, 32, FieldsLenTable ),
12318         ])
12319         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12320                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12321                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12322         # 2222/5718, 87/24
12323         pkt = NCP(0x5718, "Get Name Spaces Loaded List from Volume Number", 'file', has_length=0)
12324         pkt.Request(10, [
12325                 rec( 8, 1, Reserved ),
12326                 rec( 9, 1, VolumeNumber ),
12327         ])
12328         pkt.Reply(11, [
12329                 rec( 8, 2, NumberOfNSLoaded, var="x" ),
12330                 rec( 10, 1, NameSpace, repeat="x" ),
12331         ])
12332         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12333                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12334                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12335         # 2222/5719, 87/25
12336         pkt = NCP(0x5719, "Set Name Space Information", 'file', has_length=0)
12337         pkt.Request(531, [
12338                 rec( 8, 1, SrcNameSpace ),
12339                 rec( 9, 1, DestNameSpace ),
12340                 rec( 10, 1, VolumeNumber ),
12341                 rec( 11, 4, DirectoryBase ),
12342                 rec( 15, 2, NamesSpaceInfoMask ),
12343                 rec( 17, 2, Reserved2 ),
12344                 rec( 19, 512, NSSpecificInfo ),
12345         ])
12346         pkt.Reply(8)
12347         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12348                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12349                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12350                              0xff16])
12351         # 2222/571A, 87/26
12352         pkt = NCP(0x571A, "Get Huge Name Space Information", 'file', has_length=0)
12353         pkt.Request(34, [
12354                 rec( 8, 1, NameSpace ),
12355                 rec( 9, 1, VolumeNumber ),
12356                 rec( 10, 4, DirectoryBase ),
12357                 rec( 14, 4, HugeBitMask ),
12358                 rec( 18, 16, HugeStateInfo ),
12359         ])
12360         pkt.Reply((25,279), [
12361                 rec( 8, 16, NextHugeStateInfo ),
12362                 rec( 24, (1,255), HugeData ),
12363         ])
12364         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12365                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12366                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12367                              0xff16])
12368         # 2222/571B, 87/27
12369         pkt = NCP(0x571B, "Set Huge Name Space Information", 'file', has_length=0)
12370         pkt.Request((35,289), [
12371                 rec( 8, 1, NameSpace ),
12372                 rec( 9, 1, VolumeNumber ),
12373                 rec( 10, 4, DirectoryBase ),
12374                 rec( 14, 4, HugeBitMask ),
12375                 rec( 18, 16, HugeStateInfo ),
12376                 rec( 34, (1,255), HugeData ),
12377         ])
12378         pkt.Reply(28, [
12379                 rec( 8, 16, NextHugeStateInfo ),
12380                 rec( 24, 4, HugeDataUsed ),
12381         ])
12382         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12383                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12384                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12385                              0xff16])
12386         # 2222/571C, 87/28
12387         pkt = NCP(0x571C, "Get Full Path String", 'file', has_length=0)
12388         pkt.Request((28,282), [
12389                 rec( 8, 1, SrcNameSpace ),
12390                 rec( 9, 1, DestNameSpace ),
12391                 rec( 10, 2, PathCookieFlags ),
12392                 rec( 12, 4, Cookie1 ),
12393                 rec( 16, 4, Cookie2 ),
12394                 rec( 20, 1, VolumeNumber ),
12395                 rec( 21, 4, DirectoryBase ),
12396                 rec( 25, 1, HandleFlag ),
12397                 rec( 26, 1, PathCount, var="x" ),
12398                 rec( 27, (1,255), Path, repeat="x" ),
12399         ], info_str=(Path, "Get Full Path from: %s", "/%s"))
12400         pkt.Reply((23,277), [
12401                 rec( 8, 2, PathCookieFlags ),
12402                 rec( 10, 4, Cookie1 ),
12403                 rec( 14, 4, Cookie2 ),
12404                 rec( 18, 2, PathComponentSize ),
12405                 rec( 20, 2, PathComponentCount, var='x' ),
12406                 rec( 22, (1,255), Path, repeat='x' ),
12407         ])
12408         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12409                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12410                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12411                              0xff16])
12412         # 2222/571D, 87/29
12413         pkt = NCP(0x571D, "Get Effective Directory Rights", 'file', has_length=0)
12414         pkt.Request((24, 278), [
12415                 rec( 8, 1, NameSpace  ),
12416                 rec( 9, 1, DestNameSpace ),
12417                 rec( 10, 2, SearchAttributesLow ),
12418                 rec( 12, 2, ReturnInfoMask ),
12419                 rec( 14, 2, ExtendedInfo ),
12420                 rec( 16, 1, VolumeNumber ),
12421                 rec( 17, 4, DirectoryBase ),
12422                 rec( 21, 1, HandleFlag ),
12423                 rec( 22, 1, PathCount, var="x" ),
12424                 rec( 23, (1,255), Path, repeat="x" ),
12425         ], info_str=(Path, "Get Effective Rights for: %s", "/%s"))
12426         pkt.Reply(NO_LENGTH_CHECK, [
12427                 rec( 8, 2, EffectiveRights ),
12428                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12429                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12430                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12431                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12432                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12433                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12434                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12435                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12436                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12437                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12438                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12439                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12440                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12441                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12442                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12443                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12444                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12445                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12446                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12447                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12448                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12449                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12450                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12451                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12452                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12453                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12454                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12455                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12456                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12457                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12458                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12459                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12460                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12461                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12462                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12463         ])
12464         pkt.ReqCondSizeVariable()
12465         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12466                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12467                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12468         # 2222/571E, 87/30
12469         pkt = NCP(0x571E, "Open/Create File or Subdirectory", 'file', has_length=0)
12470         pkt.Request((34, 288), [
12471                 rec( 8, 1, NameSpace  ),
12472                 rec( 9, 1, DataStream ),
12473                 rec( 10, 1, OpenCreateMode ),
12474                 rec( 11, 1, Reserved ),
12475                 rec( 12, 2, SearchAttributesLow ),
12476                 rec( 14, 2, Reserved2 ),
12477                 rec( 16, 2, ReturnInfoMask ),
12478                 rec( 18, 2, ExtendedInfo ),
12479                 rec( 20, 4, AttributesDef32 ),
12480                 rec( 24, 2, DesiredAccessRights ),
12481                 rec( 26, 1, VolumeNumber ),
12482                 rec( 27, 4, DirectoryBase ),
12483                 rec( 31, 1, HandleFlag ),
12484                 rec( 32, 1, PathCount, var="x" ),
12485                 rec( 33, (1,255), Path, repeat="x" ),
12486         ], info_str=(Path, "Open or Create File: %s", "/%s"))
12487         pkt.Reply(NO_LENGTH_CHECK, [
12488                 rec( 8, 4, FileHandle, BE ),
12489                 rec( 12, 1, OpenCreateAction ),
12490                 rec( 13, 1, Reserved ),
12491                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12492                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12493                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12494                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12495                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12496                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12497                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12498                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12499                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12500                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12501                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12502                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12503                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12504                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12505                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12506                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12507                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12508                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12509                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12510                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12511                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12512                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12513                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12514                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12515                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12516                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12517                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12518                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12519                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12520                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12521                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12522                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12523                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12524                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12525                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12526         ])
12527         pkt.ReqCondSizeVariable()
12528         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12529                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12530                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12531         # 2222/571F, 87/31
12532         pkt = NCP(0x571F, "Get File Information", 'file', has_length=0)
12533         pkt.Request(16, [
12534                 rec( 8, 6, FileHandle  ),
12535                 rec( 14, 1, HandleInfoLevel ),
12536                 rec( 15, 1, NameSpace ),
12537         ])
12538         pkt.Reply(NO_LENGTH_CHECK, [
12539                 rec( 8, 4, VolumeNumberLong ),
12540                 rec( 12, 4, DirectoryBase ),
12541                 srec(HandleInfoLevel0, req_cond="ncp.handle_info_level==0x00" ),
12542                 srec(HandleInfoLevel1, req_cond="ncp.handle_info_level==0x01" ),
12543                 srec(HandleInfoLevel2, req_cond="ncp.handle_info_level==0x02" ),
12544                 srec(HandleInfoLevel3, req_cond="ncp.handle_info_level==0x03" ),
12545                 srec(HandleInfoLevel4, req_cond="ncp.handle_info_level==0x04" ),
12546                 srec(HandleInfoLevel5, req_cond="ncp.handle_info_level==0x05" ),
12547         ])
12548         pkt.ReqCondSizeVariable()
12549         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12550                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12551                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12552         # 2222/5720, 87/32 
12553         pkt = NCP(0x5720, "Open/Create File or Subdirectory with Callback", 'file', has_length=0)
12554         pkt.Request((30, 284), [
12555                 rec( 8, 1, NameSpace  ),
12556                 rec( 9, 1, OpenCreateMode ),
12557                 rec( 10, 2, SearchAttributesLow ),
12558                 rec( 12, 2, ReturnInfoMask ),
12559                 rec( 14, 2, ExtendedInfo ),
12560                 rec( 16, 4, AttributesDef32 ),
12561                 rec( 20, 2, DesiredAccessRights ),
12562                 rec( 22, 1, VolumeNumber ),
12563                 rec( 23, 4, DirectoryBase ),
12564                 rec( 27, 1, HandleFlag ),
12565                 rec( 28, 1, PathCount, var="x" ),
12566                 rec( 29, (1,255), Path, repeat="x" ),
12567         ], info_str=(Path, "Open or Create with Op-Lock: %s", "/%s"))
12568         pkt.Reply( NO_LENGTH_CHECK, [
12569                 rec( 8, 4, FileHandle, BE ),
12570                 rec( 12, 1, OpenCreateAction ),
12571                 rec( 13, 1, OCRetFlags ),
12572                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12573                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12574                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12575                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12576                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12577                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12578                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12579                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12580                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12581                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12582                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12583                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12584                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12585                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12586                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12587                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12588                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12589                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12590                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12591                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12592                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12593                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12594                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12595                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12596                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12597                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12598                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12599                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12600                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12601                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12602                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12603                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12604                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12605                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ), 
12606                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
12607                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
12608                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
12609                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ), 
12610                 srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ), 
12611                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ), 
12612                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ), 
12613                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ), 
12614                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ), 
12615                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ), 
12616                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
12617                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ), 
12618                 srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
12619         ])
12620         pkt.ReqCondSizeVariable()
12621         pkt.CompletionCodes([0x0000, 0x7f00, 0x8000, 0x8101, 0x8401, 0x8501,
12622                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12623                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12624         # 2222/5721, 87/33
12625         pkt = NCP(0x5721, "Open/Create File or Subdirectory II with Callback", 'file', has_length=0)
12626         pkt.Request((34, 288), [
12627                 rec( 8, 1, NameSpace  ),
12628                 rec( 9, 1, DataStream ),
12629                 rec( 10, 1, OpenCreateMode ),
12630                 rec( 11, 1, Reserved ),
12631                 rec( 12, 2, SearchAttributesLow ),
12632                 rec( 14, 2, Reserved2 ),
12633                 rec( 16, 2, ReturnInfoMask ),
12634                 rec( 18, 2, ExtendedInfo ),
12635                 rec( 20, 4, AttributesDef32 ),
12636                 rec( 24, 2, DesiredAccessRights ),
12637                 rec( 26, 1, VolumeNumber ),
12638                 rec( 27, 4, DirectoryBase ),
12639                 rec( 31, 1, HandleFlag ),
12640                 rec( 32, 1, PathCount, var="x" ),
12641                 rec( 33, (1,255), Path, repeat="x" ),
12642         ], info_str=(FilePath, "Open or Create II with Op-Lock: %s", "/%s"))
12643         pkt.Reply((91,345), [
12644                 rec( 8, 4, FileHandle ),
12645                 rec( 12, 1, OpenCreateAction ),
12646                 rec( 13, 1, OCRetFlags ),
12647                 rec( 14, 4, DataStreamSpaceAlloc ),
12648                 rec( 18, 6, AttributesStruct ),
12649                 rec( 24, 4, DataStreamSize ),
12650                 rec( 28, 4, TtlDSDskSpaceAlloc ),
12651                 rec( 32, 2, NumberOfDataStreams ),
12652                 rec( 34, 2, CreationTime ),
12653                 rec( 36, 2, CreationDate ),
12654                 rec( 38, 4, CreatorID, BE ),
12655                 rec( 42, 2, ModifiedTime ),
12656                 rec( 44, 2, ModifiedDate ),
12657                 rec( 46, 4, ModifierID, BE ),
12658                 rec( 50, 2, LastAccessedDate ),
12659                 rec( 52, 2, ArchivedTime ),
12660                 rec( 54, 2, ArchivedDate ),
12661                 rec( 56, 4, ArchiverID, BE ),
12662                 rec( 60, 2, InheritedRightsMask ),
12663                 rec( 62, 4, DirectoryEntryNumber ),
12664                 rec( 66, 4, DOSDirectoryEntryNumber ),
12665                 rec( 70, 4, VolumeNumberLong ),
12666                 rec( 74, 4, EADataSize ),
12667                 rec( 78, 4, EACount ),
12668                 rec( 82, 4, EAKeySize ),
12669                 rec( 86, 1, CreatorNameSpaceNumber ),
12670                 rec( 87, 3, Reserved3 ),
12671                 rec( 90, (1,255), FileName ),
12672         ])
12673         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12674                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12675                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12676         # 2222/5722, 87/34
12677         pkt = NCP(0x5722, "Open CallBack Control (Op-Lock)", 'file', has_length=0)
12678         pkt.Request(13, [
12679                 rec( 10, 4, CCFileHandle ),
12680                 rec( 14, 1, CCFunction ),
12681         ])
12682         pkt.Reply(8)
12683         pkt.CompletionCodes([0x0000, 0x8800, 0xff16])
12684         # 2222/5723, 87/35
12685         pkt = NCP(0x5723, "Modify DOS Attributes on a File or Subdirectory", 'file', has_length=0)
12686         pkt.Request((28, 282), [
12687                 rec( 8, 1, NameSpace  ),
12688                 rec( 9, 1, Flags ),
12689                 rec( 10, 2, SearchAttributesLow ),
12690                 rec( 12, 2, ReturnInfoMask ),
12691                 rec( 14, 2, ExtendedInfo ),
12692                 rec( 16, 4, AttributesDef32 ),
12693                 rec( 20, 1, VolumeNumber ),
12694                 rec( 21, 4, DirectoryBase ),
12695                 rec( 25, 1, HandleFlag ),
12696                 rec( 26, 1, PathCount, var="x" ),
12697                 rec( 27, (1,255), Path, repeat="x" ),
12698         ], info_str=(Path, "Modify DOS Attributes for: %s", "/%s"))
12699         pkt.Reply(24, [
12700                 rec( 8, 4, ItemsChecked ),
12701                 rec( 12, 4, ItemsChanged ),
12702                 rec( 16, 4, AttributeValidFlag ),
12703                 rec( 20, 4, AttributesDef32 ),
12704         ])
12705         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12706                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12707                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12708         # 2222/5724, 87/36
12709         pkt = NCP(0x5724, "Log File", 'file', has_length=0)
12710         pkt.Request((28, 282), [
12711                 rec( 8, 1, NameSpace  ),
12712                 rec( 9, 1, Reserved ),
12713                 rec( 10, 2, Reserved2 ),
12714                 rec( 12, 1, LogFileFlagLow ),
12715                 rec( 13, 1, LogFileFlagHigh ),
12716                 rec( 14, 2, Reserved2 ),
12717                 rec( 16, 4, WaitTime ),
12718                 rec( 20, 1, VolumeNumber ),
12719                 rec( 21, 4, DirectoryBase ),
12720                 rec( 25, 1, HandleFlag ),
12721                 rec( 26, 1, PathCount, var="x" ),
12722                 rec( 27, (1,255), Path, repeat="x" ),
12723         ], info_str=(Path, "Lock File: %s", "/%s"))
12724         pkt.Reply(8)
12725         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12726                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12727                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12728         # 2222/5725, 87/37
12729         pkt = NCP(0x5725, "Release File", 'file', has_length=0)
12730         pkt.Request((20, 274), [
12731                 rec( 8, 1, NameSpace  ),
12732                 rec( 9, 1, Reserved ),
12733                 rec( 10, 2, Reserved2 ),
12734                 rec( 12, 1, VolumeNumber ),
12735                 rec( 13, 4, DirectoryBase ),
12736                 rec( 17, 1, HandleFlag ),
12737                 rec( 18, 1, PathCount, var="x" ),
12738                 rec( 19, (1,255), Path, repeat="x" ),
12739         ], info_str=(Path, "Release Lock on: %s", "/%s"))
12740         pkt.Reply(8)
12741         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12742                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12743                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12744         # 2222/5726, 87/38
12745         pkt = NCP(0x5726, "Clear File", 'file', has_length=0)
12746         pkt.Request((20, 274), [
12747                 rec( 8, 1, NameSpace  ),
12748                 rec( 9, 1, Reserved ),
12749                 rec( 10, 2, Reserved2 ),
12750                 rec( 12, 1, VolumeNumber ),
12751                 rec( 13, 4, DirectoryBase ),
12752                 rec( 17, 1, HandleFlag ),
12753                 rec( 18, 1, PathCount, var="x" ),
12754                 rec( 19, (1,255), Path, repeat="x" ),
12755         ], info_str=(Path, "Clear File: %s", "/%s"))
12756         pkt.Reply(8)
12757         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12758                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12759                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12760         # 2222/5727, 87/39
12761         pkt = NCP(0x5727, "Get Directory Disk Space Restriction", 'file', has_length=0)
12762         pkt.Request((19, 273), [
12763                 rec( 8, 1, NameSpace  ),
12764                 rec( 9, 2, Reserved2 ),
12765                 rec( 11, 1, VolumeNumber ),
12766                 rec( 12, 4, DirectoryBase ),
12767                 rec( 16, 1, HandleFlag ),
12768                 rec( 17, 1, PathCount, var="x" ),
12769                 rec( 18, (1,255), Path, repeat="x" ),
12770         ], info_str=(Path, "Get Disk Space Restriction for: %s", "/%s"))
12771         pkt.Reply(18, [
12772                 rec( 8, 1, NumberOfEntries, var="x" ),
12773                 rec( 9, 9, SpaceStruct, repeat="x" ),
12774         ])
12775         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12776                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12777                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12778                              0xff16])
12779         # 2222/5728, 87/40
12780         pkt = NCP(0x5728, "Search for File or Subdirectory Set (Extended Errors)", 'file', has_length=0)
12781         pkt.Request((28, 282), [
12782                 rec( 8, 1, NameSpace  ),
12783                 rec( 9, 1, DataStream ),
12784                 rec( 10, 2, SearchAttributesLow ),
12785                 rec( 12, 2, ReturnInfoMask ),
12786                 rec( 14, 2, ExtendedInfo ),
12787                 rec( 16, 2, ReturnInfoCount ),
12788                 rec( 18, 9, SearchSequence ),
12789                 rec( 27, (1,255), SearchPattern ),
12790         ], info_str=(SearchPattern, "Search for: %s", ", %s"))
12791         pkt.Reply(NO_LENGTH_CHECK, [
12792                 rec( 8, 9, SearchSequence ),
12793                 rec( 17, 1, MoreFlag ),
12794                 rec( 18, 2, InfoCount ),
12795                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12796                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12797                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12798                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12799                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12800                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12801                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12802                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12803                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12804                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12805                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12806                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12807                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12808                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12809                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12810                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12811                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12812                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12813                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12814                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12815                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12816                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12817                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12818                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12819                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12820                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12821                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12822                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12823                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12824                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12825                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12826                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12827                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12828                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12829                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12830         ])
12831         pkt.ReqCondSizeVariable()
12832         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12833                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12834                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12835         # 2222/5729, 87/41
12836         pkt = NCP(0x5729, "Scan Salvageable Files", 'file', has_length=0)
12837         pkt.Request((24,278), [
12838                 rec( 8, 1, NameSpace ),
12839                 rec( 9, 1, Reserved ),
12840                 rec( 10, 2, CtrlFlags, LE ),
12841                 rec( 12, 4, SequenceNumber ),
12842                 rec( 16, 1, VolumeNumber ),
12843                 rec( 17, 4, DirectoryBase ),
12844                 rec( 21, 1, HandleFlag ),
12845                 rec( 22, 1, PathCount, var="x" ),
12846                 rec( 23, (1,255), Path, repeat="x" ),
12847         ], info_str=(Path, "Scan Deleted Files: %s", "/%s"))
12848         pkt.Reply(NO_LENGTH_CHECK, [
12849                 rec( 8, 4, SequenceNumber ),
12850                 rec( 12, 4, DirectoryBase ),
12851                 rec( 16, 4, ScanItems, var="x" ),
12852                 srec(ScanInfoFileName, req_cond="ncp.ctrl_flags==0x0001", repeat="x" ),
12853                 srec(ScanInfoFileNoName, req_cond="ncp.ctrl_flags==0x0000", repeat="x" ),
12854         ])
12855         pkt.ReqCondSizeVariable()
12856         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12857                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12858                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12859         # 2222/572A, 87/42
12860         pkt = NCP(0x572A, "Purge Salvageable File List", 'file', has_length=0)
12861         pkt.Request(28, [
12862                 rec( 8, 1, NameSpace ),
12863                 rec( 9, 1, Reserved ),
12864                 rec( 10, 2, PurgeFlags ),
12865                 rec( 12, 4, VolumeNumberLong ),
12866                 rec( 16, 4, DirectoryBase ),
12867                 rec( 20, 4, PurgeCount, var="x" ),
12868                 rec( 24, 4, PurgeList, repeat="x" ),
12869         ])
12870         pkt.Reply(16, [
12871                 rec( 8, 4, PurgeCount, var="x" ),
12872                 rec( 12, 4, PurgeCcode, repeat="x" ),
12873         ])
12874         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12875                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12876                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12877         # 2222/572B, 87/43
12878         pkt = NCP(0x572B, "Revoke File Handle Rights", 'file', has_length=0)
12879         pkt.Request(17, [
12880                 rec( 8, 3, Reserved3 ),
12881                 rec( 11, 1, RevQueryFlag ),
12882                 rec( 12, 4, FileHandle ),
12883                 rec( 16, 1, RemoveOpenRights ),
12884         ])
12885         pkt.Reply(13, [
12886                 rec( 8, 4, FileHandle ),
12887                 rec( 12, 1, OpenRights ),
12888         ])
12889         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12890                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12891                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12892         # 2222/572C, 87/44
12893         pkt = NCP(0x572C, "Update File Handle Rights", 'file', has_length=0)
12894         pkt.Request(24, [
12895                 rec( 8, 2, Reserved2 ),
12896                 rec( 10, 1, VolumeNumber ),
12897                 rec( 11, 1, NameSpace ),
12898                 rec( 12, 4, DirectoryNumber ),
12899                 rec( 16, 2, AccessRightsMaskWord ),
12900                 rec( 18, 2, NewAccessRights ),
12901                 rec( 20, 4, FileHandle, BE ),
12902         ])
12903         pkt.Reply(16, [
12904                 rec( 8, 4, FileHandle, BE ),
12905                 rec( 12, 4, EffectiveRights ),
12906         ])
12907         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12908                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12909                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12910         # 2222/5742, 87/66
12911         pkt = NCP(0x5742, "Novell Advanced Auditing Service (NAAS)", 'auditing', has_length=0)
12912         pkt.Request(8)
12913         pkt.Reply(8)
12914         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12915                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12916                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12917         # 2222/5801, 8801
12918         pkt = NCP(0x5801, "Query Volume Audit Status", "auditing", has_length=0)
12919         pkt.Request(12, [
12920                 rec( 8, 4, ConnectionNumber ),
12921         ])
12922         pkt.Reply(40, [
12923                 rec(8, 32, NWAuditStatus ),
12924         ])
12925         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12926                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12927                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12928         # 2222/5802, 8802
12929         pkt = NCP(0x5802, "Add User Audit Property", "auditing", has_length=0)
12930         pkt.Request(25, [
12931                 rec(8, 4, AuditIDType ),
12932                 rec(12, 4, AuditID ),
12933                 rec(16, 4, AuditHandle ),
12934                 rec(20, 4, ObjectID ),
12935                 rec(24, 1, AuditFlag ),
12936         ])
12937         pkt.Reply(8)
12938         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12939                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12940                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12941         # 2222/5803, 8803
12942         pkt = NCP(0x5803, "Add Auditor Access", "auditing", has_length=0)
12943         pkt.Request(8)
12944         pkt.Reply(8)
12945         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12946                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12947                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12948         # 2222/5804, 8804
12949         pkt = NCP(0x5804, "Change Auditor Volume Password", "auditing", has_length=0)
12950         pkt.Request(8)
12951         pkt.Reply(8)
12952         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12953                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12954                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12955         # 2222/5805, 8805
12956         pkt = NCP(0x5805, "Check Auditor Access", "auditing", has_length=0)
12957         pkt.Request(8)
12958         pkt.Reply(8)
12959         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12960                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12961                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12962         # 2222/5806, 8806
12963         pkt = NCP(0x5806, "Delete User Audit Property", "auditing", has_length=0)
12964         pkt.Request(8)
12965         pkt.Reply(8)
12966         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12967                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12968                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12969         # 2222/5807, 8807
12970         pkt = NCP(0x5807, "Disable Auditing On A Volume", "auditing", has_length=0)
12971         pkt.Request(8)
12972         pkt.Reply(8)
12973         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12974                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12975                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12976         # 2222/5808, 8808
12977         pkt = NCP(0x5808, "Enable Auditing On A Volume", "auditing", has_length=0)
12978         pkt.Request(8)
12979         pkt.Reply(8)
12980         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12981                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12982                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12983         # 2222/5809, 8809
12984         pkt = NCP(0x5809, "Query User Being Audited", "auditing", has_length=0)
12985         pkt.Request(8)
12986         pkt.Reply(8)
12987         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12988                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12989                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12990         # 2222/580A, 88,10
12991         pkt = NCP(0x580A, "Read Audit Bit Map", "auditing", has_length=0)
12992         pkt.Request(8)
12993         pkt.Reply(8)
12994         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12995                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12996                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12997         # 2222/580B, 88,11
12998         pkt = NCP(0x580B, "Read Audit File Configuration Header", "auditing", has_length=0)
12999         pkt.Request(8)
13000         pkt.Reply(8)
13001         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13002                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13003                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13004         # 2222/580D, 88,13
13005         pkt = NCP(0x580D, "Remove Auditor Access", "auditing", has_length=0)
13006         pkt.Request(8)
13007         pkt.Reply(8)
13008         pkt.CompletionCodes([0x0000, 0x300, 0x8000, 0x8101, 0x8401, 0x8501,
13009                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13010                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13011         # 2222/580E, 88,14
13012         pkt = NCP(0x580E, "Reset Audit File", "auditing", has_length=0)
13013         pkt.Request(8)
13014         pkt.Reply(8)
13015         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13016                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13017                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13018                              
13019         # 2222/580F, 88,15
13020         pkt = NCP(0x580F, "Auditing NCP", "auditing", has_length=0)
13021         pkt.Request(8)
13022         pkt.Reply(8)
13023         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13024                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13025                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13026         # 2222/5810, 88,16
13027         pkt = NCP(0x5810, "Write Audit Bit Map", "auditing", has_length=0)
13028         pkt.Request(8)
13029         pkt.Reply(8)
13030         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13031                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13032                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13033         # 2222/5811, 88,17
13034         pkt = NCP(0x5811, "Write Audit File Configuration Header", "auditing", has_length=0)
13035         pkt.Request(8)
13036         pkt.Reply(8)
13037         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13038                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13039                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13040         # 2222/5812, 88,18
13041         pkt = NCP(0x5812, "Change Auditor Volume Password2", "auditing", has_length=0)
13042         pkt.Request(8)
13043         pkt.Reply(8)
13044         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13045                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13046                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13047         # 2222/5813, 88,19
13048         pkt = NCP(0x5813, "Return Audit Flags", "auditing", has_length=0)
13049         pkt.Request(8)
13050         pkt.Reply(8)
13051         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13052                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13053                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13054         # 2222/5814, 88,20
13055         pkt = NCP(0x5814, "Close Old Audit File", "auditing", has_length=0)
13056         pkt.Request(8)
13057         pkt.Reply(8)
13058         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13059                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13060                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13061         # 2222/5816, 88,22
13062         pkt = NCP(0x5816, "Check Level Two Access", "auditing", has_length=0)
13063         pkt.Request(8)
13064         pkt.Reply(8)
13065         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13066                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13067                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13068         # 2222/5817, 88,23
13069         pkt = NCP(0x5817, "Return Old Audit File List", "auditing", has_length=0)
13070         pkt.Request(8)
13071         pkt.Reply(8)
13072         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13073                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13074                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13075         # 2222/5818, 88,24
13076         pkt = NCP(0x5818, "Init Audit File Reads", "auditing", has_length=0)
13077         pkt.Request(8)
13078         pkt.Reply(8)
13079         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13080                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13081                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13082         # 2222/5819, 88,25
13083         pkt = NCP(0x5819, "Read Auditing File", "auditing", has_length=0)
13084         pkt.Request(8)
13085         pkt.Reply(8)
13086         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13087                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13088                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13089         # 2222/581A, 88,26
13090         pkt = NCP(0x581A, "Delete Old Audit File", "auditing", has_length=0)
13091         pkt.Request(8)
13092         pkt.Reply(8)
13093         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13094                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13095                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13096         # 2222/581E, 88,30
13097         pkt = NCP(0x581E, "Restart Volume auditing", "auditing", has_length=0)
13098         pkt.Request(8)
13099         pkt.Reply(8)
13100         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13101                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13102                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13103         # 2222/581F, 88,31
13104         pkt = NCP(0x581F, "Set Volume Password", "auditing", has_length=0)
13105         pkt.Request(8)
13106         pkt.Reply(8)
13107         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13108                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13109                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13110         # 2222/5A01, 90/00
13111         pkt = NCP(0x5A01, "Parse Tree", 'file')
13112         pkt.Request(26, [
13113                 rec( 10, 4, InfoMask ),
13114                 rec( 14, 4, Reserved4 ),
13115                 rec( 18, 4, Reserved4 ),
13116                 rec( 22, 4, limbCount ),
13117         ])
13118         pkt.Reply(32, [
13119                 rec( 8, 4, limbCount ),
13120                 rec( 12, 4, ItemsCount ),
13121                 rec( 16, 4, nextLimbScanNum ),
13122                 rec( 20, 4, CompletionCode ),
13123                 rec( 24, 1, FolderFlag ),
13124                 rec( 25, 3, Reserved ),
13125                 rec( 28, 4, DirectoryBase ),
13126         ])
13127         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13128                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13129                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
13130         # 2222/5A0A, 90/10
13131         pkt = NCP(0x5A0A, "Get Reference Count from Dir Entry Number", 'file')
13132         pkt.Request(19, [
13133                 rec( 10, 4, VolumeNumberLong ),
13134                 rec( 14, 4, DirectoryBase ),
13135                 rec( 18, 1, NameSpace ),
13136         ])
13137         pkt.Reply(12, [
13138                 rec( 8, 4, ReferenceCount ),
13139         ])
13140         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13141                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13142                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
13143         # 2222/5A0B, 90/11
13144         pkt = NCP(0x5A0B, "Get Reference Count from Dir Handle", 'file')
13145         pkt.Request(14, [
13146                 rec( 10, 4, DirHandle ),
13147         ])
13148         pkt.Reply(12, [
13149                 rec( 8, 4, ReferenceCount ),
13150         ])
13151         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13152                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13153                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
13154         # 2222/5A0C, 90/12
13155         pkt = NCP(0x5A0C, "Set Compressed File Size", 'file')
13156         pkt.Request(20, [
13157                 rec( 10, 6, FileHandle ),
13158                 rec( 16, 4, SuggestedFileSize ),
13159         ])
13160         pkt.Reply(16, [
13161                 rec( 8, 4, OldFileSize ),
13162                 rec( 12, 4, NewFileSize ),
13163         ])
13164         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13165                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13166                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
13167         # 2222/5A80, 90/128
13168         pkt = NCP(0x5A80, "Move File Data To Data Migration", 'file')
13169         pkt.Request(27, [
13170                 rec( 10, 4, VolumeNumberLong ),
13171                 rec( 14, 4, DirectoryEntryNumber ),
13172                 rec( 18, 1, NameSpace ),
13173                 rec( 19, 3, Reserved ),
13174                 rec( 22, 4, SupportModuleID ),
13175                 rec( 26, 1, DMFlags ),
13176         ])
13177         pkt.Reply(8)
13178         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13179                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13180                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13181         # 2222/5A81, 90/129
13182         pkt = NCP(0x5A81, "Data Migration File Information", 'file')
13183         pkt.Request(19, [
13184                 rec( 10, 4, VolumeNumberLong ),
13185                 rec( 14, 4, DirectoryEntryNumber ),
13186                 rec( 18, 1, NameSpace ),
13187         ])
13188         pkt.Reply(24, [
13189                 rec( 8, 4, SupportModuleID ),
13190                 rec( 12, 4, RestoreTime ),
13191                 rec( 16, 4, DMInfoEntries, var="x" ),
13192                 rec( 20, 4, DataSize, repeat="x" ),
13193         ])
13194         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13195                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13196                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13197         # 2222/5A82, 90/130
13198         pkt = NCP(0x5A82, "Volume Data Migration Status", 'file')
13199         pkt.Request(18, [
13200                 rec( 10, 4, VolumeNumberLong ),
13201                 rec( 14, 4, SupportModuleID ),
13202         ])
13203         pkt.Reply(32, [
13204                 rec( 8, 4, NumOfFilesMigrated ),
13205                 rec( 12, 4, TtlMigratedSize ),
13206                 rec( 16, 4, SpaceUsed ),
13207                 rec( 20, 4, LimboUsed ),
13208                 rec( 24, 4, SpaceMigrated ),
13209                 rec( 28, 4, FileLimbo ),
13210         ])
13211         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13212                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13213                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13214         # 2222/5A83, 90/131
13215         pkt = NCP(0x5A83, "Migrator Status Info", 'file')
13216         pkt.Request(10)
13217         pkt.Reply(20, [
13218                 rec( 8, 1, DMPresentFlag ),
13219                 rec( 9, 3, Reserved3 ),
13220                 rec( 12, 4, DMmajorVersion ),
13221                 rec( 16, 4, DMminorVersion ),
13222         ])
13223         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13224                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13225                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13226         # 2222/5A84, 90/132
13227         pkt = NCP(0x5A84, "Data Migration Support Module Information", 'file')
13228         pkt.Request(18, [
13229                 rec( 10, 1, DMInfoLevel ),
13230                 rec( 11, 3, Reserved3),
13231                 rec( 14, 4, SupportModuleID ),
13232         ])
13233         pkt.Reply(NO_LENGTH_CHECK, [
13234                 srec( DMInfoLevel0, req_cond="ncp.dm_info_level == 0x00" ),
13235                 srec( DMInfoLevel1, req_cond="ncp.dm_info_level == 0x01" ),
13236                 srec( DMInfoLevel2, req_cond="ncp.dm_info_level == 0x02" ),
13237         ])
13238         pkt.ReqCondSizeVariable()
13239         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13240                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13241                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13242         # 2222/5A85, 90/133
13243         pkt = NCP(0x5A85, "Move File Data From Data Migration", 'file')
13244         pkt.Request(19, [
13245                 rec( 10, 4, VolumeNumberLong ),
13246                 rec( 14, 4, DirectoryEntryNumber ),
13247                 rec( 18, 1, NameSpace ),
13248         ])
13249         pkt.Reply(8)
13250         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13251                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13252                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13253         # 2222/5A86, 90/134
13254         pkt = NCP(0x5A86, "Get/Set Default Read-Write Support Module ID", 'file')
13255         pkt.Request(18, [
13256                 rec( 10, 1, GetSetFlag ),
13257                 rec( 11, 3, Reserved3 ),
13258                 rec( 14, 4, SupportModuleID ),
13259         ])
13260         pkt.Reply(12, [
13261                 rec( 8, 4, SupportModuleID ),
13262         ])
13263         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13264                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13265                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13266         # 2222/5A87, 90/135
13267         pkt = NCP(0x5A87, "Data Migration Support Module Capacity Request", 'file')
13268         pkt.Request(22, [
13269                 rec( 10, 4, SupportModuleID ),
13270                 rec( 14, 4, VolumeNumberLong ),
13271                 rec( 18, 4, DirectoryBase ),
13272         ])
13273         pkt.Reply(20, [
13274                 rec( 8, 4, BlockSizeInSectors ),
13275                 rec( 12, 4, TotalBlocks ),
13276                 rec( 16, 4, UsedBlocks ),
13277         ])
13278         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13279                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13280                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13281         # 2222/5A88, 90/136
13282         pkt = NCP(0x5A88, "RTDM Request", 'file')
13283         pkt.Request(15, [
13284                 rec( 10, 4, Verb ),
13285                 rec( 14, 1, VerbData ),
13286         ])
13287         pkt.Reply(8)
13288         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13289                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13290                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13291     # 2222/5C, 91
13292         pkt = NCP(0x5B, "NMAS Graded Authentication", 'comm')
13293         #Need info on this packet structure
13294         pkt.Request(7)
13295         pkt.Reply(8)
13296         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13297                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
13298                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13299         # 2222/5C, 92
13300         pkt = NCP(0x5C, "SecretStore Services", 'file')
13301         #Need info on this packet structure and SecretStore Verbs
13302         pkt.Request(7)
13303         pkt.Reply(8)
13304         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13305                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
13306                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13307         # 2222/5E, 94   
13308         pkt = NCP(0x5E, "NMAS Communications Packet", 'comm')
13309         pkt.Request(7)
13310         pkt.Reply(8)
13311         pkt.CompletionCodes([0x0000, 0xfb09])
13312         # 2222/61, 97
13313         pkt = NCP(0x61, "Get Big Packet NCP Max Packet Size", 'comm')
13314         pkt.Request(10, [
13315                 rec( 7, 2, ProposedMaxSize, BE ),
13316                 rec( 9, 1, SecurityFlag ),
13317         ],info_str=(ProposedMaxSize, "Get Big Max Packet Size - %d", ", %d"))
13318         pkt.Reply(13, [
13319                 rec( 8, 2, AcceptedMaxSize, BE ),
13320                 rec( 10, 2, EchoSocket, BE ),
13321                 rec( 12, 1, SecurityFlag ),
13322         ])
13323         pkt.CompletionCodes([0x0000])
13324         # 2222/63, 99
13325         pkt = NCP(0x63, "Undocumented Packet Burst", 'comm')
13326         pkt.Request(7)
13327         pkt.Reply(8)
13328         pkt.CompletionCodes([0x0000])
13329         # 2222/64, 100
13330         pkt = NCP(0x64, "Undocumented Packet Burst", 'comm')
13331         pkt.Request(7)
13332         pkt.Reply(8)
13333         pkt.CompletionCodes([0x0000])
13334         # 2222/65, 101
13335         pkt = NCP(0x65, "Packet Burst Connection Request", 'comm')
13336         pkt.Request(25, [
13337                 rec( 7, 4, LocalConnectionID, BE ),
13338                 rec( 11, 4, LocalMaxPacketSize, BE ),
13339                 rec( 15, 2, LocalTargetSocket, BE ),
13340                 rec( 17, 4, LocalMaxSendSize, BE ),
13341                 rec( 21, 4, LocalMaxRecvSize, BE ),
13342         ])
13343         pkt.Reply(16, [
13344                 rec( 8, 4, RemoteTargetID, BE ),
13345                 rec( 12, 4, RemoteMaxPacketSize, BE ),
13346         ])
13347         pkt.CompletionCodes([0x0000])
13348         # 2222/66, 102
13349         pkt = NCP(0x66, "Undocumented Packet Burst", 'comm')
13350         pkt.Request(7)
13351         pkt.Reply(8)
13352         pkt.CompletionCodes([0x0000])
13353         # 2222/67, 103
13354         pkt = NCP(0x67, "Undocumented Packet Burst", 'comm')
13355         pkt.Request(7)
13356         pkt.Reply(8)
13357         pkt.CompletionCodes([0x0000])
13358         # 2222/6801, 104/01
13359         pkt = NCP(0x6801, "Ping for NDS NCP", "nds", has_length=0)
13360         pkt.Request(8)
13361         pkt.Reply(8)
13362         pkt.ReqCondSizeVariable()
13363         pkt.CompletionCodes([0x0000, 0x8100, 0xfb04, 0xfe0c])
13364         # 2222/6802, 104/02
13365         #
13366         # XXX - if FraggerHandle is not 0xffffffff, this is not the
13367         # first fragment, so we can only dissect this by reassembling;
13368         # the fields after "Fragment Handle" are bogus for non-0xffffffff
13369         # fragments, so we shouldn't dissect them.
13370         #
13371         # XXX - are there TotalRequest requests in the packet, and
13372         # does each of them have NDSFlags and NDSVerb fields, or
13373         # does only the first one have it?
13374         #
13375         pkt = NCP(0x6802, "Send NDS Fragmented Request/Reply", "nds", has_length=0)
13376         pkt.Request(8)
13377         pkt.Reply(8)
13378         pkt.ReqCondSizeVariable()
13379         pkt.CompletionCodes([0x0000])
13380         # 2222/6803, 104/03
13381         pkt = NCP(0x6803, "Fragment Close", "nds", has_length=0)
13382         pkt.Request(12, [
13383                 rec( 8, 4, FraggerHandle ),
13384         ])
13385         pkt.Reply(8)
13386         pkt.CompletionCodes([0x0000, 0xff00])
13387         # 2222/6804, 104/04
13388         pkt = NCP(0x6804, "Return Bindery Context", "nds", has_length=0)
13389         pkt.Request(8)
13390         pkt.Reply((9, 263), [
13391                 rec( 8, (1,255), binderyContext ),
13392         ])
13393         pkt.CompletionCodes([0x0000, 0xfe0c, 0xff00])
13394         # 2222/6805, 104/05
13395         pkt = NCP(0x6805, "Monitor NDS Connection", "nds", has_length=0)
13396         pkt.Request(8)
13397         pkt.Reply(8)
13398         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
13399         # 2222/6806, 104/06
13400         pkt = NCP(0x6806, "Return NDS Statistics", "nds", has_length=0)
13401         pkt.Request(10, [
13402                 rec( 8, 2, NDSRequestFlags ),
13403         ])
13404         pkt.Reply(8)
13405         #Need to investigate how to decode Statistics Return Value
13406         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
13407         # 2222/6807, 104/07
13408         pkt = NCP(0x6807, "Clear NDS Statistics", "nds", has_length=0)
13409         pkt.Request(8)
13410         pkt.Reply(8)
13411         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
13412         # 2222/6808, 104/08
13413         pkt = NCP(0x6808, "Reload NDS Software", "nds", has_length=0)
13414         pkt.Request(8)
13415         pkt.Reply(12, [
13416                 rec( 8, 4, NDSStatus ),
13417         ])
13418         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
13419         # 2222/68C8, 104/200
13420         pkt = NCP(0x68C8, "Query Container Audit Status", "auditing", has_length=0)
13421         pkt.Request(12, [
13422                 rec( 8, 4, ConnectionNumber ),
13423 #               rec( 12, 4, AuditIDType, LE ),
13424 #               rec( 16, 4, AuditID ),
13425 #               rec( 20, 2, BufferSize ),
13426         ])
13427         pkt.Reply(40, [
13428                 rec(8, 32, NWAuditStatus ),
13429         ])
13430         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13431         # 2222/68CA, 104/202
13432         pkt = NCP(0x68CA, "Add Auditor Access", "auditing", has_length=0)
13433         pkt.Request(8)
13434         pkt.Reply(8)
13435         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13436         # 2222/68CB, 104/203
13437         pkt = NCP(0x68CB, "Change Auditor Container Password", "auditing", has_length=0)
13438         pkt.Request(8)
13439         pkt.Reply(8)
13440         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13441         # 2222/68CC, 104/204
13442         pkt = NCP(0x68CC, "Check Auditor Access", "auditing", has_length=0)
13443         pkt.Request(8)
13444         pkt.Reply(8)
13445         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13446         # 2222/68CE, 104/206
13447         pkt = NCP(0x680CE, "Disable Container Auditing", "auditing", has_length=0)
13448         pkt.Request(8)
13449         pkt.Reply(8)
13450         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13451         # 2222/68CF, 104/207
13452         pkt = NCP(0x68CF, "Enable Container Auditing", "auditing", has_length=0)
13453         pkt.Request(8)
13454         pkt.Reply(8)
13455         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13456         # 2222/68D1, 104/209
13457         pkt = NCP(0x68D1, "Read Audit File Header", "auditing", has_length=0)
13458         pkt.Request(8)
13459         pkt.Reply(8)
13460         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13461         # 2222/68D3, 104/211
13462         pkt = NCP(0x68D3, "Remove Auditor Access", "auditing", has_length=0)
13463         pkt.Request(8)
13464         pkt.Reply(8)
13465         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13466         # 2222/68D4, 104/212
13467         pkt = NCP(0x68D4, "Reset Audit File", "auditing", has_length=0)
13468         pkt.Request(8)
13469         pkt.Reply(8)
13470         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13471         # 2222/68D6, 104/214
13472         pkt = NCP(0x68D6, "Write Audit File Configuration Header", "auditing", has_length=0)
13473         pkt.Request(8)
13474         pkt.Reply(8)
13475         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13476         # 2222/68D7, 104/215
13477         pkt = NCP(0x68D7, "Change Auditor Container Password2", "auditing", has_length=0)
13478         pkt.Request(8)
13479         pkt.Reply(8)
13480         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13481         # 2222/68D8, 104/216
13482         pkt = NCP(0x68D8, "Return Audit Flags", "auditing", has_length=0)
13483         pkt.Request(8)
13484         pkt.Reply(8)
13485         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13486         # 2222/68D9, 104/217
13487         pkt = NCP(0x68D9, "Close Old Audit File", "auditing", has_length=0)
13488         pkt.Request(8)
13489         pkt.Reply(8)
13490         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13491         # 2222/68DB, 104/219
13492         pkt = NCP(0x68DB, "Check Level Two Access", "auditing", has_length=0)
13493         pkt.Request(8)
13494         pkt.Reply(8)
13495         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13496         # 2222/68DC, 104/220
13497         pkt = NCP(0x68DC, "Check Object Audited", "auditing", has_length=0)
13498         pkt.Request(8)
13499         pkt.Reply(8)
13500         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13501         # 2222/68DD, 104/221
13502         pkt = NCP(0x68DD, "Change Object Audited", "auditing", has_length=0)
13503         pkt.Request(8)
13504         pkt.Reply(8)
13505         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13506         # 2222/68DE, 104/222
13507         pkt = NCP(0x68DE, "Return Old Audit File List", "auditing", has_length=0)
13508         pkt.Request(8)
13509         pkt.Reply(8)
13510         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13511         # 2222/68DF, 104/223
13512         pkt = NCP(0x68DF, "Init Audit File Reads", "auditing", has_length=0)
13513         pkt.Request(8)
13514         pkt.Reply(8)
13515         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13516         # 2222/68E0, 104/224
13517         pkt = NCP(0x68E0, "Read Auditing File", "auditing", has_length=0)
13518         pkt.Request(8)
13519         pkt.Reply(8)
13520         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13521         # 2222/68E1, 104/225
13522         pkt = NCP(0x68E1, "Delete Old Audit File", "auditing", has_length=0)
13523         pkt.Request(8)
13524         pkt.Reply(8)
13525         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13526         # 2222/68E5, 104/229
13527         pkt = NCP(0x68E5, "Set Audit Password", "auditing", has_length=0)
13528         pkt.Request(8)
13529         pkt.Reply(8)
13530         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13531         # 2222/68E7, 104/231
13532         pkt = NCP(0x68E7, "External Audit Append To File", "auditing", has_length=0)
13533         pkt.Request(8)
13534         pkt.Reply(8)
13535         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13536         # 2222/69, 105
13537         pkt = NCP(0x69, "Log File", 'file')
13538         pkt.Request( (12, 267), [
13539                 rec( 7, 1, DirHandle ),
13540                 rec( 8, 1, LockFlag ),
13541                 rec( 9, 2, TimeoutLimit ),
13542                 rec( 11, (1, 256), FilePath ),
13543         ], info_str=(FilePath, "Log File: %s", "/%s"))
13544         pkt.Reply(8)
13545         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x9600, 0xfe0d, 0xff01])
13546         # 2222/6A, 106
13547         pkt = NCP(0x6A, "Lock File Set", 'file')
13548         pkt.Request( 9, [
13549                 rec( 7, 2, TimeoutLimit ),
13550         ])
13551         pkt.Reply(8)
13552         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x9600, 0xfe0d, 0xff01])
13553         # 2222/6B, 107
13554         pkt = NCP(0x6B, "Log Logical Record", 'file')
13555         pkt.Request( (11, 266), [
13556                 rec( 7, 1, LockFlag ),
13557                 rec( 8, 2, TimeoutLimit ),
13558                 rec( 10, (1, 256), SynchName ),
13559         ], info_str=(SynchName, "Log Logical Record: %s", ", %s"))
13560         pkt.Reply(8)
13561         pkt.CompletionCodes([0x0000, 0x7f00, 0x9600, 0xfe0d, 0xff01])
13562         # 2222/6C, 108
13563         pkt = NCP(0x6C, "Log Logical Record", 'file')
13564         pkt.Request( 10, [
13565                 rec( 7, 1, LockFlag ),
13566                 rec( 8, 2, TimeoutLimit ),
13567         ])
13568         pkt.Reply(8)
13569         pkt.CompletionCodes([0x0000, 0x7f00, 0x9600, 0xfe0d, 0xff01])
13570         # 2222/6D, 109
13571         pkt = NCP(0x6D, "Log Physical Record", 'file')
13572         pkt.Request(24, [
13573                 rec( 7, 1, LockFlag ),
13574                 rec( 8, 6, FileHandle ),
13575                 rec( 14, 4, LockAreasStartOffset ),
13576                 rec( 18, 4, LockAreaLen ),
13577                 rec( 22, 2, LockTimeout ),
13578         ])
13579         pkt.Reply(8)
13580         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
13581         # 2222/6E, 110
13582         pkt = NCP(0x6E, "Lock Physical Record Set", 'file')
13583         pkt.Request(10, [
13584                 rec( 7, 1, LockFlag ),
13585                 rec( 8, 2, LockTimeout ),
13586         ])
13587         pkt.Reply(8)
13588         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
13589         # 2222/6F00, 111/00
13590         pkt = NCP(0x6F00, "Open/Create a Semaphore", 'file', has_length=0)
13591         pkt.Request((10,521), [
13592                 rec( 8, 1, InitialSemaphoreValue ),
13593                 rec( 9, (1, 512), SemaphoreName ),
13594         ], info_str=(SemaphoreName, "Open/Create Semaphore: %s", ", %s"))
13595         pkt.Reply(13, [
13596                   rec( 8, 4, SemaphoreHandle ),
13597                   rec( 12, 1, SemaphoreOpenCount ),
13598         ])
13599         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
13600         # 2222/6F01, 111/01
13601         pkt = NCP(0x6F01, "Examine Semaphore", 'file', has_length=0)
13602         pkt.Request(12, [
13603                 rec( 8, 4, SemaphoreHandle ),
13604         ])
13605         pkt.Reply(10, [
13606                   rec( 8, 1, SemaphoreValue ),
13607                   rec( 9, 1, SemaphoreOpenCount ),
13608         ])
13609         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
13610         # 2222/6F02, 111/02
13611         pkt = NCP(0x6F02, "Wait On (P) Semaphore", 'file', has_length=0)
13612         pkt.Request(14, [
13613                 rec( 8, 4, SemaphoreHandle ),
13614                 rec( 12, 2, LockTimeout ),
13615         ])
13616         pkt.Reply(8)
13617         pkt.CompletionCodes([0x0000, 0x9600, 0xfe04, 0xff01])
13618         # 2222/6F03, 111/03
13619         pkt = NCP(0x6F03, "Signal (V) Semaphore", 'file', has_length=0)
13620         pkt.Request(12, [
13621                 rec( 8, 4, SemaphoreHandle ),
13622         ])
13623         pkt.Reply(8)
13624         pkt.CompletionCodes([0x0000, 0x9600, 0xfe04, 0xff01])
13625         # 2222/6F04, 111/04
13626         pkt = NCP(0x6F04, "Close Semaphore", 'file', has_length=0)
13627         pkt.Request(12, [
13628                 rec( 8, 4, SemaphoreHandle ),
13629         ])
13630         pkt.Reply(10, [
13631                 rec( 8, 1, SemaphoreOpenCount ),
13632                 rec( 9, 1, SemaphoreShareCount ),
13633         ])
13634         pkt.CompletionCodes([0x0000, 0x9600, 0xfe04, 0xff01])
13635         # 2222/7201, 114/01
13636         pkt = NCP(0x7201, "Timesync Get Time", 'file')
13637         pkt.Request(10)
13638         pkt.Reply(32,[
13639                 rec( 8, 12, theTimeStruct ),
13640                 rec(20, 8, eventOffset ),
13641                 rec(28, 4, eventTime ),
13642         ])                
13643         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13644         # 2222/7202, 114/02
13645         pkt = NCP(0x7202, "Timesync Exchange Time", 'file')
13646         pkt.Request((63,112), [
13647                 rec( 10, 4, protocolFlags ),
13648                 rec( 14, 4, nodeFlags ),
13649                 rec( 18, 8, sourceOriginateTime ),
13650                 rec( 26, 8, targetReceiveTime ),
13651                 rec( 34, 8, targetTransmitTime ),
13652                 rec( 42, 8, sourceReturnTime ),
13653                 rec( 50, 8, eventOffset ),
13654                 rec( 58, 4, eventTime ),
13655                 rec( 62, (1,50), ServerNameLen ),
13656         ], info_str=(ServerNameLen, "Timesync Exchange Time: %s", ", %s"))
13657         pkt.Reply((64,113), [
13658                 rec( 8, 3, Reserved3 ),
13659                 rec( 11, 4, protocolFlags ),
13660                 rec( 15, 4, nodeFlags ),
13661                 rec( 19, 8, sourceOriginateTime ),
13662                 rec( 27, 8, targetReceiveTime ),
13663                 rec( 35, 8, targetTransmitTime ),
13664                 rec( 43, 8, sourceReturnTime ),
13665                 rec( 51, 8, eventOffset ),
13666                 rec( 59, 4, eventTime ),
13667                 rec( 63, (1,50), ServerNameLen ),
13668         ])
13669         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13670         # 2222/7205, 114/05
13671         pkt = NCP(0x7205, "Timesync Get Server List", 'file')
13672         pkt.Request(14, [
13673                 rec( 10, 4, StartNumber ),
13674         ])
13675         pkt.Reply(66, [
13676                 rec( 8, 4, nameType ),
13677                 rec( 12, 48, ServerName ),
13678                 rec( 60, 4, serverListFlags ),
13679                 rec( 64, 2, startNumberFlag ),
13680         ])
13681         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13682         # 2222/7206, 114/06
13683         pkt = NCP(0x7206, "Timesync Set Server List", 'file')
13684         pkt.Request(14, [
13685                 rec( 10, 4, StartNumber ),
13686         ])
13687         pkt.Reply(66, [
13688                 rec( 8, 4, nameType ),
13689                 rec( 12, 48, ServerName ),
13690                 rec( 60, 4, serverListFlags ),
13691                 rec( 64, 2, startNumberFlag ),
13692         ])
13693         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13694         # 2222/720C, 114/12
13695         pkt = NCP(0x720C, "Timesync Get Version", 'file')
13696         pkt.Request(10)
13697         pkt.Reply(12, [
13698                 rec( 8, 4, version ),
13699         ])
13700         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13701         # 2222/7B01, 123/01
13702         pkt = NCP(0x7B01, "Get Cache Information", 'stats')
13703         pkt.Request(12, [
13704                 rec(10, 1, VersionNumber),
13705                 rec(11, 1, RevisionNumber),
13706         ])
13707         pkt.Reply(288, [
13708                 rec(8, 4, CurrentServerTime, LE),
13709                 rec(12, 1, VConsoleVersion ),
13710                 rec(13, 1, VConsoleRevision ),
13711                 rec(14, 2, Reserved2 ),
13712                 rec(16, 104, Counters ),
13713                 rec(120, 40, ExtraCacheCntrs ),
13714                 rec(160, 40, MemoryCounters ),
13715                 rec(200, 48, TrendCounters ),
13716                 rec(248, 40, CacheInfo ),
13717         ])
13718         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xff00])
13719         # 2222/7B02, 123/02
13720         pkt = NCP(0x7B02, "Get File Server Information", 'stats')
13721         pkt.Request(10)
13722         pkt.Reply(150, [
13723                 rec(8, 4, CurrentServerTime ),
13724                 rec(12, 1, VConsoleVersion ),
13725                 rec(13, 1, VConsoleRevision ),
13726                 rec(14, 2, Reserved2 ),
13727                 rec(16, 4, NCPStaInUseCnt ),
13728                 rec(20, 4, NCPPeakStaInUse ),
13729                 rec(24, 4, NumOfNCPReqs ),
13730                 rec(28, 4, ServerUtilization ),
13731                 rec(32, 96, ServerInfo ),
13732                 rec(128, 22, FileServerCounters ),
13733         ])
13734         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13735         # 2222/7B03, 123/03
13736         pkt = NCP(0x7B03, "NetWare File System Information", 'stats')
13737         pkt.Request(11, [
13738                 rec(10, 1, FileSystemID ),
13739         ])
13740         pkt.Reply(68, [
13741                 rec(8, 4, CurrentServerTime ),
13742                 rec(12, 1, VConsoleVersion ),
13743                 rec(13, 1, VConsoleRevision ),
13744                 rec(14, 2, Reserved2 ),
13745                 rec(16, 52, FileSystemInfo ),
13746         ])
13747         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13748         # 2222/7B04, 123/04
13749         pkt = NCP(0x7B04, "User Information", 'stats')
13750         pkt.Request(14, [
13751                 rec(10, 4, ConnectionNumber ),
13752         ])
13753         pkt.Reply((85, 132), [
13754                 rec(8, 4, CurrentServerTime ),
13755                 rec(12, 1, VConsoleVersion ),
13756                 rec(13, 1, VConsoleRevision ),
13757                 rec(14, 2, Reserved2 ),
13758                 rec(16, 68, UserInformation ),
13759                 rec(84, (1, 48), UserName ),
13760         ])
13761         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13762         # 2222/7B05, 123/05
13763         pkt = NCP(0x7B05, "Packet Burst Information", 'stats')
13764         pkt.Request(10)
13765         pkt.Reply(216, [
13766                 rec(8, 4, CurrentServerTime ),
13767                 rec(12, 1, VConsoleVersion ),
13768                 rec(13, 1, VConsoleRevision ),
13769                 rec(14, 2, Reserved2 ),
13770                 rec(16, 200, PacketBurstInformation ),
13771         ])
13772         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13773         # 2222/7B06, 123/06
13774         pkt = NCP(0x7B06, "IPX SPX Information", 'stats')
13775         pkt.Request(10)
13776         pkt.Reply(94, [
13777                 rec(8, 4, CurrentServerTime ),
13778                 rec(12, 1, VConsoleVersion ),
13779                 rec(13, 1, VConsoleRevision ),
13780                 rec(14, 2, Reserved2 ),
13781                 rec(16, 34, IPXInformation ),
13782                 rec(50, 44, SPXInformation ),
13783         ])
13784         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13785         # 2222/7B07, 123/07
13786         pkt = NCP(0x7B07, "Garbage Collection Information", 'stats')
13787         pkt.Request(10)
13788         pkt.Reply(40, [
13789                 rec(8, 4, CurrentServerTime ),
13790                 rec(12, 1, VConsoleVersion ),
13791                 rec(13, 1, VConsoleRevision ),
13792                 rec(14, 2, Reserved2 ),
13793                 rec(16, 4, FailedAllocReqCnt ),
13794                 rec(20, 4, NumberOfAllocs ),
13795                 rec(24, 4, NoMoreMemAvlCnt ),
13796                 rec(28, 4, NumOfGarbageColl ),
13797                 rec(32, 4, FoundSomeMem ),
13798                 rec(36, 4, NumOfChecks ),
13799         ])
13800         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13801         # 2222/7B08, 123/08
13802         pkt = NCP(0x7B08, "CPU Information", 'stats')
13803         pkt.Request(14, [
13804                 rec(10, 4, CPUNumber ),
13805         ])
13806         pkt.Reply(51, [
13807                 rec(8, 4, CurrentServerTime ),
13808                 rec(12, 1, VConsoleVersion ),
13809                 rec(13, 1, VConsoleRevision ),
13810                 rec(14, 2, Reserved2 ),
13811                 rec(16, 4, NumberOfCPUs ),
13812                 rec(20, 31, CPUInformation ),
13813         ])      
13814         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13815         # 2222/7B09, 123/09
13816         pkt = NCP(0x7B09, "Volume Switch Information", 'stats')
13817         pkt.Request(14, [
13818                 rec(10, 4, StartNumber )
13819         ])
13820         pkt.Reply(28, [
13821                 rec(8, 4, CurrentServerTime ),
13822                 rec(12, 1, VConsoleVersion ),
13823                 rec(13, 1, VConsoleRevision ),
13824                 rec(14, 2, Reserved2 ),
13825                 rec(16, 4, TotalLFSCounters ),
13826                 rec(20, 4, CurrentLFSCounters, var="x"),
13827                 rec(24, 4, LFSCounters, repeat="x"),
13828         ])
13829         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13830         # 2222/7B0A, 123/10
13831         pkt = NCP(0x7B0A, "Get NLM Loaded List", 'stats')
13832         pkt.Request(14, [
13833                 rec(10, 4, StartNumber )
13834         ])
13835         pkt.Reply(28, [
13836                 rec(8, 4, CurrentServerTime ),
13837                 rec(12, 1, VConsoleVersion ),
13838                 rec(13, 1, VConsoleRevision ),
13839                 rec(14, 2, Reserved2 ),
13840                 rec(16, 4, NLMcount ),
13841                 rec(20, 4, NLMsInList, var="x" ),
13842                 rec(24, 4, NLMNumbers, repeat="x" ),
13843         ])
13844         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13845         # 2222/7B0B, 123/11
13846         pkt = NCP(0x7B0B, "NLM Information", 'stats')
13847         pkt.Request(14, [
13848                 rec(10, 4, NLMNumber ),
13849         ])
13850         pkt.Reply((79,841), [
13851                 rec(8, 4, CurrentServerTime ),
13852                 rec(12, 1, VConsoleVersion ),
13853                 rec(13, 1, VConsoleRevision ),
13854                 rec(14, 2, Reserved2 ),
13855                 rec(16, 60, NLMInformation ),
13856                 rec(76, (1,255), FileName ),
13857                 rec(-1, (1,255), Name ),
13858                 rec(-1, (1,255), Copyright ),
13859         ])
13860         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13861         # 2222/7B0C, 123/12
13862         pkt = NCP(0x7B0C, "Get Directory Cache Information", 'stats')
13863         pkt.Request(10)
13864         pkt.Reply(72, [
13865                 rec(8, 4, CurrentServerTime ),
13866                 rec(12, 1, VConsoleVersion ),
13867                 rec(13, 1, VConsoleRevision ),
13868                 rec(14, 2, Reserved2 ),
13869                 rec(16, 56, DirCacheInfo ),
13870         ])
13871         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13872         # 2222/7B0D, 123/13
13873         pkt = NCP(0x7B0D, "Get Operating System Version Information", 'stats')
13874         pkt.Request(10)
13875         pkt.Reply(70, [
13876                 rec(8, 4, CurrentServerTime ),
13877                 rec(12, 1, VConsoleVersion ),
13878                 rec(13, 1, VConsoleRevision ),
13879                 rec(14, 2, Reserved2 ),
13880                 rec(16, 1, OSMajorVersion ),
13881                 rec(17, 1, OSMinorVersion ),
13882                 rec(18, 1, OSRevision ),
13883                 rec(19, 1, AccountVersion ),
13884                 rec(20, 1, VAPVersion ),
13885                 rec(21, 1, QueueingVersion ),
13886                 rec(22, 1, SecurityRestrictionVersion ),
13887                 rec(23, 1, InternetBridgeVersion ),
13888                 rec(24, 4, MaxNumOfVol ),
13889                 rec(28, 4, MaxNumOfConn ),
13890                 rec(32, 4, MaxNumOfUsers ),
13891                 rec(36, 4, MaxNumOfNmeSps ),
13892                 rec(40, 4, MaxNumOfLANS ),
13893                 rec(44, 4, MaxNumOfMedias ),
13894                 rec(48, 4, MaxNumOfStacks ),
13895                 rec(52, 4, MaxDirDepth ),
13896                 rec(56, 4, MaxDataStreams ),
13897                 rec(60, 4, MaxNumOfSpoolPr ),
13898                 rec(64, 4, ServerSerialNumber ),
13899                 rec(68, 2, ServerAppNumber ),
13900         ])
13901         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13902         # 2222/7B0E, 123/14
13903         pkt = NCP(0x7B0E, "Get Active Connection List by Type", 'stats')
13904         pkt.Request(15, [
13905                 rec(10, 4, StartConnNumber ),
13906                 rec(14, 1, ConnectionType ),
13907         ])
13908         pkt.Reply(528, [
13909                 rec(8, 4, CurrentServerTime ),
13910                 rec(12, 1, VConsoleVersion ),
13911                 rec(13, 1, VConsoleRevision ),
13912                 rec(14, 2, Reserved2 ),
13913                 rec(16, 512, ActiveConnBitList ),
13914         ])
13915         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfd01, 0xff00])
13916         # 2222/7B0F, 123/15
13917         pkt = NCP(0x7B0F, "Get NLM Resource Tag List", 'stats')
13918         pkt.Request(18, [
13919                 rec(10, 4, NLMNumber ),
13920                 rec(14, 4, NLMStartNumber ),
13921         ])
13922         pkt.Reply(37, [
13923                 rec(8, 4, CurrentServerTime ),
13924                 rec(12, 1, VConsoleVersion ),
13925                 rec(13, 1, VConsoleRevision ),
13926                 rec(14, 2, Reserved2 ),
13927                 rec(16, 4, TtlNumOfRTags ),
13928                 rec(20, 4, CurNumOfRTags ),
13929                 rec(24, 13, RTagStructure ),
13930         ])
13931         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13932         # 2222/7B10, 123/16
13933         pkt = NCP(0x7B10, "Enumerate Connection Information from Connection List", 'stats')
13934         pkt.Request(22, [
13935                 rec(10, 1, EnumInfoMask),
13936                 rec(11, 3, Reserved3),
13937                 rec(14, 4, itemsInList, var="x"),
13938                 rec(18, 4, connList, repeat="x"),
13939         ])
13940         pkt.Reply(NO_LENGTH_CHECK, [
13941                 rec(8, 4, CurrentServerTime ),
13942                 rec(12, 1, VConsoleVersion ),
13943                 rec(13, 1, VConsoleRevision ),
13944                 rec(14, 2, Reserved2 ),
13945                 rec(16, 4, ItemsInPacket ),
13946                 srec(netAddr, req_cond="ncp.enum_info_transport==TRUE"),
13947                 srec(timeInfo, req_cond="ncp.enum_info_time==TRUE"),
13948                 srec(nameInfo, req_cond="ncp.enum_info_name==TRUE"),
13949                 srec(lockInfo, req_cond="ncp.enum_info_lock==TRUE"),
13950                 srec(printInfo, req_cond="ncp.enum_info_print==TRUE"),
13951                 srec(statsInfo, req_cond="ncp.enum_info_stats==TRUE"),
13952                 srec(acctngInfo, req_cond="ncp.enum_info_account==TRUE"),
13953                 srec(authInfo, req_cond="ncp.enum_info_auth==TRUE"),
13954         ])                
13955         pkt.ReqCondSizeVariable()
13956         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13957         # 2222/7B11, 123/17
13958         pkt = NCP(0x7B11, "Enumerate NCP Service Network Addresses", 'stats')
13959         pkt.Request(14, [
13960                 rec(10, 4, SearchNumber ),
13961         ])                
13962         pkt.Reply(60, [
13963                 rec(8, 4, CurrentServerTime ),
13964                 rec(12, 1, VConsoleVersion ),
13965                 rec(13, 1, VConsoleRevision ),
13966                 rec(14, 2, ServerInfoFlags ),
13967                 rec(16, 16, GUID ),
13968                 rec(32, 4, NextSearchNum ),
13969                 rec(36, 4, ItemsInPacket, var="x"), 
13970                 rec(40, 20, NCPNetworkAddress, repeat="x" ),
13971         ])
13972         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13973         # 2222/7B14, 123/20
13974         pkt = NCP(0x7B14, "Active LAN Board List", 'stats')
13975         pkt.Request(14, [
13976                 rec(10, 4, StartNumber ),
13977         ])               
13978         pkt.Reply(28, [
13979                 rec(8, 4, CurrentServerTime ),
13980                 rec(12, 1, VConsoleVersion ),
13981                 rec(13, 1, VConsoleRevision ),
13982                 rec(14, 2, Reserved2 ),
13983                 rec(16, 4, MaxNumOfLANS ),
13984                 rec(20, 4, ItemsInPacket, var="x"),
13985                 rec(24, 4, BoardNumbers, repeat="x"),
13986         ])                
13987         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13988         # 2222/7B15, 123/21
13989         pkt = NCP(0x7B15, "LAN Configuration Information", 'stats')
13990         pkt.Request(14, [
13991                 rec(10, 4, BoardNumber ),
13992         ])                
13993         pkt.Reply(152, [
13994                 rec(8, 4, CurrentServerTime ),
13995                 rec(12, 1, VConsoleVersion ),
13996                 rec(13, 1, VConsoleRevision ),
13997                 rec(14, 2, Reserved2 ),
13998                 rec(16,136, LANConfigInfo ),
13999         ])                
14000         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14001         # 2222/7B16, 123/22
14002         pkt = NCP(0x7B16, "LAN Common Counters Information", 'stats')
14003         pkt.Request(18, [
14004                 rec(10, 4, BoardNumber ),
14005                 rec(14, 4, BlockNumber ),
14006         ])                
14007         pkt.Reply(86, [
14008                 rec(8, 4, CurrentServerTime ),
14009                 rec(12, 1, VConsoleVersion ),
14010                 rec(13, 1, VConsoleRevision ),
14011                 rec(14, 1, StatMajorVersion ),
14012                 rec(15, 1, StatMinorVersion ),
14013                 rec(16, 4, TotalCommonCnts ),
14014                 rec(20, 4, TotalCntBlocks ),
14015                 rec(24, 4, CustomCounters ),
14016                 rec(28, 4, NextCntBlock ),
14017                 rec(32, 54, CommonLanStruc ),
14018         ])                
14019         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14020         # 2222/7B17, 123/23
14021         pkt = NCP(0x7B17, "LAN Custom Counters Information", 'stats')
14022         pkt.Request(18, [
14023                 rec(10, 4, BoardNumber ),
14024                 rec(14, 4, StartNumber ),
14025         ])                
14026         pkt.Reply(25, [
14027                 rec(8, 4, CurrentServerTime ),
14028                 rec(12, 1, VConsoleVersion ),
14029                 rec(13, 1, VConsoleRevision ),
14030                 rec(14, 2, Reserved2 ),
14031                 rec(16, 4, NumOfCCinPkt, var="x"),
14032                 rec(20, 5, CustomCntsInfo, repeat="x"),
14033         ])                
14034         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14035         # 2222/7B18, 123/24
14036         pkt = NCP(0x7B18, "LAN Name Information", 'stats')
14037         pkt.Request(14, [
14038                 rec(10, 4, BoardNumber ),
14039         ])                
14040         pkt.Reply(19, [
14041                 rec(8, 4, CurrentServerTime ),
14042                 rec(12, 1, VConsoleVersion ),
14043                 rec(13, 1, VConsoleRevision ),
14044                 rec(14, 2, Reserved2 ),
14045                 rec(16, 3, BoardNameStruct ),
14046         ])
14047         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14048         # 2222/7B19, 123/25
14049         pkt = NCP(0x7B19, "LSL Information", 'stats')
14050         pkt.Request(10)
14051         pkt.Reply(90, [
14052                 rec(8, 4, CurrentServerTime ),
14053                 rec(12, 1, VConsoleVersion ),
14054                 rec(13, 1, VConsoleRevision ),
14055                 rec(14, 2, Reserved2 ),
14056                 rec(16, 74, LSLInformation ),
14057         ])                
14058         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14059         # 2222/7B1A, 123/26
14060         pkt = NCP(0x7B1A, "LSL Logical Board Statistics", 'stats')
14061         pkt.Request(14, [
14062                 rec(10, 4, BoardNumber ),
14063         ])                
14064         pkt.Reply(28, [
14065                 rec(8, 4, CurrentServerTime ),
14066                 rec(12, 1, VConsoleVersion ),
14067                 rec(13, 1, VConsoleRevision ),
14068                 rec(14, 2, Reserved2 ),
14069                 rec(16, 4, LogTtlTxPkts ),
14070                 rec(20, 4, LogTtlRxPkts ),
14071                 rec(24, 4, UnclaimedPkts ),
14072         ])                
14073         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14074         # 2222/7B1B, 123/27
14075         pkt = NCP(0x7B1B, "MLID Board Information", 'stats')
14076         pkt.Request(14, [
14077                 rec(10, 4, BoardNumber ),
14078         ])                
14079         pkt.Reply(44, [
14080                 rec(8, 4, CurrentServerTime ),
14081                 rec(12, 1, VConsoleVersion ),
14082                 rec(13, 1, VConsoleRevision ),
14083                 rec(14, 1, Reserved ),
14084                 rec(15, 1, NumberOfProtocols ),
14085                 rec(16, 28, MLIDBoardInfo ),
14086         ])                        
14087         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14088         # 2222/7B1E, 123/30
14089         pkt = NCP(0x7B1E, "Get Media Manager Object Information", 'stats')
14090         pkt.Request(14, [
14091                 rec(10, 4, ObjectNumber ),
14092         ])                
14093         pkt.Reply(212, [
14094                 rec(8, 4, CurrentServerTime ),
14095                 rec(12, 1, VConsoleVersion ),
14096                 rec(13, 1, VConsoleRevision ),
14097                 rec(14, 2, Reserved2 ),
14098                 rec(16, 196, GenericInfoDef ),
14099         ])                
14100         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14101         # 2222/7B1F, 123/31
14102         pkt = NCP(0x7B1F, "Get Media Manager Objects List", 'stats')
14103         pkt.Request(15, [
14104                 rec(10, 4, StartNumber ),
14105                 rec(14, 1, MediaObjectType ),
14106         ])                
14107         pkt.Reply(28, [
14108                 rec(8, 4, CurrentServerTime ),
14109                 rec(12, 1, VConsoleVersion ),
14110                 rec(13, 1, VConsoleRevision ),
14111                 rec(14, 2, Reserved2 ),
14112                 rec(16, 4, nextStartingNumber ),
14113                 rec(20, 4, ObjectCount, var="x"),
14114                 rec(24, 4, ObjectID, repeat="x"),
14115         ])                
14116         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14117         # 2222/7B20, 123/32
14118         pkt = NCP(0x7B20, "Get Media Manager Object Childrens List", 'stats')
14119         pkt.Request(22, [
14120                 rec(10, 4, StartNumber ),
14121                 rec(14, 1, MediaObjectType ),
14122                 rec(15, 3, Reserved3 ),
14123                 rec(18, 4, ParentObjectNumber ),
14124         ])                
14125         pkt.Reply(28, [
14126                 rec(8, 4, CurrentServerTime ),
14127                 rec(12, 1, VConsoleVersion ),
14128                 rec(13, 1, VConsoleRevision ),
14129                 rec(14, 2, Reserved2 ),
14130                 rec(16, 4, nextStartingNumber ),
14131                 rec(20, 4, ObjectCount, var="x" ),
14132                 rec(24, 4, ObjectID, repeat="x" ),
14133         ])                
14134         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14135         # 2222/7B21, 123/33
14136         pkt = NCP(0x7B21, "Get Volume Segment List", 'stats')
14137         pkt.Request(14, [
14138                 rec(10, 4, VolumeNumberLong ),
14139         ])                
14140         pkt.Reply(32, [
14141                 rec(8, 4, CurrentServerTime ),
14142                 rec(12, 1, VConsoleVersion ),
14143                 rec(13, 1, VConsoleRevision ),
14144                 rec(14, 2, Reserved2 ),
14145                 rec(16, 4, NumOfSegments, var="x" ),
14146                 rec(20, 12, Segments, repeat="x" ),
14147         ])                
14148         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14149         # 2222/7B22, 123/34
14150         pkt = NCP(0x7B22, "Get Volume Information by Level", 'stats')
14151         pkt.Request(15, [
14152                 rec(10, 4, VolumeNumberLong ),
14153                 rec(14, 1, InfoLevelNumber ),
14154         ])                
14155         pkt.Reply(NO_LENGTH_CHECK, [
14156                 rec(8, 4, CurrentServerTime ),
14157                 rec(12, 1, VConsoleVersion ),
14158                 rec(13, 1, VConsoleRevision ),
14159                 rec(14, 2, Reserved2 ),
14160                 rec(16, 1, InfoLevelNumber ),
14161                 rec(17, 3, Reserved3 ),
14162                 srec(VolInfoStructure, req_cond="ncp.info_level_num==0x01"),
14163                 srec(VolInfo2Struct, req_cond="ncp.info_level_num==0x02"),
14164         ])                
14165         pkt.ReqCondSizeVariable()
14166         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14167         # 2222/7B28, 123/40
14168         pkt = NCP(0x7B28, "Active Protocol Stacks", 'stats')
14169         pkt.Request(14, [
14170                 rec(10, 4, StartNumber ),
14171         ])                
14172         pkt.Reply(48, [
14173                 rec(8, 4, CurrentServerTime ),
14174                 rec(12, 1, VConsoleVersion ),
14175                 rec(13, 1, VConsoleRevision ),
14176                 rec(14, 2, Reserved2 ),
14177                 rec(16, 4, MaxNumOfLANS ),
14178                 rec(20, 4, StackCount, var="x" ),
14179                 rec(24, 4, nextStartingNumber ),
14180                 rec(28, 20, StackInfo, repeat="x" ),
14181         ])                
14182         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14183         # 2222/7B29, 123/41
14184         pkt = NCP(0x7B29, "Get Protocol Stack Configuration Information", 'stats')
14185         pkt.Request(14, [
14186                 rec(10, 4, StackNumber ),
14187         ])                
14188         pkt.Reply((37,164), [
14189                 rec(8, 4, CurrentServerTime ),
14190                 rec(12, 1, VConsoleVersion ),
14191                 rec(13, 1, VConsoleRevision ),
14192                 rec(14, 2, Reserved2 ),
14193                 rec(16, 1, ConfigMajorVN ),
14194                 rec(17, 1, ConfigMinorVN ),
14195                 rec(18, 1, StackMajorVN ),
14196                 rec(19, 1, StackMinorVN ),
14197                 rec(20, 16, ShortStkName ),
14198                 rec(36, (1,128), StackFullNameStr ),
14199         ])                
14200         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14201         # 2222/7B2A, 123/42
14202         pkt = NCP(0x7B2A, "Get Protocol Stack Statistics Information", 'stats')
14203         pkt.Request(14, [
14204                 rec(10, 4, StackNumber ),
14205         ])                
14206         pkt.Reply(38, [
14207                 rec(8, 4, CurrentServerTime ),
14208                 rec(12, 1, VConsoleVersion ),
14209                 rec(13, 1, VConsoleRevision ),
14210                 rec(14, 2, Reserved2 ),
14211                 rec(16, 1, StatMajorVersion ),
14212                 rec(17, 1, StatMinorVersion ),
14213                 rec(18, 2, ComCnts ),
14214                 rec(20, 4, CounterMask ),
14215                 rec(24, 4, TotalTxPkts ),
14216                 rec(28, 4, TotalRxPkts ),
14217                 rec(32, 4, IgnoredRxPkts ),
14218                 rec(36, 2, CustomCnts ),
14219         ])                
14220         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14221         # 2222/7B2B, 123/43
14222         pkt = NCP(0x7B2B, "Get Protocol Stack Custom Information", 'stats')
14223         pkt.Request(18, [
14224                 rec(10, 4, StackNumber ),
14225                 rec(14, 4, StartNumber ),
14226         ])                
14227         pkt.Reply(25, [
14228                 rec(8, 4, CurrentServerTime ),
14229                 rec(12, 1, VConsoleVersion ),
14230                 rec(13, 1, VConsoleRevision ),
14231                 rec(14, 2, Reserved2 ),
14232                 rec(16, 4, CustomCount, var="x" ),
14233                 rec(20, 5, CustomCntsInfo, repeat="x" ),
14234         ])                
14235         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14236         # 2222/7B2C, 123/44
14237         pkt = NCP(0x7B2C, "Get Protocol Stack Numbers by Media Number", 'stats')
14238         pkt.Request(14, [
14239                 rec(10, 4, MediaNumber ),
14240         ])                
14241         pkt.Reply(24, [
14242                 rec(8, 4, CurrentServerTime ),
14243                 rec(12, 1, VConsoleVersion ),
14244                 rec(13, 1, VConsoleRevision ),
14245                 rec(14, 2, Reserved2 ),
14246                 rec(16, 4, StackCount, var="x" ),
14247                 rec(20, 4, StackNumber, repeat="x" ),
14248         ])                
14249         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14250         # 2222/7B2D, 123/45
14251         pkt = NCP(0x7B2D, "Get Protocol Stack Numbers by LAN Board Number", 'stats')
14252         pkt.Request(14, [
14253                 rec(10, 4, BoardNumber ),
14254         ])                
14255         pkt.Reply(24, [
14256                 rec(8, 4, CurrentServerTime ),
14257                 rec(12, 1, VConsoleVersion ),
14258                 rec(13, 1, VConsoleRevision ),
14259                 rec(14, 2, Reserved2 ),
14260                 rec(16, 4, StackCount, var="x" ),
14261                 rec(20, 4, StackNumber, repeat="x" ),
14262         ])                
14263         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14264         # 2222/7B2E, 123/46
14265         pkt = NCP(0x7B2E, "Get Media Name by Media Number", 'stats')
14266         pkt.Request(14, [
14267                 rec(10, 4, MediaNumber ),
14268         ])                
14269         pkt.Reply((17,144), [
14270                 rec(8, 4, CurrentServerTime ),
14271                 rec(12, 1, VConsoleVersion ),
14272                 rec(13, 1, VConsoleRevision ),
14273                 rec(14, 2, Reserved2 ),
14274                 rec(16, (1,128), MediaName ),
14275         ])                
14276         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14277         # 2222/7B2F, 123/47
14278         pkt = NCP(0x7B2F, "Get Loaded Media Number", 'stats')
14279         pkt.Request(10)
14280         pkt.Reply(28, [
14281                 rec(8, 4, CurrentServerTime ),
14282                 rec(12, 1, VConsoleVersion ),
14283                 rec(13, 1, VConsoleRevision ),
14284                 rec(14, 2, Reserved2 ),
14285                 rec(16, 4, MaxNumOfMedias ),
14286                 rec(20, 4, MediaListCount, var="x" ),
14287                 rec(24, 4, MediaList, repeat="x" ),
14288         ])                
14289         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14290         # 2222/7B32, 123/50
14291         pkt = NCP(0x7B32, "Get General Router and SAP Information", 'stats')
14292         pkt.Request(10)
14293         pkt.Reply(37, [
14294                 rec(8, 4, CurrentServerTime ),
14295                 rec(12, 1, VConsoleVersion ),
14296                 rec(13, 1, VConsoleRevision ),
14297                 rec(14, 2, Reserved2 ),
14298                 rec(16, 2, RIPSocketNumber ),
14299                 rec(18, 2, Reserved2 ),
14300                 rec(20, 1, RouterDownFlag ),
14301                 rec(21, 3, Reserved3 ),
14302                 rec(24, 1, TrackOnFlag ),
14303                 rec(25, 3, Reserved3 ),
14304                 rec(28, 1, ExtRouterActiveFlag ),
14305                 rec(29, 3, Reserved3 ),
14306                 rec(32, 2, SAPSocketNumber ),
14307                 rec(34, 2, Reserved2 ),
14308                 rec(36, 1, RpyNearestSrvFlag ),
14309         ])                
14310         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14311         # 2222/7B33, 123/51
14312         pkt = NCP(0x7B33, "Get Network Router Information", 'stats')
14313         pkt.Request(14, [
14314                 rec(10, 4, NetworkNumber ),
14315         ])                
14316         pkt.Reply(26, [
14317                 rec(8, 4, CurrentServerTime ),
14318                 rec(12, 1, VConsoleVersion ),
14319                 rec(13, 1, VConsoleRevision ),
14320                 rec(14, 2, Reserved2 ),
14321                 rec(16, 10, KnownRoutes ),
14322         ])                
14323         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
14324         # 2222/7B34, 123/52
14325         pkt = NCP(0x7B34, "Get Network Routers Information", 'stats')
14326         pkt.Request(18, [
14327                 rec(10, 4, NetworkNumber),
14328                 rec(14, 4, StartNumber ),
14329         ])                
14330         pkt.Reply(34, [
14331                 rec(8, 4, CurrentServerTime ),
14332                 rec(12, 1, VConsoleVersion ),
14333                 rec(13, 1, VConsoleRevision ),
14334                 rec(14, 2, Reserved2 ),
14335                 rec(16, 4, NumOfEntries, var="x" ),
14336                 rec(20, 14, RoutersInfo, repeat="x" ),
14337         ])                
14338         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
14339         # 2222/7B35, 123/53
14340         pkt = NCP(0x7B35, "Get Known Networks Information", 'stats')
14341         pkt.Request(14, [
14342                 rec(10, 4, StartNumber ),
14343         ])                
14344         pkt.Reply(30, [
14345                 rec(8, 4, CurrentServerTime ),
14346                 rec(12, 1, VConsoleVersion ),
14347                 rec(13, 1, VConsoleRevision ),
14348                 rec(14, 2, Reserved2 ),
14349                 rec(16, 4, NumOfEntries, var="x" ),
14350                 rec(20, 10, KnownRoutes, repeat="x" ),
14351         ])                
14352         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14353         # 2222/7B36, 123/54
14354         pkt = NCP(0x7B36, "Get Server Information", 'stats')
14355         pkt.Request((15,64), [
14356                 rec(10, 2, ServerType ),
14357                 rec(12, 2, Reserved2 ),
14358                 rec(14, (1,50), ServerNameLen ),
14359         ], info_str=(ServerNameLen, "Get Server Information: %s", ", %s"))
14360         pkt.Reply(30, [
14361                 rec(8, 4, CurrentServerTime ),
14362                 rec(12, 1, VConsoleVersion ),
14363                 rec(13, 1, VConsoleRevision ),
14364                 rec(14, 2, Reserved2 ),
14365                 rec(16, 12, ServerAddress ),
14366                 rec(28, 2, HopsToNet ),
14367         ])                
14368         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14369         # 2222/7B37, 123/55
14370         pkt = NCP(0x7B37, "Get Server Sources Information", 'stats')
14371         pkt.Request((19,68), [
14372                 rec(10, 4, StartNumber ),
14373                 rec(14, 2, ServerType ),
14374                 rec(16, 2, Reserved2 ),
14375                 rec(18, (1,50), ServerNameLen ),
14376         ], info_str=(ServerNameLen, "Get Server Sources Info: %s", ", %s"))                
14377         pkt.Reply(32, [
14378                 rec(8, 4, CurrentServerTime ),
14379                 rec(12, 1, VConsoleVersion ),
14380                 rec(13, 1, VConsoleRevision ),
14381                 rec(14, 2, Reserved2 ),
14382                 rec(16, 4, NumOfEntries, var="x" ),
14383                 rec(20, 12, ServersSrcInfo, repeat="x" ),
14384         ])                
14385         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
14386         # 2222/7B38, 123/56
14387         pkt = NCP(0x7B38, "Get Known Servers Information", 'stats')
14388         pkt.Request(16, [
14389                 rec(10, 4, StartNumber ),
14390                 rec(14, 2, ServerType ),
14391         ])                
14392         pkt.Reply(35, [
14393                 rec(8, 4, CurrentServerTime ),
14394                 rec(12, 1, VConsoleVersion ),
14395                 rec(13, 1, VConsoleRevision ),
14396                 rec(14, 2, Reserved2 ),
14397                 rec(16, 4, NumOfEntries, var="x" ),
14398                 rec(20, 15, KnownServStruc, repeat="x" ),
14399         ])                
14400         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
14401         # 2222/7B3C, 123/60
14402         pkt = NCP(0x7B3C, "Get Server Set Commands Information", 'stats')
14403         pkt.Request(14, [
14404                 rec(10, 4, StartNumber ),
14405         ])                
14406         pkt.Reply(NO_LENGTH_CHECK, [
14407                 rec(8, 4, CurrentServerTime ),
14408                 rec(12, 1, VConsoleVersion ),
14409                 rec(13, 1, VConsoleRevision ),
14410                 rec(14, 2, Reserved2 ),
14411                 rec(16, 4, TtlNumOfSetCmds ),
14412                 rec(20, 4, nextStartingNumber ),
14413                 rec(24, 1, SetCmdType ),
14414                 rec(25, 3, Reserved3 ),
14415                 rec(28, 1, SetCmdCategory ),
14416                 rec(29, 3, Reserved3 ),
14417                 rec(32, 1, SetCmdFlags ),
14418                 rec(33, 3, Reserved3 ),
14419                 rec(36, 100, SetCmdName ),
14420                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x00"),
14421                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x01"),
14422                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x02"),
14423                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x04"),
14424                 srec(SetCmdValueString, req_cond="ncp.set_cmd_type==0x05"),
14425                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x06"),
14426                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x07"),
14427         ])                
14428         pkt.ReqCondSizeVariable()
14429         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14430         # 2222/7B3D, 123/61
14431         pkt = NCP(0x7B3D, "Get Server Set Categories", 'stats')
14432         pkt.Request(14, [
14433                 rec(10, 4, StartNumber ),
14434         ])                
14435         pkt.Reply(124, [
14436                 rec(8, 4, CurrentServerTime ),
14437                 rec(12, 1, VConsoleVersion ),
14438                 rec(13, 1, VConsoleRevision ),
14439                 rec(14, 2, Reserved2 ),
14440                 rec(16, 4, NumberOfSetCategories ),
14441                 rec(20, 4, nextStartingNumber ),
14442                 rec(24, 100, CategoryName ),
14443         ])                
14444         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14445         # 2222/7B3E, 123/62
14446         pkt = NCP(0x7B3E, "Get Server Set Commands Information By Name", 'stats')
14447         pkt.Request(110, [
14448                 rec(10, 100, SetParmName ),
14449         ], info_str=(SetParmName, "Get Server Set Command Info for: %s", ", %s"))                
14450         pkt.Reply(NO_LENGTH_CHECK, [
14451                 rec(8, 4, CurrentServerTime ),
14452                 rec(12, 1, VConsoleVersion ),
14453                 rec(13, 1, VConsoleRevision ),
14454                 rec(14, 2, Reserved2 ),
14455                 rec(16, 4, TtlNumOfSetCmds ),
14456                 rec(20, 4, nextStartingNumber ),
14457                 rec(24, 1, SetCmdType ),
14458                 rec(25, 3, Reserved3 ),
14459                 rec(28, 1, SetCmdCategory ),
14460                 rec(29, 3, Reserved3 ),
14461                 rec(32, 1, SetCmdFlags ),
14462                 rec(33, 3, Reserved3 ),
14463                 rec(36, 100, SetCmdName ),
14464                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x00"),
14465                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x01"),
14466                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x02"),
14467                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x04"),
14468                 srec(SetCmdValueString, req_cond="ncp.set_cmd_type==0x05"),
14469                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x06"),
14470                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x07"),
14471         ])                
14472         pkt.ReqCondSizeVariable()
14473         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14474         # 2222/7B46, 123/70
14475         pkt = NCP(0x7B46, "Get Current Compressing File", 'stats')
14476         pkt.Request(14, [
14477                 rec(10, 4, VolumeNumberLong ),
14478         ])                
14479         pkt.Reply(56, [
14480                 rec(8, 4, ParentID ),
14481                 rec(12, 4, DirectoryEntryNumber ),
14482                 rec(16, 4, compressionStage ),
14483                 rec(20, 4, ttlIntermediateBlks ),
14484                 rec(24, 4, ttlCompBlks ),
14485                 rec(28, 4, curIntermediateBlks ),
14486                 rec(32, 4, curCompBlks ),
14487                 rec(36, 4, curInitialBlks ),
14488                 rec(40, 4, fileFlags ),
14489                 rec(44, 4, projectedCompSize ),
14490                 rec(48, 4, originalSize ),
14491                 rec(52, 4, compressVolume ),
14492         ])                
14493         pkt.CompletionCodes([0x0000, 0x7e00, 0x7901, 0xfb06, 0xff00])
14494         # 2222/7B47, 123/71
14495         pkt = NCP(0x7B47, "Get Current DeCompressing File Info List", 'stats')
14496         pkt.Request(14, [
14497                 rec(10, 4, VolumeNumberLong ),
14498         ])                
14499         pkt.Reply(28, [
14500                 rec(8, 4, FileListCount ),
14501                 rec(12, 16, FileInfoStruct ),
14502         ])                
14503         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
14504         # 2222/7B48, 123/72
14505         pkt = NCP(0x7B48, "Get Compression and Decompression Time and Counts", 'stats')
14506         pkt.Request(14, [
14507                 rec(10, 4, VolumeNumberLong ),
14508         ])                
14509         pkt.Reply(64, [
14510                 rec(8, 56, CompDeCompStat ),
14511         ])
14512         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
14513         # 2222/8301, 131/01
14514         pkt = NCP(0x8301, "RPC Load an NLM", 'fileserver')
14515         pkt.Request(285, [
14516                 rec(10, 4, NLMLoadOptions ),
14517                 rec(14, 16, Reserved16 ),
14518                 rec(30, 255, PathAndName ),
14519         ], info_str=(PathAndName, "RPC Load NLM: %s", ", %s"))                
14520         pkt.Reply(12, [
14521                 rec(8, 4, RPCccode ),
14522         ])                
14523         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14524         # 2222/8302, 131/02
14525         pkt = NCP(0x8302, "RPC Unload an NLM", 'fileserver')
14526         pkt.Request(100, [
14527                 rec(10, 20, Reserved20 ),
14528                 rec(30, 70, NLMName ),
14529         ], info_str=(NLMName, "RPC Unload NLM: %s", ", %s"))                
14530         pkt.Reply(12, [
14531                 rec(8, 4, RPCccode ),
14532         ])                
14533         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14534         # 2222/8303, 131/03
14535         pkt = NCP(0x8303, "RPC Mount Volume", 'fileserver')
14536         pkt.Request(100, [
14537                 rec(10, 20, Reserved20 ),
14538                 rec(30, 70, VolumeNameStringz ),
14539         ], info_str=(VolumeNameStringz, "RPC Mount Volume: %s", ", %s"))                
14540         pkt.Reply(32, [
14541                 rec(8, 4, RPCccode),
14542                 rec(12, 16, Reserved16 ),
14543                 rec(28, 4, VolumeNumberLong ),
14544         ])                
14545         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14546         # 2222/8304, 131/04
14547         pkt = NCP(0x8304, "RPC Dismount Volume", 'fileserver')
14548         pkt.Request(100, [
14549                 rec(10, 20, Reserved20 ),
14550                 rec(30, 70, VolumeNameStringz ),
14551         ], info_str=(VolumeNameStringz, "RPC Dismount Volume: %s", ", %s"))                
14552         pkt.Reply(12, [
14553                 rec(8, 4, RPCccode ), 
14554         ])                
14555         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14556         # 2222/8305, 131/05
14557         pkt = NCP(0x8305, "RPC Add Name Space To Volume", 'fileserver')
14558         pkt.Request(100, [
14559                 rec(10, 20, Reserved20 ),
14560                 rec(30, 70, AddNameSpaceAndVol ),
14561         ], info_str=(AddNameSpaceAndVol, "RPC Add Name Space to Volume: %s", ", %s"))                
14562         pkt.Reply(12, [
14563                 rec(8, 4, RPCccode ),
14564         ])                
14565         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14566         # 2222/8306, 131/06
14567         pkt = NCP(0x8306, "RPC Set Command Value", 'fileserver')
14568         pkt.Request(100, [
14569                 rec(10, 1, SetCmdType ),
14570                 rec(11, 3, Reserved3 ),
14571                 rec(14, 4, SetCmdValueNum ),
14572                 rec(18, 12, Reserved12 ),
14573                 rec(30, 70, SetCmdName ),
14574         ], info_str=(SetCmdName, "RPC Set Command Value: %s", ", %s"))                
14575         pkt.Reply(12, [
14576                 rec(8, 4, RPCccode ),
14577         ])                
14578         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14579         # 2222/8307, 131/07
14580         pkt = NCP(0x8307, "RPC Execute NCF File", 'fileserver')
14581         pkt.Request(285, [
14582                 rec(10, 20, Reserved20 ),
14583                 rec(30, 255, PathAndName ),
14584         ], info_str=(PathAndName, "RPC Execute NCF File: %s", ", %s"))                
14585         pkt.Reply(12, [
14586                 rec(8, 4, RPCccode ),
14587         ])                
14588         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14589 if __name__ == '__main__':
14590 #       import profile
14591 #       filename = "ncp.pstats"
14592 #       profile.run("main()", filename)
14593 #
14594 #       import pstats
14595 #       sys.stdout = msg
14596 #       p = pstats.Stats(filename)
14597 #
14598 #       print "Stats sorted by cumulative time"
14599 #       p.strip_dirs().sort_stats('cumulative').print_stats()
14600 #
14601 #       print "Function callees"
14602 #       p.print_callees()
14603         main()