Note that for THE3GPP_IPV6_DNS_SERVERS we probably *do* need to handle
[obnox/wireshark/wip.git] / ncp2222.py
1 #!/usr/bin/env python
2
3 """
4 Creates C code from a table of NCP type 0x2222 packet types.
5 (And 0x3333, which are the replies, but the packets are more commonly
6 refered to as type 0x2222; the 0x3333 replies are understood to be
7 part of the 0x2222 "family")
8
9 The data-munging code was written by Gilbert Ramirez.
10 The NCP data comes from Greg Morris <GMORRIS@novell.com>.
11 Many thanks to Novell for letting him work on this.
12
13 Additional data sources:
14 "Programmer's Guide to the NetWare Core Protocol" by Steve Conner and Dianne Conner.
15
16 Novell provides info at:
17
18 http://developer.novell.com/ndk/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.64 2004/02/29 08:01:21 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
1179 AbortQueueFlag                  = val_string8("abort_q_flag", "Abort Queue Flag", [
1180         [ 0x00, "Place at End of Queue" ],
1181         [ 0x01, "Do Not Place Spool File, Examine Flags" ],
1182 ])
1183 AcceptedMaxSize                 = uint16("accepted_max_size", "Accepted Max Size")
1184 AccessControl                   = val_string8("access_control", "Access Control", [
1185         [ 0x00, "Open for read by this client" ],
1186         [ 0x01, "Open for write by this client" ],
1187         [ 0x02, "Deny read requests from other stations" ],
1188         [ 0x03, "Deny write requests from other stations" ],
1189         [ 0x04, "File detached" ],
1190         [ 0x05, "TTS holding detach" ],
1191         [ 0x06, "TTS holding open" ],
1192 ])
1193 AccessDate                      = uint16("access_date", "Access Date")
1194 AccessDate.NWDate()
1195 AccessMode                      = bitfield8("access_mode", "Access Mode", [
1196         bf_boolean8(0x01, "acc_mode_read", "Read Access"),
1197         bf_boolean8(0x02, "acc_mode_write", "Write Access"),
1198         bf_boolean8(0x04, "acc_mode_deny_read", "Deny Read Access"),
1199         bf_boolean8(0x08, "acc_mode_deny_write", "Deny Write Access"),
1200         bf_boolean8(0x10, "acc_mode_comp", "Compatibility Mode"),
1201 ])
1202 AccessPrivileges                = bitfield8("access_privileges", "Access Privileges", [
1203         bf_boolean8(0x01, "acc_priv_read", "Read Privileges (files only)"),
1204         bf_boolean8(0x02, "acc_priv_write", "Write Privileges (files only)"),
1205         bf_boolean8(0x04, "acc_priv_open", "Open Privileges (files only)"),
1206         bf_boolean8(0x08, "acc_priv_create", "Create Privileges (files only)"),
1207         bf_boolean8(0x10, "acc_priv_delete", "Delete Privileges (files only)"),
1208         bf_boolean8(0x20, "acc_priv_parent", "Parental Privileges (directories only for creating, deleting, and renaming)"),
1209         bf_boolean8(0x40, "acc_priv_search", "Search Privileges (directories only)"),
1210         bf_boolean8(0x80, "acc_priv_modify", "Modify File Status Flags Privileges (files and directories)"),
1211 ])
1212 AccessRightsMask                = bitfield8("access_rights_mask", "Access Rights", [
1213         bf_boolean8(0x0001, "acc_rights_read", "Read Rights"),
1214         bf_boolean8(0x0002, "acc_rights_write", "Write Rights"),
1215         bf_boolean8(0x0004, "acc_rights_open", "Open Rights"),
1216         bf_boolean8(0x0008, "acc_rights_create", "Create Rights"),
1217         bf_boolean8(0x0010, "acc_rights_delete", "Delete Rights"),
1218         bf_boolean8(0x0020, "acc_rights_parent", "Parental Rights"),
1219         bf_boolean8(0x0040, "acc_rights_search", "Search Rights"),
1220         bf_boolean8(0x0080, "acc_rights_modify", "Modify Rights"),
1221 ])
1222 AccessRightsMaskWord            = bitfield16("access_rights_mask_word", "Access Rights", [
1223         bf_boolean16(0x0001, "acc_rights1_read", "Read Rights"),
1224         bf_boolean16(0x0002, "acc_rights1_write", "Write Rights"),
1225         bf_boolean16(0x0004, "acc_rights1_open", "Open Rights"),
1226         bf_boolean16(0x0008, "acc_rights1_create", "Create Rights"),
1227         bf_boolean16(0x0010, "acc_rights1_delete", "Delete Rights"),
1228         bf_boolean16(0x0020, "acc_rights1_parent", "Parental Rights"),
1229         bf_boolean16(0x0040, "acc_rights1_search", "Search Rights"),
1230         bf_boolean16(0x0080, "acc_rights1_modify", "Modify Rights"),
1231         bf_boolean16(0x0100, "acc_rights1_supervisor", "Supervisor Access Rights"),
1232 ])
1233 AccountBalance                  = uint32("account_balance", "Account Balance")
1234 AccountVersion                  = uint8("acct_version", "Acct Version")
1235 ActionFlag                      = bitfield8("action_flag", "Action Flag", [
1236         bf_boolean8(0x01, "act_flag_open", "Open"),
1237         bf_boolean8(0x02, "act_flag_replace", "Replace"),
1238         bf_boolean8(0x10, "act_flag_create", "Create"),
1239 ])
1240 ActiveConnBitList               = fw_string("active_conn_bit_list", "Active Connection List", 512)
1241 ActiveIndexedFiles              = uint16("active_indexed_files", "Active Indexed Files")
1242 ActualMaxBinderyObjects         = uint16("actual_max_bindery_objects", "Actual Max Bindery Objects")
1243 ActualMaxIndexedFiles           = uint16("actual_max_indexed_files", "Actual Max Indexed Files")
1244 ActualMaxOpenFiles              = uint16("actual_max_open_files", "Actual Max Open Files")
1245 ActualMaxSimultaneousTransactions = uint16("actual_max_sim_trans", "Actual Max Simultaneous Transactions")
1246 ActualMaxUsedDirectoryEntries   = uint16("actual_max_used_directory_entries", "Actual Max Used Directory Entries")
1247 ActualMaxUsedRoutingBuffers     = uint16("actual_max_used_routing_buffers", "Actual Max Used Routing Buffers")
1248 ActualResponseCount             = uint16("actual_response_count", "Actual Response Count")
1249 AddNameSpaceAndVol              = stringz("add_nm_spc_and_vol", "Add Name Space and Volume")
1250 AFPEntryID                      = uint32("afp_entry_id", "AFP Entry ID", BE)
1251 AFPEntryID.Display("BASE_HEX")
1252 AllocAvailByte                  = uint32("alloc_avail_byte", "Bytes Available for Allocation")
1253 AllocateMode                    = val_string16("allocate_mode", "Allocate Mode", [
1254         [ 0x0000, "Permanent Directory Handle" ],
1255         [ 0x0001, "Temporary Directory Handle" ],
1256         [ 0x0002, "Special Temporary Directory Handle" ],
1257 ])
1258 AllocationBlockSize             = uint32("allocation_block_size", "Allocation Block Size")
1259 AllocFreeCount                  = uint32("alloc_free_count", "Reclaimable Free Bytes")
1260 ApplicationNumber               = uint16("application_number", "Application Number")
1261 ArchivedTime                    = uint16("archived_time", "Archived Time")
1262 ArchivedTime.NWTime()
1263 ArchivedDate                    = uint16("archived_date", "Archived Date")
1264 ArchivedDate.NWDate()
1265 ArchiverID                      = uint32("archiver_id", "Archiver ID", BE)
1266 ArchiverID.Display("BASE_HEX")
1267 AssociatedNameSpace             = uint8("associated_name_space", "Associated Name Space")
1268 AttachDuringProcessing          = uint16("attach_during_processing", "Attach During Processing")
1269 AttachedIndexedFiles            = uint8("attached_indexed_files", "Attached Indexed Files")
1270 AttachWhileProcessingAttach     = uint16("attach_while_processing_attach", "Attach While Processing Attach")
1271 Attributes                      = uint32("attributes", "Attributes")
1272 AttributesDef                   = bitfield8("attr_def", "Attributes", [
1273         bf_boolean8(0x01, "att_def_ro", "Read Only"),
1274         bf_boolean8(0x02, "att_def_hidden", "Hidden"),
1275         bf_boolean8(0x04, "att_def_system", "System"),
1276         bf_boolean8(0x08, "att_def_execute", "Execute"),
1277         bf_boolean8(0x10, "att_def_sub_only", "Subdirectory"),
1278         bf_boolean8(0x20, "att_def_archive", "Archive"),
1279         bf_boolean8(0x80, "att_def_shareable", "Shareable"),
1280 ])
1281 AttributesDef16                 = bitfield16("attr_def_16", "Attributes", [
1282         bf_boolean16(0x0001, "att_def16_ro", "Read Only"),
1283         bf_boolean16(0x0002, "att_def16_hidden", "Hidden"),
1284         bf_boolean16(0x0004, "att_def16_system", "System"),
1285         bf_boolean16(0x0008, "att_def16_execute", "Execute"),
1286         bf_boolean16(0x0010, "att_def16_sub_only", "Subdirectory"),
1287         bf_boolean16(0x0020, "att_def16_archive", "Archive"),
1288         bf_boolean16(0x0080, "att_def16_shareable", "Shareable"),
1289         bf_boolean16(0x1000, "att_def16_transaction", "Transactional"),
1290         bf_boolean16(0x4000, "att_def16_read_audit", "Read Audit"),
1291         bf_boolean16(0x8000, "att_def16_write_audit", "Write Audit"),
1292 ])
1293 AttributesDef32                 = bitfield32("attr_def_32", "Attributes", [
1294         bf_boolean32(0x00000001, "att_def32_ro", "Read Only"),
1295         bf_boolean32(0x00000002, "att_def32_hidden", "Hidden"),
1296         bf_boolean32(0x00000004, "att_def32_system", "System"),
1297         bf_boolean32(0x00000008, "att_def32_execute", "Execute"),
1298         bf_boolean32(0x00000010, "att_def32_sub_only", "Subdirectory"),
1299         bf_boolean32(0x00000020, "att_def32_archive", "Archive"),
1300         bf_boolean32(0x00000080, "att_def32_shareable", "Shareable"),
1301         bf_boolean32(0x00001000, "att_def32_transaction", "Transactional"),
1302         bf_boolean32(0x00004000, "att_def32_read_audit", "Read Audit"),
1303         bf_boolean32(0x00008000, "att_def32_write_audit", "Write Audit"),
1304         bf_boolean32(0x00010000, "att_def_purge", "Purge"),
1305         bf_boolean32(0x00020000, "att_def_reninhibit", "Rename Inhibit"),
1306         bf_boolean32(0x00040000, "att_def_delinhibit", "Delete Inhibit"),
1307         bf_boolean32(0x00080000, "att_def_cpyinhibit", "Copy Inhibit"),
1308         bf_boolean32(0x02000000, "att_def_im_comp", "Immediate Compress"),
1309         bf_boolean32(0x04000000, "att_def_comp", "Compressed"),
1310 ])
1311 AttributeValidFlag              = uint32("attribute_valid_flag", "Attribute Valid Flag")
1312 AuditFileVersionDate            = uint16("audit_file_ver_date", "Audit File Version Date")
1313 AuditFileVersionDate.NWDate()
1314 AuditFlag                       = val_string8("audit_flag", "Audit Flag", [
1315         [ 0x00, "Do NOT audit object" ],
1316         [ 0x01, "Audit object" ],
1317 ])
1318 AuditHandle                     = uint32("audit_handle", "Audit File Handle")
1319 AuditHandle.Display("BASE_HEX")
1320 AuditID                         = uint32("audit_id", "Audit ID", BE)
1321 AuditID.Display("BASE_HEX")
1322 AuditIDType                     = val_string16("audit_id_type", "Audit ID Type", [
1323         [ 0x0000, "Volume" ],
1324         [ 0x0001, "Container" ],
1325 ])
1326 AuditVersionDate                = uint16("audit_ver_date", "Auditing Version Date")
1327 AuditVersionDate.NWDate()
1328 AvailableBlocks                 = uint32("available_blocks", "Available Blocks")
1329 AvailableClusters               = uint16("available_clusters", "Available Clusters")
1330 AvailableDirectorySlots         = uint16("available_directory_slots", "Available Directory Slots")
1331 AvailableDirEntries             = uint32("available_dir_entries", "Available Directory Entries")
1332 AvailableIndexedFiles           = uint16("available_indexed_files", "Available Indexed Files")
1333
1334 BackgroundAgedWrites            = uint32("background_aged_writes", "Background Aged Writes")
1335 BackgroundDirtyWrites           = uint32("background_dirty_writes", "Background Dirty Writes")
1336 BadLogicalConnectionCount       = uint16("bad_logical_connection_count", "Bad Logical Connection Count")
1337 BannerName                      = fw_string("banner_name", "Banner Name", 14)
1338 BaseDirectoryID                 = uint32("base_directory_id", "Base Directory ID", BE)
1339 BaseDirectoryID.Display("BASE_HEX")
1340 binderyContext                  = nstring8("bindery_context", "Bindery Context")
1341 BitMap                          = bytes("bit_map", "Bit Map", 512)
1342 BlockNumber                     = uint32("block_number", "Block Number")
1343 BlockSize                       = uint16("block_size", "Block Size")
1344 BlockSizeInSectors              = uint32("block_size_in_sectors", "Block Size in Sectors")
1345 BoardInstalled                  = uint8("board_installed", "Board Installed")
1346 BoardNumber                     = uint32("board_number", "Board Number")
1347 BoardNumbers                    = uint32("board_numbers", "Board Numbers")
1348 BufferSize                      = uint16("buffer_size", "Buffer Size")
1349 BusString                       = stringz("bus_string", "Bus String")
1350 BusType                         = val_string8("bus_type", "Bus Type", [
1351         [0x00, "ISA"],
1352         [0x01, "Micro Channel" ],
1353         [0x02, "EISA"],
1354         [0x04, "PCI"],
1355         [0x08, "PCMCIA"],
1356         [0x10, "ISA"],
1357         [0x14, "ISA"],
1358 ])
1359 BytesActuallyTransferred        = uint32("bytes_actually_transferred", "Bytes Actually Transferred")
1360 BytesRead                       = fw_string("bytes_read", "Bytes Read", 6)
1361 BytesToCopy                     = uint32("bytes_to_copy", "Bytes to Copy")
1362 BytesWritten                    = fw_string("bytes_written", "Bytes Written", 6)
1363
1364 CacheAllocations                = uint32("cache_allocations", "Cache Allocations")
1365 CacheBlockScrapped              = uint16("cache_block_scrapped", "Cache Block Scrapped")
1366 CacheBufferCount                = uint16("cache_buffer_count", "Cache Buffer Count")
1367 CacheBufferSize                 = uint16("cache_buffer_size", "Cache Buffer Size")
1368 CacheFullWriteRequests          = uint32("cache_full_write_requests", "Cache Full Write Requests")
1369 CacheGetRequests                = uint32("cache_get_requests", "Cache Get Requests")
1370 CacheHitOnUnavailableBlock      = uint16("cache_hit_on_unavailable_block", "Cache Hit On Unavailable Block")
1371 CacheHits                       = uint32("cache_hits", "Cache Hits")
1372 CacheMisses                     = uint32("cache_misses", "Cache Misses")
1373 CachePartialWriteRequests       = uint32("cache_partial_write_requests", "Cache Partial Write Requests")
1374 CacheReadRequests               = uint32("cache_read_requests", "Cache Read Requests")
1375 CacheWriteRequests              = uint32("cache_write_requests", "Cache Write Requests")
1376 CategoryName                    = stringz("category_name", "Category Name")
1377 CCFileHandle                    = uint32("cc_file_handle", "File Handle")
1378 CCFileHandle.Display("BASE_HEX")
1379 CCFunction                      = val_string8("cc_function", "OP-Lock Flag", [
1380         [ 0x01, "Clear OP-Lock" ],
1381         [ 0x02, "Acknowledge Callback" ],
1382         [ 0x03, "Decline Callback" ],
1383     [ 0x04, "Level 2" ],
1384 ])
1385 ChangeBits                      = bitfield16("change_bits", "Change Bits", [
1386         bf_boolean16(0x0001, "change_bits_modify", "Modify Name"),
1387         bf_boolean16(0x0002, "change_bits_fatt", "File Attributes"),
1388         bf_boolean16(0x0004, "change_bits_cdate", "Creation Date"),
1389         bf_boolean16(0x0008, "change_bits_ctime", "Creation Time"),
1390         bf_boolean16(0x0010, "change_bits_owner", "Owner ID"),
1391         bf_boolean16(0x0020, "change_bits_adate", "Archive Date"),
1392         bf_boolean16(0x0040, "change_bits_atime", "Archive Time"),
1393         bf_boolean16(0x0080, "change_bits_aid", "Archiver ID"),
1394         bf_boolean16(0x0100, "change_bits_udate", "Update Date"),
1395         bf_boolean16(0x0200, "change_bits_utime", "Update Time"),
1396         bf_boolean16(0x0400, "change_bits_uid", "Update ID"),
1397         bf_boolean16(0x0800, "change_bits_acc_date", "Access Date"),
1398         bf_boolean16(0x1000, "change_bits_max_acc_mask", "Maximum Access Mask"),
1399         bf_boolean16(0x2000, "change_bits_max_space", "Maximum Space"),
1400 ])
1401 ChannelState                    = val_string8("channel_state", "Channel State", [
1402         [ 0x00, "Channel is running" ],
1403         [ 0x01, "Channel is stopping" ],
1404         [ 0x02, "Channel is stopped" ],
1405         [ 0x03, "Channel is not functional" ],
1406 ])
1407 ChannelSynchronizationState     = val_string8("channel_synchronization_state", "Channel Synchronization State", [
1408         [ 0x00, "Channel is not being used" ],
1409         [ 0x02, "NetWare is using the channel; no one else wants it" ],
1410         [ 0x04, "NetWare is using the channel; someone else wants it" ],
1411         [ 0x06, "Someone else is using the channel; NetWare does not need it" ],
1412         [ 0x08, "Someone else is using the channel; NetWare needs it" ],
1413         [ 0x0A, "Someone else has released the channel; NetWare should use it" ],
1414 ])
1415 ChargeAmount                    = uint32("charge_amount", "Charge Amount")
1416 ChargeInformation               = uint32("charge_information", "Charge Information")
1417 ClientCompFlag                  = val_string16("client_comp_flag", "Completion Flag", [
1418         [ 0x0000, "Successful" ],
1419         [ 0x0001, "Illegal Station Number" ],
1420         [ 0x0002, "Client Not Logged In" ],
1421         [ 0x0003, "Client Not Accepting Messages" ],
1422         [ 0x0004, "Client Already has a Message" ],
1423         [ 0x0096, "No Alloc Space for the Message" ],
1424         [ 0x00fd, "Bad Station Number" ],
1425         [ 0x00ff, "Failure" ],
1426 ])
1427 ClientIDNumber                  = uint32("client_id_number", "Client ID Number", BE)
1428 ClientIDNumber.Display("BASE_HEX")
1429 ClientList                      = uint32("client_list", "Client List")
1430 ClientListCount                 = uint16("client_list_cnt", "Client List Count")
1431 ClientListLen                   = uint8("client_list_len", "Client List Length")
1432 ClientName                      = nstring8("client_name", "Client Name")
1433 ClientRecordArea                = fw_string("client_record_area", "Client Record Area", 152)
1434 ClientStation                   = uint8("client_station", "Client Station")
1435 ClientStationLong               = uint32("client_station_long", "Client Station")
1436 ClientTaskNumber                = uint8("client_task_number", "Client Task Number")
1437 ClientTaskNumberLong            = uint32("client_task_number_long", "Client Task Number")
1438 ClusterCount                    = uint16("cluster_count", "Cluster Count")
1439 ClustersUsedByDirectories       = uint32("clusters_used_by_directories", "Clusters Used by Directories")
1440 ClustersUsedByExtendedDirectories = uint32("clusters_used_by_extended_dirs", "Clusters Used by Extended Directories")
1441 ClustersUsedByFAT               = uint32("clusters_used_by_fat", "Clusters Used by FAT")
1442 ComCnts                         = uint16("com_cnts", "Communication Counters")
1443 Comment                         = nstring8("comment", "Comment")
1444 CommentType                     = uint16("comment_type", "Comment Type")
1445 CompletionCode                  = uint32("ncompletion_code", "Completion Code")
1446 CompressedDataStreamsCount      = uint32("compressed_data_streams_count", "Compressed Data Streams Count")
1447 CompressedLimboDataStreamsCount = uint32("compressed_limbo_data_streams_count", "Compressed Limbo Data Streams Count")
1448 CompressedSectors               = uint32("compressed_sectors", "Compressed Sectors")
1449 compressionStage                = uint32("compression_stage", "Compression Stage")
1450 compressVolume                  = uint32("compress_volume", "Volume Compression")
1451 ConfigMajorVN                   = uint8("config_major_vn", "Configuration Major Version Number")
1452 ConfigMinorVN                   = uint8("config_minor_vn", "Configuration Minor Version Number")
1453 ConfigurationDescription        = fw_string("configuration_description", "Configuration Description", 80)
1454 ConfigurationText               = fw_string("configuration_text", "Configuration Text", 160)
1455 ConfiguredMaxBinderyObjects     = uint16("configured_max_bindery_objects", "Configured Max Bindery Objects")
1456 ConfiguredMaxOpenFiles          = uint16("configured_max_open_files", "Configured Max Open Files")
1457 ConfiguredMaxRoutingBuffers     = uint16("configured_max_routing_buffers", "Configured Max Routing Buffers")
1458 ConfiguredMaxSimultaneousTransactions = uint16("cfg_max_simultaneous_transactions", "Configured Max Simultaneous Transactions")
1459 ConnectedLAN                    = uint32("connected_lan", "LAN Adapter")
1460 ConnectionControlBits           = bitfield8("conn_ctrl_bits", "Connection Control", [
1461         bf_boolean8(0x01, "enable_brdcasts", "Enable Broadcasts"),
1462         bf_boolean8(0x02, "enable_personal_brdcasts", "Enable Personal Broadcasts"),
1463         bf_boolean8(0x04, "enable_wdog_messages", "Enable Watchdog Message"),
1464         bf_boolean8(0x10, "disable_brdcasts", "Disable Broadcasts"),
1465         bf_boolean8(0x20, "disable_personal_brdcasts", "Disable Personal Broadcasts"),
1466         bf_boolean8(0x40, "disable_wdog_messages", "Disable Watchdog Message"),
1467 ])
1468 ConnectionListCount             = uint32("conn_list_count", "Connection List Count")
1469 ConnectionList                  = uint32("connection_list", "Connection List")
1470 ConnectionNumber                = uint32("connection_number", "Connection Number", BE)
1471 ConnectionNumberList            = nstring8("connection_number_list", "Connection Number List")
1472 ConnectionNumberWord            = uint16("conn_number_word", "Connection Number")
1473 ConnectionNumberByte            = uint8("conn_number_byte", "Connection Number")
1474 ConnectionServiceType           = val_string8("connection_service_type","Connection Service Type",[
1475         [ 0x01, "CLIB backward Compatibility" ],
1476         [ 0x02, "NCP Connection" ],
1477         [ 0x03, "NLM Connection" ],
1478         [ 0x04, "AFP Connection" ],
1479         [ 0x05, "FTAM Connection" ],
1480         [ 0x06, "ANCP Connection" ],
1481         [ 0x07, "ACP Connection" ],
1482         [ 0x08, "SMB Connection" ],
1483         [ 0x09, "Winsock Connection" ],
1484 ])
1485 ConnectionsInUse                = uint16("connections_in_use", "Connections In Use")
1486 ConnectionsMaxUsed              = uint16("connections_max_used", "Connections Max Used")
1487 ConnectionsSupportedMax         = uint16("connections_supported_max", "Connections Supported Max")
1488 ConnectionType                  = val_string8("connection_type", "Connection Type", [
1489         [ 0x00, "Not in use" ],
1490         [ 0x02, "NCP" ],
1491         [ 0x11, "UDP (for IP)" ],
1492 ])
1493 ConnListLen                     = uint8("conn_list_len", "Connection List Length")
1494 Copyright                       = nstring8("copyright", "Copyright")
1495 connList                        = uint32("conn_list", "Connection List")
1496 ControlFlags                    = val_string8("control_flags", "Control Flags", [
1497         [ 0x00, "Forced Record Locking is Off" ],
1498         [ 0x01, "Forced Record Locking is On" ],
1499 ])
1500 ControllerDriveNumber           = uint8("controller_drive_number", "Controller Drive Number")
1501 ControllerNumber                = uint8("controller_number", "Controller Number")
1502 ControllerType                  = uint8("controller_type", "Controller Type")
1503 Cookie1                         = uint32("cookie_1", "Cookie 1")
1504 Cookie2                         = uint32("cookie_2", "Cookie 2")
1505 Copies                          = uint8( "copies", "Copies" )
1506 CoprocessorFlag                 = uint32("co_processor_flag", "CoProcessor Present Flag")
1507 CoProcessorString               = stringz("co_proc_string", "CoProcessor String")
1508 CounterMask                     = val_string8("counter_mask", "Counter Mask", [
1509         [ 0x00, "Counter is Valid" ],
1510         [ 0x01, "Counter is not Valid" ],
1511 ])
1512 CPUNumber                       = uint32("cpu_number", "CPU Number")
1513 CPUString                       = stringz("cpu_string", "CPU String")
1514 CPUType                         = val_string8("cpu_type", "CPU Type", [
1515         [ 0x00, "80386" ],
1516         [ 0x01, "80486" ],
1517         [ 0x02, "Pentium" ],
1518         [ 0x03, "Pentium Pro" ],
1519 ])
1520 CreationDate                    = uint16("creation_date", "Creation Date")
1521 CreationDate.NWDate()
1522 CreationTime                    = uint16("creation_time", "Creation Time")
1523 CreationTime.NWTime()
1524 CreatorID                       = uint32("creator_id", "Creator ID", BE)
1525 CreatorID.Display("BASE_HEX")
1526 CreatorNameSpaceNumber          = val_string8("creator_name_space_number", "Creator Name Space Number", [
1527         [ 0x00, "DOS Name Space" ],
1528         [ 0x01, "MAC Name Space" ],
1529         [ 0x02, "NFS Name Space" ],
1530         [ 0x04, "Long Name Space" ],
1531 ])
1532 CreditLimit                     = uint32("credit_limit", "Credit Limit")
1533 CtrlFlags                       = val_string16("ctrl_flags", "Control Flags", [
1534         [ 0x0000, "Do Not Return File Name" ],
1535         [ 0x0001, "Return File Name" ],
1536 ])
1537 curCompBlks                     = uint32("cur_comp_blks", "Current Compression Blocks")
1538 curInitialBlks                  = uint32("cur_initial_blks", "Current Initial Blocks")
1539 curIntermediateBlks             = uint32("cur_inter_blks", "Current Intermediate Blocks")
1540 CurNumOfRTags                   = uint32("cur_num_of_r_tags", "Current Number of Resource Tags")
1541 CurrentBlockBeingDecompressed   = uint32("cur_blk_being_dcompress", "Current Block Being Decompressed")
1542 CurrentChangedFATs              = uint16("current_changed_fats", "Current Changed FAT Entries")
1543 CurrentEntries                  = uint32("current_entries", "Current Entries")
1544 CurrentFormType                 = uint8( "current_form_type", "Current Form Type" )
1545 CurrentLFSCounters              = uint32("current_lfs_counters", "Current LFS Counters")
1546 CurrentlyUsedRoutingBuffers     = uint16("currently_used_routing_buffers", "Currently Used Routing Buffers")
1547 CurrentOpenFiles                = uint16("current_open_files", "Current Open Files")
1548 CurrentReferenceID              = uint16("curr_ref_id", "Current Reference ID")
1549 CurrentServers                  = uint32("current_servers", "Current Servers")
1550 CurrentServerTime               = uint32("current_server_time", "Time Elapsed Since Server Was Brought Up")
1551 CurrentSpace                    = uint32("current_space", "Current Space")
1552 CurrentTransactionCount         = uint32("current_trans_count", "Current Transaction Count")
1553 CurrentUsedBinderyObjects       = uint16("current_used_bindery_objects", "Current Used Bindery Objects")
1554 CurrentUsedDynamicSpace         = uint32("current_used_dynamic_space", "Current Used Dynamic Space")
1555 CustomCnts                      = uint32("custom_cnts", "Custom Counters")
1556 CustomCount                     = uint32("custom_count", "Custom Count")
1557 CustomCounters                  = uint32("custom_counters", "Custom Counters")
1558 CustomString                    = nstring8("custom_string", "Custom String")
1559 CustomVariableValue             = uint32("custom_var_value", "Custom Variable Value")
1560
1561 Data                            = nstring8("data", "Data")
1562 DataForkFirstFAT                = uint32("data_fork_first_fat", "Data Fork First FAT Entry")
1563 DataForkLen                     = uint32("data_fork_len", "Data Fork Len")
1564 DataForkSize                    = uint32("data_fork_size", "Data Fork Size")
1565 DataSize                        = uint32("data_size", "Data Size")
1566 DataStream                      = val_string8("data_stream", "Data Stream", [
1567         [ 0x00, "Resource Fork or DOS" ],
1568         [ 0x01, "Data Fork" ],
1569 ])
1570 DataStreamName                  = nstring8("data_stream_name", "Data Stream Name")
1571 DataStreamNumber                = uint8("data_stream_number", "Data Stream Number")
1572 DataStreamsCount                = uint32("data_streams_count", "Data Streams Count")
1573 DataStreamSize                  = uint32("data_stream_size", "Size")
1574 DataStreamSpaceAlloc            = uint32( "data_stream_space_alloc", "Space Allocated for Data Stream" )
1575 Day                             = uint8("s_day", "Day")
1576 DayOfWeek                       = val_string8("s_day_of_week", "Day of Week", [
1577         [ 0x00, "Sunday" ],
1578         [ 0x01, "Monday" ],
1579         [ 0x02, "Tuesday" ],
1580         [ 0x03, "Wednesday" ],
1581         [ 0x04, "Thursday" ],
1582         [ 0x05, "Friday" ],
1583         [ 0x06, "Saturday" ],
1584 ])
1585 DeadMirrorTable                 = bytes("dead_mirror_table", "Dead Mirror Table", 32)
1586 DefinedDataStreams              = uint8("defined_data_streams", "Defined Data Streams")
1587 DefinedNameSpaces               = uint8("defined_name_spaces", "Defined Name Spaces")
1588 DeletedDate                     = uint16("deleted_date", "Deleted Date")
1589 DeletedDate.NWDate()
1590 DeletedFileTime                 = uint32( "deleted_file_time", "Deleted File Time")
1591 DeletedFileTime.Display("BASE_HEX")
1592 DeletedTime                     = uint16("deleted_time", "Deleted Time")
1593 DeletedTime.NWTime()
1594 DeletedID                       = uint32( "delete_id", "Deleted ID", BE)
1595 DeletedID.Display("BASE_HEX")
1596 DeleteExistingFileFlag          = val_string8("delete_existing_file_flag", "Delete Existing File Flag", [
1597         [ 0x00, "Do Not Delete Existing File" ],
1598         [ 0x01, "Delete Existing File" ],
1599 ])
1600 DenyReadCount                   = uint16("deny_read_count", "Deny Read Count")
1601 DenyWriteCount                  = uint16("deny_write_count", "Deny Write Count")
1602 DescriptionStrings              = fw_string("description_string", "Description", 100)
1603 DesiredAccessRights             = bitfield16("desired_access_rights", "Desired Access Rights", [
1604         bf_boolean16(0x0001, "dsired_acc_rights_read_o", "Read Only"),
1605         bf_boolean16(0x0002, "dsired_acc_rights_write_o", "Write Only"),
1606         bf_boolean16(0x0004, "dsired_acc_rights_deny_r", "Deny Read"),
1607         bf_boolean16(0x0008, "dsired_acc_rights_deny_w", "Deny Write"),
1608         bf_boolean16(0x0010, "dsired_acc_rights_compat", "Compatibility"),
1609         bf_boolean16(0x0040, "dsired_acc_rights_w_thru", "File Write Through"),
1610         bf_boolean16(0x0400, "dsired_acc_rights_del_file_cls", "Delete File Close"),
1611 ])
1612 DesiredResponseCount            = uint16("desired_response_count", "Desired Response Count")
1613 DestDirHandle                   = uint8("dest_dir_handle", "Destination Directory Handle")
1614 DestNameSpace                   = val_string8("dest_name_space", "Destination Name Space", [
1615         [ 0x00, "DOS Name Space" ],
1616         [ 0x01, "MAC Name Space" ],
1617         [ 0x02, "NFS Name Space" ],
1618         [ 0x04, "Long Name Space" ],
1619 ])
1620 DestPathComponentCount          = uint8("dest_component_count", "Destination Path Component Count")
1621 DestPath                        = nstring8("dest_path", "Destination Path")
1622 DetachDuringProcessing          = uint16("detach_during_processing", "Detach During Processing")
1623 DetachForBadConnectionNumber    = uint16("detach_for_bad_connection_number", "Detach For Bad Connection Number")
1624 DirHandle                       = uint8("dir_handle", "Directory Handle")
1625 DirHandleName                   = uint8("dir_handle_name", "Handle Name")
1626 DirHandleLong                   = uint32("dir_handle_long", "Directory Handle")
1627 DirectoryAccessRights           = uint8("directory_access_rights", "Directory Access Rights")
1628 #
1629 # XXX - what do the bits mean here?
1630 #
1631 DirectoryAttributes             = uint8("directory_attributes", "Directory Attributes")
1632 DirectoryBase                   = uint32("dir_base", "Directory Base")
1633 DirectoryBase.Display("BASE_HEX")
1634 DirectoryCount                  = uint16("dir_count", "Directory Count")
1635 DirectoryEntryNumber            = uint32("directory_entry_number", "Directory Entry Number")
1636 DirectoryEntryNumber.Display('BASE_HEX')
1637 DirectoryEntryNumberWord        = uint16("directory_entry_number_word", "Directory Entry Number")
1638 DirectoryID                     = uint16("directory_id", "Directory ID", BE)
1639 DirectoryID.Display("BASE_HEX")
1640 DirectoryName                   = fw_string("directory_name", "Directory Name",12)
1641 DirectoryName14                 = fw_string("directory_name_14", "Directory Name", 14)
1642 DirectoryNameLen                = uint8("directory_name_len", "Directory Name Length")
1643 DirectoryNumber                 = uint32("directory_number", "Directory Number")
1644 DirectoryNumber.Display("BASE_HEX")
1645 DirectoryPath                   = fw_string("directory_path", "Directory Path", 16)
1646 DirectoryServicesObjectID       = uint32("directory_services_object_id", "Directory Services Object ID")
1647 DirectoryServicesObjectID.Display("BASE_HEX")
1648 DirectoryStamp                  = uint16("directory_stamp", "Directory Stamp (0xD1D1)")
1649 DirtyCacheBuffers               = uint16("dirty_cache_buffers", "Dirty Cache Buffers")
1650 DiskChannelNumber               = uint8("disk_channel_number", "Disk Channel Number")
1651 DiskChannelTable                = val_string8("disk_channel_table", "Disk Channel Table", [
1652         [ 0x01, "XT" ],
1653         [ 0x02, "AT" ],
1654         [ 0x03, "SCSI" ],
1655         [ 0x04, "Disk Coprocessor" ],
1656 ])
1657 DiskSpaceLimit                  = uint32("disk_space_limit", "Disk Space Limit")
1658 DMAChannelsUsed                 = uint32("dma_channels_used", "DMA Channels Used")
1659 DMInfoEntries                   = uint32("dm_info_entries", "DM Info Entries")
1660 DMInfoLevel                     = val_string8("dm_info_level", "DM Info Level", [
1661         [ 0x00, "Return Detailed DM Support Module Information" ],
1662         [ 0x01, "Return Number of DM Support Modules" ],
1663         [ 0x02, "Return DM Support Modules Names" ],
1664 ])
1665 DMFlags                         = val_string8("dm_flags", "DM Flags", [
1666         [ 0x00, "OnLine Media" ],
1667         [ 0x01, "OffLine Media" ],
1668 ])
1669 DMmajorVersion                  = uint32("dm_major_version", "DM Major Version")
1670 DMminorVersion                  = uint32("dm_minor_version", "DM Minor Version")
1671 DMPresentFlag                   = val_string8("dm_present_flag", "Data Migration Present Flag", [
1672         [ 0x00, "Data Migration NLM is not loaded" ],
1673         [ 0x01, "Data Migration NLM has been loaded and is running" ],
1674 ])
1675 DOSDirectoryBase                = uint32("dos_directory_base", "DOS Directory Base")
1676 DOSDirectoryBase.Display("BASE_HEX")
1677 DOSDirectoryEntry               = uint32("dos_directory_entry", "DOS Directory Entry")
1678 DOSDirectoryEntry.Display("BASE_HEX")
1679 DOSDirectoryEntryNumber         = uint32("dos_directory_entry_number", "DOS Directory Entry Number")
1680 DOSDirectoryEntryNumber.Display('BASE_HEX')
1681 DOSFileAttributes               = uint8("dos_file_attributes", "DOS File Attributes")
1682 DOSParentDirectoryEntry         = uint32("dos_parent_directory_entry", "DOS Parent Directory Entry")
1683 DOSParentDirectoryEntry.Display('BASE_HEX')
1684 DOSSequence                     = uint32("dos_sequence", "DOS Sequence")
1685 DriveCylinders                  = uint16("drive_cylinders", "Drive Cylinders")
1686 DriveDefinitionString           = fw_string("drive_definition_string", "Drive Definition", 64)
1687 DriveHeads                      = uint8("drive_heads", "Drive Heads")
1688 DriveMappingTable               = bytes("drive_mapping_table", "Drive Mapping Table", 32)
1689 DriveMirrorTable                = bytes("drive_mirror_table", "Drive Mirror Table", 32)
1690 DriverBoardName                 = stringz("driver_board_name", "Driver Board Name")
1691 DriveRemovableFlag              = val_string8("drive_removable_flag", "Drive Removable Flag", [
1692         [ 0x00, "Nonremovable" ],
1693         [ 0xff, "Removable" ],
1694 ])
1695 DriverLogicalName               = stringz("driver_log_name", "Driver Logical Name")
1696 DriverShortName                 = stringz("driver_short_name", "Driver Short Name")
1697 DriveSize                       = uint32("drive_size", "Drive Size")
1698 DstEAFlags                      = val_string16("dst_ea_flags", "Destination EA Flags", [
1699         [ 0x0000, "Return EAHandle,Information Level 0" ],
1700         [ 0x0001, "Return NetWareHandle,Information Level 0" ],
1701         [ 0x0002, "Return Volume/Directory Number,Information Level 0" ],
1702         [ 0x0004, "Return EAHandle,Close Handle on Error,Information Level 0" ],
1703         [ 0x0005, "Return NetWareHandle,Close Handle on Error,Information Level 0" ],
1704         [ 0x0006, "Return Volume/Directory Number,Close Handle on Error,Information Level 0" ],
1705         [ 0x0010, "Return EAHandle,Information Level 1" ],
1706         [ 0x0011, "Return NetWareHandle,Information Level 1" ],
1707         [ 0x0012, "Return Volume/Directory Number,Information Level 1" ],
1708         [ 0x0014, "Return EAHandle,Close Handle on Error,Information Level 1" ],
1709         [ 0x0015, "Return NetWareHandle,Close Handle on Error,Information Level 1" ],
1710         [ 0x0016, "Return Volume/Directory Number,Close Handle on Error,Information Level 1" ],
1711         [ 0x0020, "Return EAHandle,Information Level 2" ],
1712         [ 0x0021, "Return NetWareHandle,Information Level 2" ],
1713         [ 0x0022, "Return Volume/Directory Number,Information Level 2" ],
1714         [ 0x0024, "Return EAHandle,Close Handle on Error,Information Level 2" ],
1715         [ 0x0025, "Return NetWareHandle,Close Handle on Error,Information Level 2" ],
1716         [ 0x0026, "Return Volume/Directory Number,Close Handle on Error,Information Level 2" ],
1717         [ 0x0030, "Return EAHandle,Information Level 3" ],
1718         [ 0x0031, "Return NetWareHandle,Information Level 3" ],
1719         [ 0x0032, "Return Volume/Directory Number,Information Level 3" ],
1720         [ 0x0034, "Return EAHandle,Close Handle on Error,Information Level 3" ],
1721         [ 0x0035, "Return NetWareHandle,Close Handle on Error,Information Level 3" ],
1722         [ 0x0036, "Return Volume/Directory Number,Close Handle on Error,Information Level 3" ],
1723         [ 0x0040, "Return EAHandle,Information Level 4" ],
1724         [ 0x0041, "Return NetWareHandle,Information Level 4" ],
1725         [ 0x0042, "Return Volume/Directory Number,Information Level 4" ],
1726         [ 0x0044, "Return EAHandle,Close Handle on Error,Information Level 4" ],
1727         [ 0x0045, "Return NetWareHandle,Close Handle on Error,Information Level 4" ],
1728         [ 0x0046, "Return Volume/Directory Number,Close Handle on Error,Information Level 4" ],
1729         [ 0x0050, "Return EAHandle,Information Level 5" ],
1730         [ 0x0051, "Return NetWareHandle,Information Level 5" ],
1731         [ 0x0052, "Return Volume/Directory Number,Information Level 5" ],
1732         [ 0x0054, "Return EAHandle,Close Handle on Error,Information Level 5" ],
1733         [ 0x0055, "Return NetWareHandle,Close Handle on Error,Information Level 5" ],
1734         [ 0x0056, "Return Volume/Directory Number,Close Handle on Error,Information Level 5" ],
1735         [ 0x0060, "Return EAHandle,Information Level 6" ],
1736         [ 0x0061, "Return NetWareHandle,Information Level 6" ],
1737         [ 0x0062, "Return Volume/Directory Number,Information Level 6" ],
1738         [ 0x0064, "Return EAHandle,Close Handle on Error,Information Level 6" ],
1739         [ 0x0065, "Return NetWareHandle,Close Handle on Error,Information Level 6" ],
1740         [ 0x0066, "Return Volume/Directory Number,Close Handle on Error,Information Level 6" ],
1741         [ 0x0070, "Return EAHandle,Information Level 7" ],
1742         [ 0x0071, "Return NetWareHandle,Information Level 7" ],
1743         [ 0x0072, "Return Volume/Directory Number,Information Level 7" ],
1744         [ 0x0074, "Return EAHandle,Close Handle on Error,Information Level 7" ],
1745         [ 0x0075, "Return NetWareHandle,Close Handle on Error,Information Level 7" ],
1746         [ 0x0076, "Return Volume/Directory Number,Close Handle on Error,Information Level 7" ],
1747         [ 0x0080, "Return EAHandle,Information Level 0,Immediate Close Handle" ],
1748         [ 0x0081, "Return NetWareHandle,Information Level 0,Immediate Close Handle" ],
1749         [ 0x0082, "Return Volume/Directory Number,Information Level 0,Immediate Close Handle" ],
1750         [ 0x0084, "Return EAHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1751         [ 0x0085, "Return NetWareHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1752         [ 0x0086, "Return Volume/Directory Number,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1753         [ 0x0090, "Return EAHandle,Information Level 1,Immediate Close Handle" ],
1754         [ 0x0091, "Return NetWareHandle,Information Level 1,Immediate Close Handle" ],
1755         [ 0x0092, "Return Volume/Directory Number,Information Level 1,Immediate Close Handle" ],
1756         [ 0x0094, "Return EAHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1757         [ 0x0095, "Return NetWareHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1758         [ 0x0096, "Return Volume/Directory Number,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1759         [ 0x00a0, "Return EAHandle,Information Level 2,Immediate Close Handle" ],
1760         [ 0x00a1, "Return NetWareHandle,Information Level 2,Immediate Close Handle" ],
1761         [ 0x00a2, "Return Volume/Directory Number,Information Level 2,Immediate Close Handle" ],
1762         [ 0x00a4, "Return EAHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1763         [ 0x00a5, "Return NetWareHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1764         [ 0x00a6, "Return Volume/Directory Number,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1765         [ 0x00b0, "Return EAHandle,Information Level 3,Immediate Close Handle" ],
1766         [ 0x00b1, "Return NetWareHandle,Information Level 3,Immediate Close Handle" ],
1767         [ 0x00b2, "Return Volume/Directory Number,Information Level 3,Immediate Close Handle" ],
1768         [ 0x00b4, "Return EAHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1769         [ 0x00b5, "Return NetWareHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1770         [ 0x00b6, "Return Volume/Directory Number,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1771         [ 0x00c0, "Return EAHandle,Information Level 4,Immediate Close Handle" ],
1772         [ 0x00c1, "Return NetWareHandle,Information Level 4,Immediate Close Handle" ],
1773         [ 0x00c2, "Return Volume/Directory Number,Information Level 4,Immediate Close Handle" ],
1774         [ 0x00c4, "Return EAHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1775         [ 0x00c5, "Return NetWareHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1776         [ 0x00c6, "Return Volume/Directory Number,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1777         [ 0x00d0, "Return EAHandle,Information Level 5,Immediate Close Handle" ],
1778         [ 0x00d1, "Return NetWareHandle,Information Level 5,Immediate Close Handle" ],
1779         [ 0x00d2, "Return Volume/Directory Number,Information Level 5,Immediate Close Handle" ],
1780         [ 0x00d4, "Return EAHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1781         [ 0x00d5, "Return NetWareHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1782         [ 0x00d6, "Return Volume/Directory Number,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1783         [ 0x00e0, "Return EAHandle,Information Level 6,Immediate Close Handle" ],
1784         [ 0x00e1, "Return NetWareHandle,Information Level 6,Immediate Close Handle" ],
1785         [ 0x00e2, "Return Volume/Directory Number,Information Level 6,Immediate Close Handle" ],
1786         [ 0x00e4, "Return EAHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1787         [ 0x00e5, "Return NetWareHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1788         [ 0x00e6, "Return Volume/Directory Number,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1789         [ 0x00f0, "Return EAHandle,Information Level 7,Immediate Close Handle" ],
1790         [ 0x00f1, "Return NetWareHandle,Information Level 7,Immediate Close Handle" ],
1791         [ 0x00f2, "Return Volume/Directory Number,Information Level 7,Immediate Close Handle" ],
1792         [ 0x00f4, "Return EAHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1793         [ 0x00f5, "Return NetWareHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1794         [ 0x00f6, "Return Volume/Directory Number,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1795 ])
1796 dstNSIndicator                  = val_string16("dst_ns_indicator", "Destination Name Space Indicator", [
1797         [ 0x0000, "Return Source Name Space Information" ],
1798         [ 0x0001, "Return Destination Name Space Information" ],
1799 ])
1800 DstQueueID                      = uint32("dst_queue_id", "Destination Queue ID")
1801 DuplicateRepliesSent            = uint16("duplicate_replies_sent", "Duplicate Replies Sent")
1802
1803 EAAccessFlag                    = bitfield16("ea_access_flag", "EA Access Flag", [
1804         bf_boolean16(0x0001, "ea_permanent_memory", "Permanent Memory"),
1805         bf_boolean16(0x0002, "ea_deep_freeze", "Deep Freeze"),
1806         bf_boolean16(0x0004, "ea_in_progress", "In Progress"),
1807         bf_boolean16(0x0008, "ea_header_being_enlarged", "Header Being Enlarged"),
1808         bf_boolean16(0x0010, "ea_new_tally_used", "New Tally Used"),
1809         bf_boolean16(0x0020, "ea_tally_need_update", "Tally Need Update"),
1810         bf_boolean16(0x0040, "ea_score_card_present", "Score Card Present"),
1811         bf_boolean16(0x0080, "ea_need_bit_flag", "EA Need Bit Flag"),
1812         bf_boolean16(0x0100, "ea_write_privileges", "Write Privileges"),
1813         bf_boolean16(0x0200, "ea_read_privileges", "Read Privileges"),
1814         bf_boolean16(0x0400, "ea_delete_privileges", "Delete Privileges"),
1815         bf_boolean16(0x0800, "ea_system_ea_only", "System EA Only"),
1816         bf_boolean16(0x1000, "ea_write_in_progress", "Write In Progress"),
1817 ])
1818 EABytesWritten                  = uint32("ea_bytes_written", "Bytes Written")
1819 EACount                         = uint32("ea_count", "Count")
1820 EADataSize                      = uint32("ea_data_size", "Data Size")
1821 EADataSizeDuplicated            = uint32("ea_data_size_duplicated", "Data Size Duplicated")
1822 EADuplicateCount                = uint32("ea_duplicate_count", "Duplicate Count")
1823 EAErrorCodes                    = val_string16("ea_error_codes", "EA Error Codes", [
1824         [ 0x0000, "SUCCESSFUL" ],
1825         [ 0x00c8, "ERR_MISSING_EA_KEY" ],
1826         [ 0x00c9, "ERR_EA_NOT_FOUND" ],
1827         [ 0x00ca, "ERR_INVALID_EA_HANDLE_TYPE" ],
1828         [ 0x00cb, "ERR_EA_NO_KEY_NO_DATA" ],
1829         [ 0x00cc, "ERR_EA_NUMBER_MISMATCH" ],
1830         [ 0x00cd, "ERR_EXTENT_NUMBER_OUT_OF_RANGE" ],
1831         [ 0x00ce, "ERR_EA_BAD_DIR_NUM" ],
1832         [ 0x00cf, "ERR_INVALID_EA_HANDLE" ],
1833         [ 0x00d0, "ERR_EA_POSITION_OUT_OF_RANGE" ],
1834         [ 0x00d1, "ERR_EA_ACCESS_DENIED" ],
1835         [ 0x00d2, "ERR_DATA_PAGE_ODD_SIZE" ],
1836         [ 0x00d3, "ERR_EA_VOLUME_NOT_MOUNTED" ],
1837         [ 0x00d4, "ERR_BAD_PAGE_BOUNDARY" ],
1838         [ 0x00d5, "ERR_INSPECT_FAILURE" ],
1839         [ 0x00d6, "ERR_EA_ALREADY_CLAIMED" ],
1840         [ 0x00d7, "ERR_ODD_BUFFER_SIZE" ],
1841         [ 0x00d8, "ERR_NO_SCORECARDS" ],
1842         [ 0x00d9, "ERR_BAD_EDS_SIGNATURE" ],
1843         [ 0x00da, "ERR_EA_SPACE_LIMIT" ],
1844         [ 0x00db, "ERR_EA_KEY_CORRUPT" ],
1845         [ 0x00dc, "ERR_EA_KEY_LIMIT" ],
1846         [ 0x00dd, "ERR_TALLY_CORRUPT" ],
1847 ])
1848 EAFlags                         = val_string16("ea_flags", "EA Flags", [
1849         [ 0x0000, "Return EAHandle,Information Level 0" ],
1850         [ 0x0001, "Return NetWareHandle,Information Level 0" ],
1851         [ 0x0002, "Return Volume/Directory Number,Information Level 0" ],
1852         [ 0x0004, "Return EAHandle,Close Handle on Error,Information Level 0" ],
1853         [ 0x0005, "Return NetWareHandle,Close Handle on Error,Information Level 0" ],
1854         [ 0x0006, "Return Volume/Directory Number,Close Handle on Error,Information Level 0" ],
1855         [ 0x0010, "Return EAHandle,Information Level 1" ],
1856         [ 0x0011, "Return NetWareHandle,Information Level 1" ],
1857         [ 0x0012, "Return Volume/Directory Number,Information Level 1" ],
1858         [ 0x0014, "Return EAHandle,Close Handle on Error,Information Level 1" ],
1859         [ 0x0015, "Return NetWareHandle,Close Handle on Error,Information Level 1" ],
1860         [ 0x0016, "Return Volume/Directory Number,Close Handle on Error,Information Level 1" ],
1861         [ 0x0020, "Return EAHandle,Information Level 2" ],
1862         [ 0x0021, "Return NetWareHandle,Information Level 2" ],
1863         [ 0x0022, "Return Volume/Directory Number,Information Level 2" ],
1864         [ 0x0024, "Return EAHandle,Close Handle on Error,Information Level 2" ],
1865         [ 0x0025, "Return NetWareHandle,Close Handle on Error,Information Level 2" ],
1866         [ 0x0026, "Return Volume/Directory Number,Close Handle on Error,Information Level 2" ],
1867         [ 0x0030, "Return EAHandle,Information Level 3" ],
1868         [ 0x0031, "Return NetWareHandle,Information Level 3" ],
1869         [ 0x0032, "Return Volume/Directory Number,Information Level 3" ],
1870         [ 0x0034, "Return EAHandle,Close Handle on Error,Information Level 3" ],
1871         [ 0x0035, "Return NetWareHandle,Close Handle on Error,Information Level 3" ],
1872         [ 0x0036, "Return Volume/Directory Number,Close Handle on Error,Information Level 3" ],
1873         [ 0x0040, "Return EAHandle,Information Level 4" ],
1874         [ 0x0041, "Return NetWareHandle,Information Level 4" ],
1875         [ 0x0042, "Return Volume/Directory Number,Information Level 4" ],
1876         [ 0x0044, "Return EAHandle,Close Handle on Error,Information Level 4" ],
1877         [ 0x0045, "Return NetWareHandle,Close Handle on Error,Information Level 4" ],
1878         [ 0x0046, "Return Volume/Directory Number,Close Handle on Error,Information Level 4" ],
1879         [ 0x0050, "Return EAHandle,Information Level 5" ],
1880         [ 0x0051, "Return NetWareHandle,Information Level 5" ],
1881         [ 0x0052, "Return Volume/Directory Number,Information Level 5" ],
1882         [ 0x0054, "Return EAHandle,Close Handle on Error,Information Level 5" ],
1883         [ 0x0055, "Return NetWareHandle,Close Handle on Error,Information Level 5" ],
1884         [ 0x0056, "Return Volume/Directory Number,Close Handle on Error,Information Level 5" ],
1885         [ 0x0060, "Return EAHandle,Information Level 6" ],
1886         [ 0x0061, "Return NetWareHandle,Information Level 6" ],
1887         [ 0x0062, "Return Volume/Directory Number,Information Level 6" ],
1888         [ 0x0064, "Return EAHandle,Close Handle on Error,Information Level 6" ],
1889         [ 0x0065, "Return NetWareHandle,Close Handle on Error,Information Level 6" ],
1890         [ 0x0066, "Return Volume/Directory Number,Close Handle on Error,Information Level 6" ],
1891         [ 0x0070, "Return EAHandle,Information Level 7" ],
1892         [ 0x0071, "Return NetWareHandle,Information Level 7" ],
1893         [ 0x0072, "Return Volume/Directory Number,Information Level 7" ],
1894         [ 0x0074, "Return EAHandle,Close Handle on Error,Information Level 7" ],
1895         [ 0x0075, "Return NetWareHandle,Close Handle on Error,Information Level 7" ],
1896         [ 0x0076, "Return Volume/Directory Number,Close Handle on Error,Information Level 7" ],
1897         [ 0x0080, "Return EAHandle,Information Level 0,Immediate Close Handle" ],
1898         [ 0x0081, "Return NetWareHandle,Information Level 0,Immediate Close Handle" ],
1899         [ 0x0082, "Return Volume/Directory Number,Information Level 0,Immediate Close Handle" ],
1900         [ 0x0084, "Return EAHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1901         [ 0x0085, "Return NetWareHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1902         [ 0x0086, "Return Volume/Directory Number,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1903         [ 0x0090, "Return EAHandle,Information Level 1,Immediate Close Handle" ],
1904         [ 0x0091, "Return NetWareHandle,Information Level 1,Immediate Close Handle" ],
1905         [ 0x0092, "Return Volume/Directory Number,Information Level 1,Immediate Close Handle" ],
1906         [ 0x0094, "Return EAHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1907         [ 0x0095, "Return NetWareHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1908         [ 0x0096, "Return Volume/Directory Number,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1909         [ 0x00a0, "Return EAHandle,Information Level 2,Immediate Close Handle" ],
1910         [ 0x00a1, "Return NetWareHandle,Information Level 2,Immediate Close Handle" ],
1911         [ 0x00a2, "Return Volume/Directory Number,Information Level 2,Immediate Close Handle" ],
1912         [ 0x00a4, "Return EAHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1913         [ 0x00a5, "Return NetWareHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1914         [ 0x00a6, "Return Volume/Directory Number,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1915         [ 0x00b0, "Return EAHandle,Information Level 3,Immediate Close Handle" ],
1916         [ 0x00b1, "Return NetWareHandle,Information Level 3,Immediate Close Handle" ],
1917         [ 0x00b2, "Return Volume/Directory Number,Information Level 3,Immediate Close Handle" ],
1918         [ 0x00b4, "Return EAHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1919         [ 0x00b5, "Return NetWareHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1920         [ 0x00b6, "Return Volume/Directory Number,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1921         [ 0x00c0, "Return EAHandle,Information Level 4,Immediate Close Handle" ],
1922         [ 0x00c1, "Return NetWareHandle,Information Level 4,Immediate Close Handle" ],
1923         [ 0x00c2, "Return Volume/Directory Number,Information Level 4,Immediate Close Handle" ],
1924         [ 0x00c4, "Return EAHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1925         [ 0x00c5, "Return NetWareHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1926         [ 0x00c6, "Return Volume/Directory Number,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1927         [ 0x00d0, "Return EAHandle,Information Level 5,Immediate Close Handle" ],
1928         [ 0x00d1, "Return NetWareHandle,Information Level 5,Immediate Close Handle" ],
1929         [ 0x00d2, "Return Volume/Directory Number,Information Level 5,Immediate Close Handle" ],
1930         [ 0x00d4, "Return EAHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1931         [ 0x00d5, "Return NetWareHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1932         [ 0x00d6, "Return Volume/Directory Number,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1933         [ 0x00e0, "Return EAHandle,Information Level 6,Immediate Close Handle" ],
1934         [ 0x00e1, "Return NetWareHandle,Information Level 6,Immediate Close Handle" ],
1935         [ 0x00e2, "Return Volume/Directory Number,Information Level 6,Immediate Close Handle" ],
1936         [ 0x00e4, "Return EAHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1937         [ 0x00e5, "Return NetWareHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1938         [ 0x00e6, "Return Volume/Directory Number,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1939         [ 0x00f0, "Return EAHandle,Information Level 7,Immediate Close Handle" ],
1940         [ 0x00f1, "Return NetWareHandle,Information Level 7,Immediate Close Handle" ],
1941         [ 0x00f2, "Return Volume/Directory Number,Information Level 7,Immediate Close Handle" ],
1942         [ 0x00f4, "Return EAHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1943         [ 0x00f5, "Return NetWareHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1944         [ 0x00f6, "Return Volume/Directory Number,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1945 ])
1946 EAHandle                        = uint32("ea_handle", "EA Handle")
1947 EAHandle.Display("BASE_HEX")
1948 EAHandleOrNetWareHandleOrVolume = uint32("ea_handle_or_netware_handle_or_volume", "EAHandle or NetWare Handle or Volume (see EAFlags)")
1949 EAHandleOrNetWareHandleOrVolume.Display("BASE_HEX")
1950 EAKey                           = nstring16("ea_key", "EA Key")
1951 EAKeySize                       = uint32("ea_key_size", "Key Size")
1952 EAKeySizeDuplicated             = uint32("ea_key_size_duplicated", "Key Size Duplicated")
1953 EAValue                         = nstring16("ea_value", "EA Value")
1954 EAValueRep                      = fw_string("ea_value_rep", "EA Value", 1)
1955 EAValueLength                   = uint16("ea_value_length", "Value Length")
1956 EchoSocket                      = uint16("echo_socket", "Echo Socket")
1957 EchoSocket.Display('BASE_HEX')
1958 EffectiveRights                 = bitfield8("effective_rights", "Effective Rights", [
1959         bf_boolean8(0x01, "effective_rights_read", "Read Rights"),
1960         bf_boolean8(0x02, "effective_rights_write", "Write Rights"),
1961         bf_boolean8(0x04, "effective_rights_open", "Open Rights"),
1962         bf_boolean8(0x08, "effective_rights_create", "Create Rights"),
1963         bf_boolean8(0x10, "effective_rights_delete", "Delete Rights"),
1964         bf_boolean8(0x20, "effective_rights_parental", "Parental Rights"),
1965         bf_boolean8(0x40, "effective_rights_search", "Search Rights"),
1966         bf_boolean8(0x80, "effective_rights_modify", "Modify Rights"),
1967 ])
1968 EnumInfoMask                    = bitfield8("enum_info_mask", "Return Information Mask", [
1969         bf_boolean8(0x01, "enum_info_transport", "Transport Information"),
1970         bf_boolean8(0x02, "enum_info_time", "Time Information"),
1971         bf_boolean8(0x04, "enum_info_name", "Name Information"),
1972         bf_boolean8(0x08, "enum_info_lock", "Lock Information"),
1973         bf_boolean8(0x10, "enum_info_print", "Print Information"),
1974         bf_boolean8(0x20, "enum_info_stats", "Statistical Information"),
1975         bf_boolean8(0x40, "enum_info_account", "Accounting Information"),
1976         bf_boolean8(0x80, "enum_info_auth", "Authentication Information"),
1977 ])
1978
1979 eventOffset                     = bytes("event_offset", "Event Offset", 8)
1980 eventOffset.Display("BASE_HEX")
1981 eventTime                       = uint32("event_time", "Event Time")
1982 eventTime.Display("BASE_HEX")
1983 ExpirationTime                  = uint32("expiration_time", "Expiration Time")
1984 ExpirationTime.Display('BASE_HEX')
1985 ExtAttrDataSize                 = uint32("ext_attr_data_size", "Extended Attributes Data Size")
1986 ExtAttrCount                    = uint32("ext_attr_count", "Extended Attributes Count")
1987 ExtAttrKeySize                  = uint32("ext_attr_key_size", "Extended Attributes Key Size")
1988 ExtendedAttributesDefined       = uint32("extended_attributes_defined", "Extended Attributes Defined")
1989 ExtendedAttributeExtantsUsed    = uint32("extended_attribute_extants_used", "Extended Attribute Extants Used")
1990 ExtendedInfo                    = bitfield16("ext_info", "Extended Return Information", [
1991         bf_boolean16(0x0001, "ext_info_update", "Update"),
1992         bf_boolean16(0x0002, "ext_info_dos_name", "DOS Name"),
1993         bf_boolean16(0x0004, "ext_info_flush", "Flush"),
1994         bf_boolean16(0x0008, "ext_info_parental", "Parental"),
1995         bf_boolean16(0x0010, "ext_info_mac_finder", "MAC Finder"),
1996         bf_boolean16(0x0020, "ext_info_sibling", "Sibling"),
1997         bf_boolean16(0x0040, "ext_info_effective", "Effective"),
1998         bf_boolean16(0x0080, "ext_info_mac_date", "MAC Date"),
1999         bf_boolean16(0x0100, "ext_info_access", "Last Access"),
2000         bf_boolean16(0x0400, "ext_info_64_bit_fs", "64 Bit File Sizes"),
2001         bf_boolean16(0x8000, "ext_info_newstyle", "New Style"),
2002 ])
2003 ExtRouterActiveFlag             = boolean8("ext_router_active_flag", "External Router Active Flag")
2004
2005 FailedAllocReqCnt               = uint32("failed_alloc_req", "Failed Alloc Request Count")
2006 FatalFATWriteErrors             = uint16("fatal_fat_write_errors", "Fatal FAT Write Errors")
2007 FATScanErrors                   = uint16("fat_scan_errors", "FAT Scan Errors")
2008 FATWriteErrors                  = uint16("fat_write_errors", "FAT Write Errors")
2009 FieldsLenTable                  = bytes("fields_len_table", "Fields Len Table", 32)
2010 FileCount                       = uint16("file_count", "File Count")
2011 FileDate                        = uint16("file_date", "File Date")
2012 FileDate.NWDate()
2013 FileDirWindow                   = uint16("file_dir_win", "File/Dir Window")
2014 FileDirWindow.Display("BASE_HEX")
2015 FileExecuteType                 = uint8("file_execute_type", "File Execute Type")
2016 FileExtendedAttributes          = val_string8("file_ext_attr", "File Extended Attributes", [
2017         [ 0x00, "Search On All Read Only Opens" ],
2018         [ 0x01, "Search On Read Only Opens With No Path" ],
2019         [ 0x02, "Shell Default Search Mode" ],
2020         [ 0x03, "Search On All Opens With No Path" ],
2021         [ 0x04, "Do Not Search" ],
2022         [ 0x05, "Reserved" ],
2023         [ 0x06, "Search On All Opens" ],
2024         [ 0x07, "Reserved" ],
2025         [ 0x08, "Search On All Read Only Opens/Indexed" ],
2026         [ 0x09, "Search On Read Only Opens With No Path/Indexed" ],
2027         [ 0x0a, "Shell Default Search Mode/Indexed" ],
2028         [ 0x0b, "Search On All Opens With No Path/Indexed" ],
2029         [ 0x0c, "Do Not Search/Indexed" ],
2030         [ 0x0d, "Indexed" ],
2031         [ 0x0e, "Search On All Opens/Indexed" ],
2032         [ 0x0f, "Indexed" ],
2033         [ 0x10, "Search On All Read Only Opens/Transactional" ],
2034         [ 0x11, "Search On Read Only Opens With No Path/Transactional" ],
2035         [ 0x12, "Shell Default Search Mode/Transactional" ],
2036         [ 0x13, "Search On All Opens With No Path/Transactional" ],
2037         [ 0x14, "Do Not Search/Transactional" ],
2038         [ 0x15, "Transactional" ],
2039         [ 0x16, "Search On All Opens/Transactional" ],
2040         [ 0x17, "Transactional" ],
2041         [ 0x18, "Search On All Read Only Opens/Indexed/Transactional" ],
2042         [ 0x19, "Search On Read Only Opens With No Path/Indexed/Transactional" ],
2043         [ 0x1a, "Shell Default Search Mode/Indexed/Transactional" ],
2044         [ 0x1b, "Search On All Opens With No Path/Indexed/Transactional" ],
2045         [ 0x1c, "Do Not Search/Indexed/Transactional" ],
2046         [ 0x1d, "Indexed/Transactional" ],
2047         [ 0x1e, "Search On All Opens/Indexed/Transactional" ],
2048         [ 0x1f, "Indexed/Transactional" ],
2049         [ 0x40, "Search On All Read Only Opens/Read Audit" ],
2050         [ 0x41, "Search On Read Only Opens With No Path/Read Audit" ],
2051         [ 0x42, "Shell Default Search Mode/Read Audit" ],
2052         [ 0x43, "Search On All Opens With No Path/Read Audit" ],
2053         [ 0x44, "Do Not Search/Read Audit" ],
2054         [ 0x45, "Read Audit" ],
2055         [ 0x46, "Search On All Opens/Read Audit" ],
2056         [ 0x47, "Read Audit" ],
2057         [ 0x48, "Search On All Read Only Opens/Indexed/Read Audit" ],
2058         [ 0x49, "Search On Read Only Opens With No Path/Indexed/Read Audit" ],
2059         [ 0x4a, "Shell Default Search Mode/Indexed/Read Audit" ],
2060         [ 0x4b, "Search On All Opens With No Path/Indexed/Read Audit" ],
2061         [ 0x4c, "Do Not Search/Indexed/Read Audit" ],
2062         [ 0x4d, "Indexed/Read Audit" ],
2063         [ 0x4e, "Search On All Opens/Indexed/Read Audit" ],
2064         [ 0x4f, "Indexed/Read Audit" ],
2065         [ 0x50, "Search On All Read Only Opens/Transactional/Read Audit" ],
2066         [ 0x51, "Search On Read Only Opens With No Path/Transactional/Read Audit" ],
2067         [ 0x52, "Shell Default Search Mode/Transactional/Read Audit" ],
2068         [ 0x53, "Search On All Opens With No Path/Transactional/Read Audit" ],
2069         [ 0x54, "Do Not Search/Transactional/Read Audit" ],
2070         [ 0x55, "Transactional/Read Audit" ],
2071         [ 0x56, "Search On All Opens/Transactional/Read Audit" ],
2072         [ 0x57, "Transactional/Read Audit" ],
2073         [ 0x58, "Search On All Read Only Opens/Indexed/Transactional/Read Audit" ],
2074         [ 0x59, "Search On Read Only Opens With No Path/Indexed/Transactional/Read Audit" ],
2075         [ 0x5a, "Shell Default Search Mode/Indexed/Transactional/Read Audit" ],
2076         [ 0x5b, "Search On All Opens With No Path/Indexed/Transactional/Read Audit" ],
2077         [ 0x5c, "Do Not Search/Indexed/Transactional/Read Audit" ],
2078         [ 0x5d, "Indexed/Transactional/Read Audit" ],
2079         [ 0x5e, "Search On All Opens/Indexed/Transactional/Read Audit" ],
2080         [ 0x5f, "Indexed/Transactional/Read Audit" ],
2081         [ 0x80, "Search On All Read Only Opens/Write Audit" ],
2082         [ 0x81, "Search On Read Only Opens With No Path/Write Audit" ],
2083         [ 0x82, "Shell Default Search Mode/Write Audit" ],
2084         [ 0x83, "Search On All Opens With No Path/Write Audit" ],
2085         [ 0x84, "Do Not Search/Write Audit" ],
2086         [ 0x85, "Write Audit" ],
2087         [ 0x86, "Search On All Opens/Write Audit" ],
2088         [ 0x87, "Write Audit" ],
2089         [ 0x88, "Search On All Read Only Opens/Indexed/Write Audit" ],
2090         [ 0x89, "Search On Read Only Opens With No Path/Indexed/Write Audit" ],
2091         [ 0x8a, "Shell Default Search Mode/Indexed/Write Audit" ],
2092         [ 0x8b, "Search On All Opens With No Path/Indexed/Write Audit" ],
2093         [ 0x8c, "Do Not Search/Indexed/Write Audit" ],
2094         [ 0x8d, "Indexed/Write Audit" ],
2095         [ 0x8e, "Search On All Opens/Indexed/Write Audit" ],
2096         [ 0x8f, "Indexed/Write Audit" ],
2097         [ 0x90, "Search On All Read Only Opens/Transactional/Write Audit" ],
2098         [ 0x91, "Search On Read Only Opens With No Path/Transactional/Write Audit" ],
2099         [ 0x92, "Shell Default Search Mode/Transactional/Write Audit" ],
2100         [ 0x93, "Search On All Opens With No Path/Transactional/Write Audit" ],
2101         [ 0x94, "Do Not Search/Transactional/Write Audit" ],
2102         [ 0x95, "Transactional/Write Audit" ],
2103         [ 0x96, "Search On All Opens/Transactional/Write Audit" ],
2104         [ 0x97, "Transactional/Write Audit" ],
2105         [ 0x98, "Search On All Read Only Opens/Indexed/Transactional/Write Audit" ],
2106         [ 0x99, "Search On Read Only Opens With No Path/Indexed/Transactional/Write Audit" ],
2107         [ 0x9a, "Shell Default Search Mode/Indexed/Transactional/Write Audit" ],
2108         [ 0x9b, "Search On All Opens With No Path/Indexed/Transactional/Write Audit" ],
2109         [ 0x9c, "Do Not Search/Indexed/Transactional/Write Audit" ],
2110         [ 0x9d, "Indexed/Transactional/Write Audit" ],
2111         [ 0x9e, "Search On All Opens/Indexed/Transactional/Write Audit" ],
2112         [ 0x9f, "Indexed/Transactional/Write Audit" ],
2113         [ 0xa0, "Search On All Read Only Opens/Read Audit/Write Audit" ],
2114         [ 0xa1, "Search On Read Only Opens With No Path/Read Audit/Write Audit" ],
2115         [ 0xa2, "Shell Default Search Mode/Read Audit/Write Audit" ],
2116         [ 0xa3, "Search On All Opens With No Path/Read Audit/Write Audit" ],
2117         [ 0xa4, "Do Not Search/Read Audit/Write Audit" ],
2118         [ 0xa5, "Read Audit/Write Audit" ],
2119         [ 0xa6, "Search On All Opens/Read Audit/Write Audit" ],
2120         [ 0xa7, "Read Audit/Write Audit" ],
2121         [ 0xa8, "Search On All Read Only Opens/Indexed/Read Audit/Write Audit" ],
2122         [ 0xa9, "Search On Read Only Opens With No Path/Indexed/Read Audit/Write Audit" ],
2123         [ 0xaa, "Shell Default Search Mode/Indexed/Read Audit/Write Audit" ],
2124         [ 0xab, "Search On All Opens With No Path/Indexed/Read Audit/Write Audit" ],
2125         [ 0xac, "Do Not Search/Indexed/Read Audit/Write Audit" ],
2126         [ 0xad, "Indexed/Read Audit/Write Audit" ],
2127         [ 0xae, "Search On All Opens/Indexed/Read Audit/Write Audit" ],
2128         [ 0xaf, "Indexed/Read Audit/Write Audit" ],
2129         [ 0xb0, "Search On All Read Only Opens/Transactional/Read Audit/Write Audit" ],
2130         [ 0xb1, "Search On Read Only Opens With No Path/Transactional/Read Audit/Write Audit" ],
2131         [ 0xb2, "Shell Default Search Mode/Transactional/Read Audit/Write Audit" ],
2132         [ 0xb3, "Search On All Opens With No Path/Transactional/Read Audit/Write Audit" ],
2133         [ 0xb4, "Do Not Search/Transactional/Read Audit/Write Audit" ],
2134         [ 0xb5, "Transactional/Read Audit/Write Audit" ],
2135         [ 0xb6, "Search On All Opens/Transactional/Read Audit/Write Audit" ],
2136         [ 0xb7, "Transactional/Read Audit/Write Audit" ],
2137         [ 0xb8, "Search On All Read Only Opens/Indexed/Transactional/Read Audit/Write Audit" ],
2138         [ 0xb9, "Search On Read Only Opens With No Path/Indexed/Transactional/Read Audit/Write Audit" ],
2139         [ 0xba, "Shell Default Search Mode/Indexed/Transactional/Read Audit/Write Audit" ],
2140         [ 0xbb, "Search On All Opens With No Path/Indexed/Transactional/Read Audit/Write Audit" ],
2141         [ 0xbc, "Do Not Search/Indexed/Transactional/Read Audit/Write Audit" ],
2142         [ 0xbd, "Indexed/Transactional/Read Audit/Write Audit" ],
2143         [ 0xbe, "Search On All Opens/Indexed/Transactional/Read Audit/Write Audit" ],
2144         [ 0xbf, "Indexed/Transactional/Read Audit/Write Audit" ],
2145 ])
2146 fileFlags                       = uint32("file_flags", "File Flags")
2147 FileHandle                      = bytes("file_handle", "File Handle", 6)
2148 FileLimbo                       = uint32("file_limbo", "File Limbo")
2149 FileListCount                   = uint32("file_list_count", "File List Count")
2150 FileLock                        = val_string8("file_lock", "File Lock", [
2151         [ 0x00, "Not Locked" ],
2152         [ 0xfe, "Locked by file lock" ],
2153         [ 0xff, "Unknown" ],
2154 ])
2155 FileLockCount                   = uint16("file_lock_count", "File Lock Count")
2156 FileMode                        = uint8("file_mode", "File Mode")
2157 FileName                        = nstring8("file_name", "Filename")
2158 FileName12                      = fw_string("file_name_12", "Filename", 12)
2159 FileName14                      = fw_string("file_name_14", "Filename", 14)
2160 FileNameLen                     = uint8("file_name_len", "Filename Length")
2161 FileOffset                      = uint32("file_offset", "File Offset")
2162 FilePath                        = nstring8("file_path", "File Path")
2163 FileSize                        = uint32("file_size", "File Size", BE)
2164 FileSize64bit       = bytes("f_size_64bit", "64bit File Size", 64)
2165 FileSystemID                    = uint8("file_system_id", "File System ID")
2166 FileTime                        = uint16("file_time", "File Time")
2167 FileTime.NWTime()
2168 FileWriteFlags                  = val_string8("file_write_flags", "File Write Flags", [
2169         [ 0x01, "Writing" ],
2170         [ 0x02, "Write aborted" ],
2171 ])
2172 FileWriteState                  = val_string8("file_write_state", "File Write State", [
2173         [ 0x00, "Not Writing" ],
2174         [ 0x01, "Write in Progress" ],
2175         [ 0x02, "Write Being Stopped" ],
2176 ])
2177 Filler                          = uint8("filler", "Filler")
2178 FinderAttr                      = bitfield16("finder_attr", "Finder Info Attributes", [
2179         bf_boolean16(0x0001, "finder_attr_desktop", "Object on Desktop"),
2180         bf_boolean16(0x2000, "finder_attr_invisible", "Object is Invisible"),
2181         bf_boolean16(0x4000, "finder_attr_bundle", "Object Has Bundle"),
2182 ])
2183 FixedBitMask                    = uint32("fixed_bit_mask", "Fixed Bit Mask")
2184 FixedBitsDefined                = uint16("fixed_bits_defined", "Fixed Bits Defined")
2185 FlagBits                        = uint8("flag_bits", "Flag Bits")
2186 Flags                           = uint8("flags", "Flags")
2187 FlagsDef                        = uint16("flags_def", "Flags")
2188 FlushTime                       = uint32("flush_time", "Flush Time")
2189 FolderFlag                      = val_string8("folder_flag", "Folder Flag", [
2190         [ 0x00, "Not a Folder" ],
2191         [ 0x01, "Folder" ],
2192 ])
2193 ForkCount                       = uint8("fork_count", "Fork Count")
2194 ForkIndicator                   = val_string8("fork_indicator", "Fork Indicator", [
2195         [ 0x00, "Data Fork" ],
2196         [ 0x01, "Resource Fork" ],
2197 ])
2198 ForceFlag                       = val_string8("force_flag", "Force Server Down Flag", [
2199         [ 0x00, "Down Server if No Files Are Open" ],
2200         [ 0xff, "Down Server Immediately, Auto-Close Open Files" ],
2201 ])
2202 ForgedDetachedRequests          = uint16("forged_detached_requests", "Forged Detached Requests")
2203 FormType                        = uint16( "form_type", "Form Type" )
2204 FormTypeCnt                     = uint32("form_type_count", "Form Types Count")
2205 FoundSomeMem                    = uint32("found_some_mem", "Found Some Memory")
2206 FractionalSeconds               = uint32("fractional_time", "Fractional Time in Seconds")
2207 FraggerHandle                   = uint32("fragger_handle", "Fragment Handle")
2208 FraggerHandle.Display('BASE_HEX')
2209 FragmentWriteOccurred           = uint16("fragment_write_occurred", "Fragment Write Occurred")
2210 FragSize                        = uint32("frag_size", "Fragment Size")
2211 FreeableLimboSectors            = uint32("freeable_limbo_sectors", "Freeable Limbo Sectors")
2212 FreeBlocks                      = uint32("free_blocks", "Free Blocks")
2213 FreedClusters                   = uint32("freed_clusters", "Freed Clusters")
2214 FreeDirectoryEntries            = uint16("free_directory_entries", "Free Directory Entries")
2215 FSEngineFlag                    = boolean8("fs_engine_flag", "FS Engine Flag")
2216 FullName                        = fw_string("full_name", "Full Name", 39)
2217
2218 GetSetFlag                      = val_string8("get_set_flag", "Get Set Flag", [
2219         [ 0x00, "Get the default support module ID" ],
2220         [ 0x01, "Set the default support module ID" ],
2221 ])
2222 GUID                            = bytes("guid", "GUID", 16)
2223 GUID.Display("BASE_HEX")
2224
2225 HandleFlag                      = val_string8("handle_flag", "Handle Flag", [
2226         [ 0x00, "Short Directory Handle" ],
2227         [ 0x01, "Directory Base" ],
2228         [ 0xFF, "No Handle Present" ],
2229 ])
2230 HandleInfoLevel                 = val_string8("handle_info_level", "Handle Info Level", [
2231         [ 0x00, "Get Limited Information from a File Handle" ],
2232         [ 0x01, "Get Limited Information from a File Handle Using a Name Space" ],
2233         [ 0x02, "Get Information from a File Handle" ],
2234         [ 0x03, "Get Information from a Directory Handle" ],
2235         [ 0x04, "Get Complete Information from a Directory Handle" ],
2236         [ 0x05, "Get Complete Information from a File Handle" ],
2237 ])
2238 HeldBytesRead                   = bytes("held_bytes_read", "Held Bytes Read", 6)
2239 HeldBytesWritten                = bytes("held_bytes_write", "Held Bytes Written", 6)
2240 HeldConnectTimeInMinutes        = uint32("held_conn_time", "Held Connect Time in Minutes")
2241 HeldRequests                    = uint32("user_info_held_req", "Held Requests")
2242 HoldAmount                      = uint32("hold_amount", "Hold Amount")
2243 HoldCancelAmount                = uint32("hold_cancel_amount", "Hold Cancel Amount")
2244 HolderID                        = uint32("holder_id", "Holder ID")
2245 HolderID.Display("BASE_HEX")
2246 HoldTime                        = uint32("hold_time", "Hold Time")
2247 HopsToNet                       = uint16("hops_to_net", "Hop Count")
2248 HorizLocation                   = uint16("horiz_location", "Horizontal Location")
2249 HostAddress                     = bytes("host_address", "Host Address", 6)
2250 HotFixBlocksAvailable           = uint16("hot_fix_blocks_available", "Hot Fix Blocks Available")
2251 HotFixDisabled                  = val_string8("hot_fix_disabled", "Hot Fix Disabled", [
2252         [ 0x00, "Enabled" ],
2253         [ 0x01, "Disabled" ],
2254 ])
2255 HotFixTableSize                 = uint16("hot_fix_table_size", "Hot Fix Table Size")
2256 HotFixTableStart                = uint32("hot_fix_table_start", "Hot Fix Table Start")
2257 Hour                            = uint8("s_hour", "Hour")
2258 HugeBitMask                     = uint32("huge_bit_mask", "Huge Bit Mask")
2259 HugeBitsDefined                 = uint16("huge_bits_defined", "Huge Bits Defined")
2260 HugeData                        = nstring8("huge_data", "Huge Data")
2261 HugeDataUsed                    = uint32("huge_data_used", "Huge Data Used")
2262 HugeStateInfo                   = bytes("huge_state_info", "Huge State Info", 16)
2263
2264 IdentificationNumber            = uint32("identification_number", "Identification Number")
2265 IgnoredRxPkts                   = uint32("ignored_rx_pkts", "Ignored Receive Packets")
2266 IncomingPacketDiscardedNoDGroup = uint16("incoming_packet_discarded_no_dgroup", "Incoming Packet Discarded No DGroup")
2267 IndexNumber                     = uint8("index_number", "Index Number")
2268 InfoCount                       = uint16("info_count", "Info Count")
2269 InfoFlags                       = bitfield32("info_flags", "Info Flags", [
2270         bf_boolean32(0x10000000, "info_flags_security", "Return Object Security"),
2271         bf_boolean32(0x20000000, "info_flags_flags", "Return Object Flags"),
2272         bf_boolean32(0x40000000, "info_flags_type", "Return Object Type"),
2273         bf_boolean32(0x80000000, "info_flags_name", "Return Object Name"),
2274 ])
2275 InfoLevelNumber                 = val_string8("info_level_num", "Information Level Number", [
2276         [ 0x01, "Volume Information Definition" ],
2277         [ 0x02, "Volume Information 2 Definition" ],
2278 ])
2279 InfoMask                        = bitfield32("info_mask", "Information Mask", [
2280         bf_boolean32(0x00000001, "info_flags_dos_time", "DOS Time"),
2281         bf_boolean32(0x00000002, "info_flags_ref_count", "Reference Count"),
2282         bf_boolean32(0x00000004, "info_flags_dos_attr", "DOS Attributes"),
2283         bf_boolean32(0x00000008, "info_flags_ids", "ID's"),
2284         bf_boolean32(0x00000010, "info_flags_ds_sizes", "Data Stream Sizes"),
2285         bf_boolean32(0x00000020, "info_flags_ns_attr", "Name Space Attributes"),
2286         bf_boolean32(0x00000040, "info_flags_ea_present", "EA Present Flag"),
2287         bf_boolean32(0x00000080, "info_flags_all_attr", "All Attributes"),
2288         bf_boolean32(0x00000100, "info_flags_all_dirbase_num", "All Directory Base Numbers"),
2289         bf_boolean32(0x00000200, "info_flags_max_access_mask", "Maximum Access Mask"),
2290         bf_boolean32(0x00000400, "info_flags_flush_time", "Flush Time"),
2291         bf_boolean32(0x00000800, "info_flags_prnt_base_id", "Parent Base ID"),
2292         bf_boolean32(0x00001000, "info_flags_mac_finder", "Mac Finder Information"),
2293         bf_boolean32(0x00002000, "info_flags_sibling_cnt", "Sibling Count"),
2294         bf_boolean32(0x00004000, "info_flags_effect_rights", "Effective Rights"),
2295         bf_boolean32(0x00008000, "info_flags_mac_time", "Mac Time"),
2296         bf_boolean32(0x20000000, "info_mask_dosname", "DOS Name"),
2297         bf_boolean32(0x40000000, "info_mask_c_name_space", "Creator Name Space & Name"),
2298         bf_boolean32(0x80000000, "info_mask_name", "Name"),
2299 ])
2300 InheritedRightsMask             = bitfield16("inherited_rights_mask", "Inherited Rights Mask", [
2301         bf_boolean16(0x0001, "inh_rights_read", "Read Rights"),
2302         bf_boolean16(0x0002, "inh_rights_write", "Write Rights"),
2303         bf_boolean16(0x0004, "inh_rights_open", "Open Rights"),
2304         bf_boolean16(0x0008, "inh_rights_create", "Create Rights"),
2305         bf_boolean16(0x0010, "inh_rights_delete", "Delete Rights"),
2306         bf_boolean16(0x0020, "inh_rights_parent", "Change Access"),
2307         bf_boolean16(0x0040, "inh_rights_search", "See Files Flag"),
2308         bf_boolean16(0x0080, "inh_rights_modify", "Modify Rights"),
2309         bf_boolean16(0x0100, "inh_rights_supervisor", "Supervisor"),
2310 ])
2311 InheritanceRevokeMask           = bitfield16("inheritance_revoke_mask", "Revoke Rights Mask", [
2312         bf_boolean16(0x0001, "inh_revoke_read", "Read Rights"),
2313         bf_boolean16(0x0002, "inh_revoke_write", "Write Rights"),
2314         bf_boolean16(0x0004, "inh_revoke_open", "Open Rights"),
2315         bf_boolean16(0x0008, "inh_revoke_create", "Create Rights"),
2316         bf_boolean16(0x0010, "inh_revoke_delete", "Delete Rights"),
2317         bf_boolean16(0x0020, "inh_revoke_parent", "Change Access"),
2318         bf_boolean16(0x0040, "inh_revoke_search", "See Files Flag"),
2319         bf_boolean16(0x0080, "inh_revoke_modify", "Modify Rights"),
2320         bf_boolean16(0x0100, "inh_revoke_supervisor", "Supervisor"),
2321 ])
2322 InitialSemaphoreValue           = uint8("initial_semaphore_value", "Initial Semaphore Value")
2323 InspectSize                     = uint32("inspect_size", "Inspect Size")
2324 InternetBridgeVersion           = uint8("internet_bridge_version", "Internet Bridge Version")
2325 InterruptNumbersUsed            = uint32("interrupt_numbers_used", "Interrupt Numbers Used")
2326 InUse                           = uint32("in_use", "Bytes in Use")
2327 IOAddressesUsed                 = bytes("io_addresses_used", "IO Addresses Used", 8)
2328 IOErrorCount                    = uint16("io_error_count", "IO Error Count")
2329 IOEngineFlag                    = boolean8("io_engine_flag", "IO Engine Flag")
2330 IPXNotMyNetwork                 = uint16("ipx_not_my_network", "IPX Not My Network")
2331 ItemsChanged                    = uint32("items_changed", "Items Changed")
2332 ItemsChecked                    = uint32("items_checked", "Items Checked")
2333 ItemsCount                      = uint32("items_count", "Items Count")
2334 itemsInList                     = uint32("items_in_list", "Items in List")
2335 ItemsInPacket                   = uint32("items_in_packet", "Items in Packet")
2336
2337 JobControlFlags                 = bitfield8("job_control_flags", "Job Control Flags", [
2338         bf_boolean8(0x08, "job_control_job_recovery", "Job Recovery"),
2339         bf_boolean8(0x10, "job_control_reservice", "ReService Job"),
2340         bf_boolean8(0x20, "job_control_file_open", "File Open"),
2341         bf_boolean8(0x40, "job_control_user_hold", "User Hold"),
2342         bf_boolean8(0x80, "job_control_operator_hold", "Operator Hold"),
2343
2344 ])
2345 JobControlFlagsWord             = bitfield16("job_control_flags_word", "Job Control Flags", [
2346         bf_boolean16(0x0008, "job_control1_job_recovery", "Job Recovery"),
2347         bf_boolean16(0x0010, "job_control1_reservice", "ReService Job"),
2348         bf_boolean16(0x0020, "job_control1_file_open", "File Open"),
2349         bf_boolean16(0x0040, "job_control1_user_hold", "User Hold"),
2350         bf_boolean16(0x0080, "job_control1_operator_hold", "Operator Hold"),
2351
2352 ])
2353 JobCount                        = uint32("job_count", "Job Count")
2354 JobFileHandle                   = bytes("job_file_handle", "Job File Handle", 6)
2355 JobFileHandleLong               = uint32("job_file_handle_long", "Job File Handle", BE)
2356 JobFileHandleLong.Display("BASE_HEX")
2357 JobFileName                     = fw_string("job_file_name", "Job File Name", 14)
2358 JobPosition                     = uint8("job_position", "Job Position")
2359 JobPositionWord                 = uint16("job_position_word", "Job Position")
2360 JobNumber                       = uint16("job_number", "Job Number", BE )
2361 JobNumberLong                   = uint32("job_number_long", "Job Number", BE )
2362 JobNumberLong.Display("BASE_HEX")
2363 JobType                         = uint16("job_type", "Job Type", BE )
2364
2365 LANCustomVariablesCount         = uint32("lan_cust_var_count", "LAN Custom Variables Count")
2366 LANdriverBoardInstance          = uint16("lan_drv_bd_inst", "LAN Driver Board Instance")
2367 LANdriverBoardNumber            = uint16("lan_drv_bd_num", "LAN Driver Board Number")
2368 LANdriverCardID                 = uint16("lan_drv_card_id", "LAN Driver Card ID")
2369 LANdriverCardName               = fw_string("lan_drv_card_name", "LAN Driver Card Name", 28)
2370 LANdriverCFG_MajorVersion       = uint8("lan_dvr_cfg_major_vrs", "LAN Driver Config - Major Version")
2371 LANdriverCFG_MinorVersion       = uint8("lan_dvr_cfg_minor_vrs", "LAN Driver Config - Minor Version")
2372 LANdriverDMAUsage1              = uint8("lan_drv_dma_usage1", "Primary DMA Channel")
2373 LANdriverDMAUsage2              = uint8("lan_drv_dma_usage2", "Secondary DMA Channel")
2374 LANdriverFlags                  = uint16("lan_drv_flags", "LAN Driver Flags")
2375 LANdriverFlags.Display("BASE_HEX")
2376 LANdriverInterrupt1             = uint8("lan_drv_interrupt1", "Primary Interrupt Vector")
2377 LANdriverInterrupt2             = uint8("lan_drv_interrupt2", "Secondary Interrupt Vector")
2378 LANdriverIOPortsAndRanges1      = uint16("lan_drv_io_ports_and_ranges_1", "Primary Base I/O Port")
2379 LANdriverIOPortsAndRanges2      = uint16("lan_drv_io_ports_and_ranges_2", "Number of I/O Ports")
2380 LANdriverIOPortsAndRanges3      = uint16("lan_drv_io_ports_and_ranges_3", "Secondary Base I/O Port")
2381 LANdriverIOPortsAndRanges4      = uint16("lan_drv_io_ports_and_ranges_4", "Number of I/O Ports")
2382 LANdriverIOReserved             = bytes("lan_drv_io_reserved", "LAN Driver IO Reserved", 14)
2383 LANdriverLineSpeed              = uint16("lan_drv_line_speed", "LAN Driver Line Speed")
2384 LANdriverLink                   = uint32("lan_drv_link", "LAN Driver Link")
2385 LANdriverLogicalName            = bytes("lan_drv_log_name", "LAN Driver Logical Name", 18)
2386 LANdriverMajorVersion           = uint8("lan_drv_major_ver", "LAN Driver Major Version")
2387 LANdriverMaximumSize            = uint32("lan_drv_max_size", "LAN Driver Maximum Size")
2388 LANdriverMaxRecvSize            = uint32("lan_drv_max_rcv_size", "LAN Driver Maximum Receive Size")
2389 LANdriverMediaID                = uint16("lan_drv_media_id", "LAN Driver Media ID")
2390 LANdriverMediaType              = fw_string("lan_drv_media_type", "LAN Driver Media Type", 40)
2391 LANdriverMemoryDecode0          = uint32("lan_drv_mem_decode_0", "LAN Driver Memory Decode 0")
2392 LANdriverMemoryDecode1          = uint32("lan_drv_mem_decode_1", "LAN Driver Memory Decode 1")
2393 LANdriverMemoryLength0          = uint16("lan_drv_mem_length_0", "LAN Driver Memory Length 0")
2394 LANdriverMemoryLength1          = uint16("lan_drv_mem_length_1", "LAN Driver Memory Length 1")
2395 LANdriverMinorVersion           = uint8("lan_drv_minor_ver", "LAN Driver Minor Version")
2396 LANdriverModeFlags              = val_string8("lan_dvr_mode_flags", "LAN Driver Mode Flags", [
2397         [0x80, "Canonical Address" ],
2398         [0x81, "Canonical Address" ],
2399         [0x82, "Canonical Address" ],
2400         [0x83, "Canonical Address" ],
2401         [0x84, "Canonical Address" ],
2402         [0x85, "Canonical Address" ],
2403         [0x86, "Canonical Address" ],
2404         [0x87, "Canonical Address" ],
2405         [0x88, "Canonical Address" ],
2406         [0x89, "Canonical Address" ],
2407         [0x8a, "Canonical Address" ],
2408         [0x8b, "Canonical Address" ],
2409         [0x8c, "Canonical Address" ],
2410         [0x8d, "Canonical Address" ],
2411         [0x8e, "Canonical Address" ],
2412         [0x8f, "Canonical Address" ],
2413         [0x90, "Canonical Address" ],
2414         [0x91, "Canonical Address" ],
2415         [0x92, "Canonical Address" ],
2416         [0x93, "Canonical Address" ],
2417         [0x94, "Canonical Address" ],
2418         [0x95, "Canonical Address" ],
2419         [0x96, "Canonical Address" ],
2420         [0x97, "Canonical Address" ],
2421         [0x98, "Canonical Address" ],
2422         [0x99, "Canonical Address" ],
2423         [0x9a, "Canonical Address" ],
2424         [0x9b, "Canonical Address" ],
2425         [0x9c, "Canonical Address" ],
2426         [0x9d, "Canonical Address" ],
2427         [0x9e, "Canonical Address" ],
2428         [0x9f, "Canonical Address" ],
2429         [0xa0, "Canonical Address" ],
2430         [0xa1, "Canonical Address" ],
2431         [0xa2, "Canonical Address" ],
2432         [0xa3, "Canonical Address" ],
2433         [0xa4, "Canonical Address" ],
2434         [0xa5, "Canonical Address" ],
2435         [0xa6, "Canonical Address" ],
2436         [0xa7, "Canonical Address" ],
2437         [0xa8, "Canonical Address" ],
2438         [0xa9, "Canonical Address" ],
2439         [0xaa, "Canonical Address" ],
2440         [0xab, "Canonical Address" ],
2441         [0xac, "Canonical Address" ],
2442         [0xad, "Canonical Address" ],
2443         [0xae, "Canonical Address" ],
2444         [0xaf, "Canonical Address" ],
2445         [0xb0, "Canonical Address" ],
2446         [0xb1, "Canonical Address" ],
2447         [0xb2, "Canonical Address" ],
2448         [0xb3, "Canonical Address" ],
2449         [0xb4, "Canonical Address" ],
2450         [0xb5, "Canonical Address" ],
2451         [0xb6, "Canonical Address" ],
2452         [0xb7, "Canonical Address" ],
2453         [0xb8, "Canonical Address" ],
2454         [0xb9, "Canonical Address" ],
2455         [0xba, "Canonical Address" ],
2456         [0xbb, "Canonical Address" ],
2457         [0xbc, "Canonical Address" ],
2458         [0xbd, "Canonical Address" ],
2459         [0xbe, "Canonical Address" ],
2460         [0xbf, "Canonical Address" ],
2461         [0xc0, "Non-Canonical Address" ],
2462         [0xc1, "Non-Canonical Address" ],
2463         [0xc2, "Non-Canonical Address" ],
2464         [0xc3, "Non-Canonical Address" ],
2465         [0xc4, "Non-Canonical Address" ],
2466         [0xc5, "Non-Canonical Address" ],
2467         [0xc6, "Non-Canonical Address" ],
2468         [0xc7, "Non-Canonical Address" ],
2469         [0xc8, "Non-Canonical Address" ],
2470         [0xc9, "Non-Canonical Address" ],
2471         [0xca, "Non-Canonical Address" ],
2472         [0xcb, "Non-Canonical Address" ],
2473         [0xcc, "Non-Canonical Address" ],
2474         [0xcd, "Non-Canonical Address" ],
2475         [0xce, "Non-Canonical Address" ],
2476         [0xcf, "Non-Canonical Address" ],
2477         [0xd0, "Non-Canonical Address" ],
2478         [0xd1, "Non-Canonical Address" ],
2479         [0xd2, "Non-Canonical Address" ],
2480         [0xd3, "Non-Canonical Address" ],
2481         [0xd4, "Non-Canonical Address" ],
2482         [0xd5, "Non-Canonical Address" ],
2483         [0xd6, "Non-Canonical Address" ],
2484         [0xd7, "Non-Canonical Address" ],
2485         [0xd8, "Non-Canonical Address" ],
2486         [0xd9, "Non-Canonical Address" ],
2487         [0xda, "Non-Canonical Address" ],
2488         [0xdb, "Non-Canonical Address" ],
2489         [0xdc, "Non-Canonical Address" ],
2490         [0xdd, "Non-Canonical Address" ],
2491         [0xde, "Non-Canonical Address" ],
2492         [0xdf, "Non-Canonical Address" ],
2493         [0xe0, "Non-Canonical Address" ],
2494         [0xe1, "Non-Canonical Address" ],
2495         [0xe2, "Non-Canonical Address" ],
2496         [0xe3, "Non-Canonical Address" ],
2497         [0xe4, "Non-Canonical Address" ],
2498         [0xe5, "Non-Canonical Address" ],
2499         [0xe6, "Non-Canonical Address" ],
2500         [0xe7, "Non-Canonical Address" ],
2501         [0xe8, "Non-Canonical Address" ],
2502         [0xe9, "Non-Canonical Address" ],
2503         [0xea, "Non-Canonical Address" ],
2504         [0xeb, "Non-Canonical Address" ],
2505         [0xec, "Non-Canonical Address" ],
2506         [0xed, "Non-Canonical Address" ],
2507         [0xee, "Non-Canonical Address" ],
2508         [0xef, "Non-Canonical Address" ],
2509         [0xf0, "Non-Canonical Address" ],
2510         [0xf1, "Non-Canonical Address" ],
2511         [0xf2, "Non-Canonical Address" ],
2512         [0xf3, "Non-Canonical Address" ],
2513         [0xf4, "Non-Canonical Address" ],
2514         [0xf5, "Non-Canonical Address" ],
2515         [0xf6, "Non-Canonical Address" ],
2516         [0xf7, "Non-Canonical Address" ],
2517         [0xf8, "Non-Canonical Address" ],
2518         [0xf9, "Non-Canonical Address" ],
2519         [0xfa, "Non-Canonical Address" ],
2520         [0xfb, "Non-Canonical Address" ],
2521         [0xfc, "Non-Canonical Address" ],
2522         [0xfd, "Non-Canonical Address" ],
2523         [0xfe, "Non-Canonical Address" ],
2524         [0xff, "Non-Canonical Address" ],
2525 ])
2526 LANDriverNumber                 = uint8("lan_driver_number", "LAN Driver Number")
2527 LANdriverNodeAddress            = bytes("lan_dvr_node_addr", "LAN Driver Node Address", 6)
2528 LANdriverRecvSize               = uint32("lan_drv_rcv_size", "LAN Driver Receive Size")
2529 LANdriverReserved               = uint16("lan_drv_reserved", "LAN Driver Reserved")
2530 LANdriverSendRetries            = uint16("lan_drv_snd_retries", "LAN Driver Send Retries")
2531 LANdriverSharingFlags           = uint16("lan_drv_share", "LAN Driver Sharing Flags")
2532 LANdriverShortName              = fw_string("lan_drv_short_name", "LAN Driver Short Name", 40)
2533 LANdriverSlot                   = uint16("lan_drv_slot", "LAN Driver Slot")
2534 LANdriverSrcRouting             = uint32("lan_drv_src_route", "LAN Driver Source Routing")
2535 LANdriverTransportTime          = uint16("lan_drv_trans_time", "LAN Driver Transport Time")
2536 LastAccessedDate                = uint16("last_access_date", "Last Accessed Date")
2537 LastAccessedDate.NWDate()
2538 LastAccessedTime                = uint16("last_access_time", "Last Accessed Time")
2539 LastAccessedTime.NWTime()
2540 LastGarbCollect                 = uint32("last_garbage_collect", "Last Garbage Collection")
2541 LastInstance                    = uint32("last_instance", "Last Instance")
2542 LastRecordSeen                  = uint16("last_record_seen", "Last Record Seen")
2543 LastSearchIndex                 = uint16("last_search_index", "Search Index")
2544 LastSeen                        = uint32("last_seen", "Last Seen")
2545 LastSequenceNumber              = uint16("last_sequence_number", "Sequence Number")
2546 Length64bit         = bytes("length_64bit", "64bit Length", 64)
2547 Level                           = uint8("level", "Level")
2548 LFSCounters                     = uint32("lfs_counters", "LFS Counters")
2549 LimboDataStreamsCount           = uint32("limbo_data_streams_count", "Limbo Data Streams Count")
2550 limbCount                       = uint32("limb_count", "Limb Count")
2551 LimboUsed                       = uint32("limbo_used", "Limbo Used")
2552 LoadedNameSpaces                = uint8("loaded_name_spaces", "Loaded Name Spaces")
2553 LocalConnectionID               = uint32("local_connection_id", "Local Connection ID")
2554 LocalConnectionID.Display("BASE_HEX")
2555 LocalMaxPacketSize              = uint32("local_max_packet_size", "Local Max Packet Size")
2556 LocalMaxSendSize                = uint32("local_max_send_size", "Local Max Send Size")
2557 LocalMaxRecvSize                = uint32("local_max_recv_size", "Local Max Recv Size")
2558 LocalLoginInfoCcode             = uint8("local_login_info_ccode", "Local Login Info C Code")
2559 LocalTargetSocket               = uint32("local_target_socket", "Local Target Socket")
2560 LocalTargetSocket.Display("BASE_HEX")
2561 LockAreaLen                     = uint32("lock_area_len", "Lock Area Length")
2562 LockAreasStartOffset            = uint32("lock_areas_start_offset", "Lock Areas Start Offset")
2563 LockTimeout                     = uint16("lock_timeout", "Lock Timeout")
2564 Locked                          = val_string8("locked", "Locked Flag", [
2565         [ 0x00, "Not Locked Exclusively" ],
2566         [ 0x01, "Locked Exclusively" ],
2567 ])
2568 LockFlag                        = val_string8("lock_flag", "Lock Flag", [
2569         [ 0x00, "Not Locked, Log for Future Exclusive Lock" ],
2570         [ 0x01, "Exclusive Lock (Read/Write)" ],
2571         [ 0x02, "Log for Future Shared Lock"],
2572         [ 0x03, "Shareable Lock (Read-Only)" ],
2573         [ 0xfe, "Locked by a File Lock" ],
2574         [ 0xff, "Locked by Begin Share File Set" ],
2575 ])
2576 LockName                        = nstring8("lock_name", "Lock Name")
2577 LockStatus                      = val_string8("lock_status", "Lock Status", [
2578         [ 0x00, "Locked Exclusive" ],
2579         [ 0x01, "Locked Shareable" ],
2580         [ 0x02, "Logged" ],
2581         [ 0x06, "Lock is Held by TTS"],
2582 ])
2583 LockType                        = val_string8("lock_type", "Lock Type", [
2584         [ 0x00, "Locked" ],
2585         [ 0x01, "Open Shareable" ],
2586         [ 0x02, "Logged" ],
2587         [ 0x03, "Open Normal" ],
2588         [ 0x06, "TTS Holding Lock" ],
2589         [ 0x07, "Transaction Flag Set on This File" ],
2590 ])
2591 LogFileFlagHigh                 = bitfield8("log_file_flag_high", "Log File Flag (byte 2)", [
2592         bf_boolean8(0x80, "log_flag_call_back", "Call Back Requested" ),
2593 ])
2594 LogFileFlagLow                  = bitfield8("log_file_flag_low", "Log File Flag", [
2595         bf_boolean8(0x01, "log_flag_lock_file", "Lock File Immediately" ),
2596 ])
2597 LoggedObjectID                  = uint32("logged_object_id", "Logged in Object ID")
2598 LoggedObjectID.Display("BASE_HEX")
2599 LoggedCount                     = uint16("logged_count", "Logged Count")
2600 LogicalConnectionNumber         = uint16("logical_connection_number", "Logical Connection Number", BE)
2601 LogicalDriveCount               = uint8("logical_drive_count", "Logical Drive Count")
2602 LogicalDriveNumber              = uint8("logical_drive_number", "Logical Drive Number")
2603 LogicalLockThreshold            = uint8("logical_lock_threshold", "LogicalLockThreshold")
2604 LogicalRecordName               = nstring8("logical_record_name", "Logical Record Name")
2605 LoginKey                        = bytes("login_key", "Login Key", 8)
2606 LogLockType                     = uint8("log_lock_type", "Log Lock Type")
2607 LogTtlRxPkts                    = uint32("log_ttl_rx_pkts", "Total Received Packets")
2608 LogTtlTxPkts                    = uint32("log_ttl_tx_pkts", "Total Transmitted Packets")
2609 LongName                        = fw_string("long_name", "Long Name", 32)
2610 LRUBlockWasDirty                = uint16("lru_block_was_dirty", "LRU Block Was Dirty")
2611
2612 MacAttr                         = bitfield16("mac_attr", "Attributes", [
2613         bf_boolean16(0x0001, "mac_attr_smode1", "Search Mode"),
2614         bf_boolean16(0x0002, "mac_attr_smode2", "Search Mode"),
2615         bf_boolean16(0x0004, "mac_attr_smode3", "Search Mode"),
2616         bf_boolean16(0x0010, "mac_attr_transaction", "Transaction"),
2617         bf_boolean16(0x0020, "mac_attr_index", "Index"),
2618         bf_boolean16(0x0040, "mac_attr_r_audit", "Read Audit"),
2619         bf_boolean16(0x0080, "mac_attr_w_audit", "Write Audit"),
2620         bf_boolean16(0x0100, "mac_attr_r_only", "Read Only"),
2621         bf_boolean16(0x0200, "mac_attr_hidden", "Hidden"),
2622         bf_boolean16(0x0400, "mac_attr_system", "System"),
2623         bf_boolean16(0x0800, "mac_attr_execute_only", "Execute Only"),
2624         bf_boolean16(0x1000, "mac_attr_subdirectory", "Subdirectory"),
2625         bf_boolean16(0x2000, "mac_attr_archive", "Archive"),
2626         bf_boolean16(0x8000, "mac_attr_share", "Shareable File"),
2627 ])
2628 MACBackupDate                   = uint16("mac_backup_date", "Mac Backup Date")
2629 MACBackupDate.NWDate()
2630 MACBackupTime                   = uint16("mac_backup_time", "Mac Backup Time")
2631 MACBackupTime.NWTime()
2632 MacBaseDirectoryID              = uint32("mac_base_directory_id", "Mac Base Directory ID", BE)
2633 MacBaseDirectoryID.Display("BASE_HEX")
2634 MACCreateDate                   = uint16("mac_create_date", "Mac Create Date")
2635 MACCreateDate.NWDate()
2636 MACCreateTime                   = uint16("mac_create_time", "Mac Create Time")
2637 MACCreateTime.NWTime()
2638 MacDestinationBaseID            = uint32("mac_destination_base_id", "Mac Destination Base ID")
2639 MacDestinationBaseID.Display("BASE_HEX")
2640 MacFinderInfo                   = bytes("mac_finder_info", "Mac Finder Information", 32)
2641 MacLastSeenID                   = uint32("mac_last_seen_id", "Mac Last Seen ID")
2642 MacLastSeenID.Display("BASE_HEX")
2643 MacSourceBaseID                 = uint32("mac_source_base_id", "Mac Source Base ID")
2644 MacSourceBaseID.Display("BASE_HEX")
2645 MajorVersion                    = uint32("major_version", "Major Version")
2646 MaxBytes                        = uint16("max_bytes", "Maximum Number of Bytes")
2647 MaxDataStreams                  = uint32("max_data_streams", "Maximum Data Streams")
2648 MaxDirDepth                     = uint32("max_dir_depth", "Maximum Directory Depth")
2649 MaximumSpace                    = uint16("max_space", "Maximum Space")
2650 MaxNumOfConn                    = uint32("max_num_of_conn", "Maximum Number of Connections")
2651 MaxNumOfLANS                    = uint32("max_num_of_lans", "Maximum Number Of LAN's")
2652 MaxNumOfMedias                  = uint32("max_num_of_medias", "Maximum Number Of Media's")
2653 MaxNumOfNmeSps                  = uint32("max_num_of_nme_sps", "Maximum Number Of Name Spaces")
2654 MaxNumOfSpoolPr                 = uint32("max_num_of_spool_pr", "Maximum Number Of Spool Printers")
2655 MaxNumOfStacks                  = uint32("max_num_of_stacks", "Maximum Number Of Stacks")
2656 MaxNumOfUsers                   = uint32("max_num_of_users", "Maximum Number Of Users")
2657 MaxNumOfVol                     = uint32("max_num_of_vol", "Maximum Number of Volumes")
2658 MaxSpace                        = uint32("maxspace", "Maximum Space")
2659 MaxUsedDynamicSpace             = uint32("max_used_dynamic_space", "Max Used Dynamic Space")
2660 MediaList                       = uint32("media_list", "Media List")
2661 MediaListCount                  = uint32("media_list_count", "Media List Count")
2662 MediaName                       = nstring8("media_name", "Media Name")
2663 MediaNumber                     = uint32("media_number", "Media Number")
2664 MediaObjectType                 = val_string8("media_object_type", "Object Type", [
2665         [ 0x00, "Adapter" ],
2666         [ 0x01, "Changer" ],
2667         [ 0x02, "Removable Device" ],
2668         [ 0x03, "Device" ],
2669         [ 0x04, "Removable Media" ],
2670         [ 0x05, "Partition" ],
2671         [ 0x06, "Slot" ],
2672         [ 0x07, "Hotfix" ],
2673         [ 0x08, "Mirror" ],
2674         [ 0x09, "Parity" ],
2675         [ 0x0a, "Volume Segment" ],
2676         [ 0x0b, "Volume" ],
2677         [ 0x0c, "Clone" ],
2678         [ 0x0d, "Fixed Media" ],
2679         [ 0x0e, "Unknown" ],
2680 ])
2681 MemberName                      = nstring8("member_name", "Member Name")
2682 MemberType                      = val_string16("member_type", "Member Type", [
2683         [ 0x0000,       "Unknown" ],
2684         [ 0x0001,       "User" ],
2685         [ 0x0002,       "User group" ],
2686         [ 0x0003,       "Print queue" ],
2687         [ 0x0004,       "NetWare file server" ],
2688         [ 0x0005,       "Job server" ],
2689         [ 0x0006,       "Gateway" ],
2690         [ 0x0007,       "Print server" ],
2691         [ 0x0008,       "Archive queue" ],
2692         [ 0x0009,       "Archive server" ],
2693         [ 0x000a,       "Job queue" ],
2694         [ 0x000b,       "Administration" ],
2695         [ 0x0021,       "NAS SNA gateway" ],
2696         [ 0x0026,       "Remote bridge server" ],
2697         [ 0x0027,       "TCP/IP gateway" ],
2698 ])
2699 MessageLanguage                 = uint32("message_language", "NLM Language")
2700 MigratedFiles                   = uint32("migrated_files", "Migrated Files")
2701 MigratedSectors                 = uint32("migrated_sectors", "Migrated Sectors")
2702 MinorVersion                    = uint32("minor_version", "Minor Version")
2703 Minute                          = uint8("s_minute", "Minutes")
2704 MixedModePathFlag               = val_string8("mixed_mode_path_flag", "Mixed Mode Path Flag", [
2705     [ 0x00, "Mixed mode path handling is not available"],
2706     [ 0x01, "Mixed mode path handling is available"],
2707 ])
2708 ModifiedDate                    = uint16("modified_date", "Modified Date")
2709 ModifiedDate.NWDate()
2710 ModifiedTime                    = uint16("modified_time", "Modified Time")
2711 ModifiedTime.NWTime()
2712 ModifierID                      = uint32("modifier_id", "Modifier ID", BE)
2713 ModifierID.Display("BASE_HEX")
2714 ModifyDOSInfoMask               = bitfield16("modify_dos_info_mask", "Modify DOS Info Mask", [
2715         bf_boolean16(0x0002, "modify_dos_read", "Attributes"),
2716         bf_boolean16(0x0004, "modify_dos_write", "Creation Date"),
2717         bf_boolean16(0x0008, "modify_dos_open", "Creation Time"),
2718         bf_boolean16(0x0010, "modify_dos_create", "Creator ID"),
2719         bf_boolean16(0x0020, "modify_dos_delete", "Archive Date"),
2720         bf_boolean16(0x0040, "modify_dos_parent", "Archive Time"),
2721         bf_boolean16(0x0080, "modify_dos_search", "Archiver ID"),
2722         bf_boolean16(0x0100, "modify_dos_mdate", "Modify Date"),
2723         bf_boolean16(0x0200, "modify_dos_mtime", "Modify Time"),
2724         bf_boolean16(0x0400, "modify_dos_mid", "Modifier ID"),
2725         bf_boolean16(0x0800, "modify_dos_laccess", "Last Access"),
2726         bf_boolean16(0x1000, "modify_dos_inheritance", "Inheritance"),
2727         bf_boolean16(0x2000, "modify_dos_max_space", "Maximum Space"),
2728 ])
2729 Month                           = val_string8("s_month", "Month", [
2730         [ 0x01, "January"],
2731         [ 0x02, "Febuary"],
2732         [ 0x03, "March"],
2733         [ 0x04, "April"],
2734         [ 0x05, "May"],
2735         [ 0x06, "June"],
2736         [ 0x07, "July"],
2737         [ 0x08, "August"],
2738         [ 0x09, "September"],
2739         [ 0x0a, "October"],
2740         [ 0x0b, "November"],
2741         [ 0x0c, "December"],
2742 ])
2743
2744 MoreFlag                        = val_string8("more_flag", "More Flag", [
2745         [ 0x00, "No More Segments/Entries Available" ],
2746         [ 0x01, "More Segments/Entries Available" ],
2747         [ 0xff, "More Segments/Entries Available" ],
2748 ])
2749 MoreProperties                  = val_string8("more_properties", "More Properties", [
2750         [ 0x00, "No More Properties Available" ],
2751         [ 0x01, "No More Properties Available" ],
2752         [ 0xff, "More Properties Available" ],
2753 ])
2754
2755 Name                            = nstring8("name", "Name")
2756 Name12                          = fw_string("name12", "Name", 12)
2757 NameLen                         = uint8("name_len", "Name Space Length")
2758 NameLength                      = uint8("name_length", "Name Length")
2759 NameList                        = uint32("name_list", "Name List")
2760 #
2761 # XXX - should this value be used to interpret the characters in names,
2762 # search patterns, and the like?
2763 #
2764 # We need to handle character sets better, e.g. translating strings
2765 # from whatever character set they are in the packet (DOS/Windows code
2766 # pages, ISO character sets, UNIX EUC character sets, UTF-8, UCS-2/Unicode,
2767 # Mac character sets, etc.) into UCS-4 or UTF-8 and storing them as such
2768 # in the protocol tree, and displaying them as best we can.
2769 #
2770 NameSpace                       = val_string8("name_space", "Name Space", [
2771         [ 0x00, "DOS" ],
2772         [ 0x01, "MAC" ],
2773         [ 0x02, "NFS" ],
2774         [ 0x03, "FTAM" ],
2775         [ 0x04, "OS/2, Long" ],
2776 ])
2777 NamesSpaceInfoMask                      = bitfield16("ns_info_mask", "Names Space Info Mask", [
2778         bf_boolean16(0x0001, "ns_info_mask_modify", "Modify Name"),
2779         bf_boolean16(0x0002, "ns_info_mask_fatt", "File Attributes"),
2780         bf_boolean16(0x0004, "ns_info_mask_cdate", "Creation Date"),
2781         bf_boolean16(0x0008, "ns_info_mask_ctime", "Creation Time"),
2782         bf_boolean16(0x0010, "ns_info_mask_owner", "Owner ID"),
2783         bf_boolean16(0x0020, "ns_info_mask_adate", "Archive Date"),
2784         bf_boolean16(0x0040, "ns_info_mask_atime", "Archive Time"),
2785         bf_boolean16(0x0080, "ns_info_mask_aid", "Archiver ID"),
2786         bf_boolean16(0x0100, "ns_info_mask_udate", "Update Date"),
2787         bf_boolean16(0x0200, "ns_info_mask_utime", "Update Time"),
2788         bf_boolean16(0x0400, "ns_info_mask_uid", "Update ID"),
2789         bf_boolean16(0x0800, "ns_info_mask_acc_date", "Access Date"),
2790         bf_boolean16(0x1000, "ns_info_mask_max_acc_mask", "Inheritance"),
2791         bf_boolean16(0x2000, "ns_info_mask_max_space", "Maximum Space"),
2792 ])
2793 NameSpaceName                   = nstring8("name_space_name", "Name Space Name")
2794 nameType                        = uint32("name_type", "nameType")
2795 NCPdataSize                     = uint32("ncp_data_size", "NCP Data Size")
2796 NCPextensionMajorVersion        = uint8("ncp_extension_major_version", "NCP Extension Major Version")
2797 NCPextensionMinorVersion        = uint8("ncp_extension_minor_version", "NCP Extension Minor Version")
2798 NCPextensionName                = nstring8("ncp_extension_name", "NCP Extension Name")
2799 NCPextensionNumber              = uint32("ncp_extension_number", "NCP Extension Number")
2800 NCPextensionNumber.Display("BASE_HEX")
2801 NCPExtensionNumbers             = uint32("ncp_extension_numbers", "NCP Extension Numbers")
2802 NCPextensionRevisionNumber      = uint8("ncp_extension_revision_number", "NCP Extension Revision Number")
2803 NCPPeakStaInUse                 = uint32("ncp_peak_sta_in_use", "Peak Number of Connections since Server was brought up")
2804 NCPStaInUseCnt                  = uint32("ncp_sta_in_use", "Number of Workstations Connected to Server")
2805 NDSRequestFlags                 = bitfield16("nds_request_flags", "NDS Request Flags", [
2806         bf_boolean16(0x0001, "nds_request_flags_output", "Output Fields"),
2807         bf_boolean16(0x0002, "nds_request_flags_no_such_entry", "No Such Entry"),
2808         bf_boolean16(0x0004, "nds_request_flags_local_entry", "Local Entry"),
2809         bf_boolean16(0x0008, "nds_request_flags_type_ref", "Type Referral"),
2810         bf_boolean16(0x0010, "nds_request_flags_alias_ref", "Alias Referral"),
2811         bf_boolean16(0x0020, "nds_request_flags_req_cnt", "Request Count"),
2812         bf_boolean16(0x0040, "nds_request_flags_req_data_size", "Request Data Size"),
2813         bf_boolean16(0x0080, "nds_request_flags_reply_data_size", "Reply Data Size"),
2814         bf_boolean16(0x0100, "nds_request_flags_trans_ref", "Transport Referral"),
2815         bf_boolean16(0x0200, "nds_request_flags_trans_ref2", "Transport Referral"),
2816         bf_boolean16(0x0400, "nds_request_flags_up_ref", "Up Referral"),
2817         bf_boolean16(0x0800, "nds_request_flags_dn_ref", "Down Referral"),
2818 ])
2819 NDSStatus                       = uint32("nds_status", "NDS Status")
2820 NetBIOSBroadcastWasPropogated   = uint32("netbios_broadcast_was_propogated", "NetBIOS Broadcast Was Propogated")
2821 NetIDNumber                     = uint32("net_id_number", "Net ID Number")
2822 NetIDNumber.Display("BASE_HEX")
2823 NetAddress                      = nbytes32("address", "Address")
2824 NetStatus                       = uint16("net_status", "Network Status")
2825 NetWareAccessHandle             = bytes("netware_access_handle", "NetWare Access Handle", 6)
2826 NetworkAddress                  = uint32("network_address", "Network Address")
2827 NetworkAddress.Display("BASE_HEX")
2828 NetworkNodeAddress              = bytes("network_node_address", "Network Node Address", 6)
2829 NetworkNumber                   = uint32("network_number", "Network Number")
2830 NetworkNumber.Display("BASE_HEX")
2831 #
2832 # XXX - this should have the "ipx_socket_vals" value_string table
2833 # from "packet-ipx.c".
2834 #
2835 NetworkSocket                   = uint16("network_socket", "Network Socket")
2836 NetworkSocket.Display("BASE_HEX")
2837 NewAccessRights                 = bitfield16("new_access_rights_mask", "New Access Rights", [
2838         bf_boolean16(0x0001, "new_access_rights_read", "Read"),
2839         bf_boolean16(0x0002, "new_access_rights_write", "Write"),
2840         bf_boolean16(0x0004, "new_access_rights_open", "Open"),
2841         bf_boolean16(0x0008, "new_access_rights_create", "Create"),
2842         bf_boolean16(0x0010, "new_access_rights_delete", "Delete"),
2843         bf_boolean16(0x0020, "new_access_rights_parental", "Parental"),
2844         bf_boolean16(0x0040, "new_access_rights_search", "Search"),
2845         bf_boolean16(0x0080, "new_access_rights_modify", "Modify"),
2846         bf_boolean16(0x0100, "new_access_rights_supervisor", "Supervisor"),
2847 ])
2848 NewDirectoryID                  = uint32("new_directory_id", "New Directory ID", BE)
2849 NewDirectoryID.Display("BASE_HEX")
2850 NewEAHandle                     = uint32("new_ea_handle", "New EA Handle")
2851 NewEAHandle.Display("BASE_HEX")
2852 NewFileName                     = fw_string("new_file_name", "New File Name", 14)
2853 NewFileNameLen                  = nstring8("new_file_name_len", "New File Name")
2854 NewFileSize                     = uint32("new_file_size", "New File Size")
2855 NewPassword                     = nstring8("new_password", "New Password")
2856 NewPath                         = nstring8("new_path", "New Path")
2857 NewPosition                     = uint8("new_position", "New Position")
2858 NewObjectName                   = nstring8("new_object_name", "New Object Name")
2859 NextCntBlock                    = uint32("next_cnt_block", "Next Count Block")
2860 NextHugeStateInfo               = bytes("next_huge_state_info", "Next Huge State Info", 16)
2861 nextLimbScanNum                 = uint32("next_limb_scan_num", "Next Limb Scan Number")
2862 NextObjectID                    = uint32("next_object_id", "Next Object ID", BE)
2863 NextObjectID.Display("BASE_HEX")
2864 NextRecord                      = uint32("next_record", "Next Record")
2865 NextRequestRecord               = uint16("next_request_record", "Next Request Record")
2866 NextSearchIndex                 = uint16("next_search_index", "Next Search Index")
2867 NextSearchNumber                = uint16("next_search_number", "Next Search Number")
2868 NextSearchNum                   = uint32("nxt_search_num", "Next Search Number")
2869 nextStartingNumber              = uint32("next_starting_number", "Next Starting Number")
2870 NextTrusteeEntry                = uint32("next_trustee_entry", "Next Trustee Entry")
2871 NextVolumeNumber                = uint32("next_volume_number", "Next Volume Number")
2872 NLMBuffer                       = nstring8("nlm_buffer", "Buffer")
2873 NLMcount                        = uint32("nlm_count", "NLM Count")
2874 NLMFlags                        = bitfield8("nlm_flags", "Flags", [
2875         bf_boolean8(0x01, "nlm_flags_reentrant", "ReEntrant"),
2876         bf_boolean8(0x02, "nlm_flags_multiple", "Can Load Multiple Times"),
2877         bf_boolean8(0x04, "nlm_flags_synchronize", "Synchronize Start"),
2878         bf_boolean8(0x08, "nlm_flags_pseudo", "PseudoPreemption"),
2879 ])
2880 NLMLoadOptions                  = uint32("nlm_load_options", "NLM Load Options")
2881 NLMName                         = stringz("nlm_name_stringz", "NLM Name")
2882 NLMNumber                       = uint32("nlm_number", "NLM Number")
2883 NLMNumbers                      = uint32("nlm_numbers", "NLM Numbers")
2884 NLMsInList                      = uint32("nlms_in_list", "NLM's in List")
2885 NLMStartNumber                  = uint32("nlm_start_num", "NLM Start Number")
2886 NLMType                         = val_string8("nlm_type", "NLM Type", [
2887         [ 0x00, "Generic NLM (.NLM)" ],
2888         [ 0x01, "LAN Driver (.LAN)" ],
2889         [ 0x02, "Disk Driver (.DSK)" ],
2890         [ 0x03, "Name Space Support Module (.NAM)" ],
2891         [ 0x04, "Utility or Support Program (.NLM)" ],
2892         [ 0x05, "Mirrored Server Link (.MSL)" ],
2893         [ 0x06, "OS NLM (.NLM)" ],
2894         [ 0x07, "Paged High OS NLM (.NLM)" ],
2895         [ 0x08, "Host Adapter Module (.HAM)" ],
2896         [ 0x09, "Custom Device Module (.CDM)" ],
2897         [ 0x0a, "File System Engine (.NLM)" ],
2898         [ 0x0b, "Real Mode NLM (.NLM)" ],
2899         [ 0x0c, "Hidden NLM (.NLM)" ],
2900         [ 0x15, "NICI Support (.NLM)" ],
2901         [ 0x16, "NICI Support (.NLM)" ],
2902         [ 0x17, "Cryptography (.NLM)" ],
2903         [ 0x18, "Encryption (.NLM)" ],
2904         [ 0x19, "NICI Support (.NLM)" ],
2905         [ 0x1c, "NICI Support (.NLM)" ],
2906 ])
2907 nodeFlags                       = uint32("node_flags", "Node Flags")
2908 nodeFlags.Display("BASE_HEX")
2909 NoMoreMemAvlCnt                 = uint32("no_more_mem_avail", "No More Memory Available Count")
2910 NonDedFlag                      = boolean8("non_ded_flag", "Non Dedicated Flag")
2911 NonFreeableAvailableSubAllocSectors = uint32("non_freeable_avail_sub_alloc_sectors", "Non Freeable Available Sub Alloc Sectors")
2912 NonFreeableLimboSectors         = uint32("non_freeable_limbo_sectors", "Non Freeable Limbo Sectors")
2913 NotUsableSubAllocSectors        = uint32("not_usable_sub_alloc_sectors", "Not Usable Sub Alloc Sectors")
2914 NotYetPurgeableBlocks           = uint32("not_yet_purgeable_blocks", "Not Yet Purgeable Blocks")
2915 NSInfoBitMask                   = uint32("ns_info_bit_mask", "Name Space Info Bit Mask")
2916 NSSOAllInFlags                  = bitfield32("nsso_all_in_flags", "SecretStore All Input Flags",[
2917         bf_boolean32(0x00000010, "nsso_all_unicode", "Unicode Data"),
2918         bf_boolean32(0x00000080, "nsso_set_tree", "Set Tree"),
2919         bf_boolean32(0x00000200, "nsso_destroy_ctx", "Destroy Context"),
2920 ])
2921 NSSOGetServiceInFlags           = bitfield32("nsso_get_svc_in_flags", "SecretStore Get Service Flags",[
2922         bf_boolean32(0x00000100, "nsso_get_ctx", "Get Context"),
2923 ])
2924 NSSOReadInFlags                 = bitfield32("nsso_read_in_flags", "SecretStore Read Flags",[
2925         bf_boolean32(0x00000001, "nsso_rw_enh_prot", "Read/Write Enhanced Protection"),
2926         bf_boolean32(0x00000008, "nsso_repair", "Repair SecretStore"),
2927 ])
2928 NSSOReadOrUnlockInFlags         = bitfield32("nsso_read_or_unlock_in_flags", "SecretStore Read or Unlock Flags",[
2929         bf_boolean32(0x00000004, "nsso_ep_master_pwd", "Master Password used instead of ENH Password"),
2930 ])
2931 NSSOUnlockInFlags               = bitfield32("nsso_unlock_in_flags", "SecretStore Unlock Flags",[
2932         bf_boolean32(0x00000004, "nsso_rmv_lock", "Remove Lock from Store"),
2933 ])
2934 NSSOWriteInFlags                = bitfield32("nsso_write_in_flags", "SecretStore Write Flags",[
2935         bf_boolean32(0x00000001, "nsso_enh_prot", "Enhanced Protection"),
2936         bf_boolean32(0x00000002, "nsso_create_id", "Create ID"),
2937         bf_boolean32(0x00000040, "nsso_ep_pwd_used", "Enhanced Protection Password Used"),
2938 ])
2939 NSSOContextOutFlags             = bitfield32("nsso_cts_out_flags", "Type of Context",[
2940         bf_boolean32(0x00000001, "nsso_ds_ctx", "DSAPI Context"),
2941         bf_boolean32(0x00000080, "nsso_ldap_ctx", "LDAP Context"),
2942         bf_boolean32(0x00000200, "nsso_dc_ctx", "Reserved"),
2943 ])
2944 NSSOGetServiceOutFlags          = bitfield32("nsso_get_svc_out_flags", "SecretStore Status Flags",[
2945         bf_boolean32(0x00400000, "nsso_mstr_pwd", "Master Password Present"),
2946 ])
2947 NSSOGetServiceReadOutFlags      = bitfield32("nsso_get_svc_read_out_flags", "SecretStore Status Flags",[
2948         bf_boolean32(0x00800000, "nsso_mp_disabled", "Master Password Disabled"),
2949 ])
2950 NSSOReadOutFlags                = bitfield32("nsso_read_out_flags", "SecretStore Read Flags",[
2951         bf_boolean32(0x00010000, "nsso_secret_locked", "Enhanced Protection Lock on Secret"),
2952         bf_boolean32(0x00020000, "nsso_secret_not_init", "Secret Not Yet Initialized"),
2953         bf_boolean32(0x00040000, "nsso_secret_marked", "Secret Marked for Enhanced Protection"),
2954         bf_boolean32(0x00080000, "nsso_secret_not_sync", "Secret Not Yet Synchronized in NDS"),
2955         bf_boolean32(0x00200000, "nsso_secret_enh_pwd", "Enhanced Protection Password on Secret"),
2956 ])
2957 NSSOReadOutStatFlags            = bitfield32("nsso_read_out_stat_flags", "SecretStore Read Status Flags",[
2958         bf_boolean32(0x00100000, "nsso_admin_mod", "Admin Modified Secret Last"),
2959 ])
2960 NSSOVerb                        = val_string8("nsso_verb", "SecretStore Verb", [
2961         [ 0x00, "Query Server" ],
2962         [ 0x01, "Read App Secrets" ],
2963         [ 0x02, "Write App Secrets" ],
2964         [ 0x03, "Add Secret ID" ],
2965         [ 0x04, "Remove Secret ID" ],
2966         [ 0x05, "Remove SecretStore" ],
2967         [ 0x06, "Enumerate SecretID's" ],
2968         [ 0x07, "Unlock Store" ],
2969         [ 0x08, "Set Master Password" ],
2970         [ 0x09, "Get Service Information" ],
2971 ])
2972 NSSpecificInfo                  = fw_string("ns_specific_info", "Name Space Specific Info", 512)
2973 NumberOfAllocs                  = uint32("num_of_allocs", "Number of Allocations")
2974 NumberOfAttributes              = uint32("number_of_attributes", "Number of Attributes")
2975 NumberOfCPUs                    = uint32("number_of_cpus", "Number of CPU's")
2976 NumberOfDataStreams             = uint16("number_of_data_streams", "Number of Data Streams")
2977 NumberOfDynamicMemoryAreas      = uint16("number_of_dynamic_memory_areas", "Number Of Dynamic Memory Areas")
2978 NumberOfEntries                 = uint8("number_of_entries", "Number of Entries")
2979 NumberOfLocks                   = uint8("number_of_locks", "Number of Locks")
2980 NumberOfMinutesToDelay          = uint32("number_of_minutes_to_delay", "Number of Minutes to Delay")
2981 NumberOfNCPExtensions           = uint32("number_of_ncp_extensions", "Number Of NCP Extensions")
2982 NumberOfNSLoaded                = uint16("number_of_ns_loaded", "Number Of Name Spaces Loaded")
2983 NumberOfProtocols               = uint8("number_of_protocols", "Number of Protocols")
2984 NumberOfRecords                 = uint16("number_of_records", "Number of Records")
2985 NumberOfReferencedPublics       = uint32("num_of_ref_publics", "Number of Referenced Public Symbols")
2986 NumberOfSemaphores              = uint16("number_of_semaphores", "Number Of Semaphores")
2987 NumberOfServiceProcesses        = uint8("number_of_service_processes", "Number Of Service Processes")
2988 NumberOfSetCategories           = uint32("number_of_set_categories", "Number Of Set Categories")
2989 NumberOfSMs                     = uint32("number_of_sms", "Number Of Storage Medias")
2990 NumberOfStations                = uint8("number_of_stations", "Number of Stations")
2991 NumBytes                        = uint16("num_bytes", "Number of Bytes")
2992 NumOfCCinPkt                    = uint32("num_of_cc_in_pkt", "Number of Custom Counters in Packet")
2993 NumOfChecks                     = uint32("num_of_checks", "Number of Checks")
2994 NumOfEntries                    = uint32("num_of_entries", "Number of Entries")
2995 NumOfFilesMigrated              = uint32("num_of_files_migrated", "Number Of Files Migrated")
2996 NumOfGarbageColl                = uint32("num_of_garb_coll", "Number of Garbage Collections")
2997 NumOfNCPReqs                    = uint32("num_of_ncp_reqs", "Number of NCP Requests since Server was brought up")
2998 NumOfSegments                   = uint32("num_of_segments", "Number of Segments")
2999
3000 ObjectCount                     = uint32("object_count", "Object Count")
3001 ObjectFlags                     = val_string8("object_flags", "Object Flags", [
3002         [ 0x00, "Dynamic object" ],
3003         [ 0x01, "Static object" ],
3004 ])
3005 ObjectHasProperties             = val_string8("object_has_properites", "Object Has Properties", [
3006         [ 0x00, "No properties" ],
3007         [ 0xff, "One or more properties" ],
3008 ])
3009 ObjectID                        = uint32("object_id", "Object ID", BE)
3010 ObjectID.Display('BASE_HEX')
3011 ObjectIDCount                   = uint16("object_id_count", "Object ID Count")
3012 ObjectIDInfo                    = uint32("object_id_info", "Object Information")
3013 ObjectInfoReturnCount           = uint32("object_info_rtn_count", "Object Information Count")
3014 ObjectName                      = nstring8("object_name", "Object Name")
3015 ObjectNameLen                   = fw_string("object_name_len", "Object Name", 48)
3016 ObjectNameStringz               = stringz("object_name_stringz", "Object Name")
3017 ObjectNumber                    = uint32("object_number", "Object Number")
3018 ObjectSecurity                  = val_string8("object_security", "Object Security", [
3019         [ 0x00, "Object Read (Anyone) / Object Write (Anyone)" ],
3020         [ 0x01, "Object Read (Logged in) / Object Write (Anyone)" ],
3021         [ 0x02, "Object Read (Logged in as Object) / Object Write (Anyone)" ],
3022         [ 0x03, "Object Read (Supervisor) / Object Write (Anyone)" ],
3023         [ 0x04, "Object Read (Operating System Only) / Object Write (Anyone)" ],
3024         [ 0x10, "Object Read (Anyone) / Object Write (Logged in)" ],
3025         [ 0x11, "Object Read (Logged in) / Object Write (Logged in)" ],
3026         [ 0x12, "Object Read (Logged in as Object) / Object Write (Logged in)" ],
3027         [ 0x13, "Object Read (Supervisor) / Object Write (Logged in)" ],
3028         [ 0x14, "Object Read (Operating System Only) / Object Write (Logged in)" ],
3029         [ 0x20, "Object Read (Anyone) / Object Write (Logged in as Object)" ],
3030         [ 0x21, "Object Read (Logged in) / Object Write (Logged in as Object)" ],
3031         [ 0x22, "Object Read (Logged in as Object) / Object Write (Logged in as Object)" ],
3032         [ 0x23, "Object Read (Supervisor) / Object Write (Logged in as Object)" ],
3033         [ 0x24, "Object Read (Operating System Only) / Object Write (Logged in as Object)" ],
3034         [ 0x30, "Object Read (Anyone) / Object Write (Supervisor)" ],
3035         [ 0x31, "Object Read (Logged in) / Object Write (Supervisor)" ],
3036         [ 0x32, "Object Read (Logged in as Object) / Object Write (Supervisor)" ],
3037         [ 0x33, "Object Read (Supervisor) / Object Write (Supervisor)" ],
3038         [ 0x34, "Object Read (Operating System Only) / Object Write (Supervisor)" ],
3039         [ 0x40, "Object Read (Anyone) / Object Write (Operating System Only)" ],
3040         [ 0x41, "Object Read (Logged in) / Object Write (Operating System Only)" ],
3041         [ 0x42, "Object Read (Logged in as Object) / Object Write (Operating System Only)" ],
3042         [ 0x43, "Object Read (Supervisor) / Object Write (Operating System Only)" ],
3043         [ 0x44, "Object Read (Operating System Only) / Object Write (Operating System Only)" ],
3044 ])
3045 #
3046 # XXX - should this use the "server_vals[]" value_string array from
3047 # "packet-ipx.c"?
3048 #
3049 # XXX - should this list be merged with that list?  There are some
3050 # oddities, e.g. this list has 0x03f5 for "Microsoft SQL Server", but
3051 # the list from "packet-ipx.c" has 0xf503 for that - is that just
3052 # byte-order confusion?
3053 #
3054 ObjectType                      = val_string16("object_type", "Object Type", [
3055         [ 0x0000,       "Unknown" ],
3056         [ 0x0001,       "User" ],
3057         [ 0x0002,       "User group" ],
3058         [ 0x0003,       "Print queue" ],
3059         [ 0x0004,       "NetWare file server" ],
3060         [ 0x0005,       "Job server" ],
3061         [ 0x0006,       "Gateway" ],
3062         [ 0x0007,       "Print server" ],
3063         [ 0x0008,       "Archive queue" ],
3064         [ 0x0009,       "Archive server" ],
3065         [ 0x000a,       "Job queue" ],
3066         [ 0x000b,       "Administration" ],
3067         [ 0x0021,       "NAS SNA gateway" ],
3068         [ 0x0026,       "Remote bridge server" ],
3069         [ 0x0027,       "TCP/IP gateway" ],
3070         [ 0x0047,       "Novell Print Server" ],
3071         [ 0x004b,       "Btrieve Server" ],
3072         [ 0x004c,       "NetWare SQL Server" ],
3073         [ 0x0064,       "ARCserve" ],
3074         [ 0x0066,       "ARCserve 3.0" ],
3075         [ 0x0076,       "NetWare SQL" ],
3076         [ 0x00a0,       "Gupta SQL Base Server" ],
3077         [ 0x00a1,       "Powerchute" ],
3078         [ 0x0107,       "NetWare Remote Console" ],
3079         [ 0x01cb,       "Shiva NetModem/E" ],
3080         [ 0x01cc,       "Shiva LanRover/E" ],
3081         [ 0x01cd,       "Shiva LanRover/T" ],
3082         [ 0x01d8,       "Castelle FAXPress Server" ],
3083         [ 0x01da,       "Castelle Print Server" ],
3084         [ 0x01dc,       "Castelle Fax Server" ],
3085         [ 0x0200,       "Novell SQL Server" ],
3086         [ 0x023a,       "NetWare Lanalyzer Agent" ],
3087         [ 0x023c,       "DOS Target Service Agent" ],
3088         [ 0x023f,       "NetWare Server Target Service Agent" ],
3089         [ 0x024f,       "Appletalk Remote Access Service" ],
3090         [ 0x0263,       "NetWare Management Agent" ],
3091         [ 0x0264,       "Global MHS" ],
3092         [ 0x0265,       "SNMP" ],
3093         [ 0x026a,       "NetWare Management/NMS Console" ],
3094         [ 0x026b,       "NetWare Time Synchronization" ],
3095         [ 0x0273,       "Nest Device" ],
3096         [ 0x0274,       "GroupWise Message Multiple Servers" ],
3097         [ 0x0278,       "NDS Replica Server" ],
3098         [ 0x0282,       "NDPS Service Registry Service" ],
3099         [ 0x028a,       "MPR/IPX Address Mapping Gateway" ],
3100         [ 0x028b,       "ManageWise" ],
3101         [ 0x0293,       "NetWare 6" ],
3102         [ 0x030c,       "HP JetDirect" ],
3103         [ 0x0328,       "Watcom SQL Server" ],
3104         [ 0x0355,       "Backup Exec" ],
3105         [ 0x039b,       "Lotus Notes" ],
3106         [ 0x03e1,       "Univel Server" ],
3107         [ 0x03f5,       "Microsoft SQL Server" ],
3108         [ 0x055e,       "Lexmark Print Server" ],
3109         [ 0x0640,       "Microsoft Gateway Services for NetWare" ],
3110         [ 0x064e,       "Microsoft Internet Information Server" ],
3111         [ 0x077b,       "Advantage Database Server" ],
3112         [ 0x07a7,       "Backup Exec Job Queue" ],
3113         [ 0x07a8,       "Backup Exec Job Manager" ],
3114         [ 0x07a9,       "Backup Exec Job Service" ],
3115         [ 0x5555,       "Site Lock" ],
3116         [ 0x8202,       "NDPS Broker" ],
3117 ])
3118 OCRetFlags                      = val_string8("o_c_ret_flags", "Open Create Return Flags", [
3119         [ 0x00, "No CallBack has been registered (No Op-Lock)" ],
3120         [ 0x01, "Request has been registered for CallBack (Op-Lock)" ],
3121 ])
3122 OldestDeletedFileAgeInTicks     = uint32("oldest_deleted_file_age_in_ticks", "Oldest Deleted File Age in Ticks")
3123 OldFileName                     = bytes("old_file_name", "Old File Name", 15)
3124 OldFileSize                     = uint32("old_file_size", "Old File Size")
3125 OpenCount                       = uint16("open_count", "Open Count")
3126 OpenCreateAction                = bitfield8("open_create_action", "Open Create Action", [
3127         bf_boolean8(0x01, "open_create_action_opened", "Opened"),
3128         bf_boolean8(0x02, "open_create_action_created", "Created"),
3129         bf_boolean8(0x04, "open_create_action_replaced", "Replaced"),
3130         bf_boolean8(0x08, "open_create_action_compressed", "Compressed"),
3131         bf_boolean8(0x80, "open_create_action_read_only", "Read Only"),
3132 ])
3133 OpenCreateMode                  = bitfield8("open_create_mode", "Open Create Mode", [
3134         bf_boolean8(0x01, "open_create_mode_open", "Open existing file (file must exist)"),
3135         bf_boolean8(0x02, "open_create_mode_replace", "Replace existing file"),
3136         bf_boolean8(0x08, "open_create_mode_create", "Create new file or subdirectory (file or subdirectory cannot exist)"),
3137         bf_boolean8(0x80, "open_create_mode_oplock", "Open Callback (Op-Lock)"),
3138 ])
3139 OpenForReadCount                = uint16("open_for_read_count", "Open For Read Count")
3140 OpenForWriteCount               = uint16("open_for_write_count", "Open For Write Count")
3141 OpenRights                      = bitfield8("open_rights", "Open Rights", [
3142         bf_boolean8(0x01, "open_rights_read_only", "Read Only"),
3143         bf_boolean8(0x02, "open_rights_write_only", "Write Only"),
3144         bf_boolean8(0x04, "open_rights_deny_read", "Deny Read"),
3145         bf_boolean8(0x08, "open_rights_deny_write", "Deny Write"),
3146         bf_boolean8(0x10, "open_rights_compat", "Compatibility"),
3147         bf_boolean8(0x40, "open_rights_write_thru", "Write Through"),
3148 ])
3149 OptionNumber                    = uint8("option_number", "Option Number")
3150 originalSize                    = uint32("original_size", "Original Size")
3151 OSLanguageID                    = uint8("os_language_id", "OS Language ID")
3152 OSMajorVersion                  = uint8("os_major_version", "OS Major Version")
3153 OSMinorVersion                  = uint8("os_minor_version", "OS Minor Version")
3154 OSRevision                      = uint8("os_revision", "OS Revision")
3155 OtherFileForkSize               = uint32("other_file_fork_size", "Other File Fork Size")
3156 OtherFileForkFAT                = uint32("other_file_fork_fat", "Other File Fork FAT Entry")
3157 OutgoingPacketDiscardedNoTurboBuffer = uint16("outgoing_packet_discarded_no_turbo_buffer", "Outgoing Packet Discarded No Turbo Buffer")
3158
3159 PacketsDiscardedByHopCount      = uint16("packets_discarded_by_hop_count", "Packets Discarded By Hop Count")
3160 PacketsDiscardedUnknownNet      = uint16("packets_discarded_unknown_net", "Packets Discarded Unknown Net")
3161 PacketsFromInvalidConnection    = uint16("packets_from_invalid_connection", "Packets From Invalid Connection")
3162 PacketsReceivedDuringProcessing = uint16("packets_received_during_processing", "Packets Received During Processing")
3163 PacketsWithBadRequestType       = uint16("packets_with_bad_request_type", "Packets With Bad Request Type")
3164 PacketsWithBadSequenceNumber    = uint16("packets_with_bad_sequence_number", "Packets With Bad Sequence Number")
3165 PageTableOwnerFlag              = uint32("page_table_owner_flag", "Page Table Owner")
3166 ParentID                        = uint32("parent_id", "Parent ID")
3167 ParentID.Display("BASE_HEX")
3168 ParentBaseID                    = uint32("parent_base_id", "Parent Base ID")
3169 ParentBaseID.Display("BASE_HEX")
3170 ParentDirectoryBase             = uint32("parent_directory_base", "Parent Directory Base")
3171 ParentDOSDirectoryBase          = uint32("parent_dos_directory_base", "Parent DOS Directory Base")
3172 ParentObjectNumber              = uint32("parent_object_number", "Parent Object Number")
3173 ParentObjectNumber.Display("BASE_HEX")
3174 Password                        = nstring8("password", "Password")
3175 PathBase                        = uint8("path_base", "Path Base")
3176 PathComponentCount              = uint16("path_component_count", "Path Component Count")
3177 PathComponentSize               = uint16("path_component_size", "Path Component Size")
3178 PathCookieFlags                 = val_string16("path_cookie_flags", "Path Cookie Flags", [
3179         [ 0x0000, "Last component is Not a File Name" ],
3180         [ 0x0001, "Last component is a File Name" ],
3181 ])
3182 PathCount                       = uint8("path_count", "Path Count")
3183 Path                            = nstring8("path", "Path")
3184 PathAndName                     = stringz("path_and_name", "Path and Name")
3185 PendingIOCommands               = uint16("pending_io_commands", "Pending IO Commands")
3186 PhysicalDiskNumber              = uint8("physical_disk_number", "Physical Disk Number")
3187 PhysicalDriveCount              = uint8("physical_drive_count", "Physical Drive Count")
3188 PhysicalLockThreshold           = uint8("physical_lock_threshold", "Physical Lock Threshold")
3189 PingVersion                     = uint16("ping_version", "Ping Version")
3190 PositiveAcknowledgesSent        = uint16("positive_acknowledges_sent", "Positive Acknowledges Sent")
3191 PreCompressedSectors            = uint32("pre_compressed_sectors", "Precompressed Sectors")
3192 PreviousRecord                  = uint32("previous_record", "Previous Record")
3193 PrimaryEntry                    = uint32("primary_entry", "Primary Entry")
3194 PrintFlags                      = bitfield8("print_flags", "Print Flags", [
3195         bf_boolean8(0x08, "print_flags_ff", "Suppress Form Feeds"),
3196         bf_boolean8(0x10, "print_flags_cr", "Create"),
3197         bf_boolean8(0x20, "print_flags_del_spool", "Delete Spool File after Printing"),
3198         bf_boolean8(0x40, "print_flags_exp_tabs", "Expand Tabs in the File"),
3199         bf_boolean8(0x80, "print_flags_banner", "Print Banner Page"),
3200 ])
3201 PrinterHalted                   = val_string8("printer_halted", "Printer Halted", [
3202         [ 0x00, "Printer is not Halted" ],
3203         [ 0xff, "Printer is Halted" ],
3204 ])
3205 PrinterOffLine                  = val_string8( "printer_offline", "Printer Off-Line", [
3206         [ 0x00, "Printer is On-Line" ],
3207         [ 0xff, "Printer is Off-Line" ],
3208 ])
3209 PrintServerVersion              = uint8("print_server_version", "Print Server Version")
3210 Priority                        = uint32("priority", "Priority")
3211 Privileges                      = uint32("privileges", "Login Privileges")
3212 ProcessorType                   = val_string8("processor_type", "Processor Type", [
3213         [ 0x00, "Motorola 68000" ],
3214         [ 0x01, "Intel 8088 or 8086" ],
3215         [ 0x02, "Intel 80286" ],
3216 ])
3217 ProDOSInfo                      = bytes("pro_dos_info", "Pro DOS Info", 6)
3218 ProductMajorVersion             = uint16("product_major_version", "Product Major Version")
3219 ProductMinorVersion             = uint16("product_minor_version", "Product Minor Version")
3220 ProductRevisionVersion          = uint8("product_revision_version", "Product Revision Version")
3221 projectedCompSize               = uint32("projected_comp_size", "Projected Compression Size")
3222 PropertyHasMoreSegments         = val_string8("property_has_more_segments",
3223         "Property Has More Segments", [
3224         [ 0x00, "Is last segment" ],
3225         [ 0xff, "More segments are available" ],
3226 ])
3227 PropertyName                    = nstring8("property_name", "Property Name")
3228 PropertyName16                  = fw_string("property_name_16", "Property Name", 16)
3229 PropertyData                    = bytes("property_data", "Property Data", 128)
3230 PropertySegment                 = uint8("property_segment", "Property Segment")
3231 PropertyType                    = val_string8("property_type", "Property Type", [
3232         [ 0x00, "Display Static property" ],
3233         [ 0x01, "Display Dynamic property" ],
3234         [ 0x02, "Set Static property" ],
3235         [ 0x03, "Set Dynamic property" ],
3236 ])
3237 PropertyValue                   = fw_string("property_value", "Property Value", 128)
3238 ProposedMaxSize                 = uint16("proposed_max_size", "Proposed Max Size")
3239 protocolFlags                   = uint32("protocol_flags", "Protocol Flags")
3240 protocolFlags.Display("BASE_HEX")
3241 PurgeableBlocks                 = uint32("purgeable_blocks", "Purgeable Blocks")
3242 PurgeCcode                      = uint32("purge_c_code", "Purge Completion Code")
3243 PurgeCount                      = uint32("purge_count", "Purge Count")
3244 PurgeFlags                      = val_string16("purge_flags", "Purge Flags", [
3245         [ 0x0000, "Do not Purge All" ],
3246         [ 0x0001, "Purge All" ],
3247         [ 0xffff, "Do not Purge All" ],
3248 ])
3249 PurgeList                       = uint32("purge_list", "Purge List")
3250 PhysicalDiskChannel             = uint8("physical_disk_channel", "Physical Disk Channel")
3251 PhysicalDriveType               = val_string8("physical_drive_type", "Physical Drive Type", [
3252         [ 0x01, "XT" ],
3253         [ 0x02, "AT" ],
3254         [ 0x03, "SCSI" ],
3255         [ 0x04, "Disk Coprocessor" ],
3256         [ 0x05, "PS/2 with MFM Controller" ],
3257         [ 0x06, "PS/2 with ESDI Controller" ],
3258         [ 0x07, "Convergent Technology SBIC" ],
3259 ])
3260 PhysicalReadErrors              = uint16("physical_read_errors", "Physical Read Errors")
3261 PhysicalReadRequests            = uint32("physical_read_requests", "Physical Read Requests")
3262 PhysicalWriteErrors             = uint16("physical_write_errors", "Physical Write Errors")
3263 PhysicalWriteRequests           = uint32("physical_write_requests", "Physical Write Requests")
3264 PrintToFileFlag                 = boolean8("print_to_file_flag", "Print to File Flag")
3265
3266 QueueID                         = uint32("queue_id", "Queue ID")
3267 QueueID.Display("BASE_HEX")
3268 QueueName                       = nstring8("queue_name", "Queue Name")
3269 QueueStartPosition              = uint32("queue_start_position", "Queue Start Position")
3270 QueueStatus                     = bitfield8("queue_status", "Queue Status", [
3271         bf_boolean8(0x01, "queue_status_new_jobs", "Operator does not want to add jobs to the queue"),
3272         bf_boolean8(0x02, "queue_status_pserver", "Operator does not want additional servers attaching"),
3273         bf_boolean8(0x04, "queue_status_svc_jobs", "Operator does not want servers to service jobs"),
3274 ])
3275 QueueType                       = uint16("queue_type", "Queue Type")
3276 QueueingVersion                 = uint8("qms_version", "QMS Version")
3277
3278 ReadBeyondWrite                 = uint16("read_beyond_write", "Read Beyond Write")
3279 RecordLockCount                 = uint16("rec_lock_count", "Record Lock Count")
3280 RecordStart                     = uint32("record_start", "Record Start")
3281 RecordEnd                       = uint32("record_end", "Record End")
3282 RecordInUseFlag                 = val_string16("record_in_use", "Record in Use", [
3283         [ 0x0000, "Record In Use" ],
3284         [ 0xffff, "Record Not In Use" ],
3285 ])
3286 RedirectedPrinter               = uint8( "redirected_printer", "Redirected Printer" )
3287 ReferenceCount                  = uint32("reference_count", "Reference Count")
3288 RelationsCount                  = uint16("relations_count", "Relations Count")
3289 ReMirrorCurrentOffset           = uint32("re_mirror_current_offset", "ReMirror Current Offset")
3290 ReMirrorDriveNumber             = uint8("re_mirror_drive_number", "ReMirror Drive Number")
3291 RemoteMaxPacketSize             = uint32("remote_max_packet_size", "Remote Max Packet Size")
3292 RemoteTargetID                  = uint32("remote_target_id", "Remote Target ID")
3293 RemoteTargetID.Display("BASE_HEX")
3294 RemovableFlag                   = uint16("removable_flag", "Removable Flag")
3295 RemoveOpenRights                = bitfield8("remove_open_rights", "Remove Open Rights", [
3296         bf_boolean8(0x01, "remove_open_rights_ro", "Read Only"),
3297         bf_boolean8(0x02, "remove_open_rights_wo", "Write Only"),
3298         bf_boolean8(0x04, "remove_open_rights_dr", "Deny Read"),
3299         bf_boolean8(0x08, "remove_open_rights_dw", "Deny Write"),
3300         bf_boolean8(0x10, "remove_open_rights_comp", "Compatibility"),
3301         bf_boolean8(0x40, "remove_open_rights_write_thru", "Write Through"),
3302 ])
3303 RenameFlag                      = bitfield8("rename_flag", "Rename Flag", [
3304         bf_boolean8(0x01, "rename_flag_ren", "Rename to Myself allows file to be renamed to it's original name"),
3305         bf_boolean8(0x02, "rename_flag_comp", "Compatability allows files that are marked read only to be opened with read/write access"),
3306         bf_boolean8(0x04, "rename_flag_no", "Name Only renames only the specified name space entry name"),
3307 ])
3308 RepliesCancelled                = uint16("replies_cancelled", "Replies Cancelled")
3309 ReplyBuffer                     = nstring8("reply_buffer", "Reply Buffer")
3310 ReplyBufferSize                 = uint32("reply_buffer_size", "Reply Buffer Size")
3311 ReplyQueueJobNumbers            = uint32("reply_queue_job_numbers", "Reply Queue Job Numbers")
3312 RequestBitMap                   = bitfield16("request_bit_map", "Request Bit Map", [
3313         bf_boolean16(0x0001, "request_bit_map_ret_afp_ent", "AFP Entry ID"),
3314         bf_boolean16(0x0002, "request_bit_map_ret_data_fork", "Data Fork Length"),
3315         bf_boolean16(0x0004, "request_bit_map_ret_res_fork", "Resource Fork Length"),
3316         bf_boolean16(0x0008, "request_bit_map_ret_num_off", "Number of Offspring"),
3317         bf_boolean16(0x0010, "request_bit_map_ret_owner", "Owner ID"),
3318         bf_boolean16(0x0020, "request_bit_map_ret_short", "Short Name"),
3319         bf_boolean16(0x0040, "request_bit_map_ret_acc_priv", "Access Privileges"),
3320         bf_boolean16(0x0100, "request_bit_map_ratt", "Return Attributes"),
3321         bf_boolean16(0x0200, "request_bit_map_ret_afp_parent", "AFP Parent Entry ID"),
3322         bf_boolean16(0x0400, "request_bit_map_ret_cr_date", "Creation Date"),
3323         bf_boolean16(0x0800, "request_bit_map_ret_acc_date", "Access Date"),
3324         bf_boolean16(0x1000, "request_bit_map_ret_mod_date", "Modify Date&Time"),
3325         bf_boolean16(0x2000, "request_bit_map_ret_bak_date", "Backup Date&Time"),
3326         bf_boolean16(0x4000, "request_bit_map_ret_finder", "Finder Info"),
3327         bf_boolean16(0x8000, "request_bit_map_ret_long_nm", "Long Name"),
3328 ])
3329 ResourceForkLen                 = uint32("resource_fork_len", "Resource Fork Len")
3330 RequestCode                     = val_string8("request_code", "Request Code", [
3331         [ 0x00, "Change Logged in to Temporary Authenticated" ],
3332         [ 0x01, "Change Temporary Authenticated to Logged in" ],
3333 ])
3334 RequestData                     = nstring8("request_data", "Request Data")
3335 RequestsReprocessed             = uint16("requests_reprocessed", "Requests Reprocessed")
3336 Reserved                        = uint8( "reserved", "Reserved" )
3337 Reserved2                       = bytes("reserved2", "Reserved", 2)
3338 Reserved3                       = bytes("reserved3", "Reserved", 3)
3339 Reserved4                       = bytes("reserved4", "Reserved", 4)
3340 Reserved6                       = bytes("reserved6", "Reserved", 6)
3341 Reserved8                       = bytes("reserved8", "Reserved", 8)
3342 Reserved10                      = bytes("reserved10", "Reserved", 10)
3343 Reserved12                      = bytes("reserved12", "Reserved", 12)
3344 Reserved16                      = bytes("reserved16", "Reserved", 16)
3345 Reserved20                      = bytes("reserved20", "Reserved", 20)
3346 Reserved28                      = bytes("reserved28", "Reserved", 28)
3347 Reserved36                      = bytes("reserved36", "Reserved", 36)
3348 Reserved44                      = bytes("reserved44", "Reserved", 44)
3349 Reserved48                      = bytes("reserved48", "Reserved", 48)
3350 Reserved50                      = bytes("reserved50", "Reserved", 50)
3351 Reserved56                      = bytes("reserved56", "Reserved", 56)
3352 Reserved64                      = bytes("reserved64", "Reserved", 64)
3353 Reserved120                     = bytes("reserved120", "Reserved", 120)
3354 ReservedOrDirectoryNumber       = uint32("reserved_or_directory_number", "Reserved or Directory Number (see EAFlags)")
3355 ResourceCount                   = uint32("resource_count", "Resource Count")
3356 ResourceForkSize                = uint32("resource_fork_size", "Resource Fork Size")
3357 ResourceName                    = stringz("resource_name", "Resource Name")
3358 ResourceSignature               = fw_string("resource_sig", "Resource Signature", 4)
3359 RestoreTime                     = uint32("restore_time", "Restore Time")
3360 Restriction                     = uint32("restriction", "Disk Space Restriction")
3361 RestrictionsEnforced            = val_string8("restrictions_enforced", "Disk Restrictions Enforce Flag", [
3362         [ 0x00, "Enforced" ],
3363         [ 0xff, "Not Enforced" ],
3364 ])
3365 ReturnInfoCount                 = uint32("return_info_count", "Return Information Count")
3366 ReturnInfoMask                  = bitfield16("ret_info_mask", "Return Information", [
3367         bf_boolean16(0x0001, "ret_info_mask_fname", "Return File Name Information"),
3368         bf_boolean16(0x0002, "ret_info_mask_alloc", "Return Allocation Space Information"),
3369         bf_boolean16(0x0004, "ret_info_mask_attr", "Return Attribute Information"),
3370         bf_boolean16(0x0008, "ret_info_mask_size", "Return Size Information"),
3371         bf_boolean16(0x0010, "ret_info_mask_tspace", "Return Total Space Information"),
3372         bf_boolean16(0x0020, "ret_info_mask_eattr", "Return Extended Attributes Information"),
3373         bf_boolean16(0x0040, "ret_info_mask_arch", "Return Archive Information"),
3374         bf_boolean16(0x0080, "ret_info_mask_mod", "Return Modify Information"),
3375         bf_boolean16(0x0100, "ret_info_mask_create", "Return Creation Information"),
3376         bf_boolean16(0x0200, "ret_info_mask_ns", "Return Name Space Information"),
3377         bf_boolean16(0x0400, "ret_info_mask_dir", "Return Directory Information"),
3378         bf_boolean16(0x0800, "ret_info_mask_rights", "Return Rights Information"),
3379         bf_boolean16(0x1000, "ret_info_mask_id", "Return ID Information"),
3380         bf_boolean16(0x2000, "ret_info_mask_ns_attr", "Return Name Space Attributes Information"),
3381         bf_boolean16(0x4000, "ret_info_mask_actual", "Return Actual Information"),
3382         bf_boolean16(0x8000, "ret_info_mask_logical", "Return Logical Information"),
3383 ])
3384 ReturnedListCount               = uint32("returned_list_count", "Returned List Count")
3385 Revision                        = uint32("revision", "Revision")
3386 RevisionNumber                  = uint8("revision_number", "Revision")
3387 RevQueryFlag                    = val_string8("rev_query_flag", "Revoke Rights Query Flag", [
3388         [ 0x00, "Do not query the locks engine for access rights" ],
3389         [ 0x01, "Query the locks engine and return the access rights" ],
3390 ])
3391 RightsGrantMask                 = bitfield8("rights_grant_mask", "Grant Rights", [
3392         bf_boolean8(0x01, "rights_grant_mask_read", "Read"),
3393         bf_boolean8(0x02, "rights_grant_mask_write", "Write"),
3394         bf_boolean8(0x04, "rights_grant_mask_open", "Open"),
3395         bf_boolean8(0x08, "rights_grant_mask_create", "Create"),
3396         bf_boolean8(0x10, "rights_grant_mask_del", "Delete"),
3397         bf_boolean8(0x20, "rights_grant_mask_parent", "Parental"),
3398         bf_boolean8(0x40, "rights_grant_mask_search", "Search"),
3399         bf_boolean8(0x80, "rights_grant_mask_mod", "Modify"),
3400 ])
3401 RightsRevokeMask                = bitfield8("rights_revoke_mask", "Revoke Rights", [
3402         bf_boolean8(0x01, "rights_revoke_mask_read", "Read"),
3403         bf_boolean8(0x02, "rights_revoke_mask_write", "Write"),
3404         bf_boolean8(0x04, "rights_revoke_mask_open", "Open"),
3405         bf_boolean8(0x08, "rights_revoke_mask_create", "Create"),
3406         bf_boolean8(0x10, "rights_revoke_mask_del", "Delete"),
3407         bf_boolean8(0x20, "rights_revoke_mask_parent", "Parental"),
3408         bf_boolean8(0x40, "rights_revoke_mask_search", "Search"),
3409         bf_boolean8(0x80, "rights_revoke_mask_mod", "Modify"),
3410 ])
3411 RIPSocketNumber                 = uint16("rip_socket_num", "RIP Socket Number")
3412 RIPSocketNumber.Display("BASE_HEX")
3413 RouterDownFlag                  = boolean8("router_dn_flag", "Router Down Flag")
3414 RPCccode                        = val_string16("rpc_c_code", "RPC Completion Code", [
3415         [ 0x0000, "Successful" ],
3416 ])
3417 RTagNumber                      = uint32("r_tag_num", "Resource Tag Number")
3418 RTagNumber.Display("BASE_HEX")
3419 RpyNearestSrvFlag               = boolean8("rpy_nearest_srv_flag", "Reply to Nearest Server Flag")
3420
3421 SalvageableFileEntryNumber      = uint32("salvageable_file_entry_number", "Salvageable File Entry Number")
3422 SalvageableFileEntryNumber.Display("BASE_HEX")
3423 SAPSocketNumber                 = uint16("sap_socket_number", "SAP Socket Number")
3424 SAPSocketNumber.Display("BASE_HEX")
3425 ScanItems                       = uint32("scan_items", "Number of Items returned from Scan")
3426 SearchAttributes                = bitfield8("sattr", "Search Attributes", [
3427         bf_boolean8(0x01, "sattr_ronly", "Read-Only Files Allowed"),
3428         bf_boolean8(0x02, "sattr_hid", "Hidden Files Allowed"),
3429         bf_boolean8(0x04, "sattr_sys", "System Files Allowed"),
3430         bf_boolean8(0x08, "sattr_exonly", "Execute-Only Files Allowed"),
3431         bf_boolean8(0x10, "sattr_sub", "Subdirectories Only"),
3432         bf_boolean8(0x20, "sattr_archive", "Archive"),
3433         bf_boolean8(0x40, "sattr_execute_confirm", "Execute Confirm"),
3434         bf_boolean8(0x80, "sattr_shareable", "Shareable"),
3435 ])
3436 SearchAttributesLow             = bitfield16("search_att_low", "Search Attributes", [
3437         bf_boolean16(0x0001, "search_att_read_only", "Read-Only"),
3438         bf_boolean16(0x0002, "search_att_hidden", "Hidden Files Allowed"),
3439         bf_boolean16(0x0004, "search_att_system", "System"),
3440         bf_boolean16(0x0008, "search_att_execute_only", "Execute-Only"),
3441         bf_boolean16(0x0010, "search_att_sub", "Subdirectories Only"),
3442         bf_boolean16(0x0020, "search_att_archive", "Archive"),
3443         bf_boolean16(0x0040, "search_att_execute_confirm", "Execute Confirm"),
3444         bf_boolean16(0x0080, "search_att_shareable", "Shareable"),
3445         bf_boolean16(0x8000, "search_attr_all_files", "All Files and Directories"),
3446 ])
3447 SearchBitMap                            = bitfield8("search_bit_map", "Search Bit Map", [
3448         bf_boolean8(0x01, "search_bit_map_hidden", "Hidden"),
3449         bf_boolean8(0x02, "search_bit_map_sys", "System"),
3450         bf_boolean8(0x04, "search_bit_map_sub", "Subdirectory"),
3451         bf_boolean8(0x08, "search_bit_map_files", "Files"),
3452 ])
3453 SearchConnNumber                        = uint32("search_conn_number", "Search Connection Number")
3454 SearchInstance                          = uint32("search_instance", "Search Instance")
3455 SearchNumber                            = uint32("search_number", "Search Number")
3456 SearchPattern                           = nstring8("search_pattern", "Search Pattern")
3457 SearchSequence                          = bytes("search_sequence", "Search Sequence", 9)
3458 SearchSequenceWord                      = uint16("search_sequence_word", "Search Sequence", BE)
3459 Second                                  = uint8("s_second", "Seconds")
3460 SecondsRelativeToTheYear2000            = uint32("sec_rel_to_y2k", "Seconds Relative to the Year 2000")
3461 SecretStoreVerb                         = val_string8("ss_verb", "Secret Store Verb",[
3462         [ 0x00, "Query Server" ],
3463         [ 0x01, "Read App Secrets" ],
3464         [ 0x02, "Write App Secrets" ],
3465         [ 0x03, "Add Secret ID" ],
3466         [ 0x04, "Remove Secret ID" ],
3467         [ 0x05, "Remove SecretStore" ],
3468         [ 0x06, "Enumerate Secret IDs" ],
3469         [ 0x07, "Unlock Store" ],
3470         [ 0x08, "Set Master Password" ],
3471         [ 0x09, "Get Service Information" ],
3472 ])
3473 SecurityEquivalentList                  = fw_string("security_equiv_list", "Security Equivalent List", 128)
3474 SecurityFlag                            = bitfield8("security_flag", "Security Flag", [
3475         bf_boolean8(0x01, "checksuming", "Checksumming"),
3476         bf_boolean8(0x02, "signature", "Signature"),
3477         bf_boolean8(0x04, "complete_signatures", "Complete Signatures"),
3478         bf_boolean8(0x08, "encryption", "Encryption"),
3479         bf_boolean8(0x80, "large_internet_packets", "Large Internet Packets (LIP) Disabled"),
3480 ])
3481 SecurityRestrictionVersion              = uint8("security_restriction_version", "Security Restriction Version")
3482 SectorsPerBlock                         = uint8("sectors_per_block", "Sectors Per Block")
3483 SectorsPerCluster                       = uint16("sectors_per_cluster", "Sectors Per Cluster" )
3484 SectorsPerClusterLong                   = uint32("sectors_per_cluster_long", "Sectors Per Cluster" )
3485 SectorsPerTrack                         = uint8("sectors_per_track", "Sectors Per Track")
3486 SectorSize                              = uint32("sector_size", "Sector Size")
3487 SemaphoreHandle                         = uint32("semaphore_handle", "Semaphore Handle")
3488 SemaphoreName                           = nstring8("semaphore_name", "Semaphore Name")
3489 SemaphoreNameLen                        = uint8("semaphore_name_len", "Semaphore Name Len")
3490 SemaphoreOpenCount                      = uint8("semaphore_open_count", "Semaphore Open Count")
3491 SemaphoreShareCount                     = uint8("semaphore_share_count", "Semaphore Share Count")
3492 SemaphoreTimeOut                        = uint16("semaphore_time_out", "Semaphore Time Out")
3493 SemaphoreValue                          = uint16("semaphore_value", "Semaphore Value")
3494 SendStatus                              = val_string8("send_status", "Send Status", [
3495         [ 0x00, "Successful" ],
3496         [ 0x01, "Illegal Station Number" ],
3497         [ 0x02, "Client Not Logged In" ],
3498         [ 0x03, "Client Not Accepting Messages" ],
3499         [ 0x04, "Client Already has a Message" ],
3500         [ 0x96, "No Alloc Space for the Message" ],
3501         [ 0xfd, "Bad Station Number" ],
3502         [ 0xff, "Failure" ],
3503 ])
3504 SequenceByte                    = uint8("sequence_byte", "Sequence")
3505 SequenceNumber                  = uint32("sequence_number", "Sequence Number")
3506 SequenceNumber.Display("BASE_HEX")
3507 ServerAddress                   = bytes("server_address", "Server Address", 12)
3508 ServerAppNumber                 = uint16("server_app_num", "Server App Number")
3509 #ServerIDList                   = uint32("server_id_list", "Server ID List")
3510 ServerID                        = uint32("server_id_number", "Server ID", BE )
3511 ServerID.Display("BASE_HEX")
3512 ServerInfoFlags                 = val_string16("server_info_flags", "Server Information Flags", [
3513         [ 0x0000, "This server is not a member of a Cluster" ],
3514         [ 0x0001, "This server is a member of a Cluster" ],
3515 ])
3516 serverListFlags                 = uint32("server_list_flags", "Server List Flags")
3517 ServerName                      = fw_string("server_name", "Server Name", 48)
3518 serverName50                    = fw_string("server_name50", "Server Name", 50)
3519 ServerNameLen                   = nstring8("server_name_len", "Server Name")
3520 ServerNameStringz               = stringz("server_name_stringz", "Server Name")
3521 ServerNetworkAddress            = bytes("server_network_address", "Server Network Address", 10)
3522 ServerNode                      = bytes("server_node", "Server Node", 6)
3523 ServerSerialNumber              = uint32("server_serial_number", "Server Serial Number")
3524 ServerStation                   = uint8("server_station", "Server Station")
3525 ServerStationLong               = uint32("server_station_long", "Server Station")
3526 ServerStationList               = uint8("server_station_list", "Server Station List")
3527 ServerStatusRecord              = fw_string("server_status_record", "Server Status Record", 64)
3528 ServerTaskNumber                = uint8("server_task_number", "Server Task Number")
3529 ServerTaskNumberLong            = uint32("server_task_number_long", "Server Task Number")
3530 ServerType                      = uint16("server_type", "Server Type")
3531 ServerType.Display("BASE_HEX")
3532 ServerUtilization               = uint32("server_utilization", "Server Utilization")
3533 ServerUtilizationPercentage     = uint8("server_utilization_percentage", "Server Utilization Percentage")
3534 ServiceType                     = val_string16("Service_type", "Service Type", [
3535         [ 0x0000,       "Unknown" ],
3536         [ 0x0001,       "User" ],
3537         [ 0x0002,       "User group" ],
3538         [ 0x0003,       "Print queue" ],
3539         [ 0x0004,       "NetWare file server" ],
3540         [ 0x0005,       "Job server" ],
3541         [ 0x0006,       "Gateway" ],
3542         [ 0x0007,       "Print server" ],
3543         [ 0x0008,       "Archive queue" ],
3544         [ 0x0009,       "Archive server" ],
3545         [ 0x000a,       "Job queue" ],
3546         [ 0x000b,       "Administration" ],
3547         [ 0x0021,       "NAS SNA gateway" ],
3548         [ 0x0026,       "Remote bridge server" ],
3549         [ 0x0027,       "TCP/IP gateway" ],
3550 ])
3551 SetCmdCategory                  = val_string8("set_cmd_category", "Set Command Category", [
3552         [ 0x00, "Communications" ],
3553         [ 0x01, "Memory" ],
3554         [ 0x02, "File Cache" ],
3555         [ 0x03, "Directory Cache" ],
3556         [ 0x04, "File System" ],
3557         [ 0x05, "Locks" ],
3558         [ 0x06, "Transaction Tracking" ],
3559         [ 0x07, "Disk" ],
3560         [ 0x08, "Time" ],
3561         [ 0x09, "NCP" ],
3562         [ 0x0a, "Miscellaneous" ],
3563         [ 0x0b, "Error Handling" ],
3564         [ 0x0c, "Directory Services" ],
3565         [ 0x0d, "MultiProcessor" ],
3566         [ 0x0e, "Service Location Protocol" ],
3567         [ 0x0f, "Licensing Services" ],
3568 ])
3569 SetCmdFlags                             = bitfield8("set_cmd_flags", "Set Command Flags", [
3570         bf_boolean8(0x01, "cmd_flags_startup_only", "Startup.ncf Only"),
3571         bf_boolean8(0x02, "cmd_flags_hidden", "Hidden"),
3572         bf_boolean8(0x04, "cmd_flags_advanced", "Advanced"),
3573         bf_boolean8(0x08, "cmd_flags_later", "Restart Server Required to Take Effect"),
3574         bf_boolean8(0x80, "cmd_flags_secure", "Console Secured"),
3575 ])
3576 SetCmdName                      = stringz("set_cmd_name", "Set Command Name")
3577 SetCmdType                      = val_string8("set_cmd_type", "Set Command Type", [
3578         [ 0x00, "Numeric Value" ],
3579         [ 0x01, "Boolean Value" ],
3580         [ 0x02, "Ticks Value" ],
3581         [ 0x04, "Time Value" ],
3582         [ 0x05, "String Value" ],
3583         [ 0x06, "Trigger Value" ],
3584         [ 0x07, "Numeric Value" ],
3585 ])
3586 SetCmdValueNum                  = uint32("set_cmd_value_num", "Set Command Value")
3587 SetCmdValueString               = stringz("set_cmd_value_string", "Set Command Value")
3588 SetParmName                     = stringz("set_parm_name", "Set Parameter Name")
3589 SFTErrorTable                   = bytes("sft_error_table", "SFT Error Table", 60)
3590 SFTSupportLevel                 = val_string8("sft_support_level", "SFT Support Level", [
3591         [ 0x01, "Server Offers Hot Disk Error Fixing" ],
3592         [ 0x02, "Server Offers Disk Mirroring and Transaction Tracking" ],
3593         [ 0x03, "Server Offers Physical Server Mirroring" ],
3594 ])
3595 ShareableLockCount              = uint16("shareable_lock_count", "Shareable Lock Count")
3596 SharedMemoryAddresses           = bytes("shared_memory_addresses", "Shared Memory Addresses", 10)
3597 ShortName                       = fw_string("short_name", "Short Name", 12)
3598 ShortStkName                    = fw_string("short_stack_name", "Short Stack Name", 16)
3599 SiblingCount                    = uint32("sibling_count", "Sibling Count")
3600 SixtyFourBitOffsetsSupportedFlag = val_string8("64_bit_flag", "64 Bit Support", [
3601     [ 0x00, "No support for 64 bit offsets" ],
3602     [ 0x01, "64 bit offsets supported" ],
3603 ])
3604 SMIDs                           = uint32("smids", "Storage Media ID's")
3605 SoftwareDescription             = fw_string("software_description", "Software Description", 65)
3606 SoftwareDriverType              = uint8("software_driver_type", "Software Driver Type")
3607 SoftwareMajorVersionNumber      = uint8("software_major_version_number", "Software Major Version Number")
3608 SoftwareMinorVersionNumber      = uint8("software_minor_version_number", "Software Minor Version Number")
3609 SourceDirHandle                 = uint8("source_dir_handle", "Source Directory Handle")
3610 sourceOriginateTime             = bytes("source_originate_time", "Source Originate Time", 8)
3611 sourceOriginateTime.Display("BASE_HEX")
3612 SourcePath                      = nstring8("source_path", "Source Path")
3613 SourcePathComponentCount        = uint8("source_component_count", "Source Path Component Count")
3614 sourceReturnTime                = bytes("source_return_time", "Source Return Time", 8)
3615 sourceReturnTime.Display("BASE_HEX")
3616 SpaceUsed                       = uint32("space_used", "Space Used")
3617 SpaceMigrated                   = uint32("space_migrated", "Space Migrated")
3618 SrcNameSpace                    = val_string8("src_name_space", "Source Name Space", [
3619         [ 0x00, "DOS Name Space" ],
3620         [ 0x01, "MAC Name Space" ],
3621         [ 0x02, "NFS Name Space" ],
3622         [ 0x04, "Long Name Space" ],
3623 ])
3624 SupModID                        = uint32("sup_mod_id", "Sup Mod ID")
3625 StackCount                      = uint32("stack_count", "Stack Count")
3626 StackFullNameStr                = nstring8("stack_full_name_str", "Stack Full Name")
3627 StackMajorVN                    = uint8("stack_major_vn", "Stack Major Version Number")
3628 StackMinorVN                    = uint8("stack_minor_vn", "Stack Minor Version Number")
3629 StackNumber                     = uint32("stack_number", "Stack Number")
3630 StartConnNumber                 = uint32("start_conn_num", "Starting Connection Number")
3631 StartingBlock                   = uint16("starting_block", "Starting Block")
3632 StartingNumber                  = uint32("starting_number", "Starting Number")
3633 StartingSearchNumber            = uint16("start_search_number", "Start Search Number")
3634 StartNumber                     = uint32("start_number", "Start Number")
3635 startNumberFlag                 = uint16("start_number_flag", "Start Number Flag")
3636 StartOffset64bit    = bytes("s_offset_64bit", "64bit Starting Offset", 64)
3637 StartVolumeNumber               = uint32("start_volume_number", "Starting Volume Number")
3638 StationList                     = uint32("station_list", "Station List")
3639 StationNumber                   = bytes("station_number", "Station Number", 3)
3640 StatMajorVersion                = uint8("stat_major_version", "Statistics Table Major Version")
3641 StatMinorVersion                = uint8("stat_minor_version", "Statistics Table Minor Version")
3642 Status                          = bitfield16("status", "Status", [
3643         bf_boolean16(0x0001, "user_info_logged_in", "Logged In"),
3644         bf_boolean16(0x0002, "user_info_being_abort", "Being Aborted"),
3645         bf_boolean16(0x0004, "user_info_audited", "Audited"),
3646         bf_boolean16(0x0008, "user_info_need_sec", "Needs Security Change"),
3647         bf_boolean16(0x0010, "user_info_mac_station", "MAC Station"),
3648         bf_boolean16(0x0020, "user_info_temp_authen", "Temporary Authenticated"),
3649         bf_boolean16(0x0040, "user_info_audit_conn", "Audit Connection Recorded"),
3650         bf_boolean16(0x0080, "user_info_dsaudit_conn", "DS Audit Connection Recorded"),
3651         bf_boolean16(0x0100, "user_info_logout", "Logout in Progress"),
3652         bf_boolean16(0x0200, "user_info_int_login", "Internal Login"),
3653         bf_boolean16(0x0400, "user_info_bindery", "Bindery Connection"),
3654 ])
3655 StatusFlagBits                  = bitfield32("status_flag_bits", "Status Flag", [
3656         bf_boolean32(0x00000001, "status_flag_bits_suballoc", "Sub Allocation"),
3657         bf_boolean32(0x00000002, "status_flag_bits_comp", "Compression"),
3658         bf_boolean32(0x00000004, "status_flag_bits_migrate", "Migration"),
3659         bf_boolean32(0x00000008, "status_flag_bits_audit", "Audit"),
3660         bf_boolean32(0x00000010, "status_flag_bits_ro", "Read Only"),
3661         bf_boolean32(0x00000020, "status_flag_bits_im_purge", "Immediate Purge"),
3662         bf_boolean32(0x80000000, "status_flag_bits_nss", "NSS Volume"),
3663 ])
3664 SubAllocClusters                = uint32("sub_alloc_clusters", "Sub Alloc Clusters")
3665 SubAllocFreeableClusters        = uint32("sub_alloc_freeable_clusters", "Sub Alloc Freeable Clusters")
3666 Subdirectory                    = uint32("sub_directory", "Subdirectory")
3667 Subdirectory.Display("BASE_HEX")
3668 SuggestedFileSize               = uint32("suggested_file_size", "Suggested File Size")
3669 SupportModuleID                 = uint32("support_module_id", "Support Module ID")
3670 SynchName                       = nstring8("synch_name", "Synch Name")
3671 SystemIntervalMarker            = uint32("system_interval_marker", "System Interval Marker")
3672
3673 TabSize                         = uint8( "tab_size", "Tab Size" )
3674 TargetClientList                = uint8("target_client_list", "Target Client List")
3675 TargetConnectionNumber          = uint16("target_connection_number", "Target Connection Number")
3676 TargetDirectoryBase             = uint32("target_directory_base", "Target Directory Base")
3677 TargetDirHandle                 = uint8("target_dir_handle", "Target Directory Handle")
3678 TargetEntryID                   = uint32("target_entry_id", "Target Entry ID")
3679 TargetEntryID.Display("BASE_HEX")
3680 TargetExecutionTime             = bytes("target_execution_time", "Target Execution Time", 6)
3681 TargetFileHandle                = bytes("target_file_handle", "Target File Handle", 6)
3682 TargetFileOffset                = uint32("target_file_offset", "Target File Offset")
3683 TargetMessage                   = nstring8("target_message", "Message")
3684 TargetPrinter                   = uint8( "target_ptr", "Target Printer" )
3685 targetReceiveTime               = bytes("target_receive_time", "Target Receive Time", 8)
3686 targetReceiveTime.Display("BASE_HEX")
3687 TargetServerIDNumber            = uint32("target_server_id_number", "Target Server ID Number", BE )
3688 TargetServerIDNumber.Display("BASE_HEX")
3689 targetTransmitTime              = bytes("target_transmit_time", "Target Transmit Time", 8)
3690 targetTransmitTime.Display("BASE_HEX")
3691 TaskNumByte                     = uint8("task_num_byte", "Task Number")
3692 TaskNumber                      = uint32("task_number", "Task Number")
3693 TaskNumberWord                  = uint16("task_number_word", "Task Number")
3694 TextJobDescription              = fw_string("text_job_description", "Text Job Description", 50)
3695 ThrashingCount                  = uint16("thrashing_count", "Thrashing Count")
3696 TimeoutLimit                    = uint16("timeout_limit", "Timeout Limit")
3697 TimesyncStatus                  = bitfield32("timesync_status_flags", "Timesync Status", [
3698         bf_boolean32(0x00000001, "timesync_status_sync", "Time is Synchronized"),
3699         bf_boolean32(0x00000002, "timesync_status_net_sync", "Time is Synchronized to the Network"),
3700         bf_boolean32(0x00000004, "timesync_status_active", "Time Synchronization is Active"),
3701         bf_boolean32(0x00000008, "timesync_status_external", "External Time Synchronization Active"),
3702         bf_val_str32(0x00000700, "timesync_status_server_type", "Time Server Type", [
3703                 [ 0x01, "Client Time Server" ],
3704                 [ 0x02, "Secondary Time Server" ],
3705                 [ 0x03, "Primary Time Server" ],
3706                 [ 0x04, "Reference Time Server" ],
3707                 [ 0x05, "Single Reference Time Server" ],
3708         ]),
3709         bf_boolean32(0x000f0000, "timesync_status_ext_sync", "External Clock Status"),
3710 ])
3711 TimeToNet                       = uint16("time_to_net", "Time To Net")
3712 TotalBlocks                     = uint32("total_blocks", "Total Blocks")
3713 TotalBlocksToDecompress         = uint32("total_blks_to_dcompress", "Total Blocks To Decompress")
3714 TotalBytesRead                  = bytes("user_info_ttl_bytes_rd", "Total Bytes Read", 6)
3715 TotalBytesWritten               = bytes("user_info_ttl_bytes_wrt", "Total Bytes Written", 6)
3716 TotalCacheWrites                = uint32("total_cache_writes", "Total Cache Writes")
3717 TotalChangedFATs                = uint32("total_changed_fats", "Total Changed FAT Entries")
3718 TotalCommonCnts                 = uint32("total_common_cnts", "Total Common Counts")
3719 TotalCntBlocks                  = uint32("total_cnt_blocks", "Total Count Blocks")
3720 TotalDataStreamDiskSpaceAlloc   = uint32("total_stream_size_struct_space_alloc", "Total Data Stream Disk Space Alloc")
3721 TotalDirectorySlots             = uint16("total_directory_slots", "Total Directory Slots")
3722 TotalDirectoryEntries           = uint32("total_dir_entries", "Total Directory Entries")
3723 TotalDynamicSpace               = uint32("total_dynamic_space", "Total Dynamic Space")
3724 TotalExtendedDirectoryExtants   = uint32("total_extended_directory_extants", "Total Extended Directory Extants")
3725 TotalFileServicePackets         = uint32("total_file_service_packets", "Total File Service Packets")
3726 TotalFilesOpened                = uint32("total_files_opened", "Total Files Opened")
3727 TotalLFSCounters                = uint32("total_lfs_counters", "Total LFS Counters")
3728 TotalOffspring                  = uint16("total_offspring", "Total Offspring")
3729 TotalOtherPackets               = uint32("total_other_packets", "Total Other Packets")
3730 TotalQueueJobs                  = uint32("total_queue_jobs", "Total Queue Jobs")
3731 TotalReadRequests               = uint32("total_read_requests", "Total Read Requests")
3732 TotalRequest                    = uint32("total_request", "Total Requests")
3733 TotalRequestPackets             = uint32("total_request_packets", "Total Request Packets")
3734 TotalRoutedPackets              = uint32("total_routed_packets", "Total Routed Packets")
3735 TotalRxPkts                     = uint32("total_rx_pkts", "Total Receive Packets")
3736 TotalServerMemory               = uint16("total_server_memory", "Total Server Memory", BE)
3737 TotalTransactionsBackedOut      = uint32("total_trans_backed_out", "Total Transactions Backed Out")
3738 TotalTransactionsPerformed      = uint32("total_trans_performed", "Total Transactions Performed")
3739 TotalTxPkts                     = uint32("total_tx_pkts", "Total Transmit Packets")
3740 TotalUnfilledBackoutRequests    = uint16("total_unfilled_backout_requests", "Total Unfilled Backout Requests")
3741 TotalVolumeClusters             = uint16("total_volume_clusters", "Total Volume Clusters")
3742 TotalWriteRequests              = uint32("total_write_requests", "Total Write Requests")
3743 TotalWriteTransactionsPerformed = uint32("total_write_trans_performed", "Total Write Transactions Performed")
3744 TrackOnFlag                     = boolean8("track_on_flag", "Track On Flag")
3745 TransactionDiskSpace            = uint16("transaction_disk_space", "Transaction Disk Space")
3746 TransactionFATAllocations       = uint32("transaction_fat_allocations", "Transaction FAT Allocations")
3747 TransactionFileSizeChanges      = uint32("transaction_file_size_changes", "Transaction File Size Changes")
3748 TransactionFilesTruncated       = uint32("transaction_files_truncated", "Transaction Files Truncated")
3749 TransactionNumber               = uint32("transaction_number", "Transaction Number")
3750 TransactionTrackingEnabled      = uint8("transaction_tracking_enabled", "Transaction Tracking Enabled")
3751 TransactionTrackingFlag         = uint16("tts_flag", "Transaction Tracking Flag")
3752 TransactionTrackingSupported    = uint8("transaction_tracking_supported", "Transaction Tracking Supported")
3753 TransactionVolumeNumber         = uint16("transaction_volume_number", "Transaction Volume Number")
3754 TransportType                   = val_string8("transport_type", "Communications Type", [
3755         [ 0x01, "Internet Packet Exchange (IPX)" ],
3756         [ 0x05, "User Datagram Protocol (UDP)" ],
3757         [ 0x06, "Transmission Control Protocol (TCP)" ],
3758 ])
3759 TreeLength                      = uint32("tree_length", "Tree Length")
3760 TreeName                        = nstring32("tree_name", "Tree Name")
3761 TreeName.NWUnicode()
3762 TrusteeRights                   = bitfield16("trustee_rights_low", "Trustee Rights", [
3763         bf_boolean16(0x0001, "trustee_rights_read", "Read"),
3764         bf_boolean16(0x0002, "trustee_rights_write", "Write"),
3765         bf_boolean16(0x0004, "trustee_rights_open", "Open"),
3766         bf_boolean16(0x0008, "trustee_rights_create", "Create"),
3767         bf_boolean16(0x0010, "trustee_rights_del", "Delete"),
3768         bf_boolean16(0x0020, "trustee_rights_parent", "Parental"),
3769         bf_boolean16(0x0040, "trustee_rights_search", "Search"),
3770         bf_boolean16(0x0080, "trustee_rights_modify", "Modify"),
3771         bf_boolean16(0x0100, "trustee_rights_super", "Supervisor"),
3772 ])
3773 TTSLevel                        = uint8("tts_level", "TTS Level")
3774 TrusteeSetNumber                = uint8("trustee_set_number", "Trustee Set Number")
3775 TrusteeID                       = uint32("trustee_id_set", "Trustee ID")
3776 TrusteeID.Display("BASE_HEX")
3777 ttlCompBlks                     = uint32("ttl_comp_blks", "Total Compression Blocks")
3778 TtlDSDskSpaceAlloc              = uint32("ttl_ds_disk_space_alloc", "Total Streams Space Allocated")
3779 TtlEAs                          = uint32("ttl_eas", "Total EA's")
3780 TtlEAsDataSize                  = uint32("ttl_eas_data_size", "Total EA's Data Size")
3781 TtlEAsKeySize                   = uint32("ttl_eas_key_size", "Total EA's Key Size")
3782 ttlIntermediateBlks             = uint32("ttl_inter_blks", "Total Intermediate Blocks")
3783 TtlMigratedSize                 = uint32("ttl_migrated_size", "Total Migrated Size")
3784 TtlNumOfRTags                   = uint32("ttl_num_of_r_tags", "Total Number of Resource Tags")
3785 TtlNumOfSetCmds                 = uint32("ttl_num_of_set_cmds", "Total Number of Set Commands")
3786 TtlValuesLength                 = uint32("ttl_values_length", "Total Values Length")
3787 TtlWriteDataSize                = uint32("ttl_write_data_size", "Total Write Data Size")
3788 TurboUsedForFileService         = uint16("turbo_used_for_file_service", "Turbo Used For File Service")
3789
3790 UnclaimedPkts                   = uint32("un_claimed_packets", "Unclaimed Packets")
3791 UnCompressableDataStreamsCount  = uint32("un_compressable_data_streams_count", "Uncompressable Data Streams Count")
3792 Undefined8                      = bytes("undefined_8", "Undefined", 8)
3793 Undefined28                     = bytes("undefined_28", "Undefined", 28)
3794 UndefinedWord                   = uint16("undefined_word", "Undefined")
3795 UniqueID                        = uint8("unique_id", "Unique ID")
3796 UnknownByte                     = uint8("unknown_byte", "Unknown Byte")
3797 Unused                          = uint8("un_used", "Unused")
3798 UnusedBlocks                    = uint32("unused_blocks", "Unused Blocks")
3799 UnUsedDirectoryEntries          = uint32("un_used_directory_entries", "Unused Directory Entries")
3800 UnusedDiskBlocks                = uint32("unused_disk_blocks", "Unused Disk Blocks")
3801 UnUsedExtendedDirectoryExtants  = uint32("un_used_extended_directory_extants", "Unused Extended Directory Extants")
3802 UpdateDate                      = uint16("update_date", "Update Date")
3803 UpdateDate.NWDate()
3804 UpdateID                        = uint32("update_id", "Update ID", BE)
3805 UpdateID.Display("BASE_HEX")
3806 UpdateTime                      = uint16("update_time", "Update Time")
3807 UpdateTime.NWTime()
3808 UseCount                        = val_string16("user_info_use_count", "Use Count", [
3809         [ 0x0000, "Connection is not in use" ],
3810         [ 0x0001, "Connection is in use" ],
3811 ])
3812 UsedBlocks                      = uint32("used_blocks", "Used Blocks")
3813 UserID                          = uint32("user_id", "User ID", BE)
3814 UserID.Display("BASE_HEX")
3815 UserLoginAllowed                = val_string8("user_login_allowed", "Login Status", [
3816         [ 0x00, "Client Login Disabled" ],
3817         [ 0x01, "Client Login Enabled" ],
3818 ])
3819
3820 UserName                        = nstring8("user_name", "User Name")
3821 UserName16                      = fw_string("user_name_16", "User Name", 16)
3822 UserName48                      = fw_string("user_name_48", "User Name", 48)
3823 UserType                        = uint16("user_type", "User Type")
3824 UTCTimeInSeconds                = uint32("uts_time_in_seconds", "UTC Time in Seconds")
3825
3826 ValueAvailable                  = val_string8("value_available", "Value Available", [
3827         [ 0x00, "Has No Value" ],
3828         [ 0xff, "Has Value" ],
3829 ])
3830 VAPVersion                      = uint8("vap_version", "VAP Version")
3831 VariableBitMask                 = uint32("variable_bit_mask", "Variable Bit Mask")
3832 VariableBitsDefined             = uint16("variable_bits_defined", "Variable Bits Defined")
3833 VConsoleRevision                = uint8("vconsole_rev", "Console Revision")
3834 VConsoleVersion                 = uint8("vconsole_ver", "Console Version")
3835 Verb                            = uint32("verb", "Verb")
3836 VerbData                        = uint8("verb_data", "Verb Data")
3837 version                         = uint32("version", "Version")
3838 VersionNumber                   = uint8("version_number", "Version")
3839 VertLocation                    = uint16("vert_location", "Vertical Location")
3840 VirtualConsoleVersion           = uint8("virtual_console_version", "Virtual Console Version")
3841 VolumeID                        = uint32("volume_id", "Volume ID")
3842 VolumeID.Display("BASE_HEX")
3843 VolInfoReplyLen                 = uint16("vol_info_reply_len", "Volume Information Reply Length")
3844 VolumeCachedFlag                = val_string8("volume_cached_flag", "Volume Cached Flag", [
3845         [ 0x00, "Volume is Not Cached" ],
3846         [ 0xff, "Volume is Cached" ],
3847 ])
3848 VolumeDataStreams               = uint8("volume_data_streams", "Volume Data Streams")
3849 VolumeHashedFlag                = val_string8("volume_hashed_flag", "Volume Hashed Flag", [
3850         [ 0x00, "Volume is Not Hashed" ],
3851         [ 0xff, "Volume is Hashed" ],
3852 ])
3853 VolumeLastModifiedDate          = uint16("volume_last_modified_date", "Volume Last Modified Date")
3854 VolumeLastModifiedDate.NWDate()
3855 VolumeLastModifiedTime          = uint16("volume_last_modified_time", "Volume Last Modified Time")
3856 VolumeLastModifiedTime.NWTime()
3857 VolumeMountedFlag               = val_string8("volume_mounted_flag", "Volume Mounted Flag", [
3858         [ 0x00, "Volume is Not Mounted" ],
3859         [ 0xff, "Volume is Mounted" ],
3860 ])
3861 VolumeName                      = fw_string("volume_name", "Volume Name", 16)
3862 VolumeNameLen                   = nstring8("volume_name_len", "Volume Name")
3863 VolumeNameSpaces                = uint8("volume_name_spaces", "Volume Name Spaces")
3864 VolumeNameStringz               = stringz("volume_name_stringz", "Volume Name")
3865 VolumeNumber                    = uint8("volume_number", "Volume Number")
3866 VolumeNumberLong                = uint32("volume_number_long", "Volume Number")
3867 VolumeRemovableFlag             = val_string8("volume_removable_flag", "Volume Removable Flag", [
3868         [ 0x00, "Disk Cannot be Removed from Server" ],
3869         [ 0xff, "Disk Can be Removed from Server" ],
3870 ])
3871 VolumeRequestFlags              = val_string16("volume_request_flags", "Volume Request Flags", [
3872         [ 0x0000, "Return name with volume number" ],
3873         [ 0x0001, "Do not return name with volume number" ],
3874 ])
3875 VolumeSizeInClusters            = uint32("volume_size_in_clusters", "Volume Size in Clusters")
3876 VolumesSupportedMax             = uint16("volumes_supported_max", "Volumes Supported Max")
3877 VolumeType                      = val_string16("volume_type", "Volume Type", [
3878         [ 0x0000, "NetWare 386" ],
3879         [ 0x0001, "NetWare 286" ],
3880         [ 0x0002, "NetWare 386 Version 30" ],
3881         [ 0x0003, "NetWare 386 Version 31" ],
3882 ])
3883 WastedServerMemory              = uint16("wasted_server_memory", "Wasted Server Memory", BE)
3884 WaitTime                        = uint32("wait_time", "Wait Time")
3885
3886 Year                            = val_string8("year", "Year",[
3887         [ 0x50, "1980" ],
3888         [ 0x51, "1981" ],
3889         [ 0x52, "1982" ],
3890         [ 0x53, "1983" ],
3891         [ 0x54, "1984" ],
3892         [ 0x55, "1985" ],
3893         [ 0x56, "1986" ],
3894         [ 0x57, "1987" ],
3895         [ 0x58, "1988" ],
3896         [ 0x59, "1989" ],
3897         [ 0x5a, "1990" ],
3898         [ 0x5b, "1991" ],
3899         [ 0x5c, "1992" ],
3900         [ 0x5d, "1993" ],
3901         [ 0x5e, "1994" ],
3902         [ 0x5f, "1995" ],
3903         [ 0x60, "1996" ],
3904         [ 0x61, "1997" ],
3905         [ 0x62, "1998" ],
3906         [ 0x63, "1999" ],
3907         [ 0x64, "2000" ],
3908         [ 0x65, "2001" ],
3909         [ 0x66, "2002" ],
3910         [ 0x67, "2003" ],
3911         [ 0x68, "2004" ],
3912         [ 0x69, "2005" ],
3913         [ 0x6a, "2006" ],
3914         [ 0x6b, "2007" ],
3915         [ 0x6c, "2008" ],
3916         [ 0x6d, "2009" ],
3917         [ 0x6e, "2010" ],
3918         [ 0x6f, "2011" ],
3919         [ 0x70, "2012" ],
3920         [ 0x71, "2013" ],
3921         [ 0x72, "2014" ],
3922         [ 0x73, "2015" ],
3923         [ 0x74, "2016" ],
3924         [ 0x75, "2017" ],
3925         [ 0x76, "2018" ],
3926         [ 0x77, "2019" ],
3927         [ 0x78, "2020" ],
3928         [ 0x79, "2021" ],
3929         [ 0x7a, "2022" ],
3930         [ 0x7b, "2023" ],
3931         [ 0x7c, "2024" ],
3932         [ 0x7d, "2025" ],
3933         [ 0x7e, "2026" ],
3934         [ 0x7f, "2027" ],
3935         [ 0xc0, "1984" ],
3936         [ 0xc1, "1985" ],
3937         [ 0xc2, "1986" ],
3938         [ 0xc3, "1987" ],
3939         [ 0xc4, "1988" ],
3940         [ 0xc5, "1989" ],
3941         [ 0xc6, "1990" ],
3942         [ 0xc7, "1991" ],
3943         [ 0xc8, "1992" ],
3944         [ 0xc9, "1993" ],
3945         [ 0xca, "1994" ],
3946         [ 0xcb, "1995" ],
3947         [ 0xcc, "1996" ],
3948         [ 0xcd, "1997" ],
3949         [ 0xce, "1998" ],
3950         [ 0xcf, "1999" ],
3951         [ 0xd0, "2000" ],
3952         [ 0xd1, "2001" ],
3953         [ 0xd2, "2002" ],
3954         [ 0xd3, "2003" ],
3955         [ 0xd4, "2004" ],
3956         [ 0xd5, "2005" ],
3957         [ 0xd6, "2006" ],
3958         [ 0xd7, "2007" ],
3959         [ 0xd8, "2008" ],
3960         [ 0xd9, "2009" ],
3961         [ 0xda, "2010" ],
3962         [ 0xdb, "2011" ],
3963         [ 0xdc, "2012" ],
3964         [ 0xdd, "2013" ],
3965         [ 0xde, "2014" ],
3966         [ 0xdf, "2015" ],
3967 ])
3968 ##############################################################################
3969 # Structs
3970 ##############################################################################
3971
3972
3973 acctngInfo                      = struct("acctng_info_struct", [
3974         HoldTime,
3975         HoldAmount,
3976         ChargeAmount,
3977         HeldConnectTimeInMinutes,
3978         HeldRequests,
3979         HeldBytesRead,
3980         HeldBytesWritten,
3981 ],"Accounting Information")
3982 AFP10Struct                       = struct("afp_10_struct", [
3983         AFPEntryID,
3984         ParentID,
3985         AttributesDef16,
3986         DataForkLen,
3987         ResourceForkLen,
3988         TotalOffspring,
3989         CreationDate,
3990         LastAccessedDate,
3991         ModifiedDate,
3992         ModifiedTime,
3993         ArchivedDate,
3994         ArchivedTime,
3995         CreatorID,
3996         Reserved4,
3997         FinderAttr,
3998         HorizLocation,
3999         VertLocation,
4000         FileDirWindow,
4001         Reserved16,
4002         LongName,
4003         CreatorID,
4004         ShortName,
4005         AccessPrivileges,
4006 ], "AFP Information" )
4007 AFP20Struct                       = struct("afp_20_struct", [
4008         AFPEntryID,
4009         ParentID,
4010         AttributesDef16,
4011         DataForkLen,
4012         ResourceForkLen,
4013         TotalOffspring,
4014         CreationDate,
4015         LastAccessedDate,
4016         ModifiedDate,
4017         ModifiedTime,
4018         ArchivedDate,
4019         ArchivedTime,
4020         CreatorID,
4021         Reserved4,
4022         FinderAttr,
4023         HorizLocation,
4024         VertLocation,
4025         FileDirWindow,
4026         Reserved16,
4027         LongName,
4028         CreatorID,
4029         ShortName,
4030         AccessPrivileges,
4031         Reserved,
4032         ProDOSInfo,
4033 ], "AFP Information" )
4034 ArchiveDateStruct               = struct("archive_date_struct", [
4035         ArchivedDate,
4036 ])
4037 ArchiveIdStruct                 = struct("archive_id_struct", [
4038         ArchiverID,
4039 ])
4040 ArchiveInfoStruct               = struct("archive_info_struct", [
4041         ArchivedTime,
4042         ArchivedDate,
4043         ArchiverID,
4044 ], "Archive Information")
4045 ArchiveTimeStruct               = struct("archive_time_struct", [
4046         ArchivedTime,
4047 ])
4048 AttributesStruct                = struct("attributes_struct", [
4049         AttributesDef32,
4050         FlagsDef,
4051 ], "Attributes")
4052 authInfo                        = struct("auth_info_struct", [
4053         Status,
4054         Reserved2,
4055         Privileges,
4056 ])
4057 BoardNameStruct                 = struct("board_name_struct", [
4058         DriverBoardName,
4059         DriverShortName,
4060         DriverLogicalName,
4061 ], "Board Name")
4062 CacheInfo                       = struct("cache_info", [
4063         uint32("max_byte_cnt", "Maximum Byte Count"),
4064         uint32("min_num_of_cache_buff", "Minimum Number Of Cache Buffers"),
4065         uint32("min_cache_report_thresh", "Minimum Cache Report Threshold"),
4066         uint32("alloc_waiting", "Allocate Waiting Count"),
4067         uint32("ndirty_blocks", "Number of Dirty Blocks"),
4068         uint32("cache_dirty_wait_time", "Cache Dirty Wait Time"),
4069         uint32("cache_max_concur_writes", "Cache Maximum Concurrent Writes"),
4070         uint32("max_dirty_time", "Maximum Dirty Time"),
4071         uint32("num_dir_cache_buff", "Number Of Directory Cache Buffers"),
4072         uint32("cache_byte_to_block", "Cache Byte To Block Shift Factor"),
4073 ], "Cache Information")
4074 CommonLanStruc                  = struct("common_lan_struct", [
4075         boolean8("not_supported_mask", "Bit Counter Supported"),
4076         Reserved3,
4077         uint32("total_tx_packet_count", "Total Transmit Packet Count"),
4078         uint32("total_rx_packet_count", "Total Receive Packet Count"),
4079         uint32("no_ecb_available_count", "No ECB Available Count"),
4080         uint32("packet_tx_too_big_count", "Transmit Packet Too Big Count"),
4081         uint32("packet_tx_too_small_count", "Transmit Packet Too Small Count"),
4082         uint32("packet_rx_overflow_count", "Receive Packet Overflow Count"),
4083         uint32("packet_rx_too_big_count", "Receive Packet Too Big Count"),
4084         uint32("packet_rs_too_small_count", "Receive Packet Too Small Count"),
4085         uint32("packet_tx_misc_error_count", "Transmit Packet Misc Error Count"),
4086         uint32("packet_rx_misc_error_count", "Receive Packet Misc Error Count"),
4087         uint32("retry_tx_count", "Transmit Retry Count"),
4088         uint32("checksum_error_count", "Checksum Error Count"),
4089         uint32("hardware_rx_mismatch_count", "Hardware Receive Mismatch Count"),
4090 ], "Common LAN Information")
4091 CompDeCompStat                  = struct("comp_d_comp_stat", [
4092         uint32("cmphitickhigh", "Compress High Tick"),
4093         uint32("cmphitickcnt", "Compress High Tick Count"),
4094         uint32("cmpbyteincount", "Compress Byte In Count"),
4095         uint32("cmpbyteoutcnt", "Compress Byte Out Count"),
4096         uint32("cmphibyteincnt", "Compress High Byte In Count"),
4097         uint32("cmphibyteoutcnt", "Compress High Byte Out Count"),
4098         uint32("decphitickhigh", "DeCompress High Tick"),
4099         uint32("decphitickcnt", "DeCompress High Tick Count"),
4100         uint32("decpbyteincount", "DeCompress Byte In Count"),
4101         uint32("decpbyteoutcnt", "DeCompress Byte Out Count"),
4102         uint32("decphibyteincnt", "DeCompress High Byte In Count"),
4103         uint32("decphibyteoutcnt", "DeCompress High Byte Out Count"),
4104 ], "Compression/Decompression Information")
4105 ConnFileStruct                  = struct("conn_file_struct", [
4106         ConnectionNumberWord,
4107         TaskNumByte,
4108         LockType,
4109         AccessControl,
4110         LockFlag,
4111 ], "File Connection Information")
4112 ConnStruct                      = struct("conn_struct", [
4113         TaskNumByte,
4114         LockType,
4115         AccessControl,
4116         LockFlag,
4117         VolumeNumber,
4118         DirectoryEntryNumberWord,
4119         FileName14,
4120 ], "Connection Information")
4121 ConnTaskStruct                  = struct("conn_task_struct", [
4122         ConnectionNumberByte,
4123         TaskNumByte,
4124 ], "Task Information")
4125 Counters                        = struct("counters_struct", [
4126         uint32("read_exist_blck", "Read Existing Block Count"),
4127         uint32("read_exist_write_wait", "Read Existing Write Wait Count"),
4128         uint32("read_exist_part_read", "Read Existing Partial Read Count"),
4129         uint32("read_exist_read_err", "Read Existing Read Error Count"),
4130         uint32("wrt_blck_cnt", "Write Block Count"),
4131         uint32("wrt_entire_blck", "Write Entire Block Count"),
4132         uint32("internl_dsk_get", "Internal Disk Get Count"),
4133         uint32("internl_dsk_get_need_to_alloc", "Internal Disk Get Need To Allocate Count"),
4134         uint32("internl_dsk_get_someone_beat", "Internal Disk Get Someone Beat My Count"),
4135         uint32("internl_dsk_get_part_read", "Internal Disk Get Partial Read Count"),
4136         uint32("internl_dsk_get_read_err", "Internal Disk Get Read Error Count"),
4137         uint32("async_internl_dsk_get", "Async Internal Disk Get Count"),
4138         uint32("async_internl_dsk_get_need_to_alloc", "Async Internal Disk Get Need To Alloc"),
4139         uint32("async_internl_dsk_get_someone_beat", "Async Internal Disk Get Someone Beat Me"),
4140         uint32("err_doing_async_read", "Error Doing Async Read Count"),
4141         uint32("internl_dsk_get_no_read", "Internal Disk Get No Read Count"),
4142         uint32("internl_dsk_get_no_read_alloc", "Internal Disk Get No Read Allocate Count"),
4143         uint32("internl_dsk_get_no_read_someone_beat", "Internal Disk Get No Read Someone Beat Me Count"),
4144         uint32("internl_dsk_write", "Internal Disk Write Count"),
4145         uint32("internl_dsk_write_alloc", "Internal Disk Write Allocate Count"),
4146         uint32("internl_dsk_write_someone_beat", "Internal Disk Write Someone Beat Me Count"),
4147         uint32("write_err", "Write Error Count"),
4148         uint32("wait_on_sema", "Wait On Semaphore Count"),
4149         uint32("alloc_blck_i_had_to_wait_for", "Allocate Block I Had To Wait For Someone Count"),
4150         uint32("alloc_blck", "Allocate Block Count"),
4151         uint32("alloc_blck_i_had_to_wait", "Allocate Block I Had To Wait Count"),
4152 ], "Disk Counter Information")
4153 CPUInformation                  = struct("cpu_information", [
4154         PageTableOwnerFlag,
4155         CPUType,
4156         Reserved3,
4157         CoprocessorFlag,
4158         BusType,
4159         Reserved3,
4160         IOEngineFlag,
4161         Reserved3,
4162         FSEngineFlag,
4163         Reserved3,
4164         NonDedFlag,
4165         Reserved3,
4166         CPUString,
4167         CoProcessorString,
4168         BusString,
4169 ], "CPU Information")
4170 CreationDateStruct              = struct("creation_date_struct", [
4171         CreationDate,
4172 ])
4173 CreationInfoStruct              = struct("creation_info_struct", [
4174         CreationTime,
4175         CreationDate,
4176         CreatorID,
4177 ], "Creation Information")
4178 CreationTimeStruct              = struct("creation_time_struct", [
4179         CreationTime,
4180 ])
4181 CustomCntsInfo                  = struct("custom_cnts_info", [
4182         CustomVariableValue,
4183         CustomString,
4184 ], "Custom Counters" )
4185 DataStreamInfo                  = struct("data_stream_info", [
4186         AssociatedNameSpace,
4187         DataStreamName
4188 ])
4189 DataStreamSizeStruct            = struct("data_stream_size_struct", [
4190         DataStreamSize,
4191 ])
4192 DirCacheInfo                    = struct("dir_cache_info", [
4193         uint32("min_time_since_file_delete", "Minimum Time Since File Delete"),
4194         uint32("abs_min_time_since_file_delete", "Absolute Minimum Time Since File Delete"),
4195         uint32("min_num_of_dir_cache_buff", "Minimum Number Of Directory Cache Buffers"),
4196         uint32("max_num_of_dir_cache_buff", "Maximum Number Of Directory Cache Buffers"),
4197         uint32("num_of_dir_cache_buff", "Number Of Directory Cache Buffers"),
4198         uint32("dc_min_non_ref_time", "DC Minimum Non-Referenced Time"),
4199         uint32("dc_wait_time_before_new_buff", "DC Wait Time Before New Buffer"),
4200         uint32("dc_max_concurrent_writes", "DC Maximum Concurrent Writes"),
4201         uint32("dc_dirty_wait_time", "DC Dirty Wait Time"),
4202         uint32("dc_double_read_flag", "DC Double Read Flag"),
4203         uint32("map_hash_node_count", "Map Hash Node Count"),
4204         uint32("space_restriction_node_count", "Space Restriction Node Count"),
4205         uint32("trustee_list_node_count", "Trustee List Node Count"),
4206         uint32("percent_of_vol_used_by_dirs", "Percent Of Volume Used By Directories"),
4207 ], "Directory Cache Information")
4208 DirEntryStruct                  = struct("dir_entry_struct", [
4209         DirectoryEntryNumber,
4210         DOSDirectoryEntryNumber,
4211         VolumeNumberLong,
4212 ], "Directory Entry Information")
4213 DirectoryInstance               = struct("directory_instance", [
4214         SearchSequenceWord,
4215         DirectoryID,
4216         DirectoryName14,
4217         DirectoryAttributes,
4218         DirectoryAccessRights,
4219         endian(CreationDate, BE),
4220         endian(AccessDate, BE),
4221         CreatorID,
4222         Reserved2,
4223         DirectoryStamp,
4224 ], "Directory Information")
4225 DMInfoLevel0                    = struct("dm_info_level_0", [
4226         uint32("io_flag", "IO Flag"),
4227         uint32("sm_info_size", "Storage Module Information Size"),
4228         uint32("avail_space", "Available Space"),
4229         uint32("used_space", "Used Space"),
4230         stringz("s_module_name", "Storage Module Name"),
4231         uint8("s_m_info", "Storage Media Information"),
4232 ])
4233 DMInfoLevel1                    = struct("dm_info_level_1", [
4234         NumberOfSMs,
4235         SMIDs,
4236 ])
4237 DMInfoLevel2                    = struct("dm_info_level_2", [
4238         Name,
4239 ])
4240 DOSDirectoryEntryStruct         = struct("dos_directory_entry_struct", [
4241         AttributesDef32,
4242         UniqueID,
4243         PurgeFlags,
4244         DestNameSpace,
4245         DirectoryNameLen,
4246         DirectoryName,
4247         CreationTime,
4248         CreationDate,
4249         CreatorID,
4250         ArchivedTime,
4251         ArchivedDate,
4252         ArchiverID,
4253         UpdateTime,
4254         UpdateDate,
4255         NextTrusteeEntry,
4256         Reserved48,
4257         InheritedRightsMask,
4258 ], "DOS Directory Information")
4259 DOSFileEntryStruct              = struct("dos_file_entry_struct", [
4260         AttributesDef32,
4261         UniqueID,
4262         PurgeFlags,
4263         DestNameSpace,
4264         NameLen,
4265         Name12,
4266         CreationTime,
4267         CreationDate,
4268         CreatorID,
4269         ArchivedTime,
4270         ArchivedDate,
4271         ArchiverID,
4272         UpdateTime,
4273         UpdateDate,
4274         UpdateID,
4275         FileSize,
4276         DataForkFirstFAT,
4277         NextTrusteeEntry,
4278         Reserved36,
4279         InheritedRightsMask,
4280         LastAccessedDate,
4281         Reserved28,
4282         PrimaryEntry,
4283         NameList,
4284 ], "DOS File Information")
4285 DSSpaceAllocateStruct           = struct("ds_space_alloc_struct", [
4286         DataStreamSpaceAlloc,
4287 ])
4288 DynMemStruct                    = struct("dyn_mem_struct", [
4289         uint32("dyn_mem_struct_total", "Total Dynamic Space" ),
4290         uint32("dyn_mem_struct_max", "Max Used Dynamic Space" ),
4291         uint32("dyn_mem_struct_cur", "Current Used Dynamic Space" ),
4292 ], "Dynamic Memory Information")
4293 EAInfoStruct                    = struct("ea_info_struct", [
4294         EADataSize,
4295         EACount,
4296         EAKeySize,
4297 ], "Extended Attribute Information")
4298 ExtraCacheCntrs                 = struct("extra_cache_cntrs", [
4299         uint32("internl_dsk_get_no_wait", "Internal Disk Get No Wait Count"),
4300         uint32("internl_dsk_get_no_wait_need", "Internal Disk Get No Wait Need To Allocate Count"),
4301         uint32("internl_dsk_get_no_wait_no_blk", "Internal Disk Get No Wait No Block Count"),
4302         uint32("id_get_no_read_no_wait", "ID Get No Read No Wait Count"),
4303         uint32("id_get_no_read_no_wait_sema", "ID Get No Read No Wait Semaphored Count"),
4304         uint32("id_get_no_read_no_wait_buffer", "ID Get No Read No Wait No Buffer Count"),
4305         uint32("id_get_no_read_no_wait_alloc", "ID Get No Read No Wait Allocate Count"),
4306         uint32("id_get_no_read_no_wait_no_alloc", "ID Get No Read No Wait No Alloc Count"),
4307         uint32("id_get_no_read_no_wait_no_alloc_sema", "ID Get No Read No Wait No Alloc Semaphored Count"),
4308         uint32("id_get_no_read_no_wait_no_alloc_alloc", "ID Get No Read No Wait No Alloc Allocate Count"),
4309 ], "Extra Cache Counters Information")
4310
4311
4312 ReferenceIDStruct               = struct("ref_id_struct", [
4313         CurrentReferenceID,
4314 ])
4315 NSAttributeStruct               = struct("ns_attrib_struct", [
4316         AttributesDef32,
4317 ])
4318 DStreamActual                   = struct("d_stream_actual", [
4319         Reserved12,
4320         # Need to look into how to format this correctly
4321 ])
4322 DStreamLogical                  = struct("d_string_logical", [
4323         Reserved12,
4324         # Need to look into how to format this correctly
4325 ])
4326 LastUpdatedInSecondsStruct      = struct("last_update_in_seconds_struct", [
4327         SecondsRelativeToTheYear2000,
4328 ])
4329 DOSNameStruct                   = struct("dos_name_struct", [
4330         FileName,
4331 ], "DOS File Name")
4332 FlushTimeStruct                 = struct("flush_time_struct", [
4333         FlushTime,
4334 ])
4335 ParentBaseIDStruct              = struct("parent_base_id_struct", [
4336         ParentBaseID,
4337 ])
4338 MacFinderInfoStruct             = struct("mac_finder_info_struct", [
4339         MacFinderInfo,
4340 ])
4341 SiblingCountStruct              = struct("sibling_count_struct", [
4342         SiblingCount,
4343 ])
4344 EffectiveRightsStruct           = struct("eff_rights_struct", [
4345         EffectiveRights,
4346         Reserved3,
4347 ])
4348 MacTimeStruct                   = struct("mac_time_struct", [
4349         MACCreateDate,
4350         MACCreateTime,
4351         MACBackupDate,
4352         MACBackupTime,
4353 ])
4354 LastAccessedTimeStruct          = struct("last_access_time_struct", [
4355         LastAccessedTime,
4356 ])
4357
4358
4359
4360 FileAttributesStruct            = struct("file_attributes_struct", [
4361         AttributesDef32,
4362 ])
4363 FileInfoStruct                  = struct("file_info_struct", [
4364         ParentID,
4365         DirectoryEntryNumber,
4366         TotalBlocksToDecompress,
4367         CurrentBlockBeingDecompressed,
4368 ], "File Information")
4369 FileInstance                    = struct("file_instance", [
4370         SearchSequenceWord,
4371         DirectoryID,
4372         FileName14,
4373         AttributesDef,
4374         FileMode,
4375         FileSize,
4376         endian(CreationDate, BE),
4377         endian(AccessDate, BE),
4378         endian(UpdateDate, BE),
4379         endian(UpdateTime, BE),
4380 ], "File Instance")
4381 FileNameStruct                  = struct("file_name_struct", [
4382         FileName,
4383 ], "File Name")
4384 FileServerCounters              = struct("file_server_counters", [
4385         uint16("too_many_hops", "Too Many Hops"),
4386         uint16("unknown_network", "Unknown Network"),
4387         uint16("no_space_for_service", "No Space For Service"),
4388         uint16("no_receive_buff", "No Receive Buffers"),
4389         uint16("not_my_network", "Not My Network"),
4390         uint32("netbios_progated", "NetBIOS Propagated Count"),
4391         uint32("ttl_pckts_srvcd", "Total Packets Serviced"),
4392         uint32("ttl_pckts_routed", "Total Packets Routed"),
4393 ], "File Server Counters")
4394 FileSystemInfo                  = struct("file_system_info", [
4395         uint32("fat_moved", "Number of times the OS has move the location of FAT"),
4396         uint32("fat_write_err", "Number of write errors in both original and mirrored copies of FAT"),
4397         uint32("someone_else_did_it_0", "Someone Else Did It Count 0"),
4398         uint32("someone_else_did_it_1", "Someone Else Did It Count 1"),
4399         uint32("someone_else_did_it_2", "Someone Else Did It Count 2"),
4400         uint32("i_ran_out_someone_else_did_it_0", "I Ran Out Someone Else Did It Count 0"),
4401         uint32("i_ran_out_someone_else_did_it_1", "I Ran Out Someone Else Did It Count 1"),
4402         uint32("i_ran_out_someone_else_did_it_2", "I Ran Out Someone Else Did It Count 2"),
4403         uint32("turbo_fat_build_failed", "Turbo FAT Build Failed Count"),
4404         uint32("extra_use_count_node_count", "Errors allocating a use count node for TTS"),
4405         uint32("extra_extra_use_count_node_count", "Errors allocating an additional use count node for TTS"),
4406         uint32("error_read_last_fat", "Error Reading Last FAT Count"),
4407         uint32("someone_else_using_this_file", "Someone Else Using This File Count"),
4408 ], "File System Information")
4409 GenericInfoDef                  = struct("generic_info_def", [
4410         fw_string("generic_label", "Label", 64),
4411         uint32("generic_ident_type", "Identification Type"),
4412         uint32("generic_ident_time", "Identification Time"),
4413         uint32("generic_media_type", "Media Type"),
4414         uint32("generic_cartridge_type", "Cartridge Type"),
4415         uint32("generic_unit_size", "Unit Size"),
4416         uint32("generic_block_size", "Block Size"),
4417         uint32("generic_capacity", "Capacity"),
4418         uint32("generic_pref_unit_size", "Preferred Unit Size"),
4419         fw_string("generic_name", "Name",64),
4420         uint32("generic_type", "Type"),
4421         uint32("generic_status", "Status"),
4422         uint32("generic_func_mask", "Function Mask"),
4423         uint32("generic_ctl_mask", "Control Mask"),
4424         uint32("generic_parent_count", "Parent Count"),
4425         uint32("generic_sib_count", "Sibling Count"),
4426         uint32("generic_child_count", "Child Count"),
4427         uint32("generic_spec_info_sz", "Specific Information Size"),
4428         uint32("generic_object_uniq_id", "Unique Object ID"),
4429         uint32("generic_media_slot", "Media Slot"),
4430 ], "Generic Information")
4431 HandleInfoLevel0                = struct("handle_info_level_0", [
4432 #        DataStream,
4433 ])
4434 HandleInfoLevel1                = struct("handle_info_level_1", [
4435         DataStream,
4436 ])
4437 HandleInfoLevel2                = struct("handle_info_level_2", [
4438         DOSDirectoryBase,
4439         NameSpace,
4440         DataStream,
4441 ])
4442 HandleInfoLevel3                = struct("handle_info_level_3", [
4443         DOSDirectoryBase,
4444         NameSpace,
4445 ])
4446 HandleInfoLevel4                = struct("handle_info_level_4", [
4447         DOSDirectoryBase,
4448         NameSpace,
4449         ParentDirectoryBase,
4450         ParentDOSDirectoryBase,
4451 ])
4452 HandleInfoLevel5                = struct("handle_info_level_5", [
4453         DOSDirectoryBase,
4454         NameSpace,
4455         DataStream,
4456         ParentDirectoryBase,
4457         ParentDOSDirectoryBase,
4458 ])
4459 IPXInformation                  = struct("ipx_information", [
4460         uint32("ipx_send_pkt", "IPX Send Packet Count"),
4461         uint16("ipx_malform_pkt", "IPX Malformed Packet Count"),
4462         uint32("ipx_get_ecb_req", "IPX Get ECB Request Count"),
4463         uint32("ipx_get_ecb_fail", "IPX Get ECB Fail Count"),
4464         uint32("ipx_aes_event", "IPX AES Event Count"),
4465         uint16("ipx_postponed_aes", "IPX Postponed AES Count"),
4466         uint16("ipx_max_conf_sock", "IPX Max Configured Socket Count"),
4467         uint16("ipx_max_open_sock", "IPX Max Open Socket Count"),
4468         uint16("ipx_open_sock_fail", "IPX Open Socket Fail Count"),
4469         uint32("ipx_listen_ecb", "IPX Listen ECB Count"),
4470         uint16("ipx_ecb_cancel_fail", "IPX ECB Cancel Fail Count"),
4471         uint16("ipx_get_lcl_targ_fail", "IPX Get Local Target Fail Count"),
4472 ], "IPX Information")
4473 JobEntryTime                    = struct("job_entry_time", [
4474         Year,
4475         Month,
4476         Day,
4477         Hour,
4478         Minute,
4479         Second,
4480 ], "Job Entry Time")
4481 JobStruct3x                       = struct("job_struct_3x", [
4482     RecordInUseFlag,
4483     PreviousRecord,
4484     NextRecord,
4485         ClientStationLong,
4486         ClientTaskNumberLong,
4487         ClientIDNumber,
4488         TargetServerIDNumber,
4489         TargetExecutionTime,
4490         JobEntryTime,
4491         JobNumberLong,
4492         JobType,
4493         JobPositionWord,
4494         JobControlFlagsWord,
4495         JobFileName,
4496         JobFileHandleLong,
4497         ServerStationLong,
4498         ServerTaskNumberLong,
4499         ServerID,
4500         TextJobDescription,
4501         ClientRecordArea,
4502 ], "Job Information")
4503 JobStruct                       = struct("job_struct", [
4504         ClientStation,
4505         ClientTaskNumber,
4506         ClientIDNumber,
4507         TargetServerIDNumber,
4508         TargetExecutionTime,
4509         JobEntryTime,
4510         JobNumber,
4511         JobType,
4512         JobPosition,
4513         JobControlFlags,
4514         JobFileName,
4515         JobFileHandle,
4516         ServerStation,
4517         ServerTaskNumber,
4518         ServerID,
4519         TextJobDescription,
4520         ClientRecordArea,
4521 ], "Job Information")
4522 JobStructNew                    = struct("job_struct_new", [
4523         RecordInUseFlag,
4524         PreviousRecord,
4525         NextRecord,
4526         ClientStationLong,
4527         ClientTaskNumberLong,
4528         ClientIDNumber,
4529         TargetServerIDNumber,
4530         TargetExecutionTime,
4531         JobEntryTime,
4532         JobNumberLong,
4533         JobType,
4534         JobPositionWord,
4535         JobControlFlagsWord,
4536         JobFileName,
4537         JobFileHandleLong,
4538         ServerStationLong,
4539         ServerTaskNumberLong,
4540         ServerID,
4541 ], "Job Information")
4542 KnownRoutes                     = struct("known_routes", [
4543         NetIDNumber,
4544         HopsToNet,
4545         NetStatus,
4546         TimeToNet,
4547 ], "Known Routes")
4548 KnownServStruc                  = struct("known_server_struct", [
4549         ServerAddress,
4550         HopsToNet,
4551         ServerNameStringz,
4552 ], "Known Servers")
4553 LANConfigInfo                   = struct("lan_cfg_info", [
4554         LANdriverCFG_MajorVersion,
4555         LANdriverCFG_MinorVersion,
4556         LANdriverNodeAddress,
4557         Reserved,
4558         LANdriverModeFlags,
4559         LANdriverBoardNumber,
4560         LANdriverBoardInstance,
4561         LANdriverMaximumSize,
4562         LANdriverMaxRecvSize,
4563         LANdriverRecvSize,
4564         LANdriverCardID,
4565         LANdriverMediaID,
4566         LANdriverTransportTime,
4567         LANdriverSrcRouting,
4568         LANdriverLineSpeed,
4569         LANdriverReserved,
4570         LANdriverMajorVersion,
4571         LANdriverMinorVersion,
4572         LANdriverFlags,
4573         LANdriverSendRetries,
4574         LANdriverLink,
4575         LANdriverSharingFlags,
4576         LANdriverSlot,
4577         LANdriverIOPortsAndRanges1,
4578         LANdriverIOPortsAndRanges2,
4579         LANdriverIOPortsAndRanges3,
4580         LANdriverIOPortsAndRanges4,
4581         LANdriverMemoryDecode0,
4582         LANdriverMemoryLength0,
4583         LANdriverMemoryDecode1,
4584         LANdriverMemoryLength1,
4585         LANdriverInterrupt1,
4586         LANdriverInterrupt2,
4587         LANdriverDMAUsage1,
4588         LANdriverDMAUsage2,
4589         LANdriverLogicalName,
4590         LANdriverIOReserved,
4591         LANdriverCardName,
4592 ], "LAN Configuration Information")
4593 LastAccessStruct                = struct("last_access_struct", [
4594         LastAccessedDate,
4595 ])
4596 lockInfo                        = struct("lock_info_struct", [
4597         LogicalLockThreshold,
4598         PhysicalLockThreshold,
4599         FileLockCount,
4600         RecordLockCount,
4601 ], "Lock Information")
4602 LockStruct                      = struct("lock_struct", [
4603         TaskNumByte,
4604         LockType,
4605         RecordStart,
4606         RecordEnd,
4607 ], "Locks")
4608 LoginTime                       = struct("login_time", [
4609         Year,
4610         Month,
4611         Day,
4612         Hour,
4613         Minute,
4614         Second,
4615         DayOfWeek,
4616 ], "Login Time")
4617 LogLockStruct                   = struct("log_lock_struct", [
4618         TaskNumByte,
4619         LockStatus,
4620         LockName,
4621 ], "Logical Locks")
4622 LogRecStruct                    = struct("log_rec_struct", [
4623         ConnectionNumberWord,
4624         TaskNumByte,
4625         LockStatus,
4626 ], "Logical Record Locks")
4627 LSLInformation                  = struct("lsl_information", [
4628         uint32("rx_buffers", "Receive Buffers"),
4629         uint32("rx_buffers_75", "Receive Buffers Warning Level"),
4630         uint32("rx_buffers_checked_out", "Receive Buffers Checked Out Count"),
4631         uint32("rx_buffer_size", "Receive Buffer Size"),
4632         uint32("max_phy_packet_size", "Maximum Physical Packet Size"),
4633         uint32("last_time_rx_buff_was_alloc", "Last Time a Receive Buffer was Allocated"),
4634         uint32("max_num_of_protocols", "Maximum Number of Protocols"),
4635         uint32("max_num_of_media_types", "Maximum Number of Media Types"),
4636         uint32("total_tx_packets", "Total Transmit Packets"),
4637         uint32("get_ecb_buf", "Get ECB Buffers"),
4638         uint32("get_ecb_fails", "Get ECB Failures"),
4639         uint32("aes_event_count", "AES Event Count"),
4640         uint32("post_poned_events", "Postponed Events"),
4641         uint32("ecb_cxl_fails", "ECB Cancel Failures"),
4642         uint32("valid_bfrs_reused", "Valid Buffers Reused"),
4643         uint32("enqueued_send_cnt", "Enqueued Send Count"),
4644         uint32("total_rx_packets", "Total Receive Packets"),
4645         uint32("unclaimed_packets", "Unclaimed Packets"),
4646         uint8("stat_table_major_version", "Statistics Table Major Version"),
4647         uint8("stat_table_minor_version", "Statistics Table Minor Version"),
4648 ], "LSL Information")
4649 MaximumSpaceStruct              = struct("max_space_struct", [
4650         MaxSpace,
4651 ])
4652 MemoryCounters                  = struct("memory_counters", [
4653         uint32("orig_num_cache_buff", "Original Number Of Cache Buffers"),
4654         uint32("curr_num_cache_buff", "Current Number Of Cache Buffers"),
4655         uint32("cache_dirty_block_thresh", "Cache Dirty Block Threshold"),
4656         uint32("wait_node", "Wait Node Count"),
4657         uint32("wait_node_alloc_fail", "Wait Node Alloc Failure Count"),
4658         uint32("move_cache_node", "Move Cache Node Count"),
4659         uint32("move_cache_node_from_avai", "Move Cache Node From Avail Count"),
4660         uint32("accel_cache_node_write", "Accelerate Cache Node Write Count"),
4661         uint32("rem_cache_node", "Remove Cache Node Count"),
4662         uint32("rem_cache_node_from_avail", "Remove Cache Node From Avail Count"),
4663 ], "Memory Counters")
4664 MLIDBoardInfo                   = struct("mlid_board_info", [
4665         uint32("protocol_board_num", "Protocol Board Number"),
4666         uint16("protocol_number", "Protocol Number"),
4667         bytes("protocol_id", "Protocol ID", 6),
4668         nstring8("protocol_name", "Protocol Name"),
4669 ], "MLID Board Information")
4670 ModifyInfoStruct                = struct("modify_info_struct", [
4671         ModifiedTime,
4672         ModifiedDate,
4673         ModifierID,
4674         LastAccessedDate,
4675 ], "Modification Information")
4676 nameInfo                        = struct("name_info_struct", [
4677         ObjectType,
4678         nstring8("login_name", "Login Name"),
4679 ], "Name Information")
4680 NCPNetworkAddress               = struct("ncp_network_address_struct", [
4681         TransportType,
4682         Reserved3,
4683         NetAddress,
4684 ], "Network Address")
4685
4686 netAddr                         = struct("net_addr_struct", [
4687         TransportType,
4688         nbytes32("transport_addr", "Transport Address"),
4689 ], "Network Address")
4690
4691 NetWareInformationStruct        = struct("netware_information_struct", [
4692         DataStreamSpaceAlloc,           # (Data Stream Alloc Bit)
4693         AttributesDef32,                # (Attributes Bit)
4694         FlagsDef,
4695         DataStreamSize,                 # (Data Stream Size Bit)
4696         TotalDataStreamDiskSpaceAlloc,  # (Total Stream Size Bit)
4697         NumberOfDataStreams,
4698         CreationTime,                   # (Creation Bit)
4699         CreationDate,
4700         CreatorID,
4701         ModifiedTime,                   # (Modify Bit)
4702         ModifiedDate,
4703         ModifierID,
4704         LastAccessedDate,
4705         ArchivedTime,                   # (Archive Bit)
4706         ArchivedDate,
4707         ArchiverID,
4708         InheritedRightsMask,            # (Rights Bit)
4709         DirectoryEntryNumber,           # (Directory Entry Bit)
4710         DOSDirectoryEntryNumber,
4711         VolumeNumberLong,
4712         EADataSize,                     # (Extended Attribute Bit)
4713         EACount,
4714         EAKeySize,
4715         CreatorNameSpaceNumber,         # (Name Space Bit)
4716         Reserved3,
4717 ], "NetWare Information")
4718 NLMInformation                  = struct("nlm_information", [
4719         IdentificationNumber,
4720         NLMFlags,
4721         Reserved3,
4722         NLMType,
4723         Reserved3,
4724         ParentID,
4725         MajorVersion,
4726         MinorVersion,
4727         Revision,
4728         Year,
4729         Reserved3,
4730         Month,
4731         Reserved3,
4732         Day,
4733         Reserved3,
4734         AllocAvailByte,
4735         AllocFreeCount,
4736         LastGarbCollect,
4737         MessageLanguage,
4738         NumberOfReferencedPublics,
4739 ], "NLM Information")
4740 NSInfoStruct                    = struct("ns_info_struct", [
4741         NameSpace,
4742         Reserved3,
4743 ])
4744 NWAuditStatus                   = struct("nw_audit_status", [
4745         AuditVersionDate,
4746         AuditFileVersionDate,
4747         val_string16("audit_enable_flag", "Auditing Enabled Flag", [
4748                 [ 0x0000, "Auditing Disabled" ],
4749                 [ 0x0100, "Auditing Enabled" ],
4750         ]),
4751         Reserved2,
4752         uint32("audit_file_size", "Audit File Size"),
4753         uint32("modified_counter", "Modified Counter"),
4754         uint32("audit_file_max_size", "Audit File Maximum Size"),
4755         uint32("audit_file_size_threshold", "Audit File Size Threshold"),
4756         uint32("audit_record_count", "Audit Record Count"),
4757         uint32("auditing_flags", "Auditing Flags"),
4758 ], "NetWare Audit Status")
4759 ObjectSecurityStruct            = struct("object_security_struct", [
4760         ObjectSecurity,
4761 ])
4762 ObjectFlagsStruct               = struct("object_flags_struct", [
4763         ObjectFlags,
4764 ])
4765 ObjectTypeStruct                = struct("object_type_struct", [
4766         ObjectType,
4767         Reserved2,
4768 ])
4769 ObjectNameStruct                = struct("object_name_struct", [
4770         ObjectNameStringz,
4771 ])
4772 ObjectIDStruct                  = struct("object_id_struct", [
4773         ObjectID,
4774         Restriction,
4775 ])
4776 OpnFilesStruct                  = struct("opn_files_struct", [
4777         TaskNumberWord,
4778         LockType,
4779         AccessControl,
4780         LockFlag,
4781         VolumeNumber,
4782         DOSParentDirectoryEntry,
4783         DOSDirectoryEntry,
4784         ForkCount,
4785         NameSpace,
4786         FileName,
4787 ], "Open Files Information")
4788 OwnerIDStruct                   = struct("owner_id_struct", [
4789         CreatorID,
4790 ])
4791 PacketBurstInformation          = struct("packet_burst_information", [
4792         uint32("big_invalid_slot", "Big Invalid Slot Count"),
4793         uint32("big_forged_packet", "Big Forged Packet Count"),
4794         uint32("big_invalid_packet", "Big Invalid Packet Count"),
4795         uint32("big_still_transmitting", "Big Still Transmitting Count"),
4796         uint32("still_doing_the_last_req", "Still Doing The Last Request Count"),
4797         uint32("invalid_control_req", "Invalid Control Request Count"),
4798         uint32("control_invalid_message_number", "Control Invalid Message Number Count"),
4799         uint32("control_being_torn_down", "Control Being Torn Down Count"),
4800         uint32("big_repeat_the_file_read", "Big Repeat the File Read Count"),
4801         uint32("big_send_extra_cc_count", "Big Send Extra CC Count"),
4802         uint32("big_return_abort_mess", "Big Return Abort Message Count"),
4803         uint32("big_read_invalid_mess", "Big Read Invalid Message Number Count"),
4804         uint32("big_read_do_it_over", "Big Read Do It Over Count"),
4805         uint32("big_read_being_torn_down", "Big Read Being Torn Down Count"),
4806         uint32("previous_control_packet", "Previous Control Packet Count"),
4807         uint32("send_hold_off_message", "Send Hold Off Message Count"),
4808         uint32("big_read_no_data_avail", "Big Read No Data Available Count"),
4809         uint32("big_read_trying_to_read", "Big Read Trying To Read Too Much Count"),
4810         uint32("async_read_error", "Async Read Error Count"),
4811         uint32("big_read_phy_read_err", "Big Read Physical Read Error Count"),
4812         uint32("ctl_bad_ack_frag_list", "Control Bad ACK Fragment List Count"),
4813         uint32("ctl_no_data_read", "Control No Data Read Count"),
4814         uint32("write_dup_req", "Write Duplicate Request Count"),
4815         uint32("shouldnt_be_ack_here", "Shouldn't Be ACKing Here Count"),
4816         uint32("write_incon_packet_len", "Write Inconsistent Packet Lengths Count"),
4817         uint32("first_packet_isnt_a_write", "First Packet Isn't A Write Count"),
4818         uint32("write_trash_dup_req", "Write Trashed Duplicate Request Count"),
4819         uint32("big_write_inv_message_num", "Big Write Invalid Message Number Count"),
4820         uint32("big_write_being_torn_down", "Big Write Being Torn Down Count"),
4821         uint32("big_write_being_abort", "Big Write Being Aborted Count"),
4822         uint32("zero_ack_frag", "Zero ACK Fragment Count"),
4823         uint32("write_curr_trans", "Write Currently Transmitting Count"),
4824         uint32("try_to_write_too_much", "Trying To Write Too Much Count"),
4825         uint32("write_out_of_mem_for_ctl_nodes", "Write Out Of Memory For Control Nodes Count"),
4826         uint32("write_didnt_need_this_frag", "Write Didn't Need This Fragment Count"),
4827         uint32("write_too_many_buf_check", "Write Too Many Buffers Checked Out Count"),
4828         uint32("write_timeout", "Write Time Out Count"),
4829         uint32("write_got_an_ack0", "Write Got An ACK Count 0"),
4830         uint32("write_got_an_ack1", "Write Got An ACK Count 1"),
4831         uint32("poll_abort_conn", "Poller Aborted The Connnection Count"),
4832         uint32("may_had_out_of_order", "Maybe Had Out Of Order Writes Count"),
4833         uint32("had_an_out_of_order", "Had An Out Of Order Write Count"),
4834         uint32("moved_the_ack_bit_dn", "Moved The ACK Bit Down Count"),
4835         uint32("bumped_out_of_order", "Bumped Out Of Order Write Count"),
4836         uint32("poll_rem_old_out_of_order", "Poller Removed Old Out Of Order Count"),
4837         uint32("write_didnt_need_but_req_ack", "Write Didn't Need But Requested ACK Count"),
4838         uint32("write_trash_packet", "Write Trashed Packet Count"),
4839         uint32("too_many_ack_frag", "Too Many ACK Fragments Count"),
4840         uint32("saved_an_out_of_order_packet", "Saved An Out Of Order Packet Count"),
4841         uint32("conn_being_aborted", "Connection Being Aborted Count"),
4842 ], "Packet Burst Information")
4843
4844 PadDSSpaceAllocate              = struct("pad_ds_space_alloc", [
4845     Reserved4,
4846 ])
4847 PadAttributes                   = struct("pad_attributes", [
4848     Reserved6,
4849 ])
4850 PadDataStreamSize               = struct("pad_data_stream_size", [
4851     Reserved4,
4852 ])
4853 PadTotalStreamSize              = struct("pad_total_stream_size", [
4854     Reserved6,
4855 ])
4856 PadCreationInfo                 = struct("pad_creation_info", [
4857     Reserved8,
4858 ])
4859 PadModifyInfo                   = struct("pad_modify_info", [
4860     Reserved10,
4861 ])
4862 PadArchiveInfo                  = struct("pad_archive_info", [
4863     Reserved8,
4864 ])
4865 PadRightsInfo                   = struct("pad_rights_info", [
4866     Reserved2,
4867 ])
4868 PadDirEntry                     = struct("pad_dir_entry", [
4869     Reserved12,
4870 ])
4871 PadEAInfo                       = struct("pad_ea_info", [
4872     Reserved12,
4873 ])
4874 PadNSInfo                       = struct("pad_ns_info", [
4875     Reserved4,
4876 ])
4877 PhyLockStruct                   = struct("phy_lock_struct", [
4878         LoggedCount,
4879         ShareableLockCount,
4880         RecordStart,
4881         RecordEnd,
4882         LogicalConnectionNumber,
4883         TaskNumByte,
4884         LockType,
4885 ], "Physical Locks")
4886 printInfo                       = struct("print_info_struct", [
4887         PrintFlags,
4888         TabSize,
4889         Copies,
4890         PrintToFileFlag,
4891         BannerName,
4892         TargetPrinter,
4893         FormType,
4894 ], "Print Information")
4895 RightsInfoStruct                = struct("rights_info_struct", [
4896         InheritedRightsMask,
4897 ])
4898 RoutersInfo                     = struct("routers_info", [
4899         bytes("node", "Node", 6),
4900         ConnectedLAN,
4901         uint16("route_hops", "Hop Count"),
4902         uint16("route_time", "Route Time"),
4903 ], "Router Information")
4904 RTagStructure                   = struct("r_tag_struct", [
4905         RTagNumber,
4906         ResourceSignature,
4907         ResourceCount,
4908         ResourceName,
4909 ], "Resource Tag")
4910 ScanInfoFileName                = struct("scan_info_file_name", [
4911         SalvageableFileEntryNumber,
4912         FileName,
4913 ])
4914 ScanInfoFileNoName              = struct("scan_info_file_no_name", [
4915         SalvageableFileEntryNumber,
4916 ])
4917 Segments                        = struct("segments", [
4918         uint32("volume_segment_dev_num", "Volume Segment Device Number"),
4919         uint32("volume_segment_offset", "Volume Segment Offset"),
4920         uint32("volume_segment_size", "Volume Segment Size"),
4921 ], "Volume Segment Information")
4922 SemaInfoStruct                  = struct("sema_info_struct", [
4923         LogicalConnectionNumber,
4924         TaskNumByte,
4925 ])
4926 SemaStruct                      = struct("sema_struct", [
4927         OpenCount,
4928         SemaphoreValue,
4929         TaskNumByte,
4930         SemaphoreName,
4931 ], "Semaphore Information")
4932 ServerInfo                      = struct("server_info", [
4933         uint32("reply_canceled", "Reply Canceled Count"),
4934         uint32("write_held_off", "Write Held Off Count"),
4935         uint32("write_held_off_with_dup", "Write Held Off With Duplicate Request"),
4936         uint32("invalid_req_type", "Invalid Request Type Count"),
4937         uint32("being_aborted", "Being Aborted Count"),
4938         uint32("already_doing_realloc", "Already Doing Re-Allocate Count"),
4939         uint32("dealloc_invalid_slot", "De-Allocate Invalid Slot Count"),
4940         uint32("dealloc_being_proc", "De-Allocate Being Processed Count"),
4941         uint32("dealloc_forged_packet", "De-Allocate Forged Packet Count"),
4942         uint32("dealloc_still_transmit", "De-Allocate Still Transmitting Count"),
4943         uint32("start_station_error", "Start Station Error Count"),
4944         uint32("invalid_slot", "Invalid Slot Count"),
4945         uint32("being_processed", "Being Processed Count"),
4946         uint32("forged_packet", "Forged Packet Count"),
4947         uint32("still_transmitting", "Still Transmitting Count"),
4948         uint32("reexecute_request", "Re-Execute Request Count"),
4949         uint32("invalid_sequence_number", "Invalid Sequence Number Count"),
4950         uint32("dup_is_being_sent", "Duplicate Is Being Sent Already Count"),
4951         uint32("sent_pos_ack", "Sent Positive Acknowledge Count"),
4952         uint32("sent_a_dup_reply", "Sent A Duplicate Reply Count"),
4953         uint32("no_mem_for_station", "No Memory For Station Control Count"),
4954         uint32("no_avail_conns", "No Available Connections Count"),
4955         uint32("realloc_slot", "Re-Allocate Slot Count"),
4956         uint32("realloc_slot_came_too_soon", "Re-Allocate Slot Came Too Soon Count"),
4957 ], "Server Information")
4958 ServersSrcInfo                  = struct("servers_src_info", [
4959         ServerNode,
4960         ConnectedLAN,
4961         HopsToNet,
4962 ], "Source Server Information")
4963 SpaceStruct                     = struct("space_struct", [
4964         Level,
4965         MaxSpace,
4966         CurrentSpace,
4967 ], "Space Information")
4968 SPXInformation                  = struct("spx_information", [
4969         uint16("spx_max_conn", "SPX Max Connections Count"),
4970         uint16("spx_max_used_conn", "SPX Max Used Connections"),
4971         uint16("spx_est_conn_req", "SPX Establish Connection Requests"),
4972         uint16("spx_est_conn_fail", "SPX Establish Connection Fail"),
4973         uint16("spx_listen_con_req", "SPX Listen Connect Request"),
4974         uint16("spx_listen_con_fail", "SPX Listen Connect Fail"),
4975         uint32("spx_send", "SPX Send Count"),
4976         uint32("spx_window_choke", "SPX Window Choke Count"),
4977         uint16("spx_bad_send", "SPX Bad Send Count"),
4978         uint16("spx_send_fail", "SPX Send Fail Count"),
4979         uint16("spx_abort_conn", "SPX Aborted Connection"),
4980         uint32("spx_listen_pkt", "SPX Listen Packet Count"),
4981         uint16("spx_bad_listen", "SPX Bad Listen Count"),
4982         uint32("spx_incoming_pkt", "SPX Incoming Packet Count"),
4983         uint16("spx_bad_in_pkt", "SPX Bad In Packet Count"),
4984         uint16("spx_supp_pkt", "SPX Suppressed Packet Count"),
4985         uint16("spx_no_ses_listen", "SPX No Session Listen ECB Count"),
4986         uint16("spx_watch_dog", "SPX Watch Dog Destination Session Count"),
4987 ], "SPX Information")
4988 StackInfo                       = struct("stack_info", [
4989         StackNumber,
4990         fw_string("stack_short_name", "Stack Short Name", 16),
4991 ], "Stack Information")
4992 statsInfo                       = struct("stats_info_struct", [
4993         TotalBytesRead,
4994         TotalBytesWritten,
4995         TotalRequest,
4996 ], "Statistics")
4997 theTimeStruct                   = struct("the_time_struct", [
4998         UTCTimeInSeconds,
4999         FractionalSeconds,
5000         TimesyncStatus,
5001 ])
5002 timeInfo                        = struct("time_info", [
5003         Year,
5004         Month,
5005         Day,
5006         Hour,
5007         Minute,
5008         Second,
5009         DayOfWeek,
5010         uint32("login_expiration_time", "Login Expiration Time"),
5011 ])
5012 TotalStreamSizeStruct           = struct("total_stream_size_struct", [
5013         TotalDataStreamDiskSpaceAlloc,
5014         NumberOfDataStreams,
5015 ])
5016 TrendCounters                   = struct("trend_counters", [
5017         uint32("num_of_cache_checks", "Number Of Cache Checks"),
5018         uint32("num_of_cache_hits", "Number Of Cache Hits"),
5019         uint32("num_of_dirty_cache_checks", "Number Of Dirty Cache Checks"),
5020         uint32("num_of_cache_dirty_checks", "Number Of Cache Dirty Checks"),
5021         uint32("cache_used_while_check", "Cache Used While Checking"),
5022         uint32("wait_till_dirty_blcks_dec", "Wait Till Dirty Blocks Decrease Count"),
5023         uint32("alloc_blck_frm_avail", "Allocate Block From Available Count"),
5024         uint32("alloc_blck_frm_lru", "Allocate Block From LRU Count"),
5025         uint32("alloc_blck_already_wait", "Allocate Block Already Waiting"),
5026         uint32("lru_sit_time", "LRU Sitting Time"),
5027         uint32("num_of_cache_check_no_wait", "Number Of Cache Check No Wait"),
5028         uint32("num_of_cache_hits_no_wait", "Number Of Cache Hits No Wait"),
5029 ], "Trend Counters")
5030 TrusteeStruct                   = struct("trustee_struct", [
5031         endian(ObjectID, LE),
5032         AccessRightsMaskWord,
5033 ])
5034 UpdateDateStruct                = struct("update_date_struct", [
5035         UpdateDate,
5036 ])
5037 UpdateIDStruct                  = struct("update_id_struct", [
5038         UpdateID,
5039 ])
5040 UpdateTimeStruct                = struct("update_time_struct", [
5041         UpdateTime,
5042 ])
5043 UserInformation                 = struct("user_info", [
5044         ConnectionNumber,
5045         UseCount,
5046         Reserved2,
5047         ConnectionServiceType,
5048         Year,
5049         Month,
5050         Day,
5051         Hour,
5052         Minute,
5053         Second,
5054         DayOfWeek,
5055         Status,
5056         Reserved2,
5057         ExpirationTime,
5058         ObjectType,
5059         Reserved2,
5060         TransactionTrackingFlag,
5061         LogicalLockThreshold,
5062         FileWriteFlags,
5063         FileWriteState,
5064         Reserved,
5065         FileLockCount,
5066         RecordLockCount,
5067         TotalBytesRead,
5068         TotalBytesWritten,
5069         TotalRequest,
5070         HeldRequests,
5071         HeldBytesRead,
5072         HeldBytesWritten,
5073 ], "User Information")
5074 VolInfoStructure                = struct("vol_info_struct", [
5075         VolumeType,
5076         Reserved2,
5077         StatusFlagBits,
5078         SectorSize,
5079         SectorsPerClusterLong,
5080         VolumeSizeInClusters,
5081         FreedClusters,
5082         SubAllocFreeableClusters,
5083         FreeableLimboSectors,
5084         NonFreeableLimboSectors,
5085         NonFreeableAvailableSubAllocSectors,
5086         NotUsableSubAllocSectors,
5087         SubAllocClusters,
5088         DataStreamsCount,
5089         LimboDataStreamsCount,
5090         OldestDeletedFileAgeInTicks,
5091         CompressedDataStreamsCount,
5092         CompressedLimboDataStreamsCount,
5093         UnCompressableDataStreamsCount,
5094         PreCompressedSectors,
5095         CompressedSectors,
5096         MigratedFiles,
5097         MigratedSectors,
5098         ClustersUsedByFAT,
5099         ClustersUsedByDirectories,
5100         ClustersUsedByExtendedDirectories,
5101         TotalDirectoryEntries,
5102         UnUsedDirectoryEntries,
5103         TotalExtendedDirectoryExtants,
5104         UnUsedExtendedDirectoryExtants,
5105         ExtendedAttributesDefined,
5106         ExtendedAttributeExtantsUsed,
5107         DirectoryServicesObjectID,
5108         VolumeLastModifiedTime,
5109         VolumeLastModifiedDate,
5110 ], "Volume Information")
5111 VolInfo2Struct                  = struct("vol_info_struct_2", [
5112         uint32("volume_active_count", "Volume Active Count"),
5113         uint32("volume_use_count", "Volume Use Count"),
5114         uint32("mac_root_ids", "MAC Root IDs"),
5115         VolumeLastModifiedTime,
5116         VolumeLastModifiedDate,
5117         uint32("volume_reference_count", "Volume Reference Count"),
5118         uint32("compression_lower_limit", "Compression Lower Limit"),
5119         uint32("outstanding_ios", "Outstanding IOs"),
5120         uint32("outstanding_compression_ios", "Outstanding Compression IOs"),
5121         uint32("compression_ios_limit", "Compression IOs Limit"),
5122 ], "Extended Volume Information")
5123 VolumeStruct                    = struct("volume_struct", [
5124         VolumeNumberLong,
5125         VolumeNameLen,
5126 ])
5127
5128
5129 ##############################################################################
5130 # NCP Groups
5131 ##############################################################################
5132 def define_groups():
5133         groups['accounting']    = "Accounting"
5134         groups['afp']           = "AFP"
5135         groups['auditing']      = "Auditing"
5136         groups['bindery']       = "Bindery"
5137         groups['comm']          = "Communication"
5138         groups['connection']    = "Connection"
5139         groups['directory']     = "Directory"
5140         groups['extended']      = "Extended Attribute"
5141         groups['file']          = "File"
5142         groups['fileserver']    = "File Server"
5143         groups['message']       = "Message"
5144         groups['migration']     = "Data Migration"
5145         groups['misc']          = "Miscellaneous"
5146         groups['name']          = "Name Space"
5147         groups['nds']           = "NetWare Directory"
5148         groups['print']         = "Print"
5149         groups['queue']         = "Queue"
5150         groups['sync']          = "Synchronization"
5151         groups['tts']           = "Transaction Tracking"
5152         groups['qms']           = "Queue Management System (QMS)"
5153         groups['stats']         = "Server Statistics"
5154         groups['nmas']          = "Novell Modular Authentication Service"
5155         groups['sss']           = "SecretStore Services"
5156         groups['unknown']       = "Unknown"
5157
5158 ##############################################################################
5159 # NCP Errors
5160 ##############################################################################
5161 def define_errors():
5162         errors[0x0000] = "Ok"
5163         errors[0x0001] = "Transaction tracking is available"
5164         errors[0x0002] = "Ok. The data has been written"
5165         errors[0x0003] = "Calling Station is a Manager"
5166
5167         errors[0x0100] = "One or more of the Connection Numbers in the send list are invalid"
5168         errors[0x0101] = "Invalid space limit"
5169         errors[0x0102] = "Insufficient disk space"
5170         errors[0x0103] = "Queue server cannot add jobs"
5171         errors[0x0104] = "Out of disk space"
5172         errors[0x0105] = "Semaphore overflow"
5173         errors[0x0106] = "Invalid Parameter"
5174         errors[0x0107] = "Invalid Number of Minutes to Delay"
5175         errors[0x0108] = "Invalid Start or Network Number"
5176         errors[0x0109] = "Cannot Obtain License"
5177
5178         errors[0x0200] = "One or more clients in the send list are not logged in"
5179         errors[0x0201] = "Queue server cannot attach"
5180
5181         errors[0x0300] = "One or more clients in the send list are not accepting messages"
5182
5183         errors[0x0400] = "Client already has message"
5184         errors[0x0401] = "Queue server cannot service job"
5185
5186         errors[0x7300] = "Revoke Handle Rights Not Found"
5187         errors[0x7900] = "Invalid Parameter in Request Packet"
5188         errors[0x7901] = "Nothing being Compressed"
5189         errors[0x7a00] = "Connection Already Temporary"
5190         errors[0x7b00] = "Connection Already Logged in"
5191         errors[0x7c00] = "Connection Not Authenticated"
5192
5193         errors[0x7e00] = "NCP failed boundary check"
5194         errors[0x7e01] = "Invalid Length"
5195
5196         errors[0x7f00] = "Lock Waiting"
5197         errors[0x8000] = "Lock fail"
5198         errors[0x8001] = "File in Use"
5199
5200         errors[0x8100] = "A file handle could not be allocated by the file server"
5201         errors[0x8101] = "Out of File Handles"
5202
5203         errors[0x8200] = "Unauthorized to open the file"
5204         errors[0x8300] = "Unable to read/write the volume. Possible bad sector on the file server"
5205         errors[0x8301] = "Hard I/O Error"
5206
5207         errors[0x8400] = "Unauthorized to create the directory"
5208         errors[0x8401] = "Unauthorized to create the file"
5209
5210         errors[0x8500] = "Unauthorized to delete the specified file"
5211         errors[0x8501] = "Unauthorized to overwrite an existing file in this directory"
5212
5213         errors[0x8700] = "An unexpected character was encountered in the filename"
5214         errors[0x8701] = "Create Filename Error"
5215
5216         errors[0x8800] = "Invalid file handle"
5217         errors[0x8900] = "Unauthorized to search this file/directory"
5218         errors[0x8a00] = "Unauthorized to delete this file/directory"
5219         errors[0x8b00] = "Unauthorized to rename a file in this directory"
5220
5221         errors[0x8c00] = "No set privileges"
5222         errors[0x8c01] = "Unauthorized to modify a file in this directory"
5223         errors[0x8c02] = "Unauthorized to change the restriction on this volume"
5224
5225         errors[0x8d00] = "Some of the affected files are in use by another client"
5226         errors[0x8d01] = "The affected file is in use"
5227
5228         errors[0x8e00] = "All of the affected files are in use by another client"
5229         errors[0x8f00] = "Some of the affected files are read-only"
5230
5231         errors[0x9000] = "An attempt to modify a read-only volume occurred"
5232         errors[0x9001] = "All of the affected files are read-only"
5233         errors[0x9002] = "Read Only Access to Volume"
5234
5235         errors[0x9100] = "Some of the affected files already exist"
5236         errors[0x9101] = "Some Names Exist"
5237
5238         errors[0x9200] = "Directory with the new name already exists"
5239         errors[0x9201] = "All of the affected files already exist"
5240
5241         errors[0x9300] = "Unauthorized to read from this file"
5242         errors[0x9400] = "Unauthorized to write to this file"
5243         errors[0x9500] = "The affected file is detached"
5244
5245         errors[0x9600] = "The file server has run out of memory to service this request"
5246         errors[0x9601] = "No alloc space for message"
5247         errors[0x9602] = "Server Out of Space"
5248
5249         errors[0x9800] = "The affected volume is not mounted"
5250         errors[0x9801] = "The volume associated with Volume Number is not mounted"
5251         errors[0x9802] = "The resulting volume does not exist"
5252         errors[0x9803] = "The destination volume is not mounted"
5253         errors[0x9804] = "Disk Map Error"
5254
5255         errors[0x9900] = "The file server has run out of directory space on the affected volume"
5256         errors[0x9a00] = "Invalid request to rename the affected file to another volume"
5257
5258         errors[0x9b00] = "DirHandle is not associated with a valid directory path"
5259         errors[0x9b01] = "A resulting directory handle is not associated with a valid directory path"
5260         errors[0x9b02] = "The directory associated with DirHandle does not exist"
5261         errors[0x9b03] = "Bad directory handle"
5262
5263         errors[0x9c00] = "The resulting path is not valid"
5264         errors[0x9c01] = "The resulting file path is not valid"
5265         errors[0x9c02] = "The resulting directory path is not valid"
5266         errors[0x9c03] = "Invalid path"
5267
5268         errors[0x9d00] = "A directory handle was not available for allocation"
5269
5270         errors[0x9e00] = "The name of the directory does not conform to a legal name for this name space"
5271         errors[0x9e01] = "The new directory name does not conform to a legal name for this name space"
5272         errors[0x9e02] = "Bad File Name"
5273
5274         errors[0x9f00] = "The request attempted to delete a directory that is in use by another client"
5275
5276         errors[0xa000] = "The request attempted to delete a directory that is not empty"
5277         errors[0xa100] = "An unrecoverable error occured on the affected directory"
5278
5279         errors[0xa200] = "The request attempted to read from a file region that is physically locked"
5280         errors[0xa201] = "I/O Lock Error"
5281
5282         errors[0xa400] = "Invalid directory rename attempted"
5283         errors[0xa500] = "Invalid open create mode"
5284         errors[0xa600] = "Auditor Access has been Removed"
5285         errors[0xa700] = "Error Auditing Version"
5286
5287         errors[0xa800] = "Invalid Support Module ID"
5288         errors[0xa801] = "No Auditing Access Rights"
5289         errors[0xa802] = "No Access Rights"
5290
5291         errors[0xbe00] = "Invalid Data Stream"
5292         errors[0xbf00] = "Requests for this name space are not valid on this volume"
5293
5294         errors[0xc000] = "Unauthorized to retrieve accounting data"
5295
5296         errors[0xc100] = "The ACCOUNT_BALANCE property does not exist"
5297         errors[0xc101] = "No Account Balance"
5298
5299         errors[0xc200] = "The object has exceeded its credit limit"
5300         errors[0xc300] = "Too many holds have been placed against this account"
5301         errors[0xc400] = "The client account has been disabled"
5302
5303         errors[0xc500] = "Access to the account has been denied because of intruder detection"
5304         errors[0xc501] = "Login lockout"
5305         errors[0xc502] = "Server Login Locked"
5306
5307         errors[0xc600] = "The caller does not have operator priviliges"
5308         errors[0xc601] = "The client does not have operator priviliges"
5309
5310         errors[0xc800] = "Missing EA Key"
5311         errors[0xc900] = "EA Not Found"
5312         errors[0xca00] = "Invalid EA Handle Type"
5313         errors[0xcb00] = "EA No Key No Data"
5314         errors[0xcc00] = "EA Number Mismatch"
5315         errors[0xcd00] = "Extent Number Out of Range"
5316         errors[0xce00] = "EA Bad Directory Number"
5317         errors[0xcf00] = "Invalid EA Handle"
5318
5319         errors[0xd000] = "Queue error"
5320         errors[0xd001] = "EA Position Out of Range"
5321
5322         errors[0xd100] = "The queue does not exist"
5323         errors[0xd101] = "EA Access Denied"
5324
5325         errors[0xd200] = "A queue server is not associated with this queue"
5326         errors[0xd201] = "A queue server is not associated with the selected queue"
5327         errors[0xd202] = "No queue server"
5328         errors[0xd203] = "Data Page Odd Size"
5329
5330         errors[0xd300] = "No queue rights"
5331         errors[0xd301] = "EA Volume Not Mounted"
5332
5333         errors[0xd400] = "The queue is full and cannot accept another request"
5334         errors[0xd401] = "The queue associated with ObjectId is full and cannot accept another request"
5335         errors[0xd402] = "Bad Page Boundary"
5336
5337         errors[0xd500] = "A job does not exist in this queue"
5338         errors[0xd501] = "No queue job"
5339         errors[0xd502] = "The job associated with JobNumber does not exist in this queue"
5340         errors[0xd503] = "Inspect Failure"
5341         errors[0xd504] = "Unknown NCP Extension Number"
5342
5343         errors[0xd600] = "The file server does not allow unencrypted passwords"
5344         errors[0xd601] = "No job right"
5345         errors[0xd602] = "EA Already Claimed"
5346
5347         errors[0xd700] = "Bad account"
5348         errors[0xd701] = "The old and new password strings are identical"
5349         errors[0xd702] = "The job is currently being serviced"
5350         errors[0xd703] = "The queue is currently servicing a job"
5351         errors[0xd704] = "Queue servicing"
5352         errors[0xd705] = "Odd Buffer Size"
5353
5354         errors[0xd800] = "Queue not active"
5355         errors[0xd801] = "No Scorecards"
5356
5357         errors[0xd900] = "The file server cannot accept another connection as it has reached its limit"
5358         errors[0xd901] = "The client is not security equivalent to one of the objects in the Q_SERVERS group property of the target queue"
5359         errors[0xd902] = "Station is not a server"
5360         errors[0xd903] = "Bad EDS Signature"
5361         errors[0xd904] = "Attempt to log in using an account which has limits on the number of concurrent connections and that number has been reached."
5362     
5363         errors[0xda00] = "Attempted to login to the file server during a restricted time period"
5364         errors[0xda01] = "Queue halted"
5365         errors[0xda02] = "EA Space Limit"
5366
5367         errors[0xdb00] = "Attempted to login to the file server from an unauthorized workstation or network"
5368         errors[0xdb01] = "The queue cannot attach another queue server"
5369         errors[0xdb02] = "Maximum queue servers"
5370         errors[0xdb03] = "EA Key Corrupt"
5371
5372         errors[0xdc00] = "Account Expired"
5373         errors[0xdc01] = "EA Key Limit"
5374
5375         errors[0xdd00] = "Tally Corrupt"
5376         errors[0xde00] = "Attempted to login to the file server with an incorrect password"
5377         errors[0xdf00] = "Attempted to login to the file server with a password that has expired"
5378
5379         errors[0xe000] = "No Login Connections Available"
5380         errors[0xe700] = "No disk track"
5381         errors[0xe800] = "Write to group"
5382         errors[0xe900] = "The object is already a member of the group property"
5383
5384         errors[0xea00] = "No such member"
5385         errors[0xea01] = "The bindery object is not a member of the set"
5386         errors[0xea02] = "Non-existent member"
5387
5388         errors[0xeb00] = "The property is not a set property"
5389
5390         errors[0xec00] = "No such set"
5391         errors[0xec01] = "The set property does not exist"
5392
5393         errors[0xed00] = "Property exists"
5394         errors[0xed01] = "The property already exists"
5395         errors[0xed02] = "An attempt was made to create a bindery object property that already exists"
5396
5397         errors[0xee00] = "The object already exists"
5398         errors[0xee01] = "The bindery object already exists"
5399
5400         errors[0xef00] = "Illegal name"
5401         errors[0xef01] = "Illegal characters in ObjectName field"
5402         errors[0xef02] = "Invalid name"
5403
5404         errors[0xf000] = "A wildcard was detected in a field that does not support wildcards"
5405         errors[0xf001] = "An illegal wildcard was detected in ObjectName"
5406
5407         errors[0xf100] = "The client does not have the rights to access this bindery object"
5408         errors[0xf101] = "Bindery security"
5409         errors[0xf102] = "Invalid bindery security"
5410
5411         errors[0xf200] = "Unauthorized to read from this object"
5412         errors[0xf300] = "Unauthorized to rename this object"
5413
5414         errors[0xf400] = "Unauthorized to delete this object"
5415         errors[0xf401] = "No object delete privileges"
5416         errors[0xf402] = "Unauthorized to delete this queue"
5417
5418         errors[0xf500] = "Unauthorized to create this object"
5419         errors[0xf501] = "No object create"
5420
5421         errors[0xf600] = "No property delete"
5422         errors[0xf601] = "Unauthorized to delete the property of this object"
5423         errors[0xf602] = "Unauthorized to delete this property"
5424
5425         errors[0xf700] = "Unauthorized to create this property"
5426         errors[0xf701] = "No property create privilege"
5427
5428         errors[0xf800] = "Unauthorized to write to this property"
5429         errors[0xf900] = "Unauthorized to read this property"
5430         errors[0xfa00] = "Temporary remap error"
5431
5432         errors[0xfb00] = "No such property"
5433         errors[0xfb01] = "The file server does not support this request"
5434         errors[0xfb02] = "The specified property does not exist"
5435         errors[0xfb03] = "The PASSWORD property does not exist for this bindery object"
5436         errors[0xfb04] = "NDS NCP not available"
5437         errors[0xfb05] = "Bad Directory Handle"
5438         errors[0xfb06] = "Unknown Request"
5439         errors[0xfb07] = "Invalid Subfunction Request"
5440         errors[0xfb08] = "Attempt to use an invalid parameter (drive number, path, or flag value) during a set drive path call"
5441         errors[0xfb09] = "NMAS not running on this server, NCP NOT Supported"
5442         errors[0xfb0a] = "Station Not Logged In"
5443         errors[0xfb0b] = "Secret Store not running on this server, NCP Not supported"
5444
5445         errors[0xfc00] = "The message queue cannot accept another message"
5446         errors[0xfc01] = "The trustee associated with ObjectId does not exist"
5447         errors[0xfc02] = "The specified bindery object does not exist"
5448         errors[0xfc03] = "The bindery object associated with ObjectID does not exist"
5449         errors[0xfc04] = "A bindery object does not exist that matches"
5450         errors[0xfc05] = "The specified queue does not exist"
5451         errors[0xfc06] = "No such object"
5452         errors[0xfc07] = "The queue associated with ObjectID does not exist"
5453
5454         errors[0xfd00] = "Bad station number"
5455         errors[0xfd01] = "The connection associated with ConnectionNumber is not active"
5456         errors[0xfd02] = "Lock collision"
5457         errors[0xfd03] = "Transaction tracking is disabled"
5458
5459         errors[0xfe00] = "I/O failure"
5460         errors[0xfe01] = "The files containing the bindery on the file server are locked"
5461         errors[0xfe02] = "A file with the specified name already exists in this directory"
5462         errors[0xfe03] = "No more restrictions were found"
5463         errors[0xfe04] = "The file server was unable to lock the file within the specified time limit"
5464         errors[0xfe05] = "The file server was unable to lock all files within the specified time limit"
5465         errors[0xfe06] = "The bindery object associated with ObjectID is not a valid trustee"
5466         errors[0xfe07] = "Directory locked"
5467         errors[0xfe08] = "Bindery locked"
5468         errors[0xfe09] = "Invalid semaphore name length"
5469         errors[0xfe0a] = "The file server was unable to complete the operation within the specified time limit"
5470         errors[0xfe0b] = "Transaction restart"
5471         errors[0xfe0c] = "Bad packet"
5472         errors[0xfe0d] = "Timeout"
5473         errors[0xfe0e] = "User Not Found"
5474         errors[0xfe0f] = "Trustee Not Found"
5475
5476         errors[0xff00] = "Failure"
5477         errors[0xff01] = "Lock error"
5478         errors[0xff02] = "File not found"
5479         errors[0xff03] = "The file not found or cannot be unlocked"
5480         errors[0xff04] = "Record not found"
5481         errors[0xff05] = "The logical record was not found"
5482         errors[0xff06] = "The printer associated with Printer Number does not exist"
5483         errors[0xff07] = "No such printer"
5484         errors[0xff08] = "Unable to complete the request"
5485         errors[0xff09] = "Unauthorized to change privileges of this trustee"
5486         errors[0xff0a] = "No files matching the search criteria were found"
5487         errors[0xff0b] = "A file matching the search criteria was not found"
5488         errors[0xff0c] = "Verification failed"
5489         errors[0xff0d] = "Object associated with ObjectID is not a manager"
5490         errors[0xff0e] = "Invalid initial semaphore value"
5491         errors[0xff0f] = "The semaphore handle is not valid"
5492         errors[0xff10] = "SemaphoreHandle is not associated with a valid sempahore"
5493         errors[0xff11] = "Invalid semaphore handle"
5494         errors[0xff12] = "Transaction tracking is not available"
5495         errors[0xff13] = "The transaction has not yet been written to disk"
5496         errors[0xff14] = "Directory already exists"
5497         errors[0xff15] = "The file already exists and the deletion flag was not set"
5498         errors[0xff16] = "No matching files or directories were found"
5499         errors[0xff17] = "A file or directory matching the search criteria was not found"
5500         errors[0xff18] = "The file already exists"
5501         errors[0xff19] = "Failure, No files found"
5502         errors[0xff1a] = "Unlock Error"
5503         errors[0xff1b] = "I/O Bound Error"
5504         errors[0xff1c] = "Not Accepting Messages"
5505         errors[0xff1d] = "No More Salvageable Files in Directory"
5506         errors[0xff1e] = "Calling Station is Not a Manager"
5507         errors[0xff1f] = "Bindery Failure"
5508         errors[0xff20] = "NCP Extension Not Found"
5509
5510 ##############################################################################
5511 # Produce C code
5512 ##############################################################################
5513 def ExamineVars(vars, structs_hash, vars_hash):
5514         for var in vars:
5515                 if isinstance(var, struct):
5516                         structs_hash[var.HFName()] = var
5517                         struct_vars = var.Variables()
5518                         ExamineVars(struct_vars, structs_hash, vars_hash)
5519                 else:
5520                         vars_hash[repr(var)] = var
5521                         if isinstance(var, bitfield):
5522                                 sub_vars = var.SubVariables()
5523                                 ExamineVars(sub_vars, structs_hash, vars_hash)
5524
5525 def produce_code():
5526
5527         global errors
5528
5529         print "/*"
5530         print " * Generated automatically from %s" % (sys.argv[0])
5531         print " * Do not edit this file manually, as all changes will be lost."
5532         print " */\n"
5533
5534         print """
5535 /*
5536  * Portions Copyright (c) Gilbert Ramirez 2000-2002
5537  * Portions Copyright (c) Novell, Inc. 2000-2003
5538  *
5539  * This program is free software; you can redistribute it and/or
5540  * modify it under the terms of the GNU General Public License
5541  * as published by the Free Software Foundation; either version 2
5542  * of the License, or (at your option) any later version.
5543  *
5544  * This program is distributed in the hope that it will be useful,
5545  * but WITHOUT ANY WARRANTY; without even the implied warranty of
5546  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5547  * GNU General Public License for more details.
5548  *
5549  * You should have received a copy of the GNU General Public License
5550  * along with this program; if not, write to the Free Software
5551  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
5552  */
5553
5554 #ifdef HAVE_CONFIG_H
5555 # include "config.h"
5556 #endif
5557
5558 #include <string.h>
5559 #include <glib.h>
5560 #include <epan/packet.h>
5561 #include <epan/conversation.h>
5562 #include "ptvcursor.h"
5563 #include "packet-ncp-int.h"
5564 #include "packet-ncp-nmas.h"
5565 #include <epan/strutil.h>
5566 #include "reassemble.h"
5567
5568 /* Function declarations for functions used in proto_register_ncp2222() */
5569 static void ncp_init_protocol(void);
5570 static void ncp_postseq_cleanup(void);
5571
5572 /* Endianness macros */
5573 #define BE              0
5574 #define LE              1
5575 #define NO_ENDIANNESS   0
5576
5577 #define NO_LENGTH       -1
5578
5579 /* We use this int-pointer as a special flag in ptvc_record's */
5580 static int ptvc_struct_int_storage;
5581 #define PTVC_STRUCT     (&ptvc_struct_int_storage)
5582
5583 /* Values used in the count-variable ("var"/"repeat") logic. */"""
5584
5585
5586         if global_highest_var > -1:
5587                 print "#define NUM_REPEAT_VARS\t%d" % (global_highest_var + 1)
5588                 print "guint repeat_vars[NUM_REPEAT_VARS];",
5589         else:
5590                 print "#define NUM_REPEAT_VARS\t0"
5591                 print "guint *repeat_vars = NULL;",
5592
5593         print """
5594 #define NO_VAR          NUM_REPEAT_VARS
5595 #define NO_REPEAT       NUM_REPEAT_VARS
5596
5597 #define REQ_COND_SIZE_CONSTANT  0
5598 #define REQ_COND_SIZE_VARIABLE  1
5599 #define NO_REQ_COND_SIZE        0
5600
5601
5602 #define NTREE   0x00020000
5603 #define NDEPTH  0x00000002
5604 #define NREV    0x00000004
5605 #define NFLAGS  0x00000008
5606
5607
5608 static int hf_ncp_func = -1;
5609 static int hf_ncp_length = -1;
5610 static int hf_ncp_subfunc = -1;
5611 static int hf_ncp_fragment_handle = -1;
5612 static int hf_ncp_completion_code = -1;
5613 static int hf_ncp_connection_status = -1;
5614 static int hf_ncp_req_frame_num = -1;
5615 static int hf_ncp_req_frame_time = -1;
5616 static int hf_ncp_fragment_size = -1;
5617 static int hf_ncp_message_size = -1;
5618 static int hf_ncp_nds_flag = -1;
5619 static int hf_ncp_nds_verb = -1;
5620 static int hf_ping_version = -1;
5621 static int hf_nds_version = -1;
5622 static int hf_nds_flags = -1;
5623 static int hf_nds_reply_depth = -1;
5624 static int hf_nds_reply_rev = -1;
5625 static int hf_nds_reply_flags = -1;
5626 static int hf_nds_p1type = -1;
5627 static int hf_nds_uint32value = -1;
5628 static int hf_nds_bit1 = -1;
5629 static int hf_nds_bit2 = -1;
5630 static int hf_nds_bit3 = -1;
5631 static int hf_nds_bit4 = -1;
5632 static int hf_nds_bit5 = -1;
5633 static int hf_nds_bit6 = -1;
5634 static int hf_nds_bit7 = -1;
5635 static int hf_nds_bit8 = -1;
5636 static int hf_nds_bit9 = -1;
5637 static int hf_nds_bit10 = -1;
5638 static int hf_nds_bit11 = -1;
5639 static int hf_nds_bit12 = -1;
5640 static int hf_nds_bit13 = -1;
5641 static int hf_nds_bit14 = -1;
5642 static int hf_nds_bit15 = -1;
5643 static int hf_nds_bit16 = -1;
5644 static int hf_bit1outflags = -1;
5645 static int hf_bit2outflags = -1;
5646 static int hf_bit3outflags = -1;
5647 static int hf_bit4outflags = -1;
5648 static int hf_bit5outflags = -1;
5649 static int hf_bit6outflags = -1;
5650 static int hf_bit7outflags = -1;
5651 static int hf_bit8outflags = -1;
5652 static int hf_bit9outflags = -1;
5653 static int hf_bit10outflags = -1;
5654 static int hf_bit11outflags = -1;
5655 static int hf_bit12outflags = -1;
5656 static int hf_bit13outflags = -1;
5657 static int hf_bit14outflags = -1;
5658 static int hf_bit15outflags = -1;
5659 static int hf_bit16outflags = -1;
5660 static int hf_bit1nflags = -1;
5661 static int hf_bit2nflags = -1;
5662 static int hf_bit3nflags = -1;
5663 static int hf_bit4nflags = -1;
5664 static int hf_bit5nflags = -1;
5665 static int hf_bit6nflags = -1;
5666 static int hf_bit7nflags = -1;
5667 static int hf_bit8nflags = -1;
5668 static int hf_bit9nflags = -1;
5669 static int hf_bit10nflags = -1;
5670 static int hf_bit11nflags = -1;
5671 static int hf_bit12nflags = -1;
5672 static int hf_bit13nflags = -1;
5673 static int hf_bit14nflags = -1;
5674 static int hf_bit15nflags = -1;
5675 static int hf_bit16nflags = -1;
5676 static int hf_bit1rflags = -1;
5677 static int hf_bit2rflags = -1;
5678 static int hf_bit3rflags = -1;
5679 static int hf_bit4rflags = -1;
5680 static int hf_bit5rflags = -1;
5681 static int hf_bit6rflags = -1;
5682 static int hf_bit7rflags = -1;
5683 static int hf_bit8rflags = -1;
5684 static int hf_bit9rflags = -1;
5685 static int hf_bit10rflags = -1;
5686 static int hf_bit11rflags = -1;
5687 static int hf_bit12rflags = -1;
5688 static int hf_bit13rflags = -1;
5689 static int hf_bit14rflags = -1;
5690 static int hf_bit15rflags = -1;
5691 static int hf_bit16rflags = -1;
5692 static int hf_bit1cflags = -1;
5693 static int hf_bit2cflags = -1;
5694 static int hf_bit3cflags = -1;
5695 static int hf_bit4cflags = -1;
5696 static int hf_bit5cflags = -1;
5697 static int hf_bit6cflags = -1;
5698 static int hf_bit7cflags = -1;
5699 static int hf_bit8cflags = -1;
5700 static int hf_bit9cflags = -1;
5701 static int hf_bit10cflags = -1;
5702 static int hf_bit11cflags = -1;
5703 static int hf_bit12cflags = -1;
5704 static int hf_bit13cflags = -1;
5705 static int hf_bit14cflags = -1;
5706 static int hf_bit15cflags = -1;
5707 static int hf_bit16cflags = -1;
5708 static int hf_bit1acflags = -1;
5709 static int hf_bit2acflags = -1;
5710 static int hf_bit3acflags = -1;
5711 static int hf_bit4acflags = -1;
5712 static int hf_bit5acflags = -1;
5713 static int hf_bit6acflags = -1;
5714 static int hf_bit7acflags = -1;
5715 static int hf_bit8acflags = -1;
5716 static int hf_bit9acflags = -1;
5717 static int hf_bit10acflags = -1;
5718 static int hf_bit11acflags = -1;
5719 static int hf_bit12acflags = -1;
5720 static int hf_bit13acflags = -1;
5721 static int hf_bit14acflags = -1;
5722 static int hf_bit15acflags = -1;
5723 static int hf_bit16acflags = -1;
5724 static int hf_bit1vflags = -1;
5725 static int hf_bit2vflags = -1;
5726 static int hf_bit3vflags = -1;
5727 static int hf_bit4vflags = -1;
5728 static int hf_bit5vflags = -1;
5729 static int hf_bit6vflags = -1;
5730 static int hf_bit7vflags = -1;
5731 static int hf_bit8vflags = -1;
5732 static int hf_bit9vflags = -1;
5733 static int hf_bit10vflags = -1;
5734 static int hf_bit11vflags = -1;
5735 static int hf_bit12vflags = -1;
5736 static int hf_bit13vflags = -1;
5737 static int hf_bit14vflags = -1;
5738 static int hf_bit15vflags = -1;
5739 static int hf_bit16vflags = -1;
5740 static int hf_bit1eflags = -1;
5741 static int hf_bit2eflags = -1;
5742 static int hf_bit3eflags = -1;
5743 static int hf_bit4eflags = -1;
5744 static int hf_bit5eflags = -1;
5745 static int hf_bit6eflags = -1;
5746 static int hf_bit7eflags = -1;
5747 static int hf_bit8eflags = -1;
5748 static int hf_bit9eflags = -1;
5749 static int hf_bit10eflags = -1;
5750 static int hf_bit11eflags = -1;
5751 static int hf_bit12eflags = -1;
5752 static int hf_bit13eflags = -1;
5753 static int hf_bit14eflags = -1;
5754 static int hf_bit15eflags = -1;
5755 static int hf_bit16eflags = -1;
5756 static int hf_bit1infoflagsl = -1;
5757 static int hf_bit2infoflagsl = -1;
5758 static int hf_bit3infoflagsl = -1;
5759 static int hf_bit4infoflagsl = -1;
5760 static int hf_bit5infoflagsl = -1;
5761 static int hf_bit6infoflagsl = -1;
5762 static int hf_bit7infoflagsl = -1;
5763 static int hf_bit8infoflagsl = -1;
5764 static int hf_bit9infoflagsl = -1;
5765 static int hf_bit10infoflagsl = -1;
5766 static int hf_bit11infoflagsl = -1;
5767 static int hf_bit12infoflagsl = -1;
5768 static int hf_bit13infoflagsl = -1;
5769 static int hf_bit14infoflagsl = -1;
5770 static int hf_bit15infoflagsl = -1;
5771 static int hf_bit16infoflagsl = -1;
5772 static int hf_bit1infoflagsh = -1;
5773 static int hf_bit2infoflagsh = -1;
5774 static int hf_bit3infoflagsh = -1;
5775 static int hf_bit4infoflagsh = -1;
5776 static int hf_bit5infoflagsh = -1;
5777 static int hf_bit6infoflagsh = -1;
5778 static int hf_bit7infoflagsh = -1;
5779 static int hf_bit8infoflagsh = -1;
5780 static int hf_bit9infoflagsh = -1;
5781 static int hf_bit10infoflagsh = -1;
5782 static int hf_bit11infoflagsh = -1;
5783 static int hf_bit12infoflagsh = -1;
5784 static int hf_bit13infoflagsh = -1;
5785 static int hf_bit14infoflagsh = -1;
5786 static int hf_bit15infoflagsh = -1;
5787 static int hf_bit16infoflagsh = -1;
5788 static int hf_bit1lflags = -1;
5789 static int hf_bit2lflags = -1;
5790 static int hf_bit3lflags = -1;
5791 static int hf_bit4lflags = -1;
5792 static int hf_bit5lflags = -1;
5793 static int hf_bit6lflags = -1;
5794 static int hf_bit7lflags = -1;
5795 static int hf_bit8lflags = -1;
5796 static int hf_bit9lflags = -1;
5797 static int hf_bit10lflags = -1;
5798 static int hf_bit11lflags = -1;
5799 static int hf_bit12lflags = -1;
5800 static int hf_bit13lflags = -1;
5801 static int hf_bit14lflags = -1;
5802 static int hf_bit15lflags = -1;
5803 static int hf_bit16lflags = -1;
5804 static int hf_bit1l1flagsl = -1;
5805 static int hf_bit2l1flagsl = -1;
5806 static int hf_bit3l1flagsl = -1;
5807 static int hf_bit4l1flagsl = -1;
5808 static int hf_bit5l1flagsl = -1;
5809 static int hf_bit6l1flagsl = -1;
5810 static int hf_bit7l1flagsl = -1;
5811 static int hf_bit8l1flagsl = -1;
5812 static int hf_bit9l1flagsl = -1;
5813 static int hf_bit10l1flagsl = -1;
5814 static int hf_bit11l1flagsl = -1;
5815 static int hf_bit12l1flagsl = -1;
5816 static int hf_bit13l1flagsl = -1;
5817 static int hf_bit14l1flagsl = -1;
5818 static int hf_bit15l1flagsl = -1;
5819 static int hf_bit16l1flagsl = -1;
5820 static int hf_bit1l1flagsh = -1;
5821 static int hf_bit2l1flagsh = -1;
5822 static int hf_bit3l1flagsh = -1;
5823 static int hf_bit4l1flagsh = -1;
5824 static int hf_bit5l1flagsh = -1;
5825 static int hf_bit6l1flagsh = -1;
5826 static int hf_bit7l1flagsh = -1;
5827 static int hf_bit8l1flagsh = -1;
5828 static int hf_bit9l1flagsh = -1;
5829 static int hf_bit10l1flagsh = -1;
5830 static int hf_bit11l1flagsh = -1;
5831 static int hf_bit12l1flagsh = -1;
5832 static int hf_bit13l1flagsh = -1;
5833 static int hf_bit14l1flagsh = -1;
5834 static int hf_bit15l1flagsh = -1;
5835 static int hf_bit16l1flagsh = -1;
5836 static int hf_nds_tree_name = -1;
5837 static int hf_nds_reply_error = -1;
5838 static int hf_nds_net = -1;
5839 static int hf_nds_node = -1;
5840 static int hf_nds_socket = -1;
5841 static int hf_add_ref_ip = -1;
5842 static int hf_add_ref_udp = -1;
5843 static int hf_add_ref_tcp = -1;
5844 static int hf_referral_record = -1;
5845 static int hf_referral_addcount = -1;
5846 static int hf_nds_port = -1;
5847 static int hf_mv_string = -1;
5848 static int hf_nds_syntax = -1;
5849 static int hf_value_string = -1;
5850 static int hf_nds_buffer_size = -1;
5851 static int hf_nds_ver = -1;
5852 static int hf_nds_nflags = -1;
5853 static int hf_nds_scope = -1;
5854 static int hf_nds_name = -1;
5855 static int hf_nds_comm_trans = -1;
5856 static int hf_nds_tree_trans = -1;
5857 static int hf_nds_iteration = -1;
5858 static int hf_nds_eid = -1;
5859 static int hf_nds_info_type = -1;
5860 static int hf_nds_all_attr = -1;
5861 static int hf_nds_req_flags = -1;
5862 static int hf_nds_attr = -1;
5863 static int hf_nds_crc = -1;
5864 static int hf_nds_referrals = -1;
5865 static int hf_nds_result_flags = -1;
5866 static int hf_nds_tag_string = -1;
5867 static int hf_value_bytes = -1;
5868 static int hf_replica_type = -1;
5869 static int hf_replica_state = -1;
5870 static int hf_replica_number = -1;
5871 static int hf_min_nds_ver = -1;
5872 static int hf_nds_ver_include = -1;
5873 static int hf_nds_ver_exclude = -1;
5874 static int hf_nds_es = -1;
5875 static int hf_es_type = -1;
5876 static int hf_delim_string = -1;
5877 static int hf_rdn_string = -1;
5878 static int hf_nds_revent = -1;
5879 static int hf_nds_rnum = -1;
5880 static int hf_nds_name_type = -1;
5881 static int hf_nds_rflags = -1;
5882 static int hf_nds_eflags = -1;
5883 static int hf_nds_depth = -1;
5884 static int hf_nds_class_def_type = -1;
5885 static int hf_nds_classes = -1;
5886 static int hf_nds_return_all_classes = -1;
5887 static int hf_nds_stream_flags = -1;
5888 static int hf_nds_stream_name = -1;
5889 static int hf_nds_file_handle = -1;
5890 static int hf_nds_file_size = -1;
5891 static int hf_nds_dn_output_type = -1;
5892 static int hf_nds_nested_output_type = -1;
5893 static int hf_nds_output_delimiter = -1;
5894 static int hf_nds_output_entry_specifier = -1;
5895 static int hf_es_value = -1;
5896 static int hf_es_rdn_count = -1;
5897 static int hf_nds_replica_num = -1;
5898 static int hf_nds_event_num = -1;
5899 static int hf_es_seconds = -1;
5900 static int hf_nds_compare_results = -1;
5901 static int hf_nds_parent = -1;
5902 static int hf_nds_name_filter = -1;
5903 static int hf_nds_class_filter = -1;
5904 static int hf_nds_time_filter = -1;
5905 static int hf_nds_partition_root_id = -1;
5906 static int hf_nds_replicas = -1;
5907 static int hf_nds_purge = -1;
5908 static int hf_nds_local_partition = -1;
5909 static int hf_partition_busy = -1;
5910 static int hf_nds_number_of_changes = -1;
5911 static int hf_sub_count = -1;
5912 static int hf_nds_revision = -1;
5913 static int hf_nds_base_class = -1;
5914 static int hf_nds_relative_dn = -1;
5915 static int hf_nds_root_dn = -1;
5916 static int hf_nds_parent_dn = -1;
5917 static int hf_deref_base = -1;
5918 static int hf_nds_entry_info = -1;
5919 static int hf_nds_base = -1;
5920 static int hf_nds_privileges = -1;
5921 static int hf_nds_vflags = -1;
5922 static int hf_nds_value_len = -1;
5923 static int hf_nds_cflags = -1;
5924 static int hf_nds_acflags = -1;
5925 static int hf_nds_asn1 = -1;
5926 static int hf_nds_upper = -1;
5927 static int hf_nds_lower = -1;
5928 static int hf_nds_trustee_dn = -1;
5929 static int hf_nds_attribute_dn = -1;
5930 static int hf_nds_acl_add = -1;
5931 static int hf_nds_acl_del = -1;
5932 static int hf_nds_att_add = -1;
5933 static int hf_nds_att_del = -1;
5934 static int hf_nds_keep = -1;
5935 static int hf_nds_new_rdn = -1;
5936 static int hf_nds_time_delay = -1;
5937 static int hf_nds_root_name = -1;
5938 static int hf_nds_new_part_id = -1;
5939 static int hf_nds_child_part_id = -1;
5940 static int hf_nds_master_part_id = -1;
5941 static int hf_nds_target_name = -1;
5942 static int hf_nds_super = -1;
5943 static int hf_bit1pingflags2 = -1;
5944 static int hf_bit2pingflags2 = -1;
5945 static int hf_bit3pingflags2 = -1;
5946 static int hf_bit4pingflags2 = -1;
5947 static int hf_bit5pingflags2 = -1;
5948 static int hf_bit6pingflags2 = -1;
5949 static int hf_bit7pingflags2 = -1;
5950 static int hf_bit8pingflags2 = -1;
5951 static int hf_bit9pingflags2 = -1;
5952 static int hf_bit10pingflags2 = -1;
5953 static int hf_bit11pingflags2 = -1;
5954 static int hf_bit12pingflags2 = -1;
5955 static int hf_bit13pingflags2 = -1;
5956 static int hf_bit14pingflags2 = -1;
5957 static int hf_bit15pingflags2 = -1;
5958 static int hf_bit16pingflags2 = -1;
5959 static int hf_bit1pingflags1 = -1;
5960 static int hf_bit2pingflags1 = -1;
5961 static int hf_bit3pingflags1 = -1;
5962 static int hf_bit4pingflags1 = -1;
5963 static int hf_bit5pingflags1 = -1;
5964 static int hf_bit6pingflags1 = -1;
5965 static int hf_bit7pingflags1 = -1;
5966 static int hf_bit8pingflags1 = -1;
5967 static int hf_bit9pingflags1 = -1;
5968 static int hf_bit10pingflags1 = -1;
5969 static int hf_bit11pingflags1 = -1;
5970 static int hf_bit12pingflags1 = -1;
5971 static int hf_bit13pingflags1 = -1;
5972 static int hf_bit14pingflags1 = -1;
5973 static int hf_bit15pingflags1 = -1;
5974 static int hf_bit16pingflags1 = -1;
5975 static int hf_bit1pingpflags1 = -1;
5976 static int hf_bit2pingpflags1 = -1;
5977 static int hf_bit3pingpflags1 = -1;
5978 static int hf_bit4pingpflags1 = -1;
5979 static int hf_bit5pingpflags1 = -1;
5980 static int hf_bit6pingpflags1 = -1;
5981 static int hf_bit7pingpflags1 = -1;
5982 static int hf_bit8pingpflags1 = -1;
5983 static int hf_bit9pingpflags1 = -1;
5984 static int hf_bit10pingpflags1 = -1;
5985 static int hf_bit11pingpflags1 = -1;
5986 static int hf_bit12pingpflags1 = -1;
5987 static int hf_bit13pingpflags1 = -1;
5988 static int hf_bit14pingpflags1 = -1;
5989 static int hf_bit15pingpflags1 = -1;
5990 static int hf_bit16pingpflags1 = -1;
5991 static int hf_bit1pingvflags1 = -1;
5992 static int hf_bit2pingvflags1 = -1;
5993 static int hf_bit3pingvflags1 = -1;
5994 static int hf_bit4pingvflags1 = -1;
5995 static int hf_bit5pingvflags1 = -1;
5996 static int hf_bit6pingvflags1 = -1;
5997 static int hf_bit7pingvflags1 = -1;
5998 static int hf_bit8pingvflags1 = -1;
5999 static int hf_bit9pingvflags1 = -1;
6000 static int hf_bit10pingvflags1 = -1;
6001 static int hf_bit11pingvflags1 = -1;
6002 static int hf_bit12pingvflags1 = -1;
6003 static int hf_bit13pingvflags1 = -1;
6004 static int hf_bit14pingvflags1 = -1;
6005 static int hf_bit15pingvflags1 = -1;
6006 static int hf_bit16pingvflags1 = -1;
6007 static int hf_nds_letter_ver = -1;
6008 static int hf_nds_os_ver = -1;
6009 static int hf_nds_lic_flags = -1;
6010 static int hf_nds_ds_time = -1;
6011 static int hf_nds_ping_version = -1;
6012 static int hf_nds_search_scope = -1;
6013 static int hf_nds_num_objects = -1;
6014 static int hf_bit1siflags = -1;
6015 static int hf_bit2siflags = -1;
6016 static int hf_bit3siflags = -1;
6017 static int hf_bit4siflags = -1;
6018 static int hf_bit5siflags = -1;
6019 static int hf_bit6siflags = -1;
6020 static int hf_bit7siflags = -1;
6021 static int hf_bit8siflags = -1;
6022 static int hf_bit9siflags = -1;
6023 static int hf_bit10siflags = -1;
6024 static int hf_bit11siflags = -1;
6025 static int hf_bit12siflags = -1;
6026 static int hf_bit13siflags = -1;
6027 static int hf_bit14siflags = -1;
6028 static int hf_bit15siflags = -1;
6029 static int hf_bit16siflags = -1;
6030 static int hf_nds_segments = -1;
6031 static int hf_nds_segment = -1;
6032 static int hf_nds_segment_overlap = -1;
6033 static int hf_nds_segment_overlap_conflict = -1;
6034 static int hf_nds_segment_multiple_tails = -1;
6035 static int hf_nds_segment_too_long_segment = -1;
6036 static int hf_nds_segment_error = -1;
6037
6038
6039         """
6040
6041         # Look at all packet types in the packets collection, and cull information
6042         # from them.
6043         errors_used_list = []
6044         errors_used_hash = {}
6045         groups_used_list = []
6046         groups_used_hash = {}
6047         variables_used_hash = {}
6048         structs_used_hash = {}
6049
6050         for pkt in packets:
6051                 # Determine which error codes are used.
6052                 codes = pkt.CompletionCodes()
6053                 for code in codes.Records():
6054                         if not errors_used_hash.has_key(code):
6055                                 errors_used_hash[code] = len(errors_used_list)
6056                                 errors_used_list.append(code)
6057
6058                 # Determine which groups are used.
6059                 group = pkt.Group()
6060                 if not groups_used_hash.has_key(group):
6061                         groups_used_hash[group] = len(groups_used_list)
6062                         groups_used_list.append(group)
6063
6064                 # Determine which variables are used.
6065                 vars = pkt.Variables()
6066                 ExamineVars(vars, structs_used_hash, variables_used_hash)
6067
6068
6069         # Print the hf variable declarations
6070         sorted_vars = variables_used_hash.values()
6071         sorted_vars.sort()
6072         for var in sorted_vars:
6073                 print "static int " + var.HFName() + " = -1;"
6074
6075
6076         # Print the value_string's
6077         for var in sorted_vars:
6078                 if isinstance(var, val_string):
6079                         print ""
6080                         print var.Code()
6081
6082         # Determine which error codes are not used
6083         errors_not_used = {}
6084         # Copy the keys from the error list...
6085         for code in errors.keys():
6086                 errors_not_used[code] = 1
6087         # ... and remove the ones that *were* used.
6088         for code in errors_used_list:
6089                 del errors_not_used[code]
6090
6091         # Print a remark showing errors not used
6092         list_errors_not_used = errors_not_used.keys()
6093         list_errors_not_used.sort()
6094         for code in list_errors_not_used:
6095                 print "/* Error 0x%04x not used: %s */" % (code, errors[code])
6096         print "\n"
6097
6098         # Print the errors table
6099         print "/* Error strings. */"
6100         print "static const char *ncp_errors[] = {"
6101         for code in errors_used_list:
6102                 print '\t/* %02d (0x%04x) */ "%s",' % (errors_used_hash[code], code, errors[code])
6103         print "};\n"
6104
6105
6106
6107
6108         # Determine which groups are not used
6109         groups_not_used = {}
6110         # Copy the keys from the group list...
6111         for group in groups.keys():
6112                 groups_not_used[group] = 1
6113         # ... and remove the ones that *were* used.
6114         for group in groups_used_list:
6115                 del groups_not_used[group]
6116
6117         # Print a remark showing groups not used
6118         list_groups_not_used = groups_not_used.keys()
6119         list_groups_not_used.sort()
6120         for group in list_groups_not_used:
6121                 print "/* Group not used: %s = %s */" % (group, groups[group])
6122         print "\n"
6123
6124         # Print the groups table
6125         print "/* Group strings. */"
6126         print "static const char *ncp_groups[] = {"
6127         for group in groups_used_list:
6128                 print '\t/* %02d (%s) */ "%s",' % (groups_used_hash[group], group, groups[group])
6129         print "};\n"
6130
6131         # Print the group macros
6132         for group in groups_used_list:
6133                 name = string.upper(group)
6134                 print "#define NCP_GROUP_%s\t%d" % (name, groups_used_hash[group])
6135         print "\n"
6136
6137
6138         # Print the conditional_records for all Request Conditions.
6139         num = 0
6140         print "/* Request-Condition dfilter records. The NULL pointer"
6141         print "   is replaced by a pointer to the created dfilter_t. */"
6142         if len(global_req_cond) == 0:
6143                 print "static conditional_record req_conds = NULL;"
6144         else:
6145                 print "static conditional_record req_conds[] = {"
6146                 for req_cond in global_req_cond.keys():
6147                         print "\t{ \"%s\", NULL }," % (req_cond,)
6148                         global_req_cond[req_cond] = num
6149                         num = num + 1
6150                 print "};"
6151         print "#define NUM_REQ_CONDS %d" % (num,)
6152         print "#define NO_REQ_COND   NUM_REQ_CONDS\n\n"
6153
6154
6155
6156         # Print PTVC's for bitfields
6157         ett_list = []
6158         print "/* PTVC records for bit-fields. */"
6159         for var in sorted_vars:
6160                 if isinstance(var, bitfield):
6161                         sub_vars_ptvc = var.SubVariablesPTVC()
6162                         print "/* %s */" % (sub_vars_ptvc.Name())
6163                         print sub_vars_ptvc.Code()
6164                         ett_list.append(sub_vars_ptvc.ETTName())
6165
6166
6167         # Print the PTVC's for structures
6168         print "/* PTVC records for structs. */"
6169         # Sort them
6170         svhash = {}
6171         for svar in structs_used_hash.values():
6172                 svhash[svar.HFName()] = svar
6173                 if svar.descr:
6174                         ett_list.append(svar.ETTName())
6175
6176         struct_vars = svhash.keys()
6177         struct_vars.sort()
6178         for varname in struct_vars:
6179                 var = svhash[varname]
6180                 print var.Code()
6181
6182         ett_list.sort()
6183
6184         # Print regular PTVC's
6185         print "/* PTVC records. These are re-used to save space. */"
6186         for ptvc in ptvc_lists.Members():
6187                 if not ptvc.Null() and not ptvc.Empty():
6188                         print ptvc.Code()
6189
6190         # Print error_equivalency tables
6191         print "/* Error-Equivalency Tables. These are re-used to save space. */"
6192         for compcodes in compcode_lists.Members():
6193                 errors = compcodes.Records()
6194                 # Make sure the record for error = 0x00 comes last.
6195                 print "static const error_equivalency %s[] = {" % (compcodes.Name())
6196                 for error in errors:
6197                         error_in_packet = error >> 8;
6198                         ncp_error_index = errors_used_hash[error]
6199                         print "\t{ 0x%02x, %d }, /* 0x%04x */" % (error_in_packet,
6200                                 ncp_error_index, error)
6201                 print "\t{ 0x00, -1 }\n};\n"
6202
6203
6204
6205         # Print integer arrays for all ncp_records that need
6206         # a list of req_cond_indexes. Do it "uniquely" to save space;
6207         # if multiple packets share the same set of req_cond's,
6208         # then they'll share the same integer array
6209         print "/* Request Condition Indexes */"
6210         # First, make them unique
6211         req_cond_collection = UniqueCollection("req_cond_collection")
6212         for pkt in packets:
6213                 req_conds = pkt.CalculateReqConds()
6214                 if req_conds:
6215                         unique_list = req_cond_collection.Add(req_conds)
6216                         pkt.SetReqConds(unique_list)
6217                 else:
6218                         pkt.SetReqConds(None)
6219
6220         # Print them
6221         for req_cond in req_cond_collection.Members():
6222                 print "static const int %s[] = {" % (req_cond.Name(),)
6223                 print "\t",
6224                 vals = []
6225                 for text in req_cond.Records():
6226                         vals.append(global_req_cond[text])
6227                 vals.sort()
6228                 for val in vals:
6229                         print "%s, " % (val,),
6230
6231                 print "-1 };"
6232                 print ""
6233
6234
6235
6236         # Functions without length parameter
6237         funcs_without_length = {}
6238
6239         # Print info string structures
6240         print "/* Info Strings */"
6241         for pkt in packets:
6242                 if pkt.req_info_str:
6243                         name = pkt.InfoStrName() + "_req"
6244                         var = pkt.req_info_str[0]
6245                         print "static const info_string_t %s = {" % (name,)
6246                         print "\t&%s," % (var.HFName(),)
6247                         print '\t"%s",' % (pkt.req_info_str[1],)
6248                         print '\t"%s"' % (pkt.req_info_str[2],)
6249                         print "};\n"
6250
6251
6252
6253         # Print ncp_record packet records
6254         print "#define SUBFUNC_WITH_LENGTH      0x02"
6255         print "#define SUBFUNC_NO_LENGTH        0x01"
6256         print "#define NO_SUBFUNC               0x00"
6257
6258         print "/* ncp_record structs for packets */"
6259         print "static const ncp_record ncp_packets[] = {"
6260         for pkt in packets:
6261                 if pkt.HasSubFunction():
6262                         func = pkt.FunctionCode('high')
6263                         if pkt.HasLength():
6264                                 subfunc_string = "SUBFUNC_WITH_LENGTH"
6265                                 # Ensure that the function either has a length param or not
6266                                 if funcs_without_length.has_key(func):
6267                                         sys.exit("Function 0x%04x sometimes has length param, sometimes not." \
6268                                                 % (pkt.FunctionCode(),))
6269                         else:
6270                                 subfunc_string = "SUBFUNC_NO_LENGTH"
6271                                 funcs_without_length[func] = 1
6272                 else:
6273                         subfunc_string = "NO_SUBFUNC"
6274                 print '\t{ 0x%02x, 0x%02x, %s, "%s",' % (pkt.FunctionCode('high'),
6275                         pkt.FunctionCode('low'), subfunc_string, pkt.Description()),
6276
6277                 print '\t%d /* %s */,' % (groups_used_hash[pkt.Group()], pkt.Group())
6278
6279                 ptvc = pkt.PTVCRequest()
6280                 if not ptvc.Null() and not ptvc.Empty():
6281                         ptvc_request = ptvc.Name()
6282                 else:
6283                         ptvc_request = 'NULL'
6284
6285                 ptvc = pkt.PTVCReply()
6286                 if not ptvc.Null() and not ptvc.Empty():
6287                         ptvc_reply = ptvc.Name()
6288                 else:
6289                         ptvc_reply = 'NULL'
6290
6291                 errors = pkt.CompletionCodes()
6292
6293                 req_conds_obj = pkt.GetReqConds()
6294                 if req_conds_obj:
6295                         req_conds = req_conds_obj.Name()
6296                 else:
6297                         req_conds = "NULL"
6298
6299                 if not req_conds_obj:
6300                         req_cond_size = "NO_REQ_COND_SIZE"
6301                 else:
6302                         req_cond_size = pkt.ReqCondSize()
6303                         if req_cond_size == None:
6304                                 msg.write("NCP packet %s nees a ReqCondSize*() call\n" \
6305                                         % (pkt.CName(),))
6306                                 sys.exit(1)
6307
6308                 if pkt.req_info_str:
6309                         req_info_str = "&" + pkt.InfoStrName() + "_req"
6310                 else:
6311                         req_info_str = "NULL"
6312
6313                 print '\t\t%s, %s, %s, %s, %s, %s },\n' % \
6314                         (ptvc_request, ptvc_reply, errors.Name(), req_conds,
6315                         req_cond_size, req_info_str)
6316
6317         print '\t{ 0, 0, 0, NULL, 0, NULL, NULL, NULL, NULL, NO_REQ_COND_SIZE, NULL }'
6318         print "};\n"
6319
6320         print "/* ncp funcs that require a subfunc */"
6321         print "static const guint8 ncp_func_requires_subfunc[] = {"
6322         hi_seen = {}
6323         for pkt in packets:
6324                 if pkt.HasSubFunction():
6325                         hi_func = pkt.FunctionCode('high')
6326                         if not hi_seen.has_key(hi_func):
6327                                 print "\t0x%02x," % (hi_func)
6328                                 hi_seen[hi_func] = 1
6329         print "\t0"
6330         print "};\n"
6331
6332
6333         print "/* ncp funcs that have no length parameter */"
6334         print "static const guint8 ncp_func_has_no_length_parameter[] = {"
6335         funcs = funcs_without_length.keys()
6336         funcs.sort()
6337         for func in funcs:
6338                 print "\t0x%02x," % (func,)
6339         print "\t0"
6340         print "};\n"
6341
6342         # final_registration_ncp2222()
6343         print """
6344 void
6345 final_registration_ncp2222(void)
6346 {
6347         int i;
6348         """
6349
6350         # Create dfilter_t's for conditional_record's
6351         print """
6352         for (i = 0; i < NUM_REQ_CONDS; i++) {
6353                 if (!dfilter_compile((const gchar*)req_conds[i].dfilter_text,
6354                         &req_conds[i].dfilter)) {
6355                         g_message("NCP dissector failed to compiler dfilter: %s\\n",
6356                         req_conds[i].dfilter_text);
6357                         g_assert_not_reached();
6358                 }
6359         }
6360 }
6361         """
6362
6363         # proto_register_ncp2222()
6364         print """
6365 static const value_string ncp_nds_verb_vals[] = {
6366         { 1, "Resolve Name" },
6367         { 2, "Read Entry Information" },
6368         { 3, "Read" },
6369         { 4, "Compare" },
6370         { 5, "List" },
6371         { 6, "Search Entries" },
6372         { 7, "Add Entry" },
6373         { 8, "Remove Entry" },
6374         { 9, "Modify Entry" },
6375         { 10, "Modify RDN" },
6376         { 11, "Create Attribute" },
6377         { 12, "Read Attribute Definition" },
6378         { 13, "Remove Attribute Definition" },
6379         { 14, "Define Class" },
6380         { 15, "Read Class Definition" },
6381         { 16, "Modify Class Definition" },
6382         { 17, "Remove Class Definition" },
6383         { 18, "List Containable Classes" },
6384         { 19, "Get Effective Rights" },
6385         { 20, "Add Partition" },
6386         { 21, "Remove Partition" },
6387         { 22, "List Partitions" },
6388         { 23, "Split Partition" },
6389         { 24, "Join Partitions" },
6390         { 25, "Add Replica" },
6391         { 26, "Remove Replica" },
6392         { 27, "Open Stream" },
6393         { 28, "Search Filter" },
6394         { 29, "Create Subordinate Reference" },
6395         { 30, "Link Replica" },
6396         { 31, "Change Replica Type" },
6397         { 32, "Start Update Schema" },
6398         { 33, "End Update Schema" },
6399         { 34, "Update Schema" },
6400         { 35, "Start Update Replica" },
6401         { 36, "End Update Replica" },
6402         { 37, "Update Replica" },
6403         { 38, "Synchronize Partition" },
6404         { 39, "Synchronize Schema" },
6405         { 40, "Read Syntaxes" },
6406         { 41, "Get Replica Root ID" },
6407         { 42, "Begin Move Entry" },
6408         { 43, "Finish Move Entry" },
6409         { 44, "Release Moved Entry" },
6410         { 45, "Backup Entry" },
6411         { 46, "Restore Entry" },
6412         { 47, "Save DIB" },
6413         { 48, "Control" },
6414         { 49, "Remove Backlink" },
6415         { 50, "Close Iteration" },
6416         { 51, "Unused" },
6417         { 52, "Audit Skulking" },
6418         { 53, "Get Server Address" },
6419         { 54, "Set Keys" },
6420         { 55, "Change Password" },
6421         { 56, "Verify Password" },
6422         { 57, "Begin Login" },
6423         { 58, "Finish Login" },
6424         { 59, "Begin Authentication" },
6425         { 60, "Finish Authentication" },
6426         { 61, "Logout" },
6427         { 62, "Repair Ring" },
6428         { 63, "Repair Timestamps" },
6429         { 64, "Create Back Link" },
6430         { 65, "Delete External Reference" },
6431         { 66, "Rename External Reference" },
6432         { 67, "Create Directory Entry" },
6433         { 68, "Remove Directory Entry" },
6434         { 69, "Designate New Master" },
6435         { 70, "Change Tree Name" },
6436         { 71, "Partition Entry Count" },
6437         { 72, "Check Login Restrictions" },
6438         { 73, "Start Join" },
6439         { 74, "Low Level Split" },
6440         { 75, "Low Level Join" },
6441         { 76, "Abort Low Level Join" },
6442         { 77, "Get All Servers" },
6443         { 255, "EDirectory Call" },
6444         { 0,  NULL }
6445 };
6446
6447 void
6448 proto_register_ncp2222(void)
6449 {
6450
6451         static hf_register_info hf[] = {
6452         { &hf_ncp_func,
6453         { "Function", "ncp.func", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
6454
6455         { &hf_ncp_length,
6456         { "Packet Length", "ncp.length", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
6457
6458         { &hf_ncp_subfunc,
6459         { "SubFunction", "ncp.subfunc", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
6460
6461         { &hf_ncp_completion_code,
6462         { "Completion Code", "ncp.completion_code", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
6463
6464         { &hf_ncp_fragment_handle,
6465         { "NDS Fragment Handle", "ncp.ndsfrag", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6466
6467         { &hf_ncp_fragment_size,
6468         { "NDS Fragment Size", "ncp.ndsfragsize", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6469
6470         { &hf_ncp_message_size,
6471         { "Message Size", "ncp.ndsmessagesize", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6472
6473         { &hf_ncp_nds_flag,
6474         { "Flags", "ncp.ndsflag", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6475
6476         { &hf_ncp_nds_verb,
6477         { "NDS Verb", "ncp.ndsverb", FT_UINT8, BASE_HEX, VALS(ncp_nds_verb_vals), 0x0, "", HFILL }},
6478
6479         { &hf_ping_version,
6480         { "NDS Version", "ncp.ping_version", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
6481
6482         { &hf_nds_version,
6483         { "NDS Version", "ncp.nds_version", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6484
6485         { &hf_nds_tree_name,
6486         { "Tree Name", "ncp.nds_tree_name", FT_STRING, BASE_DEC, NULL, 0x0, "", HFILL }},
6487
6488         /*
6489          * XXX - the page at
6490          *
6491          *      http://www.odyssea.com/whats_new/tcpipnet/tcpipnet.html
6492          *
6493          * says of the connection status "The Connection Code field may
6494          * contain values that indicate the status of the client host to
6495          * server connection.  A value of 1 in the fourth bit of this data
6496          * byte indicates that the server is unavailable (server was
6497          * downed).
6498          *
6499          * The page at
6500          *
6501          *      http://www.unm.edu/~network/presentations/course/appendix/appendix_f/tsld088.htm
6502          *
6503          * says that bit 0 is "bad service", bit 2 is "no connection
6504          * available", bit 4 is "service down", and bit 6 is "server
6505          * has a broadcast message waiting for the client".
6506          *
6507          * Should it be displayed in hex, and should those bits (and any
6508          * other bits with significance) be displayed as bitfields
6509          * underneath it?
6510          */
6511         { &hf_ncp_connection_status,
6512         { "Connection Status", "ncp.connection_status", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }},
6513
6514         { &hf_ncp_req_frame_num,
6515         { "Response to Request in Frame Number", "ncp.req_frame_num", FT_FRAMENUM, BASE_NONE,
6516                 NULL, 0x0, "", HFILL }},
6517
6518         { &hf_ncp_req_frame_time,
6519         { "Time from Request", "ncp.time", FT_RELATIVE_TIME, BASE_NONE,
6520                 NULL, 0x0, "Time between request and response in seconds", HFILL }},
6521
6522         { &hf_nds_flags,
6523         { "NDS Return Flags", "ncp.nds_flags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6524
6525
6526         { &hf_nds_reply_depth,
6527         { "Distance from Root", "ncp.ndsdepth", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6528
6529         { &hf_nds_reply_rev,
6530         { "NDS Revision", "ncp.ndsrev", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6531
6532         { &hf_nds_reply_flags,
6533         { "Flags", "ncp.ndsflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6534
6535         { &hf_nds_p1type,
6536         { "NDS Parameter Type", "ncp.p1type", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }},
6537
6538         { &hf_nds_uint32value,
6539         { "NDS Value", "ncp.uint32value", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6540
6541         { &hf_nds_bit1,
6542         { "Typeless", "ncp.nds_bit1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6543
6544         { &hf_nds_bit2,
6545         { "All Containers", "ncp.nds_bit2", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6546
6547         { &hf_nds_bit3,
6548         { "Slashed", "ncp.nds_bit3", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6549
6550         { &hf_nds_bit4,
6551         { "Dotted", "ncp.nds_bit4", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6552
6553         { &hf_nds_bit5,
6554         { "Tuned", "ncp.nds_bit5", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6555
6556         { &hf_nds_bit6,
6557         { "Not Defined", "ncp.nds_bit6", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6558
6559         { &hf_nds_bit7,
6560         { "Not Defined", "ncp.nds_bit7", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6561
6562         { &hf_nds_bit8,
6563         { "Not Defined", "ncp.nds_bit8", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6564
6565         { &hf_nds_bit9,
6566         { "Not Defined", "ncp.nds_bit9", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6567
6568         { &hf_nds_bit10,
6569         { "Not Defined", "ncp.nds_bit10", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6570
6571         { &hf_nds_bit11,
6572         { "Not Defined", "ncp.nds_bit11", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6573
6574         { &hf_nds_bit12,
6575         { "Not Defined", "ncp.nds_bit12", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6576
6577         { &hf_nds_bit13,
6578         { "Not Defined", "ncp.nds_bit13", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6579
6580         { &hf_nds_bit14,
6581         { "Not Defined", "ncp.nds_bit14", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6582
6583         { &hf_nds_bit15,
6584         { "Not Defined", "ncp.nds_bit15", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6585
6586         { &hf_nds_bit16,
6587         { "Not Defined", "ncp.nds_bit16", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6588
6589         { &hf_bit1outflags,
6590         { "Output Flags", "ncp.bit1outflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6591
6592         { &hf_bit2outflags,
6593         { "Entry ID", "ncp.bit2outflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6594
6595         { &hf_bit3outflags,
6596         { "Replica State", "ncp.bit3outflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6597
6598         { &hf_bit4outflags,
6599         { "Modification Timestamp", "ncp.bit4outflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6600
6601         { &hf_bit5outflags,
6602         { "Purge Time", "ncp.bit5outflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6603
6604         { &hf_bit6outflags,
6605         { "Local Partition ID", "ncp.bit6outflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6606
6607         { &hf_bit7outflags,
6608         { "Distinguished Name", "ncp.bit7outflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6609
6610         { &hf_bit8outflags,
6611         { "Replica Type", "ncp.bit8outflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6612
6613         { &hf_bit9outflags,
6614         { "Partition Busy", "ncp.bit9outflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6615
6616         { &hf_bit10outflags,
6617         { "Not Defined", "ncp.bit10outflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6618
6619         { &hf_bit11outflags,
6620         { "Not Defined", "ncp.bit11outflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6621
6622         { &hf_bit12outflags,
6623         { "Not Defined", "ncp.bit12outflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6624
6625         { &hf_bit13outflags,
6626         { "Not Defined", "ncp.bit13outflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6627
6628         { &hf_bit14outflags,
6629         { "Not Defined", "ncp.bit14outflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6630
6631         { &hf_bit15outflags,
6632         { "Not Defined", "ncp.bit15outflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6633
6634         { &hf_bit16outflags,
6635         { "Not Defined", "ncp.bit16outflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6636
6637         { &hf_bit1nflags,
6638         { "Entry ID", "ncp.bit1nflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6639
6640         { &hf_bit2nflags,
6641         { "Readable", "ncp.bit2nflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6642
6643         { &hf_bit3nflags,
6644         { "Writeable", "ncp.bit3nflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6645
6646         { &hf_bit4nflags,
6647         { "Master", "ncp.bit4nflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6648
6649         { &hf_bit5nflags,
6650         { "Create ID", "ncp.bit5nflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6651
6652         { &hf_bit6nflags,
6653         { "Walk Tree", "ncp.bit6nflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6654
6655         { &hf_bit7nflags,
6656         { "Dereference Alias", "ncp.bit7nflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6657
6658         { &hf_bit8nflags,
6659         { "Not Defined", "ncp.bit8nflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6660
6661         { &hf_bit9nflags,
6662         { "Not Defined", "ncp.bit9nflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6663
6664         { &hf_bit10nflags,
6665         { "Not Defined", "ncp.bit10nflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6666
6667         { &hf_bit11nflags,
6668         { "Not Defined", "ncp.bit11nflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6669
6670         { &hf_bit12nflags,
6671         { "Not Defined", "ncp.bit12nflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6672
6673         { &hf_bit13nflags,
6674         { "Not Defined", "ncp.bit13nflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6675
6676         { &hf_bit14nflags,
6677         { "Prefer Referrals", "ncp.bit14nflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6678
6679         { &hf_bit15nflags,
6680         { "Prefer Only Referrals", "ncp.bit15nflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6681
6682         { &hf_bit16nflags,
6683         { "Not Defined", "ncp.bit16nflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6684
6685         { &hf_bit1rflags,
6686         { "Typeless", "ncp.bit1rflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6687
6688         { &hf_bit2rflags,
6689         { "Slashed", "ncp.bit2rflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6690
6691         { &hf_bit3rflags,
6692         { "Dotted", "ncp.bit3rflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6693
6694         { &hf_bit4rflags,
6695         { "Tuned", "ncp.bit4rflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6696
6697         { &hf_bit5rflags,
6698         { "Not Defined", "ncp.bit5rflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6699
6700         { &hf_bit6rflags,
6701         { "Not Defined", "ncp.bit6rflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6702
6703         { &hf_bit7rflags,
6704         { "Not Defined", "ncp.bit7rflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6705
6706         { &hf_bit8rflags,
6707         { "Not Defined", "ncp.bit8rflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6708
6709         { &hf_bit9rflags,
6710         { "Not Defined", "ncp.bit9rflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6711
6712         { &hf_bit10rflags,
6713         { "Not Defined", "ncp.bit10rflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6714
6715         { &hf_bit11rflags,
6716         { "Not Defined", "ncp.bit11rflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6717
6718         { &hf_bit12rflags,
6719         { "Not Defined", "ncp.bit12rflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6720
6721         { &hf_bit13rflags,
6722         { "Not Defined", "ncp.bit13rflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6723
6724         { &hf_bit14rflags,
6725         { "Not Defined", "ncp.bit14rflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6726
6727         { &hf_bit15rflags,
6728         { "Not Defined", "ncp.bit15rflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6729
6730         { &hf_bit16rflags,
6731         { "Not Defined", "ncp.bit16rflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6732
6733         { &hf_bit1eflags,
6734         { "Alias Entry", "ncp.bit1eflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6735
6736         { &hf_bit2eflags,
6737         { "Partition Root", "ncp.bit2eflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6738
6739         { &hf_bit3eflags,
6740         { "Container Entry", "ncp.bit3eflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6741
6742         { &hf_bit4eflags,
6743         { "Container Alias", "ncp.bit4eflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6744
6745         { &hf_bit5eflags,
6746         { "Matches List Filter", "ncp.bit5eflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6747
6748         { &hf_bit6eflags,
6749         { "Reference Entry", "ncp.bit6eflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6750
6751         { &hf_bit7eflags,
6752         { "40x Reference Entry", "ncp.bit7eflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6753
6754         { &hf_bit8eflags,
6755         { "Back Linked", "ncp.bit8eflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6756
6757         { &hf_bit9eflags,
6758         { "New Entry", "ncp.bit9eflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6759
6760         { &hf_bit10eflags,
6761         { "Temporary Reference", "ncp.bit10eflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6762
6763         { &hf_bit11eflags,
6764         { "Audited", "ncp.bit11eflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6765
6766         { &hf_bit12eflags,
6767         { "Entry Not Present", "ncp.bit12eflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6768
6769         { &hf_bit13eflags,
6770         { "Entry Verify CTS", "ncp.bit13eflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6771
6772         { &hf_bit14eflags,
6773         { "Entry Damaged", "ncp.bit14eflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6774
6775         { &hf_bit15eflags,
6776         { "Not Defined", "ncp.bit15rflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6777
6778         { &hf_bit16eflags,
6779         { "Not Defined", "ncp.bit16rflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6780
6781         { &hf_bit1infoflagsl,
6782         { "Output Flags", "ncp.bit1infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6783
6784         { &hf_bit2infoflagsl,
6785         { "Entry ID", "ncp.bit2infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6786
6787         { &hf_bit3infoflagsl,
6788         { "Entry Flags", "ncp.bit3infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6789
6790         { &hf_bit4infoflagsl,
6791         { "Subordinate Count", "ncp.bit4infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6792
6793         { &hf_bit5infoflagsl,
6794         { "Modification Time", "ncp.bit5infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6795
6796         { &hf_bit6infoflagsl,
6797         { "Modification Timestamp", "ncp.bit6infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6798
6799         { &hf_bit7infoflagsl,
6800         { "Creation Timestamp", "ncp.bit7infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6801
6802         { &hf_bit8infoflagsl,
6803         { "Partition Root ID", "ncp.bit8infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6804
6805         { &hf_bit9infoflagsl,
6806         { "Parent ID", "ncp.bit9infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6807
6808         { &hf_bit10infoflagsl,
6809         { "Revision Count", "ncp.bit10infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6810
6811         { &hf_bit11infoflagsl,
6812         { "Replica Type", "ncp.bit11infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6813
6814         { &hf_bit12infoflagsl,
6815         { "Base Class", "ncp.bit12infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6816
6817         { &hf_bit13infoflagsl,
6818         { "Relative Distinguished Name", "ncp.bit13infoflagsl", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6819
6820         { &hf_bit14infoflagsl,
6821         { "Distinguished Name", "ncp.bit14infoflagsl", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6822
6823         { &hf_bit15infoflagsl,
6824         { "Root Distinguished Name", "ncp.bit15infoflagsl", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6825
6826         { &hf_bit16infoflagsl,
6827         { "Parent Distinguished Name", "ncp.bit16infoflagsl", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6828
6829         { &hf_bit1infoflagsh,
6830         { "Purge Time", "ncp.bit1infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6831
6832         { &hf_bit2infoflagsh,
6833         { "Dereference Base Class", "ncp.bit2infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6834
6835         { &hf_bit3infoflagsh,
6836         { "Not Defined", "ncp.bit3infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6837
6838         { &hf_bit4infoflagsh,
6839         { "Not Defined", "ncp.bit4infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6840
6841         { &hf_bit5infoflagsh,
6842         { "Not Defined", "ncp.bit5infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6843
6844         { &hf_bit6infoflagsh,
6845         { "Not Defined", "ncp.bit6infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6846
6847         { &hf_bit7infoflagsh,
6848         { "Not Defined", "ncp.bit7infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6849
6850         { &hf_bit8infoflagsh,
6851         { "Not Defined", "ncp.bit8infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6852
6853         { &hf_bit9infoflagsh,
6854         { "Not Defined", "ncp.bit9infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6855
6856         { &hf_bit10infoflagsh,
6857         { "Not Defined", "ncp.bit10infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6858
6859         { &hf_bit11infoflagsh,
6860         { "Not Defined", "ncp.bit11infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6861
6862         { &hf_bit12infoflagsh,
6863         { "Not Defined", "ncp.bit12infoflagshs", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6864
6865         { &hf_bit13infoflagsh,
6866         { "Not Defined", "ncp.bit13infoflagsh", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6867
6868         { &hf_bit14infoflagsh,
6869         { "Not Defined", "ncp.bit14infoflagsh", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6870
6871         { &hf_bit15infoflagsh,
6872         { "Not Defined", "ncp.bit15infoflagsh", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6873
6874         { &hf_bit16infoflagsh,
6875         { "Not Defined", "ncp.bit16infoflagsh", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6876
6877         { &hf_bit1lflags,
6878         { "List Typeless", "ncp.bit1lflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6879
6880         { &hf_bit2lflags,
6881         { "List Containers", "ncp.bit2lflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6882
6883         { &hf_bit3lflags,
6884         { "List Slashed", "ncp.bit3lflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6885
6886         { &hf_bit4lflags,
6887         { "List Dotted", "ncp.bit4lflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6888
6889         { &hf_bit5lflags,
6890         { "Dereference Alias", "ncp.bit5lflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6891
6892         { &hf_bit6lflags,
6893         { "List All Containers", "ncp.bit6lflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6894
6895         { &hf_bit7lflags,
6896         { "List Obsolete", "ncp.bit7lflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6897
6898         { &hf_bit8lflags,
6899         { "List Tuned Output", "ncp.bit8lflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6900
6901         { &hf_bit9lflags,
6902         { "List External Reference", "ncp.bit9lflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6903
6904         { &hf_bit10lflags,
6905         { "Not Defined", "ncp.bit10lflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6906
6907         { &hf_bit11lflags,
6908         { "Not Defined", "ncp.bit11lflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6909
6910         { &hf_bit12lflags,
6911         { "Not Defined", "ncp.bit12lflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6912
6913         { &hf_bit13lflags,
6914         { "Not Defined", "ncp.bit13lflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6915
6916         { &hf_bit14lflags,
6917         { "Not Defined", "ncp.bit14lflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6918
6919         { &hf_bit15lflags,
6920         { "Not Defined", "ncp.bit15lflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6921
6922         { &hf_bit16lflags,
6923         { "Not Defined", "ncp.bit16lflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6924
6925         { &hf_bit1l1flagsl,
6926         { "Output Flags", "ncp.bit1l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6927
6928         { &hf_bit2l1flagsl,
6929         { "Entry ID", "ncp.bit2l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6930
6931         { &hf_bit3l1flagsl,
6932         { "Replica State", "ncp.bit3l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6933
6934         { &hf_bit4l1flagsl,
6935         { "Modification Timestamp", "ncp.bit4l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6936
6937         { &hf_bit5l1flagsl,
6938         { "Purge Time", "ncp.bit5l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6939
6940         { &hf_bit6l1flagsl,
6941         { "Local Partition ID", "ncp.bit6l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6942
6943         { &hf_bit7l1flagsl,
6944         { "Distinguished Name", "ncp.bit7l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6945
6946         { &hf_bit8l1flagsl,
6947         { "Replica Type", "ncp.bit8l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6948
6949         { &hf_bit9l1flagsl,
6950         { "Partition Busy", "ncp.bit9l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6951
6952         { &hf_bit10l1flagsl,
6953         { "Not Defined", "ncp.bit10l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6954
6955         { &hf_bit11l1flagsl,
6956         { "Not Defined", "ncp.bit11l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6957
6958         { &hf_bit12l1flagsl,
6959         { "Not Defined", "ncp.bit12l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6960
6961         { &hf_bit13l1flagsl,
6962         { "Not Defined", "ncp.bit13l1flagsl", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6963
6964         { &hf_bit14l1flagsl,
6965         { "Not Defined", "ncp.bit14l1flagsl", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6966
6967         { &hf_bit15l1flagsl,
6968         { "Not Defined", "ncp.bit15l1flagsl", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6969
6970         { &hf_bit16l1flagsl,
6971         { "Not Defined", "ncp.bit16l1flagsl", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6972
6973         { &hf_bit1l1flagsh,
6974         { "Not Defined", "ncp.bit1l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6975
6976         { &hf_bit2l1flagsh,
6977         { "Not Defined", "ncp.bit2l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6978
6979         { &hf_bit3l1flagsh,
6980         { "Not Defined", "ncp.bit3l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6981
6982         { &hf_bit4l1flagsh,
6983         { "Not Defined", "ncp.bit4l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6984
6985         { &hf_bit5l1flagsh,
6986         { "Not Defined", "ncp.bit5l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6987
6988         { &hf_bit6l1flagsh,
6989         { "Not Defined", "ncp.bit6l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6990
6991         { &hf_bit7l1flagsh,
6992         { "Not Defined", "ncp.bit7l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6993
6994         { &hf_bit8l1flagsh,
6995         { "Not Defined", "ncp.bit8l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6996
6997         { &hf_bit9l1flagsh,
6998         { "Not Defined", "ncp.bit9l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6999
7000         { &hf_bit10l1flagsh,
7001         { "Not Defined", "ncp.bit10l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7002
7003         { &hf_bit11l1flagsh,
7004         { "Not Defined", "ncp.bit11l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7005
7006         { &hf_bit12l1flagsh,
7007         { "Not Defined", "ncp.bit12l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7008
7009         { &hf_bit13l1flagsh,
7010         { "Not Defined", "ncp.bit13l1flagsh", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7011
7012         { &hf_bit14l1flagsh,
7013         { "Not Defined", "ncp.bit14l1flagsh", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7014
7015         { &hf_bit15l1flagsh,
7016         { "Not Defined", "ncp.bit15l1flagsh", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7017
7018         { &hf_bit16l1flagsh,
7019         { "Not Defined", "ncp.bit16l1flagsh", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7020
7021         { &hf_bit1vflags,
7022         { "Naming", "ncp.bit1vflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7023
7024         { &hf_bit2vflags,
7025         { "Base Class", "ncp.bit2vflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7026
7027         { &hf_bit3vflags,
7028         { "Present", "ncp.bit3vflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7029
7030         { &hf_bit4vflags,
7031         { "Value Damaged", "ncp.bit4vflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7032
7033         { &hf_bit5vflags,
7034         { "Not Defined", "ncp.bit5vflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7035
7036         { &hf_bit6vflags,
7037         { "Not Defined", "ncp.bit6vflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7038
7039         { &hf_bit7vflags,
7040         { "Not Defined", "ncp.bit7vflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7041
7042         { &hf_bit8vflags,
7043         { "Not Defined", "ncp.bit8vflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7044
7045         { &hf_bit9vflags,
7046         { "Not Defined", "ncp.bit9vflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7047
7048         { &hf_bit10vflags,
7049         { "Not Defined", "ncp.bit10vflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7050
7051         { &hf_bit11vflags,
7052         { "Not Defined", "ncp.bit11vflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7053
7054         { &hf_bit12vflags,
7055         { "Not Defined", "ncp.bit12vflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7056
7057         { &hf_bit13vflags,
7058         { "Not Defined", "ncp.bit13vflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7059
7060         { &hf_bit14vflags,
7061         { "Not Defined", "ncp.bit14vflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7062
7063         { &hf_bit15vflags,
7064         { "Not Defined", "ncp.bit15vflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7065
7066         { &hf_bit16vflags,
7067         { "Not Defined", "ncp.bit16vflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7068
7069         { &hf_bit1cflags,
7070         { "Ambiguous Containment", "ncp.bit1cflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7071
7072         { &hf_bit2cflags,
7073         { "Ambiguous Naming", "ncp.bit2cflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7074
7075         { &hf_bit3cflags,
7076         { "Class Definition Cannot be Removed", "ncp.bit3cflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7077
7078         { &hf_bit4cflags,
7079         { "Effective Class", "ncp.bit4cflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7080
7081         { &hf_bit5cflags,
7082         { "Container Class", "ncp.bit5cflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7083
7084         { &hf_bit6cflags,
7085         { "Not Defined", "ncp.bit6cflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7086
7087         { &hf_bit7cflags,
7088         { "Not Defined", "ncp.bit7cflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7089
7090         { &hf_bit8cflags,
7091         { "Not Defined", "ncp.bit8cflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7092
7093         { &hf_bit9cflags,
7094         { "Not Defined", "ncp.bit9cflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7095
7096         { &hf_bit10cflags,
7097         { "Not Defined", "ncp.bit10cflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7098
7099         { &hf_bit11cflags,
7100         { "Not Defined", "ncp.bit11cflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7101
7102         { &hf_bit12cflags,
7103         { "Not Defined", "ncp.bit12cflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7104
7105         { &hf_bit13cflags,
7106         { "Not Defined", "ncp.bit13cflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7107
7108         { &hf_bit14cflags,
7109         { "Not Defined", "ncp.bit14cflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7110
7111         { &hf_bit15cflags,
7112         { "Not Defined", "ncp.bit15cflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7113
7114         { &hf_bit16cflags,
7115         { "Not Defined", "ncp.bit16cflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7116
7117         { &hf_bit1acflags,
7118         { "Single Valued", "ncp.bit1acflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7119
7120         { &hf_bit2acflags,
7121         { "Sized", "ncp.bit2acflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7122
7123         { &hf_bit3acflags,
7124         { "Non-Removable", "ncp.bit3acflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7125
7126         { &hf_bit4acflags,
7127         { "Read Only", "ncp.bit4acflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7128
7129         { &hf_bit5acflags,
7130         { "Hidden", "ncp.bit5acflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7131
7132         { &hf_bit6acflags,
7133         { "String", "ncp.bit6acflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7134
7135         { &hf_bit7acflags,
7136         { "Synchronize Immediate", "ncp.bit7acflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7137
7138         { &hf_bit8acflags,
7139         { "Public Read", "ncp.bit8acflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7140
7141         { &hf_bit9acflags,
7142         { "Server Read", "ncp.bit9acflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7143
7144         { &hf_bit10acflags,
7145         { "Write Managed", "ncp.bit10acflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7146
7147         { &hf_bit11acflags,
7148         { "Per Replica", "ncp.bit11acflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7149
7150         { &hf_bit12acflags,
7151         { "Never Schedule Synchronization", "ncp.bit12acflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7152
7153         { &hf_bit13acflags,
7154         { "Operational", "ncp.bit13acflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7155
7156         { &hf_bit14acflags,
7157         { "Not Defined", "ncp.bit14acflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7158
7159         { &hf_bit15acflags,
7160         { "Not Defined", "ncp.bit15acflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7161
7162         { &hf_bit16acflags,
7163         { "Not Defined", "ncp.bit16acflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7164
7165
7166         { &hf_nds_reply_error,
7167         { "NDS Error", "ncp.ndsreplyerror", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7168
7169         { &hf_nds_net,
7170         { "Network","ncp.ndsnet", FT_IPXNET, BASE_NONE, NULL, 0x0, "", HFILL }},
7171
7172         { &hf_nds_node,
7173         { "Node",       "ncp.ndsnode", FT_ETHER, BASE_NONE, NULL, 0x0, "", HFILL }},
7174
7175         { &hf_nds_socket,
7176         { "Socket",     "ncp.ndssocket", FT_UINT16, BASE_HEX, NULL, 0x0, "", HFILL }},
7177
7178         { &hf_add_ref_ip,
7179         { "Address Referral", "ncp.ipref", FT_IPv4, BASE_DEC, NULL, 0x0, "", HFILL }},
7180
7181         { &hf_add_ref_udp,
7182         { "Address Referral", "ncp.udpref", FT_IPv4, BASE_DEC, NULL, 0x0, "", HFILL }},
7183
7184         { &hf_add_ref_tcp,
7185         { "Address Referral", "ncp.tcpref", FT_IPv4, BASE_DEC, NULL, 0x0, "", HFILL }},
7186
7187         { &hf_referral_record,
7188         { "Referral Record", "ncp.ref_rec", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7189
7190         { &hf_referral_addcount,
7191         { "Address Count", "ncp.ref_addcount", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7192
7193         { &hf_nds_port,
7194         { "Port", "ncp.ndsport", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7195
7196         { &hf_mv_string,
7197         { "Attribute Name ", "ncp.mv_string", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7198
7199         { &hf_nds_syntax,
7200         { "Attribute Syntax ", "ncp.nds_syntax", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7201
7202         { &hf_value_string,
7203         { "Value ", "ncp.value_string", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7204
7205     { &hf_nds_stream_name,
7206         { "Stream Name ", "ncp.nds_stream_name", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7207
7208         { &hf_nds_buffer_size,
7209         { "NDS Reply Buffer Size", "ncp.nds_reply_buf", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7210
7211         { &hf_nds_ver,
7212         { "NDS Version", "ncp.nds_ver", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7213
7214         { &hf_nds_nflags,
7215         { "Flags", "ncp.nds_nflags", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7216
7217     { &hf_nds_rflags,
7218         { "Request Flags", "ncp.nds_rflags", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7219
7220     { &hf_nds_eflags,
7221         { "Entry Flags", "ncp.nds_eflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7222
7223         { &hf_nds_scope,
7224         { "Scope", "ncp.nds_scope", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7225
7226         { &hf_nds_name,
7227         { "Name", "ncp.nds_name", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7228
7229     { &hf_nds_name_type,
7230         { "Name Type", "ncp.nds_name_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7231
7232         { &hf_nds_comm_trans,
7233         { "Communications Transport", "ncp.nds_comm_trans", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7234
7235         { &hf_nds_tree_trans,
7236         { "Tree Walker Transport", "ncp.nds_tree_trans", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7237
7238         { &hf_nds_iteration,
7239         { "Iteration Handle", "ncp.nds_iteration", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7240
7241     { &hf_nds_file_handle,
7242         { "File Handle", "ncp.nds_file_handle", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7243
7244     { &hf_nds_file_size,
7245         { "File Size", "ncp.nds_file_size", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7246
7247         { &hf_nds_eid,
7248         { "NDS EID", "ncp.nds_eid", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7249
7250     { &hf_nds_depth,
7251         { "Distance object is from Root", "ncp.nds_depth", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7252
7253         { &hf_nds_info_type,
7254         { "Info Type", "ncp.nds_info_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7255
7256     { &hf_nds_class_def_type,
7257         { "Class Definition Type", "ncp.nds_class_def_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7258
7259         { &hf_nds_all_attr,
7260         { "All Attributes", "ncp.nds_all_attr", FT_UINT32, BASE_DEC, NULL, 0x0, "Return all Attributes?", HFILL }},
7261
7262     { &hf_nds_return_all_classes,
7263         { "All Classes", "ncp.nds_return_all_classes", FT_STRING, BASE_NONE, NULL, 0x0, "Return all Classes?", HFILL }},
7264
7265         { &hf_nds_req_flags,
7266         { "Request Flags", "ncp.nds_req_flags", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7267
7268         { &hf_nds_attr,
7269         { "Attributes", "ncp.nds_attributes", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7270
7271     { &hf_nds_classes,
7272         { "Classes", "ncp.nds_classes", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7273
7274         { &hf_nds_crc,
7275         { "CRC", "ncp.nds_crc", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7276
7277         { &hf_nds_referrals,
7278         { "Referrals", "ncp.nds_referrals", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7279
7280         { &hf_nds_result_flags,
7281         { "Result Flags", "ncp.nds_result_flags", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7282
7283     { &hf_nds_stream_flags,
7284         { "Streams Flags", "ncp.nds_stream_flags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7285
7286         { &hf_nds_tag_string,
7287         { "Tags", "ncp.nds_tags", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7288
7289         { &hf_value_bytes,
7290         { "Bytes", "ncp.value_bytes", FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL }},
7291
7292         { &hf_replica_type,
7293         { "Replica Type", "ncp.rtype", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7294
7295         { &hf_replica_state,
7296         { "Replica State", "ncp.rstate", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7297
7298     { &hf_nds_rnum,
7299         { "Replica Number", "ncp.rnum", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7300
7301         { &hf_nds_revent,
7302         { "Event", "ncp.revent", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7303
7304         { &hf_replica_number,
7305         { "Replica Number", "ncp.rnum", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7306
7307         { &hf_min_nds_ver,
7308         { "Minimum NDS Version", "ncp.min_nds_version", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7309
7310         { &hf_nds_ver_include,
7311         { "Include NDS Version", "ncp.inc_nds_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7312
7313         { &hf_nds_ver_exclude,
7314         { "Exclude NDS Version", "ncp.exc_nds_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7315
7316         { &hf_nds_es,
7317         { "Input Entry Specifier", "ncp.nds_es", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7318
7319         { &hf_es_type,
7320         { "Entry Specifier Type", "ncp.nds_es_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7321
7322         { &hf_rdn_string,
7323         { "RDN", "ncp.nds_rdn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7324
7325         { &hf_delim_string,
7326         { "Delimeter", "ncp.nds_delim", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7327
7328     { &hf_nds_dn_output_type,
7329         { "Output Entry Specifier Type", "ncp.nds_out_es_type", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7330
7331     { &hf_nds_nested_output_type,
7332         { "Nested Output Entry Specifier Type", "ncp.nds_nested_out_es", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7333
7334     { &hf_nds_output_delimiter,
7335         { "Output Delimiter", "ncp.nds_out_delimiter", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7336
7337     { &hf_nds_output_entry_specifier,
7338         { "Output Entry Specifier", "ncp.nds_out_es", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7339
7340     { &hf_es_value,
7341         { "Entry Specifier Value", "ncp.nds_es_value", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7342
7343     { &hf_es_rdn_count,
7344         { "RDN Count", "ncp.nds_es_rdn_count", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7345
7346     { &hf_nds_replica_num,
7347         { "Replica Number", "ncp.nds_replica_num", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7348
7349     { &hf_es_seconds,
7350         { "Seconds", "ncp.nds_es_seconds", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7351
7352     { &hf_nds_event_num,
7353         { "Event Number", "ncp.nds_event_num", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7354
7355     { &hf_nds_compare_results,
7356         { "Compare Results", "ncp.nds_compare_results", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7357
7358     { &hf_nds_parent,
7359         { "Parent ID", "ncp.nds_parent", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7360
7361     { &hf_nds_name_filter,
7362         { "Name Filter", "ncp.nds_name_filter", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7363
7364     { &hf_nds_class_filter,
7365         { "Class Filter", "ncp.nds_class_filter", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7366
7367     { &hf_nds_time_filter,
7368         { "Time Filter", "ncp.nds_time_filter", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7369
7370     { &hf_nds_partition_root_id,
7371         { "Partition Root ID", "ncp.nds_partition_root_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7372
7373     { &hf_nds_replicas,
7374         { "Replicas", "ncp.nds_replicas", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7375
7376     { &hf_nds_purge,
7377         { "Purge Time", "ncp.nds_purge", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7378
7379     { &hf_nds_local_partition,
7380         { "Local Partition ID", "ncp.nds_local_partition", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7381
7382     { &hf_partition_busy,
7383     { "Partition Busy", "ncp.nds_partition_busy", FT_BOOLEAN, 16, NULL, 0x0, "", HFILL }},
7384
7385     { &hf_nds_number_of_changes,
7386         { "Number of Attribute Changes", "ncp.nds_number_of_changes", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7387
7388     { &hf_sub_count,
7389         { "Subordinate Count", "ncp.sub_count", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7390
7391     { &hf_nds_revision,
7392         { "Revision Count", "ncp.nds_rev_count", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7393
7394     { &hf_nds_base_class,
7395         { "Base Class", "ncp.nds_base_class", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7396
7397     { &hf_nds_relative_dn,
7398         { "Relative Distinguished Name", "ncp.nds_relative_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7399
7400     { &hf_nds_root_dn,
7401         { "Root Distinguished Name", "ncp.nds_root_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7402
7403     { &hf_nds_parent_dn,
7404         { "Parent Distinguished Name", "ncp.nds_parent_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7405
7406     { &hf_deref_base,
7407     { "Dereference Base Class", "ncp.nds_deref_base", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7408
7409     { &hf_nds_base,
7410     { "Base Class", "ncp.nds_base", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7411
7412     { &hf_nds_super,
7413     { "Super Class", "ncp.nds_super", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7414
7415     { &hf_nds_entry_info,
7416     { "Entry Information", "ncp.nds_entry_info", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7417
7418     { &hf_nds_privileges,
7419     { "Privileges", "ncp.nds_privileges", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7420
7421     { &hf_nds_vflags,
7422     { "Value Flags", "ncp.nds_vflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7423
7424     { &hf_nds_value_len,
7425     { "Value Length", "ncp.nds_vlength", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7426
7427     { &hf_nds_cflags,
7428     { "Class Flags", "ncp.nds_cflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7429
7430     { &hf_nds_asn1,
7431         { "ASN.1 ID", "ncp.nds_asn1", FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL }},
7432
7433     { &hf_nds_acflags,
7434     { "Attribute Constraint Flags", "ncp.nds_acflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7435
7436     { &hf_nds_upper,
7437     { "Upper Limit Value", "ncp.nds_upper", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7438
7439     { &hf_nds_lower,
7440     { "Lower Limit Value", "ncp.nds_lower", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7441
7442     { &hf_nds_trustee_dn,
7443         { "Trustee Distinguished Name", "ncp.nds_trustee_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7444
7445     { &hf_nds_attribute_dn,
7446         { "Attribute Name", "ncp.nds_attribute_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7447
7448     { &hf_nds_acl_add,
7449         { "Access Control Lists to Add", "ncp.nds_acl_add", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7450
7451     { &hf_nds_acl_del,
7452         { "Access Control Lists to Delete", "ncp.nds_acl_del", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7453
7454     { &hf_nds_att_add,
7455         { "Attribute to Add", "ncp.nds_att_add", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7456
7457     { &hf_nds_att_del,
7458         { "Attribute to Delete", "ncp.nds_att_del", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7459
7460     { &hf_nds_keep,
7461     { "Delete Original RDN", "ncp.nds_keep", FT_BOOLEAN, 32, NULL, 0x0, "", HFILL }},
7462
7463     { &hf_nds_new_rdn,
7464         { "New Relative Distinguished Name", "ncp.nds_new_rdn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7465
7466     { &hf_nds_time_delay,
7467         { "Time Delay", "ncp.nds_time_delay", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7468
7469     { &hf_nds_root_name,
7470         { "Root Most Object Name", "ncp.nds_root_name", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7471
7472     { &hf_nds_new_part_id,
7473         { "New Partition Root ID", "ncp.nds_new_part_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7474
7475     { &hf_nds_child_part_id,
7476         { "Child Partition Root ID", "ncp.nds_child_part_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7477
7478     { &hf_nds_master_part_id,
7479         { "Master Partition Root ID", "ncp.nds_master_part_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7480
7481     { &hf_nds_target_name,
7482         { "Target Server Name", "ncp.nds_target_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7483
7484
7485         { &hf_bit1pingflags1,
7486         { "Supported Fields", "ncp.bit1pingflags1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7487
7488         { &hf_bit2pingflags1,
7489         { "Depth", "ncp.bit2pingflags1", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7490
7491         { &hf_bit3pingflags1,
7492         { "Revision", "ncp.bit3pingflags1", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7493
7494         { &hf_bit4pingflags1,
7495         { "Flags", "ncp.bit4pingflags1", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7496
7497         { &hf_bit5pingflags1,
7498         { "Verification Flags", "ncp.bit5pingflags1", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7499
7500         { &hf_bit6pingflags1,
7501         { "Letter Version", "ncp.bit6pingflags1", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7502
7503         { &hf_bit7pingflags1,
7504         { "OS Version", "ncp.bit7pingflags1", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7505
7506         { &hf_bit8pingflags1,
7507         { "License Flags", "ncp.bit8pingflags1", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7508
7509         { &hf_bit9pingflags1,
7510         { "DS Time", "ncp.bit9pingflags1", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7511
7512         { &hf_bit10pingflags1,
7513         { "Not Defined", "ncp.bit10pingflags1", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7514
7515         { &hf_bit11pingflags1,
7516         { "Not Defined", "ncp.bit11pingflags1", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7517
7518         { &hf_bit12pingflags1,
7519         { "Not Defined", "ncp.bit12pingflags1", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7520
7521         { &hf_bit13pingflags1,
7522         { "Not Defined", "ncp.bit13pingflags1", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7523
7524         { &hf_bit14pingflags1,
7525         { "Not Defined", "ncp.bit14pingflags1", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7526
7527         { &hf_bit15pingflags1,
7528         { "Not Defined", "ncp.bit15pingflags1", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7529
7530         { &hf_bit16pingflags1,
7531         { "Not Defined", "ncp.bit16pingflags1", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7532
7533         { &hf_bit1pingflags2,
7534         { "Sap Name", "ncp.bit1pingflags2", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7535
7536         { &hf_bit2pingflags2,
7537         { "Tree Name", "ncp.bit2pingflags2", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7538
7539         { &hf_bit3pingflags2,
7540         { "OS Name", "ncp.bit3pingflags2", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7541
7542         { &hf_bit4pingflags2,
7543         { "Hardware Name", "ncp.bit4pingflags2", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7544
7545         { &hf_bit5pingflags2,
7546         { "Vendor Name", "ncp.bit5pingflags2", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7547
7548         { &hf_bit6pingflags2,
7549         { "Not Defined", "ncp.bit6pingflags2", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7550
7551         { &hf_bit7pingflags2,
7552         { "Not Defined", "ncp.bit7pingflags2", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7553
7554         { &hf_bit8pingflags2,
7555         { "Not Defined", "ncp.bit8pingflags2", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7556
7557         { &hf_bit9pingflags2,
7558         { "Not Defined", "ncp.bit9pingflags2", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7559
7560         { &hf_bit10pingflags2,
7561         { "Not Defined", "ncp.bit10pingflags2", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7562
7563         { &hf_bit11pingflags2,
7564         { "Not Defined", "ncp.bit11pingflags2", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7565
7566         { &hf_bit12pingflags2,
7567         { "Not Defined", "ncp.bit12pingflags2", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7568
7569         { &hf_bit13pingflags2,
7570         { "Not Defined", "ncp.bit13pingflags2", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7571
7572         { &hf_bit14pingflags2,
7573         { "Not Defined", "ncp.bit14pingflags2", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7574
7575         { &hf_bit15pingflags2,
7576         { "Not Defined", "ncp.bit15pingflags2", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7577
7578         { &hf_bit16pingflags2,
7579         { "Not Defined", "ncp.bit16pingflags2", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7580
7581         { &hf_bit1pingpflags1,
7582         { "Root Most Master Replica", "ncp.bit1pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7583
7584         { &hf_bit2pingpflags1,
7585         { "Time Synchronized", "ncp.bit2pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7586
7587         { &hf_bit3pingpflags1,
7588         { "Not Defined", "ncp.bit3pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7589
7590         { &hf_bit4pingpflags1,
7591         { "Not Defined", "ncp.bit4pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7592
7593         { &hf_bit5pingpflags1,
7594         { "Not Defined", "ncp.bit5pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7595
7596         { &hf_bit6pingpflags1,
7597         { "Not Defined", "ncp.bit6pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7598
7599         { &hf_bit7pingpflags1,
7600         { "Not Defined", "ncp.bit7pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7601
7602         { &hf_bit8pingpflags1,
7603         { "Not Defined", "ncp.bit8pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7604
7605         { &hf_bit9pingpflags1,
7606         { "Not Defined", "ncp.bit9pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7607
7608         { &hf_bit10pingpflags1,
7609         { "Not Defined", "ncp.bit10pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7610
7611         { &hf_bit11pingpflags1,
7612         { "Not Defined", "ncp.bit11pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7613
7614         { &hf_bit12pingpflags1,
7615         { "Not Defined", "ncp.bit12pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7616
7617         { &hf_bit13pingpflags1,
7618         { "Not Defined", "ncp.bit13pingpflags1", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7619
7620         { &hf_bit14pingpflags1,
7621         { "Not Defined", "ncp.bit14pingpflags1", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7622
7623         { &hf_bit15pingpflags1,
7624         { "Not Defined", "ncp.bit15pingpflags1", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7625
7626         { &hf_bit16pingpflags1,
7627         { "Not Defined", "ncp.bit16pingpflags1", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7628
7629         { &hf_bit1pingvflags1,
7630         { "Checksum", "ncp.bit1pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7631
7632         { &hf_bit2pingvflags1,
7633         { "CRC32", "ncp.bit2pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7634
7635         { &hf_bit3pingvflags1,
7636         { "Not Defined", "ncp.bit3pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7637
7638         { &hf_bit4pingvflags1,
7639         { "Not Defined", "ncp.bit4pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7640
7641         { &hf_bit5pingvflags1,
7642         { "Not Defined", "ncp.bit5pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7643
7644         { &hf_bit6pingvflags1,
7645         { "Not Defined", "ncp.bit6pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7646
7647         { &hf_bit7pingvflags1,
7648         { "Not Defined", "ncp.bit7pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7649
7650         { &hf_bit8pingvflags1,
7651         { "Not Defined", "ncp.bit8pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7652
7653         { &hf_bit9pingvflags1,
7654         { "Not Defined", "ncp.bit9pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7655
7656         { &hf_bit10pingvflags1,
7657         { "Not Defined", "ncp.bit10pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7658
7659         { &hf_bit11pingvflags1,
7660         { "Not Defined", "ncp.bit11pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7661
7662         { &hf_bit12pingvflags1,
7663         { "Not Defined", "ncp.bit12pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7664
7665         { &hf_bit13pingvflags1,
7666         { "Not Defined", "ncp.bit13pingvflags1", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7667
7668         { &hf_bit14pingvflags1,
7669         { "Not Defined", "ncp.bit14pingvflags1", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7670
7671         { &hf_bit15pingvflags1,
7672         { "Not Defined", "ncp.bit15pingvflags1", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7673
7674         { &hf_bit16pingvflags1,
7675         { "Not Defined", "ncp.bit16pingvflags1", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7676
7677     { &hf_nds_letter_ver,
7678         { "Letter Version", "ncp.nds_letter_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7679
7680     { &hf_nds_os_ver,
7681         { "OS Version", "ncp.nds_os_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7682
7683     { &hf_nds_lic_flags,
7684         { "License Flags", "ncp.nds_lic_flags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7685
7686     { &hf_nds_ds_time,
7687         { "DS Time", "ncp.nds_ds_time", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7688
7689     { &hf_nds_ping_version,
7690         { "Ping Version", "ncp.nds_ping_version", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7691
7692     { &hf_nds_search_scope,
7693         { "Search Scope", "ncp.nds_search_scope", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7694
7695     { &hf_nds_num_objects,
7696         { "Number of Objects to Search", "ncp.nds_num_objects", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7697
7698
7699         { &hf_bit1siflags,
7700         { "Names", "ncp.bit1siflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7701
7702         { &hf_bit2siflags,
7703         { "Names and Values", "ncp.bit2siflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7704
7705         { &hf_bit3siflags,
7706         { "Effective Privileges", "ncp.bit3siflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7707
7708         { &hf_bit4siflags,
7709         { "Value Info", "ncp.bit4siflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7710
7711         { &hf_bit5siflags,
7712         { "Abbreviated Value", "ncp.bit5siflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7713
7714         { &hf_bit6siflags,
7715         { "Not Defined", "ncp.bit6siflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7716
7717         { &hf_bit7siflags,
7718         { "Not Defined", "ncp.bit7siflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7719
7720         { &hf_bit8siflags,
7721         { "Not Defined", "ncp.bit8siflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7722
7723         { &hf_bit9siflags,
7724         { "Expanded Class", "ncp.bit9siflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7725
7726         { &hf_bit10siflags,
7727         { "Not Defined", "ncp.bit10siflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7728
7729         { &hf_bit11siflags,
7730         { "Not Defined", "ncp.bit11siflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7731
7732         { &hf_bit12siflags,
7733         { "Not Defined", "ncp.bit12siflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7734
7735         { &hf_bit13siflags,
7736         { "Not Defined", "ncp.bit13siflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7737
7738         { &hf_bit14siflags,
7739         { "Not Defined", "ncp.bit14siflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7740
7741         { &hf_bit15siflags,
7742         { "Not Defined", "ncp.bit15siflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7743
7744         { &hf_bit16siflags,
7745         { "Not Defined", "ncp.bit16siflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7746
7747         { &hf_nds_segment_overlap,
7748           { "Segment overlap",  "nds.segment.overlap", FT_BOOLEAN, BASE_NONE,
7749                 NULL, 0x0, "Segment overlaps with other segments", HFILL }},
7750     
7751         { &hf_nds_segment_overlap_conflict,
7752           { "Conflicting data in segment overlap", "nds.segment.overlap.conflict",
7753         FT_BOOLEAN, BASE_NONE,
7754                 NULL, 0x0, "Overlapping segments contained conflicting data", HFILL }},
7755     
7756         { &hf_nds_segment_multiple_tails,
7757           { "Multiple tail segments found", "nds.segment.multipletails",
7758         FT_BOOLEAN, BASE_NONE,
7759                 NULL, 0x0, "Several tails were found when desegmenting the packet", HFILL }},
7760     
7761         { &hf_nds_segment_too_long_segment,
7762           { "Segment too long", "nds.segment.toolongsegment", FT_BOOLEAN, BASE_NONE,
7763                 NULL, 0x0, "Segment contained data past end of packet", HFILL }},
7764     
7765         { &hf_nds_segment_error,
7766           {"Desegmentation error",      "nds.segment.error", FT_FRAMENUM, BASE_NONE,
7767                 NULL, 0x0, "Desegmentation error due to illegal segments", HFILL }},
7768     
7769         { &hf_nds_segment,
7770           { "NDS Fragment",             "nds.fragment", FT_FRAMENUM, BASE_NONE,
7771                 NULL, 0x0, "NDPS Fragment", HFILL }},
7772     
7773         { &hf_nds_segments,
7774           { "NDS Fragments",    "nds.fragments", FT_NONE, BASE_NONE,
7775                 NULL, 0x0, "NDPS Fragments", HFILL }},
7776
7777
7778
7779  """
7780         # Print the registration code for the hf variables
7781         for var in sorted_vars:
7782                 print "\t{ &%s," % (var.HFName())
7783                 print "\t{ \"%s\", \"%s\", %s, %s, %s, 0x%x, \"\", HFILL }},\n" % \
7784                         (var.Description(), var.DFilter(),
7785                         var.EtherealFType(), var.Display(), var.ValuesName(),
7786                         var.Mask())
7787
7788         print "\t};\n"
7789
7790         if ett_list:
7791                 print "\tstatic gint *ett[] = {"
7792
7793                 for ett in ett_list:
7794                         print "\t\t&%s," % (ett,)
7795
7796                 print "\t};\n"
7797
7798         print """
7799         proto_register_field_array(proto_ncp, hf, array_length(hf));
7800         """
7801
7802         if ett_list:
7803                 print """
7804         proto_register_subtree_array(ett, array_length(ett));
7805                 """
7806
7807         print """
7808         register_init_routine(&ncp_init_protocol);
7809         register_postseq_cleanup_routine(&ncp_postseq_cleanup);
7810         register_final_registration_routine(final_registration_ncp2222);
7811         """
7812
7813
7814         # End of proto_register_ncp2222()
7815         print "}"
7816         print ""
7817         print '#include "packet-ncp2222.inc"'
7818
7819 def usage():
7820         print "Usage: ncp2222.py -o output_file"
7821         sys.exit(1)
7822
7823 def main():
7824         global compcode_lists
7825         global ptvc_lists
7826         global msg
7827
7828         optstring = "o:"
7829         out_filename = None
7830
7831         try:
7832                 opts, args = getopt.getopt(sys.argv[1:], optstring)
7833         except getopt.error:
7834                 usage()
7835
7836         for opt, arg in opts:
7837                 if opt == "-o":
7838                         out_filename = arg
7839                 else:
7840                         usage()
7841
7842         if len(args) != 0:
7843                 usage()
7844
7845         if not out_filename:
7846                 usage()
7847
7848         # Create the output file
7849         try:
7850                 out_file = open(out_filename, "w")
7851         except IOError, err:
7852                 sys.exit("Could not open %s for writing: %s" % (out_filename,
7853                         err))
7854
7855         # Set msg to current stdout
7856         msg = sys.stdout
7857
7858         # Set stdout to the output file
7859         sys.stdout = out_file
7860
7861         msg.write("Processing NCP definitions...\n")
7862         # Run the code, and if we catch any exception,
7863         # erase the output file.
7864         try:
7865                 compcode_lists  = UniqueCollection('Completion Code Lists')
7866                 ptvc_lists      = UniqueCollection('PTVC Lists')
7867
7868                 define_errors()
7869                 define_groups()
7870
7871                 define_ncp2222()
7872
7873                 msg.write("Defined %d NCP types.\n" % (len(packets),))
7874                 produce_code()
7875         except:
7876                 traceback.print_exc(20, msg)
7877                 try:
7878                         out_file.close()
7879                 except IOError, err:
7880                         msg.write("Could not close %s: %s\n" % (out_filename, err))
7881
7882                 try:
7883                         if os.path.exists(out_filename):
7884                                 os.remove(out_filename)
7885                 except OSError, err:
7886                         msg.write("Could not remove %s: %s\n" % (out_filename, err))
7887
7888                 sys.exit(1)
7889
7890
7891
7892 def define_ncp2222():
7893         ##############################################################################
7894         # NCP Packets. Here I list functions and subfunctions in hexadecimal like the
7895         # NCP book (and I believe LanAlyzer does this too).
7896         # However, Novell lists these in decimal in their on-line documentation.
7897         ##############################################################################
7898         # 2222/01
7899         pkt = NCP(0x01, "File Set Lock", 'file')
7900         pkt.Request(7)
7901         pkt.Reply(8)
7902         pkt.CompletionCodes([0x0000])
7903         # 2222/02
7904         pkt = NCP(0x02, "File Release Lock", 'file')
7905         pkt.Request(7)
7906         pkt.Reply(8)
7907         pkt.CompletionCodes([0x0000, 0xff00])
7908         # 2222/03
7909         pkt = NCP(0x03, "Log File Exclusive", 'file')
7910         pkt.Request( (12, 267), [
7911                 rec( 7, 1, DirHandle ),
7912                 rec( 8, 1, LockFlag ),
7913                 rec( 9, 2, TimeoutLimit, BE ),
7914                 rec( 11, (1, 256), FilePath ),
7915         ])
7916         pkt.Reply(8)
7917         pkt.CompletionCodes([0x0000, 0x8200, 0x9600, 0xfe0d, 0xff01])
7918         # 2222/04
7919         pkt = NCP(0x04, "Lock File Set", 'file')
7920         pkt.Request( 9, [
7921                 rec( 7, 2, TimeoutLimit ),
7922         ])
7923         pkt.Reply(8)
7924         pkt.CompletionCodes([0x0000, 0xfe0d, 0xff01])
7925         ## 2222/05
7926         pkt = NCP(0x05, "Release File", 'file')
7927         pkt.Request( (9, 264), [
7928                 rec( 7, 1, DirHandle ),
7929                 rec( 8, (1, 256), FilePath ),
7930         ])
7931         pkt.Reply(8)
7932         pkt.CompletionCodes([0x0000, 0x9b00, 0x9c03, 0xff1a])
7933         # 2222/06
7934         pkt = NCP(0x06, "Release File Set", 'file')
7935         pkt.Request( 8, [
7936                 rec( 7, 1, LockFlag ),
7937         ])
7938         pkt.Reply(8)
7939         pkt.CompletionCodes([0x0000])
7940         # 2222/07
7941         pkt = NCP(0x07, "Clear File", 'file')
7942         pkt.Request( (9, 264), [
7943                 rec( 7, 1, DirHandle ),
7944                 rec( 8, (1, 256), FilePath ),
7945         ])
7946         pkt.Reply(8)
7947         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03,
7948                 0xa100, 0xfd00, 0xff1a])
7949         # 2222/08
7950         pkt = NCP(0x08, "Clear File Set", 'file')
7951         pkt.Request( 8, [
7952                 rec( 7, 1, LockFlag ),
7953         ])
7954         pkt.Reply(8)
7955         pkt.CompletionCodes([0x0000])
7956         # 2222/09
7957         pkt = NCP(0x09, "Log Logical Record", 'file')
7958         pkt.Request( (11, 138), [
7959                 rec( 7, 1, LockFlag ),
7960                 rec( 8, 2, TimeoutLimit, BE ),
7961                 rec( 10, (1, 128), LogicalRecordName ),
7962         ], info_str=(LogicalRecordName, "Log Logical Record: %s", ", %s"))
7963         pkt.Reply(8)
7964         pkt.CompletionCodes([0x0000, 0x9600, 0xfe0d, 0xff1a])
7965         # 2222/0A, 10
7966         pkt = NCP(0x0A, "Lock Logical Record Set", 'file')
7967         pkt.Request( 10, [
7968                 rec( 7, 1, LockFlag ),
7969                 rec( 8, 2, TimeoutLimit ),
7970         ])
7971         pkt.Reply(8)
7972         pkt.CompletionCodes([0x0000, 0xfe0d, 0xff1a])
7973         # 2222/0B, 11
7974         pkt = NCP(0x0B, "Clear Logical Record", 'file')
7975         pkt.Request( (8, 135), [
7976                 rec( 7, (1, 128), LogicalRecordName ),
7977         ], info_str=(LogicalRecordName, "Clear Logical Record: %s", ", %s"))
7978         pkt.Reply(8)
7979         pkt.CompletionCodes([0x0000, 0xff1a])
7980         # 2222/0C, 12
7981         pkt = NCP(0x0C, "Release Logical Record", 'file')
7982         pkt.Request( (8, 135), [
7983                 rec( 7, (1, 128), LogicalRecordName ),
7984         ], info_str=(LogicalRecordName, "Release Logical Record: %s", ", %s"))
7985         pkt.Reply(8)
7986         pkt.CompletionCodes([0x0000, 0xff1a])
7987         # 2222/0D, 13
7988         pkt = NCP(0x0D, "Release Logical Record Set", 'file')
7989         pkt.Request( 8, [
7990                 rec( 7, 1, LockFlag ),
7991         ])
7992         pkt.Reply(8)
7993         pkt.CompletionCodes([0x0000])
7994         # 2222/0E, 14
7995         pkt = NCP(0x0E, "Clear Logical Record Set", 'file')
7996         pkt.Request( 8, [
7997                 rec( 7, 1, LockFlag ),
7998         ])
7999         pkt.Reply(8)
8000         pkt.CompletionCodes([0x0000])
8001         # 2222/1100, 17/00
8002         pkt = NCP(0x1100, "Write to Spool File", 'qms')
8003         pkt.Request( (11, 16), [
8004                 rec( 10, ( 1, 6 ), Data ),
8005         ], info_str=(Data, "Write to Spool File: %s", ", %s"))
8006         pkt.Reply(8)
8007         pkt.CompletionCodes([0x0000, 0x0104, 0x8000, 0x8101, 0x8701, 0x8800,
8008                              0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9400, 0x9500,
8009                              0x9600, 0x9804, 0x9900, 0xa100, 0xa201, 0xff19])
8010         # 2222/1101, 17/01
8011         pkt = NCP(0x1101, "Close Spool File", 'qms')
8012         pkt.Request( 11, [
8013                 rec( 10, 1, AbortQueueFlag ),
8014         ])
8015         pkt.Reply(8)
8016         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8701, 0x8800, 0x8d00,
8017                              0x8e00, 0x8f00, 0x9001, 0x9300, 0x9400, 0x9500,
8018                              0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03, 0x9d00,
8019                              0xa100, 0xd000, 0xd100, 0xd202, 0xd300, 0xd400,
8020                              0xda01, 0xe800, 0xea00, 0xeb00, 0xec00, 0xfc06,
8021                              0xfd00, 0xfe07, 0xff06])
8022         # 2222/1102, 17/02
8023         pkt = NCP(0x1102, "Set Spool File Flags", 'qms')
8024         pkt.Request( 30, [
8025                 rec( 10, 1, PrintFlags ),
8026                 rec( 11, 1, TabSize ),
8027                 rec( 12, 1, TargetPrinter ),
8028                 rec( 13, 1, Copies ),
8029                 rec( 14, 1, FormType ),
8030                 rec( 15, 1, Reserved ),
8031                 rec( 16, 14, BannerName ),
8032         ])
8033         pkt.Reply(8)
8034         pkt.CompletionCodes([0x0000, 0x9600, 0xd202, 0xd300, 0xe800, 0xea00,
8035                              0xeb00, 0xec00, 0xfc06, 0xfe07, 0xff06])
8036
8037         # 2222/1103, 17/03
8038         pkt = NCP(0x1103, "Spool A Disk File", 'qms')
8039         pkt.Request( (12, 23), [
8040                 rec( 10, 1, DirHandle ),
8041                 rec( 11, (1, 12), Data ),
8042         ], info_str=(Data, "Spool a Disk File: %s", ", %s"))
8043         pkt.Reply(8)
8044         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8701, 0x8800, 0x8d00,
8045                              0x8e00, 0x8f00, 0x9001, 0x9300, 0x9400, 0x9500,
8046                              0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03, 0x9d00,
8047                              0xa100, 0xd000, 0xd100, 0xd202, 0xd300, 0xd400,
8048                              0xda01, 0xe800, 0xea00, 0xeb00, 0xec00, 0xfc06,
8049                              0xfd00, 0xfe07, 0xff06])
8050
8051         # 2222/1106, 17/06
8052         pkt = NCP(0x1106, "Get Printer Status", 'qms')
8053         pkt.Request( 11, [
8054                 rec( 10, 1, TargetPrinter ),
8055         ])
8056         pkt.Reply(12, [
8057                 rec( 8, 1, PrinterHalted ),
8058                 rec( 9, 1, PrinterOffLine ),
8059                 rec( 10, 1, CurrentFormType ),
8060                 rec( 11, 1, RedirectedPrinter ),
8061         ])
8062         pkt.CompletionCodes([0x0000, 0x9600, 0xfb05, 0xfd00, 0xff06])
8063
8064         # 2222/1109, 17/09
8065         pkt = NCP(0x1109, "Create Spool File", 'qms')
8066         pkt.Request( (12, 23), [
8067                 rec( 10, 1, DirHandle ),
8068                 rec( 11, (1, 12), Data ),
8069         ], info_str=(Data, "Create Spool File: %s", ", %s"))
8070         pkt.Reply(8)
8071         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8400, 0x8701, 0x8d00,
8072                              0x8f00, 0x9001, 0x9400, 0x9600, 0x9804, 0x9900,
8073                              0x9b03, 0x9c03, 0xa100, 0xd000, 0xd100, 0xd202,
8074                              0xd300, 0xd400, 0xda01, 0xe800, 0xea00, 0xeb00,
8075                              0xec00, 0xfc06, 0xfd00, 0xfe07, 0xff06])
8076
8077         # 2222/110A, 17/10
8078         pkt = NCP(0x110A, "Get Printer's Queue", 'qms')
8079         pkt.Request( 11, [
8080                 rec( 10, 1, TargetPrinter ),
8081         ])
8082         pkt.Reply( 12, [
8083                 rec( 8, 4, ObjectID, BE ),
8084         ])
8085         pkt.CompletionCodes([0x0000, 0x9600, 0xff06])
8086
8087         # 2222/12, 18
8088         pkt = NCP(0x12, "Get Volume Info with Number", 'file')
8089         pkt.Request( 8, [
8090                 rec( 7, 1, VolumeNumber )
8091         ],info_str=(VolumeNumber, "Get Volume Information for Volume %d", ", %d"))
8092         pkt.Reply( 36, [
8093                 rec( 8, 2, SectorsPerCluster, BE ),
8094                 rec( 10, 2, TotalVolumeClusters, BE ),
8095                 rec( 12, 2, AvailableClusters, BE ),
8096                 rec( 14, 2, TotalDirectorySlots, BE ),
8097                 rec( 16, 2, AvailableDirectorySlots, BE ),
8098                 rec( 18, 16, VolumeName ),
8099                 rec( 34, 2, RemovableFlag, BE ),
8100         ])
8101         pkt.CompletionCodes([0x0000, 0x9804])
8102
8103         # 2222/13, 19
8104         pkt = NCP(0x13, "Get Station Number", 'connection')
8105         pkt.Request(7)
8106         pkt.Reply(11, [
8107                 rec( 8, 3, StationNumber )
8108         ])
8109         pkt.CompletionCodes([0x0000, 0xff00])
8110
8111         # 2222/14, 20
8112         pkt = NCP(0x14, "Get File Server Date And Time", 'fileserver')
8113         pkt.Request(7)
8114         pkt.Reply(15, [
8115                 rec( 8, 1, Year ),
8116                 rec( 9, 1, Month ),
8117                 rec( 10, 1, Day ),
8118                 rec( 11, 1, Hour ),
8119                 rec( 12, 1, Minute ),
8120                 rec( 13, 1, Second ),
8121                 rec( 14, 1, DayOfWeek ),
8122         ])
8123         pkt.CompletionCodes([0x0000])
8124
8125         # 2222/1500, 21/00
8126         pkt = NCP(0x1500, "Send Broadcast Message", 'message')
8127         pkt.Request((13, 70), [
8128                 rec( 10, 1, ClientListLen, var="x" ),
8129                 rec( 11, 1, TargetClientList, repeat="x" ),
8130                 rec( 12, (1, 58), TargetMessage ),
8131         ], info_str=(TargetMessage, "Send Broadcast Message: %s", ", %s"))
8132         pkt.Reply(10, [
8133                 rec( 8, 1, ClientListLen, var="x" ),
8134                 rec( 9, 1, SendStatus, repeat="x" )
8135         ])
8136         pkt.CompletionCodes([0x0000, 0xfd00])
8137
8138         # 2222/1501, 21/01
8139         pkt = NCP(0x1501, "Get Broadcast Message", 'message')
8140         pkt.Request(10)
8141         pkt.Reply((9,66), [
8142                 rec( 8, (1, 58), TargetMessage )
8143         ])
8144         pkt.CompletionCodes([0x0000, 0xfd00])
8145
8146         # 2222/1502, 21/02
8147         pkt = NCP(0x1502, "Disable Broadcasts", 'message')
8148         pkt.Request(10)
8149         pkt.Reply(8)
8150         pkt.CompletionCodes([0x0000, 0xfb0a])
8151
8152         # 2222/1503, 21/03
8153         pkt = NCP(0x1503, "Enable Broadcasts", 'message')
8154         pkt.Request(10)
8155         pkt.Reply(8)
8156         pkt.CompletionCodes([0x0000])
8157
8158         # 2222/1509, 21/09
8159         pkt = NCP(0x1509, "Broadcast To Console", 'message')
8160         pkt.Request((11, 68), [
8161                 rec( 10, (1, 58), TargetMessage )
8162         ], info_str=(TargetMessage, "Broadcast to Console: %s", ", %s"))
8163         pkt.Reply(8)
8164         pkt.CompletionCodes([0x0000])
8165         # 2222/150A, 21/10
8166         pkt = NCP(0x150A, "Send Broadcast Message", 'message')
8167         pkt.Request((17, 74), [
8168                 rec( 10, 2, ClientListCount, LE, var="x" ),
8169                 rec( 12, 4, ClientList, LE, repeat="x" ),
8170                 rec( 16, (1, 58), TargetMessage ),
8171         ], info_str=(TargetMessage, "Send Broadcast Message: %s", ", %s"))
8172         pkt.Reply(14, [
8173                 rec( 8, 2, ClientListCount, LE, var="x" ),
8174                 rec( 10, 4, ClientCompFlag, LE, repeat="x" ),
8175         ])
8176         pkt.CompletionCodes([0x0000, 0xfd00])
8177
8178         # 2222/150B, 21/11
8179         pkt = NCP(0x150B, "Get Broadcast Message", 'message')
8180         pkt.Request(10)
8181         pkt.Reply((9,66), [
8182                 rec( 8, (1, 58), TargetMessage )
8183         ])
8184         pkt.CompletionCodes([0x0000, 0xfd00])
8185
8186         # 2222/150C, 21/12
8187         pkt = NCP(0x150C, "Connection Message Control", 'message')
8188         pkt.Request(22, [
8189                 rec( 10, 1, ConnectionControlBits ),
8190                 rec( 11, 3, Reserved3 ),
8191                 rec( 14, 4, ConnectionListCount, LE, var="x" ),
8192                 rec( 18, 4, ConnectionList, LE, repeat="x" ),
8193         ])
8194         pkt.Reply(8)
8195         pkt.CompletionCodes([0x0000, 0xff00])
8196
8197         # 2222/1600, 22/0
8198         pkt = NCP(0x1600, "Set Directory Handle", 'fileserver')
8199         pkt.Request((13,267), [
8200                 rec( 10, 1, TargetDirHandle ),
8201                 rec( 11, 1, DirHandle ),
8202                 rec( 12, (1, 255), Path ),
8203         ], info_str=(Path, "Set Directory Handle to: %s", ", %s"))
8204         pkt.Reply(8)
8205         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8206                              0xfd00, 0xff00])
8207
8208
8209         # 2222/1601, 22/1
8210         pkt = NCP(0x1601, "Get Directory Path", 'fileserver')
8211         pkt.Request(11, [
8212                 rec( 10, 1, DirHandle ),
8213         ],info_str=(DirHandle, "Get Directory Path for Directory Handle %d", ", %d"))
8214         pkt.Reply((9,263), [
8215                 rec( 8, (1,255), Path ),
8216         ])
8217         pkt.CompletionCodes([0x0000, 0x9600, 0x9b00, 0x9c00, 0xa100])
8218
8219         # 2222/1602, 22/2
8220         pkt = NCP(0x1602, "Scan Directory Information", 'fileserver')
8221         pkt.Request((14,268), [
8222                 rec( 10, 1, DirHandle ),
8223                 rec( 11, 2, StartingSearchNumber, BE ),
8224                 rec( 13, (1, 255), Path ),
8225         ], info_str=(Path, "Scan Directory Information: %s", ", %s"))
8226         pkt.Reply(36, [
8227                 rec( 8, 16, DirectoryPath ),
8228                 rec( 24, 2, CreationDate, BE ),
8229                 rec( 26, 2, CreationTime, BE ),
8230                 rec( 28, 4, CreatorID, BE ),
8231                 rec( 32, 1, AccessRightsMask ),
8232                 rec( 33, 1, Reserved ),
8233                 rec( 34, 2, NextSearchNumber, BE ),
8234         ])
8235         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8236                              0xfd00, 0xff00])
8237
8238         # 2222/1603, 22/3
8239         pkt = NCP(0x1603, "Get Effective Directory Rights", 'fileserver')
8240         pkt.Request((14,268), [
8241                 rec( 10, 1, DirHandle ),
8242                 rec( 11, 2, StartingSearchNumber ),
8243                 rec( 13, (1, 255), Path ),
8244         ], info_str=(Path, "Get Effective Directory Rights: %s", ", %s"))
8245         pkt.Reply(9, [
8246                 rec( 8, 1, AccessRightsMask ),
8247         ])
8248         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8249                              0xfd00, 0xff00])
8250
8251         # 2222/1604, 22/4
8252         pkt = NCP(0x1604, "Modify Maximum Rights Mask", 'fileserver')
8253         pkt.Request((14,268), [
8254                 rec( 10, 1, DirHandle ),
8255                 rec( 11, 1, RightsGrantMask ),
8256                 rec( 12, 1, RightsRevokeMask ),
8257                 rec( 13, (1, 255), Path ),
8258         ], info_str=(Path, "Modify Maximum Rights Mask: %s", ", %s"))
8259         pkt.Reply(8)
8260         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8261                              0xfd00, 0xff00])
8262
8263         # 2222/1605, 22/5
8264         pkt = NCP(0x1605, "Get Volume Number", 'fileserver')
8265         pkt.Request((11, 265), [
8266                 rec( 10, (1,255), VolumeNameLen ),
8267         ], info_str=(VolumeNameLen, "Get Volume Number for: %s", ", %s"))
8268         pkt.Reply(9, [
8269                 rec( 8, 1, VolumeNumber ),
8270         ])
8271         pkt.CompletionCodes([0x0000, 0x9600, 0x9804])
8272
8273         # 2222/1606, 22/6
8274         pkt = NCP(0x1606, "Get Volume Name", 'fileserver')
8275         pkt.Request(11, [
8276                 rec( 10, 1, VolumeNumber ),
8277         ],info_str=(VolumeNumber, "Get Name for Volume %d", ", %d"))
8278         pkt.Reply((9, 263), [
8279                 rec( 8, (1,255), VolumeNameLen ),
8280         ])
8281         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0xff00])
8282
8283         # 2222/160A, 22/10
8284         pkt = NCP(0x160A, "Create Directory", 'fileserver')
8285         pkt.Request((13,267), [
8286                 rec( 10, 1, DirHandle ),
8287                 rec( 11, 1, AccessRightsMask ),
8288                 rec( 12, (1, 255), Path ),
8289         ], info_str=(Path, "Create Directory: %s", ", %s"))
8290         pkt.Reply(8)
8291         pkt.CompletionCodes([0x0000, 0x8400, 0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03,
8292                              0x9e00, 0xa100, 0xfd00, 0xff00])
8293
8294         # 2222/160B, 22/11
8295         pkt = NCP(0x160B, "Delete Directory", 'fileserver')
8296         pkt.Request((13,267), [
8297                 rec( 10, 1, DirHandle ),
8298                 rec( 11, 1, Reserved ),
8299                 rec( 12, (1, 255), Path ),
8300         ], info_str=(Path, "Delete Directory: %s", ", %s"))
8301         pkt.Reply(8)
8302         pkt.CompletionCodes([0x0000, 0x8a00, 0x9600, 0x9804, 0x9b03, 0x9c03,
8303                              0x9f00, 0xa000, 0xa100, 0xfd00, 0xff00])
8304
8305         # 2222/160C, 22/12
8306         pkt = NCP(0x160C, "Scan Directory for Trustees", 'fileserver')
8307         pkt.Request((13,267), [
8308                 rec( 10, 1, DirHandle ),
8309                 rec( 11, 1, TrusteeSetNumber ),
8310                 rec( 12, (1, 255), Path ),
8311         ], info_str=(Path, "Scan Directory for Trustees: %s", ", %s"))
8312         pkt.Reply(57, [
8313                 rec( 8, 16, DirectoryPath ),
8314                 rec( 24, 2, CreationDate, BE ),
8315                 rec( 26, 2, CreationTime, BE ),
8316                 rec( 28, 4, CreatorID ),
8317                 rec( 32, 4, TrusteeID, BE ),
8318                 rec( 36, 4, TrusteeID, BE ),
8319                 rec( 40, 4, TrusteeID, BE ),
8320                 rec( 44, 4, TrusteeID, BE ),
8321                 rec( 48, 4, TrusteeID, BE ),
8322                 rec( 52, 1, AccessRightsMask ),
8323                 rec( 53, 1, AccessRightsMask ),
8324                 rec( 54, 1, AccessRightsMask ),
8325                 rec( 55, 1, AccessRightsMask ),
8326                 rec( 56, 1, AccessRightsMask ),
8327         ])
8328         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9b03, 0x9c03,
8329                              0xa100, 0xfd00, 0xff00])
8330
8331         # 2222/160D, 22/13
8332         pkt = NCP(0x160D, "Add Trustee to Directory", 'fileserver')
8333         pkt.Request((17,271), [
8334                 rec( 10, 1, DirHandle ),
8335                 rec( 11, 4, TrusteeID, BE ),
8336                 rec( 15, 1, AccessRightsMask ),
8337                 rec( 16, (1, 255), Path ),
8338         ], info_str=(Path, "Add Trustee to Directory: %s", ", %s"))
8339         pkt.Reply(8)
8340         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03,
8341                              0xa100, 0xfc06, 0xfd00, 0xff00])
8342
8343         # 2222/160E, 22/14
8344         pkt = NCP(0x160E, "Delete Trustee from Directory", 'fileserver')
8345         pkt.Request((17,271), [
8346                 rec( 10, 1, DirHandle ),
8347                 rec( 11, 4, TrusteeID, BE ),
8348                 rec( 15, 1, Reserved ),
8349                 rec( 16, (1, 255), Path ),
8350         ], info_str=(Path, "Delete Trustee from Directory: %s", ", %s"))
8351         pkt.Reply(8)
8352         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03,
8353                              0xa100, 0xfc06, 0xfd00, 0xfe07, 0xff00])
8354
8355         # 2222/160F, 22/15
8356         pkt = NCP(0x160F, "Rename Directory", 'fileserver')
8357         pkt.Request((13, 521), [
8358                 rec( 10, 1, DirHandle ),
8359                 rec( 11, (1, 255), Path ),
8360                 rec( -1, (1, 255), NewPath ),
8361         ], info_str=(Path, "Rename Directory: %s", ", %s"))
8362         pkt.Reply(8)
8363         pkt.CompletionCodes([0x0000, 0x8b00, 0x9200, 0x9600, 0x9804, 0x9b03, 0x9c03,
8364                              0x9e00, 0xa100, 0xef00, 0xfd00, 0xff00])
8365
8366         # 2222/1610, 22/16
8367         pkt = NCP(0x1610, "Purge Erased Files", 'file')
8368         pkt.Request(10)
8369         pkt.Reply(8)
8370         pkt.CompletionCodes([0x0000, 0x8100, 0x9600, 0x9804, 0xa100, 0xff00])
8371
8372         # 2222/1611, 22/17
8373         pkt = NCP(0x1611, "Recover Erased File", 'fileserver')
8374         pkt.Request(11, [
8375                 rec( 10, 1, DirHandle ),
8376         ],info_str=(DirHandle, "Recover Erased File from Directory Handle %d", ", %d"))
8377         pkt.Reply(38, [
8378                 rec( 8, 15, OldFileName ),
8379                 rec( 23, 15, NewFileName ),
8380         ])
8381         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03,
8382                              0xa100, 0xfd00, 0xff00])
8383         # 2222/1612, 22/18
8384         pkt = NCP(0x1612, "Alloc Permanent Directory Handle", 'fileserver')
8385         pkt.Request((13, 267), [
8386                 rec( 10, 1, DirHandle ),
8387                 rec( 11, 1, DirHandleName ),
8388                 rec( 12, (1,255), Path ),
8389         ], info_str=(Path, "Allocate Permanent Directory Handle: %s", ", %s"))
8390         pkt.Reply(10, [
8391                 rec( 8, 1, DirHandle ),
8392                 rec( 9, 1, AccessRightsMask ),
8393         ])
8394         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9900, 0x9b00, 0x9c03, 0x9d00,
8395                              0xa100, 0xfd00, 0xff00])
8396         # 2222/1613, 22/19
8397         pkt = NCP(0x1613, "Alloc Temporary Directory Handle", 'fileserver')
8398         pkt.Request((13, 267), [
8399                 rec( 10, 1, DirHandle ),
8400                 rec( 11, 1, DirHandleName ),
8401                 rec( 12, (1,255), Path ),
8402         ], info_str=(Path, "Allocate Temporary Directory Handle: %s", ", %s"))
8403         pkt.Reply(10, [
8404                 rec( 8, 1, DirHandle ),
8405                 rec( 9, 1, AccessRightsMask ),
8406         ])
8407         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9900, 0x9c03, 0x9d00,
8408                              0xa100, 0xfd00, 0xff00])
8409         # 2222/1614, 22/20
8410         pkt = NCP(0x1614, "Deallocate Directory Handle", 'fileserver')
8411         pkt.Request(11, [
8412                 rec( 10, 1, DirHandle ),
8413         ],info_str=(DirHandle, "Deallocate Directory Handle %d", ", %d"))
8414         pkt.Reply(8)
8415         pkt.CompletionCodes([0x0000, 0x9b03])
8416         # 2222/1615, 22/21
8417         pkt = NCP(0x1615, "Get Volume Info with Handle", 'file')
8418         pkt.Request( 11, [
8419                 rec( 10, 1, DirHandle )
8420         ],info_str=(DirHandle, "Get Volume Information with Handle %d", ", %d"))
8421         pkt.Reply( 36, [
8422                 rec( 8, 2, SectorsPerCluster, BE ),
8423                 rec( 10, 2, TotalVolumeClusters, BE ),
8424                 rec( 12, 2, AvailableClusters, BE ),
8425                 rec( 14, 2, TotalDirectorySlots, BE ),
8426                 rec( 16, 2, AvailableDirectorySlots, BE ),
8427                 rec( 18, 16, VolumeName ),
8428                 rec( 34, 2, RemovableFlag, BE ),
8429         ])
8430         pkt.CompletionCodes([0x0000, 0xff00])
8431         # 2222/1616, 22/22
8432         pkt = NCP(0x1616, "Alloc Special Temporary Directory Handle", 'fileserver')
8433         pkt.Request((13, 267), [
8434                 rec( 10, 1, DirHandle ),
8435                 rec( 11, 1, DirHandleName ),
8436                 rec( 12, (1,255), Path ),
8437         ], info_str=(Path, "Allocate Special Temporary Directory Handle: %s", ", %s"))
8438         pkt.Reply(10, [
8439                 rec( 8, 1, DirHandle ),
8440                 rec( 9, 1, AccessRightsMask ),
8441         ])
8442         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9900, 0x9c03, 0x9d00,
8443                              0xa100, 0xfd00, 0xff00])
8444         # 2222/1617, 22/23
8445         pkt = NCP(0x1617, "Extract a Base Handle", 'fileserver')
8446         pkt.Request(11, [
8447                 rec( 10, 1, DirHandle ),
8448         ],info_str=(DirHandle, "Extract a Base Handle from Directory Handle %d", ", %d"))
8449         pkt.Reply(22, [
8450                 rec( 8, 10, ServerNetworkAddress ),
8451                 rec( 18, 4, DirHandleLong ),
8452         ])
8453         pkt.CompletionCodes([0x0000, 0x9600, 0x9b03])
8454         # 2222/1618, 22/24
8455         pkt = NCP(0x1618, "Restore an Extracted Base Handle", 'fileserver')
8456         pkt.Request(24, [
8457                 rec( 10, 10, ServerNetworkAddress ),
8458                 rec( 20, 4, DirHandleLong ),
8459         ])
8460         pkt.Reply(10, [
8461                 rec( 8, 1, DirHandle ),
8462                 rec( 9, 1, AccessRightsMask ),
8463         ])
8464         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c00, 0x9d00, 0xa100,
8465                              0xfd00, 0xff00])
8466         # 2222/1619, 22/25
8467         pkt = NCP(0x1619, "Set Directory Information", 'fileserver')
8468         pkt.Request((21, 275), [
8469                 rec( 10, 1, DirHandle ),
8470                 rec( 11, 2, CreationDate ),
8471                 rec( 13, 2, CreationTime ),
8472                 rec( 15, 4, CreatorID, BE ),
8473                 rec( 19, 1, AccessRightsMask ),
8474                 rec( 20, (1,255), Path ),
8475         ], info_str=(Path, "Set Directory Information: %s", ", %s"))
8476         pkt.Reply(8)
8477         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9b03, 0x9c00, 0xa100,
8478                              0xff16])
8479         # 2222/161A, 22/26
8480         pkt = NCP(0x161A, "Get Path Name of a Volume-Directory Number Pair", 'fileserver')
8481         pkt.Request(13, [
8482                 rec( 10, 1, VolumeNumber ),
8483                 rec( 11, 2, DirectoryEntryNumberWord ),
8484         ])
8485         pkt.Reply((9,263), [
8486                 rec( 8, (1,255), Path ),
8487                 ])
8488         pkt.CompletionCodes([0x0000, 0x9804, 0x9c00, 0xa100])
8489         # 2222/161B, 22/27
8490         pkt = NCP(0x161B, "Scan Salvageable Files", 'fileserver')
8491         pkt.Request(15, [
8492                 rec( 10, 1, DirHandle ),
8493                 rec( 11, 4, SequenceNumber ),
8494         ])
8495         pkt.Reply(140, [
8496                 rec( 8, 4, SequenceNumber ),
8497                 rec( 12, 2, Subdirectory ),
8498                 rec( 14, 2, Reserved2 ),
8499                 rec( 16, 4, AttributesDef32 ),
8500                 rec( 20, 1, UniqueID ),
8501                 rec( 21, 1, FlagsDef ),
8502                 rec( 22, 1, DestNameSpace ),
8503                 rec( 23, 1, FileNameLen ),
8504                 rec( 24, 12, FileName12 ),
8505                 rec( 36, 2, CreationTime ),
8506                 rec( 38, 2, CreationDate ),
8507                 rec( 40, 4, CreatorID, BE ),
8508                 rec( 44, 2, ArchivedTime ),
8509                 rec( 46, 2, ArchivedDate ),
8510                 rec( 48, 4, ArchiverID, BE ),
8511                 rec( 52, 2, UpdateTime ),
8512                 rec( 54, 2, UpdateDate ),
8513                 rec( 56, 4, UpdateID, BE ),
8514                 rec( 60, 4, FileSize, BE ),
8515                 rec( 64, 44, Reserved44 ),
8516                 rec( 108, 2, InheritedRightsMask ),
8517                 rec( 110, 2, LastAccessedDate ),
8518                 rec( 112, 4, DeletedFileTime ),
8519                 rec( 116, 2, DeletedTime ),
8520                 rec( 118, 2, DeletedDate ),
8521                 rec( 120, 4, DeletedID, BE ),
8522                 rec( 124, 16, Reserved16 ),
8523         ])
8524         pkt.CompletionCodes([0x0000, 0xfb01, 0xff1d])
8525         # 2222/161C, 22/28
8526         pkt = NCP(0x161C, "Recover Salvageable File", 'fileserver')
8527         pkt.Request((17,525), [
8528                 rec( 10, 1, DirHandle ),
8529                 rec( 11, 4, SequenceNumber ),
8530                 rec( 15, (1, 255), FileName ),
8531                 rec( -1, (1, 255), NewFileNameLen ),
8532         ], info_str=(FileName, "Recover File: %s", ", %s"))
8533         pkt.Reply(8)
8534         pkt.CompletionCodes([0x0000, 0x8401, 0x9c03, 0xfe02])
8535         # 2222/161D, 22/29
8536         pkt = NCP(0x161D, "Purge Salvageable File", 'fileserver')
8537         pkt.Request(15, [
8538                 rec( 10, 1, DirHandle ),
8539                 rec( 11, 4, SequenceNumber ),
8540         ])
8541         pkt.Reply(8)
8542         pkt.CompletionCodes([0x0000, 0x8500, 0x9c03])
8543         # 2222/161E, 22/30
8544         pkt = NCP(0x161E, "Scan a Directory", 'fileserver')
8545         pkt.Request((17, 271), [
8546                 rec( 10, 1, DirHandle ),
8547                 rec( 11, 1, DOSFileAttributes ),
8548                 rec( 12, 4, SequenceNumber ),
8549                 rec( 16, (1, 255), SearchPattern ),
8550         ], info_str=(SearchPattern, "Scan a Directory: %s", ", %s"))
8551         pkt.Reply(140, [
8552                 rec( 8, 4, SequenceNumber ),
8553                 rec( 12, 4, Subdirectory ),
8554                 rec( 16, 4, AttributesDef32 ),
8555                 rec( 20, 1, UniqueID, LE ),
8556                 rec( 21, 1, PurgeFlags ),
8557                 rec( 22, 1, DestNameSpace ),
8558                 rec( 23, 1, NameLen ),
8559                 rec( 24, 12, Name12 ),
8560                 rec( 36, 2, CreationTime ),
8561                 rec( 38, 2, CreationDate ),
8562                 rec( 40, 4, CreatorID, BE ),
8563                 rec( 44, 2, ArchivedTime ),
8564                 rec( 46, 2, ArchivedDate ),
8565                 rec( 48, 4, ArchiverID, BE ),
8566                 rec( 52, 2, UpdateTime ),
8567                 rec( 54, 2, UpdateDate ),
8568                 rec( 56, 4, UpdateID, BE ),
8569                 rec( 60, 4, FileSize, BE ),
8570                 rec( 64, 44, Reserved44 ),
8571                 rec( 108, 2, InheritedRightsMask ),
8572                 rec( 110, 2, LastAccessedDate ),
8573                 rec( 112, 28, Reserved28 ),
8574         ])
8575         pkt.CompletionCodes([0x0000, 0x8500, 0x9c03])
8576         # 2222/161F, 22/31
8577         pkt = NCP(0x161F, "Get Directory Entry", 'fileserver')
8578         pkt.Request(11, [
8579                 rec( 10, 1, DirHandle ),
8580         ])
8581         pkt.Reply(136, [
8582                 rec( 8, 4, Subdirectory ),
8583                 rec( 12, 4, AttributesDef32 ),
8584                 rec( 16, 1, UniqueID, LE ),
8585                 rec( 17, 1, PurgeFlags ),
8586                 rec( 18, 1, DestNameSpace ),
8587                 rec( 19, 1, NameLen ),
8588                 rec( 20, 12, Name12 ),
8589                 rec( 32, 2, CreationTime ),
8590                 rec( 34, 2, CreationDate ),
8591                 rec( 36, 4, CreatorID, BE ),
8592                 rec( 40, 2, ArchivedTime ),
8593                 rec( 42, 2, ArchivedDate ),
8594                 rec( 44, 4, ArchiverID, BE ),
8595                 rec( 48, 2, UpdateTime ),
8596                 rec( 50, 2, UpdateDate ),
8597                 rec( 52, 4, NextTrusteeEntry, BE ),
8598                 rec( 56, 48, Reserved48 ),
8599                 rec( 104, 2, MaximumSpace ),
8600                 rec( 106, 2, InheritedRightsMask ),
8601                 rec( 108, 28, Undefined28 ),
8602         ])
8603         pkt.CompletionCodes([0x0000, 0x8900, 0xbf00, 0xfb00])
8604         # 2222/1620, 22/32
8605         pkt = NCP(0x1620, "Scan Volume's User Disk Restrictions", 'fileserver')
8606         pkt.Request(15, [
8607                 rec( 10, 1, VolumeNumber ),
8608                 rec( 11, 4, SequenceNumber ),
8609         ])
8610         pkt.Reply(17, [
8611                 rec( 8, 1, NumberOfEntries, var="x" ),
8612                 rec( 9, 8, ObjectIDStruct, repeat="x" ),
8613         ])
8614         pkt.CompletionCodes([0x0000, 0x9800])
8615         # 2222/1621, 22/33
8616         pkt = NCP(0x1621, "Add User Disk Space Restriction", 'fileserver')
8617         pkt.Request(19, [
8618                 rec( 10, 1, VolumeNumber ),
8619                 rec( 11, 4, ObjectID ),
8620                 rec( 15, 4, DiskSpaceLimit ),
8621         ])
8622         pkt.Reply(8)
8623         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9800])
8624         # 2222/1622, 22/34
8625         pkt = NCP(0x1622, "Remove User Disk Space Restrictions", 'fileserver')
8626         pkt.Request(15, [
8627                 rec( 10, 1, VolumeNumber ),
8628                 rec( 11, 4, ObjectID ),
8629         ])
8630         pkt.Reply(8)
8631         pkt.CompletionCodes([0x0000, 0x8c00, 0xfe0e])
8632         # 2222/1623, 22/35
8633         pkt = NCP(0x1623, "Get Directory Disk Space Restriction", 'fileserver')
8634         pkt.Request(11, [
8635                 rec( 10, 1, DirHandle ),
8636         ])
8637         pkt.Reply(18, [
8638                 rec( 8, 1, NumberOfEntries ),
8639                 rec( 9, 1, Level ),
8640                 rec( 10, 4, MaxSpace ),
8641                 rec( 14, 4, CurrentSpace ),
8642         ])
8643         pkt.CompletionCodes([0x0000])
8644         # 2222/1624, 22/36
8645         pkt = NCP(0x1624, "Set Directory Disk Space Restriction", 'fileserver')
8646         pkt.Request(15, [
8647                 rec( 10, 1, DirHandle ),
8648                 rec( 11, 4, DiskSpaceLimit ),
8649         ])
8650         pkt.Reply(8)
8651         pkt.CompletionCodes([0x0000, 0x0101, 0x8c00, 0xbf00])
8652         # 2222/1625, 22/37
8653         pkt = NCP(0x1625, "Set Directory Entry Information", 'fileserver')
8654         pkt.Request(NO_LENGTH_CHECK, [
8655                 #
8656                 # XXX - this didn't match what was in the spec for 22/37
8657                 # on the Novell Web site.
8658                 #
8659                 rec( 10, 1, DirHandle ),
8660                 rec( 11, 1, SearchAttributes ),
8661                 rec( 12, 4, SequenceNumber ),
8662                 rec( 16, 2, ChangeBits ),
8663                 rec( 18, 2, Reserved2 ),
8664                 rec( 20, 4, Subdirectory ),
8665                 srec(DOSDirectoryEntryStruct, req_cond="ncp.search_att_sub == TRUE"),
8666                 srec(DOSFileEntryStruct, req_cond="ncp.search_att_sub == FALSE"),
8667         ])
8668         pkt.Reply(8)
8669         pkt.ReqCondSizeConstant()
8670         pkt.CompletionCodes([0x0000, 0x0106, 0x8c00, 0xbf00])
8671         # 2222/1626, 22/38
8672         pkt = NCP(0x1626, "Scan File or Directory for Extended Trustees", 'fileserver')
8673         pkt.Request((13,267), [
8674                 rec( 10, 1, DirHandle ),
8675                 rec( 11, 1, SequenceByte ),
8676                 rec( 12, (1, 255), Path ),
8677         ], info_str=(Path, "Scan for Extended Trustees: %s", ", %s"))
8678         pkt.Reply(91, [
8679                 rec( 8, 1, NumberOfEntries, var="x" ),
8680                 rec( 9, 4, ObjectID ),
8681                 rec( 13, 4, ObjectID ),
8682                 rec( 17, 4, ObjectID ),
8683                 rec( 21, 4, ObjectID ),
8684                 rec( 25, 4, ObjectID ),
8685                 rec( 29, 4, ObjectID ),
8686                 rec( 33, 4, ObjectID ),
8687                 rec( 37, 4, ObjectID ),
8688                 rec( 41, 4, ObjectID ),
8689                 rec( 45, 4, ObjectID ),
8690                 rec( 49, 4, ObjectID ),
8691                 rec( 53, 4, ObjectID ),
8692                 rec( 57, 4, ObjectID ),
8693                 rec( 61, 4, ObjectID ),
8694                 rec( 65, 4, ObjectID ),
8695                 rec( 69, 4, ObjectID ),
8696                 rec( 73, 4, ObjectID ),
8697                 rec( 77, 4, ObjectID ),
8698                 rec( 81, 4, ObjectID ),
8699                 rec( 85, 4, ObjectID ),
8700                 rec( 89, 2, AccessRightsMaskWord, repeat="x" ),
8701         ])
8702         pkt.CompletionCodes([0x0000, 0x9800, 0x9b00, 0x9c00])
8703         # 2222/1627, 22/39
8704         pkt = NCP(0x1627, "Add Extended Trustee to Directory or File", 'fileserver')
8705         pkt.Request((18,272), [
8706                 rec( 10, 1, DirHandle ),
8707                 rec( 11, 4, ObjectID, BE ),
8708                 rec( 15, 2, TrusteeRights ),
8709                 rec( 17, (1, 255), Path ),
8710         ], info_str=(Path, "Add Extended Trustee: %s", ", %s"))
8711         pkt.Reply(8)
8712         pkt.CompletionCodes([0x0000, 0x9000])
8713         # 2222/1628, 22/40
8714         pkt = NCP(0x1628, "Scan Directory Disk Space", 'fileserver')
8715         pkt.Request((17,271), [
8716                 rec( 10, 1, DirHandle ),
8717                 rec( 11, 1, SearchAttributes ),
8718                 rec( 12, 4, SequenceNumber ),
8719                 rec( 16, (1, 255), SearchPattern ),
8720         ], info_str=(SearchPattern, "Scan Directory Disk Space: %s", ", %s"))
8721         pkt.Reply((148), [
8722                 rec( 8, 4, SequenceNumber ),
8723                 rec( 12, 4, Subdirectory ),
8724                 rec( 16, 4, AttributesDef32 ),
8725                 rec( 20, 1, UniqueID ),
8726                 rec( 21, 1, PurgeFlags ),
8727                 rec( 22, 1, DestNameSpace ),
8728                 rec( 23, 1, NameLen ),
8729                 rec( 24, 12, Name12 ),
8730                 rec( 36, 2, CreationTime ),
8731                 rec( 38, 2, CreationDate ),
8732                 rec( 40, 4, CreatorID, BE ),
8733                 rec( 44, 2, ArchivedTime ),
8734                 rec( 46, 2, ArchivedDate ),
8735                 rec( 48, 4, ArchiverID, BE ),
8736                 rec( 52, 2, UpdateTime ),
8737                 rec( 54, 2, UpdateDate ),
8738                 rec( 56, 4, UpdateID, BE ),
8739                 rec( 60, 4, DataForkSize, BE ),
8740                 rec( 64, 4, DataForkFirstFAT, BE ),
8741                 rec( 68, 4, NextTrusteeEntry, BE ),
8742                 rec( 72, 36, Reserved36 ),
8743                 rec( 108, 2, InheritedRightsMask ),
8744                 rec( 110, 2, LastAccessedDate ),
8745                 rec( 112, 4, DeletedFileTime ),
8746                 rec( 116, 2, DeletedTime ),
8747                 rec( 118, 2, DeletedDate ),
8748                 rec( 120, 4, DeletedID, BE ),
8749                 rec( 124, 8, Undefined8 ),
8750                 rec( 132, 4, PrimaryEntry, LE ),
8751                 rec( 136, 4, NameList, LE ),
8752                 rec( 140, 4, OtherFileForkSize, BE ),
8753                 rec( 144, 4, OtherFileForkFAT, BE ),
8754         ])
8755         pkt.CompletionCodes([0x0000, 0x8900, 0x9c03, 0xfb01, 0xff00])
8756         # 2222/1629, 22/41
8757         pkt = NCP(0x1629, "Get Object Disk Usage and Restrictions", 'fileserver')
8758         pkt.Request(15, [
8759                 rec( 10, 1, VolumeNumber ),
8760                 rec( 11, 4, ObjectID, BE ),
8761         ])
8762         pkt.Reply(16, [
8763                 rec( 8, 4, Restriction ),
8764                 rec( 12, 4, InUse ),
8765         ])
8766         pkt.CompletionCodes([0x0000, 0x9802])
8767         # 2222/162A, 22/42
8768         pkt = NCP(0x162A, "Get Effective Rights for Directory Entry", 'fileserver')
8769         pkt.Request((12,266), [
8770                 rec( 10, 1, DirHandle ),
8771                 rec( 11, (1, 255), Path ),
8772         ], info_str=(Path, "Get Effective Rights: %s", ", %s"))
8773         pkt.Reply(10, [
8774                 rec( 8, 2, AccessRightsMaskWord ),
8775         ])
8776         pkt.CompletionCodes([0x0000, 0x9804, 0x9c03])
8777         # 2222/162B, 22/43
8778         pkt = NCP(0x162B, "Remove Extended Trustee from Dir or File", 'fileserver')
8779         pkt.Request((17,271), [
8780                 rec( 10, 1, DirHandle ),
8781                 rec( 11, 4, ObjectID, BE ),
8782                 rec( 15, 1, Unused ),
8783                 rec( 16, (1, 255), Path ),
8784         ], info_str=(Path, "Remove Extended Trustee from %s", ", %s"))
8785         pkt.Reply(8)
8786         pkt.CompletionCodes([0x0000, 0x9002, 0x9c03, 0xfe0f, 0xff09])
8787         # 2222/162C, 22/44
8788         pkt = NCP(0x162C, "Get Volume and Purge Information", 'file')
8789         pkt.Request( 11, [
8790                 rec( 10, 1, VolumeNumber )
8791         ],info_str=(VolumeNumber, "Get Volume and Purge Information for Volume %d", ", %d"))
8792         pkt.Reply( (38,53), [
8793                 rec( 8, 4, TotalBlocks ),
8794                 rec( 12, 4, FreeBlocks ),
8795                 rec( 16, 4, PurgeableBlocks ),
8796                 rec( 20, 4, NotYetPurgeableBlocks ),
8797                 rec( 24, 4, TotalDirectoryEntries ),
8798                 rec( 28, 4, AvailableDirEntries ),
8799                 rec( 32, 4, Reserved4 ),
8800                 rec( 36, 1, SectorsPerBlock ),
8801                 rec( 37, (1,16), VolumeNameLen ),
8802         ])
8803         pkt.CompletionCodes([0x0000])
8804         # 2222/162D, 22/45
8805         pkt = NCP(0x162D, "Get Directory Information", 'file')
8806         pkt.Request( 11, [
8807                 rec( 10, 1, DirHandle )
8808         ])
8809         pkt.Reply( (30, 45), [
8810                 rec( 8, 4, TotalBlocks ),
8811                 rec( 12, 4, AvailableBlocks ),
8812                 rec( 16, 4, TotalDirectoryEntries ),
8813                 rec( 20, 4, AvailableDirEntries ),
8814                 rec( 24, 4, Reserved4 ),
8815                 rec( 28, 1, SectorsPerBlock ),
8816                 rec( 29, (1,16), VolumeNameLen ),
8817         ])
8818         pkt.CompletionCodes([0x0000, 0x9b03])
8819         # 2222/162E, 22/46
8820         pkt = NCP(0x162E, "Rename Or Move", 'file')
8821         pkt.Request( (17,525), [
8822                 rec( 10, 1, SourceDirHandle ),
8823                 rec( 11, 1, SearchAttributes ),
8824                 rec( 12, 1, SourcePathComponentCount ),
8825                 rec( 13, (1,255), SourcePath ),
8826                 rec( -1, 1, DestDirHandle ),
8827                 rec( -1, 1, DestPathComponentCount ),
8828                 rec( -1, (1,255), DestPath ),
8829         ], info_str=(SourcePath, "Rename or Move: %s", ", %s"))
8830         pkt.Reply(8)
8831         pkt.CompletionCodes([0x0000, 0x0102, 0x8701, 0x8b00, 0x8d00, 0x8e00,
8832                              0x8f00, 0x9001, 0x9101, 0x9201, 0x9a00, 0x9b03,
8833                              0x9c03, 0xa400, 0xff17])
8834         # 2222/162F, 22/47
8835         pkt = NCP(0x162F, "Get Name Space Information", 'file')
8836         pkt.Request( 11, [
8837                 rec( 10, 1, VolumeNumber )
8838         ],info_str=(VolumeNumber, "Get Name Space Information for Volume %d", ", %d"))
8839         pkt.Reply( (15,523), [
8840                 #
8841                 # XXX - why does this not display anything at all
8842                 # if the stuff after the first IndexNumber is
8843                 # un-commented?  That stuff really is there....
8844                 #
8845                 rec( 8, 1, DefinedNameSpaces, var="v" ),
8846                 rec( 9, (1,255), NameSpaceName, repeat="v" ),
8847                 rec( -1, 1, DefinedDataStreams, var="w" ),
8848                 rec( -1, (2,256), DataStreamInfo, repeat="w" ),
8849                 rec( -1, 1, LoadedNameSpaces, var="x" ),
8850                 rec( -1, 1, IndexNumber, repeat="x" ),
8851 #               rec( -1, 1, VolumeNameSpaces, var="y" ),
8852 #               rec( -1, 1, IndexNumber, repeat="y" ),
8853 #               rec( -1, 1, VolumeDataStreams, var="z" ),
8854 #               rec( -1, 1, IndexNumber, repeat="z" ),
8855         ])
8856         pkt.CompletionCodes([0x0000, 0x9802, 0xff00])
8857         # 2222/1630, 22/48
8858         pkt = NCP(0x1630, "Get Name Space Directory Entry", 'file')
8859         pkt.Request( 16, [
8860                 rec( 10, 1, VolumeNumber ),
8861                 rec( 11, 4, DOSSequence ),
8862                 rec( 15, 1, SrcNameSpace ),
8863         ])
8864         pkt.Reply( 112, [
8865                 rec( 8, 4, SequenceNumber ),
8866                 rec( 12, 4, Subdirectory ),
8867                 rec( 16, 4, AttributesDef32 ),
8868                 rec( 20, 1, UniqueID ),
8869                 rec( 21, 1, Flags ),
8870                 rec( 22, 1, SrcNameSpace ),
8871                 rec( 23, 1, NameLength ),
8872                 rec( 24, 12, Name12 ),
8873                 rec( 36, 2, CreationTime ),
8874                 rec( 38, 2, CreationDate ),
8875                 rec( 40, 4, CreatorID, BE ),
8876                 rec( 44, 2, ArchivedTime ),
8877                 rec( 46, 2, ArchivedDate ),
8878                 rec( 48, 4, ArchiverID ),
8879                 rec( 52, 2, UpdateTime ),
8880                 rec( 54, 2, UpdateDate ),
8881                 rec( 56, 4, UpdateID ),
8882                 rec( 60, 4, FileSize ),
8883                 rec( 64, 44, Reserved44 ),
8884                 rec( 108, 2, InheritedRightsMask ),
8885                 rec( 110, 2, LastAccessedDate ),
8886         ])
8887         pkt.CompletionCodes([0x0000, 0x8900, 0x9802, 0xbf00])
8888         # 2222/1631, 22/49
8889         pkt = NCP(0x1631, "Open Data Stream", 'file')
8890         pkt.Request( (15,269), [
8891                 rec( 10, 1, DataStream ),
8892                 rec( 11, 1, DirHandle ),
8893                 rec( 12, 1, AttributesDef ),
8894                 rec( 13, 1, OpenRights ),
8895                 rec( 14, (1, 255), FileName ),
8896         ], info_str=(FileName, "Open Data Stream: %s", ", %s"))
8897         pkt.Reply( 12, [
8898                 rec( 8, 4, CCFileHandle, BE ),
8899         ])
8900         pkt.CompletionCodes([0x0000, 0x8000, 0x8200, 0x9002, 0xbe00, 0xff00])
8901         # 2222/1632, 22/50
8902         pkt = NCP(0x1632, "Get Object Effective Rights for Directory Entry", 'file')
8903         pkt.Request( (16,270), [
8904                 rec( 10, 4, ObjectID, BE ),
8905                 rec( 14, 1, DirHandle ),
8906                 rec( 15, (1, 255), Path ),
8907         ], info_str=(Path, "Get Object Effective Rights: %s", ", %s"))
8908         pkt.Reply( 10, [
8909                 rec( 8, 2, TrusteeRights ),
8910         ])
8911         pkt.CompletionCodes([0x0000, 0x7e01, 0x9b00, 0x9c03])
8912         # 2222/1633, 22/51
8913         pkt = NCP(0x1633, "Get Extended Volume Information", 'file')
8914         pkt.Request( 11, [
8915                 rec( 10, 1, VolumeNumber ),
8916         ],info_str=(VolumeNumber, "Get Extended Volume Information for Volume %d", ", %d"))
8917         pkt.Reply( (139,266), [
8918                 rec( 8, 2, VolInfoReplyLen ),
8919                 rec( 10, 128, VolInfoStructure),
8920                 rec( 138, (1,128), VolumeNameLen ),
8921         ])
8922         pkt.CompletionCodes([0x0000, 0x7e01, 0x9804, 0xfb08, 0xff00])
8923         # 2222/1634, 22/52
8924         pkt = NCP(0x1634, "Get Mount Volume List", 'file')
8925         pkt.Request( 22, [
8926                 rec( 10, 4, StartVolumeNumber ),
8927                 rec( 14, 4, VolumeRequestFlags, LE ),
8928                 rec( 18, 4, SrcNameSpace ),
8929         ])
8930         pkt.Reply( 34, [
8931                 rec( 8, 4, ItemsInPacket, var="x" ),
8932                 rec( 12, 4, NextVolumeNumber ),
8933                 rec( 16, 18, VolumeStruct, repeat="x"),
8934         ])
8935         pkt.CompletionCodes([0x0000])
8936         # 2222/1700, 23/00
8937         pkt = NCP(0x1700, "Login User", 'file')
8938         pkt.Request( (12, 58), [
8939                 rec( 10, (1,16), UserName ),
8940                 rec( -1, (1,32), Password ),
8941         ], info_str=(UserName, "Login User: %s", ", %s"))
8942         pkt.Reply(8)
8943         pkt.CompletionCodes([0x0000, 0x9602, 0xc101, 0xc200, 0xc501, 0xd700,
8944                              0xd900, 0xda00, 0xdb00, 0xde00, 0xdf00, 0xe800,
8945                              0xec00, 0xed00, 0xef00, 0xf001, 0xf100, 0xf200,
8946                              0xf600, 0xfb00, 0xfc06, 0xfe07, 0xff00])
8947         # 2222/1701, 23/01
8948         pkt = NCP(0x1701, "Change User Password", 'file')
8949         pkt.Request( (13, 90), [
8950                 rec( 10, (1,16), UserName ),
8951                 rec( -1, (1,32), Password ),
8952                 rec( -1, (1,32), NewPassword ),
8953         ], info_str=(UserName, "Change Password for User: %s", ", %s"))
8954         pkt.Reply(8)
8955         pkt.CompletionCodes([0x0000, 0x9600, 0xd600, 0xf001, 0xf101, 0xf501,
8956                              0xfc06, 0xfe07, 0xff00])
8957         # 2222/1702, 23/02
8958         pkt = NCP(0x1702, "Get User Connection List", 'file')
8959         pkt.Request( (11, 26), [
8960                 rec( 10, (1,16), UserName ),
8961         ], info_str=(UserName, "Get User Connection: %s", ", %s"))
8962         pkt.Reply( (9, 136), [
8963                 rec( 8, (1, 128), ConnectionNumberList ),
8964         ])
8965         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
8966         # 2222/1703, 23/03
8967         pkt = NCP(0x1703, "Get User Number", 'file')
8968         pkt.Request( (11, 26), [
8969                 rec( 10, (1,16), UserName ),
8970         ], info_str=(UserName, "Get User Number: %s", ", %s"))
8971         pkt.Reply( 12, [
8972                 rec( 8, 4, ObjectID, BE ),
8973         ])
8974         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
8975         # 2222/1705, 23/05
8976         pkt = NCP(0x1705, "Get Station's Logged Info", 'file')
8977         pkt.Request( 11, [
8978                 rec( 10, 1, TargetConnectionNumber ),
8979         ],info_str=(TargetConnectionNumber, "Get Station's Logged Information on Connection %d", ", %d"))
8980         pkt.Reply( 266, [
8981                 rec( 8, 16, UserName16 ),
8982                 rec( 24, 7, LoginTime ),
8983                 rec( 31, 39, FullName ),
8984                 rec( 70, 4, UserID, BE ),
8985                 rec( 74, 128, SecurityEquivalentList ),
8986                 rec( 202, 64, Reserved64 ),
8987         ])
8988         pkt.CompletionCodes([0x0000, 0x9602, 0xfc06, 0xfd00, 0xfe07, 0xff00])
8989         # 2222/1707, 23/07
8990         pkt = NCP(0x1707, "Get Group Number", 'file')
8991         pkt.Request( 14, [
8992                 rec( 10, 4, ObjectID, BE ),
8993         ])
8994         pkt.Reply( 62, [
8995                 rec( 8, 4, ObjectID, BE ),
8996                 rec( 12, 2, ObjectType, BE ),
8997                 rec( 14, 48, ObjectNameLen ),
8998         ])
8999         pkt.CompletionCodes([0x0000, 0x9602, 0xf101, 0xfc06, 0xfe07, 0xff00])
9000         # 2222/170C, 23/12
9001         pkt = NCP(0x170C, "Verify Serialization", 'file')
9002         pkt.Request( 14, [
9003                 rec( 10, 4, ServerSerialNumber ),
9004         ])
9005         pkt.Reply(8)
9006         pkt.CompletionCodes([0x0000, 0xff00])
9007         # 2222/170D, 23/13
9008         pkt = NCP(0x170D, "Log Network Message", 'file')
9009         pkt.Request( (11, 68), [
9010                 rec( 10, (1, 58), TargetMessage ),
9011         ], info_str=(TargetMessage, "Log Network Message: %s", ", %s"))
9012         pkt.Reply(8)
9013         pkt.CompletionCodes([0x0000, 0x8000, 0x8100, 0x8800, 0x8d00, 0x8e00, 0x8f00,
9014                              0x9001, 0x9400, 0x9600, 0x9804, 0x9900, 0x9b00, 0xa100,
9015                              0xa201, 0xff00])
9016         # 2222/170E, 23/14
9017         pkt = NCP(0x170E, "Get Disk Utilization", 'file')
9018         pkt.Request( 15, [
9019                 rec( 10, 1, VolumeNumber ),
9020                 rec( 11, 4, TrusteeID, BE ),
9021         ])
9022         pkt.Reply( 19, [
9023                 rec( 8, 1, VolumeNumber ),
9024                 rec( 9, 4, TrusteeID, BE ),
9025                 rec( 13, 2, DirectoryCount, BE ),
9026                 rec( 15, 2, FileCount, BE ),
9027                 rec( 17, 2, ClusterCount, BE ),
9028         ])
9029         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0xa100, 0xf200])
9030         # 2222/170F, 23/15
9031         pkt = NCP(0x170F, "Scan File Information", 'file')
9032         pkt.Request((15,269), [
9033                 rec( 10, 2, LastSearchIndex ),
9034                 rec( 12, 1, DirHandle ),
9035                 rec( 13, 1, SearchAttributes ),
9036                 rec( 14, (1, 255), FileName ),
9037         ], info_str=(FileName, "Scan File Information: %s", ", %s"))
9038         pkt.Reply( 102, [
9039                 rec( 8, 2, NextSearchIndex ),
9040                 rec( 10, 14, FileName14 ),
9041                 rec( 24, 2, AttributesDef16 ),
9042                 rec( 26, 4, FileSize, BE ),
9043                 rec( 30, 2, CreationDate, BE ),
9044                 rec( 32, 2, LastAccessedDate, BE ),
9045                 rec( 34, 2, ModifiedDate, BE ),
9046                 rec( 36, 2, ModifiedTime, BE ),
9047                 rec( 38, 4, CreatorID, BE ),
9048                 rec( 42, 2, ArchivedDate, BE ),
9049                 rec( 44, 2, ArchivedTime, BE ),
9050                 rec( 46, 56, Reserved56 ),
9051         ])
9052         pkt.CompletionCodes([0x0000, 0x8800, 0x8900, 0x9300, 0x9400, 0x9804, 0x9b00, 0x9c00,
9053                              0xa100, 0xfd00, 0xff17])
9054         # 2222/1710, 23/16
9055         pkt = NCP(0x1710, "Set File Information", 'file')
9056         pkt.Request((91,345), [
9057                 rec( 10, 2, AttributesDef16 ),
9058                 rec( 12, 4, FileSize, BE ),
9059                 rec( 16, 2, CreationDate, BE ),
9060                 rec( 18, 2, LastAccessedDate, BE ),
9061                 rec( 20, 2, ModifiedDate, BE ),
9062                 rec( 22, 2, ModifiedTime, BE ),
9063                 rec( 24, 4, CreatorID, BE ),
9064                 rec( 28, 2, ArchivedDate, BE ),
9065                 rec( 30, 2, ArchivedTime, BE ),
9066                 rec( 32, 56, Reserved56 ),
9067                 rec( 88, 1, DirHandle ),
9068                 rec( 89, 1, SearchAttributes ),
9069                 rec( 90, (1, 255), FileName ),
9070         ], info_str=(FileName, "Set Information for File: %s", ", %s"))
9071         pkt.Reply(8)
9072         pkt.CompletionCodes([0x0000, 0x8800, 0x8c00, 0x8e00, 0x9400, 0x9600, 0x9804,
9073                              0x9b03, 0x9c00, 0xa100, 0xa201, 0xfc06, 0xfd00, 0xfe07,
9074                              0xff17])
9075         # 2222/1711, 23/17
9076         pkt = NCP(0x1711, "Get File Server Information", 'fileserver')
9077         pkt.Request(10)
9078         pkt.Reply(136, [
9079                 rec( 8, 48, ServerName ),
9080                 rec( 56, 1, OSMajorVersion ),
9081                 rec( 57, 1, OSMinorVersion ),
9082                 rec( 58, 2, ConnectionsSupportedMax, BE ),
9083                 rec( 60, 2, ConnectionsInUse, BE ),
9084                 rec( 62, 2, VolumesSupportedMax, BE ),
9085                 rec( 64, 1, OSRevision ),
9086                 rec( 65, 1, SFTSupportLevel ),
9087                 rec( 66, 1, TTSLevel ),
9088                 rec( 67, 2, ConnectionsMaxUsed, BE ),
9089                 rec( 69, 1, AccountVersion ),
9090                 rec( 70, 1, VAPVersion ),
9091                 rec( 71, 1, QueueingVersion ),
9092                 rec( 72, 1, PrintServerVersion ),
9093                 rec( 73, 1, VirtualConsoleVersion ),
9094                 rec( 74, 1, SecurityRestrictionVersion ),
9095                 rec( 75, 1, InternetBridgeVersion ),
9096                 rec( 76, 1, MixedModePathFlag ),
9097                 rec( 77, 1, LocalLoginInfoCcode ),
9098                 rec( 78, 2, ProductMajorVersion, BE ),
9099                 rec( 80, 2, ProductMinorVersion, BE ),
9100                 rec( 82, 2, ProductRevisionVersion, BE ),
9101                 rec( 84, 1, OSLanguageID, LE ),
9102                 rec( 85, 1, SixtyFourBitOffsetsSupportedFlag ),
9103                 rec( 86, 50, Reserved50 ),
9104         ])
9105         pkt.CompletionCodes([0x0000, 0x9600])
9106         # 2222/1712, 23/18
9107         pkt = NCP(0x1712, "Get Network Serial Number", 'fileserver')
9108         pkt.Request(10)
9109         pkt.Reply(14, [
9110                 rec( 8, 4, ServerSerialNumber ),
9111                 rec( 12, 2, ApplicationNumber ),
9112         ])
9113         pkt.CompletionCodes([0x0000, 0x9600])
9114         # 2222/1713, 23/19
9115         pkt = NCP(0x1713, "Get Internet Address", 'fileserver')
9116         pkt.Request(11, [
9117                 rec( 10, 1, TargetConnectionNumber ),
9118         ],info_str=(TargetConnectionNumber, "Get Internet Address for Connection %d", ", %d"))
9119         pkt.Reply(20, [
9120                 rec( 8, 4, NetworkAddress, BE ),
9121                 rec( 12, 6, NetworkNodeAddress ),
9122                 rec( 18, 2, NetworkSocket, BE ),
9123         ])
9124         pkt.CompletionCodes([0x0000, 0xff00])
9125         # 2222/1714, 23/20
9126         pkt = NCP(0x1714, "Login Object", 'bindery')
9127         pkt.Request( (14, 60), [
9128                 rec( 10, 2, ObjectType, BE ),
9129                 rec( 12, (1,16), ClientName ),
9130                 rec( -1, (1,32), Password ),
9131         ], info_str=(UserName, "Login Object: %s", ", %s"))
9132         pkt.Reply(8)
9133         pkt.CompletionCodes([0x0000, 0x9602, 0xc101, 0xc200, 0xc501, 0xd600, 0xd700,
9134                              0xd900, 0xda00, 0xdb00, 0xde00, 0xdf00, 0xe800, 0xec00,
9135                              0xed00, 0xef00, 0xf001, 0xf100, 0xf200, 0xf600, 0xfb00,
9136                              0xfc06, 0xfe07, 0xff00])
9137         # 2222/1715, 23/21
9138         pkt = NCP(0x1715, "Get Object Connection List", 'bindery')
9139         pkt.Request( (13, 28), [
9140                 rec( 10, 2, ObjectType, BE ),
9141                 rec( 12, (1,16), ObjectName ),
9142         ], info_str=(UserName, "Get Object Connection List: %s", ", %s"))
9143         pkt.Reply( (9, 136), [
9144                 rec( 8, (1, 128), ConnectionNumberList ),
9145         ])
9146         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
9147         # 2222/1716, 23/22
9148         pkt = NCP(0x1716, "Get Station's Logged Info", 'bindery')
9149         pkt.Request( 11, [
9150                 rec( 10, 1, TargetConnectionNumber ),
9151         ])
9152         pkt.Reply( 70, [
9153                 rec( 8, 4, UserID, BE ),
9154                 rec( 12, 2, ObjectType, BE ),
9155                 rec( 14, 48, ObjectNameLen ),
9156                 rec( 62, 7, LoginTime ),
9157                 rec( 69, 1, Reserved ),
9158         ])
9159         pkt.CompletionCodes([0x0000, 0x9602, 0xfb0a, 0xfc06, 0xfd00, 0xfe07, 0xff00])
9160         # 2222/1717, 23/23
9161         pkt = NCP(0x1717, "Get Login Key", 'bindery')
9162         pkt.Request(10)
9163         pkt.Reply( 16, [
9164                 rec( 8, 8, LoginKey ),
9165         ])
9166         pkt.CompletionCodes([0x0000, 0x9602])
9167         # 2222/1718, 23/24
9168         pkt = NCP(0x1718, "Keyed Object Login", 'bindery')
9169         pkt.Request( (21, 68), [
9170                 rec( 10, 8, LoginKey ),
9171                 rec( 18, 2, ObjectType, BE ),
9172                 rec( 20, (1,48), ObjectName ),
9173         ], info_str=(ObjectName, "Keyed Object Login: %s", ", %s"))
9174         pkt.Reply(8)
9175         pkt.CompletionCodes([0x0000, 0x9602, 0xc101, 0xc200, 0xc500, 0xd904, 0xda00,
9176                              0xdb00, 0xdc00, 0xde00, 0xff00])
9177         # 2222/171A, 23/26
9178         #
9179         # XXX - for NCP-over-IP, the NetworkAddress field appears to be
9180         # an IP address, rather than an IPX network address, and should
9181         # be dissected as an FT_IPv4 value; the NetworkNodeAddress and
9182         # NetworkSocket are 0.
9183         #
9184         # For NCP-over-IPX, it should probably be dissected as an
9185         # FT_IPXNET value.
9186         #
9187         pkt = NCP(0x171A, "Get Internet Address", 'fileserver')
9188         pkt.Request(11, [
9189                 rec( 10, 1, TargetConnectionNumber ),
9190         ])
9191         pkt.Reply(21, [
9192                 rec( 8, 4, NetworkAddress, BE ),
9193                 rec( 12, 6, NetworkNodeAddress ),
9194                 rec( 18, 2, NetworkSocket, BE ),
9195                 rec( 20, 1, ConnectionType ),
9196         ])
9197         pkt.CompletionCodes([0x0000])
9198         # 2222/171B, 23/27
9199         pkt = NCP(0x171B, "Get Object Connection List", 'bindery')
9200         pkt.Request( (17,64), [
9201                 rec( 10, 4, SearchConnNumber ),
9202                 rec( 14, 2, ObjectType, BE ),
9203                 rec( 16, (1,48), ObjectName ),
9204         ], info_str=(ObjectName, "Get Object Connection List: %s", ", %s"))
9205         pkt.Reply( (10,137), [
9206                 rec( 8, 1, ConnListLen, var="x" ),
9207                 rec( 9, (1,128), ConnectionNumberList, repeat="x" ),
9208         ])
9209         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
9210         # 2222/171C, 23/28
9211         pkt = NCP(0x171C, "Get Station's Logged Info", 'connection')
9212         pkt.Request( 14, [
9213                 rec( 10, 4, TargetConnectionNumber ),
9214         ])
9215         pkt.Reply( 70, [
9216                 rec( 8, 4, UserID, BE ),
9217                 rec( 12, 2, ObjectType, BE ),
9218                 rec( 14, 48, ObjectNameLen ),
9219                 rec( 62, 7, LoginTime ),
9220                 rec( 69, 1, Reserved ),
9221         ])
9222         pkt.CompletionCodes([0x0000, 0x9602, 0xfb02, 0xfc06, 0xfd00, 0xfe07, 0xff00])
9223         # 2222/171D, 23/29
9224         pkt = NCP(0x171D, "Change Connection State", 'connection')
9225         pkt.Request( 11, [
9226                 rec( 10, 1, RequestCode ),
9227         ])
9228         pkt.Reply(8)
9229         pkt.CompletionCodes([0x0000, 0x0109, 0x7a00, 0x7b00, 0x7c00, 0xe000, 0xfb06, 0xfd00])
9230         # 2222/171E, 23/30
9231         pkt = NCP(0x171E, "Set Watchdog Delay Interval", 'connection')
9232         pkt.Request( 14, [
9233                 rec( 10, 4, NumberOfMinutesToDelay ),
9234         ])
9235         pkt.Reply(8)
9236         pkt.CompletionCodes([0x0000, 0x0107])
9237         # 2222/171F, 23/31
9238         pkt = NCP(0x171F, "Get Connection List From Object", 'bindery')
9239         pkt.Request( 18, [
9240                 rec( 10, 4, ObjectID, BE ),
9241                 rec( 14, 4, ConnectionNumber ),
9242         ])
9243         pkt.Reply( (9, 136), [
9244                 rec( 8, (1, 128), ConnectionNumberList ),
9245         ])
9246         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
9247         # 2222/1720, 23/32
9248         pkt = NCP(0x1720, "Scan Bindery Object (List)", 'bindery')
9249         pkt.Request((23,70), [
9250                 rec( 10, 4, NextObjectID, BE ),
9251                 rec( 14, 4, ObjectType, BE ),
9252                 rec( 18, 4, InfoFlags ),
9253                 rec( 22, (1,48), ObjectName ),
9254         ], info_str=(ObjectName, "Scan Bindery Object: %s", ", %s"))
9255         pkt.Reply(NO_LENGTH_CHECK, [
9256                 rec( 8, 4, ObjectInfoReturnCount ),
9257                 rec( 12, 4, NextObjectID, BE ),
9258                 rec( 16, 4, ObjectIDInfo ),
9259                 srec(ObjectTypeStruct, req_cond="ncp.info_flags_type == TRUE"),
9260                 srec(ObjectSecurityStruct, req_cond="ncp.info_flags_security == TRUE"),
9261                 srec(ObjectFlagsStruct, req_cond="ncp.info_flags_flags == TRUE"),
9262                 srec(ObjectNameStruct, req_cond="ncp.info_flags_name == TRUE"),
9263         ])
9264         pkt.ReqCondSizeVariable()
9265         pkt.CompletionCodes([0x0000, 0x9600, 0xef01, 0xfc02, 0xfe01, 0xff00])
9266         # 2222/1721, 23/33
9267         pkt = NCP(0x1721, "Generate GUIDs", 'nds')
9268         pkt.Request( 14, [
9269                 rec( 10, 4, ReturnInfoCount ),
9270         ])
9271         pkt.Reply(28, [
9272                 rec( 8, 4, ReturnInfoCount, var="x" ),
9273                 rec( 12, 16, GUID, repeat="x" ),
9274         ])
9275         pkt.CompletionCodes([0x0000])
9276         # 2222/1732, 23/50
9277         pkt = NCP(0x1732, "Create Bindery Object", 'bindery')
9278         pkt.Request( (15,62), [
9279                 rec( 10, 1, ObjectFlags ),
9280                 rec( 11, 1, ObjectSecurity ),
9281                 rec( 12, 2, ObjectType, BE ),
9282                 rec( 14, (1,48), ObjectName ),
9283         ], info_str=(ObjectName, "Create Bindery Object: %s", ", %s"))
9284         pkt.Reply(8)
9285         pkt.CompletionCodes([0x0000, 0x9600, 0xe700, 0xee00, 0xef00, 0xf101, 0xf501,
9286                              0xfc06, 0xfe07, 0xff00])
9287         # 2222/1733, 23/51
9288         pkt = NCP(0x1733, "Delete Bindery Object", 'bindery')
9289         pkt.Request( (13,60), [
9290                 rec( 10, 2, ObjectType, BE ),
9291                 rec( 12, (1,48), ObjectName ),
9292         ], info_str=(ObjectName, "Delete Bindery Object: %s", ", %s"))
9293         pkt.Reply(8)
9294         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf200, 0xf400, 0xf600, 0xfb00,
9295                              0xfc06, 0xfe07, 0xff00])
9296         # 2222/1734, 23/52
9297         pkt = NCP(0x1734, "Rename Bindery Object", 'bindery')
9298         pkt.Request( (14,108), [
9299                 rec( 10, 2, ObjectType, BE ),
9300                 rec( 12, (1,48), ObjectName ),
9301                 rec( -1, (1,48), NewObjectName ),
9302         ], info_str=(ObjectName, "Rename Bindery Object: %s", ", %s"))
9303         pkt.Reply(8)
9304         pkt.CompletionCodes([0x0000, 0x9600, 0xee00, 0xf000, 0xf300, 0xfc06, 0xfe07, 0xff00])
9305         # 2222/1735, 23/53
9306         pkt = NCP(0x1735, "Get Bindery Object ID", 'bindery')
9307         pkt.Request((13,60), [
9308                 rec( 10, 2, ObjectType, BE ),
9309                 rec( 12, (1,48), ObjectName ),
9310         ], info_str=(ObjectName, "Get Bindery Object: %s", ", %s"))
9311         pkt.Reply(62, [
9312                 rec( 8, 4, ObjectID, BE ),
9313                 rec( 12, 2, ObjectType, BE ),
9314                 rec( 14, 48, ObjectNameLen ),
9315         ])
9316         pkt.CompletionCodes([0x0000, 0x9600, 0xef01, 0xf000, 0xfc02, 0xfe01, 0xff00])
9317         # 2222/1736, 23/54
9318         pkt = NCP(0x1736, "Get Bindery Object Name", 'bindery')
9319         pkt.Request( 14, [
9320                 rec( 10, 4, ObjectID, BE ),
9321         ])
9322         pkt.Reply( 62, [
9323                 rec( 8, 4, ObjectID, BE ),
9324                 rec( 12, 2, ObjectType, BE ),
9325                 rec( 14, 48, ObjectNameLen ),
9326         ])
9327         pkt.CompletionCodes([0x0000, 0x9600, 0xf101, 0xfc02, 0xfe01, 0xff00])
9328         # 2222/1737, 23/55
9329         pkt = NCP(0x1737, "Scan Bindery Object", 'bindery')
9330         pkt.Request((17,64), [
9331                 rec( 10, 4, ObjectID, BE ),
9332                 rec( 14, 2, ObjectType, BE ),
9333                 rec( 16, (1,48), ObjectName ),
9334         ], info_str=(ObjectName, "Scan Bindery Object: %s", ", %s"))
9335         pkt.Reply(65, [
9336                 rec( 8, 4, ObjectID, BE ),
9337                 rec( 12, 2, ObjectType, BE ),
9338                 rec( 14, 48, ObjectNameLen ),
9339                 rec( 62, 1, ObjectFlags ),
9340                 rec( 63, 1, ObjectSecurity ),
9341                 rec( 64, 1, ObjectHasProperties ),
9342         ])
9343         pkt.CompletionCodes([0x0000, 0x9600, 0xef01, 0xfc02,
9344                              0xfe01, 0xff00])
9345         # 2222/1738, 23/56
9346         pkt = NCP(0x1738, "Change Bindery Object Security", 'bindery')
9347         pkt.Request((14,61), [
9348                 rec( 10, 1, ObjectSecurity ),
9349                 rec( 11, 2, ObjectType, BE ),
9350                 rec( 13, (1,48), ObjectName ),
9351         ], info_str=(ObjectName, "Change Bindery Object Security: %s", ", %s"))
9352         pkt.Reply(8)
9353         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf501, 0xfc02, 0xfe01, 0xff00])
9354         # 2222/1739, 23/57
9355         pkt = NCP(0x1739, "Create Property", 'bindery')
9356         pkt.Request((16,78), [
9357                 rec( 10, 2, ObjectType, BE ),
9358                 rec( 12, (1,48), ObjectName ),
9359                 rec( -1, 1, PropertyType ),
9360                 rec( -1, 1, ObjectSecurity ),
9361                 rec( -1, (1,16), PropertyName ),
9362         ], info_str=(PropertyName, "Create Property: %s", ", %s"))
9363         pkt.Reply(8)
9364         pkt.CompletionCodes([0x0000, 0x9600, 0xed00, 0xef00, 0xf000, 0xf101,
9365                              0xf200, 0xf600, 0xf700, 0xfb00, 0xfc02, 0xfe01,
9366                              0xff00])
9367         # 2222/173A, 23/58
9368         pkt = NCP(0x173A, "Delete Property", 'bindery')
9369         pkt.Request((14,76), [
9370                 rec( 10, 2, ObjectType, BE ),
9371                 rec( 12, (1,48), ObjectName ),
9372                 rec( -1, (1,16), PropertyName ),
9373         ], info_str=(PropertyName, "Delete Property: %s", ", %s"))
9374         pkt.Reply(8)
9375         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf600, 0xfb00, 0xfc02,
9376                              0xfe01, 0xff00])
9377         # 2222/173B, 23/59
9378         pkt = NCP(0x173B, "Change Property Security", 'bindery')
9379         pkt.Request((15,77), [
9380                 rec( 10, 2, ObjectType, BE ),
9381                 rec( 12, (1,48), ObjectName ),
9382                 rec( -1, 1, ObjectSecurity ),
9383                 rec( -1, (1,16), PropertyName ),
9384         ], info_str=(PropertyName, "Change Property Security: %s", ", %s"))
9385         pkt.Reply(8)
9386         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf200, 0xf600, 0xfb00,
9387                              0xfc02, 0xfe01, 0xff00])
9388         # 2222/173C, 23/60
9389         pkt = NCP(0x173C, "Scan Property", 'bindery')
9390         pkt.Request((18,80), [
9391                 rec( 10, 2, ObjectType, BE ),
9392                 rec( 12, (1,48), ObjectName ),
9393                 rec( -1, 4, LastInstance, BE ),
9394                 rec( -1, (1,16), PropertyName ),
9395         ], info_str=(PropertyName, "Scan Property: %s", ", %s"))
9396         pkt.Reply( 32, [
9397                 rec( 8, 16, PropertyName16 ),
9398                 rec( 24, 1, ObjectFlags ),
9399                 rec( 25, 1, ObjectSecurity ),
9400                 rec( 26, 4, SearchInstance, BE ),
9401                 rec( 30, 1, ValueAvailable ),
9402                 rec( 31, 1, MoreProperties ),
9403         ])
9404         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf200, 0xf600, 0xfb00,
9405                              0xfc02, 0xfe01, 0xff00])
9406         # 2222/173D, 23/61
9407         pkt = NCP(0x173D, "Read Property Value", 'bindery')
9408         pkt.Request((15,77), [
9409                 rec( 10, 2, ObjectType, BE ),
9410                 rec( 12, (1,48), ObjectName ),
9411                 rec( -1, 1, PropertySegment ),
9412                 rec( -1, (1,16), PropertyName ),
9413         ], info_str=(PropertyName, "Read Property Value: %s", ", %s"))
9414         pkt.Reply(138, [
9415                 rec( 8, 128, PropertyData ),
9416                 rec( 136, 1, PropertyHasMoreSegments ),
9417                 rec( 137, 1, PropertyType ),
9418         ])
9419         pkt.CompletionCodes([0x0000, 0x8800, 0x9300, 0x9600, 0xec01,
9420                              0xf000, 0xf100, 0xf900, 0xfb02, 0xfc02,
9421                              0xfe01, 0xff00])
9422         # 2222/173E, 23/62
9423         pkt = NCP(0x173E, "Write Property Value", 'bindery')
9424         pkt.Request((144,206), [
9425                 rec( 10, 2, ObjectType, BE ),
9426                 rec( 12, (1,48), ObjectName ),
9427                 rec( -1, 1, PropertySegment ),
9428                 rec( -1, 1, MoreFlag ),
9429                 rec( -1, (1,16), PropertyName ),
9430                 #
9431                 # XXX - don't show this if MoreFlag isn't set?
9432                 # In at least some packages where it's not set,
9433                 # PropertyValue appears to be garbage.
9434                 #
9435                 rec( -1, 128, PropertyValue ),
9436         ], info_str=(PropertyName, "Write Property Value: %s", ", %s"))
9437         pkt.Reply(8)
9438         pkt.CompletionCodes([0x0000, 0x9600, 0xe800, 0xec01, 0xf000, 0xf800,
9439                              0xfb02, 0xfc03, 0xfe01, 0xff00 ])
9440         # 2222/173F, 23/63
9441         pkt = NCP(0x173F, "Verify Bindery Object Password", 'bindery')
9442         pkt.Request((14,92), [
9443                 rec( 10, 2, ObjectType, BE ),
9444                 rec( 12, (1,48), ObjectName ),
9445                 rec( -1, (1,32), Password ),
9446         ], info_str=(ObjectName, "Verify Bindery Object Password: %s", ", %s"))
9447         pkt.Reply(8)
9448         pkt.CompletionCodes([0x0000, 0x9600, 0xe800, 0xec01, 0xf000, 0xf101,
9449                              0xfb02, 0xfc03, 0xfe01, 0xff00 ])
9450         # 2222/1740, 23/64
9451         pkt = NCP(0x1740, "Change Bindery Object Password", 'bindery')
9452         pkt.Request((15,124), [
9453                 rec( 10, 2, ObjectType, BE ),
9454                 rec( 12, (1,48), ObjectName ),
9455                 rec( -1, (1,32), Password ),
9456                 rec( -1, (1,32), NewPassword ),
9457         ], info_str=(ObjectName, "Change Bindery Object Password: %s", ", %s"))
9458         pkt.Reply(8)
9459         pkt.CompletionCodes([0x0000, 0x9600, 0xc501, 0xd701, 0xe800, 0xec01, 0xf001,
9460                              0xf100, 0xf800, 0xfb02, 0xfc03, 0xfe01, 0xff00])
9461         # 2222/1741, 23/65
9462         pkt = NCP(0x1741, "Add Bindery Object To Set", 'bindery')
9463         pkt.Request((17,126), [
9464                 rec( 10, 2, ObjectType, BE ),
9465                 rec( 12, (1,48), ObjectName ),
9466                 rec( -1, (1,16), PropertyName ),
9467                 rec( -1, 2, MemberType, BE ),
9468                 rec( -1, (1,48), MemberName ),
9469         ], info_str=(MemberName, "Add Bindery Object to Set: %s", ", %s"))
9470         pkt.Reply(8)
9471         pkt.CompletionCodes([0x0000, 0x9600, 0xe800, 0xe900, 0xea00, 0xeb00,
9472                              0xec01, 0xf000, 0xf800, 0xfb02, 0xfc03, 0xfe01,
9473                              0xff00])
9474         # 2222/1742, 23/66
9475         pkt = NCP(0x1742, "Delete Bindery Object From Set", 'bindery')
9476         pkt.Request((17,126), [
9477                 rec( 10, 2, ObjectType, BE ),
9478                 rec( 12, (1,48), ObjectName ),
9479                 rec( -1, (1,16), PropertyName ),
9480                 rec( -1, 2, MemberType, BE ),
9481                 rec( -1, (1,48), MemberName ),
9482         ], info_str=(MemberName, "Delete Bindery Object from Set: %s", ", %s"))
9483         pkt.Reply(8)
9484         pkt.CompletionCodes([0x0000, 0x9600, 0xeb00, 0xf000, 0xf800, 0xfb02,
9485                              0xfc03, 0xfe01, 0xff00])
9486         # 2222/1743, 23/67
9487         pkt = NCP(0x1743, "Is Bindery Object In Set", 'bindery')
9488         pkt.Request((17,126), [
9489                 rec( 10, 2, ObjectType, BE ),
9490                 rec( 12, (1,48), ObjectName ),
9491                 rec( -1, (1,16), PropertyName ),
9492                 rec( -1, 2, MemberType, BE ),
9493                 rec( -1, (1,48), MemberName ),
9494         ], info_str=(MemberName, "Is Bindery Object in Set: %s", ", %s"))
9495         pkt.Reply(8)
9496         pkt.CompletionCodes([0x0000, 0x9600, 0xea00, 0xeb00, 0xec01, 0xf000,
9497                              0xfb02, 0xfc03, 0xfe01, 0xff00])
9498         # 2222/1744, 23/68
9499         pkt = NCP(0x1744, "Close Bindery", 'bindery')
9500         pkt.Request(10)
9501         pkt.Reply(8)
9502         pkt.CompletionCodes([0x0000, 0xff00])
9503         # 2222/1745, 23/69
9504         pkt = NCP(0x1745, "Open Bindery", 'bindery')
9505         pkt.Request(10)
9506         pkt.Reply(8)
9507         pkt.CompletionCodes([0x0000, 0xff00])
9508         # 2222/1746, 23/70
9509         pkt = NCP(0x1746, "Get Bindery Access Level", 'bindery')
9510         pkt.Request(10)
9511         pkt.Reply(13, [
9512                 rec( 8, 1, ObjectSecurity ),
9513                 rec( 9, 4, LoggedObjectID, BE ),
9514         ])
9515         pkt.CompletionCodes([0x0000, 0x9600])
9516         # 2222/1747, 23/71
9517         pkt = NCP(0x1747, "Scan Bindery Object Trustee Paths", 'bindery')
9518         pkt.Request(17, [
9519                 rec( 10, 1, VolumeNumber ),
9520                 rec( 11, 2, LastSequenceNumber, BE ),
9521                 rec( 13, 4, ObjectID, BE ),
9522         ])
9523         pkt.Reply((16,270), [
9524                 rec( 8, 2, LastSequenceNumber, BE),
9525                 rec( 10, 4, ObjectID, BE ),
9526                 rec( 14, 1, ObjectSecurity ),
9527                 rec( 15, (1,255), Path ),
9528         ])
9529         pkt.CompletionCodes([0x0000, 0x9300, 0x9600, 0xa100, 0xf000, 0xf100,
9530                              0xf200, 0xfc02, 0xfe01, 0xff00])
9531         # 2222/1748, 23/72
9532         pkt = NCP(0x1748, "Get Bindery Object Access Level", 'bindery')
9533         pkt.Request(14, [
9534                 rec( 10, 4, ObjectID, BE ),
9535         ])
9536         pkt.Reply(9, [
9537                 rec( 8, 1, ObjectSecurity ),
9538         ])
9539         pkt.CompletionCodes([0x0000, 0x9600])
9540         # 2222/1749, 23/73
9541         pkt = NCP(0x1749, "Is Calling Station a Manager", 'bindery')
9542         pkt.Request(10)
9543         pkt.Reply(8)
9544         pkt.CompletionCodes([0x0003, 0xff1e])
9545         # 2222/174A, 23/74
9546         pkt = NCP(0x174A, "Keyed Verify Password", 'bindery')
9547         pkt.Request((21,68), [
9548                 rec( 10, 8, LoginKey ),
9549                 rec( 18, 2, ObjectType, BE ),
9550                 rec( 20, (1,48), ObjectName ),
9551         ], info_str=(ObjectName, "Keyed Verify Password: %s", ", %s"))
9552         pkt.Reply(8)
9553         pkt.CompletionCodes([0x0000, 0xc500, 0xfe01, 0xff0c])
9554         # 2222/174B, 23/75
9555         pkt = NCP(0x174B, "Keyed Change Password", 'bindery')
9556         pkt.Request((22,100), [
9557                 rec( 10, 8, LoginKey ),
9558                 rec( 18, 2, ObjectType, BE ),
9559                 rec( 20, (1,48), ObjectName ),
9560                 rec( -1, (1,32), Password ),
9561         ], info_str=(ObjectName, "Keyed Change Password: %s", ", %s"))
9562         pkt.Reply(8)
9563         pkt.CompletionCodes([0x0000, 0xc500, 0xfe01, 0xff0c])
9564         # 2222/174C, 23/76
9565         pkt = NCP(0x174C, "List Relations Of an Object", 'bindery')
9566         pkt.Request((18,80), [
9567                 rec( 10, 4, LastSeen, BE ),
9568                 rec( 14, 2, ObjectType, BE ),
9569                 rec( 16, (1,48), ObjectName ),
9570                 rec( -1, (1,16), PropertyName ),
9571         ], info_str=(ObjectName, "List Relations of an Object: %s", ", %s"))
9572         pkt.Reply(14, [
9573                 rec( 8, 2, RelationsCount, BE, var="x" ),
9574                 rec( 10, 4, ObjectID, BE, repeat="x" ),
9575         ])
9576         pkt.CompletionCodes([0x0000, 0xf000, 0xf200, 0xfe01, 0xff00])
9577         # 2222/1764, 23/100
9578         pkt = NCP(0x1764, "Create Queue", 'qms')
9579         pkt.Request((15,316), [
9580                 rec( 10, 2, QueueType, BE ),
9581                 rec( 12, (1,48), QueueName ),
9582                 rec( -1, 1, PathBase ),
9583                 rec( -1, (1,255), Path ),
9584         ], info_str=(QueueName, "Create Queue: %s", ", %s"))
9585         pkt.Reply(12, [
9586                 rec( 8, 4, QueueID ),
9587         ])
9588         pkt.CompletionCodes([0x0000, 0x9600, 0x9900, 0xd000, 0xd100,
9589                              0xd200, 0xd300, 0xd400, 0xd500, 0xd601,
9590                              0xd703, 0xd800, 0xd902, 0xda01, 0xdb02,
9591                              0xee00, 0xff00])
9592         # 2222/1765, 23/101
9593         pkt = NCP(0x1765, "Destroy Queue", 'qms')
9594         pkt.Request(14, [
9595                 rec( 10, 4, QueueID ),
9596         ])
9597         pkt.Reply(8)
9598         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9599                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9600                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9601         # 2222/1766, 23/102
9602         pkt = NCP(0x1766, "Read Queue Current Status", 'qms')
9603         pkt.Request(14, [
9604                 rec( 10, 4, QueueID ),
9605         ])
9606         pkt.Reply(20, [
9607                 rec( 8, 4, QueueID ),
9608                 rec( 12, 1, QueueStatus ),
9609                 rec( 13, 1, CurrentEntries ),
9610                 rec( 14, 1, CurrentServers, var="x" ),
9611                 rec( 15, 4, ServerID, repeat="x" ),
9612                 rec( 19, 1, ServerStationList, repeat="x" ),
9613         ])
9614         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9615                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9616                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9617         # 2222/1767, 23/103
9618         pkt = NCP(0x1767, "Set Queue Current Status", 'qms')
9619         pkt.Request(15, [
9620                 rec( 10, 4, QueueID ),
9621                 rec( 14, 1, QueueStatus ),
9622         ])
9623         pkt.Reply(8)
9624         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9625                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9626                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07,
9627                              0xff00])
9628         # 2222/1768, 23/104
9629         pkt = NCP(0x1768, "Create Queue Job And File", 'qms')
9630         pkt.Request(264, [
9631                 rec( 10, 4, QueueID ),
9632                 rec( 14, 250, JobStruct ),
9633         ])
9634         pkt.Reply(62, [
9635                 rec( 8, 1, ClientStation ),
9636                 rec( 9, 1, ClientTaskNumber ),
9637                 rec( 10, 4, ClientIDNumber, BE ),
9638                 rec( 14, 4, TargetServerIDNumber, BE ),
9639                 rec( 18, 6, TargetExecutionTime ),
9640                 rec( 24, 6, JobEntryTime ),
9641                 rec( 30, 2, JobNumber, BE ),
9642                 rec( 32, 2, JobType, BE ),
9643                 rec( 34, 1, JobPosition ),
9644                 rec( 35, 1, JobControlFlags ),
9645                 rec( 36, 14, JobFileName ),
9646                 rec( 50, 6, JobFileHandle ),
9647                 rec( 56, 1, ServerStation ),
9648                 rec( 57, 1, ServerTaskNumber ),
9649                 rec( 58, 4, ServerID, BE ),
9650         ])
9651         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9652                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9653                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07,
9654                              0xff00])
9655         # 2222/1769, 23/105
9656         pkt = NCP(0x1769, "Close File And Start Queue Job", 'qms')
9657         pkt.Request(16, [
9658                 rec( 10, 4, QueueID ),
9659                 rec( 14, 2, JobNumber, BE ),
9660         ])
9661         pkt.Reply(8)
9662         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9663                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9664                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9665         # 2222/176A, 23/106
9666         pkt = NCP(0x176A, "Remove Job From Queue", 'qms')
9667         pkt.Request(16, [
9668                 rec( 10, 4, QueueID ),
9669                 rec( 14, 2, JobNumber, BE ),
9670         ])
9671         pkt.Reply(8)
9672         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9673                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9674                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9675         # 2222/176B, 23/107
9676         pkt = NCP(0x176B, "Get Queue Job List", 'qms')
9677         pkt.Request(14, [
9678                 rec( 10, 4, QueueID ),
9679         ])
9680         pkt.Reply(12, [
9681                 rec( 8, 2, JobCount, BE, var="x" ),
9682                 rec( 10, 2, JobNumber, BE, repeat="x" ),
9683         ])
9684         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9685                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9686                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9687         # 2222/176C, 23/108
9688         pkt = NCP(0x176C, "Read Queue Job Entry", 'qms')
9689         pkt.Request(16, [
9690                 rec( 10, 4, QueueID ),
9691                 rec( 14, 2, JobNumber, BE ),
9692         ])
9693         pkt.Reply(258, [
9694             rec( 8, 250, JobStruct ),
9695         ])
9696         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9697                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9698                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9699         # 2222/176D, 23/109
9700         pkt = NCP(0x176D, "Change Queue Job Entry", 'qms')
9701         pkt.Request(260, [
9702             rec( 14, 250, JobStruct ),
9703         ])
9704         pkt.Reply(8)
9705         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9706                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9707                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9708         # 2222/176E, 23/110
9709         pkt = NCP(0x176E, "Change Queue Job Position", 'qms')
9710         pkt.Request(17, [
9711                 rec( 10, 4, QueueID ),
9712                 rec( 14, 2, JobNumber, BE ),
9713                 rec( 16, 1, NewPosition ),
9714         ])
9715         pkt.Reply(8)
9716         pkt.CompletionCodes([0x0000, 0x9600, 0xd000, 0xd100, 0xd500,
9717                              0xd601, 0xfe07, 0xff1f])
9718         # 2222/176F, 23/111
9719         pkt = NCP(0x176F, "Attach Queue Server To Queue", 'qms')
9720         pkt.Request(14, [
9721                 rec( 10, 4, QueueID ),
9722         ])
9723         pkt.Reply(8)
9724         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9725                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9726                              0xd800, 0xd902, 0xda01, 0xdb02, 0xea00,
9727                              0xfc06, 0xff00])
9728         # 2222/1770, 23/112
9729         pkt = NCP(0x1770, "Detach Queue Server From Queue", 'qms')
9730         pkt.Request(14, [
9731                 rec( 10, 4, QueueID ),
9732         ])
9733         pkt.Reply(8)
9734         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9735                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9736                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9737         # 2222/1771, 23/113
9738         pkt = NCP(0x1771, "Service Queue Job", 'qms')
9739         pkt.Request(16, [
9740                 rec( 10, 4, QueueID ),
9741                 rec( 14, 2, ServiceType, BE ),
9742         ])
9743         pkt.Reply(62, [
9744                 rec( 8, 1, ClientStation ),
9745                 rec( 9, 1, ClientTaskNumber ),
9746                 rec( 10, 4, ClientIDNumber, BE ),
9747                 rec( 14, 4, TargetServerIDNumber, BE ),
9748                 rec( 18, 6, TargetExecutionTime ),
9749                 rec( 24, 6, JobEntryTime ),
9750                 rec( 30, 2, JobNumber, BE ),
9751                 rec( 32, 2, JobType, BE ),
9752                 rec( 34, 1, JobPosition ),
9753                 rec( 35, 1, JobControlFlags ),
9754                 rec( 36, 14, JobFileName ),
9755                 rec( 50, 6, JobFileHandle ),
9756                 rec( 56, 1, ServerStation ),
9757                 rec( 57, 1, ServerTaskNumber ),
9758                 rec( 58, 4, ServerID, BE ),
9759         ])
9760         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9761                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9762                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9763         # 2222/1772, 23/114
9764         pkt = NCP(0x1772, "Finish Servicing Queue Job", 'qms')
9765         pkt.Request(20, [
9766                 rec( 10, 4, QueueID ),
9767                 rec( 14, 2, JobNumber, BE ),
9768                 rec( 16, 4, ChargeInformation, BE ),
9769         ])
9770         pkt.Reply(8)
9771         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9772                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9773                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9774         # 2222/1773, 23/115
9775         pkt = NCP(0x1773, "Abort Servicing Queue Job", 'qms')
9776         pkt.Request(16, [
9777                 rec( 10, 4, QueueID ),
9778                 rec( 14, 2, JobNumber, BE ),
9779         ])
9780         pkt.Reply(8)
9781         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9782                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9783                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9784         # 2222/1774, 23/116
9785         pkt = NCP(0x1774, "Change To Client Rights", 'qms')
9786         pkt.Request(16, [
9787                 rec( 10, 4, QueueID ),
9788                 rec( 14, 2, JobNumber, BE ),
9789         ])
9790         pkt.Reply(8)
9791         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9792                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9793                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9794         # 2222/1775, 23/117
9795         pkt = NCP(0x1775, "Restore Queue Server Rights", 'qms')
9796         pkt.Request(10)
9797         pkt.Reply(8)
9798         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9799                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9800                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9801         # 2222/1776, 23/118
9802         pkt = NCP(0x1776, "Read Queue Server Current Status", 'qms')
9803         pkt.Request(19, [
9804                 rec( 10, 4, QueueID ),
9805                 rec( 14, 4, ServerID, BE ),
9806                 rec( 18, 1, ServerStation ),
9807         ])
9808         pkt.Reply(72, [
9809                 rec( 8, 64, ServerStatusRecord ),
9810         ])
9811         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9812                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9813                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9814         # 2222/1777, 23/119
9815         pkt = NCP(0x1777, "Set Queue Server Current Status", 'qms')
9816         pkt.Request(78, [
9817                 rec( 10, 4, QueueID ),
9818                 rec( 14, 64, ServerStatusRecord ),
9819         ])
9820         pkt.Reply(8)
9821         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9822                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9823                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9824         # 2222/1778, 23/120
9825         pkt = NCP(0x1778, "Get Queue Job File Size", 'qms')
9826         pkt.Request(16, [
9827                 rec( 10, 4, QueueID ),
9828                 rec( 14, 2, JobNumber, BE ),
9829         ])
9830         pkt.Reply(20, [
9831                 rec( 8, 4, QueueID ),
9832                 rec( 12, 4, JobNumberLong ),
9833                 rec( 16, 4, FileSize, BE ),
9834         ])
9835         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9836                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9837                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9838         # 2222/1779, 23/121
9839         pkt = NCP(0x1779, "Create Queue Job And File", 'qms')
9840         pkt.Request(264, [
9841                 rec( 10, 4, QueueID ),
9842                 rec( 14, 250, JobStruct3x ),
9843         ])
9844         pkt.Reply(94, [
9845                 rec( 8, 86, JobStructNew ),
9846         ])
9847         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9848                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9849                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07, 0xff00])
9850         # 2222/177A, 23/122
9851         pkt = NCP(0x177A, "Read Queue Job Entry", 'qms')
9852         pkt.Request(18, [
9853                 rec( 10, 4, QueueID ),
9854                 rec( 14, 4, JobNumberLong ),
9855         ])
9856         pkt.Reply(258, [
9857             rec( 8, 250, JobStruct3x ),
9858         ])
9859         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9860                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9861                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9862         # 2222/177B, 23/123
9863         pkt = NCP(0x177B, "Change Queue Job Entry", 'qms')
9864         pkt.Request(264, [
9865                 rec( 10, 4, QueueID ),
9866                 rec( 14, 250, JobStruct ),
9867         ])
9868         pkt.Reply(8)
9869         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9870                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9871                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07, 0xff00])
9872         # 2222/177C, 23/124
9873         pkt = NCP(0x177C, "Service Queue Job", 'qms')
9874         pkt.Request(16, [
9875                 rec( 10, 4, QueueID ),
9876                 rec( 14, 2, ServiceType ),
9877         ])
9878         pkt.Reply(94, [
9879             rec( 8, 86, JobStructNew ),
9880         ])
9881         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9882                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9883                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9884         # 2222/177D, 23/125
9885         pkt = NCP(0x177D, "Read Queue Current Status", 'qms')
9886         pkt.Request(14, [
9887                 rec( 10, 4, QueueID ),
9888         ])
9889         pkt.Reply(32, [
9890                 rec( 8, 4, QueueID ),
9891                 rec( 12, 1, QueueStatus ),
9892                 rec( 13, 3, Reserved3 ),
9893                 rec( 16, 4, CurrentEntries ),
9894                 rec( 20, 4, CurrentServers, var="x" ),
9895                 rec( 24, 4, ServerID, repeat="x" ),
9896                 rec( 28, 4, ServerStationLong, LE, repeat="x" ),
9897         ])
9898         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9899                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9900                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9901         # 2222/177E, 23/126
9902         pkt = NCP(0x177E, "Set Queue Current Status", 'qms')
9903         pkt.Request(15, [
9904                 rec( 10, 4, QueueID ),
9905                 rec( 14, 1, QueueStatus ),
9906         ])
9907         pkt.Reply(8)
9908         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9909                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9910                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9911         # 2222/177F, 23/127
9912         pkt = NCP(0x177F, "Close File And Start Queue Job", 'qms')
9913         pkt.Request(18, [
9914                 rec( 10, 4, QueueID ),
9915                 rec( 14, 4, JobNumberLong ),
9916         ])
9917         pkt.Reply(8)
9918         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9919                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9920                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07, 0xff00])
9921         # 2222/1780, 23/128
9922         pkt = NCP(0x1780, "Remove Job From Queue", 'qms')
9923         pkt.Request(18, [
9924                 rec( 10, 4, QueueID ),
9925                 rec( 14, 4, JobNumberLong ),
9926         ])
9927         pkt.Reply(8)
9928         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9929                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9930                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9931         # 2222/1781, 23/129
9932         pkt = NCP(0x1781, "Get Queue Job List", 'qms')
9933         pkt.Request(18, [
9934                 rec( 10, 4, QueueID ),
9935                 rec( 14, 4, JobNumberLong ),
9936         ])
9937         pkt.Reply(20, [
9938                 rec( 8, 4, TotalQueueJobs ),
9939                 rec( 12, 4, ReplyQueueJobNumbers, var="x" ),
9940                 rec( 16, 4, JobNumberLong, repeat="x" ),
9941         ])
9942         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9943                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9944                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9945         # 2222/1782, 23/130
9946         pkt = NCP(0x1782, "Change Job Priority", 'qms')
9947         pkt.Request(22, [
9948                 rec( 10, 4, QueueID ),
9949                 rec( 14, 4, JobNumberLong ),
9950                 rec( 18, 4, Priority ),
9951         ])
9952         pkt.Reply(8)
9953         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9954                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9955                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9956         # 2222/1783, 23/131
9957         pkt = NCP(0x1783, "Finish Servicing Queue Job", 'qms')
9958         pkt.Request(22, [
9959                 rec( 10, 4, QueueID ),
9960                 rec( 14, 4, JobNumberLong ),
9961                 rec( 18, 4, ChargeInformation ),
9962         ])
9963         pkt.Reply(8)
9964         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9965                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9966                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9967         # 2222/1784, 23/132
9968         pkt = NCP(0x1784, "Abort Servicing Queue Job", 'qms')
9969         pkt.Request(18, [
9970                 rec( 10, 4, QueueID ),
9971                 rec( 14, 4, JobNumberLong ),
9972         ])
9973         pkt.Reply(8)
9974         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9975                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9976                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9977         # 2222/1785, 23/133
9978         pkt = NCP(0x1785, "Change To Client Rights", 'qms')
9979         pkt.Request(18, [
9980                 rec( 10, 4, QueueID ),
9981                 rec( 14, 4, JobNumberLong ),
9982         ])
9983         pkt.Reply(8)
9984         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9985                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9986                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9987         # 2222/1786, 23/134
9988         pkt = NCP(0x1786, "Read Queue Server Current Status", 'qms')
9989         pkt.Request(22, [
9990                 rec( 10, 4, QueueID ),
9991                 rec( 14, 4, ServerID, BE ),
9992                 rec( 18, 4, ServerStation ),
9993         ])
9994         pkt.Reply(72, [
9995                 rec( 8, 64, ServerStatusRecord ),
9996         ])
9997         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9998                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9999                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10000         # 2222/1787, 23/135
10001         pkt = NCP(0x1787, "Get Queue Job File Size", 'qms')
10002         pkt.Request(18, [
10003                 rec( 10, 4, QueueID ),
10004                 rec( 14, 4, JobNumberLong ),
10005         ])
10006         pkt.Reply(20, [
10007                 rec( 8, 4, QueueID ),
10008                 rec( 12, 4, JobNumberLong ),
10009                 rec( 16, 4, FileSize, BE ),
10010         ])
10011         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10012                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10013                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10014         # 2222/1788, 23/136
10015         pkt = NCP(0x1788, "Move Queue Job From Src Q to Dst Q", 'qms')
10016         pkt.Request(22, [
10017                 rec( 10, 4, QueueID ),
10018                 rec( 14, 4, JobNumberLong ),
10019                 rec( 18, 4, DstQueueID ),
10020         ])
10021         pkt.Reply(12, [
10022                 rec( 8, 4, JobNumberLong ),
10023         ])
10024         pkt.CompletionCodes([0x0000, 0x7e01, 0xfc06])
10025         # 2222/1789, 23/137
10026         pkt = NCP(0x1789, "Get Queue Jobs From Form List", 'qms')
10027         pkt.Request(24, [
10028                 rec( 10, 4, QueueID ),
10029                 rec( 14, 4, QueueStartPosition ),
10030                 rec( 18, 4, FormTypeCnt, var="x" ),
10031                 rec( 22, 2, FormType, repeat="x" ),
10032         ])
10033         pkt.Reply(20, [
10034                 rec( 8, 4, TotalQueueJobs ),
10035                 rec( 12, 4, JobCount, var="x" ),
10036                 rec( 16, 4, JobNumberLong, repeat="x" ),
10037         ])
10038         pkt.CompletionCodes([0x0000, 0x7e01, 0xfc06])
10039         # 2222/178A, 23/138
10040         pkt = NCP(0x178A, "Service Queue Job By Form List", 'qms')
10041         pkt.Request(24, [
10042                 rec( 10, 4, QueueID ),
10043                 rec( 14, 4, QueueStartPosition ),
10044                 rec( 18, 4, FormTypeCnt, var= "x" ),
10045                 rec( 22, 2, FormType, repeat="x" ),
10046         ])
10047         pkt.Reply(94, [
10048            rec( 8, 86, JobStructNew ),
10049         ])
10050         pkt.CompletionCodes([0x0000, 0x7e01, 0xfc06])
10051         # 2222/1796, 23/150
10052         pkt = NCP(0x1796, "Get Current Account Status", 'accounting')
10053         pkt.Request((13,60), [
10054                 rec( 10, 2, ObjectType, BE ),
10055                 rec( 12, (1,48), ObjectName ),
10056         ], info_str=(ObjectName, "Get Current Account Status: %s", ", %s"))
10057         pkt.Reply(264, [
10058                 rec( 8, 4, AccountBalance, BE ),
10059                 rec( 12, 4, CreditLimit, BE ),
10060                 rec( 16, 120, Reserved120 ),
10061                 rec( 136, 4, HolderID, BE ),
10062                 rec( 140, 4, HoldAmount, BE ),
10063                 rec( 144, 4, HolderID, BE ),
10064                 rec( 148, 4, HoldAmount, BE ),
10065                 rec( 152, 4, HolderID, BE ),
10066                 rec( 156, 4, HoldAmount, BE ),
10067                 rec( 160, 4, HolderID, BE ),
10068                 rec( 164, 4, HoldAmount, BE ),
10069                 rec( 168, 4, HolderID, BE ),
10070                 rec( 172, 4, HoldAmount, BE ),
10071                 rec( 176, 4, HolderID, BE ),
10072                 rec( 180, 4, HoldAmount, BE ),
10073                 rec( 184, 4, HolderID, BE ),
10074                 rec( 188, 4, HoldAmount, BE ),
10075                 rec( 192, 4, HolderID, BE ),
10076                 rec( 196, 4, HoldAmount, BE ),
10077                 rec( 200, 4, HolderID, BE ),
10078                 rec( 204, 4, HoldAmount, BE ),
10079                 rec( 208, 4, HolderID, BE ),
10080                 rec( 212, 4, HoldAmount, BE ),
10081                 rec( 216, 4, HolderID, BE ),
10082                 rec( 220, 4, HoldAmount, BE ),
10083                 rec( 224, 4, HolderID, BE ),
10084                 rec( 228, 4, HoldAmount, BE ),
10085                 rec( 232, 4, HolderID, BE ),
10086                 rec( 236, 4, HoldAmount, BE ),
10087                 rec( 240, 4, HolderID, BE ),
10088                 rec( 244, 4, HoldAmount, BE ),
10089                 rec( 248, 4, HolderID, BE ),
10090                 rec( 252, 4, HoldAmount, BE ),
10091                 rec( 256, 4, HolderID, BE ),
10092                 rec( 260, 4, HoldAmount, BE ),
10093         ])
10094         pkt.CompletionCodes([0x0000, 0x9600, 0xc000, 0xc101, 0xc400, 0xe800,
10095                              0xea00, 0xeb00, 0xec00, 0xfc06, 0xfe07, 0xff00])
10096         # 2222/1797, 23/151
10097         pkt = NCP(0x1797, "Submit Account Charge", 'accounting')
10098         pkt.Request((26,327), [
10099                 rec( 10, 2, ServiceType, BE ),
10100                 rec( 12, 4, ChargeAmount, BE ),
10101                 rec( 16, 4, HoldCancelAmount, BE ),
10102                 rec( 20, 2, ObjectType, BE ),
10103                 rec( 22, 2, CommentType, BE ),
10104                 rec( 24, (1,48), ObjectName ),
10105                 rec( -1, (1,255), Comment ),
10106         ], info_str=(ObjectName, "Submit Account Charge: %s", ", %s"))
10107         pkt.Reply(8)
10108         pkt.CompletionCodes([0x0000, 0x0102, 0x8800, 0x9400, 0x9600, 0xa201,
10109                              0xc000, 0xc101, 0xc200, 0xc400, 0xe800, 0xea00,
10110                              0xeb00, 0xec00, 0xfe07, 0xff00])
10111         # 2222/1798, 23/152
10112         pkt = NCP(0x1798, "Submit Account Hold", 'accounting')
10113         pkt.Request((17,64), [
10114                 rec( 10, 4, HoldCancelAmount, BE ),
10115                 rec( 14, 2, ObjectType, BE ),
10116                 rec( 16, (1,48), ObjectName ),
10117         ], info_str=(ObjectName, "Submit Account Hold: %s", ", %s"))
10118         pkt.Reply(8)
10119         pkt.CompletionCodes([0x0000, 0x0102, 0x8800, 0x9400, 0x9600, 0xa201,
10120                              0xc000, 0xc101, 0xc200, 0xc400, 0xe800, 0xea00,
10121                              0xeb00, 0xec00, 0xfe07, 0xff00])
10122         # 2222/1799, 23/153
10123         pkt = NCP(0x1799, "Submit Account Note", 'accounting')
10124         pkt.Request((18,319), [
10125                 rec( 10, 2, ServiceType, BE ),
10126                 rec( 12, 2, ObjectType, BE ),
10127                 rec( 14, 2, CommentType, BE ),
10128                 rec( 16, (1,48), ObjectName ),
10129                 rec( -1, (1,255), Comment ),
10130         ], info_str=(ObjectName, "Submit Account Note: %s", ", %s"))
10131         pkt.Reply(8)
10132         pkt.CompletionCodes([0x0000, 0x0102, 0x9600, 0xc000, 0xc101, 0xc400,
10133                              0xe800, 0xea00, 0xeb00, 0xec00, 0xf000, 0xfc06,
10134                              0xff00])
10135         # 2222/17c8, 23/200
10136         pkt = NCP(0x17c8, "Check Console Privileges", 'stats')
10137         pkt.Request(10)
10138         pkt.Reply(8)
10139         pkt.CompletionCodes([0x0000, 0xc601])
10140         # 2222/17c9, 23/201
10141         pkt = NCP(0x17c9, "Get File Server Description Strings", 'stats')
10142         pkt.Request(10)
10143         pkt.Reply(108, [
10144                 rec( 8, 100, DescriptionStrings ),
10145         ])
10146         pkt.CompletionCodes([0x0000, 0x9600])
10147         # 2222/17CA, 23/202
10148         pkt = NCP(0x17CA, "Set File Server Date And Time", 'stats')
10149         pkt.Request(16, [
10150                 rec( 10, 1, Year ),
10151                 rec( 11, 1, Month ),
10152                 rec( 12, 1, Day ),
10153                 rec( 13, 1, Hour ),
10154                 rec( 14, 1, Minute ),
10155                 rec( 15, 1, Second ),
10156         ])
10157         pkt.Reply(8)
10158         pkt.CompletionCodes([0x0000, 0xc601])
10159         # 2222/17CB, 23/203
10160         pkt = NCP(0x17CB, "Disable File Server Login", 'stats')
10161         pkt.Request(10)
10162         pkt.Reply(8)
10163         pkt.CompletionCodes([0x0000, 0xc601])
10164         # 2222/17CC, 23/204
10165         pkt = NCP(0x17CC, "Enable File Server Login", 'stats')
10166         pkt.Request(10)
10167         pkt.Reply(8)
10168         pkt.CompletionCodes([0x0000, 0xc601])
10169         # 2222/17CD, 23/205
10170         pkt = NCP(0x17CD, "Get File Server Login Status", 'stats')
10171         pkt.Request(10)
10172         pkt.Reply(12, [
10173                 rec( 8, 4, UserLoginAllowed ),
10174         ])
10175         pkt.CompletionCodes([0x0000, 0x9600, 0xfb01])
10176         # 2222/17CF, 23/207
10177         pkt = NCP(0x17CF, "Disable Transaction Tracking", 'stats')
10178         pkt.Request(10)
10179         pkt.Reply(8)
10180         pkt.CompletionCodes([0x0000, 0xc601])
10181         # 2222/17D0, 23/208
10182         pkt = NCP(0x17D0, "Enable Transaction Tracking", 'stats')
10183         pkt.Request(10)
10184         pkt.Reply(8)
10185         pkt.CompletionCodes([0x0000, 0xc601])
10186         # 2222/17D1, 23/209
10187         pkt = NCP(0x17D1, "Send Console Broadcast", 'stats')
10188         pkt.Request((13,267), [
10189                 rec( 10, 1, NumberOfStations, var="x" ),
10190                 rec( 11, 1, StationList, repeat="x" ),
10191                 rec( 12, (1, 255), TargetMessage ),
10192         ], info_str=(TargetMessage, "Send Console Broadcast: %s", ", %s"))
10193         pkt.Reply(8)
10194         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10195         # 2222/17D2, 23/210
10196         pkt = NCP(0x17D2, "Clear Connection Number", 'stats')
10197         pkt.Request(11, [
10198                 rec( 10, 1, ConnectionNumber ),
10199         ],info_str=(ConnectionNumber, "Clear Connection Number %d", ", %d"))
10200         pkt.Reply(8)
10201         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10202         # 2222/17D3, 23/211
10203         pkt = NCP(0x17D3, "Down File Server", 'stats')
10204         pkt.Request(11, [
10205                 rec( 10, 1, ForceFlag ),
10206         ])
10207         pkt.Reply(8)
10208         pkt.CompletionCodes([0x0000, 0xc601, 0xff00])
10209         # 2222/17D4, 23/212
10210         pkt = NCP(0x17D4, "Get File System Statistics", 'stats')
10211         pkt.Request(10)
10212         pkt.Reply(50, [
10213                 rec( 8, 4, SystemIntervalMarker, BE ),
10214                 rec( 12, 2, ConfiguredMaxOpenFiles ),
10215                 rec( 14, 2, ActualMaxOpenFiles ),
10216                 rec( 16, 2, CurrentOpenFiles ),
10217                 rec( 18, 4, TotalFilesOpened ),
10218                 rec( 22, 4, TotalReadRequests ),
10219                 rec( 26, 4, TotalWriteRequests ),
10220                 rec( 30, 2, CurrentChangedFATs ),
10221                 rec( 32, 4, TotalChangedFATs ),
10222                 rec( 36, 2, FATWriteErrors ),
10223                 rec( 38, 2, FatalFATWriteErrors ),
10224                 rec( 40, 2, FATScanErrors ),
10225                 rec( 42, 2, ActualMaxIndexedFiles ),
10226                 rec( 44, 2, ActiveIndexedFiles ),
10227                 rec( 46, 2, AttachedIndexedFiles ),
10228                 rec( 48, 2, AvailableIndexedFiles ),
10229         ])
10230         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10231         # 2222/17D5, 23/213
10232         pkt = NCP(0x17D5, "Get Transaction Tracking Statistics", 'stats')
10233         pkt.Request((13,267), [
10234                 rec( 10, 2, LastRecordSeen ),
10235                 rec( 12, (1,255), SemaphoreName ),
10236         ])
10237         pkt.Reply(53, [
10238                 rec( 8, 4, SystemIntervalMarker, BE ),
10239                 rec( 12, 1, TransactionTrackingSupported ),
10240                 rec( 13, 1, TransactionTrackingEnabled ),
10241                 rec( 14, 2, TransactionVolumeNumber ),
10242                 rec( 16, 2, ConfiguredMaxSimultaneousTransactions ),
10243                 rec( 18, 2, ActualMaxSimultaneousTransactions ),
10244                 rec( 20, 2, CurrentTransactionCount ),
10245                 rec( 22, 4, TotalTransactionsPerformed ),
10246                 rec( 26, 4, TotalWriteTransactionsPerformed ),
10247                 rec( 30, 4, TotalTransactionsBackedOut ),
10248                 rec( 34, 2, TotalUnfilledBackoutRequests ),
10249                 rec( 36, 2, TransactionDiskSpace ),
10250                 rec( 38, 4, TransactionFATAllocations ),
10251                 rec( 42, 4, TransactionFileSizeChanges ),
10252                 rec( 46, 4, TransactionFilesTruncated ),
10253                 rec( 50, 1, NumberOfEntries, var="x" ),
10254                 rec( 51, 2, ConnTaskStruct, repeat="x" ),
10255         ])
10256         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10257         # 2222/17D6, 23/214
10258         pkt = NCP(0x17D6, "Read Disk Cache Statistics", 'stats')
10259         pkt.Request(10)
10260         pkt.Reply(86, [
10261                 rec( 8, 4, SystemIntervalMarker, BE ),
10262                 rec( 12, 2, CacheBufferCount ),
10263                 rec( 14, 2, CacheBufferSize ),
10264                 rec( 16, 2, DirtyCacheBuffers ),
10265                 rec( 18, 4, CacheReadRequests ),
10266                 rec( 22, 4, CacheWriteRequests ),
10267                 rec( 26, 4, CacheHits ),
10268                 rec( 30, 4, CacheMisses ),
10269                 rec( 34, 4, PhysicalReadRequests ),
10270                 rec( 38, 4, PhysicalWriteRequests ),
10271                 rec( 42, 2, PhysicalReadErrors ),
10272                 rec( 44, 2, PhysicalWriteErrors ),
10273                 rec( 46, 4, CacheGetRequests ),
10274                 rec( 50, 4, CacheFullWriteRequests ),
10275                 rec( 54, 4, CachePartialWriteRequests ),
10276                 rec( 58, 4, BackgroundDirtyWrites ),
10277                 rec( 62, 4, BackgroundAgedWrites ),
10278                 rec( 66, 4, TotalCacheWrites ),
10279                 rec( 70, 4, CacheAllocations ),
10280                 rec( 74, 2, ThrashingCount ),
10281                 rec( 76, 2, LRUBlockWasDirty ),
10282                 rec( 78, 2, ReadBeyondWrite ),
10283                 rec( 80, 2, FragmentWriteOccurred ),
10284                 rec( 82, 2, CacheHitOnUnavailableBlock ),
10285                 rec( 84, 2, CacheBlockScrapped ),
10286         ])
10287         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10288         # 2222/17D7, 23/215
10289         pkt = NCP(0x17D7, "Get Drive Mapping Table", 'stats')
10290         pkt.Request(10)
10291         pkt.Reply(184, [
10292                 rec( 8, 4, SystemIntervalMarker, BE ),
10293                 rec( 12, 1, SFTSupportLevel ),
10294                 rec( 13, 1, LogicalDriveCount ),
10295                 rec( 14, 1, PhysicalDriveCount ),
10296                 rec( 15, 1, DiskChannelTable ),
10297                 rec( 16, 4, Reserved4 ),
10298                 rec( 20, 2, PendingIOCommands, BE ),
10299                 rec( 22, 32, DriveMappingTable ),
10300                 rec( 54, 32, DriveMirrorTable ),
10301                 rec( 86, 32, DeadMirrorTable ),
10302                 rec( 118, 1, ReMirrorDriveNumber ),
10303                 rec( 119, 1, Filler ),
10304                 rec( 120, 4, ReMirrorCurrentOffset, BE ),
10305                 rec( 124, 60, SFTErrorTable ),
10306         ])
10307         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10308         # 2222/17D8, 23/216
10309         pkt = NCP(0x17D8, "Read Physical Disk Statistics", 'stats')
10310         pkt.Request(11, [
10311                 rec( 10, 1, PhysicalDiskNumber ),
10312         ])
10313         pkt.Reply(101, [
10314                 rec( 8, 4, SystemIntervalMarker, BE ),
10315                 rec( 12, 1, PhysicalDiskChannel ),
10316                 rec( 13, 1, DriveRemovableFlag ),
10317                 rec( 14, 1, PhysicalDriveType ),
10318                 rec( 15, 1, ControllerDriveNumber ),
10319                 rec( 16, 1, ControllerNumber ),
10320                 rec( 17, 1, ControllerType ),
10321                 rec( 18, 4, DriveSize ),
10322                 rec( 22, 2, DriveCylinders ),
10323                 rec( 24, 1, DriveHeads ),
10324                 rec( 25, 1, SectorsPerTrack ),
10325                 rec( 26, 64, DriveDefinitionString ),
10326                 rec( 90, 2, IOErrorCount ),
10327                 rec( 92, 4, HotFixTableStart ),
10328                 rec( 96, 2, HotFixTableSize ),
10329                 rec( 98, 2, HotFixBlocksAvailable ),
10330                 rec( 100, 1, HotFixDisabled ),
10331         ])
10332         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10333         # 2222/17D9, 23/217
10334         pkt = NCP(0x17D9, "Get Disk Channel Statistics", 'stats')
10335         pkt.Request(11, [
10336                 rec( 10, 1, DiskChannelNumber ),
10337         ])
10338         pkt.Reply(192, [
10339                 rec( 8, 4, SystemIntervalMarker, BE ),
10340                 rec( 12, 2, ChannelState, BE ),
10341                 rec( 14, 2, ChannelSynchronizationState, BE ),
10342                 rec( 16, 1, SoftwareDriverType ),
10343                 rec( 17, 1, SoftwareMajorVersionNumber ),
10344                 rec( 18, 1, SoftwareMinorVersionNumber ),
10345                 rec( 19, 65, SoftwareDescription ),
10346                 rec( 84, 8, IOAddressesUsed ),
10347                 rec( 92, 10, SharedMemoryAddresses ),
10348                 rec( 102, 4, InterruptNumbersUsed ),
10349                 rec( 106, 4, DMAChannelsUsed ),
10350                 rec( 110, 1, FlagBits ),
10351                 rec( 111, 1, Reserved ),
10352                 rec( 112, 80, ConfigurationDescription ),
10353         ])
10354         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10355         # 2222/17DB, 23/219
10356         pkt = NCP(0x17DB, "Get Connection's Open Files", 'file')
10357         pkt.Request(14, [
10358                 rec( 10, 2, ConnectionNumber ),
10359                 rec( 12, 2, LastRecordSeen, BE ),
10360         ])
10361         pkt.Reply(32, [
10362                 rec( 8, 2, NextRequestRecord ),
10363                 rec( 10, 1, NumberOfRecords, var="x" ),
10364                 rec( 11, 21, ConnStruct, repeat="x" ),
10365         ])
10366         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10367         # 2222/17DC, 23/220
10368         pkt = NCP(0x17DC, "Get Connection Using A File", 'file')
10369         pkt.Request((14,268), [
10370                 rec( 10, 2, LastRecordSeen, BE ),
10371                 rec( 12, 1, DirHandle ),
10372                 rec( 13, (1,255), Path ),
10373         ], info_str=(Path, "Get Connection Using File: %s", ", %s"))
10374         pkt.Reply(30, [
10375                 rec( 8, 2, UseCount, BE ),
10376                 rec( 10, 2, OpenCount, BE ),
10377                 rec( 12, 2, OpenForReadCount, BE ),
10378                 rec( 14, 2, OpenForWriteCount, BE ),
10379                 rec( 16, 2, DenyReadCount, BE ),
10380                 rec( 18, 2, DenyWriteCount, BE ),
10381                 rec( 20, 2, NextRequestRecord, BE ),
10382                 rec( 22, 1, Locked ),
10383                 rec( 23, 1, NumberOfRecords, var="x" ),
10384                 rec( 24, 6, ConnFileStruct, repeat="x" ),
10385         ])
10386         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10387         # 2222/17DD, 23/221
10388         pkt = NCP(0x17DD, "Get Physical Record Locks By Connection And File", 'file')
10389         pkt.Request(31, [
10390                 rec( 10, 2, TargetConnectionNumber ),
10391                 rec( 12, 2, LastRecordSeen, BE ),
10392                 rec( 14, 1, VolumeNumber ),
10393                 rec( 15, 2, DirectoryID ),
10394                 rec( 17, 14, FileName14 ),
10395         ], info_str=(FileName14, "Get Physical Record Locks by Connection and File: %s", ", %s"))
10396         pkt.Reply(22, [
10397                 rec( 8, 2, NextRequestRecord ),
10398                 rec( 10, 1, NumberOfLocks, var="x" ),
10399                 rec( 11, 1, Reserved ),
10400                 rec( 12, 10, LockStruct, repeat="x" ),
10401         ])
10402         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10403         # 2222/17DE, 23/222
10404         pkt = NCP(0x17DE, "Get Physical Record Locks By File", 'file')
10405         pkt.Request((14,268), [
10406                 rec( 10, 2, TargetConnectionNumber ),
10407                 rec( 12, 1, DirHandle ),
10408                 rec( 13, (1,255), Path ),
10409         ], info_str=(Path, "Get Physical Record Locks by File: %s", ", %s"))
10410         pkt.Reply(28, [
10411                 rec( 8, 2, NextRequestRecord ),
10412                 rec( 10, 1, NumberOfLocks, var="x" ),
10413                 rec( 11, 1, Reserved ),
10414                 rec( 12, 16, PhyLockStruct, repeat="x" ),
10415         ])
10416         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10417         # 2222/17DF, 23/223
10418         pkt = NCP(0x17DF, "Get Logical Records By Connection", 'file')
10419         pkt.Request(14, [
10420                 rec( 10, 2, TargetConnectionNumber ),
10421                 rec( 12, 2, LastRecordSeen, BE ),
10422         ])
10423         pkt.Reply((14,268), [
10424                 rec( 8, 2, NextRequestRecord ),
10425                 rec( 10, 1, NumberOfRecords, var="x" ),
10426                 rec( 11, (3, 257), LogLockStruct, repeat="x" ),
10427         ])
10428         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10429         # 2222/17E0, 23/224
10430         pkt = NCP(0x17E0, "Get Logical Record Information", 'file')
10431         pkt.Request((13,267), [
10432                 rec( 10, 2, LastRecordSeen ),
10433                 rec( 12, (1,255), LogicalRecordName ),
10434         ], info_str=(LogicalRecordName, "Get Logical Record Information: %s", ", %s"))
10435         pkt.Reply(20, [
10436                 rec( 8, 2, UseCount, BE ),
10437                 rec( 10, 2, ShareableLockCount, BE ),
10438                 rec( 12, 2, NextRequestRecord ),
10439                 rec( 14, 1, Locked ),
10440                 rec( 15, 1, NumberOfRecords, var="x" ),
10441                 rec( 16, 4, LogRecStruct, repeat="x" ),
10442         ])
10443         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10444         # 2222/17E1, 23/225
10445         pkt = NCP(0x17E1, "Get Connection's Semaphores", 'file')
10446         pkt.Request(14, [
10447                 rec( 10, 2, ConnectionNumber ),
10448                 rec( 12, 2, LastRecordSeen ),
10449         ])
10450         pkt.Reply((18,272), [
10451                 rec( 8, 2, NextRequestRecord ),
10452                 rec( 10, 2, NumberOfSemaphores, var="x" ),
10453                 rec( 12, (6,260), SemaStruct, repeat="x" ),
10454         ])
10455         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10456         # 2222/17E2, 23/226
10457         pkt = NCP(0x17E2, "Get Semaphore Information", 'file')
10458         pkt.Request((13,267), [
10459                 rec( 10, 2, LastRecordSeen ),
10460                 rec( 12, (1,255), SemaphoreName ),
10461         ], info_str=(SemaphoreName, "Get Semaphore Information: %s", ", %s"))
10462         pkt.Reply(17, [
10463                 rec( 8, 2, NextRequestRecord, BE ),
10464                 rec( 10, 2, OpenCount, BE ),
10465                 rec( 12, 1, SemaphoreValue ),
10466                 rec( 13, 1, NumberOfRecords, var="x" ),
10467                 rec( 14, 3, SemaInfoStruct, repeat="x" ),
10468         ])
10469         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10470         # 2222/17E3, 23/227
10471         pkt = NCP(0x17E3, "Get LAN Driver Configuration Information", 'stats')
10472         pkt.Request(11, [
10473                 rec( 10, 1, LANDriverNumber ),
10474         ])
10475         pkt.Reply(180, [
10476                 rec( 8, 4, NetworkAddress, BE ),
10477                 rec( 12, 6, HostAddress ),
10478                 rec( 18, 1, BoardInstalled ),
10479                 rec( 19, 1, OptionNumber ),
10480                 rec( 20, 160, ConfigurationText ),
10481         ])
10482         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10483         # 2222/17E5, 23/229
10484         pkt = NCP(0x17E5, "Get Connection Usage Statistics", 'stats')
10485         pkt.Request(12, [
10486                 rec( 10, 2, ConnectionNumber ),
10487         ])
10488         pkt.Reply(26, [
10489                 rec( 8, 2, NextRequestRecord ),
10490                 rec( 10, 6, BytesRead ),
10491                 rec( 16, 6, BytesWritten ),
10492                 rec( 22, 4, TotalRequestPackets ),
10493          ])
10494         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10495         # 2222/17E6, 23/230
10496         pkt = NCP(0x17E6, "Get Object's Remaining Disk Space", 'stats')
10497         pkt.Request(14, [
10498                 rec( 10, 4, ObjectID, BE ),
10499         ])
10500         pkt.Reply(21, [
10501                 rec( 8, 4, SystemIntervalMarker, BE ),
10502                 rec( 12, 4, ObjectID ),
10503                 rec( 16, 4, UnusedDiskBlocks, BE ),
10504                 rec( 20, 1, RestrictionsEnforced ),
10505          ])
10506         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10507         # 2222/17E7, 23/231
10508         pkt = NCP(0x17E7, "Get File Server LAN I/O Statistics", 'stats')
10509         pkt.Request(10)
10510         pkt.Reply(74, [
10511                 rec( 8, 4, SystemIntervalMarker, BE ),
10512                 rec( 12, 2, ConfiguredMaxRoutingBuffers ),
10513                 rec( 14, 2, ActualMaxUsedRoutingBuffers ),
10514                 rec( 16, 2, CurrentlyUsedRoutingBuffers ),
10515                 rec( 18, 4, TotalFileServicePackets ),
10516                 rec( 22, 2, TurboUsedForFileService ),
10517                 rec( 24, 2, PacketsFromInvalidConnection ),
10518                 rec( 26, 2, BadLogicalConnectionCount ),
10519                 rec( 28, 2, PacketsReceivedDuringProcessing ),
10520                 rec( 30, 2, RequestsReprocessed ),
10521                 rec( 32, 2, PacketsWithBadSequenceNumber ),
10522                 rec( 34, 2, DuplicateRepliesSent ),
10523                 rec( 36, 2, PositiveAcknowledgesSent ),
10524                 rec( 38, 2, PacketsWithBadRequestType ),
10525                 rec( 40, 2, AttachDuringProcessing ),
10526                 rec( 42, 2, AttachWhileProcessingAttach ),
10527                 rec( 44, 2, ForgedDetachedRequests ),
10528                 rec( 46, 2, DetachForBadConnectionNumber ),
10529                 rec( 48, 2, DetachDuringProcessing ),
10530                 rec( 50, 2, RepliesCancelled ),
10531                 rec( 52, 2, PacketsDiscardedByHopCount ),
10532                 rec( 54, 2, PacketsDiscardedUnknownNet ),
10533                 rec( 56, 2, IncomingPacketDiscardedNoDGroup ),
10534                 rec( 58, 2, OutgoingPacketDiscardedNoTurboBuffer ),
10535                 rec( 60, 2, IPXNotMyNetwork ),
10536                 rec( 62, 4, NetBIOSBroadcastWasPropogated ),
10537                 rec( 66, 4, TotalOtherPackets ),
10538                 rec( 70, 4, TotalRoutedPackets ),
10539          ])
10540         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10541         # 2222/17E8, 23/232
10542         pkt = NCP(0x17E8, "Get File Server Misc Information", 'stats')
10543         pkt.Request(10)
10544         pkt.Reply(40, [
10545                 rec( 8, 4, SystemIntervalMarker, BE ),
10546                 rec( 12, 1, ProcessorType ),
10547                 rec( 13, 1, Reserved ),
10548                 rec( 14, 1, NumberOfServiceProcesses ),
10549                 rec( 15, 1, ServerUtilizationPercentage ),
10550                 rec( 16, 2, ConfiguredMaxBinderyObjects ),
10551                 rec( 18, 2, ActualMaxBinderyObjects ),
10552                 rec( 20, 2, CurrentUsedBinderyObjects ),
10553                 rec( 22, 2, TotalServerMemory ),
10554                 rec( 24, 2, WastedServerMemory ),
10555                 rec( 26, 2, NumberOfDynamicMemoryAreas, var="x" ),
10556                 rec( 28, 12, DynMemStruct, repeat="x" ),
10557          ])
10558         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10559         # 2222/17E9, 23/233
10560         pkt = NCP(0x17E9, "Get Volume Information", 'stats')
10561         pkt.Request(11, [
10562                 rec( 10, 1, VolumeNumber ),
10563         ],info_str=(VolumeNumber, "Get Information on Volume %d", ", %d"))
10564         pkt.Reply(48, [
10565                 rec( 8, 4, SystemIntervalMarker, BE ),
10566                 rec( 12, 1, VolumeNumber ),
10567                 rec( 13, 1, LogicalDriveNumber ),
10568                 rec( 14, 2, BlockSize ),
10569                 rec( 16, 2, StartingBlock ),
10570                 rec( 18, 2, TotalBlocks ),
10571                 rec( 20, 2, FreeBlocks ),
10572                 rec( 22, 2, TotalDirectoryEntries ),
10573                 rec( 24, 2, FreeDirectoryEntries ),
10574                 rec( 26, 2, ActualMaxUsedDirectoryEntries ),
10575                 rec( 28, 1, VolumeHashedFlag ),
10576                 rec( 29, 1, VolumeCachedFlag ),
10577                 rec( 30, 1, VolumeRemovableFlag ),
10578                 rec( 31, 1, VolumeMountedFlag ),
10579                 rec( 32, 16, VolumeName ),
10580          ])
10581         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10582         # 2222/17EA, 23/234
10583         pkt = NCP(0x17EA, "Get Connection's Task Information", 'stats')
10584         pkt.Request(12, [
10585                 rec( 10, 2, ConnectionNumber ),
10586         ])
10587         pkt.Reply(18, [
10588                 rec( 8, 2, NextRequestRecord ),
10589                 rec( 10, 4, NumberOfAttributes, var="x" ),
10590                 rec( 14, 4, Attributes, repeat="x" ),
10591          ])
10592         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10593         # 2222/17EB, 23/235
10594         pkt = NCP(0x17EB, "Get Connection's Open Files", 'file')
10595         pkt.Request(14, [
10596                 rec( 10, 2, ConnectionNumber ),
10597                 rec( 12, 2, LastRecordSeen ),
10598         ])
10599         pkt.Reply((29,283), [
10600                 rec( 8, 2, NextRequestRecord ),
10601                 rec( 10, 2, NumberOfRecords, var="x" ),
10602                 rec( 12, (17, 271), OpnFilesStruct, repeat="x" ),
10603         ])
10604         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10605         # 2222/17EC, 23/236
10606         pkt = NCP(0x17EC, "Get Connection Using A File", 'file')
10607         pkt.Request(18, [
10608                 rec( 10, 1, DataStreamNumber ),
10609                 rec( 11, 1, VolumeNumber ),
10610                 rec( 12, 4, DirectoryBase, LE ),
10611                 rec( 16, 2, LastRecordSeen ),
10612         ])
10613         pkt.Reply(33, [
10614                 rec( 8, 2, NextRequestRecord ),
10615                 rec( 10, 2, UseCount ),
10616                 rec( 12, 2, OpenCount ),
10617                 rec( 14, 2, OpenForReadCount ),
10618                 rec( 16, 2, OpenForWriteCount ),
10619                 rec( 18, 2, DenyReadCount ),
10620                 rec( 20, 2, DenyWriteCount ),
10621                 rec( 22, 1, Locked ),
10622                 rec( 23, 1, ForkCount ),
10623                 rec( 24, 2, NumberOfRecords, var="x" ),
10624                 rec( 26, 7, ConnStruct, repeat="x" ),
10625         ])
10626         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10627         # 2222/17ED, 23/237
10628         pkt = NCP(0x17ED, "Get Physical Record Locks By Connection And File", 'file')
10629         pkt.Request(20, [
10630                 rec( 10, 2, TargetConnectionNumber ),
10631                 rec( 12, 1, DataStreamNumber ),
10632                 rec( 13, 1, VolumeNumber ),
10633                 rec( 14, 4, DirectoryBase, LE ),
10634                 rec( 18, 2, LastRecordSeen ),
10635         ])
10636         pkt.Reply(23, [
10637                 rec( 8, 2, NextRequestRecord ),
10638                 rec( 10, 2, NumberOfLocks, var="x" ),
10639                 rec( 12, 11, LockStruct, repeat="x" ),
10640         ])
10641         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10642         # 2222/17EE, 23/238
10643         pkt = NCP(0x17EE, "Get Physical Record Locks By File", 'file')
10644         pkt.Request(18, [
10645                 rec( 10, 1, DataStreamNumber ),
10646                 rec( 11, 1, VolumeNumber ),
10647                 rec( 12, 4, DirectoryBase ),
10648                 rec( 16, 2, LastRecordSeen ),
10649         ])
10650         pkt.Reply(30, [
10651                 rec( 8, 2, NextRequestRecord ),
10652                 rec( 10, 2, NumberOfLocks, var="x" ),
10653                 rec( 12, 18, PhyLockStruct, repeat="x" ),
10654         ])
10655         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10656         # 2222/17EF, 23/239
10657         pkt = NCP(0x17EF, "Get Logical Records By Connection", 'file')
10658         pkt.Request(14, [
10659                 rec( 10, 2, TargetConnectionNumber ),
10660                 rec( 12, 2, LastRecordSeen ),
10661         ])
10662         pkt.Reply((16,270), [
10663                 rec( 8, 2, NextRequestRecord ),
10664                 rec( 10, 2, NumberOfRecords, var="x" ),
10665                 rec( 12, (4, 258), LogLockStruct, repeat="x" ),
10666         ])
10667         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10668         # 2222/17F0, 23/240
10669         pkt = NCP(0x17F0, "Get Logical Record Information (old)", 'file')
10670         pkt.Request((13,267), [
10671                 rec( 10, 2, LastRecordSeen ),
10672                 rec( 12, (1,255), LogicalRecordName ),
10673         ])
10674         pkt.Reply(22, [
10675                 rec( 8, 2, ShareableLockCount ),
10676                 rec( 10, 2, UseCount ),
10677                 rec( 12, 1, Locked ),
10678                 rec( 13, 2, NextRequestRecord ),
10679                 rec( 15, 2, NumberOfRecords, var="x" ),
10680                 rec( 17, 5, LogRecStruct, repeat="x" ),
10681         ])
10682         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10683         # 2222/17F1, 23/241
10684         pkt = NCP(0x17F1, "Get Connection's Semaphores", 'file')
10685         pkt.Request(14, [
10686                 rec( 10, 2, ConnectionNumber ),
10687                 rec( 12, 2, LastRecordSeen ),
10688         ])
10689         pkt.Reply((19,273), [
10690                 rec( 8, 2, NextRequestRecord ),
10691                 rec( 10, 2, NumberOfSemaphores, var="x" ),
10692                 rec( 12, (7, 261), SemaStruct, repeat="x" ),
10693         ])
10694         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10695         # 2222/17F2, 23/242
10696         pkt = NCP(0x17F2, "Get Semaphore Information", 'file')
10697         pkt.Request((13,267), [
10698                 rec( 10, 2, LastRecordSeen ),
10699                 rec( 12, (1,255), SemaphoreName ),
10700         ], info_str=(SemaphoreName, "Get Semaphore Information: %s", ", %s"))
10701         pkt.Reply(20, [
10702                 rec( 8, 2, NextRequestRecord ),
10703                 rec( 10, 2, OpenCount ),
10704                 rec( 12, 2, SemaphoreValue ),
10705                 rec( 14, 2, NumberOfRecords, var="x" ),
10706                 rec( 16, 4, SemaInfoStruct, repeat="x" ),
10707         ])
10708         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10709         # 2222/17F3, 23/243
10710         pkt = NCP(0x17F3, "Map Directory Number to Path", 'file')
10711         pkt.Request(16, [
10712                 rec( 10, 1, VolumeNumber ),
10713                 rec( 11, 4, DirectoryNumber ),
10714                 rec( 15, 1, NameSpace ),
10715         ])
10716         pkt.Reply((9,263), [
10717                 rec( 8, (1,255), Path ),
10718         ])
10719         pkt.CompletionCodes([0x0000, 0x9600, 0x9c00, 0xc601, 0xfd00, 0xff00])
10720         # 2222/17F4, 23/244
10721         pkt = NCP(0x17F4, "Convert Path to Dir Entry", 'file')
10722         pkt.Request((12,266), [
10723                 rec( 10, 1, DirHandle ),
10724                 rec( 11, (1,255), Path ),
10725         ], info_str=(Path, "Convert Path to Directory Entry: %s", ", %s"))
10726         pkt.Reply(13, [
10727                 rec( 8, 1, VolumeNumber ),
10728                 rec( 9, 4, DirectoryNumber ),
10729         ])
10730         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10731         # 2222/17FD, 23/253
10732         pkt = NCP(0x17FD, "Send Console Broadcast", 'stats')
10733         pkt.Request((16, 270), [
10734                 rec( 10, 1, NumberOfStations, var="x" ),
10735                 rec( 11, 4, StationList, repeat="x" ),
10736                 rec( 15, (1, 255), TargetMessage ),
10737         ], info_str=(TargetMessage, "Send Console Broadcast: %s", ", %s"))
10738         pkt.Reply(8)
10739         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10740         # 2222/17FE, 23/254
10741         pkt = NCP(0x17FE, "Clear Connection Number", 'stats')
10742         pkt.Request(14, [
10743                 rec( 10, 4, ConnectionNumber ),
10744         ])
10745         pkt.Reply(8)
10746         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10747         # 2222/18, 24
10748         pkt = NCP(0x18, "End of Job", 'connection')
10749         pkt.Request(7)
10750         pkt.Reply(8)
10751         pkt.CompletionCodes([0x0000])
10752         # 2222/19, 25
10753         pkt = NCP(0x19, "Logout", 'connection')
10754         pkt.Request(7)
10755         pkt.Reply(8)
10756         pkt.CompletionCodes([0x0000])
10757         # 2222/1A, 26
10758         pkt = NCP(0x1A, "Log Physical Record", 'file')
10759         pkt.Request(24, [
10760                 rec( 7, 1, LockFlag ),
10761                 rec( 8, 6, FileHandle ),
10762                 rec( 14, 4, LockAreasStartOffset, BE ),
10763                 rec( 18, 4, LockAreaLen, BE ),
10764                 rec( 22, 2, LockTimeout ),
10765         ])
10766         pkt.Reply(8)
10767         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
10768         # 2222/1B, 27
10769         pkt = NCP(0x1B, "Lock Physical Record Set", 'file')
10770         pkt.Request(10, [
10771                 rec( 7, 1, LockFlag ),
10772                 rec( 8, 2, LockTimeout ),
10773         ])
10774         pkt.Reply(8)
10775         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
10776         # 2222/1C, 28
10777         pkt = NCP(0x1C, "Release Physical Record", 'file')
10778         pkt.Request(22, [
10779                 rec( 7, 1, Reserved ),
10780                 rec( 8, 6, FileHandle ),
10781                 rec( 14, 4, LockAreasStartOffset ),
10782                 rec( 18, 4, LockAreaLen ),
10783         ])
10784         pkt.Reply(8)
10785         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10786         # 2222/1D, 29
10787         pkt = NCP(0x1D, "Release Physical Record Set", 'file')
10788         pkt.Request(8, [
10789                 rec( 7, 1, LockFlag ),
10790         ])
10791         pkt.Reply(8)
10792         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10793         # 2222/1E, 30   #Tested and fixed 6-14-02 GM
10794         pkt = NCP(0x1E, "Clear Physical Record", 'file')
10795         pkt.Request(22, [
10796                 rec( 7, 1, Reserved ),
10797                 rec( 8, 6, FileHandle ),
10798                 rec( 14, 4, LockAreasStartOffset, BE ),
10799                 rec( 18, 4, LockAreaLen, BE ),
10800         ])
10801         pkt.Reply(8)
10802         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10803         # 2222/1F, 31
10804         pkt = NCP(0x1F, "Clear Physical Record Set", 'file')
10805         pkt.Request(8, [
10806                 rec( 7, 1, LockFlag ),
10807         ])
10808         pkt.Reply(8)
10809         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10810         # 2222/2000, 32/00
10811         pkt = NCP(0x2000, "Open Semaphore", 'file', has_length=0)
10812         pkt.Request(10, [
10813                 rec( 8, 1, InitialSemaphoreValue ),
10814                 rec( 9, 1, SemaphoreNameLen ),
10815         ])
10816         pkt.Reply(13, [
10817                   rec( 8, 4, SemaphoreHandle, BE ),
10818                   rec( 12, 1, SemaphoreOpenCount ),
10819         ])
10820         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10821         # 2222/2001, 32/01
10822         pkt = NCP(0x2001, "Examine Semaphore", 'file', has_length=0)
10823         pkt.Request(12, [
10824                 rec( 8, 4, SemaphoreHandle, BE ),
10825         ])
10826         pkt.Reply(10, [
10827                   rec( 8, 1, SemaphoreValue ),
10828                   rec( 9, 1, SemaphoreOpenCount ),
10829         ])
10830         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10831         # 2222/2002, 32/02
10832         pkt = NCP(0x2002, "Wait On Semaphore", 'file', has_length=0)
10833         pkt.Request(14, [
10834                 rec( 8, 4, SemaphoreHandle, BE ),
10835                 rec( 12, 2, SemaphoreTimeOut, BE ),
10836         ])
10837         pkt.Reply(8)
10838         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10839         # 2222/2003, 32/03
10840         pkt = NCP(0x2003, "Signal Semaphore", 'file', has_length=0)
10841         pkt.Request(12, [
10842                 rec( 8, 4, SemaphoreHandle, BE ),
10843         ])
10844         pkt.Reply(8)
10845         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10846         # 2222/2004, 32/04
10847         pkt = NCP(0x2004, "Close Semaphore", 'file', has_length=0)
10848         pkt.Request(12, [
10849                 rec( 8, 4, SemaphoreHandle, BE ),
10850         ])
10851         pkt.Reply(8)
10852         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10853         # 2222/21, 33
10854         pkt = NCP(0x21, "Negotiate Buffer Size", 'connection')
10855         pkt.Request(9, [
10856                 rec( 7, 2, BufferSize, BE ),
10857         ])
10858         pkt.Reply(10, [
10859                 rec( 8, 2, BufferSize, BE ),
10860         ])
10861         pkt.CompletionCodes([0x0000])
10862         # 2222/2200, 34/00
10863         pkt = NCP(0x2200, "TTS Is Available", 'tts', has_length=0)
10864         pkt.Request(8)
10865         pkt.Reply(8)
10866         pkt.CompletionCodes([0x0001, 0xfd03, 0xff12])
10867         # 2222/2201, 34/01
10868         pkt = NCP(0x2201, "TTS Begin Transaction", 'tts', has_length=0)
10869         pkt.Request(8)
10870         pkt.Reply(8)
10871         pkt.CompletionCodes([0x0000])
10872         # 2222/2202, 34/02
10873         pkt = NCP(0x2202, "TTS End Transaction", 'tts', has_length=0)
10874         pkt.Request(8)
10875         pkt.Reply(12, [
10876                   rec( 8, 4, TransactionNumber, BE ),
10877         ])
10878         pkt.CompletionCodes([0x0000, 0xff01])
10879         # 2222/2203, 34/03
10880         pkt = NCP(0x2203, "TTS Abort Transaction", 'tts', has_length=0)
10881         pkt.Request(8)
10882         pkt.Reply(8)
10883         pkt.CompletionCodes([0x0000, 0xfd03, 0xfe0b, 0xff01])
10884         # 2222/2204, 34/04
10885         pkt = NCP(0x2204, "TTS Transaction Status", 'tts', has_length=0)
10886         pkt.Request(12, [
10887                   rec( 8, 4, TransactionNumber, BE ),
10888         ])
10889         pkt.Reply(8)
10890         pkt.CompletionCodes([0x0000])
10891         # 2222/2205, 34/05
10892         pkt = NCP(0x2205, "TTS Get Application Thresholds", 'tts', has_length=0)
10893         pkt.Request(8)
10894         pkt.Reply(10, [
10895                   rec( 8, 1, LogicalLockThreshold ),
10896                   rec( 9, 1, PhysicalLockThreshold ),
10897         ])
10898         pkt.CompletionCodes([0x0000])
10899         # 2222/2206, 34/06
10900         pkt = NCP(0x2206, "TTS Set Application Thresholds", 'tts', has_length=0)
10901         pkt.Request(10, [
10902                   rec( 8, 1, LogicalLockThreshold ),
10903                   rec( 9, 1, PhysicalLockThreshold ),
10904         ])
10905         pkt.Reply(8)
10906         pkt.CompletionCodes([0x0000, 0x9600])
10907         # 2222/2207, 34/07
10908         pkt = NCP(0x2207, "TTS Get Workstation Thresholds", 'tts', has_length=0)
10909         pkt.Request(10, [
10910                   rec( 8, 1, LogicalLockThreshold ),
10911                   rec( 9, 1, PhysicalLockThreshold ),
10912         ])
10913         pkt.Reply(8)
10914         pkt.CompletionCodes([0x0000])
10915         # 2222/2208, 34/08
10916         pkt = NCP(0x2208, "TTS Set Workstation Thresholds", 'tts', has_length=0)
10917         pkt.Request(10, [
10918                   rec( 8, 1, LogicalLockThreshold ),
10919                   rec( 9, 1, PhysicalLockThreshold ),
10920         ])
10921         pkt.Reply(8)
10922         pkt.CompletionCodes([0x0000])
10923         # 2222/2209, 34/09
10924         pkt = NCP(0x2209, "TTS Get Transaction Bits", 'tts', has_length=0)
10925         pkt.Request(8)
10926         pkt.Reply(9, [
10927                 rec( 8, 1, ControlFlags ),
10928         ])
10929         pkt.CompletionCodes([0x0000])
10930         # 2222/220A, 34/10
10931         pkt = NCP(0x220A, "TTS Set Transaction Bits", 'tts', has_length=0)
10932         pkt.Request(9, [
10933                 rec( 8, 1, ControlFlags ),
10934         ])
10935         pkt.Reply(8)
10936         pkt.CompletionCodes([0x0000])
10937         # 2222/2301, 35/01
10938         pkt = NCP(0x2301, "AFP Create Directory", 'afp')
10939         pkt.Request((49, 303), [
10940                 rec( 10, 1, VolumeNumber ),
10941                 rec( 11, 4, BaseDirectoryID ),
10942                 rec( 15, 1, Reserved ),
10943                 rec( 16, 4, CreatorID ),
10944                 rec( 20, 4, Reserved4 ),
10945                 rec( 24, 2, FinderAttr ),
10946                 rec( 26, 2, HorizLocation ),
10947                 rec( 28, 2, VertLocation ),
10948                 rec( 30, 2, FileDirWindow ),
10949                 rec( 32, 16, Reserved16 ),
10950                 rec( 48, (1,255), Path ),
10951         ], info_str=(Path, "AFP Create Directory: %s", ", %s"))
10952         pkt.Reply(12, [
10953                 rec( 8, 4, NewDirectoryID ),
10954         ])
10955         pkt.CompletionCodes([0x0000, 0x8301, 0x8400, 0x8800, 0x9300, 0x9600, 0x9804,
10956                              0x9900, 0x9c03, 0x9e02, 0xa100, 0xa201, 0xfd00, 0xff18])
10957         # 2222/2302, 35/02
10958         pkt = NCP(0x2302, "AFP Create File", 'afp')
10959         pkt.Request((49, 303), [
10960                 rec( 10, 1, VolumeNumber ),
10961                 rec( 11, 4, BaseDirectoryID ),
10962                 rec( 15, 1, DeleteExistingFileFlag ),
10963                 rec( 16, 4, CreatorID, BE ),
10964                 rec( 20, 4, Reserved4 ),
10965                 rec( 24, 2, FinderAttr ),
10966                 rec( 26, 2, HorizLocation, BE ),
10967                 rec( 28, 2, VertLocation, BE ),
10968                 rec( 30, 2, FileDirWindow, BE ),
10969                 rec( 32, 16, Reserved16 ),
10970                 rec( 48, (1,255), Path ),
10971         ], info_str=(Path, "AFP Create File: %s", ", %s"))
10972         pkt.Reply(12, [
10973                 rec( 8, 4, NewDirectoryID ),
10974         ])
10975         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8301, 0x8400, 0x8701, 0x8800,
10976                              0x8a00, 0x8d00, 0x8e00, 0x8f00, 0x9300, 0x9600, 0x9804,
10977                              0x9900, 0x9b03, 0x9c03, 0x9e02, 0xa100, 0xa201, 0xfd00,
10978                              0xff18])
10979         # 2222/2303, 35/03
10980         pkt = NCP(0x2303, "AFP Delete", 'afp')
10981         pkt.Request((16,270), [
10982                 rec( 10, 1, VolumeNumber ),
10983                 rec( 11, 4, BaseDirectoryID ),
10984                 rec( 15, (1,255), Path ),
10985         ], info_str=(Path, "AFP Delete: %s", ", %s"))
10986         pkt.Reply(8)
10987         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x8a00, 0x8d00, 0x8e00, 0x8f00,
10988                              0x9000, 0x9300, 0x9600, 0x9804, 0x9b03, 0x9c03, 0x9e02,
10989                              0xa000, 0xa100, 0xa201, 0xfd00, 0xff19])
10990         # 2222/2304, 35/04
10991         pkt = NCP(0x2304, "AFP Get Entry ID From Name", 'afp')
10992         pkt.Request((16,270), [
10993                 rec( 10, 1, VolumeNumber ),
10994                 rec( 11, 4, BaseDirectoryID ),
10995                 rec( 15, (1,255), Path ),
10996         ], info_str=(Path, "AFP Get Entry from Name: %s", ", %s"))
10997         pkt.Reply(12, [
10998                 rec( 8, 4, TargetEntryID, BE ),
10999         ])
11000         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804, 0x9c03,
11001                              0xa100, 0xa201, 0xfd00, 0xff19])
11002         # 2222/2305, 35/05
11003         pkt = NCP(0x2305, "AFP Get File Information", 'afp')
11004         pkt.Request((18,272), [
11005                 rec( 10, 1, VolumeNumber ),
11006                 rec( 11, 4, BaseDirectoryID ),
11007                 rec( 15, 2, RequestBitMap, BE ),
11008                 rec( 17, (1,255), Path ),
11009         ], info_str=(Path, "AFP Get File Information: %s", ", %s"))
11010         pkt.Reply(121, [
11011                 rec( 8, 4, AFPEntryID, BE ),
11012                 rec( 12, 4, ParentID, BE ),
11013                 rec( 16, 2, AttributesDef16, LE ),
11014                 rec( 18, 4, DataForkLen, BE ),
11015                 rec( 22, 4, ResourceForkLen, BE ),
11016                 rec( 26, 2, TotalOffspring, BE  ),
11017                 rec( 28, 2, CreationDate, BE ),
11018                 rec( 30, 2, LastAccessedDate, BE ),
11019                 rec( 32, 2, ModifiedDate, BE ),
11020                 rec( 34, 2, ModifiedTime, BE ),
11021                 rec( 36, 2, ArchivedDate, BE ),
11022                 rec( 38, 2, ArchivedTime, BE ),
11023                 rec( 40, 4, CreatorID, BE ),
11024                 rec( 44, 4, Reserved4 ),
11025                 rec( 48, 2, FinderAttr ),
11026                 rec( 50, 2, HorizLocation ),
11027                 rec( 52, 2, VertLocation ),
11028                 rec( 54, 2, FileDirWindow ),
11029                 rec( 56, 16, Reserved16 ),
11030                 rec( 72, 32, LongName ),
11031                 rec( 104, 4, CreatorID, BE ),
11032                 rec( 108, 12, ShortName ),
11033                 rec( 120, 1, AccessPrivileges ),
11034         ])
11035         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804, 0x9c03,
11036                              0xa100, 0xa201, 0xfd00, 0xff19])
11037         # 2222/2306, 35/06
11038         pkt = NCP(0x2306, "AFP Get Entry ID From NetWare Handle", 'afp')
11039         pkt.Request(16, [
11040                 rec( 10, 6, FileHandle ),
11041         ])
11042         pkt.Reply(14, [
11043                 rec( 8, 1, VolumeID ),
11044                 rec( 9, 4, TargetEntryID, BE ),
11045                 rec( 13, 1, ForkIndicator ),
11046         ])
11047         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0xa201])
11048         # 2222/2307, 35/07
11049         pkt = NCP(0x2307, "AFP Rename", 'afp')
11050         pkt.Request((21, 529), [
11051                 rec( 10, 1, VolumeNumber ),
11052                 rec( 11, 4, MacSourceBaseID, BE ),
11053                 rec( 15, 4, MacDestinationBaseID, BE ),
11054                 rec( 19, (1,255), Path ),
11055                 rec( -1, (1,255), NewFileNameLen ),
11056         ], info_str=(Path, "AFP Rename: %s", ", %s"))
11057         pkt.Reply(8)
11058         pkt.CompletionCodes([0x0000, 0x8301, 0x8401, 0x8800, 0x8b00, 0x8e00,
11059                              0x9001, 0x9201, 0x9300, 0x9600, 0x9804, 0x9900,
11060                              0x9c03, 0x9e00, 0xa100, 0xa201, 0xfd00, 0xff0a])
11061         # 2222/2308, 35/08
11062         pkt = NCP(0x2308, "AFP Open File Fork", 'afp')
11063         pkt.Request((18, 272), [
11064                 rec( 10, 1, VolumeNumber ),
11065                 rec( 11, 4, MacBaseDirectoryID ),
11066                 rec( 15, 1, ForkIndicator ),
11067                 rec( 16, 1, AccessMode ),
11068                 rec( 17, (1,255), Path ),
11069         ], info_str=(Path, "AFP Open File Fork: %s", ", %s"))
11070         pkt.Reply(22, [
11071                 rec( 8, 4, AFPEntryID, BE ),
11072                 rec( 12, 4, DataForkLen, BE ),
11073                 rec( 16, 6, NetWareAccessHandle ),
11074         ])
11075         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8301, 0x8800, 0x9300,
11076                              0x9400, 0x9600, 0x9804, 0x9900, 0x9c03, 0xa100,
11077                              0xa201, 0xfd00, 0xff16])
11078         # 2222/2309, 35/09
11079         pkt = NCP(0x2309, "AFP Set File Information", 'afp')
11080         pkt.Request((64, 318), [
11081                 rec( 10, 1, VolumeNumber ),
11082                 rec( 11, 4, MacBaseDirectoryID ),
11083                 rec( 15, 2, RequestBitMap, BE ),
11084                 rec( 17, 2, MacAttr, BE ),
11085                 rec( 19, 2, CreationDate, BE ),
11086                 rec( 21, 2, LastAccessedDate, BE ),
11087                 rec( 23, 2, ModifiedDate, BE ),
11088                 rec( 25, 2, ModifiedTime, BE ),
11089                 rec( 27, 2, ArchivedDate, BE ),
11090                 rec( 29, 2, ArchivedTime, BE ),
11091                 rec( 31, 4, CreatorID, BE ),
11092                 rec( 35, 4, Reserved4 ),
11093                 rec( 39, 2, FinderAttr ),
11094                 rec( 41, 2, HorizLocation ),
11095                 rec( 43, 2, VertLocation ),
11096                 rec( 45, 2, FileDirWindow ),
11097                 rec( 47, 16, Reserved16 ),
11098                 rec( 63, (1,255), Path ),
11099         ], info_str=(Path, "AFP Set File Information: %s", ", %s"))
11100         pkt.Reply(8)
11101         pkt.CompletionCodes([0x0000, 0x0104, 0x8301, 0x8800, 0x9300, 0x9400,
11102                              0x9500, 0x9600, 0x9804, 0x9c03, 0xa100, 0xa201,
11103                              0xfd00, 0xff16])
11104         # 2222/230A, 35/10
11105         pkt = NCP(0x230A, "AFP Scan File Information", 'afp')
11106         pkt.Request((26, 280), [
11107                 rec( 10, 1, VolumeNumber ),
11108                 rec( 11, 4, MacBaseDirectoryID ),
11109                 rec( 15, 4, MacLastSeenID, BE ),
11110                 rec( 19, 2, DesiredResponseCount, BE ),
11111                 rec( 21, 2, SearchBitMap, BE ),
11112                 rec( 23, 2, RequestBitMap, BE ),
11113                 rec( 25, (1,255), Path ),
11114         ], info_str=(Path, "AFP Scan File Information: %s", ", %s"))
11115         pkt.Reply(123, [
11116                 rec( 8, 2, ActualResponseCount, BE, var="x" ),
11117                 rec( 10, 113, AFP10Struct, repeat="x" ),
11118         ])
11119         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804,
11120                              0x9c03, 0xa100, 0xa201, 0xfd00, 0xff16])
11121         # 2222/230B, 35/11
11122         pkt = NCP(0x230B, "AFP Alloc Temporary Directory Handle", 'afp')
11123         pkt.Request((16,270), [
11124                 rec( 10, 1, VolumeNumber ),
11125                 rec( 11, 4, MacBaseDirectoryID ),
11126                 rec( 15, (1,255), Path ),
11127         ], info_str=(Path, "AFP Allocate Temporary Directory Handle: %s", ", %s"))
11128         pkt.Reply(10, [
11129                 rec( 8, 1, DirHandle ),
11130                 rec( 9, 1, AccessRightsMask ),
11131         ])
11132         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600,
11133                              0x9804, 0x9b03, 0x9c03, 0x9d00, 0xa100,
11134                              0xa201, 0xfd00, 0xff00])
11135         # 2222/230C, 35/12
11136         pkt = NCP(0x230C, "AFP Get Entry ID From Path Name", 'afp')
11137         pkt.Request((12,266), [
11138                 rec( 10, 1, DirHandle ),
11139                 rec( 11, (1,255), Path ),
11140         ], info_str=(Path, "AFP Get Entry ID from Path Name: %s", ", %s"))
11141         pkt.Reply(12, [
11142                 rec( 8, 4, AFPEntryID, BE ),
11143         ])
11144         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600,
11145                              0x9804, 0x9b03, 0x9c03, 0xa100, 0xa201,
11146                              0xfd00, 0xff00])
11147         # 2222/230D, 35/13
11148         pkt = NCP(0x230D, "AFP 2.0 Create Directory", 'afp')
11149         pkt.Request((55,309), [
11150                 rec( 10, 1, VolumeNumber ),
11151                 rec( 11, 4, BaseDirectoryID ),
11152                 rec( 15, 1, Reserved ),
11153                 rec( 16, 4, CreatorID, BE ),
11154                 rec( 20, 4, Reserved4 ),
11155                 rec( 24, 2, FinderAttr ),
11156                 rec( 26, 2, HorizLocation ),
11157                 rec( 28, 2, VertLocation ),
11158                 rec( 30, 2, FileDirWindow ),
11159                 rec( 32, 16, Reserved16 ),
11160                 rec( 48, 6, ProDOSInfo ),
11161                 rec( 54, (1,255), Path ),
11162         ], info_str=(Path, "AFP 2.0 Create Directory: %s", ", %s"))
11163         pkt.Reply(12, [
11164                 rec( 8, 4, NewDirectoryID ),
11165         ])
11166         pkt.CompletionCodes([0x0000, 0x8301, 0x8400, 0x8800, 0x9300,
11167                              0x9600, 0x9804, 0x9900, 0x9c03, 0x9e00,
11168                              0xa100, 0xa201, 0xfd00, 0xff00])
11169         # 2222/230E, 35/14
11170         pkt = NCP(0x230E, "AFP 2.0 Create File", 'afp')
11171         pkt.Request((55,309), [
11172                 rec( 10, 1, VolumeNumber ),
11173                 rec( 11, 4, BaseDirectoryID ),
11174                 rec( 15, 1, DeleteExistingFileFlag ),
11175                 rec( 16, 4, CreatorID, BE ),
11176                 rec( 20, 4, Reserved4 ),
11177                 rec( 24, 2, FinderAttr ),
11178                 rec( 26, 2, HorizLocation ),
11179                 rec( 28, 2, VertLocation ),
11180                 rec( 30, 2, FileDirWindow ),
11181                 rec( 32, 16, Reserved16 ),
11182                 rec( 48, 6, ProDOSInfo ),
11183                 rec( 54, (1,255), Path ),
11184         ], info_str=(Path, "AFP 2.0 Create File: %s", ", %s"))
11185         pkt.Reply(12, [
11186                 rec( 8, 4, NewDirectoryID ),
11187         ])
11188         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8301, 0x8400,
11189                              0x8701, 0x8800, 0x8a00, 0x8d00, 0x8e00,
11190                              0x8f00, 0x9001, 0x9300, 0x9600, 0x9804,
11191                              0x9900, 0x9b03, 0x9c03, 0x9e00, 0xa100,
11192                              0xa201, 0xfd00, 0xff00])
11193         # 2222/230F, 35/15
11194         pkt = NCP(0x230F, "AFP 2.0 Get File Or Directory Information", 'afp')
11195         pkt.Request((18,272), [
11196                 rec( 10, 1, VolumeNumber ),
11197                 rec( 11, 4, BaseDirectoryID ),
11198                 rec( 15, 2, RequestBitMap, BE ),
11199                 rec( 17, (1,255), Path ),
11200         ], info_str=(Path, "AFP 2.0 Get Information: %s", ", %s"))
11201         pkt.Reply(128, [
11202                 rec( 8, 4, AFPEntryID, BE ),
11203                 rec( 12, 4, ParentID, BE ),
11204                 rec( 16, 2, AttributesDef16 ),
11205                 rec( 18, 4, DataForkLen, BE ),
11206                 rec( 22, 4, ResourceForkLen, BE ),
11207                 rec( 26, 2, TotalOffspring, BE ),
11208                 rec( 28, 2, CreationDate, BE ),
11209                 rec( 30, 2, LastAccessedDate, BE ),
11210                 rec( 32, 2, ModifiedDate, BE ),
11211                 rec( 34, 2, ModifiedTime, BE ),
11212                 rec( 36, 2, ArchivedDate, BE ),
11213                 rec( 38, 2, ArchivedTime, BE ),
11214                 rec( 40, 4, CreatorID, BE ),
11215                 rec( 44, 4, Reserved4 ),
11216                 rec( 48, 2, FinderAttr ),
11217                 rec( 50, 2, HorizLocation ),
11218                 rec( 52, 2, VertLocation ),
11219                 rec( 54, 2, FileDirWindow ),
11220                 rec( 56, 16, Reserved16 ),
11221                 rec( 72, 32, LongName ),
11222                 rec( 104, 4, CreatorID, BE ),
11223                 rec( 108, 12, ShortName ),
11224                 rec( 120, 1, AccessPrivileges ),
11225                 rec( 121, 1, Reserved ),
11226                 rec( 122, 6, ProDOSInfo ),
11227         ])
11228         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804, 0x9c03,
11229                              0xa100, 0xa201, 0xfd00, 0xff19])
11230         # 2222/2310, 35/16
11231         pkt = NCP(0x2310, "AFP 2.0 Set File Information", 'afp')
11232         pkt.Request((70, 324), [
11233                 rec( 10, 1, VolumeNumber ),
11234                 rec( 11, 4, MacBaseDirectoryID ),
11235                 rec( 15, 2, RequestBitMap, BE ),
11236                 rec( 17, 2, AttributesDef16 ),
11237                 rec( 19, 2, CreationDate, BE ),
11238                 rec( 21, 2, LastAccessedDate, BE ),
11239                 rec( 23, 2, ModifiedDate, BE ),
11240                 rec( 25, 2, ModifiedTime, BE ),
11241                 rec( 27, 2, ArchivedDate, BE ),
11242                 rec( 29, 2, ArchivedTime, BE ),
11243                 rec( 31, 4, CreatorID, BE ),
11244                 rec( 35, 4, Reserved4 ),
11245                 rec( 39, 2, FinderAttr ),
11246                 rec( 41, 2, HorizLocation ),
11247                 rec( 43, 2, VertLocation ),
11248                 rec( 45, 2, FileDirWindow ),
11249                 rec( 47, 16, Reserved16 ),
11250                 rec( 63, 6, ProDOSInfo ),
11251                 rec( 69, (1,255), Path ),
11252         ], info_str=(Path, "AFP 2.0 Set File Information: %s", ", %s"))
11253         pkt.Reply(8)
11254         pkt.CompletionCodes([0x0000, 0x0104, 0x8301, 0x8800, 0x9300, 0x9400,
11255                              0x9500, 0x9600, 0x9804, 0x9c03, 0xa100, 0xa201,
11256                              0xfd00, 0xff16])
11257         # 2222/2311, 35/17
11258         pkt = NCP(0x2311, "AFP 2.0 Scan File Information", 'afp')
11259         pkt.Request((26, 280), [
11260                 rec( 10, 1, VolumeNumber ),
11261                 rec( 11, 4, MacBaseDirectoryID ),
11262                 rec( 15, 4, MacLastSeenID, BE ),
11263                 rec( 19, 2, DesiredResponseCount, BE ),
11264                 rec( 21, 2, SearchBitMap, BE ),
11265                 rec( 23, 2, RequestBitMap, BE ),
11266                 rec( 25, (1,255), Path ),
11267         ], info_str=(Path, "AFP 2.0 Scan File Information: %s", ", %s"))
11268         pkt.Reply(14, [
11269                 rec( 8, 2, ActualResponseCount, var="x" ),
11270                 rec( 10, 4, AFP20Struct, repeat="x" ),
11271         ])
11272         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804,
11273                              0x9c03, 0xa100, 0xa201, 0xfd00, 0xff16])
11274         # 2222/2312, 35/18
11275         pkt = NCP(0x2312, "AFP Get DOS Name From Entry ID", 'afp')
11276         pkt.Request(15, [
11277                 rec( 10, 1, VolumeNumber ),
11278                 rec( 11, 4, AFPEntryID, BE ),
11279         ])
11280         pkt.Reply((9,263), [
11281                 rec( 8, (1,255), Path ),
11282         ])
11283         pkt.CompletionCodes([0x0000, 0x8900, 0x9600, 0xbf00])
11284         # 2222/2313, 35/19
11285         pkt = NCP(0x2313, "AFP Get Macintosh Info On Deleted File", 'afp')
11286         pkt.Request(15, [
11287                 rec( 10, 1, VolumeNumber ),
11288                 rec( 11, 4, DirectoryNumber, BE ),
11289         ])
11290         pkt.Reply((51,305), [
11291                 rec( 8, 4, CreatorID, BE ),
11292                 rec( 12, 4, Reserved4 ),
11293                 rec( 16, 2, FinderAttr ),
11294                 rec( 18, 2, HorizLocation ),
11295                 rec( 20, 2, VertLocation ),
11296                 rec( 22, 2, FileDirWindow ),
11297                 rec( 24, 16, Reserved16 ),
11298                 rec( 40, 6, ProDOSInfo ),
11299                 rec( 46, 4, ResourceForkSize, BE ),
11300                 rec( 50, (1,255), FileName ),
11301         ])
11302         pkt.CompletionCodes([0x0000, 0x9c03, 0xbf00])
11303         # 2222/2400, 36/00
11304         pkt = NCP(0x2400, "Get NCP Extension Information", 'fileserver')
11305         pkt.Request(14, [
11306                 rec( 10, 4, NCPextensionNumber, LE ),
11307         ])
11308         pkt.Reply((16,270), [
11309                 rec( 8, 4, NCPextensionNumber ),
11310                 rec( 12, 1, NCPextensionMajorVersion ),
11311                 rec( 13, 1, NCPextensionMinorVersion ),
11312                 rec( 14, 1, NCPextensionRevisionNumber ),
11313                 rec( 15, (1, 255), NCPextensionName ),
11314         ])
11315         pkt.CompletionCodes([0x0000, 0xfe00])
11316         # 2222/2401, 36/01
11317         pkt = NCP(0x2401, "Get NCP Extension Maximum Data Size", 'fileserver')
11318         pkt.Request(10)
11319         pkt.Reply(10, [
11320                 rec( 8, 2, NCPdataSize ),
11321         ])
11322         pkt.CompletionCodes([0x0000, 0xfe00])
11323         # 2222/2402, 36/02
11324         pkt = NCP(0x2402, "Get NCP Extension Information by Name", 'fileserver')
11325         pkt.Request((11, 265), [
11326                 rec( 10, (1,255), NCPextensionName ),
11327         ], info_str=(NCPextensionName, "Get NCP Extension Information by Name: %s", ", %s"))
11328         pkt.Reply((16,270), [
11329                 rec( 8, 4, NCPextensionNumber ),
11330                 rec( 12, 1, NCPextensionMajorVersion ),
11331                 rec( 13, 1, NCPextensionMinorVersion ),
11332                 rec( 14, 1, NCPextensionRevisionNumber ),
11333                 rec( 15, (1, 255), NCPextensionName ),
11334         ])
11335         pkt.CompletionCodes([0x0000, 0xfe00, 0xff20])
11336         # 2222/2403, 36/03
11337         pkt = NCP(0x2403, "Get Number of Registered NCP Extensions", 'fileserver')
11338         pkt.Request(10)
11339         pkt.Reply(12, [
11340                 rec( 8, 4, NumberOfNCPExtensions ),
11341         ])
11342         pkt.CompletionCodes([0x0000, 0xfe00])
11343         # 2222/2404, 36/04
11344         pkt = NCP(0x2404, "Get NCP Extension Registered Verbs List", 'fileserver')
11345         pkt.Request(14, [
11346                 rec( 10, 4, StartingNumber ),
11347         ])
11348         pkt.Reply(20, [
11349                 rec( 8, 4, ReturnedListCount, var="x" ),
11350                 rec( 12, 4, nextStartingNumber ),
11351                 rec( 16, 4, NCPExtensionNumbers, repeat="x" ),
11352         ])
11353         pkt.CompletionCodes([0x0000, 0xfe00])
11354         # 2222/2405, 36/05
11355         pkt = NCP(0x2405, "Return NCP Extension Information", 'fileserver')
11356         pkt.Request(14, [
11357                 rec( 10, 4, NCPextensionNumber ),
11358         ])
11359         pkt.Reply((16,270), [
11360                 rec( 8, 4, NCPextensionNumber ),
11361                 rec( 12, 1, NCPextensionMajorVersion ),
11362                 rec( 13, 1, NCPextensionMinorVersion ),
11363                 rec( 14, 1, NCPextensionRevisionNumber ),
11364                 rec( 15, (1, 255), NCPextensionName ),
11365         ])
11366         pkt.CompletionCodes([0x0000, 0xfe00])
11367         # 2222/2406, 36/06
11368         pkt = NCP(0x2406, "Return NCP Extension Maximum Data Size", 'fileserver')
11369         pkt.Request(10)
11370         pkt.Reply(12, [
11371                 rec( 8, 4, NCPdataSize ),
11372         ])
11373         pkt.CompletionCodes([0x0000, 0xfe00])
11374         # 2222/25, 37
11375         pkt = NCP(0x25, "Execute NCP Extension", 'fileserver')
11376         pkt.Request(11, [
11377                 rec( 7, 4, NCPextensionNumber ),
11378                 # The following value is Unicode
11379                 #rec[ 13, (1,255), RequestData ],
11380         ])
11381         pkt.Reply(8)
11382                 # The following value is Unicode
11383                 #[ 8, (1, 255), ReplyBuffer ],
11384         pkt.CompletionCodes([0x0000, 0xd504, 0xee00, 0xfe00])
11385         # 2222/3B, 59
11386         pkt = NCP(0x3B, "Commit File", 'file', has_length=0 )
11387         pkt.Request(14, [
11388                 rec( 7, 1, Reserved ),
11389                 rec( 8, 6, FileHandle ),
11390         ], info_str=(FileHandle, "Commit File - 0x%s", ", %s"))
11391         pkt.Reply(8)
11392         pkt.CompletionCodes([0x0000, 0x8800, 0x9804, 0xff00])
11393         # 2222/3E, 62
11394         pkt = NCP(0x3E, "File Search Initialize", 'file', has_length=0 )
11395         pkt.Request((9, 263), [
11396                 rec( 7, 1, DirHandle ),
11397                 rec( 8, (1,255), Path ),
11398         ], info_str=(Path, "Initialize File Search: %s", ", %s"))
11399         pkt.Reply(14, [
11400                 rec( 8, 1, VolumeNumber ),
11401                 rec( 9, 2, DirectoryID ),
11402                 rec( 11, 2, SequenceNumber, BE ),
11403                 rec( 13, 1, AccessRightsMask ),
11404         ])
11405         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100,
11406                              0xfd00, 0xff16])
11407         # 2222/3F, 63
11408         pkt = NCP(0x3F, "File Search Continue", 'file', has_length=0 )
11409         pkt.Request((14, 268), [
11410                 rec( 7, 1, VolumeNumber ),
11411                 rec( 8, 2, DirectoryID ),
11412                 rec( 10, 2, SequenceNumber, BE ),
11413                 rec( 12, 1, SearchAttributes ),
11414                 rec( 13, (1,255), Path ),
11415         ], info_str=(Path, "File Search Continue: %s", ", %s"))
11416         pkt.Reply( NO_LENGTH_CHECK, [
11417                 #
11418                 # XXX - don't show this if we got back a non-zero
11419                 # completion code?  For example, 255 means "No
11420                 # matching files or directories were found", so
11421                 # presumably it can't show you a matching file or
11422                 # directory instance - it appears to just leave crap
11423                 # there.
11424                 #
11425                 srec( DirectoryInstance, req_cond="ncp.sattr_sub==TRUE"),
11426                 srec( FileInstance, req_cond="ncp.sattr_sub!=TRUE"),
11427         ])
11428         pkt.ReqCondSizeVariable()
11429         pkt.CompletionCodes([0x0000, 0xff16])
11430         # 2222/40, 64
11431         pkt = NCP(0x40, "Search for a File", 'file')
11432         pkt.Request((12, 266), [
11433                 rec( 7, 2, SequenceNumber, BE ),
11434                 rec( 9, 1, DirHandle ),
11435                 rec( 10, 1, SearchAttributes ),
11436                 rec( 11, (1,255), FileName ),
11437         ], info_str=(FileName, "Search for File: %s", ", %s"))
11438         pkt.Reply(40, [
11439                 rec( 8, 2, SequenceNumber, BE ),
11440                 rec( 10, 2, Reserved2 ),
11441                 rec( 12, 14, FileName14 ),
11442                 rec( 26, 1, AttributesDef ),
11443                 rec( 27, 1, FileExecuteType ),
11444                 rec( 28, 4, FileSize ),
11445                 rec( 32, 2, CreationDate, BE ),
11446                 rec( 34, 2, LastAccessedDate, BE ),
11447                 rec( 36, 2, ModifiedDate, BE ),
11448                 rec( 38, 2, ModifiedTime, BE ),
11449         ])
11450         pkt.CompletionCodes([0x0000, 0x8900, 0x9600, 0x9804, 0x9b03,
11451                              0x9c03, 0xa100, 0xfd00, 0xff16])
11452         # 2222/41, 65
11453         pkt = NCP(0x41, "Open File", 'file')
11454         pkt.Request((10, 264), [
11455                 rec( 7, 1, DirHandle ),
11456                 rec( 8, 1, SearchAttributes ),
11457                 rec( 9, (1,255), FileName ),
11458         ], info_str=(FileName, "Open File: %s", ", %s"))
11459         pkt.Reply(44, [
11460                 rec( 8, 6, FileHandle ),
11461                 rec( 14, 2, Reserved2 ),
11462                 rec( 16, 14, FileName14 ),
11463                 rec( 30, 1, AttributesDef ),
11464                 rec( 31, 1, FileExecuteType ),
11465                 rec( 32, 4, FileSize, BE ),
11466                 rec( 36, 2, CreationDate, BE ),
11467                 rec( 38, 2, LastAccessedDate, BE ),
11468                 rec( 40, 2, ModifiedDate, BE ),
11469                 rec( 42, 2, ModifiedTime, BE ),
11470         ])
11471         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8200, 0x9400,
11472                              0x9600, 0x9804, 0x9c03, 0xa100, 0xfd00,
11473                              0xff16])
11474         # 2222/42, 66
11475         pkt = NCP(0x42, "Close File", 'file')
11476         pkt.Request(14, [
11477                 rec( 7, 1, Reserved ),
11478                 rec( 8, 6, FileHandle ),
11479         ], info_str=(FileHandle, "Close File - 0x%s", ", %s"))
11480         pkt.Reply(8)
11481         pkt.CompletionCodes([0x0000, 0x8800, 0xff1a])
11482         # 2222/43, 67
11483         pkt = NCP(0x43, "Create File", 'file')
11484         pkt.Request((10, 264), [
11485                 rec( 7, 1, DirHandle ),
11486                 rec( 8, 1, AttributesDef ),
11487                 rec( 9, (1,255), FileName ),
11488         ], info_str=(FileName, "Create File: %s", ", %s"))
11489         pkt.Reply(44, [
11490                 rec( 8, 6, FileHandle ),
11491                 rec( 14, 2, Reserved2 ),
11492                 rec( 16, 14, FileName14 ),
11493                 rec( 30, 1, AttributesDef ),
11494                 rec( 31, 1, FileExecuteType ),
11495                 rec( 32, 4, FileSize, BE ),
11496                 rec( 36, 2, CreationDate, BE ),
11497                 rec( 38, 2, LastAccessedDate, BE ),
11498                 rec( 40, 2, ModifiedDate, BE ),
11499                 rec( 42, 2, ModifiedTime, BE ),
11500         ])
11501         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11502                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11503                              0x9804, 0x9900, 0x9b03, 0x9c03, 0xfd00,
11504                              0xff00])
11505         # 2222/44, 68
11506         pkt = NCP(0x44, "Erase File", 'file')
11507         pkt.Request((10, 264), [
11508                 rec( 7, 1, DirHandle ),
11509                 rec( 8, 1, SearchAttributes ),
11510                 rec( 9, (1,255), FileName ),
11511         ], info_str=(FileName, "Erase File: %s", ", %s"))
11512         pkt.Reply(8)
11513         pkt.CompletionCodes([0x0000, 0x8a00, 0x8d00, 0x8e00, 0x8f00,
11514                              0x9001, 0x9600, 0x9804, 0x9b03, 0x9c03,
11515                              0xa100, 0xfd00, 0xff00])
11516         # 2222/45, 69
11517         pkt = NCP(0x45, "Rename File", 'file')
11518         pkt.Request((12, 520), [
11519                 rec( 7, 1, DirHandle ),
11520                 rec( 8, 1, SearchAttributes ),
11521                 rec( 9, (1,255), FileName ),
11522                 rec( -1, 1, TargetDirHandle ),
11523                 rec( -1, (1, 255), NewFileNameLen ),
11524         ], info_str=(FileName, "Rename File: %s", ", %s"))
11525         pkt.Reply(8)
11526         pkt.CompletionCodes([0x0000, 0x8701, 0x8b00, 0x8d00, 0x8e00,
11527                              0x8f00, 0x9001, 0x9101, 0x9201, 0x9600,
11528                              0x9804, 0x9a00, 0x9b03, 0x9c03, 0xa100,
11529                              0xfd00, 0xff16])
11530         # 2222/46, 70
11531         pkt = NCP(0x46, "Set File Attributes", 'file')
11532         pkt.Request((11, 265), [
11533                 rec( 7, 1, AttributesDef ),
11534                 rec( 8, 1, DirHandle ),
11535                 rec( 9, 1, SearchAttributes ),
11536                 rec( 10, (1,255), FileName ),
11537         ], info_str=(FileName, "Set File Attributes: %s", ", %s"))
11538         pkt.Reply(8)
11539         pkt.CompletionCodes([0x0000, 0x8c00, 0x8d00, 0x8e00, 0x9600,
11540                              0x9804, 0x9b03, 0x9c03, 0xa100, 0xfd00,
11541                              0xff16])
11542         # 2222/47, 71
11543         pkt = NCP(0x47, "Get Current Size of File", 'file')
11544         pkt.Request(14, [
11545         rec(7, 1, Reserved ),
11546                 rec( 8, 6, FileHandle ),
11547         ], info_str=(FileHandle, "Get Current Size of File - 0x%s", ", %s"))
11548         pkt.Reply(12, [
11549                 rec( 8, 4, FileSize, BE ),
11550         ])
11551         pkt.CompletionCodes([0x0000, 0x8800])
11552         # 2222/48, 72
11553         pkt = NCP(0x48, "Read From A File", 'file')
11554         pkt.Request(20, [
11555                 rec( 7, 1, Reserved ),
11556                 rec( 8, 6, FileHandle ),
11557                 rec( 14, 4, FileOffset, BE ),
11558                 rec( 18, 2, MaxBytes, BE ),
11559         ], info_str=(FileHandle, "Read From File - 0x%s", ", %s"))
11560         pkt.Reply(10, [
11561                 rec( 8, 2, NumBytes, BE ),
11562         ])
11563         pkt.CompletionCodes([0x0000, 0x8300, 0x8800, 0x9300, 0xff1b])
11564         # 2222/49, 73
11565         pkt = NCP(0x49, "Write to a File", 'file')
11566         pkt.Request(20, [
11567                 rec( 7, 1, Reserved ),
11568                 rec( 8, 6, FileHandle ),
11569                 rec( 14, 4, FileOffset, BE ),
11570                 rec( 18, 2, MaxBytes, BE ),
11571         ], info_str=(FileHandle, "Write to a File - 0x%s", ", %s"))
11572         pkt.Reply(8)
11573         pkt.CompletionCodes([0x0000, 0x0104, 0x8300, 0x8800, 0x9400, 0x9500, 0xa201, 0xff1b])
11574         # 2222/4A, 74
11575         pkt = NCP(0x4A, "Copy from One File to Another", 'file')
11576         pkt.Request(30, [
11577                 rec( 7, 1, Reserved ),
11578                 rec( 8, 6, FileHandle ),
11579                 rec( 14, 6, TargetFileHandle ),
11580                 rec( 20, 4, FileOffset, BE ),
11581                 rec( 24, 4, TargetFileOffset, BE ),
11582                 rec( 28, 2, BytesToCopy, BE ),
11583         ])
11584         pkt.Reply(12, [
11585                 rec( 8, 4, BytesActuallyTransferred, BE ),
11586         ])
11587         pkt.CompletionCodes([0x0000, 0x0104, 0x8300, 0x8800, 0x9300, 0x9400,
11588                              0x9500, 0x9600, 0xa201, 0xff1b])
11589         # 2222/4B, 75
11590         pkt = NCP(0x4B, "Set File Time Date Stamp", 'file')
11591         pkt.Request(18, [
11592                 rec( 7, 1, Reserved ),
11593                 rec( 8, 6, FileHandle ),
11594                 rec( 14, 2, FileTime, BE ),
11595                 rec( 16, 2, FileDate, BE ),
11596         ], info_str=(FileHandle, "Set Time and Date Stamp for File - 0x%s", ", %s"))
11597         pkt.Reply(8)
11598         pkt.CompletionCodes([0x0000, 0x8800, 0x9400, 0x9600, 0xfb08])
11599         # 2222/4C, 76
11600         pkt = NCP(0x4C, "Open File", 'file')
11601         pkt.Request((11, 265), [
11602                 rec( 7, 1, DirHandle ),
11603                 rec( 8, 1, SearchAttributes ),
11604                 rec( 9, 1, AccessRightsMask ),
11605                 rec( 10, (1,255), FileName ),
11606         ], info_str=(FileName, "Open File: %s", ", %s"))
11607         pkt.Reply(44, [
11608                 rec( 8, 6, FileHandle ),
11609                 rec( 14, 2, Reserved2 ),
11610                 rec( 16, 14, FileName14 ),
11611                 rec( 30, 1, AttributesDef ),
11612                 rec( 31, 1, FileExecuteType ),
11613                 rec( 32, 4, FileSize, BE ),
11614                 rec( 36, 2, CreationDate, BE ),
11615                 rec( 38, 2, LastAccessedDate, BE ),
11616                 rec( 40, 2, ModifiedDate, BE ),
11617                 rec( 42, 2, ModifiedTime, BE ),
11618         ])
11619         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8200, 0x9400,
11620                              0x9600, 0x9804, 0x9c03, 0xa100, 0xfd00,
11621                              0xff16])
11622         # 2222/4D, 77
11623         pkt = NCP(0x4D, "Create File", 'file')
11624         pkt.Request((10, 264), [
11625                 rec( 7, 1, DirHandle ),
11626                 rec( 8, 1, AttributesDef ),
11627                 rec( 9, (1,255), FileName ),
11628         ], info_str=(FileName, "Create File: %s", ", %s"))
11629         pkt.Reply(44, [
11630                 rec( 8, 6, FileHandle ),
11631                 rec( 14, 2, Reserved2 ),
11632                 rec( 16, 14, FileName14 ),
11633                 rec( 30, 1, AttributesDef ),
11634                 rec( 31, 1, FileExecuteType ),
11635                 rec( 32, 4, FileSize, BE ),
11636                 rec( 36, 2, CreationDate, BE ),
11637                 rec( 38, 2, LastAccessedDate, BE ),
11638                 rec( 40, 2, ModifiedDate, BE ),
11639                 rec( 42, 2, ModifiedTime, BE ),
11640         ])
11641         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11642                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11643                              0x9804, 0x9900, 0x9b03, 0x9c03, 0xfd00,
11644                              0xff00])
11645         # 2222/4F, 79
11646         pkt = NCP(0x4F, "Set File Extended Attributes", 'file')
11647         pkt.Request((11, 265), [
11648                 rec( 7, 1, AttributesDef ),
11649                 rec( 8, 1, DirHandle ),
11650                 rec( 9, 1, AccessRightsMask ),
11651                 rec( 10, (1,255), FileName ),
11652         ], info_str=(FileName, "Set File Extended Attributes: %s", ", %s"))
11653         pkt.Reply(8)
11654         pkt.CompletionCodes([0x0000, 0x8c00, 0x8d00, 0x8e00, 0x9600,
11655                              0x9804, 0x9b03, 0x9c03, 0xa100, 0xfd00,
11656                              0xff16])
11657         # 2222/54, 84
11658         pkt = NCP(0x54, "Open/Create File", 'file')
11659         pkt.Request((12, 266), [
11660                 rec( 7, 1, DirHandle ),
11661                 rec( 8, 1, AttributesDef ),
11662                 rec( 9, 1, AccessRightsMask ),
11663                 rec( 10, 1, ActionFlag ),
11664                 rec( 11, (1,255), FileName ),
11665         ], info_str=(FileName, "Open/Create File: %s", ", %s"))
11666         pkt.Reply(44, [
11667                 rec( 8, 6, FileHandle ),
11668                 rec( 14, 2, Reserved2 ),
11669                 rec( 16, 14, FileName14 ),
11670                 rec( 30, 1, AttributesDef ),
11671                 rec( 31, 1, FileExecuteType ),
11672                 rec( 32, 4, FileSize, BE ),
11673                 rec( 36, 2, CreationDate, BE ),
11674                 rec( 38, 2, LastAccessedDate, BE ),
11675                 rec( 40, 2, ModifiedDate, BE ),
11676                 rec( 42, 2, ModifiedTime, BE ),
11677         ])
11678         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11679                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11680                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
11681         # 2222/55, 85
11682         pkt = NCP(0x55, "Get Sparse File Data Block Bit Map", 'file')
11683         pkt.Request(17, [
11684                 rec( 7, 6, FileHandle ),
11685                 rec( 13, 4, FileOffset ),
11686         ], info_str=(FileHandle, "Get Sparse File Data Block Bitmap for File - 0x%s", ", %s"))
11687         pkt.Reply(528, [
11688                 rec( 8, 4, AllocationBlockSize ),
11689                 rec( 12, 4, Reserved4 ),
11690                 rec( 16, 512, BitMap ),
11691         ])
11692         pkt.CompletionCodes([0x0000, 0x8800])
11693         # 2222/5601, 86/01
11694         pkt = NCP(0x5601, "Close Extended Attribute Handle", 'file', has_length=0 )
11695         pkt.Request(14, [
11696                 rec( 8, 2, Reserved2 ),
11697                 rec( 10, 4, EAHandle ),
11698         ])
11699         pkt.Reply(8)
11700         pkt.CompletionCodes([0x0000, 0xcf00, 0xd301])
11701         # 2222/5602, 86/02
11702         pkt = NCP(0x5602, "Write Extended Attribute", 'file', has_length=0 )
11703         pkt.Request((35,97), [
11704                 rec( 8, 2, EAFlags ),
11705                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
11706                 rec( 14, 4, ReservedOrDirectoryNumber ),
11707                 rec( 18, 4, TtlWriteDataSize ),
11708                 rec( 22, 4, FileOffset ),
11709                 rec( 26, 4, EAAccessFlag ),
11710                 rec( 30, 2, EAValueLength, var='x' ),
11711                 rec( 32, (2,64), EAKey ),
11712                 rec( -1, 1, EAValueRep, repeat='x' ),
11713         ], info_str=(EAKey, "Write Extended Attribute: %s", ", %s"))
11714         pkt.Reply(20, [
11715                 rec( 8, 4, EAErrorCodes ),
11716                 rec( 12, 4, EABytesWritten ),
11717                 rec( 16, 4, NewEAHandle ),
11718         ])
11719         pkt.CompletionCodes([0x0000, 0xc800, 0xc900, 0xcb00, 0xce00, 0xcf00, 0xd101,
11720                              0xd203, 0xd301, 0xd402])
11721         # 2222/5603, 86/03
11722         pkt = NCP(0x5603, "Read Extended Attribute", 'file', has_length=0 )
11723         pkt.Request((28,538), [
11724                 rec( 8, 2, EAFlags ),
11725                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
11726                 rec( 14, 4, ReservedOrDirectoryNumber ),
11727                 rec( 18, 4, FileOffset ),
11728                 rec( 22, 4, InspectSize ),
11729                 rec( 26, (2,512), EAKey ),
11730         ], info_str=(EAKey, "Read Extended Attribute: %s", ", %s"))
11731         pkt.Reply((26,536), [
11732                 rec( 8, 4, EAErrorCodes ),
11733                 rec( 12, 4, TtlValuesLength ),
11734                 rec( 16, 4, NewEAHandle ),
11735                 rec( 20, 4, EAAccessFlag ),
11736                 rec( 24, (2,512), EAValue ),
11737         ])
11738         pkt.CompletionCodes([0x0000, 0xc900, 0xce00, 0xcf00, 0xd101,
11739                              0xd301])
11740         # 2222/5604, 86/04
11741         pkt = NCP(0x5604, "Enumerate Extended Attribute", 'file', has_length=0 )
11742         pkt.Request((26,536), [
11743                 rec( 8, 2, EAFlags ),
11744                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
11745                 rec( 14, 4, ReservedOrDirectoryNumber ),
11746                 rec( 18, 4, InspectSize ),
11747                 rec( 22, 2, SequenceNumber ),
11748                 rec( 24, (2,512), EAKey ),
11749         ], info_str=(EAKey, "Enumerate Extended Attribute: %s", ", %s"))
11750         pkt.Reply(28, [
11751                 rec( 8, 4, EAErrorCodes ),
11752                 rec( 12, 4, TtlEAs ),
11753                 rec( 16, 4, TtlEAsDataSize ),
11754                 rec( 20, 4, TtlEAsKeySize ),
11755                 rec( 24, 4, NewEAHandle ),
11756         ])
11757         pkt.CompletionCodes([0x0000, 0x8800, 0xc900, 0xce00, 0xcf00, 0xd101,
11758                              0xd301])
11759         # 2222/5605, 86/05
11760         pkt = NCP(0x5605, "Duplicate Extended Attributes", 'file', has_length=0 )
11761         pkt.Request(28, [
11762                 rec( 8, 2, EAFlags ),
11763                 rec( 10, 2, DstEAFlags ),
11764                 rec( 12, 4, EAHandleOrNetWareHandleOrVolume ),
11765                 rec( 16, 4, ReservedOrDirectoryNumber ),
11766                 rec( 20, 4, EAHandleOrNetWareHandleOrVolume ),
11767                 rec( 24, 4, ReservedOrDirectoryNumber ),
11768         ])
11769         pkt.Reply(20, [
11770                 rec( 8, 4, EADuplicateCount ),
11771                 rec( 12, 4, EADataSizeDuplicated ),
11772                 rec( 16, 4, EAKeySizeDuplicated ),
11773         ])
11774         pkt.CompletionCodes([0x0000, 0xd101])
11775         # 2222/5701, 87/01
11776         pkt = NCP(0x5701, "Open/Create File or Subdirectory", 'file', has_length=0)
11777         pkt.Request((30, 284), [
11778                 rec( 8, 1, NameSpace  ),
11779                 rec( 9, 1, OpenCreateMode ),
11780                 rec( 10, 2, SearchAttributesLow ),
11781                 rec( 12, 2, ReturnInfoMask ),
11782                 rec( 14, 2, ExtendedInfo ),
11783                 rec( 16, 4, AttributesDef32 ),
11784                 rec( 20, 2, DesiredAccessRights ),
11785                 rec( 22, 1, VolumeNumber ),
11786                 rec( 23, 4, DirectoryBase ),
11787                 rec( 27, 1, HandleFlag ),
11788                 rec( 28, 1, PathCount, var="x" ),
11789                 rec( 29, (1,255), Path, repeat="x" ),
11790         ], info_str=(Path, "Open or Create: %s", "/%s"))
11791         pkt.Reply( NO_LENGTH_CHECK, [
11792                 rec( 8, 4, FileHandle ),
11793                 rec( 12, 1, OpenCreateAction ),
11794                 rec( 13, 1, Reserved ),
11795                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
11796                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
11797                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
11798                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
11799                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
11800                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
11801                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
11802                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
11803                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
11804                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
11805                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
11806                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
11807                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
11808                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
11809                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
11810                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
11811                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
11812                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
11813                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
11814                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
11815                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
11816                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
11817                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
11818                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
11819                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
11820                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
11821                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
11822                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
11823                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
11824                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
11825                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
11826                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
11827                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
11828                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
11829                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
11830                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
11831                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
11832                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
11833                 srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ),
11834                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
11835                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
11836                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
11837                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
11838                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
11839                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
11840                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
11841                 srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
11842         ])
11843         pkt.ReqCondSizeVariable()
11844         pkt.CompletionCodes([0x0000, 0x7f00, 0x8001, 0x8101, 0x8401, 0x8501,
11845                              0x8701, 0x8900, 0x8d00, 0x8f00, 0x9001, 0x9400, 0x9600,
11846                              0x9804, 0x9b03, 0x9c03, 0xa500, 0xa802, 0xbf00, 0xfd00, 0xff16])
11847         # 2222/5702, 87/02
11848         pkt = NCP(0x5702, "Initialize Search", 'file', has_length=0)
11849         pkt.Request( (18,272), [
11850                 rec( 8, 1, NameSpace  ),
11851                 rec( 9, 1, Reserved ),
11852                 rec( 10, 1, VolumeNumber ),
11853                 rec( 11, 4, DirectoryBase ),
11854                 rec( 15, 1, HandleFlag ),
11855                 rec( 16, 1, PathCount, var="x" ),
11856                 rec( 17, (1,255), Path, repeat="x" ),
11857         ], info_str=(Path, "Set Search Pointer to: %s", "/%s"))
11858         pkt.Reply(17, [
11859                 rec( 8, 1, VolumeNumber ),
11860                 rec( 9, 4, DirectoryNumber ),
11861                 rec( 13, 4, DirectoryEntryNumber ),
11862         ])
11863         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11864                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11865                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11866         # 2222/5703, 87/03
11867         pkt = NCP(0x5703, "Search for File or Subdirectory", 'file', has_length=0)
11868         pkt.Request((26, 280), [
11869                 rec( 8, 1, NameSpace  ),
11870                 rec( 9, 1, DataStream ),
11871                 rec( 10, 2, SearchAttributesLow ),
11872                 rec( 12, 2, ReturnInfoMask ),
11873                 rec( 14, 2, ExtendedInfo ),
11874                 rec( 16, 9, SearchSequence ),
11875                 rec( 25, (1,255), SearchPattern ),
11876         ], info_str=(SearchPattern, "Search for: %s", "/%s"))
11877         pkt.Reply( NO_LENGTH_CHECK, [
11878                 rec( 8, 9, SearchSequence ),
11879                 rec( 17, 1, Reserved ),
11880                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
11881                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
11882                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
11883                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
11884                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
11885                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
11886                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
11887                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
11888                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
11889                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
11890                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
11891                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
11892                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
11893                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
11894                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
11895                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
11896                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
11897                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
11898                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
11899                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
11900                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
11901                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
11902                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
11903                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
11904                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
11905                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
11906                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
11907                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
11908                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
11909                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
11910                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
11911                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
11912                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
11913                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
11914                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
11915                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
11916                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
11917                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
11918                 srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ),
11919                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
11920                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
11921                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
11922                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
11923                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
11924                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
11925                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
11926                 srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
11927         ])
11928         pkt.ReqCondSizeVariable()
11929         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11930                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11931                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11932         # 2222/5704, 87/04
11933         pkt = NCP(0x5704, "Rename Or Move a File or Subdirectory", 'file', has_length=0)
11934         pkt.Request((28, 536), [
11935                 rec( 8, 1, NameSpace  ),
11936                 rec( 9, 1, RenameFlag ),
11937                 rec( 10, 2, SearchAttributesLow ),
11938                 rec( 12, 1, VolumeNumber ),
11939                 rec( 13, 4, DirectoryBase ),
11940                 rec( 17, 1, HandleFlag ),
11941                 rec( 18, 1, PathCount, var="x" ),
11942                 rec( 19, 1, VolumeNumber ),
11943                 rec( 20, 4, DirectoryBase ),
11944                 rec( 24, 1, HandleFlag ),
11945                 rec( 25, 1, PathCount, var="y" ),
11946                 rec( 26, (1, 255), Path, repeat="x" ),
11947                 rec( -1, (1,255), Path, repeat="y" ),
11948         ], info_str=(Path, "Rename or Move: %s", "/%s"))
11949         pkt.Reply(8)
11950         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11951                              0x8701, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9200, 0x9600,
11952                              0x9804, 0x9a00, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11953         # 2222/5705, 87/05
11954         pkt = NCP(0x5705, "Scan File or Subdirectory for Trustees", 'file', has_length=0)
11955         pkt.Request((24, 278), [
11956                 rec( 8, 1, NameSpace  ),
11957                 rec( 9, 1, Reserved ),
11958                 rec( 10, 2, SearchAttributesLow ),
11959                 rec( 12, 4, SequenceNumber ),
11960                 rec( 16, 1, VolumeNumber ),
11961                 rec( 17, 4, DirectoryBase ),
11962                 rec( 21, 1, HandleFlag ),
11963                 rec( 22, 1, PathCount, var="x" ),
11964                 rec( 23, (1, 255), Path, repeat="x" ),
11965         ], info_str=(Path, "Scan Trustees for: %s", "/%s"))
11966         pkt.Reply(20, [
11967                 rec( 8, 4, SequenceNumber ),
11968                 rec( 12, 2, ObjectIDCount, var="x" ),
11969                 rec( 14, 6, TrusteeStruct, repeat="x" ),
11970         ])
11971         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11972                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11973                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11974         # 2222/5706, 87/06
11975         pkt = NCP(0x5706, "Obtain File or SubDirectory Information", 'file', has_length=0)
11976         pkt.Request((24,278), [
11977                 rec( 10, 1, SrcNameSpace ),
11978                 rec( 11, 1, DestNameSpace ),
11979                 rec( 12, 2, SearchAttributesLow ),
11980                 rec( 14, 2, ReturnInfoMask, LE ),
11981                 rec( 16, 2, ExtendedInfo ),
11982                 rec( 18, 1, VolumeNumber ),
11983                 rec( 19, 4, DirectoryBase ),
11984                 rec( 23, 1, HandleFlag ),
11985                 rec( 24, 1, PathCount, var="x" ),
11986                 rec( 25, (1,255), Path, repeat="x",),
11987         ], info_str=(Path, "Obtain Info for: %s", "/%s"))
11988         pkt.Reply(NO_LENGTH_CHECK, [
11989             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
11990             srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
11991             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
11992             srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
11993             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
11994             srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
11995             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
11996             srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
11997             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
11998             srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
11999             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12000             srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12001             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12002             srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12003             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12004             srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12005             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12006             srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12007             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12008             srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12009             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12010             srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12011             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12012             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12013             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12014             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12015             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12016             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12017             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12018             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12019             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12020             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12021             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12022             srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
12023             srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
12024             srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
12025             srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
12026             srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
12027             srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ),
12028             srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
12029             srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
12030             srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
12031             srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
12032             srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
12033             srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
12034             srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
12035             srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
12036         ])
12037         pkt.ReqCondSizeVariable()
12038         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12039                              0x8700, 0x8900, 0x8d00, 0x8f00, 0x9001, 0x9600,
12040                              0x9804, 0x9b03, 0x9c03, 0xa802, 0xbf00, 0xfd00, 0xff16])
12041         # 2222/5707, 87/07
12042         pkt = NCP(0x5707, "Modify File or Subdirectory DOS Information", 'file', has_length=0)
12043         pkt.Request((62,316), [
12044                 rec( 8, 1, NameSpace ),
12045                 rec( 9, 1, Reserved ),
12046                 rec( 10, 2, SearchAttributesLow ),
12047                 rec( 12, 2, ModifyDOSInfoMask ),
12048                 rec( 14, 2, Reserved2 ),
12049                 rec( 16, 2, AttributesDef16 ),
12050                 rec( 18, 1, FileMode ),
12051                 rec( 19, 1, FileExtendedAttributes ),
12052                 rec( 20, 2, CreationDate ),
12053                 rec( 22, 2, CreationTime ),
12054                 rec( 24, 4, CreatorID, BE ),
12055                 rec( 28, 2, ModifiedDate ),
12056                 rec( 30, 2, ModifiedTime ),
12057                 rec( 32, 4, ModifierID, BE ),
12058                 rec( 36, 2, ArchivedDate ),
12059                 rec( 38, 2, ArchivedTime ),
12060                 rec( 40, 4, ArchiverID, BE ),
12061                 rec( 44, 2, LastAccessedDate ),
12062                 rec( 46, 2, InheritedRightsMask ),
12063                 rec( 48, 2, InheritanceRevokeMask ),
12064                 rec( 50, 4, MaxSpace ),
12065                 rec( 54, 1, VolumeNumber ),
12066                 rec( 55, 4, DirectoryBase ),
12067                 rec( 59, 1, HandleFlag ),
12068                 rec( 60, 1, PathCount, var="x" ),
12069                 rec( 61, (1,255), Path, repeat="x" ),
12070         ], info_str=(Path, "Modify DOS Information for: %s", "/%s"))
12071         pkt.Reply(8)
12072         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12073                              0x8701, 0x8c01, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9600,
12074                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12075         # 2222/5708, 87/08
12076         pkt = NCP(0x5708, "Delete a File or Subdirectory", 'file', has_length=0)
12077         pkt.Request((20,274), [
12078                 rec( 8, 1, NameSpace ),
12079                 rec( 9, 1, Reserved ),
12080                 rec( 10, 2, SearchAttributesLow ),
12081                 rec( 12, 1, VolumeNumber ),
12082                 rec( 13, 4, DirectoryBase ),
12083                 rec( 17, 1, HandleFlag ),
12084                 rec( 18, 1, PathCount, var="x" ),
12085                 rec( 19, (1,255), Path, repeat="x" ),
12086         ], info_str=(Path, "Delete a File or Subdirectory: %s", "/%s"))
12087         pkt.Reply(8)
12088         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12089                              0x8701, 0x8900, 0x8a00, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9600,
12090                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12091         # 2222/5709, 87/09
12092         pkt = NCP(0x5709, "Set Short Directory Handle", 'file', has_length=0)
12093         pkt.Request((20,274), [
12094                 rec( 8, 1, NameSpace ),
12095                 rec( 9, 1, DataStream ),
12096                 rec( 10, 1, DestDirHandle ),
12097                 rec( 11, 1, Reserved ),
12098                 rec( 12, 1, VolumeNumber ),
12099                 rec( 13, 4, DirectoryBase ),
12100                 rec( 17, 1, HandleFlag ),
12101                 rec( 18, 1, PathCount, var="x" ),
12102                 rec( 19, (1,255), Path, repeat="x" ),
12103         ], info_str=(Path, "Set Short Directory Handle to: %s", "/%s"))
12104         pkt.Reply(8)
12105         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12106                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12107                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12108         # 2222/570A, 87/10
12109         pkt = NCP(0x570A, "Add Trustee Set to File or Subdirectory", 'file', has_length=0)
12110         pkt.Request((31,285), [
12111                 rec( 8, 1, NameSpace ),
12112                 rec( 9, 1, Reserved ),
12113                 rec( 10, 2, SearchAttributesLow ),
12114                 rec( 12, 2, AccessRightsMaskWord ),
12115                 rec( 14, 2, ObjectIDCount, var="y" ),
12116                 rec( 16, 1, VolumeNumber ),
12117                 rec( 17, 4, DirectoryBase ),
12118                 rec( 21, 1, HandleFlag ),
12119                 rec( 22, 1, PathCount, var="x" ),
12120                 rec( 23, (1,255), Path, repeat="x" ),
12121                 rec( -1, 7, TrusteeStruct, repeat="y" ),
12122         ], info_str=(Path, "Add Trustee Set to: %s", "/%s"))
12123         pkt.Reply(8)
12124         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12125                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12126                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfc01, 0xfd00, 0xff16])
12127         # 2222/570B, 87/11
12128         pkt = NCP(0x570B, "Delete Trustee Set from File or SubDirectory", 'file', has_length=0)
12129         pkt.Request((27,281), [
12130                 rec( 8, 1, NameSpace ),
12131                 rec( 9, 1, Reserved ),
12132                 rec( 10, 2, ObjectIDCount, var="y" ),
12133                 rec( 12, 1, VolumeNumber ),
12134                 rec( 13, 4, DirectoryBase ),
12135                 rec( 17, 1, HandleFlag ),
12136                 rec( 18, 1, PathCount, var="x" ),
12137                 rec( 19, (1,255), Path, repeat="x" ),
12138                 rec( -1, 7, TrusteeStruct, repeat="y" ),
12139         ], info_str=(Path, "Delete Trustee Set from: %s", "/%s"))
12140         pkt.Reply(8)
12141         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12142                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12143                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12144         # 2222/570C, 87/12
12145         pkt = NCP(0x570C, "Allocate Short Directory Handle", 'file', has_length=0)
12146         pkt.Request((20,274), [
12147                 rec( 8, 1, NameSpace ),
12148                 rec( 9, 1, Reserved ),
12149                 rec( 10, 2, AllocateMode ),
12150                 rec( 12, 1, VolumeNumber ),
12151                 rec( 13, 4, DirectoryBase ),
12152                 rec( 17, 1, HandleFlag ),
12153                 rec( 18, 1, PathCount, var="x" ),
12154                 rec( 19, (1,255), Path, repeat="x" ),
12155         ], info_str=(Path, "Allocate Short Directory Handle to: %s", "/%s"))
12156         pkt.Reply(14, [
12157                 rec( 8, 1, DirHandle ),
12158                 rec( 9, 1, VolumeNumber ),
12159                 rec( 10, 4, Reserved4 ),
12160         ])
12161         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12162                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12163                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12164         # 2222/5710, 87/16
12165         pkt = NCP(0x5710, "Scan Salvageable Files", 'file', has_length=0)
12166         pkt.Request((26,280), [
12167                 rec( 8, 1, NameSpace ),
12168                 rec( 9, 1, DataStream ),
12169                 rec( 10, 2, ReturnInfoMask ),
12170                 rec( 12, 2, ExtendedInfo ),
12171                 rec( 14, 4, SequenceNumber ),
12172                 rec( 18, 1, VolumeNumber ),
12173                 rec( 19, 4, DirectoryBase ),
12174                 rec( 23, 1, HandleFlag ),
12175                 rec( 24, 1, PathCount, var="x" ),
12176                 rec( 25, (1,255), Path, repeat="x" ),
12177         ], info_str=(Path, "Scan for Deleted Files in: %s", "/%s"))
12178         pkt.Reply(NO_LENGTH_CHECK, [
12179                 rec( 8, 4, SequenceNumber ),
12180                 rec( 12, 2, DeletedTime ),
12181                 rec( 14, 2, DeletedDate ),
12182                 rec( 16, 4, DeletedID, BE ),
12183                 rec( 20, 4, VolumeID ),
12184                 rec( 24, 4, DirectoryBase ),
12185                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12186                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12187                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12188                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12189                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12190                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12191                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12192                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12193                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12194                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12195                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12196                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12197                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12198                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12199                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12200                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12201                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12202                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12203                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12204                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12205                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12206                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12207                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12208                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12209                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12210                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12211                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12212                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12213                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12214                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12215                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12216                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12217                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12218                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12219                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12220         ])
12221         pkt.ReqCondSizeVariable()
12222         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12223                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12224                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12225         # 2222/5711, 87/17
12226         pkt = NCP(0x5711, "Recover Salvageable File", 'file', has_length=0)
12227         pkt.Request((23,277), [
12228                 rec( 8, 1, NameSpace ),
12229                 rec( 9, 1, Reserved ),
12230                 rec( 10, 4, SequenceNumber ),
12231                 rec( 14, 4, VolumeID ),
12232                 rec( 18, 4, DirectoryBase ),
12233                 rec( 22, (1,255), FileName ),
12234         ], info_str=(FileName, "Recover Deleted File: %s", ", %s"))
12235         pkt.Reply(8)
12236         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12237                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12238                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12239         # 2222/5712, 87/18
12240         pkt = NCP(0x5712, "Purge Salvageable Files", 'file', has_length=0)
12241         pkt.Request(22, [
12242                 rec( 8, 1, NameSpace ),
12243                 rec( 9, 1, Reserved ),
12244                 rec( 10, 4, SequenceNumber ),
12245                 rec( 14, 4, VolumeID ),
12246                 rec( 18, 4, DirectoryBase ),
12247         ])
12248         pkt.Reply(8)
12249         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12250                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12251                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12252         # 2222/5713, 87/19
12253         pkt = NCP(0x5713, "Get Name Space Information", 'file', has_length=0)
12254         pkt.Request(18, [
12255                 rec( 8, 1, SrcNameSpace ),
12256                 rec( 9, 1, DestNameSpace ),
12257                 rec( 10, 1, Reserved ),
12258                 rec( 11, 1, VolumeNumber ),
12259                 rec( 12, 4, DirectoryBase ),
12260                 rec( 16, 2, NamesSpaceInfoMask ),
12261         ])
12262         pkt.Reply(NO_LENGTH_CHECK, [
12263             srec( FileNameStruct, req_cond="ncp.ns_info_mask_modify == TRUE" ),
12264             srec( FileAttributesStruct, req_cond="ncp.ns_info_mask_fatt == TRUE" ),
12265             srec( CreationDateStruct, req_cond="ncp.ns_info_mask_cdate == TRUE" ),
12266             srec( CreationTimeStruct, req_cond="ncp.ns_info_mask_ctime == TRUE" ),
12267             srec( OwnerIDStruct, req_cond="ncp.ns_info_mask_owner == TRUE" ),
12268             srec( ArchiveDateStruct, req_cond="ncp.ns_info_mask_adate == TRUE" ),
12269             srec( ArchiveTimeStruct, req_cond="ncp.ns_info_mask_atime == TRUE" ),
12270             srec( ArchiveIdStruct, req_cond="ncp.ns_info_mask_aid == TRUE" ),
12271             srec( UpdateDateStruct, req_cond="ncp.ns_info_mask_udate == TRUE" ),
12272             srec( UpdateTimeStruct, req_cond="ncp.ns_info_mask_utime == TRUE" ),
12273             srec( UpdateIDStruct, req_cond="ncp.ns_info_mask_uid == TRUE" ),
12274             srec( LastAccessStruct, req_cond="ncp.ns_info_mask_acc_date == TRUE" ),
12275             srec( RightsInfoStruct, req_cond="ncp.ns_info_mask_max_acc_mask == TRUE" ),
12276         ])
12277         pkt.ReqCondSizeVariable()
12278         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12279                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12280                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12281         # 2222/5714, 87/20
12282         pkt = NCP(0x5714, "Search for File or Subdirectory Set", 'file', has_length=0)
12283         pkt.Request((28, 282), [
12284                 rec( 8, 1, NameSpace  ),
12285                 rec( 9, 1, DataStream ),
12286                 rec( 10, 2, SearchAttributesLow ),
12287                 rec( 12, 2, ReturnInfoMask ),
12288                 rec( 14, 2, ExtendedInfo ),
12289                 rec( 16, 2, ReturnInfoCount ),
12290                 rec( 18, 9, SearchSequence ),
12291                 rec( 27, (1,255), SearchPattern ),
12292         ])
12293         pkt.Reply(NO_LENGTH_CHECK, [
12294                 rec( 8, 9, SearchSequence ),
12295                 rec( 17, 1, MoreFlag ),
12296                 rec( 18, 2, InfoCount ),
12297             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12298             srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12299             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12300             srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12301             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12302             srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12303             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12304             srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12305             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12306             srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12307             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12308             srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12309             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12310             srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12311             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12312             srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12313             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12314             srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12315             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12316             srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12317             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12318             srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12319             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12320             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12321             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12322             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12323             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12324             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12325             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12326             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12327             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12328             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12329             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12330             srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
12331             srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
12332             srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
12333             srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
12334             srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
12335             srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ),
12336             srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
12337             srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
12338             srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
12339             srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
12340             srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
12341             srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
12342             srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
12343             srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
12344         ])
12345         pkt.ReqCondSizeVariable()
12346         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12347                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12348                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12349         # 2222/5715, 87/21
12350         pkt = NCP(0x5715, "Get Path String from Short Directory Handle", 'file', has_length=0)
12351         pkt.Request(10, [
12352                 rec( 8, 1, NameSpace ),
12353                 rec( 9, 1, DirHandle ),
12354         ])
12355         pkt.Reply((9,263), [
12356                 rec( 8, (1,255), Path ),
12357         ])
12358         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12359                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12360                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
12361         # 2222/5716, 87/22
12362         pkt = NCP(0x5716, "Generate Directory Base and Volume Number", 'file', has_length=0)
12363         pkt.Request((20,274), [
12364                 rec( 8, 1, SrcNameSpace ),
12365                 rec( 9, 1, DestNameSpace ),
12366                 rec( 10, 2, dstNSIndicator ),
12367                 rec( 12, 1, VolumeNumber ),
12368                 rec( 13, 4, DirectoryBase ),
12369                 rec( 17, 1, HandleFlag ),
12370                 rec( 18, 1, PathCount, var="x" ),
12371                 rec( 19, (1,255), Path, repeat="x" ),
12372         ], info_str=(Path, "Get Volume and Directory Base from: %s", "/%s"))
12373         pkt.Reply(17, [
12374                 rec( 8, 4, DirectoryBase ),
12375                 rec( 12, 4, DOSDirectoryBase ),
12376                 rec( 16, 1, VolumeNumber ),
12377         ])
12378         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12379                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12380                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12381         # 2222/5717, 87/23
12382         pkt = NCP(0x5717, "Query Name Space Information Format", 'file', has_length=0)
12383         pkt.Request(10, [
12384                 rec( 8, 1, NameSpace ),
12385                 rec( 9, 1, VolumeNumber ),
12386         ])
12387         pkt.Reply(58, [
12388                 rec( 8, 4, FixedBitMask ),
12389                 rec( 12, 4, VariableBitMask ),
12390                 rec( 16, 4, HugeBitMask ),
12391                 rec( 20, 2, FixedBitsDefined ),
12392                 rec( 22, 2, VariableBitsDefined ),
12393                 rec( 24, 2, HugeBitsDefined ),
12394                 rec( 26, 32, FieldsLenTable ),
12395         ])
12396         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12397                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12398                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12399         # 2222/5718, 87/24
12400         pkt = NCP(0x5718, "Get Name Spaces Loaded List from Volume Number", 'file', has_length=0)
12401         pkt.Request(10, [
12402                 rec( 8, 1, Reserved ),
12403                 rec( 9, 1, VolumeNumber ),
12404         ])
12405         pkt.Reply(11, [
12406                 rec( 8, 2, NumberOfNSLoaded, var="x" ),
12407                 rec( 10, 1, NameSpace, repeat="x" ),
12408         ])
12409         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12410                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12411                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12412         # 2222/5719, 87/25
12413         pkt = NCP(0x5719, "Set Name Space Information", 'file', has_length=0)
12414         pkt.Request(531, [
12415                 rec( 8, 1, SrcNameSpace ),
12416                 rec( 9, 1, DestNameSpace ),
12417                 rec( 10, 1, VolumeNumber ),
12418                 rec( 11, 4, DirectoryBase ),
12419                 rec( 15, 2, NamesSpaceInfoMask ),
12420                 rec( 17, 2, Reserved2 ),
12421                 rec( 19, 512, NSSpecificInfo ),
12422         ])
12423         pkt.Reply(8)
12424         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12425                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12426                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12427                              0xff16])
12428         # 2222/571A, 87/26
12429         pkt = NCP(0x571A, "Get Huge Name Space Information", 'file', has_length=0)
12430         pkt.Request(34, [
12431                 rec( 8, 1, NameSpace ),
12432                 rec( 9, 1, VolumeNumber ),
12433                 rec( 10, 4, DirectoryBase ),
12434                 rec( 14, 4, HugeBitMask ),
12435                 rec( 18, 16, HugeStateInfo ),
12436         ])
12437         pkt.Reply((25,279), [
12438                 rec( 8, 16, NextHugeStateInfo ),
12439                 rec( 24, (1,255), HugeData ),
12440         ])
12441         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12442                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12443                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12444                              0xff16])
12445         # 2222/571B, 87/27
12446         pkt = NCP(0x571B, "Set Huge Name Space Information", 'file', has_length=0)
12447         pkt.Request((35,289), [
12448                 rec( 8, 1, NameSpace ),
12449                 rec( 9, 1, VolumeNumber ),
12450                 rec( 10, 4, DirectoryBase ),
12451                 rec( 14, 4, HugeBitMask ),
12452                 rec( 18, 16, HugeStateInfo ),
12453                 rec( 34, (1,255), HugeData ),
12454         ])
12455         pkt.Reply(28, [
12456                 rec( 8, 16, NextHugeStateInfo ),
12457                 rec( 24, 4, HugeDataUsed ),
12458         ])
12459         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12460                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12461                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12462                              0xff16])
12463         # 2222/571C, 87/28
12464         pkt = NCP(0x571C, "Get Full Path String", 'file', has_length=0)
12465         pkt.Request((28,282), [
12466                 rec( 8, 1, SrcNameSpace ),
12467                 rec( 9, 1, DestNameSpace ),
12468                 rec( 10, 2, PathCookieFlags ),
12469                 rec( 12, 4, Cookie1 ),
12470                 rec( 16, 4, Cookie2 ),
12471                 rec( 20, 1, VolumeNumber ),
12472                 rec( 21, 4, DirectoryBase ),
12473                 rec( 25, 1, HandleFlag ),
12474                 rec( 26, 1, PathCount, var="x" ),
12475                 rec( 27, (1,255), Path, repeat="x" ),
12476         ], info_str=(Path, "Get Full Path from: %s", "/%s"))
12477         pkt.Reply((23,277), [
12478                 rec( 8, 2, PathCookieFlags ),
12479                 rec( 10, 4, Cookie1 ),
12480                 rec( 14, 4, Cookie2 ),
12481                 rec( 18, 2, PathComponentSize ),
12482                 rec( 20, 2, PathComponentCount, var='x' ),
12483                 rec( 22, (1,255), Path, repeat='x' ),
12484         ])
12485         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12486                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12487                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12488                              0xff16])
12489         # 2222/571D, 87/29
12490         pkt = NCP(0x571D, "Get Effective Directory Rights", 'file', has_length=0)
12491         pkt.Request((24, 278), [
12492                 rec( 8, 1, NameSpace  ),
12493                 rec( 9, 1, DestNameSpace ),
12494                 rec( 10, 2, SearchAttributesLow ),
12495                 rec( 12, 2, ReturnInfoMask ),
12496                 rec( 14, 2, ExtendedInfo ),
12497                 rec( 16, 1, VolumeNumber ),
12498                 rec( 17, 4, DirectoryBase ),
12499                 rec( 21, 1, HandleFlag ),
12500                 rec( 22, 1, PathCount, var="x" ),
12501                 rec( 23, (1,255), Path, repeat="x" ),
12502         ], info_str=(Path, "Get Effective Rights for: %s", "/%s"))
12503         pkt.Reply(NO_LENGTH_CHECK, [
12504                 rec( 8, 2, EffectiveRights ),
12505                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12506                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12507                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12508                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12509                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12510                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12511                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12512                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12513                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12514                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12515                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12516                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12517                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12518                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12519                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12520                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12521                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12522                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12523                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12524                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12525                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12526                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12527                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12528                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12529                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12530                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12531                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12532                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12533                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12534                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12535                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12536                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12537                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12538                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12539                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12540         ])
12541         pkt.ReqCondSizeVariable()
12542         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12543                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12544                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12545         # 2222/571E, 87/30
12546         pkt = NCP(0x571E, "Open/Create File or Subdirectory", 'file', has_length=0)
12547         pkt.Request((34, 288), [
12548                 rec( 8, 1, NameSpace  ),
12549                 rec( 9, 1, DataStream ),
12550                 rec( 10, 1, OpenCreateMode ),
12551                 rec( 11, 1, Reserved ),
12552                 rec( 12, 2, SearchAttributesLow ),
12553                 rec( 14, 2, Reserved2 ),
12554                 rec( 16, 2, ReturnInfoMask ),
12555                 rec( 18, 2, ExtendedInfo ),
12556                 rec( 20, 4, AttributesDef32 ),
12557                 rec( 24, 2, DesiredAccessRights ),
12558                 rec( 26, 1, VolumeNumber ),
12559                 rec( 27, 4, DirectoryBase ),
12560                 rec( 31, 1, HandleFlag ),
12561                 rec( 32, 1, PathCount, var="x" ),
12562                 rec( 33, (1,255), Path, repeat="x" ),
12563         ], info_str=(Path, "Open or Create File: %s", "/%s"))
12564         pkt.Reply(NO_LENGTH_CHECK, [
12565                 rec( 8, 4, FileHandle, BE ),
12566                 rec( 12, 1, OpenCreateAction ),
12567                 rec( 13, 1, Reserved ),
12568                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12569                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12570                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12571                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12572                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12573                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12574                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12575                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12576                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12577                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12578                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12579                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12580                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12581                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12582                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12583                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12584                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12585                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12586                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12587                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12588                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12589                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12590                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12591                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12592                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12593                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12594                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12595                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12596                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12597                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12598                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12599                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12600                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12601                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12602                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12603         ])
12604         pkt.ReqCondSizeVariable()
12605         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12606                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12607                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12608         # 2222/571F, 87/31
12609         pkt = NCP(0x571F, "Get File Information", 'file', has_length=0)
12610         pkt.Request(16, [
12611                 rec( 8, 6, FileHandle  ),
12612                 rec( 14, 1, HandleInfoLevel ),
12613                 rec( 15, 1, NameSpace ),
12614         ])
12615         pkt.Reply(NO_LENGTH_CHECK, [
12616                 rec( 8, 4, VolumeNumberLong ),
12617                 rec( 12, 4, DirectoryBase ),
12618                 srec(HandleInfoLevel0, req_cond="ncp.handle_info_level==0x00" ),
12619                 srec(HandleInfoLevel1, req_cond="ncp.handle_info_level==0x01" ),
12620                 srec(HandleInfoLevel2, req_cond="ncp.handle_info_level==0x02" ),
12621                 srec(HandleInfoLevel3, req_cond="ncp.handle_info_level==0x03" ),
12622                 srec(HandleInfoLevel4, req_cond="ncp.handle_info_level==0x04" ),
12623                 srec(HandleInfoLevel5, req_cond="ncp.handle_info_level==0x05" ),
12624         ])
12625         pkt.ReqCondSizeVariable()
12626         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12627                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12628                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12629         # 2222/5720, 87/32
12630         pkt = NCP(0x5720, "Open/Create File or Subdirectory with Callback", 'file', has_length=0)
12631         pkt.Request((30, 284), [
12632                 rec( 8, 1, NameSpace  ),
12633                 rec( 9, 1, OpenCreateMode ),
12634                 rec( 10, 2, SearchAttributesLow ),
12635                 rec( 12, 2, ReturnInfoMask ),
12636                 rec( 14, 2, ExtendedInfo ),
12637                 rec( 16, 4, AttributesDef32 ),
12638                 rec( 20, 2, DesiredAccessRights ),
12639                 rec( 22, 1, VolumeNumber ),
12640                 rec( 23, 4, DirectoryBase ),
12641                 rec( 27, 1, HandleFlag ),
12642                 rec( 28, 1, PathCount, var="x" ),
12643                 rec( 29, (1,255), Path, repeat="x" ),
12644         ], info_str=(Path, "Open or Create with Op-Lock: %s", "/%s"))
12645         pkt.Reply( NO_LENGTH_CHECK, [
12646                 rec( 8, 4, FileHandle, BE ),
12647                 rec( 12, 1, OpenCreateAction ),
12648                 rec( 13, 1, OCRetFlags ),
12649                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12650                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12651                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12652                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12653                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12654                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12655                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12656                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12657                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12658                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12659                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12660                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12661                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12662                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12663                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12664                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12665                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12666                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12667                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12668                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12669                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12670                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12671                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12672                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12673                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12674                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12675                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12676                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12677                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12678                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12679                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12680                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12681                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12682                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
12683                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
12684                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
12685                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
12686                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
12687                 srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ),
12688                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
12689                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
12690                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
12691                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
12692                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
12693                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
12694                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
12695                 srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
12696         ])
12697         pkt.ReqCondSizeVariable()
12698         pkt.CompletionCodes([0x0000, 0x7f00, 0x8000, 0x8101, 0x8401, 0x8501,
12699                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12700                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12701         # 2222/5721, 87/33
12702         pkt = NCP(0x5721, "Open/Create File or Subdirectory II with Callback", 'file', has_length=0)
12703         pkt.Request((34, 288), [
12704                 rec( 8, 1, NameSpace  ),
12705                 rec( 9, 1, DataStream ),
12706                 rec( 10, 1, OpenCreateMode ),
12707                 rec( 11, 1, Reserved ),
12708                 rec( 12, 2, SearchAttributesLow ),
12709                 rec( 14, 2, Reserved2 ),
12710                 rec( 16, 2, ReturnInfoMask ),
12711                 rec( 18, 2, ExtendedInfo ),
12712                 rec( 20, 4, AttributesDef32 ),
12713                 rec( 24, 2, DesiredAccessRights ),
12714                 rec( 26, 1, VolumeNumber ),
12715                 rec( 27, 4, DirectoryBase ),
12716                 rec( 31, 1, HandleFlag ),
12717                 rec( 32, 1, PathCount, var="x" ),
12718                 rec( 33, (1,255), Path, repeat="x" ),
12719         ], info_str=(FilePath, "Open or Create II with Op-Lock: %s", "/%s"))
12720         pkt.Reply((91,345), [
12721                 rec( 8, 4, FileHandle ),
12722                 rec( 12, 1, OpenCreateAction ),
12723                 rec( 13, 1, OCRetFlags ),
12724                 rec( 14, 4, DataStreamSpaceAlloc ),
12725                 rec( 18, 6, AttributesStruct ),
12726                 rec( 24, 4, DataStreamSize ),
12727                 rec( 28, 4, TtlDSDskSpaceAlloc ),
12728                 rec( 32, 2, NumberOfDataStreams ),
12729                 rec( 34, 2, CreationTime ),
12730                 rec( 36, 2, CreationDate ),
12731                 rec( 38, 4, CreatorID, BE ),
12732                 rec( 42, 2, ModifiedTime ),
12733                 rec( 44, 2, ModifiedDate ),
12734                 rec( 46, 4, ModifierID, BE ),
12735                 rec( 50, 2, LastAccessedDate ),
12736                 rec( 52, 2, ArchivedTime ),
12737                 rec( 54, 2, ArchivedDate ),
12738                 rec( 56, 4, ArchiverID, BE ),
12739                 rec( 60, 2, InheritedRightsMask ),
12740                 rec( 62, 4, DirectoryEntryNumber ),
12741                 rec( 66, 4, DOSDirectoryEntryNumber ),
12742                 rec( 70, 4, VolumeNumberLong ),
12743                 rec( 74, 4, EADataSize ),
12744                 rec( 78, 4, EACount ),
12745                 rec( 82, 4, EAKeySize ),
12746                 rec( 86, 1, CreatorNameSpaceNumber ),
12747                 rec( 87, 3, Reserved3 ),
12748                 rec( 90, (1,255), FileName ),
12749         ])
12750         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12751                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12752                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12753         # 2222/5722, 87/34
12754         pkt = NCP(0x5722, "Open CallBack Control (Op-Lock)", 'file', has_length=0)
12755         pkt.Request(13, [
12756                 rec( 10, 4, CCFileHandle, BE ),
12757                 rec( 14, 1, CCFunction ),
12758         ])
12759         pkt.Reply(8)
12760         pkt.CompletionCodes([0x0000, 0x8800, 0xff16])
12761         # 2222/5723, 87/35
12762         pkt = NCP(0x5723, "Modify DOS Attributes on a File or Subdirectory", 'file', has_length=0)
12763         pkt.Request((28, 282), [
12764                 rec( 8, 1, NameSpace  ),
12765                 rec( 9, 1, Flags ),
12766                 rec( 10, 2, SearchAttributesLow ),
12767                 rec( 12, 2, ReturnInfoMask ),
12768                 rec( 14, 2, ExtendedInfo ),
12769                 rec( 16, 4, AttributesDef32 ),
12770                 rec( 20, 1, VolumeNumber ),
12771                 rec( 21, 4, DirectoryBase ),
12772                 rec( 25, 1, HandleFlag ),
12773                 rec( 26, 1, PathCount, var="x" ),
12774                 rec( 27, (1,255), Path, repeat="x" ),
12775         ], info_str=(Path, "Modify DOS Attributes for: %s", "/%s"))
12776         pkt.Reply(24, [
12777                 rec( 8, 4, ItemsChecked ),
12778                 rec( 12, 4, ItemsChanged ),
12779                 rec( 16, 4, AttributeValidFlag ),
12780                 rec( 20, 4, AttributesDef32 ),
12781         ])
12782         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12783                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12784                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12785         # 2222/5724, 87/36
12786         pkt = NCP(0x5724, "Log File", 'file', has_length=0)
12787         pkt.Request((28, 282), [
12788                 rec( 8, 1, NameSpace  ),
12789                 rec( 9, 1, Reserved ),
12790                 rec( 10, 2, Reserved2 ),
12791                 rec( 12, 1, LogFileFlagLow ),
12792                 rec( 13, 1, LogFileFlagHigh ),
12793                 rec( 14, 2, Reserved2 ),
12794                 rec( 16, 4, WaitTime ),
12795                 rec( 20, 1, VolumeNumber ),
12796                 rec( 21, 4, DirectoryBase ),
12797                 rec( 25, 1, HandleFlag ),
12798                 rec( 26, 1, PathCount, var="x" ),
12799                 rec( 27, (1,255), Path, repeat="x" ),
12800         ], info_str=(Path, "Lock File: %s", "/%s"))
12801         pkt.Reply(8)
12802         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12803                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12804                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12805         # 2222/5725, 87/37
12806         pkt = NCP(0x5725, "Release File", 'file', has_length=0)
12807         pkt.Request((20, 274), [
12808                 rec( 8, 1, NameSpace  ),
12809                 rec( 9, 1, Reserved ),
12810                 rec( 10, 2, Reserved2 ),
12811                 rec( 12, 1, VolumeNumber ),
12812                 rec( 13, 4, DirectoryBase ),
12813                 rec( 17, 1, HandleFlag ),
12814                 rec( 18, 1, PathCount, var="x" ),
12815                 rec( 19, (1,255), Path, repeat="x" ),
12816         ], info_str=(Path, "Release Lock on: %s", "/%s"))
12817         pkt.Reply(8)
12818         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12819                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12820                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12821         # 2222/5726, 87/38
12822         pkt = NCP(0x5726, "Clear File", 'file', has_length=0)
12823         pkt.Request((20, 274), [
12824                 rec( 8, 1, NameSpace  ),
12825                 rec( 9, 1, Reserved ),
12826                 rec( 10, 2, Reserved2 ),
12827                 rec( 12, 1, VolumeNumber ),
12828                 rec( 13, 4, DirectoryBase ),
12829                 rec( 17, 1, HandleFlag ),
12830                 rec( 18, 1, PathCount, var="x" ),
12831                 rec( 19, (1,255), Path, repeat="x" ),
12832         ], info_str=(Path, "Clear File: %s", "/%s"))
12833         pkt.Reply(8)
12834         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12835                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12836                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12837         # 2222/5727, 87/39
12838         pkt = NCP(0x5727, "Get Directory Disk Space Restriction", 'file', has_length=0)
12839         pkt.Request((19, 273), [
12840                 rec( 8, 1, NameSpace  ),
12841                 rec( 9, 2, Reserved2 ),
12842                 rec( 11, 1, VolumeNumber ),
12843                 rec( 12, 4, DirectoryBase ),
12844                 rec( 16, 1, HandleFlag ),
12845                 rec( 17, 1, PathCount, var="x" ),
12846                 rec( 18, (1,255), Path, repeat="x" ),
12847         ], info_str=(Path, "Get Disk Space Restriction for: %s", "/%s"))
12848         pkt.Reply(18, [
12849                 rec( 8, 1, NumberOfEntries, var="x" ),
12850                 rec( 9, 9, SpaceStruct, repeat="x" ),
12851         ])
12852         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12853                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12854                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12855                              0xff16])
12856         # 2222/5728, 87/40
12857         pkt = NCP(0x5728, "Search for File or Subdirectory Set (Extended Errors)", 'file', has_length=0)
12858         pkt.Request((28, 282), [
12859                 rec( 8, 1, NameSpace  ),
12860                 rec( 9, 1, DataStream ),
12861                 rec( 10, 2, SearchAttributesLow ),
12862                 rec( 12, 2, ReturnInfoMask ),
12863                 rec( 14, 2, ExtendedInfo ),
12864                 rec( 16, 2, ReturnInfoCount ),
12865                 rec( 18, 9, SearchSequence ),
12866                 rec( 27, (1,255), SearchPattern ),
12867         ], info_str=(SearchPattern, "Search for: %s", ", %s"))
12868         pkt.Reply(NO_LENGTH_CHECK, [
12869                 rec( 8, 9, SearchSequence ),
12870                 rec( 17, 1, MoreFlag ),
12871                 rec( 18, 2, InfoCount ),
12872                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12873                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12874                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12875                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12876                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12877                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12878                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12879                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12880                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12881                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12882                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12883                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12884                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12885                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12886                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12887                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12888                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12889                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12890                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12891                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12892                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12893                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12894                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12895                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12896                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12897                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12898                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12899                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12900                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12901                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12902                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12903                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12904                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12905                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12906                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12907         ])
12908         pkt.ReqCondSizeVariable()
12909         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12910                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12911                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12912         # 2222/5729, 87/41
12913         pkt = NCP(0x5729, "Scan Salvageable Files", 'file', has_length=0)
12914         pkt.Request((24,278), [
12915                 rec( 8, 1, NameSpace ),
12916                 rec( 9, 1, Reserved ),
12917                 rec( 10, 2, CtrlFlags, LE ),
12918                 rec( 12, 4, SequenceNumber ),
12919                 rec( 16, 1, VolumeNumber ),
12920                 rec( 17, 4, DirectoryBase ),
12921                 rec( 21, 1, HandleFlag ),
12922                 rec( 22, 1, PathCount, var="x" ),
12923                 rec( 23, (1,255), Path, repeat="x" ),
12924         ], info_str=(Path, "Scan Deleted Files: %s", "/%s"))
12925         pkt.Reply(NO_LENGTH_CHECK, [
12926                 rec( 8, 4, SequenceNumber ),
12927                 rec( 12, 4, DirectoryBase ),
12928                 rec( 16, 4, ScanItems, var="x" ),
12929                 srec(ScanInfoFileName, req_cond="ncp.ctrl_flags==0x0001", repeat="x" ),
12930                 srec(ScanInfoFileNoName, req_cond="ncp.ctrl_flags==0x0000", repeat="x" ),
12931         ])
12932         pkt.ReqCondSizeVariable()
12933         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12934                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12935                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12936         # 2222/572A, 87/42
12937         pkt = NCP(0x572A, "Purge Salvageable File List", 'file', has_length=0)
12938         pkt.Request(28, [
12939                 rec( 8, 1, NameSpace ),
12940                 rec( 9, 1, Reserved ),
12941                 rec( 10, 2, PurgeFlags ),
12942                 rec( 12, 4, VolumeNumberLong ),
12943                 rec( 16, 4, DirectoryBase ),
12944                 rec( 20, 4, PurgeCount, var="x" ),
12945                 rec( 24, 4, PurgeList, repeat="x" ),
12946         ])
12947         pkt.Reply(16, [
12948                 rec( 8, 4, PurgeCount, var="x" ),
12949                 rec( 12, 4, PurgeCcode, repeat="x" ),
12950         ])
12951         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12952                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12953                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12954         # 2222/572B, 87/43
12955         pkt = NCP(0x572B, "Revoke File Handle Rights", 'file', has_length=0)
12956         pkt.Request(17, [
12957                 rec( 8, 3, Reserved3 ),
12958                 rec( 11, 1, RevQueryFlag ),
12959                 rec( 12, 4, FileHandle ),
12960                 rec( 16, 1, RemoveOpenRights ),
12961         ])
12962         pkt.Reply(13, [
12963                 rec( 8, 4, FileHandle ),
12964                 rec( 12, 1, OpenRights ),
12965         ])
12966         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12967                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12968                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12969         # 2222/572C, 87/44
12970         pkt = NCP(0x572C, "Update File Handle Rights", 'file', has_length=0)
12971         pkt.Request(24, [
12972                 rec( 8, 2, Reserved2 ),
12973                 rec( 10, 1, VolumeNumber ),
12974                 rec( 11, 1, NameSpace ),
12975                 rec( 12, 4, DirectoryNumber ),
12976                 rec( 16, 2, AccessRightsMaskWord ),
12977                 rec( 18, 2, NewAccessRights ),
12978                 rec( 20, 4, FileHandle, BE ),
12979         ])
12980         pkt.Reply(16, [
12981                 rec( 8, 4, FileHandle, BE ),
12982                 rec( 12, 4, EffectiveRights ),
12983         ])
12984         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12985                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12986                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12987         # 2222/5740, 87/64
12988         pkt = NCP(0x5740, "Read from File", 'file', has_length=0)
12989         pkt.Request(22, [
12990         rec( 8, 4, FileHandle, BE ),
12991         rec( 12, 8, StartOffset64bit, BE ),
12992         rec( 20, 2, NumBytes, BE ),
12993     ])
12994         pkt.Reply(10, [
12995         rec( 8, 2, NumBytes, BE),
12996     ])
12997         pkt.CompletionCodes([0x0000, 0x8300, 0x8800, 0x9300, 0x9500, 0xa201, 0xfd00, 0xff1b])
12998         # 2222/5741, 87/65
12999         pkt = NCP(0x5741, "Write to File", 'file', has_length=0)
13000         pkt.Request(22, [
13001         rec( 8, 4, FileHandle, BE ),
13002         rec( 12, 8, StartOffset64bit, BE ),
13003         rec( 20, 2, NumBytes, BE ),
13004     ])
13005         pkt.Reply(8)
13006         pkt.CompletionCodes([0x0000, 0x8300, 0x8800, 0x9400, 0x9500, 0xa201, 0xfd00, 0xff1b])
13007         # 2222/5742, 87/66
13008         pkt = NCP(0x5742, "Get Current Size of File", 'file', has_length=0)
13009         pkt.Request(12, [
13010         rec( 8, 4, FileHandle, BE ),
13011     ])
13012         pkt.Reply(16, [
13013         rec( 8, 8, FileSize64bit, BE ),
13014     ])
13015         pkt.CompletionCodes([0x0000, 0x7f00, 0x8800, 0x9600, 0xfd02, 0xff01])
13016         # 2222/5743, 87/67
13017         pkt = NCP(0x5743, "Log Physical Record", 'file', has_length=0)
13018         pkt.Request(36, [
13019         rec( 8, 4, LockFlag, BE ),
13020         rec(12, 4, FileHandle, BE ),
13021         rec(16, 8, StartOffset64bit, BE ),
13022         rec(24, 8, Length64bit, BE ),
13023         rec(32, 4, LockTimeout, BE),
13024     ])
13025         pkt.Reply(8)
13026         pkt.CompletionCodes([0x0000, 0x7f00, 0x8800, 0x9600, 0xfb08, 0xfd02, 0xff01])
13027         # 2222/5744, 87/68
13028         pkt = NCP(0x5744, "Release Physical Record", 'file', has_length=0)
13029         pkt.Request(28, [
13030         rec(8, 4, FileHandle, BE ),
13031         rec(12, 8, StartOffset64bit, BE ),
13032         rec(20, 8, Length64bit, BE ),
13033     ])
13034         pkt.Reply(8)
13035         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13036                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13037                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff1a])
13038         # 2222/5745, 87/69
13039         pkt = NCP(0x5745, "Clear Physical Record", 'file', has_length=0)
13040         pkt.Request(28, [
13041         rec(8, 4, FileHandle, BE ),
13042         rec(12, 8, StartOffset64bit, BE ),
13043         rec(20, 8, Length64bit, BE ),
13044     ])
13045         pkt.Reply(8)
13046         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13047                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13048                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff1a])
13049         # 2222/5801, 8801
13050         pkt = NCP(0x5801, "Query Volume Audit Status", "auditing", has_length=0)
13051         pkt.Request(12, [
13052                 rec( 8, 4, ConnectionNumber ),
13053         ])
13054         pkt.Reply(40, [
13055                 rec(8, 32, NWAuditStatus ),
13056         ])
13057         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13058                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13059                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13060         # 2222/5802, 8802
13061         pkt = NCP(0x5802, "Add User Audit Property", "auditing", has_length=0)
13062         pkt.Request(25, [
13063                 rec(8, 4, AuditIDType ),
13064                 rec(12, 4, AuditID ),
13065                 rec(16, 4, AuditHandle ),
13066                 rec(20, 4, ObjectID ),
13067                 rec(24, 1, AuditFlag ),
13068         ])
13069         pkt.Reply(8)
13070         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13071                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13072                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13073         # 2222/5803, 8803
13074         pkt = NCP(0x5803, "Add Auditor Access", "auditing", has_length=0)
13075         pkt.Request(8)
13076         pkt.Reply(8)
13077         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13078                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13079                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13080         # 2222/5804, 8804
13081         pkt = NCP(0x5804, "Change Auditor Volume Password", "auditing", has_length=0)
13082         pkt.Request(8)
13083         pkt.Reply(8)
13084         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13085                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13086                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13087         # 2222/5805, 8805
13088         pkt = NCP(0x5805, "Check Auditor Access", "auditing", has_length=0)
13089         pkt.Request(8)
13090         pkt.Reply(8)
13091         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13092                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13093                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13094         # 2222/5806, 8806
13095         pkt = NCP(0x5806, "Delete User Audit Property", "auditing", has_length=0)
13096         pkt.Request(8)
13097         pkt.Reply(8)
13098         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13099                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13100                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13101         # 2222/5807, 8807
13102         pkt = NCP(0x5807, "Disable Auditing On A Volume", "auditing", has_length=0)
13103         pkt.Request(8)
13104         pkt.Reply(8)
13105         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13106                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13107                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13108         # 2222/5808, 8808
13109         pkt = NCP(0x5808, "Enable Auditing On A Volume", "auditing", has_length=0)
13110         pkt.Request(8)
13111         pkt.Reply(8)
13112         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13113                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13114                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13115         # 2222/5809, 8809
13116         pkt = NCP(0x5809, "Query User Being Audited", "auditing", has_length=0)
13117         pkt.Request(8)
13118         pkt.Reply(8)
13119         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13120                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13121                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13122         # 2222/580A, 88,10
13123         pkt = NCP(0x580A, "Read Audit Bit Map", "auditing", has_length=0)
13124         pkt.Request(8)
13125         pkt.Reply(8)
13126         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13127                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13128                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13129         # 2222/580B, 88,11
13130         pkt = NCP(0x580B, "Read Audit File Configuration Header", "auditing", has_length=0)
13131         pkt.Request(8)
13132         pkt.Reply(8)
13133         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13134                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13135                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13136         # 2222/580D, 88,13
13137         pkt = NCP(0x580D, "Remove Auditor Access", "auditing", has_length=0)
13138         pkt.Request(8)
13139         pkt.Reply(8)
13140         pkt.CompletionCodes([0x0000, 0x300, 0x8000, 0x8101, 0x8401, 0x8501,
13141                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13142                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13143         # 2222/580E, 88,14
13144         pkt = NCP(0x580E, "Reset Audit File", "auditing", has_length=0)
13145         pkt.Request(8)
13146         pkt.Reply(8)
13147         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13148                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13149                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13150
13151         # 2222/580F, 88,15
13152         pkt = NCP(0x580F, "Auditing NCP", "auditing", has_length=0)
13153         pkt.Request(8)
13154         pkt.Reply(8)
13155         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13156                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13157                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13158         # 2222/5810, 88,16
13159         pkt = NCP(0x5810, "Write Audit Bit Map", "auditing", has_length=0)
13160         pkt.Request(8)
13161         pkt.Reply(8)
13162         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13163                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13164                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13165         # 2222/5811, 88,17
13166         pkt = NCP(0x5811, "Write Audit File Configuration Header", "auditing", has_length=0)
13167         pkt.Request(8)
13168         pkt.Reply(8)
13169         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13170                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13171                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13172         # 2222/5812, 88,18
13173         pkt = NCP(0x5812, "Change Auditor Volume Password2", "auditing", has_length=0)
13174         pkt.Request(8)
13175         pkt.Reply(8)
13176         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13177                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13178                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13179         # 2222/5813, 88,19
13180         pkt = NCP(0x5813, "Return Audit Flags", "auditing", has_length=0)
13181         pkt.Request(8)
13182         pkt.Reply(8)
13183         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13184                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13185                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13186         # 2222/5814, 88,20
13187         pkt = NCP(0x5814, "Close Old Audit File", "auditing", has_length=0)
13188         pkt.Request(8)
13189         pkt.Reply(8)
13190         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13191                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13192                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13193         # 2222/5816, 88,22
13194         pkt = NCP(0x5816, "Check Level Two Access", "auditing", has_length=0)
13195         pkt.Request(8)
13196         pkt.Reply(8)
13197         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13198                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13199                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13200         # 2222/5817, 88,23
13201         pkt = NCP(0x5817, "Return Old Audit File List", "auditing", has_length=0)
13202         pkt.Request(8)
13203         pkt.Reply(8)
13204         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13205                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13206                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13207         # 2222/5818, 88,24
13208         pkt = NCP(0x5818, "Init Audit File Reads", "auditing", has_length=0)
13209         pkt.Request(8)
13210         pkt.Reply(8)
13211         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13212                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13213                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13214         # 2222/5819, 88,25
13215         pkt = NCP(0x5819, "Read Auditing File", "auditing", has_length=0)
13216         pkt.Request(8)
13217         pkt.Reply(8)
13218         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13219                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13220                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13221         # 2222/581A, 88,26
13222         pkt = NCP(0x581A, "Delete Old Audit File", "auditing", has_length=0)
13223         pkt.Request(8)
13224         pkt.Reply(8)
13225         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13226                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13227                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13228         # 2222/581E, 88,30
13229         pkt = NCP(0x581E, "Restart Volume auditing", "auditing", has_length=0)
13230         pkt.Request(8)
13231         pkt.Reply(8)
13232         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13233                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13234                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13235         # 2222/581F, 88,31
13236         pkt = NCP(0x581F, "Set Volume Password", "auditing", has_length=0)
13237         pkt.Request(8)
13238         pkt.Reply(8)
13239         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13240                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13241                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13242         # 2222/5A01, 90/00
13243         pkt = NCP(0x5A01, "Parse Tree", 'file')
13244         pkt.Request(26, [
13245                 rec( 10, 4, InfoMask ),
13246                 rec( 14, 4, Reserved4 ),
13247                 rec( 18, 4, Reserved4 ),
13248                 rec( 22, 4, limbCount ),
13249         ])
13250         pkt.Reply(32, [
13251                 rec( 8, 4, limbCount ),
13252                 rec( 12, 4, ItemsCount ),
13253                 rec( 16, 4, nextLimbScanNum ),
13254                 rec( 20, 4, CompletionCode ),
13255                 rec( 24, 1, FolderFlag ),
13256                 rec( 25, 3, Reserved ),
13257                 rec( 28, 4, DirectoryBase ),
13258         ])
13259         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13260                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13261                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
13262         # 2222/5A0A, 90/10
13263         pkt = NCP(0x5A0A, "Get Reference Count from Dir Entry Number", 'file')
13264         pkt.Request(19, [
13265                 rec( 10, 4, VolumeNumberLong ),
13266                 rec( 14, 4, DirectoryBase ),
13267                 rec( 18, 1, NameSpace ),
13268         ])
13269         pkt.Reply(12, [
13270                 rec( 8, 4, ReferenceCount ),
13271         ])
13272         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13273                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13274                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
13275         # 2222/5A0B, 90/11
13276         pkt = NCP(0x5A0B, "Get Reference Count from Dir Handle", 'file')
13277         pkt.Request(14, [
13278                 rec( 10, 4, DirHandle ),
13279         ])
13280         pkt.Reply(12, [
13281                 rec( 8, 4, ReferenceCount ),
13282         ])
13283         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13284                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13285                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
13286         # 2222/5A0C, 90/12
13287         pkt = NCP(0x5A0C, "Set Compressed File Size", 'file')
13288         pkt.Request(20, [
13289                 rec( 10, 6, FileHandle ),
13290                 rec( 16, 4, SuggestedFileSize ),
13291         ])
13292         pkt.Reply(16, [
13293                 rec( 8, 4, OldFileSize ),
13294                 rec( 12, 4, NewFileSize ),
13295         ])
13296         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13297                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13298                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
13299         # 2222/5A80, 90/128
13300         pkt = NCP(0x5A80, "Move File Data To Data Migration", 'file')
13301         pkt.Request(27, [
13302                 rec( 10, 4, VolumeNumberLong ),
13303                 rec( 14, 4, DirectoryEntryNumber ),
13304                 rec( 18, 1, NameSpace ),
13305                 rec( 19, 3, Reserved ),
13306                 rec( 22, 4, SupportModuleID ),
13307                 rec( 26, 1, DMFlags ),
13308         ])
13309         pkt.Reply(8)
13310         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13311                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13312                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13313         # 2222/5A81, 90/129
13314         pkt = NCP(0x5A81, "Data Migration File Information", 'file')
13315         pkt.Request(19, [
13316                 rec( 10, 4, VolumeNumberLong ),
13317                 rec( 14, 4, DirectoryEntryNumber ),
13318                 rec( 18, 1, NameSpace ),
13319         ])
13320         pkt.Reply(24, [
13321                 rec( 8, 4, SupportModuleID ),
13322                 rec( 12, 4, RestoreTime ),
13323                 rec( 16, 4, DMInfoEntries, var="x" ),
13324                 rec( 20, 4, DataSize, repeat="x" ),
13325         ])
13326         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13327                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13328                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13329         # 2222/5A82, 90/130
13330         pkt = NCP(0x5A82, "Volume Data Migration Status", 'file')
13331         pkt.Request(18, [
13332                 rec( 10, 4, VolumeNumberLong ),
13333                 rec( 14, 4, SupportModuleID ),
13334         ])
13335         pkt.Reply(32, [
13336                 rec( 8, 4, NumOfFilesMigrated ),
13337                 rec( 12, 4, TtlMigratedSize ),
13338                 rec( 16, 4, SpaceUsed ),
13339                 rec( 20, 4, LimboUsed ),
13340                 rec( 24, 4, SpaceMigrated ),
13341                 rec( 28, 4, FileLimbo ),
13342         ])
13343         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13344                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13345                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13346         # 2222/5A83, 90/131
13347         pkt = NCP(0x5A83, "Migrator Status Info", 'file')
13348         pkt.Request(10)
13349         pkt.Reply(20, [
13350                 rec( 8, 1, DMPresentFlag ),
13351                 rec( 9, 3, Reserved3 ),
13352                 rec( 12, 4, DMmajorVersion ),
13353                 rec( 16, 4, DMminorVersion ),
13354         ])
13355         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13356                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13357                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13358         # 2222/5A84, 90/132
13359         pkt = NCP(0x5A84, "Data Migration Support Module Information", 'file')
13360         pkt.Request(18, [
13361                 rec( 10, 1, DMInfoLevel ),
13362                 rec( 11, 3, Reserved3),
13363                 rec( 14, 4, SupportModuleID ),
13364         ])
13365         pkt.Reply(NO_LENGTH_CHECK, [
13366                 srec( DMInfoLevel0, req_cond="ncp.dm_info_level == 0x00" ),
13367                 srec( DMInfoLevel1, req_cond="ncp.dm_info_level == 0x01" ),
13368                 srec( DMInfoLevel2, req_cond="ncp.dm_info_level == 0x02" ),
13369         ])
13370         pkt.ReqCondSizeVariable()
13371         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13372                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13373                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13374         # 2222/5A85, 90/133
13375         pkt = NCP(0x5A85, "Move File Data From Data Migration", 'file')
13376         pkt.Request(19, [
13377                 rec( 10, 4, VolumeNumberLong ),
13378                 rec( 14, 4, DirectoryEntryNumber ),
13379                 rec( 18, 1, NameSpace ),
13380         ])
13381         pkt.Reply(8)
13382         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13383                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13384                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13385         # 2222/5A86, 90/134
13386         pkt = NCP(0x5A86, "Get/Set Default Read-Write Support Module ID", 'file')
13387         pkt.Request(18, [
13388                 rec( 10, 1, GetSetFlag ),
13389                 rec( 11, 3, Reserved3 ),
13390                 rec( 14, 4, SupportModuleID ),
13391         ])
13392         pkt.Reply(12, [
13393                 rec( 8, 4, SupportModuleID ),
13394         ])
13395         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13396                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13397                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13398         # 2222/5A87, 90/135
13399         pkt = NCP(0x5A87, "Data Migration Support Module Capacity Request", 'file')
13400         pkt.Request(22, [
13401                 rec( 10, 4, SupportModuleID ),
13402                 rec( 14, 4, VolumeNumberLong ),
13403                 rec( 18, 4, DirectoryBase ),
13404         ])
13405         pkt.Reply(20, [
13406                 rec( 8, 4, BlockSizeInSectors ),
13407                 rec( 12, 4, TotalBlocks ),
13408                 rec( 16, 4, UsedBlocks ),
13409         ])
13410         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13411                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13412                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13413         # 2222/5A88, 90/136
13414         pkt = NCP(0x5A88, "RTDM Request", 'file')
13415         pkt.Request(15, [
13416                 rec( 10, 4, Verb ),
13417                 rec( 14, 1, VerbData ),
13418         ])
13419         pkt.Reply(8)
13420         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13421                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13422                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13423     # 2222/5C, 91
13424         pkt = NCP(0x5B, "NMAS Graded Authentication", 'nmas')
13425         #Need info on this packet structure
13426         pkt.Request(7)
13427         pkt.Reply(8)
13428         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13429                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
13430                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13431         # 2222/5C00, 9201                                                  
13432         pkt = NCP(0x5C01, "SecretStore Services (Ping Server)", 'sss', 0)
13433         #Need info on this packet structure and SecretStore Verbs
13434         pkt.Request(8)
13435         pkt.Reply(8)
13436         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13437                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
13438                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13439         # 2222/5C01, 9202
13440         pkt = NCP(0x5C02, "SecretStore Services", 'sss', 0)
13441         #Need info on this packet structure and SecretStore Verbs
13442         pkt.Request(8)
13443         pkt.Reply(8)
13444         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13445                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
13446                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13447         # 2222/5C02, 9203
13448         pkt = NCP(0x5C03, "SecretStore Services", 'sss', 0)
13449         #Need info on this packet structure and SecretStore Verbs
13450         pkt.Request(8)
13451         pkt.Reply(8)
13452         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13453                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
13454                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13455         # 2222/5C03, 9204
13456         pkt = NCP(0x5C04, "SecretStore Services", 'sss', 0)
13457         #Need info on this packet structure and SecretStore Verbs
13458         pkt.Request(8)
13459         pkt.Reply(8)
13460         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13461                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
13462                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13463         # 2222/5C04, 9205
13464         pkt = NCP(0x5C05, "SecretStore Services", 'sss', 0)
13465         #Need info on this packet structure and SecretStore Verbs
13466         pkt.Request(8)
13467         pkt.Reply(8)
13468         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13469                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
13470                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13471         # 2222/5C05, 9206
13472         pkt = NCP(0x5C06, "SecretStore Services", 'sss', 0)
13473         #Need info on this packet structure and SecretStore Verbs
13474         pkt.Request(8)
13475         pkt.Reply(8)
13476         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13477                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
13478                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13479         # 2222/5C06, 9207
13480         pkt = NCP(0x5C07, "SecretStore Services", 'sss', 0)
13481         #Need info on this packet structure and SecretStore Verbs
13482         pkt.Request(8)
13483         pkt.Reply(8)
13484         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13485                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
13486                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13487         # 2222/5C07, 9208
13488         pkt = NCP(0x5C08, "SecretStore Services", 'sss', 0)
13489         #Need info on this packet structure and SecretStore Verbs
13490         pkt.Request(8)
13491         pkt.Reply(8)
13492         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13493                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
13494                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13495         # 2222/5C08, 9209
13496         pkt = NCP(0x5C09, "SecretStore Services", 'sss', 0)
13497         #Need info on this packet structure and SecretStore Verbs
13498         pkt.Request(8)
13499         pkt.Reply(8)
13500         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13501                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
13502                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13503         # 2222/5C09, 920a
13504         pkt = NCP(0x5C0a, "SecretStore Services", 'sss', 0)
13505         #Need info on this packet structure and SecretStore Verbs
13506         pkt.Request(8)
13507         pkt.Reply(8)
13508         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13509                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
13510                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13511         # 2222/5E, 9401
13512         pkt = NCP(0x5E01, "NMAS Communications Packet", 'nmas', 0)
13513         pkt.Request(8)
13514         pkt.Reply(8)
13515         pkt.CompletionCodes([0x0000, 0xfb09])
13516         # 2222/5E, 9402
13517         pkt = NCP(0x5E02, "NMAS Communications Packet", 'nmas', 0)
13518         pkt.Request(8)
13519         pkt.Reply(8)
13520         pkt.CompletionCodes([0x0000, 0xfb09])
13521         # 2222/5E, 9403
13522         pkt = NCP(0x5E03, "NMAS Communications Packet", 'nmas', 0)
13523         pkt.Request(8)
13524         pkt.Reply(8)
13525         pkt.CompletionCodes([0x0000, 0xfb09])
13526         # 2222/61, 97
13527         pkt = NCP(0x61, "Get Big Packet NCP Max Packet Size", 'comm')
13528         pkt.Request(10, [
13529                 rec( 7, 2, ProposedMaxSize, BE ),
13530                 rec( 9, 1, SecurityFlag ),
13531         ],info_str=(ProposedMaxSize, "Get Big Max Packet Size - %d", ", %d"))
13532         pkt.Reply(13, [
13533                 rec( 8, 2, AcceptedMaxSize, BE ),
13534                 rec( 10, 2, EchoSocket, BE ),
13535                 rec( 12, 1, SecurityFlag ),
13536         ])
13537         pkt.CompletionCodes([0x0000])
13538         # 2222/63, 99
13539         pkt = NCP(0x63, "Undocumented Packet Burst", 'comm')
13540         pkt.Request(7)
13541         pkt.Reply(8)
13542         pkt.CompletionCodes([0x0000])
13543         # 2222/64, 100
13544         pkt = NCP(0x64, "Undocumented Packet Burst", 'comm')
13545         pkt.Request(7)
13546         pkt.Reply(8)
13547         pkt.CompletionCodes([0x0000])
13548         # 2222/65, 101
13549         pkt = NCP(0x65, "Packet Burst Connection Request", 'comm')
13550         pkt.Request(25, [
13551                 rec( 7, 4, LocalConnectionID, BE ),
13552                 rec( 11, 4, LocalMaxPacketSize, BE ),
13553                 rec( 15, 2, LocalTargetSocket, BE ),
13554                 rec( 17, 4, LocalMaxSendSize, BE ),
13555                 rec( 21, 4, LocalMaxRecvSize, BE ),
13556         ])
13557         pkt.Reply(16, [
13558                 rec( 8, 4, RemoteTargetID, BE ),
13559                 rec( 12, 4, RemoteMaxPacketSize, BE ),
13560         ])
13561         pkt.CompletionCodes([0x0000])
13562         # 2222/66, 102
13563         pkt = NCP(0x66, "Undocumented Packet Burst", 'comm')
13564         pkt.Request(7)
13565         pkt.Reply(8)
13566         pkt.CompletionCodes([0x0000])
13567         # 2222/67, 103
13568         pkt = NCP(0x67, "Undocumented Packet Burst", 'comm')
13569         pkt.Request(7)
13570         pkt.Reply(8)
13571         pkt.CompletionCodes([0x0000])
13572         # 2222/6801, 104/01
13573         pkt = NCP(0x6801, "Ping for NDS NCP", "nds", has_length=0)
13574         pkt.Request(8)
13575         pkt.Reply(8)
13576         pkt.ReqCondSizeVariable()
13577         pkt.CompletionCodes([0x0000, 0x8100, 0xfb04, 0xfe0c])
13578         # 2222/6802, 104/02
13579         #
13580         # XXX - if FraggerHandle is not 0xffffffff, this is not the
13581         # first fragment, so we can only dissect this by reassembling;
13582         # the fields after "Fragment Handle" are bogus for non-0xffffffff
13583         # fragments, so we shouldn't dissect them.
13584         #
13585         # XXX - are there TotalRequest requests in the packet, and
13586         # does each of them have NDSFlags and NDSVerb fields, or
13587         # does only the first one have it?
13588         #
13589         pkt = NCP(0x6802, "Send NDS Fragmented Request/Reply", "nds", has_length=0)
13590         pkt.Request(8)
13591         pkt.Reply(8)
13592         pkt.ReqCondSizeVariable()
13593         pkt.CompletionCodes([0x0000, 0xfd01])
13594         # 2222/6803, 104/03
13595         pkt = NCP(0x6803, "Fragment Close", "nds", has_length=0)
13596         pkt.Request(12, [
13597                 rec( 8, 4, FraggerHandle ),
13598         ])
13599         pkt.Reply(8)
13600         pkt.CompletionCodes([0x0000, 0xff00])
13601         # 2222/6804, 104/04
13602         pkt = NCP(0x6804, "Return Bindery Context", "nds", has_length=0)
13603         pkt.Request(8)
13604         pkt.Reply((9, 263), [
13605                 rec( 8, (1,255), binderyContext ),
13606         ])
13607         pkt.CompletionCodes([0x0000, 0xfe0c, 0xff00])
13608         # 2222/6805, 104/05
13609         pkt = NCP(0x6805, "Monitor NDS Connection", "nds", has_length=0)
13610         pkt.Request(8)
13611         pkt.Reply(8)
13612         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
13613         # 2222/6806, 104/06
13614         pkt = NCP(0x6806, "Return NDS Statistics", "nds", has_length=0)
13615         pkt.Request(10, [
13616                 rec( 8, 2, NDSRequestFlags ),
13617         ])
13618         pkt.Reply(8)
13619         #Need to investigate how to decode Statistics Return Value
13620         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
13621         # 2222/6807, 104/07
13622         pkt = NCP(0x6807, "Clear NDS Statistics", "nds", has_length=0)
13623         pkt.Request(8)
13624         pkt.Reply(8)
13625         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
13626         # 2222/6808, 104/08
13627         pkt = NCP(0x6808, "Reload NDS Software", "nds", has_length=0)
13628         pkt.Request(8)
13629         pkt.Reply(12, [
13630                 rec( 8, 4, NDSStatus ),
13631         ])
13632         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
13633         # 2222/68C8, 104/200
13634         pkt = NCP(0x68C8, "Query Container Audit Status", "auditing", has_length=0)
13635         pkt.Request(12, [
13636                 rec( 8, 4, ConnectionNumber ),
13637 #               rec( 12, 4, AuditIDType, LE ),
13638 #               rec( 16, 4, AuditID ),
13639 #               rec( 20, 2, BufferSize ),
13640         ])
13641         pkt.Reply(40, [
13642                 rec(8, 32, NWAuditStatus ),
13643         ])
13644         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13645         # 2222/68CA, 104/202
13646         pkt = NCP(0x68CA, "Add Auditor Access", "auditing", has_length=0)
13647         pkt.Request(8)
13648         pkt.Reply(8)
13649         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13650         # 2222/68CB, 104/203
13651         pkt = NCP(0x68CB, "Change Auditor Container Password", "auditing", has_length=0)
13652         pkt.Request(8)
13653         pkt.Reply(8)
13654         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13655         # 2222/68CC, 104/204
13656         pkt = NCP(0x68CC, "Check Auditor Access", "auditing", has_length=0)
13657         pkt.Request(8)
13658         pkt.Reply(8)
13659         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13660         # 2222/68CE, 104/206
13661         pkt = NCP(0x680CE, "Disable Container Auditing", "auditing", has_length=0)
13662         pkt.Request(8)
13663         pkt.Reply(8)
13664         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13665         # 2222/68CF, 104/207
13666         pkt = NCP(0x68CF, "Enable Container Auditing", "auditing", has_length=0)
13667         pkt.Request(8)
13668         pkt.Reply(8)
13669         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13670         # 2222/68D1, 104/209
13671         pkt = NCP(0x68D1, "Read Audit File Header", "auditing", has_length=0)
13672         pkt.Request(8)
13673         pkt.Reply(8)
13674         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13675         # 2222/68D3, 104/211
13676         pkt = NCP(0x68D3, "Remove Auditor Access", "auditing", has_length=0)
13677         pkt.Request(8)
13678         pkt.Reply(8)
13679         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13680         # 2222/68D4, 104/212
13681         pkt = NCP(0x68D4, "Reset Audit File", "auditing", has_length=0)
13682         pkt.Request(8)
13683         pkt.Reply(8)
13684         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13685         # 2222/68D6, 104/214
13686         pkt = NCP(0x68D6, "Write Audit File Configuration Header", "auditing", has_length=0)
13687         pkt.Request(8)
13688         pkt.Reply(8)
13689         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13690         # 2222/68D7, 104/215
13691         pkt = NCP(0x68D7, "Change Auditor Container Password2", "auditing", has_length=0)
13692         pkt.Request(8)
13693         pkt.Reply(8)
13694         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13695         # 2222/68D8, 104/216
13696         pkt = NCP(0x68D8, "Return Audit Flags", "auditing", has_length=0)
13697         pkt.Request(8)
13698         pkt.Reply(8)
13699         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13700         # 2222/68D9, 104/217
13701         pkt = NCP(0x68D9, "Close Old Audit File", "auditing", has_length=0)
13702         pkt.Request(8)
13703         pkt.Reply(8)
13704         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13705         # 2222/68DB, 104/219
13706         pkt = NCP(0x68DB, "Check Level Two Access", "auditing", has_length=0)
13707         pkt.Request(8)
13708         pkt.Reply(8)
13709         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13710         # 2222/68DC, 104/220
13711         pkt = NCP(0x68DC, "Check Object Audited", "auditing", has_length=0)
13712         pkt.Request(8)
13713         pkt.Reply(8)
13714         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13715         # 2222/68DD, 104/221
13716         pkt = NCP(0x68DD, "Change Object Audited", "auditing", has_length=0)
13717         pkt.Request(8)
13718         pkt.Reply(8)
13719         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13720         # 2222/68DE, 104/222
13721         pkt = NCP(0x68DE, "Return Old Audit File List", "auditing", has_length=0)
13722         pkt.Request(8)
13723         pkt.Reply(8)
13724         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13725         # 2222/68DF, 104/223
13726         pkt = NCP(0x68DF, "Init Audit File Reads", "auditing", has_length=0)
13727         pkt.Request(8)
13728         pkt.Reply(8)
13729         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13730         # 2222/68E0, 104/224
13731         pkt = NCP(0x68E0, "Read Auditing File", "auditing", has_length=0)
13732         pkt.Request(8)
13733         pkt.Reply(8)
13734         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13735         # 2222/68E1, 104/225
13736         pkt = NCP(0x68E1, "Delete Old Audit File", "auditing", has_length=0)
13737         pkt.Request(8)
13738         pkt.Reply(8)
13739         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13740         # 2222/68E5, 104/229
13741         pkt = NCP(0x68E5, "Set Audit Password", "auditing", has_length=0)
13742         pkt.Request(8)
13743         pkt.Reply(8)
13744         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13745         # 2222/68E7, 104/231
13746         pkt = NCP(0x68E7, "External Audit Append To File", "auditing", has_length=0)
13747         pkt.Request(8)
13748         pkt.Reply(8)
13749         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13750         # 2222/69, 105
13751         pkt = NCP(0x69, "Log File", 'file')
13752         pkt.Request( (12, 267), [
13753                 rec( 7, 1, DirHandle ),
13754                 rec( 8, 1, LockFlag ),
13755                 rec( 9, 2, TimeoutLimit ),
13756                 rec( 11, (1, 256), FilePath ),
13757         ], info_str=(FilePath, "Log File: %s", "/%s"))
13758         pkt.Reply(8)
13759         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x9600, 0xfe0d, 0xff01])
13760         # 2222/6A, 106
13761         pkt = NCP(0x6A, "Lock File Set", 'file')
13762         pkt.Request( 9, [
13763                 rec( 7, 2, TimeoutLimit ),
13764         ])
13765         pkt.Reply(8)
13766         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x9600, 0xfe0d, 0xff01])
13767         # 2222/6B, 107
13768         pkt = NCP(0x6B, "Log Logical Record", 'file')
13769         pkt.Request( (11, 266), [
13770                 rec( 7, 1, LockFlag ),
13771                 rec( 8, 2, TimeoutLimit ),
13772                 rec( 10, (1, 256), SynchName ),
13773         ], info_str=(SynchName, "Log Logical Record: %s", ", %s"))
13774         pkt.Reply(8)
13775         pkt.CompletionCodes([0x0000, 0x7f00, 0x9600, 0xfe0d, 0xff01])
13776         # 2222/6C, 108
13777         pkt = NCP(0x6C, "Log Logical Record", 'file')
13778         pkt.Request( 10, [
13779                 rec( 7, 1, LockFlag ),
13780                 rec( 8, 2, TimeoutLimit ),
13781         ])
13782         pkt.Reply(8)
13783         pkt.CompletionCodes([0x0000, 0x7f00, 0x9600, 0xfe0d, 0xff01])
13784         # 2222/6D, 109
13785         pkt = NCP(0x6D, "Log Physical Record", 'file')
13786         pkt.Request(24, [
13787                 rec( 7, 1, LockFlag ),
13788                 rec( 8, 6, FileHandle ),
13789                 rec( 14, 4, LockAreasStartOffset ),
13790                 rec( 18, 4, LockAreaLen ),
13791                 rec( 22, 2, LockTimeout ),
13792         ])
13793         pkt.Reply(8)
13794         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
13795         # 2222/6E, 110
13796         pkt = NCP(0x6E, "Lock Physical Record Set", 'file')
13797         pkt.Request(10, [
13798                 rec( 7, 1, LockFlag ),
13799                 rec( 8, 2, LockTimeout ),
13800         ])
13801         pkt.Reply(8)
13802         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
13803         # 2222/6F00, 111/00
13804         pkt = NCP(0x6F00, "Open/Create a Semaphore", 'file', has_length=0)
13805         pkt.Request((10,521), [
13806                 rec( 8, 1, InitialSemaphoreValue ),
13807                 rec( 9, (1, 512), SemaphoreName ),
13808         ], info_str=(SemaphoreName, "Open/Create Semaphore: %s", ", %s"))
13809         pkt.Reply(13, [
13810                   rec( 8, 4, SemaphoreHandle ),
13811                   rec( 12, 1, SemaphoreOpenCount ),
13812         ])
13813         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
13814         # 2222/6F01, 111/01
13815         pkt = NCP(0x6F01, "Examine Semaphore", 'file', has_length=0)
13816         pkt.Request(12, [
13817                 rec( 8, 4, SemaphoreHandle ),
13818         ])
13819         pkt.Reply(10, [
13820                   rec( 8, 1, SemaphoreValue ),
13821                   rec( 9, 1, SemaphoreOpenCount ),
13822         ])
13823         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
13824         # 2222/6F02, 111/02
13825         pkt = NCP(0x6F02, "Wait On (P) Semaphore", 'file', has_length=0)
13826         pkt.Request(14, [
13827                 rec( 8, 4, SemaphoreHandle ),
13828                 rec( 12, 2, LockTimeout ),
13829         ])
13830         pkt.Reply(8)
13831         pkt.CompletionCodes([0x0000, 0x9600, 0xfe04, 0xff01])
13832         # 2222/6F03, 111/03
13833         pkt = NCP(0x6F03, "Signal (V) Semaphore", 'file', has_length=0)
13834         pkt.Request(12, [
13835                 rec( 8, 4, SemaphoreHandle ),
13836         ])
13837         pkt.Reply(8)
13838         pkt.CompletionCodes([0x0000, 0x9600, 0xfe04, 0xff01])
13839         # 2222/6F04, 111/04
13840         pkt = NCP(0x6F04, "Close Semaphore", 'file', has_length=0)
13841         pkt.Request(12, [
13842                 rec( 8, 4, SemaphoreHandle ),
13843         ])
13844         pkt.Reply(10, [
13845                 rec( 8, 1, SemaphoreOpenCount ),
13846                 rec( 9, 1, SemaphoreShareCount ),
13847         ])
13848         pkt.CompletionCodes([0x0000, 0x9600, 0xfe04, 0xff01])
13849         # 2222/7201, 114/01
13850         pkt = NCP(0x7201, "Timesync Get Time", 'file')
13851         pkt.Request(10)
13852         pkt.Reply(32,[
13853                 rec( 8, 12, theTimeStruct ),
13854                 rec(20, 8, eventOffset ),
13855                 rec(28, 4, eventTime ),
13856         ])
13857         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13858         # 2222/7202, 114/02
13859         pkt = NCP(0x7202, "Timesync Exchange Time", 'file')
13860         pkt.Request((63,112), [
13861                 rec( 10, 4, protocolFlags ),
13862                 rec( 14, 4, nodeFlags ),
13863                 rec( 18, 8, sourceOriginateTime ),
13864                 rec( 26, 8, targetReceiveTime ),
13865                 rec( 34, 8, targetTransmitTime ),
13866                 rec( 42, 8, sourceReturnTime ),
13867                 rec( 50, 8, eventOffset ),
13868                 rec( 58, 4, eventTime ),
13869                 rec( 62, (1,50), ServerNameLen ),
13870         ], info_str=(ServerNameLen, "Timesync Exchange Time: %s", ", %s"))
13871         pkt.Reply((64,113), [
13872                 rec( 8, 3, Reserved3 ),
13873                 rec( 11, 4, protocolFlags ),
13874                 rec( 15, 4, nodeFlags ),
13875                 rec( 19, 8, sourceOriginateTime ),
13876                 rec( 27, 8, targetReceiveTime ),
13877                 rec( 35, 8, targetTransmitTime ),
13878                 rec( 43, 8, sourceReturnTime ),
13879                 rec( 51, 8, eventOffset ),
13880                 rec( 59, 4, eventTime ),
13881                 rec( 63, (1,50), ServerNameLen ),
13882         ])
13883         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13884         # 2222/7205, 114/05
13885         pkt = NCP(0x7205, "Timesync Get Server List", 'file')
13886         pkt.Request(14, [
13887                 rec( 10, 4, StartNumber ),
13888         ])
13889         pkt.Reply(66, [
13890                 rec( 8, 4, nameType ),
13891                 rec( 12, 48, ServerName ),
13892                 rec( 60, 4, serverListFlags ),
13893                 rec( 64, 2, startNumberFlag ),
13894         ])
13895         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13896         # 2222/7206, 114/06
13897         pkt = NCP(0x7206, "Timesync Set Server List", 'file')
13898         pkt.Request(14, [
13899                 rec( 10, 4, StartNumber ),
13900         ])
13901         pkt.Reply(66, [
13902                 rec( 8, 4, nameType ),
13903                 rec( 12, 48, ServerName ),
13904                 rec( 60, 4, serverListFlags ),
13905                 rec( 64, 2, startNumberFlag ),
13906         ])
13907         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13908         # 2222/720C, 114/12
13909         pkt = NCP(0x720C, "Timesync Get Version", 'file')
13910         pkt.Request(10)
13911         pkt.Reply(12, [
13912                 rec( 8, 4, version ),
13913         ])
13914         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13915         # 2222/7B01, 123/01
13916         pkt = NCP(0x7B01, "Get Cache Information", 'stats')
13917         pkt.Request(12, [
13918                 rec(10, 1, VersionNumber),
13919                 rec(11, 1, RevisionNumber),
13920         ])
13921         pkt.Reply(288, [
13922                 rec(8, 4, CurrentServerTime, LE),
13923                 rec(12, 1, VConsoleVersion ),
13924                 rec(13, 1, VConsoleRevision ),
13925                 rec(14, 2, Reserved2 ),
13926                 rec(16, 104, Counters ),
13927                 rec(120, 40, ExtraCacheCntrs ),
13928                 rec(160, 40, MemoryCounters ),
13929                 rec(200, 48, TrendCounters ),
13930                 rec(248, 40, CacheInfo ),
13931         ])
13932         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xff00])
13933         # 2222/7B02, 123/02
13934         pkt = NCP(0x7B02, "Get File Server Information", 'stats')
13935         pkt.Request(10)
13936         pkt.Reply(150, [
13937                 rec(8, 4, CurrentServerTime ),
13938                 rec(12, 1, VConsoleVersion ),
13939                 rec(13, 1, VConsoleRevision ),
13940                 rec(14, 2, Reserved2 ),
13941                 rec(16, 4, NCPStaInUseCnt ),
13942                 rec(20, 4, NCPPeakStaInUse ),
13943                 rec(24, 4, NumOfNCPReqs ),
13944                 rec(28, 4, ServerUtilization ),
13945                 rec(32, 96, ServerInfo ),
13946                 rec(128, 22, FileServerCounters ),
13947         ])
13948         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13949         # 2222/7B03, 123/03
13950         pkt = NCP(0x7B03, "NetWare File System Information", 'stats')
13951         pkt.Request(11, [
13952                 rec(10, 1, FileSystemID ),
13953         ])
13954         pkt.Reply(68, [
13955                 rec(8, 4, CurrentServerTime ),
13956                 rec(12, 1, VConsoleVersion ),
13957                 rec(13, 1, VConsoleRevision ),
13958                 rec(14, 2, Reserved2 ),
13959                 rec(16, 52, FileSystemInfo ),
13960         ])
13961         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13962         # 2222/7B04, 123/04
13963         pkt = NCP(0x7B04, "User Information", 'stats')
13964         pkt.Request(14, [
13965                 rec(10, 4, ConnectionNumber ),
13966         ])
13967         pkt.Reply((85, 132), [
13968                 rec(8, 4, CurrentServerTime ),
13969                 rec(12, 1, VConsoleVersion ),
13970                 rec(13, 1, VConsoleRevision ),
13971                 rec(14, 2, Reserved2 ),
13972                 rec(16, 68, UserInformation ),
13973                 rec(84, (1, 48), UserName ),
13974         ])
13975         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13976         # 2222/7B05, 123/05
13977         pkt = NCP(0x7B05, "Packet Burst Information", 'stats')
13978         pkt.Request(10)
13979         pkt.Reply(216, [
13980                 rec(8, 4, CurrentServerTime ),
13981                 rec(12, 1, VConsoleVersion ),
13982                 rec(13, 1, VConsoleRevision ),
13983                 rec(14, 2, Reserved2 ),
13984                 rec(16, 200, PacketBurstInformation ),
13985         ])
13986         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13987         # 2222/7B06, 123/06
13988         pkt = NCP(0x7B06, "IPX SPX Information", 'stats')
13989         pkt.Request(10)
13990         pkt.Reply(94, [
13991                 rec(8, 4, CurrentServerTime ),
13992                 rec(12, 1, VConsoleVersion ),
13993                 rec(13, 1, VConsoleRevision ),
13994                 rec(14, 2, Reserved2 ),
13995                 rec(16, 34, IPXInformation ),
13996                 rec(50, 44, SPXInformation ),
13997         ])
13998         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13999         # 2222/7B07, 123/07
14000         pkt = NCP(0x7B07, "Garbage Collection Information", 'stats')
14001         pkt.Request(10)
14002         pkt.Reply(40, [
14003                 rec(8, 4, CurrentServerTime ),
14004                 rec(12, 1, VConsoleVersion ),
14005                 rec(13, 1, VConsoleRevision ),
14006                 rec(14, 2, Reserved2 ),
14007                 rec(16, 4, FailedAllocReqCnt ),
14008                 rec(20, 4, NumberOfAllocs ),
14009                 rec(24, 4, NoMoreMemAvlCnt ),
14010                 rec(28, 4, NumOfGarbageColl ),
14011                 rec(32, 4, FoundSomeMem ),
14012                 rec(36, 4, NumOfChecks ),
14013         ])
14014         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14015         # 2222/7B08, 123/08
14016         pkt = NCP(0x7B08, "CPU Information", 'stats')
14017         pkt.Request(14, [
14018                 rec(10, 4, CPUNumber ),
14019         ])
14020         pkt.Reply(51, [
14021                 rec(8, 4, CurrentServerTime ),
14022                 rec(12, 1, VConsoleVersion ),
14023                 rec(13, 1, VConsoleRevision ),
14024                 rec(14, 2, Reserved2 ),
14025                 rec(16, 4, NumberOfCPUs ),
14026                 rec(20, 31, CPUInformation ),
14027         ])
14028         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14029         # 2222/7B09, 123/09
14030         pkt = NCP(0x7B09, "Volume Switch Information", 'stats')
14031         pkt.Request(14, [
14032                 rec(10, 4, StartNumber )
14033         ])
14034         pkt.Reply(28, [
14035                 rec(8, 4, CurrentServerTime ),
14036                 rec(12, 1, VConsoleVersion ),
14037                 rec(13, 1, VConsoleRevision ),
14038                 rec(14, 2, Reserved2 ),
14039                 rec(16, 4, TotalLFSCounters ),
14040                 rec(20, 4, CurrentLFSCounters, var="x"),
14041                 rec(24, 4, LFSCounters, repeat="x"),
14042         ])
14043         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14044         # 2222/7B0A, 123/10
14045         pkt = NCP(0x7B0A, "Get NLM Loaded List", 'stats')
14046         pkt.Request(14, [
14047                 rec(10, 4, StartNumber )
14048         ])
14049         pkt.Reply(28, [
14050                 rec(8, 4, CurrentServerTime ),
14051                 rec(12, 1, VConsoleVersion ),
14052                 rec(13, 1, VConsoleRevision ),
14053                 rec(14, 2, Reserved2 ),
14054                 rec(16, 4, NLMcount ),
14055                 rec(20, 4, NLMsInList, var="x" ),
14056                 rec(24, 4, NLMNumbers, repeat="x" ),
14057         ])
14058         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14059         # 2222/7B0B, 123/11
14060         pkt = NCP(0x7B0B, "NLM Information", 'stats')
14061         pkt.Request(14, [
14062                 rec(10, 4, NLMNumber ),
14063         ])
14064         pkt.Reply((79,841), [
14065                 rec(8, 4, CurrentServerTime ),
14066                 rec(12, 1, VConsoleVersion ),
14067                 rec(13, 1, VConsoleRevision ),
14068                 rec(14, 2, Reserved2 ),
14069                 rec(16, 60, NLMInformation ),
14070                 rec(76, (1,255), FileName ),
14071                 rec(-1, (1,255), Name ),
14072                 rec(-1, (1,255), Copyright ),
14073         ])
14074         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14075         # 2222/7B0C, 123/12
14076         pkt = NCP(0x7B0C, "Get Directory Cache Information", 'stats')
14077         pkt.Request(10)
14078         pkt.Reply(72, [
14079                 rec(8, 4, CurrentServerTime ),
14080                 rec(12, 1, VConsoleVersion ),
14081                 rec(13, 1, VConsoleRevision ),
14082                 rec(14, 2, Reserved2 ),
14083                 rec(16, 56, DirCacheInfo ),
14084         ])
14085         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14086         # 2222/7B0D, 123/13
14087         pkt = NCP(0x7B0D, "Get Operating System Version Information", 'stats')
14088         pkt.Request(10)
14089         pkt.Reply(70, [
14090                 rec(8, 4, CurrentServerTime ),
14091                 rec(12, 1, VConsoleVersion ),
14092                 rec(13, 1, VConsoleRevision ),
14093                 rec(14, 2, Reserved2 ),
14094                 rec(16, 1, OSMajorVersion ),
14095                 rec(17, 1, OSMinorVersion ),
14096                 rec(18, 1, OSRevision ),
14097                 rec(19, 1, AccountVersion ),
14098                 rec(20, 1, VAPVersion ),
14099                 rec(21, 1, QueueingVersion ),
14100                 rec(22, 1, SecurityRestrictionVersion ),
14101                 rec(23, 1, InternetBridgeVersion ),
14102                 rec(24, 4, MaxNumOfVol ),
14103                 rec(28, 4, MaxNumOfConn ),
14104                 rec(32, 4, MaxNumOfUsers ),
14105                 rec(36, 4, MaxNumOfNmeSps ),
14106                 rec(40, 4, MaxNumOfLANS ),
14107                 rec(44, 4, MaxNumOfMedias ),
14108                 rec(48, 4, MaxNumOfStacks ),
14109                 rec(52, 4, MaxDirDepth ),
14110                 rec(56, 4, MaxDataStreams ),
14111                 rec(60, 4, MaxNumOfSpoolPr ),
14112                 rec(64, 4, ServerSerialNumber ),
14113                 rec(68, 2, ServerAppNumber ),
14114         ])
14115         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14116         # 2222/7B0E, 123/14
14117         pkt = NCP(0x7B0E, "Get Active Connection List by Type", 'stats')
14118         pkt.Request(15, [
14119                 rec(10, 4, StartConnNumber ),
14120                 rec(14, 1, ConnectionType ),
14121         ])
14122         pkt.Reply(528, [
14123                 rec(8, 4, CurrentServerTime ),
14124                 rec(12, 1, VConsoleVersion ),
14125                 rec(13, 1, VConsoleRevision ),
14126                 rec(14, 2, Reserved2 ),
14127                 rec(16, 512, ActiveConnBitList ),
14128         ])
14129         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfd01, 0xff00])
14130         # 2222/7B0F, 123/15
14131         pkt = NCP(0x7B0F, "Get NLM Resource Tag List", 'stats')
14132         pkt.Request(18, [
14133                 rec(10, 4, NLMNumber ),
14134                 rec(14, 4, NLMStartNumber ),
14135         ])
14136         pkt.Reply(37, [
14137                 rec(8, 4, CurrentServerTime ),
14138                 rec(12, 1, VConsoleVersion ),
14139                 rec(13, 1, VConsoleRevision ),
14140                 rec(14, 2, Reserved2 ),
14141                 rec(16, 4, TtlNumOfRTags ),
14142                 rec(20, 4, CurNumOfRTags ),
14143                 rec(24, 13, RTagStructure ),
14144         ])
14145         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14146         # 2222/7B10, 123/16
14147         pkt = NCP(0x7B10, "Enumerate Connection Information from Connection List", 'stats')
14148         pkt.Request(22, [
14149                 rec(10, 1, EnumInfoMask),
14150                 rec(11, 3, Reserved3),
14151                 rec(14, 4, itemsInList, var="x"),
14152                 rec(18, 4, connList, repeat="x"),
14153         ])
14154         pkt.Reply(NO_LENGTH_CHECK, [
14155                 rec(8, 4, CurrentServerTime ),
14156                 rec(12, 1, VConsoleVersion ),
14157                 rec(13, 1, VConsoleRevision ),
14158                 rec(14, 2, Reserved2 ),
14159                 rec(16, 4, ItemsInPacket ),
14160                 srec(netAddr, req_cond="ncp.enum_info_transport==TRUE"),
14161                 srec(timeInfo, req_cond="ncp.enum_info_time==TRUE"),
14162                 srec(nameInfo, req_cond="ncp.enum_info_name==TRUE"),
14163                 srec(lockInfo, req_cond="ncp.enum_info_lock==TRUE"),
14164                 srec(printInfo, req_cond="ncp.enum_info_print==TRUE"),
14165                 srec(statsInfo, req_cond="ncp.enum_info_stats==TRUE"),
14166                 srec(acctngInfo, req_cond="ncp.enum_info_account==TRUE"),
14167                 srec(authInfo, req_cond="ncp.enum_info_auth==TRUE"),
14168         ])
14169         pkt.ReqCondSizeVariable()
14170         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14171         # 2222/7B11, 123/17
14172         pkt = NCP(0x7B11, "Enumerate NCP Service Network Addresses", 'stats')
14173         pkt.Request(14, [
14174                 rec(10, 4, SearchNumber ),
14175         ])
14176         pkt.Reply(60, [
14177                 rec(8, 4, CurrentServerTime ),
14178                 rec(12, 1, VConsoleVersion ),
14179                 rec(13, 1, VConsoleRevision ),
14180                 rec(14, 2, ServerInfoFlags ),
14181                 rec(16, 16, GUID ),
14182                 rec(32, 4, NextSearchNum ),
14183                 rec(36, 4, ItemsInPacket, var="x"),
14184                 rec(40, 20, NCPNetworkAddress, repeat="x" ),
14185         ])
14186         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb01, 0xff00])
14187         # 2222/7B14, 123/20
14188         pkt = NCP(0x7B14, "Active LAN Board List", 'stats')
14189         pkt.Request(14, [
14190                 rec(10, 4, StartNumber ),
14191         ])
14192         pkt.Reply(28, [
14193                 rec(8, 4, CurrentServerTime ),
14194                 rec(12, 1, VConsoleVersion ),
14195                 rec(13, 1, VConsoleRevision ),
14196                 rec(14, 2, Reserved2 ),
14197                 rec(16, 4, MaxNumOfLANS ),
14198                 rec(20, 4, ItemsInPacket, var="x"),
14199                 rec(24, 4, BoardNumbers, repeat="x"),
14200         ])
14201         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14202         # 2222/7B15, 123/21
14203         pkt = NCP(0x7B15, "LAN Configuration Information", 'stats')
14204         pkt.Request(14, [
14205                 rec(10, 4, BoardNumber ),
14206         ])
14207         pkt.Reply(152, [
14208                 rec(8, 4, CurrentServerTime ),
14209                 rec(12, 1, VConsoleVersion ),
14210                 rec(13, 1, VConsoleRevision ),
14211                 rec(14, 2, Reserved2 ),
14212                 rec(16,136, LANConfigInfo ),
14213         ])
14214         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14215         # 2222/7B16, 123/22
14216         pkt = NCP(0x7B16, "LAN Common Counters Information", 'stats')
14217         pkt.Request(18, [
14218                 rec(10, 4, BoardNumber ),
14219                 rec(14, 4, BlockNumber ),
14220         ])
14221         pkt.Reply(86, [
14222                 rec(8, 4, CurrentServerTime ),
14223                 rec(12, 1, VConsoleVersion ),
14224                 rec(13, 1, VConsoleRevision ),
14225                 rec(14, 1, StatMajorVersion ),
14226                 rec(15, 1, StatMinorVersion ),
14227                 rec(16, 4, TotalCommonCnts ),
14228                 rec(20, 4, TotalCntBlocks ),
14229                 rec(24, 4, CustomCounters ),
14230                 rec(28, 4, NextCntBlock ),
14231                 rec(32, 54, CommonLanStruc ),
14232         ])
14233         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14234         # 2222/7B17, 123/23
14235         pkt = NCP(0x7B17, "LAN Custom Counters Information", 'stats')
14236         pkt.Request(18, [
14237                 rec(10, 4, BoardNumber ),
14238                 rec(14, 4, StartNumber ),
14239         ])
14240         pkt.Reply(25, [
14241                 rec(8, 4, CurrentServerTime ),
14242                 rec(12, 1, VConsoleVersion ),
14243                 rec(13, 1, VConsoleRevision ),
14244                 rec(14, 2, Reserved2 ),
14245                 rec(16, 4, NumOfCCinPkt, var="x"),
14246                 rec(20, 5, CustomCntsInfo, repeat="x"),
14247         ])
14248         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14249         # 2222/7B18, 123/24
14250         pkt = NCP(0x7B18, "LAN Name Information", 'stats')
14251         pkt.Request(14, [
14252                 rec(10, 4, BoardNumber ),
14253         ])
14254         pkt.Reply(19, [
14255                 rec(8, 4, CurrentServerTime ),
14256                 rec(12, 1, VConsoleVersion ),
14257                 rec(13, 1, VConsoleRevision ),
14258                 rec(14, 2, Reserved2 ),
14259                 rec(16, 3, BoardNameStruct ),
14260         ])
14261         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14262         # 2222/7B19, 123/25
14263         pkt = NCP(0x7B19, "LSL Information", 'stats')
14264         pkt.Request(10)
14265         pkt.Reply(90, [
14266                 rec(8, 4, CurrentServerTime ),
14267                 rec(12, 1, VConsoleVersion ),
14268                 rec(13, 1, VConsoleRevision ),
14269                 rec(14, 2, Reserved2 ),
14270                 rec(16, 74, LSLInformation ),
14271         ])
14272         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14273         # 2222/7B1A, 123/26
14274         pkt = NCP(0x7B1A, "LSL Logical Board Statistics", 'stats')
14275         pkt.Request(14, [
14276                 rec(10, 4, BoardNumber ),
14277         ])
14278         pkt.Reply(28, [
14279                 rec(8, 4, CurrentServerTime ),
14280                 rec(12, 1, VConsoleVersion ),
14281                 rec(13, 1, VConsoleRevision ),
14282                 rec(14, 2, Reserved2 ),
14283                 rec(16, 4, LogTtlTxPkts ),
14284                 rec(20, 4, LogTtlRxPkts ),
14285                 rec(24, 4, UnclaimedPkts ),
14286         ])
14287         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14288         # 2222/7B1B, 123/27
14289         pkt = NCP(0x7B1B, "MLID Board Information", 'stats')
14290         pkt.Request(14, [
14291                 rec(10, 4, BoardNumber ),
14292         ])
14293         pkt.Reply(44, [
14294                 rec(8, 4, CurrentServerTime ),
14295                 rec(12, 1, VConsoleVersion ),
14296                 rec(13, 1, VConsoleRevision ),
14297                 rec(14, 1, Reserved ),
14298                 rec(15, 1, NumberOfProtocols ),
14299                 rec(16, 28, MLIDBoardInfo ),
14300         ])
14301         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14302         # 2222/7B1E, 123/30
14303         pkt = NCP(0x7B1E, "Get Media Manager Object Information", 'stats')
14304         pkt.Request(14, [
14305                 rec(10, 4, ObjectNumber ),
14306         ])
14307         pkt.Reply(212, [
14308                 rec(8, 4, CurrentServerTime ),
14309                 rec(12, 1, VConsoleVersion ),
14310                 rec(13, 1, VConsoleRevision ),
14311                 rec(14, 2, Reserved2 ),
14312                 rec(16, 196, GenericInfoDef ),
14313         ])
14314         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14315         # 2222/7B1F, 123/31
14316         pkt = NCP(0x7B1F, "Get Media Manager Objects List", 'stats')
14317         pkt.Request(15, [
14318                 rec(10, 4, StartNumber ),
14319                 rec(14, 1, MediaObjectType ),
14320         ])
14321         pkt.Reply(28, [
14322                 rec(8, 4, CurrentServerTime ),
14323                 rec(12, 1, VConsoleVersion ),
14324                 rec(13, 1, VConsoleRevision ),
14325                 rec(14, 2, Reserved2 ),
14326                 rec(16, 4, nextStartingNumber ),
14327                 rec(20, 4, ObjectCount, var="x"),
14328                 rec(24, 4, ObjectID, repeat="x"),
14329         ])
14330         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14331         # 2222/7B20, 123/32
14332         pkt = NCP(0x7B20, "Get Media Manager Object Childrens List", 'stats')
14333         pkt.Request(22, [
14334                 rec(10, 4, StartNumber ),
14335                 rec(14, 1, MediaObjectType ),
14336                 rec(15, 3, Reserved3 ),
14337                 rec(18, 4, ParentObjectNumber ),
14338         ])
14339         pkt.Reply(28, [
14340                 rec(8, 4, CurrentServerTime ),
14341                 rec(12, 1, VConsoleVersion ),
14342                 rec(13, 1, VConsoleRevision ),
14343                 rec(14, 2, Reserved2 ),
14344                 rec(16, 4, nextStartingNumber ),
14345                 rec(20, 4, ObjectCount, var="x" ),
14346                 rec(24, 4, ObjectID, repeat="x" ),
14347         ])
14348         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14349         # 2222/7B21, 123/33
14350         pkt = NCP(0x7B21, "Get Volume Segment List", 'stats')
14351         pkt.Request(14, [
14352                 rec(10, 4, VolumeNumberLong ),
14353         ])
14354         pkt.Reply(32, [
14355                 rec(8, 4, CurrentServerTime ),
14356                 rec(12, 1, VConsoleVersion ),
14357                 rec(13, 1, VConsoleRevision ),
14358                 rec(14, 2, Reserved2 ),
14359                 rec(16, 4, NumOfSegments, var="x" ),
14360                 rec(20, 12, Segments, repeat="x" ),
14361         ])
14362         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14363         # 2222/7B22, 123/34
14364         pkt = NCP(0x7B22, "Get Volume Information by Level", 'stats')
14365         pkt.Request(15, [
14366                 rec(10, 4, VolumeNumberLong ),
14367                 rec(14, 1, InfoLevelNumber ),
14368         ])
14369         pkt.Reply(NO_LENGTH_CHECK, [
14370                 rec(8, 4, CurrentServerTime ),
14371                 rec(12, 1, VConsoleVersion ),
14372                 rec(13, 1, VConsoleRevision ),
14373                 rec(14, 2, Reserved2 ),
14374                 rec(16, 1, InfoLevelNumber ),
14375                 rec(17, 3, Reserved3 ),
14376                 srec(VolInfoStructure, req_cond="ncp.info_level_num==0x01"),
14377                 srec(VolInfo2Struct, req_cond="ncp.info_level_num==0x02"),
14378         ])
14379         pkt.ReqCondSizeVariable()
14380         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14381         # 2222/7B28, 123/40
14382         pkt = NCP(0x7B28, "Active Protocol Stacks", 'stats')
14383         pkt.Request(14, [
14384                 rec(10, 4, StartNumber ),
14385         ])
14386         pkt.Reply(48, [
14387                 rec(8, 4, CurrentServerTime ),
14388                 rec(12, 1, VConsoleVersion ),
14389                 rec(13, 1, VConsoleRevision ),
14390                 rec(14, 2, Reserved2 ),
14391                 rec(16, 4, MaxNumOfLANS ),
14392                 rec(20, 4, StackCount, var="x" ),
14393                 rec(24, 4, nextStartingNumber ),
14394                 rec(28, 20, StackInfo, repeat="x" ),
14395         ])
14396         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14397         # 2222/7B29, 123/41
14398         pkt = NCP(0x7B29, "Get Protocol Stack Configuration Information", 'stats')
14399         pkt.Request(14, [
14400                 rec(10, 4, StackNumber ),
14401         ])
14402         pkt.Reply((37,164), [
14403                 rec(8, 4, CurrentServerTime ),
14404                 rec(12, 1, VConsoleVersion ),
14405                 rec(13, 1, VConsoleRevision ),
14406                 rec(14, 2, Reserved2 ),
14407                 rec(16, 1, ConfigMajorVN ),
14408                 rec(17, 1, ConfigMinorVN ),
14409                 rec(18, 1, StackMajorVN ),
14410                 rec(19, 1, StackMinorVN ),
14411                 rec(20, 16, ShortStkName ),
14412                 rec(36, (1,128), StackFullNameStr ),
14413         ])
14414         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14415         # 2222/7B2A, 123/42
14416         pkt = NCP(0x7B2A, "Get Protocol Stack Statistics Information", 'stats')
14417         pkt.Request(14, [
14418                 rec(10, 4, StackNumber ),
14419         ])
14420         pkt.Reply(38, [
14421                 rec(8, 4, CurrentServerTime ),
14422                 rec(12, 1, VConsoleVersion ),
14423                 rec(13, 1, VConsoleRevision ),
14424                 rec(14, 2, Reserved2 ),
14425                 rec(16, 1, StatMajorVersion ),
14426                 rec(17, 1, StatMinorVersion ),
14427                 rec(18, 2, ComCnts ),
14428                 rec(20, 4, CounterMask ),
14429                 rec(24, 4, TotalTxPkts ),
14430                 rec(28, 4, TotalRxPkts ),
14431                 rec(32, 4, IgnoredRxPkts ),
14432                 rec(36, 2, CustomCnts ),
14433         ])
14434         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14435         # 2222/7B2B, 123/43
14436         pkt = NCP(0x7B2B, "Get Protocol Stack Custom Information", 'stats')
14437         pkt.Request(18, [
14438                 rec(10, 4, StackNumber ),
14439                 rec(14, 4, StartNumber ),
14440         ])
14441         pkt.Reply(25, [
14442                 rec(8, 4, CurrentServerTime ),
14443                 rec(12, 1, VConsoleVersion ),
14444                 rec(13, 1, VConsoleRevision ),
14445                 rec(14, 2, Reserved2 ),
14446                 rec(16, 4, CustomCount, var="x" ),
14447                 rec(20, 5, CustomCntsInfo, repeat="x" ),
14448         ])
14449         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14450         # 2222/7B2C, 123/44
14451         pkt = NCP(0x7B2C, "Get Protocol Stack Numbers by Media Number", 'stats')
14452         pkt.Request(14, [
14453                 rec(10, 4, MediaNumber ),
14454         ])
14455         pkt.Reply(24, [
14456                 rec(8, 4, CurrentServerTime ),
14457                 rec(12, 1, VConsoleVersion ),
14458                 rec(13, 1, VConsoleRevision ),
14459                 rec(14, 2, Reserved2 ),
14460                 rec(16, 4, StackCount, var="x" ),
14461                 rec(20, 4, StackNumber, repeat="x" ),
14462         ])
14463         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14464         # 2222/7B2D, 123/45
14465         pkt = NCP(0x7B2D, "Get Protocol Stack Numbers by LAN Board Number", 'stats')
14466         pkt.Request(14, [
14467                 rec(10, 4, BoardNumber ),
14468         ])
14469         pkt.Reply(24, [
14470                 rec(8, 4, CurrentServerTime ),
14471                 rec(12, 1, VConsoleVersion ),
14472                 rec(13, 1, VConsoleRevision ),
14473                 rec(14, 2, Reserved2 ),
14474                 rec(16, 4, StackCount, var="x" ),
14475                 rec(20, 4, StackNumber, repeat="x" ),
14476         ])
14477         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14478         # 2222/7B2E, 123/46
14479         pkt = NCP(0x7B2E, "Get Media Name by Media Number", 'stats')
14480         pkt.Request(14, [
14481                 rec(10, 4, MediaNumber ),
14482         ])
14483         pkt.Reply((17,144), [
14484                 rec(8, 4, CurrentServerTime ),
14485                 rec(12, 1, VConsoleVersion ),
14486                 rec(13, 1, VConsoleRevision ),
14487                 rec(14, 2, Reserved2 ),
14488                 rec(16, (1,128), MediaName ),
14489         ])
14490         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14491         # 2222/7B2F, 123/47
14492         pkt = NCP(0x7B2F, "Get Loaded Media Number", 'stats')
14493         pkt.Request(10)
14494         pkt.Reply(28, [
14495                 rec(8, 4, CurrentServerTime ),
14496                 rec(12, 1, VConsoleVersion ),
14497                 rec(13, 1, VConsoleRevision ),
14498                 rec(14, 2, Reserved2 ),
14499                 rec(16, 4, MaxNumOfMedias ),
14500                 rec(20, 4, MediaListCount, var="x" ),
14501                 rec(24, 4, MediaList, repeat="x" ),
14502         ])
14503         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14504         # 2222/7B32, 123/50
14505         pkt = NCP(0x7B32, "Get General Router and SAP Information", 'stats')
14506         pkt.Request(10)
14507         pkt.Reply(37, [
14508                 rec(8, 4, CurrentServerTime ),
14509                 rec(12, 1, VConsoleVersion ),
14510                 rec(13, 1, VConsoleRevision ),
14511                 rec(14, 2, Reserved2 ),
14512                 rec(16, 2, RIPSocketNumber ),
14513                 rec(18, 2, Reserved2 ),
14514                 rec(20, 1, RouterDownFlag ),
14515                 rec(21, 3, Reserved3 ),
14516                 rec(24, 1, TrackOnFlag ),
14517                 rec(25, 3, Reserved3 ),
14518                 rec(28, 1, ExtRouterActiveFlag ),
14519                 rec(29, 3, Reserved3 ),
14520                 rec(32, 2, SAPSocketNumber ),
14521                 rec(34, 2, Reserved2 ),
14522                 rec(36, 1, RpyNearestSrvFlag ),
14523         ])
14524         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14525         # 2222/7B33, 123/51
14526         pkt = NCP(0x7B33, "Get Network Router Information", 'stats')
14527         pkt.Request(14, [
14528                 rec(10, 4, NetworkNumber ),
14529         ])
14530         pkt.Reply(26, [
14531                 rec(8, 4, CurrentServerTime ),
14532                 rec(12, 1, VConsoleVersion ),
14533                 rec(13, 1, VConsoleRevision ),
14534                 rec(14, 2, Reserved2 ),
14535                 rec(16, 10, KnownRoutes ),
14536         ])
14537         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
14538         # 2222/7B34, 123/52
14539         pkt = NCP(0x7B34, "Get Network Routers Information", 'stats')
14540         pkt.Request(18, [
14541                 rec(10, 4, NetworkNumber),
14542                 rec(14, 4, StartNumber ),
14543         ])
14544         pkt.Reply(34, [
14545                 rec(8, 4, CurrentServerTime ),
14546                 rec(12, 1, VConsoleVersion ),
14547                 rec(13, 1, VConsoleRevision ),
14548                 rec(14, 2, Reserved2 ),
14549                 rec(16, 4, NumOfEntries, var="x" ),
14550                 rec(20, 14, RoutersInfo, repeat="x" ),
14551         ])
14552         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
14553         # 2222/7B35, 123/53
14554         pkt = NCP(0x7B35, "Get Known Networks Information", 'stats')
14555         pkt.Request(14, [
14556                 rec(10, 4, StartNumber ),
14557         ])
14558         pkt.Reply(30, [
14559                 rec(8, 4, CurrentServerTime ),
14560                 rec(12, 1, VConsoleVersion ),
14561                 rec(13, 1, VConsoleRevision ),
14562                 rec(14, 2, Reserved2 ),
14563                 rec(16, 4, NumOfEntries, var="x" ),
14564                 rec(20, 10, KnownRoutes, repeat="x" ),
14565         ])
14566         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14567         # 2222/7B36, 123/54
14568         pkt = NCP(0x7B36, "Get Server Information", 'stats')
14569         pkt.Request((15,64), [
14570                 rec(10, 2, ServerType ),
14571                 rec(12, 2, Reserved2 ),
14572                 rec(14, (1,50), ServerNameLen ),
14573         ], info_str=(ServerNameLen, "Get Server Information: %s", ", %s"))
14574         pkt.Reply(30, [
14575                 rec(8, 4, CurrentServerTime ),
14576                 rec(12, 1, VConsoleVersion ),
14577                 rec(13, 1, VConsoleRevision ),
14578                 rec(14, 2, Reserved2 ),
14579                 rec(16, 12, ServerAddress ),
14580                 rec(28, 2, HopsToNet ),
14581         ])
14582         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14583         # 2222/7B37, 123/55
14584         pkt = NCP(0x7B37, "Get Server Sources Information", 'stats')
14585         pkt.Request((19,68), [
14586                 rec(10, 4, StartNumber ),
14587                 rec(14, 2, ServerType ),
14588                 rec(16, 2, Reserved2 ),
14589                 rec(18, (1,50), ServerNameLen ),
14590         ], info_str=(ServerNameLen, "Get Server Sources Info: %s", ", %s"))
14591         pkt.Reply(32, [
14592                 rec(8, 4, CurrentServerTime ),
14593                 rec(12, 1, VConsoleVersion ),
14594                 rec(13, 1, VConsoleRevision ),
14595                 rec(14, 2, Reserved2 ),
14596                 rec(16, 4, NumOfEntries, var="x" ),
14597                 rec(20, 12, ServersSrcInfo, repeat="x" ),
14598         ])
14599         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
14600         # 2222/7B38, 123/56
14601         pkt = NCP(0x7B38, "Get Known Servers Information", 'stats')
14602         pkt.Request(16, [
14603                 rec(10, 4, StartNumber ),
14604                 rec(14, 2, ServerType ),
14605         ])
14606         pkt.Reply(35, [
14607                 rec(8, 4, CurrentServerTime ),
14608                 rec(12, 1, VConsoleVersion ),
14609                 rec(13, 1, VConsoleRevision ),
14610                 rec(14, 2, Reserved2 ),
14611                 rec(16, 4, NumOfEntries, var="x" ),
14612                 rec(20, 15, KnownServStruc, repeat="x" ),
14613         ])
14614         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
14615         # 2222/7B3C, 123/60
14616         pkt = NCP(0x7B3C, "Get Server Set Commands Information", 'stats')
14617         pkt.Request(14, [
14618                 rec(10, 4, StartNumber ),
14619         ])
14620         pkt.Reply(NO_LENGTH_CHECK, [
14621                 rec(8, 4, CurrentServerTime ),
14622                 rec(12, 1, VConsoleVersion ),
14623                 rec(13, 1, VConsoleRevision ),
14624                 rec(14, 2, Reserved2 ),
14625                 rec(16, 4, TtlNumOfSetCmds ),
14626                 rec(20, 4, nextStartingNumber ),
14627                 rec(24, 1, SetCmdType ),
14628                 rec(25, 3, Reserved3 ),
14629                 rec(28, 1, SetCmdCategory ),
14630                 rec(29, 3, Reserved3 ),
14631                 rec(32, 1, SetCmdFlags ),
14632                 rec(33, 3, Reserved3 ),
14633                 rec(36, 100, SetCmdName ),
14634                 rec(136, 4, SetCmdValueNum ),
14635         ])                
14636         pkt.ReqCondSizeVariable()
14637         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14638         # 2222/7B3D, 123/61
14639         pkt = NCP(0x7B3D, "Get Server Set Categories", 'stats')
14640         pkt.Request(14, [
14641                 rec(10, 4, StartNumber ),
14642         ])
14643         pkt.Reply(NO_LENGTH_CHECK, [
14644                 rec(8, 4, CurrentServerTime ),
14645                 rec(12, 1, VConsoleVersion ),
14646                 rec(13, 1, VConsoleRevision ),
14647                 rec(14, 2, Reserved2 ),
14648                 rec(16, 4, NumberOfSetCategories ),
14649                 rec(20, 4, nextStartingNumber ),
14650                 rec(24, PROTO_LENGTH_UNKNOWN, CategoryName ),
14651         ])
14652         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14653         # 2222/7B3E, 123/62
14654         pkt = NCP(0x7B3E, "Get Server Set Commands Information By Name", 'stats')
14655         pkt.Request(NO_LENGTH_CHECK, [
14656                 rec(10, PROTO_LENGTH_UNKNOWN, SetParmName ),
14657         ], info_str=(SetParmName, "Get Server Set Command Info for: %s", ", %s"))
14658         pkt.Reply(NO_LENGTH_CHECK, [
14659                 rec(8, 4, CurrentServerTime ),
14660                 rec(12, 1, VConsoleVersion ),
14661                 rec(13, 1, VConsoleRevision ),
14662                 rec(14, 2, Reserved2 ),
14663         rec(16, 4, TtlNumOfSetCmds ),
14664         rec(20, 4, nextStartingNumber ),
14665         rec(24, 1, SetCmdType ),
14666         rec(25, 3, Reserved3 ),
14667         rec(28, 1, SetCmdCategory ),
14668         rec(29, 3, Reserved3 ),
14669         rec(32, 1, SetCmdFlags ),
14670         rec(33, 3, Reserved3 ),
14671         rec(36, PROTO_LENGTH_UNKNOWN, SetCmdName ),
14672                 #rec(136, 4, SetCmdValueNum ),
14673         ])                
14674         pkt.ReqCondSizeVariable()
14675         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14676         # 2222/7B46, 123/70
14677         pkt = NCP(0x7B46, "Get Current Compressing File", 'stats')
14678         pkt.Request(14, [
14679                 rec(10, 4, VolumeNumberLong ),
14680         ])
14681         pkt.Reply(56, [
14682                 rec(8, 4, ParentID ),
14683                 rec(12, 4, DirectoryEntryNumber ),
14684                 rec(16, 4, compressionStage ),
14685                 rec(20, 4, ttlIntermediateBlks ),
14686                 rec(24, 4, ttlCompBlks ),
14687                 rec(28, 4, curIntermediateBlks ),
14688                 rec(32, 4, curCompBlks ),
14689                 rec(36, 4, curInitialBlks ),
14690                 rec(40, 4, fileFlags ),
14691                 rec(44, 4, projectedCompSize ),
14692                 rec(48, 4, originalSize ),
14693                 rec(52, 4, compressVolume ),
14694         ])
14695         pkt.CompletionCodes([0x0000, 0x7e00, 0x7901, 0xfb06, 0xff00])
14696         # 2222/7B47, 123/71
14697         pkt = NCP(0x7B47, "Get Current DeCompressing File Info List", 'stats')
14698         pkt.Request(14, [
14699                 rec(10, 4, VolumeNumberLong ),
14700         ])
14701         pkt.Reply(28, [
14702                 rec(8, 4, FileListCount ),
14703                 rec(12, 16, FileInfoStruct ),
14704         ])
14705         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
14706         # 2222/7B48, 123/72
14707         pkt = NCP(0x7B48, "Get Compression and Decompression Time and Counts", 'stats')
14708         pkt.Request(14, [
14709                 rec(10, 4, VolumeNumberLong ),
14710         ])
14711         pkt.Reply(64, [
14712                 rec(8, 56, CompDeCompStat ),
14713         ])
14714         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
14715         # 2222/8301, 131/01
14716         pkt = NCP(0x8301, "RPC Load an NLM", 'fileserver')
14717         pkt.Request(NO_LENGTH_CHECK, [
14718                 rec(10, 4, NLMLoadOptions ),
14719                 rec(14, 16, Reserved16 ),
14720                 rec(30, PROTO_LENGTH_UNKNOWN, PathAndName ),
14721         ], info_str=(PathAndName, "RPC Load NLM: %s", ", %s"))
14722         pkt.Reply(12, [
14723                 rec(8, 4, RPCccode ),
14724         ])
14725         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14726         # 2222/8302, 131/02
14727         pkt = NCP(0x8302, "RPC Unload an NLM", 'fileserver')
14728         pkt.Request(NO_LENGTH_CHECK, [
14729                 rec(10, 20, Reserved20 ),
14730                 rec(30, PROTO_LENGTH_UNKNOWN, NLMName ),
14731         ], info_str=(NLMName, "RPC Unload NLM: %s", ", %s"))
14732         pkt.Reply(12, [
14733                 rec(8, 4, RPCccode ),
14734         ])
14735         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14736         # 2222/8303, 131/03
14737         pkt = NCP(0x8303, "RPC Mount Volume", 'fileserver')
14738         pkt.Request(NO_LENGTH_CHECK, [
14739                 rec(10, 20, Reserved20 ),
14740                 rec(30, PROTO_LENGTH_UNKNOWN, VolumeNameStringz ),
14741         ], info_str=(VolumeNameStringz, "RPC Mount Volume: %s", ", %s"))
14742         pkt.Reply(32, [
14743                 rec(8, 4, RPCccode),
14744                 rec(12, 16, Reserved16 ),
14745                 rec(28, 4, VolumeNumberLong ),
14746         ])
14747         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14748         # 2222/8304, 131/04
14749         pkt = NCP(0x8304, "RPC Dismount Volume", 'fileserver')
14750         pkt.Request(NO_LENGTH_CHECK, [
14751                 rec(10, 20, Reserved20 ),
14752                 rec(30, PROTO_LENGTH_UNKNOWN, VolumeNameStringz ),
14753         ], info_str=(VolumeNameStringz, "RPC Dismount Volume: %s", ", %s"))
14754         pkt.Reply(12, [
14755                 rec(8, 4, RPCccode ),
14756         ])
14757         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14758         # 2222/8305, 131/05
14759         pkt = NCP(0x8305, "RPC Add Name Space To Volume", 'fileserver')
14760         pkt.Request(NO_LENGTH_CHECK, [
14761                 rec(10, 20, Reserved20 ),
14762                 rec(30, PROTO_LENGTH_UNKNOWN, AddNameSpaceAndVol ),
14763         ], info_str=(AddNameSpaceAndVol, "RPC Add Name Space to Volume: %s", ", %s"))
14764         pkt.Reply(12, [
14765                 rec(8, 4, RPCccode ),
14766         ])
14767         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14768         # 2222/8306, 131/06
14769         pkt = NCP(0x8306, "RPC Set Command Value", 'fileserver')
14770         pkt.Request(NO_LENGTH_CHECK, [
14771                 rec(10, 1, SetCmdType ),
14772                 rec(11, 3, Reserved3 ),
14773                 rec(14, 4, SetCmdValueNum ),
14774                 rec(18, 12, Reserved12 ),
14775                 rec(30, PROTO_LENGTH_UNKNOWN, SetCmdName ),
14776                 #
14777                 # XXX - optional string, if SetCmdType is 0
14778                 #
14779         ], info_str=(SetCmdName, "RPC Set Command Value: %s", ", %s"))
14780         pkt.Reply(12, [
14781                 rec(8, 4, RPCccode ),
14782         ])
14783         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14784         # 2222/8307, 131/07
14785         pkt = NCP(0x8307, "RPC Execute NCF File", 'fileserver')
14786         pkt.Request(NO_LENGTH_CHECK, [
14787                 rec(10, 20, Reserved20 ),
14788                 rec(30, PROTO_LENGTH_UNKNOWN, PathAndName ),
14789         ], info_str=(PathAndName, "RPC Execute NCF File: %s", ", %s"))
14790         pkt.Reply(12, [
14791                 rec(8, 4, RPCccode ),
14792         ])
14793         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14794 if __name__ == '__main__':
14795 #       import profile
14796 #       filename = "ncp.pstats"
14797 #       profile.run("main()", filename)
14798 #
14799 #       import pstats
14800 #       sys.stdout = msg
14801 #       p = pstats.Stats(filename)
14802 #
14803 #       print "Stats sorted by cumulative time"
14804 #       p.strip_dirs().sort_stats('cumulative').print_stats()
14805 #
14806 #       print "Function callees"
14807 #       p.print_callees()
14808         main()