Fix build by #if 0 out unused de_sgsap_tmsi() function.
[obnox/wireshark/wip.git] / tools / ncp2222.py
1 #!/usr/bin/env python
2
3 """
4 Creates C code from a table of NCP type 0x2222 packet types.
5 (And 0x3333, which are the replies, but the packets are more commonly
6 refered to as type 0x2222; the 0x3333 replies are understood to be
7 part of the 0x2222 "family")
8
9 The data-munging code was written by Gilbert Ramirez.
10 The NCP data comes from Greg Morris <GMORRIS@novell.com>.
11 Many thanks to Novell for letting him work on this.
12
13 Additional data sources:
14 "Programmer's Guide to the NetWare Core Protocol" by Steve Conner and Dianne Conner.
15
16 Novell provides info at:
17
18 http://developer.novell.com/ndk/ncp.htm  (where you can download an
19 *.exe file which installs a PDF, although you may have to create a login
20 to do this)
21
22 or
23
24 http://developer.novell.com/ndk/doc/ncp/
25 for a badly-formatted HTML version of the same PDF.
26
27
28 $Id$
29
30
31 Portions Copyright (c) 2000-2002 by Gilbert Ramirez <gram@alumni.rice.edu>.
32 Portions Copyright (c) Novell, Inc. 2000-2003.
33
34 This program is free software; you can redistribute it and/or
35 modify it under the terms of the GNU General Public License
36 as published by the Free Software Foundation; either version 2
37 of the License, or (at your option) any later version.
38
39 This program is distributed in the hope that it will be useful,
40 but WITHOUT ANY WARRANTY; without even the implied warranty of
41 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
42 GNU General Public License for more details.
43
44 You should have received a copy of the GNU General Public License
45 along with this program; if not, write to the Free Software
46 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
47 """
48
49 import os
50 import sys
51 import string
52 import getopt
53 import traceback
54
55 errors          = {}
56 groups          = {}
57 packets         = []
58 compcode_lists  = None
59 ptvc_lists      = None
60 msg             = None
61 reply_var = None
62
63 REC_START       = 0
64 REC_LENGTH      = 1
65 REC_FIELD       = 2
66 REC_ENDIANNESS  = 3
67 REC_VAR         = 4
68 REC_REPEAT      = 5
69 REC_REQ_COND    = 6
70
71 NO_VAR          = -1
72 NO_REPEAT       = -1
73 NO_REQ_COND     = -1
74 NO_LENGTH_CHECK = -2
75
76
77 PROTO_LENGTH_UNKNOWN    = -1
78
79 global_highest_var = -1
80 global_req_cond = {}
81
82
83 REQ_COND_SIZE_VARIABLE = "REQ_COND_SIZE_VARIABLE"
84 REQ_COND_SIZE_CONSTANT = "REQ_COND_SIZE_CONSTANT"
85
86 ##############################################################################
87 # Global containers
88 ##############################################################################
89
90 class UniqueCollection:
91         """The UniqueCollection class stores objects which can be compared to other
92         objects of the same class. If two objects in the collection are equivalent,
93         only one is stored."""
94
95         def __init__(self, name):
96                 "Constructor"
97                 self.name = name
98                 self.members = []
99                 self.member_reprs = {}
100
101         def Add(self, object):
102                 """Add an object to the members lists, if a comparable object
103                 doesn't already exist. The object that is in the member list, that is
104                 either the object that was added or the comparable object that was
105                 already in the member list, is returned."""
106
107                 r = repr(object)
108                 # Is 'object' a duplicate of some other member?
109                 if self.member_reprs.has_key(r):
110                         return self.member_reprs[r]
111                 else:
112                         self.member_reprs[r] = object
113                         self.members.append(object)
114                         return object
115
116         def Members(self):
117                 "Returns the list of members."
118                 return self.members
119
120         def HasMember(self, object):
121                 "Does the list of members contain the object?"
122                 if self.members_reprs.has_key(repr(object)):
123                         return 1
124                 else:
125                         return 0
126
127 # This list needs to be defined before the NCP types are defined,
128 # because the NCP types are defined in the global scope, not inside
129 # a function's scope.
130 ptvc_lists      = UniqueCollection('PTVC Lists')
131
132 ##############################################################################
133
134 class NamedList:
135         "NamedList's keep track of PTVC's and Completion Codes"
136         def __init__(self, name, list):
137                 "Constructor"
138                 self.name = name
139                 self.list = list
140
141         def __cmp__(self, other):
142                 "Compare this NamedList to another"
143
144                 if isinstance(other, NamedList):
145                         return cmp(self.list, other.list)
146                 else:
147                         return 0
148
149
150         def Name(self, new_name = None):
151                 "Get/Set name of list"
152                 if new_name != None:
153                         self.name = new_name
154                 return self.name
155
156         def Records(self):
157                 "Returns record lists"
158                 return self.list
159
160         def Null(self):
161                 "Is there no list (different from an empty list)?"
162                 return self.list == None
163
164         def Empty(self):
165                 "It the list empty (different from a null list)?"
166                 assert(not self.Null())
167
168                 if self.list:
169                         return 0
170                 else:
171                         return 1
172
173         def __repr__(self):
174                 return repr(self.list)
175
176 class PTVC(NamedList):
177         """ProtoTree TVBuff Cursor List ("PTVC List") Class"""
178
179         def __init__(self, name, records):
180                 "Constructor"
181                 NamedList.__init__(self, name, [])
182
183                 global global_highest_var
184
185                 expected_offset = None
186                 highest_var = -1
187
188                 named_vars = {}
189
190                 # Make a PTVCRecord object for each list in 'records'
191                 for record in records:
192                         offset = record[REC_START]
193                         length = record[REC_LENGTH]
194                         field = record[REC_FIELD]
195                         endianness = record[REC_ENDIANNESS]
196
197                         # Variable
198                         var_name = record[REC_VAR]
199                         if var_name:
200                                 # Did we already define this var?
201                                 if named_vars.has_key(var_name):
202                                         sys.exit("%s has multiple %s vars." % \
203                                                 (name, var_name))
204
205                                 highest_var = highest_var + 1
206                                 var = highest_var
207                                 if highest_var > global_highest_var:
208                                     global_highest_var = highest_var
209                                 named_vars[var_name] = var
210                         else:
211                                 var = NO_VAR
212
213                         # Repeat
214                         repeat_name = record[REC_REPEAT]
215                         if repeat_name:
216                                 # Do we have this var?
217                                 if not named_vars.has_key(repeat_name):
218                                         sys.exit("%s does not have %s var defined." % \
219                                                 (name, var_name))
220                                 repeat = named_vars[repeat_name]
221                         else:
222                                 repeat = NO_REPEAT
223
224                         # Request Condition
225                         req_cond = record[REC_REQ_COND]
226                         if req_cond != NO_REQ_COND:
227                                 global_req_cond[req_cond] = None
228
229                         ptvc_rec = PTVCRecord(field, length, endianness, var, repeat, req_cond)
230
231                         if expected_offset == None:
232                                 expected_offset = offset
233
234                         elif expected_offset == -1:
235                                 pass
236
237                         elif expected_offset != offset and offset != -1:
238                                 msg.write("Expected offset in %s for %s to be %d\n" % \
239                                         (name, field.HFName(), expected_offset))
240                                 sys.exit(1)
241
242                         # We can't make a PTVC list from a variable-length
243                         # packet, unless the fields can tell us at run time
244                         # how long the packet is. That is, nstring8 is fine, since
245                         # the field has an integer telling us how long the string is.
246                         # Fields that don't have a length determinable at run-time
247                         # cannot be variable-length.
248                         if type(ptvc_rec.Length()) == type(()):
249                                 if isinstance(ptvc_rec.Field(), nstring):
250                                         expected_offset = -1
251                                         pass
252                                 elif isinstance(ptvc_rec.Field(), nbytes):
253                                         expected_offset = -1
254                                         pass
255                                 elif isinstance(ptvc_rec.Field(), struct):
256                                         expected_offset = -1
257                                         pass
258                                 else:
259                                         field = ptvc_rec.Field()
260                                         assert 0, "Cannot make PTVC from %s, type %s" % \
261                                                 (field.HFName(), field)
262
263                         elif expected_offset > -1:
264                                 if ptvc_rec.Length() < 0:
265                                         expected_offset = -1
266                                 else:
267                                         expected_offset = expected_offset + ptvc_rec.Length()
268
269
270                         self.list.append(ptvc_rec)
271
272         def ETTName(self):
273                 return "ett_%s" % (self.Name(),)
274
275
276         def Code(self):
277                 x =  "static const ptvc_record %s[] = {\n" % (self.Name())
278                 for ptvc_rec in self.list:
279                         x = x +  "\t%s,\n" % (ptvc_rec.Code())
280                 x = x + "\t{ NULL, 0, NULL, NO_ENDIANNESS, NO_VAR, NO_REPEAT, NO_REQ_COND, NCP_FMT_NONE }\n"
281                 x = x + "};\n"
282                 return x
283
284         def __repr__(self):
285                 x = ""
286                 for ptvc_rec in self.list:
287                         x = x + repr(ptvc_rec)
288                 return x
289
290
291 class PTVCBitfield(PTVC):
292         def __init__(self, name, vars):
293                 NamedList.__init__(self, name, [])
294
295                 for var in vars:
296                         ptvc_rec = PTVCRecord(var, var.Length(), var.Endianness(),
297                                 NO_VAR, NO_REPEAT, NO_REQ_COND)
298                         self.list.append(ptvc_rec)
299
300         def Code(self):
301                 ett_name = self.ETTName()
302                 x = "static gint %s = -1;\n" % (ett_name,)
303
304                 x = x + "static const ptvc_record ptvc_%s[] = {\n" % (self.Name())
305                 for ptvc_rec in self.list:
306                         x = x +  "\t%s,\n" % (ptvc_rec.Code())
307                 x = x + "\t{ NULL, 0, NULL, NO_ENDIANNESS, NO_VAR, NO_REPEAT, NO_REQ_COND, NCP_FMT_NONE }\n"
308                 x = x + "};\n"
309
310                 x = x + "static const sub_ptvc_record %s = {\n" % (self.Name(),)
311                 x = x + "\t&%s,\n" % (ett_name,)
312                 x = x + "\tNULL,\n"
313                 x = x + "\tptvc_%s,\n" % (self.Name(),)
314                 x = x + "};\n"
315                 return x
316
317
318 class PTVCRecord:
319         def __init__(self, field, length, endianness, var, repeat, req_cond):
320                 "Constructor"
321                 self.field      = field
322                 self.length     = length
323                 self.endianness = endianness
324                 self.var        = var
325                 self.repeat     = repeat
326                 self.req_cond   = req_cond
327
328         def __cmp__(self, other):
329                 "Comparison operator"
330                 if self.field != other.field:
331                         return 1
332                 elif self.length < other.length:
333                         return -1
334                 elif self.length > other.length:
335                         return 1
336                 elif self.endianness != other.endianness:
337                         return 1
338                 else:
339                         return 0
340
341         def Code(self):
342                 # Nice textual representations
343                 if self.var == NO_VAR:
344                         var = "NO_VAR"
345                 else:
346                         var = self.var
347
348                 if self.repeat == NO_REPEAT:
349                         repeat = "NO_REPEAT"
350                 else:
351                         repeat = self.repeat
352
353                 if self.req_cond == NO_REQ_COND:
354                         req_cond = "NO_REQ_COND"
355                 else:
356                         req_cond = global_req_cond[self.req_cond]
357                         assert req_cond != None
358
359                 if isinstance(self.field, struct):
360                         return self.field.ReferenceString(var, repeat, req_cond)
361                 else:
362                         return self.RegularCode(var, repeat, req_cond)
363
364         def RegularCode(self, var, repeat, req_cond):
365                 "String representation"
366                 endianness = 'BE'
367                 if self.endianness == LE:
368                         endianness = 'LE'
369
370                 length = None
371
372                 if type(self.length) == type(0):
373                         length = self.length
374                 else:
375                         # This is for cases where a length is needed
376                         # in order to determine a following variable-length,
377                         # like nstring8, where 1 byte is needed in order
378                         # to determine the variable length.
379                         var_length = self.field.Length()
380                         if var_length > 0:
381                                 length = var_length
382
383                 if length == PROTO_LENGTH_UNKNOWN:
384                         # XXX length = "PROTO_LENGTH_UNKNOWN"
385                         pass
386
387                 assert length, "Length not handled for %s" % (self.field.HFName(),)
388
389                 sub_ptvc_name = self.field.PTVCName()
390                 if sub_ptvc_name != "NULL":
391                         sub_ptvc_name = "&%s" % (sub_ptvc_name,)
392
393
394                 return "{ &%s, %s, %s, %s, %s, %s, %s, %s }" % \
395                         (self.field.HFName(), length, sub_ptvc_name,
396                         endianness, var, repeat, req_cond,
397                         self.field.SpecialFmt())
398
399         def Offset(self):
400                 return self.offset
401
402         def Length(self):
403                 return self.length
404
405         def Field(self):
406                 return self.field
407
408         def __repr__(self):
409                 return "{%s len=%s end=%s var=%s rpt=%s rqc=%s}" % \
410                         (self.field.HFName(), self.length,
411                         self.endianness, self.var, self.repeat, self.req_cond)
412
413 ##############################################################################
414
415 class NCP:
416         "NCP Packet class"
417         def __init__(self, func_code, description, group, has_length=1):
418                 "Constructor"
419                 self.func_code          = func_code
420                 self.description        = description
421                 self.group              = group
422                 self.codes              = None
423                 self.request_records    = None
424                 self.reply_records      = None
425                 self.has_length         = has_length
426                 self.req_cond_size      = None
427                 self.req_info_str       = None
428
429                 if not groups.has_key(group):
430                         msg.write("NCP 0x%x has invalid group '%s'\n" % \
431                                 (self.func_code, group))
432                         sys.exit(1)
433
434                 if self.HasSubFunction():
435                         # NCP Function with SubFunction
436                         self.start_offset = 10
437                 else:
438                         # Simple NCP Function
439                         self.start_offset = 7
440
441         def ReqCondSize(self):
442                 return self.req_cond_size
443
444         def ReqCondSizeVariable(self):
445                 self.req_cond_size = REQ_COND_SIZE_VARIABLE
446
447         def ReqCondSizeConstant(self):
448                 self.req_cond_size = REQ_COND_SIZE_CONSTANT
449
450         def FunctionCode(self, part=None):
451                 "Returns the function code for this NCP packet."
452                 if part == None:
453                         return self.func_code
454                 elif part == 'high':
455                         if self.HasSubFunction():
456                                 return (self.func_code & 0xff00) >> 8
457                         else:
458                                 return self.func_code
459                 elif part == 'low':
460                         if self.HasSubFunction():
461                                 return self.func_code & 0x00ff
462                         else:
463                                 return 0x00
464                 else:
465                         msg.write("Unknown directive '%s' for function_code()\n" % (part))
466                         sys.exit(1)
467
468         def HasSubFunction(self):
469                 "Does this NPC packet require a subfunction field?"
470                 if self.func_code <= 0xff:
471                         return 0
472                 else:
473                         return 1
474
475         def HasLength(self):
476                 return self.has_length
477
478         def Description(self):
479                 return self.description
480
481         def Group(self):
482                 return self.group
483
484         def PTVCRequest(self):
485                 return self.ptvc_request
486
487         def PTVCReply(self):
488                 return self.ptvc_reply
489
490         def Request(self, size, records=[], **kwargs):
491                 self.request_size = size
492                 self.request_records = records
493                 if self.HasSubFunction():
494                         if self.HasLength():
495                                 self.CheckRecords(size, records, "Request", 10)
496                         else:
497                                 self.CheckRecords(size, records, "Request", 8)
498                 else:
499                         self.CheckRecords(size, records, "Request", 7)
500                 self.ptvc_request = self.MakePTVC(records, "request")
501
502                 if kwargs.has_key("info_str"):
503                         self.req_info_str = kwargs["info_str"]
504
505         def Reply(self, size, records=[]):
506                 self.reply_size = size
507                 self.reply_records = records
508                 self.CheckRecords(size, records, "Reply", 8)
509                 self.ptvc_reply = self.MakePTVC(records, "reply")
510
511         def CheckRecords(self, size, records, descr, min_hdr_length):
512                 "Simple sanity check"
513                 if size == NO_LENGTH_CHECK:
514                         return
515                 min = size
516                 max = size
517                 if type(size) == type(()):
518                         min = size[0]
519                         max = size[1]
520
521                 lower = min_hdr_length
522                 upper = min_hdr_length
523
524                 for record in records:
525                         rec_size = record[REC_LENGTH]
526                         rec_lower = rec_size
527                         rec_upper = rec_size
528                         if type(rec_size) == type(()):
529                                 rec_lower = rec_size[0]
530                                 rec_upper = rec_size[1]
531
532                         lower = lower + rec_lower
533                         upper = upper + rec_upper
534
535                 error = 0
536                 if min != lower:
537                         msg.write("%s records for 2222/0x%x sum to %d bytes minimum, but param1 shows %d\n" \
538                                 % (descr, self.FunctionCode(), lower, min))
539                         error = 1
540                 if max != upper:
541                         msg.write("%s records for 2222/0x%x sum to %d bytes maximum, but param1 shows %d\n" \
542                                 % (descr, self.FunctionCode(), upper, max))
543                         error = 1
544
545                 if error == 1:
546                         sys.exit(1)
547
548
549         def MakePTVC(self, records, name_suffix):
550                 """Makes a PTVC out of a request or reply record list. Possibly adds
551                 it to the global list of PTVCs (the global list is a UniqueCollection,
552                 so an equivalent PTVC may already be in the global list)."""
553
554                 name = "%s_%s" % (self.CName(), name_suffix)
555                 ptvc = PTVC(name, records)
556                 return ptvc_lists.Add(ptvc)
557
558         def CName(self):
559                 "Returns a C symbol based on the NCP function code"
560                 return "ncp_0x%x" % (self.func_code)
561
562         def InfoStrName(self):
563                 "Returns a C symbol based on the NCP function code, for the info_str"
564                 return "info_str_0x%x" % (self.func_code)
565
566         def Variables(self):
567                 """Returns a list of variables used in the request and reply records.
568                 A variable is listed only once, even if it is used twice (once in
569                 the request, once in the reply)."""
570
571                 variables = {}
572                 if self.request_records:
573                         for record in self.request_records:
574                                 var = record[REC_FIELD]
575                                 variables[var.HFName()] = var
576
577                                 sub_vars = var.SubVariables()
578                                 for sv in sub_vars:
579                                         variables[sv.HFName()] = sv
580
581                 if self.reply_records:
582                         for record in self.reply_records:
583                                 var = record[REC_FIELD]
584                                 variables[var.HFName()] = var
585
586                                 sub_vars = var.SubVariables()
587                                 for sv in sub_vars:
588                                         variables[sv.HFName()] = sv
589
590                 return variables.values()
591
592         def CalculateReqConds(self):
593                 """Returns a list of request conditions (dfilter text) used
594                 in the reply records. A request condition is listed only once,"""
595                 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 WiresharkFType(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 = -1;\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 uint64(Type, CountingNumber):
875         type    = "uint64"
876         ftype   = "FT_UINT64"
877         def __init__(self, abbrev, descr, endianness = LE):
878                 Type.__init__(self, abbrev, descr, 8, endianness)
879
880 class boolean8(uint8):
881         type    = "boolean8"
882         ftype   = "FT_BOOLEAN"
883         disp    = "BASE_NONE"
884
885 class boolean16(uint16):
886         type    = "boolean16"
887         ftype   = "FT_BOOLEAN"
888         disp    = "BASE_NONE"
889
890 class boolean24(uint24):
891         type    = "boolean24"
892         ftype   = "FT_BOOLEAN"
893         disp    = "BASE_NONE"
894
895 class boolean32(uint32):
896         type    = "boolean32"
897         ftype   = "FT_BOOLEAN"
898         disp    = "BASE_NONE"
899
900 class nstring:
901         pass
902
903 class nstring8(Type, nstring):
904         """A string of up to (2^8)-1 characters. The first byte
905         gives the string length."""
906
907         type    = "nstring8"
908         ftype   = "FT_UINT_STRING"
909         disp    = "BASE_NONE"
910         def __init__(self, abbrev, descr):
911                 Type.__init__(self, abbrev, descr, 1)
912
913 class nstring16(Type, nstring):
914         """A string of up to (2^16)-2 characters. The first 2 bytes
915         gives the string length."""
916
917         type    = "nstring16"
918         ftype   = "FT_UINT_STRING"
919         disp    = "BASE_NONE"
920         def __init__(self, abbrev, descr, endianness = LE):
921                 Type.__init__(self, abbrev, descr, 2, endianness)
922
923 class nstring32(Type, nstring):
924         """A string of up to (2^32)-4 characters. The first 4 bytes
925         gives the string length."""
926
927         type    = "nstring32"
928         ftype   = "FT_UINT_STRING"
929         disp    = "BASE_NONE"
930         def __init__(self, abbrev, descr, endianness = LE):
931                 Type.__init__(self, abbrev, descr, 4, endianness)
932
933 class fw_string(Type):
934         """A fixed-width string of n bytes."""
935
936         type    = "fw_string"
937         disp    = "BASE_NONE"
938         ftype   = "FT_STRING"
939
940         def __init__(self, abbrev, descr, bytes):
941                 Type.__init__(self, abbrev, descr, bytes)
942
943
944 class stringz(Type):
945         "NUL-terminated string, with a maximum length"
946
947         type    = "stringz"
948         disp    = "BASE_NONE"
949         ftype   = "FT_STRINGZ"
950         def __init__(self, abbrev, descr):
951                 Type.__init__(self, abbrev, descr, PROTO_LENGTH_UNKNOWN)
952
953 class val_string(Type):
954         """Abstract class for val_stringN, where N is number
955         of bits that key takes up."""
956
957         type    = "val_string"
958         disp    = 'BASE_HEX'
959
960         def __init__(self, abbrev, descr, val_string_array, endianness = LE):
961                 Type.__init__(self, abbrev, descr, self.bytes, endianness)
962                 self.values = val_string_array
963
964         def Code(self):
965                 result = "static const value_string %s[] = {\n" \
966                                 % (self.ValuesCName())
967                 for val_record in self.values:
968                         value   = val_record[0]
969                         text    = val_record[1]
970                         value_repr = self.value_format % value
971                         result = result + '\t{ %s,\t"%s" },\n' \
972                                         % (value_repr, text)
973
974                 value_repr = self.value_format % 0
975                 result = result + "\t{ %s,\tNULL },\n" % (value_repr)
976                 result = result + "};\n"
977                 REC_VAL_STRING_RES = self.value_format % value
978                 return result
979
980         def ValuesCName(self):
981                 return "ncp_%s_vals" % (self.abbrev)
982
983         def ValuesName(self):
984                 return "VALS(%s)" % (self.ValuesCName())
985
986 class val_string8(val_string):
987         type            = "val_string8"
988         ftype           = "FT_UINT8"
989         bytes           = 1
990         value_format    = "0x%02x"
991
992 class val_string16(val_string):
993         type            = "val_string16"
994         ftype           = "FT_UINT16"
995         bytes           = 2
996         value_format    = "0x%04x"
997
998 class val_string32(val_string):
999         type            = "val_string32"
1000         ftype           = "FT_UINT32"
1001         bytes           = 4
1002         value_format    = "0x%08x"
1003
1004 class bytes(Type):
1005         type    = 'bytes'
1006         disp    = "BASE_NONE"
1007         ftype   = 'FT_BYTES'
1008
1009         def __init__(self, abbrev, descr, bytes):
1010                 Type.__init__(self, abbrev, descr, bytes, NA)
1011
1012 class nbytes:
1013         pass
1014
1015 class nbytes8(Type, nbytes):
1016         """A series of up to (2^8)-1 bytes. The first byte
1017         gives the byte-string length."""
1018
1019         type    = "nbytes8"
1020         ftype   = "FT_UINT_BYTES"
1021         disp    = "BASE_NONE"
1022         def __init__(self, abbrev, descr, endianness = LE):
1023                 Type.__init__(self, abbrev, descr, 1, endianness)
1024
1025 class nbytes16(Type, nbytes):
1026         """A series of up to (2^16)-2 bytes. The first 2 bytes
1027         gives the byte-string length."""
1028
1029         type    = "nbytes16"
1030         ftype   = "FT_UINT_BYTES"
1031         disp    = "BASE_NONE"
1032         def __init__(self, abbrev, descr, endianness = LE):
1033                 Type.__init__(self, abbrev, descr, 2, endianness)
1034
1035 class nbytes32(Type, nbytes):
1036         """A series of up to (2^32)-4 bytes. The first 4 bytes
1037         gives the byte-string length."""
1038
1039         type    = "nbytes32"
1040         ftype   = "FT_UINT_BYTES"
1041         disp    = "BASE_NONE"
1042         def __init__(self, abbrev, descr, endianness = LE):
1043                 Type.__init__(self, abbrev, descr, 4, endianness)
1044
1045 class bf_uint(Type):
1046         type    = "bf_uint"
1047         disp    = None
1048
1049         def __init__(self, bitmask, abbrev, descr, endianness=LE):
1050                 Type.__init__(self, abbrev, descr, self.bytes, endianness)
1051                 self.bitmask = bitmask
1052
1053         def Mask(self):
1054                 return self.bitmask
1055
1056 class bf_val_str(bf_uint):
1057         type    = "bf_uint"
1058         disp    = None
1059
1060         def __init__(self, bitmask, abbrev, descr, val_string_array, endiannes=LE):
1061                 bf_uint.__init__(self, bitmask, abbrev, descr, endiannes)
1062                 self.values = val_string_array
1063
1064         def ValuesName(self):
1065                 return "VALS(%s)" % (self.ValuesCName())
1066
1067 class bf_val_str8(bf_val_str, val_string8):
1068         type    = "bf_val_str8"
1069         ftype   = "FT_UINT8"
1070         disp    = "BASE_HEX"
1071         bytes   = 1
1072
1073 class bf_val_str16(bf_val_str, val_string16):
1074         type    = "bf_val_str16"
1075         ftype   = "FT_UINT16"
1076         disp    = "BASE_HEX"
1077         bytes   = 2
1078
1079 class bf_val_str32(bf_val_str, val_string32):
1080         type    = "bf_val_str32"
1081         ftype   = "FT_UINT32"
1082         disp    = "BASE_HEX"
1083         bytes   = 4
1084
1085 class bf_boolean:
1086         disp    = "BASE_NONE"
1087
1088 class bf_boolean8(bf_uint, boolean8, bf_boolean):
1089         type    = "bf_boolean8"
1090         ftype   = "FT_BOOLEAN"
1091         disp    = "8"
1092         bytes   = 1
1093
1094 class bf_boolean16(bf_uint, boolean16, bf_boolean):
1095         type    = "bf_boolean16"
1096         ftype   = "FT_BOOLEAN"
1097         disp    = "16"
1098         bytes   = 2
1099
1100 class bf_boolean24(bf_uint, boolean24, bf_boolean):
1101         type    = "bf_boolean24"
1102         ftype   = "FT_BOOLEAN"
1103         disp    = "24"
1104         bytes   = 3
1105
1106 class bf_boolean32(bf_uint, boolean32, bf_boolean):
1107         type    = "bf_boolean32"
1108         ftype   = "FT_BOOLEAN"
1109         disp    = "32"
1110         bytes   = 4
1111
1112 class bitfield(Type):
1113         type    = "bitfield"
1114         disp    = 'BASE_HEX'
1115
1116         def __init__(self, vars):
1117                 var_hash = {}
1118                 for var in vars:
1119                         if isinstance(var, bf_boolean):
1120                                 if not isinstance(var, self.bf_type):
1121                                         print "%s must be of type %s" % \
1122                                                 (var.Abbreviation(),
1123                                                 self.bf_type)
1124                                         sys.exit(1)
1125                         var_hash[var.bitmask] = var
1126
1127                 bitmasks = var_hash.keys()
1128                 bitmasks.sort()
1129                 bitmasks.reverse()
1130
1131                 ordered_vars = []
1132                 for bitmask in bitmasks:
1133                         var = var_hash[bitmask]
1134                         ordered_vars.append(var)
1135
1136                 self.vars = ordered_vars
1137                 self.ptvcname = "ncp_%s_bitfield" % (self.abbrev,)
1138                 self.hfname = "hf_ncp_%s" % (self.abbrev,)
1139                 self.sub_ptvc = PTVCBitfield(self.PTVCName(), self.vars)
1140
1141         def SubVariables(self):
1142                 return self.vars
1143
1144         def SubVariablesPTVC(self):
1145                 return self.sub_ptvc
1146
1147         def PTVCName(self):
1148                 return self.ptvcname
1149
1150
1151 class bitfield8(bitfield, uint8):
1152         type    = "bitfield8"
1153         ftype   = "FT_UINT8"
1154         bf_type = bf_boolean8
1155
1156         def __init__(self, abbrev, descr, vars):
1157                 uint8.__init__(self, abbrev, descr)
1158                 bitfield.__init__(self, vars)
1159
1160 class bitfield16(bitfield, uint16):
1161         type    = "bitfield16"
1162         ftype   = "FT_UINT16"
1163         bf_type = bf_boolean16
1164
1165         def __init__(self, abbrev, descr, vars, endianness=LE):
1166                 uint16.__init__(self, abbrev, descr, endianness)
1167                 bitfield.__init__(self, vars)
1168
1169 class bitfield24(bitfield, uint24):
1170         type    = "bitfield24"
1171         ftype   = "FT_UINT24"
1172         bf_type = bf_boolean24
1173
1174         def __init__(self, abbrev, descr, vars, endianness=LE):
1175                 uint24.__init__(self, abbrev, descr, endianness)
1176                 bitfield.__init__(self, vars)
1177
1178 class bitfield32(bitfield, uint32):
1179         type    = "bitfield32"
1180         ftype   = "FT_UINT32"
1181         bf_type = bf_boolean32
1182
1183         def __init__(self, abbrev, descr, vars, endianness=LE):
1184                 uint32.__init__(self, abbrev, descr, endianness)
1185                 bitfield.__init__(self, vars)
1186
1187 #
1188 # Force the endianness of a field to a non-default value; used in
1189 # the list of fields of a structure.
1190 #
1191 def endian(field, endianness):
1192         return [-1, field.Length(), field, endianness, NO_VAR, NO_REPEAT, NO_REQ_COND]
1193
1194 ##############################################################################
1195 # NCP Field Types. Defined in Appendix A of "Programmer's Guide..."
1196 ##############################################################################
1197
1198 AbortQueueFlag                  = val_string8("abort_q_flag", "Abort Queue Flag", [
1199         [ 0x00, "Place at End of Queue" ],
1200         [ 0x01, "Do Not Place Spool File, Examine Flags" ],
1201 ])
1202 AcceptedMaxSize                 = uint16("accepted_max_size", "Accepted Max Size")
1203 AccessControl                   = val_string8("access_control", "Access Control", [
1204         [ 0x00, "Open for read by this client" ],
1205         [ 0x01, "Open for write by this client" ],
1206         [ 0x02, "Deny read requests from other stations" ],
1207         [ 0x03, "Deny write requests from other stations" ],
1208         [ 0x04, "File detached" ],
1209         [ 0x05, "TTS holding detach" ],
1210         [ 0x06, "TTS holding open" ],
1211 ])
1212 AccessDate                      = uint16("access_date", "Access Date")
1213 AccessDate.NWDate()
1214 AccessMode                      = bitfield8("access_mode", "Access Mode", [
1215         bf_boolean8(0x01, "acc_mode_read", "Read Access"),
1216         bf_boolean8(0x02, "acc_mode_write", "Write Access"),
1217         bf_boolean8(0x04, "acc_mode_deny_read", "Deny Read Access"),
1218         bf_boolean8(0x08, "acc_mode_deny_write", "Deny Write Access"),
1219         bf_boolean8(0x10, "acc_mode_comp", "Compatibility Mode"),
1220 ])
1221 AccessPrivileges                = bitfield8("access_privileges", "Access Privileges", [
1222         bf_boolean8(0x01, "acc_priv_read", "Read Privileges (files only)"),
1223         bf_boolean8(0x02, "acc_priv_write", "Write Privileges (files only)"),
1224         bf_boolean8(0x04, "acc_priv_open", "Open Privileges (files only)"),
1225         bf_boolean8(0x08, "acc_priv_create", "Create Privileges (files only)"),
1226         bf_boolean8(0x10, "acc_priv_delete", "Delete Privileges (files only)"),
1227         bf_boolean8(0x20, "acc_priv_parent", "Parental Privileges (directories only for creating, deleting, and renaming)"),
1228         bf_boolean8(0x40, "acc_priv_search", "Search Privileges (directories only)"),
1229         bf_boolean8(0x80, "acc_priv_modify", "Modify File Status Flags Privileges (files and directories)"),
1230 ])
1231 AccessRightsMask                = bitfield8("access_rights_mask", "Access Rights", [
1232         bf_boolean8(0x0001, "acc_rights_read", "Read Rights"),
1233         bf_boolean8(0x0002, "acc_rights_write", "Write Rights"),
1234         bf_boolean8(0x0004, "acc_rights_open", "Open Rights"),
1235         bf_boolean8(0x0008, "acc_rights_create", "Create Rights"),
1236         bf_boolean8(0x0010, "acc_rights_delete", "Delete Rights"),
1237         bf_boolean8(0x0020, "acc_rights_parent", "Parental Rights"),
1238         bf_boolean8(0x0040, "acc_rights_search", "Search Rights"),
1239         bf_boolean8(0x0080, "acc_rights_modify", "Modify Rights"),
1240 ])
1241 AccessRightsMaskWord            = bitfield16("access_rights_mask_word", "Access Rights", [
1242         bf_boolean16(0x0001, "acc_rights1_read", "Read Rights"),
1243         bf_boolean16(0x0002, "acc_rights1_write", "Write Rights"),
1244         bf_boolean16(0x0004, "acc_rights1_open", "Open Rights"),
1245         bf_boolean16(0x0008, "acc_rights1_create", "Create Rights"),
1246         bf_boolean16(0x0010, "acc_rights1_delete", "Delete Rights"),
1247         bf_boolean16(0x0020, "acc_rights1_parent", "Parental Rights"),
1248         bf_boolean16(0x0040, "acc_rights1_search", "Search Rights"),
1249         bf_boolean16(0x0080, "acc_rights1_modify", "Modify Rights"),
1250         bf_boolean16(0x0100, "acc_rights1_supervisor", "Supervisor Access Rights"),
1251 ])
1252 AccountBalance                  = uint32("account_balance", "Account Balance")
1253 AccountVersion                  = uint8("acct_version", "Acct Version")
1254 ActionFlag                      = bitfield8("action_flag", "Action Flag", [
1255         bf_boolean8(0x01, "act_flag_open", "Open"),
1256         bf_boolean8(0x02, "act_flag_replace", "Replace"),
1257         bf_boolean8(0x10, "act_flag_create", "Create"),
1258 ])
1259 ActiveConnBitList               = fw_string("active_conn_bit_list", "Active Connection List", 512)
1260 ActiveIndexedFiles              = uint16("active_indexed_files", "Active Indexed Files")
1261 ActualMaxBinderyObjects         = uint16("actual_max_bindery_objects", "Actual Max Bindery Objects")
1262 ActualMaxIndexedFiles           = uint16("actual_max_indexed_files", "Actual Max Indexed Files")
1263 ActualMaxOpenFiles              = uint16("actual_max_open_files", "Actual Max Open Files")
1264 ActualMaxSimultaneousTransactions = uint16("actual_max_sim_trans", "Actual Max Simultaneous Transactions")
1265 ActualMaxUsedDirectoryEntries   = uint16("actual_max_used_directory_entries", "Actual Max Used Directory Entries")
1266 ActualMaxUsedRoutingBuffers     = uint16("actual_max_used_routing_buffers", "Actual Max Used Routing Buffers")
1267 ActualResponseCount             = uint16("actual_response_count", "Actual Response Count")
1268 AddNameSpaceAndVol              = stringz("add_nm_spc_and_vol", "Add Name Space and Volume")
1269 AFPEntryID                      = uint32("afp_entry_id", "AFP Entry ID", BE)
1270 AFPEntryID.Display("BASE_HEX")
1271 AllocAvailByte                  = uint32("alloc_avail_byte", "Bytes Available for Allocation")
1272 AllocateMode                    = bitfield16("alloc_mode", "Allocate Mode", [
1273         bf_val_str16(0x0001, "alloc_dir_hdl", "Dir Handle Type",[
1274             [0x00, "Permanent"],
1275             [0x01, "Temporary"],
1276     ]),
1277         bf_boolean16(0x0002, "alloc_spec_temp_dir_hdl","Special Temporary Directory Handle"),
1278     bf_boolean16(0x4000, "alloc_reply_lvl2","Reply Level 2"),
1279     bf_boolean16(0x8000, "alloc_dst_name_spc","Destination Name Space Input Parameter"),
1280 ])
1281 AllocationBlockSize             = uint32("allocation_block_size", "Allocation Block Size")
1282 AllocFreeCount                  = uint32("alloc_free_count", "Reclaimable Free Bytes")
1283 ApplicationNumber               = uint16("application_number", "Application Number")
1284 ArchivedTime                    = uint16("archived_time", "Archived Time")
1285 ArchivedTime.NWTime()
1286 ArchivedDate                    = uint16("archived_date", "Archived Date")
1287 ArchivedDate.NWDate()
1288 ArchiverID                      = uint32("archiver_id", "Archiver ID", BE)
1289 ArchiverID.Display("BASE_HEX")
1290 AssociatedNameSpace             = uint8("associated_name_space", "Associated Name Space")
1291 AttachDuringProcessing          = uint16("attach_during_processing", "Attach During Processing")
1292 AttachedIndexedFiles            = uint8("attached_indexed_files", "Attached Indexed Files")
1293 AttachWhileProcessingAttach     = uint16("attach_while_processing_attach", "Attach While Processing Attach")
1294 Attributes                      = uint32("attributes", "Attributes")
1295 AttributesDef                   = bitfield8("attr_def", "Attributes", [
1296         bf_boolean8(0x01, "att_def_ro", "Read Only"),
1297         bf_boolean8(0x02, "att_def_hidden", "Hidden"),
1298         bf_boolean8(0x04, "att_def_system", "System"),
1299         bf_boolean8(0x08, "att_def_execute", "Execute"),
1300         bf_boolean8(0x10, "att_def_sub_only", "Subdirectory"),
1301         bf_boolean8(0x20, "att_def_archive", "Archive"),
1302         bf_boolean8(0x80, "att_def_shareable", "Shareable"),
1303 ])
1304 AttributesDef16                 = bitfield16("attr_def_16", "Attributes", [
1305         bf_boolean16(0x0001, "att_def16_ro", "Read Only"),
1306         bf_boolean16(0x0002, "att_def16_hidden", "Hidden"),
1307         bf_boolean16(0x0004, "att_def16_system", "System"),
1308         bf_boolean16(0x0008, "att_def16_execute", "Execute"),
1309         bf_boolean16(0x0010, "att_def16_sub_only", "Subdirectory"),
1310         bf_boolean16(0x0020, "att_def16_archive", "Archive"),
1311         bf_boolean16(0x0080, "att_def16_shareable", "Shareable"),
1312         bf_boolean16(0x1000, "att_def16_transaction", "Transactional"),
1313         bf_boolean16(0x4000, "att_def16_read_audit", "Read Audit"),
1314         bf_boolean16(0x8000, "att_def16_write_audit", "Write Audit"),
1315 ])
1316 AttributesDef32                 = bitfield32("attr_def_32", "Attributes", [
1317         bf_boolean32(0x00000001, "att_def32_ro", "Read Only"),
1318         bf_boolean32(0x00000002, "att_def32_hidden", "Hidden"),
1319         bf_boolean32(0x00000004, "att_def32_system", "System"),
1320         bf_boolean32(0x00000008, "att_def32_execute", "Execute"),
1321         bf_boolean32(0x00000010, "att_def32_sub_only", "Subdirectory"),
1322         bf_boolean32(0x00000020, "att_def32_archive", "Archive"),
1323     bf_boolean32(0x00000040, "att_def32_execute_confirm", "Execute Confirm"),
1324         bf_boolean32(0x00000080, "att_def32_shareable", "Shareable"),
1325         bf_val_str32(0x00000700, "att_def32_search", "Search Mode",[
1326             [0, "Search on all Read Only Opens"],
1327             [1, "Search on Read Only Opens with no Path"],
1328             [2, "Shell Default Search Mode"],
1329             [3, "Search on all Opens with no Path"],
1330             [4, "Do not Search"],
1331             [5, "Reserved - Do not Use"],
1332             [6, "Search on All Opens"],
1333             [7, "Reserved - Do not Use"],
1334     ]),
1335         bf_boolean32(0x00000800, "att_def32_no_suballoc", "No Suballoc"),
1336         bf_boolean32(0x00001000, "att_def32_transaction", "Transactional"),
1337         bf_boolean32(0x00004000, "att_def32_read_audit", "Read Audit"),
1338         bf_boolean32(0x00008000, "att_def32_write_audit", "Write Audit"),
1339         bf_boolean32(0x00010000, "att_def32_purge", "Immediate Purge"),
1340         bf_boolean32(0x00020000, "att_def32_reninhibit", "Rename Inhibit"),
1341         bf_boolean32(0x00040000, "att_def32_delinhibit", "Delete Inhibit"),
1342         bf_boolean32(0x00080000, "att_def32_cpyinhibit", "Copy Inhibit"),
1343         bf_boolean32(0x00100000, "att_def32_file_audit", "File Audit"),
1344         bf_boolean32(0x00200000, "att_def32_reserved", "Reserved"),
1345         bf_boolean32(0x00400000, "att_def32_data_migrate", "Data Migrated"),
1346         bf_boolean32(0x00800000, "att_def32_inhibit_dm", "Inhibit Data Migration"),
1347         bf_boolean32(0x01000000, "att_def32_dm_save_key", "Data Migration Save Key"),
1348         bf_boolean32(0x02000000, "att_def32_im_comp", "Immediate Compress"),
1349         bf_boolean32(0x04000000, "att_def32_comp", "Compressed"),
1350         bf_boolean32(0x08000000, "att_def32_comp_inhibit", "Inhibit Compression"),
1351         bf_boolean32(0x10000000, "att_def32_reserved2", "Reserved"),
1352         bf_boolean32(0x20000000, "att_def32_cant_compress", "Can't Compress"),
1353         bf_boolean32(0x40000000, "att_def32_attr_archive", "Archive Attributes"),
1354         bf_boolean32(0x80000000, "att_def32_reserved3", "Reserved"),
1355 ])
1356 AttributeValidFlag              = uint32("attribute_valid_flag", "Attribute Valid Flag")
1357 AuditFileVersionDate            = uint16("audit_file_ver_date", "Audit File Version Date")
1358 AuditFileVersionDate.NWDate()
1359 AuditFlag                       = val_string8("audit_flag", "Audit Flag", [
1360         [ 0x00, "Do NOT audit object" ],
1361         [ 0x01, "Audit object" ],
1362 ])
1363 AuditHandle                     = uint32("audit_handle", "Audit File Handle")
1364 AuditHandle.Display("BASE_HEX")
1365 AuditID                         = uint32("audit_id", "Audit ID", BE)
1366 AuditID.Display("BASE_HEX")
1367 AuditIDType                     = val_string16("audit_id_type", "Audit ID Type", [
1368         [ 0x0000, "Volume" ],
1369         [ 0x0001, "Container" ],
1370 ])
1371 AuditVersionDate                = uint16("audit_ver_date", "Auditing Version Date")
1372 AuditVersionDate.NWDate()
1373 AvailableBlocks                 = uint32("available_blocks", "Available Blocks")
1374 AvailableClusters               = uint16("available_clusters", "Available Clusters")
1375 AvailableDirectorySlots         = uint16("available_directory_slots", "Available Directory Slots")
1376 AvailableDirEntries             = uint32("available_dir_entries", "Available Directory Entries")
1377 AvailableIndexedFiles           = uint16("available_indexed_files", "Available Indexed Files")
1378
1379 BackgroundAgedWrites            = uint32("background_aged_writes", "Background Aged Writes")
1380 BackgroundDirtyWrites           = uint32("background_dirty_writes", "Background Dirty Writes")
1381 BadLogicalConnectionCount       = uint16("bad_logical_connection_count", "Bad Logical Connection Count")
1382 BannerName                      = fw_string("banner_name", "Banner Name", 14)
1383 BaseDirectoryID                 = uint32("base_directory_id", "Base Directory ID", BE)
1384 BaseDirectoryID.Display("BASE_HEX")
1385 binderyContext                  = nstring8("bindery_context", "Bindery Context")
1386 BitMap                          = bytes("bit_map", "Bit Map", 512)
1387 BlockNumber                     = uint32("block_number", "Block Number")
1388 BlockSize                       = uint16("block_size", "Block Size")
1389 BlockSizeInSectors              = uint32("block_size_in_sectors", "Block Size in Sectors")
1390 BoardInstalled                  = uint8("board_installed", "Board Installed")
1391 BoardNumber                     = uint32("board_number", "Board Number")
1392 BoardNumbers                    = uint32("board_numbers", "Board Numbers")
1393 BufferSize                      = uint16("buffer_size", "Buffer Size")
1394 BusString                       = stringz("bus_string", "Bus String")
1395 BusType                         = val_string8("bus_type", "Bus Type", [
1396         [0x00, "ISA"],
1397         [0x01, "Micro Channel" ],
1398         [0x02, "EISA"],
1399         [0x04, "PCI"],
1400         [0x08, "PCMCIA"],
1401         [0x10, "ISA"],
1402     [0x14, "ISA/PCI"],
1403 ])
1404 BytesActuallyTransferred        = uint32("bytes_actually_transferred", "Bytes Actually Transferred")
1405 BytesRead                       = fw_string("bytes_read", "Bytes Read", 6)
1406 BytesToCopy                     = uint32("bytes_to_copy", "Bytes to Copy")
1407 BytesWritten                    = fw_string("bytes_written", "Bytes Written", 6)
1408
1409 CacheAllocations                = uint32("cache_allocations", "Cache Allocations")
1410 CacheBlockScrapped              = uint16("cache_block_scrapped", "Cache Block Scrapped")
1411 CacheBufferCount                = uint16("cache_buffer_count", "Cache Buffer Count")
1412 CacheBufferSize                 = uint16("cache_buffer_size", "Cache Buffer Size")
1413 CacheFullWriteRequests          = uint32("cache_full_write_requests", "Cache Full Write Requests")
1414 CacheGetRequests                = uint32("cache_get_requests", "Cache Get Requests")
1415 CacheHitOnUnavailableBlock      = uint16("cache_hit_on_unavailable_block", "Cache Hit On Unavailable Block")
1416 CacheHits                       = uint32("cache_hits", "Cache Hits")
1417 CacheMisses                     = uint32("cache_misses", "Cache Misses")
1418 CachePartialWriteRequests       = uint32("cache_partial_write_requests", "Cache Partial Write Requests")
1419 CacheReadRequests               = uint32("cache_read_requests", "Cache Read Requests")
1420 CacheWriteRequests              = uint32("cache_write_requests", "Cache Write Requests")
1421 CategoryName                    = stringz("category_name", "Category Name")
1422 CCFileHandle                    = uint32("cc_file_handle", "File Handle")
1423 CCFileHandle.Display("BASE_HEX")
1424 CCFunction                      = val_string8("cc_function", "OP-Lock Flag", [
1425         [ 0x01, "Clear OP-Lock" ],
1426         [ 0x02, "Acknowledge Callback" ],
1427         [ 0x03, "Decline Callback" ],
1428     [ 0x04, "Level 2" ],
1429 ])
1430 ChangeBits                      = bitfield16("change_bits", "Change Bits", [
1431         bf_boolean16(0x0001, "change_bits_modify", "Modify Name"),
1432         bf_boolean16(0x0002, "change_bits_fatt", "File Attributes"),
1433         bf_boolean16(0x0004, "change_bits_cdate", "Creation Date"),
1434         bf_boolean16(0x0008, "change_bits_ctime", "Creation Time"),
1435         bf_boolean16(0x0010, "change_bits_owner", "Owner ID"),
1436         bf_boolean16(0x0020, "change_bits_adate", "Archive Date"),
1437         bf_boolean16(0x0040, "change_bits_atime", "Archive Time"),
1438         bf_boolean16(0x0080, "change_bits_aid", "Archiver ID"),
1439     bf_boolean16(0x0100, "change_bits_udate", "Update Date"),
1440         bf_boolean16(0x0200, "change_bits_utime", "Update Time"),
1441         bf_boolean16(0x0400, "change_bits_uid", "Update ID"),
1442         bf_boolean16(0x0800, "change_bits_acc_date", "Access Date"),
1443         bf_boolean16(0x1000, "change_bits_max_acc_mask", "Maximum Access Mask"),
1444         bf_boolean16(0x2000, "change_bits_max_space", "Maximum Space"),
1445 ])
1446 ChannelState                    = val_string8("channel_state", "Channel State", [
1447         [ 0x00, "Channel is running" ],
1448         [ 0x01, "Channel is stopping" ],
1449         [ 0x02, "Channel is stopped" ],
1450         [ 0x03, "Channel is not functional" ],
1451 ])
1452 ChannelSynchronizationState     = val_string8("channel_synchronization_state", "Channel Synchronization State", [
1453         [ 0x00, "Channel is not being used" ],
1454         [ 0x02, "NetWare is using the channel; no one else wants it" ],
1455         [ 0x04, "NetWare is using the channel; someone else wants it" ],
1456         [ 0x06, "Someone else is using the channel; NetWare does not need it" ],
1457         [ 0x08, "Someone else is using the channel; NetWare needs it" ],
1458         [ 0x0A, "Someone else has released the channel; NetWare should use it" ],
1459 ])
1460 ChargeAmount                    = uint32("charge_amount", "Charge Amount")
1461 ChargeInformation               = uint32("charge_information", "Charge Information")
1462 ClientCompFlag                  = val_string16("client_comp_flag", "Completion Flag", [
1463         [ 0x0000, "Successful" ],
1464         [ 0x0001, "Illegal Station Number" ],
1465         [ 0x0002, "Client Not Logged In" ],
1466         [ 0x0003, "Client Not Accepting Messages" ],
1467         [ 0x0004, "Client Already has a Message" ],
1468         [ 0x0096, "No Alloc Space for the Message" ],
1469         [ 0x00fd, "Bad Station Number" ],
1470         [ 0x00ff, "Failure" ],
1471 ])
1472 ClientIDNumber                  = uint32("client_id_number", "Client ID Number", BE)
1473 ClientIDNumber.Display("BASE_HEX")
1474 ClientList                      = uint32("client_list", "Client List")
1475 ClientListCount                 = uint16("client_list_cnt", "Client List Count")
1476 ClientListLen                   = uint8("client_list_len", "Client List Length")
1477 ClientName                      = nstring8("client_name", "Client Name")
1478 ClientRecordArea                = fw_string("client_record_area", "Client Record Area", 152)
1479 ClientStation                   = uint8("client_station", "Client Station")
1480 ClientStationLong               = uint32("client_station_long", "Client Station")
1481 ClientTaskNumber                = uint8("client_task_number", "Client Task Number")
1482 ClientTaskNumberLong            = uint32("client_task_number_long", "Client Task Number")
1483 ClusterCount                    = uint16("cluster_count", "Cluster Count")
1484 ClustersUsedByDirectories       = uint32("clusters_used_by_directories", "Clusters Used by Directories")
1485 ClustersUsedByExtendedDirectories = uint32("clusters_used_by_extended_dirs", "Clusters Used by Extended Directories")
1486 ClustersUsedByFAT               = uint32("clusters_used_by_fat", "Clusters Used by FAT")
1487 CodePage                = uint32("code_page", "Code Page")
1488 ComCnts                         = uint16("com_cnts", "Communication Counters")
1489 Comment                         = nstring8("comment", "Comment")
1490 CommentType                     = uint16("comment_type", "Comment Type")
1491 CompletionCode                  = uint32("ncompletion_code", "Completion Code")
1492 CompressedDataStreamsCount      = uint32("compressed_data_streams_count", "Compressed Data Streams Count")
1493 CompressedLimboDataStreamsCount = uint32("compressed_limbo_data_streams_count", "Compressed Limbo Data Streams Count")
1494 CompressedSectors               = uint32("compressed_sectors", "Compressed Sectors")
1495 compressionStage                = uint32("compression_stage", "Compression Stage")
1496 compressVolume                  = uint32("compress_volume", "Volume Compression")
1497 ConfigMajorVN                   = uint8("config_major_vn", "Configuration Major Version Number")
1498 ConfigMinorVN                   = uint8("config_minor_vn", "Configuration Minor Version Number")
1499 ConfigurationDescription        = fw_string("configuration_description", "Configuration Description", 80)
1500 ConfigurationText               = fw_string("configuration_text", "Configuration Text", 160)
1501 ConfiguredMaxBinderyObjects     = uint16("configured_max_bindery_objects", "Configured Max Bindery Objects")
1502 ConfiguredMaxOpenFiles          = uint16("configured_max_open_files", "Configured Max Open Files")
1503 ConfiguredMaxRoutingBuffers     = uint16("configured_max_routing_buffers", "Configured Max Routing Buffers")
1504 ConfiguredMaxSimultaneousTransactions = uint16("cfg_max_simultaneous_transactions", "Configured Max Simultaneous Transactions")
1505 ConnectedLAN                    = uint32("connected_lan", "LAN Adapter")
1506 ConnectionControlBits           = bitfield8("conn_ctrl_bits", "Connection Control", [
1507         bf_boolean8(0x01, "enable_brdcasts", "Enable Broadcasts"),
1508         bf_boolean8(0x02, "enable_personal_brdcasts", "Enable Personal Broadcasts"),
1509         bf_boolean8(0x04, "enable_wdog_messages", "Enable Watchdog Message"),
1510         bf_boolean8(0x10, "disable_brdcasts", "Disable Broadcasts"),
1511         bf_boolean8(0x20, "disable_personal_brdcasts", "Disable Personal Broadcasts"),
1512         bf_boolean8(0x40, "disable_wdog_messages", "Disable Watchdog Message"),
1513 ])
1514 ConnectionListCount             = uint32("conn_list_count", "Connection List Count")
1515 ConnectionList                  = uint32("connection_list", "Connection List")
1516 ConnectionNumber                = uint32("connection_number", "Connection Number", BE)
1517 ConnectionNumberList            = nstring8("connection_number_list", "Connection Number List")
1518 ConnectionNumberWord            = uint16("conn_number_word", "Connection Number")
1519 ConnectionNumberByte            = uint8("conn_number_byte", "Connection Number")
1520 ConnectionServiceType           = val_string8("connection_service_type","Connection Service Type",[
1521         [ 0x01, "CLIB backward Compatibility" ],
1522         [ 0x02, "NCP Connection" ],
1523         [ 0x03, "NLM Connection" ],
1524         [ 0x04, "AFP Connection" ],
1525         [ 0x05, "FTAM Connection" ],
1526         [ 0x06, "ANCP Connection" ],
1527         [ 0x07, "ACP Connection" ],
1528         [ 0x08, "SMB Connection" ],
1529         [ 0x09, "Winsock Connection" ],
1530 ])
1531 ConnectionsInUse                = uint16("connections_in_use", "Connections In Use")
1532 ConnectionsMaxUsed              = uint16("connections_max_used", "Connections Max Used")
1533 ConnectionsSupportedMax         = uint16("connections_supported_max", "Connections Supported Max")
1534 ConnectionType                  = val_string8("connection_type", "Connection Type", [
1535         [ 0x00, "Not in use" ],
1536         [ 0x02, "NCP" ],
1537         [ 0x0b, "UDP (for IP)" ],
1538 ])
1539 ConnListLen                     = uint8("conn_list_len", "Connection List Length")
1540 connList                        = uint32("conn_list", "Connection List")
1541 ControlFlags                    = val_string8("control_flags", "Control Flags", [
1542         [ 0x00, "Forced Record Locking is Off" ],
1543         [ 0x01, "Forced Record Locking is On" ],
1544 ])
1545 ControllerDriveNumber           = uint8("controller_drive_number", "Controller Drive Number")
1546 ControllerNumber                = uint8("controller_number", "Controller Number")
1547 ControllerType                  = uint8("controller_type", "Controller Type")
1548 Cookie1                         = uint32("cookie_1", "Cookie 1")
1549 Cookie2                         = uint32("cookie_2", "Cookie 2")
1550 Copies                          = uint8( "copies", "Copies" )
1551 CoprocessorFlag                 = uint32("co_processor_flag", "CoProcessor Present Flag")
1552 CoProcessorString               = stringz("co_proc_string", "CoProcessor String")
1553 CounterMask                     = val_string8("counter_mask", "Counter Mask", [
1554         [ 0x00, "Counter is Valid" ],
1555         [ 0x01, "Counter is not Valid" ],
1556 ])
1557 CPUNumber                       = uint32("cpu_number", "CPU Number")
1558 CPUString                       = stringz("cpu_string", "CPU String")
1559 CPUType                         = val_string8("cpu_type", "CPU Type", [
1560         [ 0x00, "80386" ],
1561         [ 0x01, "80486" ],
1562         [ 0x02, "Pentium" ],
1563         [ 0x03, "Pentium Pro" ],
1564 ])
1565 CreationDate                    = uint16("creation_date", "Creation Date")
1566 CreationDate.NWDate()
1567 CreationTime                    = uint16("creation_time", "Creation Time")
1568 CreationTime.NWTime()
1569 CreatorID                       = uint32("creator_id", "Creator ID", BE)
1570 CreatorID.Display("BASE_HEX")
1571 CreatorNameSpaceNumber          = val_string8("creator_name_space_number", "Creator Name Space Number", [
1572         [ 0x00, "DOS Name Space" ],
1573         [ 0x01, "MAC Name Space" ],
1574         [ 0x02, "NFS Name Space" ],
1575         [ 0x04, "Long Name Space" ],
1576 ])
1577 CreditLimit                     = uint32("credit_limit", "Credit Limit")
1578 CtrlFlags                       = val_string16("ctrl_flags", "Control Flags", [
1579         [ 0x0000, "Do Not Return File Name" ],
1580         [ 0x0001, "Return File Name" ],
1581 ])
1582 curCompBlks                     = uint32("cur_comp_blks", "Current Compression Blocks")
1583 curInitialBlks                  = uint32("cur_initial_blks", "Current Initial Blocks")
1584 curIntermediateBlks             = uint32("cur_inter_blks", "Current Intermediate Blocks")
1585 CurNumOfRTags                   = uint32("cur_num_of_r_tags", "Current Number of Resource Tags")
1586 CurrentBlockBeingDecompressed   = uint32("cur_blk_being_dcompress", "Current Block Being Decompressed")
1587 CurrentChangedFATs              = uint16("current_changed_fats", "Current Changed FAT Entries")
1588 CurrentEntries                  = uint32("current_entries", "Current Entries")
1589 CurrentFormType                 = uint8( "current_form_type", "Current Form Type" )
1590 CurrentLFSCounters              = uint32("current_lfs_counters", "Current LFS Counters")
1591 CurrentlyUsedRoutingBuffers     = uint16("currently_used_routing_buffers", "Currently Used Routing Buffers")
1592 CurrentOpenFiles                = uint16("current_open_files", "Current Open Files")
1593 CurrentReferenceID              = uint16("curr_ref_id", "Current Reference ID")
1594 CurrentServers                  = uint32("current_servers", "Current Servers")
1595 CurrentServerTime               = uint32("current_server_time", "Time Elapsed Since Server Was Brought Up")
1596 CurrentSpace                    = uint32("current_space", "Current Space")
1597 CurrentTransactionCount         = uint32("current_trans_count", "Current Transaction Count")
1598 CurrentUsedBinderyObjects       = uint16("current_used_bindery_objects", "Current Used Bindery Objects")
1599 CurrentUsedDynamicSpace         = uint32("current_used_dynamic_space", "Current Used Dynamic Space")
1600 CustomCnts                      = uint32("custom_cnts", "Custom Counters")
1601 CustomCount                     = uint32("custom_count", "Custom Count")
1602 CustomCounters                  = uint32("custom_counters", "Custom Counters")
1603 CustomString                    = nstring8("custom_string", "Custom String")
1604 CustomVariableValue             = uint32("custom_var_value", "Custom Variable Value")
1605
1606 Data                            = nstring8("data", "Data")
1607 DataForkFirstFAT                = uint32("data_fork_first_fat", "Data Fork First FAT Entry")
1608 DataForkLen                     = uint32("data_fork_len", "Data Fork Len")
1609 DataForkSize                    = uint32("data_fork_size", "Data Fork Size")
1610 DataSize                        = uint32("data_size", "Data Size")
1611 DataStream                      = val_string8("data_stream", "Data Stream", [
1612         [ 0x00, "Resource Fork or DOS" ],
1613         [ 0x01, "Data Fork" ],
1614 ])
1615 DataStreamFATBlocks     = uint32("data_stream_fat_blks", "Data Stream FAT Blocks")
1616 DataStreamName                  = nstring8("data_stream_name", "Data Stream Name")
1617 DataStreamNumber                = uint8("data_stream_number", "Data Stream Number")
1618 DataStreamNumberLong    = uint32("data_stream_num_long", "Data Stream Number")
1619 DataStreamsCount                = uint32("data_streams_count", "Data Streams Count")
1620 DataStreamSize                  = uint32("data_stream_size", "Size")
1621 DataStreamSpaceAlloc            = uint32( "data_stream_space_alloc", "Space Allocated for Data Stream" )
1622 DataTypeFlag            = val_string8("data_type_flag", "Data Type Flag", [
1623     [ 0x00, "ASCII Data" ],
1624     [ 0x01, "UTF8 Data" ],
1625 ])
1626 Day                             = uint8("s_day", "Day")
1627 DayOfWeek                       = val_string8("s_day_of_week", "Day of Week", [
1628         [ 0x00, "Sunday" ],
1629         [ 0x01, "Monday" ],
1630         [ 0x02, "Tuesday" ],
1631         [ 0x03, "Wednesday" ],
1632         [ 0x04, "Thursday" ],
1633         [ 0x05, "Friday" ],
1634         [ 0x06, "Saturday" ],
1635 ])
1636 DeadMirrorTable                 = bytes("dead_mirror_table", "Dead Mirror Table", 32)
1637 DefinedDataStreams              = uint8("defined_data_streams", "Defined Data Streams")
1638 DefinedNameSpaces               = uint8("defined_name_spaces", "Defined Name Spaces")
1639 DeletedDate                     = uint16("deleted_date", "Deleted Date")
1640 DeletedDate.NWDate()
1641 DeletedFileTime                 = uint32( "deleted_file_time", "Deleted File Time")
1642 DeletedFileTime.Display("BASE_HEX")
1643 DeletedTime                     = uint16("deleted_time", "Deleted Time")
1644 DeletedTime.NWTime()
1645 DeletedID                       = uint32( "delete_id", "Deleted ID", BE)
1646 DeletedID.Display("BASE_HEX")
1647 DeleteExistingFileFlag          = val_string8("delete_existing_file_flag", "Delete Existing File Flag", [
1648         [ 0x00, "Do Not Delete Existing File" ],
1649         [ 0x01, "Delete Existing File" ],
1650 ])
1651 DenyReadCount                   = uint16("deny_read_count", "Deny Read Count")
1652 DenyWriteCount                  = uint16("deny_write_count", "Deny Write Count")
1653 DescriptionStrings              = fw_string("description_string", "Description", 100)
1654 DesiredAccessRights             = bitfield16("desired_access_rights", "Desired Access Rights", [
1655     bf_boolean16(0x0001, "dsired_acc_rights_read_o", "Read Only"),
1656         bf_boolean16(0x0002, "dsired_acc_rights_write_o", "Write Only"),
1657         bf_boolean16(0x0004, "dsired_acc_rights_deny_r", "Deny Read"),
1658         bf_boolean16(0x0008, "dsired_acc_rights_deny_w", "Deny Write"),
1659         bf_boolean16(0x0010, "dsired_acc_rights_compat", "Compatibility"),
1660         bf_boolean16(0x0040, "dsired_acc_rights_w_thru", "File Write Through"),
1661         bf_boolean16(0x0400, "dsired_acc_rights_del_file_cls", "Delete File Close"),
1662 ])
1663 DesiredResponseCount            = uint16("desired_response_count", "Desired Response Count")
1664 DestDirHandle                   = uint8("dest_dir_handle", "Destination Directory Handle")
1665 DestNameSpace                   = val_string8("dest_name_space", "Destination Name Space", [
1666         [ 0x00, "DOS Name Space" ],
1667         [ 0x01, "MAC Name Space" ],
1668         [ 0x02, "NFS Name Space" ],
1669         [ 0x04, "Long Name Space" ],
1670 ])
1671 DestPathComponentCount          = uint8("dest_component_count", "Destination Path Component Count")
1672 DestPath                        = nstring8("dest_path", "Destination Path")
1673 DestPath16          = nstring16("dest_path_16", "Destination Path")
1674 DetachDuringProcessing          = uint16("detach_during_processing", "Detach During Processing")
1675 DetachForBadConnectionNumber    = uint16("detach_for_bad_connection_number", "Detach For Bad Connection Number")
1676 DirHandle                       = uint8("dir_handle", "Directory Handle")
1677 DirHandleName                   = uint8("dir_handle_name", "Handle Name")
1678 DirHandleLong                   = uint32("dir_handle_long", "Directory Handle")
1679 DirectoryAccessRights           = uint8("directory_access_rights", "Directory Access Rights")
1680 #
1681 # XXX - what do the bits mean here?
1682 #
1683 DirectoryAttributes             = uint8("directory_attributes", "Directory Attributes")
1684 DirectoryBase                   = uint32("dir_base", "Directory Base")
1685 DirectoryBase.Display("BASE_HEX")
1686 DirectoryCount                  = uint16("dir_count", "Directory Count")
1687 DirectoryEntryNumber            = uint32("directory_entry_number", "Directory Entry Number")
1688 DirectoryEntryNumber.Display('BASE_HEX')
1689 DirectoryEntryNumberWord        = uint16("directory_entry_number_word", "Directory Entry Number")
1690 DirectoryID                     = uint16("directory_id", "Directory ID", BE)
1691 DirectoryID.Display("BASE_HEX")
1692 DirectoryName                   = fw_string("directory_name", "Directory Name",12)
1693 DirectoryName14                 = fw_string("directory_name_14", "Directory Name", 14)
1694 DirectoryNameLen                = uint8("directory_name_len", "Directory Name Length")
1695 DirectoryNumber                 = uint32("directory_number", "Directory Number")
1696 DirectoryNumber.Display("BASE_HEX")
1697 DirectoryPath                   = fw_string("directory_path", "Directory Path", 16)
1698 DirectoryServicesObjectID       = uint32("directory_services_object_id", "Directory Services Object ID")
1699 DirectoryServicesObjectID.Display("BASE_HEX")
1700 DirectoryStamp                  = uint16("directory_stamp", "Directory Stamp (0xD1D1)")
1701 DirtyCacheBuffers               = uint16("dirty_cache_buffers", "Dirty Cache Buffers")
1702 DiskChannelNumber               = uint8("disk_channel_number", "Disk Channel Number")
1703 DiskChannelTable                = val_string8("disk_channel_table", "Disk Channel Table", [
1704         [ 0x01, "XT" ],
1705         [ 0x02, "AT" ],
1706         [ 0x03, "SCSI" ],
1707         [ 0x04, "Disk Coprocessor" ],
1708 ])
1709 DiskSpaceLimit                  = uint32("disk_space_limit", "Disk Space Limit")
1710 DMAChannelsUsed                 = uint32("dma_channels_used", "DMA Channels Used")
1711 DMInfoEntries                   = uint32("dm_info_entries", "DM Info Entries")
1712 DMInfoLevel                     = val_string8("dm_info_level", "DM Info Level", [
1713         [ 0x00, "Return Detailed DM Support Module Information" ],
1714         [ 0x01, "Return Number of DM Support Modules" ],
1715         [ 0x02, "Return DM Support Modules Names" ],
1716 ])
1717 DMFlags                         = val_string8("dm_flags", "DM Flags", [
1718         [ 0x00, "OnLine Media" ],
1719         [ 0x01, "OffLine Media" ],
1720 ])
1721 DMmajorVersion                  = uint32("dm_major_version", "DM Major Version")
1722 DMminorVersion                  = uint32("dm_minor_version", "DM Minor Version")
1723 DMPresentFlag                   = val_string8("dm_present_flag", "Data Migration Present Flag", [
1724         [ 0x00, "Data Migration NLM is not loaded" ],
1725         [ 0x01, "Data Migration NLM has been loaded and is running" ],
1726 ])
1727 DOSDirectoryBase                = uint32("dos_directory_base", "DOS Directory Base")
1728 DOSDirectoryBase.Display("BASE_HEX")
1729 DOSDirectoryEntry               = uint32("dos_directory_entry", "DOS Directory Entry")
1730 DOSDirectoryEntry.Display("BASE_HEX")
1731 DOSDirectoryEntryNumber         = uint32("dos_directory_entry_number", "DOS Directory Entry Number")
1732 DOSDirectoryEntryNumber.Display('BASE_HEX')
1733 DOSFileAttributes               = uint8("dos_file_attributes", "DOS File Attributes")
1734 DOSParentDirectoryEntry         = uint32("dos_parent_directory_entry", "DOS Parent Directory Entry")
1735 DOSParentDirectoryEntry.Display('BASE_HEX')
1736 DOSSequence                     = uint32("dos_sequence", "DOS Sequence")
1737 DriveCylinders                  = uint16("drive_cylinders", "Drive Cylinders")
1738 DriveDefinitionString           = fw_string("drive_definition_string", "Drive Definition", 64)
1739 DriveHeads                      = uint8("drive_heads", "Drive Heads")
1740 DriveMappingTable               = bytes("drive_mapping_table", "Drive Mapping Table", 32)
1741 DriveMirrorTable                = bytes("drive_mirror_table", "Drive Mirror Table", 32)
1742 DriverBoardName         = stringz("driver_board_name", "Driver Board Name")
1743 DriveRemovableFlag              = val_string8("drive_removable_flag", "Drive Removable Flag", [
1744         [ 0x00, "Nonremovable" ],
1745         [ 0xff, "Removable" ],
1746 ])
1747 DriverLogicalName       = stringz("driver_log_name", "Driver Logical Name")
1748 DriverShortName         = stringz("driver_short_name", "Driver Short Name")
1749 DriveSize                       = uint32("drive_size", "Drive Size")
1750 DstEAFlags                      = val_string16("dst_ea_flags", "Destination EA Flags", [
1751         [ 0x0000, "Return EAHandle,Information Level 0" ],
1752         [ 0x0001, "Return NetWareHandle,Information Level 0" ],
1753         [ 0x0002, "Return Volume/Directory Number,Information Level 0" ],
1754         [ 0x0004, "Return EAHandle,Close Handle on Error,Information Level 0" ],
1755         [ 0x0005, "Return NetWareHandle,Close Handle on Error,Information Level 0" ],
1756         [ 0x0006, "Return Volume/Directory Number,Close Handle on Error,Information Level 0" ],
1757         [ 0x0010, "Return EAHandle,Information Level 1" ],
1758         [ 0x0011, "Return NetWareHandle,Information Level 1" ],
1759         [ 0x0012, "Return Volume/Directory Number,Information Level 1" ],
1760         [ 0x0014, "Return EAHandle,Close Handle on Error,Information Level 1" ],
1761         [ 0x0015, "Return NetWareHandle,Close Handle on Error,Information Level 1" ],
1762         [ 0x0016, "Return Volume/Directory Number,Close Handle on Error,Information Level 1" ],
1763         [ 0x0020, "Return EAHandle,Information Level 2" ],
1764         [ 0x0021, "Return NetWareHandle,Information Level 2" ],
1765         [ 0x0022, "Return Volume/Directory Number,Information Level 2" ],
1766         [ 0x0024, "Return EAHandle,Close Handle on Error,Information Level 2" ],
1767         [ 0x0025, "Return NetWareHandle,Close Handle on Error,Information Level 2" ],
1768         [ 0x0026, "Return Volume/Directory Number,Close Handle on Error,Information Level 2" ],
1769         [ 0x0030, "Return EAHandle,Information Level 3" ],
1770         [ 0x0031, "Return NetWareHandle,Information Level 3" ],
1771         [ 0x0032, "Return Volume/Directory Number,Information Level 3" ],
1772         [ 0x0034, "Return EAHandle,Close Handle on Error,Information Level 3" ],
1773         [ 0x0035, "Return NetWareHandle,Close Handle on Error,Information Level 3" ],
1774         [ 0x0036, "Return Volume/Directory Number,Close Handle on Error,Information Level 3" ],
1775         [ 0x0040, "Return EAHandle,Information Level 4" ],
1776         [ 0x0041, "Return NetWareHandle,Information Level 4" ],
1777         [ 0x0042, "Return Volume/Directory Number,Information Level 4" ],
1778         [ 0x0044, "Return EAHandle,Close Handle on Error,Information Level 4" ],
1779         [ 0x0045, "Return NetWareHandle,Close Handle on Error,Information Level 4" ],
1780         [ 0x0046, "Return Volume/Directory Number,Close Handle on Error,Information Level 4" ],
1781         [ 0x0050, "Return EAHandle,Information Level 5" ],
1782         [ 0x0051, "Return NetWareHandle,Information Level 5" ],
1783         [ 0x0052, "Return Volume/Directory Number,Information Level 5" ],
1784         [ 0x0054, "Return EAHandle,Close Handle on Error,Information Level 5" ],
1785         [ 0x0055, "Return NetWareHandle,Close Handle on Error,Information Level 5" ],
1786         [ 0x0056, "Return Volume/Directory Number,Close Handle on Error,Information Level 5" ],
1787         [ 0x0060, "Return EAHandle,Information Level 6" ],
1788         [ 0x0061, "Return NetWareHandle,Information Level 6" ],
1789         [ 0x0062, "Return Volume/Directory Number,Information Level 6" ],
1790         [ 0x0064, "Return EAHandle,Close Handle on Error,Information Level 6" ],
1791         [ 0x0065, "Return NetWareHandle,Close Handle on Error,Information Level 6" ],
1792         [ 0x0066, "Return Volume/Directory Number,Close Handle on Error,Information Level 6" ],
1793         [ 0x0070, "Return EAHandle,Information Level 7" ],
1794         [ 0x0071, "Return NetWareHandle,Information Level 7" ],
1795         [ 0x0072, "Return Volume/Directory Number,Information Level 7" ],
1796         [ 0x0074, "Return EAHandle,Close Handle on Error,Information Level 7" ],
1797         [ 0x0075, "Return NetWareHandle,Close Handle on Error,Information Level 7" ],
1798         [ 0x0076, "Return Volume/Directory Number,Close Handle on Error,Information Level 7" ],
1799         [ 0x0080, "Return EAHandle,Information Level 0,Immediate Close Handle" ],
1800         [ 0x0081, "Return NetWareHandle,Information Level 0,Immediate Close Handle" ],
1801         [ 0x0082, "Return Volume/Directory Number,Information Level 0,Immediate Close Handle" ],
1802         [ 0x0084, "Return EAHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1803         [ 0x0085, "Return NetWareHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1804         [ 0x0086, "Return Volume/Directory Number,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1805         [ 0x0090, "Return EAHandle,Information Level 1,Immediate Close Handle" ],
1806         [ 0x0091, "Return NetWareHandle,Information Level 1,Immediate Close Handle" ],
1807         [ 0x0092, "Return Volume/Directory Number,Information Level 1,Immediate Close Handle" ],
1808         [ 0x0094, "Return EAHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1809         [ 0x0095, "Return NetWareHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1810         [ 0x0096, "Return Volume/Directory Number,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1811         [ 0x00a0, "Return EAHandle,Information Level 2,Immediate Close Handle" ],
1812         [ 0x00a1, "Return NetWareHandle,Information Level 2,Immediate Close Handle" ],
1813         [ 0x00a2, "Return Volume/Directory Number,Information Level 2,Immediate Close Handle" ],
1814         [ 0x00a4, "Return EAHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1815         [ 0x00a5, "Return NetWareHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1816         [ 0x00a6, "Return Volume/Directory Number,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1817         [ 0x00b0, "Return EAHandle,Information Level 3,Immediate Close Handle" ],
1818         [ 0x00b1, "Return NetWareHandle,Information Level 3,Immediate Close Handle" ],
1819         [ 0x00b2, "Return Volume/Directory Number,Information Level 3,Immediate Close Handle" ],
1820         [ 0x00b4, "Return EAHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1821         [ 0x00b5, "Return NetWareHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1822         [ 0x00b6, "Return Volume/Directory Number,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1823         [ 0x00c0, "Return EAHandle,Information Level 4,Immediate Close Handle" ],
1824         [ 0x00c1, "Return NetWareHandle,Information Level 4,Immediate Close Handle" ],
1825         [ 0x00c2, "Return Volume/Directory Number,Information Level 4,Immediate Close Handle" ],
1826         [ 0x00c4, "Return EAHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1827         [ 0x00c5, "Return NetWareHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1828         [ 0x00c6, "Return Volume/Directory Number,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1829         [ 0x00d0, "Return EAHandle,Information Level 5,Immediate Close Handle" ],
1830         [ 0x00d1, "Return NetWareHandle,Information Level 5,Immediate Close Handle" ],
1831         [ 0x00d2, "Return Volume/Directory Number,Information Level 5,Immediate Close Handle" ],
1832         [ 0x00d4, "Return EAHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1833         [ 0x00d5, "Return NetWareHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1834         [ 0x00d6, "Return Volume/Directory Number,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1835         [ 0x00e0, "Return EAHandle,Information Level 6,Immediate Close Handle" ],
1836         [ 0x00e1, "Return NetWareHandle,Information Level 6,Immediate Close Handle" ],
1837         [ 0x00e2, "Return Volume/Directory Number,Information Level 6,Immediate Close Handle" ],
1838         [ 0x00e4, "Return EAHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1839         [ 0x00e5, "Return NetWareHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1840         [ 0x00e6, "Return Volume/Directory Number,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1841         [ 0x00f0, "Return EAHandle,Information Level 7,Immediate Close Handle" ],
1842         [ 0x00f1, "Return NetWareHandle,Information Level 7,Immediate Close Handle" ],
1843         [ 0x00f2, "Return Volume/Directory Number,Information Level 7,Immediate Close Handle" ],
1844         [ 0x00f4, "Return EAHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1845         [ 0x00f5, "Return NetWareHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1846         [ 0x00f6, "Return Volume/Directory Number,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1847 ])
1848 dstNSIndicator                  = val_string16("dst_ns_indicator", "Destination Name Space Indicator", [
1849         [ 0x0000, "Return Source Name Space Information" ],
1850         [ 0x0001, "Return Destination Name Space Information" ],
1851 ])
1852 DstQueueID                      = uint32("dst_queue_id", "Destination Queue ID")
1853 DuplicateRepliesSent            = uint16("duplicate_replies_sent", "Duplicate Replies Sent")
1854
1855 EAAccessFlag                    = bitfield16("ea_access_flag", "EA Access Flag", [
1856         bf_boolean16(0x0001, "ea_permanent_memory", "Permanent Memory"),
1857         bf_boolean16(0x0002, "ea_deep_freeze", "Deep Freeze"),
1858         bf_boolean16(0x0004, "ea_in_progress", "In Progress"),
1859         bf_boolean16(0x0008, "ea_header_being_enlarged", "Header Being Enlarged"),
1860         bf_boolean16(0x0010, "ea_new_tally_used", "New Tally Used"),
1861         bf_boolean16(0x0020, "ea_tally_need_update", "Tally Need Update"),
1862         bf_boolean16(0x0040, "ea_score_card_present", "Score Card Present"),
1863         bf_boolean16(0x0080, "ea_need_bit_flag", "EA Need Bit Flag"),
1864         bf_boolean16(0x0100, "ea_write_privileges", "Write Privileges"),
1865         bf_boolean16(0x0200, "ea_read_privileges", "Read Privileges"),
1866         bf_boolean16(0x0400, "ea_delete_privileges", "Delete Privileges"),
1867         bf_boolean16(0x0800, "ea_system_ea_only", "System EA Only"),
1868         bf_boolean16(0x1000, "ea_write_in_progress", "Write In Progress"),
1869 ])
1870 EABytesWritten                  = uint32("ea_bytes_written", "Bytes Written")
1871 EACount                         = uint32("ea_count", "Count")
1872 EADataSize                      = uint32("ea_data_size", "Data Size")
1873 EADataSizeDuplicated            = uint32("ea_data_size_duplicated", "Data Size Duplicated")
1874 EADuplicateCount                = uint32("ea_duplicate_count", "Duplicate Count")
1875 EAErrorCodes                    = val_string16("ea_error_codes", "EA Error Codes", [
1876         [ 0x0000, "SUCCESSFUL" ],
1877         [ 0x00c8, "ERR_MISSING_EA_KEY" ],
1878         [ 0x00c9, "ERR_EA_NOT_FOUND" ],
1879         [ 0x00ca, "ERR_INVALID_EA_HANDLE_TYPE" ],
1880         [ 0x00cb, "ERR_EA_NO_KEY_NO_DATA" ],
1881         [ 0x00cc, "ERR_EA_NUMBER_MISMATCH" ],
1882         [ 0x00cd, "ERR_EXTENT_NUMBER_OUT_OF_RANGE" ],
1883         [ 0x00ce, "ERR_EA_BAD_DIR_NUM" ],
1884         [ 0x00cf, "ERR_INVALID_EA_HANDLE" ],
1885         [ 0x00d0, "ERR_EA_POSITION_OUT_OF_RANGE" ],
1886         [ 0x00d1, "ERR_EA_ACCESS_DENIED" ],
1887         [ 0x00d2, "ERR_DATA_PAGE_ODD_SIZE" ],
1888         [ 0x00d3, "ERR_EA_VOLUME_NOT_MOUNTED" ],
1889         [ 0x00d4, "ERR_BAD_PAGE_BOUNDARY" ],
1890         [ 0x00d5, "ERR_INSPECT_FAILURE" ],
1891         [ 0x00d6, "ERR_EA_ALREADY_CLAIMED" ],
1892         [ 0x00d7, "ERR_ODD_BUFFER_SIZE" ],
1893         [ 0x00d8, "ERR_NO_SCORECARDS" ],
1894         [ 0x00d9, "ERR_BAD_EDS_SIGNATURE" ],
1895         [ 0x00da, "ERR_EA_SPACE_LIMIT" ],
1896         [ 0x00db, "ERR_EA_KEY_CORRUPT" ],
1897         [ 0x00dc, "ERR_EA_KEY_LIMIT" ],
1898         [ 0x00dd, "ERR_TALLY_CORRUPT" ],
1899 ])
1900 EAFlags                         = val_string16("ea_flags", "EA Flags", [
1901         [ 0x0000, "Return EAHandle,Information Level 0" ],
1902         [ 0x0001, "Return NetWareHandle,Information Level 0" ],
1903         [ 0x0002, "Return Volume/Directory Number,Information Level 0" ],
1904         [ 0x0004, "Return EAHandle,Close Handle on Error,Information Level 0" ],
1905         [ 0x0005, "Return NetWareHandle,Close Handle on Error,Information Level 0" ],
1906         [ 0x0006, "Return Volume/Directory Number,Close Handle on Error,Information Level 0" ],
1907         [ 0x0010, "Return EAHandle,Information Level 1" ],
1908         [ 0x0011, "Return NetWareHandle,Information Level 1" ],
1909         [ 0x0012, "Return Volume/Directory Number,Information Level 1" ],
1910         [ 0x0014, "Return EAHandle,Close Handle on Error,Information Level 1" ],
1911         [ 0x0015, "Return NetWareHandle,Close Handle on Error,Information Level 1" ],
1912         [ 0x0016, "Return Volume/Directory Number,Close Handle on Error,Information Level 1" ],
1913         [ 0x0020, "Return EAHandle,Information Level 2" ],
1914         [ 0x0021, "Return NetWareHandle,Information Level 2" ],
1915         [ 0x0022, "Return Volume/Directory Number,Information Level 2" ],
1916         [ 0x0024, "Return EAHandle,Close Handle on Error,Information Level 2" ],
1917         [ 0x0025, "Return NetWareHandle,Close Handle on Error,Information Level 2" ],
1918         [ 0x0026, "Return Volume/Directory Number,Close Handle on Error,Information Level 2" ],
1919         [ 0x0030, "Return EAHandle,Information Level 3" ],
1920         [ 0x0031, "Return NetWareHandle,Information Level 3" ],
1921         [ 0x0032, "Return Volume/Directory Number,Information Level 3" ],
1922         [ 0x0034, "Return EAHandle,Close Handle on Error,Information Level 3" ],
1923         [ 0x0035, "Return NetWareHandle,Close Handle on Error,Information Level 3" ],
1924         [ 0x0036, "Return Volume/Directory Number,Close Handle on Error,Information Level 3" ],
1925         [ 0x0040, "Return EAHandle,Information Level 4" ],
1926         [ 0x0041, "Return NetWareHandle,Information Level 4" ],
1927         [ 0x0042, "Return Volume/Directory Number,Information Level 4" ],
1928         [ 0x0044, "Return EAHandle,Close Handle on Error,Information Level 4" ],
1929         [ 0x0045, "Return NetWareHandle,Close Handle on Error,Information Level 4" ],
1930         [ 0x0046, "Return Volume/Directory Number,Close Handle on Error,Information Level 4" ],
1931         [ 0x0050, "Return EAHandle,Information Level 5" ],
1932         [ 0x0051, "Return NetWareHandle,Information Level 5" ],
1933         [ 0x0052, "Return Volume/Directory Number,Information Level 5" ],
1934         [ 0x0054, "Return EAHandle,Close Handle on Error,Information Level 5" ],
1935         [ 0x0055, "Return NetWareHandle,Close Handle on Error,Information Level 5" ],
1936         [ 0x0056, "Return Volume/Directory Number,Close Handle on Error,Information Level 5" ],
1937         [ 0x0060, "Return EAHandle,Information Level 6" ],
1938         [ 0x0061, "Return NetWareHandle,Information Level 6" ],
1939         [ 0x0062, "Return Volume/Directory Number,Information Level 6" ],
1940         [ 0x0064, "Return EAHandle,Close Handle on Error,Information Level 6" ],
1941         [ 0x0065, "Return NetWareHandle,Close Handle on Error,Information Level 6" ],
1942         [ 0x0066, "Return Volume/Directory Number,Close Handle on Error,Information Level 6" ],
1943         [ 0x0070, "Return EAHandle,Information Level 7" ],
1944         [ 0x0071, "Return NetWareHandle,Information Level 7" ],
1945         [ 0x0072, "Return Volume/Directory Number,Information Level 7" ],
1946         [ 0x0074, "Return EAHandle,Close Handle on Error,Information Level 7" ],
1947         [ 0x0075, "Return NetWareHandle,Close Handle on Error,Information Level 7" ],
1948         [ 0x0076, "Return Volume/Directory Number,Close Handle on Error,Information Level 7" ],
1949         [ 0x0080, "Return EAHandle,Information Level 0,Immediate Close Handle" ],
1950         [ 0x0081, "Return NetWareHandle,Information Level 0,Immediate Close Handle" ],
1951         [ 0x0082, "Return Volume/Directory Number,Information Level 0,Immediate Close Handle" ],
1952         [ 0x0084, "Return EAHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1953         [ 0x0085, "Return NetWareHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1954         [ 0x0086, "Return Volume/Directory Number,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1955         [ 0x0090, "Return EAHandle,Information Level 1,Immediate Close Handle" ],
1956         [ 0x0091, "Return NetWareHandle,Information Level 1,Immediate Close Handle" ],
1957         [ 0x0092, "Return Volume/Directory Number,Information Level 1,Immediate Close Handle" ],
1958         [ 0x0094, "Return EAHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1959         [ 0x0095, "Return NetWareHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1960         [ 0x0096, "Return Volume/Directory Number,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1961         [ 0x00a0, "Return EAHandle,Information Level 2,Immediate Close Handle" ],
1962         [ 0x00a1, "Return NetWareHandle,Information Level 2,Immediate Close Handle" ],
1963         [ 0x00a2, "Return Volume/Directory Number,Information Level 2,Immediate Close Handle" ],
1964         [ 0x00a4, "Return EAHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1965         [ 0x00a5, "Return NetWareHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1966         [ 0x00a6, "Return Volume/Directory Number,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1967         [ 0x00b0, "Return EAHandle,Information Level 3,Immediate Close Handle" ],
1968         [ 0x00b1, "Return NetWareHandle,Information Level 3,Immediate Close Handle" ],
1969         [ 0x00b2, "Return Volume/Directory Number,Information Level 3,Immediate Close Handle" ],
1970         [ 0x00b4, "Return EAHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1971         [ 0x00b5, "Return NetWareHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1972         [ 0x00b6, "Return Volume/Directory Number,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1973         [ 0x00c0, "Return EAHandle,Information Level 4,Immediate Close Handle" ],
1974         [ 0x00c1, "Return NetWareHandle,Information Level 4,Immediate Close Handle" ],
1975         [ 0x00c2, "Return Volume/Directory Number,Information Level 4,Immediate Close Handle" ],
1976         [ 0x00c4, "Return EAHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1977         [ 0x00c5, "Return NetWareHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1978         [ 0x00c6, "Return Volume/Directory Number,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1979         [ 0x00d0, "Return EAHandle,Information Level 5,Immediate Close Handle" ],
1980         [ 0x00d1, "Return NetWareHandle,Information Level 5,Immediate Close Handle" ],
1981         [ 0x00d2, "Return Volume/Directory Number,Information Level 5,Immediate Close Handle" ],
1982         [ 0x00d4, "Return EAHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1983         [ 0x00d5, "Return NetWareHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1984         [ 0x00d6, "Return Volume/Directory Number,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1985         [ 0x00e0, "Return EAHandle,Information Level 6,Immediate Close Handle" ],
1986         [ 0x00e1, "Return NetWareHandle,Information Level 6,Immediate Close Handle" ],
1987         [ 0x00e2, "Return Volume/Directory Number,Information Level 6,Immediate Close Handle" ],
1988         [ 0x00e4, "Return EAHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1989         [ 0x00e5, "Return NetWareHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1990         [ 0x00e6, "Return Volume/Directory Number,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1991         [ 0x00f0, "Return EAHandle,Information Level 7,Immediate Close Handle" ],
1992         [ 0x00f1, "Return NetWareHandle,Information Level 7,Immediate Close Handle" ],
1993         [ 0x00f2, "Return Volume/Directory Number,Information Level 7,Immediate Close Handle" ],
1994         [ 0x00f4, "Return EAHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1995         [ 0x00f5, "Return NetWareHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1996         [ 0x00f6, "Return Volume/Directory Number,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1997 ])
1998 EAHandle                        = uint32("ea_handle", "EA Handle")
1999 EAHandle.Display("BASE_HEX")
2000 EAHandleOrNetWareHandleOrVolume = uint32("ea_handle_or_netware_handle_or_volume", "EAHandle or NetWare Handle or Volume (see EAFlags)")
2001 EAHandleOrNetWareHandleOrVolume.Display("BASE_HEX")
2002 EAKey                           = nstring16("ea_key", "EA Key")
2003 EAKeySize                       = uint32("ea_key_size", "Key Size")
2004 EAKeySizeDuplicated             = uint32("ea_key_size_duplicated", "Key Size Duplicated")
2005 EAValue                         = nstring16("ea_value", "EA Value")
2006 EAValueRep                      = fw_string("ea_value_rep", "EA Value", 1)
2007 EAValueLength                   = uint16("ea_value_length", "Value Length")
2008 EchoSocket                      = uint16("echo_socket", "Echo Socket")
2009 EchoSocket.Display('BASE_HEX')
2010 EffectiveRights                 = bitfield8("effective_rights", "Effective Rights", [
2011         bf_boolean8(0x01, "effective_rights_read", "Read Rights"),
2012         bf_boolean8(0x02, "effective_rights_write", "Write Rights"),
2013         bf_boolean8(0x04, "effective_rights_open", "Open Rights"),
2014         bf_boolean8(0x08, "effective_rights_create", "Create Rights"),
2015         bf_boolean8(0x10, "effective_rights_delete", "Delete Rights"),
2016         bf_boolean8(0x20, "effective_rights_parental", "Parental Rights"),
2017         bf_boolean8(0x40, "effective_rights_search", "Search Rights"),
2018         bf_boolean8(0x80, "effective_rights_modify", "Modify Rights"),
2019 ])
2020 EnumInfoMask                    = bitfield8("enum_info_mask", "Return Information Mask", [
2021         bf_boolean8(0x01, "enum_info_transport", "Transport Information"),
2022         bf_boolean8(0x02, "enum_info_time", "Time Information"),
2023         bf_boolean8(0x04, "enum_info_name", "Name Information"),
2024         bf_boolean8(0x08, "enum_info_lock", "Lock Information"),
2025         bf_boolean8(0x10, "enum_info_print", "Print Information"),
2026         bf_boolean8(0x20, "enum_info_stats", "Statistical Information"),
2027         bf_boolean8(0x40, "enum_info_account", "Accounting Information"),
2028         bf_boolean8(0x80, "enum_info_auth", "Authentication Information"),
2029 ])
2030
2031 eventOffset                     = bytes("event_offset", "Event Offset", 8)
2032 eventTime                       = uint32("event_time", "Event Time")
2033 eventTime.Display("BASE_HEX")
2034 ExpirationTime                  = uint32("expiration_time", "Expiration Time")
2035 ExpirationTime.Display('BASE_HEX')
2036 ExtAttrDataSize                 = uint32("ext_attr_data_size", "Extended Attributes Data Size")
2037 ExtAttrCount                    = uint32("ext_attr_count", "Extended Attributes Count")
2038 ExtAttrKeySize                  = uint32("ext_attr_key_size", "Extended Attributes Key Size")
2039 ExtendedAttributesDefined       = uint32("extended_attributes_defined", "Extended Attributes Defined")
2040 ExtendedAttributeExtentsUsed    = uint32("extended_attribute_extents_used", "Extended Attribute Extents Used")
2041 ExtendedInfo                    = bitfield16("ext_info", "Extended Return Information", [
2042         bf_boolean16(0x0001, "ext_info_update", "Last Update"),
2043         bf_boolean16(0x0002, "ext_info_dos_name", "DOS Name"),
2044         bf_boolean16(0x0004, "ext_info_flush", "Flush Time"),
2045         bf_boolean16(0x0008, "ext_info_parental", "Parental"),
2046         bf_boolean16(0x0010, "ext_info_mac_finder", "MAC Finder"),
2047         bf_boolean16(0x0020, "ext_info_sibling", "Sibling"),
2048         bf_boolean16(0x0040, "ext_info_effective", "Effective"),
2049         bf_boolean16(0x0080, "ext_info_mac_date", "MAC Date"),
2050         bf_boolean16(0x0100, "ext_info_access", "Last Access"),
2051         bf_boolean16(0x0400, "ext_info_64_bit_fs", "64 Bit File Sizes"),
2052         bf_boolean16(0x8000, "ext_info_newstyle", "New Style"),
2053 ])
2054 ExtRouterActiveFlag             = boolean8("ext_router_active_flag", "External Router Active Flag")
2055
2056 FailedAllocReqCnt               = uint32("failed_alloc_req", "Failed Alloc Request Count")
2057 FatalFATWriteErrors             = uint16("fatal_fat_write_errors", "Fatal FAT Write Errors")
2058 FATScanErrors                   = uint16("fat_scan_errors", "FAT Scan Errors")
2059 FATWriteErrors                  = uint16("fat_write_errors", "FAT Write Errors")
2060 FieldsLenTable                  = bytes("fields_len_table", "Fields Len Table", 32)
2061 FileCount                       = uint16("file_count", "File Count")
2062 FileDate                        = uint16("file_date", "File Date")
2063 FileDate.NWDate()
2064 FileDirWindow                   = uint16("file_dir_win", "File/Dir Window")
2065 FileDirWindow.Display("BASE_HEX")
2066 FileExecuteType                 = uint8("file_execute_type", "File Execute Type")
2067 FileExtendedAttributes          = val_string8("file_ext_attr", "File Extended Attributes", [
2068         [ 0x00, "Search On All Read Only Opens" ],
2069         [ 0x01, "Search On Read Only Opens With No Path" ],
2070         [ 0x02, "Shell Default Search Mode" ],
2071         [ 0x03, "Search On All Opens With No Path" ],
2072         [ 0x04, "Do Not Search" ],
2073         [ 0x05, "Reserved" ],
2074         [ 0x06, "Search On All Opens" ],
2075         [ 0x07, "Reserved" ],
2076         [ 0x08, "Search On All Read Only Opens/Indexed" ],
2077         [ 0x09, "Search On Read Only Opens With No Path/Indexed" ],
2078         [ 0x0a, "Shell Default Search Mode/Indexed" ],
2079         [ 0x0b, "Search On All Opens With No Path/Indexed" ],
2080         [ 0x0c, "Do Not Search/Indexed" ],
2081         [ 0x0d, "Indexed" ],
2082         [ 0x0e, "Search On All Opens/Indexed" ],
2083         [ 0x0f, "Indexed" ],
2084         [ 0x10, "Search On All Read Only Opens/Transactional" ],
2085         [ 0x11, "Search On Read Only Opens With No Path/Transactional" ],
2086         [ 0x12, "Shell Default Search Mode/Transactional" ],
2087         [ 0x13, "Search On All Opens With No Path/Transactional" ],
2088         [ 0x14, "Do Not Search/Transactional" ],
2089         [ 0x15, "Transactional" ],
2090         [ 0x16, "Search On All Opens/Transactional" ],
2091         [ 0x17, "Transactional" ],
2092         [ 0x18, "Search On All Read Only Opens/Indexed/Transactional" ],
2093         [ 0x19, "Search On Read Only Opens With No Path/Indexed/Transactional" ],
2094         [ 0x1a, "Shell Default Search Mode/Indexed/Transactional" ],
2095         [ 0x1b, "Search On All Opens With No Path/Indexed/Transactional" ],
2096         [ 0x1c, "Do Not Search/Indexed/Transactional" ],
2097         [ 0x1d, "Indexed/Transactional" ],
2098         [ 0x1e, "Search On All Opens/Indexed/Transactional" ],
2099         [ 0x1f, "Indexed/Transactional" ],
2100         [ 0x40, "Search On All Read Only Opens/Read Audit" ],
2101         [ 0x41, "Search On Read Only Opens With No Path/Read Audit" ],
2102         [ 0x42, "Shell Default Search Mode/Read Audit" ],
2103         [ 0x43, "Search On All Opens With No Path/Read Audit" ],
2104         [ 0x44, "Do Not Search/Read Audit" ],
2105         [ 0x45, "Read Audit" ],
2106         [ 0x46, "Search On All Opens/Read Audit" ],
2107         [ 0x47, "Read Audit" ],
2108         [ 0x48, "Search On All Read Only Opens/Indexed/Read Audit" ],
2109         [ 0x49, "Search On Read Only Opens With No Path/Indexed/Read Audit" ],
2110         [ 0x4a, "Shell Default Search Mode/Indexed/Read Audit" ],
2111         [ 0x4b, "Search On All Opens With No Path/Indexed/Read Audit" ],
2112         [ 0x4c, "Do Not Search/Indexed/Read Audit" ],
2113         [ 0x4d, "Indexed/Read Audit" ],
2114         [ 0x4e, "Search On All Opens/Indexed/Read Audit" ],
2115         [ 0x4f, "Indexed/Read Audit" ],
2116         [ 0x50, "Search On All Read Only Opens/Transactional/Read Audit" ],
2117         [ 0x51, "Search On Read Only Opens With No Path/Transactional/Read Audit" ],
2118         [ 0x52, "Shell Default Search Mode/Transactional/Read Audit" ],
2119         [ 0x53, "Search On All Opens With No Path/Transactional/Read Audit" ],
2120         [ 0x54, "Do Not Search/Transactional/Read Audit" ],
2121         [ 0x55, "Transactional/Read Audit" ],
2122         [ 0x56, "Search On All Opens/Transactional/Read Audit" ],
2123         [ 0x57, "Transactional/Read Audit" ],
2124         [ 0x58, "Search On All Read Only Opens/Indexed/Transactional/Read Audit" ],
2125         [ 0x59, "Search On Read Only Opens With No Path/Indexed/Transactional/Read Audit" ],
2126         [ 0x5a, "Shell Default Search Mode/Indexed/Transactional/Read Audit" ],
2127         [ 0x5b, "Search On All Opens With No Path/Indexed/Transactional/Read Audit" ],
2128         [ 0x5c, "Do Not Search/Indexed/Transactional/Read Audit" ],
2129         [ 0x5d, "Indexed/Transactional/Read Audit" ],
2130         [ 0x5e, "Search On All Opens/Indexed/Transactional/Read Audit" ],
2131         [ 0x5f, "Indexed/Transactional/Read Audit" ],
2132         [ 0x80, "Search On All Read Only Opens/Write Audit" ],
2133         [ 0x81, "Search On Read Only Opens With No Path/Write Audit" ],
2134         [ 0x82, "Shell Default Search Mode/Write Audit" ],
2135         [ 0x83, "Search On All Opens With No Path/Write Audit" ],
2136         [ 0x84, "Do Not Search/Write Audit" ],
2137         [ 0x85, "Write Audit" ],
2138         [ 0x86, "Search On All Opens/Write Audit" ],
2139         [ 0x87, "Write Audit" ],
2140         [ 0x88, "Search On All Read Only Opens/Indexed/Write Audit" ],
2141         [ 0x89, "Search On Read Only Opens With No Path/Indexed/Write Audit" ],
2142         [ 0x8a, "Shell Default Search Mode/Indexed/Write Audit" ],
2143         [ 0x8b, "Search On All Opens With No Path/Indexed/Write Audit" ],
2144         [ 0x8c, "Do Not Search/Indexed/Write Audit" ],
2145         [ 0x8d, "Indexed/Write Audit" ],
2146         [ 0x8e, "Search On All Opens/Indexed/Write Audit" ],
2147         [ 0x8f, "Indexed/Write Audit" ],
2148         [ 0x90, "Search On All Read Only Opens/Transactional/Write Audit" ],
2149         [ 0x91, "Search On Read Only Opens With No Path/Transactional/Write Audit" ],
2150         [ 0x92, "Shell Default Search Mode/Transactional/Write Audit" ],
2151         [ 0x93, "Search On All Opens With No Path/Transactional/Write Audit" ],
2152         [ 0x94, "Do Not Search/Transactional/Write Audit" ],
2153         [ 0x95, "Transactional/Write Audit" ],
2154         [ 0x96, "Search On All Opens/Transactional/Write Audit" ],
2155         [ 0x97, "Transactional/Write Audit" ],
2156         [ 0x98, "Search On All Read Only Opens/Indexed/Transactional/Write Audit" ],
2157         [ 0x99, "Search On Read Only Opens With No Path/Indexed/Transactional/Write Audit" ],
2158         [ 0x9a, "Shell Default Search Mode/Indexed/Transactional/Write Audit" ],
2159         [ 0x9b, "Search On All Opens With No Path/Indexed/Transactional/Write Audit" ],
2160         [ 0x9c, "Do Not Search/Indexed/Transactional/Write Audit" ],
2161         [ 0x9d, "Indexed/Transactional/Write Audit" ],
2162         [ 0x9e, "Search On All Opens/Indexed/Transactional/Write Audit" ],
2163         [ 0x9f, "Indexed/Transactional/Write Audit" ],
2164         [ 0xa0, "Search On All Read Only Opens/Read Audit/Write Audit" ],
2165         [ 0xa1, "Search On Read Only Opens With No Path/Read Audit/Write Audit" ],
2166         [ 0xa2, "Shell Default Search Mode/Read Audit/Write Audit" ],
2167         [ 0xa3, "Search On All Opens With No Path/Read Audit/Write Audit" ],
2168         [ 0xa4, "Do Not Search/Read Audit/Write Audit" ],
2169         [ 0xa5, "Read Audit/Write Audit" ],
2170         [ 0xa6, "Search On All Opens/Read Audit/Write Audit" ],
2171         [ 0xa7, "Read Audit/Write Audit" ],
2172         [ 0xa8, "Search On All Read Only Opens/Indexed/Read Audit/Write Audit" ],
2173         [ 0xa9, "Search On Read Only Opens With No Path/Indexed/Read Audit/Write Audit" ],
2174         [ 0xaa, "Shell Default Search Mode/Indexed/Read Audit/Write Audit" ],
2175         [ 0xab, "Search On All Opens With No Path/Indexed/Read Audit/Write Audit" ],
2176         [ 0xac, "Do Not Search/Indexed/Read Audit/Write Audit" ],
2177         [ 0xad, "Indexed/Read Audit/Write Audit" ],
2178         [ 0xae, "Search On All Opens/Indexed/Read Audit/Write Audit" ],
2179         [ 0xaf, "Indexed/Read Audit/Write Audit" ],
2180         [ 0xb0, "Search On All Read Only Opens/Transactional/Read Audit/Write Audit" ],
2181         [ 0xb1, "Search On Read Only Opens With No Path/Transactional/Read Audit/Write Audit" ],
2182         [ 0xb2, "Shell Default Search Mode/Transactional/Read Audit/Write Audit" ],
2183         [ 0xb3, "Search On All Opens With No Path/Transactional/Read Audit/Write Audit" ],
2184         [ 0xb4, "Do Not Search/Transactional/Read Audit/Write Audit" ],
2185         [ 0xb5, "Transactional/Read Audit/Write Audit" ],
2186         [ 0xb6, "Search On All Opens/Transactional/Read Audit/Write Audit" ],
2187         [ 0xb7, "Transactional/Read Audit/Write Audit" ],
2188         [ 0xb8, "Search On All Read Only Opens/Indexed/Transactional/Read Audit/Write Audit" ],
2189         [ 0xb9, "Search On Read Only Opens With No Path/Indexed/Transactional/Read Audit/Write Audit" ],
2190         [ 0xba, "Shell Default Search Mode/Indexed/Transactional/Read Audit/Write Audit" ],
2191         [ 0xbb, "Search On All Opens With No Path/Indexed/Transactional/Read Audit/Write Audit" ],
2192         [ 0xbc, "Do Not Search/Indexed/Transactional/Read Audit/Write Audit" ],
2193         [ 0xbd, "Indexed/Transactional/Read Audit/Write Audit" ],
2194         [ 0xbe, "Search On All Opens/Indexed/Transactional/Read Audit/Write Audit" ],
2195         [ 0xbf, "Indexed/Transactional/Read Audit/Write Audit" ],
2196 ])
2197 fileFlags                       = uint32("file_flags", "File Flags")
2198 FileHandle                      = bytes("file_handle", "File Handle", 6)
2199 FileLimbo                       = uint32("file_limbo", "File Limbo")
2200 FileListCount                   = uint32("file_list_count", "File List Count")
2201 FileLock                        = val_string8("file_lock", "File Lock", [
2202         [ 0x00, "Not Locked" ],
2203         [ 0xfe, "Locked by file lock" ],
2204         [ 0xff, "Unknown" ],
2205 ])
2206 FileLockCount                   = uint16("file_lock_count", "File Lock Count")
2207 FileMigrationState  = val_string8("file_mig_state", "File Migration State", [
2208     [ 0x00, "Mark file ineligible for file migration" ],
2209     [ 0x01, "Mark file eligible for file migration" ],
2210     [ 0x02, "Mark file as migrated and delete fat chains" ],
2211     [ 0x03, "Reset file status back to normal" ],
2212     [ 0x04, "Get file data back and reset file status back to normal" ],
2213 ])
2214 FileMode                        = uint8("file_mode", "File Mode")
2215 FileName                        = nstring8("file_name", "Filename")
2216 FileName12                      = fw_string("file_name_12", "Filename", 12)
2217 FileName14                      = fw_string("file_name_14", "Filename", 14)
2218 FileName16          = nstring16("file_name_16", "Filename")
2219 FileNameLen                     = uint8("file_name_len", "Filename Length")
2220 FileOffset                      = uint32("file_offset", "File Offset")
2221 FilePath                        = nstring8("file_path", "File Path")
2222 FileSize                        = uint32("file_size", "File Size", BE)
2223 FileSize64bit       = uint64("f_size_64bit", "64bit File Size")
2224 FileSystemID                    = uint8("file_system_id", "File System ID")
2225 FileTime                        = uint16("file_time", "File Time")
2226 FileTime.NWTime()
2227 FileUseCount        = uint16("file_use_count", "File Use Count")
2228 FileWriteFlags                  = val_string8("file_write_flags", "File Write Flags", [
2229         [ 0x01, "Writing" ],
2230         [ 0x02, "Write aborted" ],
2231 ])
2232 FileWriteState                  = val_string8("file_write_state", "File Write State", [
2233         [ 0x00, "Not Writing" ],
2234         [ 0x01, "Write in Progress" ],
2235         [ 0x02, "Write Being Stopped" ],
2236 ])
2237 Filler                          = uint8("filler", "Filler")
2238 FinderAttr                      = bitfield16("finder_attr", "Finder Info Attributes", [
2239         bf_boolean16(0x0001, "finder_attr_desktop", "Object on Desktop"),
2240         bf_boolean16(0x2000, "finder_attr_invisible", "Object is Invisible"),
2241         bf_boolean16(0x4000, "finder_attr_bundle", "Object Has Bundle"),
2242 ])
2243 FixedBitMask                    = uint32("fixed_bit_mask", "Fixed Bit Mask")
2244 FixedBitsDefined                = uint16("fixed_bits_defined", "Fixed Bits Defined")
2245 FlagBits                        = uint8("flag_bits", "Flag Bits")
2246 Flags                           = uint8("flags", "Flags")
2247 FlagsDef                        = uint16("flags_def", "Flags")
2248 FlushTime                       = uint32("flush_time", "Flush Time")
2249 FolderFlag                      = val_string8("folder_flag", "Folder Flag", [
2250         [ 0x00, "Not a Folder" ],
2251         [ 0x01, "Folder" ],
2252 ])
2253 ForkCount                       = uint8("fork_count", "Fork Count")
2254 ForkIndicator                   = val_string8("fork_indicator", "Fork Indicator", [
2255         [ 0x00, "Data Fork" ],
2256         [ 0x01, "Resource Fork" ],
2257 ])
2258 ForceFlag                       = val_string8("force_flag", "Force Server Down Flag", [
2259         [ 0x00, "Down Server if No Files Are Open" ],
2260         [ 0xff, "Down Server Immediately, Auto-Close Open Files" ],
2261 ])
2262 ForgedDetachedRequests          = uint16("forged_detached_requests", "Forged Detached Requests")
2263 FormType                        = uint16( "form_type", "Form Type" )
2264 FormTypeCnt                     = uint32("form_type_count", "Form Types Count")
2265 FoundSomeMem                    = uint32("found_some_mem", "Found Some Memory")
2266 FractionalSeconds               = uint32("fractional_time", "Fractional Time in Seconds")
2267 FraggerHandle                   = uint32("fragger_handle", "Fragment Handle")
2268 FraggerHandle.Display('BASE_HEX')
2269 FragmentWriteOccurred           = uint16("fragment_write_occurred", "Fragment Write Occurred")
2270 FragSize                        = uint32("frag_size", "Fragment Size")
2271 FreeableLimboSectors            = uint32("freeable_limbo_sectors", "Freeable Limbo Sectors")
2272 FreeBlocks                      = uint32("free_blocks", "Free Blocks")
2273 FreedClusters                   = uint32("freed_clusters", "Freed Clusters")
2274 FreeDirectoryEntries            = uint16("free_directory_entries", "Free Directory Entries")
2275 FSEngineFlag                    = boolean8("fs_engine_flag", "FS Engine Flag")
2276 FullName                        = fw_string("full_name", "Full Name", 39)
2277
2278 GetSetFlag                      = val_string8("get_set_flag", "Get Set Flag", [
2279         [ 0x00, "Get the default support module ID" ],
2280         [ 0x01, "Set the default support module ID" ],
2281 ])
2282 GUID                            = bytes("guid", "GUID", 16)
2283
2284 HandleFlag                      = val_string8("handle_flag", "Handle Flag", [
2285         [ 0x00, "Short Directory Handle" ],
2286         [ 0x01, "Directory Base" ],
2287         [ 0xFF, "No Handle Present" ],
2288 ])
2289 HandleInfoLevel                 = val_string8("handle_info_level", "Handle Info Level", [
2290         [ 0x00, "Get Limited Information from a File Handle" ],
2291         [ 0x01, "Get Limited Information from a File Handle Using a Name Space" ],
2292         [ 0x02, "Get Information from a File Handle" ],
2293         [ 0x03, "Get Information from a Directory Handle" ],
2294         [ 0x04, "Get Complete Information from a Directory Handle" ],
2295         [ 0x05, "Get Complete Information from a File Handle" ],
2296 ])
2297 HeldBytesRead                   = bytes("held_bytes_read", "Held Bytes Read", 6)
2298 HeldBytesWritten                = bytes("held_bytes_write", "Held Bytes Written", 6)
2299 HeldConnectTimeInMinutes        = uint32("held_conn_time", "Held Connect Time in Minutes")
2300 HeldRequests                    = uint32("user_info_held_req", "Held Requests")
2301 HoldAmount                      = uint32("hold_amount", "Hold Amount")
2302 HoldCancelAmount                = uint32("hold_cancel_amount", "Hold Cancel Amount")
2303 HolderID                        = uint32("holder_id", "Holder ID")
2304 HolderID.Display("BASE_HEX")
2305 HoldTime                        = uint32("hold_time", "Hold Time")
2306 HopsToNet                       = uint16("hops_to_net", "Hop Count")
2307 HorizLocation                   = uint16("horiz_location", "Horizontal Location")
2308 HostAddress                     = bytes("host_address", "Host Address", 6)
2309 HotFixBlocksAvailable           = uint16("hot_fix_blocks_available", "Hot Fix Blocks Available")
2310 HotFixDisabled                  = val_string8("hot_fix_disabled", "Hot Fix Disabled", [
2311         [ 0x00, "Enabled" ],
2312         [ 0x01, "Disabled" ],
2313 ])
2314 HotFixTableSize                 = uint16("hot_fix_table_size", "Hot Fix Table Size")
2315 HotFixTableStart                = uint32("hot_fix_table_start", "Hot Fix Table Start")
2316 Hour                            = uint8("s_hour", "Hour")
2317 HugeBitMask                     = uint32("huge_bit_mask", "Huge Bit Mask")
2318 HugeBitsDefined                 = uint16("huge_bits_defined", "Huge Bits Defined")
2319 HugeData                        = nstring8("huge_data", "Huge Data")
2320 HugeDataUsed                    = uint32("huge_data_used", "Huge Data Used")
2321 HugeStateInfo                   = bytes("huge_state_info", "Huge State Info", 16)
2322
2323 IdentificationNumber            = uint32("identification_number", "Identification Number")
2324 IgnoredRxPkts                   = uint32("ignored_rx_pkts", "Ignored Receive Packets")
2325 IncomingPacketDiscardedNoDGroup = uint16("incoming_packet_discarded_no_dgroup", "Incoming Packet Discarded No DGroup")
2326 IndexNumber                     = uint8("index_number", "Index Number")
2327 InfoCount                       = uint16("info_count", "Info Count")
2328 InfoFlags                       = bitfield32("info_flags", "Info Flags", [
2329         bf_boolean32(0x10000000, "info_flags_security", "Return Object Security"),
2330         bf_boolean32(0x20000000, "info_flags_flags", "Return Object Flags"),
2331         bf_boolean32(0x40000000, "info_flags_type", "Return Object Type"),
2332         bf_boolean32(0x80000000, "info_flags_name", "Return Object Name"),
2333 ])
2334 InfoLevelNumber                 = val_string8("info_level_num", "Information Level Number", [
2335         [ 0x01, "Volume Information Definition" ],
2336         [ 0x02, "Volume Information 2 Definition" ],
2337 ])
2338 InfoMask                        = bitfield32("info_mask", "Information Mask", [
2339         bf_boolean32(0x00000001, "info_flags_dos_time", "DOS Time"),
2340         bf_boolean32(0x00000002, "info_flags_ref_count", "Reference Count"),
2341         bf_boolean32(0x00000004, "info_flags_dos_attr", "DOS Attributes"),
2342         bf_boolean32(0x00000008, "info_flags_ids", "ID's"),
2343         bf_boolean32(0x00000010, "info_flags_ds_sizes", "Data Stream Sizes"),
2344         bf_boolean32(0x00000020, "info_flags_ns_attr", "Name Space Attributes"),
2345         bf_boolean32(0x00000040, "info_flags_ea_present", "EA Present Flag"),
2346         bf_boolean32(0x00000080, "info_flags_all_attr", "All Attributes"),
2347         bf_boolean32(0x00000100, "info_flags_all_dirbase_num", "All Directory Base Numbers"),
2348         bf_boolean32(0x00000200, "info_flags_max_access_mask", "Maximum Access Mask"),
2349         bf_boolean32(0x00000400, "info_flags_flush_time", "Flush Time"),
2350         bf_boolean32(0x00000800, "info_flags_prnt_base_id", "Parent Base ID"),
2351         bf_boolean32(0x00001000, "info_flags_mac_finder", "Mac Finder Information"),
2352         bf_boolean32(0x00002000, "info_flags_sibling_cnt", "Sibling Count"),
2353         bf_boolean32(0x00004000, "info_flags_effect_rights", "Effective Rights"),
2354         bf_boolean32(0x00008000, "info_flags_mac_time", "Mac Time"),
2355         bf_boolean32(0x20000000, "info_mask_dosname", "DOS Name"),
2356         bf_boolean32(0x40000000, "info_mask_c_name_space", "Creator Name Space & Name"),
2357         bf_boolean32(0x80000000, "info_mask_name", "Name"),
2358 ])
2359 InheritedRightsMask             = bitfield16("inherited_rights_mask", "Inherited Rights Mask", [
2360     bf_boolean16(0x0001, "inh_rights_read", "Read Rights"),
2361         bf_boolean16(0x0002, "inh_rights_write", "Write Rights"),
2362         bf_boolean16(0x0004, "inh_rights_open", "Open Rights"),
2363         bf_boolean16(0x0008, "inh_rights_create", "Create Rights"),
2364         bf_boolean16(0x0010, "inh_rights_delete", "Delete Rights"),
2365         bf_boolean16(0x0020, "inh_rights_parent", "Change Access"),
2366         bf_boolean16(0x0040, "inh_rights_search", "See Files Flag"),
2367         bf_boolean16(0x0080, "inh_rights_modify", "Modify Rights"),
2368         bf_boolean16(0x0100, "inh_rights_supervisor", "Supervisor"),
2369 ])
2370 InheritanceRevokeMask           = bitfield16("inheritance_revoke_mask", "Revoke Rights Mask", [
2371         bf_boolean16(0x0001, "inh_revoke_read", "Read Rights"),
2372         bf_boolean16(0x0002, "inh_revoke_write", "Write Rights"),
2373         bf_boolean16(0x0004, "inh_revoke_open", "Open Rights"),
2374         bf_boolean16(0x0008, "inh_revoke_create", "Create Rights"),
2375         bf_boolean16(0x0010, "inh_revoke_delete", "Delete Rights"),
2376         bf_boolean16(0x0020, "inh_revoke_parent", "Change Access"),
2377         bf_boolean16(0x0040, "inh_revoke_search", "See Files Flag"),
2378         bf_boolean16(0x0080, "inh_revoke_modify", "Modify Rights"),
2379         bf_boolean16(0x0100, "inh_revoke_supervisor", "Supervisor"),
2380 ])
2381 InitialSemaphoreValue           = uint8("initial_semaphore_value", "Initial Semaphore Value")
2382 InspectSize                     = uint32("inspect_size", "Inspect Size")
2383 InternetBridgeVersion           = uint8("internet_bridge_version", "Internet Bridge Version")
2384 InterruptNumbersUsed            = uint32("interrupt_numbers_used", "Interrupt Numbers Used")
2385 InUse                           = uint32("in_use", "Bytes in Use")
2386 IOAddressesUsed                 = bytes("io_addresses_used", "IO Addresses Used", 8)
2387 IOErrorCount                    = uint16("io_error_count", "IO Error Count")
2388 IOEngineFlag                    = boolean8("io_engine_flag", "IO Engine Flag")
2389 IPXNotMyNetwork                 = uint16("ipx_not_my_network", "IPX Not My Network")
2390 ItemsChanged                    = uint32("items_changed", "Items Changed")
2391 ItemsChecked                    = uint32("items_checked", "Items Checked")
2392 ItemsCount                      = uint32("items_count", "Items Count")
2393 itemsInList                     = uint32("items_in_list", "Items in List")
2394 ItemsInPacket                   = uint32("items_in_packet", "Items in Packet")
2395
2396 JobControlFlags                 = bitfield8("job_control_flags", "Job Control Flags", [
2397         bf_boolean8(0x08, "job_control_job_recovery", "Job Recovery"),
2398         bf_boolean8(0x10, "job_control_reservice", "ReService Job"),
2399         bf_boolean8(0x20, "job_control_file_open", "File Open"),
2400         bf_boolean8(0x40, "job_control_user_hold", "User Hold"),
2401         bf_boolean8(0x80, "job_control_operator_hold", "Operator Hold"),
2402
2403 ])
2404 JobControlFlagsWord             = bitfield16("job_control_flags_word", "Job Control Flags", [
2405         bf_boolean16(0x0008, "job_control1_job_recovery", "Job Recovery"),
2406         bf_boolean16(0x0010, "job_control1_reservice", "ReService Job"),
2407         bf_boolean16(0x0020, "job_control1_file_open", "File Open"),
2408         bf_boolean16(0x0040, "job_control1_user_hold", "User Hold"),
2409         bf_boolean16(0x0080, "job_control1_operator_hold", "Operator Hold"),
2410
2411 ])
2412 JobCount                        = uint32("job_count", "Job Count")
2413 JobFileHandle                   = bytes("job_file_handle", "Job File Handle", 6)
2414 JobFileHandleLong               = uint32("job_file_handle_long", "Job File Handle", BE)
2415 JobFileHandleLong.Display("BASE_HEX")
2416 JobFileName                     = fw_string("job_file_name", "Job File Name", 14)
2417 JobPosition                     = uint8("job_position", "Job Position")
2418 JobPositionWord                 = uint16("job_position_word", "Job Position")
2419 JobNumber                       = uint16("job_number", "Job Number", BE )
2420 JobNumberLong                   = uint32("job_number_long", "Job Number", BE )
2421 JobNumberLong.Display("BASE_HEX")
2422 JobType                         = uint16("job_type", "Job Type", BE )
2423
2424 LANCustomVariablesCount         = uint32("lan_cust_var_count", "LAN Custom Variables Count")
2425 LANdriverBoardInstance          = uint16("lan_drv_bd_inst", "LAN Driver Board Instance")
2426 LANdriverBoardNumber            = uint16("lan_drv_bd_num", "LAN Driver Board Number")
2427 LANdriverCardID                 = uint16("lan_drv_card_id", "LAN Driver Card ID")
2428 LANdriverCardName               = fw_string("lan_drv_card_name", "LAN Driver Card Name", 28)
2429 LANdriverCFG_MajorVersion       = uint8("lan_dvr_cfg_major_vrs", "LAN Driver Config - Major Version")
2430 LANdriverCFG_MinorVersion       = uint8("lan_dvr_cfg_minor_vrs", "LAN Driver Config - Minor Version")
2431 LANdriverDMAUsage1              = uint8("lan_drv_dma_usage1", "Primary DMA Channel")
2432 LANdriverDMAUsage2              = uint8("lan_drv_dma_usage2", "Secondary DMA Channel")
2433 LANdriverFlags                  = uint16("lan_drv_flags", "LAN Driver Flags")
2434 LANdriverFlags.Display("BASE_HEX")
2435 LANdriverInterrupt1             = uint8("lan_drv_interrupt1", "Primary Interrupt Vector")
2436 LANdriverInterrupt2             = uint8("lan_drv_interrupt2", "Secondary Interrupt Vector")
2437 LANdriverIOPortsAndRanges1      = uint16("lan_drv_io_ports_and_ranges_1", "Primary Base I/O Port")
2438 LANdriverIOPortsAndRanges2      = uint16("lan_drv_io_ports_and_ranges_2", "Number of I/O Ports")
2439 LANdriverIOPortsAndRanges3      = uint16("lan_drv_io_ports_and_ranges_3", "Secondary Base I/O Port")
2440 LANdriverIOPortsAndRanges4      = uint16("lan_drv_io_ports_and_ranges_4", "Number of I/O Ports")
2441 LANdriverIOReserved             = bytes("lan_drv_io_reserved", "LAN Driver IO Reserved", 14)
2442 LANdriverLineSpeed              = uint16("lan_drv_line_speed", "LAN Driver Line Speed")
2443 LANdriverLink                   = uint32("lan_drv_link", "LAN Driver Link")
2444 LANdriverLogicalName            = bytes("lan_drv_log_name", "LAN Driver Logical Name", 18)
2445 LANdriverMajorVersion           = uint8("lan_drv_major_ver", "LAN Driver Major Version")
2446 LANdriverMaximumSize            = uint32("lan_drv_max_size", "LAN Driver Maximum Size")
2447 LANdriverMaxRecvSize            = uint32("lan_drv_max_rcv_size", "LAN Driver Maximum Receive Size")
2448 LANdriverMediaID                = uint16("lan_drv_media_id", "LAN Driver Media ID")
2449 LANdriverMediaType              = fw_string("lan_drv_media_type", "LAN Driver Media Type", 40)
2450 LANdriverMemoryDecode0          = uint32("lan_drv_mem_decode_0", "LAN Driver Memory Decode 0")
2451 LANdriverMemoryDecode1          = uint32("lan_drv_mem_decode_1", "LAN Driver Memory Decode 1")
2452 LANdriverMemoryLength0          = uint16("lan_drv_mem_length_0", "LAN Driver Memory Length 0")
2453 LANdriverMemoryLength1          = uint16("lan_drv_mem_length_1", "LAN Driver Memory Length 1")
2454 LANdriverMinorVersion           = uint8("lan_drv_minor_ver", "LAN Driver Minor Version")
2455 LANdriverModeFlags              = val_string8("lan_dvr_mode_flags", "LAN Driver Mode Flags", [
2456         [0x80, "Canonical Address" ],
2457         [0x81, "Canonical Address" ],
2458         [0x82, "Canonical Address" ],
2459         [0x83, "Canonical Address" ],
2460         [0x84, "Canonical Address" ],
2461         [0x85, "Canonical Address" ],
2462         [0x86, "Canonical Address" ],
2463         [0x87, "Canonical Address" ],
2464         [0x88, "Canonical Address" ],
2465         [0x89, "Canonical Address" ],
2466         [0x8a, "Canonical Address" ],
2467         [0x8b, "Canonical Address" ],
2468         [0x8c, "Canonical Address" ],
2469         [0x8d, "Canonical Address" ],
2470         [0x8e, "Canonical Address" ],
2471         [0x8f, "Canonical Address" ],
2472         [0x90, "Canonical Address" ],
2473         [0x91, "Canonical Address" ],
2474         [0x92, "Canonical Address" ],
2475         [0x93, "Canonical Address" ],
2476         [0x94, "Canonical Address" ],
2477         [0x95, "Canonical Address" ],
2478         [0x96, "Canonical Address" ],
2479         [0x97, "Canonical Address" ],
2480         [0x98, "Canonical Address" ],
2481         [0x99, "Canonical Address" ],
2482         [0x9a, "Canonical Address" ],
2483         [0x9b, "Canonical Address" ],
2484         [0x9c, "Canonical Address" ],
2485         [0x9d, "Canonical Address" ],
2486         [0x9e, "Canonical Address" ],
2487         [0x9f, "Canonical Address" ],
2488         [0xa0, "Canonical Address" ],
2489         [0xa1, "Canonical Address" ],
2490         [0xa2, "Canonical Address" ],
2491         [0xa3, "Canonical Address" ],
2492         [0xa4, "Canonical Address" ],
2493         [0xa5, "Canonical Address" ],
2494         [0xa6, "Canonical Address" ],
2495         [0xa7, "Canonical Address" ],
2496         [0xa8, "Canonical Address" ],
2497         [0xa9, "Canonical Address" ],
2498         [0xaa, "Canonical Address" ],
2499         [0xab, "Canonical Address" ],
2500         [0xac, "Canonical Address" ],
2501         [0xad, "Canonical Address" ],
2502         [0xae, "Canonical Address" ],
2503         [0xaf, "Canonical Address" ],
2504         [0xb0, "Canonical Address" ],
2505         [0xb1, "Canonical Address" ],
2506         [0xb2, "Canonical Address" ],
2507         [0xb3, "Canonical Address" ],
2508         [0xb4, "Canonical Address" ],
2509         [0xb5, "Canonical Address" ],
2510         [0xb6, "Canonical Address" ],
2511         [0xb7, "Canonical Address" ],
2512         [0xb8, "Canonical Address" ],
2513         [0xb9, "Canonical Address" ],
2514         [0xba, "Canonical Address" ],
2515         [0xbb, "Canonical Address" ],
2516         [0xbc, "Canonical Address" ],
2517         [0xbd, "Canonical Address" ],
2518         [0xbe, "Canonical Address" ],
2519         [0xbf, "Canonical Address" ],
2520         [0xc0, "Non-Canonical Address" ],
2521         [0xc1, "Non-Canonical Address" ],
2522         [0xc2, "Non-Canonical Address" ],
2523         [0xc3, "Non-Canonical Address" ],
2524         [0xc4, "Non-Canonical Address" ],
2525         [0xc5, "Non-Canonical Address" ],
2526         [0xc6, "Non-Canonical Address" ],
2527         [0xc7, "Non-Canonical Address" ],
2528         [0xc8, "Non-Canonical Address" ],
2529         [0xc9, "Non-Canonical Address" ],
2530         [0xca, "Non-Canonical Address" ],
2531         [0xcb, "Non-Canonical Address" ],
2532         [0xcc, "Non-Canonical Address" ],
2533         [0xcd, "Non-Canonical Address" ],
2534         [0xce, "Non-Canonical Address" ],
2535         [0xcf, "Non-Canonical Address" ],
2536         [0xd0, "Non-Canonical Address" ],
2537         [0xd1, "Non-Canonical Address" ],
2538         [0xd2, "Non-Canonical Address" ],
2539         [0xd3, "Non-Canonical Address" ],
2540         [0xd4, "Non-Canonical Address" ],
2541         [0xd5, "Non-Canonical Address" ],
2542         [0xd6, "Non-Canonical Address" ],
2543         [0xd7, "Non-Canonical Address" ],
2544         [0xd8, "Non-Canonical Address" ],
2545         [0xd9, "Non-Canonical Address" ],
2546         [0xda, "Non-Canonical Address" ],
2547         [0xdb, "Non-Canonical Address" ],
2548         [0xdc, "Non-Canonical Address" ],
2549         [0xdd, "Non-Canonical Address" ],
2550         [0xde, "Non-Canonical Address" ],
2551         [0xdf, "Non-Canonical Address" ],
2552         [0xe0, "Non-Canonical Address" ],
2553         [0xe1, "Non-Canonical Address" ],
2554         [0xe2, "Non-Canonical Address" ],
2555         [0xe3, "Non-Canonical Address" ],
2556         [0xe4, "Non-Canonical Address" ],
2557         [0xe5, "Non-Canonical Address" ],
2558         [0xe6, "Non-Canonical Address" ],
2559         [0xe7, "Non-Canonical Address" ],
2560         [0xe8, "Non-Canonical Address" ],
2561         [0xe9, "Non-Canonical Address" ],
2562         [0xea, "Non-Canonical Address" ],
2563         [0xeb, "Non-Canonical Address" ],
2564         [0xec, "Non-Canonical Address" ],
2565         [0xed, "Non-Canonical Address" ],
2566         [0xee, "Non-Canonical Address" ],
2567         [0xef, "Non-Canonical Address" ],
2568         [0xf0, "Non-Canonical Address" ],
2569         [0xf1, "Non-Canonical Address" ],
2570         [0xf2, "Non-Canonical Address" ],
2571         [0xf3, "Non-Canonical Address" ],
2572         [0xf4, "Non-Canonical Address" ],
2573         [0xf5, "Non-Canonical Address" ],
2574         [0xf6, "Non-Canonical Address" ],
2575         [0xf7, "Non-Canonical Address" ],
2576         [0xf8, "Non-Canonical Address" ],
2577         [0xf9, "Non-Canonical Address" ],
2578         [0xfa, "Non-Canonical Address" ],
2579         [0xfb, "Non-Canonical Address" ],
2580         [0xfc, "Non-Canonical Address" ],
2581         [0xfd, "Non-Canonical Address" ],
2582         [0xfe, "Non-Canonical Address" ],
2583         [0xff, "Non-Canonical Address" ],
2584 ])
2585 LANDriverNumber                 = uint8("lan_driver_number", "LAN Driver Number")
2586 LANdriverNodeAddress            = bytes("lan_dvr_node_addr", "LAN Driver Node Address", 6)
2587 LANdriverRecvSize               = uint32("lan_drv_rcv_size", "LAN Driver Receive Size")
2588 LANdriverReserved               = uint16("lan_drv_reserved", "LAN Driver Reserved")
2589 LANdriverSendRetries            = uint16("lan_drv_snd_retries", "LAN Driver Send Retries")
2590 LANdriverSharingFlags           = uint16("lan_drv_share", "LAN Driver Sharing Flags")
2591 LANdriverShortName              = fw_string("lan_drv_short_name", "LAN Driver Short Name", 40)
2592 LANdriverSlot                   = uint16("lan_drv_slot", "LAN Driver Slot")
2593 LANdriverSrcRouting             = uint32("lan_drv_src_route", "LAN Driver Source Routing")
2594 LANdriverTransportTime          = uint16("lan_drv_trans_time", "LAN Driver Transport Time")
2595 LastAccessedDate                = uint16("last_access_date", "Last Accessed Date")
2596 LastAccessedDate.NWDate()
2597 LastAccessedTime                = uint16("last_access_time", "Last Accessed Time")
2598 LastAccessedTime.NWTime()
2599 LastGarbCollect                 = uint32("last_garbage_collect", "Last Garbage Collection")
2600 LastInstance                    = uint32("last_instance", "Last Instance")
2601 LastRecordSeen                  = uint16("last_record_seen", "Last Record Seen")
2602 LastSearchIndex                 = uint16("last_search_index", "Search Index")
2603 LastSeen                        = uint32("last_seen", "Last Seen")
2604 LastSequenceNumber              = uint16("last_sequence_number", "Sequence Number")
2605 Length64bit         = bytes("length_64bit", "64bit Length", 64)
2606 Level                           = uint8("level", "Level")
2607 LFSCounters                     = uint32("lfs_counters", "LFS Counters")
2608 LimboDataStreamsCount           = uint32("limbo_data_streams_count", "Limbo Data Streams Count")
2609 limbCount                       = uint32("limb_count", "Limb Count")
2610 limbFlags           = bitfield32("limb_flags", "Limb Flags", [
2611         bf_boolean32(0x00000002, "scan_entire_folder", "Wild Search"),
2612         bf_boolean32(0x00000004, "scan_files_only", "Scan Files Only"),
2613         bf_boolean32(0x00000008, "scan_folders_only", "Scan Folders Only"),
2614         bf_boolean32(0x00000010, "allow_system", "Allow System Files and Folders"),
2615         bf_boolean32(0x00000020, "allow_hidden", "Allow Hidden Files and Folders"),
2616 ])
2617
2618 limbScanNum                     = uint32("limb_scan_num", "Limb Scan Number")
2619 LimboUsed                       = uint32("limbo_used", "Limbo Used")
2620 LoadedNameSpaces                = uint8("loaded_name_spaces", "Loaded Name Spaces")
2621 LocalConnectionID               = uint32("local_connection_id", "Local Connection ID")
2622 LocalConnectionID.Display("BASE_HEX")
2623 LocalMaxPacketSize              = uint32("local_max_packet_size", "Local Max Packet Size")
2624 LocalMaxSendSize                = uint32("local_max_send_size", "Local Max Send Size")
2625 LocalMaxRecvSize                = uint32("local_max_recv_size", "Local Max Recv Size")
2626 LocalLoginInfoCcode             = uint8("local_login_info_ccode", "Local Login Info C Code")
2627 LocalTargetSocket               = uint32("local_target_socket", "Local Target Socket")
2628 LocalTargetSocket.Display("BASE_HEX")
2629 LockAreaLen                     = uint32("lock_area_len", "Lock Area Length")
2630 LockAreasStartOffset            = uint32("lock_areas_start_offset", "Lock Areas Start Offset")
2631 LockTimeout                     = uint16("lock_timeout", "Lock Timeout")
2632 Locked                          = val_string8("locked", "Locked Flag", [
2633         [ 0x00, "Not Locked Exclusively" ],
2634         [ 0x01, "Locked Exclusively" ],
2635 ])
2636 LockFlag                        = val_string8("lock_flag", "Lock Flag", [
2637         [ 0x00, "Not Locked, Log for Future Exclusive Lock" ],
2638         [ 0x01, "Exclusive Lock (Read/Write)" ],
2639         [ 0x02, "Log for Future Shared Lock"],
2640         [ 0x03, "Shareable Lock (Read-Only)" ],
2641         [ 0xfe, "Locked by a File Lock" ],
2642         [ 0xff, "Locked by Begin Share File Set" ],
2643 ])
2644 LockName                        = nstring8("lock_name", "Lock Name")
2645 LockStatus                      = val_string8("lock_status", "Lock Status", [
2646         [ 0x00, "Locked Exclusive" ],
2647         [ 0x01, "Locked Shareable" ],
2648         [ 0x02, "Logged" ],
2649         [ 0x06, "Lock is Held by TTS"],
2650 ])
2651 ConnLockStatus                  = val_string8("conn_lock_status", "Lock Status", [
2652         [ 0x00, "Normal (connection free to run)" ],
2653         [ 0x01, "Waiting on physical record lock" ],
2654         [ 0x02, "Waiting on a file lock" ],
2655         [ 0x03, "Waiting on a logical record lock"],
2656         [ 0x04, "Waiting on a semaphore"],
2657 ])
2658 LockType                        = val_string8("lock_type", "Lock Type", [
2659         [ 0x00, "Locked" ],
2660         [ 0x01, "Open Shareable" ],
2661         [ 0x02, "Logged" ],
2662         [ 0x03, "Open Normal" ],
2663         [ 0x06, "TTS Holding Lock" ],
2664         [ 0x07, "Transaction Flag Set on This File" ],
2665 ])
2666 LogFileFlagHigh                 = bitfield8("log_file_flag_high", "Log File Flag (byte 2)", [
2667         bf_boolean8(0x80, "log_flag_call_back", "Call Back Requested" ),
2668 ])
2669 LogFileFlagLow                  = bitfield8("log_file_flag_low", "Log File Flag", [
2670         bf_boolean8(0x01, "log_flag_lock_file", "Lock File Immediately" ),
2671 ])
2672 LoggedObjectID                  = uint32("logged_object_id", "Logged in Object ID")
2673 LoggedObjectID.Display("BASE_HEX")
2674 LoggedCount                     = uint16("logged_count", "Logged Count")
2675 LogicalConnectionNumber         = uint16("logical_connection_number", "Logical Connection Number", BE)
2676 LogicalDriveCount               = uint8("logical_drive_count", "Logical Drive Count")
2677 LogicalDriveNumber              = uint8("logical_drive_number", "Logical Drive Number")
2678 LogicalLockThreshold            = uint8("logical_lock_threshold", "LogicalLockThreshold")
2679 LogicalRecordName               = nstring8("logical_record_name", "Logical Record Name")
2680 LoginKey                        = bytes("login_key", "Login Key", 8)
2681 LogLockType                     = uint8("log_lock_type", "Log Lock Type")
2682 LogTtlRxPkts                    = uint32("log_ttl_rx_pkts", "Total Received Packets")
2683 LogTtlTxPkts                    = uint32("log_ttl_tx_pkts", "Total Transmitted Packets")
2684 LongName                        = fw_string("long_name", "Long Name", 32)
2685 LRUBlockWasDirty                = uint16("lru_block_was_dirty", "LRU Block Was Dirty")
2686
2687 MacAttr                         = bitfield16("mac_attr", "Attributes", [
2688         bf_boolean16(0x0001, "mac_attr_smode1", "Search Mode"),
2689         bf_boolean16(0x0002, "mac_attr_smode2", "Search Mode"),
2690         bf_boolean16(0x0004, "mac_attr_smode3", "Search Mode"),
2691         bf_boolean16(0x0010, "mac_attr_transaction", "Transaction"),
2692         bf_boolean16(0x0020, "mac_attr_index", "Index"),
2693         bf_boolean16(0x0040, "mac_attr_r_audit", "Read Audit"),
2694         bf_boolean16(0x0080, "mac_attr_w_audit", "Write Audit"),
2695         bf_boolean16(0x0100, "mac_attr_r_only", "Read Only"),
2696         bf_boolean16(0x0200, "mac_attr_hidden", "Hidden"),
2697         bf_boolean16(0x0400, "mac_attr_system", "System"),
2698         bf_boolean16(0x0800, "mac_attr_execute_only", "Execute Only"),
2699         bf_boolean16(0x1000, "mac_attr_subdirectory", "Subdirectory"),
2700         bf_boolean16(0x2000, "mac_attr_archive", "Archive"),
2701         bf_boolean16(0x8000, "mac_attr_share", "Shareable File"),
2702 ])
2703 MACBackupDate                   = uint16("mac_backup_date", "Mac Backup Date")
2704 MACBackupDate.NWDate()
2705 MACBackupTime                   = uint16("mac_backup_time", "Mac Backup Time")
2706 MACBackupTime.NWTime()
2707 MacBaseDirectoryID              = uint32("mac_base_directory_id", "Mac Base Directory ID", BE)
2708 MacBaseDirectoryID.Display("BASE_HEX")
2709 MACCreateDate                   = uint16("mac_create_date", "Mac Create Date")
2710 MACCreateDate.NWDate()
2711 MACCreateTime                   = uint16("mac_create_time", "Mac Create Time")
2712 MACCreateTime.NWTime()
2713 MacDestinationBaseID            = uint32("mac_destination_base_id", "Mac Destination Base ID")
2714 MacDestinationBaseID.Display("BASE_HEX")
2715 MacFinderInfo                   = bytes("mac_finder_info", "Mac Finder Information", 32)
2716 MacLastSeenID                   = uint32("mac_last_seen_id", "Mac Last Seen ID")
2717 MacLastSeenID.Display("BASE_HEX")
2718 MacSourceBaseID                 = uint32("mac_source_base_id", "Mac Source Base ID")
2719 MacSourceBaseID.Display("BASE_HEX")
2720 MajorVersion                    = uint32("major_version", "Major Version")
2721 MaxBytes                        = uint16("max_bytes", "Maximum Number of Bytes")
2722 MaxDataStreams                  = uint32("max_data_streams", "Maximum Data Streams")
2723 MaxDirDepth                     = uint32("max_dir_depth", "Maximum Directory Depth")
2724 MaximumSpace                    = uint16("max_space", "Maximum Space")
2725 MaxNumOfConn                    = uint32("max_num_of_conn", "Maximum Number of Connections")
2726 MaxNumOfLANS                    = uint32("max_num_of_lans", "Maximum Number Of LAN's")
2727 MaxNumOfMedias                  = uint32("max_num_of_medias", "Maximum Number Of Media's")
2728 MaxNumOfNmeSps                  = uint32("max_num_of_nme_sps", "Maximum Number Of Name Spaces")
2729 MaxNumOfSpoolPr                 = uint32("max_num_of_spool_pr", "Maximum Number Of Spool Printers")
2730 MaxNumOfStacks                  = uint32("max_num_of_stacks", "Maximum Number Of Stacks")
2731 MaxNumOfUsers                   = uint32("max_num_of_users", "Maximum Number Of Users")
2732 MaxNumOfVol                     = uint32("max_num_of_vol", "Maximum Number of Volumes")
2733 MaxReadDataReplySize    = uint16("max_read_data_reply_size", "Max Read Data Reply Size")
2734 MaxSpace                        = uint32("maxspace", "Maximum Space")
2735 MaxUsedDynamicSpace             = uint32("max_used_dynamic_space", "Max Used Dynamic Space")
2736 MediaList                       = uint32("media_list", "Media List")
2737 MediaListCount                  = uint32("media_list_count", "Media List Count")
2738 MediaName                       = nstring8("media_name", "Media Name")
2739 MediaNumber                     = uint32("media_number", "Media Number")
2740 MaxReplyObjectIDCount           = uint8("max_reply_obj_id_count", "Max Reply Object ID Count")
2741 MediaObjectType                 = val_string8("media_object_type", "Object Type", [
2742         [ 0x00, "Adapter" ],
2743         [ 0x01, "Changer" ],
2744         [ 0x02, "Removable Device" ],
2745         [ 0x03, "Device" ],
2746         [ 0x04, "Removable Media" ],
2747         [ 0x05, "Partition" ],
2748         [ 0x06, "Slot" ],
2749         [ 0x07, "Hotfix" ],
2750         [ 0x08, "Mirror" ],
2751         [ 0x09, "Parity" ],
2752         [ 0x0a, "Volume Segment" ],
2753         [ 0x0b, "Volume" ],
2754         [ 0x0c, "Clone" ],
2755         [ 0x0d, "Fixed Media" ],
2756         [ 0x0e, "Unknown" ],
2757 ])
2758 MemberName                      = nstring8("member_name", "Member Name")
2759 MemberType                      = val_string16("member_type", "Member Type", [
2760         [ 0x0000,       "Unknown" ],
2761         [ 0x0001,       "User" ],
2762         [ 0x0002,       "User group" ],
2763         [ 0x0003,       "Print queue" ],
2764         [ 0x0004,       "NetWare file server" ],
2765         [ 0x0005,       "Job server" ],
2766         [ 0x0006,       "Gateway" ],
2767         [ 0x0007,       "Print server" ],
2768         [ 0x0008,       "Archive queue" ],
2769         [ 0x0009,       "Archive server" ],
2770         [ 0x000a,       "Job queue" ],
2771         [ 0x000b,       "Administration" ],
2772         [ 0x0021,       "NAS SNA gateway" ],
2773         [ 0x0026,       "Remote bridge server" ],
2774         [ 0x0027,       "TCP/IP gateway" ],
2775 ])
2776 MessageLanguage                 = uint32("message_language", "NLM Language")
2777 MigratedFiles                   = uint32("migrated_files", "Migrated Files")
2778 MigratedSectors                 = uint32("migrated_sectors", "Migrated Sectors")
2779 MinorVersion                    = uint32("minor_version", "Minor Version")
2780 Minute                          = uint8("s_minute", "Minutes")
2781 MixedModePathFlag               = val_string8("mixed_mode_path_flag", "Mixed Mode Path Flag", [
2782     [ 0x00, "Mixed mode path handling is not available"],
2783     [ 0x01, "Mixed mode path handling is available"],
2784 ])
2785 ModifiedDate                    = uint16("modified_date", "Modified Date")
2786 ModifiedDate.NWDate()
2787 ModifiedTime                    = uint16("modified_time", "Modified Time")
2788 ModifiedTime.NWTime()
2789 ModifierID                      = uint32("modifier_id", "Modifier ID", BE)
2790 ModifierID.Display("BASE_HEX")
2791 ModifyDOSInfoMask               = bitfield16("modify_dos_info_mask", "Modify DOS Info Mask", [
2792         bf_boolean16(0x0002, "modify_dos_read", "Attributes"),
2793         bf_boolean16(0x0004, "modify_dos_write", "Creation Date"),
2794         bf_boolean16(0x0008, "modify_dos_open", "Creation Time"),
2795         bf_boolean16(0x0010, "modify_dos_create", "Creator ID"),
2796         bf_boolean16(0x0020, "modify_dos_delete", "Archive Date"),
2797         bf_boolean16(0x0040, "modify_dos_parent", "Archive Time"),
2798         bf_boolean16(0x0080, "modify_dos_search", "Archiver ID"),
2799         bf_boolean16(0x0100, "modify_dos_mdate", "Modify Date"),
2800         bf_boolean16(0x0200, "modify_dos_mtime", "Modify Time"),
2801         bf_boolean16(0x0400, "modify_dos_mid", "Modifier ID"),
2802         bf_boolean16(0x0800, "modify_dos_laccess", "Last Access"),
2803         bf_boolean16(0x1000, "modify_dos_inheritance", "Inheritance"),
2804         bf_boolean16(0x2000, "modify_dos_max_space", "Maximum Space"),
2805 ])
2806 Month                           = val_string8("s_month", "Month", [
2807         [ 0x01, "January"],
2808         [ 0x02, "February"],
2809         [ 0x03, "March"],
2810         [ 0x04, "April"],
2811         [ 0x05, "May"],
2812         [ 0x06, "June"],
2813         [ 0x07, "July"],
2814         [ 0x08, "August"],
2815         [ 0x09, "September"],
2816         [ 0x0a, "October"],
2817         [ 0x0b, "November"],
2818         [ 0x0c, "December"],
2819 ])
2820
2821 MoreFlag                        = val_string8("more_flag", "More Flag", [
2822         [ 0x00, "No More Segments/Entries Available" ],
2823         [ 0x01, "More Segments/Entries Available" ],
2824         [ 0xff, "More Segments/Entries Available" ],
2825 ])
2826 MoreProperties                  = val_string8("more_properties", "More Properties", [
2827         [ 0x00, "No More Properties Available" ],
2828         [ 0x01, "No More Properties Available" ],
2829         [ 0xff, "More Properties Available" ],
2830 ])
2831
2832 Name                            = nstring8("name", "Name")
2833 Name12                          = fw_string("name12", "Name", 12)
2834 NameLen                         = uint8("name_len", "Name Space Length")
2835 NameLength                      = uint8("name_length", "Name Length")
2836 NameList                        = uint32("name_list", "Name List")
2837 #
2838 # XXX - should this value be used to interpret the characters in names,
2839 # search patterns, and the like?
2840 #
2841 # We need to handle character sets better, e.g. translating strings
2842 # from whatever character set they are in the packet (DOS/Windows code
2843 # pages, ISO character sets, UNIX EUC character sets, UTF-8, UCS-2/Unicode,
2844 # Mac character sets, etc.) into UCS-4 or UTF-8 and storing them as such
2845 # in the protocol tree, and displaying them as best we can.
2846 #
2847 NameSpace                       = val_string8("name_space", "Name Space", [
2848         [ 0x00, "DOS" ],
2849         [ 0x01, "MAC" ],
2850         [ 0x02, "NFS" ],
2851         [ 0x03, "FTAM" ],
2852         [ 0x04, "OS/2, Long" ],
2853 ])
2854 NamesSpaceInfoMask                      = bitfield16("ns_info_mask", "Names Space Info Mask", [
2855         bf_boolean16(0x0001, "ns_info_mask_modify", "Modify Name"),
2856         bf_boolean16(0x0002, "ns_info_mask_fatt", "File Attributes"),
2857         bf_boolean16(0x0004, "ns_info_mask_cdate", "Creation Date"),
2858         bf_boolean16(0x0008, "ns_info_mask_ctime", "Creation Time"),
2859         bf_boolean16(0x0010, "ns_info_mask_owner", "Owner ID"),
2860         bf_boolean16(0x0020, "ns_info_mask_adate", "Archive Date"),
2861         bf_boolean16(0x0040, "ns_info_mask_atime", "Archive Time"),
2862         bf_boolean16(0x0080, "ns_info_mask_aid", "Archiver ID"),
2863         bf_boolean16(0x0100, "ns_info_mask_udate", "Update Date"),
2864         bf_boolean16(0x0200, "ns_info_mask_utime", "Update Time"),
2865         bf_boolean16(0x0400, "ns_info_mask_uid", "Update ID"),
2866         bf_boolean16(0x0800, "ns_info_mask_acc_date", "Access Date"),
2867         bf_boolean16(0x1000, "ns_info_mask_max_acc_mask", "Inheritance"),
2868         bf_boolean16(0x2000, "ns_info_mask_max_space", "Maximum Space"),
2869 ])
2870 NameSpaceName                   = nstring8("name_space_name", "Name Space Name")
2871 nameType                        = uint32("name_type", "nameType")
2872 NCPdataSize                     = uint32("ncp_data_size", "NCP Data Size")
2873 NCPEncodedStringsBits   = uint32("ncp_encoded_strings_bits", "NCP Encoded Strings Bits")
2874 NCPextensionMajorVersion        = uint8("ncp_extension_major_version", "NCP Extension Major Version")
2875 NCPextensionMinorVersion        = uint8("ncp_extension_minor_version", "NCP Extension Minor Version")
2876 NCPextensionName                = nstring8("ncp_extension_name", "NCP Extension Name")
2877 NCPextensionNumber              = uint32("ncp_extension_number", "NCP Extension Number")
2878 NCPextensionNumber.Display("BASE_HEX")
2879 NCPExtensionNumbers             = uint32("ncp_extension_numbers", "NCP Extension Numbers")
2880 NCPextensionRevisionNumber      = uint8("ncp_extension_revision_number", "NCP Extension Revision Number")
2881 NCPPeakStaInUse                 = uint32("ncp_peak_sta_in_use", "Peak Number of Connections since Server was brought up")
2882 NCPStaInUseCnt                  = uint32("ncp_sta_in_use", "Number of Workstations Connected to Server")
2883 NDSRequestFlags                 = bitfield16("nds_request_flags", "NDS Request Flags", [
2884         bf_boolean16(0x0001, "nds_request_flags_output", "Output Fields"),
2885         bf_boolean16(0x0002, "nds_request_flags_no_such_entry", "No Such Entry"),
2886         bf_boolean16(0x0004, "nds_request_flags_local_entry", "Local Entry"),
2887         bf_boolean16(0x0008, "nds_request_flags_type_ref", "Type Referral"),
2888         bf_boolean16(0x0010, "nds_request_flags_alias_ref", "Alias Referral"),
2889         bf_boolean16(0x0020, "nds_request_flags_req_cnt", "Request Count"),
2890         bf_boolean16(0x0040, "nds_request_flags_req_data_size", "Request Data Size"),
2891         bf_boolean16(0x0080, "nds_request_flags_reply_data_size", "Reply Data Size"),
2892         bf_boolean16(0x0100, "nds_request_flags_trans_ref", "Transport Referral"),
2893         bf_boolean16(0x0200, "nds_request_flags_trans_ref2", "Transport Referral"),
2894         bf_boolean16(0x0400, "nds_request_flags_up_ref", "Up Referral"),
2895         bf_boolean16(0x0800, "nds_request_flags_dn_ref", "Down Referral"),
2896 ])
2897 NDSStatus                       = uint32("nds_status", "NDS Status")
2898 NetBIOSBroadcastWasPropogated   = uint32("netbios_broadcast_was_propogated", "NetBIOS Broadcast Was Propogated")
2899 NetIDNumber                     = uint32("net_id_number", "Net ID Number")
2900 NetIDNumber.Display("BASE_HEX")
2901 NetAddress                      = nbytes32("address", "Address")
2902 NetStatus                       = uint16("net_status", "Network Status")
2903 NetWareAccessHandle             = bytes("netware_access_handle", "NetWare Access Handle", 6)
2904 NetworkAddress                  = uint32("network_address", "Network Address")
2905 NetworkAddress.Display("BASE_HEX")
2906 NetworkNodeAddress              = bytes("network_node_address", "Network Node Address", 6)
2907 NetworkNumber                   = uint32("network_number", "Network Number")
2908 NetworkNumber.Display("BASE_HEX")
2909 #
2910 # XXX - this should have the "ipx_socket_vals" value_string table
2911 # from "packet-ipx.c".
2912 #
2913 NetworkSocket                   = uint16("network_socket", "Network Socket")
2914 NetworkSocket.Display("BASE_HEX")
2915 NewAccessRights                 = bitfield16("new_access_rights_mask", "New Access Rights", [
2916         bf_boolean16(0x0001, "new_access_rights_read", "Read"),
2917         bf_boolean16(0x0002, "new_access_rights_write", "Write"),
2918         bf_boolean16(0x0004, "new_access_rights_open", "Open"),
2919         bf_boolean16(0x0008, "new_access_rights_create", "Create"),
2920         bf_boolean16(0x0010, "new_access_rights_delete", "Delete"),
2921         bf_boolean16(0x0020, "new_access_rights_parental", "Parental"),
2922         bf_boolean16(0x0040, "new_access_rights_search", "Search"),
2923         bf_boolean16(0x0080, "new_access_rights_modify", "Modify"),
2924         bf_boolean16(0x0100, "new_access_rights_supervisor", "Supervisor"),
2925 ])
2926 NewDirectoryID                  = uint32("new_directory_id", "New Directory ID", BE)
2927 NewDirectoryID.Display("BASE_HEX")
2928 NewEAHandle                     = uint32("new_ea_handle", "New EA Handle")
2929 NewEAHandle.Display("BASE_HEX")
2930 NewFileName                     = fw_string("new_file_name", "New File Name", 14)
2931 NewFileNameLen                  = nstring8("new_file_name_len", "New File Name")
2932 NewFileSize                     = uint32("new_file_size", "New File Size")
2933 NewPassword                     = nstring8("new_password", "New Password")
2934 NewPath                         = nstring8("new_path", "New Path")
2935 NewPosition                     = uint8("new_position", "New Position")
2936 NewObjectName                   = nstring8("new_object_name", "New Object Name")
2937 NextCntBlock                    = uint32("next_cnt_block", "Next Count Block")
2938 NextHugeStateInfo               = bytes("next_huge_state_info", "Next Huge State Info", 16)
2939 nextLimbScanNum                 = uint32("next_limb_scan_num", "Next Limb Scan Number")
2940 NextObjectID                    = uint32("next_object_id", "Next Object ID", BE)
2941 NextObjectID.Display("BASE_HEX")
2942 NextRecord                      = uint32("next_record", "Next Record")
2943 NextRequestRecord               = uint16("next_request_record", "Next Request Record")
2944 NextSearchIndex                 = uint16("next_search_index", "Next Search Index")
2945 NextSearchNumber                = uint16("next_search_number", "Next Search Number")
2946 NextSearchNum                   = uint32("nxt_search_num", "Next Search Number")
2947 nextStartingNumber              = uint32("next_starting_number", "Next Starting Number")
2948 NextTrusteeEntry                = uint32("next_trustee_entry", "Next Trustee Entry")
2949 NextVolumeNumber                = uint32("next_volume_number", "Next Volume Number")
2950 NLMBuffer                       = nstring8("nlm_buffer", "Buffer")
2951 NLMcount                        = uint32("nlm_count", "NLM Count")
2952 NLMFlags                        = bitfield8("nlm_flags", "Flags", [
2953         bf_boolean8(0x01, "nlm_flags_reentrant", "ReEntrant"),
2954         bf_boolean8(0x02, "nlm_flags_multiple", "Can Load Multiple Times"),
2955         bf_boolean8(0x04, "nlm_flags_synchronize", "Synchronize Start"),
2956         bf_boolean8(0x08, "nlm_flags_pseudo", "PseudoPreemption"),
2957 ])
2958 NLMLoadOptions                  = uint32("nlm_load_options", "NLM Load Options")
2959 NLMName                         = stringz("nlm_name_stringz", "NLM Name")
2960 NLMNumber                       = uint32("nlm_number", "NLM Number")
2961 NLMNumbers                      = uint32("nlm_numbers", "NLM Numbers")
2962 NLMsInList                      = uint32("nlms_in_list", "NLM's in List")
2963 NLMStartNumber                  = uint32("nlm_start_num", "NLM Start Number")
2964 NLMType                         = val_string8("nlm_type", "NLM Type", [
2965         [ 0x00, "Generic NLM (.NLM)" ],
2966         [ 0x01, "LAN Driver (.LAN)" ],
2967         [ 0x02, "Disk Driver (.DSK)" ],
2968         [ 0x03, "Name Space Support Module (.NAM)" ],
2969         [ 0x04, "Utility or Support Program (.NLM)" ],
2970         [ 0x05, "Mirrored Server Link (.MSL)" ],
2971         [ 0x06, "OS NLM (.NLM)" ],
2972         [ 0x07, "Paged High OS NLM (.NLM)" ],
2973         [ 0x08, "Host Adapter Module (.HAM)" ],
2974         [ 0x09, "Custom Device Module (.CDM)" ],
2975         [ 0x0a, "File System Engine (.NLM)" ],
2976         [ 0x0b, "Real Mode NLM (.NLM)" ],
2977         [ 0x0c, "Hidden NLM (.NLM)" ],
2978         [ 0x15, "NICI Support (.NLM)" ],
2979         [ 0x16, "NICI Support (.NLM)" ],
2980         [ 0x17, "Cryptography (.NLM)" ],
2981         [ 0x18, "Encryption (.NLM)" ],
2982         [ 0x19, "NICI Support (.NLM)" ],
2983         [ 0x1c, "NICI Support (.NLM)" ],
2984 ])
2985 nodeFlags                       = uint32("node_flags", "Node Flags")
2986 nodeFlags.Display("BASE_HEX")
2987 NoMoreMemAvlCnt                 = uint32("no_more_mem_avail", "No More Memory Available Count")
2988 NonDedFlag                      = boolean8("non_ded_flag", "Non Dedicated Flag")
2989 NonFreeableAvailableSubAllocSectors = uint32("non_freeable_avail_sub_alloc_sectors", "Non Freeable Available Sub Alloc Sectors")
2990 NonFreeableLimboSectors         = uint32("non_freeable_limbo_sectors", "Non Freeable Limbo Sectors")
2991 NotUsableSubAllocSectors        = uint32("not_usable_sub_alloc_sectors", "Not Usable Sub Alloc Sectors")
2992 NotYetPurgeableBlocks           = uint32("not_yet_purgeable_blocks", "Not Yet Purgeable Blocks")
2993 NSInfoBitMask                   = uint32("ns_info_bit_mask", "Name Space Info Bit Mask")
2994 NSSOAllInFlags                  = bitfield32("nsso_all_in_flags", "SecretStore All Input Flags",[
2995         bf_boolean32(0x00000010, "nsso_all_unicode", "Unicode Data"),
2996         bf_boolean32(0x00000080, "nsso_set_tree", "Set Tree"),
2997         bf_boolean32(0x00000200, "nsso_destroy_ctx", "Destroy Context"),
2998 ])
2999 NSSOGetServiceInFlags           = bitfield32("nsso_get_svc_in_flags", "SecretStore Get Service Flags",[
3000         bf_boolean32(0x00000100, "nsso_get_ctx", "Get Context"),
3001 ])
3002 NSSOReadInFlags                 = bitfield32("nsso_read_in_flags", "SecretStore Read Flags",[
3003         bf_boolean32(0x00000001, "nsso_rw_enh_prot", "Read/Write Enhanced Protection"),
3004         bf_boolean32(0x00000008, "nsso_repair", "Repair SecretStore"),
3005 ])
3006 NSSOReadOrUnlockInFlags         = bitfield32("nsso_read_or_unlock_in_flags", "SecretStore Read or Unlock Flags",[
3007         bf_boolean32(0x00000004, "nsso_ep_master_pwd", "Master Password used instead of ENH Password"),
3008 ])
3009 NSSOUnlockInFlags               = bitfield32("nsso_unlock_in_flags", "SecretStore Unlock Flags",[
3010         bf_boolean32(0x00000004, "nsso_rmv_lock", "Remove Lock from Store"),
3011 ])
3012 NSSOWriteInFlags                = bitfield32("nsso_write_in_flags", "SecretStore Write Flags",[
3013         bf_boolean32(0x00000001, "nsso_enh_prot", "Enhanced Protection"),
3014         bf_boolean32(0x00000002, "nsso_create_id", "Create ID"),
3015         bf_boolean32(0x00000040, "nsso_ep_pwd_used", "Enhanced Protection Password Used"),
3016 ])
3017 NSSOContextOutFlags             = bitfield32("nsso_cts_out_flags", "Type of Context",[
3018         bf_boolean32(0x00000001, "nsso_ds_ctx", "DSAPI Context"),
3019         bf_boolean32(0x00000080, "nsso_ldap_ctx", "LDAP Context"),
3020         bf_boolean32(0x00000200, "nsso_dc_ctx", "Reserved"),
3021 ])
3022 NSSOGetServiceOutFlags          = bitfield32("nsso_get_svc_out_flags", "SecretStore Status Flags",[
3023         bf_boolean32(0x00400000, "nsso_mstr_pwd", "Master Password Present"),
3024 ])
3025 NSSOGetServiceReadOutFlags      = bitfield32("nsso_get_svc_read_out_flags", "SecretStore Status Flags",[
3026         bf_boolean32(0x00800000, "nsso_mp_disabled", "Master Password Disabled"),
3027 ])
3028 NSSOReadOutFlags                = bitfield32("nsso_read_out_flags", "SecretStore Read Flags",[
3029         bf_boolean32(0x00010000, "nsso_secret_locked", "Enhanced Protection Lock on Secret"),
3030         bf_boolean32(0x00020000, "nsso_secret_not_init", "Secret Not Yet Initialized"),
3031         bf_boolean32(0x00040000, "nsso_secret_marked", "Secret Marked for Enhanced Protection"),
3032         bf_boolean32(0x00080000, "nsso_secret_not_sync", "Secret Not Yet Synchronized in NDS"),
3033         bf_boolean32(0x00200000, "nsso_secret_enh_pwd", "Enhanced Protection Password on Secret"),
3034 ])
3035 NSSOReadOutStatFlags            = bitfield32("nsso_read_out_stat_flags", "SecretStore Read Status Flags",[
3036         bf_boolean32(0x00100000, "nsso_admin_mod", "Admin Modified Secret Last"),
3037 ])
3038 NSSOVerb                        = val_string8("nsso_verb", "SecretStore Verb", [
3039         [ 0x00, "Query Server" ],
3040         [ 0x01, "Read App Secrets" ],
3041         [ 0x02, "Write App Secrets" ],
3042         [ 0x03, "Add Secret ID" ],
3043         [ 0x04, "Remove Secret ID" ],
3044         [ 0x05, "Remove SecretStore" ],
3045         [ 0x06, "Enumerate SecretID's" ],
3046         [ 0x07, "Unlock Store" ],
3047         [ 0x08, "Set Master Password" ],
3048         [ 0x09, "Get Service Information" ],
3049 ])
3050 NSSpecificInfo                  = fw_string("ns_specific_info", "Name Space Specific Info", 512)
3051 NumberOfActiveTasks             = uint8("num_of_active_tasks", "Number of Active Tasks")
3052 NumberOfAllocs                  = uint32("num_of_allocs", "Number of Allocations")
3053 NumberOfCPUs                    = uint32("number_of_cpus", "Number of CPU's")
3054 NumberOfDataStreams             = uint16("number_of_data_streams", "Number of Data Streams")
3055 NumberOfDataStreamsLong     = uint32("number_of_data_streams_long", "Number of Data Streams")
3056 NumberOfDynamicMemoryAreas      = uint16("number_of_dynamic_memory_areas", "Number Of Dynamic Memory Areas")
3057 NumberOfEntries                 = uint8("number_of_entries", "Number of Entries")
3058 NumberOfLocks                   = uint8("number_of_locks", "Number of Locks")
3059 NumberOfMinutesToDelay          = uint32("number_of_minutes_to_delay", "Number of Minutes to Delay")
3060 NumberOfNCPExtensions           = uint32("number_of_ncp_extensions", "Number Of NCP Extensions")
3061 NumberOfNSLoaded                = uint16("number_of_ns_loaded", "Number Of Name Spaces Loaded")
3062 NumberOfProtocols               = uint8("number_of_protocols", "Number of Protocols")
3063 NumberOfRecords                 = uint16("number_of_records", "Number of Records")
3064 NumberOfReferencedPublics       = uint32("num_of_ref_publics", "Number of Referenced Public Symbols")
3065 NumberOfSemaphores              = uint16("number_of_semaphores", "Number Of Semaphores")
3066 NumberOfServiceProcesses        = uint8("number_of_service_processes", "Number Of Service Processes")
3067 NumberOfSetCategories           = uint32("number_of_set_categories", "Number Of Set Categories")
3068 NumberOfSMs                     = uint32("number_of_sms", "Number Of Storage Medias")
3069 NumberOfStations                = uint8("number_of_stations", "Number of Stations")
3070 NumBytes                        = uint16("num_bytes", "Number of Bytes")
3071 NumOfCCinPkt                    = uint32("num_of_cc_in_pkt", "Number of Custom Counters in Packet")
3072 NumOfChecks                     = uint32("num_of_checks", "Number of Checks")
3073 NumOfEntries                    = uint32("num_of_entries", "Number of Entries")
3074 NumOfFilesMigrated              = uint32("num_of_files_migrated", "Number Of Files Migrated")
3075 NumOfGarbageColl                = uint32("num_of_garb_coll", "Number of Garbage Collections")
3076 NumOfNCPReqs                    = uint32("num_of_ncp_reqs", "Number of NCP Requests since Server was brought up")
3077 NumOfSegments                   = uint32("num_of_segments", "Number of Segments")
3078
3079 ObjectCount                     = uint32("object_count", "Object Count")
3080 ObjectFlags                     = val_string8("object_flags", "Object Flags", [
3081         [ 0x00, "Dynamic object" ],
3082         [ 0x01, "Static object" ],
3083 ])
3084 ObjectHasProperties             = val_string8("object_has_properites", "Object Has Properties", [
3085         [ 0x00, "No properties" ],
3086         [ 0xff, "One or more properties" ],
3087 ])
3088 ObjectID                        = uint32("object_id", "Object ID", BE)
3089 ObjectID.Display('BASE_HEX')
3090 ObjectIDCount                   = uint16("object_id_count", "Object ID Count")
3091 ObjectIDInfo                    = uint32("object_id_info", "Object Information")
3092 ObjectInfoReturnCount           = uint32("object_info_rtn_count", "Object Information Count")
3093 ObjectName                      = nstring8("object_name", "Object Name")
3094 ObjectNameLen                   = fw_string("object_name_len", "Object Name", 48)
3095 ObjectNameStringz               = stringz("object_name_stringz", "Object Name")
3096 ObjectNumber                    = uint32("object_number", "Object Number")
3097 ObjectSecurity                  = val_string8("object_security", "Object Security", [
3098         [ 0x00, "Object Read (Anyone) / Object Write (Anyone)" ],
3099         [ 0x01, "Object Read (Logged in) / Object Write (Anyone)" ],
3100         [ 0x02, "Object Read (Logged in as Object) / Object Write (Anyone)" ],
3101         [ 0x03, "Object Read (Supervisor) / Object Write (Anyone)" ],
3102         [ 0x04, "Object Read (Operating System Only) / Object Write (Anyone)" ],
3103         [ 0x10, "Object Read (Anyone) / Object Write (Logged in)" ],
3104         [ 0x11, "Object Read (Logged in) / Object Write (Logged in)" ],
3105         [ 0x12, "Object Read (Logged in as Object) / Object Write (Logged in)" ],
3106         [ 0x13, "Object Read (Supervisor) / Object Write (Logged in)" ],
3107         [ 0x14, "Object Read (Operating System Only) / Object Write (Logged in)" ],
3108         [ 0x20, "Object Read (Anyone) / Object Write (Logged in as Object)" ],
3109         [ 0x21, "Object Read (Logged in) / Object Write (Logged in as Object)" ],
3110         [ 0x22, "Object Read (Logged in as Object) / Object Write (Logged in as Object)" ],
3111         [ 0x23, "Object Read (Supervisor) / Object Write (Logged in as Object)" ],
3112         [ 0x24, "Object Read (Operating System Only) / Object Write (Logged in as Object)" ],
3113         [ 0x30, "Object Read (Anyone) / Object Write (Supervisor)" ],
3114         [ 0x31, "Object Read (Logged in) / Object Write (Supervisor)" ],
3115         [ 0x32, "Object Read (Logged in as Object) / Object Write (Supervisor)" ],
3116         [ 0x33, "Object Read (Supervisor) / Object Write (Supervisor)" ],
3117         [ 0x34, "Object Read (Operating System Only) / Object Write (Supervisor)" ],
3118         [ 0x40, "Object Read (Anyone) / Object Write (Operating System Only)" ],
3119         [ 0x41, "Object Read (Logged in) / Object Write (Operating System Only)" ],
3120         [ 0x42, "Object Read (Logged in as Object) / Object Write (Operating System Only)" ],
3121         [ 0x43, "Object Read (Supervisor) / Object Write (Operating System Only)" ],
3122         [ 0x44, "Object Read (Operating System Only) / Object Write (Operating System Only)" ],
3123 ])
3124 #
3125 # XXX - should this use the "server_vals[]" value_string array from
3126 # "packet-ipx.c"?
3127 #
3128 # XXX - should this list be merged with that list?  There are some
3129 # oddities, e.g. this list has 0x03f5 for "Microsoft SQL Server", but
3130 # the list from "packet-ipx.c" has 0xf503 for that - is that just
3131 # byte-order confusion?
3132 #
3133 ObjectType                      = val_string16("object_type", "Object Type", [
3134         [ 0x0000,       "Unknown" ],
3135         [ 0x0001,       "User" ],
3136         [ 0x0002,       "User group" ],
3137         [ 0x0003,       "Print queue" ],
3138         [ 0x0004,       "NetWare file server" ],
3139         [ 0x0005,       "Job server" ],
3140         [ 0x0006,       "Gateway" ],
3141         [ 0x0007,       "Print server" ],
3142         [ 0x0008,       "Archive queue" ],
3143         [ 0x0009,       "Archive server" ],
3144         [ 0x000a,       "Job queue" ],
3145         [ 0x000b,       "Administration" ],
3146         [ 0x0021,       "NAS SNA gateway" ],
3147         [ 0x0026,       "Remote bridge server" ],
3148         [ 0x0027,       "TCP/IP gateway" ],
3149         [ 0x0047,       "Novell Print Server" ],
3150         [ 0x004b,       "Btrieve Server" ],
3151         [ 0x004c,       "NetWare SQL Server" ],
3152         [ 0x0064,       "ARCserve" ],
3153         [ 0x0066,       "ARCserve 3.0" ],
3154         [ 0x0076,       "NetWare SQL" ],
3155         [ 0x00a0,       "Gupta SQL Base Server" ],
3156         [ 0x00a1,       "Powerchute" ],
3157         [ 0x0107,       "NetWare Remote Console" ],
3158         [ 0x01cb,       "Shiva NetModem/E" ],
3159         [ 0x01cc,       "Shiva LanRover/E" ],
3160         [ 0x01cd,       "Shiva LanRover/T" ],
3161         [ 0x01d8,       "Castelle FAXPress Server" ],
3162         [ 0x01da,       "Castelle Print Server" ],
3163         [ 0x01dc,       "Castelle Fax Server" ],
3164         [ 0x0200,       "Novell SQL Server" ],
3165         [ 0x023a,       "NetWare Lanalyzer Agent" ],
3166         [ 0x023c,       "DOS Target Service Agent" ],
3167         [ 0x023f,       "NetWare Server Target Service Agent" ],
3168         [ 0x024f,       "Appletalk Remote Access Service" ],
3169         [ 0x0263,       "NetWare Management Agent" ],
3170         [ 0x0264,       "Global MHS" ],
3171         [ 0x0265,       "SNMP" ],
3172         [ 0x026a,       "NetWare Management/NMS Console" ],
3173         [ 0x026b,       "NetWare Time Synchronization" ],
3174         [ 0x0273,       "Nest Device" ],
3175         [ 0x0274,       "GroupWise Message Multiple Servers" ],
3176         [ 0x0278,       "NDS Replica Server" ],
3177         [ 0x0282,       "NDPS Service Registry Service" ],
3178         [ 0x028a,       "MPR/IPX Address Mapping Gateway" ],
3179         [ 0x028b,       "ManageWise" ],
3180         [ 0x0293,       "NetWare 6" ],
3181         [ 0x030c,       "HP JetDirect" ],
3182         [ 0x0328,       "Watcom SQL Server" ],
3183         [ 0x0355,       "Backup Exec" ],
3184         [ 0x039b,       "Lotus Notes" ],
3185         [ 0x03e1,       "Univel Server" ],
3186         [ 0x03f5,       "Microsoft SQL Server" ],
3187         [ 0x055e,       "Lexmark Print Server" ],
3188         [ 0x0640,       "Microsoft Gateway Services for NetWare" ],
3189         [ 0x064e,       "Microsoft Internet Information Server" ],
3190         [ 0x077b,       "Advantage Database Server" ],
3191         [ 0x07a7,       "Backup Exec Job Queue" ],
3192         [ 0x07a8,       "Backup Exec Job Manager" ],
3193         [ 0x07a9,       "Backup Exec Job Service" ],
3194         [ 0x5555,       "Site Lock" ],
3195         [ 0x8202,       "NDPS Broker" ],
3196 ])
3197 OCRetFlags                      = val_string8("o_c_ret_flags", "Open Create Return Flags", [
3198         [ 0x00, "No CallBack has been registered (No Op-Lock)" ],
3199         [ 0x01, "Request has been registered for CallBack (Op-Lock)" ],
3200 ])
3201 OldestDeletedFileAgeInTicks     = uint32("oldest_deleted_file_age_in_ticks", "Oldest Deleted File Age in Ticks")
3202 OldFileName                     = bytes("old_file_name", "Old File Name", 15)
3203 OldFileSize                     = uint32("old_file_size", "Old File Size")
3204 OpenCount                       = uint16("open_count", "Open Count")
3205 OpenCreateAction                = bitfield8("open_create_action", "Open Create Action", [
3206         bf_boolean8(0x01, "open_create_action_opened", "Opened"),
3207         bf_boolean8(0x02, "open_create_action_created", "Created"),
3208         bf_boolean8(0x04, "open_create_action_replaced", "Replaced"),
3209         bf_boolean8(0x08, "open_create_action_compressed", "Compressed"),
3210         bf_boolean8(0x80, "open_create_action_read_only", "Read Only"),
3211 ])
3212 OpenCreateMode                  = bitfield8("open_create_mode", "Open Create Mode", [
3213         bf_boolean8(0x01, "open_create_mode_open", "Open existing file (file must exist)"),
3214         bf_boolean8(0x02, "open_create_mode_replace", "Replace existing file"),
3215         bf_boolean8(0x08, "open_create_mode_create", "Create new file or subdirectory (file or subdirectory cannot exist)"),
3216     bf_boolean8(0x20, "open_create_mode_64bit", "Open 64-bit Access"),
3217     bf_boolean8(0x40, "open_create_mode_ro", "Open with Read Only Access"),
3218         bf_boolean8(0x80, "open_create_mode_oplock", "Open Callback (Op-Lock)"),
3219 ])
3220 OpenForReadCount                = uint16("open_for_read_count", "Open For Read Count")
3221 OpenForWriteCount               = uint16("open_for_write_count", "Open For Write Count")
3222 OpenRights                      = bitfield8("open_rights", "Open Rights", [
3223         bf_boolean8(0x01, "open_rights_read_only", "Read Only"),
3224         bf_boolean8(0x02, "open_rights_write_only", "Write Only"),
3225         bf_boolean8(0x04, "open_rights_deny_read", "Deny Read"),
3226         bf_boolean8(0x08, "open_rights_deny_write", "Deny Write"),
3227         bf_boolean8(0x10, "open_rights_compat", "Compatibility"),
3228         bf_boolean8(0x40, "open_rights_write_thru", "File Write Through"),
3229 ])
3230 OptionNumber                    = uint8("option_number", "Option Number")
3231 originalSize            = uint32("original_size", "Original Size")
3232 OSLanguageID                    = uint8("os_language_id", "OS Language ID")
3233 OSMajorVersion                  = uint8("os_major_version", "OS Major Version")
3234 OSMinorVersion                  = uint8("os_minor_version", "OS Minor Version")
3235 OSRevision                          = uint32("os_revision", "OS Revision")
3236 OtherFileForkSize               = uint32("other_file_fork_size", "Other File Fork Size")
3237 OtherFileForkFAT                = uint32("other_file_fork_fat", "Other File Fork FAT Entry")
3238 OutgoingPacketDiscardedNoTurboBuffer = uint16("outgoing_packet_discarded_no_turbo_buffer", "Outgoing Packet Discarded No Turbo Buffer")
3239
3240 PacketsDiscardedByHopCount      = uint16("packets_discarded_by_hop_count", "Packets Discarded By Hop Count")
3241 PacketsDiscardedUnknownNet      = uint16("packets_discarded_unknown_net", "Packets Discarded Unknown Net")
3242 PacketsFromInvalidConnection    = uint16("packets_from_invalid_connection", "Packets From Invalid Connection")
3243 PacketsReceivedDuringProcessing = uint16("packets_received_during_processing", "Packets Received During Processing")
3244 PacketsWithBadRequestType       = uint16("packets_with_bad_request_type", "Packets With Bad Request Type")
3245 PacketsWithBadSequenceNumber    = uint16("packets_with_bad_sequence_number", "Packets With Bad Sequence Number")
3246 PageTableOwnerFlag              = uint32("page_table_owner_flag", "Page Table Owner")
3247 ParentID                        = uint32("parent_id", "Parent ID")
3248 ParentID.Display("BASE_HEX")
3249 ParentBaseID                    = uint32("parent_base_id", "Parent Base ID")
3250 ParentBaseID.Display("BASE_HEX")
3251 ParentDirectoryBase             = uint32("parent_directory_base", "Parent Directory Base")
3252 ParentDOSDirectoryBase          = uint32("parent_dos_directory_base", "Parent DOS Directory Base")
3253 ParentObjectNumber              = uint32("parent_object_number", "Parent Object Number")
3254 ParentObjectNumber.Display("BASE_HEX")
3255 Password                        = nstring8("password", "Password")
3256 PathBase                        = uint8("path_base", "Path Base")
3257 PathComponentCount              = uint16("path_component_count", "Path Component Count")
3258 PathComponentSize               = uint16("path_component_size", "Path Component Size")
3259 PathCookieFlags                 = val_string16("path_cookie_flags", "Path Cookie Flags", [
3260         [ 0x0000, "Last component is Not a File Name" ],
3261         [ 0x0001, "Last component is a File Name" ],
3262 ])
3263 PathCount                       = uint8("path_count", "Path Count")
3264 Path                            = nstring8("path", "Path")
3265 Path16              = nstring16("path16", "Path")
3266 PathAndName                     = stringz("path_and_name", "Path and Name")
3267 PendingIOCommands               = uint16("pending_io_commands", "Pending IO Commands")
3268 PhysicalDiskNumber              = uint8("physical_disk_number", "Physical Disk Number")
3269 PhysicalDriveCount              = uint8("physical_drive_count", "Physical Drive Count")
3270 PhysicalLockThreshold           = uint8("physical_lock_threshold", "Physical Lock Threshold")
3271 PingVersion                     = uint16("ping_version", "Ping Version")
3272 PoolName            = stringz("pool_name", "Pool Name")
3273 PositiveAcknowledgesSent        = uint16("positive_acknowledges_sent", "Positive Acknowledges Sent")
3274 PreCompressedSectors            = uint32("pre_compressed_sectors", "Precompressed Sectors")
3275 PreviousRecord                  = uint32("previous_record", "Previous Record")
3276 PrimaryEntry                    = uint32("primary_entry", "Primary Entry")
3277 PrintFlags                      = bitfield8("print_flags", "Print Flags", [
3278         bf_boolean8(0x08, "print_flags_ff", "Suppress Form Feeds"),
3279     bf_boolean8(0x10, "print_flags_cr", "Create"),
3280         bf_boolean8(0x20, "print_flags_del_spool", "Delete Spool File after Printing"),
3281         bf_boolean8(0x40, "print_flags_exp_tabs", "Expand Tabs in the File"),
3282         bf_boolean8(0x80, "print_flags_banner", "Print Banner Page"),
3283 ])
3284 PrinterHalted                   = val_string8("printer_halted", "Printer Halted", [
3285         [ 0x00, "Printer is not Halted" ],
3286         [ 0xff, "Printer is Halted" ],
3287 ])
3288 PrinterOffLine                  = val_string8( "printer_offline", "Printer Off-Line", [
3289         [ 0x00, "Printer is On-Line" ],
3290         [ 0xff, "Printer is Off-Line" ],
3291 ])
3292 PrintServerVersion              = uint8("print_server_version", "Print Server Version")
3293 Priority                        = uint32("priority", "Priority")
3294 Privileges                      = uint32("privileges", "Login Privileges")
3295 ProcessorType                   = val_string8("processor_type", "Processor Type", [
3296         [ 0x00, "Motorola 68000" ],
3297         [ 0x01, "Intel 8088 or 8086" ],
3298         [ 0x02, "Intel 80286" ],
3299 ])
3300 ProDOSInfo                      = bytes("pro_dos_info", "Pro DOS Info", 6)
3301 ProductMajorVersion             = uint16("product_major_version", "Product Major Version")
3302 ProductMinorVersion             = uint16("product_minor_version", "Product Minor Version")
3303 ProductRevisionVersion          = uint8("product_revision_version", "Product Revision Version")
3304 projectedCompSize               = uint32("projected_comp_size", "Projected Compression Size")
3305 PropertyHasMoreSegments         = val_string8("property_has_more_segments",
3306         "Property Has More Segments", [
3307         [ 0x00, "Is last segment" ],
3308         [ 0xff, "More segments are available" ],
3309 ])
3310 PropertyName                    = nstring8("property_name", "Property Name")
3311 PropertyName16                  = fw_string("property_name_16", "Property Name", 16)
3312 PropertyData                    = bytes("property_data", "Property Data", 128)
3313 PropertySegment                 = uint8("property_segment", "Property Segment")
3314 PropertyType                    = val_string8("property_type", "Property Type", [
3315         [ 0x00, "Display Static property" ],
3316         [ 0x01, "Display Dynamic property" ],
3317         [ 0x02, "Set Static property" ],
3318         [ 0x03, "Set Dynamic property" ],
3319 ])
3320 PropertyValue                   = fw_string("property_value", "Property Value", 128)
3321 ProposedMaxSize                 = uint16("proposed_max_size", "Proposed Max Size")
3322 protocolFlags                   = uint32("protocol_flags", "Protocol Flags")
3323 protocolFlags.Display("BASE_HEX")
3324 PurgeableBlocks                 = uint32("purgeable_blocks", "Purgeable Blocks")
3325 PurgeCcode                      = uint32("purge_c_code", "Purge Completion Code")
3326 PurgeCount                      = uint32("purge_count", "Purge Count")
3327 PurgeFlags                      = val_string16("purge_flags", "Purge Flags", [
3328         [ 0x0000, "Do not Purge All" ],
3329         [ 0x0001, "Purge All" ],
3330     [ 0xffff, "Do not Purge All" ],
3331 ])
3332 PurgeList                       = uint32("purge_list", "Purge List")
3333 PhysicalDiskChannel             = uint8("physical_disk_channel", "Physical Disk Channel")
3334 PhysicalDriveType               = val_string8("physical_drive_type", "Physical Drive Type", [
3335         [ 0x01, "XT" ],
3336         [ 0x02, "AT" ],
3337         [ 0x03, "SCSI" ],
3338         [ 0x04, "Disk Coprocessor" ],
3339         [ 0x05, "PS/2 with MFM Controller" ],
3340         [ 0x06, "PS/2 with ESDI Controller" ],
3341         [ 0x07, "Convergent Technology SBIC" ],
3342 ])
3343 PhysicalReadErrors              = uint16("physical_read_errors", "Physical Read Errors")
3344 PhysicalReadRequests            = uint32("physical_read_requests", "Physical Read Requests")
3345 PhysicalWriteErrors             = uint16("physical_write_errors", "Physical Write Errors")
3346 PhysicalWriteRequests           = uint32("physical_write_requests", "Physical Write Requests")
3347 PrintToFileFlag                 = boolean8("print_to_file_flag", "Print to File Flag")
3348
3349 QueueID                         = uint32("queue_id", "Queue ID")
3350 QueueID.Display("BASE_HEX")
3351 QueueName                       = nstring8("queue_name", "Queue Name")
3352 QueueStartPosition              = uint32("queue_start_position", "Queue Start Position")
3353 QueueStatus                     = bitfield8("queue_status", "Queue Status", [
3354         bf_boolean8(0x01, "queue_status_new_jobs", "Operator does not want to add jobs to the queue"),
3355         bf_boolean8(0x02, "queue_status_pserver", "Operator does not want additional servers attaching"),
3356         bf_boolean8(0x04, "queue_status_svc_jobs", "Operator does not want servers to service jobs"),
3357 ])
3358 QueueType                       = uint16("queue_type", "Queue Type")
3359 QueueingVersion                 = uint8("qms_version", "QMS Version")
3360
3361 ReadBeyondWrite                 = uint16("read_beyond_write", "Read Beyond Write")
3362 RecordLockCount                 = uint16("rec_lock_count", "Record Lock Count")
3363 RecordStart                     = uint32("record_start", "Record Start")
3364 RecordEnd                       = uint32("record_end", "Record End")
3365 RecordInUseFlag                 = val_string16("record_in_use", "Record in Use", [
3366         [ 0x0000, "Record In Use" ],
3367         [ 0xffff, "Record Not In Use" ],
3368 ])
3369 RedirectedPrinter               = uint8( "redirected_printer", "Redirected Printer" )
3370 ReferenceCount                  = uint32("reference_count", "Reference Count")
3371 RelationsCount                  = uint16("relations_count", "Relations Count")
3372 ReMirrorCurrentOffset           = uint32("re_mirror_current_offset", "ReMirror Current Offset")
3373 ReMirrorDriveNumber             = uint8("re_mirror_drive_number", "ReMirror Drive Number")
3374 RemoteMaxPacketSize             = uint32("remote_max_packet_size", "Remote Max Packet Size")
3375 RemoteTargetID                  = uint32("remote_target_id", "Remote Target ID")
3376 RemoteTargetID.Display("BASE_HEX")
3377 RemovableFlag                   = uint16("removable_flag", "Removable Flag")
3378 RemoveOpenRights                = bitfield8("remove_open_rights", "Remove Open Rights", [
3379         bf_boolean8(0x01, "remove_open_rights_ro", "Read Only"),
3380         bf_boolean8(0x02, "remove_open_rights_wo", "Write Only"),
3381         bf_boolean8(0x04, "remove_open_rights_dr", "Deny Read"),
3382         bf_boolean8(0x08, "remove_open_rights_dw", "Deny Write"),
3383         bf_boolean8(0x10, "remove_open_rights_comp", "Compatibility"),
3384         bf_boolean8(0x40, "remove_open_rights_write_thru", "Write Through"),
3385 ])
3386 RenameFlag                      = bitfield8("rename_flag", "Rename Flag", [
3387         bf_boolean8(0x01, "rename_flag_ren", "Rename to Myself allows file to be renamed to it's original name"),
3388         bf_boolean8(0x02, "rename_flag_comp", "Compatibility allows files that are marked read only to be opened with read/write access"),
3389         bf_boolean8(0x04, "rename_flag_no", "Name Only renames only the specified name space entry name"),
3390 ])
3391 RepliesCancelled                = uint16("replies_cancelled", "Replies Cancelled")
3392 ReplyBuffer                     = nstring8("reply_buffer", "Reply Buffer")
3393 ReplyBufferSize                 = uint32("reply_buffer_size", "Reply Buffer Size")
3394 ReplyQueueJobNumbers            = uint32("reply_queue_job_numbers", "Reply Queue Job Numbers")
3395 RequestBitMap                   = bitfield16("request_bit_map", "Request Bit Map", [
3396         bf_boolean16(0x0001, "request_bit_map_ret_afp_ent", "AFP Entry ID"),
3397         bf_boolean16(0x0002, "request_bit_map_ret_data_fork", "Data Fork Length"),
3398         bf_boolean16(0x0004, "request_bit_map_ret_res_fork", "Resource Fork Length"),
3399         bf_boolean16(0x0008, "request_bit_map_ret_num_off", "Number of Offspring"),
3400         bf_boolean16(0x0010, "request_bit_map_ret_owner", "Owner ID"),
3401         bf_boolean16(0x0020, "request_bit_map_ret_short", "Short Name"),
3402         bf_boolean16(0x0040, "request_bit_map_ret_acc_priv", "Access Privileges"),
3403         bf_boolean16(0x0100, "request_bit_map_ratt", "Return Attributes"),
3404         bf_boolean16(0x0200, "request_bit_map_ret_afp_parent", "AFP Parent Entry ID"),
3405         bf_boolean16(0x0400, "request_bit_map_ret_cr_date", "Creation Date"),
3406         bf_boolean16(0x0800, "request_bit_map_ret_acc_date", "Access Date"),
3407         bf_boolean16(0x1000, "request_bit_map_ret_mod_date", "Modify Date&Time"),
3408         bf_boolean16(0x2000, "request_bit_map_ret_bak_date", "Backup Date&Time"),
3409         bf_boolean16(0x4000, "request_bit_map_ret_finder", "Finder Info"),
3410         bf_boolean16(0x8000, "request_bit_map_ret_long_nm", "Long Name"),
3411 ])
3412 ResourceForkLen                 = uint32("resource_fork_len", "Resource Fork Len")
3413 RequestCode                     = val_string8("request_code", "Request Code", [
3414         [ 0x00, "Change Logged in to Temporary Authenticated" ],
3415         [ 0x01, "Change Temporary Authenticated to Logged in" ],
3416 ])
3417 RequestData                     = nstring8("request_data", "Request Data")
3418 RequestsReprocessed = uint16("requests_reprocessed", "Requests Reprocessed")
3419 Reserved                        = uint8( "reserved", "Reserved" )
3420 Reserved2                       = bytes("reserved2", "Reserved", 2)
3421 Reserved3                       = bytes("reserved3", "Reserved", 3)
3422 Reserved4                       = bytes("reserved4", "Reserved", 4)
3423 Reserved5                       = bytes("reserved5", "Reserved", 5)
3424 Reserved6           = bytes("reserved6", "Reserved", 6)
3425 Reserved8                       = bytes("reserved8", "Reserved", 8)
3426 Reserved10          = bytes("reserved10", "Reserved", 10)
3427 Reserved12                      = bytes("reserved12", "Reserved", 12)
3428 Reserved16                      = bytes("reserved16", "Reserved", 16)
3429 Reserved20                      = bytes("reserved20", "Reserved", 20)
3430 Reserved28                      = bytes("reserved28", "Reserved", 28)
3431 Reserved36                      = bytes("reserved36", "Reserved", 36)
3432 Reserved44                      = bytes("reserved44", "Reserved", 44)
3433 Reserved48                      = bytes("reserved48", "Reserved", 48)
3434 Reserved50                      = bytes("reserved50", "Reserved", 50)
3435 Reserved56                      = bytes("reserved56", "Reserved", 56)
3436 Reserved64                      = bytes("reserved64", "Reserved", 64)
3437 Reserved120                     = bytes("reserved120", "Reserved", 120)
3438 ReservedOrDirectoryNumber       = uint32("reserved_or_directory_number", "Reserved or Directory Number (see EAFlags)")
3439 ReservedOrDirectoryNumber.Display("BASE_HEX")
3440 ResourceCount                   = uint32("resource_count", "Resource Count")
3441 ResourceForkSize                = uint32("resource_fork_size", "Resource Fork Size")
3442 ResourceName                    = stringz("resource_name", "Resource Name")
3443 ResourceSignature               = fw_string("resource_sig", "Resource Signature", 4)
3444 RestoreTime                     = uint32("restore_time", "Restore Time")
3445 Restriction                     = uint32("restriction", "Disk Space Restriction")
3446 RestrictionsEnforced            = val_string8("restrictions_enforced", "Disk Restrictions Enforce Flag", [
3447         [ 0x00, "Enforced" ],
3448         [ 0xff, "Not Enforced" ],
3449 ])
3450 ReturnInfoCount                 = uint32("return_info_count", "Return Information Count")
3451 ReturnInfoMask                  = bitfield16("ret_info_mask", "Return Information", [
3452     bf_boolean16(0x0001, "ret_info_mask_fname", "Return File Name Information"),
3453         bf_boolean16(0x0002, "ret_info_mask_alloc", "Return Allocation Space Information"),
3454         bf_boolean16(0x0004, "ret_info_mask_attr", "Return Attribute Information"),
3455         bf_boolean16(0x0008, "ret_info_mask_size", "Return Size Information"),
3456         bf_boolean16(0x0010, "ret_info_mask_tspace", "Return Total Space Information"),
3457         bf_boolean16(0x0020, "ret_info_mask_eattr", "Return Extended Attributes Information"),
3458         bf_boolean16(0x0040, "ret_info_mask_arch", "Return Archive Information"),
3459         bf_boolean16(0x0080, "ret_info_mask_mod", "Return Modify Information"),
3460     bf_boolean16(0x0100, "ret_info_mask_create", "Return Creation Information"),
3461         bf_boolean16(0x0200, "ret_info_mask_ns", "Return Name Space Information"),
3462         bf_boolean16(0x0400, "ret_info_mask_dir", "Return Directory Information"),
3463         bf_boolean16(0x0800, "ret_info_mask_rights", "Return Rights Information"),
3464         bf_boolean16(0x1000, "ret_info_mask_id", "Return ID Information"),
3465         bf_boolean16(0x2000, "ret_info_mask_ns_attr", "Return Name Space Attributes Information"),
3466         bf_boolean16(0x4000, "ret_info_mask_actual", "Return Actual Information"),
3467         bf_boolean16(0x8000, "ret_info_mask_logical", "Return Logical Information"),
3468 ])
3469 ReturnedListCount               = uint32("returned_list_count", "Returned List Count")
3470 Revision                        = uint32("revision", "Revision")
3471 RevisionNumber                  = uint8("revision_number", "Revision")
3472 RevQueryFlag                    = val_string8("rev_query_flag", "Revoke Rights Query Flag", [
3473         [ 0x00, "Do not query the locks engine for access rights" ],
3474         [ 0x01, "Query the locks engine and return the access rights" ],
3475 ])
3476 RightsGrantMask                 = bitfield8("rights_grant_mask", "Grant Rights", [
3477         bf_boolean8(0x01, "rights_grant_mask_read", "Read"),
3478         bf_boolean8(0x02, "rights_grant_mask_write", "Write"),
3479         bf_boolean8(0x04, "rights_grant_mask_open", "Open"),
3480         bf_boolean8(0x08, "rights_grant_mask_create", "Create"),
3481         bf_boolean8(0x10, "rights_grant_mask_del", "Delete"),
3482         bf_boolean8(0x20, "rights_grant_mask_parent", "Parental"),
3483         bf_boolean8(0x40, "rights_grant_mask_search", "Search"),
3484         bf_boolean8(0x80, "rights_grant_mask_mod", "Modify"),
3485 ])
3486 RightsRevokeMask                = bitfield8("rights_revoke_mask", "Revoke Rights", [
3487         bf_boolean8(0x01, "rights_revoke_mask_read", "Read"),
3488         bf_boolean8(0x02, "rights_revoke_mask_write", "Write"),
3489         bf_boolean8(0x04, "rights_revoke_mask_open", "Open"),
3490         bf_boolean8(0x08, "rights_revoke_mask_create", "Create"),
3491         bf_boolean8(0x10, "rights_revoke_mask_del", "Delete"),
3492         bf_boolean8(0x20, "rights_revoke_mask_parent", "Parental"),
3493         bf_boolean8(0x40, "rights_revoke_mask_search", "Search"),
3494         bf_boolean8(0x80, "rights_revoke_mask_mod", "Modify"),
3495 ])
3496 RIPSocketNumber                 = uint16("rip_socket_num", "RIP Socket Number")
3497 RIPSocketNumber.Display("BASE_HEX")
3498 RouterDownFlag                  = boolean8("router_dn_flag", "Router Down Flag")
3499 RPCccode                        = val_string16("rpc_c_code", "RPC Completion Code", [
3500         [ 0x0000, "Successful" ],
3501 ])
3502 RTagNumber                      = uint32("r_tag_num", "Resource Tag Number")
3503 RTagNumber.Display("BASE_HEX")
3504 RpyNearestSrvFlag               = boolean8("rpy_nearest_srv_flag", "Reply to Nearest Server Flag")
3505
3506 SalvageableFileEntryNumber      = uint32("salvageable_file_entry_number", "Salvageable File Entry Number")
3507 SalvageableFileEntryNumber.Display("BASE_HEX")
3508 SAPSocketNumber                 = uint16("sap_socket_number", "SAP Socket Number")
3509 SAPSocketNumber.Display("BASE_HEX")
3510 ScanItems                       = uint32("scan_items", "Number of Items returned from Scan")
3511 SearchAttributes                = bitfield8("sattr", "Search Attributes", [
3512         bf_boolean8(0x01, "sattr_ronly", "Read-Only Files Allowed"),
3513         bf_boolean8(0x02, "sattr_hid", "Hidden Files Allowed"),
3514         bf_boolean8(0x04, "sattr_sys", "System Files Allowed"),
3515         bf_boolean8(0x08, "sattr_exonly", "Execute-Only Files Allowed"),
3516         bf_boolean8(0x10, "sattr_sub", "Subdirectories Only"),
3517         bf_boolean8(0x20, "sattr_archive", "Archive"),
3518         bf_boolean8(0x40, "sattr_execute_confirm", "Execute Confirm"),
3519         bf_boolean8(0x80, "sattr_shareable", "Shareable"),
3520 ])
3521 SearchAttributesLow             = bitfield16("search_att_low", "Search Attributes", [
3522         bf_boolean16(0x0001, "search_att_read_only", "Read-Only"),
3523         bf_boolean16(0x0002, "search_att_hidden", "Hidden Files Allowed"),
3524         bf_boolean16(0x0004, "search_att_system", "System"),
3525         bf_boolean16(0x0008, "search_att_execute_only", "Execute-Only"),
3526         bf_boolean16(0x0010, "search_att_sub", "Subdirectories Only"),
3527         bf_boolean16(0x0020, "search_att_archive", "Archive"),
3528         bf_boolean16(0x0040, "search_att_execute_confirm", "Execute Confirm"),
3529         bf_boolean16(0x0080, "search_att_shareable", "Shareable"),
3530         bf_boolean16(0x8000, "search_attr_all_files", "All Files and Directories"),
3531 ])
3532 SearchBitMap                            = bitfield8("search_bit_map", "Search Bit Map", [
3533         bf_boolean8(0x01, "search_bit_map_hidden", "Hidden"),
3534         bf_boolean8(0x02, "search_bit_map_sys", "System"),
3535         bf_boolean8(0x04, "search_bit_map_sub", "Subdirectory"),
3536         bf_boolean8(0x08, "search_bit_map_files", "Files"),
3537 ])
3538 SearchConnNumber                        = uint32("search_conn_number", "Search Connection Number")
3539 SearchInstance                          = uint32("search_instance", "Search Instance")
3540 SearchNumber                = uint32("search_number", "Search Number")
3541 SearchPattern                           = nstring8("search_pattern", "Search Pattern")
3542 SearchPattern16                         = nstring16("search_pattern_16", "Search Pattern")
3543 SearchSequence                          = bytes("search_sequence", "Search Sequence", 9)
3544 SearchSequenceWord          = uint16("search_sequence_word", "Search Sequence", BE)
3545 Second                                      = uint8("s_second", "Seconds")
3546 SecondsRelativeToTheYear2000            = uint32("sec_rel_to_y2k", "Seconds Relative to the Year 2000")
3547 SecretStoreVerb                         = val_string8("ss_verb", "Secret Store Verb",[
3548         [ 0x00, "Query Server" ],
3549         [ 0x01, "Read App Secrets" ],
3550         [ 0x02, "Write App Secrets" ],
3551         [ 0x03, "Add Secret ID" ],
3552         [ 0x04, "Remove Secret ID" ],
3553         [ 0x05, "Remove SecretStore" ],
3554         [ 0x06, "Enumerate Secret IDs" ],
3555         [ 0x07, "Unlock Store" ],
3556         [ 0x08, "Set Master Password" ],
3557         [ 0x09, "Get Service Information" ],
3558 ])
3559 SecurityEquivalentList                  = fw_string("security_equiv_list", "Security Equivalent List", 128)
3560 SecurityFlag                            = bitfield8("security_flag", "Security Flag", [
3561         bf_boolean8(0x01, "checksumming", "Checksumming"),
3562         bf_boolean8(0x02, "signature", "Signature"),
3563         bf_boolean8(0x04, "complete_signatures", "Complete Signatures"),
3564         bf_boolean8(0x08, "encryption", "Encryption"),
3565         bf_boolean8(0x80, "large_internet_packets", "Large Internet Packets (LIP) Disabled"),
3566 ])
3567 SecurityRestrictionVersion              = uint8("security_restriction_version", "Security Restriction Version")
3568 SectorsPerBlock                         = uint8("sectors_per_block", "Sectors Per Block")
3569 SectorsPerCluster                       = uint16("sectors_per_cluster", "Sectors Per Cluster" )
3570 SectorsPerClusterLong                   = uint32("sectors_per_cluster_long", "Sectors Per Cluster" )
3571 SectorsPerTrack                         = uint8("sectors_per_track", "Sectors Per Track")
3572 SectorSize                              = uint32("sector_size", "Sector Size")
3573 SemaphoreHandle                         = uint32("semaphore_handle", "Semaphore Handle")
3574 SemaphoreName                           = nstring8("semaphore_name", "Semaphore Name")
3575 SemaphoreOpenCount                      = uint8("semaphore_open_count", "Semaphore Open Count")
3576 SemaphoreShareCount                     = uint8("semaphore_share_count", "Semaphore Share Count")
3577 SemaphoreTimeOut                        = uint16("semaphore_time_out", "Semaphore Time Out")
3578 SemaphoreValue                          = uint16("semaphore_value", "Semaphore Value")
3579 SendStatus                              = val_string8("send_status", "Send Status", [
3580         [ 0x00, "Successful" ],
3581         [ 0x01, "Illegal Station Number" ],
3582         [ 0x02, "Client Not Logged In" ],
3583         [ 0x03, "Client Not Accepting Messages" ],
3584         [ 0x04, "Client Already has a Message" ],
3585         [ 0x96, "No Alloc Space for the Message" ],
3586         [ 0xfd, "Bad Station Number" ],
3587         [ 0xff, "Failure" ],
3588 ])
3589 SequenceByte                    = uint8("sequence_byte", "Sequence")
3590 SequenceNumber                  = uint32("sequence_number", "Sequence Number")
3591 SequenceNumber.Display("BASE_HEX")
3592 ServerAddress                   = bytes("server_address", "Server Address", 12)
3593 ServerAppNumber                 = uint16("server_app_num", "Server App Number")
3594 ServerID                        = uint32("server_id_number", "Server ID", BE )
3595 ServerID.Display("BASE_HEX")
3596 ServerInfoFlags                 = val_string16("server_info_flags", "Server Information Flags", [
3597         [ 0x0000, "This server is not a member of a Cluster" ],
3598         [ 0x0001, "This server is a member of a Cluster" ],
3599 ])
3600 serverListFlags                 = uint32("server_list_flags", "Server List Flags")
3601 ServerName                      = fw_string("server_name", "Server Name", 48)
3602 serverName50                    = fw_string("server_name50", "Server Name", 50)
3603 ServerNameLen                   = nstring8("server_name_len", "Server Name")
3604 ServerNameStringz               = stringz("server_name_stringz", "Server Name")
3605 ServerNetworkAddress            = bytes("server_network_address", "Server Network Address", 10)
3606 ServerNode                      = bytes("server_node", "Server Node", 6)
3607 ServerSerialNumber              = uint32("server_serial_number", "Server Serial Number")
3608 ServerStation                   = uint8("server_station", "Server Station")
3609 ServerStationLong               = uint32("server_station_long", "Server Station")
3610 ServerStationList               = uint8("server_station_list", "Server Station List")
3611 ServerStatusRecord              = fw_string("server_status_record", "Server Status Record", 64)
3612 ServerTaskNumber                = uint8("server_task_number", "Server Task Number")
3613 ServerTaskNumberLong            = uint32("server_task_number_long", "Server Task Number")
3614 ServerType                      = uint16("server_type", "Server Type")
3615 ServerType.Display("BASE_HEX")
3616 ServerUtilization               = uint32("server_utilization", "Server Utilization")
3617 ServerUtilizationPercentage     = uint8("server_utilization_percentage", "Server Utilization Percentage")
3618 ServiceType                     = val_string16("Service_type", "Service Type", [
3619         [ 0x0000,       "Unknown" ],
3620         [ 0x0001,       "User" ],
3621         [ 0x0002,       "User group" ],
3622         [ 0x0003,       "Print queue" ],
3623         [ 0x0004,       "NetWare file server" ],
3624         [ 0x0005,       "Job server" ],
3625         [ 0x0006,       "Gateway" ],
3626         [ 0x0007,       "Print server" ],
3627         [ 0x0008,       "Archive queue" ],
3628         [ 0x0009,       "Archive server" ],
3629         [ 0x000a,       "Job queue" ],
3630         [ 0x000b,       "Administration" ],
3631         [ 0x0021,       "NAS SNA gateway" ],
3632         [ 0x0026,       "Remote bridge server" ],
3633         [ 0x0027,       "TCP/IP gateway" ],
3634     [ 0xffff,   "All Types" ],
3635 ])
3636 SetCmdCategory                  = val_string8("set_cmd_category", "Set Command Category", [
3637         [ 0x00, "Communications" ],
3638         [ 0x01, "Memory" ],
3639         [ 0x02, "File Cache" ],
3640         [ 0x03, "Directory Cache" ],
3641         [ 0x04, "File System" ],
3642         [ 0x05, "Locks" ],
3643         [ 0x06, "Transaction Tracking" ],
3644         [ 0x07, "Disk" ],
3645         [ 0x08, "Time" ],
3646         [ 0x09, "NCP" ],
3647         [ 0x0a, "Miscellaneous" ],
3648         [ 0x0b, "Error Handling" ],
3649         [ 0x0c, "Directory Services" ],
3650         [ 0x0d, "MultiProcessor" ],
3651         [ 0x0e, "Service Location Protocol" ],
3652         [ 0x0f, "Licensing Services" ],
3653 ])
3654 SetCmdFlags                             = bitfield8("set_cmd_flags", "Set Command Flags", [
3655         bf_boolean8(0x01, "cmd_flags_startup_only", "Startup.ncf Only"),
3656         bf_boolean8(0x02, "cmd_flags_hidden", "Hidden"),
3657         bf_boolean8(0x04, "cmd_flags_advanced", "Advanced"),
3658         bf_boolean8(0x08, "cmd_flags_later", "Restart Server Required to Take Effect"),
3659         bf_boolean8(0x80, "cmd_flags_secure", "Console Secured"),
3660 ])
3661 SetCmdName                      = stringz("set_cmd_name", "Set Command Name")
3662 SetCmdType                      = val_string8("set_cmd_type", "Set Command Type", [
3663         [ 0x00, "Numeric Value" ],
3664         [ 0x01, "Boolean Value" ],
3665         [ 0x02, "Ticks Value" ],
3666         [ 0x04, "Time Value" ],
3667         [ 0x05, "String Value" ],
3668         [ 0x06, "Trigger Value" ],
3669         [ 0x07, "Numeric Value" ],
3670 ])
3671 SetCmdValueNum                  = uint32("set_cmd_value_num", "Set Command Value")
3672 SetCmdValueString               = stringz("set_cmd_value_string", "Set Command Value")
3673 SetMask                         = bitfield32("set_mask", "Set Mask", [
3674                 bf_boolean32(0x00000001, "ncp_encoded_strings", "NCP Encoded Strings"),
3675                 bf_boolean32(0x00000002, "connection_code_page", "Connection Code Page"),
3676 ])
3677 SetParmName                     = stringz("set_parm_name", "Set Parameter Name")
3678 SFTErrorTable                   = bytes("sft_error_table", "SFT Error Table", 60)
3679 SFTSupportLevel                 = val_string8("sft_support_level", "SFT Support Level", [
3680         [ 0x01, "Server Offers Hot Disk Error Fixing" ],
3681         [ 0x02, "Server Offers Disk Mirroring and Transaction Tracking" ],
3682         [ 0x03, "Server Offers Physical Server Mirroring" ],
3683 ])
3684 ShareableLockCount              = uint16("shareable_lock_count", "Shareable Lock Count")
3685 SharedMemoryAddresses           = bytes("shared_memory_addresses", "Shared Memory Addresses", 10)
3686 ShortName                       = fw_string("short_name", "Short Name", 12)
3687 ShortStkName                    = fw_string("short_stack_name", "Short Stack Name", 16)
3688 SiblingCount                    = uint32("sibling_count", "Sibling Count")
3689 SixtyFourBitOffsetsSupportedFlag = val_string8("64_bit_flag", "64 Bit Support", [
3690     [ 0x00, "No support for 64 bit offsets" ],
3691     [ 0x01, "64 bit offsets supported" ],
3692 ])
3693 SMIDs                           = uint32("smids", "Storage Media ID's")
3694 SoftwareDescription             = fw_string("software_description", "Software Description", 65)
3695 SoftwareDriverType              = uint8("software_driver_type", "Software Driver Type")
3696 SoftwareMajorVersionNumber      = uint8("software_major_version_number", "Software Major Version Number")
3697 SoftwareMinorVersionNumber      = uint8("software_minor_version_number", "Software Minor Version Number")
3698 SourceDirHandle                 = uint8("source_dir_handle", "Source Directory Handle")
3699 sourceOriginateTime             = bytes("source_originate_time", "Source Originate Time", 8)
3700 SourcePath                      = nstring8("source_path", "Source Path")
3701 SourcePathComponentCount        = uint8("source_component_count", "Source Path Component Count")
3702 sourceReturnTime                = bytes("source_return_time", "Source Return Time", 8)
3703 SpaceUsed                       = uint32("space_used", "Space Used")
3704 SpaceMigrated                   = uint32("space_migrated", "Space Migrated")
3705 SrcNameSpace                    = val_string8("src_name_space", "Source Name Space", [
3706         [ 0x00, "DOS Name Space" ],
3707         [ 0x01, "MAC Name Space" ],
3708         [ 0x02, "NFS Name Space" ],
3709         [ 0x04, "Long Name Space" ],
3710 ])
3711 SupModID                        = uint32("sup_mod_id", "Sup Mod ID")
3712 StackCount                      = uint32("stack_count", "Stack Count")
3713 StackFullNameStr                = nstring8("stack_full_name_str", "Stack Full Name")
3714 StackMajorVN                    = uint8("stack_major_vn", "Stack Major Version Number")
3715 StackMinorVN                    = uint8("stack_minor_vn", "Stack Minor Version Number")
3716 StackNumber                     = uint32("stack_number", "Stack Number")
3717 StartConnNumber                 = uint32("start_conn_num", "Starting Connection Number")
3718 StartingBlock                   = uint16("starting_block", "Starting Block")
3719 StartingNumber                  = uint32("starting_number", "Starting Number")
3720 StartingSearchNumber            = uint16("start_search_number", "Start Search Number")
3721 StartNumber                     = uint32("start_number", "Start Number")
3722 startNumberFlag                 = uint16("start_number_flag", "Start Number Flag")
3723 StartOffset64bit    = bytes("s_offset_64bit", "64bit Starting Offset", 64)
3724 StartVolumeNumber               = uint32("start_volume_number", "Starting Volume Number")
3725 StationList                     = uint32("station_list", "Station List")
3726 StationNumber                   = bytes("station_number", "Station Number", 3)
3727 StatMajorVersion                = uint8("stat_major_version", "Statistics Table Major Version")
3728 StatMinorVersion                = uint8("stat_minor_version", "Statistics Table Minor Version")
3729 Status                          = bitfield16("status", "Status", [
3730         bf_boolean16(0x0001, "user_info_logged_in", "Logged In"),
3731         bf_boolean16(0x0002, "user_info_being_abort", "Being Aborted"),
3732         bf_boolean16(0x0004, "user_info_audited", "Audited"),
3733         bf_boolean16(0x0008, "user_info_need_sec", "Needs Security Change"),
3734         bf_boolean16(0x0010, "user_info_mac_station", "MAC Station"),
3735         bf_boolean16(0x0020, "user_info_temp_authen", "Temporary Authenticated"),
3736         bf_boolean16(0x0040, "user_info_audit_conn", "Audit Connection Recorded"),
3737         bf_boolean16(0x0080, "user_info_dsaudit_conn", "DS Audit Connection Recorded"),
3738         bf_boolean16(0x0100, "user_info_logout", "Logout in Progress"),
3739         bf_boolean16(0x0200, "user_info_int_login", "Internal Login"),
3740         bf_boolean16(0x0400, "user_info_bindery", "Bindery Connection"),
3741 ])
3742 StatusFlagBits                  = bitfield32("status_flag_bits", "Status Flag", [
3743         bf_boolean32(0x00000001, "status_flag_bits_suballoc", "Sub Allocation"),
3744         bf_boolean32(0x00000002, "status_flag_bits_comp", "Compression"),
3745         bf_boolean32(0x00000004, "status_flag_bits_migrate", "Migration"),
3746         bf_boolean32(0x00000008, "status_flag_bits_audit", "Audit"),
3747         bf_boolean32(0x00000010, "status_flag_bits_ro", "Read Only"),
3748         bf_boolean32(0x00000020, "status_flag_bits_im_purge", "Immediate Purge"),
3749     bf_boolean32(0x00000040, "status_flag_bits_64bit", "64Bit File Offsets"),
3750     bf_boolean32(0x00000080, "status_flag_bits_utf8", "UTF8 NCP Strings"),
3751     bf_boolean32(0x80000000, "status_flag_bits_nss", "NSS Volume"),
3752 ])
3753 SubAllocClusters                = uint32("sub_alloc_clusters", "Sub Alloc Clusters")
3754 SubAllocFreeableClusters        = uint32("sub_alloc_freeable_clusters", "Sub Alloc Freeable Clusters")
3755 Subdirectory                    = uint32("sub_directory", "Subdirectory")
3756 Subdirectory.Display("BASE_HEX")
3757 SuggestedFileSize               = uint32("suggested_file_size", "Suggested File Size")
3758 SupportModuleID                 = uint32("support_module_id", "Support Module ID")
3759 SynchName                       = nstring8("synch_name", "Synch Name")
3760 SystemIntervalMarker            = uint32("system_interval_marker", "System Interval Marker")
3761
3762 TabSize                         = uint8( "tab_size", "Tab Size" )
3763 TargetClientList                = uint8("target_client_list", "Target Client List")
3764 TargetConnectionNumber          = uint16("target_connection_number", "Target Connection Number")
3765 TargetDirectoryBase             = uint32("target_directory_base", "Target Directory Base")
3766 TargetDirHandle                 = uint8("target_dir_handle", "Target Directory Handle")
3767 TargetEntryID                   = uint32("target_entry_id", "Target Entry ID")
3768 TargetEntryID.Display("BASE_HEX")
3769 TargetExecutionTime             = bytes("target_execution_time", "Target Execution Time", 6)
3770 TargetFileHandle                = bytes("target_file_handle", "Target File Handle", 6)
3771 TargetFileOffset                = uint32("target_file_offset", "Target File Offset")
3772 TargetMessage                   = nstring8("target_message", "Message")
3773 TargetPrinter                   = uint8( "target_ptr", "Target Printer" )
3774 targetReceiveTime               = bytes("target_receive_time", "Target Receive Time", 8)
3775 TargetServerIDNumber            = uint32("target_server_id_number", "Target Server ID Number", BE )
3776 TargetServerIDNumber.Display("BASE_HEX")
3777 targetTransmitTime              = bytes("target_transmit_time", "Target Transmit Time", 8)
3778 TaskNumByte                     = uint8("task_num_byte", "Task Number")
3779 TaskNumber                      = uint32("task_number", "Task Number")
3780 TaskNumberWord                  = uint16("task_number_word", "Task Number")
3781 TaskState           = val_string8("task_state", "Task State", [
3782         [ 0x00, "Normal" ],
3783         [ 0x01, "TTS explicit transaction in progress" ],
3784         [ 0x02, "TTS implicit transaction in progress" ],
3785         [ 0x04, "Shared file set lock in progress" ],
3786 ])
3787 TextJobDescription              = fw_string("text_job_description", "Text Job Description", 50)
3788 ThrashingCount                  = uint16("thrashing_count", "Thrashing Count")
3789 TimeoutLimit                    = uint16("timeout_limit", "Timeout Limit")
3790 TimesyncStatus                  = bitfield32("timesync_status_flags", "Timesync Status", [
3791         bf_boolean32(0x00000001, "timesync_status_sync", "Time is Synchronized"),
3792         bf_boolean32(0x00000002, "timesync_status_net_sync", "Time is Synchronized to the Network"),
3793     bf_boolean32(0x00000004, "timesync_status_active", "Time Synchronization is Active"),
3794         bf_boolean32(0x00000008, "timesync_status_external", "External Time Synchronization Active"),
3795         bf_val_str32(0x00000700, "timesync_status_server_type", "Time Server Type", [
3796                 [ 0x01, "Client Time Server" ],
3797                 [ 0x02, "Secondary Time Server" ],
3798                 [ 0x03, "Primary Time Server" ],
3799                 [ 0x04, "Reference Time Server" ],
3800                 [ 0x05, "Single Reference Time Server" ],
3801         ]),
3802         bf_boolean32(0x000f0000, "timesync_status_ext_sync", "External Clock Status"),
3803 ])
3804 TimeToNet                       = uint16("time_to_net", "Time To Net")
3805 TotalBlocks                     = uint32("total_blocks", "Total Blocks")
3806 TotalBlocksToDecompress         = uint32("total_blks_to_dcompress", "Total Blocks To Decompress")
3807 TotalBytesRead                  = bytes("user_info_ttl_bytes_rd", "Total Bytes Read", 6)
3808 TotalBytesWritten               = bytes("user_info_ttl_bytes_wrt", "Total Bytes Written", 6)
3809 TotalCacheWrites                = uint32("total_cache_writes", "Total Cache Writes")
3810 TotalChangedFATs                = uint32("total_changed_fats", "Total Changed FAT Entries")
3811 TotalCommonCnts                 = uint32("total_common_cnts", "Total Common Counts")
3812 TotalCntBlocks                  = uint32("total_cnt_blocks", "Total Count Blocks")
3813 TotalDataStreamDiskSpaceAlloc   = uint32("ttl_data_str_size_space_alloc", "Total Data Stream Disk Space Alloc")
3814 TotalDirectorySlots             = uint16("total_directory_slots", "Total Directory Slots")
3815 TotalDirectoryEntries           = uint32("total_dir_entries", "Total Directory Entries")
3816 TotalDynamicSpace               = uint32("total_dynamic_space", "Total Dynamic Space")
3817 TotalExtendedDirectoryExtents   = uint32("total_extended_directory_extents", "Total Extended Directory Extents")
3818 TotalFileServicePackets         = uint32("total_file_service_packets", "Total File Service Packets")
3819 TotalFilesOpened                = uint32("total_files_opened", "Total Files Opened")
3820 TotalLFSCounters                = uint32("total_lfs_counters", "Total LFS Counters")
3821 TotalOffspring                  = uint16("total_offspring", "Total Offspring")
3822 TotalOtherPackets               = uint32("total_other_packets", "Total Other Packets")
3823 TotalQueueJobs                  = uint32("total_queue_jobs", "Total Queue Jobs")
3824 TotalReadRequests               = uint32("total_read_requests", "Total Read Requests")
3825 TotalRequest                    = uint32("total_request", "Total Requests")
3826 TotalRequestPackets             = uint32("total_request_packets", "Total Request Packets")
3827 TotalRoutedPackets              = uint32("total_routed_packets", "Total Routed Packets")
3828 TotalRxPkts                     = uint32("total_rx_pkts", "Total Receive Packets")
3829 TotalServerMemory               = uint16("total_server_memory", "Total Server Memory", BE)
3830 TotalTransactionsBackedOut      = uint32("total_trans_backed_out", "Total Transactions Backed Out")
3831 TotalTransactionsPerformed      = uint32("total_trans_performed", "Total Transactions Performed")
3832 TotalTxPkts                     = uint32("total_tx_pkts", "Total Transmit Packets")
3833 TotalUnfilledBackoutRequests    = uint16("total_unfilled_backout_requests", "Total Unfilled Backout Requests")
3834 TotalVolumeClusters             = uint16("total_volume_clusters", "Total Volume Clusters")
3835 TotalWriteRequests              = uint32("total_write_requests", "Total Write Requests")
3836 TotalWriteTransactionsPerformed = uint32("total_write_trans_performed", "Total Write Transactions Performed")
3837 TrackOnFlag                     = boolean8("track_on_flag", "Track On Flag")
3838 TransactionDiskSpace            = uint16("transaction_disk_space", "Transaction Disk Space")
3839 TransactionFATAllocations       = uint32("transaction_fat_allocations", "Transaction FAT Allocations")
3840 TransactionFileSizeChanges      = uint32("transaction_file_size_changes", "Transaction File Size Changes")
3841 TransactionFilesTruncated       = uint32("transaction_files_truncated", "Transaction Files Truncated")
3842 TransactionNumber               = uint32("transaction_number", "Transaction Number")
3843 TransactionTrackingEnabled      = uint8("transaction_tracking_enabled", "Transaction Tracking Enabled")
3844 TransactionTrackingFlag         = uint16("tts_flag", "Transaction Tracking Flag")
3845 TransactionTrackingSupported    = uint8("transaction_tracking_supported", "Transaction Tracking Supported")
3846 TransactionVolumeNumber         = uint16("transaction_volume_number", "Transaction Volume Number")
3847 TransportType                   = val_string8("transport_type", "Communications Type", [
3848         [ 0x01, "Internet Packet Exchange (IPX)" ],
3849         [ 0x05, "User Datagram Protocol (UDP)" ],
3850         [ 0x06, "Transmission Control Protocol (TCP)" ],
3851 ])
3852 TreeLength                      = uint32("tree_length", "Tree Length")
3853 TreeName                        = nstring32("tree_name", "Tree Name")
3854 TreeName.NWUnicode()
3855 TrusteeAccessMask           = uint8("trustee_acc_mask", "Trustee Access Mask")
3856 TrusteeRights                   = bitfield16("trustee_rights_low", "Trustee Rights", [
3857         bf_boolean16(0x0001, "trustee_rights_read", "Read"),
3858         bf_boolean16(0x0002, "trustee_rights_write", "Write"),
3859         bf_boolean16(0x0004, "trustee_rights_open", "Open"),
3860         bf_boolean16(0x0008, "trustee_rights_create", "Create"),
3861         bf_boolean16(0x0010, "trustee_rights_del", "Delete"),
3862         bf_boolean16(0x0020, "trustee_rights_parent", "Parental"),
3863         bf_boolean16(0x0040, "trustee_rights_search", "Search"),
3864         bf_boolean16(0x0080, "trustee_rights_modify", "Modify"),
3865         bf_boolean16(0x0100, "trustee_rights_super", "Supervisor"),
3866 ])
3867 TTSLevel                        = uint8("tts_level", "TTS Level")
3868 TrusteeSetNumber                = uint8("trustee_set_number", "Trustee Set Number")
3869 TrusteeID                       = uint32("trustee_id_set", "Trustee ID")
3870 TrusteeID.Display("BASE_HEX")
3871 ttlCompBlks                     = uint32("ttl_comp_blks", "Total Compression Blocks")
3872 TtlDSDskSpaceAlloc              = uint32("ttl_ds_disk_space_alloc", "Total Streams Space Allocated")
3873 TtlEAs                          = uint32("ttl_eas", "Total EA's")
3874 TtlEAsDataSize                  = uint32("ttl_eas_data_size", "Total EA's Data Size")
3875 TtlEAsKeySize                   = uint32("ttl_eas_key_size", "Total EA's Key Size")
3876 ttlIntermediateBlks             = uint32("ttl_inter_blks", "Total Intermediate Blocks")
3877 TtlMigratedSize                 = uint32("ttl_migrated_size", "Total Migrated Size")
3878 TtlNumOfRTags                   = uint32("ttl_num_of_r_tags", "Total Number of Resource Tags")
3879 TtlNumOfSetCmds                 = uint32("ttl_num_of_set_cmds", "Total Number of Set Commands")
3880 TtlValuesLength                 = uint32("ttl_values_length", "Total Values Length")
3881 TtlWriteDataSize                = uint32("ttl_write_data_size", "Total Write Data Size")
3882 TurboUsedForFileService         = uint16("turbo_used_for_file_service", "Turbo Used For File Service")
3883
3884 UnclaimedPkts                   = uint32("un_claimed_packets", "Unclaimed Packets")
3885 UnCompressableDataStreamsCount  = uint32("un_compressable_data_streams_count", "Uncompressable Data Streams Count")
3886 Undefined8                      = bytes("undefined_8", "Undefined", 8)
3887 Undefined28                     = bytes("undefined_28", "Undefined", 28)
3888 UndefinedWord                   = uint16("undefined_word", "Undefined")
3889 UniqueID                        = uint8("unique_id", "Unique ID")
3890 UnknownByte                     = uint8("unknown_byte", "Unknown Byte")
3891 Unused                          = uint8("un_used", "Unused")
3892 UnusedBlocks                    = uint32("unused_blocks", "Unused Blocks")
3893 UnUsedDirectoryEntries          = uint32("un_used_directory_entries", "Unused Directory Entries")
3894 UnusedDiskBlocks                = uint32("unused_disk_blocks", "Unused Disk Blocks")
3895 UnUsedExtendedDirectoryExtents  = uint32("un_used_extended_directory_extents", "Unused Extended Directory Extents")
3896 UpdateDate                      = uint16("update_date", "Update Date")
3897 UpdateDate.NWDate()
3898 UpdateID                        = uint32("update_id", "Update ID", BE)
3899 UpdateID.Display("BASE_HEX")
3900 UpdateTime                      = uint16("update_time", "Update Time")
3901 UpdateTime.NWTime()
3902 UseCount                        = val_string16("user_info_use_count", "Use Count", [
3903         [ 0x0000, "Connection is not in use" ],
3904         [ 0x0001, "Connection is in use" ],
3905 ])
3906 UsedBlocks                      = uint32("used_blocks", "Used Blocks")
3907 UserID                          = uint32("user_id", "User ID", BE)
3908 UserID.Display("BASE_HEX")
3909 UserLoginAllowed                = val_string8("user_login_allowed", "Login Status", [
3910         [ 0x00, "Client Login Disabled" ],
3911         [ 0x01, "Client Login Enabled" ],
3912 ])
3913
3914 UserName                        = nstring8("user_name", "User Name")
3915 UserName16                      = fw_string("user_name_16", "User Name", 16)
3916 UserName48                      = fw_string("user_name_48", "User Name", 48)
3917 UserType                        = uint16("user_type", "User Type")
3918 UTCTimeInSeconds                = uint32("uts_time_in_seconds", "UTC Time in Seconds")
3919
3920 ValueAvailable                  = val_string8("value_available", "Value Available", [
3921         [ 0x00, "Has No Value" ],
3922         [ 0xff, "Has Value" ],
3923 ])
3924 VAPVersion                      = uint8("vap_version", "VAP Version")
3925 VariableBitMask                 = uint32("variable_bit_mask", "Variable Bit Mask")
3926 VariableBitsDefined             = uint16("variable_bits_defined", "Variable Bits Defined")
3927 VConsoleRevision                = uint8("vconsole_rev", "Console Revision")
3928 VConsoleVersion                 = uint8("vconsole_ver", "Console Version")
3929 Verb                            = uint32("verb", "Verb")
3930 VerbData                        = uint8("verb_data", "Verb Data")
3931 version                         = uint32("version", "Version")
3932 VersionNumber                   = uint8("version_number", "Version")
3933 VersionNumberLong       = uint32("version_num_long", "Version")
3934 VertLocation                    = uint16("vert_location", "Vertical Location")
3935 VirtualConsoleVersion           = uint8("virtual_console_version", "Virtual Console Version")
3936 VolumeID                        = uint32("volume_id", "Volume ID")
3937 VolumeID.Display("BASE_HEX")
3938 VolInfoReplyLen                 = uint16("vol_info_reply_len", "Volume Information Reply Length")
3939 VolumeCapabilities                      = bitfield32("volume_capabilities", "Volume Capabilities", [
3940         bf_boolean32(0x00000001, "vol_cap_user_space", "NetWare User Space Restrictions Supported"),
3941         bf_boolean32(0x00000002, "vol_cap_dir_quota", "NetWare Directory Quotas Supported"),
3942         bf_boolean32(0x00000004, "vol_cap_dfs", "DFS is Active on Volume"),
3943         bf_boolean32(0x00000008, "vol_cap_sal_purge", "NetWare Salvage and Purge Operations Supported"),
3944         bf_boolean32(0x00000010, "vol_cap_comp", "NetWare Compression Supported"),
3945         bf_boolean32(0x00000020, "vol_cap_cluster", "Volume is a Cluster Resource"),
3946     bf_boolean32(0x00000040, "vol_cap_nss_admin", "Volume is the NSS Admin Volume"),
3947     bf_boolean32(0x00000080, "vol_cap_nss", "Volume is Mounted by NSS"),
3948         bf_boolean32(0x00000100, "vol_cap_ea", "OS2 style EA's Supported"),
3949         bf_boolean32(0x00000200, "vol_cap_archive", "NetWare Archive bit Supported"),
3950     bf_boolean32(0x00000400, "vol_cap_file_attr", "Full NetWare file Attributes Supported"),
3951 ])
3952 VolumeCachedFlag                = val_string8("volume_cached_flag", "Volume Cached Flag", [
3953         [ 0x00, "Volume is Not Cached" ],
3954         [ 0xff, "Volume is Cached" ],
3955 ])
3956 VolumeDataStreams               = uint8("volume_data_streams", "Volume Data Streams")
3957 VolumeGUID              = stringz("volume_guid", "Volume GUID")
3958 VolumeHashedFlag                = val_string8("volume_hashed_flag", "Volume Hashed Flag", [
3959         [ 0x00, "Volume is Not Hashed" ],
3960         [ 0xff, "Volume is Hashed" ],
3961 ])
3962 VolumeLastModifiedDate          = uint16("volume_last_modified_date", "Volume Last Modified Date")
3963 VolumeLastModifiedDate.NWDate()
3964 VolumeLastModifiedTime          = uint16("volume_last_modified_time", "Volume Last Modified Time")
3965 VolumeLastModifiedTime.NWTime()
3966 VolumeMountedFlag               = val_string8("volume_mounted_flag", "Volume Mounted Flag", [
3967         [ 0x00, "Volume is Not Mounted" ],
3968         [ 0xff, "Volume is Mounted" ],
3969 ])
3970 VolumeMountPoint = stringz("volume_mnt_point", "Volume Mount Point")
3971 VolumeName                      = fw_string("volume_name", "Volume Name", 16)
3972 VolumeNameLen                   = nstring8("volume_name_len", "Volume Name")
3973 VolumeNameSpaces                = uint8("volume_name_spaces", "Volume Name Spaces")
3974 VolumeNameStringz       = stringz("vol_name_stringz", "Volume Name")
3975 VolumeNumber                    = uint8("volume_number", "Volume Number")
3976 VolumeNumberLong                = uint32("volume_number_long", "Volume Number")
3977 VolumeRemovableFlag             = val_string8("volume_removable_flag", "Volume Removable Flag", [
3978         [ 0x00, "Disk Cannot be Removed from Server" ],
3979         [ 0xff, "Disk Can be Removed from Server" ],
3980 ])
3981 VolumeRequestFlags              = val_string16("volume_request_flags", "Volume Request Flags", [
3982         [ 0x0000, "Do not return name with volume number" ],
3983         [ 0x0001, "Return name with volume number" ],
3984 ])
3985 VolumeSizeInClusters            = uint32("volume_size_in_clusters", "Volume Size in Clusters")
3986 VolumesSupportedMax             = uint16("volumes_supported_max", "Volumes Supported Max")
3987 VolumeType                      = val_string16("volume_type", "Volume Type", [
3988         [ 0x0000, "NetWare 386" ],
3989         [ 0x0001, "NetWare 286" ],
3990         [ 0x0002, "NetWare 386 Version 30" ],
3991         [ 0x0003, "NetWare 386 Version 31" ],
3992 ])
3993 WastedServerMemory              = uint16("wasted_server_memory", "Wasted Server Memory", BE)
3994 WaitTime                        = uint32("wait_time", "Wait Time")
3995
3996 Year                            = val_string8("year", "Year",[
3997         [ 0x50, "1980" ],
3998         [ 0x51, "1981" ],
3999         [ 0x52, "1982" ],
4000         [ 0x53, "1983" ],
4001         [ 0x54, "1984" ],
4002         [ 0x55, "1985" ],
4003         [ 0x56, "1986" ],
4004         [ 0x57, "1987" ],
4005         [ 0x58, "1988" ],
4006         [ 0x59, "1989" ],
4007         [ 0x5a, "1990" ],
4008         [ 0x5b, "1991" ],
4009         [ 0x5c, "1992" ],
4010         [ 0x5d, "1993" ],
4011         [ 0x5e, "1994" ],
4012         [ 0x5f, "1995" ],
4013         [ 0x60, "1996" ],
4014         [ 0x61, "1997" ],
4015         [ 0x62, "1998" ],
4016         [ 0x63, "1999" ],
4017         [ 0x64, "2000" ],
4018         [ 0x65, "2001" ],
4019         [ 0x66, "2002" ],
4020         [ 0x67, "2003" ],
4021         [ 0x68, "2004" ],
4022         [ 0x69, "2005" ],
4023         [ 0x6a, "2006" ],
4024         [ 0x6b, "2007" ],
4025         [ 0x6c, "2008" ],
4026         [ 0x6d, "2009" ],
4027         [ 0x6e, "2010" ],
4028         [ 0x6f, "2011" ],
4029         [ 0x70, "2012" ],
4030         [ 0x71, "2013" ],
4031         [ 0x72, "2014" ],
4032         [ 0x73, "2015" ],
4033         [ 0x74, "2016" ],
4034         [ 0x75, "2017" ],
4035         [ 0x76, "2018" ],
4036         [ 0x77, "2019" ],
4037         [ 0x78, "2020" ],
4038         [ 0x79, "2021" ],
4039         [ 0x7a, "2022" ],
4040         [ 0x7b, "2023" ],
4041         [ 0x7c, "2024" ],
4042         [ 0x7d, "2025" ],
4043         [ 0x7e, "2026" ],
4044         [ 0x7f, "2027" ],
4045         [ 0xc0, "1984" ],
4046         [ 0xc1, "1985" ],
4047         [ 0xc2, "1986" ],
4048         [ 0xc3, "1987" ],
4049         [ 0xc4, "1988" ],
4050         [ 0xc5, "1989" ],
4051         [ 0xc6, "1990" ],
4052         [ 0xc7, "1991" ],
4053         [ 0xc8, "1992" ],
4054         [ 0xc9, "1993" ],
4055         [ 0xca, "1994" ],
4056         [ 0xcb, "1995" ],
4057         [ 0xcc, "1996" ],
4058         [ 0xcd, "1997" ],
4059         [ 0xce, "1998" ],
4060         [ 0xcf, "1999" ],
4061         [ 0xd0, "2000" ],
4062         [ 0xd1, "2001" ],
4063         [ 0xd2, "2002" ],
4064         [ 0xd3, "2003" ],
4065         [ 0xd4, "2004" ],
4066         [ 0xd5, "2005" ],
4067         [ 0xd6, "2006" ],
4068         [ 0xd7, "2007" ],
4069         [ 0xd8, "2008" ],
4070         [ 0xd9, "2009" ],
4071         [ 0xda, "2010" ],
4072         [ 0xdb, "2011" ],
4073         [ 0xdc, "2012" ],
4074         [ 0xdd, "2013" ],
4075         [ 0xde, "2014" ],
4076         [ 0xdf, "2015" ],
4077 ])
4078 ##############################################################################
4079 # Structs
4080 ##############################################################################
4081
4082
4083 acctngInfo                      = struct("acctng_info_struct", [
4084         HoldTime,
4085         HoldAmount,
4086         ChargeAmount,
4087         HeldConnectTimeInMinutes,
4088         HeldRequests,
4089         HeldBytesRead,
4090         HeldBytesWritten,
4091 ],"Accounting Information")
4092 AFP10Struct                       = struct("afp_10_struct", [
4093         AFPEntryID,
4094         ParentID,
4095         AttributesDef16,
4096         DataForkLen,
4097         ResourceForkLen,
4098         TotalOffspring,
4099         CreationDate,
4100         LastAccessedDate,
4101         ModifiedDate,
4102         ModifiedTime,
4103         ArchivedDate,
4104         ArchivedTime,
4105         CreatorID,
4106         Reserved4,
4107         FinderAttr,
4108         HorizLocation,
4109         VertLocation,
4110         FileDirWindow,
4111         Reserved16,
4112         LongName,
4113         CreatorID,
4114         ShortName,
4115         AccessPrivileges,
4116 ], "AFP Information" )
4117 AFP20Struct                       = struct("afp_20_struct", [
4118         AFPEntryID,
4119         ParentID,
4120         AttributesDef16,
4121         DataForkLen,
4122         ResourceForkLen,
4123         TotalOffspring,
4124         CreationDate,
4125         LastAccessedDate,
4126         ModifiedDate,
4127         ModifiedTime,
4128         ArchivedDate,
4129         ArchivedTime,
4130         CreatorID,
4131         Reserved4,
4132         FinderAttr,
4133         HorizLocation,
4134         VertLocation,
4135         FileDirWindow,
4136         Reserved16,
4137         LongName,
4138         CreatorID,
4139         ShortName,
4140         AccessPrivileges,
4141         Reserved,
4142         ProDOSInfo,
4143 ], "AFP Information" )
4144 ArchiveDateStruct               = struct("archive_date_struct", [
4145         ArchivedDate,
4146 ])
4147 ArchiveIdStruct                 = struct("archive_id_struct", [
4148         ArchiverID,
4149 ])
4150 ArchiveInfoStruct               = struct("archive_info_struct", [
4151         ArchivedTime,
4152         ArchivedDate,
4153         ArchiverID,
4154 ], "Archive Information")
4155 ArchiveTimeStruct               = struct("archive_time_struct", [
4156         ArchivedTime,
4157 ])
4158 AttributesStruct                = struct("attributes_struct", [
4159         AttributesDef32,
4160         FlagsDef,
4161 ], "Attributes")
4162 authInfo                        = struct("auth_info_struct", [
4163         Status,
4164         Reserved2,
4165         Privileges,
4166 ])
4167 BoardNameStruct                 = struct("board_name_struct", [
4168         DriverBoardName,
4169         DriverShortName,
4170         DriverLogicalName,
4171 ], "Board Name")
4172 CacheInfo                       = struct("cache_info", [
4173         uint32("max_byte_cnt", "Maximum Byte Count"),
4174         uint32("min_num_of_cache_buff", "Minimum Number Of Cache Buffers"),
4175         uint32("min_cache_report_thresh", "Minimum Cache Report Threshold"),
4176         uint32("alloc_waiting", "Allocate Waiting Count"),
4177         uint32("ndirty_blocks", "Number of Dirty Blocks"),
4178         uint32("cache_dirty_wait_time", "Cache Dirty Wait Time"),
4179         uint32("cache_max_concur_writes", "Cache Maximum Concurrent Writes"),
4180         uint32("max_dirty_time", "Maximum Dirty Time"),
4181         uint32("num_dir_cache_buff", "Number Of Directory Cache Buffers"),
4182         uint32("cache_byte_to_block", "Cache Byte To Block Shift Factor"),
4183 ], "Cache Information")
4184 CommonLanStruc                  = struct("common_lan_struct", [
4185         boolean8("not_supported_mask", "Bit Counter Supported"),
4186         Reserved3,
4187         uint32("total_tx_packet_count", "Total Transmit Packet Count"),
4188         uint32("total_rx_packet_count", "Total Receive Packet Count"),
4189         uint32("no_ecb_available_count", "No ECB Available Count"),
4190         uint32("packet_tx_too_big_count", "Transmit Packet Too Big Count"),
4191         uint32("packet_tx_too_small_count", "Transmit Packet Too Small Count"),
4192         uint32("packet_rx_overflow_count", "Receive Packet Overflow Count"),
4193         uint32("packet_rx_too_big_count", "Receive Packet Too Big Count"),
4194         uint32("packet_rs_too_small_count", "Receive Packet Too Small Count"),
4195         uint32("packet_tx_misc_error_count", "Transmit Packet Misc Error Count"),
4196         uint32("packet_rx_misc_error_count", "Receive Packet Misc Error Count"),
4197         uint32("retry_tx_count", "Transmit Retry Count"),
4198         uint32("checksum_error_count", "Checksum Error Count"),
4199         uint32("hardware_rx_mismatch_count", "Hardware Receive Mismatch Count"),
4200 ], "Common LAN Information")
4201 CompDeCompStat                  = struct("comp_d_comp_stat", [
4202         uint32("cmphitickhigh", "Compress High Tick"),
4203         uint32("cmphitickcnt", "Compress High Tick Count"),
4204         uint32("cmpbyteincount", "Compress Byte In Count"),
4205         uint32("cmpbyteoutcnt", "Compress Byte Out Count"),
4206         uint32("cmphibyteincnt", "Compress High Byte In Count"),
4207         uint32("cmphibyteoutcnt", "Compress High Byte Out Count"),
4208         uint32("decphitickhigh", "DeCompress High Tick"),
4209         uint32("decphitickcnt", "DeCompress High Tick Count"),
4210         uint32("decpbyteincount", "DeCompress Byte In Count"),
4211         uint32("decpbyteoutcnt", "DeCompress Byte Out Count"),
4212         uint32("decphibyteincnt", "DeCompress High Byte In Count"),
4213         uint32("decphibyteoutcnt", "DeCompress High Byte Out Count"),
4214 ], "Compression/Decompression Information")
4215 ConnFileStruct                  = struct("conn_file_struct", [
4216         ConnectionNumberWord,
4217         TaskNumberWord,
4218         LockType,
4219         AccessControl,
4220         LockFlag,
4221 ], "File Connection Information")
4222 ConnStruct                      = struct("conn_struct", [
4223         TaskNumByte,
4224         LockType,
4225         AccessControl,
4226         LockFlag,
4227         VolumeNumber,
4228         DirectoryEntryNumberWord,
4229         FileName14,
4230 ], "Connection Information")
4231 ConnTaskStruct                  = struct("conn_task_struct", [
4232         ConnectionNumberByte,
4233         TaskNumByte,
4234 ], "Task Information")
4235 Counters                        = struct("counters_struct", [
4236         uint32("read_exist_blck", "Read Existing Block Count"),
4237         uint32("read_exist_write_wait", "Read Existing Write Wait Count"),
4238         uint32("read_exist_part_read", "Read Existing Partial Read Count"),
4239         uint32("read_exist_read_err", "Read Existing Read Error Count"),
4240         uint32("wrt_blck_cnt", "Write Block Count"),
4241         uint32("wrt_entire_blck", "Write Entire Block Count"),
4242         uint32("internl_dsk_get", "Internal Disk Get Count"),
4243         uint32("internl_dsk_get_need_to_alloc", "Internal Disk Get Need To Allocate Count"),
4244         uint32("internl_dsk_get_someone_beat", "Internal Disk Get Someone Beat My Count"),
4245         uint32("internl_dsk_get_part_read", "Internal Disk Get Partial Read Count"),
4246         uint32("internl_dsk_get_read_err", "Internal Disk Get Read Error Count"),
4247         uint32("async_internl_dsk_get", "Async Internal Disk Get Count"),
4248         uint32("async_internl_dsk_get_need_to_alloc", "Async Internal Disk Get Need To Alloc"),
4249         uint32("async_internl_dsk_get_someone_beat", "Async Internal Disk Get Someone Beat Me"),
4250         uint32("err_doing_async_read", "Error Doing Async Read Count"),
4251         uint32("internl_dsk_get_no_read", "Internal Disk Get No Read Count"),
4252         uint32("internl_dsk_get_no_read_alloc", "Internal Disk Get No Read Allocate Count"),
4253         uint32("internl_dsk_get_no_read_someone_beat", "Internal Disk Get No Read Someone Beat Me Count"),
4254         uint32("internl_dsk_write", "Internal Disk Write Count"),
4255         uint32("internl_dsk_write_alloc", "Internal Disk Write Allocate Count"),
4256         uint32("internl_dsk_write_someone_beat", "Internal Disk Write Someone Beat Me Count"),
4257         uint32("write_err", "Write Error Count"),
4258         uint32("wait_on_sema", "Wait On Semaphore Count"),
4259         uint32("alloc_blck_i_had_to_wait_for", "Allocate Block I Had To Wait For Someone Count"),
4260         uint32("alloc_blck", "Allocate Block Count"),
4261         uint32("alloc_blck_i_had_to_wait", "Allocate Block I Had To Wait Count"),
4262 ], "Disk Counter Information")
4263 CPUInformation                  = struct("cpu_information", [
4264         PageTableOwnerFlag,
4265         CPUType,
4266         Reserved3,
4267         CoprocessorFlag,
4268         BusType,
4269         Reserved3,
4270         IOEngineFlag,
4271         Reserved3,
4272         FSEngineFlag,
4273         Reserved3,
4274         NonDedFlag,
4275         Reserved3,
4276         CPUString,
4277         CoProcessorString,
4278         BusString,
4279 ], "CPU Information")
4280 CreationDateStruct              = struct("creation_date_struct", [
4281         CreationDate,
4282 ])
4283 CreationInfoStruct              = struct("creation_info_struct", [
4284         CreationTime,
4285         CreationDate,
4286         endian(CreatorID, LE),
4287 ], "Creation Information")
4288 CreationTimeStruct              = struct("creation_time_struct", [
4289         CreationTime,
4290 ])
4291 CustomCntsInfo                  = struct("custom_cnts_info", [
4292         CustomVariableValue,
4293         CustomString,
4294 ], "Custom Counters" )
4295 DataStreamInfo                  = struct("data_stream_info", [
4296         AssociatedNameSpace,
4297         DataStreamName
4298 ])
4299 DataStreamSizeStruct            = struct("data_stream_size_struct", [
4300         DataStreamSize,
4301 ])
4302 DirCacheInfo                    = struct("dir_cache_info", [
4303         uint32("min_time_since_file_delete", "Minimum Time Since File Delete"),
4304         uint32("abs_min_time_since_file_delete", "Absolute Minimum Time Since File Delete"),
4305         uint32("min_num_of_dir_cache_buff", "Minimum Number Of Directory Cache Buffers"),
4306         uint32("max_num_of_dir_cache_buff", "Maximum Number Of Directory Cache Buffers"),
4307         uint32("num_of_dir_cache_buff", "Number Of Directory Cache Buffers"),
4308         uint32("dc_min_non_ref_time", "DC Minimum Non-Referenced Time"),
4309         uint32("dc_wait_time_before_new_buff", "DC Wait Time Before New Buffer"),
4310         uint32("dc_max_concurrent_writes", "DC Maximum Concurrent Writes"),
4311         uint32("dc_dirty_wait_time", "DC Dirty Wait Time"),
4312         uint32("dc_double_read_flag", "DC Double Read Flag"),
4313         uint32("map_hash_node_count", "Map Hash Node Count"),
4314         uint32("space_restriction_node_count", "Space Restriction Node Count"),
4315         uint32("trustee_list_node_count", "Trustee List Node Count"),
4316         uint32("percent_of_vol_used_by_dirs", "Percent Of Volume Used By Directories"),
4317 ], "Directory Cache Information")
4318 DirEntryStruct                  = struct("dir_entry_struct", [
4319         DirectoryEntryNumber,
4320         DOSDirectoryEntryNumber,
4321         VolumeNumberLong,
4322 ], "Directory Entry Information")
4323 DirectoryInstance               = struct("directory_instance", [
4324         SearchSequenceWord,
4325         DirectoryID,
4326         DirectoryName14,
4327         DirectoryAttributes,
4328         DirectoryAccessRights,
4329         endian(CreationDate, BE),
4330         endian(AccessDate, BE),
4331         CreatorID,
4332         Reserved2,
4333         DirectoryStamp,
4334 ], "Directory Information")
4335 DMInfoLevel0                    = struct("dm_info_level_0", [
4336         uint32("io_flag", "IO Flag"),
4337         uint32("sm_info_size", "Storage Module Information Size"),
4338         uint32("avail_space", "Available Space"),
4339         uint32("used_space", "Used Space"),
4340         stringz("s_module_name", "Storage Module Name"),
4341         uint8("s_m_info", "Storage Media Information"),
4342 ])
4343 DMInfoLevel1                    = struct("dm_info_level_1", [
4344         NumberOfSMs,
4345         SMIDs,
4346 ])
4347 DMInfoLevel2                    = struct("dm_info_level_2", [
4348         Name,
4349 ])
4350 DOSDirectoryEntryStruct         = struct("dos_directory_entry_struct", [
4351         AttributesDef32,
4352         UniqueID,
4353         PurgeFlags,
4354         DestNameSpace,
4355         DirectoryNameLen,
4356         DirectoryName,
4357         CreationTime,
4358         CreationDate,
4359         CreatorID,
4360         ArchivedTime,
4361         ArchivedDate,
4362         ArchiverID,
4363         UpdateTime,
4364         UpdateDate,
4365         NextTrusteeEntry,
4366         Reserved48,
4367         InheritedRightsMask,
4368 ], "DOS Directory Information")
4369 DOSFileEntryStruct              = struct("dos_file_entry_struct", [
4370         AttributesDef32,
4371         UniqueID,
4372         PurgeFlags,
4373         DestNameSpace,
4374         NameLen,
4375         Name12,
4376         CreationTime,
4377         CreationDate,
4378         CreatorID,
4379         ArchivedTime,
4380         ArchivedDate,
4381         ArchiverID,
4382         UpdateTime,
4383         UpdateDate,
4384         UpdateID,
4385         FileSize,
4386         DataForkFirstFAT,
4387         NextTrusteeEntry,
4388         Reserved36,
4389         InheritedRightsMask,
4390         LastAccessedDate,
4391         Reserved20,
4392         PrimaryEntry,
4393         NameList,
4394 ], "DOS File Information")
4395 DSSpaceAllocateStruct           = struct("ds_space_alloc_struct", [
4396         DataStreamSpaceAlloc,
4397 ])
4398 DynMemStruct                    = struct("dyn_mem_struct", [
4399         uint32("dyn_mem_struct_total", "Total Dynamic Space" ),
4400         uint32("dyn_mem_struct_max", "Max Used Dynamic Space" ),
4401         uint32("dyn_mem_struct_cur", "Current Used Dynamic Space" ),
4402 ], "Dynamic Memory Information")
4403 EAInfoStruct                    = struct("ea_info_struct", [
4404         EADataSize,
4405         EACount,
4406         EAKeySize,
4407 ], "Extended Attribute Information")
4408 ExtraCacheCntrs                 = struct("extra_cache_cntrs", [
4409         uint32("internl_dsk_get_no_wait", "Internal Disk Get No Wait Count"),
4410         uint32("internl_dsk_get_no_wait_need", "Internal Disk Get No Wait Need To Allocate Count"),
4411         uint32("internl_dsk_get_no_wait_no_blk", "Internal Disk Get No Wait No Block Count"),
4412         uint32("id_get_no_read_no_wait", "ID Get No Read No Wait Count"),
4413         uint32("id_get_no_read_no_wait_sema", "ID Get No Read No Wait Semaphored Count"),
4414         uint32("id_get_no_read_no_wait_buffer", "ID Get No Read No Wait No Buffer Count"),
4415         uint32("id_get_no_read_no_wait_alloc", "ID Get No Read No Wait Allocate Count"),
4416         uint32("id_get_no_read_no_wait_no_alloc", "ID Get No Read No Wait No Alloc Count"),
4417         uint32("id_get_no_read_no_wait_no_alloc_sema", "ID Get No Read No Wait No Alloc Semaphored Count"),
4418         uint32("id_get_no_read_no_wait_no_alloc_alloc", "ID Get No Read No Wait No Alloc Allocate Count"),
4419 ], "Extra Cache Counters Information")
4420
4421 FileSize64bitStruct             = struct("file_sz_64bit_struct", [
4422         FileSize64bit,
4423 ])
4424
4425 ReferenceIDStruct               = struct("ref_id_struct", [
4426         CurrentReferenceID,
4427 ])
4428 NSAttributeStruct               = struct("ns_attrib_struct", [
4429         AttributesDef32,
4430 ])
4431 DStreamActual                   = struct("d_stream_actual", [
4432         DataStreamNumberLong,
4433         DataStreamFATBlocks,
4434 ])
4435 DStreamLogical                  = struct("d_string_logical", [
4436         DataStreamNumberLong,
4437         DataStreamSize,
4438 ])
4439 LastUpdatedInSecondsStruct      = struct("last_update_in_seconds_struct", [
4440         SecondsRelativeToTheYear2000,
4441 ])
4442 DOSNameStruct                   = struct("dos_name_struct", [
4443         FileName,
4444 ], "DOS File Name")
4445 DOSName16Struct                   = struct("dos_name_16_struct", [
4446         FileName16,
4447 ], "DOS File Name")
4448 FlushTimeStruct                 = struct("flush_time_struct", [
4449         FlushTime,
4450 ])
4451 ParentBaseIDStruct              = struct("parent_base_id_struct", [
4452         ParentBaseID,
4453 ])
4454 MacFinderInfoStruct             = struct("mac_finder_info_struct", [
4455         MacFinderInfo,
4456 ])
4457 SiblingCountStruct              = struct("sibling_count_struct", [
4458         SiblingCount,
4459 ])
4460 EffectiveRightsStruct           = struct("eff_rights_struct", [
4461         EffectiveRights,
4462         Reserved3,
4463 ])
4464 MacTimeStruct                   = struct("mac_time_struct", [
4465         MACCreateDate,
4466         MACCreateTime,
4467         MACBackupDate,
4468         MACBackupTime,
4469 ])
4470 LastAccessedTimeStruct          = struct("last_access_time_struct", [
4471         LastAccessedTime,
4472 ])
4473 FileAttributesStruct            = struct("file_attributes_struct", [
4474         AttributesDef32,
4475 ])
4476 FileInfoStruct                  = struct("file_info_struct", [
4477         ParentID,
4478         DirectoryEntryNumber,
4479         TotalBlocksToDecompress,
4480         #CurrentBlockBeingDecompressed,
4481 ], "File Information")
4482 FileInstance                    = struct("file_instance", [
4483         SearchSequenceWord,
4484         DirectoryID,
4485         FileName14,
4486         AttributesDef,
4487         FileMode,
4488         FileSize,
4489         endian(CreationDate, BE),
4490         endian(AccessDate, BE),
4491         endian(UpdateDate, BE),
4492         endian(UpdateTime, BE),
4493 ], "File Instance")
4494 FileNameStruct                  = struct("file_name_struct", [
4495         FileName,
4496 ], "File Name")
4497 FileName16Struct                  = struct("file_name16_struct", [
4498         FileName16,
4499 ], "File Name")
4500 FileServerCounters              = struct("file_server_counters", [
4501         uint16("too_many_hops", "Too Many Hops"),
4502         uint16("unknown_network", "Unknown Network"),
4503         uint16("no_space_for_service", "No Space For Service"),
4504         uint16("no_receive_buff", "No Receive Buffers"),
4505         uint16("not_my_network", "Not My Network"),
4506         uint32("netbios_progated", "NetBIOS Propagated Count"),
4507         uint32("ttl_pckts_srvcd", "Total Packets Serviced"),
4508         uint32("ttl_pckts_routed", "Total Packets Routed"),
4509 ], "File Server Counters")
4510 FileSystemInfo                  = struct("file_system_info", [
4511         uint32("fat_moved", "Number of times the OS has move the location of FAT"),
4512         uint32("fat_write_err", "Number of write errors in both original and mirrored copies of FAT"),
4513         uint32("someone_else_did_it_0", "Someone Else Did It Count 0"),
4514         uint32("someone_else_did_it_1", "Someone Else Did It Count 1"),
4515         uint32("someone_else_did_it_2", "Someone Else Did It Count 2"),
4516         uint32("i_ran_out_someone_else_did_it_0", "I Ran Out Someone Else Did It Count 0"),
4517         uint32("i_ran_out_someone_else_did_it_1", "I Ran Out Someone Else Did It Count 1"),
4518         uint32("i_ran_out_someone_else_did_it_2", "I Ran Out Someone Else Did It Count 2"),
4519         uint32("turbo_fat_build_failed", "Turbo FAT Build Failed Count"),
4520         uint32("extra_use_count_node_count", "Errors allocating a use count node for TTS"),
4521         uint32("extra_extra_use_count_node_count", "Errors allocating an additional use count node for TTS"),
4522         uint32("error_read_last_fat", "Error Reading Last FAT Count"),
4523         uint32("someone_else_using_this_file", "Someone Else Using This File Count"),
4524 ], "File System Information")
4525 GenericInfoDef                  = struct("generic_info_def", [
4526         fw_string("generic_label", "Label", 64),
4527         uint32("generic_ident_type", "Identification Type"),
4528         uint32("generic_ident_time", "Identification Time"),
4529         uint32("generic_media_type", "Media Type"),
4530         uint32("generic_cartridge_type", "Cartridge Type"),
4531         uint32("generic_unit_size", "Unit Size"),
4532         uint32("generic_block_size", "Block Size"),
4533         uint32("generic_capacity", "Capacity"),
4534         uint32("generic_pref_unit_size", "Preferred Unit Size"),
4535         fw_string("generic_name", "Name",64),
4536         uint32("generic_type", "Type"),
4537         uint32("generic_status", "Status"),
4538         uint32("generic_func_mask", "Function Mask"),
4539         uint32("generic_ctl_mask", "Control Mask"),
4540         uint32("generic_parent_count", "Parent Count"),
4541         uint32("generic_sib_count", "Sibling Count"),
4542         uint32("generic_child_count", "Child Count"),
4543         uint32("generic_spec_info_sz", "Specific Information Size"),
4544         uint32("generic_object_uniq_id", "Unique Object ID"),
4545         uint32("generic_media_slot", "Media Slot"),
4546 ], "Generic Information")
4547 HandleInfoLevel0                = struct("handle_info_level_0", [
4548 #        DataStream,
4549 ])
4550 HandleInfoLevel1                = struct("handle_info_level_1", [
4551         DataStream,
4552 ])
4553 HandleInfoLevel2                = struct("handle_info_level_2", [
4554         DOSDirectoryBase,
4555         NameSpace,
4556         DataStream,
4557 ])
4558 HandleInfoLevel3                = struct("handle_info_level_3", [
4559         DOSDirectoryBase,
4560         NameSpace,
4561 ])
4562 HandleInfoLevel4                = struct("handle_info_level_4", [
4563         DOSDirectoryBase,
4564         NameSpace,
4565         ParentDirectoryBase,
4566         ParentDOSDirectoryBase,
4567 ])
4568 HandleInfoLevel5                = struct("handle_info_level_5", [
4569         DOSDirectoryBase,
4570         NameSpace,
4571         DataStream,
4572         ParentDirectoryBase,
4573         ParentDOSDirectoryBase,
4574 ])
4575 IPXInformation                  = struct("ipx_information", [
4576         uint32("ipx_send_pkt", "IPX Send Packet Count"),
4577         uint16("ipx_malform_pkt", "IPX Malformed Packet Count"),
4578         uint32("ipx_get_ecb_req", "IPX Get ECB Request Count"),
4579         uint32("ipx_get_ecb_fail", "IPX Get ECB Fail Count"),
4580         uint32("ipx_aes_event", "IPX AES Event Count"),
4581         uint16("ipx_postponed_aes", "IPX Postponed AES Count"),
4582         uint16("ipx_max_conf_sock", "IPX Max Configured Socket Count"),
4583         uint16("ipx_max_open_sock", "IPX Max Open Socket Count"),
4584         uint16("ipx_open_sock_fail", "IPX Open Socket Fail Count"),
4585         uint32("ipx_listen_ecb", "IPX Listen ECB Count"),
4586         uint16("ipx_ecb_cancel_fail", "IPX ECB Cancel Fail Count"),
4587         uint16("ipx_get_lcl_targ_fail", "IPX Get Local Target Fail Count"),
4588 ], "IPX Information")
4589 JobEntryTime                    = struct("job_entry_time", [
4590         Year,
4591         Month,
4592         Day,
4593         Hour,
4594         Minute,
4595         Second,
4596 ], "Job Entry Time")
4597 JobStruct3x                       = struct("job_struct_3x", [
4598     RecordInUseFlag,
4599     PreviousRecord,
4600     NextRecord,
4601         ClientStationLong,
4602         ClientTaskNumberLong,
4603         ClientIDNumber,
4604         TargetServerIDNumber,
4605         TargetExecutionTime,
4606         JobEntryTime,
4607         JobNumberLong,
4608         JobType,
4609         JobPositionWord,
4610         JobControlFlagsWord,
4611         JobFileName,
4612         JobFileHandleLong,
4613         ServerStationLong,
4614         ServerTaskNumberLong,
4615         ServerID,
4616         TextJobDescription,
4617         ClientRecordArea,
4618 ], "Job Information")
4619 JobStruct                       = struct("job_struct", [
4620         ClientStation,
4621         ClientTaskNumber,
4622         ClientIDNumber,
4623         TargetServerIDNumber,
4624         TargetExecutionTime,
4625         JobEntryTime,
4626         JobNumber,
4627         JobType,
4628         JobPosition,
4629         JobControlFlags,
4630         JobFileName,
4631         JobFileHandle,
4632         ServerStation,
4633         ServerTaskNumber,
4634         ServerID,
4635         TextJobDescription,
4636         ClientRecordArea,
4637 ], "Job Information")
4638 JobStructNew                    = struct("job_struct_new", [
4639         RecordInUseFlag,
4640         PreviousRecord,
4641         NextRecord,
4642         ClientStationLong,
4643         ClientTaskNumberLong,
4644         ClientIDNumber,
4645         TargetServerIDNumber,
4646         TargetExecutionTime,
4647         JobEntryTime,
4648         JobNumberLong,
4649         JobType,
4650         JobPositionWord,
4651         JobControlFlagsWord,
4652         JobFileName,
4653         JobFileHandleLong,
4654         ServerStationLong,
4655         ServerTaskNumberLong,
4656         ServerID,
4657 ], "Job Information")
4658 KnownRoutes                     = struct("known_routes", [
4659         NetIDNumber,
4660         HopsToNet,
4661         NetStatus,
4662         TimeToNet,
4663 ], "Known Routes")
4664 SrcEnhNWHandlePathS1                 = struct("source_nwhandle", [
4665                 DirectoryBase,
4666                 VolumeNumber,
4667                 HandleFlag,
4668         DataTypeFlag,
4669         Reserved5,
4670 ], "Source Information")
4671 DstEnhNWHandlePathS1                 = struct("destination_nwhandle", [
4672                 DirectoryBase,
4673                 VolumeNumber,
4674                 HandleFlag,
4675         DataTypeFlag,
4676         Reserved5,
4677 ], "Destination Information")
4678 KnownServStruc                  = struct("known_server_struct", [
4679         ServerAddress,
4680         HopsToNet,
4681         ServerNameStringz,
4682 ], "Known Servers")
4683 LANConfigInfo                   = struct("lan_cfg_info", [
4684         LANdriverCFG_MajorVersion,
4685         LANdriverCFG_MinorVersion,
4686         LANdriverNodeAddress,
4687         Reserved,
4688         LANdriverModeFlags,
4689         LANdriverBoardNumber,
4690         LANdriverBoardInstance,
4691         LANdriverMaximumSize,
4692         LANdriverMaxRecvSize,
4693         LANdriverRecvSize,
4694         LANdriverCardID,
4695         LANdriverMediaID,
4696         LANdriverTransportTime,
4697         LANdriverSrcRouting,
4698         LANdriverLineSpeed,
4699         LANdriverReserved,
4700         LANdriverMajorVersion,
4701         LANdriverMinorVersion,
4702         LANdriverFlags,
4703         LANdriverSendRetries,
4704         LANdriverLink,
4705         LANdriverSharingFlags,
4706         LANdriverSlot,
4707         LANdriverIOPortsAndRanges1,
4708         LANdriverIOPortsAndRanges2,
4709         LANdriverIOPortsAndRanges3,
4710         LANdriverIOPortsAndRanges4,
4711         LANdriverMemoryDecode0,
4712         LANdriverMemoryLength0,
4713         LANdriverMemoryDecode1,
4714         LANdriverMemoryLength1,
4715         LANdriverInterrupt1,
4716         LANdriverInterrupt2,
4717         LANdriverDMAUsage1,
4718         LANdriverDMAUsage2,
4719         LANdriverLogicalName,
4720         LANdriverIOReserved,
4721         LANdriverCardName,
4722 ], "LAN Configuration Information")
4723 LastAccessStruct                = struct("last_access_struct", [
4724         LastAccessedDate,
4725 ])
4726 lockInfo                        = struct("lock_info_struct", [
4727         LogicalLockThreshold,
4728         PhysicalLockThreshold,
4729         FileLockCount,
4730         RecordLockCount,
4731 ], "Lock Information")
4732 LockStruct                      = struct("lock_struct", [
4733         TaskNumByte,
4734         LockType,
4735         RecordStart,
4736         RecordEnd,
4737 ], "Locks")
4738 LoginTime                       = struct("login_time", [
4739         Year,
4740         Month,
4741         Day,
4742         Hour,
4743         Minute,
4744         Second,
4745         DayOfWeek,
4746 ], "Login Time")
4747 LogLockStruct                   = struct("log_lock_struct", [
4748         TaskNumberWord,
4749         LockStatus,
4750         LockName,
4751 ], "Logical Locks")
4752 LogRecStruct                    = struct("log_rec_struct", [
4753         ConnectionNumberWord,
4754         TaskNumByte,
4755         LockStatus,
4756 ], "Logical Record Locks")
4757 LSLInformation                  = struct("lsl_information", [
4758         uint32("rx_buffers", "Receive Buffers"),
4759         uint32("rx_buffers_75", "Receive Buffers Warning Level"),
4760         uint32("rx_buffers_checked_out", "Receive Buffers Checked Out Count"),
4761         uint32("rx_buffer_size", "Receive Buffer Size"),
4762         uint32("max_phy_packet_size", "Maximum Physical Packet Size"),
4763         uint32("last_time_rx_buff_was_alloc", "Last Time a Receive Buffer was Allocated"),
4764         uint32("max_num_of_protocols", "Maximum Number of Protocols"),
4765         uint32("max_num_of_media_types", "Maximum Number of Media Types"),
4766         uint32("total_tx_packets", "Total Transmit Packets"),
4767         uint32("get_ecb_buf", "Get ECB Buffers"),
4768         uint32("get_ecb_fails", "Get ECB Failures"),
4769         uint32("aes_event_count", "AES Event Count"),
4770         uint32("post_poned_events", "Postponed Events"),
4771         uint32("ecb_cxl_fails", "ECB Cancel Failures"),
4772         uint32("valid_bfrs_reused", "Valid Buffers Reused"),
4773         uint32("enqueued_send_cnt", "Enqueued Send Count"),
4774         uint32("total_rx_packets", "Total Receive Packets"),
4775         uint32("unclaimed_packets", "Unclaimed Packets"),
4776         uint8("stat_table_major_version", "Statistics Table Major Version"),
4777         uint8("stat_table_minor_version", "Statistics Table Minor Version"),
4778 ], "LSL Information")
4779 MaximumSpaceStruct              = struct("max_space_struct", [
4780         MaxSpace,
4781 ])
4782 MemoryCounters                  = struct("memory_counters", [
4783         uint32("orig_num_cache_buff", "Original Number Of Cache Buffers"),
4784         uint32("curr_num_cache_buff", "Current Number Of Cache Buffers"),
4785         uint32("cache_dirty_block_thresh", "Cache Dirty Block Threshold"),
4786         uint32("wait_node", "Wait Node Count"),
4787         uint32("wait_node_alloc_fail", "Wait Node Alloc Failure Count"),
4788         uint32("move_cache_node", "Move Cache Node Count"),
4789         uint32("move_cache_node_from_avai", "Move Cache Node From Avail Count"),
4790         uint32("accel_cache_node_write", "Accelerate Cache Node Write Count"),
4791         uint32("rem_cache_node", "Remove Cache Node Count"),
4792         uint32("rem_cache_node_from_avail", "Remove Cache Node From Avail Count"),
4793 ], "Memory Counters")
4794 MLIDBoardInfo                   = struct("mlid_board_info", [
4795         uint32("protocol_board_num", "Protocol Board Number"),
4796         uint16("protocol_number", "Protocol Number"),
4797         bytes("protocol_id", "Protocol ID", 6),
4798         nstring8("protocol_name", "Protocol Name"),
4799 ], "MLID Board Information")
4800 ModifyInfoStruct                = struct("modify_info_struct", [
4801         ModifiedTime,
4802         ModifiedDate,
4803         endian(ModifierID, LE),
4804         LastAccessedDate,
4805 ], "Modification Information")
4806 nameInfo                        = struct("name_info_struct", [
4807         ObjectType,
4808         nstring8("login_name", "Login Name"),
4809 ], "Name Information")
4810 NCPNetworkAddress               = struct("ncp_network_address_struct", [
4811         TransportType,
4812         Reserved3,
4813         NetAddress,
4814 ], "Network Address")
4815
4816 netAddr                         = struct("net_addr_struct", [
4817         TransportType,
4818         nbytes32("transport_addr", "Transport Address"),
4819 ], "Network Address")
4820
4821 NetWareInformationStruct        = struct("netware_information_struct", [
4822         DataStreamSpaceAlloc,           # (Data Stream Alloc Bit)
4823         AttributesDef32,                # (Attributes Bit)
4824         FlagsDef,
4825         DataStreamSize,                 # (Data Stream Size Bit)
4826         TotalDataStreamDiskSpaceAlloc,  # (Total Stream Size Bit)
4827         NumberOfDataStreams,
4828         CreationTime,                   # (Creation Bit)
4829         CreationDate,
4830         CreatorID,
4831         ModifiedTime,                   # (Modify Bit)
4832         ModifiedDate,
4833         ModifierID,
4834         LastAccessedDate,
4835         ArchivedTime,                   # (Archive Bit)
4836         ArchivedDate,
4837         ArchiverID,
4838         InheritedRightsMask,            # (Rights Bit)
4839         DirectoryEntryNumber,           # (Directory Entry Bit)
4840         DOSDirectoryEntryNumber,
4841         VolumeNumberLong,
4842         EADataSize,                     # (Extended Attribute Bit)
4843         EACount,
4844         EAKeySize,
4845         CreatorNameSpaceNumber,         # (Name Space Bit)
4846         Reserved3,
4847 ], "NetWare Information")
4848 NLMInformation                  = struct("nlm_information", [
4849         IdentificationNumber,
4850         NLMFlags,
4851         Reserved3,
4852         NLMType,
4853         Reserved3,
4854         ParentID,
4855         MajorVersion,
4856         MinorVersion,
4857         Revision,
4858         Year,
4859         Reserved3,
4860         Month,
4861         Reserved3,
4862         Day,
4863         Reserved3,
4864         AllocAvailByte,
4865         AllocFreeCount,
4866         LastGarbCollect,
4867         MessageLanguage,
4868         NumberOfReferencedPublics,
4869 ], "NLM Information")
4870 NSInfoStruct                    = struct("ns_info_struct", [
4871         CreatorNameSpaceNumber,
4872     Reserved3,
4873 ])
4874 NWAuditStatus                   = struct("nw_audit_status", [
4875         AuditVersionDate,
4876         AuditFileVersionDate,
4877         val_string16("audit_enable_flag", "Auditing Enabled Flag", [
4878                 [ 0x0000, "Auditing Disabled" ],
4879                 [ 0x0001, "Auditing Enabled" ],
4880         ]),
4881         Reserved2,
4882         uint32("audit_file_size", "Audit File Size"),
4883         uint32("modified_counter", "Modified Counter"),
4884         uint32("audit_file_max_size", "Audit File Maximum Size"),
4885         uint32("audit_file_size_threshold", "Audit File Size Threshold"),
4886         uint32("audit_record_count", "Audit Record Count"),
4887         uint32("auditing_flags", "Auditing Flags"),
4888 ], "NetWare Audit Status")
4889 ObjectSecurityStruct            = struct("object_security_struct", [
4890         ObjectSecurity,
4891 ])
4892 ObjectFlagsStruct               = struct("object_flags_struct", [
4893         ObjectFlags,
4894 ])
4895 ObjectTypeStruct                = struct("object_type_struct", [
4896         endian(ObjectType, BE),
4897         Reserved2,
4898 ])
4899 ObjectNameStruct                = struct("object_name_struct", [
4900         ObjectNameStringz,
4901 ])
4902 ObjectIDStruct                  = struct("object_id_struct", [
4903         ObjectID,
4904         Restriction,
4905 ])
4906 OpnFilesStruct                  = struct("opn_files_struct", [
4907         TaskNumberWord,
4908         LockType,
4909         AccessControl,
4910         LockFlag,
4911         VolumeNumber,
4912         DOSParentDirectoryEntry,
4913         DOSDirectoryEntry,
4914         ForkCount,
4915         NameSpace,
4916         FileName,
4917 ], "Open Files Information")
4918 OwnerIDStruct                   = struct("owner_id_struct", [
4919         CreatorID,
4920 ])
4921 PacketBurstInformation          = struct("packet_burst_information", [
4922         uint32("big_invalid_slot", "Big Invalid Slot Count"),
4923         uint32("big_forged_packet", "Big Forged Packet Count"),
4924         uint32("big_invalid_packet", "Big Invalid Packet Count"),
4925         uint32("big_still_transmitting", "Big Still Transmitting Count"),
4926         uint32("still_doing_the_last_req", "Still Doing The Last Request Count"),
4927         uint32("invalid_control_req", "Invalid Control Request Count"),
4928         uint32("control_invalid_message_number", "Control Invalid Message Number Count"),
4929         uint32("control_being_torn_down", "Control Being Torn Down Count"),
4930         uint32("big_repeat_the_file_read", "Big Repeat the File Read Count"),
4931         uint32("big_send_extra_cc_count", "Big Send Extra CC Count"),
4932         uint32("big_return_abort_mess", "Big Return Abort Message Count"),
4933         uint32("big_read_invalid_mess", "Big Read Invalid Message Number Count"),
4934         uint32("big_read_do_it_over", "Big Read Do It Over Count"),
4935         uint32("big_read_being_torn_down", "Big Read Being Torn Down Count"),
4936         uint32("previous_control_packet", "Previous Control Packet Count"),
4937         uint32("send_hold_off_message", "Send Hold Off Message Count"),
4938         uint32("big_read_no_data_avail", "Big Read No Data Available Count"),
4939         uint32("big_read_trying_to_read", "Big Read Trying To Read Too Much Count"),
4940         uint32("async_read_error", "Async Read Error Count"),
4941         uint32("big_read_phy_read_err", "Big Read Physical Read Error Count"),
4942         uint32("ctl_bad_ack_frag_list", "Control Bad ACK Fragment List Count"),
4943         uint32("ctl_no_data_read", "Control No Data Read Count"),
4944         uint32("write_dup_req", "Write Duplicate Request Count"),
4945         uint32("shouldnt_be_ack_here", "Shouldn't Be ACKing Here Count"),
4946         uint32("write_incon_packet_len", "Write Inconsistent Packet Lengths Count"),
4947         uint32("first_packet_isnt_a_write", "First Packet Isn't A Write Count"),
4948         uint32("write_trash_dup_req", "Write Trashed Duplicate Request Count"),
4949         uint32("big_write_inv_message_num", "Big Write Invalid Message Number Count"),
4950         uint32("big_write_being_torn_down", "Big Write Being Torn Down Count"),
4951         uint32("big_write_being_abort", "Big Write Being Aborted Count"),
4952         uint32("zero_ack_frag", "Zero ACK Fragment Count"),
4953         uint32("write_curr_trans", "Write Currently Transmitting Count"),
4954         uint32("try_to_write_too_much", "Trying To Write Too Much Count"),
4955         uint32("write_out_of_mem_for_ctl_nodes", "Write Out Of Memory For Control Nodes Count"),
4956         uint32("write_didnt_need_this_frag", "Write Didn't Need This Fragment Count"),
4957         uint32("write_too_many_buf_check", "Write Too Many Buffers Checked Out Count"),
4958         uint32("write_timeout", "Write Time Out Count"),
4959         uint32("write_got_an_ack0", "Write Got An ACK Count 0"),
4960         uint32("write_got_an_ack1", "Write Got An ACK Count 1"),
4961         uint32("poll_abort_conn", "Poller Aborted The Connection Count"),
4962         uint32("may_had_out_of_order", "Maybe Had Out Of Order Writes Count"),
4963         uint32("had_an_out_of_order", "Had An Out Of Order Write Count"),
4964         uint32("moved_the_ack_bit_dn", "Moved The ACK Bit Down Count"),
4965         uint32("bumped_out_of_order", "Bumped Out Of Order Write Count"),
4966         uint32("poll_rem_old_out_of_order", "Poller Removed Old Out Of Order Count"),
4967         uint32("write_didnt_need_but_req_ack", "Write Didn't Need But Requested ACK Count"),
4968         uint32("write_trash_packet", "Write Trashed Packet Count"),
4969         uint32("too_many_ack_frag", "Too Many ACK Fragments Count"),
4970         uint32("saved_an_out_of_order_packet", "Saved An Out Of Order Packet Count"),
4971         uint32("conn_being_aborted", "Connection Being Aborted Count"),
4972 ], "Packet Burst Information")
4973
4974 PadDSSpaceAllocate              = struct("pad_ds_space_alloc", [
4975     Reserved4,
4976 ])
4977 PadAttributes                   = struct("pad_attributes", [
4978     Reserved6,
4979 ])
4980 PadDataStreamSize               = struct("pad_data_stream_size", [
4981     Reserved4,
4982 ])
4983 PadTotalStreamSize              = struct("pad_total_stream_size", [
4984     Reserved6,
4985 ])
4986 PadCreationInfo                 = struct("pad_creation_info", [
4987     Reserved8,
4988 ])
4989 PadModifyInfo                   = struct("pad_modify_info", [
4990     Reserved10,
4991 ])
4992 PadArchiveInfo                  = struct("pad_archive_info", [
4993     Reserved8,
4994 ])
4995 PadRightsInfo                   = struct("pad_rights_info", [
4996     Reserved2,
4997 ])
4998 PadDirEntry                     = struct("pad_dir_entry", [
4999     Reserved12,
5000 ])
5001 PadEAInfo                       = struct("pad_ea_info", [
5002     Reserved12,
5003 ])
5004 PadNSInfo                       = struct("pad_ns_info", [
5005     Reserved4,
5006 ])
5007 PhyLockStruct                   = struct("phy_lock_struct", [
5008         LoggedCount,
5009         ShareableLockCount,
5010         RecordStart,
5011         RecordEnd,
5012         LogicalConnectionNumber,
5013         TaskNumByte,
5014         LockType,
5015 ], "Physical Locks")
5016 printInfo                       = struct("print_info_struct", [
5017         PrintFlags,
5018         TabSize,
5019         Copies,
5020         PrintToFileFlag,
5021         BannerName,
5022         TargetPrinter,
5023         FormType,
5024 ], "Print Information")
5025 ReplyLevel1Struct       = struct("reply_lvl_1_struct", [
5026     DirHandle,
5027     VolumeNumber,
5028     Reserved4,
5029 ], "Reply Level 1")
5030 ReplyLevel2Struct       = struct("reply_lvl_2_struct", [
5031     VolumeNumberLong,
5032     DirectoryBase,
5033     DOSDirectoryBase,
5034     NameSpace,
5035     DirHandle,
5036 ], "Reply Level 2")
5037 RightsInfoStruct                = struct("rights_info_struct", [
5038         InheritedRightsMask,
5039 ])
5040 RoutersInfo                     = struct("routers_info", [
5041         bytes("node", "Node", 6),
5042         ConnectedLAN,
5043         uint16("route_hops", "Hop Count"),
5044         uint16("route_time", "Route Time"),
5045 ], "Router Information")
5046 RTagStructure                   = struct("r_tag_struct", [
5047         RTagNumber,
5048         ResourceSignature,
5049         ResourceCount,
5050         ResourceName,
5051 ], "Resource Tag")
5052 ScanInfoFileName                = struct("scan_info_file_name", [
5053         SalvageableFileEntryNumber,
5054         FileName,
5055 ])
5056 ScanInfoFileNoName              = struct("scan_info_file_no_name", [
5057         SalvageableFileEntryNumber,
5058 ])
5059 SeachSequenceStruct             = struct("search_seq", [
5060         VolumeNumber,
5061         DirectoryEntryNumber,
5062         SequenceNumber,
5063 ], "Search Sequence")
5064 Segments                        = struct("segments", [
5065         uint32("volume_segment_dev_num", "Volume Segment Device Number"),
5066         uint32("volume_segment_offset", "Volume Segment Offset"),
5067         uint32("volume_segment_size", "Volume Segment Size"),
5068 ], "Volume Segment Information")
5069 SemaInfoStruct                  = struct("sema_info_struct", [
5070         LogicalConnectionNumber,
5071         TaskNumByte,
5072 ])
5073 SemaStruct                      = struct("sema_struct", [
5074         OpenCount,
5075         SemaphoreValue,
5076         TaskNumberWord,
5077         SemaphoreName,
5078 ], "Semaphore Information")
5079 ServerInfo                      = struct("server_info", [
5080         uint32("reply_canceled", "Reply Canceled Count"),
5081         uint32("write_held_off", "Write Held Off Count"),
5082         uint32("write_held_off_with_dup", "Write Held Off With Duplicate Request"),
5083         uint32("invalid_req_type", "Invalid Request Type Count"),
5084         uint32("being_aborted", "Being Aborted Count"),
5085         uint32("already_doing_realloc", "Already Doing Re-Allocate Count"),
5086         uint32("dealloc_invalid_slot", "De-Allocate Invalid Slot Count"),
5087         uint32("dealloc_being_proc", "De-Allocate Being Processed Count"),
5088         uint32("dealloc_forged_packet", "De-Allocate Forged Packet Count"),
5089         uint32("dealloc_still_transmit", "De-Allocate Still Transmitting Count"),
5090         uint32("start_station_error", "Start Station Error Count"),
5091         uint32("invalid_slot", "Invalid Slot Count"),
5092         uint32("being_processed", "Being Processed Count"),
5093         uint32("forged_packet", "Forged Packet Count"),
5094         uint32("still_transmitting", "Still Transmitting Count"),
5095         uint32("reexecute_request", "Re-Execute Request Count"),
5096         uint32("invalid_sequence_number", "Invalid Sequence Number Count"),
5097         uint32("dup_is_being_sent", "Duplicate Is Being Sent Already Count"),
5098         uint32("sent_pos_ack", "Sent Positive Acknowledge Count"),
5099         uint32("sent_a_dup_reply", "Sent A Duplicate Reply Count"),
5100         uint32("no_mem_for_station", "No Memory For Station Control Count"),
5101         uint32("no_avail_conns", "No Available Connections Count"),
5102         uint32("realloc_slot", "Re-Allocate Slot Count"),
5103         uint32("realloc_slot_came_too_soon", "Re-Allocate Slot Came Too Soon Count"),
5104 ], "Server Information")
5105 ServersSrcInfo                  = struct("servers_src_info", [
5106         ServerNode,
5107         ConnectedLAN,
5108         HopsToNet,
5109 ], "Source Server Information")
5110 SpaceStruct                     = struct("space_struct", [
5111         Level,
5112         MaxSpace,
5113         CurrentSpace,
5114 ], "Space Information")
5115 SPXInformation                  = struct("spx_information", [
5116         uint16("spx_max_conn", "SPX Max Connections Count"),
5117         uint16("spx_max_used_conn", "SPX Max Used Connections"),
5118         uint16("spx_est_conn_req", "SPX Establish Connection Requests"),
5119         uint16("spx_est_conn_fail", "SPX Establish Connection Fail"),
5120         uint16("spx_listen_con_req", "SPX Listen Connect Request"),
5121         uint16("spx_listen_con_fail", "SPX Listen Connect Fail"),
5122         uint32("spx_send", "SPX Send Count"),
5123         uint32("spx_window_choke", "SPX Window Choke Count"),
5124         uint16("spx_bad_send", "SPX Bad Send Count"),
5125         uint16("spx_send_fail", "SPX Send Fail Count"),
5126         uint16("spx_abort_conn", "SPX Aborted Connection"),
5127         uint32("spx_listen_pkt", "SPX Listen Packet Count"),
5128         uint16("spx_bad_listen", "SPX Bad Listen Count"),
5129         uint32("spx_incoming_pkt", "SPX Incoming Packet Count"),
5130         uint16("spx_bad_in_pkt", "SPX Bad In Packet Count"),
5131         uint16("spx_supp_pkt", "SPX Suppressed Packet Count"),
5132         uint16("spx_no_ses_listen", "SPX No Session Listen ECB Count"),
5133         uint16("spx_watch_dog", "SPX Watch Dog Destination Session Count"),
5134 ], "SPX Information")
5135 StackInfo                       = struct("stack_info", [
5136         StackNumber,
5137         fw_string("stack_short_name", "Stack Short Name", 16),
5138 ], "Stack Information")
5139 statsInfo                       = struct("stats_info_struct", [
5140         TotalBytesRead,
5141         TotalBytesWritten,
5142         TotalRequest,
5143 ], "Statistics")
5144 TaskStruct                       = struct("task_struct", [
5145         TaskNumberWord,
5146         TaskState,
5147 ], "Task Information")
5148 theTimeStruct                   = struct("the_time_struct", [
5149         UTCTimeInSeconds,
5150         FractionalSeconds,
5151         TimesyncStatus,
5152 ])
5153 timeInfo                        = struct("time_info", [
5154         Year,
5155         Month,
5156         Day,
5157         Hour,
5158         Minute,
5159         Second,
5160         DayOfWeek,
5161         uint32("login_expiration_time", "Login Expiration Time"),
5162 ])
5163 TotalStreamSizeStruct           = struct("total_stream_size_struct", [
5164     TtlDSDskSpaceAlloc,
5165         NumberOfDataStreams,
5166 ])
5167 TrendCounters                   = struct("trend_counters", [
5168         uint32("num_of_cache_checks", "Number Of Cache Checks"),
5169         uint32("num_of_cache_hits", "Number Of Cache Hits"),
5170         uint32("num_of_dirty_cache_checks", "Number Of Dirty Cache Checks"),
5171         uint32("num_of_cache_dirty_checks", "Number Of Cache Dirty Checks"),
5172         uint32("cache_used_while_check", "Cache Used While Checking"),
5173         uint32("wait_till_dirty_blcks_dec", "Wait Till Dirty Blocks Decrease Count"),
5174         uint32("alloc_blck_frm_avail", "Allocate Block From Available Count"),
5175         uint32("alloc_blck_frm_lru", "Allocate Block From LRU Count"),
5176         uint32("alloc_blck_already_wait", "Allocate Block Already Waiting"),
5177         uint32("lru_sit_time", "LRU Sitting Time"),
5178         uint32("num_of_cache_check_no_wait", "Number Of Cache Check No Wait"),
5179         uint32("num_of_cache_hits_no_wait", "Number Of Cache Hits No Wait"),
5180 ], "Trend Counters")
5181 TrusteeStruct                   = struct("trustee_struct", [
5182         endian(ObjectID, LE),
5183         AccessRightsMaskWord,
5184 ])
5185 UpdateDateStruct                = struct("update_date_struct", [
5186         UpdateDate,
5187 ])
5188 UpdateIDStruct                  = struct("update_id_struct", [
5189         UpdateID,
5190 ])
5191 UpdateTimeStruct                = struct("update_time_struct", [
5192         UpdateTime,
5193 ])
5194 UserInformation                 = struct("user_info", [
5195         endian(ConnectionNumber, LE),
5196         UseCount,
5197         Reserved2,
5198         ConnectionServiceType,
5199         Year,
5200         Month,
5201         Day,
5202         Hour,
5203         Minute,
5204         Second,
5205         DayOfWeek,
5206         Status,
5207         Reserved2,
5208         ExpirationTime,
5209         ObjectType,
5210         Reserved2,
5211         TransactionTrackingFlag,
5212         LogicalLockThreshold,
5213         FileWriteFlags,
5214         FileWriteState,
5215         Reserved,
5216         FileLockCount,
5217         RecordLockCount,
5218         TotalBytesRead,
5219         TotalBytesWritten,
5220         TotalRequest,
5221         HeldRequests,
5222         HeldBytesRead,
5223         HeldBytesWritten,
5224 ], "User Information")
5225 VolInfoStructure                = struct("vol_info_struct", [
5226         VolumeType,
5227         Reserved2,
5228         StatusFlagBits,
5229         SectorSize,
5230         SectorsPerClusterLong,
5231         VolumeSizeInClusters,
5232         FreedClusters,
5233         SubAllocFreeableClusters,
5234         FreeableLimboSectors,
5235         NonFreeableLimboSectors,
5236         NonFreeableAvailableSubAllocSectors,
5237         NotUsableSubAllocSectors,
5238         SubAllocClusters,
5239         DataStreamsCount,
5240         LimboDataStreamsCount,
5241         OldestDeletedFileAgeInTicks,
5242         CompressedDataStreamsCount,
5243         CompressedLimboDataStreamsCount,
5244         UnCompressableDataStreamsCount,
5245         PreCompressedSectors,
5246         CompressedSectors,
5247         MigratedFiles,
5248         MigratedSectors,
5249         ClustersUsedByFAT,
5250         ClustersUsedByDirectories,
5251         ClustersUsedByExtendedDirectories,
5252         TotalDirectoryEntries,
5253         UnUsedDirectoryEntries,
5254         TotalExtendedDirectoryExtents,
5255         UnUsedExtendedDirectoryExtents,
5256         ExtendedAttributesDefined,
5257         ExtendedAttributeExtentsUsed,
5258         DirectoryServicesObjectID,
5259         VolumeLastModifiedTime,
5260         VolumeLastModifiedDate,
5261 ], "Volume Information")
5262 VolInfo2Struct                  = struct("vol_info_struct_2", [
5263         uint32("volume_active_count", "Volume Active Count"),
5264         uint32("volume_use_count", "Volume Use Count"),
5265         uint32("mac_root_ids", "MAC Root IDs"),
5266         VolumeLastModifiedTime,
5267         VolumeLastModifiedDate,
5268         uint32("volume_reference_count", "Volume Reference Count"),
5269         uint32("compression_lower_limit", "Compression Lower Limit"),
5270         uint32("outstanding_ios", "Outstanding IOs"),
5271         uint32("outstanding_compression_ios", "Outstanding Compression IOs"),
5272         uint32("compression_ios_limit", "Compression IOs Limit"),
5273 ], "Extended Volume Information")
5274 VolumeWithNameStruct                    = struct("volume_with_name_struct", [
5275         VolumeNumberLong,
5276         VolumeNameLen,
5277 ])
5278 VolumeStruct                    = struct("volume_struct", [
5279         VolumeNumberLong,
5280 ])
5281 DataStreamsStruct               = struct("number_of_data_streams_struct", [
5282     NumberOfDataStreamsLong,
5283 ])
5284
5285 ##############################################################################
5286 # NCP Groups
5287 ##############################################################################
5288 def define_groups():
5289         groups['accounting']    = "Accounting"
5290         groups['afp']           = "AFP"
5291         groups['auditing']      = "Auditing"
5292         groups['bindery']       = "Bindery"
5293         groups['connection']    = "Connection"
5294         groups['enhanced']      = "Enhanced File System"
5295         groups['extended']      = "Extended Attribute"
5296         groups['extension']     = "NCP Extension"
5297         groups['file']          = "File System"
5298         groups['fileserver']    = "File Server Environment"
5299         groups['message']       = "Message"
5300         groups['migration']     = "Data Migration"
5301         groups['nds']           = "Novell Directory Services"
5302         groups['pburst']        = "Packet Burst"
5303         groups['print']         = "Print"
5304         groups['remote']        = "Remote"
5305         groups['sync']          = "Synchronization"
5306         groups['tsync']         = "Time Synchronization"
5307         groups['tts']           = "Transaction Tracking"
5308         groups['qms']           = "Queue Management System (QMS)"
5309         groups['stats']         = "Server Statistics"
5310         groups['nmas']          = "Novell Modular Authentication Service"
5311         groups['sss']           = "SecretStore Services"
5312
5313 ##############################################################################
5314 # NCP Errors
5315 ##############################################################################
5316 def define_errors():
5317         errors[0x0000] = "Ok"
5318         errors[0x0001] = "Transaction tracking is available"
5319         errors[0x0002] = "Ok. The data has been written"
5320         errors[0x0003] = "Calling Station is a Manager"
5321
5322         errors[0x0100] = "One or more of the Connection Numbers in the send list are invalid"
5323         errors[0x0101] = "Invalid space limit"
5324         errors[0x0102] = "Insufficient disk space"
5325         errors[0x0103] = "Queue server cannot add jobs"
5326         errors[0x0104] = "Out of disk space"
5327         errors[0x0105] = "Semaphore overflow"
5328         errors[0x0106] = "Invalid Parameter"
5329         errors[0x0107] = "Invalid Number of Minutes to Delay"
5330         errors[0x0108] = "Invalid Start or Network Number"
5331         errors[0x0109] = "Cannot Obtain License"
5332         errors[0x010a] = "No Purgeable Files Available"
5333
5334         errors[0x0200] = "One or more clients in the send list are not logged in"
5335         errors[0x0201] = "Queue server cannot attach"
5336
5337         errors[0x0300] = "One or more clients in the send list are not accepting messages"
5338
5339         errors[0x0400] = "Client already has message"
5340         errors[0x0401] = "Queue server cannot service job"
5341
5342         errors[0x7300] = "Revoke Handle Rights Not Found"
5343         errors[0x7700] = "Buffer Too Small"
5344         errors[0x7900] = "Invalid Parameter in Request Packet"
5345         errors[0x7901] = "Nothing being Compressed"
5346         errors[0x7a00] = "Connection Already Temporary"
5347         errors[0x7b00] = "Connection Already Logged in"
5348         errors[0x7c00] = "Connection Not Authenticated"
5349         errors[0x7d00] = "Connection Not Logged In"
5350
5351         errors[0x7e00] = "NCP failed boundary check"
5352         errors[0x7e01] = "Invalid Length"
5353
5354         errors[0x7f00] = "Lock Waiting"
5355         errors[0x8000] = "Lock fail"
5356         errors[0x8001] = "File in Use"
5357
5358         errors[0x8100] = "A file handle could not be allocated by the file server"
5359         errors[0x8101] = "Out of File Handles"
5360
5361         errors[0x8200] = "Unauthorized to open the file"
5362         errors[0x8300] = "Unable to read/write the volume. Possible bad sector on the file server"
5363         errors[0x8301] = "Hard I/O Error"
5364
5365         errors[0x8400] = "Unauthorized to create the directory"
5366         errors[0x8401] = "Unauthorized to create the file"
5367
5368         errors[0x8500] = "Unauthorized to delete the specified file"
5369         errors[0x8501] = "Unauthorized to overwrite an existing file in this directory"
5370
5371         errors[0x8700] = "An unexpected character was encountered in the filename"
5372         errors[0x8701] = "Create Filename Error"
5373
5374         errors[0x8800] = "Invalid file handle"
5375         errors[0x8900] = "Unauthorized to search this file/directory"
5376         errors[0x8a00] = "Unauthorized to delete this file/directory"
5377         errors[0x8b00] = "Unauthorized to rename a file in this directory"
5378
5379         errors[0x8c00] = "No set privileges"
5380         errors[0x8c01] = "Unauthorized to modify a file in this directory"
5381         errors[0x8c02] = "Unauthorized to change the restriction on this volume"
5382
5383         errors[0x8d00] = "Some of the affected files are in use by another client"
5384         errors[0x8d01] = "The affected file is in use"
5385
5386         errors[0x8e00] = "All of the affected files are in use by another client"
5387         errors[0x8f00] = "Some of the affected files are read-only"
5388
5389         errors[0x9000] = "An attempt to modify a read-only volume occurred"
5390         errors[0x9001] = "All of the affected files are read-only"
5391         errors[0x9002] = "Read Only Access to Volume"
5392
5393         errors[0x9100] = "Some of the affected files already exist"
5394         errors[0x9101] = "Some Names Exist"
5395
5396         errors[0x9200] = "Directory with the new name already exists"
5397         errors[0x9201] = "All of the affected files already exist"
5398
5399         errors[0x9300] = "Unauthorized to read from this file"
5400         errors[0x9400] = "Unauthorized to write to this file"
5401         errors[0x9500] = "The affected file is detached"
5402
5403         errors[0x9600] = "The file server has run out of memory to service this request"
5404         errors[0x9601] = "No alloc space for message"
5405         errors[0x9602] = "Server Out of Space"
5406
5407         errors[0x9800] = "The affected volume is not mounted"
5408         errors[0x9801] = "The volume associated with Volume Number is not mounted"
5409         errors[0x9802] = "The resulting volume does not exist"
5410         errors[0x9803] = "The destination volume is not mounted"
5411         errors[0x9804] = "Disk Map Error"
5412
5413         errors[0x9900] = "The file server has run out of directory space on the affected volume"
5414         errors[0x9a00] = "Invalid request to rename the affected file to another volume"
5415
5416         errors[0x9b00] = "DirHandle is not associated with a valid directory path"
5417         errors[0x9b01] = "A resulting directory handle is not associated with a valid directory path"
5418         errors[0x9b02] = "The directory associated with DirHandle does not exist"
5419         errors[0x9b03] = "Bad directory handle"
5420
5421         errors[0x9c00] = "The resulting path is not valid"
5422         errors[0x9c01] = "The resulting file path is not valid"
5423         errors[0x9c02] = "The resulting directory path is not valid"
5424         errors[0x9c03] = "Invalid path"
5425         errors[0x9c04] = "No more trustees found, based on requested search sequence number"
5426
5427         errors[0x9d00] = "A directory handle was not available for allocation"
5428
5429         errors[0x9e00] = "The name of the directory does not conform to a legal name for this name space"
5430         errors[0x9e01] = "The new directory name does not conform to a legal name for this name space"
5431         errors[0x9e02] = "Bad File Name"
5432
5433         errors[0x9f00] = "The request attempted to delete a directory that is in use by another client"
5434
5435         errors[0xa000] = "The request attempted to delete a directory that is not empty"
5436         errors[0xa100] = "An unrecoverable error occurred on the affected directory"
5437
5438         errors[0xa200] = "The request attempted to read from a file region that is physically locked"
5439         errors[0xa201] = "I/O Lock Error"
5440
5441         errors[0xa400] = "Invalid directory rename attempted"
5442         errors[0xa500] = "Invalid open create mode"
5443         errors[0xa600] = "Auditor Access has been Removed"
5444         errors[0xa700] = "Error Auditing Version"
5445
5446         errors[0xa800] = "Invalid Support Module ID"
5447         errors[0xa801] = "No Auditing Access Rights"
5448         errors[0xa802] = "No Access Rights"
5449
5450         errors[0xa900] = "Error Link in Path"
5451         errors[0xa901] = "Invalid Path With Junction Present"
5452
5453         errors[0xaa00] = "Invalid Data Type Flag"
5454
5455         errors[0xac00] = "Packet Signature Required"
5456
5457         errors[0xbe00] = "Invalid Data Stream"
5458         errors[0xbf00] = "Requests for this name space are not valid on this volume"
5459
5460         errors[0xc000] = "Unauthorized to retrieve accounting data"
5461
5462         errors[0xc100] = "The ACCOUNT_BALANCE property does not exist"
5463         errors[0xc101] = "No Account Balance"
5464
5465         errors[0xc200] = "The object has exceeded its credit limit"
5466         errors[0xc300] = "Too many holds have been placed against this account"
5467         errors[0xc400] = "The client account has been disabled"
5468
5469         errors[0xc500] = "Access to the account has been denied because of intruder detection"
5470         errors[0xc501] = "Login lockout"
5471         errors[0xc502] = "Server Login Locked"
5472
5473         errors[0xc600] = "The caller does not have operator privileges"
5474         errors[0xc601] = "The client does not have operator privileges"
5475
5476         errors[0xc800] = "Missing EA Key"
5477         errors[0xc900] = "EA Not Found"
5478         errors[0xca00] = "Invalid EA Handle Type"
5479         errors[0xcb00] = "EA No Key No Data"
5480         errors[0xcc00] = "EA Number Mismatch"
5481         errors[0xcd00] = "Extent Number Out of Range"
5482         errors[0xce00] = "EA Bad Directory Number"
5483         errors[0xcf00] = "Invalid EA Handle"
5484
5485         errors[0xd000] = "Queue error"
5486         errors[0xd001] = "EA Position Out of Range"
5487
5488         errors[0xd100] = "The queue does not exist"
5489         errors[0xd101] = "EA Access Denied"
5490
5491         errors[0xd200] = "A queue server is not associated with this queue"
5492         errors[0xd201] = "A queue server is not associated with the selected queue"
5493         errors[0xd202] = "No queue server"
5494         errors[0xd203] = "Data Page Odd Size"
5495
5496         errors[0xd300] = "No queue rights"
5497         errors[0xd301] = "EA Volume Not Mounted"
5498
5499         errors[0xd400] = "The queue is full and cannot accept another request"
5500         errors[0xd401] = "The queue associated with ObjectId is full and cannot accept another request"
5501         errors[0xd402] = "Bad Page Boundary"
5502
5503         errors[0xd500] = "A job does not exist in this queue"
5504         errors[0xd501] = "No queue job"
5505         errors[0xd502] = "The job associated with JobNumber does not exist in this queue"
5506         errors[0xd503] = "Inspect Failure"
5507         errors[0xd504] = "Unknown NCP Extension Number"
5508
5509         errors[0xd600] = "The file server does not allow unencrypted passwords"
5510         errors[0xd601] = "No job right"
5511         errors[0xd602] = "EA Already Claimed"
5512
5513         errors[0xd700] = "Bad account"
5514         errors[0xd701] = "The old and new password strings are identical"
5515         errors[0xd702] = "The job is currently being serviced"
5516         errors[0xd703] = "The queue is currently servicing a job"
5517         errors[0xd704] = "Queue servicing"
5518         errors[0xd705] = "Odd Buffer Size"
5519
5520         errors[0xd800] = "Queue not active"
5521         errors[0xd801] = "No Scorecards"
5522
5523         errors[0xd900] = "The file server cannot accept another connection as it has reached its limit"
5524         errors[0xd901] = "The client is not security equivalent to one of the objects in the Q_SERVERS group property of the target queue"
5525         errors[0xd902] = "Queue Station is not a server"
5526         errors[0xd903] = "Bad EDS Signature"
5527         errors[0xd904] = "Attempt to log in using an account which has limits on the number of concurrent connections and that number has been reached."
5528
5529         errors[0xda00] = "Attempted to login to the file server during a restricted time period"
5530         errors[0xda01] = "Queue halted"
5531         errors[0xda02] = "EA Space Limit"
5532
5533         errors[0xdb00] = "Attempted to login to the file server from an unauthorized workstation or network"
5534         errors[0xdb01] = "The queue cannot attach another queue server"
5535         errors[0xdb02] = "Maximum queue servers"
5536         errors[0xdb03] = "EA Key Corrupt"
5537
5538         errors[0xdc00] = "Account Expired"
5539         errors[0xdc01] = "EA Key Limit"
5540
5541         errors[0xdd00] = "Tally Corrupt"
5542         errors[0xde00] = "Attempted to login to the file server with an incorrect password"
5543         errors[0xdf00] = "Attempted to login to the file server with a password that has expired"
5544
5545         errors[0xe000] = "No Login Connections Available"
5546         errors[0xe700] = "No disk track"
5547         errors[0xe800] = "Write to group"
5548         errors[0xe900] = "The object is already a member of the group property"
5549
5550         errors[0xea00] = "No such member"
5551         errors[0xea01] = "The bindery object is not a member of the set"
5552         errors[0xea02] = "Non-existent member"
5553
5554         errors[0xeb00] = "The property is not a set property"
5555
5556         errors[0xec00] = "No such set"
5557         errors[0xec01] = "The set property does not exist"
5558
5559         errors[0xed00] = "Property exists"
5560         errors[0xed01] = "The property already exists"
5561         errors[0xed02] = "An attempt was made to create a bindery object property that already exists"
5562
5563         errors[0xee00] = "The object already exists"
5564         errors[0xee01] = "The bindery object already exists"
5565
5566         errors[0xef00] = "Illegal name"
5567         errors[0xef01] = "Illegal characters in ObjectName field"
5568         errors[0xef02] = "Invalid name"
5569
5570         errors[0xf000] = "A wildcard was detected in a field that does not support wildcards"
5571         errors[0xf001] = "An illegal wildcard was detected in ObjectName"
5572
5573         errors[0xf100] = "The client does not have the rights to access this bindery object"
5574         errors[0xf101] = "Bindery security"
5575         errors[0xf102] = "Invalid bindery security"
5576
5577         errors[0xf200] = "Unauthorized to read from this object"
5578         errors[0xf300] = "Unauthorized to rename this object"
5579
5580         errors[0xf400] = "Unauthorized to delete this object"
5581         errors[0xf401] = "No object delete privileges"
5582         errors[0xf402] = "Unauthorized to delete this queue"
5583
5584         errors[0xf500] = "Unauthorized to create this object"
5585         errors[0xf501] = "No object create"
5586
5587         errors[0xf600] = "No property delete"
5588         errors[0xf601] = "Unauthorized to delete the property of this object"
5589         errors[0xf602] = "Unauthorized to delete this property"
5590
5591         errors[0xf700] = "Unauthorized to create this property"
5592         errors[0xf701] = "No property create privilege"
5593
5594         errors[0xf800] = "Unauthorized to write to this property"
5595         errors[0xf900] = "Unauthorized to read this property"
5596         errors[0xfa00] = "Temporary remap error"
5597
5598         errors[0xfb00] = "No such property"
5599         errors[0xfb01] = "The file server does not support this request"
5600         errors[0xfb02] = "The specified property does not exist"
5601         errors[0xfb03] = "The PASSWORD property does not exist for this bindery object"
5602         errors[0xfb04] = "NDS NCP not available"
5603         errors[0xfb05] = "Bad Directory Handle"
5604         errors[0xfb06] = "Unknown Request"
5605         errors[0xfb07] = "Invalid Subfunction Request"
5606         errors[0xfb08] = "Attempt to use an invalid parameter (drive number, path, or flag value) during a set drive path call"
5607         errors[0xfb09] = "NMAS not running on this server, NCP NOT Supported"
5608         errors[0xfb0a] = "Station Not Logged In"
5609         errors[0xfb0b] = "Secret Store not running on this server, NCP Not supported"
5610
5611         errors[0xfc00] = "The message queue cannot accept another message"
5612         errors[0xfc01] = "The trustee associated with ObjectId does not exist"
5613         errors[0xfc02] = "The specified bindery object does not exist"
5614         errors[0xfc03] = "The bindery object associated with ObjectID does not exist"
5615         errors[0xfc04] = "A bindery object does not exist that matches"
5616         errors[0xfc05] = "The specified queue does not exist"
5617         errors[0xfc06] = "No such object"
5618         errors[0xfc07] = "The queue associated with ObjectID does not exist"
5619
5620         errors[0xfd00] = "Bad station number"
5621         errors[0xfd01] = "The connection associated with ConnectionNumber is not active"
5622         errors[0xfd02] = "Lock collision"
5623         errors[0xfd03] = "Transaction tracking is disabled"
5624
5625         errors[0xfe00] = "I/O failure"
5626         errors[0xfe01] = "The files containing the bindery on the file server are locked"
5627         errors[0xfe02] = "A file with the specified name already exists in this directory"
5628         errors[0xfe03] = "No more restrictions were found"
5629         errors[0xfe04] = "The file server was unable to lock the file within the specified time limit"
5630         errors[0xfe05] = "The file server was unable to lock all files within the specified time limit"
5631         errors[0xfe06] = "The bindery object associated with ObjectID is not a valid trustee"
5632         errors[0xfe07] = "Directory locked"
5633         errors[0xfe08] = "Bindery locked"
5634         errors[0xfe09] = "Invalid semaphore name length"
5635         errors[0xfe0a] = "The file server was unable to complete the operation within the specified time limit"
5636         errors[0xfe0b] = "Transaction restart"
5637         errors[0xfe0c] = "Bad packet"
5638         errors[0xfe0d] = "Timeout"
5639         errors[0xfe0e] = "User Not Found"
5640         errors[0xfe0f] = "Trustee Not Found"
5641
5642         errors[0xff00] = "Failure"
5643         errors[0xff01] = "Lock error"
5644         errors[0xff02] = "File not found"
5645         errors[0xff03] = "The file not found or cannot be unlocked"
5646         errors[0xff04] = "Record not found"
5647         errors[0xff05] = "The logical record was not found"
5648         errors[0xff06] = "The printer associated with Printer Number does not exist"
5649         errors[0xff07] = "No such printer"
5650         errors[0xff08] = "Unable to complete the request"
5651         errors[0xff09] = "Unauthorized to change privileges of this trustee"
5652         errors[0xff0a] = "No files matching the search criteria were found"
5653         errors[0xff0b] = "A file matching the search criteria was not found"
5654         errors[0xff0c] = "Verification failed"
5655         errors[0xff0d] = "Object associated with ObjectID is not a manager"
5656         errors[0xff0e] = "Invalid initial semaphore value"
5657         errors[0xff0f] = "The semaphore handle is not valid"
5658         errors[0xff10] = "SemaphoreHandle is not associated with a valid sempahore"
5659         errors[0xff11] = "Invalid semaphore handle"
5660         errors[0xff12] = "Transaction tracking is not available"
5661         errors[0xff13] = "The transaction has not yet been written to disk"
5662         errors[0xff14] = "Directory already exists"
5663         errors[0xff15] = "The file already exists and the deletion flag was not set"
5664         errors[0xff16] = "No matching files or directories were found"
5665         errors[0xff17] = "A file or directory matching the search criteria was not found"
5666         errors[0xff18] = "The file already exists"
5667         errors[0xff19] = "Failure, No files found"
5668         errors[0xff1a] = "Unlock Error"
5669         errors[0xff1b] = "I/O Bound Error"
5670         errors[0xff1c] = "Not Accepting Messages"
5671         errors[0xff1d] = "No More Salvageable Files in Directory"
5672         errors[0xff1e] = "Calling Station is Not a Manager"
5673         errors[0xff1f] = "Bindery Failure"
5674         errors[0xff20] = "NCP Extension Not Found"
5675         errors[0xff21] = "Audit Property Not Found"
5676         errors[0xff22] = "Server Set Parameter Not Found"
5677
5678 ##############################################################################
5679 # Produce C code
5680 ##############################################################################
5681 def ExamineVars(vars, structs_hash, vars_hash):
5682         for var in vars:
5683                 if isinstance(var, struct):
5684                         structs_hash[var.HFName()] = var
5685                         struct_vars = var.Variables()
5686                         ExamineVars(struct_vars, structs_hash, vars_hash)
5687                 else:
5688                         vars_hash[repr(var)] = var
5689                         if isinstance(var, bitfield):
5690                                 sub_vars = var.SubVariables()
5691                                 ExamineVars(sub_vars, structs_hash, vars_hash)
5692
5693 def produce_code():
5694
5695         global errors
5696
5697         print "/*"
5698         print " * Generated automatically from %s" % (sys.argv[0])
5699         print " * Do not edit this file manually, as all changes will be lost."
5700         print " */\n"
5701
5702         print """
5703 /*
5704  * Portions Copyright (c) Gilbert Ramirez 2000-2002
5705  * Portions Copyright (c) Novell, Inc. 2000-2005
5706  *
5707  * This program is free software; you can redistribute it and/or
5708  * modify it under the terms of the GNU General Public License
5709  * as published by the Free Software Foundation; either version 2
5710  * of the License, or (at your option) any later version.
5711  *
5712  * This program is distributed in the hope that it will be useful,
5713  * but WITHOUT ANY WARRANTY; without even the implied warranty of
5714  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5715  * GNU General Public License for more details.
5716  *
5717  * You should have received a copy of the GNU General Public License
5718  * along with this program; if not, write to the Free Software
5719  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
5720  */
5721
5722 #ifdef HAVE_CONFIG_H
5723 # include "config.h"
5724 #endif
5725
5726 #include <string.h>
5727 #include <glib.h>
5728 #include <epan/packet.h>
5729 #include <epan/conversation.h>
5730 #include <epan/ptvcursor.h>
5731 #include <epan/emem.h>
5732 #include <epan/strutil.h>
5733 #include <epan/reassemble.h>
5734 #include <epan/tap.h>
5735 #include "packet-ncp-int.h"
5736 #include "packet-ncp-nmas.h"
5737 #include "packet-ncp-sss.h"
5738
5739 /* Function declarations for functions used in proto_register_ncp2222() */
5740 static void ncp_init_protocol(void);
5741 static void ncp_postseq_cleanup(void);
5742
5743 /* Endianness macros */
5744 #define BE              0
5745 #define LE              1
5746 #define NO_ENDIANNESS   0
5747
5748 #define NO_LENGTH       -1
5749
5750 /* We use this int-pointer as a special flag in ptvc_record's */
5751 static int ptvc_struct_int_storage;
5752 #define PTVC_STRUCT     (&ptvc_struct_int_storage)
5753
5754 /* Values used in the count-variable ("var"/"repeat") logic. */"""
5755
5756
5757         if global_highest_var > -1:
5758                 print "#define NUM_REPEAT_VARS\t%d" % (global_highest_var + 1)
5759                 print "static guint repeat_vars[NUM_REPEAT_VARS];"
5760         else:
5761                 print "#define NUM_REPEAT_VARS\t0"
5762                 print "static guint *repeat_vars = NULL;"
5763
5764         print """
5765 #define NO_VAR          NUM_REPEAT_VARS
5766 #define NO_REPEAT       NUM_REPEAT_VARS
5767
5768 #define REQ_COND_SIZE_CONSTANT  0
5769 #define REQ_COND_SIZE_VARIABLE  1
5770 #define NO_REQ_COND_SIZE        0
5771
5772
5773 #define NTREE   0x00020000
5774 #define NDEPTH  0x00000002
5775 #define NREV    0x00000004
5776 #define NFLAGS  0x00000008
5777
5778 static int hf_ncp_func = -1;
5779 static int hf_ncp_length = -1;
5780 static int hf_ncp_subfunc = -1;
5781 static int hf_ncp_group = -1;
5782 static int hf_ncp_fragment_handle = -1;
5783 static int hf_ncp_completion_code = -1;
5784 static int hf_ncp_connection_status = -1;
5785 static int hf_ncp_req_frame_num = -1;
5786 static int hf_ncp_req_frame_time = -1;
5787 static int hf_ncp_fragment_size = -1;
5788 static int hf_ncp_message_size = -1;
5789 static int hf_ncp_nds_flag = -1;
5790 static int hf_ncp_nds_verb = -1;
5791 static int hf_ping_version = -1;
5792 static int hf_nds_version = -1;
5793 static int hf_nds_flags = -1;
5794 static int hf_nds_reply_depth = -1;
5795 static int hf_nds_reply_rev = -1;
5796 static int hf_nds_reply_flags = -1;
5797 static int hf_nds_p1type = -1;
5798 static int hf_nds_uint32value = -1;
5799 static int hf_nds_bit1 = -1;
5800 static int hf_nds_bit2 = -1;
5801 static int hf_nds_bit3 = -1;
5802 static int hf_nds_bit4 = -1;
5803 static int hf_nds_bit5 = -1;
5804 static int hf_nds_bit6 = -1;
5805 static int hf_nds_bit7 = -1;
5806 static int hf_nds_bit8 = -1;
5807 static int hf_nds_bit9 = -1;
5808 static int hf_nds_bit10 = -1;
5809 static int hf_nds_bit11 = -1;
5810 static int hf_nds_bit12 = -1;
5811 static int hf_nds_bit13 = -1;
5812 static int hf_nds_bit14 = -1;
5813 static int hf_nds_bit15 = -1;
5814 static int hf_nds_bit16 = -1;
5815 static int hf_bit1outflags = -1;
5816 static int hf_bit2outflags = -1;
5817 static int hf_bit3outflags = -1;
5818 static int hf_bit4outflags = -1;
5819 static int hf_bit5outflags = -1;
5820 static int hf_bit6outflags = -1;
5821 static int hf_bit7outflags = -1;
5822 static int hf_bit8outflags = -1;
5823 static int hf_bit9outflags = -1;
5824 static int hf_bit10outflags = -1;
5825 static int hf_bit11outflags = -1;
5826 static int hf_bit12outflags = -1;
5827 static int hf_bit13outflags = -1;
5828 static int hf_bit14outflags = -1;
5829 static int hf_bit15outflags = -1;
5830 static int hf_bit16outflags = -1;
5831 static int hf_bit1nflags = -1;
5832 static int hf_bit2nflags = -1;
5833 static int hf_bit3nflags = -1;
5834 static int hf_bit4nflags = -1;
5835 static int hf_bit5nflags = -1;
5836 static int hf_bit6nflags = -1;
5837 static int hf_bit7nflags = -1;
5838 static int hf_bit8nflags = -1;
5839 static int hf_bit9nflags = -1;
5840 static int hf_bit10nflags = -1;
5841 static int hf_bit11nflags = -1;
5842 static int hf_bit12nflags = -1;
5843 static int hf_bit13nflags = -1;
5844 static int hf_bit14nflags = -1;
5845 static int hf_bit15nflags = -1;
5846 static int hf_bit16nflags = -1;
5847 static int hf_bit1rflags = -1;
5848 static int hf_bit2rflags = -1;
5849 static int hf_bit3rflags = -1;
5850 static int hf_bit4rflags = -1;
5851 static int hf_bit5rflags = -1;
5852 static int hf_bit6rflags = -1;
5853 static int hf_bit7rflags = -1;
5854 static int hf_bit8rflags = -1;
5855 static int hf_bit9rflags = -1;
5856 static int hf_bit10rflags = -1;
5857 static int hf_bit11rflags = -1;
5858 static int hf_bit12rflags = -1;
5859 static int hf_bit13rflags = -1;
5860 static int hf_bit14rflags = -1;
5861 static int hf_bit15rflags = -1;
5862 static int hf_bit16rflags = -1;
5863 static int hf_bit1cflags = -1;
5864 static int hf_bit2cflags = -1;
5865 static int hf_bit3cflags = -1;
5866 static int hf_bit4cflags = -1;
5867 static int hf_bit5cflags = -1;
5868 static int hf_bit6cflags = -1;
5869 static int hf_bit7cflags = -1;
5870 static int hf_bit8cflags = -1;
5871 static int hf_bit9cflags = -1;
5872 static int hf_bit10cflags = -1;
5873 static int hf_bit11cflags = -1;
5874 static int hf_bit12cflags = -1;
5875 static int hf_bit13cflags = -1;
5876 static int hf_bit14cflags = -1;
5877 static int hf_bit15cflags = -1;
5878 static int hf_bit16cflags = -1;
5879 static int hf_bit1acflags = -1;
5880 static int hf_bit2acflags = -1;
5881 static int hf_bit3acflags = -1;
5882 static int hf_bit4acflags = -1;
5883 static int hf_bit5acflags = -1;
5884 static int hf_bit6acflags = -1;
5885 static int hf_bit7acflags = -1;
5886 static int hf_bit8acflags = -1;
5887 static int hf_bit9acflags = -1;
5888 static int hf_bit10acflags = -1;
5889 static int hf_bit11acflags = -1;
5890 static int hf_bit12acflags = -1;
5891 static int hf_bit13acflags = -1;
5892 static int hf_bit14acflags = -1;
5893 static int hf_bit15acflags = -1;
5894 static int hf_bit16acflags = -1;
5895 static int hf_bit1vflags = -1;
5896 static int hf_bit2vflags = -1;
5897 static int hf_bit3vflags = -1;
5898 static int hf_bit4vflags = -1;
5899 static int hf_bit5vflags = -1;
5900 static int hf_bit6vflags = -1;
5901 static int hf_bit7vflags = -1;
5902 static int hf_bit8vflags = -1;
5903 static int hf_bit9vflags = -1;
5904 static int hf_bit10vflags = -1;
5905 static int hf_bit11vflags = -1;
5906 static int hf_bit12vflags = -1;
5907 static int hf_bit13vflags = -1;
5908 static int hf_bit14vflags = -1;
5909 static int hf_bit15vflags = -1;
5910 static int hf_bit16vflags = -1;
5911 static int hf_bit1eflags = -1;
5912 static int hf_bit2eflags = -1;
5913 static int hf_bit3eflags = -1;
5914 static int hf_bit4eflags = -1;
5915 static int hf_bit5eflags = -1;
5916 static int hf_bit6eflags = -1;
5917 static int hf_bit7eflags = -1;
5918 static int hf_bit8eflags = -1;
5919 static int hf_bit9eflags = -1;
5920 static int hf_bit10eflags = -1;
5921 static int hf_bit11eflags = -1;
5922 static int hf_bit12eflags = -1;
5923 static int hf_bit13eflags = -1;
5924 static int hf_bit14eflags = -1;
5925 static int hf_bit15eflags = -1;
5926 static int hf_bit16eflags = -1;
5927 static int hf_bit1infoflagsl = -1;
5928 static int hf_bit2infoflagsl = -1;
5929 static int hf_bit3infoflagsl = -1;
5930 static int hf_bit4infoflagsl = -1;
5931 static int hf_bit5infoflagsl = -1;
5932 static int hf_bit6infoflagsl = -1;
5933 static int hf_bit7infoflagsl = -1;
5934 static int hf_bit8infoflagsl = -1;
5935 static int hf_bit9infoflagsl = -1;
5936 static int hf_bit10infoflagsl = -1;
5937 static int hf_bit11infoflagsl = -1;
5938 static int hf_bit12infoflagsl = -1;
5939 static int hf_bit13infoflagsl = -1;
5940 static int hf_bit14infoflagsl = -1;
5941 static int hf_bit15infoflagsl = -1;
5942 static int hf_bit16infoflagsl = -1;
5943 static int hf_bit1infoflagsh = -1;
5944 static int hf_bit2infoflagsh = -1;
5945 static int hf_bit3infoflagsh = -1;
5946 static int hf_bit4infoflagsh = -1;
5947 static int hf_bit5infoflagsh = -1;
5948 static int hf_bit6infoflagsh = -1;
5949 static int hf_bit7infoflagsh = -1;
5950 static int hf_bit8infoflagsh = -1;
5951 static int hf_bit9infoflagsh = -1;
5952 static int hf_bit10infoflagsh = -1;
5953 static int hf_bit11infoflagsh = -1;
5954 static int hf_bit12infoflagsh = -1;
5955 static int hf_bit13infoflagsh = -1;
5956 static int hf_bit14infoflagsh = -1;
5957 static int hf_bit15infoflagsh = -1;
5958 static int hf_bit16infoflagsh = -1;
5959 static int hf_bit1lflags = -1;
5960 static int hf_bit2lflags = -1;
5961 static int hf_bit3lflags = -1;
5962 static int hf_bit4lflags = -1;
5963 static int hf_bit5lflags = -1;
5964 static int hf_bit6lflags = -1;
5965 static int hf_bit7lflags = -1;
5966 static int hf_bit8lflags = -1;
5967 static int hf_bit9lflags = -1;
5968 static int hf_bit10lflags = -1;
5969 static int hf_bit11lflags = -1;
5970 static int hf_bit12lflags = -1;
5971 static int hf_bit13lflags = -1;
5972 static int hf_bit14lflags = -1;
5973 static int hf_bit15lflags = -1;
5974 static int hf_bit16lflags = -1;
5975 static int hf_bit1l1flagsl = -1;
5976 static int hf_bit2l1flagsl = -1;
5977 static int hf_bit3l1flagsl = -1;
5978 static int hf_bit4l1flagsl = -1;
5979 static int hf_bit5l1flagsl = -1;
5980 static int hf_bit6l1flagsl = -1;
5981 static int hf_bit7l1flagsl = -1;
5982 static int hf_bit8l1flagsl = -1;
5983 static int hf_bit9l1flagsl = -1;
5984 static int hf_bit10l1flagsl = -1;
5985 static int hf_bit11l1flagsl = -1;
5986 static int hf_bit12l1flagsl = -1;
5987 static int hf_bit13l1flagsl = -1;
5988 static int hf_bit14l1flagsl = -1;
5989 static int hf_bit15l1flagsl = -1;
5990 static int hf_bit16l1flagsl = -1;
5991 static int hf_bit1l1flagsh = -1;
5992 static int hf_bit2l1flagsh = -1;
5993 static int hf_bit3l1flagsh = -1;
5994 static int hf_bit4l1flagsh = -1;
5995 static int hf_bit5l1flagsh = -1;
5996 static int hf_bit6l1flagsh = -1;
5997 static int hf_bit7l1flagsh = -1;
5998 static int hf_bit8l1flagsh = -1;
5999 static int hf_bit9l1flagsh = -1;
6000 static int hf_bit10l1flagsh = -1;
6001 static int hf_bit11l1flagsh = -1;
6002 static int hf_bit12l1flagsh = -1;
6003 static int hf_bit13l1flagsh = -1;
6004 static int hf_bit14l1flagsh = -1;
6005 static int hf_bit15l1flagsh = -1;
6006 static int hf_bit16l1flagsh = -1;
6007 static int hf_nds_tree_name = -1;
6008 static int hf_nds_reply_error = -1;
6009 static int hf_nds_net = -1;
6010 static int hf_nds_node = -1;
6011 static int hf_nds_socket = -1;
6012 static int hf_add_ref_ip = -1;
6013 static int hf_add_ref_udp = -1;
6014 static int hf_add_ref_tcp = -1;
6015 static int hf_referral_record = -1;
6016 static int hf_referral_addcount = -1;
6017 static int hf_nds_port = -1;
6018 static int hf_mv_string = -1;
6019 static int hf_nds_syntax = -1;
6020 static int hf_value_string = -1;
6021 static int hf_nds_buffer_size = -1;
6022 static int hf_nds_ver = -1;
6023 static int hf_nds_nflags = -1;
6024 static int hf_nds_scope = -1;
6025 static int hf_nds_name = -1;
6026 static int hf_nds_comm_trans = -1;
6027 static int hf_nds_tree_trans = -1;
6028 static int hf_nds_iteration = -1;
6029 static int hf_nds_eid = -1;
6030 static int hf_nds_info_type = -1;
6031 static int hf_nds_all_attr = -1;
6032 static int hf_nds_req_flags = -1;
6033 static int hf_nds_attr = -1;
6034 static int hf_nds_crc = -1;
6035 static int hf_nds_referrals = -1;
6036 static int hf_nds_result_flags = -1;
6037 static int hf_nds_tag_string = -1;
6038 static int hf_value_bytes = -1;
6039 static int hf_replica_type = -1;
6040 static int hf_replica_state = -1;
6041 static int hf_replica_number = -1;
6042 static int hf_min_nds_ver = -1;
6043 static int hf_nds_ver_include = -1;
6044 static int hf_nds_ver_exclude = -1;
6045 static int hf_nds_es = -1;
6046 static int hf_es_type = -1;
6047 static int hf_delim_string = -1;
6048 static int hf_rdn_string = -1;
6049 static int hf_nds_revent = -1;
6050 static int hf_nds_rnum = -1;
6051 static int hf_nds_name_type = -1;
6052 static int hf_nds_rflags = -1;
6053 static int hf_nds_eflags = -1;
6054 static int hf_nds_depth = -1;
6055 static int hf_nds_class_def_type = -1;
6056 static int hf_nds_classes = -1;
6057 static int hf_nds_return_all_classes = -1;
6058 static int hf_nds_stream_flags = -1;
6059 static int hf_nds_stream_name = -1;
6060 static int hf_nds_file_handle = -1;
6061 static int hf_nds_file_size = -1;
6062 static int hf_nds_dn_output_type = -1;
6063 static int hf_nds_nested_output_type = -1;
6064 static int hf_nds_output_delimiter = -1;
6065 static int hf_nds_output_entry_specifier = -1;
6066 static int hf_es_value = -1;
6067 static int hf_es_rdn_count = -1;
6068 static int hf_nds_replica_num = -1;
6069 static int hf_nds_event_num = -1;
6070 static int hf_es_seconds = -1;
6071 static int hf_nds_compare_results = -1;
6072 static int hf_nds_parent = -1;
6073 static int hf_nds_name_filter = -1;
6074 static int hf_nds_class_filter = -1;
6075 static int hf_nds_time_filter = -1;
6076 static int hf_nds_partition_root_id = -1;
6077 static int hf_nds_replicas = -1;
6078 static int hf_nds_purge = -1;
6079 static int hf_nds_local_partition = -1;
6080 static int hf_partition_busy = -1;
6081 static int hf_nds_number_of_changes = -1;
6082 static int hf_sub_count = -1;
6083 static int hf_nds_revision = -1;
6084 static int hf_nds_base_class = -1;
6085 static int hf_nds_relative_dn = -1;
6086 static int hf_nds_root_dn = -1;
6087 static int hf_nds_parent_dn = -1;
6088 static int hf_deref_base = -1;
6089 static int hf_nds_entry_info = -1;
6090 static int hf_nds_base = -1;
6091 static int hf_nds_privileges = -1;
6092 static int hf_nds_vflags = -1;
6093 static int hf_nds_value_len = -1;
6094 static int hf_nds_cflags = -1;
6095 static int hf_nds_acflags = -1;
6096 static int hf_nds_asn1 = -1;
6097 static int hf_nds_upper = -1;
6098 static int hf_nds_lower = -1;
6099 static int hf_nds_trustee_dn = -1;
6100 static int hf_nds_attribute_dn = -1;
6101 static int hf_nds_acl_add = -1;
6102 static int hf_nds_acl_del = -1;
6103 static int hf_nds_att_add = -1;
6104 static int hf_nds_att_del = -1;
6105 static int hf_nds_keep = -1;
6106 static int hf_nds_new_rdn = -1;
6107 static int hf_nds_time_delay = -1;
6108 static int hf_nds_root_name = -1;
6109 static int hf_nds_new_part_id = -1;
6110 static int hf_nds_child_part_id = -1;
6111 static int hf_nds_master_part_id = -1;
6112 static int hf_nds_target_name = -1;
6113 static int hf_nds_super = -1;
6114 static int hf_bit1pingflags2 = -1;
6115 static int hf_bit2pingflags2 = -1;
6116 static int hf_bit3pingflags2 = -1;
6117 static int hf_bit4pingflags2 = -1;
6118 static int hf_bit5pingflags2 = -1;
6119 static int hf_bit6pingflags2 = -1;
6120 static int hf_bit7pingflags2 = -1;
6121 static int hf_bit8pingflags2 = -1;
6122 static int hf_bit9pingflags2 = -1;
6123 static int hf_bit10pingflags2 = -1;
6124 static int hf_bit11pingflags2 = -1;
6125 static int hf_bit12pingflags2 = -1;
6126 static int hf_bit13pingflags2 = -1;
6127 static int hf_bit14pingflags2 = -1;
6128 static int hf_bit15pingflags2 = -1;
6129 static int hf_bit16pingflags2 = -1;
6130 static int hf_bit1pingflags1 = -1;
6131 static int hf_bit2pingflags1 = -1;
6132 static int hf_bit3pingflags1 = -1;
6133 static int hf_bit4pingflags1 = -1;
6134 static int hf_bit5pingflags1 = -1;
6135 static int hf_bit6pingflags1 = -1;
6136 static int hf_bit7pingflags1 = -1;
6137 static int hf_bit8pingflags1 = -1;
6138 static int hf_bit9pingflags1 = -1;
6139 static int hf_bit10pingflags1 = -1;
6140 static int hf_bit11pingflags1 = -1;
6141 static int hf_bit12pingflags1 = -1;
6142 static int hf_bit13pingflags1 = -1;
6143 static int hf_bit14pingflags1 = -1;
6144 static int hf_bit15pingflags1 = -1;
6145 static int hf_bit16pingflags1 = -1;
6146 static int hf_bit1pingpflags1 = -1;
6147 static int hf_bit2pingpflags1 = -1;
6148 static int hf_bit3pingpflags1 = -1;
6149 static int hf_bit4pingpflags1 = -1;
6150 static int hf_bit5pingpflags1 = -1;
6151 static int hf_bit6pingpflags1 = -1;
6152 static int hf_bit7pingpflags1 = -1;
6153 static int hf_bit8pingpflags1 = -1;
6154 static int hf_bit9pingpflags1 = -1;
6155 static int hf_bit10pingpflags1 = -1;
6156 static int hf_bit11pingpflags1 = -1;
6157 static int hf_bit12pingpflags1 = -1;
6158 static int hf_bit13pingpflags1 = -1;
6159 static int hf_bit14pingpflags1 = -1;
6160 static int hf_bit15pingpflags1 = -1;
6161 static int hf_bit16pingpflags1 = -1;
6162 static int hf_bit1pingvflags1 = -1;
6163 static int hf_bit2pingvflags1 = -1;
6164 static int hf_bit3pingvflags1 = -1;
6165 static int hf_bit4pingvflags1 = -1;
6166 static int hf_bit5pingvflags1 = -1;
6167 static int hf_bit6pingvflags1 = -1;
6168 static int hf_bit7pingvflags1 = -1;
6169 static int hf_bit8pingvflags1 = -1;
6170 static int hf_bit9pingvflags1 = -1;
6171 static int hf_bit10pingvflags1 = -1;
6172 static int hf_bit11pingvflags1 = -1;
6173 static int hf_bit12pingvflags1 = -1;
6174 static int hf_bit13pingvflags1 = -1;
6175 static int hf_bit14pingvflags1 = -1;
6176 static int hf_bit15pingvflags1 = -1;
6177 static int hf_bit16pingvflags1 = -1;
6178 static int hf_nds_letter_ver = -1;
6179 static int hf_nds_os_majver = -1;
6180 static int hf_nds_os_minver = -1;
6181 static int hf_nds_lic_flags = -1;
6182 static int hf_nds_ds_time = -1;
6183 static int hf_nds_ping_version = -1;
6184 static int hf_nds_search_scope = -1;
6185 static int hf_nds_num_objects = -1;
6186 static int hf_bit1siflags = -1;
6187 static int hf_bit2siflags = -1;
6188 static int hf_bit3siflags = -1;
6189 static int hf_bit4siflags = -1;
6190 static int hf_bit5siflags = -1;
6191 static int hf_bit6siflags = -1;
6192 static int hf_bit7siflags = -1;
6193 static int hf_bit8siflags = -1;
6194 static int hf_bit9siflags = -1;
6195 static int hf_bit10siflags = -1;
6196 static int hf_bit11siflags = -1;
6197 static int hf_bit12siflags = -1;
6198 static int hf_bit13siflags = -1;
6199 static int hf_bit14siflags = -1;
6200 static int hf_bit15siflags = -1;
6201 static int hf_bit16siflags = -1;
6202 static int hf_nds_segments = -1;
6203 static int hf_nds_segment = -1;
6204 static int hf_nds_segment_overlap = -1;
6205 static int hf_nds_segment_overlap_conflict = -1;
6206 static int hf_nds_segment_multiple_tails = -1;
6207 static int hf_nds_segment_too_long_segment = -1;
6208 static int hf_nds_segment_error = -1;
6209 static int hf_nds_reassembled_length = -1;
6210 static int hf_nds_verb2b_req_flags = -1;
6211 static int hf_ncp_ip_address = -1;
6212 static int hf_ncp_copyright = -1;
6213 static int hf_ndsprot1flag = -1;
6214 static int hf_ndsprot2flag = -1;
6215 static int hf_ndsprot3flag = -1;
6216 static int hf_ndsprot4flag = -1;
6217 static int hf_ndsprot5flag = -1;
6218 static int hf_ndsprot6flag = -1;
6219 static int hf_ndsprot7flag = -1;
6220 static int hf_ndsprot8flag = -1;
6221 static int hf_ndsprot9flag = -1;
6222 static int hf_ndsprot10flag = -1;
6223 static int hf_ndsprot11flag = -1;
6224 static int hf_ndsprot12flag = -1;
6225 static int hf_ndsprot13flag = -1;
6226 static int hf_ndsprot14flag = -1;
6227 static int hf_ndsprot15flag = -1;
6228 static int hf_ndsprot16flag = -1;
6229 static int hf_nds_svr_dst_name = -1;
6230 static int hf_nds_tune_mark = -1;
6231 static int hf_nds_create_time = -1;
6232 static int hf_srvr_param_number = -1;
6233 static int hf_srvr_param_boolean = -1;
6234 static int hf_srvr_param_string = -1;
6235 static int hf_nds_svr_time = -1;
6236 static int hf_nds_crt_time = -1;
6237 static int hf_nds_number_of_items = -1;
6238 static int hf_nds_compare_attributes = -1;
6239 static int hf_nds_read_attribute = -1;
6240 static int hf_nds_write_add_delete_attribute = -1;
6241 static int hf_nds_add_delete_self = -1;
6242 static int hf_nds_privilege_not_defined = -1;
6243 static int hf_nds_supervisor = -1;
6244 static int hf_nds_inheritance_control = -1;
6245 static int hf_nds_browse_entry = -1;
6246 static int hf_nds_add_entry = -1;
6247 static int hf_nds_delete_entry = -1;
6248 static int hf_nds_rename_entry = -1;
6249 static int hf_nds_supervisor_entry = -1;
6250 static int hf_nds_entry_privilege_not_defined = -1;
6251 static int hf_nds_iterator = -1;
6252 static int hf_ncp_nds_iterverb = -1;
6253 static int hf_iter_completion_code = -1;
6254 static int hf_nds_iterobj = -1;
6255 static int hf_iter_verb_completion_code = -1;
6256 static int hf_iter_ans = -1;
6257 static int hf_positionable = -1;
6258 static int hf_num_skipped = -1;
6259 static int hf_num_to_skip = -1;
6260 static int hf_timelimit = -1;
6261 static int hf_iter_index = -1;
6262 static int hf_num_to_get = -1;
6263 static int hf_ret_info_type = -1;
6264 static int hf_data_size = -1;
6265 static int hf_this_count = -1;
6266 static int hf_max_entries = -1;
6267 static int hf_move_position = -1;
6268 static int hf_iter_copy = -1;
6269 static int hf_iter_position = -1;
6270 static int hf_iter_search = -1;
6271 static int hf_iter_other = -1;
6272 static int hf_nds_oid = -1;
6273
6274 """
6275
6276         # Look at all packet types in the packets collection, and cull information
6277         # from them.
6278         errors_used_list = []
6279         errors_used_hash = {}
6280         groups_used_list = []
6281         groups_used_hash = {}
6282         variables_used_hash = {}
6283         structs_used_hash = {}
6284
6285         for pkt in packets:
6286                 # Determine which error codes are used.
6287                 codes = pkt.CompletionCodes()
6288                 for code in codes.Records():
6289                         if not errors_used_hash.has_key(code):
6290                                 errors_used_hash[code] = len(errors_used_list)
6291                                 errors_used_list.append(code)
6292
6293                 # Determine which groups are used.
6294                 group = pkt.Group()
6295                 if not groups_used_hash.has_key(group):
6296                         groups_used_hash[group] = len(groups_used_list)
6297                         groups_used_list.append(group)
6298
6299
6300
6301
6302                 # Determine which variables are used.
6303                 vars = pkt.Variables()
6304                 ExamineVars(vars, structs_used_hash, variables_used_hash)
6305
6306
6307         # Print the hf variable declarations
6308         sorted_vars = variables_used_hash.values()
6309         sorted_vars.sort()
6310         for var in sorted_vars:
6311                 print "static int " + var.HFName() + " = -1;"
6312
6313
6314         # Print the value_string's
6315         for var in sorted_vars:
6316                 if isinstance(var, val_string):
6317                         print ""
6318                         print var.Code()
6319
6320         # Determine which error codes are not used
6321         errors_not_used = {}
6322         # Copy the keys from the error list...
6323         for code in errors.keys():
6324                 errors_not_used[code] = 1
6325         # ... and remove the ones that *were* used.
6326         for code in errors_used_list:
6327                 del errors_not_used[code]
6328
6329         # Print a remark showing errors not used
6330         list_errors_not_used = errors_not_used.keys()
6331         list_errors_not_used.sort()
6332         for code in list_errors_not_used:
6333                 print "/* Error 0x%04x not used: %s */" % (code, errors[code])
6334         print "\n"
6335
6336         # Print the errors table
6337         print "/* Error strings. */"
6338         print "static const char *ncp_errors[] = {"
6339         for code in errors_used_list:
6340                 print '\t/* %02d (0x%04x) */ "%s",' % (errors_used_hash[code], code, errors[code])
6341         print "};\n"
6342
6343
6344
6345
6346         # Determine which groups are not used
6347         groups_not_used = {}
6348         # Copy the keys from the group list...
6349         for group in groups.keys():
6350                 groups_not_used[group] = 1
6351         # ... and remove the ones that *were* used.
6352         for group in groups_used_list:
6353                 del groups_not_used[group]
6354
6355         # Print a remark showing groups not used
6356         list_groups_not_used = groups_not_used.keys()
6357         list_groups_not_used.sort()
6358         for group in list_groups_not_used:
6359                 print "/* Group not used: %s = %s */" % (group, groups[group])
6360         print "\n"
6361
6362         # Print the groups table
6363         print "/* Group strings. */"
6364         print "static const char *ncp_groups[] = {"
6365         for group in groups_used_list:
6366                 print '\t/* %02d (%s) */ "%s",' % (groups_used_hash[group], group, groups[group])
6367         print "};\n"
6368
6369         # Print the group macros
6370         for group in groups_used_list:
6371                 name = string.upper(group)
6372                 print "#define NCP_GROUP_%s\t%d" % (name, groups_used_hash[group])
6373         print "\n"
6374
6375
6376         # Print the conditional_records for all Request Conditions.
6377         num = 0
6378         print "/* Request-Condition dfilter records. The NULL pointer"
6379         print "   is replaced by a pointer to the created dfilter_t. */"
6380         if len(global_req_cond) == 0:
6381                 print "static conditional_record req_conds = NULL;"
6382         else:
6383                 print "static conditional_record req_conds[] = {"
6384                 for req_cond in global_req_cond.keys():
6385                         print "\t{ \"%s\", NULL }," % (req_cond,)
6386                         global_req_cond[req_cond] = num
6387                         num = num + 1
6388                 print "};"
6389         print "#define NUM_REQ_CONDS %d" % (num,)
6390         print "#define NO_REQ_COND   NUM_REQ_CONDS\n\n"
6391
6392
6393
6394         # Print PTVC's for bitfields
6395         ett_list = []
6396         print "/* PTVC records for bit-fields. */"
6397         for var in sorted_vars:
6398                 if isinstance(var, bitfield):
6399                         sub_vars_ptvc = var.SubVariablesPTVC()
6400                         print "/* %s */" % (sub_vars_ptvc.Name())
6401                         print sub_vars_ptvc.Code()
6402                         ett_list.append(sub_vars_ptvc.ETTName())
6403
6404
6405         # Print the PTVC's for structures
6406         print "/* PTVC records for structs. */"
6407         # Sort them
6408         svhash = {}
6409         for svar in structs_used_hash.values():
6410                 svhash[svar.HFName()] = svar
6411                 if svar.descr:
6412                         ett_list.append(svar.ETTName())
6413
6414         struct_vars = svhash.keys()
6415         struct_vars.sort()
6416         for varname in struct_vars:
6417                 var = svhash[varname]
6418                 print var.Code()
6419
6420         ett_list.sort()
6421
6422         # Print regular PTVC's
6423         print "/* PTVC records. These are re-used to save space. */"
6424         for ptvc in ptvc_lists.Members():
6425                 if not ptvc.Null() and not ptvc.Empty():
6426                         print ptvc.Code()
6427
6428         # Print error_equivalency tables
6429         print "/* Error-Equivalency Tables. These are re-used to save space. */"
6430         for compcodes in compcode_lists.Members():
6431                 errors = compcodes.Records()
6432                 # Make sure the record for error = 0x00 comes last.
6433                 print "static const error_equivalency %s[] = {" % (compcodes.Name())
6434                 for error in errors:
6435                         error_in_packet = error >> 8;
6436                         ncp_error_index = errors_used_hash[error]
6437                         print "\t{ 0x%02x, %d }, /* 0x%04x */" % (error_in_packet,
6438                                 ncp_error_index, error)
6439                 print "\t{ 0x00, -1 }\n};\n"
6440
6441
6442
6443         # Print integer arrays for all ncp_records that need
6444         # a list of req_cond_indexes. Do it "uniquely" to save space;
6445         # if multiple packets share the same set of req_cond's,
6446         # then they'll share the same integer array
6447         print "/* Request Condition Indexes */"
6448         # First, make them unique
6449         req_cond_collection = UniqueCollection("req_cond_collection")
6450         for pkt in packets:
6451                 req_conds = pkt.CalculateReqConds()
6452                 if req_conds:
6453                         unique_list = req_cond_collection.Add(req_conds)
6454                         pkt.SetReqConds(unique_list)
6455                 else:
6456                         pkt.SetReqConds(None)
6457
6458         # Print them
6459         for req_cond in req_cond_collection.Members():
6460                 print "static const int %s[] = {" % (req_cond.Name(),)
6461                 print "\t",
6462                 vals = []
6463                 for text in req_cond.Records():
6464                         vals.append(global_req_cond[text])
6465                 vals.sort()
6466                 for val in vals:
6467                         print "%s, " % (val,),
6468
6469                 print "-1 };"
6470                 print ""
6471
6472
6473
6474         # Functions without length parameter
6475         funcs_without_length = {}
6476
6477         # Print info string structures
6478         print "/* Info Strings */"
6479         for pkt in packets:
6480                 if pkt.req_info_str:
6481                         name = pkt.InfoStrName() + "_req"
6482                         var = pkt.req_info_str[0]
6483                         print "static const info_string_t %s = {" % (name,)
6484                         print "\t&%s," % (var.HFName(),)
6485                         print '\t"%s",' % (pkt.req_info_str[1],)
6486                         print '\t"%s"' % (pkt.req_info_str[2],)
6487                         print "};\n"
6488
6489
6490
6491         # Print ncp_record packet records
6492         print "#define SUBFUNC_WITH_LENGTH      0x02"
6493         print "#define SUBFUNC_NO_LENGTH        0x01"
6494         print "#define NO_SUBFUNC               0x00"
6495
6496         print "/* ncp_record structs for packets */"
6497         print "static const ncp_record ncp_packets[] = {"
6498         for pkt in packets:
6499                 if pkt.HasSubFunction():
6500                         func = pkt.FunctionCode('high')
6501                         if pkt.HasLength():
6502                                 subfunc_string = "SUBFUNC_WITH_LENGTH"
6503                                 # Ensure that the function either has a length param or not
6504                                 if funcs_without_length.has_key(func):
6505                                         sys.exit("Function 0x%04x sometimes has length param, sometimes not." \
6506                                                 % (pkt.FunctionCode(),))
6507                         else:
6508                                 subfunc_string = "SUBFUNC_NO_LENGTH"
6509                                 funcs_without_length[func] = 1
6510                 else:
6511                         subfunc_string = "NO_SUBFUNC"
6512                 print '\t{ 0x%02x, 0x%02x, %s, "%s",' % (pkt.FunctionCode('high'),
6513                         pkt.FunctionCode('low'), subfunc_string, pkt.Description()),
6514
6515                 print '\t%d /* %s */,' % (groups_used_hash[pkt.Group()], pkt.Group())
6516
6517                 ptvc = pkt.PTVCRequest()
6518                 if not ptvc.Null() and not ptvc.Empty():
6519                         ptvc_request = ptvc.Name()
6520                 else:
6521                         ptvc_request = 'NULL'
6522
6523                 ptvc = pkt.PTVCReply()
6524                 if not ptvc.Null() and not ptvc.Empty():
6525                         ptvc_reply = ptvc.Name()
6526                 else:
6527                         ptvc_reply = 'NULL'
6528
6529                 errors = pkt.CompletionCodes()
6530
6531                 req_conds_obj = pkt.GetReqConds()
6532                 if req_conds_obj:
6533                         req_conds = req_conds_obj.Name()
6534                 else:
6535                         req_conds = "NULL"
6536
6537                 if not req_conds_obj:
6538                         req_cond_size = "NO_REQ_COND_SIZE"
6539                 else:
6540                         req_cond_size = pkt.ReqCondSize()
6541                         if req_cond_size == None:
6542                                 msg.write("NCP packet %s needs a ReqCondSize*() call\n" \
6543                                         % (pkt.CName(),))
6544                                 sys.exit(1)
6545
6546                 if pkt.req_info_str:
6547                         req_info_str = "&" + pkt.InfoStrName() + "_req"
6548                 else:
6549                         req_info_str = "NULL"
6550
6551                 print '\t\t%s, %s, %s, %s, %s, %s },\n' % \
6552                         (ptvc_request, ptvc_reply, errors.Name(), req_conds,
6553                         req_cond_size, req_info_str)
6554
6555         print '\t{ 0, 0, 0, NULL, 0, NULL, NULL, NULL, NULL, NO_REQ_COND_SIZE, NULL }'
6556         print "};\n"
6557
6558         print "/* ncp funcs that require a subfunc */"
6559         print "static const guint8 ncp_func_requires_subfunc[] = {"
6560         hi_seen = {}
6561         for pkt in packets:
6562                 if pkt.HasSubFunction():
6563                         hi_func = pkt.FunctionCode('high')
6564                         if not hi_seen.has_key(hi_func):
6565                                 print "\t0x%02x," % (hi_func)
6566                                 hi_seen[hi_func] = 1
6567         print "\t0"
6568         print "};\n"
6569
6570
6571         print "/* ncp funcs that have no length parameter */"
6572         print "static const guint8 ncp_func_has_no_length_parameter[] = {"
6573         funcs = funcs_without_length.keys()
6574         funcs.sort()
6575         for func in funcs:
6576                 print "\t0x%02x," % (func,)
6577         print "\t0"
6578         print "};\n"
6579
6580         print ""
6581
6582         # proto_register_ncp2222()
6583         print """
6584 static const value_string ncp_nds_verb_vals[] = {
6585         { 1, "Resolve Name" },
6586         { 2, "Read Entry Information" },
6587         { 3, "Read" },
6588         { 4, "Compare" },
6589         { 5, "List" },
6590         { 6, "Search Entries" },
6591         { 7, "Add Entry" },
6592         { 8, "Remove Entry" },
6593         { 9, "Modify Entry" },
6594         { 10, "Modify RDN" },
6595         { 11, "Create Attribute" },
6596         { 12, "Read Attribute Definition" },
6597         { 13, "Remove Attribute Definition" },
6598         { 14, "Define Class" },
6599         { 15, "Read Class Definition " },
6600         { 16, "Modify Class Definition" },
6601         { 17, "Remove Class Definition" },
6602         { 18, "List Containable Classes" },
6603         { 19, "Get Effective Rights" },
6604         { 20, "Add Partition" },
6605         { 21, "Remove Partition" },
6606         { 22, "List Partitions" },
6607         { 23, "Split Partition" },
6608         { 24, "Join Partitions" },
6609         { 25, "Add Replica" },
6610         { 26, "Remove Replica" },
6611         { 27, "Open Stream" },
6612         { 28, "Search Filter" },
6613         { 29, "Create Subordinate Reference" },
6614         { 30, "Link Replica" },
6615         { 31, "Change Replica Type" },
6616         { 32, "Start Update Schema" },
6617         { 33, "End Update Schema" },
6618         { 34, "Update Schema" },
6619         { 35, "Start Update Replica" },
6620         { 36, "End Update Replica" },
6621         { 37, "Update Replica" },
6622         { 38, "Synchronize Partition" },
6623         { 39, "Synchronize Schema" },
6624         { 40, "Read Syntaxes" },
6625         { 41, "Get Replica Root ID" },
6626         { 42, "Begin Move Entry" },
6627         { 43, "Finish Move Entry" },
6628         { 44, "Release Moved Entry" },
6629         { 45, "Backup Entry" },
6630         { 46, "Restore Entry" },
6631         { 47, "Save DIB (Obsolete)" },
6632         { 48, "Control" },
6633         { 49, "Remove Backlink" },
6634         { 50, "Close Iteration" },
6635         { 51, "Mutate Entry" },
6636         { 52, "Audit Skulking" },
6637         { 53, "Get Server Address" },
6638         { 54, "Set Keys" },
6639         { 55, "Change Password" },
6640         { 56, "Verify Password" },
6641         { 57, "Begin Login" },
6642         { 58, "Finish Login" },
6643         { 59, "Begin Authentication" },
6644         { 60, "Finish Authentication" },
6645         { 61, "Logout" },
6646         { 62, "Repair Ring (Obsolete)" },
6647         { 63, "Repair Timestamps" },
6648         { 64, "Create Back Link" },
6649         { 65, "Delete External Reference" },
6650         { 66, "Rename External Reference" },
6651         { 67, "Create Queue Entry Directory" },
6652         { 68, "Remove Queue Entry Directory" },
6653         { 69, "Merge Entries" },
6654         { 70, "Change Tree Name" },
6655         { 71, "Partition Entry Count" },
6656         { 72, "Check Login Restrictions" },
6657         { 73, "Start Join" },
6658         { 74, "Low Level Split" },
6659         { 75, "Low Level Join" },
6660         { 76, "Abort Partition Operation" },
6661         { 77, "Get All Servers" },
6662         { 78, "Partition Function" },
6663         { 79, "Read References" },
6664         { 80, "Inspect Entry" },
6665         { 81, "Get Remote Entry ID" },
6666         { 82, "Change Security" },
6667         { 83, "Check Console Operator" },
6668         { 84, "Start Move Tree" },
6669         { 85, "Move Tree" },
6670         { 86, "End Move Tree" },
6671         { 87, "Low Level Abort Join" },
6672         { 88, "Check Security Equivalence" },
6673         { 89, "Merge Tree" },
6674         { 90, "Sync External Reference" },
6675         { 91, "Resend Entry" },
6676         { 92, "New Schema Epoch" },
6677         { 93, "Statistics" },
6678         { 94, "Ping" },
6679         { 95, "Get Bindery Contexts" },
6680         { 96, "Monitor Connection" },
6681         { 97, "Get DS Statistics" },
6682         { 98, "Reset DS Counters" },
6683         { 99, "Console" },
6684         { 100, "Read Stream" },
6685         { 101, "Write Stream" },
6686         { 102, "Create Orphan Partition" },
6687         { 103, "Remove Orphan Partition" },
6688         { 104, "Link Orphan Partition" },
6689         { 105, "Set Distributed Reference Link (DRL)" },
6690         { 106, "Available" },
6691         { 107, "Available" },
6692         { 108, "Verify Distributed Reference Link (DRL)" },
6693         { 109, "Verify Partition" },
6694         { 110, "Iterator" },
6695         { 111, "Available" },
6696         { 112, "Close Stream" },
6697         { 113, "Available" },
6698         { 114, "Read Status" },
6699         { 115, "Partition Sync Status" },
6700         { 116, "Read Reference Data" },
6701         { 117, "Write Reference Data" },
6702         { 118, "Resource Event" },
6703         { 119, "DIB Request (obsolete)" },
6704         { 120, "Set Replication Filter" },
6705         { 121, "Get Replication Filter" },
6706         { 122, "Change Attribute Definition" },
6707         { 123, "Schema in Use" },
6708         { 124, "Remove Keys" },
6709         { 125, "Clone" },
6710         { 126, "Multiple Operations Transaction" },
6711         { 240, "Ping" },
6712         { 255, "EDirectory Call" },
6713         { 0,  NULL }
6714 };
6715
6716 static const value_string connection_status_vals[] = {
6717         { 0x00, "Ok" },
6718         { 0x01, "Bad Service Connection" },
6719         { 0x10, "File Server is Down" },
6720         { 0x40, "Broadcast Message Pending" },
6721         { 0,    NULL }
6722 };
6723
6724 void
6725 proto_register_ncp2222(void)
6726 {
6727
6728         static hf_register_info hf[] = {
6729         { &hf_ncp_func,
6730         { "Function", "ncp.func", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
6731
6732         { &hf_ncp_length,
6733         { "Packet Length", "ncp.length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
6734
6735         { &hf_ncp_subfunc,
6736         { "SubFunction", "ncp.subfunc", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
6737
6738         { &hf_ncp_completion_code,
6739         { "Completion Code", "ncp.completion_code", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
6740
6741         { &hf_ncp_group,
6742         { "NCP Group Type", "ncp.group", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
6743
6744         { &hf_ncp_fragment_handle,
6745         { "NDS Fragment Handle", "ncp.ndsfrag", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
6746
6747         { &hf_ncp_fragment_size,
6748         { "NDS Fragment Size", "ncp.ndsfragsize", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
6749
6750         { &hf_ncp_message_size,
6751         { "Message Size", "ncp.ndsmessagesize", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
6752
6753         { &hf_ncp_nds_flag,
6754         { "Flags", "ncp.ndsflag", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
6755
6756         { &hf_ncp_nds_verb,
6757         { "NDS Verb", "ncp.ndsverb", FT_UINT8, BASE_HEX, VALS(ncp_nds_verb_vals), 0x0, NULL, HFILL }},
6758
6759         { &hf_ping_version,
6760         { "NDS Version", "ncp.ping_version", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
6761
6762         { &hf_nds_version,
6763         { "NDS Version", "ncp.nds_version", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
6764
6765         { &hf_nds_tree_name,
6766         { "Tree Name", "ncp.nds_tree_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
6767
6768         /*
6769          * XXX - the page at
6770          *
6771          *      http://www.odyssea.com/whats_new/tcpipnet/tcpipnet.html
6772          *
6773          * says of the connection status "The Connection Code field may
6774          * contain values that indicate the status of the client host to
6775          * server connection.  A value of 1 in the fourth bit of this data
6776          * byte indicates that the server is unavailable (server was
6777          * downed).
6778          *
6779          * The page at
6780          *
6781          *      http://www.unm.edu/~network/presentations/course/appendix/appendix_f/tsld088.htm
6782          *
6783          * says that bit 0 is "bad service", bit 2 is "no connection
6784          * available", bit 4 is "service down", and bit 6 is "server
6785          * has a broadcast message waiting for the client".
6786          *
6787          * Should it be displayed in hex, and should those bits (and any
6788          * other bits with significance) be displayed as bitfields
6789          * underneath it?
6790          */
6791         { &hf_ncp_connection_status,
6792         { "Connection Status", "ncp.connection_status", FT_UINT8, BASE_DEC, VALS(connection_status_vals), 0x0, NULL, HFILL }},
6793
6794         { &hf_ncp_req_frame_num,
6795         { "Response to Request in Frame Number", "ncp.req_frame_num", FT_FRAMENUM, BASE_NONE, NULL, 0x0, NULL, HFILL }},
6796
6797         { &hf_ncp_req_frame_time,
6798         { "Time from Request", "ncp.time", FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0, "Time between request and response in seconds", HFILL }},
6799
6800         { &hf_nds_flags,
6801         { "NDS Return Flags", "ncp.nds_flags", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
6802
6803         { &hf_nds_reply_depth,
6804         { "Distance from Root", "ncp.ndsdepth", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
6805
6806         { &hf_nds_reply_rev,
6807         { "NDS Revision", "ncp.ndsrev", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
6808
6809         { &hf_nds_reply_flags,
6810         { "Flags", "ncp.ndsflags", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
6811
6812         { &hf_nds_p1type,
6813         { "NDS Parameter Type", "ncp.p1type", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
6814
6815         { &hf_nds_uint32value,
6816         { "NDS Value", "ncp.uint32value", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
6817
6818         { &hf_nds_bit1,
6819         { "Typeless", "ncp.nds_bit1", FT_BOOLEAN, 16, NULL, 0x00000001, NULL, HFILL }},
6820
6821         { &hf_nds_bit2,
6822         { "All Containers", "ncp.nds_bit2", FT_BOOLEAN, 16, NULL, 0x00000002, NULL, HFILL }},
6823
6824         { &hf_nds_bit3,
6825         { "Slashed", "ncp.nds_bit3", FT_BOOLEAN, 16, NULL, 0x00000004, NULL, HFILL }},
6826
6827         { &hf_nds_bit4,
6828         { "Dotted", "ncp.nds_bit4", FT_BOOLEAN, 16, NULL, 0x00000008, NULL, HFILL }},
6829
6830         { &hf_nds_bit5,
6831         { "Tuned", "ncp.nds_bit5", FT_BOOLEAN, 16, NULL, 0x00000010, NULL, HFILL }},
6832
6833         { &hf_nds_bit6,
6834         { "Not Defined", "ncp.nds_bit6", FT_BOOLEAN, 16, NULL, 0x00000020, NULL, HFILL }},
6835
6836         { &hf_nds_bit7,
6837         { "Not Defined", "ncp.nds_bit7", FT_BOOLEAN, 16, NULL, 0x00000040, NULL, HFILL }},
6838
6839         { &hf_nds_bit8,
6840         { "Not Defined", "ncp.nds_bit8", FT_BOOLEAN, 16, NULL, 0x00000080, NULL, HFILL }},
6841
6842         { &hf_nds_bit9,
6843         { "Not Defined", "ncp.nds_bit9", FT_BOOLEAN, 16, NULL, 0x00000100, NULL, HFILL }},
6844
6845         { &hf_nds_bit10,
6846         { "Not Defined", "ncp.nds_bit10", FT_BOOLEAN, 16, NULL, 0x00000200, NULL, HFILL }},
6847
6848         { &hf_nds_bit11,
6849         { "Not Defined", "ncp.nds_bit11", FT_BOOLEAN, 16, NULL, 0x00000400, NULL, HFILL }},
6850
6851         { &hf_nds_bit12,
6852         { "Not Defined", "ncp.nds_bit12", FT_BOOLEAN, 16, NULL, 0x00000800, NULL, HFILL }},
6853
6854         { &hf_nds_bit13,
6855         { "Not Defined", "ncp.nds_bit13", FT_BOOLEAN, 16, NULL, 0x00001000, NULL, HFILL }},
6856
6857         { &hf_nds_bit14,
6858         { "Not Defined", "ncp.nds_bit14", FT_BOOLEAN, 16, NULL, 0x00002000, NULL, HFILL }},
6859
6860         { &hf_nds_bit15,
6861         { "Not Defined", "ncp.nds_bit15", FT_BOOLEAN, 16, NULL, 0x00004000, NULL, HFILL }},
6862
6863         { &hf_nds_bit16,
6864         { "Not Defined", "ncp.nds_bit16", FT_BOOLEAN, 16, NULL, 0x00008000, NULL, HFILL }},
6865
6866         { &hf_bit1outflags,
6867         { "Output Flags", "ncp.bit1outflags", FT_BOOLEAN, 16, NULL, 0x00000001, NULL, HFILL }},
6868
6869         { &hf_bit2outflags,
6870         { "Entry ID", "ncp.bit2outflags", FT_BOOLEAN, 16, NULL, 0x00000002, NULL, HFILL }},
6871
6872         { &hf_bit3outflags,
6873         { "Replica State", "ncp.bit3outflags", FT_BOOLEAN, 16, NULL, 0x00000004, NULL, HFILL }},
6874
6875         { &hf_bit4outflags,
6876         { "Modification Timestamp", "ncp.bit4outflags", FT_BOOLEAN, 16, NULL, 0x00000008, NULL, HFILL }},
6877
6878         { &hf_bit5outflags,
6879         { "Purge Time", "ncp.bit5outflags", FT_BOOLEAN, 16, NULL, 0x00000010, NULL, HFILL }},
6880
6881         { &hf_bit6outflags,
6882         { "Local Partition ID", "ncp.bit6outflags", FT_BOOLEAN, 16, NULL, 0x00000020, NULL, HFILL }},
6883
6884         { &hf_bit7outflags,
6885         { "Distinguished Name", "ncp.bit7outflags", FT_BOOLEAN, 16, NULL, 0x00000040, NULL, HFILL }},
6886
6887         { &hf_bit8outflags,
6888         { "Replica Type", "ncp.bit8outflags", FT_BOOLEAN, 16, NULL, 0x00000080, NULL, HFILL }},
6889
6890         { &hf_bit9outflags,
6891         { "Partition Busy", "ncp.bit9outflags", FT_BOOLEAN, 16, NULL, 0x00000100, NULL, HFILL }},
6892
6893         { &hf_bit10outflags,
6894         { "Not Defined", "ncp.bit10outflags", FT_BOOLEAN, 16, NULL, 0x00000200, NULL, HFILL }},
6895
6896         { &hf_bit11outflags,
6897         { "Not Defined", "ncp.bit11outflags", FT_BOOLEAN, 16, NULL, 0x00000400, NULL, HFILL }},
6898
6899         { &hf_bit12outflags,
6900         { "Not Defined", "ncp.bit12outflags", FT_BOOLEAN, 16, NULL, 0x00000800, NULL, HFILL }},
6901
6902         { &hf_bit13outflags,
6903         { "Not Defined", "ncp.bit13outflags", FT_BOOLEAN, 16, NULL, 0x00001000, NULL, HFILL }},
6904
6905         { &hf_bit14outflags,
6906         { "Not Defined", "ncp.bit14outflags", FT_BOOLEAN, 16, NULL, 0x00002000, NULL, HFILL }},
6907
6908         { &hf_bit15outflags,
6909         { "Not Defined", "ncp.bit15outflags", FT_BOOLEAN, 16, NULL, 0x00004000, NULL, HFILL }},
6910
6911         { &hf_bit16outflags,
6912         { "Not Defined", "ncp.bit16outflags", FT_BOOLEAN, 16, NULL, 0x00008000, NULL, HFILL }},
6913
6914         { &hf_bit1nflags,
6915         { "Entry ID", "ncp.bit1nflags", FT_BOOLEAN, 16, NULL, 0x00000001, NULL, HFILL }},
6916
6917         { &hf_bit2nflags,
6918         { "Readable", "ncp.bit2nflags", FT_BOOLEAN, 16, NULL, 0x00000002, NULL, HFILL }},
6919
6920         { &hf_bit3nflags,
6921         { "Writeable", "ncp.bit3nflags", FT_BOOLEAN, 16, NULL, 0x00000004, NULL, HFILL }},
6922
6923         { &hf_bit4nflags,
6924         { "Master", "ncp.bit4nflags", FT_BOOLEAN, 16, NULL, 0x00000008, NULL, HFILL }},
6925
6926         { &hf_bit5nflags,
6927         { "Create ID", "ncp.bit5nflags", FT_BOOLEAN, 16, NULL, 0x00000010, NULL, HFILL }},
6928
6929         { &hf_bit6nflags,
6930         { "Walk Tree", "ncp.bit6nflags", FT_BOOLEAN, 16, NULL, 0x00000020, NULL, HFILL }},
6931
6932         { &hf_bit7nflags,
6933         { "Dereference Alias", "ncp.bit7nflags", FT_BOOLEAN, 16, NULL, 0x00000040, NULL, HFILL }},
6934
6935         { &hf_bit8nflags,
6936         { "Not Defined", "ncp.bit8nflags", FT_BOOLEAN, 16, NULL, 0x00000080, NULL, HFILL }},
6937
6938         { &hf_bit9nflags,
6939         { "Not Defined", "ncp.bit9nflags", FT_BOOLEAN, 16, NULL, 0x00000100, NULL, HFILL }},
6940
6941         { &hf_bit10nflags,
6942         { "Not Defined", "ncp.bit10nflags", FT_BOOLEAN, 16, NULL, 0x00000200, NULL, HFILL }},
6943
6944         { &hf_bit11nflags,
6945         { "Not Defined", "ncp.bit11nflags", FT_BOOLEAN, 16, NULL, 0x00000400, NULL, HFILL }},
6946
6947         { &hf_bit12nflags,
6948         { "Not Defined", "ncp.bit12nflags", FT_BOOLEAN, 16, NULL, 0x00000800, NULL, HFILL }},
6949
6950         { &hf_bit13nflags,
6951         { "Not Defined", "ncp.bit13nflags", FT_BOOLEAN, 16, NULL, 0x00001000, NULL, HFILL }},
6952
6953         { &hf_bit14nflags,
6954         { "Prefer Referrals", "ncp.bit14nflags", FT_BOOLEAN, 16, NULL, 0x00002000, NULL, HFILL }},
6955
6956         { &hf_bit15nflags,
6957         { "Prefer Only Referrals", "ncp.bit15nflags", FT_BOOLEAN, 16, NULL, 0x00004000, NULL, HFILL }},
6958
6959         { &hf_bit16nflags,
6960         { "Not Defined", "ncp.bit16nflags", FT_BOOLEAN, 16, NULL, 0x00008000, NULL, HFILL }},
6961
6962         { &hf_bit1rflags,
6963         { "Typeless", "ncp.bit1rflags", FT_BOOLEAN, 16, NULL, 0x00000001, NULL, HFILL }},
6964
6965         { &hf_bit2rflags,
6966         { "Slashed", "ncp.bit2rflags", FT_BOOLEAN, 16, NULL, 0x00000002, NULL, HFILL }},
6967
6968         { &hf_bit3rflags,
6969         { "Dotted", "ncp.bit3rflags", FT_BOOLEAN, 16, NULL, 0x00000004, NULL, HFILL }},
6970
6971         { &hf_bit4rflags,
6972         { "Tuned", "ncp.bit4rflags", FT_BOOLEAN, 16, NULL, 0x00000008, NULL, HFILL }},
6973
6974         { &hf_bit5rflags,
6975         { "Not Defined", "ncp.bit5rflags", FT_BOOLEAN, 16, NULL, 0x00000010, NULL, HFILL }},
6976
6977         { &hf_bit6rflags,
6978         { "Not Defined", "ncp.bit6rflags", FT_BOOLEAN, 16, NULL, 0x00000020, NULL, HFILL }},
6979
6980         { &hf_bit7rflags,
6981         { "Not Defined", "ncp.bit7rflags", FT_BOOLEAN, 16, NULL, 0x00000040, NULL, HFILL }},
6982
6983         { &hf_bit8rflags,
6984         { "Not Defined", "ncp.bit8rflags", FT_BOOLEAN, 16, NULL, 0x00000080, NULL, HFILL }},
6985
6986         { &hf_bit9rflags,
6987         { "Not Defined", "ncp.bit9rflags", FT_BOOLEAN, 16, NULL, 0x00000100, NULL, HFILL }},
6988
6989         { &hf_bit10rflags,
6990         { "Not Defined", "ncp.bit10rflags", FT_BOOLEAN, 16, NULL, 0x00000200, NULL, HFILL }},
6991
6992         { &hf_bit11rflags,
6993         { "Not Defined", "ncp.bit11rflags", FT_BOOLEAN, 16, NULL, 0x00000400, NULL, HFILL }},
6994
6995         { &hf_bit12rflags,
6996         { "Not Defined", "ncp.bit12rflags", FT_BOOLEAN, 16, NULL, 0x00000800, NULL, HFILL }},
6997
6998         { &hf_bit13rflags,
6999         { "Not Defined", "ncp.bit13rflags", FT_BOOLEAN, 16, NULL, 0x00001000, NULL, HFILL }},
7000
7001         { &hf_bit14rflags,
7002         { "Not Defined", "ncp.bit14rflags", FT_BOOLEAN, 16, NULL, 0x00002000, NULL, HFILL }},
7003
7004         { &hf_bit15rflags,
7005         { "Not Defined", "ncp.bit15rflags", FT_BOOLEAN, 16, NULL, 0x00004000, NULL, HFILL }},
7006
7007         { &hf_bit16rflags,
7008         { "Not Defined", "ncp.bit16rflags", FT_BOOLEAN, 16, NULL, 0x00008000, NULL, HFILL }},
7009
7010         { &hf_bit1eflags,
7011         { "Alias Entry", "ncp.bit1eflags", FT_BOOLEAN, 16, NULL, 0x00000001, NULL, HFILL }},
7012
7013         { &hf_bit2eflags,
7014         { "Partition Root", "ncp.bit2eflags", FT_BOOLEAN, 16, NULL, 0x00000002, NULL, HFILL }},
7015
7016         { &hf_bit3eflags,
7017         { "Container Entry", "ncp.bit3eflags", FT_BOOLEAN, 16, NULL, 0x00000004, NULL, HFILL }},
7018
7019         { &hf_bit4eflags,
7020         { "Container Alias", "ncp.bit4eflags", FT_BOOLEAN, 16, NULL, 0x00000008, NULL, HFILL }},
7021
7022         { &hf_bit5eflags,
7023         { "Matches List Filter", "ncp.bit5eflags", FT_BOOLEAN, 16, NULL, 0x00000010, NULL, HFILL }},
7024
7025         { &hf_bit6eflags,
7026         { "Reference Entry", "ncp.bit6eflags", FT_BOOLEAN, 16, NULL, 0x00000020, NULL, HFILL }},
7027
7028         { &hf_bit7eflags,
7029         { "40x Reference Entry", "ncp.bit7eflags", FT_BOOLEAN, 16, NULL, 0x00000040, NULL, HFILL }},
7030
7031         { &hf_bit8eflags,
7032         { "Back Linked", "ncp.bit8eflags", FT_BOOLEAN, 16, NULL, 0x00000080, NULL, HFILL }},
7033
7034         { &hf_bit9eflags,
7035         { "New Entry", "ncp.bit9eflags", FT_BOOLEAN, 16, NULL, 0x00000100, NULL, HFILL }},
7036
7037         { &hf_bit10eflags,
7038         { "Temporary Reference", "ncp.bit10eflags", FT_BOOLEAN, 16, NULL, 0x00000200, NULL, HFILL }},
7039
7040         { &hf_bit11eflags,
7041         { "Audited", "ncp.bit11eflags", FT_BOOLEAN, 16, NULL, 0x00000400, NULL, HFILL }},
7042
7043         { &hf_bit12eflags,
7044         { "Entry Not Present", "ncp.bit12eflags", FT_BOOLEAN, 16, NULL, 0x00000800, NULL, HFILL }},
7045
7046         { &hf_bit13eflags,
7047         { "Entry Verify CTS", "ncp.bit13eflags", FT_BOOLEAN, 16, NULL, 0x00001000, NULL, HFILL }},
7048
7049         { &hf_bit14eflags,
7050         { "Entry Damaged", "ncp.bit14eflags", FT_BOOLEAN, 16, NULL, 0x00002000, NULL, HFILL }},
7051
7052         { &hf_bit15eflags,
7053         { "Not Defined", "ncp.bit15rflags", FT_BOOLEAN, 16, NULL, 0x00004000, NULL, HFILL }},
7054
7055         { &hf_bit16eflags,
7056         { "Not Defined", "ncp.bit16rflags", FT_BOOLEAN, 16, NULL, 0x00008000, NULL, HFILL }},
7057
7058         { &hf_bit1infoflagsl,
7059         { "Output Flags", "ncp.bit1infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000001, NULL, HFILL }},
7060
7061         { &hf_bit2infoflagsl,
7062         { "Entry ID", "ncp.bit2infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000002, NULL, HFILL }},
7063
7064         { &hf_bit3infoflagsl,
7065         { "Entry Flags", "ncp.bit3infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000004, NULL, HFILL }},
7066
7067         { &hf_bit4infoflagsl,
7068         { "Subordinate Count", "ncp.bit4infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000008, NULL, HFILL }},
7069
7070         { &hf_bit5infoflagsl,
7071         { "Modification Time", "ncp.bit5infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000010, NULL, HFILL }},
7072
7073         { &hf_bit6infoflagsl,
7074         { "Modification Timestamp", "ncp.bit6infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000020, NULL, HFILL }},
7075
7076         { &hf_bit7infoflagsl,
7077         { "Creation Timestamp", "ncp.bit7infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000040, NULL, HFILL }},
7078
7079         { &hf_bit8infoflagsl,
7080         { "Partition Root ID", "ncp.bit8infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000080, NULL, HFILL }},
7081
7082         { &hf_bit9infoflagsl,
7083         { "Parent ID", "ncp.bit9infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000100, NULL, HFILL }},
7084
7085         { &hf_bit10infoflagsl,
7086         { "Revision Count", "ncp.bit10infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000200, NULL, HFILL }},
7087
7088         { &hf_bit11infoflagsl,
7089         { "Replica Type", "ncp.bit11infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000400, NULL, HFILL }},
7090
7091         { &hf_bit12infoflagsl,
7092         { "Base Class", "ncp.bit12infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000800, NULL, HFILL }},
7093
7094         { &hf_bit13infoflagsl,
7095         { "Relative Distinguished Name", "ncp.bit13infoflagsl", FT_BOOLEAN, 16, NULL, 0x00001000, NULL, HFILL }},
7096
7097         { &hf_bit14infoflagsl,
7098         { "Distinguished Name", "ncp.bit14infoflagsl", FT_BOOLEAN, 16, NULL, 0x00002000, NULL, HFILL }},
7099
7100         { &hf_bit15infoflagsl,
7101         { "Root Distinguished Name", "ncp.bit15infoflagsl", FT_BOOLEAN, 16, NULL, 0x00004000, NULL, HFILL }},
7102
7103         { &hf_bit16infoflagsl,
7104         { "Parent Distinguished Name", "ncp.bit16infoflagsl", FT_BOOLEAN, 16, NULL, 0x00008000, NULL, HFILL }},
7105
7106         { &hf_bit1infoflagsh,
7107         { "Purge Time", "ncp.bit1infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000001, NULL, HFILL }},
7108
7109         { &hf_bit2infoflagsh,
7110         { "Dereference Base Class", "ncp.bit2infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000002, NULL, HFILL }},
7111
7112         { &hf_bit3infoflagsh,
7113         { "Not Defined", "ncp.bit3infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000004, NULL, HFILL }},
7114
7115         { &hf_bit4infoflagsh,
7116         { "Not Defined", "ncp.bit4infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000008, NULL, HFILL }},
7117
7118         { &hf_bit5infoflagsh,
7119         { "Not Defined", "ncp.bit5infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000010, NULL, HFILL }},
7120
7121         { &hf_bit6infoflagsh,
7122         { "Not Defined", "ncp.bit6infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000020, NULL, HFILL }},
7123
7124         { &hf_bit7infoflagsh,
7125         { "Not Defined", "ncp.bit7infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000040, NULL, HFILL }},
7126
7127         { &hf_bit8infoflagsh,
7128         { "Not Defined", "ncp.bit8infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000080, NULL, HFILL }},
7129
7130         { &hf_bit9infoflagsh,
7131         { "Not Defined", "ncp.bit9infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000100, NULL, HFILL }},
7132
7133         { &hf_bit10infoflagsh,
7134         { "Not Defined", "ncp.bit10infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000200, NULL, HFILL }},
7135
7136         { &hf_bit11infoflagsh,
7137         { "Not Defined", "ncp.bit11infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000400, NULL, HFILL }},
7138
7139         { &hf_bit12infoflagsh,
7140         { "Not Defined", "ncp.bit12infoflagshs", FT_BOOLEAN, 16, NULL, 0x00000800, NULL, HFILL }},
7141
7142         { &hf_bit13infoflagsh,
7143         { "Not Defined", "ncp.bit13infoflagsh", FT_BOOLEAN, 16, NULL, 0x00001000, NULL, HFILL }},
7144
7145         { &hf_bit14infoflagsh,
7146         { "Not Defined", "ncp.bit14infoflagsh", FT_BOOLEAN, 16, NULL, 0x00002000, NULL, HFILL }},
7147
7148         { &hf_bit15infoflagsh,
7149         { "Not Defined", "ncp.bit15infoflagsh", FT_BOOLEAN, 16, NULL, 0x00004000, NULL, HFILL }},
7150
7151         { &hf_bit16infoflagsh,
7152         { "Not Defined", "ncp.bit16infoflagsh", FT_BOOLEAN, 16, NULL, 0x00008000, NULL, HFILL }},
7153
7154         { &hf_bit1lflags,
7155         { "List Typeless", "ncp.bit1lflags", FT_BOOLEAN, 16, NULL, 0x00000001, NULL, HFILL }},
7156
7157         { &hf_bit2lflags,
7158         { "List Containers", "ncp.bit2lflags", FT_BOOLEAN, 16, NULL, 0x00000002, NULL, HFILL }},
7159
7160         { &hf_bit3lflags,
7161         { "List Slashed", "ncp.bit3lflags", FT_BOOLEAN, 16, NULL, 0x00000004, NULL, HFILL }},
7162
7163         { &hf_bit4lflags,
7164         { "List Dotted", "ncp.bit4lflags", FT_BOOLEAN, 16, NULL, 0x00000008, NULL, HFILL }},
7165
7166         { &hf_bit5lflags,
7167         { "Dereference Alias", "ncp.bit5lflags", FT_BOOLEAN, 16, NULL, 0x00000010, NULL, HFILL }},
7168
7169         { &hf_bit6lflags,
7170         { "List All Containers", "ncp.bit6lflags", FT_BOOLEAN, 16, NULL, 0x00000020, NULL, HFILL }},
7171
7172         { &hf_bit7lflags,
7173         { "List Obsolete", "ncp.bit7lflags", FT_BOOLEAN, 16, NULL, 0x00000040, NULL, HFILL }},
7174
7175         { &hf_bit8lflags,
7176         { "List Tuned Output", "ncp.bit8lflags", FT_BOOLEAN, 16, NULL, 0x00000080, NULL, HFILL }},
7177
7178         { &hf_bit9lflags,
7179         { "List External Reference", "ncp.bit9lflags", FT_BOOLEAN, 16, NULL, 0x00000100, NULL, HFILL }},
7180
7181         { &hf_bit10lflags,
7182         { "Not Defined", "ncp.bit10lflags", FT_BOOLEAN, 16, NULL, 0x00000200, NULL, HFILL }},
7183
7184         { &hf_bit11lflags,
7185         { "Not Defined", "ncp.bit11lflags", FT_BOOLEAN, 16, NULL, 0x00000400, NULL, HFILL }},
7186
7187         { &hf_bit12lflags,
7188         { "Not Defined", "ncp.bit12lflags", FT_BOOLEAN, 16, NULL, 0x00000800, NULL, HFILL }},
7189
7190         { &hf_bit13lflags,
7191         { "Not Defined", "ncp.bit13lflags", FT_BOOLEAN, 16, NULL, 0x00001000, NULL, HFILL }},
7192
7193         { &hf_bit14lflags,
7194         { "Not Defined", "ncp.bit14lflags", FT_BOOLEAN, 16, NULL, 0x00002000, NULL, HFILL }},
7195
7196         { &hf_bit15lflags,
7197         { "Not Defined", "ncp.bit15lflags", FT_BOOLEAN, 16, NULL, 0x00004000, NULL, HFILL }},
7198
7199         { &hf_bit16lflags,
7200         { "Not Defined", "ncp.bit16lflags", FT_BOOLEAN, 16, NULL, 0x00008000, NULL, HFILL }},
7201
7202         { &hf_bit1l1flagsl,
7203         { "Output Flags", "ncp.bit1l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000001, NULL, HFILL }},
7204
7205         { &hf_bit2l1flagsl,
7206         { "Entry ID", "ncp.bit2l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000002, NULL, HFILL }},
7207
7208         { &hf_bit3l1flagsl,
7209         { "Replica State", "ncp.bit3l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000004, NULL, HFILL }},
7210
7211         { &hf_bit4l1flagsl,
7212         { "Modification Timestamp", "ncp.bit4l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000008, NULL, HFILL }},
7213
7214         { &hf_bit5l1flagsl,
7215         { "Purge Time", "ncp.bit5l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000010, NULL, HFILL }},
7216
7217         { &hf_bit6l1flagsl,
7218         { "Local Partition ID", "ncp.bit6l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000020, NULL, HFILL }},
7219
7220         { &hf_bit7l1flagsl,
7221         { "Distinguished Name", "ncp.bit7l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000040, NULL, HFILL }},
7222
7223         { &hf_bit8l1flagsl,
7224         { "Replica Type", "ncp.bit8l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000080, NULL, HFILL }},
7225
7226         { &hf_bit9l1flagsl,
7227         { "Partition Busy", "ncp.bit9l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000100, NULL, HFILL }},
7228
7229         { &hf_bit10l1flagsl,
7230         { "Not Defined", "ncp.bit10l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000200, NULL, HFILL }},
7231
7232         { &hf_bit11l1flagsl,
7233         { "Not Defined", "ncp.bit11l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000400, NULL, HFILL }},
7234
7235         { &hf_bit12l1flagsl,
7236         { "Not Defined", "ncp.bit12l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000800, NULL, HFILL }},
7237
7238         { &hf_bit13l1flagsl,
7239         { "Not Defined", "ncp.bit13l1flagsl", FT_BOOLEAN, 16, NULL, 0x00001000, NULL, HFILL }},
7240
7241         { &hf_bit14l1flagsl,
7242         { "Not Defined", "ncp.bit14l1flagsl", FT_BOOLEAN, 16, NULL, 0x00002000, NULL, HFILL }},
7243
7244         { &hf_bit15l1flagsl,
7245         { "Not Defined", "ncp.bit15l1flagsl", FT_BOOLEAN, 16, NULL, 0x00004000, NULL, HFILL }},
7246
7247         { &hf_bit16l1flagsl,
7248         { "Not Defined", "ncp.bit16l1flagsl", FT_BOOLEAN, 16, NULL, 0x00008000, NULL, HFILL }},
7249
7250         { &hf_bit1l1flagsh,
7251         { "Not Defined", "ncp.bit1l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000001, NULL, HFILL }},
7252
7253         { &hf_bit2l1flagsh,
7254         { "Not Defined", "ncp.bit2l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000002, NULL, HFILL }},
7255
7256         { &hf_bit3l1flagsh,
7257         { "Not Defined", "ncp.bit3l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000004, NULL, HFILL }},
7258
7259         { &hf_bit4l1flagsh,
7260         { "Not Defined", "ncp.bit4l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000008, NULL, HFILL }},
7261
7262         { &hf_bit5l1flagsh,
7263         { "Not Defined", "ncp.bit5l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000010, NULL, HFILL }},
7264
7265         { &hf_bit6l1flagsh,
7266         { "Not Defined", "ncp.bit6l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000020, NULL, HFILL }},
7267
7268         { &hf_bit7l1flagsh,
7269         { "Not Defined", "ncp.bit7l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000040, NULL, HFILL }},
7270
7271         { &hf_bit8l1flagsh,
7272         { "Not Defined", "ncp.bit8l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000080, NULL, HFILL }},
7273
7274         { &hf_bit9l1flagsh,
7275         { "Not Defined", "ncp.bit9l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000100, NULL, HFILL }},
7276
7277         { &hf_bit10l1flagsh,
7278         { "Not Defined", "ncp.bit10l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000200, NULL, HFILL }},
7279
7280         { &hf_bit11l1flagsh,
7281         { "Not Defined", "ncp.bit11l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000400, NULL, HFILL }},
7282
7283         { &hf_bit12l1flagsh,
7284         { "Not Defined", "ncp.bit12l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000800, NULL, HFILL }},
7285
7286         { &hf_bit13l1flagsh,
7287         { "Not Defined", "ncp.bit13l1flagsh", FT_BOOLEAN, 16, NULL, 0x00001000, NULL, HFILL }},
7288
7289         { &hf_bit14l1flagsh,
7290         { "Not Defined", "ncp.bit14l1flagsh", FT_BOOLEAN, 16, NULL, 0x00002000, NULL, HFILL }},
7291
7292         { &hf_bit15l1flagsh,
7293         { "Not Defined", "ncp.bit15l1flagsh", FT_BOOLEAN, 16, NULL, 0x00004000, NULL, HFILL }},
7294
7295         { &hf_bit16l1flagsh,
7296         { "Not Defined", "ncp.bit16l1flagsh", FT_BOOLEAN, 16, NULL, 0x00008000, NULL, HFILL }},
7297
7298         { &hf_bit1vflags,
7299         { "Naming", "ncp.bit1vflags", FT_BOOLEAN, 16, NULL, 0x00000001, NULL, HFILL }},
7300
7301         { &hf_bit2vflags,
7302         { "Base Class", "ncp.bit2vflags", FT_BOOLEAN, 16, NULL, 0x00000002, NULL, HFILL }},
7303
7304         { &hf_bit3vflags,
7305         { "Present", "ncp.bit3vflags", FT_BOOLEAN, 16, NULL, 0x00000004, NULL, HFILL }},
7306
7307         { &hf_bit4vflags,
7308         { "Value Damaged", "ncp.bit4vflags", FT_BOOLEAN, 16, NULL, 0x00000008, NULL, HFILL }},
7309
7310         { &hf_bit5vflags,
7311         { "Not Defined", "ncp.bit5vflags", FT_BOOLEAN, 16, NULL, 0x00000010, NULL, HFILL }},
7312
7313         { &hf_bit6vflags,
7314         { "Not Defined", "ncp.bit6vflags", FT_BOOLEAN, 16, NULL, 0x00000020, NULL, HFILL }},
7315
7316         { &hf_bit7vflags,
7317         { "Not Defined", "ncp.bit7vflags", FT_BOOLEAN, 16, NULL, 0x00000040, NULL, HFILL }},
7318
7319         { &hf_bit8vflags,
7320         { "Not Defined", "ncp.bit8vflags", FT_BOOLEAN, 16, NULL, 0x00000080, NULL, HFILL }},
7321
7322         { &hf_bit9vflags,
7323         { "Not Defined", "ncp.bit9vflags", FT_BOOLEAN, 16, NULL, 0x00000100, NULL, HFILL }},
7324
7325         { &hf_bit10vflags,
7326         { "Not Defined", "ncp.bit10vflags", FT_BOOLEAN, 16, NULL, 0x00000200, NULL, HFILL }},
7327
7328         { &hf_bit11vflags,
7329         { "Not Defined", "ncp.bit11vflags", FT_BOOLEAN, 16, NULL, 0x00000400, NULL, HFILL }},
7330
7331         { &hf_bit12vflags,
7332         { "Not Defined", "ncp.bit12vflags", FT_BOOLEAN, 16, NULL, 0x00000800, NULL, HFILL }},
7333
7334         { &hf_bit13vflags,
7335         { "Not Defined", "ncp.bit13vflags", FT_BOOLEAN, 16, NULL, 0x00001000, NULL, HFILL }},
7336
7337         { &hf_bit14vflags,
7338         { "Not Defined", "ncp.bit14vflags", FT_BOOLEAN, 16, NULL, 0x00002000, NULL, HFILL }},
7339
7340         { &hf_bit15vflags,
7341         { "Not Defined", "ncp.bit15vflags", FT_BOOLEAN, 16, NULL, 0x00004000, NULL, HFILL }},
7342
7343         { &hf_bit16vflags,
7344         { "Not Defined", "ncp.bit16vflags", FT_BOOLEAN, 16, NULL, 0x00008000, NULL, HFILL }},
7345
7346         { &hf_bit1cflags,
7347         { "Container", "ncp.bit1cflags", FT_BOOLEAN, 16, NULL, 0x00000001, NULL, HFILL }},
7348
7349         { &hf_bit2cflags,
7350         { "Effective", "ncp.bit2cflags", FT_BOOLEAN, 16, NULL, 0x00000002, NULL, HFILL }},
7351
7352         { &hf_bit3cflags,
7353         { "Class Definition Cannot be Removed", "ncp.bit3cflags", FT_BOOLEAN, 16, NULL, 0x00000004, NULL, HFILL }},
7354
7355         { &hf_bit4cflags,
7356         { "Ambiguous Naming", "ncp.bit4cflags", FT_BOOLEAN, 16, NULL, 0x00000008, NULL, HFILL }},
7357
7358         { &hf_bit5cflags,
7359         { "Ambiguous Containment", "ncp.bit5cflags", FT_BOOLEAN, 16, NULL, 0x00000010, NULL, HFILL }},
7360
7361         { &hf_bit6cflags,
7362         { "Auxiliary", "ncp.bit6cflags", FT_BOOLEAN, 16, NULL, 0x00000020, NULL, HFILL }},
7363
7364         { &hf_bit7cflags,
7365         { "Operational", "ncp.bit7cflags", FT_BOOLEAN, 16, NULL, 0x00000040, NULL, HFILL }},
7366
7367         { &hf_bit8cflags,
7368         { "Sparse Required", "ncp.bit8cflags", FT_BOOLEAN, 16, NULL, 0x00000080, NULL, HFILL }},
7369
7370         { &hf_bit9cflags,
7371         { "Sparse Operational", "ncp.bit9cflags", FT_BOOLEAN, 16, NULL, 0x00000100, NULL, HFILL }},
7372
7373         { &hf_bit10cflags,
7374         { "Not Defined", "ncp.bit10cflags", FT_BOOLEAN, 16, NULL, 0x00000200, NULL, HFILL }},
7375
7376         { &hf_bit11cflags,
7377         { "Not Defined", "ncp.bit11cflags", FT_BOOLEAN, 16, NULL, 0x00000400, NULL, HFILL }},
7378
7379         { &hf_bit12cflags,
7380         { "Not Defined", "ncp.bit12cflags", FT_BOOLEAN, 16, NULL, 0x00000800, NULL, HFILL }},
7381
7382         { &hf_bit13cflags,
7383         { "Not Defined", "ncp.bit13cflags", FT_BOOLEAN, 16, NULL, 0x00001000, NULL, HFILL }},
7384
7385         { &hf_bit14cflags,
7386         { "Not Defined", "ncp.bit14cflags", FT_BOOLEAN, 16, NULL, 0x00002000, NULL, HFILL }},
7387
7388         { &hf_bit15cflags,
7389         { "Not Defined", "ncp.bit15cflags", FT_BOOLEAN, 16, NULL, 0x00004000, NULL, HFILL }},
7390
7391         { &hf_bit16cflags,
7392         { "Not Defined", "ncp.bit16cflags", FT_BOOLEAN, 16, NULL, 0x00008000, NULL, HFILL }},
7393
7394         { &hf_bit1acflags,
7395         { "Single Valued", "ncp.bit1acflags", FT_BOOLEAN, 16, NULL, 0x00000001, NULL, HFILL }},
7396
7397         { &hf_bit2acflags,
7398         { "Sized", "ncp.bit2acflags", FT_BOOLEAN, 16, NULL, 0x00000002, NULL, HFILL }},
7399
7400         { &hf_bit3acflags,
7401         { "Non-Removable", "ncp.bit3acflags", FT_BOOLEAN, 16, NULL, 0x00000004, NULL, HFILL }},
7402
7403         { &hf_bit4acflags,
7404         { "Read Only", "ncp.bit4acflags", FT_BOOLEAN, 16, NULL, 0x00000008, NULL, HFILL }},
7405
7406         { &hf_bit5acflags,
7407         { "Hidden", "ncp.bit5acflags", FT_BOOLEAN, 16, NULL, 0x00000010, NULL, HFILL }},
7408
7409         { &hf_bit6acflags,
7410         { "String", "ncp.bit6acflags", FT_BOOLEAN, 16, NULL, 0x00000020, NULL, HFILL }},
7411
7412         { &hf_bit7acflags,
7413         { "Synchronize Immediate", "ncp.bit7acflags", FT_BOOLEAN, 16, NULL, 0x00000040, NULL, HFILL }},
7414
7415         { &hf_bit8acflags,
7416         { "Public Read", "ncp.bit8acflags", FT_BOOLEAN, 16, NULL, 0x00000080, NULL, HFILL }},
7417
7418         { &hf_bit9acflags,
7419         { "Server Read", "ncp.bit9acflags", FT_BOOLEAN, 16, NULL, 0x00000100, NULL, HFILL }},
7420
7421         { &hf_bit10acflags,
7422         { "Write Managed", "ncp.bit10acflags", FT_BOOLEAN, 16, NULL, 0x00000200, NULL, HFILL }},
7423
7424         { &hf_bit11acflags,
7425         { "Per Replica", "ncp.bit11acflags", FT_BOOLEAN, 16, NULL, 0x00000400, NULL, HFILL }},
7426
7427         { &hf_bit12acflags,
7428         { "Never Schedule Synchronization", "ncp.bit12acflags", FT_BOOLEAN, 16, NULL, 0x00000800, NULL, HFILL }},
7429
7430         { &hf_bit13acflags,
7431         { "Operational", "ncp.bit13acflags", FT_BOOLEAN, 16, NULL, 0x00001000, NULL, HFILL }},
7432
7433         { &hf_bit14acflags,
7434         { "Not Defined", "ncp.bit14acflags", FT_BOOLEAN, 16, NULL, 0x00002000, NULL, HFILL }},
7435
7436         { &hf_bit15acflags,
7437         { "Not Defined", "ncp.bit15acflags", FT_BOOLEAN, 16, NULL, 0x00004000, NULL, HFILL }},
7438
7439         { &hf_bit16acflags,
7440         { "Not Defined", "ncp.bit16acflags", FT_BOOLEAN, 16, NULL, 0x00008000, NULL, HFILL }},
7441
7442
7443         { &hf_nds_reply_error,
7444         { "NDS Error", "ncp.ndsreplyerror", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7445
7446         { &hf_nds_net,
7447         { "Network","ncp.ndsnet", FT_IPXNET, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7448
7449         { &hf_nds_node,
7450         { "Node",       "ncp.ndsnode", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7451
7452         { &hf_nds_socket,
7453         { "Socket",     "ncp.ndssocket", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7454
7455         { &hf_add_ref_ip,
7456         { "Address Referral", "ncp.ipref", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7457
7458         { &hf_add_ref_udp,
7459         { "Address Referral", "ncp.udpref", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7460
7461         { &hf_add_ref_tcp,
7462         { "Address Referral", "ncp.tcpref", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7463
7464         { &hf_referral_record,
7465         { "Referral Record", "ncp.ref_rec", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7466
7467         { &hf_referral_addcount,
7468         { "Address Count", "ncp.ref_addcount", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7469
7470         { &hf_nds_port,
7471         { "Port", "ncp.ndsport", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7472
7473         { &hf_mv_string,
7474         { "Attribute Name", "ncp.mv_string", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7475
7476         { &hf_nds_syntax,
7477         { "Attribute Syntax", "ncp.nds_syntax", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7478
7479         { &hf_value_string,
7480         { "Value", "ncp.value_string", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7481
7482         { &hf_nds_stream_name,
7483         { "Stream Name", "ncp.nds_stream_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7484
7485         { &hf_nds_buffer_size,
7486         { "NDS Reply Buffer Size", "ncp.nds_reply_buf", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7487
7488         { &hf_nds_ver,
7489         { "NDS Version", "ncp.nds_ver", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7490
7491         { &hf_nds_nflags,
7492         { "Flags", "ncp.nds_nflags", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7493
7494         { &hf_nds_rflags,
7495         { "Request Flags", "ncp.nds_rflags", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7496
7497         { &hf_nds_eflags,
7498         { "Entry Flags", "ncp.nds_eflags", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7499
7500         { &hf_nds_scope,
7501         { "Scope", "ncp.nds_scope", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7502
7503         { &hf_nds_name,
7504         { "Name", "ncp.nds_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7505
7506         { &hf_nds_name_type,
7507         { "Name Type", "ncp.nds_name_type", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7508
7509         { &hf_nds_comm_trans,
7510         { "Communications Transport", "ncp.nds_comm_trans", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7511
7512         { &hf_nds_tree_trans,
7513         { "Tree Walker Transport", "ncp.nds_tree_trans", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7514
7515         { &hf_nds_iteration,
7516         { "Iteration Handle", "ncp.nds_iteration", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7517
7518         { &hf_nds_iterator,
7519         { "Iterator", "ncp.nds_iterator", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7520
7521         { &hf_nds_file_handle,
7522         { "File Handle", "ncp.nds_file_handle", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7523
7524         { &hf_nds_file_size,
7525         { "File Size", "ncp.nds_file_size", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7526
7527         { &hf_nds_eid,
7528         { "NDS EID", "ncp.nds_eid", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7529
7530         { &hf_nds_depth,
7531         { "Distance object is from Root", "ncp.nds_depth", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7532
7533         { &hf_nds_info_type,
7534         { "Info Type", "ncp.nds_info_type", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7535
7536         { &hf_nds_class_def_type,
7537         { "Class Definition Type", "ncp.nds_class_def_type", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7538
7539         { &hf_nds_all_attr,
7540         { "All Attributes", "ncp.nds_all_attr", FT_UINT32, BASE_DEC, NULL, 0x0, "Return all Attributes?", HFILL }},
7541
7542         { &hf_nds_return_all_classes,
7543         { "All Classes", "ncp.nds_return_all_classes", FT_STRING, BASE_NONE, NULL, 0x0, "Return all Classes?", HFILL }},
7544
7545         { &hf_nds_req_flags,
7546         { "Request Flags", "ncp.nds_req_flags", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7547
7548         { &hf_nds_attr,
7549         { "Attributes", "ncp.nds_attributes", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7550
7551         { &hf_nds_classes,
7552         { "Classes", "ncp.nds_classes", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7553
7554         { &hf_nds_crc,
7555         { "CRC", "ncp.nds_crc", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7556
7557         { &hf_nds_referrals,
7558         { "Referrals", "ncp.nds_referrals", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7559
7560         { &hf_nds_result_flags,
7561         { "Result Flags", "ncp.nds_result_flags", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7562
7563         { &hf_nds_stream_flags,
7564         { "Streams Flags", "ncp.nds_stream_flags", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7565
7566         { &hf_nds_tag_string,
7567         { "Tags", "ncp.nds_tags", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7568
7569         { &hf_value_bytes,
7570         { "Bytes", "ncp.value_bytes", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7571
7572         { &hf_replica_type,
7573         { "Replica Type", "ncp.rtype", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7574
7575         { &hf_replica_state,
7576         { "Replica State", "ncp.rstate", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7577
7578         { &hf_nds_rnum,
7579         { "Replica Number", "ncp.rnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7580
7581         { &hf_nds_revent,
7582         { "Event", "ncp.revent", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7583
7584         { &hf_replica_number,
7585         { "Replica Number", "ncp.rnum", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7586
7587         { &hf_min_nds_ver,
7588         { "Minimum NDS Version", "ncp.min_nds_version", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7589
7590         { &hf_nds_ver_include,
7591         { "Include NDS Version", "ncp.inc_nds_ver", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7592
7593         { &hf_nds_ver_exclude,
7594         { "Exclude NDS Version", "ncp.exc_nds_ver", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7595
7596         { &hf_nds_es,
7597         { "Input Entry Specifier", "ncp.nds_es", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7598
7599         { &hf_es_type,
7600         { "Entry Specifier Type", "ncp.nds_es_type", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7601
7602         { &hf_rdn_string,
7603         { "RDN", "ncp.nds_rdn", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7604
7605         { &hf_delim_string,
7606         { "Delimiter", "ncp.nds_delim", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7607
7608         { &hf_nds_dn_output_type,
7609         { "Output Entry Specifier Type", "ncp.nds_out_es_type", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7610
7611         { &hf_nds_nested_output_type,
7612         { "Nested Output Entry Specifier Type", "ncp.nds_nested_out_es", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7613
7614         { &hf_nds_output_delimiter,
7615         { "Output Delimiter", "ncp.nds_out_delimiter", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7616
7617         { &hf_nds_output_entry_specifier,
7618         { "Output Entry Specifier", "ncp.nds_out_es", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7619
7620         { &hf_es_value,
7621         { "Entry Specifier Value", "ncp.nds_es_value", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7622
7623         { &hf_es_rdn_count,
7624         { "RDN Count", "ncp.nds_es_rdn_count", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7625
7626         { &hf_nds_replica_num,
7627         { "Replica Number", "ncp.nds_replica_num", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7628
7629         { &hf_es_seconds,
7630         { "Seconds", "ncp.nds_es_seconds", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0, NULL, HFILL }},
7631
7632         { &hf_nds_event_num,
7633         { "Event Number", "ncp.nds_event_num", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7634
7635         { &hf_nds_compare_results,
7636         { "Compare Results", "ncp.nds_compare_results", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7637
7638         { &hf_nds_parent,
7639         { "Parent ID", "ncp.nds_parent", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7640
7641         { &hf_nds_name_filter,
7642         { "Name Filter", "ncp.nds_name_filter", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7643
7644         { &hf_nds_class_filter,
7645         { "Class Filter", "ncp.nds_class_filter", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7646
7647         { &hf_nds_time_filter,
7648         { "Time Filter", "ncp.nds_time_filter", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7649
7650         { &hf_nds_partition_root_id,
7651         { "Partition Root ID", "ncp.nds_partition_root_id", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7652
7653         { &hf_nds_replicas,
7654         { "Replicas", "ncp.nds_replicas", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7655
7656         { &hf_nds_purge,
7657         { "Purge Time", "ncp.nds_purge", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0, NULL, HFILL }},
7658
7659         { &hf_nds_local_partition,
7660         { "Local Partition ID", "ncp.nds_local_partition", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7661
7662         { &hf_partition_busy,
7663         { "Partition Busy", "ncp.nds_partition_busy", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7664
7665         { &hf_nds_number_of_changes,
7666         { "Number of Attribute Changes", "ncp.nds_number_of_changes", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7667
7668         { &hf_sub_count,
7669         { "Subordinate Count", "ncp.sub_count", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7670
7671         { &hf_nds_revision,
7672         { "Revision Count", "ncp.nds_rev_count", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7673
7674         { &hf_nds_base_class,
7675         { "Base Class", "ncp.nds_base_class", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7676
7677         { &hf_nds_relative_dn,
7678         { "Relative Distinguished Name", "ncp.nds_relative_dn", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7679
7680         { &hf_nds_root_dn,
7681         { "Root Distinguished Name", "ncp.nds_root_dn", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7682
7683         { &hf_nds_parent_dn,
7684         { "Parent Distinguished Name", "ncp.nds_parent_dn", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7685
7686         { &hf_deref_base,
7687         { "Dereference Base Class", "ncp.nds_deref_base", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7688
7689         { &hf_nds_base,
7690         { "Base Class", "ncp.nds_base", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7691
7692         { &hf_nds_super,
7693         { "Super Class", "ncp.nds_super", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7694
7695         { &hf_nds_entry_info,
7696         { "Entry Information", "ncp.nds_entry_info", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7697
7698         { &hf_nds_privileges,
7699         { "Privileges", "ncp.nds_privileges", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7700
7701         { &hf_nds_compare_attributes,
7702         { "Compare Attributes?", "ncp.nds_compare_attributes", FT_BOOLEAN, 16, NULL, 0x00000001, NULL, HFILL }},
7703
7704         { &hf_nds_read_attribute,
7705         { "Read Attribute?", "ncp.nds_read_attribute", FT_BOOLEAN, 16, NULL, 0x00000002, NULL, HFILL }},
7706
7707         { &hf_nds_write_add_delete_attribute,
7708         { "Write, Add, Delete Attribute?", "ncp.nds_write_add_delete_attribute", FT_BOOLEAN, 16, NULL, 0x00000004, NULL, HFILL }},
7709
7710         { &hf_nds_add_delete_self,
7711         { "Add/Delete Self?", "ncp.nds_add_delete_self", FT_BOOLEAN, 16, NULL, 0x00000008, NULL, HFILL }},
7712
7713         { &hf_nds_privilege_not_defined,
7714         { "Privilege Not defined", "ncp.nds_privilege_not_defined", FT_BOOLEAN, 16, NULL, 0x00000010, NULL, HFILL }},
7715
7716         { &hf_nds_supervisor,
7717         { "Supervisor?", "ncp.nds_supervisor", FT_BOOLEAN, 16, NULL, 0x00000020, NULL, HFILL }},
7718
7719         { &hf_nds_inheritance_control,
7720         { "Inheritance?", "ncp.nds_inheritance_control", FT_BOOLEAN, 16, NULL, 0x00000040, NULL, HFILL }},
7721
7722         { &hf_nds_browse_entry,
7723         { "Browse Entry?", "ncp.nds_browse_entry", FT_BOOLEAN, 16, NULL, 0x00000001, NULL, HFILL }},
7724
7725         { &hf_nds_add_entry,
7726         { "Add Entry?", "ncp.nds_add_entry", FT_BOOLEAN, 16, NULL, 0x00000002, NULL, HFILL }},
7727
7728         { &hf_nds_delete_entry,
7729         { "Delete Entry?", "ncp.nds_delete_entry", FT_BOOLEAN, 16, NULL, 0x00000004, NULL, HFILL }},
7730
7731         { &hf_nds_rename_entry,
7732         { "Rename Entry?", "ncp.nds_rename_entry", FT_BOOLEAN, 16, NULL, 0x00000008, NULL, HFILL }},
7733
7734         { &hf_nds_supervisor_entry,
7735         { "Supervisor?", "ncp.nds_supervisor_entry", FT_BOOLEAN, 16, NULL, 0x00000010, NULL, HFILL }},
7736
7737         { &hf_nds_entry_privilege_not_defined,
7738         { "Privilege Not Defined", "ncp.nds_entry_privilege_not_defined", FT_BOOLEAN, 16, NULL, 0x00000020, NULL, HFILL }},
7739
7740         { &hf_nds_vflags,
7741         { "Value Flags", "ncp.nds_vflags", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7742
7743         { &hf_nds_value_len,
7744         { "Value Length", "ncp.nds_vlength", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7745
7746         { &hf_nds_cflags,
7747         { "Class Flags", "ncp.nds_cflags", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7748
7749         { &hf_nds_asn1,
7750         { "ASN.1 ID", "ncp.nds_asn1", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7751
7752         { &hf_nds_acflags,
7753         { "Attribute Constraint Flags", "ncp.nds_acflags", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7754
7755         { &hf_nds_upper,
7756         { "Upper Limit Value", "ncp.nds_upper", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7757
7758         { &hf_nds_lower,
7759         { "Lower Limit Value", "ncp.nds_lower", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7760
7761         { &hf_nds_trustee_dn,
7762         { "Trustee Distinguished Name", "ncp.nds_trustee_dn", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7763
7764         { &hf_nds_attribute_dn,
7765         { "Attribute Name", "ncp.nds_attribute_dn", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7766
7767         { &hf_nds_acl_add,
7768         { "Access Control Lists to Add", "ncp.nds_acl_add", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7769
7770         { &hf_nds_acl_del,
7771         { "Access Control Lists to Delete", "ncp.nds_acl_del", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7772
7773         { &hf_nds_att_add,
7774         { "Attribute to Add", "ncp.nds_att_add", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7775
7776         { &hf_nds_att_del,
7777         { "Attribute to Delete", "ncp.nds_att_del", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7778
7779         { &hf_nds_keep,
7780         { "Delete Original RDN", "ncp.nds_keep", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7781
7782         { &hf_nds_new_rdn,
7783         { "New Relative Distinguished Name", "ncp.nds_new_rdn", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7784
7785         { &hf_nds_time_delay,
7786         { "Time Delay", "ncp.nds_time_delay", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
7787
7788         { &hf_nds_root_name,
7789         { "Root Most Object Name", "ncp.nds_root_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7790
7791         { &hf_nds_new_part_id,
7792         { "New Partition Root ID", "ncp.nds_new_part_id", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7793
7794         { &hf_nds_child_part_id,
7795         { "Child Partition Root ID", "ncp.nds_child_part_id", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7796
7797         { &hf_nds_master_part_id,
7798         { "Master Partition Root ID", "ncp.nds_master_part_id", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7799
7800         { &hf_nds_target_name,
7801         { "Target Server Name", "ncp.nds_target_dn", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
7802
7803
7804         { &hf_bit1pingflags1,
7805         { "Supported Fields", "ncp.bit1pingflags1", FT_BOOLEAN, 16, NULL, 0x00000001, NULL, HFILL }},
7806
7807         { &hf_bit2pingflags1,
7808         { "Depth", "ncp.bit2pingflags1", FT_BOOLEAN, 16, NULL, 0x00000002, NULL, HFILL }},
7809
7810         { &hf_bit3pingflags1,
7811         { "Build Number", "ncp.bit3pingflags1", FT_BOOLEAN, 16, NULL, 0x00000004, NULL, HFILL }},
7812
7813         { &hf_bit4pingflags1,
7814         { "Flags", "ncp.bit4pingflags1", FT_BOOLEAN, 16, NULL, 0x00000008, NULL, HFILL }},
7815
7816         { &hf_bit5pingflags1,
7817         { "Verification Flags", "ncp.bit5pingflags1", FT_BOOLEAN, 16, NULL, 0x00000010, NULL, HFILL }},
7818
7819         { &hf_bit6pingflags1,
7820         { "Letter Version", "ncp.bit6pingflags1", FT_BOOLEAN, 16, NULL, 0x00000020, NULL, HFILL }},
7821
7822         { &hf_bit7pingflags1,
7823         { "OS Version", "ncp.bit7pingflags1", FT_BOOLEAN, 16, NULL, 0x00000040, NULL, HFILL }},
7824
7825         { &hf_bit8pingflags1,
7826         { "Not Defined", "ncp.bit8pingflags1", FT_BOOLEAN, 16, NULL, 0x00000080, NULL, HFILL }},
7827
7828         { &hf_bit9pingflags1,
7829         { "License Flags", "ncp.bit9pingflags1", FT_BOOLEAN, 16, NULL, 0x00000100, NULL, HFILL }},
7830
7831         { &hf_bit10pingflags1,
7832         { "DS Time", "ncp.bit10pingflags1", FT_BOOLEAN, 16, NULL, 0x00000200, NULL, HFILL }},
7833
7834         { &hf_bit11pingflags1,
7835         { "Server Time", "ncp.bit11pingflags1", FT_BOOLEAN, 16, NULL, 0x00000400, NULL, HFILL }},
7836
7837         { &hf_bit12pingflags1,
7838         { "Create Time", "ncp.bit12pingflags1", FT_BOOLEAN, 16, NULL, 0x00000800, NULL, HFILL }},
7839
7840         { &hf_bit13pingflags1,
7841         { "Not Defined", "ncp.bit13pingflags1", FT_BOOLEAN, 16, NULL, 0x00001000, NULL, HFILL }},
7842
7843         { &hf_bit14pingflags1,
7844         { "Not Defined", "ncp.bit14pingflags1", FT_BOOLEAN, 16, NULL, 0x00002000, NULL, HFILL }},
7845
7846         { &hf_bit15pingflags1,
7847         { "Not Defined", "ncp.bit15pingflags1", FT_BOOLEAN, 16, NULL, 0x00004000, NULL, HFILL }},
7848
7849         { &hf_bit16pingflags1,
7850         { "Not Defined", "ncp.bit16pingflags1", FT_BOOLEAN, 16, NULL, 0x00008000, NULL, HFILL }},
7851
7852         { &hf_bit1pingflags2,
7853         { "Sap Name", "ncp.bit1pingflags2", FT_BOOLEAN, 16, NULL, 0x00000001, NULL, HFILL }},
7854
7855         { &hf_bit2pingflags2,
7856         { "Tree Name", "ncp.bit2pingflags2", FT_BOOLEAN, 16, NULL, 0x00000002, NULL, HFILL }},
7857
7858         { &hf_bit3pingflags2,
7859         { "OS Name", "ncp.bit3pingflags2", FT_BOOLEAN, 16, NULL, 0x00000004, NULL, HFILL }},
7860
7861         { &hf_bit4pingflags2,
7862         { "Hardware Name", "ncp.bit4pingflags2", FT_BOOLEAN, 16, NULL, 0x00000008, NULL, HFILL }},
7863
7864         { &hf_bit5pingflags2,
7865         { "Vendor Name", "ncp.bit5pingflags2", FT_BOOLEAN, 16, NULL, 0x00000010, NULL, HFILL }},
7866
7867         { &hf_bit6pingflags2,
7868         { "Not Defined", "ncp.bit6pingflags2", FT_BOOLEAN, 16, NULL, 0x00000020, NULL, HFILL }},
7869
7870         { &hf_bit7pingflags2,
7871         { "Not Defined", "ncp.bit7pingflags2", FT_BOOLEAN, 16, NULL, 0x00000040, NULL, HFILL }},
7872
7873         { &hf_bit8pingflags2,
7874         { "Not Defined", "ncp.bit8pingflags2", FT_BOOLEAN, 16, NULL, 0x00000080, NULL, HFILL }},
7875
7876         { &hf_bit9pingflags2,
7877         { "Not Defined", "ncp.bit9pingflags2", FT_BOOLEAN, 16, NULL, 0x00000100, NULL, HFILL }},
7878
7879         { &hf_bit10pingflags2,
7880         { "Not Defined", "ncp.bit10pingflags2", FT_BOOLEAN, 16, NULL, 0x00000200, NULL, HFILL }},
7881
7882         { &hf_bit11pingflags2,
7883         { "Not Defined", "ncp.bit11pingflags2", FT_BOOLEAN, 16, NULL, 0x00000400, NULL, HFILL }},
7884
7885         { &hf_bit12pingflags2,
7886         { "Not Defined", "ncp.bit12pingflags2", FT_BOOLEAN, 16, NULL, 0x00000800, NULL, HFILL }},
7887
7888         { &hf_bit13pingflags2,
7889         { "Not Defined", "ncp.bit13pingflags2", FT_BOOLEAN, 16, NULL, 0x00001000, NULL, HFILL }},
7890
7891         { &hf_bit14pingflags2,
7892         { "Not Defined", "ncp.bit14pingflags2", FT_BOOLEAN, 16, NULL, 0x00002000, NULL, HFILL }},
7893
7894         { &hf_bit15pingflags2,
7895         { "Not Defined", "ncp.bit15pingflags2", FT_BOOLEAN, 16, NULL, 0x00004000, NULL, HFILL }},
7896
7897         { &hf_bit16pingflags2,
7898         { "Not Defined", "ncp.bit16pingflags2", FT_BOOLEAN, 16, NULL, 0x00008000, NULL, HFILL }},
7899
7900         { &hf_bit1pingpflags1,
7901         { "Root Most Master Replica", "ncp.bit1pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000001, NULL, HFILL }},
7902
7903         { &hf_bit2pingpflags1,
7904         { "Is Time Synchronized?", "ncp.bit2pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000002, NULL, HFILL }},
7905
7906         { &hf_bit3pingpflags1,
7907         { "Is Time Valid?", "ncp.bit3pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000004, NULL, HFILL }},
7908
7909         { &hf_bit4pingpflags1,
7910         { "Is DS Time Synchronized?", "ncp.bit4pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000008, NULL, HFILL }},
7911
7912         { &hf_bit5pingpflags1,
7913         { "Does Agent Have All Replicas?", "ncp.bit5pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000010, NULL, HFILL }},
7914
7915         { &hf_bit6pingpflags1,
7916         { "Not Defined", "ncp.bit6pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000020, NULL, HFILL }},
7917
7918         { &hf_bit7pingpflags1,
7919         { "Not Defined", "ncp.bit7pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000040, NULL, HFILL }},
7920
7921         { &hf_bit8pingpflags1,
7922         { "Not Defined", "ncp.bit8pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000080, NULL, HFILL }},
7923
7924         { &hf_bit9pingpflags1,
7925         { "Not Defined", "ncp.bit9pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000100, NULL, HFILL }},
7926
7927         { &hf_bit10pingpflags1,
7928         { "Not Defined", "ncp.bit10pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000200, NULL, HFILL }},
7929
7930         { &hf_bit11pingpflags1,
7931         { "Not Defined", "ncp.bit11pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000400, NULL, HFILL }},
7932
7933         { &hf_bit12pingpflags1,
7934         { "Not Defined", "ncp.bit12pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000800, NULL, HFILL }},
7935
7936         { &hf_bit13pingpflags1,
7937         { "Not Defined", "ncp.bit13pingpflags1", FT_BOOLEAN, 16, NULL, 0x00001000, NULL, HFILL }},
7938
7939         { &hf_bit14pingpflags1,
7940         { "Not Defined", "ncp.bit14pingpflags1", FT_BOOLEAN, 16, NULL, 0x00002000, NULL, HFILL }},
7941
7942         { &hf_bit15pingpflags1,
7943         { "Not Defined", "ncp.bit15pingpflags1", FT_BOOLEAN, 16, NULL, 0x00004000, NULL, HFILL }},
7944
7945         { &hf_bit16pingpflags1,
7946         { "Not Defined", "ncp.bit16pingpflags1", FT_BOOLEAN, 16, NULL, 0x00008000, NULL, HFILL }},
7947
7948         { &hf_bit1pingvflags1,
7949         { "Checksum", "ncp.bit1pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000001, NULL, HFILL }},
7950
7951         { &hf_bit2pingvflags1,
7952         { "CRC32", "ncp.bit2pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000002, NULL, HFILL }},
7953
7954         { &hf_bit3pingvflags1,
7955         { "Not Defined", "ncp.bit3pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000004, NULL, HFILL }},
7956
7957         { &hf_bit4pingvflags1,
7958         { "Not Defined", "ncp.bit4pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000008, NULL, HFILL }},
7959
7960         { &hf_bit5pingvflags1,
7961         { "Not Defined", "ncp.bit5pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000010, NULL, HFILL }},
7962
7963         { &hf_bit6pingvflags1,
7964         { "Not Defined", "ncp.bit6pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000020, NULL, HFILL }},
7965
7966         { &hf_bit7pingvflags1,
7967         { "Not Defined", "ncp.bit7pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000040, NULL, HFILL }},
7968
7969         { &hf_bit8pingvflags1,
7970         { "Not Defined", "ncp.bit8pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000080, NULL, HFILL }},
7971
7972         { &hf_bit9pingvflags1,
7973         { "Not Defined", "ncp.bit9pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000100, NULL, HFILL }},
7974
7975         { &hf_bit10pingvflags1,
7976         { "Not Defined", "ncp.bit10pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000200, NULL, HFILL }},
7977
7978         { &hf_bit11pingvflags1,
7979         { "Not Defined", "ncp.bit11pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000400, NULL, HFILL }},
7980
7981         { &hf_bit12pingvflags1,
7982         { "Not Defined", "ncp.bit12pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000800, NULL, HFILL }},
7983
7984         { &hf_bit13pingvflags1,
7985         { "Not Defined", "ncp.bit13pingvflags1", FT_BOOLEAN, 16, NULL, 0x00001000, NULL, HFILL }},
7986
7987         { &hf_bit14pingvflags1,
7988         { "Not Defined", "ncp.bit14pingvflags1", FT_BOOLEAN, 16, NULL, 0x00002000, NULL, HFILL }},
7989
7990         { &hf_bit15pingvflags1,
7991         { "Not Defined", "ncp.bit15pingvflags1", FT_BOOLEAN, 16, NULL, 0x00004000, NULL, HFILL }},
7992
7993         { &hf_bit16pingvflags1,
7994         { "Not Defined", "ncp.bit16pingvflags1", FT_BOOLEAN, 16, NULL, 0x00008000, NULL, HFILL }},
7995
7996         { &hf_nds_letter_ver,
7997         { "Letter Version", "ncp.nds_letter_ver", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
7998
7999         { &hf_nds_os_majver,
8000         { "OS Major Version", "ncp.nds_os_majver", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
8001
8002         { &hf_nds_os_minver,
8003         { "OS Minor Version", "ncp.nds_os_minver", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
8004
8005         { &hf_nds_lic_flags,
8006         { "License Flags", "ncp.nds_lic_flags", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8007
8008         { &hf_nds_ds_time,
8009         { "DS Time", "ncp.nds_ds_time", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0, NULL, HFILL }},
8010
8011         { &hf_nds_svr_time,
8012         { "Server Time", "ncp.nds_svr_time", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0, NULL, HFILL }},
8013
8014         { &hf_nds_crt_time,
8015         { "Agent Create Time", "ncp.nds_crt_time", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0, NULL, HFILL }},
8016
8017         { &hf_nds_ping_version,
8018         { "Ping Version", "ncp.nds_ping_version", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
8019
8020         { &hf_nds_search_scope,
8021         { "Search Scope", "ncp.nds_search_scope", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
8022
8023         { &hf_nds_num_objects,
8024         { "Number of Objects to Search", "ncp.nds_num_objects", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8025
8026
8027         { &hf_bit1siflags,
8028         { "Names", "ncp.bit1siflags", FT_BOOLEAN, 16, NULL, 0x00000001, NULL, HFILL }},
8029
8030         { &hf_bit2siflags,
8031         { "Names and Values", "ncp.bit2siflags", FT_BOOLEAN, 16, NULL, 0x00000002, NULL, HFILL }},
8032
8033         { &hf_bit3siflags,
8034         { "Effective Privileges", "ncp.bit3siflags", FT_BOOLEAN, 16, NULL, 0x00000004, NULL, HFILL }},
8035
8036         { &hf_bit4siflags,
8037         { "Value Info", "ncp.bit4siflags", FT_BOOLEAN, 16, NULL, 0x00000008, NULL, HFILL }},
8038
8039         { &hf_bit5siflags,
8040         { "Abbreviated Value", "ncp.bit5siflags", FT_BOOLEAN, 16, NULL, 0x00000010, NULL, HFILL }},
8041
8042         { &hf_bit6siflags,
8043         { "Not Defined", "ncp.bit6siflags", FT_BOOLEAN, 16, NULL, 0x00000020, NULL, HFILL }},
8044
8045         { &hf_bit7siflags,
8046         { "Not Defined", "ncp.bit7siflags", FT_BOOLEAN, 16, NULL, 0x00000040, NULL, HFILL }},
8047
8048         { &hf_bit8siflags,
8049         { "Not Defined", "ncp.bit8siflags", FT_BOOLEAN, 16, NULL, 0x00000080, NULL, HFILL }},
8050
8051         { &hf_bit9siflags,
8052         { "Expanded Class", "ncp.bit9siflags", FT_BOOLEAN, 16, NULL, 0x00000100, NULL, HFILL }},
8053
8054         { &hf_bit10siflags,
8055         { "Not Defined", "ncp.bit10siflags", FT_BOOLEAN, 16, NULL, 0x00000200, NULL, HFILL }},
8056
8057         { &hf_bit11siflags,
8058         { "Not Defined", "ncp.bit11siflags", FT_BOOLEAN, 16, NULL, 0x00000400, NULL, HFILL }},
8059
8060         { &hf_bit12siflags,
8061         { "Not Defined", "ncp.bit12siflags", FT_BOOLEAN, 16, NULL, 0x00000800, NULL, HFILL }},
8062
8063         { &hf_bit13siflags,
8064         { "Not Defined", "ncp.bit13siflags", FT_BOOLEAN, 16, NULL, 0x00001000, NULL, HFILL }},
8065
8066         { &hf_bit14siflags,
8067         { "Not Defined", "ncp.bit14siflags", FT_BOOLEAN, 16, NULL, 0x00002000, NULL, HFILL }},
8068
8069         { &hf_bit15siflags,
8070         { "Not Defined", "ncp.bit15siflags", FT_BOOLEAN, 16, NULL, 0x00004000, NULL, HFILL }},
8071
8072         { &hf_bit16siflags,
8073         { "Not Defined", "ncp.bit16siflags", FT_BOOLEAN, 16, NULL, 0x00008000, NULL, HFILL }},
8074
8075         { &hf_nds_segment_overlap,
8076         { "Segment overlap", "nds.segment.overlap", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Segment overlaps with other segments", HFILL }},
8077
8078         { &hf_nds_segment_overlap_conflict,
8079         { "Conflicting data in segment overlap", "nds.segment.overlap.conflict", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Overlapping segments contained conflicting data", HFILL }},
8080
8081         { &hf_nds_segment_multiple_tails,
8082         { "Multiple tail segments found", "nds.segment.multipletails", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Several tails were found when desegmenting the packet", HFILL }},
8083
8084         { &hf_nds_segment_too_long_segment,
8085         { "Segment too long", "nds.segment.toolongsegment", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Segment contained data past end of packet", HFILL }},
8086
8087         { &hf_nds_segment_error,
8088         { "Desegmentation error", "nds.segment.error", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "Desegmentation error due to illegal segments", HFILL }},
8089
8090         { &hf_nds_reassembled_length,
8091         { "Reassembled NDS length", "nds.reassembled.length", FT_UINT32, BASE_DEC, NULL, 0x0, "The total length of the reassembled payload", HFILL }},
8092
8093         { &hf_nds_segment,
8094         { "NDS Fragment", "nds.fragment", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "NDPS Fragment", HFILL }},
8095
8096         { &hf_nds_segments,
8097         { "NDS Fragments", "nds.fragments", FT_NONE, BASE_NONE, NULL, 0x0, "NDPS Fragments", HFILL }},
8098
8099         { &hf_nds_verb2b_req_flags,
8100         { "Flags", "ncp.nds_verb2b_flags", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8101
8102         { &hf_ncp_ip_address,
8103         { "IP Address", "ncp.ip_addr", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
8104
8105         { &hf_ncp_copyright,
8106         { "Copyright", "ncp.copyright", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
8107
8108         { &hf_ndsprot1flag,
8109         { "Not Defined", "ncp.nds_prot_bit1", FT_BOOLEAN, 16, NULL, 0x00000001, NULL, HFILL }},
8110
8111         { &hf_ndsprot2flag,
8112         { "Not Defined", "ncp.nds_prot_bit2", FT_BOOLEAN, 16, NULL, 0x00000002, NULL, HFILL }},
8113
8114         { &hf_ndsprot3flag,
8115         { "Not Defined", "ncp.nds_prot_bit3", FT_BOOLEAN, 16, NULL, 0x00000004, NULL, HFILL }},
8116
8117         { &hf_ndsprot4flag,
8118         { "Not Defined", "ncp.nds_prot_bit4", FT_BOOLEAN, 16, NULL, 0x00000008, NULL, HFILL }},
8119
8120         { &hf_ndsprot5flag,
8121         { "Not Defined", "ncp.nds_prot_bit5", FT_BOOLEAN, 16, NULL, 0x00000010, NULL, HFILL }},
8122
8123         { &hf_ndsprot6flag,
8124         { "Not Defined", "ncp.nds_prot_bit6", FT_BOOLEAN, 16, NULL, 0x00000020, NULL, HFILL }},
8125
8126         { &hf_ndsprot7flag,
8127         { "Not Defined", "ncp.nds_prot_bit7", FT_BOOLEAN, 16, NULL, 0x00000040, NULL, HFILL }},
8128
8129         { &hf_ndsprot8flag,
8130         { "Not Defined", "ncp.nds_prot_bit8", FT_BOOLEAN, 16, NULL, 0x00000080, NULL, HFILL }},
8131
8132         { &hf_ndsprot9flag,
8133         { "Not Defined", "ncp.nds_prot_bit9", FT_BOOLEAN, 16, NULL, 0x00000100, NULL, HFILL }},
8134
8135         { &hf_ndsprot10flag,
8136         { "Not Defined", "ncp.nds_prot_bit10", FT_BOOLEAN, 16, NULL, 0x00000200, NULL, HFILL }},
8137
8138         { &hf_ndsprot11flag,
8139         { "Not Defined", "ncp.nds_prot_bit11", FT_BOOLEAN, 16, NULL, 0x00000400, NULL, HFILL }},
8140
8141         { &hf_ndsprot12flag,
8142         { "Not Defined", "ncp.nds_prot_bit12", FT_BOOLEAN, 16, NULL, 0x00000800, NULL, HFILL }},
8143
8144         { &hf_ndsprot13flag,
8145         { "Not Defined", "ncp.nds_prot_bit13", FT_BOOLEAN, 16, NULL, 0x00001000, NULL, HFILL }},
8146
8147         { &hf_ndsprot14flag,
8148         { "Not Defined", "ncp.nds_prot_bit14", FT_BOOLEAN, 16, NULL, 0x00002000, NULL, HFILL }},
8149
8150         { &hf_ndsprot15flag,
8151         { "Include CRC in NDS Header", "ncp.nds_prot_bit15", FT_BOOLEAN, 16, NULL, 0x00004000, NULL, HFILL }},
8152
8153         { &hf_ndsprot16flag,
8154         { "Client is a Server", "ncp.nds_prot_bit16", FT_BOOLEAN, 16, NULL, 0x00008000, NULL, HFILL }},
8155
8156         { &hf_nds_svr_dst_name,
8157         { "Server Distinguished Name", "ncp.nds_svr_dist_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
8158
8159         { &hf_nds_tune_mark,
8160         { "Tune Mark",  "ncp.ndstunemark", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8161
8162         { &hf_nds_create_time,
8163         { "NDS Creation Time",  "ncp.ndscreatetime", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0, NULL, HFILL }},
8164
8165         { &hf_srvr_param_string,
8166         { "Set Parameter Value", "ncp.srvr_param_string", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
8167
8168         { &hf_srvr_param_number,
8169         { "Set Parameter Value", "ncp.srvr_param_string", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
8170
8171         { &hf_srvr_param_boolean,
8172         { "Set Parameter Value", "ncp.srvr_param_boolean", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL }},
8173
8174         { &hf_nds_number_of_items,
8175         { "Number of Items", "ncp.ndsitems", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
8176
8177         { &hf_ncp_nds_iterverb,
8178         { "NDS Iteration Verb", "ncp.ndsiterverb", FT_UINT32, BASE_HEX, NULL /*VALS(iterator_subverbs)*/, 0x0, NULL, HFILL }},
8179
8180         { &hf_iter_completion_code,
8181         { "Iteration Completion Code", "ncp.iter_completion_code", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8182
8183         { &hf_nds_iterobj,
8184         { "Iterator Object", "ncp.ndsiterobj", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8185
8186         { &hf_iter_verb_completion_code,
8187         { "Completion Code", "ncp.iter_verb_completion_code", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8188
8189         { &hf_iter_ans,
8190         { "Iterator Answer", "ncp.iter_answer", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL }},
8191
8192         { &hf_positionable,
8193         { "Positionable", "ncp.iterpositionable", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL }},
8194
8195         { &hf_num_skipped,
8196         { "Number Skipped", "ncp.iternumskipped", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8197
8198         { &hf_num_to_skip,
8199         { "Number to Skip", "ncp.iternumtoskip", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8200
8201         { &hf_timelimit,
8202         { "Time Limit", "ncp.itertimelimit", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8203
8204         { &hf_iter_index,
8205         { "Iterator Index", "ncp.iterindex", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8206
8207         { &hf_num_to_get,
8208         { "Number to Get", "ncp.iternumtoget", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8209
8210         { &hf_ret_info_type,
8211         { "Return Information Type", "ncp.iterretinfotype", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8212
8213         { &hf_data_size,
8214         { "Data Size", "ncp.iterdatasize", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
8215
8216         { &hf_this_count,
8217         { "Number of Items", "ncp.itercount", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
8218
8219         { &hf_max_entries,
8220         { "Maximum Entries", "ncp.itermaxentries", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8221
8222         { &hf_move_position,
8223         { "Move Position", "ncp.itermoveposition", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8224
8225         { &hf_iter_copy,
8226         { "Iterator Copy", "ncp.itercopy", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8227
8228         { &hf_iter_position,
8229         { "Iteration Position", "ncp.iterposition", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8230
8231         { &hf_iter_search,
8232         { "Search Filter", "ncp.iter_search", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8233
8234         { &hf_iter_other,
8235         { "Other Iteration", "ncp.iterother", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8236
8237         { &hf_nds_oid,
8238         { "Object ID", "ncp.nds_oid", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
8239
8240
8241
8242
8243  """
8244         # Print the registration code for the hf variables
8245         for var in sorted_vars:
8246                 print "\t{ &%s," % (var.HFName())
8247                 print "\t{ \"%s\", \"%s\", %s, %s, %s, 0x%x, NULL, HFILL }},\n" % \
8248                         (var.Description(), var.DFilter(),
8249                         var.WiresharkFType(), var.Display(), var.ValuesName(),
8250                         var.Mask())
8251
8252         print "\t};\n"
8253
8254         if ett_list:
8255                 print "\tstatic gint *ett[] = {"
8256
8257                 for ett in ett_list:
8258                         print "\t\t&%s," % (ett,)
8259
8260                 print "\t};\n"
8261
8262         print """
8263         proto_register_field_array(proto_ncp, hf, array_length(hf));"""
8264
8265         if ett_list:
8266                 print """
8267         proto_register_subtree_array(ett, array_length(ett));"""
8268
8269         print """
8270         register_init_routine(&ncp_init_protocol);
8271         register_postseq_cleanup_routine(&ncp_postseq_cleanup);"""
8272
8273         # End of proto_register_ncp2222()
8274         print "}"
8275         print ""
8276         print '#include "packet-ncp2222.inc"'
8277
8278 def usage():
8279         print "Usage: ncp2222.py -o output_file"
8280         sys.exit(1)
8281
8282 def main():
8283         global compcode_lists
8284         global ptvc_lists
8285         global msg
8286
8287         optstring = "o:"
8288         out_filename = None
8289
8290         try:
8291                 opts, args = getopt.getopt(sys.argv[1:], optstring)
8292         except getopt.error:
8293                 usage()
8294
8295         for opt, arg in opts:
8296                 if opt == "-o":
8297                         out_filename = arg
8298                 else:
8299                         usage()
8300
8301         if len(args) != 0:
8302                 usage()
8303
8304         if not out_filename:
8305                 usage()
8306
8307         # Create the output file
8308         try:
8309                 out_file = open(out_filename, "w")
8310         except IOError, err:
8311                 sys.exit("Could not open %s for writing: %s" % (out_filename,
8312                         err))
8313
8314         # Set msg to current stdout
8315         msg = sys.stdout
8316
8317         # Set stdout to the output file
8318         sys.stdout = out_file
8319
8320         msg.write("Processing NCP definitions...\n")
8321         # Run the code, and if we catch any exception,
8322         # erase the output file.
8323         try:
8324                 compcode_lists  = UniqueCollection('Completion Code Lists')
8325                 ptvc_lists      = UniqueCollection('PTVC Lists')
8326
8327                 define_errors()
8328                 define_groups()
8329
8330                 define_ncp2222()
8331
8332                 msg.write("Defined %d NCP types.\n" % (len(packets),))
8333                 produce_code()
8334         except:
8335                 traceback.print_exc(20, msg)
8336                 try:
8337                         out_file.close()
8338                 except IOError, err:
8339                         msg.write("Could not close %s: %s\n" % (out_filename, err))
8340
8341                 try:
8342                         if os.path.exists(out_filename):
8343                                 os.remove(out_filename)
8344                 except OSError, err:
8345                         msg.write("Could not remove %s: %s\n" % (out_filename, err))
8346
8347                 sys.exit(1)
8348
8349
8350
8351 def define_ncp2222():
8352         ##############################################################################
8353         # NCP Packets. Here I list functions and subfunctions in hexadecimal like the
8354         # NCP book (and I believe LanAlyzer does this too).
8355         # However, Novell lists these in decimal in their on-line documentation.
8356         ##############################################################################
8357         # 2222/01
8358         pkt = NCP(0x01, "File Set Lock", 'sync')
8359         pkt.Request(7)
8360         pkt.Reply(8)
8361         pkt.CompletionCodes([0x0000])
8362         # 2222/02
8363         pkt = NCP(0x02, "File Release Lock", 'sync')
8364         pkt.Request(7)
8365         pkt.Reply(8)
8366         pkt.CompletionCodes([0x0000, 0xff00])
8367         # 2222/03
8368         pkt = NCP(0x03, "Log File Exclusive", 'sync')
8369         pkt.Request( (12, 267), [
8370                 rec( 7, 1, DirHandle ),
8371                 rec( 8, 1, LockFlag ),
8372                 rec( 9, 2, TimeoutLimit, BE ),
8373                 rec( 11, (1, 256), FilePath ),
8374         ])
8375         pkt.Reply(8)
8376         pkt.CompletionCodes([0x0000, 0x8200, 0x9600, 0xfe0d, 0xff01])
8377         # 2222/04
8378         pkt = NCP(0x04, "Lock File Set", 'sync')
8379         pkt.Request( 9, [
8380                 rec( 7, 2, TimeoutLimit ),
8381         ])
8382         pkt.Reply(8)
8383         pkt.CompletionCodes([0x0000, 0xfe0d, 0xff01])
8384         ## 2222/05
8385         pkt = NCP(0x05, "Release File", 'sync')
8386         pkt.Request( (9, 264), [
8387                 rec( 7, 1, DirHandle ),
8388                 rec( 8, (1, 256), FilePath ),
8389         ])
8390         pkt.Reply(8)
8391         pkt.CompletionCodes([0x0000, 0x9b00, 0x9c03, 0xff1a])
8392         # 2222/06
8393         pkt = NCP(0x06, "Release File Set", 'sync')
8394         pkt.Request( 8, [
8395                 rec( 7, 1, LockFlag ),
8396         ])
8397         pkt.Reply(8)
8398         pkt.CompletionCodes([0x0000])
8399         # 2222/07
8400         pkt = NCP(0x07, "Clear File", 'sync')
8401         pkt.Request( (9, 264), [
8402                 rec( 7, 1, DirHandle ),
8403                 rec( 8, (1, 256), FilePath ),
8404         ])
8405         pkt.Reply(8)
8406         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03,
8407                 0xa100, 0xfd00, 0xff1a])
8408         # 2222/08
8409         pkt = NCP(0x08, "Clear File Set", 'sync')
8410         pkt.Request( 8, [
8411                 rec( 7, 1, LockFlag ),
8412         ])
8413         pkt.Reply(8)
8414         pkt.CompletionCodes([0x0000])
8415         # 2222/09
8416         pkt = NCP(0x09, "Log Logical Record", 'sync')
8417         pkt.Request( (11, 138), [
8418                 rec( 7, 1, LockFlag ),
8419                 rec( 8, 2, TimeoutLimit, BE ),
8420                 rec( 10, (1, 128), LogicalRecordName ),
8421         ], info_str=(LogicalRecordName, "Log Logical Record: %s", ", %s"))
8422         pkt.Reply(8)
8423         pkt.CompletionCodes([0x0000, 0x9600, 0xfe0d, 0xff1a])
8424         # 2222/0A, 10
8425         pkt = NCP(0x0A, "Lock Logical Record Set", 'sync')
8426         pkt.Request( 10, [
8427                 rec( 7, 1, LockFlag ),
8428                 rec( 8, 2, TimeoutLimit ),
8429         ])
8430         pkt.Reply(8)
8431         pkt.CompletionCodes([0x0000, 0xfe0d, 0xff1a])
8432         # 2222/0B, 11
8433         pkt = NCP(0x0B, "Clear Logical Record", 'sync')
8434         pkt.Request( (8, 135), [
8435                 rec( 7, (1, 128), LogicalRecordName ),
8436         ], info_str=(LogicalRecordName, "Clear Logical Record: %s", ", %s"))
8437         pkt.Reply(8)
8438         pkt.CompletionCodes([0x0000, 0xff1a])
8439         # 2222/0C, 12
8440         pkt = NCP(0x0C, "Release Logical Record", 'sync')
8441         pkt.Request( (8, 135), [
8442                 rec( 7, (1, 128), LogicalRecordName ),
8443         ], info_str=(LogicalRecordName, "Release Logical Record: %s", ", %s"))
8444         pkt.Reply(8)
8445         pkt.CompletionCodes([0x0000, 0xff1a])
8446         # 2222/0D, 13
8447         pkt = NCP(0x0D, "Release Logical Record Set", 'sync')
8448         pkt.Request( 8, [
8449                 rec( 7, 1, LockFlag ),
8450         ])
8451         pkt.Reply(8)
8452         pkt.CompletionCodes([0x0000])
8453         # 2222/0E, 14
8454         pkt = NCP(0x0E, "Clear Logical Record Set", 'sync')
8455         pkt.Request( 8, [
8456                 rec( 7, 1, LockFlag ),
8457         ])
8458         pkt.Reply(8)
8459         pkt.CompletionCodes([0x0000])
8460         # 2222/1100, 17/00
8461         pkt = NCP(0x1100, "Write to Spool File", 'print')
8462         pkt.Request( (11, 16), [
8463                 rec( 10, ( 1, 6 ), Data ),
8464         ], info_str=(Data, "Write to Spool File: %s", ", %s"))
8465         pkt.Reply(8)
8466         pkt.CompletionCodes([0x0000, 0x0104, 0x8000, 0x8101, 0x8701, 0x8800,
8467                              0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9400, 0x9500,
8468                              0x9600, 0x9804, 0x9900, 0xa100, 0xa201, 0xff19])
8469         # 2222/1101, 17/01
8470         pkt = NCP(0x1101, "Close Spool File", 'print')
8471         pkt.Request( 11, [
8472                 rec( 10, 1, AbortQueueFlag ),
8473         ])
8474         pkt.Reply(8)
8475         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8701, 0x8800, 0x8d00,
8476                              0x8e00, 0x8f00, 0x9001, 0x9300, 0x9400, 0x9500,
8477                              0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03, 0x9d00,
8478                              0xa100, 0xd000, 0xd100, 0xd202, 0xd300, 0xd400,
8479                              0xda01, 0xe800, 0xea00, 0xeb00, 0xec00, 0xfc06,
8480                              0xfd00, 0xfe07, 0xff06])
8481         # 2222/1102, 17/02
8482         pkt = NCP(0x1102, "Set Spool File Flags", 'print')
8483         pkt.Request( 30, [
8484                 rec( 10, 1, PrintFlags ),
8485                 rec( 11, 1, TabSize ),
8486                 rec( 12, 1, TargetPrinter ),
8487                 rec( 13, 1, Copies ),
8488                 rec( 14, 1, FormType ),
8489                 rec( 15, 1, Reserved ),
8490                 rec( 16, 14, BannerName ),
8491         ])
8492         pkt.Reply(8)
8493         pkt.CompletionCodes([0x0000, 0x9600, 0xd202, 0xd300, 0xe800, 0xea00,
8494                              0xeb00, 0xec00, 0xfc06, 0xfe07, 0xff06])
8495
8496         # 2222/1103, 17/03
8497         pkt = NCP(0x1103, "Spool A Disk File", 'print')
8498         pkt.Request( (12, 23), [
8499                 rec( 10, 1, DirHandle ),
8500                 rec( 11, (1, 12), Data ),
8501         ], info_str=(Data, "Spool a Disk File: %s", ", %s"))
8502         pkt.Reply(8)
8503         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8701, 0x8800, 0x8d00,
8504                              0x8e00, 0x8f00, 0x9001, 0x9300, 0x9400, 0x9500,
8505                              0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03, 0x9d00,
8506                              0xa100, 0xd000, 0xd100, 0xd202, 0xd300, 0xd400,
8507                              0xda01, 0xe800, 0xea00, 0xeb00, 0xec00, 0xfc06,
8508                              0xfd00, 0xfe07, 0xff06])
8509
8510         # 2222/1106, 17/06
8511         pkt = NCP(0x1106, "Get Printer Status", 'print')
8512         pkt.Request( 11, [
8513                 rec( 10, 1, TargetPrinter ),
8514         ])
8515         pkt.Reply(12, [
8516                 rec( 8, 1, PrinterHalted ),
8517                 rec( 9, 1, PrinterOffLine ),
8518                 rec( 10, 1, CurrentFormType ),
8519                 rec( 11, 1, RedirectedPrinter ),
8520         ])
8521         pkt.CompletionCodes([0x0000, 0x9600, 0xfb05, 0xfd00, 0xff06])
8522
8523         # 2222/1109, 17/09
8524         pkt = NCP(0x1109, "Create Spool File", 'print')
8525         pkt.Request( (12, 23), [
8526                 rec( 10, 1, DirHandle ),
8527                 rec( 11, (1, 12), Data ),
8528         ], info_str=(Data, "Create Spool File: %s", ", %s"))
8529         pkt.Reply(8)
8530         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8400, 0x8701, 0x8d00,
8531                              0x8f00, 0x9001, 0x9400, 0x9600, 0x9804, 0x9900,
8532                              0x9b03, 0x9c03, 0xa100, 0xd000, 0xd100, 0xd202,
8533                              0xd300, 0xd400, 0xda01, 0xe800, 0xea00, 0xeb00,
8534                              0xec00, 0xfc06, 0xfd00, 0xfe07, 0xff06])
8535
8536         # 2222/110A, 17/10
8537         pkt = NCP(0x110A, "Get Printer's Queue", 'print')
8538         pkt.Request( 11, [
8539                 rec( 10, 1, TargetPrinter ),
8540         ])
8541         pkt.Reply( 12, [
8542                 rec( 8, 4, ObjectID, BE ),
8543         ])
8544         pkt.CompletionCodes([0x0000, 0x9600, 0xff06])
8545
8546         # 2222/12, 18
8547         pkt = NCP(0x12, "Get Volume Info with Number", 'file')
8548         pkt.Request( 8, [
8549                 rec( 7, 1, VolumeNumber )
8550         ],info_str=(VolumeNumber, "Get Volume Information for Volume %d", ", %d"))
8551         pkt.Reply( 36, [
8552                 rec( 8, 2, SectorsPerCluster, BE ),
8553                 rec( 10, 2, TotalVolumeClusters, BE ),
8554                 rec( 12, 2, AvailableClusters, BE ),
8555                 rec( 14, 2, TotalDirectorySlots, BE ),
8556                 rec( 16, 2, AvailableDirectorySlots, BE ),
8557                 rec( 18, 16, VolumeName ),
8558                 rec( 34, 2, RemovableFlag, BE ),
8559         ])
8560         pkt.CompletionCodes([0x0000, 0x9804])
8561
8562         # 2222/13, 19
8563         pkt = NCP(0x13, "Get Station Number", 'connection')
8564         pkt.Request(7)
8565         pkt.Reply(11, [
8566                 rec( 8, 3, StationNumber )
8567         ])
8568         pkt.CompletionCodes([0x0000, 0xff00])
8569
8570         # 2222/14, 20
8571         pkt = NCP(0x14, "Get File Server Date And Time", 'fileserver')
8572         pkt.Request(7)
8573         pkt.Reply(15, [
8574                 rec( 8, 1, Year ),
8575                 rec( 9, 1, Month ),
8576                 rec( 10, 1, Day ),
8577                 rec( 11, 1, Hour ),
8578                 rec( 12, 1, Minute ),
8579                 rec( 13, 1, Second ),
8580                 rec( 14, 1, DayOfWeek ),
8581         ])
8582         pkt.CompletionCodes([0x0000])
8583
8584         # 2222/1500, 21/00
8585         pkt = NCP(0x1500, "Send Broadcast Message", 'message')
8586         pkt.Request((13, 70), [
8587                 rec( 10, 1, ClientListLen, var="x" ),
8588                 rec( 11, 1, TargetClientList, repeat="x" ),
8589                 rec( 12, (1, 58), TargetMessage ),
8590         ], info_str=(TargetMessage, "Send Broadcast Message: %s", ", %s"))
8591         pkt.Reply(10, [
8592                 rec( 8, 1, ClientListLen, var="x" ),
8593                 rec( 9, 1, SendStatus, repeat="x" )
8594         ])
8595         pkt.CompletionCodes([0x0000, 0xfd00])
8596
8597         # 2222/1501, 21/01
8598         pkt = NCP(0x1501, "Get Broadcast Message", 'message')
8599         pkt.Request(10)
8600         pkt.Reply((9,66), [
8601                 rec( 8, (1, 58), TargetMessage )
8602         ])
8603         pkt.CompletionCodes([0x0000, 0xfd00])
8604
8605         # 2222/1502, 21/02
8606         pkt = NCP(0x1502, "Disable Broadcasts", 'message')
8607         pkt.Request(10)
8608         pkt.Reply(8)
8609         pkt.CompletionCodes([0x0000, 0xfb0a])
8610
8611         # 2222/1503, 21/03
8612         pkt = NCP(0x1503, "Enable Broadcasts", 'message')
8613         pkt.Request(10)
8614         pkt.Reply(8)
8615         pkt.CompletionCodes([0x0000])
8616
8617         # 2222/1509, 21/09
8618         pkt = NCP(0x1509, "Broadcast To Console", 'message')
8619         pkt.Request((11, 68), [
8620                 rec( 10, (1, 58), TargetMessage )
8621         ], info_str=(TargetMessage, "Broadcast to Console: %s", ", %s"))
8622         pkt.Reply(8)
8623         pkt.CompletionCodes([0x0000])
8624
8625         # 2222/150A, 21/10
8626         pkt = NCP(0x150A, "Send Broadcast Message", 'message')
8627         pkt.Request((17, 74), [
8628                 rec( 10, 2, ClientListCount, LE, var="x" ),
8629                 rec( 12, 4, ClientList, LE, repeat="x" ),
8630                 rec( 16, (1, 58), TargetMessage ),
8631         ], info_str=(TargetMessage, "Send Broadcast Message: %s", ", %s"))
8632         pkt.Reply(14, [
8633                 rec( 8, 2, ClientListCount, LE, var="x" ),
8634                 rec( 10, 4, ClientCompFlag, LE, repeat="x" ),
8635         ])
8636         pkt.CompletionCodes([0x0000, 0xfd00])
8637
8638         # 2222/150B, 21/11
8639         pkt = NCP(0x150B, "Get Broadcast Message", 'message')
8640         pkt.Request(10)
8641         pkt.Reply((9,66), [
8642                 rec( 8, (1, 58), TargetMessage )
8643         ])
8644         pkt.CompletionCodes([0x0000, 0xfd00])
8645
8646         # 2222/150C, 21/12
8647         pkt = NCP(0x150C, "Connection Message Control", 'message')
8648         pkt.Request(22, [
8649                 rec( 10, 1, ConnectionControlBits ),
8650                 rec( 11, 3, Reserved3 ),
8651                 rec( 14, 4, ConnectionListCount, LE, var="x" ),
8652                 rec( 18, 4, ConnectionList, LE, repeat="x" ),
8653         ])
8654         pkt.Reply(8)
8655         pkt.CompletionCodes([0x0000, 0xff00])
8656
8657         # 2222/1600, 22/0
8658         pkt = NCP(0x1600, "Set Directory Handle", 'file')
8659         pkt.Request((13,267), [
8660                 rec( 10, 1, TargetDirHandle ),
8661                 rec( 11, 1, DirHandle ),
8662                 rec( 12, (1, 255), Path ),
8663         ], info_str=(Path, "Set Directory Handle to: %s", ", %s"))
8664         pkt.Reply(8)
8665         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8666                              0xfd00, 0xff00])
8667
8668
8669         # 2222/1601, 22/1
8670         pkt = NCP(0x1601, "Get Directory Path", 'file')
8671         pkt.Request(11, [
8672                 rec( 10, 1, DirHandle ),
8673         ],info_str=(DirHandle, "Get Directory Path for Directory Handle %d", ", %d"))
8674         pkt.Reply((9,263), [
8675                 rec( 8, (1,255), Path ),
8676         ])
8677         pkt.CompletionCodes([0x0000, 0x9600, 0x9b00, 0x9c00, 0xa100])
8678
8679         # 2222/1602, 22/2
8680         pkt = NCP(0x1602, "Scan Directory Information", 'file')
8681         pkt.Request((14,268), [
8682                 rec( 10, 1, DirHandle ),
8683                 rec( 11, 2, StartingSearchNumber, BE ),
8684                 rec( 13, (1, 255), Path ),
8685         ], info_str=(Path, "Scan Directory Information: %s", ", %s"))
8686         pkt.Reply(36, [
8687                 rec( 8, 16, DirectoryPath ),
8688                 rec( 24, 2, CreationDate, BE ),
8689                 rec( 26, 2, CreationTime, BE ),
8690                 rec( 28, 4, CreatorID, BE ),
8691                 rec( 32, 1, AccessRightsMask ),
8692                 rec( 33, 1, Reserved ),
8693                 rec( 34, 2, NextSearchNumber, BE ),
8694         ])
8695         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8696                              0xfd00, 0xff00])
8697
8698         # 2222/1603, 22/3
8699         pkt = NCP(0x1603, "Get Effective Directory Rights", 'file')
8700         pkt.Request((12,266), [
8701                 rec( 10, 1, DirHandle ),
8702                 rec( 11, (1, 255), Path ),
8703         ], info_str=(Path, "Get Effective Directory Rights: %s", ", %s"))
8704         pkt.Reply(9, [
8705                 rec( 8, 1, AccessRightsMask ),
8706         ])
8707         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8708                              0xfd00, 0xff00])
8709
8710         # 2222/1604, 22/4
8711         pkt = NCP(0x1604, "Modify Maximum Rights Mask", 'file')
8712         pkt.Request((14,268), [
8713                 rec( 10, 1, DirHandle ),
8714                 rec( 11, 1, RightsGrantMask ),
8715                 rec( 12, 1, RightsRevokeMask ),
8716                 rec( 13, (1, 255), Path ),
8717         ], info_str=(Path, "Modify Maximum Rights Mask: %s", ", %s"))
8718         pkt.Reply(8)
8719         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8720                              0xfd00, 0xff00])
8721
8722         # 2222/1605, 22/5
8723         pkt = NCP(0x1605, "Get Volume Number", 'file')
8724         pkt.Request((11, 265), [
8725                 rec( 10, (1,255), VolumeNameLen ),
8726         ], info_str=(VolumeNameLen, "Get Volume Number for: %s", ", %s"))
8727         pkt.Reply(9, [
8728                 rec( 8, 1, VolumeNumber ),
8729         ])
8730         pkt.CompletionCodes([0x0000, 0x9600, 0x9804])
8731
8732         # 2222/1606, 22/6
8733         pkt = NCP(0x1606, "Get Volume Name", 'file')
8734         pkt.Request(11, [
8735                 rec( 10, 1, VolumeNumber ),
8736         ],info_str=(VolumeNumber, "Get Name for Volume %d", ", %d"))
8737         pkt.Reply((9, 263), [
8738                 rec( 8, (1,255), VolumeNameLen ),
8739         ])
8740         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0xff00])
8741
8742         # 2222/160A, 22/10
8743         pkt = NCP(0x160A, "Create Directory", 'file')
8744         pkt.Request((13,267), [
8745                 rec( 10, 1, DirHandle ),
8746                 rec( 11, 1, AccessRightsMask ),
8747                 rec( 12, (1, 255), Path ),
8748         ], info_str=(Path, "Create Directory: %s", ", %s"))
8749         pkt.Reply(8)
8750         pkt.CompletionCodes([0x0000, 0x8400, 0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03,
8751                              0x9e00, 0xa100, 0xfd00, 0xff00])
8752
8753         # 2222/160B, 22/11
8754         pkt = NCP(0x160B, "Delete Directory", 'file')
8755         pkt.Request((13,267), [
8756                 rec( 10, 1, DirHandle ),
8757                 rec( 11, 1, Reserved ),
8758                 rec( 12, (1, 255), Path ),
8759         ], info_str=(Path, "Delete Directory: %s", ", %s"))
8760         pkt.Reply(8)
8761         pkt.CompletionCodes([0x0000, 0x8a00, 0x9600, 0x9804, 0x9b03, 0x9c03,
8762                              0x9f00, 0xa000, 0xa100, 0xfd00, 0xff00])
8763
8764         # 2222/160C, 22/12
8765         pkt = NCP(0x160C, "Scan Directory for Trustees", 'file')
8766         pkt.Request((13,267), [
8767                 rec( 10, 1, DirHandle ),
8768                 rec( 11, 1, TrusteeSetNumber ),
8769                 rec( 12, (1, 255), Path ),
8770         ], info_str=(Path, "Scan Directory for Trustees: %s", ", %s"))
8771         pkt.Reply(57, [
8772                 rec( 8, 16, DirectoryPath ),
8773                 rec( 24, 2, CreationDate, BE ),
8774                 rec( 26, 2, CreationTime, BE ),
8775                 rec( 28, 4, CreatorID ),
8776                 rec( 32, 4, TrusteeID, BE ),
8777                 rec( 36, 4, TrusteeID, BE ),
8778                 rec( 40, 4, TrusteeID, BE ),
8779                 rec( 44, 4, TrusteeID, BE ),
8780                 rec( 48, 4, TrusteeID, BE ),
8781                 rec( 52, 1, AccessRightsMask ),
8782                 rec( 53, 1, AccessRightsMask ),
8783                 rec( 54, 1, AccessRightsMask ),
8784                 rec( 55, 1, AccessRightsMask ),
8785                 rec( 56, 1, AccessRightsMask ),
8786         ])
8787         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9b03, 0x9c03,
8788                              0xa100, 0xfd00, 0xff00])
8789
8790         # 2222/160D, 22/13
8791         pkt = NCP(0x160D, "Add Trustee to Directory", 'file')
8792         pkt.Request((17,271), [
8793                 rec( 10, 1, DirHandle ),
8794                 rec( 11, 4, TrusteeID, BE ),
8795                 rec( 15, 1, AccessRightsMask ),
8796                 rec( 16, (1, 255), Path ),
8797         ], info_str=(Path, "Add Trustee to Directory: %s", ", %s"))
8798         pkt.Reply(8)
8799         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03,
8800                              0xa100, 0xfc06, 0xfd00, 0xff00])
8801
8802         # 2222/160E, 22/14
8803         pkt = NCP(0x160E, "Delete Trustee from Directory", 'file')
8804         pkt.Request((17,271), [
8805                 rec( 10, 1, DirHandle ),
8806                 rec( 11, 4, TrusteeID, BE ),
8807                 rec( 15, 1, Reserved ),
8808                 rec( 16, (1, 255), Path ),
8809         ], info_str=(Path, "Delete Trustee from Directory: %s", ", %s"))
8810         pkt.Reply(8)
8811         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03,
8812                              0xa100, 0xfc06, 0xfd00, 0xfe07, 0xff00])
8813
8814         # 2222/160F, 22/15
8815         pkt = NCP(0x160F, "Rename Directory", 'file')
8816         pkt.Request((13, 521), [
8817                 rec( 10, 1, DirHandle ),
8818                 rec( 11, (1, 255), Path ),
8819                 rec( -1, (1, 255), NewPath ),
8820         ], info_str=(Path, "Rename Directory: %s", ", %s"))
8821         pkt.Reply(8)
8822         pkt.CompletionCodes([0x0000, 0x8b00, 0x9200, 0x9600, 0x9804, 0x9b03, 0x9c03,
8823                              0x9e00, 0xa100, 0xef00, 0xfd00, 0xff00])
8824
8825         # 2222/1610, 22/16
8826         pkt = NCP(0x1610, "Purge Erased Files", 'file')
8827         pkt.Request(10)
8828         pkt.Reply(8)
8829         pkt.CompletionCodes([0x0000, 0x8100, 0x9600, 0x9804, 0xa100, 0xff00])
8830
8831         # 2222/1611, 22/17
8832         pkt = NCP(0x1611, "Recover Erased File", 'file')
8833         pkt.Request(11, [
8834                 rec( 10, 1, DirHandle ),
8835         ],info_str=(DirHandle, "Recover Erased File from Directory Handle %d", ", %d"))
8836         pkt.Reply(38, [
8837                 rec( 8, 15, OldFileName ),
8838                 rec( 23, 15, NewFileName ),
8839         ])
8840         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03,
8841                              0xa100, 0xfd00, 0xff00])
8842         # 2222/1612, 22/18
8843         pkt = NCP(0x1612, "Alloc Permanent Directory Handle", 'file')
8844         pkt.Request((13, 267), [
8845                 rec( 10, 1, DirHandle ),
8846                 rec( 11, 1, DirHandleName ),
8847                 rec( 12, (1,255), Path ),
8848         ], info_str=(Path, "Allocate Permanent Directory Handle: %s", ", %s"))
8849         pkt.Reply(10, [
8850                 rec( 8, 1, DirHandle ),
8851                 rec( 9, 1, AccessRightsMask ),
8852         ])
8853         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9900, 0x9b00, 0x9c03, 0x9d00,
8854                              0xa100, 0xfd00, 0xff00])
8855         # 2222/1613, 22/19
8856         pkt = NCP(0x1613, "Alloc Temporary Directory Handle", 'file')
8857         pkt.Request((13, 267), [
8858                 rec( 10, 1, DirHandle ),
8859                 rec( 11, 1, DirHandleName ),
8860                 rec( 12, (1,255), Path ),
8861         ], info_str=(Path, "Allocate Temporary Directory Handle: %s", ", %s"))
8862         pkt.Reply(10, [
8863                 rec( 8, 1, DirHandle ),
8864                 rec( 9, 1, AccessRightsMask ),
8865         ])
8866         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9900, 0x9c03, 0x9d00,
8867                              0xa100, 0xfd00, 0xff00])
8868         # 2222/1614, 22/20
8869         pkt = NCP(0x1614, "Deallocate Directory Handle", 'file')
8870         pkt.Request(11, [
8871                 rec( 10, 1, DirHandle ),
8872         ],info_str=(DirHandle, "Deallocate Directory Handle %d", ", %d"))
8873         pkt.Reply(8)
8874         pkt.CompletionCodes([0x0000, 0x9b03])
8875         # 2222/1615, 22/21
8876         pkt = NCP(0x1615, "Get Volume Info with Handle", 'file')
8877         pkt.Request( 11, [
8878                 rec( 10, 1, DirHandle )
8879         ],info_str=(DirHandle, "Get Volume Information with Handle %d", ", %d"))
8880         pkt.Reply( 36, [
8881                 rec( 8, 2, SectorsPerCluster, BE ),
8882                 rec( 10, 2, TotalVolumeClusters, BE ),
8883                 rec( 12, 2, AvailableClusters, BE ),
8884                 rec( 14, 2, TotalDirectorySlots, BE ),
8885                 rec( 16, 2, AvailableDirectorySlots, BE ),
8886                 rec( 18, 16, VolumeName ),
8887                 rec( 34, 2, RemovableFlag, BE ),
8888         ])
8889         pkt.CompletionCodes([0x0000, 0xff00])
8890         # 2222/1616, 22/22
8891         pkt = NCP(0x1616, "Alloc Special Temporary Directory Handle", 'file')
8892         pkt.Request((13, 267), [
8893                 rec( 10, 1, DirHandle ),
8894                 rec( 11, 1, DirHandleName ),
8895                 rec( 12, (1,255), Path ),
8896         ], info_str=(Path, "Allocate Special Temporary Directory Handle: %s", ", %s"))
8897         pkt.Reply(10, [
8898                 rec( 8, 1, DirHandle ),
8899                 rec( 9, 1, AccessRightsMask ),
8900         ])
8901         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9900, 0x9b00, 0x9c03, 0x9d00,
8902                              0xa100, 0xfd00, 0xff00])
8903         # 2222/1617, 22/23
8904         pkt = NCP(0x1617, "Extract a Base Handle", 'file')
8905         pkt.Request(11, [
8906                 rec( 10, 1, DirHandle ),
8907         ],info_str=(DirHandle, "Extract a Base Handle from Directory Handle %d", ", %d"))
8908         pkt.Reply(22, [
8909                 rec( 8, 10, ServerNetworkAddress ),
8910                 rec( 18, 4, DirHandleLong ),
8911         ])
8912         pkt.CompletionCodes([0x0000, 0x9600, 0x9b03])
8913         # 2222/1618, 22/24
8914         pkt = NCP(0x1618, "Restore an Extracted Base Handle", 'file')
8915         pkt.Request(24, [
8916                 rec( 10, 10, ServerNetworkAddress ),
8917                 rec( 20, 4, DirHandleLong ),
8918         ])
8919         pkt.Reply(10, [
8920                 rec( 8, 1, DirHandle ),
8921                 rec( 9, 1, AccessRightsMask ),
8922         ])
8923         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c00, 0x9d00, 0xa100,
8924                              0xfd00, 0xff00])
8925         # 2222/1619, 22/25
8926         pkt = NCP(0x1619, "Set Directory Information", 'file')
8927         pkt.Request((21, 275), [
8928                 rec( 10, 1, DirHandle ),
8929                 rec( 11, 2, CreationDate ),
8930                 rec( 13, 2, CreationTime ),
8931                 rec( 15, 4, CreatorID, BE ),
8932                 rec( 19, 1, AccessRightsMask ),
8933                 rec( 20, (1,255), Path ),
8934         ], info_str=(Path, "Set Directory Information: %s", ", %s"))
8935         pkt.Reply(8)
8936         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9b03, 0x9c00, 0xa100,
8937                              0xff16])
8938         # 2222/161A, 22/26
8939         pkt = NCP(0x161A, "Get Path Name of a Volume-Directory Number Pair", 'file')
8940         pkt.Request(13, [
8941                 rec( 10, 1, VolumeNumber ),
8942                 rec( 11, 2, DirectoryEntryNumberWord ),
8943         ])
8944         pkt.Reply((9,263), [
8945                 rec( 8, (1,255), Path ),
8946                 ])
8947         pkt.CompletionCodes([0x0000, 0x9804, 0x9c00, 0xa100])
8948         # 2222/161B, 22/27
8949         pkt = NCP(0x161B, "Scan Salvageable Files", 'file')
8950         pkt.Request(15, [
8951                 rec( 10, 1, DirHandle ),
8952                 rec( 11, 4, SequenceNumber ),
8953         ])
8954         pkt.Reply(140, [
8955                 rec( 8, 4, SequenceNumber ),
8956                 rec( 12, 2, Subdirectory ),
8957                 rec( 14, 2, Reserved2 ),
8958                 rec( 16, 4, AttributesDef32 ),
8959                 rec( 20, 1, UniqueID ),
8960                 rec( 21, 1, FlagsDef ),
8961                 rec( 22, 1, DestNameSpace ),
8962                 rec( 23, 1, FileNameLen ),
8963                 rec( 24, 12, FileName12 ),
8964                 rec( 36, 2, CreationTime ),
8965                 rec( 38, 2, CreationDate ),
8966                 rec( 40, 4, CreatorID, BE ),
8967                 rec( 44, 2, ArchivedTime ),
8968                 rec( 46, 2, ArchivedDate ),
8969                 rec( 48, 4, ArchiverID, BE ),
8970                 rec( 52, 2, UpdateTime ),
8971                 rec( 54, 2, UpdateDate ),
8972                 rec( 56, 4, UpdateID, BE ),
8973                 rec( 60, 4, FileSize, BE ),
8974                 rec( 64, 44, Reserved44 ),
8975                 rec( 108, 2, InheritedRightsMask ),
8976                 rec( 110, 2, LastAccessedDate ),
8977                 rec( 112, 4, DeletedFileTime ),
8978                 rec( 116, 2, DeletedTime ),
8979                 rec( 118, 2, DeletedDate ),
8980                 rec( 120, 4, DeletedID, BE ),
8981                 rec( 124, 16, Reserved16 ),
8982         ])
8983         pkt.CompletionCodes([0x0000, 0xfb01, 0x9801, 0xff1d])
8984         # 2222/161C, 22/28
8985         pkt = NCP(0x161C, "Recover Salvageable File", 'file')
8986         pkt.Request((17,525), [
8987                 rec( 10, 1, DirHandle ),
8988                 rec( 11, 4, SequenceNumber ),
8989                 rec( 15, (1, 255), FileName ),
8990                 rec( -1, (1, 255), NewFileNameLen ),
8991         ], info_str=(FileName, "Recover File: %s", ", %s"))
8992         pkt.Reply(8)
8993         pkt.CompletionCodes([0x0000, 0x8401, 0x9c03, 0xfe02])
8994         # 2222/161D, 22/29
8995         pkt = NCP(0x161D, "Purge Salvageable File", 'file')
8996         pkt.Request(15, [
8997                 rec( 10, 1, DirHandle ),
8998                 rec( 11, 4, SequenceNumber ),
8999         ])
9000         pkt.Reply(8)
9001         pkt.CompletionCodes([0x0000, 0x8500, 0x9c03])
9002         # 2222/161E, 22/30
9003         pkt = NCP(0x161E, "Scan a Directory", 'file')
9004         pkt.Request((17, 271), [
9005                 rec( 10, 1, DirHandle ),
9006                 rec( 11, 1, DOSFileAttributes ),
9007                 rec( 12, 4, SequenceNumber ),
9008                 rec( 16, (1, 255), SearchPattern ),
9009         ], info_str=(SearchPattern, "Scan a Directory: %s", ", %s"))
9010         pkt.Reply(140, [
9011                 rec( 8, 4, SequenceNumber ),
9012                 rec( 12, 4, Subdirectory ),
9013                 rec( 16, 4, AttributesDef32 ),
9014                 rec( 20, 1, UniqueID, LE ),
9015                 rec( 21, 1, PurgeFlags ),
9016                 rec( 22, 1, DestNameSpace ),
9017                 rec( 23, 1, NameLen ),
9018                 rec( 24, 12, Name12 ),
9019                 rec( 36, 2, CreationTime ),
9020                 rec( 38, 2, CreationDate ),
9021                 rec( 40, 4, CreatorID, BE ),
9022                 rec( 44, 2, ArchivedTime ),
9023                 rec( 46, 2, ArchivedDate ),
9024                 rec( 48, 4, ArchiverID, BE ),
9025                 rec( 52, 2, UpdateTime ),
9026                 rec( 54, 2, UpdateDate ),
9027                 rec( 56, 4, UpdateID, BE ),
9028                 rec( 60, 4, FileSize, BE ),
9029                 rec( 64, 44, Reserved44 ),
9030                 rec( 108, 2, InheritedRightsMask ),
9031                 rec( 110, 2, LastAccessedDate ),
9032                 rec( 112, 28, Reserved28 ),
9033         ])
9034         pkt.CompletionCodes([0x0000, 0x8500, 0x9c03])
9035         # 2222/161F, 22/31
9036         pkt = NCP(0x161F, "Get Directory Entry", 'file')
9037         pkt.Request(11, [
9038                 rec( 10, 1, DirHandle ),
9039         ])
9040         pkt.Reply(136, [
9041                 rec( 8, 4, Subdirectory ),
9042                 rec( 12, 4, AttributesDef32 ),
9043                 rec( 16, 1, UniqueID, LE ),
9044                 rec( 17, 1, PurgeFlags ),
9045                 rec( 18, 1, DestNameSpace ),
9046                 rec( 19, 1, NameLen ),
9047                 rec( 20, 12, Name12 ),
9048                 rec( 32, 2, CreationTime ),
9049                 rec( 34, 2, CreationDate ),
9050                 rec( 36, 4, CreatorID, BE ),
9051                 rec( 40, 2, ArchivedTime ),
9052                 rec( 42, 2, ArchivedDate ),
9053                 rec( 44, 4, ArchiverID, BE ),
9054                 rec( 48, 2, UpdateTime ),
9055                 rec( 50, 2, UpdateDate ),
9056                 rec( 52, 4, NextTrusteeEntry, BE ),
9057                 rec( 56, 48, Reserved48 ),
9058                 rec( 104, 2, MaximumSpace ),
9059                 rec( 106, 2, InheritedRightsMask ),
9060                 rec( 108, 28, Undefined28 ),
9061         ])
9062         pkt.CompletionCodes([0x0000, 0x8900, 0xbf00, 0xfb00])
9063         # 2222/1620, 22/32
9064         pkt = NCP(0x1620, "Scan Volume's User Disk Restrictions", 'file')
9065         pkt.Request(15, [
9066                 rec( 10, 1, VolumeNumber ),
9067                 rec( 11, 4, SequenceNumber ),
9068         ])
9069         pkt.Reply(17, [
9070                 rec( 8, 1, NumberOfEntries, var="x" ),
9071                 rec( 9, 8, ObjectIDStruct, repeat="x" ),
9072         ])
9073         pkt.CompletionCodes([0x0000, 0x9800])
9074         # 2222/1621, 22/33
9075         pkt = NCP(0x1621, "Add User Disk Space Restriction", 'file')
9076         pkt.Request(19, [
9077                 rec( 10, 1, VolumeNumber ),
9078                 rec( 11, 4, ObjectID ),
9079                 rec( 15, 4, DiskSpaceLimit ),
9080         ])
9081         pkt.Reply(8)
9082         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9800])
9083         # 2222/1622, 22/34
9084         pkt = NCP(0x1622, "Remove User Disk Space Restrictions", 'file')
9085         pkt.Request(15, [
9086                 rec( 10, 1, VolumeNumber ),
9087                 rec( 11, 4, ObjectID ),
9088         ])
9089         pkt.Reply(8)
9090         pkt.CompletionCodes([0x0000, 0x8c00, 0xfe0e])
9091         # 2222/1623, 22/35
9092         pkt = NCP(0x1623, "Get Directory Disk Space Restriction", 'file')
9093         pkt.Request(11, [
9094                 rec( 10, 1, DirHandle ),
9095         ])
9096         pkt.Reply(18, [
9097                 rec( 8, 1, NumberOfEntries ),
9098                 rec( 9, 1, Level ),
9099                 rec( 10, 4, MaxSpace ),
9100                 rec( 14, 4, CurrentSpace ),
9101         ])
9102         pkt.CompletionCodes([0x0000])
9103         # 2222/1624, 22/36
9104         pkt = NCP(0x1624, "Set Directory Disk Space Restriction", 'file')
9105         pkt.Request(15, [
9106                 rec( 10, 1, DirHandle ),
9107                 rec( 11, 4, DiskSpaceLimit ),
9108         ])
9109         pkt.Reply(8)
9110         pkt.CompletionCodes([0x0000, 0x0101, 0x8c00, 0xbf00])
9111         # 2222/1625, 22/37
9112         pkt = NCP(0x1625, "Set Directory Entry Information", 'file')
9113         pkt.Request(NO_LENGTH_CHECK, [
9114                 #
9115                 # XXX - this didn't match what was in the spec for 22/37
9116                 # on the Novell Web site.
9117                 #
9118                 rec( 10, 1, DirHandle ),
9119                 rec( 11, 1, SearchAttributes ),
9120                 rec( 12, 4, SequenceNumber ),
9121                 rec( 16, 2, ChangeBits ),
9122                 rec( 18, 2, Reserved2 ),
9123                 rec( 20, 4, Subdirectory ),
9124                 #srec(DOSDirectoryEntryStruct, req_cond="ncp.search_att_sub == TRUE"),
9125                 srec(DOSFileEntryStruct, req_cond="ncp.search_att_sub == FALSE"),
9126         ])
9127         pkt.Reply(8)
9128         pkt.ReqCondSizeConstant()
9129         pkt.CompletionCodes([0x0000, 0x0106, 0x8c00, 0xbf00])
9130         # 2222/1626, 22/38
9131         pkt = NCP(0x1626, "Scan File or Directory for Extended Trustees", 'file')
9132         pkt.Request((13,267), [
9133                 rec( 10, 1, DirHandle ),
9134                 rec( 11, 1, SequenceByte ),
9135                 rec( 12, (1, 255), Path ),
9136         ], info_str=(Path, "Scan for Extended Trustees: %s", ", %s"))
9137         pkt.Reply(91, [
9138                 rec( 8, 1, NumberOfEntries, var="x" ),
9139                 rec( 9, 4, ObjectID ),
9140                 rec( 13, 4, ObjectID ),
9141                 rec( 17, 4, ObjectID ),
9142                 rec( 21, 4, ObjectID ),
9143                 rec( 25, 4, ObjectID ),
9144                 rec( 29, 4, ObjectID ),
9145                 rec( 33, 4, ObjectID ),
9146                 rec( 37, 4, ObjectID ),
9147                 rec( 41, 4, ObjectID ),
9148                 rec( 45, 4, ObjectID ),
9149                 rec( 49, 4, ObjectID ),
9150                 rec( 53, 4, ObjectID ),
9151                 rec( 57, 4, ObjectID ),
9152                 rec( 61, 4, ObjectID ),
9153                 rec( 65, 4, ObjectID ),
9154                 rec( 69, 4, ObjectID ),
9155                 rec( 73, 4, ObjectID ),
9156                 rec( 77, 4, ObjectID ),
9157                 rec( 81, 4, ObjectID ),
9158                 rec( 85, 4, ObjectID ),
9159                 rec( 89, 2, AccessRightsMaskWord, repeat="x" ),
9160         ])
9161         pkt.CompletionCodes([0x0000, 0x9800, 0x9b00, 0x9c00])
9162         # 2222/1627, 22/39
9163         pkt = NCP(0x1627, "Add Extended Trustee to Directory or File", 'file')
9164         pkt.Request((18,272), [
9165                 rec( 10, 1, DirHandle ),
9166                 rec( 11, 4, ObjectID, BE ),
9167                 rec( 15, 2, TrusteeRights ),
9168                 rec( 17, (1, 255), Path ),
9169         ], info_str=(Path, "Add Extended Trustee: %s", ", %s"))
9170         pkt.Reply(8)
9171         pkt.CompletionCodes([0x0000, 0x9000])
9172         # 2222/1628, 22/40
9173         pkt = NCP(0x1628, "Scan Directory Disk Space", 'file')
9174         pkt.Request((17,271), [
9175                 rec( 10, 1, DirHandle ),
9176                 rec( 11, 1, SearchAttributes ),
9177                 rec( 12, 4, SequenceNumber ),
9178                 rec( 16, (1, 255), SearchPattern ),
9179         ], info_str=(SearchPattern, "Scan Directory Disk Space: %s", ", %s"))
9180         pkt.Reply((148), [
9181                 rec( 8, 4, SequenceNumber ),
9182                 rec( 12, 4, Subdirectory ),
9183                 rec( 16, 4, AttributesDef32 ),
9184                 rec( 20, 1, UniqueID ),
9185                 rec( 21, 1, PurgeFlags ),
9186                 rec( 22, 1, DestNameSpace ),
9187                 rec( 23, 1, NameLen ),
9188                 rec( 24, 12, Name12 ),
9189                 rec( 36, 2, CreationTime ),
9190                 rec( 38, 2, CreationDate ),
9191                 rec( 40, 4, CreatorID, BE ),
9192                 rec( 44, 2, ArchivedTime ),
9193                 rec( 46, 2, ArchivedDate ),
9194                 rec( 48, 4, ArchiverID, BE ),
9195                 rec( 52, 2, UpdateTime ),
9196                 rec( 54, 2, UpdateDate ),
9197                 rec( 56, 4, UpdateID, BE ),
9198                 rec( 60, 4, DataForkSize, BE ),
9199                 rec( 64, 4, DataForkFirstFAT, BE ),
9200                 rec( 68, 4, NextTrusteeEntry, BE ),
9201                 rec( 72, 36, Reserved36 ),
9202                 rec( 108, 2, InheritedRightsMask ),
9203                 rec( 110, 2, LastAccessedDate ),
9204                 rec( 112, 4, DeletedFileTime ),
9205                 rec( 116, 2, DeletedTime ),
9206                 rec( 118, 2, DeletedDate ),
9207                 rec( 120, 4, DeletedID, BE ),
9208                 rec( 124, 8, Undefined8 ),
9209                 rec( 132, 4, PrimaryEntry, LE ),
9210                 rec( 136, 4, NameList, LE ),
9211                 rec( 140, 4, OtherFileForkSize, BE ),
9212                 rec( 144, 4, OtherFileForkFAT, BE ),
9213         ])
9214         pkt.CompletionCodes([0x0000, 0x8900, 0x9c03, 0xfb01, 0xff00])
9215         # 2222/1629, 22/41
9216         pkt = NCP(0x1629, "Get Object Disk Usage and Restrictions", 'file')
9217         pkt.Request(15, [
9218                 rec( 10, 1, VolumeNumber ),
9219                 rec( 11, 4, ObjectID, LE ),
9220         ])
9221         pkt.Reply(16, [
9222                 rec( 8, 4, Restriction ),
9223                 rec( 12, 4, InUse ),
9224         ])
9225         pkt.CompletionCodes([0x0000, 0x9802])
9226         # 2222/162A, 22/42
9227         pkt = NCP(0x162A, "Get Effective Rights for Directory Entry", 'file')
9228         pkt.Request((12,266), [
9229                 rec( 10, 1, DirHandle ),
9230                 rec( 11, (1, 255), Path ),
9231         ], info_str=(Path, "Get Effective Rights: %s", ", %s"))
9232         pkt.Reply(10, [
9233                 rec( 8, 2, AccessRightsMaskWord ),
9234         ])
9235         pkt.CompletionCodes([0x0000, 0x9804, 0x9c03])
9236         # 2222/162B, 22/43
9237         pkt = NCP(0x162B, "Remove Extended Trustee from Dir or File", 'file')
9238         pkt.Request((17,271), [
9239                 rec( 10, 1, DirHandle ),
9240                 rec( 11, 4, ObjectID, BE ),
9241                 rec( 15, 1, Unused ),
9242                 rec( 16, (1, 255), Path ),
9243         ], info_str=(Path, "Remove Extended Trustee from %s", ", %s"))
9244         pkt.Reply(8)
9245         pkt.CompletionCodes([0x0000, 0x9002, 0x9c03, 0xfe0f, 0xff09])
9246         # 2222/162C, 22/44
9247         pkt = NCP(0x162C, "Get Volume and Purge Information", 'file')
9248         pkt.Request( 11, [
9249                 rec( 10, 1, VolumeNumber )
9250         ],info_str=(VolumeNumber, "Get Volume and Purge Information for Volume %d", ", %d"))
9251         pkt.Reply( (38,53), [
9252                 rec( 8, 4, TotalBlocks ),
9253                 rec( 12, 4, FreeBlocks ),
9254                 rec( 16, 4, PurgeableBlocks ),
9255                 rec( 20, 4, NotYetPurgeableBlocks ),
9256                 rec( 24, 4, TotalDirectoryEntries ),
9257                 rec( 28, 4, AvailableDirEntries ),
9258                 rec( 32, 4, Reserved4 ),
9259                 rec( 36, 1, SectorsPerBlock ),
9260                 rec( 37, (1,16), VolumeNameLen ),
9261         ])
9262         pkt.CompletionCodes([0x0000])
9263         # 2222/162D, 22/45
9264         pkt = NCP(0x162D, "Get Directory Information", 'file')
9265         pkt.Request( 11, [
9266                 rec( 10, 1, DirHandle )
9267         ])
9268         pkt.Reply( (30, 45), [
9269                 rec( 8, 4, TotalBlocks ),
9270                 rec( 12, 4, AvailableBlocks ),
9271                 rec( 16, 4, TotalDirectoryEntries ),
9272                 rec( 20, 4, AvailableDirEntries ),
9273                 rec( 24, 4, Reserved4 ),
9274                 rec( 28, 1, SectorsPerBlock ),
9275                 rec( 29, (1,16), VolumeNameLen ),
9276         ])
9277         pkt.CompletionCodes([0x0000, 0x9b03])
9278         # 2222/162E, 22/46
9279         pkt = NCP(0x162E, "Rename Or Move", 'file')
9280         pkt.Request( (17,525), [
9281                 rec( 10, 1, SourceDirHandle ),
9282                 rec( 11, 1, SearchAttributes ),
9283                 rec( 12, 1, SourcePathComponentCount ),
9284                 rec( 13, (1,255), SourcePath ),
9285                 rec( -1, 1, DestDirHandle ),
9286                 rec( -1, 1, DestPathComponentCount ),
9287                 rec( -1, (1,255), DestPath ),
9288         ], info_str=(SourcePath, "Rename or Move: %s", ", %s"))
9289         pkt.Reply(8)
9290         pkt.CompletionCodes([0x0000, 0x0102, 0x8701, 0x8b00, 0x8d00, 0x8e00,
9291                              0x8f00, 0x9001, 0x9101, 0x9201, 0x9a00, 0x9b03,
9292                              0x9c03, 0xa400, 0xff17])
9293         # 2222/162F, 22/47
9294         pkt = NCP(0x162F, "Get Name Space Information", 'file')
9295         pkt.Request( 11, [
9296                 rec( 10, 1, VolumeNumber )
9297         ],info_str=(VolumeNumber, "Get Name Space Information for Volume %d", ", %d"))
9298         pkt.Reply( (15,523), [
9299                 #
9300                 # XXX - why does this not display anything at all
9301                 # if the stuff after the first IndexNumber is
9302                 # un-commented?  That stuff really is there....
9303                 #
9304                 rec( 8, 1, DefinedNameSpaces, var="v" ),
9305                 rec( 9, (1,255), NameSpaceName, repeat="v" ),
9306                 rec( -1, 1, DefinedDataStreams, var="w" ),
9307                 rec( -1, (2,256), DataStreamInfo, repeat="w" ),
9308                 rec( -1, 1, LoadedNameSpaces, var="x" ),
9309                 rec( -1, 1, IndexNumber, repeat="x" ),
9310 #               rec( -1, 1, VolumeNameSpaces, var="y" ),
9311 #               rec( -1, 1, IndexNumber, repeat="y" ),
9312 #               rec( -1, 1, VolumeDataStreams, var="z" ),
9313 #               rec( -1, 1, IndexNumber, repeat="z" ),
9314         ])
9315         pkt.CompletionCodes([0x0000, 0x9802, 0xff00])
9316         # 2222/1630, 22/48
9317         pkt = NCP(0x1630, "Get Name Space Directory Entry", 'file')
9318         pkt.Request( 16, [
9319                 rec( 10, 1, VolumeNumber ),
9320                 rec( 11, 4, DOSSequence ),
9321                 rec( 15, 1, SrcNameSpace ),
9322         ])
9323         pkt.Reply( 112, [
9324                 rec( 8, 4, SequenceNumber ),
9325                 rec( 12, 4, Subdirectory ),
9326                 rec( 16, 4, AttributesDef32 ),
9327                 rec( 20, 1, UniqueID ),
9328                 rec( 21, 1, Flags ),
9329                 rec( 22, 1, SrcNameSpace ),
9330                 rec( 23, 1, NameLength ),
9331                 rec( 24, 12, Name12 ),
9332                 rec( 36, 2, CreationTime ),
9333                 rec( 38, 2, CreationDate ),
9334                 rec( 40, 4, CreatorID, BE ),
9335                 rec( 44, 2, ArchivedTime ),
9336                 rec( 46, 2, ArchivedDate ),
9337                 rec( 48, 4, ArchiverID ),
9338                 rec( 52, 2, UpdateTime ),
9339                 rec( 54, 2, UpdateDate ),
9340                 rec( 56, 4, UpdateID ),
9341                 rec( 60, 4, FileSize ),
9342                 rec( 64, 44, Reserved44 ),
9343                 rec( 108, 2, InheritedRightsMask ),
9344                 rec( 110, 2, LastAccessedDate ),
9345         ])
9346         pkt.CompletionCodes([0x0000, 0x8900, 0x9802, 0xbf00])
9347         # 2222/1631, 22/49
9348         pkt = NCP(0x1631, "Open Data Stream", 'file')
9349         pkt.Request( (15,269), [
9350                 rec( 10, 1, DataStream ),
9351                 rec( 11, 1, DirHandle ),
9352                 rec( 12, 1, AttributesDef ),
9353                 rec( 13, 1, OpenRights ),
9354                 rec( 14, (1, 255), FileName ),
9355         ], info_str=(FileName, "Open Data Stream: %s", ", %s"))
9356         pkt.Reply( 12, [
9357                 rec( 8, 4, CCFileHandle, BE ),
9358         ])
9359         pkt.CompletionCodes([0x0000, 0x8000, 0x8200, 0x9002, 0xbe00, 0xff00])
9360         # 2222/1632, 22/50
9361         pkt = NCP(0x1632, "Get Object Effective Rights for Directory Entry", 'file')
9362         pkt.Request( (16,270), [
9363                 rec( 10, 4, ObjectID, BE ),
9364                 rec( 14, 1, DirHandle ),
9365                 rec( 15, (1, 255), Path ),
9366         ], info_str=(Path, "Get Object Effective Rights: %s", ", %s"))
9367         pkt.Reply( 10, [
9368                 rec( 8, 2, TrusteeRights ),
9369         ])
9370         pkt.CompletionCodes([0x0000, 0x7e01, 0x9b00, 0x9c03, 0xfc06])
9371         # 2222/1633, 22/51
9372         pkt = NCP(0x1633, "Get Extended Volume Information", 'file')
9373         pkt.Request( 11, [
9374                 rec( 10, 1, VolumeNumber ),
9375         ],info_str=(VolumeNumber, "Get Extended Volume Information for Volume %d", ", %d"))
9376         pkt.Reply( (139,266), [
9377                 rec( 8, 2, VolInfoReplyLen ),
9378                 rec( 10, 128, VolInfoStructure),
9379                 rec( 138, (1,128), VolumeNameLen ),
9380         ])
9381         pkt.CompletionCodes([0x0000, 0x7e01, 0x9804, 0xfb08, 0xff00])
9382         # 2222/1634, 22/52
9383         pkt = NCP(0x1634, "Get Mount Volume List", 'file')
9384         pkt.Request( 22, [
9385                 rec( 10, 4, StartVolumeNumber ),
9386                 rec( 14, 4, VolumeRequestFlags, LE ),
9387                 rec( 18, 4, SrcNameSpace ),
9388         ])
9389         pkt.Reply( NO_LENGTH_CHECK, [
9390                 rec( 8, 4, ItemsInPacket, var="x" ),
9391                 rec( 12, 4, NextVolumeNumber ),
9392         srec( VolumeStruct, req_cond="ncp.volume_request_flags==0x0000", repeat="x" ),
9393         srec( VolumeWithNameStruct, req_cond="ncp.volume_request_flags==0x0001", repeat="x" ),
9394         ])
9395         pkt.ReqCondSizeVariable()
9396         pkt.CompletionCodes([0x0000, 0x9802])
9397     # 2222/1635, 22/53
9398         pkt = NCP(0x1635, "Get Volume Capabilities", 'file')
9399         pkt.Request( 18, [
9400                 rec( 10, 4, VolumeNumberLong ),
9401                 rec( 14, 4, VersionNumberLong ),
9402         ])
9403         pkt.Reply( 744, [
9404                 rec( 8, 4, VolumeCapabilities ),
9405                 rec( 12, 28, Reserved28 ),
9406         rec( 40, 64, VolumeNameStringz ),
9407         rec( 104, 128, VolumeGUID ),
9408                 rec( 232, 256, PoolName ),
9409         rec( 488, 256, VolumeMountPoint ),
9410         ])
9411         pkt.CompletionCodes([0x0000])
9412         # 2222/1700, 23/00
9413         pkt = NCP(0x1700, "Login User", 'connection')
9414         pkt.Request( (12, 58), [
9415                 rec( 10, (1,16), UserName ),
9416                 rec( -1, (1,32), Password ),
9417         ], info_str=(UserName, "Login User: %s", ", %s"))
9418         pkt.Reply(8)
9419         pkt.CompletionCodes([0x0000, 0x9602, 0xc101, 0xc200, 0xc501, 0xd700,
9420                              0xd900, 0xda00, 0xdb00, 0xde00, 0xdf00, 0xe800,
9421                              0xec00, 0xed00, 0xef00, 0xf001, 0xf100, 0xf200,
9422                              0xf600, 0xfb00, 0xfc06, 0xfe07, 0xff00])
9423         # 2222/1701, 23/01
9424         pkt = NCP(0x1701, "Change User Password", 'bindery')
9425         pkt.Request( (13, 90), [
9426                 rec( 10, (1,16), UserName ),
9427                 rec( -1, (1,32), Password ),
9428                 rec( -1, (1,32), NewPassword ),
9429         ], info_str=(UserName, "Change Password for User: %s", ", %s"))
9430         pkt.Reply(8)
9431         pkt.CompletionCodes([0x0000, 0x9600, 0xd600, 0xf001, 0xf101, 0xf501,
9432                              0xfc06, 0xfe07, 0xff00])
9433         # 2222/1702, 23/02
9434         pkt = NCP(0x1702, "Get User Connection List", 'connection')
9435         pkt.Request( (11, 26), [
9436                 rec( 10, (1,16), UserName ),
9437         ], info_str=(UserName, "Get User Connection: %s", ", %s"))
9438         pkt.Reply( (9, 136), [
9439                 rec( 8, (1, 128), ConnectionNumberList ),
9440         ])
9441         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
9442         # 2222/1703, 23/03
9443         pkt = NCP(0x1703, "Get User Number", 'bindery')
9444         pkt.Request( (11, 26), [
9445                 rec( 10, (1,16), UserName ),
9446         ], info_str=(UserName, "Get User Number: %s", ", %s"))
9447         pkt.Reply( 12, [
9448                 rec( 8, 4, ObjectID, BE ),
9449         ])
9450         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
9451         # 2222/1705, 23/05
9452         pkt = NCP(0x1705, "Get Station's Logged Info", 'connection')
9453         pkt.Request( 11, [
9454                 rec( 10, 1, TargetConnectionNumber ),
9455         ],info_str=(TargetConnectionNumber, "Get Station's Logged Information on Connection %d", ", %d"))
9456         pkt.Reply( 266, [
9457                 rec( 8, 16, UserName16 ),
9458                 rec( 24, 7, LoginTime ),
9459                 rec( 31, 39, FullName ),
9460                 rec( 70, 4, UserID, BE ),
9461                 rec( 74, 128, SecurityEquivalentList ),
9462                 rec( 202, 64, Reserved64 ),
9463         ])
9464         pkt.CompletionCodes([0x0000, 0x9602, 0xfc06, 0xfd00, 0xfe07, 0xff00])
9465         # 2222/1707, 23/07
9466         pkt = NCP(0x1707, "Get Group Number", 'bindery')
9467         pkt.Request( 14, [
9468                 rec( 10, 4, ObjectID, BE ),
9469         ])
9470         pkt.Reply( 62, [
9471                 rec( 8, 4, ObjectID, BE ),
9472                 rec( 12, 2, ObjectType, BE ),
9473                 rec( 14, 48, ObjectNameLen ),
9474         ])
9475         pkt.CompletionCodes([0x0000, 0x9602, 0xf101, 0xfc06, 0xfe07, 0xff00])
9476         # 2222/170C, 23/12
9477         pkt = NCP(0x170C, "Verify Serialization", 'fileserver')
9478         pkt.Request( 14, [
9479                 rec( 10, 4, ServerSerialNumber ),
9480         ])
9481         pkt.Reply(8)
9482         pkt.CompletionCodes([0x0000, 0xff00])
9483         # 2222/170D, 23/13
9484         pkt = NCP(0x170D, "Log Network Message", 'file')
9485         pkt.Request( (11, 68), [
9486                 rec( 10, (1, 58), TargetMessage ),
9487         ], info_str=(TargetMessage, "Log Network Message: %s", ", %s"))
9488         pkt.Reply(8)
9489         pkt.CompletionCodes([0x0000, 0x8000, 0x8100, 0x8800, 0x8d00, 0x8e00, 0x8f00,
9490                              0x9001, 0x9400, 0x9600, 0x9804, 0x9900, 0x9b00, 0xa100,
9491                              0xa201, 0xff00])
9492         # 2222/170E, 23/14
9493         pkt = NCP(0x170E, "Get Disk Utilization", 'fileserver')
9494         pkt.Request( 15, [
9495                 rec( 10, 1, VolumeNumber ),
9496                 rec( 11, 4, TrusteeID, BE ),
9497         ])
9498         pkt.Reply( 19, [
9499                 rec( 8, 1, VolumeNumber ),
9500                 rec( 9, 4, TrusteeID, BE ),
9501                 rec( 13, 2, DirectoryCount, BE ),
9502                 rec( 15, 2, FileCount, BE ),
9503                 rec( 17, 2, ClusterCount, BE ),
9504         ])
9505         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0xa100, 0xf200])
9506         # 2222/170F, 23/15
9507         pkt = NCP(0x170F, "Scan File Information", 'file')
9508         pkt.Request((15,269), [
9509                 rec( 10, 2, LastSearchIndex ),
9510                 rec( 12, 1, DirHandle ),
9511                 rec( 13, 1, SearchAttributes ),
9512                 rec( 14, (1, 255), FileName ),
9513         ], info_str=(FileName, "Scan File Information: %s", ", %s"))
9514         pkt.Reply( 102, [
9515                 rec( 8, 2, NextSearchIndex ),
9516                 rec( 10, 14, FileName14 ),
9517                 rec( 24, 2, AttributesDef16 ),
9518                 rec( 26, 4, FileSize, BE ),
9519                 rec( 30, 2, CreationDate, BE ),
9520                 rec( 32, 2, LastAccessedDate, BE ),
9521                 rec( 34, 2, ModifiedDate, BE ),
9522                 rec( 36, 2, ModifiedTime, BE ),
9523                 rec( 38, 4, CreatorID, BE ),
9524                 rec( 42, 2, ArchivedDate, BE ),
9525                 rec( 44, 2, ArchivedTime, BE ),
9526                 rec( 46, 56, Reserved56 ),
9527         ])
9528         pkt.CompletionCodes([0x0000, 0x8800, 0x8900, 0x9300, 0x9400, 0x9804, 0x9b00, 0x9c00,
9529                              0xa100, 0xfd00, 0xff17])
9530         # 2222/1710, 23/16
9531         pkt = NCP(0x1710, "Set File Information", 'file')
9532         pkt.Request((91,345), [
9533                 rec( 10, 2, AttributesDef16 ),
9534                 rec( 12, 4, FileSize, BE ),
9535                 rec( 16, 2, CreationDate, BE ),
9536                 rec( 18, 2, LastAccessedDate, BE ),
9537                 rec( 20, 2, ModifiedDate, BE ),
9538                 rec( 22, 2, ModifiedTime, BE ),
9539                 rec( 24, 4, CreatorID, BE ),
9540                 rec( 28, 2, ArchivedDate, BE ),
9541                 rec( 30, 2, ArchivedTime, BE ),
9542                 rec( 32, 56, Reserved56 ),
9543                 rec( 88, 1, DirHandle ),
9544                 rec( 89, 1, SearchAttributes ),
9545                 rec( 90, (1, 255), FileName ),
9546         ], info_str=(FileName, "Set Information for File: %s", ", %s"))
9547         pkt.Reply(8)
9548         pkt.CompletionCodes([0x0000, 0x8800, 0x8c00, 0x8e00, 0x9400, 0x9600, 0x9804,
9549                              0x9b03, 0x9c00, 0xa100, 0xa201, 0xfc06, 0xfd00, 0xfe07,
9550                              0xff17])
9551         # 2222/1711, 23/17
9552         pkt = NCP(0x1711, "Get File Server Information", 'fileserver')
9553         pkt.Request(10)
9554         pkt.Reply(136, [
9555                 rec( 8, 48, ServerName ),
9556                 rec( 56, 1, OSMajorVersion ),
9557                 rec( 57, 1, OSMinorVersion ),
9558                 rec( 58, 2, ConnectionsSupportedMax, BE ),
9559                 rec( 60, 2, ConnectionsInUse, BE ),
9560                 rec( 62, 2, VolumesSupportedMax, BE ),
9561                 rec( 64, 1, OSRevision ),
9562                 rec( 65, 1, SFTSupportLevel ),
9563                 rec( 66, 1, TTSLevel ),
9564                 rec( 67, 2, ConnectionsMaxUsed, BE ),
9565                 rec( 69, 1, AccountVersion ),
9566                 rec( 70, 1, VAPVersion ),
9567                 rec( 71, 1, QueueingVersion ),
9568                 rec( 72, 1, PrintServerVersion ),
9569                 rec( 73, 1, VirtualConsoleVersion ),
9570                 rec( 74, 1, SecurityRestrictionVersion ),
9571                 rec( 75, 1, InternetBridgeVersion ),
9572                 rec( 76, 1, MixedModePathFlag ),
9573                 rec( 77, 1, LocalLoginInfoCcode ),
9574                 rec( 78, 2, ProductMajorVersion, BE ),
9575                 rec( 80, 2, ProductMinorVersion, BE ),
9576                 rec( 82, 2, ProductRevisionVersion, BE ),
9577                 rec( 84, 1, OSLanguageID, LE ),
9578                 rec( 85, 1, SixtyFourBitOffsetsSupportedFlag ),
9579                 rec( 86, 50, Reserved50 ),
9580         ])
9581         pkt.CompletionCodes([0x0000, 0x9600])
9582         # 2222/1712, 23/18
9583         pkt = NCP(0x1712, "Get Network Serial Number", 'fileserver')
9584         pkt.Request(10)
9585         pkt.Reply(14, [
9586                 rec( 8, 4, ServerSerialNumber ),
9587                 rec( 12, 2, ApplicationNumber ),
9588         ])
9589         pkt.CompletionCodes([0x0000, 0x9600])
9590         # 2222/1713, 23/19
9591         pkt = NCP(0x1713, "Get Internet Address", 'connection')
9592         pkt.Request(11, [
9593                 rec( 10, 1, TargetConnectionNumber ),
9594         ],info_str=(TargetConnectionNumber, "Get Internet Address for Connection %d", ", %d"))
9595         pkt.Reply(20, [
9596                 rec( 8, 4, NetworkAddress, BE ),
9597                 rec( 12, 6, NetworkNodeAddress ),
9598                 rec( 18, 2, NetworkSocket, BE ),
9599         ])
9600         pkt.CompletionCodes([0x0000, 0xff00])
9601         # 2222/1714, 23/20
9602         pkt = NCP(0x1714, "Login Object", 'connection')
9603         pkt.Request( (14, 60), [
9604                 rec( 10, 2, ObjectType, BE ),
9605                 rec( 12, (1,16), ClientName ),
9606                 rec( -1, (1,32), Password ),
9607         ], info_str=(UserName, "Login Object: %s", ", %s"))
9608         pkt.Reply(8)
9609         pkt.CompletionCodes([0x0000, 0x9602, 0xc101, 0xc200, 0xc501, 0xd600, 0xd700,
9610                              0xd900, 0xda00, 0xdb00, 0xde00, 0xdf00, 0xe800, 0xec00,
9611                              0xed00, 0xef00, 0xf001, 0xf100, 0xf200, 0xf600, 0xfb00,
9612                              0xfc06, 0xfe07, 0xff00])
9613         # 2222/1715, 23/21
9614         pkt = NCP(0x1715, "Get Object Connection List", 'connection')
9615         pkt.Request( (13, 28), [
9616                 rec( 10, 2, ObjectType, BE ),
9617                 rec( 12, (1,16), ObjectName ),
9618         ], info_str=(UserName, "Get Object Connection List: %s", ", %s"))
9619         pkt.Reply( (9, 136), [
9620                 rec( 8, (1, 128), ConnectionNumberList ),
9621         ])
9622         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
9623         # 2222/1716, 23/22
9624         pkt = NCP(0x1716, "Get Station's Logged Info", 'connection')
9625         pkt.Request( 11, [
9626                 rec( 10, 1, TargetConnectionNumber ),
9627         ])
9628         pkt.Reply( 70, [
9629                 rec( 8, 4, UserID, BE ),
9630                 rec( 12, 2, ObjectType, BE ),
9631                 rec( 14, 48, ObjectNameLen ),
9632                 rec( 62, 7, LoginTime ),
9633                 rec( 69, 1, Reserved ),
9634         ])
9635         pkt.CompletionCodes([0x0000, 0x9602, 0xfb0a, 0xfc06, 0xfd00, 0xfe07, 0xff00])
9636         # 2222/1717, 23/23
9637         pkt = NCP(0x1717, "Get Login Key", 'connection')
9638         pkt.Request(10)
9639         pkt.Reply( 16, [
9640                 rec( 8, 8, LoginKey ),
9641         ])
9642         pkt.CompletionCodes([0x0000, 0x9602])
9643         # 2222/1718, 23/24
9644         pkt = NCP(0x1718, "Keyed Object Login", 'connection')
9645         pkt.Request( (21, 68), [
9646                 rec( 10, 8, LoginKey ),
9647                 rec( 18, 2, ObjectType, BE ),
9648                 rec( 20, (1,48), ObjectName ),
9649         ], info_str=(ObjectName, "Keyed Object Login: %s", ", %s"))
9650         pkt.Reply(8)
9651         pkt.CompletionCodes([0x0000, 0x9602, 0xc101, 0xc200, 0xc500, 0xd904, 0xda00,
9652                              0xdb00, 0xdc00, 0xde00, 0xff00])
9653         # 2222/171A, 23/26
9654         pkt = NCP(0x171A, "Get Internet Address", 'connection')
9655         pkt.Request(12, [
9656                 rec( 10, 2, TargetConnectionNumber ),
9657         ])
9658     # Dissect reply in packet-ncp2222.inc
9659         pkt.Reply(8)
9660         pkt.CompletionCodes([0x0000])
9661         # 2222/171B, 23/27
9662         pkt = NCP(0x171B, "Get Object Connection List", 'connection')
9663         pkt.Request( (17,64), [
9664                 rec( 10, 4, SearchConnNumber ),
9665                 rec( 14, 2, ObjectType, BE ),
9666                 rec( 16, (1,48), ObjectName ),
9667         ], info_str=(ObjectName, "Get Object Connection List: %s", ", %s"))
9668         pkt.Reply( (13), [
9669                 rec( 8, 1, ConnListLen, var="x" ),
9670                 rec( 9, 4, ConnectionNumber, LE, repeat="x" ),
9671         ])
9672         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
9673         # 2222/171C, 23/28
9674         pkt = NCP(0x171C, "Get Station's Logged Info", 'connection')
9675         pkt.Request( 14, [
9676                 rec( 10, 4, TargetConnectionNumber ),
9677         ])
9678         pkt.Reply( 70, [
9679                 rec( 8, 4, UserID, BE ),
9680                 rec( 12, 2, ObjectType, BE ),
9681                 rec( 14, 48, ObjectNameLen ),
9682                 rec( 62, 7, LoginTime ),
9683                 rec( 69, 1, Reserved ),
9684         ])
9685         pkt.CompletionCodes([0x0000, 0x7d00, 0x9602, 0xfb02, 0xfc06, 0xfd00, 0xfe07, 0xff00])
9686         # 2222/171D, 23/29
9687         pkt = NCP(0x171D, "Change Connection State", 'connection')
9688         pkt.Request( 11, [
9689                 rec( 10, 1, RequestCode ),
9690         ])
9691         pkt.Reply(8)
9692         pkt.CompletionCodes([0x0000, 0x0109, 0x7a00, 0x7b00, 0x7c00, 0xe000, 0xfb06, 0xfd00])
9693         # 2222/171E, 23/30
9694         pkt = NCP(0x171E, "Set Watchdog Delay Interval", 'connection')
9695         pkt.Request( 14, [
9696                 rec( 10, 4, NumberOfMinutesToDelay ),
9697         ])
9698         pkt.Reply(8)
9699         pkt.CompletionCodes([0x0000, 0x0107])
9700         # 2222/171F, 23/31
9701         pkt = NCP(0x171F, "Get Connection List From Object", 'connection')
9702         pkt.Request( 18, [
9703                 rec( 10, 4, ObjectID, BE ),
9704                 rec( 14, 4, ConnectionNumber ),
9705         ])
9706         pkt.Reply( (9, 136), [
9707                 rec( 8, (1, 128), ConnectionNumberList ),
9708         ])
9709         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
9710         # 2222/1720, 23/32
9711         pkt = NCP(0x1720, "Scan Bindery Object (List)", 'bindery')
9712         pkt.Request((23,70), [
9713                 rec( 10, 4, NextObjectID, BE ),
9714                 rec( 14, 2, ObjectType, BE ),
9715         rec( 16, 2, Reserved2 ),
9716                 rec( 18, 4, InfoFlags ),
9717                 rec( 22, (1,48), ObjectName ),
9718         ], info_str=(ObjectName, "Scan Bindery Object: %s", ", %s"))
9719         pkt.Reply(NO_LENGTH_CHECK, [
9720                 rec( 8, 4, ObjectInfoReturnCount ),
9721                 rec( 12, 4, NextObjectID, BE ),
9722                 rec( 16, 4, ObjectID ),
9723                 srec(ObjectTypeStruct, req_cond="ncp.info_flags_type == TRUE"),
9724                 srec(ObjectSecurityStruct, req_cond="ncp.info_flags_security == TRUE"),
9725                 srec(ObjectFlagsStruct, req_cond="ncp.info_flags_flags == TRUE"),
9726                 srec(ObjectNameStruct, req_cond="ncp.info_flags_name == TRUE"),
9727         ])
9728         pkt.ReqCondSizeVariable()
9729         pkt.CompletionCodes([0x0000, 0x9600, 0xef01, 0xfc02, 0xfe01, 0xff00])
9730         # 2222/1721, 23/33
9731         pkt = NCP(0x1721, "Generate GUIDs", 'connection')
9732         pkt.Request( 14, [
9733                 rec( 10, 4, ReturnInfoCount ),
9734         ])
9735         pkt.Reply(28, [
9736                 rec( 8, 4, ReturnInfoCount, var="x" ),
9737                 rec( 12, 16, GUID, repeat="x" ),
9738         ])
9739         pkt.CompletionCodes([0x0000, 0x7e01])
9740     # 2222/1722, 23/34
9741         pkt = NCP(0x1722, "Set Connection Language Encoding", 'connection')
9742         pkt.Request( 22, [
9743                 rec( 10, 4, SetMask ),
9744         rec( 14, 4, NCPEncodedStringsBits ),
9745         rec( 18, 4, CodePage ),
9746         ])
9747         pkt.Reply(8)
9748         pkt.CompletionCodes([0x0000])
9749         # 2222/1732, 23/50
9750         pkt = NCP(0x1732, "Create Bindery Object", 'bindery')
9751         pkt.Request( (15,62), [
9752                 rec( 10, 1, ObjectFlags ),
9753                 rec( 11, 1, ObjectSecurity ),
9754                 rec( 12, 2, ObjectType, BE ),
9755                 rec( 14, (1,48), ObjectName ),
9756         ], info_str=(ObjectName, "Create Bindery Object: %s", ", %s"))
9757         pkt.Reply(8)
9758         pkt.CompletionCodes([0x0000, 0x9600, 0xe700, 0xee00, 0xef00, 0xf101, 0xf501,
9759                              0xfc06, 0xfe07, 0xff00])
9760         # 2222/1733, 23/51
9761         pkt = NCP(0x1733, "Delete Bindery Object", 'bindery')
9762         pkt.Request( (13,60), [
9763                 rec( 10, 2, ObjectType, BE ),
9764                 rec( 12, (1,48), ObjectName ),
9765         ], info_str=(ObjectName, "Delete Bindery Object: %s", ", %s"))
9766         pkt.Reply(8)
9767         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf200, 0xf400, 0xf600, 0xfb00,
9768                              0xfc06, 0xfe07, 0xff00])
9769         # 2222/1734, 23/52
9770         pkt = NCP(0x1734, "Rename Bindery Object", 'bindery')
9771         pkt.Request( (14,108), [
9772                 rec( 10, 2, ObjectType, BE ),
9773                 rec( 12, (1,48), ObjectName ),
9774                 rec( -1, (1,48), NewObjectName ),
9775         ], info_str=(ObjectName, "Rename Bindery Object: %s", ", %s"))
9776         pkt.Reply(8)
9777         pkt.CompletionCodes([0x0000, 0x9600, 0xee00, 0xf000, 0xf300, 0xfc06, 0xfe07, 0xff00])
9778         # 2222/1735, 23/53
9779         pkt = NCP(0x1735, "Get Bindery Object ID", 'bindery')
9780         pkt.Request((13,60), [
9781                 rec( 10, 2, ObjectType, BE ),
9782                 rec( 12, (1,48), ObjectName ),
9783         ], info_str=(ObjectName, "Get Bindery Object: %s", ", %s"))
9784         pkt.Reply(62, [
9785                 rec( 8, 4, ObjectID, BE ),
9786                 rec( 12, 2, ObjectType, BE ),
9787                 rec( 14, 48, ObjectNameLen ),
9788         ])
9789         pkt.CompletionCodes([0x0000, 0x9600, 0xef01, 0xf000, 0xfc02, 0xfe01, 0xff00])
9790         # 2222/1736, 23/54
9791         pkt = NCP(0x1736, "Get Bindery Object Name", 'bindery')
9792         pkt.Request( 14, [
9793                 rec( 10, 4, ObjectID, BE ),
9794         ])
9795         pkt.Reply( 62, [
9796                 rec( 8, 4, ObjectID, BE ),
9797                 rec( 12, 2, ObjectType, BE ),
9798                 rec( 14, 48, ObjectNameLen ),
9799         ])
9800         pkt.CompletionCodes([0x0000, 0x9600, 0xf101, 0xfc02, 0xfe01, 0xff00])
9801         # 2222/1737, 23/55
9802         pkt = NCP(0x1737, "Scan Bindery Object", 'bindery')
9803         pkt.Request((17,64), [
9804                 rec( 10, 4, ObjectID, BE ),
9805                 rec( 14, 2, ObjectType, BE ),
9806                 rec( 16, (1,48), ObjectName ),
9807         ], info_str=(ObjectName, "Scan Bindery Object: %s", ", %s"))
9808         pkt.Reply(65, [
9809                 rec( 8, 4, ObjectID, BE ),
9810                 rec( 12, 2, ObjectType, BE ),
9811                 rec( 14, 48, ObjectNameLen ),
9812                 rec( 62, 1, ObjectFlags ),
9813                 rec( 63, 1, ObjectSecurity ),
9814                 rec( 64, 1, ObjectHasProperties ),
9815         ])
9816         pkt.CompletionCodes([0x0000, 0x9600, 0xef01, 0xfc02,
9817                              0xfe01, 0xff00])
9818         # 2222/1738, 23/56
9819         pkt = NCP(0x1738, "Change Bindery Object Security", 'bindery')
9820         pkt.Request((14,61), [
9821                 rec( 10, 1, ObjectSecurity ),
9822                 rec( 11, 2, ObjectType, BE ),
9823                 rec( 13, (1,48), ObjectName ),
9824         ], info_str=(ObjectName, "Change Bindery Object Security: %s", ", %s"))
9825         pkt.Reply(8)
9826         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf501, 0xfc02, 0xfe01, 0xff00])
9827         # 2222/1739, 23/57
9828         pkt = NCP(0x1739, "Create Property", 'bindery')
9829         pkt.Request((16,78), [
9830                 rec( 10, 2, ObjectType, BE ),
9831                 rec( 12, (1,48), ObjectName ),
9832                 rec( -1, 1, PropertyType ),
9833                 rec( -1, 1, ObjectSecurity ),
9834                 rec( -1, (1,16), PropertyName ),
9835         ], info_str=(PropertyName, "Create Property: %s", ", %s"))
9836         pkt.Reply(8)
9837         pkt.CompletionCodes([0x0000, 0x9600, 0xed00, 0xef00, 0xf000, 0xf101,
9838                              0xf200, 0xf600, 0xf700, 0xfb00, 0xfc02, 0xfe01,
9839                              0xff00])
9840         # 2222/173A, 23/58
9841         pkt = NCP(0x173A, "Delete Property", 'bindery')
9842         pkt.Request((14,76), [
9843                 rec( 10, 2, ObjectType, BE ),
9844                 rec( 12, (1,48), ObjectName ),
9845                 rec( -1, (1,16), PropertyName ),
9846         ], info_str=(PropertyName, "Delete Property: %s", ", %s"))
9847         pkt.Reply(8)
9848         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf600, 0xfb00, 0xfc02,
9849                              0xfe01, 0xff00])
9850         # 2222/173B, 23/59
9851         pkt = NCP(0x173B, "Change Property Security", 'bindery')
9852         pkt.Request((15,77), [
9853                 rec( 10, 2, ObjectType, BE ),
9854                 rec( 12, (1,48), ObjectName ),
9855                 rec( -1, 1, ObjectSecurity ),
9856                 rec( -1, (1,16), PropertyName ),
9857         ], info_str=(PropertyName, "Change Property Security: %s", ", %s"))
9858         pkt.Reply(8)
9859         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf200, 0xf600, 0xfb00,
9860                              0xfc02, 0xfe01, 0xff00])
9861         # 2222/173C, 23/60
9862         pkt = NCP(0x173C, "Scan Property", 'bindery')
9863         pkt.Request((18,80), [
9864                 rec( 10, 2, ObjectType, BE ),
9865                 rec( 12, (1,48), ObjectName ),
9866                 rec( -1, 4, LastInstance, BE ),
9867                 rec( -1, (1,16), PropertyName ),
9868         ], info_str=(PropertyName, "Scan Property: %s", ", %s"))
9869         pkt.Reply( 32, [
9870                 rec( 8, 16, PropertyName16 ),
9871                 rec( 24, 1, ObjectFlags ),
9872                 rec( 25, 1, ObjectSecurity ),
9873                 rec( 26, 4, SearchInstance, BE ),
9874                 rec( 30, 1, ValueAvailable ),
9875                 rec( 31, 1, MoreProperties ),
9876         ])
9877         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf200, 0xf600, 0xfb00,
9878                              0xfc02, 0xfe01, 0xff00])
9879         # 2222/173D, 23/61
9880         pkt = NCP(0x173D, "Read Property Value", 'bindery')
9881         pkt.Request((15,77), [
9882                 rec( 10, 2, ObjectType, BE ),
9883                 rec( 12, (1,48), ObjectName ),
9884                 rec( -1, 1, PropertySegment ),
9885                 rec( -1, (1,16), PropertyName ),
9886         ], info_str=(PropertyName, "Read Property Value: %s", ", %s"))
9887         pkt.Reply(138, [
9888                 rec( 8, 128, PropertyData ),
9889                 rec( 136, 1, PropertyHasMoreSegments ),
9890                 rec( 137, 1, PropertyType ),
9891         ])
9892         pkt.CompletionCodes([0x0000, 0x8800, 0x9300, 0x9600, 0xec01,
9893                              0xf000, 0xf100, 0xf900, 0xfb02, 0xfc02,
9894                              0xfe01, 0xff00])
9895         # 2222/173E, 23/62
9896         pkt = NCP(0x173E, "Write Property Value", 'bindery')
9897         pkt.Request((144,206), [
9898                 rec( 10, 2, ObjectType, BE ),
9899                 rec( 12, (1,48), ObjectName ),
9900                 rec( -1, 1, PropertySegment ),
9901                 rec( -1, 1, MoreFlag ),
9902                 rec( -1, (1,16), PropertyName ),
9903                 #
9904                 # XXX - don't show this if MoreFlag isn't set?
9905                 # In at least some packages where it's not set,
9906                 # PropertyValue appears to be garbage.
9907                 #
9908                 rec( -1, 128, PropertyValue ),
9909         ], info_str=(PropertyName, "Write Property Value: %s", ", %s"))
9910         pkt.Reply(8)
9911         pkt.CompletionCodes([0x0000, 0x9600, 0xe800, 0xec01, 0xf000, 0xf800,
9912                              0xfb02, 0xfc03, 0xfe01, 0xff00 ])
9913         # 2222/173F, 23/63
9914         pkt = NCP(0x173F, "Verify Bindery Object Password", 'bindery')
9915         pkt.Request((14,92), [
9916                 rec( 10, 2, ObjectType, BE ),
9917                 rec( 12, (1,48), ObjectName ),
9918                 rec( -1, (1,32), Password ),
9919         ], info_str=(ObjectName, "Verify Bindery Object Password: %s", ", %s"))
9920         pkt.Reply(8)
9921         pkt.CompletionCodes([0x0000, 0x9600, 0xe800, 0xec01, 0xf000, 0xf101,
9922                              0xfb02, 0xfc03, 0xfe01, 0xff00 ])
9923         # 2222/1740, 23/64
9924         pkt = NCP(0x1740, "Change Bindery Object Password", 'bindery')
9925         pkt.Request((15,124), [
9926                 rec( 10, 2, ObjectType, BE ),
9927                 rec( 12, (1,48), ObjectName ),
9928                 rec( -1, (1,32), Password ),
9929                 rec( -1, (1,32), NewPassword ),
9930         ], info_str=(ObjectName, "Change Bindery Object Password: %s", ", %s"))
9931         pkt.Reply(8)
9932         pkt.CompletionCodes([0x0000, 0x9600, 0xc501, 0xd701, 0xe800, 0xec01, 0xf001,
9933                              0xf100, 0xf800, 0xfb02, 0xfc03, 0xfe01, 0xff00])
9934         # 2222/1741, 23/65
9935         pkt = NCP(0x1741, "Add Bindery Object To Set", 'bindery')
9936         pkt.Request((17,126), [
9937                 rec( 10, 2, ObjectType, BE ),
9938                 rec( 12, (1,48), ObjectName ),
9939                 rec( -1, (1,16), PropertyName ),
9940                 rec( -1, 2, MemberType, BE ),
9941                 rec( -1, (1,48), MemberName ),
9942         ], info_str=(MemberName, "Add Bindery Object to Set: %s", ", %s"))
9943         pkt.Reply(8)
9944         pkt.CompletionCodes([0x0000, 0x9600, 0xe800, 0xe900, 0xea00, 0xeb00,
9945                              0xec01, 0xf000, 0xf800, 0xfb02, 0xfc03, 0xfe01,
9946                              0xff00])
9947         # 2222/1742, 23/66
9948         pkt = NCP(0x1742, "Delete Bindery Object From Set", 'bindery')
9949         pkt.Request((17,126), [
9950                 rec( 10, 2, ObjectType, BE ),
9951                 rec( 12, (1,48), ObjectName ),
9952                 rec( -1, (1,16), PropertyName ),
9953                 rec( -1, 2, MemberType, BE ),
9954                 rec( -1, (1,48), MemberName ),
9955         ], info_str=(MemberName, "Delete Bindery Object from Set: %s", ", %s"))
9956         pkt.Reply(8)
9957         pkt.CompletionCodes([0x0000, 0x9600, 0xeb00, 0xf000, 0xf800, 0xfb02,
9958                              0xfc03, 0xfe01, 0xff00])
9959         # 2222/1743, 23/67
9960         pkt = NCP(0x1743, "Is Bindery Object In Set", 'bindery')
9961         pkt.Request((17,126), [
9962                 rec( 10, 2, ObjectType, BE ),
9963                 rec( 12, (1,48), ObjectName ),
9964                 rec( -1, (1,16), PropertyName ),
9965                 rec( -1, 2, MemberType, BE ),
9966                 rec( -1, (1,48), MemberName ),
9967         ], info_str=(MemberName, "Is Bindery Object in Set: %s", ", %s"))
9968         pkt.Reply(8)
9969         pkt.CompletionCodes([0x0000, 0x9600, 0xea00, 0xeb00, 0xec01, 0xf000,
9970                              0xfb02, 0xfc03, 0xfe01, 0xff00])
9971         # 2222/1744, 23/68
9972         pkt = NCP(0x1744, "Close Bindery", 'bindery')
9973         pkt.Request(10)
9974         pkt.Reply(8)
9975         pkt.CompletionCodes([0x0000, 0xff00])
9976         # 2222/1745, 23/69
9977         pkt = NCP(0x1745, "Open Bindery", 'bindery')
9978         pkt.Request(10)
9979         pkt.Reply(8)
9980         pkt.CompletionCodes([0x0000, 0xff00])
9981         # 2222/1746, 23/70
9982         pkt = NCP(0x1746, "Get Bindery Access Level", 'bindery')
9983         pkt.Request(10)
9984         pkt.Reply(13, [
9985                 rec( 8, 1, ObjectSecurity ),
9986                 rec( 9, 4, LoggedObjectID, BE ),
9987         ])
9988         pkt.CompletionCodes([0x0000, 0x9600])
9989         # 2222/1747, 23/71
9990         pkt = NCP(0x1747, "Scan Bindery Object Trustee Paths", 'bindery')
9991         pkt.Request(17, [
9992                 rec( 10, 1, VolumeNumber ),
9993                 rec( 11, 2, LastSequenceNumber, BE ),
9994                 rec( 13, 4, ObjectID, BE ),
9995         ])
9996         pkt.Reply((16,270), [
9997                 rec( 8, 2, LastSequenceNumber, BE),
9998                 rec( 10, 4, ObjectID, BE ),
9999                 rec( 14, 1, ObjectSecurity ),
10000                 rec( 15, (1,255), Path ),
10001         ])
10002         pkt.CompletionCodes([0x0000, 0x9300, 0x9600, 0xa100, 0xf000, 0xf100,
10003                              0xf200, 0xfc02, 0xfe01, 0xff00])
10004         # 2222/1748, 23/72
10005         pkt = NCP(0x1748, "Get Bindery Object Access Level", 'bindery')
10006         pkt.Request(14, [
10007                 rec( 10, 4, ObjectID, BE ),
10008         ])
10009         pkt.Reply(9, [
10010                 rec( 8, 1, ObjectSecurity ),
10011         ])
10012         pkt.CompletionCodes([0x0000, 0x9600])
10013         # 2222/1749, 23/73
10014         pkt = NCP(0x1749, "Is Calling Station a Manager", 'bindery')
10015         pkt.Request(10)
10016         pkt.Reply(8)
10017         pkt.CompletionCodes([0x0003, 0xff1e])
10018         # 2222/174A, 23/74
10019         pkt = NCP(0x174A, "Keyed Verify Password", 'bindery')
10020         pkt.Request((21,68), [
10021                 rec( 10, 8, LoginKey ),
10022                 rec( 18, 2, ObjectType, BE ),
10023                 rec( 20, (1,48), ObjectName ),
10024         ], info_str=(ObjectName, "Keyed Verify Password: %s", ", %s"))
10025         pkt.Reply(8)
10026         pkt.CompletionCodes([0x0000, 0xc500, 0xfe01, 0xff0c])
10027         # 2222/174B, 23/75
10028         pkt = NCP(0x174B, "Keyed Change Password", 'bindery')
10029         pkt.Request((22,100), [
10030                 rec( 10, 8, LoginKey ),
10031                 rec( 18, 2, ObjectType, BE ),
10032                 rec( 20, (1,48), ObjectName ),
10033                 rec( -1, (1,32), Password ),
10034         ], info_str=(ObjectName, "Keyed Change Password: %s", ", %s"))
10035         pkt.Reply(8)
10036         pkt.CompletionCodes([0x0000, 0xc500, 0xfe01, 0xff0c])
10037         # 2222/174C, 23/76
10038         pkt = NCP(0x174C, "List Relations Of an Object", 'bindery')
10039         pkt.Request((18,80), [
10040                 rec( 10, 4, LastSeen, BE ),
10041                 rec( 14, 2, ObjectType, BE ),
10042                 rec( 16, (1,48), ObjectName ),
10043                 rec( -1, (1,16), PropertyName ),
10044         ], info_str=(ObjectName, "List Relations of an Object: %s", ", %s"))
10045         pkt.Reply(14, [
10046                 rec( 8, 2, RelationsCount, BE, var="x" ),
10047                 rec( 10, 4, ObjectID, BE, repeat="x" ),
10048         ])
10049         pkt.CompletionCodes([0x0000, 0xf000, 0xf200, 0xfe01, 0xff00])
10050         # 2222/1764, 23/100
10051         pkt = NCP(0x1764, "Create Queue", 'qms')
10052         pkt.Request((15,316), [
10053                 rec( 10, 2, QueueType, BE ),
10054                 rec( 12, (1,48), QueueName ),
10055                 rec( -1, 1, PathBase ),
10056                 rec( -1, (1,255), Path ),
10057         ], info_str=(QueueName, "Create Queue: %s", ", %s"))
10058         pkt.Reply(12, [
10059                 rec( 8, 4, QueueID ),
10060         ])
10061         pkt.CompletionCodes([0x0000, 0x9600, 0x9900, 0xd000, 0xd100,
10062                              0xd200, 0xd300, 0xd400, 0xd500, 0xd601,
10063                              0xd703, 0xd800, 0xd902, 0xda01, 0xdb02,
10064                              0xee00, 0xff00])
10065         # 2222/1765, 23/101
10066         pkt = NCP(0x1765, "Destroy Queue", 'qms')
10067         pkt.Request(14, [
10068                 rec( 10, 4, QueueID ),
10069         ])
10070         pkt.Reply(8)
10071         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10072                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10073                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10074         # 2222/1766, 23/102
10075         pkt = NCP(0x1766, "Read Queue Current Status", 'qms')
10076         pkt.Request(14, [
10077                 rec( 10, 4, QueueID ),
10078         ])
10079         pkt.Reply(20, [
10080                 rec( 8, 4, QueueID ),
10081                 rec( 12, 1, QueueStatus ),
10082                 rec( 13, 1, CurrentEntries ),
10083                 rec( 14, 1, CurrentServers, var="x" ),
10084                 rec( 15, 4, ServerID, repeat="x" ),
10085                 rec( 19, 1, ServerStationList, repeat="x" ),
10086         ])
10087         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10088                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10089                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10090         # 2222/1767, 23/103
10091         pkt = NCP(0x1767, "Set Queue Current Status", 'qms')
10092         pkt.Request(15, [
10093                 rec( 10, 4, QueueID ),
10094                 rec( 14, 1, QueueStatus ),
10095         ])
10096         pkt.Reply(8)
10097         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10098                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10099                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07,
10100                              0xff00])
10101         # 2222/1768, 23/104
10102         pkt = NCP(0x1768, "Create Queue Job And File", 'qms')
10103         pkt.Request(264, [
10104                 rec( 10, 4, QueueID ),
10105                 rec( 14, 250, JobStruct ),
10106         ])
10107         pkt.Reply(62, [
10108                 rec( 8, 1, ClientStation ),
10109                 rec( 9, 1, ClientTaskNumber ),
10110                 rec( 10, 4, ClientIDNumber, BE ),
10111                 rec( 14, 4, TargetServerIDNumber, BE ),
10112                 rec( 18, 6, TargetExecutionTime ),
10113                 rec( 24, 6, JobEntryTime ),
10114                 rec( 30, 2, JobNumber, BE ),
10115                 rec( 32, 2, JobType, BE ),
10116                 rec( 34, 1, JobPosition ),
10117                 rec( 35, 1, JobControlFlags ),
10118                 rec( 36, 14, JobFileName ),
10119                 rec( 50, 6, JobFileHandle ),
10120                 rec( 56, 1, ServerStation ),
10121                 rec( 57, 1, ServerTaskNumber ),
10122                 rec( 58, 4, ServerID, BE ),
10123         ])
10124         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10125                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10126                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07,
10127                              0xff00])
10128         # 2222/1769, 23/105
10129         pkt = NCP(0x1769, "Close File And Start Queue Job", 'qms')
10130         pkt.Request(16, [
10131                 rec( 10, 4, QueueID ),
10132                 rec( 14, 2, JobNumber, BE ),
10133         ])
10134         pkt.Reply(8)
10135         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10136                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10137                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10138         # 2222/176A, 23/106
10139         pkt = NCP(0x176A, "Remove Job From Queue", 'qms')
10140         pkt.Request(16, [
10141                 rec( 10, 4, QueueID ),
10142                 rec( 14, 2, JobNumber, BE ),
10143         ])
10144         pkt.Reply(8)
10145         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10146                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10147                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10148         # 2222/176B, 23/107
10149         pkt = NCP(0x176B, "Get Queue Job List", 'qms')
10150         pkt.Request(14, [
10151                 rec( 10, 4, QueueID ),
10152         ])
10153         pkt.Reply(12, [
10154                 rec( 8, 2, JobCount, BE, var="x" ),
10155                 rec( 10, 2, JobNumber, BE, repeat="x" ),
10156         ])
10157         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10158                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10159                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10160         # 2222/176C, 23/108
10161         pkt = NCP(0x176C, "Read Queue Job Entry", 'qms')
10162         pkt.Request(16, [
10163                 rec( 10, 4, QueueID ),
10164                 rec( 14, 2, JobNumber, BE ),
10165         ])
10166         pkt.Reply(258, [
10167             rec( 8, 250, JobStruct ),
10168         ])
10169         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10170                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10171                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10172         # 2222/176D, 23/109
10173         pkt = NCP(0x176D, "Change Queue Job Entry", 'qms')
10174         pkt.Request(260, [
10175             rec( 14, 250, JobStruct ),
10176         ])
10177         pkt.Reply(8)
10178         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10179                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10180                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
10181         # 2222/176E, 23/110
10182         pkt = NCP(0x176E, "Change Queue Job Position", 'qms')
10183         pkt.Request(17, [
10184                 rec( 10, 4, QueueID ),
10185                 rec( 14, 2, JobNumber, BE ),
10186                 rec( 16, 1, NewPosition ),
10187         ])
10188         pkt.Reply(8)
10189         pkt.CompletionCodes([0x0000, 0x9600, 0xd000, 0xd100, 0xd300, 0xd500,
10190                              0xd601, 0xfe07, 0xff1f])
10191         # 2222/176F, 23/111
10192         pkt = NCP(0x176F, "Attach Queue Server To Queue", 'qms')
10193         pkt.Request(14, [
10194                 rec( 10, 4, QueueID ),
10195         ])
10196         pkt.Reply(8)
10197         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10198                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10199                              0xd800, 0xd902, 0xda01, 0xdb02, 0xea00,
10200                              0xfc06, 0xff00])
10201         # 2222/1770, 23/112
10202         pkt = NCP(0x1770, "Detach Queue Server From Queue", 'qms')
10203         pkt.Request(14, [
10204                 rec( 10, 4, QueueID ),
10205         ])
10206         pkt.Reply(8)
10207         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10208                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10209                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10210         # 2222/1771, 23/113
10211         pkt = NCP(0x1771, "Service Queue Job", 'qms')
10212         pkt.Request(16, [
10213                 rec( 10, 4, QueueID ),
10214                 rec( 14, 2, ServiceType, BE ),
10215         ])
10216         pkt.Reply(62, [
10217                 rec( 8, 1, ClientStation ),
10218                 rec( 9, 1, ClientTaskNumber ),
10219                 rec( 10, 4, ClientIDNumber, BE ),
10220                 rec( 14, 4, TargetServerIDNumber, BE ),
10221                 rec( 18, 6, TargetExecutionTime ),
10222                 rec( 24, 6, JobEntryTime ),
10223                 rec( 30, 2, JobNumber, BE ),
10224                 rec( 32, 2, JobType, BE ),
10225                 rec( 34, 1, JobPosition ),
10226                 rec( 35, 1, JobControlFlags ),
10227                 rec( 36, 14, JobFileName ),
10228                 rec( 50, 6, JobFileHandle ),
10229                 rec( 56, 1, ServerStation ),
10230                 rec( 57, 1, ServerTaskNumber ),
10231                 rec( 58, 4, ServerID, BE ),
10232         ])
10233         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10234                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10235                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10236         # 2222/1772, 23/114
10237         pkt = NCP(0x1772, "Finish Servicing Queue Job", 'qms')
10238         pkt.Request(18, [
10239                 rec( 10, 4, QueueID ),
10240                 rec( 14, 2, JobNumber, BE ),
10241                 rec( 16, 2, ChargeInformation, BE ),
10242         ])
10243         pkt.Reply(8)
10244         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10245                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10246                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07, 0xff00])
10247         # 2222/1773, 23/115
10248         pkt = NCP(0x1773, "Abort Servicing Queue Job", 'qms')
10249         pkt.Request(16, [
10250                 rec( 10, 4, QueueID ),
10251                 rec( 14, 2, JobNumber, BE ),
10252         ])
10253         pkt.Reply(8)
10254         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10255                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10256                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07, 0xff18])
10257         # 2222/1774, 23/116
10258         pkt = NCP(0x1774, "Change To Client Rights", 'qms')
10259         pkt.Request(16, [
10260                 rec( 10, 4, QueueID ),
10261                 rec( 14, 2, JobNumber, BE ),
10262         ])
10263         pkt.Reply(8)
10264         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10265                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10266                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
10267         # 2222/1775, 23/117
10268         pkt = NCP(0x1775, "Restore Queue Server Rights", 'qms')
10269         pkt.Request(10)
10270         pkt.Reply(8)
10271         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10272                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10273                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10274         # 2222/1776, 23/118
10275         pkt = NCP(0x1776, "Read Queue Server Current Status", 'qms')
10276         pkt.Request(19, [
10277                 rec( 10, 4, QueueID ),
10278                 rec( 14, 4, ServerID, BE ),
10279                 rec( 18, 1, ServerStation ),
10280         ])
10281         pkt.Reply(72, [
10282                 rec( 8, 64, ServerStatusRecord ),
10283         ])
10284         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10285                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10286                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10287         # 2222/1777, 23/119
10288         pkt = NCP(0x1777, "Set Queue Server Current Status", 'qms')
10289         pkt.Request(78, [
10290                 rec( 10, 4, QueueID ),
10291                 rec( 14, 64, ServerStatusRecord ),
10292         ])
10293         pkt.Reply(8)
10294         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10295                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10296                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10297         # 2222/1778, 23/120
10298         pkt = NCP(0x1778, "Get Queue Job File Size", 'qms')
10299         pkt.Request(16, [
10300                 rec( 10, 4, QueueID ),
10301                 rec( 14, 2, JobNumber, BE ),
10302         ])
10303         pkt.Reply(18, [
10304                 rec( 8, 4, QueueID ),
10305                 rec( 12, 2, JobNumber, BE ),
10306                 rec( 14, 4, FileSize, BE ),
10307         ])
10308         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10309                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10310                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07, 0xff00])
10311         # 2222/1779, 23/121
10312         pkt = NCP(0x1779, "Create Queue Job And File", 'qms')
10313         pkt.Request(264, [
10314                 rec( 10, 4, QueueID ),
10315                 rec( 14, 250, JobStruct3x ),
10316         ])
10317         pkt.Reply(94, [
10318                 rec( 8, 86, JobStructNew ),
10319         ])
10320         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10321                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10322                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07, 0xff00])
10323         # 2222/177A, 23/122
10324         pkt = NCP(0x177A, "Read Queue Job Entry", 'qms')
10325         pkt.Request(18, [
10326                 rec( 10, 4, QueueID ),
10327                 rec( 14, 4, JobNumberLong ),
10328         ])
10329         pkt.Reply(258, [
10330             rec( 8, 250, JobStruct3x ),
10331         ])
10332         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10333                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10334                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10335         # 2222/177B, 23/123
10336         pkt = NCP(0x177B, "Change Queue Job Entry", 'qms')
10337         pkt.Request(264, [
10338                 rec( 10, 4, QueueID ),
10339                 rec( 14, 250, JobStruct ),
10340         ])
10341         pkt.Reply(8)
10342         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10343                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10344                              0xd800, 0xd902, 0xda01, 0xdb02, 0xea02, 0xfc07, 0xff00])
10345         # 2222/177C, 23/124
10346         pkt = NCP(0x177C, "Service Queue Job", 'qms')
10347         pkt.Request(16, [
10348                 rec( 10, 4, QueueID ),
10349                 rec( 14, 2, ServiceType ),
10350         ])
10351         pkt.Reply(94, [
10352             rec( 8, 86, JobStructNew ),
10353         ])
10354         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10355                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10356                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc05, 0xff00])
10357         # 2222/177D, 23/125
10358         pkt = NCP(0x177D, "Read Queue Current Status", 'qms')
10359         pkt.Request(14, [
10360                 rec( 10, 4, QueueID ),
10361         ])
10362         pkt.Reply(32, [
10363                 rec( 8, 4, QueueID ),
10364                 rec( 12, 1, QueueStatus ),
10365                 rec( 13, 3, Reserved3 ),
10366                 rec( 16, 4, CurrentEntries ),
10367                 rec( 20, 4, CurrentServers, var="x" ),
10368                 rec( 24, 4, ServerID, repeat="x" ),
10369                 rec( 28, 4, ServerStationLong, LE, repeat="x" ),
10370         ])
10371         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10372                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10373                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10374         # 2222/177E, 23/126
10375         pkt = NCP(0x177E, "Set Queue Current Status", 'qms')
10376         pkt.Request(15, [
10377                 rec( 10, 4, QueueID ),
10378                 rec( 14, 1, QueueStatus ),
10379         ])
10380         pkt.Reply(8)
10381         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10382                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10383                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10384         # 2222/177F, 23/127
10385         pkt = NCP(0x177F, "Close File And Start Queue Job", 'qms')
10386         pkt.Request(18, [
10387                 rec( 10, 4, QueueID ),
10388                 rec( 14, 4, JobNumberLong ),
10389         ])
10390         pkt.Reply(8)
10391         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10392                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10393                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07, 0xff00])
10394         # 2222/1780, 23/128
10395         pkt = NCP(0x1780, "Remove Job From Queue", 'qms')
10396         pkt.Request(18, [
10397                 rec( 10, 4, QueueID ),
10398                 rec( 14, 4, JobNumberLong ),
10399         ])
10400         pkt.Reply(8)
10401         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10402                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10403                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10404         # 2222/1781, 23/129
10405         pkt = NCP(0x1781, "Get Queue Job List", 'qms')
10406         pkt.Request(18, [
10407                 rec( 10, 4, QueueID ),
10408                 rec( 14, 4, JobNumberLong ),
10409         ])
10410         pkt.Reply(20, [
10411                 rec( 8, 4, TotalQueueJobs ),
10412                 rec( 12, 4, ReplyQueueJobNumbers, var="x" ),
10413                 rec( 16, 4, JobNumberLong, repeat="x" ),
10414         ])
10415         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10416                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10417                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10418         # 2222/1782, 23/130
10419         pkt = NCP(0x1782, "Change Job Priority", 'qms')
10420         pkt.Request(22, [
10421                 rec( 10, 4, QueueID ),
10422                 rec( 14, 4, JobNumberLong ),
10423                 rec( 18, 4, Priority ),
10424         ])
10425         pkt.Reply(8)
10426         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10427                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10428                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10429         # 2222/1783, 23/131
10430         pkt = NCP(0x1783, "Finish Servicing Queue Job", 'qms')
10431         pkt.Request(22, [
10432                 rec( 10, 4, QueueID ),
10433                 rec( 14, 4, JobNumberLong ),
10434                 rec( 18, 4, ChargeInformation ),
10435         ])
10436         pkt.Reply(8)
10437         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10438                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10439                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc05, 0xff00])
10440         # 2222/1784, 23/132
10441         pkt = NCP(0x1784, "Abort Servicing Queue Job", 'qms')
10442         pkt.Request(18, [
10443                 rec( 10, 4, QueueID ),
10444                 rec( 14, 4, JobNumberLong ),
10445         ])
10446         pkt.Reply(8)
10447         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10448                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10449                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc05, 0xff18])
10450         # 2222/1785, 23/133
10451         pkt = NCP(0x1785, "Change To Client Rights", 'qms')
10452         pkt.Request(18, [
10453                 rec( 10, 4, QueueID ),
10454                 rec( 14, 4, JobNumberLong ),
10455         ])
10456         pkt.Reply(8)
10457         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10458                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10459                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
10460         # 2222/1786, 23/134
10461         pkt = NCP(0x1786, "Read Queue Server Current Status", 'qms')
10462         pkt.Request(22, [
10463                 rec( 10, 4, QueueID ),
10464                 rec( 14, 4, ServerID, BE ),
10465                 rec( 18, 4, ServerStation ),
10466         ])
10467         pkt.Reply(72, [
10468                 rec( 8, 64, ServerStatusRecord ),
10469         ])
10470         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10471                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10472                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
10473         # 2222/1787, 23/135
10474         pkt = NCP(0x1787, "Get Queue Job File Size", 'qms')
10475         pkt.Request(18, [
10476                 rec( 10, 4, QueueID ),
10477                 rec( 14, 4, JobNumberLong ),
10478         ])
10479         pkt.Reply(20, [
10480                 rec( 8, 4, QueueID ),
10481                 rec( 12, 4, JobNumberLong ),
10482                 rec( 16, 4, FileSize, BE ),
10483         ])
10484         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
10485                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
10486                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc05, 0xff00])
10487         # 2222/1788, 23/136
10488         pkt = NCP(0x1788, "Move Queue Job From Src Q to Dst Q", 'qms')
10489         pkt.Request(22, [
10490                 rec( 10, 4, QueueID ),
10491                 rec( 14, 4, JobNumberLong ),
10492                 rec( 18, 4, DstQueueID ),
10493         ])
10494         pkt.Reply(12, [
10495                 rec( 8, 4, JobNumberLong ),
10496         ])
10497         pkt.CompletionCodes([0x0000, 0x7e01, 0xfc06])
10498         # 2222/1789, 23/137
10499         pkt = NCP(0x1789, "Get Queue Jobs From Form List", 'qms')
10500         pkt.Request(24, [
10501                 rec( 10, 4, QueueID ),
10502                 rec( 14, 4, QueueStartPosition ),
10503                 rec( 18, 4, FormTypeCnt, LE, var="x" ),
10504                 rec( 22, 2, FormType, repeat="x" ),
10505         ])
10506         pkt.Reply(20, [
10507                 rec( 8, 4, TotalQueueJobs ),
10508                 rec( 12, 4, JobCount, var="x" ),
10509                 rec( 16, 4, JobNumberLong, repeat="x" ),
10510         ])
10511         pkt.CompletionCodes([0x0000, 0x7e01, 0xd300, 0xfc06])
10512         # 2222/178A, 23/138
10513         pkt = NCP(0x178A, "Service Queue Job By Form List", 'qms')
10514         pkt.Request(24, [
10515                 rec( 10, 4, QueueID ),
10516                 rec( 14, 4, QueueStartPosition ),
10517                 rec( 18, 4, FormTypeCnt, LE, var= "x" ),
10518                 rec( 22, 2, FormType, repeat="x" ),
10519         ])
10520         pkt.Reply(94, [
10521            rec( 8, 86, JobStructNew ),
10522         ])
10523         pkt.CompletionCodes([0x0000, 0x7e01, 0xd902, 0xfc06, 0xff00])
10524         # 2222/1796, 23/150
10525         pkt = NCP(0x1796, "Get Current Account Status", 'accounting')
10526         pkt.Request((13,60), [
10527                 rec( 10, 2, ObjectType, BE ),
10528                 rec( 12, (1,48), ObjectName ),
10529         ], info_str=(ObjectName, "Get Current Account Status: %s", ", %s"))
10530         pkt.Reply(264, [
10531                 rec( 8, 4, AccountBalance, BE ),
10532                 rec( 12, 4, CreditLimit, BE ),
10533                 rec( 16, 120, Reserved120 ),
10534                 rec( 136, 4, HolderID, BE ),
10535                 rec( 140, 4, HoldAmount, BE ),
10536                 rec( 144, 4, HolderID, BE ),
10537                 rec( 148, 4, HoldAmount, BE ),
10538                 rec( 152, 4, HolderID, BE ),
10539                 rec( 156, 4, HoldAmount, BE ),
10540                 rec( 160, 4, HolderID, BE ),
10541                 rec( 164, 4, HoldAmount, BE ),
10542                 rec( 168, 4, HolderID, BE ),
10543                 rec( 172, 4, HoldAmount, BE ),
10544                 rec( 176, 4, HolderID, BE ),
10545                 rec( 180, 4, HoldAmount, BE ),
10546                 rec( 184, 4, HolderID, BE ),
10547                 rec( 188, 4, HoldAmount, BE ),
10548                 rec( 192, 4, HolderID, BE ),
10549                 rec( 196, 4, HoldAmount, BE ),
10550                 rec( 200, 4, HolderID, BE ),
10551                 rec( 204, 4, HoldAmount, BE ),
10552                 rec( 208, 4, HolderID, BE ),
10553                 rec( 212, 4, HoldAmount, BE ),
10554                 rec( 216, 4, HolderID, BE ),
10555                 rec( 220, 4, HoldAmount, BE ),
10556                 rec( 224, 4, HolderID, BE ),
10557                 rec( 228, 4, HoldAmount, BE ),
10558                 rec( 232, 4, HolderID, BE ),
10559                 rec( 236, 4, HoldAmount, BE ),
10560                 rec( 240, 4, HolderID, BE ),
10561                 rec( 244, 4, HoldAmount, BE ),
10562                 rec( 248, 4, HolderID, BE ),
10563                 rec( 252, 4, HoldAmount, BE ),
10564                 rec( 256, 4, HolderID, BE ),
10565                 rec( 260, 4, HoldAmount, BE ),
10566         ])
10567         pkt.CompletionCodes([0x0000, 0x9600, 0xc000, 0xc101, 0xc400, 0xe800,
10568                              0xea00, 0xeb00, 0xec00, 0xfc06, 0xfe07, 0xff00])
10569         # 2222/1797, 23/151
10570         pkt = NCP(0x1797, "Submit Account Charge", 'accounting')
10571         pkt.Request((26,327), [
10572                 rec( 10, 2, ServiceType, BE ),
10573                 rec( 12, 4, ChargeAmount, BE ),
10574                 rec( 16, 4, HoldCancelAmount, BE ),
10575                 rec( 20, 2, ObjectType, BE ),
10576                 rec( 22, 2, CommentType, BE ),
10577                 rec( 24, (1,48), ObjectName ),
10578                 rec( -1, (1,255), Comment ),
10579         ], info_str=(ObjectName, "Submit Account Charge: %s", ", %s"))
10580         pkt.Reply(8)
10581         pkt.CompletionCodes([0x0000, 0x0102, 0x8800, 0x9400, 0x9600, 0xa201,
10582                              0xc000, 0xc101, 0xc200, 0xc400, 0xe800, 0xea00,
10583                              0xeb00, 0xec00, 0xfe07, 0xff00])
10584         # 2222/1798, 23/152
10585         pkt = NCP(0x1798, "Submit Account Hold", 'accounting')
10586         pkt.Request((17,64), [
10587                 rec( 10, 4, HoldCancelAmount, BE ),
10588                 rec( 14, 2, ObjectType, BE ),
10589                 rec( 16, (1,48), ObjectName ),
10590         ], info_str=(ObjectName, "Submit Account Hold: %s", ", %s"))
10591         pkt.Reply(8)
10592         pkt.CompletionCodes([0x0000, 0x0102, 0x8800, 0x9400, 0x9600, 0xa201,
10593                              0xc000, 0xc101, 0xc200, 0xc400, 0xe800, 0xea00,
10594                              0xeb00, 0xec00, 0xfe07, 0xff00])
10595         # 2222/1799, 23/153
10596         pkt = NCP(0x1799, "Submit Account Note", 'accounting')
10597         pkt.Request((18,319), [
10598                 rec( 10, 2, ServiceType, BE ),
10599                 rec( 12, 2, ObjectType, BE ),
10600                 rec( 14, 2, CommentType, BE ),
10601                 rec( 16, (1,48), ObjectName ),
10602                 rec( -1, (1,255), Comment ),
10603         ], info_str=(ObjectName, "Submit Account Note: %s", ", %s"))
10604         pkt.Reply(8)
10605         pkt.CompletionCodes([0x0000, 0x0102, 0x9600, 0xc000, 0xc101, 0xc400,
10606                              0xe800, 0xea00, 0xeb00, 0xec00, 0xf000, 0xfc06,
10607                              0xff00])
10608         # 2222/17c8, 23/200
10609         pkt = NCP(0x17c8, "Check Console Privileges", 'fileserver')
10610         pkt.Request(10)
10611         pkt.Reply(8)
10612         pkt.CompletionCodes([0x0000, 0xc601])
10613         # 2222/17c9, 23/201
10614         pkt = NCP(0x17c9, "Get File Server Description Strings", 'fileserver')
10615         pkt.Request(10)
10616         pkt.Reply(108, [
10617                 rec( 8, 100, DescriptionStrings ),
10618         ])
10619         pkt.CompletionCodes([0x0000, 0x9600])
10620         # 2222/17CA, 23/202
10621         pkt = NCP(0x17CA, "Set File Server Date And Time", 'fileserver')
10622         pkt.Request(16, [
10623                 rec( 10, 1, Year ),
10624                 rec( 11, 1, Month ),
10625                 rec( 12, 1, Day ),
10626                 rec( 13, 1, Hour ),
10627                 rec( 14, 1, Minute ),
10628                 rec( 15, 1, Second ),
10629         ])
10630         pkt.Reply(8)
10631         pkt.CompletionCodes([0x0000, 0xc601])
10632         # 2222/17CB, 23/203
10633         pkt = NCP(0x17CB, "Disable File Server Login", 'fileserver')
10634         pkt.Request(10)
10635         pkt.Reply(8)
10636         pkt.CompletionCodes([0x0000, 0xc601])
10637         # 2222/17CC, 23/204
10638         pkt = NCP(0x17CC, "Enable File Server Login", 'fileserver')
10639         pkt.Request(10)
10640         pkt.Reply(8)
10641         pkt.CompletionCodes([0x0000, 0xc601])
10642         # 2222/17CD, 23/205
10643         pkt = NCP(0x17CD, "Get File Server Login Status", 'fileserver')
10644         pkt.Request(10)
10645         pkt.Reply(9, [
10646                 rec( 8, 1, UserLoginAllowed ),
10647         ])
10648         pkt.CompletionCodes([0x0000, 0x9600, 0xfb01])
10649         # 2222/17CF, 23/207
10650         pkt = NCP(0x17CF, "Disable Transaction Tracking", 'fileserver')
10651         pkt.Request(10)
10652         pkt.Reply(8)
10653         pkt.CompletionCodes([0x0000, 0xc601])
10654         # 2222/17D0, 23/208
10655         pkt = NCP(0x17D0, "Enable Transaction Tracking", 'fileserver')
10656         pkt.Request(10)
10657         pkt.Reply(8)
10658         pkt.CompletionCodes([0x0000, 0xc601])
10659         # 2222/17D1, 23/209
10660         pkt = NCP(0x17D1, "Send Console Broadcast", 'fileserver')
10661         pkt.Request((13,267), [
10662                 rec( 10, 1, NumberOfStations, var="x" ),
10663                 rec( 11, 1, StationList, repeat="x" ),
10664                 rec( 12, (1, 255), TargetMessage ),
10665         ], info_str=(TargetMessage, "Send Console Broadcast: %s", ", %s"))
10666         pkt.Reply(8)
10667         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10668         # 2222/17D2, 23/210
10669         pkt = NCP(0x17D2, "Clear Connection Number", 'fileserver')
10670         pkt.Request(11, [
10671                 rec( 10, 1, ConnectionNumber ),
10672         ],info_str=(ConnectionNumber, "Clear Connection Number %d", ", %d"))
10673         pkt.Reply(8)
10674         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10675         # 2222/17D3, 23/211
10676         pkt = NCP(0x17D3, "Down File Server", 'fileserver')
10677         pkt.Request(11, [
10678                 rec( 10, 1, ForceFlag ),
10679         ])
10680         pkt.Reply(8)
10681         pkt.CompletionCodes([0x0000, 0xc601, 0xff00])
10682         # 2222/17D4, 23/212
10683         pkt = NCP(0x17D4, "Get File System Statistics", 'fileserver')
10684         pkt.Request(10)
10685         pkt.Reply(50, [
10686                 rec( 8, 4, SystemIntervalMarker, BE ),
10687                 rec( 12, 2, ConfiguredMaxOpenFiles ),
10688                 rec( 14, 2, ActualMaxOpenFiles ),
10689                 rec( 16, 2, CurrentOpenFiles ),
10690                 rec( 18, 4, TotalFilesOpened ),
10691                 rec( 22, 4, TotalReadRequests ),
10692                 rec( 26, 4, TotalWriteRequests ),
10693                 rec( 30, 2, CurrentChangedFATs ),
10694                 rec( 32, 4, TotalChangedFATs ),
10695                 rec( 36, 2, FATWriteErrors ),
10696                 rec( 38, 2, FatalFATWriteErrors ),
10697                 rec( 40, 2, FATScanErrors ),
10698                 rec( 42, 2, ActualMaxIndexedFiles ),
10699                 rec( 44, 2, ActiveIndexedFiles ),
10700                 rec( 46, 2, AttachedIndexedFiles ),
10701                 rec( 48, 2, AvailableIndexedFiles ),
10702         ])
10703         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10704         # 2222/17D5, 23/213
10705         pkt = NCP(0x17D5, "Get Transaction Tracking Statistics", 'fileserver')
10706         pkt.Request((13,267), [
10707                 rec( 10, 2, LastRecordSeen ),
10708                 rec( 12, (1,255), SemaphoreName ),
10709         ])
10710         pkt.Reply(53, [
10711                 rec( 8, 4, SystemIntervalMarker, BE ),
10712                 rec( 12, 1, TransactionTrackingSupported ),
10713                 rec( 13, 1, TransactionTrackingEnabled ),
10714                 rec( 14, 2, TransactionVolumeNumber ),
10715                 rec( 16, 2, ConfiguredMaxSimultaneousTransactions ),
10716                 rec( 18, 2, ActualMaxSimultaneousTransactions ),
10717                 rec( 20, 2, CurrentTransactionCount ),
10718                 rec( 22, 4, TotalTransactionsPerformed ),
10719                 rec( 26, 4, TotalWriteTransactionsPerformed ),
10720                 rec( 30, 4, TotalTransactionsBackedOut ),
10721                 rec( 34, 2, TotalUnfilledBackoutRequests ),
10722                 rec( 36, 2, TransactionDiskSpace ),
10723                 rec( 38, 4, TransactionFATAllocations ),
10724                 rec( 42, 4, TransactionFileSizeChanges ),
10725                 rec( 46, 4, TransactionFilesTruncated ),
10726                 rec( 50, 1, NumberOfEntries, var="x" ),
10727                 rec( 51, 2, ConnTaskStruct, repeat="x" ),
10728         ])
10729         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10730         # 2222/17D6, 23/214
10731         pkt = NCP(0x17D6, "Read Disk Cache Statistics", 'fileserver')
10732         pkt.Request(10)
10733         pkt.Reply(86, [
10734                 rec( 8, 4, SystemIntervalMarker, BE ),
10735                 rec( 12, 2, CacheBufferCount ),
10736                 rec( 14, 2, CacheBufferSize ),
10737                 rec( 16, 2, DirtyCacheBuffers ),
10738                 rec( 18, 4, CacheReadRequests ),
10739                 rec( 22, 4, CacheWriteRequests ),
10740                 rec( 26, 4, CacheHits ),
10741                 rec( 30, 4, CacheMisses ),
10742                 rec( 34, 4, PhysicalReadRequests ),
10743                 rec( 38, 4, PhysicalWriteRequests ),
10744                 rec( 42, 2, PhysicalReadErrors ),
10745                 rec( 44, 2, PhysicalWriteErrors ),
10746                 rec( 46, 4, CacheGetRequests ),
10747                 rec( 50, 4, CacheFullWriteRequests ),
10748                 rec( 54, 4, CachePartialWriteRequests ),
10749                 rec( 58, 4, BackgroundDirtyWrites ),
10750                 rec( 62, 4, BackgroundAgedWrites ),
10751                 rec( 66, 4, TotalCacheWrites ),
10752                 rec( 70, 4, CacheAllocations ),
10753                 rec( 74, 2, ThrashingCount ),
10754                 rec( 76, 2, LRUBlockWasDirty ),
10755                 rec( 78, 2, ReadBeyondWrite ),
10756                 rec( 80, 2, FragmentWriteOccurred ),
10757                 rec( 82, 2, CacheHitOnUnavailableBlock ),
10758                 rec( 84, 2, CacheBlockScrapped ),
10759         ])
10760         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10761         # 2222/17D7, 23/215
10762         pkt = NCP(0x17D7, "Get Drive Mapping Table", 'fileserver')
10763         pkt.Request(10)
10764         pkt.Reply(184, [
10765                 rec( 8, 4, SystemIntervalMarker, BE ),
10766                 rec( 12, 1, SFTSupportLevel ),
10767                 rec( 13, 1, LogicalDriveCount ),
10768                 rec( 14, 1, PhysicalDriveCount ),
10769                 rec( 15, 1, DiskChannelTable ),
10770                 rec( 16, 4, Reserved4 ),
10771                 rec( 20, 2, PendingIOCommands, BE ),
10772                 rec( 22, 32, DriveMappingTable ),
10773                 rec( 54, 32, DriveMirrorTable ),
10774                 rec( 86, 32, DeadMirrorTable ),
10775                 rec( 118, 1, ReMirrorDriveNumber ),
10776                 rec( 119, 1, Filler ),
10777                 rec( 120, 4, ReMirrorCurrentOffset, BE ),
10778                 rec( 124, 60, SFTErrorTable ),
10779         ])
10780         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10781         # 2222/17D8, 23/216
10782         pkt = NCP(0x17D8, "Read Physical Disk Statistics", 'fileserver')
10783         pkt.Request(11, [
10784                 rec( 10, 1, PhysicalDiskNumber ),
10785         ])
10786         pkt.Reply(101, [
10787                 rec( 8, 4, SystemIntervalMarker, BE ),
10788                 rec( 12, 1, PhysicalDiskChannel ),
10789                 rec( 13, 1, DriveRemovableFlag ),
10790                 rec( 14, 1, PhysicalDriveType ),
10791                 rec( 15, 1, ControllerDriveNumber ),
10792                 rec( 16, 1, ControllerNumber ),
10793                 rec( 17, 1, ControllerType ),
10794                 rec( 18, 4, DriveSize ),
10795                 rec( 22, 2, DriveCylinders ),
10796                 rec( 24, 1, DriveHeads ),
10797                 rec( 25, 1, SectorsPerTrack ),
10798                 rec( 26, 64, DriveDefinitionString ),
10799                 rec( 90, 2, IOErrorCount ),
10800                 rec( 92, 4, HotFixTableStart ),
10801                 rec( 96, 2, HotFixTableSize ),
10802                 rec( 98, 2, HotFixBlocksAvailable ),
10803                 rec( 100, 1, HotFixDisabled ),
10804         ])
10805         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10806         # 2222/17D9, 23/217
10807         pkt = NCP(0x17D9, "Get Disk Channel Statistics", 'fileserver')
10808         pkt.Request(11, [
10809                 rec( 10, 1, DiskChannelNumber ),
10810         ])
10811         pkt.Reply(192, [
10812                 rec( 8, 4, SystemIntervalMarker, BE ),
10813                 rec( 12, 2, ChannelState, BE ),
10814                 rec( 14, 2, ChannelSynchronizationState, BE ),
10815                 rec( 16, 1, SoftwareDriverType ),
10816                 rec( 17, 1, SoftwareMajorVersionNumber ),
10817                 rec( 18, 1, SoftwareMinorVersionNumber ),
10818                 rec( 19, 65, SoftwareDescription ),
10819                 rec( 84, 8, IOAddressesUsed ),
10820                 rec( 92, 10, SharedMemoryAddresses ),
10821                 rec( 102, 4, InterruptNumbersUsed ),
10822                 rec( 106, 4, DMAChannelsUsed ),
10823                 rec( 110, 1, FlagBits ),
10824                 rec( 111, 1, Reserved ),
10825                 rec( 112, 80, ConfigurationDescription ),
10826         ])
10827         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10828         # 2222/17DB, 23/219
10829         pkt = NCP(0x17DB, "Get Connection's Open Files", 'fileserver')
10830         pkt.Request(14, [
10831                 rec( 10, 2, ConnectionNumber ),
10832                 rec( 12, 2, LastRecordSeen, BE ),
10833         ])
10834         pkt.Reply(32, [
10835                 rec( 8, 2, NextRequestRecord ),
10836                 rec( 10, 1, NumberOfRecords, var="x" ),
10837                 rec( 11, 21, ConnStruct, repeat="x" ),
10838         ])
10839         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10840         # 2222/17DC, 23/220
10841         pkt = NCP(0x17DC, "Get Connection Using A File", 'fileserver')
10842         pkt.Request((14,268), [
10843                 rec( 10, 2, LastRecordSeen, BE ),
10844                 rec( 12, 1, DirHandle ),
10845                 rec( 13, (1,255), Path ),
10846         ], info_str=(Path, "Get Connection Using File: %s", ", %s"))
10847         pkt.Reply(30, [
10848                 rec( 8, 2, UseCount, BE ),
10849                 rec( 10, 2, OpenCount, BE ),
10850                 rec( 12, 2, OpenForReadCount, BE ),
10851                 rec( 14, 2, OpenForWriteCount, BE ),
10852                 rec( 16, 2, DenyReadCount, BE ),
10853                 rec( 18, 2, DenyWriteCount, BE ),
10854                 rec( 20, 2, NextRequestRecord, BE ),
10855                 rec( 22, 1, Locked ),
10856                 rec( 23, 1, NumberOfRecords, var="x" ),
10857                 rec( 24, 6, ConnFileStruct, repeat="x" ),
10858         ])
10859         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10860         # 2222/17DD, 23/221
10861         pkt = NCP(0x17DD, "Get Physical Record Locks By Connection And File", 'fileserver')
10862         pkt.Request(31, [
10863                 rec( 10, 2, TargetConnectionNumber ),
10864                 rec( 12, 2, LastRecordSeen, BE ),
10865                 rec( 14, 1, VolumeNumber ),
10866                 rec( 15, 2, DirectoryID ),
10867                 rec( 17, 14, FileName14 ),
10868         ], info_str=(FileName14, "Get Physical Record Locks by Connection and File: %s", ", %s"))
10869         pkt.Reply(22, [
10870                 rec( 8, 2, NextRequestRecord ),
10871                 rec( 10, 1, NumberOfLocks, var="x" ),
10872                 rec( 11, 1, Reserved ),
10873                 rec( 12, 10, LockStruct, repeat="x" ),
10874         ])
10875         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10876         # 2222/17DE, 23/222
10877         pkt = NCP(0x17DE, "Get Physical Record Locks By File", 'fileserver')
10878         pkt.Request((14,268), [
10879                 rec( 10, 2, TargetConnectionNumber ),
10880                 rec( 12, 1, DirHandle ),
10881                 rec( 13, (1,255), Path ),
10882         ], info_str=(Path, "Get Physical Record Locks by File: %s", ", %s"))
10883         pkt.Reply(28, [
10884                 rec( 8, 2, NextRequestRecord ),
10885                 rec( 10, 1, NumberOfLocks, var="x" ),
10886                 rec( 11, 1, Reserved ),
10887                 rec( 12, 16, PhyLockStruct, repeat="x" ),
10888         ])
10889         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10890         # 2222/17DF, 23/223
10891         pkt = NCP(0x17DF, "Get Logical Records By Connection", 'fileserver')
10892         pkt.Request(14, [
10893                 rec( 10, 2, TargetConnectionNumber ),
10894                 rec( 12, 2, LastRecordSeen, BE ),
10895         ])
10896         pkt.Reply((14,268), [
10897                 rec( 8, 2, NextRequestRecord ),
10898                 rec( 10, 1, NumberOfRecords, var="x" ),
10899                 rec( 11, (3, 257), LogLockStruct, repeat="x" ),
10900         ])
10901         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10902         # 2222/17E0, 23/224
10903         pkt = NCP(0x17E0, "Get Logical Record Information", 'fileserver')
10904         pkt.Request((13,267), [
10905                 rec( 10, 2, LastRecordSeen ),
10906                 rec( 12, (1,255), LogicalRecordName ),
10907         ], info_str=(LogicalRecordName, "Get Logical Record Information: %s", ", %s"))
10908         pkt.Reply(20, [
10909                 rec( 8, 2, UseCount, BE ),
10910                 rec( 10, 2, ShareableLockCount, BE ),
10911                 rec( 12, 2, NextRequestRecord ),
10912                 rec( 14, 1, Locked ),
10913                 rec( 15, 1, NumberOfRecords, var="x" ),
10914                 rec( 16, 4, LogRecStruct, repeat="x" ),
10915         ])
10916         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10917         # 2222/17E1, 23/225
10918         pkt = NCP(0x17E1, "Get Connection's Semaphores", 'fileserver')
10919         pkt.Request(14, [
10920                 rec( 10, 2, ConnectionNumber ),
10921                 rec( 12, 2, LastRecordSeen ),
10922         ])
10923         pkt.Reply((18,272), [
10924                 rec( 8, 2, NextRequestRecord ),
10925                 rec( 10, 2, NumberOfSemaphores, var="x" ),
10926                 rec( 12, (6,260), SemaStruct, repeat="x" ),
10927         ])
10928         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10929         # 2222/17E2, 23/226
10930         pkt = NCP(0x17E2, "Get Semaphore Information", 'fileserver')
10931         pkt.Request((13,267), [
10932                 rec( 10, 2, LastRecordSeen ),
10933                 rec( 12, (1,255), SemaphoreName ),
10934         ], info_str=(SemaphoreName, "Get Semaphore Information: %s", ", %s"))
10935         pkt.Reply(17, [
10936                 rec( 8, 2, NextRequestRecord, BE ),
10937                 rec( 10, 2, OpenCount, BE ),
10938                 rec( 12, 1, SemaphoreValue ),
10939                 rec( 13, 1, NumberOfRecords, var="x" ),
10940                 rec( 14, 3, SemaInfoStruct, repeat="x" ),
10941         ])
10942         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10943         # 2222/17E3, 23/227
10944         pkt = NCP(0x17E3, "Get LAN Driver Configuration Information", 'fileserver')
10945         pkt.Request(11, [
10946                 rec( 10, 1, LANDriverNumber ),
10947         ])
10948         pkt.Reply(180, [
10949                 rec( 8, 4, NetworkAddress, BE ),
10950                 rec( 12, 6, HostAddress ),
10951                 rec( 18, 1, BoardInstalled ),
10952                 rec( 19, 1, OptionNumber ),
10953                 rec( 20, 160, ConfigurationText ),
10954         ])
10955         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10956         # 2222/17E5, 23/229
10957         pkt = NCP(0x17E5, "Get Connection Usage Statistics", 'fileserver')
10958         pkt.Request(12, [
10959                 rec( 10, 2, ConnectionNumber ),
10960         ])
10961         pkt.Reply(26, [
10962                 rec( 8, 2, NextRequestRecord ),
10963                 rec( 10, 6, BytesRead ),
10964                 rec( 16, 6, BytesWritten ),
10965                 rec( 22, 4, TotalRequestPackets ),
10966          ])
10967         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10968         # 2222/17E6, 23/230
10969         pkt = NCP(0x17E6, "Get Object's Remaining Disk Space", 'fileserver')
10970         pkt.Request(14, [
10971                 rec( 10, 4, ObjectID, BE ),
10972         ])
10973         pkt.Reply(21, [
10974                 rec( 8, 4, SystemIntervalMarker, BE ),
10975                 rec( 12, 4, ObjectID ),
10976                 rec( 16, 4, UnusedDiskBlocks, BE ),
10977                 rec( 20, 1, RestrictionsEnforced ),
10978          ])
10979         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10980         # 2222/17E7, 23/231
10981         pkt = NCP(0x17E7, "Get File Server LAN I/O Statistics", 'fileserver')
10982         pkt.Request(10)
10983         pkt.Reply(74, [
10984                 rec( 8, 4, SystemIntervalMarker, BE ),
10985                 rec( 12, 2, ConfiguredMaxRoutingBuffers ),
10986                 rec( 14, 2, ActualMaxUsedRoutingBuffers ),
10987                 rec( 16, 2, CurrentlyUsedRoutingBuffers ),
10988                 rec( 18, 4, TotalFileServicePackets ),
10989                 rec( 22, 2, TurboUsedForFileService ),
10990                 rec( 24, 2, PacketsFromInvalidConnection ),
10991                 rec( 26, 2, BadLogicalConnectionCount ),
10992                 rec( 28, 2, PacketsReceivedDuringProcessing ),
10993                 rec( 30, 2, RequestsReprocessed ),
10994                 rec( 32, 2, PacketsWithBadSequenceNumber ),
10995                 rec( 34, 2, DuplicateRepliesSent ),
10996                 rec( 36, 2, PositiveAcknowledgesSent ),
10997                 rec( 38, 2, PacketsWithBadRequestType ),
10998                 rec( 40, 2, AttachDuringProcessing ),
10999                 rec( 42, 2, AttachWhileProcessingAttach ),
11000                 rec( 44, 2, ForgedDetachedRequests ),
11001                 rec( 46, 2, DetachForBadConnectionNumber ),
11002                 rec( 48, 2, DetachDuringProcessing ),
11003                 rec( 50, 2, RepliesCancelled ),
11004                 rec( 52, 2, PacketsDiscardedByHopCount ),
11005                 rec( 54, 2, PacketsDiscardedUnknownNet ),
11006                 rec( 56, 2, IncomingPacketDiscardedNoDGroup ),
11007                 rec( 58, 2, OutgoingPacketDiscardedNoTurboBuffer ),
11008                 rec( 60, 2, IPXNotMyNetwork ),
11009                 rec( 62, 4, NetBIOSBroadcastWasPropogated ),
11010                 rec( 66, 4, TotalOtherPackets ),
11011                 rec( 70, 4, TotalRoutedPackets ),
11012          ])
11013         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
11014         # 2222/17E8, 23/232
11015         pkt = NCP(0x17E8, "Get File Server Misc Information", 'fileserver')
11016         pkt.Request(10)
11017         pkt.Reply(40, [
11018                 rec( 8, 4, SystemIntervalMarker, BE ),
11019                 rec( 12, 1, ProcessorType ),
11020                 rec( 13, 1, Reserved ),
11021                 rec( 14, 1, NumberOfServiceProcesses ),
11022                 rec( 15, 1, ServerUtilizationPercentage ),
11023                 rec( 16, 2, ConfiguredMaxBinderyObjects ),
11024                 rec( 18, 2, ActualMaxBinderyObjects ),
11025                 rec( 20, 2, CurrentUsedBinderyObjects ),
11026                 rec( 22, 2, TotalServerMemory ),
11027                 rec( 24, 2, WastedServerMemory ),
11028                 rec( 26, 2, NumberOfDynamicMemoryAreas, var="x" ),
11029                 rec( 28, 12, DynMemStruct, repeat="x" ),
11030          ])
11031         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
11032         # 2222/17E9, 23/233
11033         pkt = NCP(0x17E9, "Get Volume Information", 'fileserver')
11034         pkt.Request(11, [
11035                 rec( 10, 1, VolumeNumber ),
11036         ],info_str=(VolumeNumber, "Get Information on Volume %d", ", %d"))
11037         pkt.Reply(48, [
11038                 rec( 8, 4, SystemIntervalMarker, BE ),
11039                 rec( 12, 1, VolumeNumber ),
11040                 rec( 13, 1, LogicalDriveNumber ),
11041                 rec( 14, 2, BlockSize ),
11042                 rec( 16, 2, StartingBlock ),
11043                 rec( 18, 2, TotalBlocks ),
11044                 rec( 20, 2, FreeBlocks ),
11045                 rec( 22, 2, TotalDirectoryEntries ),
11046                 rec( 24, 2, FreeDirectoryEntries ),
11047                 rec( 26, 2, ActualMaxUsedDirectoryEntries ),
11048                 rec( 28, 1, VolumeHashedFlag ),
11049                 rec( 29, 1, VolumeCachedFlag ),
11050                 rec( 30, 1, VolumeRemovableFlag ),
11051                 rec( 31, 1, VolumeMountedFlag ),
11052                 rec( 32, 16, VolumeName ),
11053          ])
11054         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
11055         # 2222/17EA, 23/234
11056         pkt = NCP(0x17EA, "Get Connection's Task Information", 'fileserver')
11057         pkt.Request(12, [
11058                 rec( 10, 2, ConnectionNumber ),
11059         ])
11060         pkt.Reply(13, [
11061                 rec( 8, 1, ConnLockStatus ),
11062                 rec( 9, 1, NumberOfActiveTasks, var="x" ),
11063                 rec( 10, 3, TaskStruct, repeat="x" ),
11064          ])
11065         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
11066         # 2222/17EB, 23/235
11067         pkt = NCP(0x17EB, "Get Connection's Open Files", 'fileserver')
11068         pkt.Request(14, [
11069                 rec( 10, 2, ConnectionNumber ),
11070                 rec( 12, 2, LastRecordSeen ),
11071         ])
11072         pkt.Reply((29,283), [
11073                 rec( 8, 2, NextRequestRecord ),
11074                 rec( 10, 2, NumberOfRecords, var="x" ),
11075                 rec( 12, (17, 271), OpnFilesStruct, repeat="x" ),
11076         ])
11077         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
11078         # 2222/17EC, 23/236
11079         pkt = NCP(0x17EC, "Get Connection Using A File", 'fileserver')
11080         pkt.Request(18, [
11081                 rec( 10, 1, DataStreamNumber ),
11082                 rec( 11, 1, VolumeNumber ),
11083                 rec( 12, 4, DirectoryBase, LE ),
11084                 rec( 16, 2, LastRecordSeen ),
11085         ])
11086         pkt.Reply(33, [
11087                 rec( 8, 2, NextRequestRecord ),
11088                 rec( 10, 2, FileUseCount ),
11089                 rec( 12, 2, OpenCount ),
11090                 rec( 14, 2, OpenForReadCount ),
11091                 rec( 16, 2, OpenForWriteCount ),
11092                 rec( 18, 2, DenyReadCount ),
11093                 rec( 20, 2, DenyWriteCount ),
11094                 rec( 22, 1, Locked ),
11095                 rec( 23, 1, ForkCount ),
11096                 rec( 24, 2, NumberOfRecords, var="x" ),
11097                 rec( 26, 7, ConnFileStruct, repeat="x" ),
11098         ])
11099         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
11100         # 2222/17ED, 23/237
11101         pkt = NCP(0x17ED, "Get Physical Record Locks By Connection And File", 'fileserver')
11102         pkt.Request(20, [
11103                 rec( 10, 2, TargetConnectionNumber ),
11104                 rec( 12, 1, DataStreamNumber ),
11105                 rec( 13, 1, VolumeNumber ),
11106                 rec( 14, 4, DirectoryBase, LE ),
11107                 rec( 18, 2, LastRecordSeen ),
11108         ])
11109         pkt.Reply(23, [
11110                 rec( 8, 2, NextRequestRecord ),
11111                 rec( 10, 2, NumberOfLocks, LE, var="x" ),
11112                 rec( 12, 11, LockStruct, repeat="x" ),
11113         ])
11114         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
11115         # 2222/17EE, 23/238
11116         pkt = NCP(0x17EE, "Get Physical Record Locks By File", 'fileserver')
11117         pkt.Request(18, [
11118                 rec( 10, 1, DataStreamNumber ),
11119                 rec( 11, 1, VolumeNumber ),
11120                 rec( 12, 4, DirectoryBase ),
11121                 rec( 16, 2, LastRecordSeen ),
11122         ])
11123         pkt.Reply(30, [
11124                 rec( 8, 2, NextRequestRecord ),
11125                 rec( 10, 2, NumberOfLocks, LE, var="x" ),
11126                 rec( 12, 18, PhyLockStruct, repeat="x" ),
11127         ])
11128         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
11129         # 2222/17EF, 23/239
11130         pkt = NCP(0x17EF, "Get Logical Records By Connection", 'fileserver')
11131         pkt.Request(14, [
11132                 rec( 10, 2, TargetConnectionNumber ),
11133                 rec( 12, 2, LastRecordSeen ),
11134         ])
11135         pkt.Reply((16,270), [
11136                 rec( 8, 2, NextRequestRecord ),
11137                 rec( 10, 2, NumberOfRecords, var="x" ),
11138                 rec( 12, (4, 258), LogLockStruct, repeat="x" ),
11139         ])
11140         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
11141         # 2222/17F0, 23/240
11142         pkt = NCP(0x17F0, "Get Logical Record Information (old)", 'fileserver')
11143         pkt.Request((13,267), [
11144                 rec( 10, 2, LastRecordSeen ),
11145                 rec( 12, (1,255), LogicalRecordName ),
11146         ])
11147         pkt.Reply(22, [
11148                 rec( 8, 2, ShareableLockCount ),
11149                 rec( 10, 2, UseCount ),
11150                 rec( 12, 1, Locked ),
11151                 rec( 13, 2, NextRequestRecord ),
11152                 rec( 15, 2, NumberOfRecords, var="x" ),
11153                 rec( 17, 5, LogRecStruct, repeat="x" ),
11154         ])
11155         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
11156         # 2222/17F1, 23/241
11157         pkt = NCP(0x17F1, "Get Connection's Semaphores", 'fileserver')
11158         pkt.Request(14, [
11159                 rec( 10, 2, ConnectionNumber ),
11160                 rec( 12, 2, LastRecordSeen ),
11161         ])
11162         pkt.Reply((19,273), [
11163                 rec( 8, 2, NextRequestRecord ),
11164                 rec( 10, 2, NumberOfSemaphores, var="x" ),
11165                 rec( 12, (7, 261), SemaStruct, repeat="x" ),
11166         ])
11167         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
11168         # 2222/17F2, 23/242
11169         pkt = NCP(0x17F2, "Get Semaphore Information", 'fileserver')
11170         pkt.Request((13,267), [
11171                 rec( 10, 2, LastRecordSeen ),
11172                 rec( 12, (1,255), SemaphoreName ),
11173         ], info_str=(SemaphoreName, "Get Semaphore Information: %s", ", %s"))
11174         pkt.Reply(20, [
11175                 rec( 8, 2, NextRequestRecord ),
11176                 rec( 10, 2, OpenCount ),
11177                 rec( 12, 2, SemaphoreValue ),
11178                 rec( 14, 2, NumberOfRecords, var="x" ),
11179                 rec( 16, 4, SemaInfoStruct, repeat="x" ),
11180         ])
11181         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
11182         # 2222/17F3, 23/243
11183         pkt = NCP(0x17F3, "Map Directory Number to Path", 'file')
11184         pkt.Request(16, [
11185                 rec( 10, 1, VolumeNumber ),
11186                 rec( 11, 4, DirectoryNumber ),
11187                 rec( 15, 1, NameSpace ),
11188         ])
11189         pkt.Reply((9,263), [
11190                 rec( 8, (1,255), Path ),
11191         ])
11192         pkt.CompletionCodes([0x0000, 0x9600, 0x9c00, 0xc601, 0xfd00, 0xff00])
11193         # 2222/17F4, 23/244
11194         pkt = NCP(0x17F4, "Convert Path to Dir Entry", 'file')
11195         pkt.Request((12,266), [
11196                 rec( 10, 1, DirHandle ),
11197                 rec( 11, (1,255), Path ),
11198         ], info_str=(Path, "Convert Path to Directory Entry: %s", ", %s"))
11199         pkt.Reply(13, [
11200                 rec( 8, 1, VolumeNumber ),
11201                 rec( 9, 4, DirectoryNumber ),
11202         ])
11203         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
11204         # 2222/17FD, 23/253
11205         pkt = NCP(0x17FD, "Send Console Broadcast", 'fileserver')
11206         pkt.Request((16, 270), [
11207                 rec( 10, 1, NumberOfStations, var="x" ),
11208                 rec( 11, 4, StationList, repeat="x" ),
11209                 rec( 15, (1, 255), TargetMessage ),
11210         ], info_str=(TargetMessage, "Send Console Broadcast: %s", ", %s"))
11211         pkt.Reply(8)
11212         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
11213         # 2222/17FE, 23/254
11214         pkt = NCP(0x17FE, "Clear Connection Number", 'fileserver')
11215         pkt.Request(14, [
11216                 rec( 10, 4, ConnectionNumber ),
11217         ])
11218         pkt.Reply(8)
11219         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
11220         # 2222/18, 24
11221         pkt = NCP(0x18, "End of Job", 'connection')
11222         pkt.Request(7)
11223         pkt.Reply(8)
11224         pkt.CompletionCodes([0x0000])
11225         # 2222/19, 25
11226         pkt = NCP(0x19, "Logout", 'connection')
11227         pkt.Request(7)
11228         pkt.Reply(8)
11229         pkt.CompletionCodes([0x0000])
11230         # 2222/1A, 26
11231         pkt = NCP(0x1A, "Log Physical Record", 'sync')
11232         pkt.Request(24, [
11233                 rec( 7, 1, LockFlag ),
11234                 rec( 8, 6, FileHandle ),
11235                 rec( 14, 4, LockAreasStartOffset, BE ),
11236                 rec( 18, 4, LockAreaLen, BE ),
11237                 rec( 22, 2, LockTimeout ),
11238         ], info_str=(LockAreaLen, "Lock Record - Length of %d", "%d"))
11239         pkt.Reply(8)
11240         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
11241         # 2222/1B, 27
11242         pkt = NCP(0x1B, "Lock Physical Record Set", 'sync')
11243         pkt.Request(10, [
11244                 rec( 7, 1, LockFlag ),
11245                 rec( 8, 2, LockTimeout ),
11246         ])
11247         pkt.Reply(8)
11248         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
11249         # 2222/1C, 28
11250         pkt = NCP(0x1C, "Release Physical Record", 'sync')
11251         pkt.Request(22, [
11252                 rec( 7, 1, Reserved ),
11253                 rec( 8, 6, FileHandle ),
11254                 rec( 14, 4, LockAreasStartOffset ),
11255                 rec( 18, 4, LockAreaLen ),
11256         ], info_str=(LockAreaLen, "Release Lock Record - Length of %d", "%d"))
11257         pkt.Reply(8)
11258         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
11259         # 2222/1D, 29
11260         pkt = NCP(0x1D, "Release Physical Record Set", 'sync')
11261         pkt.Request(8, [
11262                 rec( 7, 1, LockFlag ),
11263         ])
11264         pkt.Reply(8)
11265         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
11266         # 2222/1E, 30   #Tested and fixed 6-14-02 GM
11267         pkt = NCP(0x1E, "Clear Physical Record", 'sync')
11268         pkt.Request(22, [
11269                 rec( 7, 1, Reserved ),
11270                 rec( 8, 6, FileHandle ),
11271                 rec( 14, 4, LockAreasStartOffset, BE ),
11272                 rec( 18, 4, LockAreaLen, BE ),
11273         ], info_str=(LockAreaLen, "Clear Lock Record - Length of %d", "%d"))
11274         pkt.Reply(8)
11275         pkt.CompletionCodes([0x0000, 0x8000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
11276         # 2222/1F, 31
11277         pkt = NCP(0x1F, "Clear Physical Record Set", 'sync')
11278         pkt.Request(8, [
11279                 rec( 7, 1, LockFlag ),
11280         ])
11281         pkt.Reply(8)
11282         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
11283         # 2222/2000, 32/00
11284         pkt = NCP(0x2000, "Open Semaphore", 'sync', has_length=0)
11285         pkt.Request((10,264), [
11286                 rec( 8, 1, InitialSemaphoreValue ),
11287                 rec( 9, (1,255), SemaphoreName ),
11288         ], info_str=(SemaphoreName, "Open Semaphore: %s", ", %s"))
11289         pkt.Reply(13, [
11290                   rec( 8, 4, SemaphoreHandle, BE ),
11291                   rec( 12, 1, SemaphoreOpenCount ),
11292         ])
11293         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
11294         # 2222/2001, 32/01
11295         pkt = NCP(0x2001, "Examine Semaphore", 'sync', has_length=0)
11296         pkt.Request(12, [
11297                 rec( 8, 4, SemaphoreHandle, BE ),
11298         ])
11299         pkt.Reply(10, [
11300                   rec( 8, 1, SemaphoreValue ),
11301                   rec( 9, 1, SemaphoreOpenCount ),
11302         ])
11303         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
11304         # 2222/2002, 32/02
11305         pkt = NCP(0x2002, "Wait On Semaphore", 'sync', has_length=0)
11306         pkt.Request(14, [
11307                 rec( 8, 4, SemaphoreHandle, BE ),
11308                 rec( 12, 2, SemaphoreTimeOut, BE ),
11309         ])
11310         pkt.Reply(8)
11311         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
11312         # 2222/2003, 32/03
11313         pkt = NCP(0x2003, "Signal Semaphore", 'sync', has_length=0)
11314         pkt.Request(12, [
11315                 rec( 8, 4, SemaphoreHandle, BE ),
11316         ])
11317         pkt.Reply(8)
11318         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
11319         # 2222/2004, 32/04
11320         pkt = NCP(0x2004, "Close Semaphore", 'sync', has_length=0)
11321         pkt.Request(12, [
11322                 rec( 8, 4, SemaphoreHandle, BE ),
11323         ])
11324         pkt.Reply(8)
11325         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
11326         # 2222/21, 33
11327         pkt = NCP(0x21, "Negotiate Buffer Size", 'connection')
11328         pkt.Request(9, [
11329                 rec( 7, 2, BufferSize, BE ),
11330         ])
11331         pkt.Reply(10, [
11332                 rec( 8, 2, BufferSize, BE ),
11333         ])
11334         pkt.CompletionCodes([0x0000])
11335         # 2222/2200, 34/00
11336         pkt = NCP(0x2200, "TTS Is Available", 'tts', has_length=0)
11337         pkt.Request(8)
11338         pkt.Reply(8)
11339         pkt.CompletionCodes([0x0001, 0xfd03, 0xff12])
11340         # 2222/2201, 34/01
11341         pkt = NCP(0x2201, "TTS Begin Transaction", 'tts', has_length=0)
11342         pkt.Request(8)
11343         pkt.Reply(8)
11344         pkt.CompletionCodes([0x0000])
11345         # 2222/2202, 34/02
11346         pkt = NCP(0x2202, "TTS End Transaction", 'tts', has_length=0)
11347         pkt.Request(8)
11348         pkt.Reply(12, [
11349                   rec( 8, 4, TransactionNumber, BE ),
11350         ])
11351         pkt.CompletionCodes([0x0000, 0xff01])
11352         # 2222/2203, 34/03
11353         pkt = NCP(0x2203, "TTS Abort Transaction", 'tts', has_length=0)
11354         pkt.Request(8)
11355         pkt.Reply(8)
11356         pkt.CompletionCodes([0x0000, 0xfd03, 0xfe0b, 0xff01])
11357         # 2222/2204, 34/04
11358         pkt = NCP(0x2204, "TTS Transaction Status", 'tts', has_length=0)
11359         pkt.Request(12, [
11360                   rec( 8, 4, TransactionNumber, BE ),
11361         ])
11362         pkt.Reply(8)
11363         pkt.CompletionCodes([0x0000])
11364         # 2222/2205, 34/05
11365         pkt = NCP(0x2205, "TTS Get Application Thresholds", 'tts', has_length=0)
11366         pkt.Request(8)
11367         pkt.Reply(10, [
11368                   rec( 8, 1, LogicalLockThreshold ),
11369                   rec( 9, 1, PhysicalLockThreshold ),
11370         ])
11371         pkt.CompletionCodes([0x0000])
11372         # 2222/2206, 34/06
11373         pkt = NCP(0x2206, "TTS Set Application Thresholds", 'tts', has_length=0)
11374         pkt.Request(10, [
11375                   rec( 8, 1, LogicalLockThreshold ),
11376                   rec( 9, 1, PhysicalLockThreshold ),
11377         ])
11378         pkt.Reply(8)
11379         pkt.CompletionCodes([0x0000, 0x9600])
11380         # 2222/2207, 34/07
11381         pkt = NCP(0x2207, "TTS Get Workstation Thresholds", 'tts', has_length=0)
11382         pkt.Request(8)
11383         pkt.Reply(10, [
11384                   rec( 8, 1, LogicalLockThreshold ),
11385                   rec( 9, 1, PhysicalLockThreshold ),
11386         ])
11387         pkt.CompletionCodes([0x0000])
11388         # 2222/2208, 34/08
11389         pkt = NCP(0x2208, "TTS Set Workstation Thresholds", 'tts', has_length=0)
11390         pkt.Request(10, [
11391                   rec( 8, 1, LogicalLockThreshold ),
11392                   rec( 9, 1, PhysicalLockThreshold ),
11393         ])
11394         pkt.Reply(8)
11395         pkt.CompletionCodes([0x0000])
11396         # 2222/2209, 34/09
11397         pkt = NCP(0x2209, "TTS Get Transaction Bits", 'tts', has_length=0)
11398         pkt.Request(8)
11399         pkt.Reply(9, [
11400                 rec( 8, 1, ControlFlags ),
11401         ])
11402         pkt.CompletionCodes([0x0000])
11403         # 2222/220A, 34/10
11404         pkt = NCP(0x220A, "TTS Set Transaction Bits", 'tts', has_length=0)
11405         pkt.Request(9, [
11406                 rec( 8, 1, ControlFlags ),
11407         ])
11408         pkt.Reply(8)
11409         pkt.CompletionCodes([0x0000])
11410         # 2222/2301, 35/01
11411         pkt = NCP(0x2301, "AFP Create Directory", 'afp')
11412         pkt.Request((49, 303), [
11413                 rec( 10, 1, VolumeNumber ),
11414                 rec( 11, 4, BaseDirectoryID ),
11415                 rec( 15, 1, Reserved ),
11416                 rec( 16, 4, CreatorID ),
11417                 rec( 20, 4, Reserved4 ),
11418                 rec( 24, 2, FinderAttr ),
11419                 rec( 26, 2, HorizLocation ),
11420                 rec( 28, 2, VertLocation ),
11421                 rec( 30, 2, FileDirWindow ),
11422                 rec( 32, 16, Reserved16 ),
11423                 rec( 48, (1,255), Path ),
11424         ], info_str=(Path, "AFP Create Directory: %s", ", %s"))
11425         pkt.Reply(12, [
11426                 rec( 8, 4, NewDirectoryID ),
11427         ])
11428         pkt.CompletionCodes([0x0000, 0x8301, 0x8400, 0x8800, 0x9300, 0x9600, 0x9804,
11429                              0x9900, 0x9c03, 0x9e02, 0xa100, 0xa201, 0xfd00, 0xff18])
11430         # 2222/2302, 35/02
11431         pkt = NCP(0x2302, "AFP Create File", 'afp')
11432         pkt.Request((49, 303), [
11433                 rec( 10, 1, VolumeNumber ),
11434                 rec( 11, 4, BaseDirectoryID ),
11435                 rec( 15, 1, DeleteExistingFileFlag ),
11436                 rec( 16, 4, CreatorID, BE ),
11437                 rec( 20, 4, Reserved4 ),
11438                 rec( 24, 2, FinderAttr ),
11439                 rec( 26, 2, HorizLocation, BE ),
11440                 rec( 28, 2, VertLocation, BE ),
11441                 rec( 30, 2, FileDirWindow, BE ),
11442                 rec( 32, 16, Reserved16 ),
11443                 rec( 48, (1,255), Path ),
11444         ], info_str=(Path, "AFP Create File: %s", ", %s"))
11445         pkt.Reply(12, [
11446                 rec( 8, 4, NewDirectoryID ),
11447         ])
11448         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8301, 0x8400, 0x8701, 0x8800,
11449                              0x8a00, 0x8d00, 0x8e00, 0x8f00, 0x9300, 0x9600, 0x9804,
11450                              0x9900, 0x9b03, 0x9c03, 0x9e02, 0xa100, 0xa201, 0xfd00,
11451                              0xff18])
11452         # 2222/2303, 35/03
11453         pkt = NCP(0x2303, "AFP Delete", 'afp')
11454         pkt.Request((16,270), [
11455                 rec( 10, 1, VolumeNumber ),
11456                 rec( 11, 4, BaseDirectoryID ),
11457                 rec( 15, (1,255), Path ),
11458         ], info_str=(Path, "AFP Delete: %s", ", %s"))
11459         pkt.Reply(8)
11460         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x8a00, 0x8d00, 0x8e00, 0x8f00,
11461                              0x9000, 0x9300, 0x9600, 0x9804, 0x9b03, 0x9c03, 0x9e02,
11462                              0xa000, 0xa100, 0xa201, 0xfd00, 0xff19])
11463         # 2222/2304, 35/04
11464         pkt = NCP(0x2304, "AFP Get Entry ID From Name", 'afp')
11465         pkt.Request((16,270), [
11466                 rec( 10, 1, VolumeNumber ),
11467                 rec( 11, 4, BaseDirectoryID ),
11468                 rec( 15, (1,255), Path ),
11469         ], info_str=(Path, "AFP Get Entry from Name: %s", ", %s"))
11470         pkt.Reply(12, [
11471                 rec( 8, 4, TargetEntryID, BE ),
11472         ])
11473         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804, 0x9c03,
11474                              0xa100, 0xa201, 0xfd00, 0xff19])
11475         # 2222/2305, 35/05
11476         pkt = NCP(0x2305, "AFP Get File Information", 'afp')
11477         pkt.Request((18,272), [
11478                 rec( 10, 1, VolumeNumber ),
11479                 rec( 11, 4, BaseDirectoryID ),
11480                 rec( 15, 2, RequestBitMap, BE ),
11481                 rec( 17, (1,255), Path ),
11482         ], info_str=(Path, "AFP Get File Information: %s", ", %s"))
11483         pkt.Reply(121, [
11484                 rec( 8, 4, AFPEntryID, BE ),
11485                 rec( 12, 4, ParentID, BE ),
11486                 rec( 16, 2, AttributesDef16, LE ),
11487                 rec( 18, 4, DataForkLen, BE ),
11488                 rec( 22, 4, ResourceForkLen, BE ),
11489                 rec( 26, 2, TotalOffspring, BE  ),
11490                 rec( 28, 2, CreationDate, BE ),
11491                 rec( 30, 2, LastAccessedDate, BE ),
11492                 rec( 32, 2, ModifiedDate, BE ),
11493                 rec( 34, 2, ModifiedTime, BE ),
11494                 rec( 36, 2, ArchivedDate, BE ),
11495                 rec( 38, 2, ArchivedTime, BE ),
11496                 rec( 40, 4, CreatorID, BE ),
11497                 rec( 44, 4, Reserved4 ),
11498                 rec( 48, 2, FinderAttr ),
11499                 rec( 50, 2, HorizLocation ),
11500                 rec( 52, 2, VertLocation ),
11501                 rec( 54, 2, FileDirWindow ),
11502                 rec( 56, 16, Reserved16 ),
11503                 rec( 72, 32, LongName ),
11504                 rec( 104, 4, CreatorID, BE ),
11505                 rec( 108, 12, ShortName ),
11506                 rec( 120, 1, AccessPrivileges ),
11507         ])
11508         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804, 0x9c03,
11509                              0xa100, 0xa201, 0xfd00, 0xff19])
11510         # 2222/2306, 35/06
11511         pkt = NCP(0x2306, "AFP Get Entry ID From NetWare Handle", 'afp')
11512         pkt.Request(16, [
11513                 rec( 10, 6, FileHandle ),
11514         ])
11515         pkt.Reply(14, [
11516                 rec( 8, 1, VolumeID ),
11517                 rec( 9, 4, TargetEntryID, BE ),
11518                 rec( 13, 1, ForkIndicator ),
11519         ])
11520         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0xa201])
11521         # 2222/2307, 35/07
11522         pkt = NCP(0x2307, "AFP Rename", 'afp')
11523         pkt.Request((21, 529), [
11524                 rec( 10, 1, VolumeNumber ),
11525                 rec( 11, 4, MacSourceBaseID, BE ),
11526                 rec( 15, 4, MacDestinationBaseID, BE ),
11527                 rec( 19, (1,255), Path ),
11528                 rec( -1, (1,255), NewFileNameLen ),
11529         ], info_str=(Path, "AFP Rename: %s", ", %s"))
11530         pkt.Reply(8)
11531         pkt.CompletionCodes([0x0000, 0x8301, 0x8401, 0x8800, 0x8b00, 0x8e00,
11532                              0x9001, 0x9201, 0x9300, 0x9600, 0x9804, 0x9900,
11533                              0x9c03, 0x9e00, 0xa100, 0xa201, 0xfd00, 0xff0a])
11534         # 2222/2308, 35/08
11535         pkt = NCP(0x2308, "AFP Open File Fork", 'afp')
11536         pkt.Request((18, 272), [
11537                 rec( 10, 1, VolumeNumber ),
11538                 rec( 11, 4, MacBaseDirectoryID ),
11539                 rec( 15, 1, ForkIndicator ),
11540                 rec( 16, 1, AccessMode ),
11541                 rec( 17, (1,255), Path ),
11542         ], info_str=(Path, "AFP Open File Fork: %s", ", %s"))
11543         pkt.Reply(22, [
11544                 rec( 8, 4, AFPEntryID, BE ),
11545                 rec( 12, 4, DataForkLen, BE ),
11546                 rec( 16, 6, NetWareAccessHandle ),
11547         ])
11548         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8301, 0x8800, 0x9300,
11549                              0x9400, 0x9600, 0x9804, 0x9900, 0x9c03, 0xa100,
11550                              0xa201, 0xfd00, 0xff16])
11551         # 2222/2309, 35/09
11552         pkt = NCP(0x2309, "AFP Set File Information", 'afp')
11553         pkt.Request((64, 318), [
11554                 rec( 10, 1, VolumeNumber ),
11555                 rec( 11, 4, MacBaseDirectoryID ),
11556                 rec( 15, 2, RequestBitMap, BE ),
11557                 rec( 17, 2, MacAttr, BE ),
11558                 rec( 19, 2, CreationDate, BE ),
11559                 rec( 21, 2, LastAccessedDate, BE ),
11560                 rec( 23, 2, ModifiedDate, BE ),
11561                 rec( 25, 2, ModifiedTime, BE ),
11562                 rec( 27, 2, ArchivedDate, BE ),
11563                 rec( 29, 2, ArchivedTime, BE ),
11564                 rec( 31, 4, CreatorID, BE ),
11565                 rec( 35, 4, Reserved4 ),
11566                 rec( 39, 2, FinderAttr ),
11567                 rec( 41, 2, HorizLocation ),
11568                 rec( 43, 2, VertLocation ),
11569                 rec( 45, 2, FileDirWindow ),
11570                 rec( 47, 16, Reserved16 ),
11571                 rec( 63, (1,255), Path ),
11572         ], info_str=(Path, "AFP Set File Information: %s", ", %s"))
11573         pkt.Reply(8)
11574         pkt.CompletionCodes([0x0000, 0x0104, 0x8301, 0x8800, 0x9300, 0x9400,
11575                              0x9500, 0x9600, 0x9804, 0x9c03, 0xa100, 0xa201,
11576                              0xfd00, 0xff16])
11577         # 2222/230A, 35/10
11578         pkt = NCP(0x230A, "AFP Scan File Information", 'afp')
11579         pkt.Request((26, 280), [
11580                 rec( 10, 1, VolumeNumber ),
11581                 rec( 11, 4, MacBaseDirectoryID ),
11582                 rec( 15, 4, MacLastSeenID, BE ),
11583                 rec( 19, 2, DesiredResponseCount, BE ),
11584                 rec( 21, 2, SearchBitMap, BE ),
11585                 rec( 23, 2, RequestBitMap, BE ),
11586                 rec( 25, (1,255), Path ),
11587         ], info_str=(Path, "AFP Scan File Information: %s", ", %s"))
11588         pkt.Reply(123, [
11589                 rec( 8, 2, ActualResponseCount, BE, var="x" ),
11590                 rec( 10, 113, AFP10Struct, repeat="x" ),
11591         ])
11592         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804,
11593                              0x9c03, 0xa100, 0xa201, 0xfd00, 0xff16])
11594         # 2222/230B, 35/11
11595         pkt = NCP(0x230B, "AFP Alloc Temporary Directory Handle", 'afp')
11596         pkt.Request((16,270), [
11597                 rec( 10, 1, VolumeNumber ),
11598                 rec( 11, 4, MacBaseDirectoryID ),
11599                 rec( 15, (1,255), Path ),
11600         ], info_str=(Path, "AFP Allocate Temporary Directory Handle: %s", ", %s"))
11601         pkt.Reply(10, [
11602                 rec( 8, 1, DirHandle ),
11603                 rec( 9, 1, AccessRightsMask ),
11604         ])
11605         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600,
11606                              0x9804, 0x9b03, 0x9c03, 0x9d00, 0xa100,
11607                              0xa201, 0xfd00, 0xff00])
11608         # 2222/230C, 35/12
11609         pkt = NCP(0x230C, "AFP Get Entry ID From Path Name", 'afp')
11610         pkt.Request((12,266), [
11611                 rec( 10, 1, DirHandle ),
11612                 rec( 11, (1,255), Path ),
11613         ], info_str=(Path, "AFP Get Entry ID from Path Name: %s", ", %s"))
11614         pkt.Reply(12, [
11615                 rec( 8, 4, AFPEntryID, BE ),
11616         ])
11617         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600,
11618                              0x9804, 0x9b03, 0x9c03, 0xa100, 0xa201,
11619                              0xfd00, 0xff00])
11620         # 2222/230D, 35/13
11621         pkt = NCP(0x230D, "AFP 2.0 Create Directory", 'afp')
11622         pkt.Request((55,309), [
11623                 rec( 10, 1, VolumeNumber ),
11624                 rec( 11, 4, BaseDirectoryID ),
11625                 rec( 15, 1, Reserved ),
11626                 rec( 16, 4, CreatorID, BE ),
11627                 rec( 20, 4, Reserved4 ),
11628                 rec( 24, 2, FinderAttr ),
11629                 rec( 26, 2, HorizLocation ),
11630                 rec( 28, 2, VertLocation ),
11631                 rec( 30, 2, FileDirWindow ),
11632                 rec( 32, 16, Reserved16 ),
11633                 rec( 48, 6, ProDOSInfo ),
11634                 rec( 54, (1,255), Path ),
11635         ], info_str=(Path, "AFP 2.0 Create Directory: %s", ", %s"))
11636         pkt.Reply(12, [
11637                 rec( 8, 4, NewDirectoryID ),
11638         ])
11639         pkt.CompletionCodes([0x0000, 0x8301, 0x8400, 0x8800, 0x9300,
11640                              0x9600, 0x9804, 0x9900, 0x9c03, 0x9e00,
11641                              0xa100, 0xa201, 0xfd00, 0xff00])
11642         # 2222/230E, 35/14
11643         pkt = NCP(0x230E, "AFP 2.0 Create File", 'afp')
11644         pkt.Request((55,309), [
11645                 rec( 10, 1, VolumeNumber ),
11646                 rec( 11, 4, BaseDirectoryID ),
11647                 rec( 15, 1, DeleteExistingFileFlag ),
11648                 rec( 16, 4, CreatorID, BE ),
11649                 rec( 20, 4, Reserved4 ),
11650                 rec( 24, 2, FinderAttr ),
11651                 rec( 26, 2, HorizLocation ),
11652                 rec( 28, 2, VertLocation ),
11653                 rec( 30, 2, FileDirWindow ),
11654                 rec( 32, 16, Reserved16 ),
11655                 rec( 48, 6, ProDOSInfo ),
11656                 rec( 54, (1,255), Path ),
11657         ], info_str=(Path, "AFP 2.0 Create File: %s", ", %s"))
11658         pkt.Reply(12, [
11659                 rec( 8, 4, NewDirectoryID ),
11660         ])
11661         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8301, 0x8400,
11662                              0x8701, 0x8800, 0x8a00, 0x8d00, 0x8e00,
11663                              0x8f00, 0x9001, 0x9300, 0x9600, 0x9804,
11664                              0x9900, 0x9b03, 0x9c03, 0x9e00, 0xa100,
11665                              0xa201, 0xfd00, 0xff00])
11666         # 2222/230F, 35/15
11667         pkt = NCP(0x230F, "AFP 2.0 Get File Or Directory Information", 'afp')
11668         pkt.Request((18,272), [
11669                 rec( 10, 1, VolumeNumber ),
11670                 rec( 11, 4, BaseDirectoryID ),
11671                 rec( 15, 2, RequestBitMap, BE ),
11672                 rec( 17, (1,255), Path ),
11673         ], info_str=(Path, "AFP 2.0 Get Information: %s", ", %s"))
11674         pkt.Reply(128, [
11675                 rec( 8, 4, AFPEntryID, BE ),
11676                 rec( 12, 4, ParentID, BE ),
11677                 rec( 16, 2, AttributesDef16 ),
11678                 rec( 18, 4, DataForkLen, BE ),
11679                 rec( 22, 4, ResourceForkLen, BE ),
11680                 rec( 26, 2, TotalOffspring, BE ),
11681                 rec( 28, 2, CreationDate, BE ),
11682                 rec( 30, 2, LastAccessedDate, BE ),
11683                 rec( 32, 2, ModifiedDate, BE ),
11684                 rec( 34, 2, ModifiedTime, BE ),
11685                 rec( 36, 2, ArchivedDate, BE ),
11686                 rec( 38, 2, ArchivedTime, BE ),
11687                 rec( 40, 4, CreatorID, BE ),
11688                 rec( 44, 4, Reserved4 ),
11689                 rec( 48, 2, FinderAttr ),
11690                 rec( 50, 2, HorizLocation ),
11691                 rec( 52, 2, VertLocation ),
11692                 rec( 54, 2, FileDirWindow ),
11693                 rec( 56, 16, Reserved16 ),
11694                 rec( 72, 32, LongName ),
11695                 rec( 104, 4, CreatorID, BE ),
11696                 rec( 108, 12, ShortName ),
11697                 rec( 120, 1, AccessPrivileges ),
11698                 rec( 121, 1, Reserved ),
11699                 rec( 122, 6, ProDOSInfo ),
11700         ])
11701         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804, 0x9c03,
11702                              0xa100, 0xa201, 0xfd00, 0xff19])
11703         # 2222/2310, 35/16
11704         pkt = NCP(0x2310, "AFP 2.0 Set File Information", 'afp')
11705         pkt.Request((70, 324), [
11706                 rec( 10, 1, VolumeNumber ),
11707                 rec( 11, 4, MacBaseDirectoryID ),
11708                 rec( 15, 2, RequestBitMap, BE ),
11709                 rec( 17, 2, AttributesDef16 ),
11710                 rec( 19, 2, CreationDate, BE ),
11711                 rec( 21, 2, LastAccessedDate, BE ),
11712                 rec( 23, 2, ModifiedDate, BE ),
11713                 rec( 25, 2, ModifiedTime, BE ),
11714                 rec( 27, 2, ArchivedDate, BE ),
11715                 rec( 29, 2, ArchivedTime, BE ),
11716                 rec( 31, 4, CreatorID, BE ),
11717                 rec( 35, 4, Reserved4 ),
11718                 rec( 39, 2, FinderAttr ),
11719                 rec( 41, 2, HorizLocation ),
11720                 rec( 43, 2, VertLocation ),
11721                 rec( 45, 2, FileDirWindow ),
11722                 rec( 47, 16, Reserved16 ),
11723                 rec( 63, 6, ProDOSInfo ),
11724                 rec( 69, (1,255), Path ),
11725         ], info_str=(Path, "AFP 2.0 Set File Information: %s", ", %s"))
11726         pkt.Reply(8)
11727         pkt.CompletionCodes([0x0000, 0x0104, 0x8301, 0x8800, 0x9300, 0x9400,
11728                              0x9500, 0x9600, 0x9804, 0x9c03, 0xa100, 0xa201,
11729                              0xfd00, 0xff16])
11730         # 2222/2311, 35/17
11731         pkt = NCP(0x2311, "AFP 2.0 Scan File Information", 'afp')
11732         pkt.Request((26, 280), [
11733                 rec( 10, 1, VolumeNumber ),
11734                 rec( 11, 4, MacBaseDirectoryID ),
11735                 rec( 15, 4, MacLastSeenID, BE ),
11736                 rec( 19, 2, DesiredResponseCount, BE ),
11737                 rec( 21, 2, SearchBitMap, BE ),
11738                 rec( 23, 2, RequestBitMap, BE ),
11739                 rec( 25, (1,255), Path ),
11740         ], info_str=(Path, "AFP 2.0 Scan File Information: %s", ", %s"))
11741         pkt.Reply(14, [
11742                 rec( 8, 2, ActualResponseCount, var="x" ),
11743                 rec( 10, 4, AFP20Struct, repeat="x" ),
11744         ])
11745         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804,
11746                              0x9c03, 0xa100, 0xa201, 0xfd00, 0xff16])
11747         # 2222/2312, 35/18
11748         pkt = NCP(0x2312, "AFP Get DOS Name From Entry ID", 'afp')
11749         pkt.Request(15, [
11750                 rec( 10, 1, VolumeNumber ),
11751                 rec( 11, 4, AFPEntryID, BE ),
11752         ])
11753         pkt.Reply((9,263), [
11754                 rec( 8, (1,255), Path ),
11755         ])
11756         pkt.CompletionCodes([0x0000, 0x8900, 0x9600, 0xbf00])
11757         # 2222/2313, 35/19
11758         pkt = NCP(0x2313, "AFP Get Macintosh Info On Deleted File", 'afp')
11759         pkt.Request(15, [
11760                 rec( 10, 1, VolumeNumber ),
11761                 rec( 11, 4, DirectoryNumber, BE ),
11762         ])
11763         pkt.Reply((51,305), [
11764                 rec( 8, 4, CreatorID, BE ),
11765                 rec( 12, 4, Reserved4 ),
11766                 rec( 16, 2, FinderAttr ),
11767                 rec( 18, 2, HorizLocation ),
11768                 rec( 20, 2, VertLocation ),
11769                 rec( 22, 2, FileDirWindow ),
11770                 rec( 24, 16, Reserved16 ),
11771                 rec( 40, 6, ProDOSInfo ),
11772                 rec( 46, 4, ResourceForkSize, BE ),
11773                 rec( 50, (1,255), FileName ),
11774         ])
11775         pkt.CompletionCodes([0x0000, 0x9c03, 0xbf00])
11776         # 2222/2400, 36/00
11777         pkt = NCP(0x2400, "Get NCP Extension Information", 'extension')
11778         pkt.Request(14, [
11779                 rec( 10, 4, NCPextensionNumber, LE ),
11780         ])
11781         pkt.Reply((16,270), [
11782                 rec( 8, 4, NCPextensionNumber ),
11783                 rec( 12, 1, NCPextensionMajorVersion ),
11784                 rec( 13, 1, NCPextensionMinorVersion ),
11785                 rec( 14, 1, NCPextensionRevisionNumber ),
11786                 rec( 15, (1, 255), NCPextensionName ),
11787         ])
11788         pkt.CompletionCodes([0x0000, 0x7e01, 0xfe00, 0xff20])
11789         # 2222/2401, 36/01
11790         pkt = NCP(0x2401, "Get NCP Extension Maximum Data Size", 'extension')
11791         pkt.Request(10)
11792         pkt.Reply(10, [
11793                 rec( 8, 2, NCPdataSize ),
11794         ])
11795         pkt.CompletionCodes([0x0000, 0x7e01, 0xfe00, 0xff20])
11796         # 2222/2402, 36/02
11797         pkt = NCP(0x2402, "Get NCP Extension Information by Name", 'extension')
11798         pkt.Request((11, 265), [
11799                 rec( 10, (1,255), NCPextensionName ),
11800         ], info_str=(NCPextensionName, "Get NCP Extension Information by Name: %s", ", %s"))
11801         pkt.Reply((16,270), [
11802                 rec( 8, 4, NCPextensionNumber ),
11803                 rec( 12, 1, NCPextensionMajorVersion ),
11804                 rec( 13, 1, NCPextensionMinorVersion ),
11805                 rec( 14, 1, NCPextensionRevisionNumber ),
11806                 rec( 15, (1, 255), NCPextensionName ),
11807         ])
11808         pkt.CompletionCodes([0x0000, 0x7e01, 0xfe00, 0xff20])
11809         # 2222/2403, 36/03
11810         pkt = NCP(0x2403, "Get Number of Registered NCP Extensions", 'extension')
11811         pkt.Request(10)
11812         pkt.Reply(12, [
11813                 rec( 8, 4, NumberOfNCPExtensions ),
11814         ])
11815         pkt.CompletionCodes([0x0000, 0x7e01, 0xfe00, 0xff20])
11816         # 2222/2404, 36/04
11817         pkt = NCP(0x2404, "Get NCP Extension Registered Verbs List", 'extension')
11818         pkt.Request(14, [
11819                 rec( 10, 4, StartingNumber ),
11820         ])
11821         pkt.Reply(20, [
11822                 rec( 8, 4, ReturnedListCount, var="x" ),
11823                 rec( 12, 4, nextStartingNumber ),
11824                 rec( 16, 4, NCPExtensionNumbers, repeat="x" ),
11825         ])
11826         pkt.CompletionCodes([0x0000, 0x7e01, 0xfe00, 0xff20])
11827         # 2222/2405, 36/05
11828         pkt = NCP(0x2405, "Return NCP Extension Information", 'extension')
11829         pkt.Request(14, [
11830                 rec( 10, 4, NCPextensionNumber ),
11831         ])
11832         pkt.Reply((16,270), [
11833                 rec( 8, 4, NCPextensionNumber ),
11834                 rec( 12, 1, NCPextensionMajorVersion ),
11835                 rec( 13, 1, NCPextensionMinorVersion ),
11836                 rec( 14, 1, NCPextensionRevisionNumber ),
11837                 rec( 15, (1, 255), NCPextensionName ),
11838         ])
11839         pkt.CompletionCodes([0x0000, 0x7e01, 0xfe00, 0xff20])
11840         # 2222/2406, 36/06
11841         pkt = NCP(0x2406, "Return NCP Extension Maximum Data Size", 'extension')
11842         pkt.Request(10)
11843         pkt.Reply(12, [
11844                 rec( 8, 4, NCPdataSize ),
11845         ])
11846         pkt.CompletionCodes([0x0000, 0x7e01, 0xfe00, 0xff20])
11847         # 2222/25, 37
11848         pkt = NCP(0x25, "Execute NCP Extension", 'extension')
11849         pkt.Request(11, [
11850                 rec( 7, 4, NCPextensionNumber ),
11851                 # The following value is Unicode
11852                 #rec[ 13, (1,255), RequestData ],
11853         ])
11854         pkt.Reply(8)
11855                 # The following value is Unicode
11856                 #[ 8, (1, 255), ReplyBuffer ],
11857         pkt.CompletionCodes([0x0000, 0x7e01, 0xf000, 0x9c00, 0xd504, 0xee00, 0xfe00, 0xff20])
11858         # 2222/3B, 59
11859         pkt = NCP(0x3B, "Commit File", 'file', has_length=0 )
11860         pkt.Request(14, [
11861                 rec( 7, 1, Reserved ),
11862                 rec( 8, 6, FileHandle ),
11863         ], info_str=(FileHandle, "Commit File - 0x%s", ", %s"))
11864         pkt.Reply(8)
11865         pkt.CompletionCodes([0x0000, 0x8800, 0x9804, 0xff00])
11866         # 2222/3D, 61
11867         pkt = NCP(0x3D, "Commit File", 'file', has_length=0 )
11868         pkt.Request(14, [
11869                 rec( 7, 1, Reserved ),
11870                 rec( 8, 6, FileHandle ),
11871         ], info_str=(FileHandle, "Commit File - 0x%s", ", %s"))
11872         pkt.Reply(8)
11873         pkt.CompletionCodes([0x0000, 0x8800, 0x9804, 0xff00])
11874         # 2222/3E, 62
11875         pkt = NCP(0x3E, "File Search Initialize", 'file', has_length=0 )
11876         pkt.Request((9, 263), [
11877                 rec( 7, 1, DirHandle ),
11878                 rec( 8, (1,255), Path ),
11879         ], info_str=(Path, "Initialize File Search: %s", ", %s"))
11880         pkt.Reply(14, [
11881                 rec( 8, 1, VolumeNumber ),
11882                 rec( 9, 2, DirectoryID ),
11883                 rec( 11, 2, SequenceNumber, BE ),
11884                 rec( 13, 1, AccessRightsMask ),
11885         ])
11886         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100,
11887                              0xfd00, 0xff16])
11888         # 2222/3F, 63
11889         pkt = NCP(0x3F, "File Search Continue", 'file', has_length=0 )
11890         pkt.Request((14, 268), [
11891                 rec( 7, 1, VolumeNumber ),
11892                 rec( 8, 2, DirectoryID ),
11893                 rec( 10, 2, SequenceNumber, BE ),
11894                 rec( 12, 1, SearchAttributes ),
11895                 rec( 13, (1,255), Path ),
11896         ], info_str=(Path, "File Search Continue: %s", ", %s"))
11897         pkt.Reply( NO_LENGTH_CHECK, [
11898                 #
11899                 # XXX - don't show this if we got back a non-zero
11900                 # completion code?  For example, 255 means "No
11901                 # matching files or directories were found", so
11902                 # presumably it can't show you a matching file or
11903                 # directory instance - it appears to just leave crap
11904                 # there.
11905                 #
11906                 srec( DirectoryInstance, req_cond="ncp.sattr_sub==TRUE"),
11907                 srec( FileInstance, req_cond="ncp.sattr_sub!=TRUE"),
11908         ])
11909         pkt.ReqCondSizeVariable()
11910         pkt.CompletionCodes([0x0000, 0xff16])
11911         # 2222/40, 64
11912         pkt = NCP(0x40, "Search for a File", 'file')
11913         pkt.Request((12, 266), [
11914                 rec( 7, 2, SequenceNumber, BE ),
11915                 rec( 9, 1, DirHandle ),
11916                 rec( 10, 1, SearchAttributes ),
11917                 rec( 11, (1,255), FileName ),
11918         ], info_str=(FileName, "Search for File: %s", ", %s"))
11919         pkt.Reply(40, [
11920                 rec( 8, 2, SequenceNumber, BE ),
11921                 rec( 10, 2, Reserved2 ),
11922                 rec( 12, 14, FileName14 ),
11923                 rec( 26, 1, AttributesDef ),
11924                 rec( 27, 1, FileExecuteType ),
11925                 rec( 28, 4, FileSize ),
11926                 rec( 32, 2, CreationDate, BE ),
11927                 rec( 34, 2, LastAccessedDate, BE ),
11928                 rec( 36, 2, ModifiedDate, BE ),
11929                 rec( 38, 2, ModifiedTime, BE ),
11930         ])
11931         pkt.CompletionCodes([0x0000, 0x8900, 0x9600, 0x9804, 0x9b03,
11932                              0x9c03, 0xa100, 0xfd00, 0xff16])
11933         # 2222/41, 65
11934         pkt = NCP(0x41, "Open File", 'file')
11935         pkt.Request((10, 264), [
11936                 rec( 7, 1, DirHandle ),
11937                 rec( 8, 1, SearchAttributes ),
11938                 rec( 9, (1,255), FileName ),
11939         ], info_str=(FileName, "Open File: %s", ", %s"))
11940         pkt.Reply(44, [
11941                 rec( 8, 6, FileHandle ),
11942                 rec( 14, 2, Reserved2 ),
11943                 rec( 16, 14, FileName14 ),
11944                 rec( 30, 1, AttributesDef ),
11945                 rec( 31, 1, FileExecuteType ),
11946                 rec( 32, 4, FileSize, BE ),
11947                 rec( 36, 2, CreationDate, BE ),
11948                 rec( 38, 2, LastAccessedDate, BE ),
11949                 rec( 40, 2, ModifiedDate, BE ),
11950                 rec( 42, 2, ModifiedTime, BE ),
11951         ])
11952         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8200, 0x9400,
11953                              0x9600, 0x9804, 0x9c03, 0xa100, 0xfd00,
11954                              0xff16])
11955         # 2222/42, 66
11956         pkt = NCP(0x42, "Close File", 'file')
11957         pkt.Request(14, [
11958                 rec( 7, 1, Reserved ),
11959                 rec( 8, 6, FileHandle ),
11960         ], info_str=(FileHandle, "Close File - 0x%s", ", %s"))
11961         pkt.Reply(8)
11962         pkt.CompletionCodes([0x0000, 0x8800, 0xff1a])
11963         # 2222/43, 67
11964         pkt = NCP(0x43, "Create File", 'file')
11965         pkt.Request((10, 264), [
11966                 rec( 7, 1, DirHandle ),
11967                 rec( 8, 1, AttributesDef ),
11968                 rec( 9, (1,255), FileName ),
11969         ], info_str=(FileName, "Create File: %s", ", %s"))
11970         pkt.Reply(44, [
11971                 rec( 8, 6, FileHandle ),
11972                 rec( 14, 2, Reserved2 ),
11973                 rec( 16, 14, FileName14 ),
11974                 rec( 30, 1, AttributesDef ),
11975                 rec( 31, 1, FileExecuteType ),
11976                 rec( 32, 4, FileSize, BE ),
11977                 rec( 36, 2, CreationDate, BE ),
11978                 rec( 38, 2, LastAccessedDate, BE ),
11979                 rec( 40, 2, ModifiedDate, BE ),
11980                 rec( 42, 2, ModifiedTime, BE ),
11981         ])
11982         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11983                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11984                              0x9804, 0x9900, 0x9b03, 0x9c03, 0xfd00,
11985                              0xff00])
11986         # 2222/44, 68
11987         pkt = NCP(0x44, "Erase File", 'file')
11988         pkt.Request((10, 264), [
11989                 rec( 7, 1, DirHandle ),
11990                 rec( 8, 1, SearchAttributes ),
11991                 rec( 9, (1,255), FileName ),
11992         ], info_str=(FileName, "Erase File: %s", ", %s"))
11993         pkt.Reply(8)
11994         pkt.CompletionCodes([0x0000, 0x8a00, 0x8d00, 0x8e00, 0x8f00,
11995                              0x9001, 0x9600, 0x9804, 0x9b03, 0x9c03,
11996                              0xa100, 0xfd00, 0xff00])
11997         # 2222/45, 69
11998         pkt = NCP(0x45, "Rename File", 'file')
11999         pkt.Request((12, 520), [
12000                 rec( 7, 1, DirHandle ),
12001                 rec( 8, 1, SearchAttributes ),
12002                 rec( 9, (1,255), FileName ),
12003                 rec( -1, 1, TargetDirHandle ),
12004                 rec( -1, (1, 255), NewFileNameLen ),
12005         ], info_str=(FileName, "Rename File: %s", ", %s"))
12006         pkt.Reply(8)
12007         pkt.CompletionCodes([0x0000, 0x8701, 0x8b00, 0x8d00, 0x8e00,
12008                              0x8f00, 0x9001, 0x9101, 0x9201, 0x9600,
12009                              0x9804, 0x9a00, 0x9b03, 0x9c03, 0xa100,
12010                              0xfd00, 0xff16])
12011         # 2222/46, 70
12012         pkt = NCP(0x46, "Set File Attributes", 'file')
12013         pkt.Request((11, 265), [
12014                 rec( 7, 1, AttributesDef ),
12015                 rec( 8, 1, DirHandle ),
12016                 rec( 9, 1, SearchAttributes ),
12017                 rec( 10, (1,255), FileName ),
12018         ], info_str=(FileName, "Set File Attributes: %s", ", %s"))
12019         pkt.Reply(8)
12020         pkt.CompletionCodes([0x0000, 0x8c00, 0x8d00, 0x8e00, 0x9600,
12021                              0x9804, 0x9b03, 0x9c03, 0xa100, 0xfd00,
12022                              0xff16])
12023         # 2222/47, 71
12024         pkt = NCP(0x47, "Get Current Size of File", 'file')
12025         pkt.Request(14, [
12026         rec(7, 1, Reserved ),
12027                 rec( 8, 6, FileHandle ),
12028         ], info_str=(FileHandle, "Get Current Size of File - 0x%s", ", %s"))
12029         pkt.Reply(12, [
12030                 rec( 8, 4, FileSize, BE ),
12031         ])
12032         pkt.CompletionCodes([0x0000, 0x8800])
12033         # 2222/48, 72
12034         pkt = NCP(0x48, "Read From A File", 'file')
12035         pkt.Request(20, [
12036                 rec( 7, 1, Reserved ),
12037                 rec( 8, 6, FileHandle ),
12038                 rec( 14, 4, FileOffset, BE ),
12039                 rec( 18, 2, MaxBytes, BE ),
12040         ], info_str=(FileHandle, "Read From File - 0x%s", ", %s"))
12041         pkt.Reply(10, [
12042                 rec( 8, 2, NumBytes, BE ),
12043         ])
12044         pkt.CompletionCodes([0x0000, 0x8300, 0x8800, 0x9300, 0xff1b])
12045         # 2222/49, 73
12046         pkt = NCP(0x49, "Write to a File", 'file')
12047         pkt.Request(20, [
12048                 rec( 7, 1, Reserved ),
12049                 rec( 8, 6, FileHandle ),
12050                 rec( 14, 4, FileOffset, BE ),
12051                 rec( 18, 2, MaxBytes, BE ),
12052         ], info_str=(FileHandle, "Write to a File - 0x%s", ", %s"))
12053         pkt.Reply(8)
12054         pkt.CompletionCodes([0x0000, 0x0104, 0x8300, 0x8800, 0x9400, 0x9500, 0xa201, 0xff1b])
12055         # 2222/4A, 74
12056         pkt = NCP(0x4A, "Copy from One File to Another", 'file')
12057         pkt.Request(30, [
12058                 rec( 7, 1, Reserved ),
12059                 rec( 8, 6, FileHandle ),
12060                 rec( 14, 6, TargetFileHandle ),
12061                 rec( 20, 4, FileOffset, BE ),
12062                 rec( 24, 4, TargetFileOffset, BE ),
12063                 rec( 28, 2, BytesToCopy, BE ),
12064         ])
12065         pkt.Reply(12, [
12066                 rec( 8, 4, BytesActuallyTransferred, BE ),
12067         ])
12068         pkt.CompletionCodes([0x0000, 0x0104, 0x8300, 0x8800, 0x9300, 0x9400,
12069                              0x9500, 0x9600, 0xa201, 0xff1b])
12070         # 2222/4B, 75
12071         pkt = NCP(0x4B, "Set File Time Date Stamp", 'file')
12072         pkt.Request(18, [
12073                 rec( 7, 1, Reserved ),
12074                 rec( 8, 6, FileHandle ),
12075                 rec( 14, 2, FileTime, BE ),
12076                 rec( 16, 2, FileDate, BE ),
12077         ], info_str=(FileHandle, "Set Time and Date Stamp for File - 0x%s", ", %s"))
12078         pkt.Reply(8)
12079         pkt.CompletionCodes([0x0000, 0x8800, 0x9400, 0x9600, 0xfb08])
12080         # 2222/4C, 76
12081         pkt = NCP(0x4C, "Open File", 'file')
12082         pkt.Request((11, 265), [
12083                 rec( 7, 1, DirHandle ),
12084                 rec( 8, 1, SearchAttributes ),
12085                 rec( 9, 1, AccessRightsMask ),
12086                 rec( 10, (1,255), FileName ),
12087         ], info_str=(FileName, "Open File: %s", ", %s"))
12088         pkt.Reply(44, [
12089                 rec( 8, 6, FileHandle ),
12090                 rec( 14, 2, Reserved2 ),
12091                 rec( 16, 14, FileName14 ),
12092                 rec( 30, 1, AttributesDef ),
12093                 rec( 31, 1, FileExecuteType ),
12094                 rec( 32, 4, FileSize, BE ),
12095                 rec( 36, 2, CreationDate, BE ),
12096                 rec( 38, 2, LastAccessedDate, BE ),
12097                 rec( 40, 2, ModifiedDate, BE ),
12098                 rec( 42, 2, ModifiedTime, BE ),
12099         ])
12100         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8200, 0x9400,
12101                              0x9600, 0x9804, 0x9c03, 0xa100, 0xfd00,
12102                              0xff16])
12103         # 2222/4D, 77
12104         pkt = NCP(0x4D, "Create File", 'file')
12105         pkt.Request((10, 264), [
12106                 rec( 7, 1, DirHandle ),
12107                 rec( 8, 1, AttributesDef ),
12108                 rec( 9, (1,255), FileName ),
12109         ], info_str=(FileName, "Create File: %s", ", %s"))
12110         pkt.Reply(44, [
12111                 rec( 8, 6, FileHandle ),
12112                 rec( 14, 2, Reserved2 ),
12113                 rec( 16, 14, FileName14 ),
12114                 rec( 30, 1, AttributesDef ),
12115                 rec( 31, 1, FileExecuteType ),
12116                 rec( 32, 4, FileSize, BE ),
12117                 rec( 36, 2, CreationDate, BE ),
12118                 rec( 38, 2, LastAccessedDate, BE ),
12119                 rec( 40, 2, ModifiedDate, BE ),
12120                 rec( 42, 2, ModifiedTime, BE ),
12121         ])
12122         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12123                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12124                              0x9804, 0x9900, 0x9b03, 0x9c03, 0xfd00,
12125                              0xff00])
12126         # 2222/4F, 79
12127         pkt = NCP(0x4F, "Set File Extended Attributes", 'file')
12128         pkt.Request((11, 265), [
12129                 rec( 7, 1, AttributesDef ),
12130                 rec( 8, 1, DirHandle ),
12131                 rec( 9, 1, AccessRightsMask ),
12132                 rec( 10, (1,255), FileName ),
12133         ], info_str=(FileName, "Set File Extended Attributes: %s", ", %s"))
12134         pkt.Reply(8)
12135         pkt.CompletionCodes([0x0000, 0x8c00, 0x8d00, 0x8e00, 0x9600,
12136                              0x9804, 0x9b03, 0x9c03, 0xa100, 0xfd00,
12137                              0xff16])
12138         # 2222/54, 84
12139         pkt = NCP(0x54, "Open/Create File", 'file')
12140         pkt.Request((12, 266), [
12141                 rec( 7, 1, DirHandle ),
12142                 rec( 8, 1, AttributesDef ),
12143                 rec( 9, 1, AccessRightsMask ),
12144                 rec( 10, 1, ActionFlag ),
12145                 rec( 11, (1,255), FileName ),
12146         ], info_str=(FileName, "Open/Create File: %s", ", %s"))
12147         pkt.Reply(44, [
12148                 rec( 8, 6, FileHandle ),
12149                 rec( 14, 2, Reserved2 ),
12150                 rec( 16, 14, FileName14 ),
12151                 rec( 30, 1, AttributesDef ),
12152                 rec( 31, 1, FileExecuteType ),
12153                 rec( 32, 4, FileSize, BE ),
12154                 rec( 36, 2, CreationDate, BE ),
12155                 rec( 38, 2, LastAccessedDate, BE ),
12156                 rec( 40, 2, ModifiedDate, BE ),
12157                 rec( 42, 2, ModifiedTime, BE ),
12158         ])
12159         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12160                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12161                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
12162         # 2222/55, 85
12163         pkt = NCP(0x55, "Get Sparse File Data Block Bit Map", 'file')
12164         pkt.Request(17, [
12165                 rec( 7, 6, FileHandle ),
12166                 rec( 13, 4, FileOffset ),
12167         ], info_str=(FileHandle, "Get Sparse File Data Block Bitmap for File - 0x%s", ", %s"))
12168         pkt.Reply(528, [
12169                 rec( 8, 4, AllocationBlockSize ),
12170                 rec( 12, 4, Reserved4 ),
12171                 rec( 16, 512, BitMap ),
12172         ])
12173         pkt.CompletionCodes([0x0000, 0x8800])
12174         # 2222/5601, 86/01
12175         pkt = NCP(0x5601, "Close Extended Attribute Handle", 'extended', has_length=0 )
12176         pkt.Request(14, [
12177                 rec( 8, 2, Reserved2 ),
12178                 rec( 10, 4, EAHandle ),
12179         ])
12180         pkt.Reply(8)
12181         pkt.CompletionCodes([0x0000, 0xcf00, 0xd301])
12182         # 2222/5602, 86/02
12183         pkt = NCP(0x5602, "Write Extended Attribute", 'extended', has_length=0 )
12184         pkt.Request((35,97), [
12185                 rec( 8, 2, EAFlags ),
12186                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume, BE ),
12187                 rec( 14, 4, ReservedOrDirectoryNumber ),
12188                 rec( 18, 4, TtlWriteDataSize ),
12189                 rec( 22, 4, FileOffset ),
12190                 rec( 26, 4, EAAccessFlag ),
12191                 rec( 30, 2, EAValueLength, var='x' ),
12192                 rec( 32, (2,64), EAKey ),
12193                 rec( -1, 1, EAValueRep, repeat='x' ),
12194         ], info_str=(EAKey, "Write Extended Attribute: %s", ", %s"))
12195         pkt.Reply(20, [
12196                 rec( 8, 4, EAErrorCodes ),
12197                 rec( 12, 4, EABytesWritten ),
12198                 rec( 16, 4, NewEAHandle ),
12199         ])
12200         pkt.CompletionCodes([0x0000, 0xc800, 0xc900, 0xcb00, 0xce00, 0xcf00, 0xd101,
12201                              0xd203, 0xd301, 0xd402, 0xda02, 0xdc01, 0xef00, 0xff00])
12202         # 2222/5603, 86/03
12203         pkt = NCP(0x5603, "Read Extended Attribute", 'extended', has_length=0 )
12204         pkt.Request((28,538), [
12205                 rec( 8, 2, EAFlags ),
12206                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
12207                 rec( 14, 4, ReservedOrDirectoryNumber ),
12208                 rec( 18, 4, FileOffset ),
12209                 rec( 22, 4, InspectSize ),
12210                 rec( 26, (2,512), EAKey ),
12211         ], info_str=(EAKey, "Read Extended Attribute: %s", ", %s"))
12212         pkt.Reply((26,536), [
12213                 rec( 8, 4, EAErrorCodes ),
12214                 rec( 12, 4, TtlValuesLength ),
12215                 rec( 16, 4, NewEAHandle ),
12216                 rec( 20, 4, EAAccessFlag ),
12217                 rec( 24, (2,512), EAValue ),
12218         ])
12219         pkt.CompletionCodes([0x0000, 0x8800, 0x9c03, 0xc900, 0xce00, 0xcf00, 0xd101,
12220                              0xd301, 0xd503])
12221         # 2222/5604, 86/04
12222         pkt = NCP(0x5604, "Enumerate Extended Attribute", 'extended', has_length=0 )
12223         pkt.Request((26,536), [
12224                 rec( 8, 2, EAFlags ),
12225                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
12226                 rec( 14, 4, ReservedOrDirectoryNumber ),
12227                 rec( 18, 4, InspectSize ),
12228                 rec( 22, 2, SequenceNumber ),
12229                 rec( 24, (2,512), EAKey ),
12230         ], info_str=(EAKey, "Enumerate Extended Attribute: %s", ", %s"))
12231         pkt.Reply(28, [
12232                 rec( 8, 4, EAErrorCodes ),
12233                 rec( 12, 4, TtlEAs ),
12234                 rec( 16, 4, TtlEAsDataSize ),
12235                 rec( 20, 4, TtlEAsKeySize ),
12236                 rec( 24, 4, NewEAHandle ),
12237         ])
12238         pkt.CompletionCodes([0x0000, 0x8800, 0x8c01, 0xc800, 0xc900, 0xce00, 0xcf00, 0xd101,
12239                              0xd301, 0xd503, 0xfb08, 0xff00])
12240         # 2222/5605, 86/05
12241         pkt = NCP(0x5605, "Duplicate Extended Attributes", 'extended', has_length=0 )
12242         pkt.Request(28, [
12243                 rec( 8, 2, EAFlags ),
12244                 rec( 10, 2, DstEAFlags ),
12245                 rec( 12, 4, EAHandleOrNetWareHandleOrVolume ),
12246                 rec( 16, 4, ReservedOrDirectoryNumber ),
12247                 rec( 20, 4, EAHandleOrNetWareHandleOrVolume ),
12248                 rec( 24, 4, ReservedOrDirectoryNumber ),
12249         ])
12250         pkt.Reply(20, [
12251                 rec( 8, 4, EADuplicateCount ),
12252                 rec( 12, 4, EADataSizeDuplicated ),
12253                 rec( 16, 4, EAKeySizeDuplicated ),
12254         ])
12255         pkt.CompletionCodes([0x0000, 0x8800, 0xd101])
12256         # 2222/5701, 87/01
12257         pkt = NCP(0x5701, "Open/Create File or Subdirectory", 'file', has_length=0)
12258         pkt.Request((30, 284), [
12259                 rec( 8, 1, NameSpace  ),
12260                 rec( 9, 1, OpenCreateMode ),
12261                 rec( 10, 2, SearchAttributesLow ),
12262                 rec( 12, 2, ReturnInfoMask ),
12263                 rec( 14, 2, ExtendedInfo ),
12264                 rec( 16, 4, AttributesDef32 ),
12265                 rec( 20, 2, DesiredAccessRights ),
12266                 rec( 22, 1, VolumeNumber ),
12267                 rec( 23, 4, DirectoryBase ),
12268                 rec( 27, 1, HandleFlag ),
12269                 rec( 28, 1, PathCount, var="x" ),
12270                 rec( 29, (1,255), Path, repeat="x" ),
12271         ], info_str=(Path, "Open or Create: %s", "/%s"))
12272         pkt.Reply( NO_LENGTH_CHECK, [
12273                 rec( 8, 4, FileHandle ),
12274                 rec( 12, 1, OpenCreateAction ),
12275                 rec( 13, 1, Reserved ),
12276                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12277                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12278                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12279                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12280                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12281                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12282                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12283                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12284                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12285                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12286                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12287                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12288                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12289                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12290                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12291                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12292                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12293                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12294                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12295                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12296                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12297                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12298                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12299                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12300                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12301                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12302                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12303                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12304                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12305                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12306                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12307                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12308                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12309                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
12310                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
12311                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
12312                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
12313                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
12314                 srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ),
12315                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
12316                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
12317                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
12318                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
12319                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
12320                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
12321                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
12322                 srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
12323         ])
12324         pkt.ReqCondSizeVariable()
12325         pkt.CompletionCodes([0x0000, 0x0102, 0x7f00, 0x8001, 0x8101, 0x8401, 0x8501,
12326                              0x8701, 0x8900, 0x8d00, 0x8f00, 0x9001, 0x9400, 0x9600,
12327                              0x9804, 0x9900, 0x9b03, 0x9c03, 0xa500, 0xa802, 0xa901, 0xbf00, 0xfd00, 0xff16])
12328         # 2222/5702, 87/02
12329         pkt = NCP(0x5702, "Initialize Search", 'file', has_length=0)
12330         pkt.Request( (18,272), [
12331                 rec( 8, 1, NameSpace  ),
12332                 rec( 9, 1, Reserved ),
12333                 rec( 10, 1, VolumeNumber ),
12334                 rec( 11, 4, DirectoryBase ),
12335                 rec( 15, 1, HandleFlag ),
12336                 rec( 16, 1, PathCount, var="x" ),
12337                 rec( 17, (1,255), Path, repeat="x" ),
12338         ], info_str=(Path, "Set Search Pointer to: %s", "/%s"))
12339         pkt.Reply(17, [
12340                 rec( 8, 1, VolumeNumber ),
12341                 rec( 9, 4, DirectoryNumber ),
12342                 rec( 13, 4, DirectoryEntryNumber ),
12343         ])
12344         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12345                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12346                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xbf00, 0xfd00, 0xff16])
12347         # 2222/5703, 87/03
12348         pkt = NCP(0x5703, "Search for File or Subdirectory", 'file', has_length=0)
12349         pkt.Request((26, 280), [
12350                 rec( 8, 1, NameSpace  ),
12351                 rec( 9, 1, DataStream ),
12352                 rec( 10, 2, SearchAttributesLow ),
12353                 rec( 12, 2, ReturnInfoMask ),
12354                 rec( 14, 2, ExtendedInfo ),
12355                 rec( 16, 9, SeachSequenceStruct ),
12356                 rec( 25, (1,255), SearchPattern ),
12357         ], info_str=(SearchPattern, "Search for: %s", "/%s"))
12358         pkt.Reply( NO_LENGTH_CHECK, [
12359                 rec( 8, 9, SeachSequenceStruct ),
12360                 rec( 17, 1, Reserved ),
12361                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12362                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12363                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12364                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12365                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12366                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12367                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12368                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12369                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12370                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12371                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12372                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12373                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12374                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12375                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12376                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12377                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12378                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12379                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12380                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12381                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12382                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12383                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12384                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12385                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12386                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12387                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12388                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12389                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12390                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12391                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12392                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12393                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12394                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
12395                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
12396                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
12397                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
12398                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
12399                 srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ),
12400                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
12401                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
12402                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
12403                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
12404                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
12405                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
12406                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
12407                 srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
12408         ])
12409         pkt.ReqCondSizeVariable()
12410         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12411                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12412                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xbf00, 0xfd00, 0xff16])
12413         # 2222/5704, 87/04
12414         pkt = NCP(0x5704, "Rename Or Move a File or Subdirectory", 'file', has_length=0)
12415         pkt.Request((28, 536), [
12416                 rec( 8, 1, NameSpace  ),
12417                 rec( 9, 1, RenameFlag ),
12418                 rec( 10, 2, SearchAttributesLow ),
12419                 rec( 12, 1, VolumeNumber ),
12420                 rec( 13, 4, DirectoryBase ),
12421                 rec( 17, 1, HandleFlag ),
12422                 rec( 18, 1, PathCount, var="x" ),
12423                 rec( 19, 1, VolumeNumber ),
12424                 rec( 20, 4, DirectoryBase ),
12425                 rec( 24, 1, HandleFlag ),
12426                 rec( 25, 1, PathCount, var="y" ),
12427                 rec( 26, (1, 255), Path, repeat="x" ),
12428                 rec( -1, (1,255), DestPath, repeat="y" ),
12429         ], info_str=(Path, "Rename or Move: %s", "/%s"))
12430         pkt.Reply(8)
12431         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
12432                              0x8701, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9100, 0x9200, 0x9600,
12433                              0x9804, 0x9a00, 0x9b03, 0x9c03, 0x9e00, 0xa901, 0xbf00, 0xfd00, 0xff16])
12434         # 2222/5705, 87/05
12435         pkt = NCP(0x5705, "Scan File or Subdirectory for Trustees", 'file', has_length=0)
12436         pkt.Request((24, 278), [
12437                 rec( 8, 1, NameSpace  ),
12438                 rec( 9, 1, Reserved ),
12439                 rec( 10, 2, SearchAttributesLow ),
12440                 rec( 12, 4, SequenceNumber ),
12441                 rec( 16, 1, VolumeNumber ),
12442                 rec( 17, 4, DirectoryBase ),
12443                 rec( 21, 1, HandleFlag ),
12444                 rec( 22, 1, PathCount, var="x" ),
12445                 rec( 23, (1, 255), Path, repeat="x" ),
12446         ], info_str=(Path, "Scan Trustees for: %s", "/%s"))
12447         pkt.Reply(20, [
12448                 rec( 8, 4, SequenceNumber ),
12449                 rec( 12, 2, ObjectIDCount, var="x" ),
12450                 rec( 14, 6, TrusteeStruct, repeat="x" ),
12451         ])
12452         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12453                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12454                              0x9804, 0x9b03, 0x9c04, 0xa901, 0xbf00, 0xfd00, 0xff16])
12455         # 2222/5706, 87/06
12456         pkt = NCP(0x5706, "Obtain File or SubDirectory Information", 'file', has_length=0)
12457         pkt.Request((24,278), [
12458                 rec( 10, 1, SrcNameSpace ),
12459                 rec( 11, 1, DestNameSpace ),
12460                 rec( 12, 2, SearchAttributesLow ),
12461                 rec( 14, 2, ReturnInfoMask, LE ),
12462                 rec( 16, 2, ExtendedInfo ),
12463                 rec( 18, 1, VolumeNumber ),
12464                 rec( 19, 4, DirectoryBase ),
12465                 rec( 23, 1, HandleFlag ),
12466                 rec( 24, 1, PathCount, var="x" ),
12467                 rec( 25, (1,255), Path, repeat="x",),
12468         ], info_str=(Path, "Obtain Info for: %s", "/%s"))
12469         pkt.Reply(NO_LENGTH_CHECK, [
12470             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12471             srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12472             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12473             srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12474             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12475             srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12476             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12477             srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12478             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12479             srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12480             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12481             srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12482             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12483             srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12484             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12485             srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12486             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12487             srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12488             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12489             srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12490             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12491             srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12492             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12493             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12494             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12495             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12496             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12497             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12498             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12499             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12500             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12501             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12502             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12503             srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
12504             srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
12505             srec( DataStreamsStruct, req_cond="ncp.ret_info_mask_actual == 1" ),
12506             srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1 && ncp.number_of_data_streams_long > 0" ),            # , repeat="x"
12507             srec( DataStreamsStruct, req_cond="ncp.ret_info_mask_logical == 1" ), # , var="y"
12508             srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1 && ncp.number_of_data_streams_long > 0" ),          # , repeat="y"
12509             srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
12510             srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ),
12511             srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
12512             srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
12513             srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
12514             srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
12515             srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
12516             srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
12517             srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
12518                         srec( FileSize64bitStruct, req_cond="ncp.ext_info_64_bit_fs == 1" ),
12519             srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
12520         ])
12521         pkt.ReqCondSizeVariable()
12522         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12523                              0x8700, 0x8900, 0x8d00, 0x8f00, 0x9001, 0x9600,
12524                              0x9802, 0x9b03, 0x9c03, 0xa802, 0xa901, 0xbf00, 0xfd00, 0xff16])
12525         # 2222/5707, 87/07
12526         pkt = NCP(0x5707, "Modify File or Subdirectory DOS Information", 'file', has_length=0)
12527         pkt.Request((62,316), [
12528                 rec( 8, 1, NameSpace ),
12529                 rec( 9, 1, Reserved ),
12530                 rec( 10, 2, SearchAttributesLow ),
12531                 rec( 12, 2, ModifyDOSInfoMask ),
12532                 rec( 14, 2, Reserved2 ),
12533                 rec( 16, 2, AttributesDef16 ),
12534                 rec( 18, 1, FileMode ),
12535                 rec( 19, 1, FileExtendedAttributes ),
12536                 rec( 20, 2, CreationDate ),
12537                 rec( 22, 2, CreationTime ),
12538                 rec( 24, 4, CreatorID, BE ),
12539                 rec( 28, 2, ModifiedDate ),
12540                 rec( 30, 2, ModifiedTime ),
12541                 rec( 32, 4, ModifierID, BE ),
12542                 rec( 36, 2, ArchivedDate ),
12543                 rec( 38, 2, ArchivedTime ),
12544                 rec( 40, 4, ArchiverID, BE ),
12545                 rec( 44, 2, LastAccessedDate ),
12546                 rec( 46, 2, InheritedRightsMask ),
12547                 rec( 48, 2, InheritanceRevokeMask ),
12548                 rec( 50, 4, MaxSpace ),
12549                 rec( 54, 1, VolumeNumber ),
12550                 rec( 55, 4, DirectoryBase ),
12551                 rec( 59, 1, HandleFlag ),
12552                 rec( 60, 1, PathCount, var="x" ),
12553                 rec( 61, (1,255), Path, repeat="x" ),
12554         ], info_str=(Path, "Modify DOS Information for: %s", "/%s"))
12555         pkt.Reply(8)
12556         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
12557                              0x8701, 0x8c01, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9600,
12558                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xbf00, 0xfd00, 0xff16])
12559         # 2222/5708, 87/08
12560         pkt = NCP(0x5708, "Delete a File or Subdirectory", 'file', has_length=0)
12561         pkt.Request((20,274), [
12562                 rec( 8, 1, NameSpace ),
12563                 rec( 9, 1, Reserved ),
12564                 rec( 10, 2, SearchAttributesLow ),
12565                 rec( 12, 1, VolumeNumber ),
12566                 rec( 13, 4, DirectoryBase ),
12567                 rec( 17, 1, HandleFlag ),
12568                 rec( 18, 1, PathCount, var="x" ),
12569                 rec( 19, (1,255), Path, repeat="x" ),
12570         ], info_str=(Path, "Delete a File or Subdirectory: %s", "/%s"))
12571         pkt.Reply(8)
12572         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12573                              0x8701, 0x8900, 0x8a00, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9600,
12574                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xbf00, 0xfd00, 0xff16])
12575         # 2222/5709, 87/09
12576         pkt = NCP(0x5709, "Set Short Directory Handle", 'file', has_length=0)
12577         pkt.Request((20,274), [
12578                 rec( 8, 1, NameSpace ),
12579                 rec( 9, 1, DataStream ),
12580                 rec( 10, 1, DestDirHandle ),
12581                 rec( 11, 1, Reserved ),
12582                 rec( 12, 1, VolumeNumber ),
12583                 rec( 13, 4, DirectoryBase ),
12584                 rec( 17, 1, HandleFlag ),
12585                 rec( 18, 1, PathCount, var="x" ),
12586                 rec( 19, (1,255), Path, repeat="x" ),
12587         ], info_str=(Path, "Set Short Directory Handle to: %s", "/%s"))
12588         pkt.Reply(8)
12589         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12590                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12591                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xbf00, 0xfd00, 0xff16])
12592         # 2222/570A, 87/10
12593         pkt = NCP(0x570A, "Add Trustee Set to File or Subdirectory", 'file', has_length=0)
12594         pkt.Request((31,285), [
12595                 rec( 8, 1, NameSpace ),
12596                 rec( 9, 1, Reserved ),
12597                 rec( 10, 2, SearchAttributesLow ),
12598                 rec( 12, 2, AccessRightsMaskWord ),
12599                 rec( 14, 2, ObjectIDCount, var="y" ),
12600                 rec( 16, 1, VolumeNumber ),
12601                 rec( 17, 4, DirectoryBase ),
12602                 rec( 21, 1, HandleFlag ),
12603                 rec( 22, 1, PathCount, var="x" ),
12604                 rec( 23, (1,255), Path, repeat="x" ),
12605                 rec( -1, 7, TrusteeStruct, repeat="y" ),
12606         ], info_str=(Path, "Add Trustee Set to: %s", "/%s"))
12607         pkt.Reply(8)
12608         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12609                              0x8701, 0x8c01, 0x8d00, 0x8f00, 0x9001, 0x9600,
12610                              0x9804, 0x9b03, 0x9c03, 0xa802, 0xa901, 0xbf00, 0xfc01, 0xfd00, 0xff16])
12611         # 2222/570B, 87/11
12612         pkt = NCP(0x570B, "Delete Trustee Set from File or SubDirectory", 'file', has_length=0)
12613         pkt.Request((27,281), [
12614                 rec( 8, 1, NameSpace ),
12615                 rec( 9, 1, Reserved ),
12616                 rec( 10, 2, ObjectIDCount, var="y" ),
12617                 rec( 12, 1, VolumeNumber ),
12618                 rec( 13, 4, DirectoryBase ),
12619                 rec( 17, 1, HandleFlag ),
12620                 rec( 18, 1, PathCount, var="x" ),
12621                 rec( 19, (1,255), Path, repeat="x" ),
12622                 rec( -1, 7, TrusteeStruct, repeat="y" ),
12623         ], info_str=(Path, "Delete Trustee Set from: %s", "/%s"))
12624         pkt.Reply(8)
12625         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12626                              0x8701, 0x8c01, 0x8d00, 0x8f00, 0x9001, 0x9600,
12627                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12628         # 2222/570C, 87/12
12629         pkt = NCP(0x570C, "Allocate Short Directory Handle", 'file', has_length=0)
12630         pkt.Request((20,274), [
12631                 rec( 8, 1, NameSpace ),
12632                 rec( 9, 1, Reserved ),
12633                 rec( 10, 2, AllocateMode ),
12634                 rec( 12, 1, VolumeNumber ),
12635                 rec( 13, 4, DirectoryBase ),
12636                 rec( 17, 1, HandleFlag ),
12637                 rec( 18, 1, PathCount, var="x" ),
12638                 rec( 19, (1,255), Path, repeat="x" ),
12639         ], info_str=(Path, "Allocate Short Directory Handle to: %s", "/%s"))
12640         pkt.Reply(NO_LENGTH_CHECK, [
12641         srec( ReplyLevel2Struct, req_cond="ncp.alloc_reply_lvl2 == TRUE" ),
12642                 srec( ReplyLevel1Struct, req_cond="ncp.alloc_reply_lvl2 == FALSE" ),
12643         ])
12644         pkt.ReqCondSizeVariable()
12645         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12646                              0x8701, 0x8900, 0x8d00, 0x8f00, 0x9001, 0x9600,
12647                              0x9804, 0x9b03, 0x9c03, 0x9d00, 0xa901, 0xbf00, 0xfd00, 0xff16])
12648         # 2222/5710, 87/16
12649         pkt = NCP(0x5710, "Scan Salvageable Files", 'file', has_length=0)
12650         pkt.Request((26,280), [
12651                 rec( 8, 1, NameSpace ),
12652                 rec( 9, 1, DataStream ),
12653                 rec( 10, 2, ReturnInfoMask ),
12654                 rec( 12, 2, ExtendedInfo ),
12655                 rec( 14, 4, SequenceNumber ),
12656                 rec( 18, 1, VolumeNumber ),
12657                 rec( 19, 4, DirectoryBase ),
12658                 rec( 23, 1, HandleFlag ),
12659                 rec( 24, 1, PathCount, var="x" ),
12660                 rec( 25, (1,255), Path, repeat="x" ),
12661         ], info_str=(Path, "Scan for Deleted Files in: %s", "/%s"))
12662         pkt.Reply(NO_LENGTH_CHECK, [
12663                 rec( 8, 4, SequenceNumber ),
12664                 rec( 12, 2, DeletedTime ),
12665                 rec( 14, 2, DeletedDate ),
12666                 rec( 16, 4, DeletedID, BE ),
12667                 rec( 20, 4, VolumeID ),
12668                 rec( 24, 4, DirectoryBase ),
12669                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12670                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12671                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12672                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12673                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12674                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12675                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12676                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12677                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12678                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12679                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12680                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12681                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12682                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12683                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12684                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12685                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12686                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12687                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12688                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12689                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12690                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12691                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12692                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12693                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12694                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12695                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12696                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12697                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12698                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12699                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12700                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12701                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12702                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12703                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12704         ])
12705         pkt.ReqCondSizeVariable()
12706         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12707                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12708                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12709         # 2222/5711, 87/17
12710         pkt = NCP(0x5711, "Recover Salvageable File", 'file', has_length=0)
12711         pkt.Request((23,277), [
12712                 rec( 8, 1, NameSpace ),
12713                 rec( 9, 1, Reserved ),
12714                 rec( 10, 4, SequenceNumber ),
12715                 rec( 14, 4, VolumeID ),
12716                 rec( 18, 4, DirectoryBase ),
12717                 rec( 22, (1,255), FileName ),
12718         ], info_str=(FileName, "Recover Deleted File: %s", ", %s"))
12719         pkt.Reply(8)
12720         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12721                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12722                              0x9804, 0x9b03, 0x9c03, 0xa802, 0xbf00, 0xfe02, 0xfd00, 0xff16])
12723         # 2222/5712, 87/18
12724         pkt = NCP(0x5712, "Purge Salvageable Files", 'file', has_length=0)
12725         pkt.Request(22, [
12726                 rec( 8, 1, NameSpace ),
12727                 rec( 9, 1, Reserved ),
12728                 rec( 10, 4, SequenceNumber ),
12729                 rec( 14, 4, VolumeID ),
12730                 rec( 18, 4, DirectoryBase ),
12731         ])
12732         pkt.Reply(8)
12733         pkt.CompletionCodes([0x0000, 0x010a, 0x8000, 0x8101, 0x8401, 0x8501,
12734                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12735                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12736         # 2222/5713, 87/19
12737         pkt = NCP(0x5713, "Get Name Space Information", 'file', has_length=0)
12738         pkt.Request(18, [
12739                 rec( 8, 1, SrcNameSpace ),
12740                 rec( 9, 1, DestNameSpace ),
12741                 rec( 10, 1, Reserved ),
12742                 rec( 11, 1, VolumeNumber ),
12743                 rec( 12, 4, DirectoryBase ),
12744                 rec( 16, 2, NamesSpaceInfoMask ),
12745         ])
12746         pkt.Reply(NO_LENGTH_CHECK, [
12747             srec( FileNameStruct, req_cond="ncp.ns_info_mask_modify == TRUE" ),
12748             srec( FileAttributesStruct, req_cond="ncp.ns_info_mask_fatt == TRUE" ),
12749             srec( CreationDateStruct, req_cond="ncp.ns_info_mask_cdate == TRUE" ),
12750             srec( CreationTimeStruct, req_cond="ncp.ns_info_mask_ctime == TRUE" ),
12751             srec( OwnerIDStruct, req_cond="ncp.ns_info_mask_owner == TRUE" ),
12752             srec( ArchiveDateStruct, req_cond="ncp.ns_info_mask_adate == TRUE" ),
12753             srec( ArchiveTimeStruct, req_cond="ncp.ns_info_mask_atime == TRUE" ),
12754             srec( ArchiveIdStruct, req_cond="ncp.ns_info_mask_aid == TRUE" ),
12755             srec( UpdateDateStruct, req_cond="ncp.ns_info_mask_udate == TRUE" ),
12756             srec( UpdateTimeStruct, req_cond="ncp.ns_info_mask_utime == TRUE" ),
12757             srec( UpdateIDStruct, req_cond="ncp.ns_info_mask_uid == TRUE" ),
12758             srec( LastAccessStruct, req_cond="ncp.ns_info_mask_acc_date == TRUE" ),
12759             srec( RightsInfoStruct, req_cond="ncp.ns_info_mask_max_acc_mask == TRUE" ),
12760         ])
12761         pkt.ReqCondSizeVariable()
12762         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12763                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12764                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12765         # 2222/5714, 87/20
12766         pkt = NCP(0x5714, "Search for File or Subdirectory Set", 'file', has_length=0)
12767         pkt.Request((28, 282), [
12768                 rec( 8, 1, NameSpace  ),
12769                 rec( 9, 1, DataStream ),
12770                 rec( 10, 2, SearchAttributesLow ),
12771                 rec( 12, 2, ReturnInfoMask ),
12772                 rec( 14, 2, ExtendedInfo ),
12773                 rec( 16, 2, ReturnInfoCount ),
12774                 rec( 18, 9, SeachSequenceStruct ),
12775                 rec( 27, (1,255), SearchPattern ),
12776         ])
12777     # The reply packet is dissected in packet-ncp2222.inc
12778         pkt.Reply(NO_LENGTH_CHECK, [
12779         ])
12780         pkt.ReqCondSizeVariable()
12781         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12782                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12783                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xbf00, 0xfd00, 0xff16])
12784         # 2222/5715, 87/21
12785         pkt = NCP(0x5715, "Get Path String from Short Directory Handle", 'file', has_length=0)
12786         pkt.Request(10, [
12787                 rec( 8, 1, NameSpace ),
12788                 rec( 9, 1, DirHandle ),
12789         ])
12790         pkt.Reply((9,263), [
12791                 rec( 8, (1,255), Path ),
12792         ])
12793         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12794                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12795                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
12796         # 2222/5716, 87/22
12797         pkt = NCP(0x5716, "Generate Directory Base and Volume Number", 'file', has_length=0)
12798         pkt.Request((20,274), [
12799                 rec( 8, 1, SrcNameSpace ),
12800                 rec( 9, 1, DestNameSpace ),
12801                 rec( 10, 2, dstNSIndicator ),
12802                 rec( 12, 1, VolumeNumber ),
12803                 rec( 13, 4, DirectoryBase ),
12804                 rec( 17, 1, HandleFlag ),
12805                 rec( 18, 1, PathCount, var="x" ),
12806                 rec( 19, (1,255), Path, repeat="x" ),
12807         ], info_str=(Path, "Get Volume and Directory Base from: %s", "/%s"))
12808         pkt.Reply(17, [
12809                 rec( 8, 4, DirectoryBase ),
12810                 rec( 12, 4, DOSDirectoryBase ),
12811                 rec( 16, 1, VolumeNumber ),
12812         ])
12813         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12814                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12815                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12816         # 2222/5717, 87/23
12817         pkt = NCP(0x5717, "Query Name Space Information Format", 'file', has_length=0)
12818         pkt.Request(10, [
12819                 rec( 8, 1, NameSpace ),
12820                 rec( 9, 1, VolumeNumber ),
12821         ])
12822         pkt.Reply(58, [
12823                 rec( 8, 4, FixedBitMask ),
12824                 rec( 12, 4, VariableBitMask ),
12825                 rec( 16, 4, HugeBitMask ),
12826                 rec( 20, 2, FixedBitsDefined ),
12827                 rec( 22, 2, VariableBitsDefined ),
12828                 rec( 24, 2, HugeBitsDefined ),
12829                 rec( 26, 32, FieldsLenTable ),
12830         ])
12831         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12832                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12833                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12834         # 2222/5718, 87/24
12835         pkt = NCP(0x5718, "Get Name Spaces Loaded List from Volume Number", 'file', has_length=0)
12836         pkt.Request(11, [
12837                 rec( 8, 2, Reserved2 ),
12838                 rec( 10, 1, VolumeNumber ),
12839         ], info_str=(VolumeNumber, "Get Name Spaces Loaded List from Vol: %d", "/%d"))
12840         pkt.Reply(11, [
12841                 rec( 8, 2, NumberOfNSLoaded, var="x" ),
12842                 rec( 10, 1, NameSpace, repeat="x" ),
12843         ])
12844         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12845                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12846                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12847         # 2222/5719, 87/25
12848         pkt = NCP(0x5719, "Set Name Space Information", 'file', has_length=0)
12849         pkt.Request(531, [
12850                 rec( 8, 1, SrcNameSpace ),
12851                 rec( 9, 1, DestNameSpace ),
12852                 rec( 10, 1, VolumeNumber ),
12853                 rec( 11, 4, DirectoryBase ),
12854                 rec( 15, 2, NamesSpaceInfoMask ),
12855                 rec( 17, 2, Reserved2 ),
12856                 rec( 19, 512, NSSpecificInfo ),
12857         ])
12858         pkt.Reply(8)
12859         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12860                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12861                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12862                              0xff16])
12863         # 2222/571A, 87/26
12864         pkt = NCP(0x571A, "Get Huge Name Space Information", 'file', has_length=0)
12865         pkt.Request(34, [
12866                 rec( 8, 1, NameSpace ),
12867                 rec( 9, 1, VolumeNumber ),
12868                 rec( 10, 4, DirectoryBase ),
12869                 rec( 14, 4, HugeBitMask ),
12870                 rec( 18, 16, HugeStateInfo ),
12871         ])
12872         pkt.Reply((25,279), [
12873                 rec( 8, 16, NextHugeStateInfo ),
12874                 rec( 24, (1,255), HugeData ),
12875         ])
12876         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12877                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12878                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12879                              0xff16])
12880         # 2222/571B, 87/27
12881         pkt = NCP(0x571B, "Set Huge Name Space Information", 'file', has_length=0)
12882         pkt.Request((35,289), [
12883                 rec( 8, 1, NameSpace ),
12884                 rec( 9, 1, VolumeNumber ),
12885                 rec( 10, 4, DirectoryBase ),
12886                 rec( 14, 4, HugeBitMask ),
12887                 rec( 18, 16, HugeStateInfo ),
12888                 rec( 34, (1,255), HugeData ),
12889         ])
12890         pkt.Reply(28, [
12891                 rec( 8, 16, NextHugeStateInfo ),
12892                 rec( 24, 4, HugeDataUsed ),
12893         ])
12894         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12895                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12896                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12897                              0xff16])
12898         # 2222/571C, 87/28
12899         pkt = NCP(0x571C, "Get Full Path String", 'file', has_length=0)
12900         pkt.Request((28,282), [
12901                 rec( 8, 1, SrcNameSpace ),
12902                 rec( 9, 1, DestNameSpace ),
12903                 rec( 10, 2, PathCookieFlags ),
12904                 rec( 12, 4, Cookie1 ),
12905                 rec( 16, 4, Cookie2 ),
12906                 rec( 20, 1, VolumeNumber ),
12907                 rec( 21, 4, DirectoryBase ),
12908                 rec( 25, 1, HandleFlag ),
12909                 rec( 26, 1, PathCount, var="x" ),
12910                 rec( 27, (1,255), Path, repeat="x" ),
12911         ], info_str=(Path, "Get Full Path from: %s", "/%s"))
12912         pkt.Reply((23,277), [
12913                 rec( 8, 2, PathCookieFlags ),
12914                 rec( 10, 4, Cookie1 ),
12915                 rec( 14, 4, Cookie2 ),
12916                 rec( 18, 2, PathComponentSize ),
12917                 rec( 20, 2, PathComponentCount, var='x' ),
12918                 rec( 22, (1,255), Path, repeat='x' ),
12919         ])
12920         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12921                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12922                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12923                              0xff16])
12924         # 2222/571D, 87/29
12925         pkt = NCP(0x571D, "Get Effective Directory Rights", 'file', has_length=0)
12926         pkt.Request((24, 278), [
12927                 rec( 8, 1, NameSpace  ),
12928                 rec( 9, 1, DestNameSpace ),
12929                 rec( 10, 2, SearchAttributesLow ),
12930                 rec( 12, 2, ReturnInfoMask ),
12931                 rec( 14, 2, ExtendedInfo ),
12932                 rec( 16, 1, VolumeNumber ),
12933                 rec( 17, 4, DirectoryBase ),
12934                 rec( 21, 1, HandleFlag ),
12935                 rec( 22, 1, PathCount, var="x" ),
12936                 rec( 23, (1,255), Path, repeat="x" ),
12937         ], info_str=(Path, "Get Effective Rights for: %s", "/%s"))
12938         pkt.Reply(NO_LENGTH_CHECK, [
12939                 rec( 8, 2, EffectiveRights ),
12940                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12941                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12942                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12943                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12944                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12945                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12946                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12947                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12948                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12949                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12950                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12951                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12952                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12953                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12954                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12955                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12956                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12957                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12958                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12959                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12960                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12961                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12962                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12963                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12964                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12965                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12966                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12967                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12968                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12969                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12970                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12971                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12972                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12973                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12974                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12975         ])
12976         pkt.ReqCondSizeVariable()
12977         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12978                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12979                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12980         # 2222/571E, 87/30
12981         pkt = NCP(0x571E, "Open/Create File or Subdirectory", 'file', has_length=0)
12982         pkt.Request((34, 288), [
12983                 rec( 8, 1, NameSpace  ),
12984                 rec( 9, 1, DataStream ),
12985                 rec( 10, 1, OpenCreateMode ),
12986                 rec( 11, 1, Reserved ),
12987                 rec( 12, 2, SearchAttributesLow ),
12988                 rec( 14, 2, Reserved2 ),
12989                 rec( 16, 2, ReturnInfoMask ),
12990                 rec( 18, 2, ExtendedInfo ),
12991                 rec( 20, 4, AttributesDef32 ),
12992                 rec( 24, 2, DesiredAccessRights ),
12993                 rec( 26, 1, VolumeNumber ),
12994                 rec( 27, 4, DirectoryBase ),
12995                 rec( 31, 1, HandleFlag ),
12996                 rec( 32, 1, PathCount, var="x" ),
12997                 rec( 33, (1,255), Path, repeat="x" ),
12998         ], info_str=(Path, "Open or Create File: %s", "/%s"))
12999         pkt.Reply(NO_LENGTH_CHECK, [
13000                 rec( 8, 4, FileHandle, BE ),
13001                 rec( 12, 1, OpenCreateAction ),
13002                 rec( 13, 1, Reserved ),
13003                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
13004                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
13005                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
13006                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
13007                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
13008                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
13009                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
13010                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
13011                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
13012                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
13013                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
13014                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
13015                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
13016                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
13017                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
13018                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
13019                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
13020                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
13021                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
13022                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
13023                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
13024                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
13025                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
13026                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
13027                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
13028                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
13029                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
13030                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
13031                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
13032                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
13033                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
13034                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
13035                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
13036                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
13037                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
13038         ])
13039         pkt.ReqCondSizeVariable()
13040         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
13041                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13042                              0x9804, 0x9b03, 0x9c03, 0xbe00, 0xbf00, 0xfd00, 0xff16])
13043         # 2222/571F, 87/31
13044         pkt = NCP(0x571F, "Get File Information", 'file', has_length=0)
13045         pkt.Request(15, [
13046                 rec( 8, 6, FileHandle  ),
13047                 rec( 14, 1, HandleInfoLevel ),
13048         ], info_str=(FileHandle, "Get File Information - 0x%s", ", %s"))
13049         pkt.Reply(NO_LENGTH_CHECK, [
13050                 rec( 8, 4, VolumeNumberLong ),
13051                 rec( 12, 4, DirectoryBase ),
13052                 srec(HandleInfoLevel0, req_cond="ncp.handle_info_level==0x00" ),
13053                 srec(HandleInfoLevel1, req_cond="ncp.handle_info_level==0x01" ),
13054                 srec(HandleInfoLevel2, req_cond="ncp.handle_info_level==0x02" ),
13055                 srec(HandleInfoLevel3, req_cond="ncp.handle_info_level==0x03" ),
13056                 srec(HandleInfoLevel4, req_cond="ncp.handle_info_level==0x04" ),
13057                 srec(HandleInfoLevel5, req_cond="ncp.handle_info_level==0x05" ),
13058         ])
13059         pkt.ReqCondSizeVariable()
13060         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13061                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13062                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
13063         # 2222/5720, 87/32
13064         pkt = NCP(0x5720, "Open/Create File or Subdirectory with Callback", 'file', has_length=0)
13065         pkt.Request((30, 284), [
13066                 rec( 8, 1, NameSpace  ),
13067                 rec( 9, 1, OpenCreateMode ),
13068                 rec( 10, 2, SearchAttributesLow ),
13069                 rec( 12, 2, ReturnInfoMask ),
13070                 rec( 14, 2, ExtendedInfo ),
13071                 rec( 16, 4, AttributesDef32 ),
13072                 rec( 20, 2, DesiredAccessRights ),
13073                 rec( 22, 1, VolumeNumber ),
13074                 rec( 23, 4, DirectoryBase ),
13075                 rec( 27, 1, HandleFlag ),
13076                 rec( 28, 1, PathCount, var="x" ),
13077                 rec( 29, (1,255), Path, repeat="x" ),
13078         ], info_str=(Path, "Open or Create with Op-Lock: %s", "/%s"))
13079         pkt.Reply( NO_LENGTH_CHECK, [
13080                 rec( 8, 4, FileHandle, BE ),
13081                 rec( 12, 1, OpenCreateAction ),
13082                 rec( 13, 1, OCRetFlags ),
13083                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
13084                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
13085                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
13086                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
13087                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
13088                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
13089                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
13090                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
13091                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
13092                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
13093                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
13094                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
13095                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
13096                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
13097                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
13098                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
13099                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
13100                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
13101                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
13102                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
13103                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
13104                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
13105                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
13106                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
13107                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
13108                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
13109                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
13110                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
13111                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
13112                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
13113                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
13114                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
13115                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
13116                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
13117                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
13118                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
13119                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
13120                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
13121                 srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ),
13122                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
13123                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
13124                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
13125                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
13126                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
13127                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
13128                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
13129                 srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
13130         ])
13131         pkt.ReqCondSizeVariable()
13132         pkt.CompletionCodes([0x0000, 0x0102, 0x7f00, 0x8000, 0x8101, 0x8401, 0x8501,
13133                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13134                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
13135         # 2222/5721, 87/33
13136         pkt = NCP(0x5721, "Open/Create File or Subdirectory II with Callback", 'file', has_length=0)
13137         pkt.Request((34, 288), [
13138                 rec( 8, 1, NameSpace  ),
13139                 rec( 9, 1, DataStream ),
13140                 rec( 10, 1, OpenCreateMode ),
13141                 rec( 11, 1, Reserved ),
13142                 rec( 12, 2, SearchAttributesLow ),
13143                 rec( 14, 2, Reserved2 ),
13144                 rec( 16, 2, ReturnInfoMask ),
13145                 rec( 18, 2, ExtendedInfo ),
13146                 rec( 20, 4, AttributesDef32 ),
13147                 rec( 24, 2, DesiredAccessRights ),
13148                 rec( 26, 1, VolumeNumber ),
13149                 rec( 27, 4, DirectoryBase ),
13150                 rec( 31, 1, HandleFlag ),
13151                 rec( 32, 1, PathCount, var="x" ),
13152                 rec( 33, (1,255), Path, repeat="x" ),
13153         ], info_str=(FilePath, "Open or Create II with Op-Lock: %s", "/%s"))
13154         pkt.Reply(NO_LENGTH_CHECK, [
13155                 rec( 8, 4, FileHandle ),
13156                 rec( 12, 1, OpenCreateAction ),
13157                 rec( 13, 1, OCRetFlags ),
13158         srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
13159         srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
13160         srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
13161         srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
13162         srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
13163         srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
13164         srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
13165         srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
13166         srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
13167         srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
13168         srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
13169         srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
13170         srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
13171         srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
13172         srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
13173         srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
13174         srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
13175         srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
13176         srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
13177         srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
13178         srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
13179         srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
13180         srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
13181         srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
13182         srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
13183         srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
13184         srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
13185         srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
13186         srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
13187         srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
13188         srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
13189         srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
13190         srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
13191         srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
13192         srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
13193         srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
13194         srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
13195         srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
13196         srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ),
13197         srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
13198         srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
13199         srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
13200         srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
13201         srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
13202         srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
13203         srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
13204         srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
13205         ])
13206         pkt.ReqCondSizeVariable()
13207         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
13208                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13209                              0x9804, 0x9b03, 0x9c03, 0xbe00, 0xbf00, 0xfd00, 0xff16])
13210         # 2222/5722, 87/34
13211         pkt = NCP(0x5722, "Open CallBack Control (Op-Lock)", 'file', has_length=0)
13212         pkt.Request(13, [
13213                 rec( 10, 4, CCFileHandle, BE ),
13214                 rec( 14, 1, CCFunction ),
13215         ])
13216         pkt.Reply(8)
13217         pkt.CompletionCodes([0x0000, 0x8000, 0x8800, 0xff16])
13218         # 2222/5723, 87/35
13219         pkt = NCP(0x5723, "Modify DOS Attributes on a File or Subdirectory", 'file', has_length=0)
13220         pkt.Request((28, 282), [
13221                 rec( 8, 1, NameSpace  ),
13222                 rec( 9, 1, Flags ),
13223                 rec( 10, 2, SearchAttributesLow ),
13224                 rec( 12, 2, ReturnInfoMask ),
13225                 rec( 14, 2, ExtendedInfo ),
13226                 rec( 16, 4, AttributesDef32 ),
13227                 rec( 20, 1, VolumeNumber ),
13228                 rec( 21, 4, DirectoryBase ),
13229                 rec( 25, 1, HandleFlag ),
13230                 rec( 26, 1, PathCount, var="x" ),
13231                 rec( 27, (1,255), Path, repeat="x" ),
13232         ], info_str=(Path, "Modify DOS Attributes for: %s", "/%s"))
13233         pkt.Reply(24, [
13234                 rec( 8, 4, ItemsChecked ),
13235                 rec( 12, 4, ItemsChanged ),
13236                 rec( 16, 4, AttributeValidFlag ),
13237                 rec( 20, 4, AttributesDef32 ),
13238         ])
13239         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
13240                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13241                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
13242         # 2222/5724, 87/36
13243         pkt = NCP(0x5724, "Log File", 'sync', has_length=0)
13244         pkt.Request((28, 282), [
13245                 rec( 8, 1, NameSpace  ),
13246                 rec( 9, 1, Reserved ),
13247                 rec( 10, 2, Reserved2 ),
13248                 rec( 12, 1, LogFileFlagLow ),
13249                 rec( 13, 1, LogFileFlagHigh ),
13250                 rec( 14, 2, Reserved2 ),
13251                 rec( 16, 4, WaitTime ),
13252                 rec( 20, 1, VolumeNumber ),
13253                 rec( 21, 4, DirectoryBase ),
13254                 rec( 25, 1, HandleFlag ),
13255                 rec( 26, 1, PathCount, var="x" ),
13256                 rec( 27, (1,255), Path, repeat="x" ),
13257         ], info_str=(Path, "Lock File: %s", "/%s"))
13258         pkt.Reply(8)
13259         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13260                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13261                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
13262         # 2222/5725, 87/37
13263         pkt = NCP(0x5725, "Release File", 'sync', has_length=0)
13264         pkt.Request((20, 274), [
13265                 rec( 8, 1, NameSpace  ),
13266                 rec( 9, 1, Reserved ),
13267                 rec( 10, 2, Reserved2 ),
13268                 rec( 12, 1, VolumeNumber ),
13269                 rec( 13, 4, DirectoryBase ),
13270                 rec( 17, 1, HandleFlag ),
13271                 rec( 18, 1, PathCount, var="x" ),
13272                 rec( 19, (1,255), Path, repeat="x" ),
13273         ], info_str=(Path, "Release Lock on: %s", "/%s"))
13274         pkt.Reply(8)
13275         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13276                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13277                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
13278         # 2222/5726, 87/38
13279         pkt = NCP(0x5726, "Clear File", 'sync', has_length=0)
13280         pkt.Request((20, 274), [
13281                 rec( 8, 1, NameSpace  ),
13282                 rec( 9, 1, Reserved ),
13283                 rec( 10, 2, Reserved2 ),
13284                 rec( 12, 1, VolumeNumber ),
13285                 rec( 13, 4, DirectoryBase ),
13286                 rec( 17, 1, HandleFlag ),
13287                 rec( 18, 1, PathCount, var="x" ),
13288                 rec( 19, (1,255), Path, repeat="x" ),
13289         ], info_str=(Path, "Clear File: %s", "/%s"))
13290         pkt.Reply(8)
13291         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13292                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13293                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
13294         # 2222/5727, 87/39
13295         pkt = NCP(0x5727, "Get Directory Disk Space Restriction", 'file', has_length=0)
13296         pkt.Request((19, 273), [
13297                 rec( 8, 1, NameSpace  ),
13298                 rec( 9, 2, Reserved2 ),
13299                 rec( 11, 1, VolumeNumber ),
13300                 rec( 12, 4, DirectoryBase ),
13301                 rec( 16, 1, HandleFlag ),
13302                 rec( 17, 1, PathCount, var="x" ),
13303                 rec( 18, (1,255), Path, repeat="x" ),
13304         ], info_str=(Path, "Get Disk Space Restriction for: %s", "/%s"))
13305         pkt.Reply(18, [
13306                 rec( 8, 1, NumberOfEntries, var="x" ),
13307                 rec( 9, 9, SpaceStruct, repeat="x" ),
13308         ])
13309         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13310                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13311                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
13312                              0xff16])
13313         # 2222/5728, 87/40
13314         pkt = NCP(0x5728, "Search for File or Subdirectory Set (Extended Errors)", 'file', has_length=0)
13315         pkt.Request((28, 282), [
13316                 rec( 8, 1, NameSpace  ),
13317                 rec( 9, 1, DataStream ),
13318                 rec( 10, 2, SearchAttributesLow ),
13319                 rec( 12, 2, ReturnInfoMask ),
13320                 rec( 14, 2, ExtendedInfo ),
13321                 rec( 16, 2, ReturnInfoCount ),
13322                 rec( 18, 9, SeachSequenceStruct ),
13323                 rec( 27, (1,255), SearchPattern ),
13324         ], info_str=(SearchPattern, "Search for: %s", ", %s"))
13325         pkt.Reply(NO_LENGTH_CHECK, [
13326                 rec( 8, 9, SeachSequenceStruct ),
13327                 rec( 17, 1, MoreFlag ),
13328                 rec( 18, 2, InfoCount ),
13329                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
13330                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
13331                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
13332                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
13333                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
13334                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
13335                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
13336                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
13337                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
13338                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
13339                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
13340                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
13341                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
13342                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
13343                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
13344                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
13345                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
13346                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
13347                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
13348                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
13349                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
13350                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
13351                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
13352                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
13353                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
13354                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
13355                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
13356                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
13357                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
13358                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
13359                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
13360                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
13361                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
13362                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
13363                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
13364         ])
13365         pkt.ReqCondSizeVariable()
13366         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13367                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13368                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
13369         # 2222/5729, 87/41
13370         pkt = NCP(0x5729, "Scan Salvageable Files", 'file', has_length=0)
13371         pkt.Request((24,278), [
13372                 rec( 8, 1, NameSpace ),
13373                 rec( 9, 1, Reserved ),
13374                 rec( 10, 2, CtrlFlags, LE ),
13375                 rec( 12, 4, SequenceNumber ),
13376                 rec( 16, 1, VolumeNumber ),
13377                 rec( 17, 4, DirectoryBase ),
13378                 rec( 21, 1, HandleFlag ),
13379                 rec( 22, 1, PathCount, var="x" ),
13380                 rec( 23, (1,255), Path, repeat="x" ),
13381         ], info_str=(Path, "Scan Deleted Files: %s", "/%s"))
13382         pkt.Reply(NO_LENGTH_CHECK, [
13383                 rec( 8, 4, SequenceNumber ),
13384                 rec( 12, 4, DirectoryBase ),
13385                 rec( 16, 4, ScanItems, var="x" ),
13386                 srec(ScanInfoFileName, req_cond="ncp.ctrl_flags==0x0001", repeat="x" ),
13387                 srec(ScanInfoFileNoName, req_cond="ncp.ctrl_flags==0x0000", repeat="x" ),
13388         ])
13389         pkt.ReqCondSizeVariable()
13390         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13391                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13392                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
13393         # 2222/572A, 87/42
13394         pkt = NCP(0x572A, "Purge Salvageable File List", 'file', has_length=0)
13395         pkt.Request(28, [
13396                 rec( 8, 1, NameSpace ),
13397                 rec( 9, 1, Reserved ),
13398                 rec( 10, 2, PurgeFlags ),
13399                 rec( 12, 4, VolumeNumberLong ),
13400                 rec( 16, 4, DirectoryBase ),
13401                 rec( 20, 4, PurgeCount, var="x" ),
13402                 rec( 24, 4, PurgeList, repeat="x" ),
13403         ])
13404         pkt.Reply(16, [
13405                 rec( 8, 4, PurgeCount, var="x" ),
13406                 rec( 12, 4, PurgeCcode, repeat="x" ),
13407         ])
13408         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13409                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13410                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
13411         # 2222/572B, 87/43
13412         pkt = NCP(0x572B, "Revoke File Handle Rights", 'file', has_length=0)
13413         pkt.Request(17, [
13414                 rec( 8, 3, Reserved3 ),
13415                 rec( 11, 1, RevQueryFlag ),
13416                 rec( 12, 4, FileHandle ),
13417                 rec( 16, 1, RemoveOpenRights ),
13418         ])
13419         pkt.Reply(13, [
13420                 rec( 8, 4, FileHandle ),
13421                 rec( 12, 1, OpenRights ),
13422         ])
13423         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13424                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13425                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
13426         # 2222/572C, 87/44
13427         pkt = NCP(0x572C, "Update File Handle Rights", 'file', has_length=0)
13428         pkt.Request(24, [
13429                 rec( 8, 2, Reserved2 ),
13430                 rec( 10, 1, VolumeNumber ),
13431                 rec( 11, 1, NameSpace ),
13432                 rec( 12, 4, DirectoryNumber ),
13433                 rec( 16, 2, AccessRightsMaskWord ),
13434                 rec( 18, 2, NewAccessRights ),
13435                 rec( 20, 4, FileHandle, BE ),
13436         ])
13437         pkt.Reply(16, [
13438                 rec( 8, 4, FileHandle, BE ),
13439                 rec( 12, 4, EffectiveRights, LE ),
13440         ])
13441         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13442                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13443                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
13444         # 2222/5740, 87/64
13445         pkt = NCP(0x5740, "Read from File", 'file', has_length=0)
13446         pkt.Request(22, [
13447         rec( 8, 4, FileHandle, BE ),
13448         rec( 12, 8, StartOffset64bit, BE ),
13449         rec( 20, 2, NumBytes, BE ),
13450     ])
13451         pkt.Reply(10, [
13452         rec( 8, 2, NumBytes, BE),
13453     ])
13454         pkt.CompletionCodes([0x0000, 0x8300, 0x8800, 0x9300, 0x9500, 0xa201, 0xfd00, 0xff1b])
13455         # 2222/5741, 87/65
13456         pkt = NCP(0x5741, "Write to File", 'file', has_length=0)
13457         pkt.Request(22, [
13458         rec( 8, 4, FileHandle, BE ),
13459         rec( 12, 8, StartOffset64bit, BE ),
13460         rec( 20, 2, NumBytes, BE ),
13461     ])
13462         pkt.Reply(8)
13463         pkt.CompletionCodes([0x0000, 0x0102, 0x8300, 0x8800, 0x9400, 0x9500, 0xa201, 0xfd00, 0xff1b])
13464         # 2222/5742, 87/66
13465         pkt = NCP(0x5742, "Get Current Size of File", 'file', has_length=0)
13466         pkt.Request(12, [
13467         rec( 8, 4, FileHandle, BE ),
13468     ])
13469         pkt.Reply(16, [
13470         rec( 8, 8, FileSize64bit),
13471     ])
13472         pkt.CompletionCodes([0x0000, 0x7f00, 0x8800, 0x9600, 0xfd02, 0xff01])
13473         # 2222/5743, 87/67
13474         pkt = NCP(0x5743, "Log Physical Record", 'file', has_length=0)
13475         pkt.Request(36, [
13476         rec( 8, 4, LockFlag, BE ),
13477         rec(12, 4, FileHandle, BE ),
13478         rec(16, 8, StartOffset64bit, BE ),
13479         rec(24, 8, Length64bit, BE ),
13480         rec(32, 4, LockTimeout, BE),
13481     ])
13482         pkt.Reply(8)
13483         pkt.CompletionCodes([0x0000, 0x7f00, 0x8800, 0x9600, 0xfb08, 0xfd02, 0xff01])
13484         # 2222/5744, 87/68
13485         pkt = NCP(0x5744, "Release Physical Record", 'file', has_length=0)
13486         pkt.Request(28, [
13487         rec(8, 4, FileHandle, BE ),
13488         rec(12, 8, StartOffset64bit, BE ),
13489         rec(20, 8, Length64bit, BE ),
13490     ])
13491         pkt.Reply(8)
13492         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13493                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13494                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff1a])
13495         # 2222/5745, 87/69
13496         pkt = NCP(0x5745, "Clear Physical Record", 'file', has_length=0)
13497         pkt.Request(28, [
13498         rec(8, 4, FileHandle, BE ),
13499         rec(12, 8, StartOffset64bit, BE ),
13500         rec(20, 8, Length64bit, BE ),
13501     ])
13502         pkt.Reply(8)
13503         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13504                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13505                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff1a])
13506         # 2222/5801, 8801
13507         pkt = NCP(0x5801, "Query Volume Audit Status", "auditing", has_length=0)
13508         pkt.Request(12, [
13509                 rec( 8, 4, ConnectionNumber ),
13510         ])
13511         pkt.Reply(40, [
13512                 rec(8, 32, NWAuditStatus ),
13513         ])
13514         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13515                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13516                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13517         # 2222/5802, 8802
13518         pkt = NCP(0x5802, "Add User Audit Property", "auditing", has_length=0)
13519         pkt.Request(25, [
13520                 rec(8, 4, AuditIDType ),
13521                 rec(12, 4, AuditID ),
13522                 rec(16, 4, AuditHandle ),
13523                 rec(20, 4, ObjectID ),
13524                 rec(24, 1, AuditFlag ),
13525         ])
13526         pkt.Reply(8)
13527         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13528                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13529                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13530         # 2222/5803, 8803
13531         pkt = NCP(0x5803, "Add Auditor Access", "auditing", has_length=0)
13532         pkt.Request(8)
13533         pkt.Reply(8)
13534         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13535                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13536                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xde00, 0xfd00, 0xff16])
13537         # 2222/5804, 8804
13538         pkt = NCP(0x5804, "Change Auditor Volume Password", "auditing", has_length=0)
13539         pkt.Request(8)
13540         pkt.Reply(8)
13541         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13542                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13543                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13544         # 2222/5805, 8805
13545         pkt = NCP(0x5805, "Check Auditor Access", "auditing", has_length=0)
13546         pkt.Request(8)
13547         pkt.Reply(8)
13548         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13549                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13550                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13551         # 2222/5806, 8806
13552         pkt = NCP(0x5806, "Delete User Audit Property", "auditing", has_length=0)
13553         pkt.Request(8)
13554         pkt.Reply(8)
13555         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13556                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13557                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff21])
13558         # 2222/5807, 8807
13559         pkt = NCP(0x5807, "Disable Auditing On A Volume", "auditing", has_length=0)
13560         pkt.Request(8)
13561         pkt.Reply(8)
13562         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13563                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13564                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13565         # 2222/5808, 8808
13566         pkt = NCP(0x5808, "Enable Auditing On A Volume", "auditing", has_length=0)
13567         pkt.Request(8)
13568         pkt.Reply(8)
13569         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13570                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13571                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xde00, 0xfd00, 0xff16])
13572         # 2222/5809, 8809
13573         pkt = NCP(0x5809, "Query User Being Audited", "auditing", has_length=0)
13574         pkt.Request(8)
13575         pkt.Reply(8)
13576         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13577                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13578                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13579         # 2222/580A, 88,10
13580         pkt = NCP(0x580A, "Read Audit Bit Map", "auditing", has_length=0)
13581         pkt.Request(8)
13582         pkt.Reply(8)
13583         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13584                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13585                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13586         # 2222/580B, 88,11
13587         pkt = NCP(0x580B, "Read Audit File Configuration Header", "auditing", has_length=0)
13588         pkt.Request(8)
13589         pkt.Reply(8)
13590         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13591                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13592                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13593         # 2222/580D, 88,13
13594         pkt = NCP(0x580D, "Remove Auditor Access", "auditing", has_length=0)
13595         pkt.Request(8)
13596         pkt.Reply(8)
13597         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13598                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13599                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13600         # 2222/580E, 88,14
13601         pkt = NCP(0x580E, "Reset Audit File", "auditing", has_length=0)
13602         pkt.Request(8)
13603         pkt.Reply(8)
13604         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13605                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13606                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13607
13608         # 2222/580F, 88,15
13609         pkt = NCP(0x580F, "Auditing NCP", "auditing", has_length=0)
13610         pkt.Request(8)
13611         pkt.Reply(8)
13612         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13613                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13614                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfb00, 0xfd00, 0xff16])
13615         # 2222/5810, 88,16
13616         pkt = NCP(0x5810, "Write Audit Bit Map", "auditing", has_length=0)
13617         pkt.Request(8)
13618         pkt.Reply(8)
13619         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13620                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13621                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13622         # 2222/5811, 88,17
13623         pkt = NCP(0x5811, "Write Audit File Configuration Header", "auditing", has_length=0)
13624         pkt.Request(8)
13625         pkt.Reply(8)
13626         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13627                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13628                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13629         # 2222/5812, 88,18
13630         pkt = NCP(0x5812, "Change Auditor Volume Password2", "auditing", has_length=0)
13631         pkt.Request(8)
13632         pkt.Reply(8)
13633         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13634                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13635                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13636         # 2222/5813, 88,19
13637         pkt = NCP(0x5813, "Return Audit Flags", "auditing", has_length=0)
13638         pkt.Request(8)
13639         pkt.Reply(8)
13640         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13641                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13642                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13643         # 2222/5814, 88,20
13644         pkt = NCP(0x5814, "Close Old Audit File", "auditing", has_length=0)
13645         pkt.Request(8)
13646         pkt.Reply(8)
13647         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13648                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13649                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13650         # 2222/5816, 88,22
13651         pkt = NCP(0x5816, "Check Level Two Access", "auditing", has_length=0)
13652         pkt.Request(8)
13653         pkt.Reply(8)
13654         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13655                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13656                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xde00, 0xfd00, 0xff16])
13657         # 2222/5817, 88,23
13658         pkt = NCP(0x5817, "Return Old Audit File List", "auditing", has_length=0)
13659         pkt.Request(8)
13660         pkt.Reply(8)
13661         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13662                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13663                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13664         # 2222/5818, 88,24
13665         pkt = NCP(0x5818, "Init Audit File Reads", "auditing", has_length=0)
13666         pkt.Request(8)
13667         pkt.Reply(8)
13668         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13669                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13670                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13671         # 2222/5819, 88,25
13672         pkt = NCP(0x5819, "Read Auditing File", "auditing", has_length=0)
13673         pkt.Request(8)
13674         pkt.Reply(8)
13675         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13676                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13677                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13678         # 2222/581A, 88,26
13679         pkt = NCP(0x581A, "Delete Old Audit File", "auditing", has_length=0)
13680         pkt.Request(8)
13681         pkt.Reply(8)
13682         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13683                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13684                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13685         # 2222/581E, 88,30
13686         pkt = NCP(0x581E, "Restart Volume auditing", "auditing", has_length=0)
13687         pkt.Request(8)
13688         pkt.Reply(8)
13689         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13690                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13691                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13692         # 2222/581F, 88,31
13693         pkt = NCP(0x581F, "Set Volume Password", "auditing", has_length=0)
13694         pkt.Request(8)
13695         pkt.Reply(8)
13696         pkt.CompletionCodes([0x0000, 0x0106, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13697                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13698                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa700, 0xa801, 0xbe00, 0xfd00, 0xff16])
13699         # 2222/5901, 89,01
13700         pkt = NCP(0x5901, "Open/Create File or Subdirectory", "enhanced", has_length=0)
13701         pkt.Request((37,290), [
13702                 rec( 8, 1, NameSpace  ),
13703                 rec( 9, 1, OpenCreateMode ),
13704                 rec( 10, 2, SearchAttributesLow ),
13705                 rec( 12, 2, ReturnInfoMask ),
13706                 rec( 14, 2, ExtendedInfo ),
13707                 rec( 16, 4, AttributesDef32 ),
13708                 rec( 20, 2, DesiredAccessRights ),
13709                 rec( 22, 4, DirectoryBase ),
13710                 rec( 26, 1, VolumeNumber ),
13711                 rec( 27, 1, HandleFlag ),
13712                 rec( 28, 1, DataTypeFlag ),
13713                 rec( 29, 5, Reserved5 ),
13714                 rec( 34, 1, PathCount, var="x" ),
13715                 rec( 35, (2,255), Path16, repeat="x" ),
13716         ], info_str=(Path16, "Open or Create File or Subdirectory: %s", "/%s"))
13717         pkt.Reply( NO_LENGTH_CHECK, [
13718                 rec( 8, 4, FileHandle, BE ),
13719                 rec( 12, 1, OpenCreateAction ),
13720                 rec( 13, 1, Reserved ),
13721                         srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
13722                         srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
13723                         srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
13724                         srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
13725                         srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
13726                         srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
13727                         srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
13728                         srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
13729                         srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
13730                         srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
13731                         srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
13732                         srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
13733                         srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
13734                         srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
13735                         srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
13736                         srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
13737                         srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
13738                         srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
13739                         srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
13740                         srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
13741                         srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
13742                         srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
13743                         srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
13744                         srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
13745                         srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
13746                         srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
13747                         srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
13748                         srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
13749                         srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
13750                         srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
13751                         srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
13752                         srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
13753                         srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
13754                         srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
13755                         srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
13756                         srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
13757                         srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
13758                         srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
13759                         srec( DOSName16Struct, req_cond="ncp.ext_info_dos_name == 1" ),
13760                         srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
13761                         srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
13762                         srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
13763                         srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
13764                         srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
13765                         srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
13766                         srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
13767                         srec( FileSize64bitStruct, req_cond="ncp.ext_info_64_bit_fs == 1" ),
13768                         srec( FileName16Struct, req_cond="ncp.ret_info_mask_fname == 1" ),
13769         ])
13770         pkt.ReqCondSizeVariable()
13771         pkt.CompletionCodes([0x0000, 0x0102, 0x7f00, 0x8000, 0x8101, 0x8401, 0x8501,
13772                                                 0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13773                                                 0x9804, 0x9900, 0x9b03, 0x9c03, 0xa901, 0xa500, 0xaa00, 0xbf00, 0xfd00, 0xff16])
13774         # 2222/5902, 89/02
13775         pkt = NCP(0x5902, "Initialize Search", 'enhanced', has_length=0)
13776         pkt.Request( (25,278), [
13777                 rec( 8, 1, NameSpace  ),
13778                 rec( 9, 1, Reserved ),
13779                 rec( 10, 4, DirectoryBase ),
13780                 rec( 14, 1, VolumeNumber ),
13781                 rec( 15, 1, HandleFlag ),
13782         rec( 16, 1, DataTypeFlag ),
13783         rec( 17, 5, Reserved5 ),
13784                 rec( 22, 1, PathCount, var="x" ),
13785                 rec( 23, (2,255), Path16, repeat="x" ),
13786         ], info_str=(Path16, "Set Search Pointer to: %s", "/%s"))
13787         pkt.Reply(17, [
13788                 rec( 8, 1, VolumeNumber ),
13789                 rec( 9, 4, DirectoryNumber ),
13790                 rec( 13, 4, DirectoryEntryNumber ),
13791         ])
13792         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13793                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13794                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
13795         # 2222/5903, 89/03
13796         pkt = NCP(0x5903, "Search for File or Subdirectory", 'enhanced', has_length=0)
13797         pkt.Request((28, 281), [
13798                 rec( 8, 1, NameSpace  ),
13799                 rec( 9, 1, DataStream ),
13800                 rec( 10, 2, SearchAttributesLow ),
13801                 rec( 12, 2, ReturnInfoMask ),
13802                 rec( 14, 2, ExtendedInfo ),
13803                 rec( 16, 9, SeachSequenceStruct ),
13804         rec( 25, 1, DataTypeFlag ),
13805                 rec( 26, (2,255), SearchPattern16 ),
13806         ], info_str=(SearchPattern16, "Search for: %s", "/%s"))
13807         pkt.Reply( NO_LENGTH_CHECK, [
13808                 rec( 8, 9, SeachSequenceStruct ),
13809                 rec( 17, 1, Reserved ),
13810                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
13811                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
13812                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
13813                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
13814                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
13815                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
13816                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
13817                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
13818                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
13819                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
13820                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
13821                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
13822                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
13823                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
13824                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
13825                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
13826                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
13827                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
13828                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
13829                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
13830                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
13831                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
13832                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
13833                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
13834                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
13835                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
13836                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
13837                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
13838                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
13839                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
13840                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
13841                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
13842                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
13843                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
13844                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
13845                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
13846                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
13847                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
13848                 srec( DOSName16Struct, req_cond="ncp.ext_info_dos_name == 1" ),
13849                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
13850                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
13851                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
13852                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
13853                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
13854                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
13855                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
13856                 srec( FileSize64bitStruct, req_cond="ncp.ext_info_64_bit_fs == 1" ),
13857                 srec( FileName16Struct, req_cond="ncp.ret_info_mask_fname == 1" ),
13858         ])
13859         pkt.ReqCondSizeVariable()
13860         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13861                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13862                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
13863         # 2222/5904, 89/04
13864         pkt = NCP(0x5904, "Rename Or Move a File or Subdirectory", 'enhanced', has_length=0)
13865         pkt.Request((42, 548), [
13866                 rec( 8, 1, NameSpace  ),
13867                 rec( 9, 1, RenameFlag ),
13868                 rec( 10, 2, SearchAttributesLow ),
13869         rec( 12, 12, SrcEnhNWHandlePathS1 ),
13870                 rec( 24, 1, PathCount, var="x" ),
13871                 rec( 25, 12, DstEnhNWHandlePathS1 ),
13872                 rec( 37, 1, PathCount, var="y" ),
13873                 rec( 38, (2, 255), Path16, repeat="x" ),
13874                 rec( -1, (2,255), DestPath16, repeat="y" ),
13875         ], info_str=(Path16, "Rename or Move: %s", "/%s"))
13876         pkt.Reply(8)
13877         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
13878                              0x8701, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9200, 0x9600,
13879                              0x9804, 0x9a00, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
13880         # 2222/5905, 89/05
13881         pkt = NCP(0x5905, "Scan File or Subdirectory for Trustees", 'enhanced', has_length=0)
13882         pkt.Request((31, 284), [
13883                 rec( 8, 1, NameSpace  ),
13884                 rec( 9, 1, MaxReplyObjectIDCount ),
13885                 rec( 10, 2, SearchAttributesLow ),
13886                 rec( 12, 4, SequenceNumber ),
13887                 rec( 16, 4, DirectoryBase ),
13888                 rec( 20, 1, VolumeNumber ),
13889                 rec( 21, 1, HandleFlag ),
13890         rec( 22, 1, DataTypeFlag ),
13891         rec( 23, 5, Reserved5 ),
13892                 rec( 28, 1, PathCount, var="x" ),
13893                 rec( 29, (2, 255), Path16, repeat="x" ),
13894         ], info_str=(Path16, "Scan Trustees for: %s", "/%s"))
13895         pkt.Reply(20, [
13896                 rec( 8, 4, SequenceNumber ),
13897                 rec( 12, 2, ObjectIDCount, var="x" ),
13898                 rec( 14, 6, TrusteeStruct, repeat="x" ),
13899         ])
13900         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13901                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
13902                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
13903         # 2222/5906, 89/06
13904         pkt = NCP(0x5906, "Obtain File or SubDirectory Information", 'enhanced', has_length=0)
13905         pkt.Request((22), [
13906                 rec( 8, 1, SrcNameSpace ),
13907                 rec( 9, 1, DestNameSpace ),
13908                 rec( 10, 2, SearchAttributesLow ),
13909                 rec( 12, 2, ReturnInfoMask, LE ),
13910                 rec( 14, 2, ExtendedInfo ),
13911                 rec( 16, 4, DirectoryBase ),
13912                 rec( 20, 1, VolumeNumber ),
13913                 rec( 21, 1, HandleFlag ),
13914         #
13915         # Move to packet-ncp2222.inc
13916         # The datatype flag indicates if the path is represented as ASCII or UTF8
13917         # ASCII has a 1 byte count field whereas UTF8 has a two byte count field.
13918         #
13919         #rec( 22, 1, DataTypeFlag ),
13920         #rec( 23, 5, Reserved5 ),
13921                 #rec( 28, 1, PathCount, var="x" ),
13922                 #rec( 29, (2,255), Path16, repeat="x",),
13923         ], info_str=(Path16, "Obtain Info for: %s", "/%s"))
13924         pkt.Reply(NO_LENGTH_CHECK, [
13925             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
13926             srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
13927             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
13928             srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
13929             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
13930             srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
13931             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
13932             srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
13933             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
13934             srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
13935             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
13936             srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
13937             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
13938             srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
13939             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
13940             srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
13941             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
13942             srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
13943             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
13944             srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
13945             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
13946             srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
13947             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
13948             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
13949             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
13950             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
13951             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
13952             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
13953             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
13954             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
13955             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
13956             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
13957             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
13958             srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
13959             srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
13960             srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
13961             srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
13962             srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
13963             srec( DOSName16Struct, req_cond="ncp.ext_info_dos_name == 1" ),
13964             srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
13965             srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
13966             srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
13967             srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
13968             srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
13969             srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
13970             srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
13971             srec( FileSize64bitStruct, req_cond="ncp.ext_info_64_bit_fs == 1" ),
13972             srec( FileName16Struct, req_cond="ncp.ret_info_mask_fname == 1" ),
13973         ])
13974         pkt.ReqCondSizeVariable()
13975         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
13976                              0x8700, 0x8900, 0x8d00, 0x8f00, 0x9001, 0x9600,
13977                              0x9804, 0x9b03, 0x9c03, 0xa802, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
13978         # 2222/5907, 89/07
13979         pkt = NCP(0x5907, "Modify File or Subdirectory DOS Information", 'enhanced', has_length=0)
13980         pkt.Request((69,322), [
13981                 rec( 8, 1, NameSpace ),
13982                 rec( 9, 1, Reserved ),
13983                 rec( 10, 2, SearchAttributesLow ),
13984                 rec( 12, 2, ModifyDOSInfoMask ),
13985                 rec( 14, 2, Reserved2 ),
13986                 rec( 16, 2, AttributesDef16 ),
13987                 rec( 18, 1, FileMode ),
13988                 rec( 19, 1, FileExtendedAttributes ),
13989                 rec( 20, 2, CreationDate ),
13990                 rec( 22, 2, CreationTime ),
13991                 rec( 24, 4, CreatorID, BE ),
13992                 rec( 28, 2, ModifiedDate ),
13993                 rec( 30, 2, ModifiedTime ),
13994                 rec( 32, 4, ModifierID, BE ),
13995                 rec( 36, 2, ArchivedDate ),
13996                 rec( 38, 2, ArchivedTime ),
13997                 rec( 40, 4, ArchiverID, BE ),
13998                 rec( 44, 2, LastAccessedDate ),
13999                 rec( 46, 2, InheritedRightsMask ),
14000                 rec( 48, 2, InheritanceRevokeMask ),
14001                 rec( 50, 4, MaxSpace ),
14002                 rec( 54, 4, DirectoryBase ),
14003                 rec( 58, 1, VolumeNumber ),
14004                 rec( 59, 1, HandleFlag ),
14005         rec( 60, 1, DataTypeFlag ),
14006         rec( 61, 5, Reserved5 ),
14007                 rec( 66, 1, PathCount, var="x" ),
14008                 rec( 67, (2,255), Path16, repeat="x" ),
14009         ], info_str=(Path16, "Modify DOS Information for: %s", "/%s"))
14010         pkt.Reply(8)
14011         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
14012                              0x8701, 0x8c01, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9600,
14013                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14014         # 2222/5908, 89/08
14015         pkt = NCP(0x5908, "Delete a File or Subdirectory", 'enhanced', has_length=0)
14016         pkt.Request((27,280), [
14017                 rec( 8, 1, NameSpace ),
14018                 rec( 9, 1, Reserved ),
14019                 rec( 10, 2, SearchAttributesLow ),
14020                 rec( 12, 4, DirectoryBase ),
14021                 rec( 16, 1, VolumeNumber ),
14022                 rec( 17, 1, HandleFlag ),
14023         rec( 18, 1, DataTypeFlag ),
14024         rec( 19, 5, Reserved5 ),
14025                 rec( 24, 1, PathCount, var="x" ),
14026                 rec( 25, (2,255), Path16, repeat="x" ),
14027         ], info_str=(Path16, "Delete a File or Subdirectory: %s", "/%s"))
14028         pkt.Reply(8)
14029         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
14030                              0x8701, 0x8900, 0x8a00, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9600,
14031                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14032         # 2222/5909, 89/09
14033         pkt = NCP(0x5909, "Set Short Directory Handle", 'enhanced', has_length=0)
14034         pkt.Request((27,280), [
14035                 rec( 8, 1, NameSpace ),
14036                 rec( 9, 1, DataStream ),
14037                 rec( 10, 1, DestDirHandle ),
14038                 rec( 11, 1, Reserved ),
14039                 rec( 12, 4, DirectoryBase ),
14040                 rec( 16, 1, VolumeNumber ),
14041                 rec( 17, 1, HandleFlag ),
14042         rec( 18, 1, DataTypeFlag ),
14043         rec( 19, 5, Reserved5 ),
14044                 rec( 24, 1, PathCount, var="x" ),
14045                 rec( 25, (2,255), Path16, repeat="x" ),
14046         ], info_str=(Path16, "Set Short Directory Handle to: %s", "/%s"))
14047         pkt.Reply(8)
14048         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
14049                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14050                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14051         # 2222/590A, 89/10
14052         pkt = NCP(0x590A, "Add Trustee Set to File or Subdirectory", 'enhanced', has_length=0)
14053         pkt.Request((37,290), [
14054                 rec( 8, 1, NameSpace ),
14055                 rec( 9, 1, Reserved ),
14056                 rec( 10, 2, SearchAttributesLow ),
14057                 rec( 12, 2, AccessRightsMaskWord ),
14058                 rec( 14, 2, ObjectIDCount, var="y" ),
14059                 rec( -1, 6, TrusteeStruct, repeat="y" ),
14060                 rec( -1, 4, DirectoryBase ),
14061                 rec( -1, 1, VolumeNumber ),
14062                 rec( -1, 1, HandleFlag ),
14063         rec( -1, 1, DataTypeFlag ),
14064         rec( -1, 5, Reserved5 ),
14065                 rec( -1, 1, PathCount, var="x" ),
14066                 rec( -1, (2,255), Path16, repeat="x" ),
14067         ], info_str=(Path16, "Add Trustee Set to: %s", "/%s"))
14068         pkt.Reply(8)
14069         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
14070                              0x8701, 0x8c01, 0x8d00, 0x8f00, 0x9001, 0x9600,
14071                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfc01, 0xfd00, 0xff16])
14072         # 2222/590B, 89/11
14073         pkt = NCP(0x590B, "Delete Trustee Set from File or SubDirectory", 'enhanced', has_length=0)
14074         pkt.Request((34,287), [
14075                 rec( 8, 1, NameSpace ),
14076                 rec( 9, 1, Reserved ),
14077                 rec( 10, 2, ObjectIDCount, var="y" ),
14078                 rec( 12, 7, TrusteeStruct, repeat="y" ),
14079                 rec( 19, 4, DirectoryBase ),
14080                 rec( 23, 1, VolumeNumber ),
14081                 rec( 24, 1, HandleFlag ),
14082         rec( 25, 1, DataTypeFlag ),
14083         rec( 26, 5, Reserved5 ),
14084                 rec( 31, 1, PathCount, var="x" ),
14085                 rec( 32, (2,255), Path16, repeat="x" ),
14086         ], info_str=(Path16, "Delete Trustee Set from: %s", "/%s"))
14087         pkt.Reply(8)
14088         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
14089                              0x8701, 0x8c01, 0x8d00, 0x8f00, 0x9001, 0x9600,
14090                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14091         # 2222/590C, 89/12
14092         pkt = NCP(0x590C, "Allocate Short Directory Handle", 'enhanced', has_length=0)
14093         pkt.Request((27,280), [
14094                 rec( 8, 1, NameSpace ),
14095                 rec( 9, 1, DestNameSpace ),
14096                 rec( 10, 2, AllocateMode ),
14097                 rec( 12, 4, DirectoryBase ),
14098                 rec( 16, 1, VolumeNumber ),
14099                 rec( 17, 1, HandleFlag ),
14100         rec( 18, 1, DataTypeFlag ),
14101         rec( 19, 5, Reserved5 ),
14102                 rec( 24, 1, PathCount, var="x" ),
14103                 rec( 25, (2,255), Path16, repeat="x" ),
14104         ], info_str=(Path16, "Allocate Short Directory Handle to: %s", "/%s"))
14105         pkt.Reply(NO_LENGTH_CHECK, [
14106         srec( ReplyLevel2Struct, req_cond="ncp.alloc_reply_lvl2 == TRUE" ),
14107                 srec( ReplyLevel1Struct, req_cond="ncp.alloc_reply_lvl2 == FALSE" ),
14108         ])
14109         pkt.ReqCondSizeVariable()
14110         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
14111                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14112                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14113     # 2222/5910, 89/16
14114         pkt = NCP(0x5910, "Scan Salvageable Files", 'enhanced', has_length=0)
14115         pkt.Request((33,286), [
14116                 rec( 8, 1, NameSpace ),
14117                 rec( 9, 1, DataStream ),
14118                 rec( 10, 2, ReturnInfoMask ),
14119                 rec( 12, 2, ExtendedInfo ),
14120                 rec( 14, 4, SequenceNumber ),
14121                 rec( 18, 4, DirectoryBase ),
14122                 rec( 22, 1, VolumeNumber ),
14123                 rec( 23, 1, HandleFlag ),
14124         rec( 24, 1, DataTypeFlag ),
14125         rec( 25, 5, Reserved5 ),
14126                 rec( 30, 1, PathCount, var="x" ),
14127                 rec( 31, (2,255), Path16, repeat="x" ),
14128         ], info_str=(Path16, "Scan for Deleted Files in: %s", "/%s"))
14129         pkt.Reply(NO_LENGTH_CHECK, [
14130                 rec( 8, 4, SequenceNumber ),
14131                 rec( 12, 2, DeletedTime ),
14132                 rec( 14, 2, DeletedDate ),
14133                 rec( 16, 4, DeletedID, BE ),
14134                 rec( 20, 4, VolumeID ),
14135                 rec( 24, 4, DirectoryBase ),
14136                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
14137                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
14138                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
14139                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
14140                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
14141                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
14142                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
14143                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
14144                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
14145                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
14146                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
14147                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
14148                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
14149                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
14150                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
14151                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
14152                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
14153                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
14154                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
14155                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
14156                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
14157                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
14158                 srec( FileName16Struct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
14159                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
14160                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
14161                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
14162                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
14163                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
14164                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
14165                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
14166                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
14167                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
14168                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
14169                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
14170                 srec( FileSize64bitStruct, req_cond="ncp.ext_info_64_bit_fs == 1" ),
14171                 srec( FileName16Struct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
14172         ])
14173         pkt.ReqCondSizeVariable()
14174         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
14175                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14176                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14177         # 2222/5911, 89/17
14178         pkt = NCP(0x5911, "Recover Salvageable File", 'enhanced', has_length=0)
14179         pkt.Request((24,278), [
14180                 rec( 8, 1, NameSpace ),
14181                 rec( 9, 1, Reserved ),
14182                 rec( 10, 4, SequenceNumber ),
14183                 rec( 14, 4, VolumeID ),
14184                 rec( 18, 4, DirectoryBase ),
14185         rec( 22, 1, DataTypeFlag ),
14186                 rec( 23, (1,255), FileName ),
14187         ], info_str=(FileName, "Recover Deleted File: %s", ", %s"))
14188         pkt.Reply(8)
14189         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
14190                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14191                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14192         # 2222/5913, 89/19
14193         pkt = NCP(0x5913, "Get Name Space Information", 'enhanced', has_length=0)
14194         pkt.Request(18, [
14195                 rec( 8, 1, SrcNameSpace ),
14196                 rec( 9, 1, DestNameSpace ),
14197                 rec( 10, 1, DataTypeFlag ),
14198                 rec( 11, 1, VolumeNumber ),
14199                 rec( 12, 4, DirectoryBase ),
14200                 rec( 16, 2, NamesSpaceInfoMask ),
14201         ])
14202         pkt.Reply(NO_LENGTH_CHECK, [
14203             srec( FileName16Struct, req_cond="ncp.ns_info_mask_modify == TRUE" ),
14204             srec( FileAttributesStruct, req_cond="ncp.ns_info_mask_fatt == TRUE" ),
14205             srec( CreationDateStruct, req_cond="ncp.ns_info_mask_cdate == TRUE" ),
14206             srec( CreationTimeStruct, req_cond="ncp.ns_info_mask_ctime == TRUE" ),
14207             srec( OwnerIDStruct, req_cond="ncp.ns_info_mask_owner == TRUE" ),
14208             srec( ArchiveDateStruct, req_cond="ncp.ns_info_mask_adate == TRUE" ),
14209             srec( ArchiveTimeStruct, req_cond="ncp.ns_info_mask_atime == TRUE" ),
14210             srec( ArchiveIdStruct, req_cond="ncp.ns_info_mask_aid == TRUE" ),
14211             srec( UpdateDateStruct, req_cond="ncp.ns_info_mask_udate == TRUE" ),
14212             srec( UpdateTimeStruct, req_cond="ncp.ns_info_mask_utime == TRUE" ),
14213             srec( UpdateIDStruct, req_cond="ncp.ns_info_mask_uid == TRUE" ),
14214             srec( LastAccessStruct, req_cond="ncp.ns_info_mask_acc_date == TRUE" ),
14215             srec( RightsInfoStruct, req_cond="ncp.ns_info_mask_max_acc_mask == TRUE" ),
14216         ])
14217         pkt.ReqCondSizeVariable()
14218         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
14219                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14220                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14221         # 2222/5914, 89/20
14222         pkt = NCP(0x5914, "Search for File or Subdirectory Set", 'enhanced', has_length=0)
14223         pkt.Request((30, 283), [
14224                 rec( 8, 1, NameSpace  ),
14225                 rec( 9, 1, DataStream ),
14226                 rec( 10, 2, SearchAttributesLow ),
14227                 rec( 12, 2, ReturnInfoMask ),
14228                 rec( 14, 2, ExtendedInfo ),
14229                 rec( 16, 2, ReturnInfoCount ),
14230                 rec( 18, 9, SeachSequenceStruct ),
14231         rec( 27, 1, DataTypeFlag ),
14232                 rec( 28, (2,255), SearchPattern16 ),
14233         ])
14234     # The reply packet is dissected in packet-ncp2222.inc
14235         pkt.Reply(NO_LENGTH_CHECK, [
14236         ])
14237         pkt.ReqCondSizeVariable()
14238         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
14239                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14240                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14241         # 2222/5916, 89/22
14242         pkt = NCP(0x5916, "Generate Directory Base and Volume Number", 'enhanced', has_length=0)
14243         pkt.Request((27,280), [
14244                 rec( 8, 1, SrcNameSpace ),
14245                 rec( 9, 1, DestNameSpace ),
14246                 rec( 10, 2, dstNSIndicator ),
14247                 rec( 12, 4, DirectoryBase ),
14248                 rec( 16, 1, VolumeNumber ),
14249                 rec( 17, 1, HandleFlag ),
14250         rec( 18, 1, DataTypeFlag ),
14251         rec( 19, 5, Reserved5 ),
14252                 rec( 24, 1, PathCount, var="x" ),
14253                 rec( 25, (2,255), Path16, repeat="x" ),
14254         ], info_str=(Path16, "Get Volume and Directory Base from: %s", "/%s"))
14255         pkt.Reply(17, [
14256                 rec( 8, 4, DirectoryBase ),
14257                 rec( 12, 4, DOSDirectoryBase ),
14258                 rec( 16, 1, VolumeNumber ),
14259         ])
14260         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
14261                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14262                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14263         # 2222/5919, 89/25
14264         pkt = NCP(0x5919, "Set Name Space Information", 'enhanced', has_length=0)
14265         pkt.Request(530, [
14266                 rec( 8, 1, SrcNameSpace ),
14267                 rec( 9, 1, DestNameSpace ),
14268                 rec( 10, 1, VolumeNumber ),
14269                 rec( 11, 4, DirectoryBase ),
14270                 rec( 15, 2, NamesSpaceInfoMask ),
14271         rec( 17, 1, DataTypeFlag ),
14272                 rec( 18, 512, NSSpecificInfo ),
14273         ])
14274         pkt.Reply(8)
14275         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
14276                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
14277                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00,
14278                              0xff16])
14279         # 2222/591C, 89/28
14280         pkt = NCP(0x591C, "Get Full Path String", 'enhanced', has_length=0)
14281         pkt.Request((35,288), [
14282                 rec( 8, 1, SrcNameSpace ),
14283                 rec( 9, 1, DestNameSpace ),
14284                 rec( 10, 2, PathCookieFlags ),
14285                 rec( 12, 4, Cookie1 ),
14286                 rec( 16, 4, Cookie2 ),
14287                 rec( 20, 4, DirectoryBase ),
14288                 rec( 24, 1, VolumeNumber ),
14289                 rec( 25, 1, HandleFlag ),
14290         rec( 26, 1, DataTypeFlag ),
14291         rec( 27, 5, Reserved5 ),
14292                 rec( 32, 1, PathCount, var="x" ),
14293                 rec( 33, (2,255), Path16, repeat="x" ),
14294         ], info_str=(Path16, "Get Full Path from: %s", "/%s"))
14295         pkt.Reply((24,277), [
14296                 rec( 8, 2, PathCookieFlags ),
14297                 rec( 10, 4, Cookie1 ),
14298                 rec( 14, 4, Cookie2 ),
14299                 rec( 18, 2, PathComponentSize ),
14300                 rec( 20, 2, PathComponentCount, var='x' ),
14301                 rec( 22, (2,255), Path16, repeat='x' ),
14302         ])
14303         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
14304                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
14305                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00,
14306                              0xff16])
14307         # 2222/591D, 89/29
14308         pkt = NCP(0x591D, "Get Effective Directory Rights", 'enhanced', has_length=0)
14309         pkt.Request((31, 284), [
14310                 rec( 8, 1, NameSpace  ),
14311                 rec( 9, 1, DestNameSpace ),
14312                 rec( 10, 2, SearchAttributesLow ),
14313                 rec( 12, 2, ReturnInfoMask ),
14314                 rec( 14, 2, ExtendedInfo ),
14315                 rec( 16, 4, DirectoryBase ),
14316                 rec( 20, 1, VolumeNumber ),
14317                 rec( 21, 1, HandleFlag ),
14318         rec( 22, 1, DataTypeFlag ),
14319         rec( 23, 5, Reserved5 ),
14320                 rec( 28, 1, PathCount, var="x" ),
14321                 rec( 29, (2,255), Path16, repeat="x" ),
14322         ], info_str=(Path16, "Get Effective Rights for: %s", "/%s"))
14323         pkt.Reply(NO_LENGTH_CHECK, [
14324                 rec( 8, 2, EffectiveRights, LE ),
14325                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
14326                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
14327                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
14328                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
14329                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
14330                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
14331                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
14332                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
14333                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
14334                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
14335                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
14336                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
14337                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
14338                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
14339                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
14340                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
14341                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
14342                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
14343                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
14344                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
14345                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
14346                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
14347                 srec( FileName16Struct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
14348                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
14349                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
14350                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
14351                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
14352                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
14353                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
14354                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
14355                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
14356                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
14357                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
14358                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
14359                 srec( FileSize64bitStruct, req_cond="(ncp.ext_info_64_bit_fs == 1) && (ncp.ret_info_mask_fname == 1)" ),
14360                 srec( FileName16Struct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
14361         ])
14362         pkt.ReqCondSizeVariable()
14363         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
14364                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14365                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14366         # 2222/591E, 89/30
14367         pkt = NCP(0x591E, "Open/Create File or Subdirectory", 'enhanced', has_length=0)
14368         pkt.Request((41, 294), [
14369                 rec( 8, 1, NameSpace  ),
14370                 rec( 9, 1, DataStream ),
14371                 rec( 10, 1, OpenCreateMode ),
14372                 rec( 11, 1, Reserved ),
14373                 rec( 12, 2, SearchAttributesLow ),
14374                 rec( 14, 2, Reserved2 ),
14375                 rec( 16, 2, ReturnInfoMask ),
14376                 rec( 18, 2, ExtendedInfo ),
14377                 rec( 20, 4, AttributesDef32 ),
14378                 rec( 24, 2, DesiredAccessRights ),
14379                 rec( 26, 4, DirectoryBase ),
14380                 rec( 30, 1, VolumeNumber ),
14381                 rec( 31, 1, HandleFlag ),
14382         rec( 32, 1, DataTypeFlag ),
14383         rec( 33, 5, Reserved5 ),
14384                 rec( 38, 1, PathCount, var="x" ),
14385                 rec( 39, (2,255), Path16, repeat="x" ),
14386         ], info_str=(Path16, "Open or Create File: %s", "/%s"))
14387         pkt.Reply(NO_LENGTH_CHECK, [
14388                 rec( 8, 4, FileHandle, BE ),
14389                 rec( 12, 1, OpenCreateAction ),
14390                 rec( 13, 1, Reserved ),
14391                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
14392                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
14393                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
14394                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
14395                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
14396                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
14397                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
14398                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
14399                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
14400                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
14401                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
14402                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
14403                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
14404                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
14405                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
14406                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
14407                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
14408                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
14409                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
14410                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
14411                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
14412                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
14413                 srec( FileName16Struct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
14414                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
14415                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
14416                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
14417                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
14418                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
14419                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
14420                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
14421                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
14422                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
14423                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
14424                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
14425                 srec( FileSize64bitStruct, req_cond="(ncp.ext_info_64_bit_fs == 1) && (ncp.ret_info_mask_fname == 1)" ),
14426                 srec( FileName16Struct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
14427         ])
14428         pkt.ReqCondSizeVariable()
14429         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
14430                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14431                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14432         # 2222/5920, 89/32
14433         pkt = NCP(0x5920, "Open/Create File or Subdirectory with Callback", 'enhanced', has_length=0)
14434         pkt.Request((37, 290), [
14435                 rec( 8, 1, NameSpace  ),
14436                 rec( 9, 1, OpenCreateMode ),
14437                 rec( 10, 2, SearchAttributesLow ),
14438                 rec( 12, 2, ReturnInfoMask ),
14439                 rec( 14, 2, ExtendedInfo ),
14440                 rec( 16, 4, AttributesDef32 ),
14441                 rec( 20, 2, DesiredAccessRights ),
14442                 rec( 22, 4, DirectoryBase ),
14443                 rec( 26, 1, VolumeNumber ),
14444                 rec( 27, 1, HandleFlag ),
14445         rec( 28, 1, DataTypeFlag ),
14446         rec( 29, 5, Reserved5 ),
14447                 rec( 34, 1, PathCount, var="x" ),
14448                 rec( 35, (2,255), Path16, repeat="x" ),
14449         ], info_str=(Path16, "Open or Create with Op-Lock: %s", "/%s"))
14450         pkt.Reply( NO_LENGTH_CHECK, [
14451                 rec( 8, 4, FileHandle, BE ),
14452                 rec( 12, 1, OpenCreateAction ),
14453                 rec( 13, 1, OCRetFlags ),
14454                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
14455                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
14456                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
14457                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
14458                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
14459                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
14460                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
14461                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
14462                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
14463                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
14464                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
14465                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
14466                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
14467                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
14468                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
14469                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
14470                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
14471                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
14472                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
14473                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
14474                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
14475                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
14476                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
14477                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
14478                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
14479                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
14480                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
14481                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
14482                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
14483                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
14484                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
14485                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
14486                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
14487                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
14488                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
14489                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
14490                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
14491                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
14492                 srec( DOSName16Struct, req_cond="ncp.ext_info_dos_name == 1" ),
14493                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
14494                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
14495                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
14496                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
14497                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
14498                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
14499                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
14500                 srec( FileSize64bitStruct, req_cond="ncp.ext_info_64_bit_fs == 1" ),
14501                 srec( FileName16Struct, req_cond="ncp.ret_info_mask_fname == 1" ),
14502         ])
14503         pkt.ReqCondSizeVariable()
14504         pkt.CompletionCodes([0x0000, 0x0102, 0x7f00, 0x8000, 0x8101, 0x8401, 0x8501,
14505                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14506                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14507         # 2222/5921, 89/33
14508         pkt = NCP(0x5921, "Open/Create File or Subdirectory II with Callback", 'enhanced', has_length=0)
14509         pkt.Request((41, 294), [
14510                 rec( 8, 1, NameSpace  ),
14511                 rec( 9, 1, DataStream ),
14512                 rec( 10, 1, OpenCreateMode ),
14513                 rec( 11, 1, Reserved ),
14514                 rec( 12, 2, SearchAttributesLow ),
14515                 rec( 14, 2, Reserved2 ),
14516                 rec( 16, 2, ReturnInfoMask ),
14517                 rec( 18, 2, ExtendedInfo ),
14518                 rec( 20, 4, AttributesDef32 ),
14519                 rec( 24, 2, DesiredAccessRights ),
14520                 rec( 26, 4, DirectoryBase ),
14521                 rec( 30, 1, VolumeNumber ),
14522                 rec( 31, 1, HandleFlag ),
14523         rec( 32, 1, DataTypeFlag ),
14524         rec( 33, 5, Reserved5 ),
14525                 rec( 38, 1, PathCount, var="x" ),
14526                 rec( 39, (2,255), Path16, repeat="x" ),
14527         ], info_str=(Path16, "Open or Create II with Op-Lock: %s", "/%s"))
14528         pkt.Reply( NO_LENGTH_CHECK, [
14529                 rec( 8, 4, FileHandle ),
14530                 rec( 12, 1, OpenCreateAction ),
14531                 rec( 13, 1, OCRetFlags ),
14532                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
14533                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
14534                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
14535                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
14536                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
14537                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
14538                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
14539                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
14540                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
14541                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
14542                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
14543                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
14544                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
14545                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
14546                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
14547                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
14548                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
14549                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
14550                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
14551                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
14552                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
14553                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
14554                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
14555                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
14556                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
14557                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
14558                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
14559                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
14560                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
14561                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
14562                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
14563                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
14564                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
14565                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ),
14566                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
14567                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
14568                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
14569                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ),
14570                 srec( DOSName16Struct, req_cond="ncp.ext_info_dos_name == 1" ),
14571                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ),
14572                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ),
14573                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ),
14574                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ),
14575                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ),
14576                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
14577                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ),
14578                 srec( FileSize64bitStruct, req_cond="ncp.ext_info_64_bit_fs == 1" ),
14579                 srec( FileName16Struct, req_cond="ncp.ret_info_mask_fname == 1" ),
14580         ])
14581         pkt.ReqCondSizeVariable()
14582         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
14583                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14584                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14585         # 2222/5923, 89/35
14586         pkt = NCP(0x5923, "Modify DOS Attributes on a File or Subdirectory", 'enhanced', has_length=0)
14587         pkt.Request((35, 288), [
14588                 rec( 8, 1, NameSpace  ),
14589                 rec( 9, 1, Flags ),
14590                 rec( 10, 2, SearchAttributesLow ),
14591                 rec( 12, 2, ReturnInfoMask ),
14592                 rec( 14, 2, ExtendedInfo ),
14593                 rec( 16, 4, AttributesDef32 ),
14594                 rec( 20, 4, DirectoryBase ),
14595                 rec( 24, 1, VolumeNumber ),
14596                 rec( 25, 1, HandleFlag ),
14597         rec( 26, 1, DataTypeFlag ),
14598         rec( 27, 5, Reserved5 ),
14599                 rec( 32, 1, PathCount, var="x" ),
14600                 rec( 33, (2,255), Path16, repeat="x" ),
14601         ], info_str=(Path16, "Modify DOS Attributes for: %s", "/%s"))
14602         pkt.Reply(24, [
14603                 rec( 8, 4, ItemsChecked ),
14604                 rec( 12, 4, ItemsChanged ),
14605                 rec( 16, 4, AttributeValidFlag ),
14606                 rec( 20, 4, AttributesDef32 ),
14607         ])
14608         pkt.CompletionCodes([0x0000, 0x0102, 0x8000, 0x8101, 0x8401, 0x8501,
14609                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14610                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14611         # 2222/5927, 89/39
14612         pkt = NCP(0x5927, "Get Directory Disk Space Restriction", 'enhanced', has_length=0)
14613         pkt.Request((26, 279), [
14614                 rec( 8, 1, NameSpace  ),
14615                 rec( 9, 2, Reserved2 ),
14616                 rec( 11, 4, DirectoryBase ),
14617                 rec( 15, 1, VolumeNumber ),
14618                 rec( 16, 1, HandleFlag ),
14619         rec( 17, 1, DataTypeFlag ),
14620         rec( 18, 5, Reserved5 ),
14621                 rec( 23, 1, PathCount, var="x" ),
14622                 rec( 24, (2,255), Path16, repeat="x" ),
14623         ], info_str=(Path16, "Get Disk Space Restriction for: %s", "/%s"))
14624         pkt.Reply(18, [
14625                 rec( 8, 1, NumberOfEntries, var="x" ),
14626                 rec( 9, 9, SpaceStruct, repeat="x" ),
14627         ])
14628         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
14629                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14630                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00,
14631                              0xff16])
14632         # 2222/5928, 89/40
14633         pkt = NCP(0x5928, "Search for File or Subdirectory Set (Extended Errors)", 'enhanced', has_length=0)
14634         pkt.Request((30, 283), [
14635                 rec( 8, 1, NameSpace  ),
14636                 rec( 9, 1, DataStream ),
14637                 rec( 10, 2, SearchAttributesLow ),
14638                 rec( 12, 2, ReturnInfoMask ),
14639                 rec( 14, 2, ExtendedInfo ),
14640                 rec( 16, 2, ReturnInfoCount ),
14641                 rec( 18, 9, SeachSequenceStruct ),
14642         rec( 27, 1, DataTypeFlag ),
14643                 rec( 28, (2,255), SearchPattern16 ),
14644         ], info_str=(SearchPattern16, "Search for: %s", ", %s"))
14645         pkt.Reply(NO_LENGTH_CHECK, [
14646                 rec( 8, 9, SeachSequenceStruct ),
14647                 rec( 17, 1, MoreFlag ),
14648                 rec( 18, 2, InfoCount ),
14649                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
14650                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
14651                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
14652                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
14653                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
14654                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
14655                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
14656                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
14657                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
14658                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
14659                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
14660                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
14661                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
14662                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
14663                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
14664                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
14665                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
14666                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
14667                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
14668                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
14669                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
14670                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
14671                 srec( FileName16Struct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
14672                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
14673                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
14674                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
14675                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
14676                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
14677                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
14678                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
14679                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
14680                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
14681                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
14682                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
14683                 srec( FileSize64bitStruct, req_cond="(ncp.ext_info_64_bit_fs == 1) && (ncp.ret_info_mask_fname == 1)" ),
14684                 srec( FileName16Struct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
14685         ])
14686         pkt.ReqCondSizeVariable()
14687         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
14688                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14689                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14690         # 2222/5932, 89/50
14691         pkt = NCP(0x5932, "Get Object Effective Rights", "enhanced", has_length=0)
14692         pkt.Request(25, [
14693     rec( 8, 1, NameSpace ),
14694     rec( 9, 4, ObjectID ),
14695                 rec( 13, 4, DirectoryBase ),
14696                 rec( 17, 1, VolumeNumber ),
14697                 rec( 18, 1, HandleFlag ),
14698         rec( 19, 1, DataTypeFlag ),
14699         rec( 20, 5, Reserved5 ),
14700     ])
14701         pkt.Reply( 10, [
14702                 rec( 8, 2, TrusteeRights ),
14703         ])
14704         pkt.CompletionCodes([0x0000, 0x7e01, 0x9b00, 0x9c03, 0xa901, 0xaa00])
14705         # 2222/5934, 89/52
14706         pkt = NCP(0x5934, "Write Extended Attribute", 'enhanced', has_length=0 )
14707         pkt.Request((36,98), [
14708                 rec( 8, 2, EAFlags ),
14709                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
14710                 rec( 14, 4, ReservedOrDirectoryNumber ),
14711                 rec( 18, 4, TtlWriteDataSize ),
14712                 rec( 22, 4, FileOffset ),
14713                 rec( 26, 4, EAAccessFlag ),
14714         rec( 30, 1, DataTypeFlag ),
14715                 rec( 31, 2, EAValueLength, var='x' ),
14716                 rec( 33, (2,64), EAKey ),
14717                 rec( -1, 1, EAValueRep, repeat='x' ),
14718         ], info_str=(EAKey, "Write Extended Attribute: %s", ", %s"))
14719         pkt.Reply(20, [
14720                 rec( 8, 4, EAErrorCodes ),
14721                 rec( 12, 4, EABytesWritten ),
14722                 rec( 16, 4, NewEAHandle ),
14723         ])
14724         pkt.CompletionCodes([0x0000, 0xc800, 0xc900, 0xcb00, 0xce00, 0xcf00, 0xd101,
14725                              0xd203, 0xa901, 0xaa00, 0xd301, 0xd402])
14726         # 2222/5935, 89/53
14727         pkt = NCP(0x5935, "Read Extended Attribute", 'enhanced', has_length=0 )
14728         pkt.Request((31,541), [
14729                 rec( 8, 2, EAFlags ),
14730                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
14731                 rec( 14, 4, ReservedOrDirectoryNumber ),
14732                 rec( 18, 4, FileOffset ),
14733                 rec( 22, 4, InspectSize ),
14734         rec( 26, 1, DataTypeFlag ),
14735         rec( 27, 2, MaxReadDataReplySize ),
14736                 rec( 29, (2,512), EAKey ),
14737         ], info_str=(EAKey, "Read Extended Attribute: %s", ", %s"))
14738         pkt.Reply((26,536), [
14739                 rec( 8, 4, EAErrorCodes ),
14740                 rec( 12, 4, TtlValuesLength ),
14741                 rec( 16, 4, NewEAHandle ),
14742                 rec( 20, 4, EAAccessFlag ),
14743                 rec( 24, (2,512), EAValue ),
14744         ])
14745         pkt.CompletionCodes([0x0000, 0xa901, 0xaa00, 0xc900, 0xce00, 0xcf00, 0xd101,
14746                              0xd301])
14747         # 2222/5936, 89/54
14748         pkt = NCP(0x5936, "Enumerate Extended Attribute", 'enhanced', has_length=0 )
14749         pkt.Request((27,537), [
14750                 rec( 8, 2, EAFlags ),
14751                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
14752                 rec( 14, 4, ReservedOrDirectoryNumber ),
14753                 rec( 18, 4, InspectSize ),
14754                 rec( 22, 2, SequenceNumber ),
14755         rec( 24, 1, DataTypeFlag ),
14756                 rec( 25, (2,512), EAKey ),
14757         ], info_str=(EAKey, "Enumerate Extended Attribute: %s", ", %s"))
14758         pkt.Reply(28, [
14759                 rec( 8, 4, EAErrorCodes ),
14760                 rec( 12, 4, TtlEAs ),
14761                 rec( 16, 4, TtlEAsDataSize ),
14762                 rec( 20, 4, TtlEAsKeySize ),
14763                 rec( 24, 4, NewEAHandle ),
14764         ])
14765         pkt.CompletionCodes([0x0000, 0x8800, 0xa901, 0xaa00, 0xc900, 0xce00, 0xcf00, 0xd101,
14766                              0xd301])
14767         # 2222/5947, 89/71
14768         pkt = NCP(0x5947, "Scan Volume Trustee Object Paths", 'enhanced', has_length=0)
14769         pkt.Request(21, [
14770                 rec( 8, 4, VolumeID  ),
14771                 rec( 12, 4, ObjectID ),
14772                 rec( 16, 4, SequenceNumber ),
14773                 rec( 20, 1, DataTypeFlag ),
14774         ])
14775         pkt.Reply((20,273), [
14776                 rec( 8, 4, SequenceNumber ),
14777                 rec( 12, 4, ObjectID ),
14778         rec( 16, 1, TrusteeAccessMask ),
14779                 rec( 17, 1, PathCount, var="x" ),
14780                 rec( 18, (2,255), Path16, repeat="x" ),
14781         ])
14782         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
14783                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
14784                              0x9804, 0x9b03, 0x9c03, 0xa901, 0xaa00, 0xbf00, 0xfd00, 0xff16])
14785         # 2222/5A01, 90/00
14786         pkt = NCP(0x5A00, "Parse Tree", 'file')
14787         pkt.Request(46, [
14788                 rec( 10, 4, InfoMask ),
14789                 rec( 14, 4, Reserved4 ),
14790                 rec( 18, 4, Reserved4 ),
14791                 rec( 22, 4, limbCount ),
14792         rec( 26, 4, limbFlags ),
14793         rec( 30, 4, VolumeNumberLong ),
14794         rec( 34, 4, DirectoryBase ),
14795         rec( 38, 4, limbScanNum ),
14796         rec( 42, 4, NameSpace ),
14797         ])
14798         pkt.Reply(32, [
14799                 rec( 8, 4, limbCount ),
14800                 rec( 12, 4, ItemsCount ),
14801                 rec( 16, 4, nextLimbScanNum ),
14802                 rec( 20, 4, CompletionCode ),
14803                 rec( 24, 1, FolderFlag ),
14804                 rec( 25, 3, Reserved ),
14805                 rec( 28, 4, DirectoryBase ),
14806         ])
14807         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14808                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14809                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
14810         # 2222/5A0A, 90/10
14811         pkt = NCP(0x5A0A, "Get Reference Count from Dir Entry Number", 'file')
14812         pkt.Request(19, [
14813                 rec( 10, 4, VolumeNumberLong ),
14814                 rec( 14, 4, DirectoryBase ),
14815                 rec( 18, 1, NameSpace ),
14816         ])
14817         pkt.Reply(12, [
14818                 rec( 8, 4, ReferenceCount ),
14819         ])
14820         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14821                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14822                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
14823         # 2222/5A0B, 90/11
14824         pkt = NCP(0x5A0B, "Get Reference Count from Dir Handle", 'file')
14825         pkt.Request(14, [
14826                 rec( 10, 4, DirHandle ),
14827         ])
14828         pkt.Reply(12, [
14829                 rec( 8, 4, ReferenceCount ),
14830         ])
14831         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14832                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14833                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
14834         # 2222/5A0C, 90/12
14835         pkt = NCP(0x5A0C, "Set Compressed File Size", 'file')
14836         pkt.Request(20, [
14837                 rec( 10, 6, FileHandle ),
14838                 rec( 16, 4, SuggestedFileSize ),
14839         ])
14840         pkt.Reply(16, [
14841                 rec( 8, 4, OldFileSize ),
14842                 rec( 12, 4, NewFileSize ),
14843         ])
14844         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14845                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14846                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
14847         # 2222/5A80, 90/128
14848         pkt = NCP(0x5A80, "Move File Data To Data Migration", 'migration')
14849         pkt.Request(27, [
14850                 rec( 10, 4, VolumeNumberLong ),
14851                 rec( 14, 4, DirectoryEntryNumber ),
14852                 rec( 18, 1, NameSpace ),
14853                 rec( 19, 3, Reserved ),
14854                 rec( 22, 4, SupportModuleID ),
14855                 rec( 26, 1, DMFlags ),
14856         ])
14857         pkt.Reply(8)
14858         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14859                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14860                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14861         # 2222/5A81, 90/129
14862         pkt = NCP(0x5A81, "Data Migration File Information", 'migration')
14863         pkt.Request(19, [
14864                 rec( 10, 4, VolumeNumberLong ),
14865                 rec( 14, 4, DirectoryEntryNumber ),
14866                 rec( 18, 1, NameSpace ),
14867         ])
14868         pkt.Reply(24, [
14869                 rec( 8, 4, SupportModuleID ),
14870                 rec( 12, 4, RestoreTime ),
14871                 rec( 16, 4, DMInfoEntries, var="x" ),
14872                 rec( 20, 4, DataSize, repeat="x" ),
14873         ])
14874         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14875                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14876                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14877         # 2222/5A82, 90/130
14878         pkt = NCP(0x5A82, "Volume Data Migration Status", 'migration')
14879         pkt.Request(18, [
14880                 rec( 10, 4, VolumeNumberLong ),
14881                 rec( 14, 4, SupportModuleID ),
14882         ])
14883         pkt.Reply(32, [
14884                 rec( 8, 4, NumOfFilesMigrated ),
14885                 rec( 12, 4, TtlMigratedSize ),
14886                 rec( 16, 4, SpaceUsed ),
14887                 rec( 20, 4, LimboUsed ),
14888                 rec( 24, 4, SpaceMigrated ),
14889                 rec( 28, 4, FileLimbo ),
14890         ])
14891         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14892                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14893                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14894         # 2222/5A83, 90/131
14895         pkt = NCP(0x5A83, "Migrator Status Info", 'migration')
14896         pkt.Request(10)
14897         pkt.Reply(20, [
14898                 rec( 8, 1, DMPresentFlag ),
14899                 rec( 9, 3, Reserved3 ),
14900                 rec( 12, 4, DMmajorVersion ),
14901                 rec( 16, 4, DMminorVersion ),
14902         ])
14903         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14904                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14905                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14906         # 2222/5A84, 90/132
14907         pkt = NCP(0x5A84, "Data Migration Support Module Information", 'migration')
14908         pkt.Request(18, [
14909                 rec( 10, 1, DMInfoLevel ),
14910                 rec( 11, 3, Reserved3),
14911                 rec( 14, 4, SupportModuleID ),
14912         ])
14913         pkt.Reply(NO_LENGTH_CHECK, [
14914                 srec( DMInfoLevel0, req_cond="ncp.dm_info_level == 0x00" ),
14915                 srec( DMInfoLevel1, req_cond="ncp.dm_info_level == 0x01" ),
14916                 srec( DMInfoLevel2, req_cond="ncp.dm_info_level == 0x02" ),
14917         ])
14918         pkt.ReqCondSizeVariable()
14919         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14920                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14921                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14922         # 2222/5A85, 90/133
14923         pkt = NCP(0x5A85, "Move File Data From Data Migration", 'migration')
14924         pkt.Request(19, [
14925                 rec( 10, 4, VolumeNumberLong ),
14926                 rec( 14, 4, DirectoryEntryNumber ),
14927                 rec( 18, 1, NameSpace ),
14928         ])
14929         pkt.Reply(8)
14930         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14931                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14932                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14933         # 2222/5A86, 90/134
14934         pkt = NCP(0x5A86, "Get/Set Default Read-Write Support Module ID", 'migration')
14935         pkt.Request(18, [
14936                 rec( 10, 1, GetSetFlag ),
14937                 rec( 11, 3, Reserved3 ),
14938                 rec( 14, 4, SupportModuleID ),
14939         ])
14940         pkt.Reply(12, [
14941                 rec( 8, 4, SupportModuleID ),
14942         ])
14943         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14944                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14945                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14946         # 2222/5A87, 90/135
14947         pkt = NCP(0x5A87, "Data Migration Support Module Capacity Request", 'migration')
14948         pkt.Request(22, [
14949                 rec( 10, 4, SupportModuleID ),
14950                 rec( 14, 4, VolumeNumberLong ),
14951                 rec( 18, 4, DirectoryBase ),
14952         ])
14953         pkt.Reply(20, [
14954                 rec( 8, 4, BlockSizeInSectors ),
14955                 rec( 12, 4, TotalBlocks ),
14956                 rec( 16, 4, UsedBlocks ),
14957         ])
14958         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14959                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14960                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14961         # 2222/5A88, 90/136
14962         pkt = NCP(0x5A88, "RTDM Request", 'migration')
14963         pkt.Request(15, [
14964                 rec( 10, 4, Verb ),
14965                 rec( 14, 1, VerbData ),
14966         ])
14967         pkt.Reply(8)
14968         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14969                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14970                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14971     # 2222/5A96, 90/150
14972         pkt = NCP(0x5A96, "File Migration Request", 'file')
14973         pkt.Request(22, [
14974                 rec( 10, 4, VolumeNumberLong ),
14975         rec( 14, 4, DirectoryBase ),
14976         rec( 18, 4, FileMigrationState ),
14977         ])
14978         pkt.Reply(8)
14979         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14980                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
14981                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfb00, 0xff16])
14982     # 2222/5C, 91
14983         pkt = NCP(0x5B, "NMAS Graded Authentication", 'nmas')
14984         #Need info on this packet structure
14985         pkt.Request(7)
14986         pkt.Reply(8)
14987         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14988                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
14989                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14990         # SecretStore data is dissected by packet-ncp-sss.c
14991     # 2222/5C01, 9201
14992         pkt = NCP(0x5C01, "SecretStore Services (Ping Server)", 'sss', 0)
14993         pkt.Request(8)
14994         pkt.Reply(8)
14995         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
14996                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
14997                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
14998         # 2222/5C02, 9202
14999         pkt = NCP(0x5C02, "SecretStore Services (Fragment)", 'sss', 0)
15000         pkt.Request(8)
15001         pkt.Reply(8)
15002         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
15003                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
15004                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
15005         # 2222/5C03, 9203
15006         pkt = NCP(0x5C03, "SecretStore Services (Write App Secrets)", 'sss', 0)
15007         pkt.Request(8)
15008         pkt.Reply(8)
15009         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
15010                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
15011                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
15012         # 2222/5C04, 9204
15013         pkt = NCP(0x5C04, "SecretStore Services (Add Secret ID)", 'sss', 0)
15014         pkt.Request(8)
15015         pkt.Reply(8)
15016         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
15017                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
15018                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
15019         # 2222/5C05, 9205
15020         pkt = NCP(0x5C05, "SecretStore Services (Remove Secret ID)", 'sss', 0)
15021         pkt.Request(8)
15022         pkt.Reply(8)
15023         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
15024                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
15025                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
15026         # 2222/5C06, 9206
15027         pkt = NCP(0x5C06, "SecretStore Services (Remove SecretStore)", 'sss', 0)
15028         pkt.Request(8)
15029         pkt.Reply(8)
15030         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
15031                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
15032                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
15033         # 2222/5C07, 9207
15034         pkt = NCP(0x5C07, "SecretStore Services (Enumerate Secret IDs)", 'sss', 0)
15035         pkt.Request(8)
15036         pkt.Reply(8)
15037         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
15038                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
15039                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
15040         # 2222/5C08, 9208
15041         pkt = NCP(0x5C08, "SecretStore Services (Unlock Store)", 'sss', 0)
15042         pkt.Request(8)
15043         pkt.Reply(8)
15044         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
15045                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
15046                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
15047         # 2222/5C09, 9209
15048         pkt = NCP(0x5C09, "SecretStore Services (Set Master Password)", 'sss', 0)
15049         pkt.Request(8)
15050         pkt.Reply(8)
15051         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
15052                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
15053                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
15054         # 2222/5C0a, 9210
15055         pkt = NCP(0x5C0a, "SecretStore Services (Get Service Information)", 'sss', 0)
15056         pkt.Request(8)
15057         pkt.Reply(8)
15058         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
15059                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
15060                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
15061     # NMAS packets are dissected in packet-ncp-nmas.c
15062         # 2222/5E, 9401
15063         pkt = NCP(0x5E01, "NMAS Communications Packet (Ping)", 'nmas', 0)
15064         pkt.Request(8)
15065         pkt.Reply(8)
15066         pkt.CompletionCodes([0x0000, 0xfb09, 0xff08])
15067         # 2222/5E, 9402
15068         pkt = NCP(0x5E02, "NMAS Communications Packet (Fragment)", 'nmas', 0)
15069         pkt.Request(8)
15070         pkt.Reply(8)
15071         pkt.CompletionCodes([0x0000, 0xfb09, 0xff08])
15072         # 2222/5E, 9403
15073         pkt = NCP(0x5E03, "NMAS Communications Packet (Abort)", 'nmas', 0)
15074         pkt.Request(8)
15075         pkt.Reply(8)
15076         pkt.CompletionCodes([0x0000, 0xfb09, 0xff08])
15077         # 2222/61, 97
15078         pkt = NCP(0x61, "Get Big Packet NCP Max Packet Size", 'connection')
15079         pkt.Request(10, [
15080                 rec( 7, 2, ProposedMaxSize, BE ),
15081                 rec( 9, 1, SecurityFlag ),
15082         ],info_str=(ProposedMaxSize, "Get Big Max Packet Size - %d", ", %d"))
15083         pkt.Reply(13, [
15084                 rec( 8, 2, AcceptedMaxSize, BE ),
15085                 rec( 10, 2, EchoSocket, BE ),
15086                 rec( 12, 1, SecurityFlag ),
15087         ])
15088         pkt.CompletionCodes([0x0000])
15089         # 2222/63, 99
15090         pkt = NCP(0x63, "Undocumented Packet Burst", 'pburst')
15091         pkt.Request(7)
15092         pkt.Reply(8)
15093         pkt.CompletionCodes([0x0000])
15094         # 2222/64, 100
15095         pkt = NCP(0x64, "Undocumented Packet Burst", 'pburst')
15096         pkt.Request(7)
15097         pkt.Reply(8)
15098         pkt.CompletionCodes([0x0000])
15099         # 2222/65, 101
15100         pkt = NCP(0x65, "Packet Burst Connection Request", 'pburst')
15101         pkt.Request(25, [
15102                 rec( 7, 4, LocalConnectionID, BE ),
15103                 rec( 11, 4, LocalMaxPacketSize, BE ),
15104                 rec( 15, 2, LocalTargetSocket, BE ),
15105                 rec( 17, 4, LocalMaxSendSize, BE ),
15106                 rec( 21, 4, LocalMaxRecvSize, BE ),
15107         ])
15108         pkt.Reply(16, [
15109                 rec( 8, 4, RemoteTargetID, BE ),
15110                 rec( 12, 4, RemoteMaxPacketSize, BE ),
15111         ])
15112         pkt.CompletionCodes([0x0000])
15113         # 2222/66, 102
15114         pkt = NCP(0x66, "Undocumented Packet Burst", 'pburst')
15115         pkt.Request(7)
15116         pkt.Reply(8)
15117         pkt.CompletionCodes([0x0000])
15118         # 2222/67, 103
15119         pkt = NCP(0x67, "Undocumented Packet Burst", 'pburst')
15120         pkt.Request(7)
15121         pkt.Reply(8)
15122         pkt.CompletionCodes([0x0000])
15123         # 2222/6801, 104/01
15124         pkt = NCP(0x6801, "Ping for NDS NCP", "nds", has_length=0)
15125         pkt.Request(8)
15126         pkt.Reply(8)
15127         pkt.ReqCondSizeVariable()
15128         pkt.CompletionCodes([0x0000, 0x8100, 0xfb04, 0xfe0c])
15129         # 2222/6802, 104/02
15130         #
15131         # XXX - if FraggerHandle is not 0xffffffff, this is not the
15132         # first fragment, so we can only dissect this by reassembling;
15133         # the fields after "Fragment Handle" are bogus for non-0xffffffff
15134         # fragments, so we shouldn't dissect them. This is all handled in packet-ncp2222.inc.
15135         #
15136         pkt = NCP(0x6802, "Send NDS Fragmented Request/Reply", "nds", has_length=0)
15137         pkt.Request(8)
15138         pkt.Reply(8)
15139         pkt.ReqCondSizeVariable()
15140         pkt.CompletionCodes([0x0000, 0xac00, 0xfd01])
15141         # 2222/6803, 104/03
15142         pkt = NCP(0x6803, "Fragment Close", "nds", has_length=0)
15143         pkt.Request(12, [
15144                 rec( 8, 4, FraggerHandle ),
15145         ])
15146         pkt.Reply(8)
15147         pkt.CompletionCodes([0x0000, 0xff00])
15148         # 2222/6804, 104/04
15149         pkt = NCP(0x6804, "Return Bindery Context", "nds", has_length=0)
15150         pkt.Request(8)
15151         pkt.Reply((9, 263), [
15152                 rec( 8, (1,255), binderyContext ),
15153         ])
15154         pkt.CompletionCodes([0x0000, 0xfe0c, 0xff00])
15155         # 2222/6805, 104/05
15156         pkt = NCP(0x6805, "Monitor NDS Connection", "nds", has_length=0)
15157         pkt.Request(8)
15158         pkt.Reply(8)
15159         pkt.CompletionCodes([0x0000, 0x7700, 0xfb00, 0xfe0c, 0xff00])
15160         # 2222/6806, 104/06
15161         pkt = NCP(0x6806, "Return NDS Statistics", "nds", has_length=0)
15162         pkt.Request(10, [
15163                 rec( 8, 2, NDSRequestFlags ),
15164         ])
15165         pkt.Reply(8)
15166         #Need to investigate how to decode Statistics Return Value
15167         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
15168         # 2222/6807, 104/07
15169         pkt = NCP(0x6807, "Clear NDS Statistics", "nds", has_length=0)
15170         pkt.Request(8)
15171         pkt.Reply(8)
15172         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
15173         # 2222/6808, 104/08
15174         pkt = NCP(0x6808, "Reload NDS Software", "nds", has_length=0)
15175         pkt.Request(8)
15176         pkt.Reply(12, [
15177                 rec( 8, 4, NDSStatus ),
15178         ])
15179         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
15180         # 2222/68C8, 104/200
15181         pkt = NCP(0x68C8, "Query Container Audit Status", "auditing", has_length=0)
15182         pkt.Request(12, [
15183                 rec( 8, 4, ConnectionNumber ),
15184         ])
15185         pkt.Reply(40, [
15186                 rec(8, 32, NWAuditStatus ),
15187         ])
15188         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15189         # 2222/68CA, 104/202
15190         pkt = NCP(0x68CA, "Add Auditor Access", "auditing", has_length=0)
15191         pkt.Request(8)
15192         pkt.Reply(8)
15193         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15194         # 2222/68CB, 104/203
15195         pkt = NCP(0x68CB, "Change Auditor Container Password", "auditing", has_length=0)
15196         pkt.Request(8)
15197         pkt.Reply(8)
15198         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15199         # 2222/68CC, 104/204
15200         pkt = NCP(0x68CC, "Check Auditor Access", "auditing", has_length=0)
15201         pkt.Request(8)
15202         pkt.Reply(8)
15203         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15204         # 2222/68CE, 104/206
15205         pkt = NCP(0x680CE, "Disable Container Auditing", "auditing", has_length=0)
15206         pkt.Request(8)
15207         pkt.Reply(8)
15208         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15209         # 2222/68CF, 104/207
15210         pkt = NCP(0x68CF, "Enable Container Auditing", "auditing", has_length=0)
15211         pkt.Request(8)
15212         pkt.Reply(8)
15213         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15214         # 2222/68D1, 104/209
15215         pkt = NCP(0x68D1, "Read Audit File Header", "auditing", has_length=0)
15216         pkt.Request(8)
15217         pkt.Reply(8)
15218         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15219         # 2222/68D3, 104/211
15220         pkt = NCP(0x68D3, "Remove Auditor Access", "auditing", has_length=0)
15221         pkt.Request(8)
15222         pkt.Reply(8)
15223         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15224         # 2222/68D4, 104/212
15225         pkt = NCP(0x68D4, "Reset Audit File", "auditing", has_length=0)
15226         pkt.Request(8)
15227         pkt.Reply(8)
15228         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15229         # 2222/68D6, 104/214
15230         pkt = NCP(0x68D6, "Write Audit File Configuration Header", "auditing", has_length=0)
15231         pkt.Request(8)
15232         pkt.Reply(8)
15233         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15234         # 2222/68D7, 104/215
15235         pkt = NCP(0x68D7, "Change Auditor Container Password2", "auditing", has_length=0)
15236         pkt.Request(8)
15237         pkt.Reply(8)
15238         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15239         # 2222/68D8, 104/216
15240         pkt = NCP(0x68D8, "Return Audit Flags", "auditing", has_length=0)
15241         pkt.Request(8)
15242         pkt.Reply(8)
15243         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15244         # 2222/68D9, 104/217
15245         pkt = NCP(0x68D9, "Close Old Audit File", "auditing", has_length=0)
15246         pkt.Request(8)
15247         pkt.Reply(8)
15248         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15249         # 2222/68DB, 104/219
15250         pkt = NCP(0x68DB, "Check Level Two Access", "auditing", has_length=0)
15251         pkt.Request(8)
15252         pkt.Reply(8)
15253         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15254         # 2222/68DC, 104/220
15255         pkt = NCP(0x68DC, "Check Object Audited", "auditing", has_length=0)
15256         pkt.Request(8)
15257         pkt.Reply(8)
15258         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15259         # 2222/68DD, 104/221
15260         pkt = NCP(0x68DD, "Change Object Audited", "auditing", has_length=0)
15261         pkt.Request(8)
15262         pkt.Reply(8)
15263         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15264         # 2222/68DE, 104/222
15265         pkt = NCP(0x68DE, "Return Old Audit File List", "auditing", has_length=0)
15266         pkt.Request(8)
15267         pkt.Reply(8)
15268         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15269         # 2222/68DF, 104/223
15270         pkt = NCP(0x68DF, "Init Audit File Reads", "auditing", has_length=0)
15271         pkt.Request(8)
15272         pkt.Reply(8)
15273         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15274         # 2222/68E0, 104/224
15275         pkt = NCP(0x68E0, "Read Auditing File", "auditing", has_length=0)
15276         pkt.Request(8)
15277         pkt.Reply(8)
15278         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15279         # 2222/68E1, 104/225
15280         pkt = NCP(0x68E1, "Delete Old Audit File", "auditing", has_length=0)
15281         pkt.Request(8)
15282         pkt.Reply(8)
15283         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15284         # 2222/68E5, 104/229
15285         pkt = NCP(0x68E5, "Set Audit Password", "auditing", has_length=0)
15286         pkt.Request(8)
15287         pkt.Reply(8)
15288         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15289         # 2222/68E7, 104/231
15290         pkt = NCP(0x68E7, "External Audit Append To File", "auditing", has_length=0)
15291         pkt.Request(8)
15292         pkt.Reply(8)
15293         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
15294         # 2222/69, 105
15295         pkt = NCP(0x69, "Log File", 'sync')
15296         pkt.Request( (12, 267), [
15297                 rec( 7, 1, DirHandle ),
15298                 rec( 8, 1, LockFlag ),
15299                 rec( 9, 2, TimeoutLimit ),
15300                 rec( 11, (1, 256), FilePath ),
15301         ], info_str=(FilePath, "Log File: %s", "/%s"))
15302         pkt.Reply(8)
15303         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x9600, 0xfe0d, 0xff01])
15304         # 2222/6A, 106
15305         pkt = NCP(0x6A, "Lock File Set", 'sync')
15306         pkt.Request( 9, [
15307                 rec( 7, 2, TimeoutLimit ),
15308         ])
15309         pkt.Reply(8)
15310         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x9600, 0xfe0d, 0xff01])
15311         # 2222/6B, 107
15312         pkt = NCP(0x6B, "Log Logical Record", 'sync')
15313         pkt.Request( (11, 266), [
15314                 rec( 7, 1, LockFlag ),
15315                 rec( 8, 2, TimeoutLimit ),
15316                 rec( 10, (1, 256), SynchName ),
15317         ], info_str=(SynchName, "Log Logical Record: %s", ", %s"))
15318         pkt.Reply(8)
15319         pkt.CompletionCodes([0x0000, 0x7f00, 0x9600, 0xfe0d, 0xff01])
15320         # 2222/6C, 108
15321         pkt = NCP(0x6C, "Log Logical Record", 'sync')
15322         pkt.Request( 10, [
15323                 rec( 7, 1, LockFlag ),
15324                 rec( 8, 2, TimeoutLimit ),
15325         ])
15326         pkt.Reply(8)
15327         pkt.CompletionCodes([0x0000, 0x7f00, 0x9600, 0xfe0d, 0xff01])
15328         # 2222/6D, 109
15329         pkt = NCP(0x6D, "Log Physical Record", 'sync')
15330         pkt.Request(24, [
15331                 rec( 7, 1, LockFlag ),
15332                 rec( 8, 6, FileHandle ),
15333                 rec( 14, 4, LockAreasStartOffset ),
15334                 rec( 18, 4, LockAreaLen ),
15335                 rec( 22, 2, LockTimeout ),
15336         ])
15337         pkt.Reply(8)
15338         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
15339         # 2222/6E, 110
15340         pkt = NCP(0x6E, "Lock Physical Record Set", 'sync')
15341         pkt.Request(10, [
15342                 rec( 7, 1, LockFlag ),
15343                 rec( 8, 2, LockTimeout ),
15344         ])
15345         pkt.Reply(8)
15346         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
15347         # 2222/6F00, 111/00
15348         pkt = NCP(0x6F00, "Open/Create a Semaphore", 'sync', has_length=0)
15349         pkt.Request((10,521), [
15350                 rec( 8, 1, InitialSemaphoreValue ),
15351                 rec( 9, (1, 512), SemaphoreName ),
15352         ], info_str=(SemaphoreName, "Open/Create Semaphore: %s", ", %s"))
15353         pkt.Reply(13, [
15354                   rec( 8, 4, SemaphoreHandle ),
15355                   rec( 12, 1, SemaphoreOpenCount ),
15356         ])
15357         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
15358         # 2222/6F01, 111/01
15359         pkt = NCP(0x6F01, "Examine Semaphore", 'sync', has_length=0)
15360         pkt.Request(12, [
15361                 rec( 8, 4, SemaphoreHandle ),
15362         ])
15363         pkt.Reply(10, [
15364                   rec( 8, 1, SemaphoreValue ),
15365                   rec( 9, 1, SemaphoreOpenCount ),
15366         ])
15367         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
15368         # 2222/6F02, 111/02
15369         pkt = NCP(0x6F02, "Wait On (P) Semaphore", 'sync', has_length=0)
15370         pkt.Request(14, [
15371                 rec( 8, 4, SemaphoreHandle ),
15372                 rec( 12, 2, LockTimeout ),
15373         ])
15374         pkt.Reply(8)
15375         pkt.CompletionCodes([0x0000, 0x9600, 0xfe04, 0xff01])
15376         # 2222/6F03, 111/03
15377         pkt = NCP(0x6F03, "Signal (V) Semaphore", 'sync', has_length=0)
15378         pkt.Request(12, [
15379                 rec( 8, 4, SemaphoreHandle ),
15380         ])
15381         pkt.Reply(8)
15382         pkt.CompletionCodes([0x0000, 0x9600, 0xfe04, 0xff01])
15383         # 2222/6F04, 111/04
15384         pkt = NCP(0x6F04, "Close Semaphore", 'sync', has_length=0)
15385         pkt.Request(12, [
15386                 rec( 8, 4, SemaphoreHandle ),
15387         ])
15388         pkt.Reply(10, [
15389                 rec( 8, 1, SemaphoreOpenCount ),
15390                 rec( 9, 1, SemaphoreShareCount ),
15391         ])
15392         pkt.CompletionCodes([0x0000, 0x9600, 0xfe04, 0xff01])
15393         ## 2222/1125
15394         pkt = NCP(0x70, "Clear and Get Waiting Lock Completion", 'sync')
15395         pkt.Request(7)
15396         pkt.Reply(8)
15397         pkt.CompletionCodes([0x0000, 0x9b00, 0x9c03, 0xff1a])
15398         # 2222/7201, 114/01
15399         pkt = NCP(0x7201, "Timesync Get Time", 'tsync')
15400         pkt.Request(10)
15401         pkt.Reply(32,[
15402                 rec( 8, 12, theTimeStruct ),
15403                 rec(20, 8, eventOffset ),
15404                 rec(28, 4, eventTime ),
15405         ])
15406         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
15407         # 2222/7202, 114/02
15408         pkt = NCP(0x7202, "Timesync Exchange Time", 'tsync')
15409         pkt.Request((63,112), [
15410                 rec( 10, 4, protocolFlags ),
15411                 rec( 14, 4, nodeFlags ),
15412                 rec( 18, 8, sourceOriginateTime ),
15413                 rec( 26, 8, targetReceiveTime ),
15414                 rec( 34, 8, targetTransmitTime ),
15415                 rec( 42, 8, sourceReturnTime ),
15416                 rec( 50, 8, eventOffset ),
15417                 rec( 58, 4, eventTime ),
15418                 rec( 62, (1,50), ServerNameLen ),
15419         ], info_str=(ServerNameLen, "Timesync Exchange Time: %s", ", %s"))
15420         pkt.Reply((64,113), [
15421                 rec( 8, 3, Reserved3 ),
15422                 rec( 11, 4, protocolFlags ),
15423                 rec( 15, 4, nodeFlags ),
15424                 rec( 19, 8, sourceOriginateTime ),
15425                 rec( 27, 8, targetReceiveTime ),
15426                 rec( 35, 8, targetTransmitTime ),
15427                 rec( 43, 8, sourceReturnTime ),
15428                 rec( 51, 8, eventOffset ),
15429                 rec( 59, 4, eventTime ),
15430                 rec( 63, (1,50), ServerNameLen ),
15431         ])
15432         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
15433         # 2222/7205, 114/05
15434         pkt = NCP(0x7205, "Timesync Get Server List", 'tsync')
15435         pkt.Request(14, [
15436                 rec( 10, 4, StartNumber ),
15437         ])
15438         pkt.Reply(66, [
15439                 rec( 8, 4, nameType ),
15440                 rec( 12, 48, ServerName ),
15441                 rec( 60, 4, serverListFlags ),
15442                 rec( 64, 2, startNumberFlag ),
15443         ])
15444         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
15445         # 2222/7206, 114/06
15446         pkt = NCP(0x7206, "Timesync Set Server List", 'tsync')
15447         pkt.Request(14, [
15448                 rec( 10, 4, StartNumber ),
15449         ])
15450         pkt.Reply(66, [
15451                 rec( 8, 4, nameType ),
15452                 rec( 12, 48, ServerName ),
15453                 rec( 60, 4, serverListFlags ),
15454                 rec( 64, 2, startNumberFlag ),
15455         ])
15456         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
15457         # 2222/720C, 114/12
15458         pkt = NCP(0x720C, "Timesync Get Version", 'tsync')
15459         pkt.Request(10)
15460         pkt.Reply(12, [
15461                 rec( 8, 4, version ),
15462         ])
15463         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
15464         # 2222/7B01, 123/01
15465         pkt = NCP(0x7B01, "Get Cache Information", 'stats')
15466         pkt.Request(10)
15467         pkt.Reply(288, [
15468                 rec(8, 4, CurrentServerTime, LE),
15469                 rec(12, 1, VConsoleVersion ),
15470                 rec(13, 1, VConsoleRevision ),
15471                 rec(14, 2, Reserved2 ),
15472                 rec(16, 104, Counters ),
15473                 rec(120, 40, ExtraCacheCntrs ),
15474                 rec(160, 40, MemoryCounters ),
15475                 rec(200, 48, TrendCounters ),
15476                 rec(248, 40, CacheInfo ),
15477         ])
15478         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xff00])
15479         # 2222/7B02, 123/02
15480         pkt = NCP(0x7B02, "Get File Server Information", 'stats')
15481         pkt.Request(10)
15482         pkt.Reply(150, [
15483                 rec(8, 4, CurrentServerTime ),
15484                 rec(12, 1, VConsoleVersion ),
15485                 rec(13, 1, VConsoleRevision ),
15486                 rec(14, 2, Reserved2 ),
15487                 rec(16, 4, NCPStaInUseCnt ),
15488                 rec(20, 4, NCPPeakStaInUse ),
15489                 rec(24, 4, NumOfNCPReqs ),
15490                 rec(28, 4, ServerUtilization ),
15491                 rec(32, 96, ServerInfo ),
15492                 rec(128, 22, FileServerCounters ),
15493         ])
15494         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15495         # 2222/7B03, 123/03
15496         pkt = NCP(0x7B03, "NetWare File System Information", 'stats')
15497         pkt.Request(11, [
15498                 rec(10, 1, FileSystemID ),
15499         ])
15500         pkt.Reply(68, [
15501                 rec(8, 4, CurrentServerTime ),
15502                 rec(12, 1, VConsoleVersion ),
15503                 rec(13, 1, VConsoleRevision ),
15504                 rec(14, 2, Reserved2 ),
15505                 rec(16, 52, FileSystemInfo ),
15506         ])
15507         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15508         # 2222/7B04, 123/04
15509         pkt = NCP(0x7B04, "User Information", 'stats')
15510         pkt.Request(14, [
15511                 rec(10, 4, ConnectionNumber, LE ),
15512         ])
15513         pkt.Reply((85, 132), [
15514                 rec(8, 4, CurrentServerTime ),
15515                 rec(12, 1, VConsoleVersion ),
15516                 rec(13, 1, VConsoleRevision ),
15517                 rec(14, 2, Reserved2 ),
15518                 rec(16, 68, UserInformation ),
15519                 rec(84, (1, 48), UserName ),
15520         ])
15521         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15522         # 2222/7B05, 123/05
15523         pkt = NCP(0x7B05, "Packet Burst Information", 'stats')
15524         pkt.Request(10)
15525         pkt.Reply(216, [
15526                 rec(8, 4, CurrentServerTime ),
15527                 rec(12, 1, VConsoleVersion ),
15528                 rec(13, 1, VConsoleRevision ),
15529                 rec(14, 2, Reserved2 ),
15530                 rec(16, 200, PacketBurstInformation ),
15531         ])
15532         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15533         # 2222/7B06, 123/06
15534         pkt = NCP(0x7B06, "IPX SPX Information", 'stats')
15535         pkt.Request(10)
15536         pkt.Reply(94, [
15537                 rec(8, 4, CurrentServerTime ),
15538                 rec(12, 1, VConsoleVersion ),
15539                 rec(13, 1, VConsoleRevision ),
15540                 rec(14, 2, Reserved2 ),
15541                 rec(16, 34, IPXInformation ),
15542                 rec(50, 44, SPXInformation ),
15543         ])
15544         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15545         # 2222/7B07, 123/07
15546         pkt = NCP(0x7B07, "Garbage Collection Information", 'stats')
15547         pkt.Request(10)
15548         pkt.Reply(40, [
15549                 rec(8, 4, CurrentServerTime ),
15550                 rec(12, 1, VConsoleVersion ),
15551                 rec(13, 1, VConsoleRevision ),
15552                 rec(14, 2, Reserved2 ),
15553                 rec(16, 4, FailedAllocReqCnt ),
15554                 rec(20, 4, NumberOfAllocs ),
15555                 rec(24, 4, NoMoreMemAvlCnt ),
15556                 rec(28, 4, NumOfGarbageColl ),
15557                 rec(32, 4, FoundSomeMem ),
15558                 rec(36, 4, NumOfChecks ),
15559         ])
15560         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15561         # 2222/7B08, 123/08
15562         pkt = NCP(0x7B08, "CPU Information", 'stats')
15563         pkt.Request(14, [
15564                 rec(10, 4, CPUNumber ),
15565         ])
15566         pkt.Reply(51, [
15567                 rec(8, 4, CurrentServerTime ),
15568                 rec(12, 1, VConsoleVersion ),
15569                 rec(13, 1, VConsoleRevision ),
15570                 rec(14, 2, Reserved2 ),
15571                 rec(16, 4, NumberOfCPUs ),
15572                 rec(20, 31, CPUInformation ),
15573         ])
15574         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15575         # 2222/7B09, 123/09
15576         pkt = NCP(0x7B09, "Volume Switch Information", 'stats')
15577         pkt.Request(14, [
15578                 rec(10, 4, StartNumber )
15579         ])
15580         pkt.Reply(28, [
15581                 rec(8, 4, CurrentServerTime ),
15582                 rec(12, 1, VConsoleVersion ),
15583                 rec(13, 1, VConsoleRevision ),
15584                 rec(14, 2, Reserved2 ),
15585                 rec(16, 4, TotalLFSCounters ),
15586                 rec(20, 4, CurrentLFSCounters, var="x"),
15587                 rec(24, 4, LFSCounters, repeat="x"),
15588         ])
15589         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15590         # 2222/7B0A, 123/10
15591         pkt = NCP(0x7B0A, "Get NLM Loaded List", 'stats')
15592         pkt.Request(14, [
15593                 rec(10, 4, StartNumber )
15594         ])
15595         pkt.Reply(28, [
15596                 rec(8, 4, CurrentServerTime ),
15597                 rec(12, 1, VConsoleVersion ),
15598                 rec(13, 1, VConsoleRevision ),
15599                 rec(14, 2, Reserved2 ),
15600                 rec(16, 4, NLMcount ),
15601                 rec(20, 4, NLMsInList, var="x" ),
15602                 rec(24, 4, NLMNumbers, repeat="x" ),
15603         ])
15604         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15605         # 2222/7B0B, 123/11
15606         pkt = NCP(0x7B0B, "NLM Information", 'stats')
15607         pkt.Request(14, [
15608                 rec(10, 4, NLMNumber ),
15609         ])
15610         pkt.Reply(NO_LENGTH_CHECK, [
15611                 rec(8, 4, CurrentServerTime ),
15612                 rec(12, 1, VConsoleVersion ),
15613                 rec(13, 1, VConsoleRevision ),
15614                 rec(14, 2, Reserved2 ),
15615                 rec(16, 60, NLMInformation ),
15616         # The remainder of this dissection is manually decoded in packet-ncp2222.inc
15617                 #rec(-1, (1,255), FileName ),
15618                 #rec(-1, (1,255), Name ),
15619                 #rec(-1, (1,255), Copyright ),
15620         ])
15621         pkt.ReqCondSizeVariable()
15622         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15623         # 2222/7B0C, 123/12
15624         pkt = NCP(0x7B0C, "Get Directory Cache Information", 'stats')
15625         pkt.Request(10)
15626         pkt.Reply(72, [
15627                 rec(8, 4, CurrentServerTime ),
15628                 rec(12, 1, VConsoleVersion ),
15629                 rec(13, 1, VConsoleRevision ),
15630                 rec(14, 2, Reserved2 ),
15631                 rec(16, 56, DirCacheInfo ),
15632         ])
15633         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15634         # 2222/7B0D, 123/13
15635         pkt = NCP(0x7B0D, "Get Operating System Version Information", 'stats')
15636         pkt.Request(10)
15637         pkt.Reply(70, [
15638                 rec(8, 4, CurrentServerTime ),
15639                 rec(12, 1, VConsoleVersion ),
15640                 rec(13, 1, VConsoleRevision ),
15641                 rec(14, 2, Reserved2 ),
15642                 rec(16, 1, OSMajorVersion ),
15643                 rec(17, 1, OSMinorVersion ),
15644                 rec(18, 1, OSRevision ),
15645                 rec(19, 1, AccountVersion ),
15646                 rec(20, 1, VAPVersion ),
15647                 rec(21, 1, QueueingVersion ),
15648                 rec(22, 1, SecurityRestrictionVersion ),
15649                 rec(23, 1, InternetBridgeVersion ),
15650                 rec(24, 4, MaxNumOfVol ),
15651                 rec(28, 4, MaxNumOfConn ),
15652                 rec(32, 4, MaxNumOfUsers ),
15653                 rec(36, 4, MaxNumOfNmeSps ),
15654                 rec(40, 4, MaxNumOfLANS ),
15655                 rec(44, 4, MaxNumOfMedias ),
15656                 rec(48, 4, MaxNumOfStacks ),
15657                 rec(52, 4, MaxDirDepth ),
15658                 rec(56, 4, MaxDataStreams ),
15659                 rec(60, 4, MaxNumOfSpoolPr ),
15660                 rec(64, 4, ServerSerialNumber ),
15661                 rec(68, 2, ServerAppNumber ),
15662         ])
15663         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15664         # 2222/7B0E, 123/14
15665         pkt = NCP(0x7B0E, "Get Active Connection List by Type", 'stats')
15666         pkt.Request(15, [
15667                 rec(10, 4, StartConnNumber ),
15668                 rec(14, 1, ConnectionType ),
15669         ])
15670         pkt.Reply(528, [
15671                 rec(8, 4, CurrentServerTime ),
15672                 rec(12, 1, VConsoleVersion ),
15673                 rec(13, 1, VConsoleRevision ),
15674                 rec(14, 2, Reserved2 ),
15675                 rec(16, 512, ActiveConnBitList ),
15676         ])
15677         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfd01, 0xff00])
15678         # 2222/7B0F, 123/15
15679         pkt = NCP(0x7B0F, "Get NLM Resource Tag List", 'stats')
15680         pkt.Request(18, [
15681                 rec(10, 4, NLMNumber ),
15682                 rec(14, 4, NLMStartNumber ),
15683         ])
15684         pkt.Reply(37, [
15685                 rec(8, 4, CurrentServerTime ),
15686                 rec(12, 1, VConsoleVersion ),
15687                 rec(13, 1, VConsoleRevision ),
15688                 rec(14, 2, Reserved2 ),
15689                 rec(16, 4, TtlNumOfRTags ),
15690                 rec(20, 4, CurNumOfRTags ),
15691                 rec(24, 13, RTagStructure ),
15692         ])
15693         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15694         # 2222/7B10, 123/16
15695         pkt = NCP(0x7B10, "Enumerate Connection Information from Connection List", 'stats')
15696         pkt.Request(22, [
15697                 rec(10, 1, EnumInfoMask),
15698                 rec(11, 3, Reserved3),
15699                 rec(14, 4, itemsInList, var="x"),
15700                 rec(18, 4, connList, repeat="x"),
15701         ])
15702         pkt.Reply(NO_LENGTH_CHECK, [
15703                 rec(8, 4, CurrentServerTime ),
15704                 rec(12, 1, VConsoleVersion ),
15705                 rec(13, 1, VConsoleRevision ),
15706                 rec(14, 2, Reserved2 ),
15707                 rec(16, 4, ItemsInPacket ),
15708                 srec(netAddr, req_cond="ncp.enum_info_transport==TRUE"),
15709                 srec(timeInfo, req_cond="ncp.enum_info_time==TRUE"),
15710                 srec(nameInfo, req_cond="ncp.enum_info_name==TRUE"),
15711                 srec(lockInfo, req_cond="ncp.enum_info_lock==TRUE"),
15712                 srec(printInfo, req_cond="ncp.enum_info_print==TRUE"),
15713                 srec(statsInfo, req_cond="ncp.enum_info_stats==TRUE"),
15714                 srec(acctngInfo, req_cond="ncp.enum_info_account==TRUE"),
15715                 srec(authInfo, req_cond="ncp.enum_info_auth==TRUE"),
15716         ])
15717         pkt.ReqCondSizeVariable()
15718         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15719         # 2222/7B11, 123/17
15720         pkt = NCP(0x7B11, "Enumerate NCP Service Network Addresses", 'stats')
15721         pkt.Request(14, [
15722                 rec(10, 4, SearchNumber ),
15723         ])
15724         pkt.Reply(36, [
15725                 rec(8, 4, CurrentServerTime ),
15726                 rec(12, 1, VConsoleVersion ),
15727                 rec(13, 1, VConsoleRevision ),
15728                 rec(14, 2, ServerInfoFlags ),
15729         rec(16, 16, GUID ),
15730         rec(32, 4, NextSearchNum ),
15731         # The following two items are dissected in packet-ncp2222.inc
15732         #rec(36, 4, ItemsInPacket, var="x"),
15733         #rec(40, 20, NCPNetworkAddress, repeat="x" ),
15734         ])
15735         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb01, 0xff00])
15736         # 2222/7B14, 123/20
15737         pkt = NCP(0x7B14, "Active LAN Board List", 'stats')
15738         pkt.Request(14, [
15739                 rec(10, 4, StartNumber ),
15740         ])
15741         pkt.Reply(28, [
15742                 rec(8, 4, CurrentServerTime ),
15743                 rec(12, 1, VConsoleVersion ),
15744                 rec(13, 1, VConsoleRevision ),
15745                 rec(14, 2, Reserved2 ),
15746                 rec(16, 4, MaxNumOfLANS ),
15747                 rec(20, 4, ItemsInPacket, var="x"),
15748                 rec(24, 4, BoardNumbers, repeat="x"),
15749         ])
15750         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15751         # 2222/7B15, 123/21
15752         pkt = NCP(0x7B15, "LAN Configuration Information", 'stats')
15753         pkt.Request(14, [
15754                 rec(10, 4, BoardNumber ),
15755         ])
15756         pkt.Reply(152, [
15757                 rec(8, 4, CurrentServerTime ),
15758                 rec(12, 1, VConsoleVersion ),
15759                 rec(13, 1, VConsoleRevision ),
15760                 rec(14, 2, Reserved2 ),
15761                 rec(16,136, LANConfigInfo ),
15762         ])
15763         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15764         # 2222/7B16, 123/22
15765         pkt = NCP(0x7B16, "LAN Common Counters Information", 'stats')
15766         pkt.Request(18, [
15767                 rec(10, 4, BoardNumber ),
15768                 rec(14, 4, BlockNumber ),
15769         ])
15770         pkt.Reply(86, [
15771                 rec(8, 4, CurrentServerTime ),
15772                 rec(12, 1, VConsoleVersion ),
15773                 rec(13, 1, VConsoleRevision ),
15774                 rec(14, 1, StatMajorVersion ),
15775                 rec(15, 1, StatMinorVersion ),
15776                 rec(16, 4, TotalCommonCnts ),
15777                 rec(20, 4, TotalCntBlocks ),
15778                 rec(24, 4, CustomCounters ),
15779                 rec(28, 4, NextCntBlock ),
15780                 rec(32, 54, CommonLanStruc ),
15781         ])
15782         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15783         # 2222/7B17, 123/23
15784         pkt = NCP(0x7B17, "LAN Custom Counters Information", 'stats')
15785         pkt.Request(18, [
15786                 rec(10, 4, BoardNumber ),
15787                 rec(14, 4, StartNumber ),
15788         ])
15789         pkt.Reply(25, [
15790                 rec(8, 4, CurrentServerTime ),
15791                 rec(12, 1, VConsoleVersion ),
15792                 rec(13, 1, VConsoleRevision ),
15793                 rec(14, 2, Reserved2 ),
15794                 rec(16, 4, NumOfCCinPkt, var="x"),
15795                 rec(20, 5, CustomCntsInfo, repeat="x"),
15796         ])
15797         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15798         # 2222/7B18, 123/24
15799         pkt = NCP(0x7B18, "LAN Name Information", 'stats')
15800         pkt.Request(14, [
15801                 rec(10, 4, BoardNumber ),
15802         ])
15803         pkt.Reply(NO_LENGTH_CHECK, [
15804                 rec(8, 4, CurrentServerTime ),
15805                 rec(12, 1, VConsoleVersion ),
15806                 rec(13, 1, VConsoleRevision ),
15807                 rec(14, 2, Reserved2 ),
15808         rec(16, PROTO_LENGTH_UNKNOWN, DriverBoardName ),
15809         rec(-1, PROTO_LENGTH_UNKNOWN, DriverShortName ),
15810         rec(-1, PROTO_LENGTH_UNKNOWN, DriverLogicalName ),
15811         ])
15812         pkt.ReqCondSizeVariable()
15813         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15814         # 2222/7B19, 123/25
15815         pkt = NCP(0x7B19, "LSL Information", 'stats')
15816         pkt.Request(10)
15817         pkt.Reply(90, [
15818                 rec(8, 4, CurrentServerTime ),
15819                 rec(12, 1, VConsoleVersion ),
15820                 rec(13, 1, VConsoleRevision ),
15821                 rec(14, 2, Reserved2 ),
15822                 rec(16, 74, LSLInformation ),
15823         ])
15824         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15825         # 2222/7B1A, 123/26
15826         pkt = NCP(0x7B1A, "LSL Logical Board Statistics", 'stats')
15827         pkt.Request(14, [
15828                 rec(10, 4, BoardNumber ),
15829         ])
15830         pkt.Reply(28, [
15831                 rec(8, 4, CurrentServerTime ),
15832                 rec(12, 1, VConsoleVersion ),
15833                 rec(13, 1, VConsoleRevision ),
15834                 rec(14, 2, Reserved2 ),
15835                 rec(16, 4, LogTtlTxPkts ),
15836                 rec(20, 4, LogTtlRxPkts ),
15837                 rec(24, 4, UnclaimedPkts ),
15838         ])
15839         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15840         # 2222/7B1B, 123/27
15841         pkt = NCP(0x7B1B, "MLID Board Information", 'stats')
15842         pkt.Request(14, [
15843                 rec(10, 4, BoardNumber ),
15844         ])
15845         pkt.Reply(44, [
15846                 rec(8, 4, CurrentServerTime ),
15847                 rec(12, 1, VConsoleVersion ),
15848                 rec(13, 1, VConsoleRevision ),
15849                 rec(14, 1, Reserved ),
15850                 rec(15, 1, NumberOfProtocols ),
15851                 rec(16, 28, MLIDBoardInfo ),
15852         ])
15853         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15854         # 2222/7B1E, 123/30
15855         pkt = NCP(0x7B1E, "Get Media Manager Object Information", 'stats')
15856         pkt.Request(14, [
15857                 rec(10, 4, ObjectNumber ),
15858         ])
15859         pkt.Reply(212, [
15860                 rec(8, 4, CurrentServerTime ),
15861                 rec(12, 1, VConsoleVersion ),
15862                 rec(13, 1, VConsoleRevision ),
15863                 rec(14, 2, Reserved2 ),
15864                 rec(16, 196, GenericInfoDef ),
15865         ])
15866         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15867         # 2222/7B1F, 123/31
15868         pkt = NCP(0x7B1F, "Get Media Manager Objects List", 'stats')
15869         pkt.Request(15, [
15870                 rec(10, 4, StartNumber ),
15871                 rec(14, 1, MediaObjectType ),
15872         ])
15873         pkt.Reply(28, [
15874                 rec(8, 4, CurrentServerTime ),
15875                 rec(12, 1, VConsoleVersion ),
15876                 rec(13, 1, VConsoleRevision ),
15877                 rec(14, 2, Reserved2 ),
15878                 rec(16, 4, nextStartingNumber ),
15879                 rec(20, 4, ObjectCount, var="x"),
15880                 rec(24, 4, ObjectID, repeat="x"),
15881         ])
15882         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15883         # 2222/7B20, 123/32
15884         pkt = NCP(0x7B20, "Get Media Manager Object Childrens List", 'stats')
15885         pkt.Request(22, [
15886                 rec(10, 4, StartNumber ),
15887                 rec(14, 1, MediaObjectType ),
15888                 rec(15, 3, Reserved3 ),
15889                 rec(18, 4, ParentObjectNumber ),
15890         ])
15891         pkt.Reply(28, [
15892                 rec(8, 4, CurrentServerTime ),
15893                 rec(12, 1, VConsoleVersion ),
15894                 rec(13, 1, VConsoleRevision ),
15895                 rec(14, 2, Reserved2 ),
15896                 rec(16, 4, nextStartingNumber ),
15897                 rec(20, 4, ObjectCount, var="x" ),
15898                 rec(24, 4, ObjectID, repeat="x" ),
15899         ])
15900         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15901         # 2222/7B21, 123/33
15902         pkt = NCP(0x7B21, "Get Volume Segment List", 'stats')
15903         pkt.Request(14, [
15904                 rec(10, 4, VolumeNumberLong ),
15905         ])
15906         pkt.Reply(32, [
15907                 rec(8, 4, CurrentServerTime ),
15908                 rec(12, 1, VConsoleVersion ),
15909                 rec(13, 1, VConsoleRevision ),
15910                 rec(14, 2, Reserved2 ),
15911                 rec(16, 4, NumOfSegments, var="x" ),
15912                 rec(20, 12, Segments, repeat="x" ),
15913         ])
15914         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0x9801, 0xfb06, 0xff00])
15915         # 2222/7B22, 123/34
15916         pkt = NCP(0x7B22, "Get Volume Information by Level", 'stats')
15917         pkt.Request(15, [
15918                 rec(10, 4, VolumeNumberLong ),
15919                 rec(14, 1, InfoLevelNumber ),
15920         ])
15921         pkt.Reply(NO_LENGTH_CHECK, [
15922                 rec(8, 4, CurrentServerTime ),
15923                 rec(12, 1, VConsoleVersion ),
15924                 rec(13, 1, VConsoleRevision ),
15925                 rec(14, 2, Reserved2 ),
15926                 rec(16, 1, InfoLevelNumber ),
15927                 rec(17, 3, Reserved3 ),
15928                 srec(VolInfoStructure, req_cond="ncp.info_level_num==0x01"),
15929                 srec(VolInfo2Struct, req_cond="ncp.info_level_num==0x02"),
15930         ])
15931         pkt.ReqCondSizeVariable()
15932         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15933         # 2222/7B28, 123/40
15934         pkt = NCP(0x7B28, "Active Protocol Stacks", 'stats')
15935         pkt.Request(14, [
15936                 rec(10, 4, StartNumber ),
15937         ])
15938         pkt.Reply(48, [
15939                 rec(8, 4, CurrentServerTime ),
15940                 rec(12, 1, VConsoleVersion ),
15941                 rec(13, 1, VConsoleRevision ),
15942                 rec(14, 2, Reserved2 ),
15943                 rec(16, 4, MaxNumOfLANS ),
15944                 rec(20, 4, StackCount, var="x" ),
15945                 rec(24, 4, nextStartingNumber ),
15946                 rec(28, 20, StackInfo, repeat="x" ),
15947         ])
15948         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15949         # 2222/7B29, 123/41
15950         pkt = NCP(0x7B29, "Get Protocol Stack Configuration Information", 'stats')
15951         pkt.Request(14, [
15952                 rec(10, 4, StackNumber ),
15953         ])
15954         pkt.Reply((37,164), [
15955                 rec(8, 4, CurrentServerTime ),
15956                 rec(12, 1, VConsoleVersion ),
15957                 rec(13, 1, VConsoleRevision ),
15958                 rec(14, 2, Reserved2 ),
15959                 rec(16, 1, ConfigMajorVN ),
15960                 rec(17, 1, ConfigMinorVN ),
15961                 rec(18, 1, StackMajorVN ),
15962                 rec(19, 1, StackMinorVN ),
15963                 rec(20, 16, ShortStkName ),
15964                 rec(36, (1,128), StackFullNameStr ),
15965         ])
15966         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15967         # 2222/7B2A, 123/42
15968         pkt = NCP(0x7B2A, "Get Protocol Stack Statistics Information", 'stats')
15969         pkt.Request(14, [
15970                 rec(10, 4, StackNumber ),
15971         ])
15972         pkt.Reply(38, [
15973                 rec(8, 4, CurrentServerTime ),
15974                 rec(12, 1, VConsoleVersion ),
15975                 rec(13, 1, VConsoleRevision ),
15976                 rec(14, 2, Reserved2 ),
15977                 rec(16, 1, StatMajorVersion ),
15978                 rec(17, 1, StatMinorVersion ),
15979                 rec(18, 2, ComCnts ),
15980                 rec(20, 4, CounterMask ),
15981                 rec(24, 4, TotalTxPkts ),
15982                 rec(28, 4, TotalRxPkts ),
15983                 rec(32, 4, IgnoredRxPkts ),
15984                 rec(36, 2, CustomCnts ),
15985         ])
15986         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
15987         # 2222/7B2B, 123/43
15988         pkt = NCP(0x7B2B, "Get Protocol Stack Custom Information", 'stats')
15989         pkt.Request(18, [
15990                 rec(10, 4, StackNumber ),
15991                 rec(14, 4, StartNumber ),
15992         ])
15993         pkt.Reply(25, [
15994                 rec(8, 4, CurrentServerTime ),
15995                 rec(12, 1, VConsoleVersion ),
15996                 rec(13, 1, VConsoleRevision ),
15997                 rec(14, 2, Reserved2 ),
15998                 rec(16, 4, CustomCount, var="x" ),
15999                 rec(20, 5, CustomCntsInfo, repeat="x" ),
16000         ])
16001         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
16002         # 2222/7B2C, 123/44
16003         pkt = NCP(0x7B2C, "Get Protocol Stack Numbers by Media Number", 'stats')
16004         pkt.Request(14, [
16005                 rec(10, 4, MediaNumber ),
16006         ])
16007         pkt.Reply(24, [
16008                 rec(8, 4, CurrentServerTime ),
16009                 rec(12, 1, VConsoleVersion ),
16010                 rec(13, 1, VConsoleRevision ),
16011                 rec(14, 2, Reserved2 ),
16012                 rec(16, 4, StackCount, var="x" ),
16013                 rec(20, 4, StackNumber, repeat="x" ),
16014         ])
16015         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
16016         # 2222/7B2D, 123/45
16017         pkt = NCP(0x7B2D, "Get Protocol Stack Numbers by LAN Board Number", 'stats')
16018         pkt.Request(14, [
16019                 rec(10, 4, BoardNumber ),
16020         ])
16021         pkt.Reply(24, [
16022                 rec(8, 4, CurrentServerTime ),
16023                 rec(12, 1, VConsoleVersion ),
16024                 rec(13, 1, VConsoleRevision ),
16025                 rec(14, 2, Reserved2 ),
16026                 rec(16, 4, StackCount, var="x" ),
16027                 rec(20, 4, StackNumber, repeat="x" ),
16028         ])
16029         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
16030         # 2222/7B2E, 123/46
16031         pkt = NCP(0x7B2E, "Get Media Name by Media Number", 'stats')
16032         pkt.Request(14, [
16033                 rec(10, 4, MediaNumber ),
16034         ])
16035         pkt.Reply((17,144), [
16036                 rec(8, 4, CurrentServerTime ),
16037                 rec(12, 1, VConsoleVersion ),
16038                 rec(13, 1, VConsoleRevision ),
16039                 rec(14, 2, Reserved2 ),
16040                 rec(16, (1,128), MediaName ),
16041         ])
16042         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
16043         # 2222/7B2F, 123/47
16044         pkt = NCP(0x7B2F, "Get Loaded Media Number", 'stats')
16045         pkt.Request(10)
16046         pkt.Reply(28, [
16047                 rec(8, 4, CurrentServerTime ),
16048                 rec(12, 1, VConsoleVersion ),
16049                 rec(13, 1, VConsoleRevision ),
16050                 rec(14, 2, Reserved2 ),
16051                 rec(16, 4, MaxNumOfMedias ),
16052                 rec(20, 4, MediaListCount, var="x" ),
16053                 rec(24, 4, MediaList, repeat="x" ),
16054         ])
16055         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
16056         # 2222/7B32, 123/50
16057         pkt = NCP(0x7B32, "Get General Router and SAP Information", 'stats')
16058         pkt.Request(10)
16059         pkt.Reply(37, [
16060                 rec(8, 4, CurrentServerTime ),
16061                 rec(12, 1, VConsoleVersion ),
16062                 rec(13, 1, VConsoleRevision ),
16063                 rec(14, 2, Reserved2 ),
16064                 rec(16, 2, RIPSocketNumber ),
16065                 rec(18, 2, Reserved2 ),
16066                 rec(20, 1, RouterDownFlag ),
16067                 rec(21, 3, Reserved3 ),
16068                 rec(24, 1, TrackOnFlag ),
16069                 rec(25, 3, Reserved3 ),
16070                 rec(28, 1, ExtRouterActiveFlag ),
16071                 rec(29, 3, Reserved3 ),
16072                 rec(32, 2, SAPSocketNumber ),
16073                 rec(34, 2, Reserved2 ),
16074                 rec(36, 1, RpyNearestSrvFlag ),
16075         ])
16076         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
16077         # 2222/7B33, 123/51
16078         pkt = NCP(0x7B33, "Get Network Router Information", 'stats')
16079         pkt.Request(14, [
16080                 rec(10, 4, NetworkNumber ),
16081         ])
16082         pkt.Reply(26, [
16083                 rec(8, 4, CurrentServerTime ),
16084                 rec(12, 1, VConsoleVersion ),
16085                 rec(13, 1, VConsoleRevision ),
16086                 rec(14, 2, Reserved2 ),
16087                 rec(16, 10, KnownRoutes ),
16088         ])
16089         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
16090         # 2222/7B34, 123/52
16091         pkt = NCP(0x7B34, "Get Network Routers Information", 'stats')
16092         pkt.Request(18, [
16093                 rec(10, 4, NetworkNumber),
16094                 rec(14, 4, StartNumber ),
16095         ])
16096         pkt.Reply(34, [
16097                 rec(8, 4, CurrentServerTime ),
16098                 rec(12, 1, VConsoleVersion ),
16099                 rec(13, 1, VConsoleRevision ),
16100                 rec(14, 2, Reserved2 ),
16101                 rec(16, 4, NumOfEntries, var="x" ),
16102                 rec(20, 14, RoutersInfo, repeat="x" ),
16103         ])
16104         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
16105         # 2222/7B35, 123/53
16106         pkt = NCP(0x7B35, "Get Known Networks Information", 'stats')
16107         pkt.Request(14, [
16108                 rec(10, 4, StartNumber ),
16109         ])
16110         pkt.Reply(30, [
16111                 rec(8, 4, CurrentServerTime ),
16112                 rec(12, 1, VConsoleVersion ),
16113                 rec(13, 1, VConsoleRevision ),
16114                 rec(14, 2, Reserved2 ),
16115                 rec(16, 4, NumOfEntries, var="x" ),
16116                 rec(20, 10, KnownRoutes, repeat="x" ),
16117         ])
16118         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
16119         # 2222/7B36, 123/54
16120         pkt = NCP(0x7B36, "Get Server Information", 'stats')
16121         pkt.Request((15,64), [
16122                 rec(10, 2, ServerType ),
16123                 rec(12, 2, Reserved2 ),
16124                 rec(14, (1,50), ServerNameLen ),
16125         ], info_str=(ServerNameLen, "Get Server Information: %s", ", %s"))
16126         pkt.Reply(30, [
16127                 rec(8, 4, CurrentServerTime ),
16128                 rec(12, 1, VConsoleVersion ),
16129                 rec(13, 1, VConsoleRevision ),
16130                 rec(14, 2, Reserved2 ),
16131                 rec(16, 12, ServerAddress ),
16132                 rec(28, 2, HopsToNet ),
16133         ])
16134         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
16135         # 2222/7B37, 123/55
16136         pkt = NCP(0x7B37, "Get Server Sources Information", 'stats')
16137         pkt.Request((19,68), [
16138                 rec(10, 4, StartNumber ),
16139                 rec(14, 2, ServerType ),
16140                 rec(16, 2, Reserved2 ),
16141                 rec(18, (1,50), ServerNameLen ),
16142         ], info_str=(ServerNameLen, "Get Server Sources Info: %s", ", %s"))
16143         pkt.Reply(32, [
16144                 rec(8, 4, CurrentServerTime ),
16145                 rec(12, 1, VConsoleVersion ),
16146                 rec(13, 1, VConsoleRevision ),
16147                 rec(14, 2, Reserved2 ),
16148                 rec(16, 4, NumOfEntries, var="x" ),
16149                 rec(20, 12, ServersSrcInfo, repeat="x" ),
16150         ])
16151         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
16152         # 2222/7B38, 123/56
16153         pkt = NCP(0x7B38, "Get Known Servers Information", 'stats')
16154         pkt.Request(16, [
16155                 rec(10, 4, StartNumber ),
16156                 rec(14, 2, ServerType ),
16157         ])
16158         pkt.Reply(35, [
16159                 rec(8, 4, CurrentServerTime ),
16160                 rec(12, 1, VConsoleVersion ),
16161                 rec(13, 1, VConsoleRevision ),
16162                 rec(14, 2, Reserved2 ),
16163                 rec(16, 4, NumOfEntries, var="x" ),
16164                 rec(20, 15, KnownServStruc, repeat="x" ),
16165         ])
16166         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
16167         # 2222/7B3C, 123/60
16168         pkt = NCP(0x7B3C, "Get Server Set Commands Information", 'stats')
16169         pkt.Request(14, [
16170                 rec(10, 4, StartNumber ),
16171         ])
16172         pkt.Reply(NO_LENGTH_CHECK, [
16173                 rec(8, 4, CurrentServerTime ),
16174                 rec(12, 1, VConsoleVersion ),
16175                 rec(13, 1, VConsoleRevision ),
16176                 rec(14, 2, Reserved2 ),
16177                 rec(16, 4, TtlNumOfSetCmds ),
16178                 rec(20, 4, nextStartingNumber ),
16179                 rec(24, 1, SetCmdType ),
16180                 rec(25, 3, Reserved3 ),
16181                 rec(28, 1, SetCmdCategory ),
16182                 rec(29, 3, Reserved3 ),
16183                 rec(32, 1, SetCmdFlags ),
16184                 rec(33, 3, Reserved3 ),
16185                 rec(36, PROTO_LENGTH_UNKNOWN, SetCmdName ),
16186                 rec(-1, 4, SetCmdValueNum ),
16187         ])
16188         pkt.ReqCondSizeVariable()
16189         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
16190         # 2222/7B3D, 123/61
16191         pkt = NCP(0x7B3D, "Get Server Set Categories", 'stats')
16192         pkt.Request(14, [
16193                 rec(10, 4, StartNumber ),
16194         ])
16195         pkt.Reply(NO_LENGTH_CHECK, [
16196                 rec(8, 4, CurrentServerTime ),
16197                 rec(12, 1, VConsoleVersion ),
16198                 rec(13, 1, VConsoleRevision ),
16199                 rec(14, 2, Reserved2 ),
16200                 rec(16, 4, NumberOfSetCategories ),
16201                 rec(20, 4, nextStartingNumber ),
16202                 rec(24, PROTO_LENGTH_UNKNOWN, CategoryName ),
16203         ])
16204         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
16205         # 2222/7B3E, 123/62
16206         pkt = NCP(0x7B3E, "Get Server Set Commands Information By Name", 'stats')
16207         pkt.Request(NO_LENGTH_CHECK, [
16208                 rec(10, PROTO_LENGTH_UNKNOWN, SetParmName ),
16209         ], info_str=(SetParmName, "Get Server Set Command Info for: %s", ", %s"))
16210         pkt.Reply(NO_LENGTH_CHECK, [
16211                 rec(8, 4, CurrentServerTime ),
16212                 rec(12, 1, VConsoleVersion ),
16213                 rec(13, 1, VConsoleRevision ),
16214                 rec(14, 2, Reserved2 ),
16215         rec(16, 4, TtlNumOfSetCmds ),
16216         rec(20, 4, nextStartingNumber ),
16217         rec(24, 1, SetCmdType ),
16218         rec(25, 3, Reserved3 ),
16219         rec(28, 1, SetCmdCategory ),
16220         rec(29, 3, Reserved3 ),
16221         rec(32, 1, SetCmdFlags ),
16222         rec(33, 3, Reserved3 ),
16223         rec(36, PROTO_LENGTH_UNKNOWN, SetCmdName ),
16224         # The value of the set command is decoded in packet-ncp2222.inc
16225         ])
16226         pkt.ReqCondSizeVariable()
16227         pkt.CompletionCodes([0x0000, 0x7e01, 0xc600, 0xfb06, 0xff22])
16228         # 2222/7B46, 123/70
16229         pkt = NCP(0x7B46, "Get Current Compressing File", 'stats')
16230         pkt.Request(14, [
16231                 rec(10, 4, VolumeNumberLong ),
16232         ])
16233         pkt.Reply(56, [
16234                 rec(8, 4, ParentID ),
16235                 rec(12, 4, DirectoryEntryNumber ),
16236                 rec(16, 4, compressionStage ),
16237                 rec(20, 4, ttlIntermediateBlks ),
16238                 rec(24, 4, ttlCompBlks ),
16239                 rec(28, 4, curIntermediateBlks ),
16240                 rec(32, 4, curCompBlks ),
16241                 rec(36, 4, curInitialBlks ),
16242                 rec(40, 4, fileFlags ),
16243                 rec(44, 4, projectedCompSize ),
16244                 rec(48, 4, originalSize ),
16245                 rec(52, 4, compressVolume ),
16246         ])
16247         pkt.CompletionCodes([0x0000, 0x7e00, 0x7901, 0x9801, 0xfb06, 0xff00])
16248         # 2222/7B47, 123/71
16249         pkt = NCP(0x7B47, "Get Current DeCompressing File Info List", 'stats')
16250         pkt.Request(14, [
16251                 rec(10, 4, VolumeNumberLong ),
16252         ])
16253         pkt.Reply(24, [
16254                 #rec(8, 4, FileListCount ),
16255                 rec(8, 16, FileInfoStruct ),
16256         ])
16257         pkt.CompletionCodes([0x0000, 0x7e00, 0x9801, 0xfb06, 0xff00])
16258         # 2222/7B48, 123/72
16259         pkt = NCP(0x7B48, "Get Compression and Decompression Time and Counts", 'stats')
16260         pkt.Request(14, [
16261                 rec(10, 4, VolumeNumberLong ),
16262         ])
16263         pkt.Reply(64, [
16264                 rec(8, 56, CompDeCompStat ),
16265         ])
16266         pkt.CompletionCodes([0x0000, 0x7e00, 0x9801, 0xfb06, 0xff00])
16267         # 2222/7BF9, 123/249
16268         pkt = NCP(0x7BF9, "Set Alert Notification", 'stats')
16269         pkt.Request(10)
16270         pkt.Reply(8)
16271         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
16272         # 2222/7BFB, 123/251
16273         pkt = NCP(0x7BFB, "Get Item Configuration Information", 'stats')
16274         pkt.Request(10)
16275         pkt.Reply(8)
16276         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
16277         # 2222/7BFC, 123/252
16278         pkt = NCP(0x7BFC, "Get Subject Item ID List", 'stats')
16279         pkt.Request(10)
16280         pkt.Reply(8)
16281         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
16282         # 2222/7BFD, 123/253
16283         pkt = NCP(0x7BFD, "Get Subject Item List Count", 'stats')
16284         pkt.Request(10)
16285         pkt.Reply(8)
16286         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
16287         # 2222/7BFE, 123/254
16288         pkt = NCP(0x7BFE, "Get Subject ID List", 'stats')
16289         pkt.Request(10)
16290         pkt.Reply(8)
16291         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
16292         # 2222/7BFF, 123/255
16293         pkt = NCP(0x7BFF, "Get Number of NetMan Subjects", 'stats')
16294         pkt.Request(10)
16295         pkt.Reply(8)
16296         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
16297         # 2222/8301, 131/01
16298         pkt = NCP(0x8301, "RPC Load an NLM", 'remote')
16299         pkt.Request(NO_LENGTH_CHECK, [
16300                 rec(10, 4, NLMLoadOptions ),
16301                 rec(14, 16, Reserved16 ),
16302                 rec(30, PROTO_LENGTH_UNKNOWN, PathAndName ),
16303         ], info_str=(PathAndName, "RPC Load NLM: %s", ", %s"))
16304         pkt.Reply(12, [
16305                 rec(8, 4, RPCccode ),
16306         ])
16307         pkt.CompletionCodes([0x0000, 0x7c00, 0x7e00, 0xfb07, 0xff00])
16308         # 2222/8302, 131/02
16309         pkt = NCP(0x8302, "RPC Unload an NLM", 'remote')
16310         pkt.Request(NO_LENGTH_CHECK, [
16311                 rec(10, 20, Reserved20 ),
16312                 rec(30, PROTO_LENGTH_UNKNOWN, NLMName ),
16313         ], info_str=(NLMName, "RPC Unload NLM: %s", ", %s"))
16314         pkt.Reply(12, [
16315                 rec(8, 4, RPCccode ),
16316         ])
16317         pkt.CompletionCodes([0x0000, 0x7c00, 0x7e00, 0xfb07, 0xff00])
16318         # 2222/8303, 131/03
16319         pkt = NCP(0x8303, "RPC Mount Volume", 'remote')
16320         pkt.Request(NO_LENGTH_CHECK, [
16321                 rec(10, 20, Reserved20 ),
16322                 rec(30, PROTO_LENGTH_UNKNOWN, VolumeNameStringz ),
16323         ], info_str=(VolumeNameStringz, "RPC Mount Volume: %s", ", %s"))
16324         pkt.Reply(32, [
16325                 rec(8, 4, RPCccode),
16326                 rec(12, 16, Reserved16 ),
16327                 rec(28, 4, VolumeNumberLong ),
16328         ])
16329         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
16330         # 2222/8304, 131/04
16331         pkt = NCP(0x8304, "RPC Dismount Volume", 'remote')
16332         pkt.Request(NO_LENGTH_CHECK, [
16333                 rec(10, 20, Reserved20 ),
16334                 rec(30, PROTO_LENGTH_UNKNOWN, VolumeNameStringz ),
16335         ], info_str=(VolumeNameStringz, "RPC Dismount Volume: %s", ", %s"))
16336         pkt.Reply(12, [
16337                 rec(8, 4, RPCccode ),
16338         ])
16339         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
16340         # 2222/8305, 131/05
16341         pkt = NCP(0x8305, "RPC Add Name Space To Volume", 'remote')
16342         pkt.Request(NO_LENGTH_CHECK, [
16343                 rec(10, 20, Reserved20 ),
16344                 rec(30, PROTO_LENGTH_UNKNOWN, AddNameSpaceAndVol ),
16345         ], info_str=(AddNameSpaceAndVol, "RPC Add Name Space to Volume: %s", ", %s"))
16346         pkt.Reply(12, [
16347                 rec(8, 4, RPCccode ),
16348         ])
16349         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
16350         # 2222/8306, 131/06
16351         pkt = NCP(0x8306, "RPC Set Command Value", 'remote')
16352         pkt.Request(NO_LENGTH_CHECK, [
16353                 rec(10, 1, SetCmdType ),
16354                 rec(11, 3, Reserved3 ),
16355                 rec(14, 4, SetCmdValueNum ),
16356                 rec(18, 12, Reserved12 ),
16357                 rec(30, PROTO_LENGTH_UNKNOWN, SetCmdName ),
16358                 #
16359                 # XXX - optional string, if SetCmdType is 0
16360                 #
16361         ], info_str=(SetCmdName, "RPC Set Command Value: %s", ", %s"))
16362         pkt.Reply(12, [
16363                 rec(8, 4, RPCccode ),
16364         ])
16365         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
16366         # 2222/8307, 131/07
16367         pkt = NCP(0x8307, "RPC Execute NCF File", 'remote')
16368         pkt.Request(NO_LENGTH_CHECK, [
16369                 rec(10, 20, Reserved20 ),
16370                 rec(30, PROTO_LENGTH_UNKNOWN, PathAndName ),
16371         ], info_str=(PathAndName, "RPC Execute NCF File: %s", ", %s"))
16372         pkt.Reply(12, [
16373                 rec(8, 4, RPCccode ),
16374         ])
16375         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
16376 if __name__ == '__main__':
16377 #       import profile
16378 #       filename = "ncp.pstats"
16379 #       profile.run("main()", filename)
16380 #
16381 #       import pstats
16382 #       sys.stdout = msg
16383 #       p = pstats.Stats(filename)
16384 #
16385 #       print "Stats sorted by cumulative time"
16386 #       p.strip_dirs().sort_stats('cumulative').print_stats()
16387 #
16388 #       print "Function callees"
16389 #       p.print_callees()
16390         main()