From Todd Sabin: allocate the buffer for the decrypted payload, rather
[obnox/wireshark/wip.git] / ncp2222.py
1 #!/usr/bin/env python
2                                       
3 """
4 Creates C code from a table of NCP type 0x2222 packet types.
5 (And 0x3333, which are the replies, but the packets are more commonly
6 refered to as type 0x2222; the 0x3333 replies are understood to be
7 part of the 0x2222 "family")
8
9 The data-munging code was written by Gilbert Ramirez.
10 The NCP data comes from Greg Morris <GMORRIS@novell.com>.
11 Many thanks to Novell for letting him work on this.
12
13 Additional data sources:
14 "Programmer's Guide to the NetWare Core Protocol" by Steve Conner and Dianne Conner.
15
16 Novell provides info at:
17
18 http://developer.novell.com/ndk/ncp.htm  (where you can download an
19 *.exe file which installs a PDF, although you may have to create a login
20 to do this)
21
22 or
23
24 http://developer.novell.com/ndk/doc/ncp/
25 for a badly-formatted HTML version of the same PDF.
26
27
28 $Id: ncp2222.py,v 1.54 2003/02/19 21:47:45 guy Exp $
29
30
31 Copyright (c) 2000-2002 by Gilbert Ramirez <gram@alumni.rice.edu>
32 and Greg Morris <GMORRIS@novell.com>.
33
34 This program is free software; you can redistribute it and/or
35 modify it under the terms of the GNU General Public License
36 as published by the Free Software Foundation; either version 2
37 of the License, or (at your option) any later version.
38  
39 This program is distributed in the hope that it will be useful,
40 but WITHOUT ANY WARRANTY; without even the implied warranty of
41 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
42 GNU General Public License for more details.
43  
44 You should have received a copy of the GNU General Public License
45 along with this program; if not, write to the Free Software
46 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
47 """
48
49 import os
50 import sys
51 import string
52 import getopt
53 import traceback
54
55 errors          = {}
56 groups          = {}
57 packets         = []
58 compcode_lists  = None
59 ptvc_lists      = None
60 msg             = None
61
62 REC_START       = 0
63 REC_LENGTH      = 1
64 REC_FIELD       = 2
65 REC_ENDIANNESS  = 3
66 REC_VAR         = 4
67 REC_REPEAT      = 5
68 REC_REQ_COND    = 6
69
70 NO_VAR          = -1
71 NO_REPEAT       = -1
72 NO_REQ_COND     = -1
73 NO_LENGTH_CHECK = -2
74
75
76 PROTO_LENGTH_UNKNOWN    = -1
77
78 global_highest_var = -1
79 global_req_cond = {}
80
81
82 REQ_COND_SIZE_VARIABLE = "REQ_COND_SIZE_VARIABLE"
83 REQ_COND_SIZE_CONSTANT = "REQ_COND_SIZE_CONSTANT"
84
85 ##############################################################################
86 # Global containers
87 ##############################################################################
88
89 class UniqueCollection:
90         """The UniqueCollection class stores objects which can be compared to other
91         objects of the same class. If two objects in the collection are equivalent,
92         only one is stored."""
93
94         def __init__(self, name):
95                 "Constructor"
96                 self.name = name
97                 self.members = []
98                 self.member_reprs = {}
99
100         def Add(self, object):
101                 """Add an object to the members lists, if a comparable object
102                 doesn't already exist. The object that is in the member list, that is
103                 either the object that was added or the comparable object that was
104                 already in the member list, is returned."""
105
106                 r = repr(object)
107                 # Is 'object' a duplicate of some other member?
108                 if self.member_reprs.has_key(r):
109                         return self.member_reprs[r]
110                 else:
111                         self.member_reprs[r] = object
112                         self.members.append(object)
113                         return object
114
115         def Members(self):
116                 "Returns the list of members."
117                 return self.members
118
119         def HasMember(self, object):
120                 "Does the list of members contain the object?"
121                 if self.members_reprs.has_key(repr(object)):
122                         return 1
123                 else:
124                         return 0
125
126 # This list needs to be defined before the NCP types are defined,
127 # because the NCP types are defined in the global scope, not inside
128 # a function's scope.
129 ptvc_lists      = UniqueCollection('PTVC Lists')
130
131 ##############################################################################
132
133 class NamedList:
134         "NamedList's keep track of PTVC's and Completion Codes"
135         def __init__(self, name, list):
136                 "Constructor"
137                 self.name = name
138                 self.list = list
139
140         def __cmp__(self, other):
141                 "Compare this NamedList to another"
142
143                 if isinstance(other, NamedList):
144                         return cmp(self.list, other.list)
145                 else:
146                         return 0
147
148
149         def Name(self, new_name = None):
150                 "Get/Set name of list"
151                 if new_name != None:
152                         self.name = new_name
153                 return self.name
154
155         def Records(self):
156                 "Returns record lists"
157                 return self.list
158
159         def Null(self):
160                 "Is there no list (different from an empty list)?"
161                 return self.list == None
162
163         def Empty(self):
164                 "It the list empty (different from a null list)?"
165                 assert(not self.Null())
166
167                 if self.list:
168                         return 0
169                 else:
170                         return 1
171
172         def __repr__(self):
173                 return repr(self.list)
174
175 class PTVC(NamedList):
176         """ProtoTree TVBuff Cursor List ("PTVC List") Class"""
177
178         def __init__(self, name, records):
179                 "Constructor"
180                 NamedList.__init__(self, name, [])
181
182                 global global_highest_var
183
184                 expected_offset = None
185                 highest_var = -1
186
187                 named_vars = {}
188
189                 # Make a PTVCRecord object for each list in 'records'
190                 for record in records:
191                         offset = record[REC_START]
192                         length = record[REC_LENGTH]
193                         field = record[REC_FIELD]
194                         endianness = record[REC_ENDIANNESS]
195
196                         # Variable
197                         var_name = record[REC_VAR]
198                         if var_name:
199                                 # Did we already define this var?
200                                 if named_vars.has_key(var_name):
201                                         sys.exit("%s has multiple %s vars." % \
202                                                 (name, var_name))
203
204                                 highest_var = highest_var + 1
205                                 var = highest_var
206                                 if highest_var > global_highest_var:
207                                     global_highest_var = highest_var
208                                 named_vars[var_name] = var
209                         else:
210                                 var = NO_VAR
211
212                         # Repeat
213                         repeat_name = record[REC_REPEAT]
214                         if repeat_name:
215                                 # Do we have this var?
216                                 if not named_vars.has_key(repeat_name):
217                                         sys.exit("%s does not have %s var defined." % \
218                                                 (name, var_name))
219                                 repeat = named_vars[repeat_name]
220                         else:
221                                 repeat = NO_REPEAT
222
223                         # Request Condition
224                         req_cond = record[REC_REQ_COND]
225                         if req_cond != NO_REQ_COND:
226                                 global_req_cond[req_cond] = None
227
228                         ptvc_rec = PTVCRecord(field, length, endianness, var, repeat, req_cond)
229
230                         if expected_offset == None:
231                                 expected_offset = offset
232
233                         elif expected_offset == -1:
234                                 pass
235
236                         elif expected_offset != offset and offset != -1:
237                                 msg.write("Expected offset in %s for %s to be %d\n" % \
238                                         (name, field.HFName(), expected_offset))
239                                 sys.exit(1)
240
241                         # We can't make a PTVC list from a variable-length
242                         # packet, unless the fields can tell us at run time
243                         # how long the packet is. That is, nstring8 is fine, since
244                         # the field has an integer telling us how long the string is.
245                         # Fields that don't have a length determinable at run-time
246                         # cannot be variable-length.
247                         if type(ptvc_rec.Length()) == type(()):
248                                 if isinstance(ptvc_rec.Field(), nstring):
249                                         expected_offset = -1
250                                         pass
251                                 elif isinstance(ptvc_rec.Field(), nbytes):
252                                         expected_offset = -1
253                                         pass
254                                 elif isinstance(ptvc_rec.Field(), struct):
255                                         expected_offset = -1
256                                         pass
257                                 else:
258                                         field = ptvc_rec.Field()
259                                         assert 0, "Cannot make PTVC from %s, type %s" % \
260                                                 (field.HFName(), field)
261
262                         elif expected_offset > -1:
263                                 if ptvc_rec.Length() < 0:
264                                         expected_offset = -1
265                                 else:
266                                         expected_offset = expected_offset + ptvc_rec.Length()
267
268
269                         self.list.append(ptvc_rec)
270
271         def ETTName(self):
272                 return "ett_%s" % (self.Name(),)
273
274
275         def Code(self):
276                 x =  "static const ptvc_record %s[] = {\n" % (self.Name())
277                 for ptvc_rec in self.list:
278                         x = x +  "\t%s,\n" % (ptvc_rec.Code())
279                 x = x + "\t{ NULL, 0, NULL, NO_ENDIANNESS, NO_VAR, NO_REPEAT, NO_REQ_COND, NCP_FMT_NONE }\n"
280                 x = x + "};\n"
281                 return x
282
283         def __repr__(self):
284                 x = ""
285                 for ptvc_rec in self.list:
286                         x = x + repr(ptvc_rec)
287                 return x
288
289
290 class PTVCBitfield(PTVC):
291         def __init__(self, name, vars):
292                 NamedList.__init__(self, name, [])
293
294                 for var in vars:
295                         ptvc_rec = PTVCRecord(var, var.Length(), var.Endianness(),
296                                 NO_VAR, NO_REPEAT, NO_REQ_COND)
297                         self.list.append(ptvc_rec)
298
299         def Code(self):
300                 ett_name = self.ETTName()
301                 x = "static gint %s;\n" % (ett_name,)
302
303                 x = x + "static const ptvc_record ptvc_%s[] = {\n" % (self.Name())
304                 for ptvc_rec in self.list:
305                         x = x +  "\t%s,\n" % (ptvc_rec.Code())
306                 x = x + "\t{ NULL, 0, NULL, NO_ENDIANNESS, NO_VAR, NO_REPEAT, NO_REQ_COND, NCP_FMT_NONE }\n"
307                 x = x + "};\n"
308
309                 x = x + "static const sub_ptvc_record %s = {\n" % (self.Name(),)
310                 x = x + "\t&%s,\n" % (ett_name,)
311                 x = x + "\tNULL,\n"
312                 x = x + "\tptvc_%s,\n" % (self.Name(),)
313                 x = x + "};\n"
314                 return x
315
316
317 class PTVCRecord:
318         def __init__(self, field, length, endianness, var, repeat, req_cond):
319                 "Constructor"
320                 self.field      = field
321                 self.length     = length
322                 self.endianness = endianness
323                 self.var        = var
324                 self.repeat     = repeat
325                 self.req_cond   = req_cond
326
327         def __cmp__(self, other):
328                 "Comparison operator"
329                 if self.field != other.field:
330                         return 1
331                 elif self.length < other.length:
332                         return -1
333                 elif self.length > other.length:
334                         return 1
335                 elif self.endianness != other.endianness:
336                         return 1
337                 else:
338                         return 0
339
340         def Code(self):
341                 # Nice textual representations
342                 if self.var == NO_VAR:
343                         var = "NO_VAR"
344                 else:
345                         var = self.var
346
347                 if self.repeat == NO_REPEAT:
348                         repeat = "NO_REPEAT"
349                 else:
350                         repeat = self.repeat
351
352                 if self.req_cond == NO_REQ_COND:
353                         req_cond = "NO_REQ_COND"
354                 else:
355                         req_cond = global_req_cond[self.req_cond]
356                         assert req_cond != None
357
358                 if isinstance(self.field, struct):
359                         return self.field.ReferenceString(var, repeat, req_cond)
360                 else:
361                         return self.RegularCode(var, repeat, req_cond)
362
363         def RegularCode(self, var, repeat, req_cond):
364                 "String representation"
365                 endianness = 'BE'
366                 if self.endianness == LE:
367                         endianness = 'LE'
368
369                 length = None
370
371                 if type(self.length) == type(0):
372                         length = self.length
373                 else:
374                         # This is for cases where a length is needed
375                         # in order to determine a following variable-length,
376                         # like nstring8, where 1 byte is needed in order
377                         # to determine the variable length.
378                         var_length = self.field.Length()
379                         if var_length > 0:
380                                 length = var_length
381
382                 if length == PROTO_LENGTH_UNKNOWN:
383                         # XXX length = "PROTO_LENGTH_UNKNOWN"
384                         pass
385
386                 assert length, "Length not handled for %s" % (self.field.HFName(),)
387
388                 sub_ptvc_name = self.field.PTVCName()
389                 if sub_ptvc_name != "NULL":
390                         sub_ptvc_name = "&%s" % (sub_ptvc_name,)
391
392
393                 return "{ &%s, %s, %s, %s, %s, %s, %s, %s }" % \
394                         (self.field.HFName(), length, sub_ptvc_name, 
395                         endianness, var, repeat, req_cond,
396                         self.field.SpecialFmt())
397
398         def Offset(self):
399                 return self.offset
400
401         def Length(self):
402                 return self.length
403
404         def Field(self):
405                 return self.field
406
407         def __repr__(self):
408                 return "{%s len=%s end=%s var=%s rpt=%s rqc=%s}" % \
409                         (self.field.HFName(), self.length,
410                         self.endianness, self.var, self.repeat, self.req_cond)
411
412 ##############################################################################
413
414 class NCP:
415         "NCP Packet class"
416         def __init__(self, func_code, description, group, has_length=1):
417                 "Constructor"
418                 self.func_code          = func_code
419                 self.description        = description
420                 self.group              = group
421                 self.codes              = None
422                 self.request_records    = None
423                 self.reply_records      = None
424                 self.has_length         = has_length
425                 self.req_cond_size      = None
426                 self.req_info_str       = None
427
428                 if not groups.has_key(group):
429                         msg.write("NCP 0x%x has invalid group '%s'\n" % \
430                                 (self.func_code, group))
431                         sys.exit(1)
432
433                 if self.HasSubFunction():
434                         # NCP Function with SubFunction
435                         self.start_offset = 10
436                 else:
437                         # Simple NCP Function
438                         self.start_offset = 7
439
440         def ReqCondSize(self):
441                 return self.req_cond_size
442
443         def ReqCondSizeVariable(self):
444                 self.req_cond_size = REQ_COND_SIZE_VARIABLE
445
446         def ReqCondSizeConstant(self):
447                 self.req_cond_size = REQ_COND_SIZE_CONSTANT
448
449         def FunctionCode(self, part=None):
450                 "Returns the function code for this NCP packet."
451                 if part == None:
452                         return self.func_code
453                 elif part == 'high':
454                         if self.HasSubFunction():
455                                 return (self.func_code & 0xff00) >> 8
456                         else:
457                                 return self.func_code
458                 elif part == 'low':
459                         if self.HasSubFunction():
460                                 return self.func_code & 0x00ff
461                         else:
462                                 return 0x00
463                 else:
464                         msg.write("Unknown directive '%s' for function_code()\n" % (part))
465                         sys.exit(1)
466
467         def HasSubFunction(self):
468                 "Does this NPC packet require a subfunction field?"
469                 if self.func_code <= 0xff:
470                         return 0
471                 else:
472                         return 1
473
474         def HasLength(self):
475                 return self.has_length
476
477         def Description(self):
478                 return self.description
479
480         def Group(self):
481                 return self.group
482
483         def PTVCRequest(self):
484                 return self.ptvc_request
485
486         def PTVCReply(self):
487                 return self.ptvc_reply
488
489         def Request(self, size, records=[], **kwargs):
490                 self.request_size = size
491                 self.request_records = records
492                 if self.HasSubFunction():
493                         if self.HasLength():
494                                 self.CheckRecords(size, records, "Request", 10)
495                         else:
496                                 self.CheckRecords(size, records, "Request", 8)
497                 else:
498                         self.CheckRecords(size, records, "Request", 7)
499                 self.ptvc_request = self.MakePTVC(records, "request")
500
501                 if kwargs.has_key("info_str"):
502                         self.req_info_str = kwargs["info_str"]
503
504         def Reply(self, size, records=[]):
505                 self.reply_size = size
506                 self.reply_records = records
507                 self.CheckRecords(size, records, "Reply", 8)
508                 self.ptvc_reply = self.MakePTVC(records, "reply")
509
510         def CheckRecords(self, size, records, descr, min_hdr_length):
511                 "Simple sanity check"
512                 if size == NO_LENGTH_CHECK:
513                         return
514                 min = size
515                 max = size
516                 if type(size) == type(()):
517                         min = size[0]
518                         max = size[1]
519
520                 lower = min_hdr_length
521                 upper = min_hdr_length
522
523                 for record in records:
524                         rec_size = record[REC_LENGTH]
525                         rec_lower = rec_size
526                         rec_upper = rec_size
527                         if type(rec_size) == type(()):
528                                 rec_lower = rec_size[0]
529                                 rec_upper = rec_size[1]
530
531                         lower = lower + rec_lower
532                         upper = upper + rec_upper
533
534                 error = 0
535                 if min != lower:
536                         msg.write("%s records for 2222/0x%x sum to %d bytes minimum, but param1 shows %d\n" \
537                                 % (descr, self.FunctionCode(), lower, min))
538                         error = 1
539                 if max != upper:
540                         msg.write("%s records for 2222/0x%x sum to %d bytes maximum, but param1 shows %d\n" \
541                                 % (descr, self.FunctionCode(), upper, max))
542                         error = 1
543
544                 if error == 1:
545                         sys.exit(1)
546
547
548         def MakePTVC(self, records, name_suffix):
549                 """Makes a PTVC out of a request or reply record list. Possibly adds
550                 it to the global list of PTVCs (the global list is a UniqueCollection,
551                 so an equivalent PTVC may already be in the global list)."""
552
553                 name = "%s_%s" % (self.CName(), name_suffix)
554                 ptvc = PTVC(name, records)
555                 return ptvc_lists.Add(ptvc)
556
557         def CName(self):
558                 "Returns a C symbol based on the NCP function code"
559                 return "ncp_0x%x" % (self.func_code)
560
561         def InfoStrName(self):
562                 "Returns a C symbol based on the NCP function code, for the info_str"
563                 return "info_str_0x%x" % (self.func_code)
564
565         def Variables(self):
566                 """Returns a list of variables used in the request and reply records.
567                 A variable is listed only once, even if it is used twice (once in
568                 the request, once in the reply)."""
569
570                 variables = {}
571                 if self.request_records:
572                         for record in self.request_records:
573                                 var = record[REC_FIELD]
574                                 variables[var.HFName()] = var
575
576                                 sub_vars = var.SubVariables()
577                                 for sv in sub_vars:
578                                         variables[sv.HFName()] = sv
579
580                 if self.reply_records:
581                         for record in self.reply_records:
582                                 var = record[REC_FIELD]
583                                 variables[var.HFName()] = var
584
585                                 sub_vars = var.SubVariables()
586                                 for sv in sub_vars:
587                                         variables[sv.HFName()] = sv
588
589                 return variables.values()
590
591         def CalculateReqConds(self):
592                 """Returns a list of request conditions (dfilter text) used
593                 in the reply records. A request condition is listed only once,
594                 even it it used twice. """
595                 texts = {}
596                 if self.reply_records:
597                         for record in self.reply_records:
598                                 text = record[REC_REQ_COND]
599                                 if text != NO_REQ_COND:
600                                         texts[text] = None
601
602                 if len(texts) == 0:
603                         self.req_conds = None
604                         return None
605
606                 dfilter_texts = texts.keys()
607                 dfilter_texts.sort()
608                 name = "%s_req_cond_indexes" % (self.CName(),)
609                 return NamedList(name, dfilter_texts)
610
611         def GetReqConds(self):
612                 return self.req_conds
613
614         def SetReqConds(self, new_val):
615                 self.req_conds = new_val
616
617
618         def CompletionCodes(self, codes=None):
619                 """Sets or returns the list of completion
620                 codes. Internally, a NamedList is used to store the
621                 completion codes, but the caller of this function never
622                 realizes that because Python lists are the input and
623                 output."""
624
625                 if codes == None:
626                         return self.codes
627
628                 # Sanity check
629                 okay = 1
630                 for code in codes:
631                         if not errors.has_key(code):
632                                 msg.write("Errors table does not have key 0x%04x for NCP=0x%x\n" % (code,
633                                         self.func_code))
634                                 okay = 0
635
636                 # Delay the exit until here so that the programmer can get
637                 # the complete list of missing error codes
638                 if not okay:
639                         sys.exit(1)
640
641                 # Create CompletionCode (NamedList) object and possible
642                 # add it to  the global list of completion code lists.
643                 name = "%s_errors" % (self.CName(),)
644                 codes.sort()
645                 codes_list = NamedList(name, codes)
646                 self.codes = compcode_lists.Add(codes_list)
647
648                 self.Finalize()
649
650         def Finalize(self):
651                 """Adds the NCP object to the global collection of NCP
652                 objects. This is done automatically after setting the
653                 CompletionCode list. Yes, this is a shortcut, but it makes
654                 our list of NCP packet definitions look neater, since an
655                 explicit "add to global list of packets" is not needed."""
656
657                 # Add packet to global collection of packets
658                 packets.append(self)
659
660 def rec(start, length, field, endianness=None, **kw):
661         return _rec(start, length, field, endianness, kw)
662
663 def srec(field, endianness=None, **kw):
664         return _rec(-1, -1, field, endianness, kw)
665
666 def _rec(start, length, field, endianness, kw):
667         # If endianness not explicitly given, use the field's
668         # default endiannes.
669         if endianness == None:
670                 endianness = field.Endianness()
671
672         # Setting a var?
673         if kw.has_key("var"):
674                 # Is the field an INT ?
675                 if not isinstance(field, CountingNumber):
676                         sys.exit("Field %s used as count variable, but not integer." \
677                                 % (field.HFName()))
678                 var = kw["var"]
679         else:
680                 var = None
681
682         # If 'var' not used, 'repeat' can be used.
683         if not var and kw.has_key("repeat"):
684                 repeat = kw["repeat"]
685         else:
686                 repeat = None
687
688         # Request-condition ?
689         if kw.has_key("req_cond"):
690                 req_cond = kw["req_cond"]
691         else:
692                 req_cond = NO_REQ_COND
693
694         return [start, length, field, endianness, var, repeat, req_cond]
695
696
697
698
699 ##############################################################################
700
701 LE              = 1             # Little-Endian
702 BE              = 0             # Big-Endian
703 NA              = -1            # Not Applicable
704
705 class Type:
706         " Virtual class for NCP field types"
707         type            = "Type"
708         ftype           = None
709         disp            = "BASE_DEC"
710         endianness      = NA
711         values          = []
712
713         def __init__(self, abbrev, descr, bytes, endianness = NA):
714                 self.abbrev = abbrev
715                 self.descr = descr
716                 self.bytes = bytes
717                 self.endianness = endianness
718                 self.hfname = "hf_ncp_" + self.abbrev
719                 self.special_fmt = "NCP_FMT_NONE"
720
721         def Length(self):
722                 return self.bytes
723
724         def Abbreviation(self):
725                 return self.abbrev
726
727         def Description(self):
728                 return self.descr
729
730         def HFName(self):
731                 return self.hfname
732
733         def DFilter(self):
734                 return "ncp." + self.abbrev
735
736         def EtherealFType(self):
737                 return self.ftype
738
739         def Display(self, newval=None):
740                 if newval != None:
741                         self.disp = newval
742                 return self.disp
743
744         def ValuesName(self):
745                 return "NULL"
746
747         def Mask(self):
748                 return 0
749
750         def Endianness(self):
751                 return self.endianness
752
753         def SubVariables(self):
754                 return []
755
756         def PTVCName(self):
757                 return "NULL"
758
759         def NWDate(self):
760                 self.special_fmt = "NCP_FMT_NW_DATE"
761
762         def NWTime(self):
763                 self.special_fmt = "NCP_FMT_NW_TIME"
764                 
765         def NWUnicode(self):
766                 self.special_fmt = "NCP_FMT_UNICODE"                
767                 
768         def SpecialFmt(self):
769                 return self.special_fmt
770
771         def __cmp__(self, other):
772                 return cmp(self.hfname, other.hfname)
773
774 class struct(PTVC, Type):
775         def __init__(self, name, items, descr=None):
776                 name = "struct_%s" % (name,)
777                 NamedList.__init__(self, name, [])
778
779                 self.bytes = 0
780                 self.descr = descr
781                 for item in items:
782                         if isinstance(item, Type):
783                                 field = item
784                                 length = field.Length()
785                                 endianness = field.Endianness()
786                                 var = NO_VAR
787                                 repeat = NO_REPEAT
788                                 req_cond = NO_REQ_COND
789                         elif type(item) == type([]):
790                                 field = item[REC_FIELD]
791                                 length = item[REC_LENGTH]
792                                 endianness = item[REC_ENDIANNESS]
793                                 var = item[REC_VAR]
794                                 repeat = item[REC_REPEAT]
795                                 req_cond = item[REC_REQ_COND]
796                         else:
797                                 assert 0, "Item %s item not handled." % (item,)
798
799                         ptvc_rec = PTVCRecord(field, length, endianness, var,
800                                 repeat, req_cond)
801                         self.list.append(ptvc_rec)
802                         self.bytes = self.bytes + field.Length()
803
804                 self.hfname = self.name
805
806         def Variables(self):
807                 vars = []
808                 for ptvc_rec in self.list:
809                         vars.append(ptvc_rec.Field())
810                 return vars
811
812         def ReferenceString(self, var, repeat, req_cond):
813                 return "{ PTVC_STRUCT, NO_LENGTH, &%s, NO_ENDIANNESS, %s, %s, %s, NCP_FMT_NONE }" % \
814                         (self.name, var, repeat, req_cond)
815
816         def Code(self):
817                 ett_name = self.ETTName()
818                 x = "static gint %s;\n" % (ett_name,)
819                 x = x + "static const ptvc_record ptvc_%s[] = {\n" % (self.name,)
820                 for ptvc_rec in self.list:
821                         x = x +  "\t%s,\n" % (ptvc_rec.Code())
822                 x = x + "\t{ NULL, NO_LENGTH, NULL, NO_ENDIANNESS, NO_VAR, NO_REPEAT, NO_REQ_COND, NCP_FMT_NONE }\n"
823                 x = x + "};\n"
824
825                 x = x + "static const sub_ptvc_record %s = {\n" % (self.name,)
826                 x = x + "\t&%s,\n" % (ett_name,)
827                 if self.descr:
828                         x = x + '\t"%s",\n' % (self.descr,)
829                 else:
830                         x = x + "\tNULL,\n"
831                 x = x + "\tptvc_%s,\n" % (self.Name(),)
832                 x = x + "};\n"
833                 return x
834
835         def __cmp__(self, other):
836                 return cmp(self.HFName(), other.HFName())
837
838
839 class byte(Type):
840         type    = "byte"
841         ftype   = "FT_UINT8"
842         def __init__(self, abbrev, descr):
843                 Type.__init__(self, abbrev, descr, 1)
844
845 class CountingNumber:
846         pass
847
848 # Same as above. Both are provided for convenience
849 class uint8(Type, CountingNumber):
850         type    = "uint8"
851         ftype   = "FT_UINT8"
852         bytes   = 1
853         def __init__(self, abbrev, descr):
854                 Type.__init__(self, abbrev, descr, 1)
855
856 class uint16(Type, CountingNumber):
857         type    = "uint16"
858         ftype   = "FT_UINT16"
859         def __init__(self, abbrev, descr, endianness = LE):
860                 Type.__init__(self, abbrev, descr, 2, endianness)
861
862 class uint24(Type, CountingNumber):
863         type    = "uint24"
864         ftype   = "FT_UINT24"
865         def __init__(self, abbrev, descr, endianness = LE):
866                 Type.__init__(self, abbrev, descr, 3, endianness)
867
868 class uint32(Type, CountingNumber):
869         type    = "uint32"
870         ftype   = "FT_UINT32"
871         def __init__(self, abbrev, descr, endianness = LE):
872                 Type.__init__(self, abbrev, descr, 4, endianness)
873
874 class boolean8(uint8):
875         type    = "boolean8"
876         ftype   = "FT_BOOLEAN"
877
878 class boolean16(uint16):
879         type    = "boolean16"
880         ftype   = "FT_BOOLEAN"
881
882 class boolean24(uint24):
883         type    = "boolean24"
884         ftype   = "FT_BOOLEAN"
885
886 class boolean32(uint32):
887         type    = "boolean32"
888         ftype   = "FT_BOOLEAN"
889
890 class nstring:
891         pass
892
893 class nstring8(Type, nstring):
894         """A string of up to (2^8)-1 characters. The first byte
895         gives the string length."""
896
897         type    = "nstring8"
898         ftype   = "FT_UINT_STRING"
899         def __init__(self, abbrev, descr):
900                 Type.__init__(self, abbrev, descr, 1)
901
902 class nstring16(Type, nstring):
903         """A string of up to (2^16)-2 characters. The first 2 bytes
904         gives the string length."""
905
906         type    = "nstring16"
907         ftype   = "FT_UINT_STRING"
908         def __init__(self, abbrev, descr, endianness = LE):
909                 Type.__init__(self, abbrev, descr, 2, endianness)
910
911 class nstring32(Type, nstring):
912         """A string of up to (2^32)-4 characters. The first 4 bytes
913         gives the string length."""
914
915         type    = "nstring32"
916         ftype   = "FT_UINT_STRING"
917         def __init__(self, abbrev, descr, endianness = LE):
918                 Type.__init__(self, abbrev, descr, 4, endianness)
919
920 class fw_string(Type):
921         """A fixed-width string of n bytes."""
922
923         type    = "fw_string"
924         ftype   = "FT_STRING"
925
926         def __init__(self, abbrev, descr, bytes):
927                 Type.__init__(self, abbrev, descr, bytes)
928
929
930 class stringz(Type):
931         "NUL-terminated string, with a maximum length"
932
933         type    = "stringz"
934         ftype   = "FT_STRINGZ"
935         def __init__(self, abbrev, descr):
936                 Type.__init__(self, abbrev, descr, PROTO_LENGTH_UNKNOWN)
937
938 class val_string(Type):
939         """Abstract class for val_stringN, where N is number
940         of bits that key takes up."""
941
942         type    = "val_string"
943         disp    = 'BASE_HEX'
944
945         def __init__(self, abbrev, descr, val_string_array, endianness = LE):
946                 Type.__init__(self, abbrev, descr, self.bytes, endianness)
947                 self.values = val_string_array
948
949         def Code(self):
950                 result = "static const value_string %s[] = {\n" \
951                                 % (self.ValuesCName())
952                 for val_record in self.values:
953                         value   = val_record[0]
954                         text    = val_record[1]
955                         value_repr = self.value_format % value
956                         result = result + '\t{ %s,\t"%s" },\n' \
957                                         % (value_repr, text)
958
959                 value_repr = self.value_format % 0
960                 result = result + "\t{ %s,\tNULL },\n" % (value_repr)
961                 result = result + "};\n"
962                 REC_VAL_STRING_RES = self.value_format % value
963                 return result
964
965         def ValuesCName(self):
966                 return "ncp_%s_vals" % (self.abbrev)
967
968         def ValuesName(self):
969                 return "VALS(%s)" % (self.ValuesCName())
970
971 class val_string8(val_string):
972         type            = "val_string8"
973         ftype           = "FT_UINT8"
974         bytes           = 1
975         value_format    = "0x%02x"
976
977 class val_string16(val_string):
978         type            = "val_string16"
979         ftype           = "FT_UINT16"
980         bytes           = 2
981         value_format    = "0x%04x"
982
983 class val_string32(val_string):
984         type            = "val_string32"
985         ftype           = "FT_UINT32"
986         bytes           = 4
987         value_format    = "0x%08x"
988
989 class bytes(Type):
990         type    = 'bytes'
991         ftype   = 'FT_BYTES'
992
993         def __init__(self, abbrev, descr, bytes):
994                 Type.__init__(self, abbrev, descr, bytes, NA)
995
996 class nbytes:
997         pass
998
999 class nbytes8(Type, nbytes):
1000         """A series of up to (2^8)-1 bytes. The first byte
1001         gives the byte-string length."""
1002
1003         type    = "nbytes8"
1004         ftype   = "FT_UINT_BYTES"
1005         def __init__(self, abbrev, descr, endianness = LE):
1006                 Type.__init__(self, abbrev, descr, 1, endianness)
1007
1008 class nbytes16(Type, nbytes):
1009         """A series of up to (2^16)-2 bytes. The first 2 bytes
1010         gives the byte-string length."""
1011
1012         type    = "nbytes16"
1013         ftype   = "FT_UINT_BYTES"
1014         def __init__(self, abbrev, descr, endianness = LE):
1015                 Type.__init__(self, abbrev, descr, 2, endianness)
1016
1017 class nbytes32(Type, nbytes):
1018         """A series of up to (2^32)-4 bytes. The first 4 bytes
1019         gives the byte-string length."""
1020
1021         type    = "nbytes32"
1022         ftype   = "FT_UINT_BYTES"
1023         def __init__(self, abbrev, descr, endianness = LE):
1024                 Type.__init__(self, abbrev, descr, 4, endianness)
1025
1026 class bf_uint(Type):
1027         type    = "bf_uint"
1028         disp    = None
1029
1030         def __init__(self, bitmask, abbrev, descr, endianness=LE):
1031                 Type.__init__(self, abbrev, descr, self.bytes, endianness)
1032                 self.bitmask = bitmask
1033
1034         def Mask(self):
1035                 return self.bitmask
1036
1037 class bf_val_str(bf_uint):
1038         type    = "bf_uint"
1039         disp    = None
1040
1041         def __init__(self, bitmask, abbrev, descr, val_string_array, endiannes=LE):
1042                 bf_uint.__init__(self, bitmask, abbrev, descr, endiannes)
1043                 self.values = val_string_array
1044
1045         def ValuesName(self):
1046                 return "VALS(%s)" % (self.ValuesCName())
1047
1048 class bf_val_str8(bf_val_str, val_string8):
1049         type    = "bf_val_str8"
1050         ftype   = "FT_UINT8"
1051         disp    = "BASE_HEX"
1052         bytes   = 1
1053
1054 class bf_val_str16(bf_val_str, val_string16):
1055         type    = "bf_val_str16"
1056         ftype   = "FT_UINT16"
1057         disp    = "BASE_HEX"
1058         bytes   = 2
1059
1060 class bf_val_str32(bf_val_str, val_string32):
1061         type    = "bf_val_str32"
1062         ftype   = "FT_UINT32"
1063         disp    = "BASE_HEX"
1064         bytes   = 4
1065
1066 class bf_boolean:
1067     pass
1068
1069 class bf_boolean8(bf_uint, boolean8, bf_boolean):
1070         type    = "bf_boolean8"
1071         ftype   = "FT_BOOLEAN"
1072         disp    = "8"
1073         bytes   = 1
1074
1075 class bf_boolean16(bf_uint, boolean16, bf_boolean):
1076         type    = "bf_boolean16"
1077         ftype   = "FT_BOOLEAN"
1078         disp    = "16"
1079         bytes   = 2
1080
1081 class bf_boolean24(bf_uint, boolean24, bf_boolean):
1082         type    = "bf_boolean24"
1083         ftype   = "FT_BOOLEAN"
1084         disp    = "24"
1085         bytes   = 3
1086
1087 class bf_boolean32(bf_uint, boolean32, bf_boolean):
1088         type    = "bf_boolean32"
1089         ftype   = "FT_BOOLEAN"
1090         disp    = "32"
1091         bytes   = 4
1092
1093 class bitfield(Type):
1094         type    = "bitfield"
1095         disp    = 'BASE_HEX'
1096
1097         def __init__(self, vars):
1098                 var_hash = {}
1099                 for var in vars:
1100                         if isinstance(var, bf_boolean):
1101                                 if not isinstance(var, self.bf_type):
1102                                         print "%s must be of type %s" % \
1103                                                 (var.Abbreviation(),
1104                                                 self.bf_type)
1105                                         sys.exit(1)
1106                         var_hash[var.bitmask] = var
1107
1108                 bitmasks = var_hash.keys()
1109                 bitmasks.sort()
1110                 bitmasks.reverse()
1111
1112                 ordered_vars = []
1113                 for bitmask in bitmasks:
1114                         var = var_hash[bitmask]
1115                         ordered_vars.append(var)
1116
1117                 self.vars = ordered_vars
1118                 self.ptvcname = "ncp_%s_bitfield" % (self.abbrev,)
1119                 self.hfname = "hf_ncp_%s" % (self.abbrev,)
1120                 self.sub_ptvc = PTVCBitfield(self.PTVCName(), self.vars)
1121
1122         def SubVariables(self):
1123                 return self.vars
1124
1125         def SubVariablesPTVC(self):
1126                 return self.sub_ptvc
1127
1128         def PTVCName(self):
1129                 return self.ptvcname
1130
1131
1132 class bitfield8(bitfield, uint8):
1133         type    = "bitfield8"
1134         ftype   = "FT_UINT8"
1135         bf_type = bf_boolean8
1136
1137         def __init__(self, abbrev, descr, vars):
1138                 uint8.__init__(self, abbrev, descr)
1139                 bitfield.__init__(self, vars)
1140
1141 class bitfield16(bitfield, uint16):
1142         type    = "bitfield16"
1143         ftype   = "FT_UINT16"
1144         bf_type = bf_boolean16
1145
1146         def __init__(self, abbrev, descr, vars, endianness=LE):
1147                 uint16.__init__(self, abbrev, descr, endianness)
1148                 bitfield.__init__(self, vars)
1149
1150 class bitfield24(bitfield, uint24):
1151         type    = "bitfield24"
1152         ftype   = "FT_UINT24"
1153         bf_type = bf_boolean24
1154
1155         def __init__(self, abbrev, descr, vars, endianness=LE):
1156                 uint24.__init__(self, abbrev, descr, endianness)
1157                 bitfield.__init__(self, vars)
1158
1159 class bitfield32(bitfield, uint32):
1160         type    = "bitfield32"
1161         ftype   = "FT_UINT32"
1162         bf_type = bf_boolean32
1163
1164         def __init__(self, abbrev, descr, vars, endianness=LE):
1165                 uint32.__init__(self, abbrev, descr, endianness)
1166                 bitfield.__init__(self, vars)
1167
1168 #
1169 # Force the endianness of a field to a non-default value; used in
1170 # the list of fields of a structure.
1171 #
1172 def endian(field, endianness):
1173         return [-1, field.Length(), field, endianness, NO_VAR, NO_REPEAT, NO_REQ_COND]
1174
1175 ##############################################################################
1176 # NCP Field Types. Defined in Appendix A of "Programmer's Guide..."
1177 ##############################################################################
1178 AbortQueueFlag                  = val_string8("abort_q_flag", "Abort Queue Flag", [
1179         [ 0x00, "Place at End of Queue" ],
1180         [ 0x01, "Do Not Place Spool File, Examine Flags" ],
1181 ])
1182 AcceptedMaxSize                 = uint16("accepted_max_size", "Accepted Max Size")
1183 AccessControl                   = val_string8("access_control", "Access Control", [
1184         [ 0x00, "Open for read by this client" ],
1185         [ 0x01, "Open for write by this client" ],
1186         [ 0x02, "Deny read requests from other stations" ],
1187         [ 0x03, "Deny write requests from other stations" ],
1188         [ 0x04, "File detached" ],
1189         [ 0x05, "TTS holding detach" ],
1190         [ 0x06, "TTS holding open" ],
1191 ])
1192 AccessDate                      = uint16("access_date", "Access Date")
1193 AccessDate.NWDate()
1194 AccessMode                      = bitfield8("access_mode", "Access Mode", [
1195         bf_boolean8(0x01, "acc_mode_read", "Read Access"),
1196         bf_boolean8(0x02, "acc_mode_write", "Write Access"),
1197         bf_boolean8(0x04, "acc_mode_deny_read", "Deny Read Access"),
1198         bf_boolean8(0x08, "acc_mode_deny_write", "Deny Write Access"),
1199         bf_boolean8(0x10, "acc_mode_comp", "Compatibility Mode"),
1200 ])
1201 AccessPrivileges                = bitfield8("access_privileges", "Access Privileges", [
1202         bf_boolean8(0x01, "acc_priv_read", "Read Privileges (files only)"),
1203         bf_boolean8(0x02, "acc_priv_write", "Write Privileges (files only)"),
1204         bf_boolean8(0x04, "acc_priv_open", "Open Privileges (files only)"),
1205         bf_boolean8(0x08, "acc_priv_create", "Create Privileges (files only)"),
1206         bf_boolean8(0x10, "acc_priv_delete", "Delete Privileges (files only)"),
1207         bf_boolean8(0x20, "acc_priv_parent", "Parental Privileges (directories only for creating, deleting, and renaming)"),
1208         bf_boolean8(0x40, "acc_priv_search", "Search Privileges (directories only)"),
1209         bf_boolean8(0x80, "acc_priv_modify", "Modify File Status Flags Privileges (files and directories)"),
1210 ])
1211 AccessRightsMask                = bitfield8("access_rights_mask", "Access Rights", [
1212         bf_boolean8(0x0001, "acc_rights_read", "Read Rights"),
1213         bf_boolean8(0x0002, "acc_rights_write", "Write Rights"),
1214         bf_boolean8(0x0004, "acc_rights_open", "Open Rights"),
1215         bf_boolean8(0x0008, "acc_rights_create", "Create Rights"),
1216         bf_boolean8(0x0010, "acc_rights_delete", "Delete Rights"),
1217         bf_boolean8(0x0020, "acc_rights_parent", "Parental Rights"),
1218         bf_boolean8(0x0040, "acc_rights_search", "Search Rights"),
1219         bf_boolean8(0x0080, "acc_rights_modify", "Modify Rights"),
1220 ])
1221 AccessRightsMaskWord            = bitfield16("access_rights_mask_word", "Access Rights", [
1222         bf_boolean16(0x0001, "acc_rights1_read", "Read Rights"),
1223         bf_boolean16(0x0002, "acc_rights1_write", "Write Rights"),
1224         bf_boolean16(0x0004, "acc_rights1_open", "Open Rights"),
1225         bf_boolean16(0x0008, "acc_rights1_create", "Create Rights"),
1226         bf_boolean16(0x0010, "acc_rights1_delete", "Delete Rights"),
1227         bf_boolean16(0x0020, "acc_rights1_parent", "Parental Rights"),
1228         bf_boolean16(0x0040, "acc_rights1_search", "Search Rights"),
1229         bf_boolean16(0x0080, "acc_rights1_modify", "Modify Rights"),
1230         bf_boolean16(0x0100, "acc_rights1_supervisor", "Supervisor Access Rights"),
1231 ])
1232 AccountBalance                  = uint32("account_balance", "Account Balance")
1233 AccountVersion                  = uint8("acct_version", "Acct Version")
1234 ActionFlag                      = bitfield8("action_flag", "Action Flag", [
1235         bf_boolean8(0x01, "act_flag_open", "Open"),
1236         bf_boolean8(0x02, "act_flag_replace", "Replace"),
1237         bf_boolean8(0x10, "act_flag_create", "Create"),
1238 ])
1239 ActiveConnBitList               = fw_string("active_conn_bit_list", "Active Connection List", 512)
1240 ActiveIndexedFiles              = uint16("active_indexed_files", "Active Indexed Files")
1241 ActualMaxBinderyObjects         = uint16("actual_max_bindery_objects", "Actual Max Bindery Objects")
1242 ActualMaxIndexedFiles           = uint16("actual_max_indexed_files", "Actual Max Indexed Files")
1243 ActualMaxOpenFiles              = uint16("actual_max_open_files", "Actual Max Open Files")
1244 ActualMaxSimultaneousTransactions = uint16("actual_max_sim_trans", "Actual Max Simultaneous Transactions")
1245 ActualMaxUsedDirectoryEntries   = uint16("actual_max_used_directory_entries", "Actual Max Used Directory Entries")
1246 ActualMaxUsedRoutingBuffers     = uint16("actual_max_used_routing_buffers", "Actual Max Used Routing Buffers")
1247 ActualResponseCount             = uint16("actual_response_count", "Actual Response Count")
1248 AddNameSpaceAndVol              = stringz("add_nm_spc_and_vol", "Add Name Space and Volume")
1249 AFPEntryID                      = uint32("afp_entry_id", "AFP Entry ID", BE)
1250 AFPEntryID.Display("BASE_HEX")
1251 AllocAvailByte                  = uint32("alloc_avail_byte", "Bytes Available for Allocation")
1252 AllocateMode                    = val_string16("allocate_mode", "Allocate Mode", [
1253         [ 0x0000, "Permanent Directory Handle" ],
1254         [ 0x0001, "Temporary Directory Handle" ],
1255         [ 0x0002, "Special Temporary Directory Handle" ],
1256 ])
1257 AllocationBlockSize             = uint32("allocation_block_size", "Allocation Block Size")
1258 AllocFreeCount                  = uint32("alloc_free_count", "Reclaimable Free Bytes")
1259 ApplicationNumber               = uint16("application_number", "Application Number")
1260 ArchivedTime                    = uint16("archived_time", "Archived Time")
1261 ArchivedTime.NWTime()
1262 ArchivedDate                    = uint16("archived_date", "Archived Date")
1263 ArchivedDate.NWDate()
1264 ArchiverID                      = uint32("archiver_id", "Archiver ID", BE)
1265 ArchiverID.Display("BASE_HEX")
1266 AssociatedNameSpace             = uint8("associated_name_space", "Associated Name Space")
1267 AttachDuringProcessing          = uint16("attach_during_processing", "Attach During Processing")
1268 AttachedIndexedFiles            = uint8("attached_indexed_files", "Attached Indexed Files")
1269 AttachWhileProcessingAttach     = uint16("attach_while_processing_attach", "Attach While Processing Attach")
1270 Attributes                      = uint32("attributes", "Attributes")
1271 AttributesDef                   = bitfield8("attr_def", "Attributes", [
1272         bf_boolean8(0x01, "att_def_ro", "Read Only"),
1273         bf_boolean8(0x02, "att_def_hidden", "Hidden"),
1274         bf_boolean8(0x04, "att_def_system", "System"),
1275         bf_boolean8(0x08, "att_def_execute", "Execute"),
1276         bf_boolean8(0x10, "att_def_sub_only", "Subdirectory"),
1277         bf_boolean8(0x20, "att_def_archive", "Archive"),
1278         bf_boolean8(0x80, "att_def_shareable", "Shareable"),
1279 ])
1280 AttributesDef16                 = bitfield16("attr_def_16", "Attributes", [
1281         bf_boolean16(0x0001, "att_def16_ro", "Read Only"),
1282         bf_boolean16(0x0002, "att_def16_hidden", "Hidden"),
1283         bf_boolean16(0x0004, "att_def16_system", "System"),
1284         bf_boolean16(0x0008, "att_def16_execute", "Execute"),
1285         bf_boolean16(0x0010, "att_def16_sub_only", "Subdirectory"),
1286         bf_boolean16(0x0020, "att_def16_archive", "Archive"),
1287         bf_boolean16(0x0080, "att_def16_shareable", "Shareable"),
1288         bf_boolean16(0x1000, "att_def16_transaction", "Transactional"),
1289         bf_boolean16(0x4000, "att_def16_read_audit", "Read Audit"),
1290         bf_boolean16(0x8000, "att_def16_write_audit", "Write Audit"),
1291 ])
1292 AttributesDef32                 = bitfield32("attr_def_32", "Attributes", [
1293         bf_boolean32(0x00000001, "att_def32_ro", "Read Only"),
1294         bf_boolean32(0x00000002, "att_def32_hidden", "Hidden"),
1295         bf_boolean32(0x00000004, "att_def32_system", "System"),
1296         bf_boolean32(0x00000008, "att_def32_execute", "Execute"),
1297         bf_boolean32(0x00000010, "att_def32_sub_only", "Subdirectory"),
1298         bf_boolean32(0x00000020, "att_def32_archive", "Archive"),
1299         bf_boolean32(0x00000080, "att_def32_shareable", "Shareable"),
1300         bf_boolean32(0x00001000, "att_def32_transaction", "Transactional"),
1301         bf_boolean32(0x00004000, "att_def32_read_audit", "Read Audit"),
1302         bf_boolean32(0x00008000, "att_def32_write_audit", "Write Audit"),
1303         bf_boolean32(0x00010000, "att_def_purge", "Purge"),
1304         bf_boolean32(0x00020000, "att_def_reninhibit", "Rename Inhibit"),
1305         bf_boolean32(0x00040000, "att_def_delinhibit", "Delete Inhibit"),
1306         bf_boolean32(0x00080000, "att_def_cpyinhibit", "Copy Inhibit"),
1307         bf_boolean32(0x02000000, "att_def_im_comp", "Immediate Compress"),
1308         bf_boolean32(0x04000000, "att_def_comp", "Compressed"),
1309 ])
1310 AttributeValidFlag              = uint32("attribute_valid_flag", "Attribute Valid Flag")
1311 AuditFileVersionDate            = uint16("audit_file_ver_date", "Audit File Version Date")
1312 AuditFileVersionDate.NWDate()
1313 AuditFlag                       = val_string8("audit_flag", "Audit Flag", [
1314         [ 0x00, "Do NOT audit object" ],
1315         [ 0x01, "Audit object" ],
1316 ])
1317 AuditHandle                     = uint32("audit_handle", "Audit File Handle")
1318 AuditHandle.Display("BASE_HEX")
1319 AuditID                         = uint32("audit_id", "Audit ID", BE)
1320 AuditID.Display("BASE_HEX")
1321 AuditIDType                     = val_string16("audit_id_type", "Audit ID Type", [
1322         [ 0x0000, "Volume" ],
1323         [ 0x0001, "Container" ],
1324 ])
1325 AuditVersionDate                = uint16("audit_ver_date", "Auditing Version Date")
1326 AuditVersionDate.NWDate()
1327 AvailableBlocks                 = uint32("available_blocks", "Available Blocks")
1328 AvailableClusters               = uint16("available_clusters", "Available Clusters")
1329 AvailableDirectorySlots         = uint16("available_directory_slots", "Available Directory Slots")
1330 AvailableDirEntries             = uint32("available_dir_entries", "Available Directory Entries")
1331 AvailableIndexedFiles           = uint16("available_indexed_files", "Available Indexed Files")
1332
1333 BackgroundAgedWrites            = uint32("background_aged_writes", "Background Aged Writes")
1334 BackgroundDirtyWrites           = uint32("background_dirty_writes", "Background Dirty Writes")
1335 BadLogicalConnectionCount       = uint16("bad_logical_connection_count", "Bad Logical Connection Count")
1336 BannerName                      = fw_string("banner_name", "Banner Name", 14)
1337 BaseDirectoryID                 = uint32("base_directory_id", "Base Directory ID", BE)
1338 BaseDirectoryID.Display("BASE_HEX")
1339 binderyContext                  = nstring8("bindery_context", "Bindery Context")
1340 BitMap                          = bytes("bit_map", "Bit Map", 512)
1341 BlockNumber                     = uint32("block_number", "Block Number")
1342 BlockSize                       = uint16("block_size", "Block Size")
1343 BlockSizeInSectors              = uint32("block_size_in_sectors", "Block Size in Sectors")
1344 BoardInstalled                  = uint8("board_installed", "Board Installed")
1345 BoardNumber                     = uint32("board_number", "Board Number")
1346 BoardNumbers                    = uint32("board_numbers", "Board Numbers")
1347 BufferSize                      = uint16("buffer_size", "Buffer Size")
1348 BusString                       = stringz("bus_string", "Bus String")
1349 BusType                         = val_string8("bus_type", "Bus Type", [
1350         [0x00, "ISA"],
1351         [0x01, "Micro Channel" ],
1352         [0x02, "EISA"],
1353         [0x04, "PCI"],
1354         [0x08, "PCMCIA"],
1355         [0x10, "ISA"],
1356         [0x14, "ISA"],
1357 ])
1358 BytesActuallyTransferred        = uint32("bytes_actually_transferred", "Bytes Actually Transferred")
1359 BytesRead                       = fw_string("bytes_read", "Bytes Read", 6)
1360 BytesToCopy                     = uint32("bytes_to_copy", "Bytes to Copy")
1361 BytesWritten                    = fw_string("bytes_written", "Bytes Written", 6)
1362
1363 CacheAllocations                = uint32("cache_allocations", "Cache Allocations")
1364 CacheBlockScrapped              = uint16("cache_block_scrapped", "Cache Block Scrapped")
1365 CacheBufferCount                = uint16("cache_buffer_count", "Cache Buffer Count")
1366 CacheBufferSize                 = uint16("cache_buffer_size", "Cache Buffer Size")
1367 CacheFullWriteRequests          = uint32("cache_full_write_requests", "Cache Full Write Requests")
1368 CacheGetRequests                = uint32("cache_get_requests", "Cache Get Requests")
1369 CacheHitOnUnavailableBlock      = uint16("cache_hit_on_unavailable_block", "Cache Hit On Unavailable Block")
1370 CacheHits                       = uint32("cache_hits", "Cache Hits")
1371 CacheMisses                     = uint32("cache_misses", "Cache Misses")
1372 CachePartialWriteRequests       = uint32("cache_partial_write_requests", "Cache Partial Write Requests")
1373 CacheReadRequests               = uint32("cache_read_requests", "Cache Read Requests")
1374 CacheWriteRequests              = uint32("cache_write_requests", "Cache Write Requests")
1375 CategoryName                    = stringz("category_name", "Category Name")
1376 CCFileHandle                    = uint32("cc_file_handle", "File Handle")
1377 CCFileHandle.Display("BASE_HEX")
1378 CCFunction                      = val_string8("cc_function", "OP-Lock Flag", [
1379         [ 0x01, "Clear OP-Lock" ],
1380         [ 0x02, "Acknowledge Callback" ],
1381         [ 0x03, "Decline Callback" ],
1382 ])
1383 ChangeBits                      = bitfield16("change_bits", "Change Bits", [
1384         bf_boolean16(0x0001, "change_bits_modify", "Modify Name"),
1385         bf_boolean16(0x0002, "change_bits_fatt", "File Attributes"),
1386         bf_boolean16(0x0004, "change_bits_cdate", "Creation Date"),
1387         bf_boolean16(0x0008, "change_bits_ctime", "Creation Time"),
1388         bf_boolean16(0x0010, "change_bits_owner", "Owner ID"),
1389         bf_boolean16(0x0020, "change_bits_adate", "Archive Date"),
1390         bf_boolean16(0x0040, "change_bits_atime", "Archive Time"),
1391         bf_boolean16(0x0080, "change_bits_aid", "Archiver ID"),
1392         bf_boolean16(0x0100, "change_bits_udate", "Update Date"),
1393         bf_boolean16(0x0200, "change_bits_utime", "Update Time"),
1394         bf_boolean16(0x0400, "change_bits_uid", "Update ID"),
1395         bf_boolean16(0x0800, "change_bits_acc_date", "Access Date"),
1396         bf_boolean16(0x1000, "change_bits_max_acc_mask", "Maximum Access Mask"),
1397         bf_boolean16(0x2000, "change_bits_max_space", "Maximum Space"),
1398 ])
1399 ChannelState                    = val_string8("channel_state", "Channel State", [
1400         [ 0x00, "Channel is running" ],
1401         [ 0x01, "Channel is stopping" ],
1402         [ 0x02, "Channel is stopped" ],
1403         [ 0x03, "Channel is not functional" ],
1404 ])
1405 ChannelSynchronizationState     = val_string8("channel_synchronization_state", "Channel Synchronization State", [
1406         [ 0x00, "Channel is not being used" ],
1407         [ 0x02, "NetWare is using the channel; no one else wants it" ],
1408         [ 0x04, "NetWare is using the channel; someone else wants it" ],
1409         [ 0x06, "Someone else is using the channel; NetWare does not need it" ],
1410         [ 0x08, "Someone else is using the channel; NetWare needs it" ],
1411         [ 0x0A, "Someone else has released the channel; NetWare should use it" ],
1412 ])
1413 ChargeAmount                    = uint32("charge_amount", "Charge Amount")
1414 ChargeInformation               = uint32("charge_information", "Charge Information")
1415 ClientCompFlag                  = val_string16("client_comp_flag", "Completion Flag", [
1416         [ 0x0000, "Successful" ],
1417         [ 0x0001, "Illegal Station Number" ],
1418         [ 0x0002, "Client Not Logged In" ],
1419         [ 0x0003, "Client Not Accepting Messages" ],
1420         [ 0x0004, "Client Already has a Message" ],
1421         [ 0x0096, "No Alloc Space for the Message" ],
1422         [ 0x00fd, "Bad Station Number" ],
1423         [ 0x00ff, "Failure" ],
1424 ])      
1425 ClientIDNumber                  = uint32("client_id_number", "Client ID Number", BE)
1426 ClientIDNumber.Display("BASE_HEX")
1427 ClientList                      = uint32("client_list", "Client List")
1428 ClientListCount                 = uint16("client_list_cnt", "Client List Count")
1429 ClientListLen                   = uint8("client_list_len", "Client List Length")
1430 ClientName                      = nstring8("client_name", "Client Name")
1431 ClientRecordArea                = fw_string("client_record_area", "Client Record Area", 152)
1432 ClientStation                   = uint8("client_station", "Client Station")
1433 ClientStationLong               = uint32("client_station_long", "Client Station")
1434 ClientTaskNumber                = uint8("client_task_number", "Client Task Number")
1435 ClientTaskNumberLong            = uint32("client_task_number_long", "Client Task Number")
1436 ClusterCount                    = uint16("cluster_count", "Cluster Count")
1437 ClustersUsedByDirectories       = uint32("clusters_used_by_directories", "Clusters Used by Directories")
1438 ClustersUsedByExtendedDirectories = uint32("clusters_used_by_extended_dirs", "Clusters Used by Extended Directories")
1439 ClustersUsedByFAT               = uint32("clusters_used_by_fat", "Clusters Used by FAT")
1440 ComCnts                         = uint16("com_cnts", "Communication Counters")
1441 Comment                         = nstring8("comment", "Comment")
1442 CommentType                     = uint16("comment_type", "Comment Type")
1443 CompletionCode                  = uint32("ncompletion_code", "Completion Code")
1444 CompressedDataStreamsCount      = uint32("compressed_data_streams_count", "Compressed Data Streams Count")
1445 CompressedLimboDataStreamsCount = uint32("compressed_limbo_data_streams_count", "Compressed Limbo Data Streams Count")
1446 CompressedSectors               = uint32("compressed_sectors", "Compressed Sectors")
1447 compressionStage                = uint32("compression_stage", "Compression Stage")
1448 compressVolume                  = uint32("compress_volume", "Volume Compression")
1449 ConfigMajorVN                   = uint8("config_major_vn", "Configuration Major Version Number")
1450 ConfigMinorVN                   = uint8("config_minor_vn", "Configuration Minor Version Number")
1451 ConfigurationDescription        = fw_string("configuration_description", "Configuration Description", 80)
1452 ConfigurationText               = fw_string("configuration_text", "Configuration Text", 160)
1453 ConfiguredMaxBinderyObjects     = uint16("configured_max_bindery_objects", "Configured Max Bindery Objects")
1454 ConfiguredMaxOpenFiles          = uint16("configured_max_open_files", "Configured Max Open Files")
1455 ConfiguredMaxRoutingBuffers     = uint16("configured_max_routing_buffers", "Configured Max Routing Buffers")
1456 ConfiguredMaxSimultaneousTransactions = uint16("cfg_max_simultaneous_transactions", "Configured Max Simultaneous Transactions")
1457 ConnectedLAN                    = uint32("connected_lan", "LAN Adapter")
1458 ConnectionControlBits           = bitfield8("conn_ctrl_bits", "Connection Control", [
1459         bf_boolean8(0x01, "enable_brdcasts", "Enable Broadcasts"),
1460         bf_boolean8(0x02, "enable_personal_brdcasts", "Enable Personal Broadcasts"),
1461         bf_boolean8(0x04, "enable_wdog_messages", "Enable Watchdog Message"),
1462         bf_boolean8(0x10, "disable_brdcasts", "Disable Broadcasts"),
1463         bf_boolean8(0x20, "disable_personal_brdcasts", "Disable Personal Broadcasts"),
1464         bf_boolean8(0x40, "disable_wdog_messages", "Disable Watchdog Message"),
1465 ])
1466 ConnectionListCount             = uint32("conn_list_count", "Connection List Count")
1467 ConnectionList                  = uint32("connection_list", "Connection List")
1468 ConnectionNumber                = uint32("connection_number", "Connection Number", BE)
1469 ConnectionNumberList            = nstring8("connection_number_list", "Connection Number List")
1470 ConnectionNumberWord            = uint16("conn_number_word", "Connection Number")
1471 ConnectionNumberByte            = uint8("conn_number_byte", "Connection Number")
1472 ConnectionServiceType           = val_string8("connection_service_type","Connection Service Type",[
1473         [ 0x01, "CLIB backward Compatibility" ],
1474         [ 0x02, "NCP Connection" ],
1475         [ 0x03, "NLM Connection" ],
1476         [ 0x04, "AFP Connection" ],
1477         [ 0x05, "FTAM Connection" ],
1478         [ 0x06, "ANCP Connection" ],
1479         [ 0x07, "ACP Connection" ],
1480         [ 0x08, "SMB Connection" ],
1481         [ 0x09, "Winsock Connection" ],
1482 ])
1483 ConnectionsInUse                = uint16("connections_in_use", "Connections In Use")
1484 ConnectionsMaxUsed              = uint16("connections_max_used", "Connections Max Used")
1485 ConnectionsSupportedMax         = uint16("connections_supported_max", "Connections Supported Max")
1486 ConnectionType                  = val_string8("connection_type", "Connection Type", [
1487         [ 0x00, "Not in use" ],
1488         [ 0x02, "NCP" ],
1489         [ 0x11, "UDP (for IP)" ],
1490 ])
1491 ConnListLen                     = uint8("conn_list_len", "Connection List Length")
1492 Copyright                       = nstring8("copyright", "Copyright")
1493 connList                        = uint32("conn_list", "Connection List")
1494 ControlFlags                    = val_string8("control_flags", "Control Flags", [
1495         [ 0x00, "Forced Record Locking is Off" ],
1496         [ 0x01, "Forced Record Locking is On" ],
1497 ])
1498 ControllerDriveNumber           = uint8("controller_drive_number", "Controller Drive Number")
1499 ControllerNumber                = uint8("controller_number", "Controller Number")
1500 ControllerType                  = uint8("controller_type", "Controller Type")
1501 Cookie1                         = uint32("cookie_1", "Cookie 1")
1502 Cookie2                         = uint32("cookie_2", "Cookie 2")
1503 Copies                          = uint8( "copies", "Copies" )
1504 CoprocessorFlag                 = uint32("co_processor_flag", "CoProcessor Present Flag")
1505 CoProcessorString               = stringz("co_proc_string", "CoProcessor String")
1506 CounterMask                     = val_string8("counter_mask", "Counter Mask", [
1507         [ 0x00, "Counter is Valid" ],
1508         [ 0x01, "Counter is not Valid" ],
1509 ])        
1510 CPUNumber                       = uint32("cpu_number", "CPU Number")
1511 CPUString                       = stringz("cpu_string", "CPU String")
1512 CPUType                         = val_string8("cpu_type", "CPU Type", [
1513         [ 0x00, "80386" ],
1514         [ 0x01, "80486" ],
1515         [ 0x02, "Pentium" ],
1516         [ 0x03, "Pentium Pro" ],
1517 ])    
1518 CreationDate                    = uint16("creation_date", "Creation Date")
1519 CreationDate.NWDate()
1520 CreationTime                    = uint16("creation_time", "Creation Time")
1521 CreationTime.NWTime()
1522 CreatorID                       = uint32("creator_id", "Creator ID", BE)
1523 CreatorID.Display("BASE_HEX")
1524 CreatorNameSpaceNumber          = val_string8("creator_name_space_number", "Creator Name Space Number", [
1525         [ 0x00, "DOS Name Space" ],
1526         [ 0x01, "MAC Name Space" ],
1527         [ 0x02, "NFS Name Space" ],
1528         [ 0x04, "Long Name Space" ],
1529 ])
1530 CreditLimit                     = uint32("credit_limit", "Credit Limit")
1531 CtrlFlags                       = val_string16("ctrl_flags", "Control Flags", [
1532         [ 0x0000, "Do Not Return File Name" ],
1533         [ 0x0001, "Return File Name" ],
1534 ])      
1535 curCompBlks                     = uint32("cur_comp_blks", "Current Compression Blocks")
1536 curInitialBlks                  = uint32("cur_initial_blks", "Current Initial Blocks")
1537 curIntermediateBlks             = uint32("cur_inter_blks", "Current Intermediate Blocks")
1538 CurNumOfRTags                   = uint32("cur_num_of_r_tags", "Current Number of Resource Tags")
1539 CurrentBlockBeingDecompressed   = uint32("cur_blk_being_dcompress", "Current Block Being Decompressed")
1540 CurrentChangedFATs              = uint16("current_changed_fats", "Current Changed FAT Entries")
1541 CurrentEntries                  = uint32("current_entries", "Current Entries")
1542 CurrentFormType                 = uint8( "current_form_type", "Current Form Type" )
1543 CurrentLFSCounters              = uint32("current_lfs_counters", "Current LFS Counters")
1544 CurrentlyUsedRoutingBuffers     = uint16("currently_used_routing_buffers", "Currently Used Routing Buffers")
1545 CurrentOpenFiles                = uint16("current_open_files", "Current Open Files")
1546 CurrentReferenceID              = uint16("curr_ref_id", "Current Reference ID")
1547 CurrentServers                  = uint32("current_servers", "Current Servers")
1548 CurrentServerTime               = uint32("current_server_time", "Time Elapsed Since Server Was Brought Up")
1549 CurrentSpace                    = uint32("current_space", "Current Space")
1550 CurrentTransactionCount         = uint32("current_trans_count", "Current Transaction Count")
1551 CurrentUsedBinderyObjects       = uint16("current_used_bindery_objects", "Current Used Bindery Objects")
1552 CurrentUsedDynamicSpace         = uint32("current_used_dynamic_space", "Current Used Dynamic Space")
1553 CustomCnts                      = uint32("custom_cnts", "Custom Counters")
1554 CustomCount                     = uint32("custom_count", "Custom Count")
1555 CustomCounters                  = uint32("custom_counters", "Custom Counters")
1556 CustomString                    = nstring8("custom_string", "Custom String")
1557 CustomVariableValue             = uint32("custom_var_value", "Custom Variable Value")
1558
1559 Data                            = nstring8("data", "Data")
1560 DataForkFirstFAT                = uint32("data_fork_first_fat", "Data Fork First FAT Entry")
1561 DataForkLen                     = uint32("data_fork_len", "Data Fork Len")
1562 DataForkSize                    = uint32("data_fork_size", "Data Fork Size")
1563 DataSize                        = uint32("data_size", "Data Size")
1564 DataStream                      = val_string8("data_stream", "Data Stream", [
1565         [ 0x00, "Resource Fork or DOS" ],
1566         [ 0x01, "Data Fork" ],
1567 ])
1568 DataStreamName                  = nstring8("data_stream_name", "Data Stream Name")
1569 DataStreamNumber                = uint8("data_stream_number", "Data Stream Number")
1570 DataStreamsCount                = uint32("data_streams_count", "Data Streams Count")
1571 DataStreamSize                  = uint32("data_stream_size", "Size")
1572 DataStreamSpaceAlloc            = uint32( "data_stream_space_alloc", "Space Allocated for Data Stream" )
1573 Day                             = uint8("s_day", "Day")
1574 DayOfWeek                       = val_string8("s_day_of_week", "Day of Week", [
1575         [ 0x00, "Sunday" ],
1576         [ 0x01, "Monday" ],
1577         [ 0x02, "Tuesday" ],
1578         [ 0x03, "Wednesday" ],
1579         [ 0x04, "Thursday" ],
1580         [ 0x05, "Friday" ],
1581         [ 0x06, "Saturday" ],
1582 ])
1583 DeadMirrorTable                 = bytes("dead_mirror_table", "Dead Mirror Table", 32)
1584 DefinedDataStreams              = uint8("defined_data_streams", "Defined Data Streams")
1585 DefinedNameSpaces               = uint8("defined_name_spaces", "Defined Name Spaces")
1586 DeletedDate                     = uint16("deleted_date", "Deleted Date")
1587 DeletedDate.NWDate()
1588 DeletedFileTime                 = uint32( "deleted_file_time", "Deleted File Time")
1589 DeletedFileTime.Display("BASE_HEX")
1590 DeletedTime                     = uint16("deleted_time", "Deleted Time")
1591 DeletedTime.NWTime()
1592 DeletedID                       = uint32( "delete_id", "Deleted ID", BE)
1593 DeletedID.Display("BASE_HEX")
1594 DeleteExistingFileFlag          = val_string8("delete_existing_file_flag", "Delete Existing File Flag", [
1595         [ 0x00, "Do Not Delete Existing File" ],
1596         [ 0x01, "Delete Existing File" ],
1597 ])      
1598 DenyReadCount                   = uint16("deny_read_count", "Deny Read Count")
1599 DenyWriteCount                  = uint16("deny_write_count", "Deny Write Count")
1600 DescriptionStrings              = fw_string("description_string", "Description", 512)
1601 DesiredAccessRights             = bitfield16("desired_access_rights", "Desired Access Rights", [
1602         bf_boolean16(0x0001, "dsired_acc_rights_read_o", "Read Only"),
1603         bf_boolean16(0x0002, "dsired_acc_rights_write_o", "Write Only"),
1604         bf_boolean16(0x0004, "dsired_acc_rights_deny_r", "Deny Read"),
1605         bf_boolean16(0x0008, "dsired_acc_rights_deny_w", "Deny Write"),
1606         bf_boolean16(0x0010, "dsired_acc_rights_compat", "Compatibility"),
1607         bf_boolean16(0x0040, "dsired_acc_rights_w_thru", "File Write Through"),
1608         bf_boolean16(0x0400, "dsired_acc_rights_del_file_cls", "Delete File Close"),
1609 ])
1610 DesiredResponseCount            = uint16("desired_response_count", "Desired Response Count")
1611 DestDirHandle                   = uint8("dest_dir_handle", "Destination Directory Handle")
1612 DestNameSpace                   = val_string8("dest_name_space", "Destination Name Space", [
1613         [ 0x00, "DOS Name Space" ],
1614         [ 0x01, "MAC Name Space" ],
1615         [ 0x02, "NFS Name Space" ],
1616         [ 0x04, "Long Name Space" ],
1617 ])
1618 DestPathComponentCount          = uint8("dest_component_count", "Destination Path Component Count")
1619 DestPath                        = nstring8("dest_path", "Destination Path")
1620 DetachDuringProcessing          = uint16("detach_during_processing", "Detach During Processing")
1621 DetachForBadConnectionNumber    = uint16("detach_for_bad_connection_number", "Detach For Bad Connection Number")
1622 DirHandle                       = uint8("dir_handle", "Directory Handle")
1623 DirHandleName                   = uint8("dir_handle_name", "Handle Name")
1624 DirHandleLong                   = uint32("dir_handle_long", "Directory Handle")
1625 DirectoryAccessRights           = uint8("directory_access_rights", "Directory Access Rights")
1626 #
1627 # XXX - what do the bits mean here?
1628 #
1629 DirectoryAttributes             = uint8("directory_attributes", "Directory Attributes")
1630 DirectoryBase                   = uint32("dir_base", "Directory Base")
1631 DirectoryBase.Display("BASE_HEX")
1632 DirectoryCount                  = uint16("dir_count", "Directory Count")
1633 DirectoryEntryNumber            = uint32("directory_entry_number", "Directory Entry Number")
1634 DirectoryEntryNumber.Display('BASE_HEX')
1635 DirectoryEntryNumberWord        = uint16("directory_entry_number_word", "Directory Entry Number")
1636 DirectoryID                     = uint16("directory_id", "Directory ID", BE)
1637 DirectoryID.Display("BASE_HEX")
1638 DirectoryName                   = fw_string("directory_name", "Directory Name",12)
1639 DirectoryName14                 = fw_string("directory_name_14", "Directory Name", 14)
1640 DirectoryNameLen                = uint8("directory_name_len", "Directory Name Length")
1641 DirectoryNumber                 = uint32("directory_number", "Directory Number")
1642 DirectoryNumber.Display("BASE_HEX")
1643 DirectoryPath                   = fw_string("directory_path", "Directory Path", 16)
1644 DirectoryServicesObjectID       = uint32("directory_services_object_id", "Directory Services Object ID")
1645 DirectoryServicesObjectID.Display("BASE_HEX")
1646 DirectoryStamp                  = uint16("directory_stamp", "Directory Stamp (0xD1D1)")
1647 DirtyCacheBuffers               = uint16("dirty_cache_buffers", "Dirty Cache Buffers")
1648 DiskChannelNumber               = uint8("disk_channel_number", "Disk Channel Number")
1649 DiskChannelTable                = val_string8("disk_channel_table", "Disk Channel Table", [
1650         [ 0x01, "XT" ],
1651         [ 0x02, "AT" ],
1652         [ 0x03, "SCSI" ],
1653         [ 0x04, "Disk Coprocessor" ],
1654 ])
1655 DiskSpaceLimit                  = uint32("disk_space_limit", "Disk Space Limit")
1656 DMAChannelsUsed                 = uint32("dma_channels_used", "DMA Channels Used")
1657 DMInfoEntries                   = uint32("dm_info_entries", "DM Info Entries")
1658 DMInfoLevel                     = val_string8("dm_info_level", "DM Info Level", [
1659         [ 0x00, "Return Detailed DM Support Module Information" ],
1660         [ 0x01, "Return Number of DM Support Modules" ],
1661         [ 0x02, "Return DM Support Modules Names" ],
1662 ])      
1663 DMFlags                         = val_string8("dm_flags", "DM Flags", [
1664         [ 0x00, "OnLine Media" ],
1665         [ 0x01, "OffLine Media" ],
1666 ])
1667 DMmajorVersion                  = uint32("dm_major_version", "DM Major Version")
1668 DMminorVersion                  = uint32("dm_minor_version", "DM Minor Version")
1669 DMPresentFlag                   = val_string8("dm_present_flag", "Data Migration Present Flag", [
1670         [ 0x00, "Data Migration NLM is not loaded" ],
1671         [ 0x01, "Data Migration NLM has been loaded and is running" ],
1672 ])      
1673 DOSDirectoryBase                = uint32("dos_directory_base", "DOS Directory Base")
1674 DOSDirectoryBase.Display("BASE_HEX")
1675 DOSDirectoryEntry               = uint32("dos_directory_entry", "DOS Directory Entry")
1676 DOSDirectoryEntry.Display("BASE_HEX")
1677 DOSDirectoryEntryNumber         = uint32("dos_directory_entry_number", "DOS Directory Entry Number")
1678 DOSDirectoryEntryNumber.Display('BASE_HEX')
1679 DOSFileAttributes               = uint8("dos_file_attributes", "DOS File Attributes")
1680 DOSParentDirectoryEntry         = uint32("dos_parent_directory_entry", "DOS Parent Directory Entry")
1681 DOSParentDirectoryEntry.Display('BASE_HEX')
1682 DOSSequence                     = uint32("dos_sequence", "DOS Sequence")
1683 DriveCylinders                  = uint16("drive_cylinders", "Drive Cylinders")
1684 DriveDefinitionString           = fw_string("drive_definition_string", "Drive Definition", 64)
1685 DriveHeads                      = uint8("drive_heads", "Drive Heads")
1686 DriveMappingTable               = bytes("drive_mapping_table", "Drive Mapping Table", 32)
1687 DriveMirrorTable                = bytes("drive_mirror_table", "Drive Mirror Table", 32)
1688 DriverBoardName                 = stringz("driver_board_name", "Driver Board Name")
1689 DriveRemovableFlag              = val_string8("drive_removable_flag", "Drive Removable Flag", [
1690         [ 0x00, "Nonremovable" ],
1691         [ 0xff, "Removable" ],
1692 ])
1693 DriverLogicalName               = stringz("driver_log_name", "Driver Logical Name")
1694 DriverShortName                 = stringz("driver_short_name", "Driver Short Name")
1695 DriveSize                       = uint32("drive_size", "Drive Size")
1696 DstEAFlags                      = val_string16("dst_ea_flags", "Destination EA Flags", [
1697         [ 0x0000, "Return EAHandle,Information Level 0" ],
1698         [ 0x0001, "Return NetWareHandle,Information Level 0" ],
1699         [ 0x0002, "Return Volume/Directory Number,Information Level 0" ],
1700         [ 0x0004, "Return EAHandle,Close Handle on Error,Information Level 0" ],
1701         [ 0x0005, "Return NetWareHandle,Close Handle on Error,Information Level 0" ],
1702         [ 0x0006, "Return Volume/Directory Number,Close Handle on Error,Information Level 0" ],
1703         [ 0x0010, "Return EAHandle,Information Level 1" ],
1704         [ 0x0011, "Return NetWareHandle,Information Level 1" ],
1705         [ 0x0012, "Return Volume/Directory Number,Information Level 1" ],
1706         [ 0x0014, "Return EAHandle,Close Handle on Error,Information Level 1" ],
1707         [ 0x0015, "Return NetWareHandle,Close Handle on Error,Information Level 1" ],
1708         [ 0x0016, "Return Volume/Directory Number,Close Handle on Error,Information Level 1" ],
1709         [ 0x0020, "Return EAHandle,Information Level 2" ],
1710         [ 0x0021, "Return NetWareHandle,Information Level 2" ],
1711         [ 0x0022, "Return Volume/Directory Number,Information Level 2" ],
1712         [ 0x0024, "Return EAHandle,Close Handle on Error,Information Level 2" ],
1713         [ 0x0025, "Return NetWareHandle,Close Handle on Error,Information Level 2" ],
1714         [ 0x0026, "Return Volume/Directory Number,Close Handle on Error,Information Level 2" ],
1715         [ 0x0030, "Return EAHandle,Information Level 3" ],
1716         [ 0x0031, "Return NetWareHandle,Information Level 3" ],
1717         [ 0x0032, "Return Volume/Directory Number,Information Level 3" ],
1718         [ 0x0034, "Return EAHandle,Close Handle on Error,Information Level 3" ],
1719         [ 0x0035, "Return NetWareHandle,Close Handle on Error,Information Level 3" ],
1720         [ 0x0036, "Return Volume/Directory Number,Close Handle on Error,Information Level 3" ],
1721         [ 0x0040, "Return EAHandle,Information Level 4" ],
1722         [ 0x0041, "Return NetWareHandle,Information Level 4" ],
1723         [ 0x0042, "Return Volume/Directory Number,Information Level 4" ],
1724         [ 0x0044, "Return EAHandle,Close Handle on Error,Information Level 4" ],
1725         [ 0x0045, "Return NetWareHandle,Close Handle on Error,Information Level 4" ],
1726         [ 0x0046, "Return Volume/Directory Number,Close Handle on Error,Information Level 4" ],
1727         [ 0x0050, "Return EAHandle,Information Level 5" ],
1728         [ 0x0051, "Return NetWareHandle,Information Level 5" ],
1729         [ 0x0052, "Return Volume/Directory Number,Information Level 5" ],
1730         [ 0x0054, "Return EAHandle,Close Handle on Error,Information Level 5" ],
1731         [ 0x0055, "Return NetWareHandle,Close Handle on Error,Information Level 5" ],
1732         [ 0x0056, "Return Volume/Directory Number,Close Handle on Error,Information Level 5" ],
1733         [ 0x0060, "Return EAHandle,Information Level 6" ],
1734         [ 0x0061, "Return NetWareHandle,Information Level 6" ],
1735         [ 0x0062, "Return Volume/Directory Number,Information Level 6" ],
1736         [ 0x0064, "Return EAHandle,Close Handle on Error,Information Level 6" ],
1737         [ 0x0065, "Return NetWareHandle,Close Handle on Error,Information Level 6" ],
1738         [ 0x0066, "Return Volume/Directory Number,Close Handle on Error,Information Level 6" ],
1739         [ 0x0070, "Return EAHandle,Information Level 7" ],
1740         [ 0x0071, "Return NetWareHandle,Information Level 7" ],
1741         [ 0x0072, "Return Volume/Directory Number,Information Level 7" ],
1742         [ 0x0074, "Return EAHandle,Close Handle on Error,Information Level 7" ],
1743         [ 0x0075, "Return NetWareHandle,Close Handle on Error,Information Level 7" ],
1744         [ 0x0076, "Return Volume/Directory Number,Close Handle on Error,Information Level 7" ],
1745         [ 0x0080, "Return EAHandle,Information Level 0,Immediate Close Handle" ],
1746         [ 0x0081, "Return NetWareHandle,Information Level 0,Immediate Close Handle" ],
1747         [ 0x0082, "Return Volume/Directory Number,Information Level 0,Immediate Close Handle" ],
1748         [ 0x0084, "Return EAHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1749         [ 0x0085, "Return NetWareHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1750         [ 0x0086, "Return Volume/Directory Number,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1751         [ 0x0090, "Return EAHandle,Information Level 1,Immediate Close Handle" ],
1752         [ 0x0091, "Return NetWareHandle,Information Level 1,Immediate Close Handle" ],
1753         [ 0x0092, "Return Volume/Directory Number,Information Level 1,Immediate Close Handle" ],
1754         [ 0x0094, "Return EAHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1755         [ 0x0095, "Return NetWareHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1756         [ 0x0096, "Return Volume/Directory Number,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1757         [ 0x00a0, "Return EAHandle,Information Level 2,Immediate Close Handle" ],
1758         [ 0x00a1, "Return NetWareHandle,Information Level 2,Immediate Close Handle" ],
1759         [ 0x00a2, "Return Volume/Directory Number,Information Level 2,Immediate Close Handle" ],
1760         [ 0x00a4, "Return EAHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1761         [ 0x00a5, "Return NetWareHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1762         [ 0x00a6, "Return Volume/Directory Number,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1763         [ 0x00b0, "Return EAHandle,Information Level 3,Immediate Close Handle" ],
1764         [ 0x00b1, "Return NetWareHandle,Information Level 3,Immediate Close Handle" ],
1765         [ 0x00b2, "Return Volume/Directory Number,Information Level 3,Immediate Close Handle" ],
1766         [ 0x00b4, "Return EAHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1767         [ 0x00b5, "Return NetWareHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1768         [ 0x00b6, "Return Volume/Directory Number,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1769         [ 0x00c0, "Return EAHandle,Information Level 4,Immediate Close Handle" ],
1770         [ 0x00c1, "Return NetWareHandle,Information Level 4,Immediate Close Handle" ],
1771         [ 0x00c2, "Return Volume/Directory Number,Information Level 4,Immediate Close Handle" ],
1772         [ 0x00c4, "Return EAHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1773         [ 0x00c5, "Return NetWareHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1774         [ 0x00c6, "Return Volume/Directory Number,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1775         [ 0x00d0, "Return EAHandle,Information Level 5,Immediate Close Handle" ],
1776         [ 0x00d1, "Return NetWareHandle,Information Level 5,Immediate Close Handle" ],
1777         [ 0x00d2, "Return Volume/Directory Number,Information Level 5,Immediate Close Handle" ],
1778         [ 0x00d4, "Return EAHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1779         [ 0x00d5, "Return NetWareHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1780         [ 0x00d6, "Return Volume/Directory Number,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1781         [ 0x00e0, "Return EAHandle,Information Level 6,Immediate Close Handle" ],
1782         [ 0x00e1, "Return NetWareHandle,Information Level 6,Immediate Close Handle" ],
1783         [ 0x00e2, "Return Volume/Directory Number,Information Level 6,Immediate Close Handle" ],
1784         [ 0x00e4, "Return EAHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1785         [ 0x00e5, "Return NetWareHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1786         [ 0x00e6, "Return Volume/Directory Number,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1787         [ 0x00f0, "Return EAHandle,Information Level 7,Immediate Close Handle" ],
1788         [ 0x00f1, "Return NetWareHandle,Information Level 7,Immediate Close Handle" ],
1789         [ 0x00f2, "Return Volume/Directory Number,Information Level 7,Immediate Close Handle" ],
1790         [ 0x00f4, "Return EAHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1791         [ 0x00f5, "Return NetWareHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1792         [ 0x00f6, "Return Volume/Directory Number,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1793 ])
1794 dstNSIndicator                  = val_string16("dst_ns_indicator", "Destination Name Space Indicator", [
1795         [ 0x0000, "Return Source Name Space Information" ],
1796         [ 0x0001, "Return Destination Name Space Information" ],
1797 ])      
1798 DstQueueID                      = uint32("dst_queue_id", "Destination Queue ID")
1799 DuplicateRepliesSent            = uint16("duplicate_replies_sent", "Duplicate Replies Sent")
1800
1801 EAAccessFlag                    = bitfield16("ea_access_flag", "EA Access Flag", [
1802         bf_boolean16(0x0001, "ea_permanent_memory", "Permanent Memory"),
1803         bf_boolean16(0x0002, "ea_deep_freeze", "Deep Freeze"),
1804         bf_boolean16(0x0004, "ea_in_progress", "In Progress"),
1805         bf_boolean16(0x0008, "ea_header_being_enlarged", "Header Being Enlarged"),
1806         bf_boolean16(0x0010, "ea_new_tally_used", "New Tally Used"),
1807         bf_boolean16(0x0020, "ea_tally_need_update", "Tally Need Update"),
1808         bf_boolean16(0x0040, "ea_score_card_present", "Score Card Present"),
1809         bf_boolean16(0x0080, "ea_need_bit_flag", "EA Need Bit Flag"),
1810         bf_boolean16(0x0100, "ea_write_privileges", "Write Privileges"),
1811         bf_boolean16(0x0200, "ea_read_privileges", "Read Privileges"),
1812         bf_boolean16(0x0400, "ea_delete_privileges", "Delete Privileges"),
1813         bf_boolean16(0x0800, "ea_system_ea_only", "System EA Only"),
1814         bf_boolean16(0x1000, "ea_write_in_progress", "Write In Progress"),
1815 ])
1816 EABytesWritten                  = uint32("ea_bytes_written", "Bytes Written")
1817 EACount                         = uint32("ea_count", "Count")
1818 EADataSize                      = uint32("ea_data_size", "Data Size")
1819 EADataSizeDuplicated            = uint32("ea_data_size_duplicated", "Data Size Duplicated")
1820 EADuplicateCount                = uint32("ea_duplicate_count", "Duplicate Count")
1821 EAErrorCodes                    = val_string16("ea_error_codes", "EA Error Codes", [
1822         [ 0x0000, "SUCCESSFUL" ],
1823         [ 0x00c8, "ERR_MISSING_EA_KEY" ],
1824         [ 0x00c9, "ERR_EA_NOT_FOUND" ],
1825         [ 0x00ca, "ERR_INVALID_EA_HANDLE_TYPE" ],
1826         [ 0x00cb, "ERR_EA_NO_KEY_NO_DATA" ],
1827         [ 0x00cc, "ERR_EA_NUMBER_MISMATCH" ],
1828         [ 0x00cd, "ERR_EXTENT_NUMBER_OUT_OF_RANGE" ],
1829         [ 0x00ce, "ERR_EA_BAD_DIR_NUM" ],
1830         [ 0x00cf, "ERR_INVALID_EA_HANDLE" ],
1831         [ 0x00d0, "ERR_EA_POSITION_OUT_OF_RANGE" ],
1832         [ 0x00d1, "ERR_EA_ACCESS_DENIED" ],
1833         [ 0x00d2, "ERR_DATA_PAGE_ODD_SIZE" ],
1834         [ 0x00d3, "ERR_EA_VOLUME_NOT_MOUNTED" ],
1835         [ 0x00d4, "ERR_BAD_PAGE_BOUNDARY" ],
1836         [ 0x00d5, "ERR_INSPECT_FAILURE" ],
1837         [ 0x00d6, "ERR_EA_ALREADY_CLAIMED" ],
1838         [ 0x00d7, "ERR_ODD_BUFFER_SIZE" ],
1839         [ 0x00d8, "ERR_NO_SCORECARDS" ],
1840         [ 0x00d9, "ERR_BAD_EDS_SIGNATURE" ],
1841         [ 0x00da, "ERR_EA_SPACE_LIMIT" ],
1842         [ 0x00db, "ERR_EA_KEY_CORRUPT" ],
1843         [ 0x00dc, "ERR_EA_KEY_LIMIT" ],
1844         [ 0x00dd, "ERR_TALLY_CORRUPT" ],
1845 ])
1846 EAFlags                         = val_string16("ea_flags", "EA Flags", [
1847         [ 0x0000, "Return EAHandle,Information Level 0" ],
1848         [ 0x0001, "Return NetWareHandle,Information Level 0" ],
1849         [ 0x0002, "Return Volume/Directory Number,Information Level 0" ],
1850         [ 0x0004, "Return EAHandle,Close Handle on Error,Information Level 0" ],
1851         [ 0x0005, "Return NetWareHandle,Close Handle on Error,Information Level 0" ],
1852         [ 0x0006, "Return Volume/Directory Number,Close Handle on Error,Information Level 0" ],
1853         [ 0x0010, "Return EAHandle,Information Level 1" ],
1854         [ 0x0011, "Return NetWareHandle,Information Level 1" ],
1855         [ 0x0012, "Return Volume/Directory Number,Information Level 1" ],
1856         [ 0x0014, "Return EAHandle,Close Handle on Error,Information Level 1" ],
1857         [ 0x0015, "Return NetWareHandle,Close Handle on Error,Information Level 1" ],
1858         [ 0x0016, "Return Volume/Directory Number,Close Handle on Error,Information Level 1" ],
1859         [ 0x0020, "Return EAHandle,Information Level 2" ],
1860         [ 0x0021, "Return NetWareHandle,Information Level 2" ],
1861         [ 0x0022, "Return Volume/Directory Number,Information Level 2" ],
1862         [ 0x0024, "Return EAHandle,Close Handle on Error,Information Level 2" ],
1863         [ 0x0025, "Return NetWareHandle,Close Handle on Error,Information Level 2" ],
1864         [ 0x0026, "Return Volume/Directory Number,Close Handle on Error,Information Level 2" ],
1865         [ 0x0030, "Return EAHandle,Information Level 3" ],
1866         [ 0x0031, "Return NetWareHandle,Information Level 3" ],
1867         [ 0x0032, "Return Volume/Directory Number,Information Level 3" ],
1868         [ 0x0034, "Return EAHandle,Close Handle on Error,Information Level 3" ],
1869         [ 0x0035, "Return NetWareHandle,Close Handle on Error,Information Level 3" ],
1870         [ 0x0036, "Return Volume/Directory Number,Close Handle on Error,Information Level 3" ],
1871         [ 0x0040, "Return EAHandle,Information Level 4" ],
1872         [ 0x0041, "Return NetWareHandle,Information Level 4" ],
1873         [ 0x0042, "Return Volume/Directory Number,Information Level 4" ],
1874         [ 0x0044, "Return EAHandle,Close Handle on Error,Information Level 4" ],
1875         [ 0x0045, "Return NetWareHandle,Close Handle on Error,Information Level 4" ],
1876         [ 0x0046, "Return Volume/Directory Number,Close Handle on Error,Information Level 4" ],
1877         [ 0x0050, "Return EAHandle,Information Level 5" ],
1878         [ 0x0051, "Return NetWareHandle,Information Level 5" ],
1879         [ 0x0052, "Return Volume/Directory Number,Information Level 5" ],
1880         [ 0x0054, "Return EAHandle,Close Handle on Error,Information Level 5" ],
1881         [ 0x0055, "Return NetWareHandle,Close Handle on Error,Information Level 5" ],
1882         [ 0x0056, "Return Volume/Directory Number,Close Handle on Error,Information Level 5" ],
1883         [ 0x0060, "Return EAHandle,Information Level 6" ],
1884         [ 0x0061, "Return NetWareHandle,Information Level 6" ],
1885         [ 0x0062, "Return Volume/Directory Number,Information Level 6" ],
1886         [ 0x0064, "Return EAHandle,Close Handle on Error,Information Level 6" ],
1887         [ 0x0065, "Return NetWareHandle,Close Handle on Error,Information Level 6" ],
1888         [ 0x0066, "Return Volume/Directory Number,Close Handle on Error,Information Level 6" ],
1889         [ 0x0070, "Return EAHandle,Information Level 7" ],
1890         [ 0x0071, "Return NetWareHandle,Information Level 7" ],
1891         [ 0x0072, "Return Volume/Directory Number,Information Level 7" ],
1892         [ 0x0074, "Return EAHandle,Close Handle on Error,Information Level 7" ],
1893         [ 0x0075, "Return NetWareHandle,Close Handle on Error,Information Level 7" ],
1894         [ 0x0076, "Return Volume/Directory Number,Close Handle on Error,Information Level 7" ],
1895         [ 0x0080, "Return EAHandle,Information Level 0,Immediate Close Handle" ],
1896         [ 0x0081, "Return NetWareHandle,Information Level 0,Immediate Close Handle" ],
1897         [ 0x0082, "Return Volume/Directory Number,Information Level 0,Immediate Close Handle" ],
1898         [ 0x0084, "Return EAHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1899         [ 0x0085, "Return NetWareHandle,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1900         [ 0x0086, "Return Volume/Directory Number,Close Handle on Error,Information Level 0,Immediate Close Handle" ],
1901         [ 0x0090, "Return EAHandle,Information Level 1,Immediate Close Handle" ],
1902         [ 0x0091, "Return NetWareHandle,Information Level 1,Immediate Close Handle" ],
1903         [ 0x0092, "Return Volume/Directory Number,Information Level 1,Immediate Close Handle" ],
1904         [ 0x0094, "Return EAHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1905         [ 0x0095, "Return NetWareHandle,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1906         [ 0x0096, "Return Volume/Directory Number,Close Handle on Error,Information Level 1,Immediate Close Handle" ],
1907         [ 0x00a0, "Return EAHandle,Information Level 2,Immediate Close Handle" ],
1908         [ 0x00a1, "Return NetWareHandle,Information Level 2,Immediate Close Handle" ],
1909         [ 0x00a2, "Return Volume/Directory Number,Information Level 2,Immediate Close Handle" ],
1910         [ 0x00a4, "Return EAHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1911         [ 0x00a5, "Return NetWareHandle,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1912         [ 0x00a6, "Return Volume/Directory Number,Close Handle on Error,Information Level 2,Immediate Close Handle" ],
1913         [ 0x00b0, "Return EAHandle,Information Level 3,Immediate Close Handle" ],
1914         [ 0x00b1, "Return NetWareHandle,Information Level 3,Immediate Close Handle" ],
1915         [ 0x00b2, "Return Volume/Directory Number,Information Level 3,Immediate Close Handle" ],
1916         [ 0x00b4, "Return EAHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1917         [ 0x00b5, "Return NetWareHandle,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1918         [ 0x00b6, "Return Volume/Directory Number,Close Handle on Error,Information Level 3,Immediate Close Handle" ],
1919         [ 0x00c0, "Return EAHandle,Information Level 4,Immediate Close Handle" ],
1920         [ 0x00c1, "Return NetWareHandle,Information Level 4,Immediate Close Handle" ],
1921         [ 0x00c2, "Return Volume/Directory Number,Information Level 4,Immediate Close Handle" ],
1922         [ 0x00c4, "Return EAHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1923         [ 0x00c5, "Return NetWareHandle,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1924         [ 0x00c6, "Return Volume/Directory Number,Close Handle on Error,Information Level 4,Immediate Close Handle" ],
1925         [ 0x00d0, "Return EAHandle,Information Level 5,Immediate Close Handle" ],
1926         [ 0x00d1, "Return NetWareHandle,Information Level 5,Immediate Close Handle" ],
1927         [ 0x00d2, "Return Volume/Directory Number,Information Level 5,Immediate Close Handle" ],
1928         [ 0x00d4, "Return EAHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1929         [ 0x00d5, "Return NetWareHandle,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1930         [ 0x00d6, "Return Volume/Directory Number,Close Handle on Error,Information Level 5,Immediate Close Handle" ],
1931         [ 0x00e0, "Return EAHandle,Information Level 6,Immediate Close Handle" ],
1932         [ 0x00e1, "Return NetWareHandle,Information Level 6,Immediate Close Handle" ],
1933         [ 0x00e2, "Return Volume/Directory Number,Information Level 6,Immediate Close Handle" ],
1934         [ 0x00e4, "Return EAHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1935         [ 0x00e5, "Return NetWareHandle,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1936         [ 0x00e6, "Return Volume/Directory Number,Close Handle on Error,Information Level 6,Immediate Close Handle" ],
1937         [ 0x00f0, "Return EAHandle,Information Level 7,Immediate Close Handle" ],
1938         [ 0x00f1, "Return NetWareHandle,Information Level 7,Immediate Close Handle" ],
1939         [ 0x00f2, "Return Volume/Directory Number,Information Level 7,Immediate Close Handle" ],
1940         [ 0x00f4, "Return EAHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1941         [ 0x00f5, "Return NetWareHandle,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1942         [ 0x00f6, "Return Volume/Directory Number,Close Handle on Error,Information Level 7,Immediate Close Handle" ],
1943 ])
1944 EAHandle                        = uint32("ea_handle", "EA Handle")
1945 EAHandle.Display("BASE_HEX")
1946 EAHandleOrNetWareHandleOrVolume = uint32("ea_handle_or_netware_handle_or_volume", "EAHandle or NetWare Handle or Volume (see EAFlags)")
1947 EAHandleOrNetWareHandleOrVolume.Display("BASE_HEX")
1948 EAKey                           = nstring16("ea_key", "EA Key")
1949 EAKeySize                       = uint32("ea_key_size", "Key Size")
1950 EAKeySizeDuplicated             = uint32("ea_key_size_duplicated", "Key Size Duplicated")
1951 EAValue                         = nstring16("ea_value", "EA Value")
1952 EAValueRep                      = fw_string("ea_value_rep", "EA Value", 1)
1953 EAValueLength                   = uint16("ea_value_length", "Value Length")
1954 EchoSocket                      = uint16("echo_socket", "Echo Socket")
1955 EchoSocket.Display('BASE_HEX')
1956 EffectiveRights                 = bitfield8("effective_rights", "Effective Rights", [
1957         bf_boolean8(0x01, "effective_rights_read", "Read Rights"),
1958         bf_boolean8(0x02, "effective_rights_write", "Write Rights"),
1959         bf_boolean8(0x04, "effective_rights_open", "Open Rights"),
1960         bf_boolean8(0x08, "effective_rights_create", "Create Rights"),
1961         bf_boolean8(0x10, "effective_rights_delete", "Delete Rights"),
1962         bf_boolean8(0x20, "effective_rights_parental", "Parental Rights"),
1963         bf_boolean8(0x40, "effective_rights_search", "Search Rights"),
1964         bf_boolean8(0x80, "effective_rights_modify", "Modify Rights"),
1965 ])
1966 EnumInfoMask                    = bitfield8("enum_info_mask", "Return Information Mask", [
1967         bf_boolean8(0x01, "enum_info_transport", "Transport Information"),
1968         bf_boolean8(0x02, "enum_info_time", "Time Information"),
1969         bf_boolean8(0x04, "enum_info_name", "Name Information"),
1970         bf_boolean8(0x08, "enum_info_lock", "Lock Information"),
1971         bf_boolean8(0x10, "enum_info_print", "Print Information"),
1972         bf_boolean8(0x20, "enum_info_stats", "Statistical Information"),
1973         bf_boolean8(0x40, "enum_info_account", "Accounting Information"),
1974         bf_boolean8(0x80, "enum_info_auth", "Authentication Information"),
1975 ])
1976
1977 eventOffset                     = bytes("event_offset", "Event Offset", 8)
1978 eventOffset.Display("BASE_HEX")
1979 eventTime                       = uint32("event_time", "Event Time")
1980 eventTime.Display("BASE_HEX")
1981 ExpirationTime                  = uint32("expiration_time", "Expiration Time")
1982 ExpirationTime.Display('BASE_HEX')
1983 ExtAttrDataSize                 = uint32("ext_attr_data_size", "Extended Attributes Data Size")
1984 ExtAttrCount                    = uint32("ext_attr_count", "Extended Attributes Count")
1985 ExtAttrKeySize                  = uint32("ext_attr_key_size", "Extended Attributes Key Size")
1986 ExtendedAttributesDefined       = uint32("extended_attributes_defined", "Extended Attributes Defined")
1987 ExtendedAttributeExtantsUsed    = uint32("extended_attribute_extants_used", "Extended Attribute Extants Used")
1988 ExtendedInfo                    = bitfield16("ext_info", "Extended Return Information", [
1989         bf_boolean16(0x0001, "ext_info_update", "Update"),
1990         bf_boolean16(0x0002, "ext_info_dos_name", "DOS Name"),
1991         bf_boolean16(0x0004, "ext_info_flush", "Flush"),
1992         bf_boolean16(0x0008, "ext_info_parental", "Parental"),
1993         bf_boolean16(0x0010, "ext_info_mac_finder", "MAC Finder"),
1994         bf_boolean16(0x0020, "ext_info_sibling", "Sibling"),
1995         bf_boolean16(0x0040, "ext_info_effective", "Effective"),
1996         bf_boolean16(0x0080, "ext_info_mac_date", "MAC Date"),
1997         bf_boolean16(0x0100, "ext_info_access", "Last Access"),
1998         bf_boolean16(0x0400, "ext_info_64_bit_fs", "64 Bit File Sizes"),
1999         bf_boolean16(0x8000, "ext_info_newstyle", "New Style"),
2000 ])
2001 ExtRouterActiveFlag             = boolean8("ext_router_active_flag", "External Router Active Flag")
2002
2003 FailedAllocReqCnt               = uint32("failed_alloc_req", "Failed Alloc Request Count")
2004 FatalFATWriteErrors             = uint16("fatal_fat_write_errors", "Fatal FAT Write Errors")
2005 FATScanErrors                   = uint16("fat_scan_errors", "FAT Scan Errors")
2006 FATWriteErrors                  = uint16("fat_write_errors", "FAT Write Errors")
2007 FieldsLenTable                  = bytes("fields_len_table", "Fields Len Table", 32)
2008 FileCount                       = uint16("file_count", "File Count")
2009 FileDate                        = uint16("file_date", "File Date")
2010 FileDate.NWDate()
2011 FileDirWindow                   = uint16("file_dir_win", "File/Dir Window")
2012 FileDirWindow.Display("BASE_HEX")
2013 FileExecuteType                 = uint8("file_execute_type", "File Execute Type")
2014 FileExtendedAttributes          = val_string8("file_ext_attr", "File Extended Attributes", [
2015         [ 0x00, "Search On All Read Only Opens" ],
2016         [ 0x01, "Search On Read Only Opens With No Path" ],
2017         [ 0x02, "Shell Default Search Mode" ],
2018         [ 0x03, "Search On All Opens With No Path" ],
2019         [ 0x04, "Do Not Search" ],
2020         [ 0x05, "Reserved" ],
2021         [ 0x06, "Search On All Opens" ],
2022         [ 0x07, "Reserved" ],
2023         [ 0x08, "Search On All Read Only Opens/Indexed" ],
2024         [ 0x09, "Search On Read Only Opens With No Path/Indexed" ],
2025         [ 0x0a, "Shell Default Search Mode/Indexed" ],
2026         [ 0x0b, "Search On All Opens With No Path/Indexed" ],
2027         [ 0x0c, "Do Not Search/Indexed" ],
2028         [ 0x0d, "Indexed" ],
2029         [ 0x0e, "Search On All Opens/Indexed" ],
2030         [ 0x0f, "Indexed" ],
2031         [ 0x10, "Search On All Read Only Opens/Transactional" ],
2032         [ 0x11, "Search On Read Only Opens With No Path/Transactional" ],
2033         [ 0x12, "Shell Default Search Mode/Transactional" ],
2034         [ 0x13, "Search On All Opens With No Path/Transactional" ],
2035         [ 0x14, "Do Not Search/Transactional" ],
2036         [ 0x15, "Transactional" ],
2037         [ 0x16, "Search On All Opens/Transactional" ],
2038         [ 0x17, "Transactional" ],
2039         [ 0x18, "Search On All Read Only Opens/Indexed/Transactional" ],
2040         [ 0x19, "Search On Read Only Opens With No Path/Indexed/Transactional" ],
2041         [ 0x1a, "Shell Default Search Mode/Indexed/Transactional" ],
2042         [ 0x1b, "Search On All Opens With No Path/Indexed/Transactional" ],
2043         [ 0x1c, "Do Not Search/Indexed/Transactional" ],
2044         [ 0x1d, "Indexed/Transactional" ],
2045         [ 0x1e, "Search On All Opens/Indexed/Transactional" ],
2046         [ 0x1f, "Indexed/Transactional" ],
2047         [ 0x40, "Search On All Read Only Opens/Read Audit" ],
2048         [ 0x41, "Search On Read Only Opens With No Path/Read Audit" ],
2049         [ 0x42, "Shell Default Search Mode/Read Audit" ],
2050         [ 0x43, "Search On All Opens With No Path/Read Audit" ],
2051         [ 0x44, "Do Not Search/Read Audit" ],
2052         [ 0x45, "Read Audit" ],
2053         [ 0x46, "Search On All Opens/Read Audit" ],
2054         [ 0x47, "Read Audit" ],
2055         [ 0x48, "Search On All Read Only Opens/Indexed/Read Audit" ],
2056         [ 0x49, "Search On Read Only Opens With No Path/Indexed/Read Audit" ],
2057         [ 0x4a, "Shell Default Search Mode/Indexed/Read Audit" ],
2058         [ 0x4b, "Search On All Opens With No Path/Indexed/Read Audit" ],
2059         [ 0x4c, "Do Not Search/Indexed/Read Audit" ],
2060         [ 0x4d, "Indexed/Read Audit" ],
2061         [ 0x4e, "Search On All Opens/Indexed/Read Audit" ],
2062         [ 0x4f, "Indexed/Read Audit" ],
2063         [ 0x50, "Search On All Read Only Opens/Transactional/Read Audit" ],
2064         [ 0x51, "Search On Read Only Opens With No Path/Transactional/Read Audit" ],
2065         [ 0x52, "Shell Default Search Mode/Transactional/Read Audit" ],
2066         [ 0x53, "Search On All Opens With No Path/Transactional/Read Audit" ],
2067         [ 0x54, "Do Not Search/Transactional/Read Audit" ],
2068         [ 0x55, "Transactional/Read Audit" ],
2069         [ 0x56, "Search On All Opens/Transactional/Read Audit" ],
2070         [ 0x57, "Transactional/Read Audit" ],
2071         [ 0x58, "Search On All Read Only Opens/Indexed/Transactional/Read Audit" ],
2072         [ 0x59, "Search On Read Only Opens With No Path/Indexed/Transactional/Read Audit" ],
2073         [ 0x5a, "Shell Default Search Mode/Indexed/Transactional/Read Audit" ],
2074         [ 0x5b, "Search On All Opens With No Path/Indexed/Transactional/Read Audit" ],
2075         [ 0x5c, "Do Not Search/Indexed/Transactional/Read Audit" ],
2076         [ 0x5d, "Indexed/Transactional/Read Audit" ],
2077         [ 0x5e, "Search On All Opens/Indexed/Transactional/Read Audit" ],
2078         [ 0x5f, "Indexed/Transactional/Read Audit" ],
2079         [ 0x80, "Search On All Read Only Opens/Write Audit" ],
2080         [ 0x81, "Search On Read Only Opens With No Path/Write Audit" ],
2081         [ 0x82, "Shell Default Search Mode/Write Audit" ],
2082         [ 0x83, "Search On All Opens With No Path/Write Audit" ],
2083         [ 0x84, "Do Not Search/Write Audit" ],
2084         [ 0x85, "Write Audit" ],
2085         [ 0x86, "Search On All Opens/Write Audit" ],
2086         [ 0x87, "Write Audit" ],
2087         [ 0x88, "Search On All Read Only Opens/Indexed/Write Audit" ],
2088         [ 0x89, "Search On Read Only Opens With No Path/Indexed/Write Audit" ],
2089         [ 0x8a, "Shell Default Search Mode/Indexed/Write Audit" ],
2090         [ 0x8b, "Search On All Opens With No Path/Indexed/Write Audit" ],
2091         [ 0x8c, "Do Not Search/Indexed/Write Audit" ],
2092         [ 0x8d, "Indexed/Write Audit" ],
2093         [ 0x8e, "Search On All Opens/Indexed/Write Audit" ],
2094         [ 0x8f, "Indexed/Write Audit" ],
2095         [ 0x90, "Search On All Read Only Opens/Transactional/Write Audit" ],
2096         [ 0x91, "Search On Read Only Opens With No Path/Transactional/Write Audit" ],
2097         [ 0x92, "Shell Default Search Mode/Transactional/Write Audit" ],
2098         [ 0x93, "Search On All Opens With No Path/Transactional/Write Audit" ],
2099         [ 0x94, "Do Not Search/Transactional/Write Audit" ],
2100         [ 0x95, "Transactional/Write Audit" ],
2101         [ 0x96, "Search On All Opens/Transactional/Write Audit" ],
2102         [ 0x97, "Transactional/Write Audit" ],
2103         [ 0x98, "Search On All Read Only Opens/Indexed/Transactional/Write Audit" ],
2104         [ 0x99, "Search On Read Only Opens With No Path/Indexed/Transactional/Write Audit" ],
2105         [ 0x9a, "Shell Default Search Mode/Indexed/Transactional/Write Audit" ],
2106         [ 0x9b, "Search On All Opens With No Path/Indexed/Transactional/Write Audit" ],
2107         [ 0x9c, "Do Not Search/Indexed/Transactional/Write Audit" ],
2108         [ 0x9d, "Indexed/Transactional/Write Audit" ],
2109         [ 0x9e, "Search On All Opens/Indexed/Transactional/Write Audit" ],
2110         [ 0x9f, "Indexed/Transactional/Write Audit" ],
2111         [ 0xa0, "Search On All Read Only Opens/Read Audit/Write Audit" ],
2112         [ 0xa1, "Search On Read Only Opens With No Path/Read Audit/Write Audit" ],
2113         [ 0xa2, "Shell Default Search Mode/Read Audit/Write Audit" ],
2114         [ 0xa3, "Search On All Opens With No Path/Read Audit/Write Audit" ],
2115         [ 0xa4, "Do Not Search/Read Audit/Write Audit" ],
2116         [ 0xa5, "Read Audit/Write Audit" ],
2117         [ 0xa6, "Search On All Opens/Read Audit/Write Audit" ],
2118         [ 0xa7, "Read Audit/Write Audit" ],
2119         [ 0xa8, "Search On All Read Only Opens/Indexed/Read Audit/Write Audit" ],
2120         [ 0xa9, "Search On Read Only Opens With No Path/Indexed/Read Audit/Write Audit" ],
2121         [ 0xaa, "Shell Default Search Mode/Indexed/Read Audit/Write Audit" ],
2122         [ 0xab, "Search On All Opens With No Path/Indexed/Read Audit/Write Audit" ],
2123         [ 0xac, "Do Not Search/Indexed/Read Audit/Write Audit" ],
2124         [ 0xad, "Indexed/Read Audit/Write Audit" ],
2125         [ 0xae, "Search On All Opens/Indexed/Read Audit/Write Audit" ],
2126         [ 0xaf, "Indexed/Read Audit/Write Audit" ],
2127         [ 0xb0, "Search On All Read Only Opens/Transactional/Read Audit/Write Audit" ],
2128         [ 0xb1, "Search On Read Only Opens With No Path/Transactional/Read Audit/Write Audit" ],
2129         [ 0xb2, "Shell Default Search Mode/Transactional/Read Audit/Write Audit" ],
2130         [ 0xb3, "Search On All Opens With No Path/Transactional/Read Audit/Write Audit" ],
2131         [ 0xb4, "Do Not Search/Transactional/Read Audit/Write Audit" ],
2132         [ 0xb5, "Transactional/Read Audit/Write Audit" ],
2133         [ 0xb6, "Search On All Opens/Transactional/Read Audit/Write Audit" ],
2134         [ 0xb7, "Transactional/Read Audit/Write Audit" ],
2135         [ 0xb8, "Search On All Read Only Opens/Indexed/Transactional/Read Audit/Write Audit" ],
2136         [ 0xb9, "Search On Read Only Opens With No Path/Indexed/Transactional/Read Audit/Write Audit" ],
2137         [ 0xba, "Shell Default Search Mode/Indexed/Transactional/Read Audit/Write Audit" ],
2138         [ 0xbb, "Search On All Opens With No Path/Indexed/Transactional/Read Audit/Write Audit" ],
2139         [ 0xbc, "Do Not Search/Indexed/Transactional/Read Audit/Write Audit" ],
2140         [ 0xbd, "Indexed/Transactional/Read Audit/Write Audit" ],
2141         [ 0xbe, "Search On All Opens/Indexed/Transactional/Read Audit/Write Audit" ],
2142         [ 0xbf, "Indexed/Transactional/Read Audit/Write Audit" ],
2143 ])
2144 fileFlags                       = uint32("file_flags", "File Flags")
2145 FileHandle                      = bytes("file_handle", "File Handle", 6)
2146 FileLimbo                       = uint32("file_limbo", "File Limbo")
2147 FileListCount                   = uint32("file_list_count", "File List Count")
2148 FileLock                        = val_string8("file_lock", "File Lock", [
2149         [ 0x00, "Not Locked" ],
2150         [ 0xfe, "Locked by file lock" ],
2151         [ 0xff, "Unknown" ],
2152 ])
2153 FileLockCount                   = uint16("file_lock_count", "File Lock Count")
2154 FileMode                        = uint8("file_mode", "File Mode")
2155 FileName                        = nstring8("file_name", "Filename")
2156 FileName12                      = fw_string("file_name_12", "Filename", 12)
2157 FileName14                      = fw_string("file_name_14", "Filename", 14)
2158 FileNameLen                     = uint8("file_name_len", "Filename Length")
2159 FileOffset                      = uint32("file_offset", "File Offset")
2160 FilePath                        = nstring8("file_path", "File Path")
2161 FileSize                        = uint32("file_size", "File Size", BE)
2162 FileSystemID                    = uint8("file_system_id", "File System ID")
2163 FileTime                        = uint16("file_time", "File Time")
2164 FileTime.NWTime()
2165 FileWriteFlags                  = val_string8("file_write_flags", "File Write Flags", [
2166         [ 0x01, "Writing" ],
2167         [ 0x02, "Write aborted" ],
2168 ])
2169 FileWriteState                  = val_string8("file_write_state", "File Write State", [
2170         [ 0x00, "Not Writing" ],
2171         [ 0x01, "Write in Progress" ],
2172         [ 0x02, "Write Being Stopped" ],
2173 ])
2174 Filler                          = uint8("filler", "Filler")
2175 FinderAttr                      = bitfield16("finder_attr", "Finder Info Attributes", [
2176         bf_boolean16(0x0001, "finder_attr_desktop", "Object on Desktop"),
2177         bf_boolean16(0x2000, "finder_attr_invisible", "Object is Invisible"),
2178         bf_boolean16(0x4000, "finder_attr_bundle", "Object Has Bundle"),
2179 ])
2180 FixedBitMask                    = uint32("fixed_bit_mask", "Fixed Bit Mask")
2181 FixedBitsDefined                = uint16("fixed_bits_defined", "Fixed Bits Defined")
2182 FlagBits                        = uint8("flag_bits", "Flag Bits")
2183 Flags                           = uint8("flags", "Flags")
2184 FlagsDef                        = uint16("flags_def", "Flags")
2185 FlushTime                       = uint32("flush_time", "Flush Time")
2186 FolderFlag                      = val_string8("folder_flag", "Folder Flag", [
2187         [ 0x00, "Not a Folder" ],
2188         [ 0x01, "Folder" ],
2189 ])
2190 ForkCount                       = uint8("fork_count", "Fork Count")
2191 ForkIndicator                   = val_string8("fork_indicator", "Fork Indicator", [
2192         [ 0x00, "Data Fork" ],
2193         [ 0x01, "Resource Fork" ],
2194 ])
2195 ForceFlag                       = val_string8("force_flag", "Force Server Down Flag", [
2196         [ 0x00, "Down Server if No Files Are Open" ],
2197         [ 0xff, "Down Server Immediately, Auto-Close Open Files" ],
2198 ])
2199 ForgedDetachedRequests          = uint16("forged_detached_requests", "Forged Detached Requests")
2200 FormType                        = uint16( "form_type", "Form Type" )
2201 FormTypeCnt                     = uint32("form_type_count", "Form Types Count")
2202 FoundSomeMem                    = uint32("found_some_mem", "Found Some Memory")
2203 FractionalSeconds               = uint32("fractional_time", "Fractional Time in Seconds")
2204 FraggerHandle                   = uint32("fragger_handle", "Fragment Handle")
2205 FraggerHandle.Display('BASE_HEX')
2206 FragmentWriteOccurred           = uint16("fragment_write_occurred", "Fragment Write Occurred")
2207 FragSize                        = uint32("frag_size", "Fragment Size")
2208 FreeableLimboSectors            = uint32("freeable_limbo_sectors", "Freeable Limbo Sectors")
2209 FreeBlocks                      = uint32("free_blocks", "Free Blocks")
2210 FreedClusters                   = uint32("freed_clusters", "Freed Clusters")
2211 FreeDirectoryEntries            = uint16("free_directory_entries", "Free Directory Entries")
2212 FSEngineFlag                    = boolean8("fs_engine_flag", "FS Engine Flag")
2213 FullName                        = fw_string("full_name", "Full Name", 39)
2214
2215 GetSetFlag                      = val_string8("get_set_flag", "Get Set Flag", [
2216         [ 0x00, "Get the default support module ID" ],
2217         [ 0x01, "Set the default support module ID" ],
2218 ])      
2219 GUID                            = bytes("guid", "GUID", 16)
2220 GUID.Display("BASE_HEX")
2221
2222 HandleFlag                      = val_string8("handle_flag", "Handle Flag", [
2223         [ 0x00, "Short Directory Handle" ],
2224         [ 0x01, "Directory Base" ],
2225         [ 0xFF, "No Handle Present" ],
2226 ])
2227 HandleInfoLevel                 = val_string8("handle_info_level", "Handle Info Level", [
2228         [ 0x00, "Get Limited Information from a File Handle" ],
2229         [ 0x01, "Get Limited Information from a File Handle Using a Name Space" ],
2230         [ 0x02, "Get Information from a File Handle" ],
2231         [ 0x03, "Get Information from a Directory Handle" ],
2232         [ 0x04, "Get Complete Information from a Directory Handle" ],
2233         [ 0x05, "Get Complete Information from a File Handle" ],
2234 ])
2235 HeldBytesRead                   = bytes("held_bytes_read", "Held Bytes Read", 6)
2236 HeldBytesWritten                = bytes("held_bytes_write", "Held Bytes Written", 6)
2237 HeldConnectTimeInMinutes        = uint32("held_conn_time", "Held Connect Time in Minutes")
2238 HeldRequests                    = uint32("user_info_held_req", "Held Requests")
2239 HoldAmount                      = uint32("hold_amount", "Hold Amount")
2240 HoldCancelAmount                = uint32("hold_cancel_amount", "Hold Cancel Amount")
2241 HolderID                        = uint32("holder_id", "Holder ID")
2242 HolderID.Display("BASE_HEX")
2243 HoldTime                        = uint32("hold_time", "Hold Time")
2244 HopsToNet                       = uint16("hops_to_net", "Hop Count")
2245 HorizLocation                   = uint16("horiz_location", "Horizontal Location")
2246 HostAddress                     = bytes("host_address", "Host Address", 6)
2247 HotFixBlocksAvailable           = uint16("hot_fix_blocks_available", "Hot Fix Blocks Available")
2248 HotFixDisabled                  = val_string8("hot_fix_disabled", "Hot Fix Disabled", [
2249         [ 0x00, "Enabled" ],
2250         [ 0x01, "Disabled" ],
2251 ])
2252 HotFixTableSize                 = uint16("hot_fix_table_size", "Hot Fix Table Size")
2253 HotFixTableStart                = uint32("hot_fix_table_start", "Hot Fix Table Start")
2254 Hour                            = uint8("s_hour", "Hour")
2255 HugeBitMask                     = uint32("huge_bit_mask", "Huge Bit Mask")
2256 HugeBitsDefined                 = uint16("huge_bits_defined", "Huge Bits Defined")
2257 HugeData                        = nstring8("huge_data", "Huge Data")
2258 HugeDataUsed                    = uint32("huge_data_used", "Huge Data Used")
2259 HugeStateInfo                   = bytes("huge_state_info", "Huge State Info", 16)
2260
2261 IdentificationNumber            = uint32("identification_number", "Identification Number")
2262 IgnoredRxPkts                   = uint32("ignored_rx_pkts", "Ignored Receive Packets")
2263 IncomingPacketDiscardedNoDGroup = uint16("incoming_packet_discarded_no_dgroup", "Incoming Packet Discarded No DGroup")
2264 IndexNumber                     = uint8("index_number", "Index Number")
2265 InfoCount                       = uint16("info_count", "Info Count")
2266 InfoFlags                       = bitfield32("info_flags", "Info Flags", [
2267         bf_boolean32(0x10000000, "info_flags_security", "Return Object Security"),
2268         bf_boolean32(0x20000000, "info_flags_flags", "Return Object Flags"),
2269         bf_boolean32(0x40000000, "info_flags_type", "Return Object Type"),
2270         bf_boolean32(0x80000000, "info_flags_name", "Return Object Name"),
2271 ])
2272 InfoLevelNumber                 = val_string8("info_level_num", "Information Level Number", [
2273         [ 0x01, "Volume Information Definition" ],
2274         [ 0x02, "Volume Information 2 Definition" ],
2275 ])        
2276 InfoMask                        = bitfield32("info_mask", "Information Mask", [
2277         bf_boolean32(0x00000001, "info_flags_dos_time", "DOS Time"),
2278         bf_boolean32(0x00000002, "info_flags_ref_count", "Reference Count"),
2279         bf_boolean32(0x00000004, "info_flags_dos_attr", "DOS Attributes"),
2280         bf_boolean32(0x00000008, "info_flags_ids", "ID's"),
2281         bf_boolean32(0x00000010, "info_flags_ds_sizes", "Data Stream Sizes"),
2282         bf_boolean32(0x00000020, "info_flags_ns_attr", "Name Space Attributes"),
2283         bf_boolean32(0x00000040, "info_flags_ea_present", "EA Present Flag"),
2284         bf_boolean32(0x00000080, "info_flags_all_attr", "All Attributes"),
2285         bf_boolean32(0x00000100, "info_flags_all_dirbase_num", "All Directory Base Numbers"),
2286         bf_boolean32(0x00000200, "info_flags_max_access_mask", "Maximum Access Mask"),
2287         bf_boolean32(0x00000400, "info_flags_flush_time", "Flush Time"),
2288         bf_boolean32(0x00000800, "info_flags_prnt_base_id", "Parent Base ID"),
2289         bf_boolean32(0x00001000, "info_flags_mac_finder", "Mac Finder Information"),
2290         bf_boolean32(0x00002000, "info_flags_sibling_cnt", "Sibling Count"),
2291         bf_boolean32(0x00004000, "info_flags_effect_rights", "Effective Rights"),
2292         bf_boolean32(0x00008000, "info_flags_mac_time", "Mac Time"),
2293         bf_boolean32(0x20000000, "info_mask_dosname", "DOS Name"),
2294         bf_boolean32(0x40000000, "info_mask_c_name_space", "Creator Name Space & Name"),
2295         bf_boolean32(0x80000000, "info_mask_name", "Name"),
2296 ])
2297 InheritedRightsMask             = bitfield16("inherited_rights_mask", "Inherited Rights Mask", [ 
2298         bf_boolean16(0x0001, "inh_rights_read", "Read Rights"),
2299         bf_boolean16(0x0002, "inh_rights_write", "Write Rights"),
2300         bf_boolean16(0x0004, "inh_rights_open", "Open Rights"),
2301         bf_boolean16(0x0008, "inh_rights_create", "Create Rights"),
2302         bf_boolean16(0x0010, "inh_rights_delete", "Delete Rights"),
2303         bf_boolean16(0x0020, "inh_rights_parent", "Change Access"),
2304         bf_boolean16(0x0040, "inh_rights_search", "See Files Flag"),
2305         bf_boolean16(0x0080, "inh_rights_modify", "Modify Rights"),
2306         bf_boolean16(0x0100, "inh_rights_supervisor", "Supervisor"),
2307 ])
2308 InheritanceRevokeMask           = bitfield16("inheritance_revoke_mask", "Revoke Rights Mask", [
2309         bf_boolean16(0x0001, "inh_revoke_read", "Read Rights"),
2310         bf_boolean16(0x0002, "inh_revoke_write", "Write Rights"),
2311         bf_boolean16(0x0004, "inh_revoke_open", "Open Rights"),
2312         bf_boolean16(0x0008, "inh_revoke_create", "Create Rights"),
2313         bf_boolean16(0x0010, "inh_revoke_delete", "Delete Rights"),
2314         bf_boolean16(0x0020, "inh_revoke_parent", "Change Access"),
2315         bf_boolean16(0x0040, "inh_revoke_search", "See Files Flag"),
2316         bf_boolean16(0x0080, "inh_revoke_modify", "Modify Rights"),
2317         bf_boolean16(0x0100, "inh_revoke_supervisor", "Supervisor"),
2318 ])
2319 InitialSemaphoreValue           = uint8("initial_semaphore_value", "Initial Semaphore Value")
2320 InspectSize                     = uint32("inspect_size", "Inspect Size")
2321 InternetBridgeVersion           = uint8("internet_bridge_version", "Internet Bridge Version")
2322 InterruptNumbersUsed            = uint32("interrupt_numbers_used", "Interrupt Numbers Used")
2323 InUse                           = uint32("in_use", "Bytes in Use")
2324 IOAddressesUsed                 = bytes("io_addresses_used", "IO Addresses Used", 8)
2325 IOErrorCount                    = uint16("io_error_count", "IO Error Count")
2326 IOEngineFlag                    = boolean8("io_engine_flag", "IO Engine Flag")
2327 IPXNotMyNetwork                 = uint16("ipx_not_my_network", "IPX Not My Network")
2328 ItemsChanged                    = uint32("items_changed", "Items Changed")
2329 ItemsChecked                    = uint32("items_checked", "Items Checked")
2330 ItemsCount                      = uint32("items_count", "Items Count")
2331 itemsInList                     = uint32("items_in_list", "Items in List")
2332 ItemsInPacket                   = uint32("items_in_packet", "Items in Packet")
2333
2334 JobControlFlags                 = bitfield8("job_control_flags", "Job Control Flags", [
2335         bf_boolean8(0x08, "job_control_job_recovery", "Job Recovery"),
2336         bf_boolean8(0x10, "job_control_reservice", "ReService Job"),
2337         bf_boolean8(0x20, "job_control_file_open", "File Open"),
2338         bf_boolean8(0x40, "job_control_user_hold", "User Hold"),
2339         bf_boolean8(0x80, "job_control_operator_hold", "Operator Hold"),
2340
2341 ])
2342 JobControlFlagsWord             = bitfield16("job_control_flags_word", "Job Control Flags", [
2343         bf_boolean16(0x0008, "job_control1_job_recovery", "Job Recovery"),
2344         bf_boolean16(0x0010, "job_control1_reservice", "ReService Job"),
2345         bf_boolean16(0x0020, "job_control1_file_open", "File Open"),
2346         bf_boolean16(0x0040, "job_control1_user_hold", "User Hold"),
2347         bf_boolean16(0x0080, "job_control1_operator_hold", "Operator Hold"),
2348
2349 ])
2350 JobCount                        = uint32("job_count", "Job Count")
2351 JobFileHandle                   = bytes("job_file_handle", "Job File Handle", 6)
2352 JobFileHandleLong               = uint32("job_file_handle_long", "Job File Handle")
2353 JobFileHandleLong.Display("BASE_HEX")
2354 JobFileName                     = fw_string("job_file_name", "Job File Name", 14)
2355 JobPosition                     = uint8("job_position", "Job Position")
2356 JobPositionWord                 = uint16("job_position_word", "Job Position")
2357 JobNumber                       = uint16("job_number", "Job Number", BE )
2358 JobNumberLong                   = uint32("job_number_long", "Job Number", BE )
2359 JobNumberList                   = uint32("job_number_list", "Job Number List")
2360 JobType                         = uint16("job_type", "Job Type", BE )
2361
2362 LANCustomVariablesCount         = uint32("lan_cust_var_count", "LAN Custom Variables Count")
2363 LANdriverBoardInstance          = uint16("lan_drv_bd_inst", "LAN Driver Board Instance")
2364 LANdriverBoardNumber            = uint16("lan_drv_bd_num", "LAN Driver Board Number")
2365 LANdriverCardID                 = uint16("lan_drv_card_id", "LAN Driver Card ID")
2366 LANdriverCardName               = fw_string("lan_drv_card_name", "LAN Driver Card Name", 28)
2367 LANdriverCFG_MajorVersion       = uint8("lan_dvr_cfg_major_vrs", "LAN Driver Config - Major Version")
2368 LANdriverCFG_MinorVersion       = uint8("lan_dvr_cfg_minor_vrs", "LAN Driver Config - Minor Version")
2369 LANdriverDMAUsage1              = uint8("lan_drv_dma_usage1", "Primary DMA Channel")
2370 LANdriverDMAUsage2              = uint8("lan_drv_dma_usage2", "Secondary DMA Channel")
2371 LANdriverFlags                  = uint16("lan_drv_flags", "LAN Driver Flags")
2372 LANdriverFlags.Display("BASE_HEX")        
2373 LANdriverInterrupt1             = uint8("lan_drv_interrupt1", "Primary Interrupt Vector")
2374 LANdriverInterrupt2             = uint8("lan_drv_interrupt2", "Secondary Interrupt Vector")
2375 LANdriverIOPortsAndRanges1      = uint16("lan_drv_io_ports_and_ranges_1", "Primary Base I/O Port")
2376 LANdriverIOPortsAndRanges2      = uint16("lan_drv_io_ports_and_ranges_2", "Number of I/O Ports")
2377 LANdriverIOPortsAndRanges3      = uint16("lan_drv_io_ports_and_ranges_3", "Secondary Base I/O Port")
2378 LANdriverIOPortsAndRanges4      = uint16("lan_drv_io_ports_and_ranges_4", "Number of I/O Ports")
2379 LANdriverIOReserved             = bytes("lan_drv_io_reserved", "LAN Driver IO Reserved", 14)
2380 LANdriverLineSpeed              = uint16("lan_drv_line_speed", "LAN Driver Line Speed")
2381 LANdriverLink                   = uint32("lan_drv_link", "LAN Driver Link")
2382 LANdriverLogicalName            = bytes("lan_drv_log_name", "LAN Driver Logical Name", 18)
2383 LANdriverMajorVersion           = uint8("lan_drv_major_ver", "LAN Driver Major Version")
2384 LANdriverMaximumSize            = uint32("lan_drv_max_size", "LAN Driver Maximum Size")
2385 LANdriverMaxRecvSize            = uint32("lan_drv_max_rcv_size", "LAN Driver Maximum Receive Size")
2386 LANdriverMediaID                = uint16("lan_drv_media_id", "LAN Driver Media ID")
2387 LANdriverMediaType              = fw_string("lan_drv_media_type", "LAN Driver Media Type", 40)
2388 LANdriverMemoryDecode0          = uint32("lan_drv_mem_decode_0", "LAN Driver Memory Decode 0")
2389 LANdriverMemoryDecode1          = uint32("lan_drv_mem_decode_1", "LAN Driver Memory Decode 1")
2390 LANdriverMemoryLength0          = uint16("lan_drv_mem_length_0", "LAN Driver Memory Length 0")
2391 LANdriverMemoryLength1          = uint16("lan_drv_mem_length_1", "LAN Driver Memory Length 1")
2392 LANdriverMinorVersion           = uint8("lan_drv_minor_ver", "LAN Driver Minor Version")
2393 LANdriverModeFlags              = val_string8("lan_dvr_mode_flags", "LAN Driver Mode Flags", [
2394         [0x80, "Canonical Address" ],
2395         [0x81, "Canonical Address" ],
2396         [0x82, "Canonical Address" ],
2397         [0x83, "Canonical Address" ],
2398         [0x84, "Canonical Address" ],
2399         [0x85, "Canonical Address" ],
2400         [0x86, "Canonical Address" ],
2401         [0x87, "Canonical Address" ],
2402         [0x88, "Canonical Address" ],
2403         [0x89, "Canonical Address" ],
2404         [0x8a, "Canonical Address" ],
2405         [0x8b, "Canonical Address" ],
2406         [0x8c, "Canonical Address" ],
2407         [0x8d, "Canonical Address" ],
2408         [0x8e, "Canonical Address" ],
2409         [0x8f, "Canonical Address" ],
2410         [0x90, "Canonical Address" ],
2411         [0x91, "Canonical Address" ],
2412         [0x92, "Canonical Address" ],
2413         [0x93, "Canonical Address" ],
2414         [0x94, "Canonical Address" ],
2415         [0x95, "Canonical Address" ],
2416         [0x96, "Canonical Address" ],
2417         [0x97, "Canonical Address" ],
2418         [0x98, "Canonical Address" ],
2419         [0x99, "Canonical Address" ],
2420         [0x9a, "Canonical Address" ],
2421         [0x9b, "Canonical Address" ],
2422         [0x9c, "Canonical Address" ],
2423         [0x9d, "Canonical Address" ],
2424         [0x9e, "Canonical Address" ],
2425         [0x9f, "Canonical Address" ],
2426         [0xa0, "Canonical Address" ],
2427         [0xa1, "Canonical Address" ],
2428         [0xa2, "Canonical Address" ],
2429         [0xa3, "Canonical Address" ],
2430         [0xa4, "Canonical Address" ],
2431         [0xa5, "Canonical Address" ],
2432         [0xa6, "Canonical Address" ],
2433         [0xa7, "Canonical Address" ],
2434         [0xa8, "Canonical Address" ],
2435         [0xa9, "Canonical Address" ],
2436         [0xaa, "Canonical Address" ],
2437         [0xab, "Canonical Address" ],
2438         [0xac, "Canonical Address" ],
2439         [0xad, "Canonical Address" ],
2440         [0xae, "Canonical Address" ],
2441         [0xaf, "Canonical Address" ],
2442         [0xb0, "Canonical Address" ],
2443         [0xb1, "Canonical Address" ],
2444         [0xb2, "Canonical Address" ],
2445         [0xb3, "Canonical Address" ],
2446         [0xb4, "Canonical Address" ],
2447         [0xb5, "Canonical Address" ],
2448         [0xb6, "Canonical Address" ],
2449         [0xb7, "Canonical Address" ],
2450         [0xb8, "Canonical Address" ],
2451         [0xb9, "Canonical Address" ],
2452         [0xba, "Canonical Address" ],
2453         [0xbb, "Canonical Address" ],
2454         [0xbc, "Canonical Address" ],
2455         [0xbd, "Canonical Address" ],
2456         [0xbe, "Canonical Address" ],
2457         [0xbf, "Canonical Address" ],
2458         [0xc0, "Non-Canonical Address" ],
2459         [0xc1, "Non-Canonical Address" ],
2460         [0xc2, "Non-Canonical Address" ],
2461         [0xc3, "Non-Canonical Address" ],
2462         [0xc4, "Non-Canonical Address" ],
2463         [0xc5, "Non-Canonical Address" ],
2464         [0xc6, "Non-Canonical Address" ],
2465         [0xc7, "Non-Canonical Address" ],
2466         [0xc8, "Non-Canonical Address" ],
2467         [0xc9, "Non-Canonical Address" ],
2468         [0xca, "Non-Canonical Address" ],
2469         [0xcb, "Non-Canonical Address" ],
2470         [0xcc, "Non-Canonical Address" ],
2471         [0xcd, "Non-Canonical Address" ],
2472         [0xce, "Non-Canonical Address" ],
2473         [0xcf, "Non-Canonical Address" ],
2474         [0xd0, "Non-Canonical Address" ],
2475         [0xd1, "Non-Canonical Address" ],
2476         [0xd2, "Non-Canonical Address" ],
2477         [0xd3, "Non-Canonical Address" ],
2478         [0xd4, "Non-Canonical Address" ],
2479         [0xd5, "Non-Canonical Address" ],
2480         [0xd6, "Non-Canonical Address" ],
2481         [0xd7, "Non-Canonical Address" ],
2482         [0xd8, "Non-Canonical Address" ],
2483         [0xd9, "Non-Canonical Address" ],
2484         [0xda, "Non-Canonical Address" ],
2485         [0xdb, "Non-Canonical Address" ],
2486         [0xdc, "Non-Canonical Address" ],
2487         [0xdd, "Non-Canonical Address" ],
2488         [0xde, "Non-Canonical Address" ],
2489         [0xdf, "Non-Canonical Address" ],
2490         [0xe0, "Non-Canonical Address" ],
2491         [0xe1, "Non-Canonical Address" ],
2492         [0xe2, "Non-Canonical Address" ],
2493         [0xe3, "Non-Canonical Address" ],
2494         [0xe4, "Non-Canonical Address" ],
2495         [0xe5, "Non-Canonical Address" ],
2496         [0xe6, "Non-Canonical Address" ],
2497         [0xe7, "Non-Canonical Address" ],
2498         [0xe8, "Non-Canonical Address" ],
2499         [0xe9, "Non-Canonical Address" ],
2500         [0xea, "Non-Canonical Address" ],
2501         [0xeb, "Non-Canonical Address" ],
2502         [0xec, "Non-Canonical Address" ],
2503         [0xed, "Non-Canonical Address" ],
2504         [0xee, "Non-Canonical Address" ],
2505         [0xef, "Non-Canonical Address" ],
2506         [0xf0, "Non-Canonical Address" ],
2507         [0xf1, "Non-Canonical Address" ],
2508         [0xf2, "Non-Canonical Address" ],
2509         [0xf3, "Non-Canonical Address" ],
2510         [0xf4, "Non-Canonical Address" ],
2511         [0xf5, "Non-Canonical Address" ],
2512         [0xf6, "Non-Canonical Address" ],
2513         [0xf7, "Non-Canonical Address" ],
2514         [0xf8, "Non-Canonical Address" ],
2515         [0xf9, "Non-Canonical Address" ],
2516         [0xfa, "Non-Canonical Address" ],
2517         [0xfb, "Non-Canonical Address" ],
2518         [0xfc, "Non-Canonical Address" ],
2519         [0xfd, "Non-Canonical Address" ],
2520         [0xfe, "Non-Canonical Address" ],
2521         [0xff, "Non-Canonical Address" ],
2522 ])        
2523 LANDriverNumber                 = uint8("lan_driver_number", "LAN Driver Number")
2524 LANdriverNodeAddress            = bytes("lan_dvr_node_addr", "LAN Driver Node Address", 6)
2525 LANdriverRecvSize               = uint32("lan_drv_rcv_size", "LAN Driver Receive Size")
2526 LANdriverReserved               = uint16("lan_drv_reserved", "LAN Driver Reserved")
2527 LANdriverSendRetries            = uint16("lan_drv_snd_retries", "LAN Driver Send Retries")
2528 LANdriverSharingFlags           = uint16("lan_drv_share", "LAN Driver Sharing Flags")
2529 LANdriverShortName              = fw_string("lan_drv_short_name", "LAN Driver Short Name", 40)
2530 LANdriverSlot                   = uint16("lan_drv_slot", "LAN Driver Slot")
2531 LANdriverSrcRouting             = uint32("lan_drv_src_route", "LAN Driver Source Routing")
2532 LANdriverTransportTime          = uint16("lan_drv_trans_time", "LAN Driver Transport Time")
2533 LastAccessedDate                = uint16("last_access_date", "Last Accessed Date")
2534 LastAccessedDate.NWDate()
2535 LastAccessedTime                = uint16("last_access_time", "Last Accessed Time")
2536 LastAccessedTime.NWTime()
2537 LastGarbCollect                 = uint32("last_garbage_collect", "Last Garbage Collection")
2538 LastInstance                    = uint32("last_instance", "Last Instance")
2539 LastRecordSeen                  = uint16("last_record_seen", "Last Record Seen")
2540 LastSearchIndex                 = uint16("last_search_index", "Search Index")
2541 LastSeen                        = uint32("last_seen", "Last Seen")
2542 LastSequenceNumber              = uint16("last_sequence_number", "Sequence Number")
2543 Level                           = uint8("level", "Level")
2544 LFSCounters                     = uint32("lfs_counters", "LFS Counters")
2545 LimboDataStreamsCount           = uint32("limbo_data_streams_count", "Limbo Data Streams Count")
2546 limbCount                       = uint32("limb_count", "Limb Count")
2547 LimboUsed                       = uint32("limbo_used", "Limbo Used")
2548 LoadedNameSpaces                = uint8("loaded_name_spaces", "Loaded Name Spaces")
2549 LocalConnectionID               = uint32("local_connection_id", "Local Connection ID")
2550 LocalConnectionID.Display("BASE_HEX")
2551 LocalMaxPacketSize              = uint32("local_max_packet_size", "Local Max Packet Size")
2552 LocalMaxSendSize                = uint32("local_max_send_size", "Local Max Send Size")
2553 LocalMaxRecvSize                = uint32("local_max_recv_size", "Local Max Recv Size")
2554 LocalLoginInfoCcode             = uint8("local_login_info_ccode", "Local Login Info C Code")
2555 LocalTargetSocket               = uint32("local_target_socket", "Local Target Socket")
2556 LocalTargetSocket.Display("BASE_HEX")
2557 LockAreaLen                     = uint32("lock_area_len", "Lock Area Length")
2558 LockAreasStartOffset            = uint32("lock_areas_start_offset", "Lock Areas Start Offset")
2559 LockTimeout                     = uint16("lock_timeout", "Lock Timeout")
2560 Locked                          = val_string8("locked", "Locked Flag", [
2561         [ 0x00, "Not Locked Exclusively" ],
2562         [ 0x01, "Locked Exclusively" ],
2563 ])
2564 LockFlag                        = val_string8("lock_flag", "Lock Flag", [
2565         [ 0x00, "Not Locked, Log for Future Exclusive Lock" ],
2566         [ 0x01, "Exclusive Lock (Read/Write)" ],
2567         [ 0x02, "Log for Future Shared Lock"],
2568         [ 0x03, "Shareable Lock (Read-Only)" ],
2569         [ 0xfe, "Locked by a File Lock" ],
2570         [ 0xff, "Locked by Begin Share File Set" ],
2571 ])
2572 LockName                        = nstring8("lock_name", "Lock Name")
2573 LockStatus                      = val_string8("lock_status", "Lock Status", [
2574         [ 0x00, "Locked Exclusive" ],
2575         [ 0x01, "Locked Shareable" ],
2576         [ 0x02, "Logged" ],
2577         [ 0x06, "Lock is Held by TTS"],
2578 ])
2579 LockType                        = val_string8("lock_type", "Lock Type", [
2580         [ 0x00, "Locked" ],
2581         [ 0x01, "Open Shareable" ],
2582         [ 0x02, "Logged" ],
2583         [ 0x03, "Open Normal" ],
2584         [ 0x06, "TTS Holding Lock" ],
2585         [ 0x07, "Transaction Flag Set on This File" ],
2586 ])
2587 LogFileFlagHigh                 = bitfield8("log_file_flag_high", "Log File Flag (byte 2)", [
2588         bf_boolean8(0x80, "log_flag_call_back", "Call Back Requested" ),
2589 ])
2590 LogFileFlagLow                  = bitfield8("log_file_flag_low", "Log File Flag", [
2591         bf_boolean8(0x01, "log_flag_lock_file", "Lock File Immediately" ), 
2592 ])      
2593 LoggedObjectID                  = uint32("logged_object_id", "Logged in Object ID")
2594 LoggedObjectID.Display("BASE_HEX")
2595 LoggedCount                     = uint16("logged_count", "Logged Count")
2596 LogicalConnectionNumber         = uint16("logical_connection_number", "Logical Connection Number", BE)
2597 LogicalDriveCount               = uint8("logical_drive_count", "Logical Drive Count")
2598 LogicalDriveNumber              = uint8("logical_drive_number", "Logical Drive Number")
2599 LogicalLockThreshold            = uint8("logical_lock_threshold", "LogicalLockThreshold")
2600 LogicalRecordName               = nstring8("logical_record_name", "Logical Record Name")
2601 LoginKey                        = bytes("login_key", "Login Key", 8)
2602 LogLockType                     = uint8("log_lock_type", "Log Lock Type")
2603 LogTtlRxPkts                    = uint32("log_ttl_rx_pkts", "Total Received Packets")
2604 LogTtlTxPkts                    = uint32("log_ttl_tx_pkts", "Total Transmitted Packets")
2605 LongName                        = fw_string("long_name", "Long Name", 32)
2606 LRUBlockWasDirty                = uint16("lru_block_was_dirty", "LRU Block Was Dirty")
2607
2608 MacAttr                         = bitfield16("mac_attr", "Attributes", [
2609         bf_boolean16(0x0001, "mac_attr_smode1", "Search Mode"),
2610         bf_boolean16(0x0002, "mac_attr_smode2", "Search Mode"),
2611         bf_boolean16(0x0004, "mac_attr_smode3", "Search Mode"),
2612         bf_boolean16(0x0010, "mac_attr_transaction", "Transaction"),
2613         bf_boolean16(0x0020, "mac_attr_index", "Index"),
2614         bf_boolean16(0x0040, "mac_attr_r_audit", "Read Audit"),
2615         bf_boolean16(0x0080, "mac_attr_w_audit", "Write Audit"),
2616         bf_boolean16(0x0100, "mac_attr_r_only", "Read Only"),
2617         bf_boolean16(0x0200, "mac_attr_hidden", "Hidden"),
2618         bf_boolean16(0x0400, "mac_attr_system", "System"),
2619         bf_boolean16(0x0800, "mac_attr_execute_only", "Execute Only"),
2620         bf_boolean16(0x1000, "mac_attr_subdirectory", "Subdirectory"),
2621         bf_boolean16(0x2000, "mac_attr_archive", "Archive"),
2622         bf_boolean16(0x8000, "mac_attr_share", "Shareable File"),
2623 ])
2624 MACBackupDate                   = uint16("mac_backup_date", "Mac Backup Date")
2625 MACBackupDate.NWDate()
2626 MACBackupTime                   = uint16("mac_backup_time", "Mac Backup Time")
2627 MACBackupTime.NWTime()
2628 MacBaseDirectoryID              = uint32("mac_base_directory_id", "Mac Base Directory ID", BE)
2629 MacBaseDirectoryID.Display("BASE_HEX")
2630 MACCreateDate                   = uint16("mac_create_date", "Mac Create Date")
2631 MACCreateDate.NWDate()
2632 MACCreateTime                   = uint16("mac_create_time", "Mac Create Time")
2633 MACCreateTime.NWTime()
2634 MacDestinationBaseID            = uint32("mac_destination_base_id", "Mac Destination Base ID")
2635 MacDestinationBaseID.Display("BASE_HEX")
2636 MacFinderInfo                   = bytes("mac_finder_info", "Mac Finder Information", 32)
2637 MacLastSeenID                   = uint32("mac_last_seen_id", "Mac Last Seen ID")
2638 MacLastSeenID.Display("BASE_HEX")
2639 MacSourceBaseID                 = uint32("mac_source_base_id", "Mac Source Base ID")
2640 MacSourceBaseID.Display("BASE_HEX")
2641 MajorVersion                    = uint32("major_version", "Major Version")
2642 MaxBytes                        = uint16("max_bytes", "Maximum Number of Bytes")
2643 MaxDataStreams                  = uint32("max_data_streams", "Maximum Data Streams")
2644 MaxDirDepth                     = uint32("max_dir_depth", "Maximum Directory Depth")
2645 MaximumSpace                    = uint16("max_space", "Maximum Space")
2646 MaxNumOfConn                    = uint32("max_num_of_conn", "Maximum Number of Connections")
2647 MaxNumOfLANS                    = uint32("max_num_of_lans", "Maximum Number Of LAN's")
2648 MaxNumOfMedias                  = uint32("max_num_of_medias", "Maximum Number Of Media's")
2649 MaxNumOfNmeSps                  = uint32("max_num_of_nme_sps", "Maximum Number Of Name Spaces")
2650 MaxNumOfSpoolPr                 = uint32("max_num_of_spool_pr", "Maximum Number Of Spool Printers")
2651 MaxNumOfStacks                  = uint32("max_num_of_stacks", "Maximum Number Of Stacks")
2652 MaxNumOfUsers                   = uint32("max_num_of_users", "Maximum Number Of Users")
2653 MaxNumOfVol                     = uint32("max_num_of_vol", "Maximum Number of Volumes")
2654 MaxSpace                        = uint32("maxspace", "Maximum Space")
2655 MaxUsedDynamicSpace             = uint32("max_used_dynamic_space", "Max Used Dynamic Space")
2656 MediaList                       = uint32("media_list", "Media List")
2657 MediaListCount                  = uint32("media_list_count", "Media List Count")
2658 MediaName                       = nstring8("media_name", "Media Name")
2659 MediaNumber                     = uint32("media_number", "Media Number")
2660 MediaObjectType                 = val_string8("media_object_type", "Object Type", [
2661         [ 0x00, "Adapter" ],
2662         [ 0x01, "Changer" ],
2663         [ 0x02, "Removable Device" ],
2664         [ 0x03, "Device" ],
2665         [ 0x04, "Removable Media" ],
2666         [ 0x05, "Partition" ],
2667         [ 0x06, "Slot" ],
2668         [ 0x07, "Hotfix" ],
2669         [ 0x08, "Mirror" ],
2670         [ 0x09, "Parity" ],
2671         [ 0x0a, "Volume Segment" ],
2672         [ 0x0b, "Volume" ],
2673         [ 0x0c, "Clone" ],
2674         [ 0x0d, "Fixed Media" ],
2675         [ 0x0e, "Unknown" ],
2676 ])        
2677 MemberName                      = nstring8("member_name", "Member Name")
2678 MemberType                      = val_string16("member_type", "Member Type", [
2679         [ 0x0000,       "Unknown" ],
2680         [ 0x0001,       "User" ],
2681         [ 0x0002,       "User group" ],
2682         [ 0x0003,       "Print queue" ],
2683         [ 0x0004,       "NetWare file server" ],
2684         [ 0x0005,       "Job server" ],
2685         [ 0x0006,       "Gateway" ],
2686         [ 0x0007,       "Print server" ],
2687         [ 0x0008,       "Archive queue" ],
2688         [ 0x0009,       "Archive server" ],
2689         [ 0x000a,       "Job queue" ],
2690         [ 0x000b,       "Administration" ],
2691         [ 0x0021,       "NAS SNA gateway" ],
2692         [ 0x0026,       "Remote bridge server" ],
2693         [ 0x0027,       "TCP/IP gateway" ],
2694 ])
2695 MessageLanguage                 = uint32("message_language", "NLM Language")
2696 MigratedFiles                   = uint32("migrated_files", "Migrated Files")
2697 MigratedSectors                 = uint32("migrated_sectors", "Migrated Sectors")
2698 MinorVersion                    = uint32("minor_version", "Minor Version")
2699 Minute                          = uint8("s_minute", "Minutes")
2700 MixedModePathFlag               = uint8("mixed_mode_path_flag", "Mixed Mode Path Flag")
2701 ModifiedDate                    = uint16("modified_date", "Modified Date")
2702 ModifiedDate.NWDate()
2703 ModifiedTime                    = uint16("modified_time", "Modified Time")
2704 ModifiedTime.NWTime()
2705 ModifierID                      = uint32("modifier_id", "Modifier ID", BE)
2706 ModifierID.Display("BASE_HEX")
2707 ModifyDOSInfoMask               = bitfield16("modify_dos_info_mask", "Modify DOS Info Mask", [
2708         bf_boolean16(0x0002, "modify_dos_read", "Attributes"),
2709         bf_boolean16(0x0004, "modify_dos_write", "Creation Date"),
2710         bf_boolean16(0x0008, "modify_dos_open", "Creation Time"),
2711         bf_boolean16(0x0010, "modify_dos_create", "Creator ID"),
2712         bf_boolean16(0x0020, "modify_dos_delete", "Archive Date"),
2713         bf_boolean16(0x0040, "modify_dos_parent", "Archive Time"),
2714         bf_boolean16(0x0080, "modify_dos_search", "Archiver ID"),
2715         bf_boolean16(0x0100, "modify_dos_mdate", "Modify Date"),
2716         bf_boolean16(0x0200, "modify_dos_mtime", "Modify Time"),
2717         bf_boolean16(0x0400, "modify_dos_mid", "Modifier ID"),
2718         bf_boolean16(0x0800, "modify_dos_laccess", "Last Access"),
2719         bf_boolean16(0x1000, "modify_dos_inheritance", "Inheritance"),
2720         bf_boolean16(0x2000, "modify_dos_max_space", "Maximum Space"),
2721 ])      
2722 Month                           = val_string8("s_month", "Month", [
2723         [ 0x01, "January"],
2724         [ 0x02, "Febuary"],
2725         [ 0x03, "March"],
2726         [ 0x04, "April"],
2727         [ 0x05, "May"],
2728         [ 0x06, "June"],
2729         [ 0x07, "July"],
2730         [ 0x08, "August"],
2731         [ 0x09, "September"],
2732         [ 0x0a, "October"],
2733         [ 0x0b, "November"],
2734         [ 0x0c, "December"],
2735 ])
2736
2737 MoreFlag                        = val_string8("more_flag", "More Flag", [
2738         [ 0x00, "No More Segments/Entries Available" ],
2739         [ 0x01, "More Segments/Entries Available" ],
2740         [ 0xff, "More Segments/Entries Available" ],
2741 ])
2742 MoreProperties                  = val_string8("more_properties", "More Properties", [
2743         [ 0x00, "No More Properties Available" ],
2744         [ 0x01, "No More Properties Available" ],
2745         [ 0xff, "More Properties Available" ],
2746 ])
2747
2748 Name                            = nstring8("name", "Name")
2749 Name12                          = fw_string("name12", "Name", 12)
2750 NameLen                         = uint8("name_len", "Name Space Length")
2751 NameLength                      = uint8("name_length", "Name Length")
2752 NameList                        = uint32("name_list", "Name List")
2753 #
2754 # XXX - should this value be used to interpret the characters in names,
2755 # search patterns, and the like?
2756 #
2757 # We need to handle character sets better, e.g. translating strings
2758 # from whatever character set they are in the packet (DOS/Windows code
2759 # pages, ISO character sets, UNIX EUC character sets, UTF-8, UCS-2/Unicode,
2760 # Mac character sets, etc.) into UCS-4 or UTF-8 and storing them as such
2761 # in the protocol tree, and displaying them as best we can.
2762 #
2763 NameSpace                       = val_string8("name_space", "Name Space", [
2764         [ 0x00, "DOS" ],
2765         [ 0x01, "MAC" ],
2766         [ 0x02, "NFS" ],
2767         [ 0x03, "FTAM" ],
2768         [ 0x04, "OS/2, Long" ],
2769 ])
2770 NamesSpaceInfoMask                      = bitfield16("ns_info_mask", "Names Space Info Mask", [
2771         bf_boolean16(0x0001, "ns_info_mask_modify", "Modify Name"),
2772         bf_boolean16(0x0002, "ns_info_mask_fatt", "File Attributes"),
2773         bf_boolean16(0x0004, "ns_info_mask_cdate", "Creation Date"),
2774         bf_boolean16(0x0008, "ns_info_mask_ctime", "Creation Time"),
2775         bf_boolean16(0x0010, "ns_info_mask_owner", "Owner ID"),
2776         bf_boolean16(0x0020, "ns_info_mask_adate", "Archive Date"),
2777         bf_boolean16(0x0040, "ns_info_mask_atime", "Archive Time"),
2778         bf_boolean16(0x0080, "ns_info_mask_aid", "Archiver ID"),
2779         bf_boolean16(0x0100, "ns_info_mask_udate", "Update Date"),
2780         bf_boolean16(0x0200, "ns_info_mask_utime", "Update Time"),
2781         bf_boolean16(0x0400, "ns_info_mask_uid", "Update ID"),
2782         bf_boolean16(0x0800, "ns_info_mask_acc_date", "Access Date"),
2783         bf_boolean16(0x1000, "ns_info_mask_max_acc_mask", "Inheritance"),
2784         bf_boolean16(0x2000, "ns_info_mask_max_space", "Maximum Space"),
2785 ])
2786 NameSpaceName                   = nstring8("name_space_name", "Name Space Name")
2787 nameType                        = uint32("name_type", "nameType")
2788 NCPdataSize                     = uint32("ncp_data_size", "NCP Data Size")
2789 NCPextensionMajorVersion        = uint8("ncp_extension_major_version", "NCP Extension Major Version")
2790 NCPextensionMinorVersion        = uint8("ncp_extension_minor_version", "NCP Extension Minor Version")
2791 NCPextensionName                = nstring8("ncp_extension_name", "NCP Extension Name")
2792 NCPextensionNumber              = uint32("ncp_extension_number", "NCP Extension Number")
2793 NCPextensionNumber.Display("BASE_HEX")
2794 NCPExtensionNumbers             = uint32("ncp_extension_numbers", "NCP Extension Numbers")
2795 NCPextensionRevisionNumber      = uint8("ncp_extension_revision_number", "NCP Extension Revision Number")
2796 NCPPeakStaInUse                 = uint32("ncp_peak_sta_in_use", "Peak Number of Connections since Server was brought up")
2797 NCPStaInUseCnt                  = uint32("ncp_sta_in_use", "Number of Workstations Connected to Server")
2798 NDSRequestFlags                 = bitfield16("nds_request_flags", "NDS Request Flags", [
2799         bf_boolean16(0x0001, "nds_request_flags_output", "Output Fields"),
2800         bf_boolean16(0x0002, "nds_request_flags_no_such_entry", "No Such Entry"),
2801         bf_boolean16(0x0004, "nds_request_flags_local_entry", "Local Entry"),
2802         bf_boolean16(0x0008, "nds_request_flags_type_ref", "Type Referral"),
2803         bf_boolean16(0x0010, "nds_request_flags_alias_ref", "Alias Referral"),
2804         bf_boolean16(0x0020, "nds_request_flags_req_cnt", "Request Count"),
2805         bf_boolean16(0x0040, "nds_request_flags_req_data_size", "Request Data Size"),
2806         bf_boolean16(0x0080, "nds_request_flags_reply_data_size", "Reply Data Size"),
2807         bf_boolean16(0x0100, "nds_request_flags_trans_ref", "Transport Referral"),
2808         bf_boolean16(0x0200, "nds_request_flags_trans_ref2", "Transport Referral"),
2809         bf_boolean16(0x0400, "nds_request_flags_up_ref", "Up Referral"),
2810         bf_boolean16(0x0800, "nds_request_flags_dn_ref", "Down Referral"),
2811 ])      
2812 NDSStatus                       = uint32("nds_status", "NDS Status")
2813 NetBIOSBroadcastWasPropogated   = uint32("netbios_broadcast_was_propogated", "NetBIOS Broadcast Was Propogated")
2814 NetIDNumber                     = uint32("net_id_number", "Net ID Number")
2815 NetIDNumber.Display("BASE_HEX")
2816 NetAddress                      = nbytes32("address", "Address")
2817 NetStatus                       = uint16("net_status", "Network Status")
2818 NetWareAccessHandle             = bytes("netware_access_handle", "NetWare Access Handle", 6)
2819 NetworkAddress                  = uint32("network_address", "Network Address")
2820 NetworkAddress.Display("BASE_HEX")
2821 NetworkNodeAddress              = bytes("network_node_address", "Network Node Address", 6)
2822 NetworkNumber                   = uint32("network_number", "Network Number")
2823 NetworkNumber.Display("BASE_HEX")
2824 #
2825 # XXX - this should have the "ipx_socket_vals" value_string table
2826 # from "packet-ipx.c".
2827 #
2828 NetworkSocket                   = uint16("network_socket", "Network Socket")
2829 NetworkSocket.Display("BASE_HEX")
2830 NewAccessRights                 = bitfield16("new_access_rights_mask", "New Access Rights", [
2831         bf_boolean16(0x0001, "new_access_rights_read", "Read"),
2832         bf_boolean16(0x0002, "new_access_rights_write", "Write"),
2833         bf_boolean16(0x0004, "new_access_rights_open", "Open"),
2834         bf_boolean16(0x0008, "new_access_rights_create", "Create"),
2835         bf_boolean16(0x0010, "new_access_rights_delete", "Delete"),
2836         bf_boolean16(0x0020, "new_access_rights_parental", "Parental"),
2837         bf_boolean16(0x0040, "new_access_rights_search", "Search"),
2838         bf_boolean16(0x0080, "new_access_rights_modify", "Modify"),
2839         bf_boolean16(0x0100, "new_access_rights_supervisor", "Supervisor"),
2840 ])
2841 NewDirectoryID                  = uint32("new_directory_id", "New Directory ID", BE)
2842 NewDirectoryID.Display("BASE_HEX")
2843 NewEAHandle                     = uint32("new_ea_handle", "New EA Handle")
2844 NewEAHandle.Display("BASE_HEX")
2845 NewFileName                     = fw_string("new_file_name", "New File Name", 14)
2846 NewFileNameLen                  = nstring8("new_file_name_len", "New File Name")
2847 NewFileSize                     = uint32("new_file_size", "New File Size")
2848 NewPassword                     = nstring8("new_password", "New Password")
2849 NewPath                         = nstring8("new_path", "New Path")
2850 NewPosition                     = uint8("new_position", "New Position")
2851 NewObjectName                   = nstring8("new_object_name", "New Object Name")
2852 NextCntBlock                    = uint32("next_cnt_block", "Next Count Block")
2853 NextHugeStateInfo               = bytes("next_huge_state_info", "Next Huge State Info", 16)
2854 nextLimbScanNum                 = uint32("next_limb_scan_num", "Next Limb Scan Number")
2855 NextObjectID                    = uint32("next_object_id", "Next Object ID", BE)
2856 NextObjectID.Display("BASE_HEX")
2857 NextRecord                      = uint32("next_record", "Next Record")
2858 NextRequestRecord               = uint16("next_request_record", "Next Request Record")
2859 NextSearchIndex                 = uint16("next_search_index", "Next Search Index")
2860 NextSearchNumber                = uint16("next_search_number", "Next Search Number")
2861 NextSearchNum                   = uint32("nxt_search_num", "Next Search Number")
2862 nextStartingNumber              = uint32("next_starting_number", "Next Starting Number")
2863 NextTrusteeEntry                = uint32("next_trustee_entry", "Next Trustee Entry")
2864 NextVolumeNumber                = uint32("next_volume_number", "Next Volume Number")
2865 NLMBuffer                       = nstring8("nlm_buffer", "Buffer")
2866 NLMcount                        = uint32("nlm_count", "NLM Count")
2867 NLMFlags                        = bitfield8("nlm_flags", "Flags", [
2868         bf_boolean8(0x01, "nlm_flags_reentrant", "ReEntrant"),
2869         bf_boolean8(0x02, "nlm_flags_multiple", "Can Load Multiple Times"),
2870         bf_boolean8(0x04, "nlm_flags_synchronize", "Synchronize Start"),
2871         bf_boolean8(0x08, "nlm_flags_pseudo", "PseudoPreemption"),
2872 ])
2873 NLMLoadOptions                  = uint32("nlm_load_options", "NLM Load Options")
2874 NLMName                         = stringz("nlm_name_stringz", "NLM Name")
2875 NLMNumber                       = uint32("nlm_number", "NLM Number")
2876 NLMNumbers                      = uint32("nlm_numbers", "NLM Numbers")
2877 NLMsInList                      = uint32("nlms_in_list", "NLM's in List")
2878 NLMStartNumber                  = uint32("nlm_start_num", "NLM Start Number")
2879 NLMType                         = val_string8("nlm_type", "NLM Type", [
2880         [ 0x00, "Generic NLM (.NLM)" ],
2881         [ 0x01, "LAN Driver (.LAN)" ],
2882         [ 0x02, "Disk Driver (.DSK)" ],
2883         [ 0x03, "Name Space Support Module (.NAM)" ],
2884         [ 0x04, "Utility or Support Program (.NLM)" ],
2885         [ 0x05, "Mirrored Server Link (.MSL)" ],
2886         [ 0x06, "OS NLM (.NLM)" ],
2887         [ 0x07, "Paged High OS NLM (.NLM)" ],
2888         [ 0x08, "Host Adapter Module (.HAM)" ],
2889         [ 0x09, "Custom Device Module (.CDM)" ],
2890         [ 0x0a, "File System Engine (.NLM)" ],
2891         [ 0x0b, "Real Mode NLM (.NLM)" ],
2892         [ 0x0c, "Hidden NLM (.NLM)" ],
2893         [ 0x15, "NICI Support (.NLM)" ],
2894         [ 0x16, "NICI Support (.NLM)" ],
2895         [ 0x17, "Cryptography (.NLM)" ],
2896         [ 0x18, "Encryption (.NLM)" ],
2897         [ 0x19, "NICI Support (.NLM)" ],
2898         [ 0x1c, "NICI Support (.NLM)" ],
2899 ])        
2900 nodeFlags                       = uint32("node_flags", "Node Flags")
2901 nodeFlags.Display("BASE_HEX")
2902 NoMoreMemAvlCnt                 = uint32("no_more_mem_avail", "No More Memory Available Count")
2903 NonDedFlag                      = boolean8("non_ded_flag", "Non Dedicated Flag")
2904 NonFreeableAvailableSubAllocSectors = uint32("non_freeable_avail_sub_alloc_sectors", "Non Freeable Available Sub Alloc Sectors")
2905 NonFreeableLimboSectors         = uint32("non_freeable_limbo_sectors", "Non Freeable Limbo Sectors")
2906 NotUsableSubAllocSectors        = uint32("not_usable_sub_alloc_sectors", "Not Usable Sub Alloc Sectors")
2907 NotYetPurgeableBlocks           = uint32("not_yet_purgeable_blocks", "Not Yet Purgeable Blocks")
2908 NSInfoBitMask                   = uint32("ns_info_bit_mask", "Name Space Info Bit Mask")
2909 NSSOAllInFlags                  = bitfield32("nsso_all_in_flags", "SecretStore All Input Flags",[
2910         bf_boolean32(0x00000010, "nsso_all_unicode", "Unicode Data"),
2911         bf_boolean32(0x00000080, "nsso_set_tree", "Set Tree"),
2912         bf_boolean32(0x00000200, "nsso_destroy_ctx", "Destroy Context"),
2913 ])
2914 NSSOGetServiceInFlags           = bitfield32("nsso_get_svc_in_flags", "SecretStore Get Service Flags",[
2915         bf_boolean32(0x00000100, "nsso_get_ctx", "Get Context"),
2916 ])
2917 NSSOReadInFlags                 = bitfield32("nsso_read_in_flags", "SecretStore Read Flags",[
2918         bf_boolean32(0x00000001, "nsso_rw_enh_prot", "Read/Write Enhanced Protection"),
2919         bf_boolean32(0x00000008, "nsso_repair", "Repair SecretStore"),
2920 ])
2921 NSSOReadOrUnlockInFlags         = bitfield32("nsso_read_or_unlock_in_flags", "SecretStore Read or Unlock Flags",[
2922         bf_boolean32(0x00000004, "nsso_ep_master_pwd", "Master Password used instead of ENH Password"),
2923 ])
2924 NSSOUnlockInFlags               = bitfield32("nsso_unlock_in_flags", "SecretStore Unlock Flags",[
2925         bf_boolean32(0x00000004, "nsso_rmv_lock", "Remove Lock from Store"),
2926 ])
2927 NSSOWriteInFlags                = bitfield32("nsso_write_in_flags", "SecretStore Write Flags",[
2928         bf_boolean32(0x00000001, "nsso_enh_prot", "Enhanced Protection"),
2929         bf_boolean32(0x00000002, "nsso_create_id", "Create ID"),
2930         bf_boolean32(0x00000040, "nsso_ep_pwd_used", "Enhanced Protection Password Used"),
2931 ])
2932 NSSOContextOutFlags             = bitfield32("nsso_cts_out_flags", "Type of Context",[ 
2933         bf_boolean32(0x00000001, "nsso_ds_ctx", "DSAPI Context"),
2934         bf_boolean32(0x00000080, "nsso_ldap_ctx", "LDAP Context"),
2935         bf_boolean32(0x00000200, "nsso_dc_ctx", "Reserved"),
2936 ])
2937 NSSOGetServiceOutFlags          = bitfield32("nsso_get_svc_out_flags", "SecretStore Status Flags",[ 
2938         bf_boolean32(0x00400000, "nsso_mstr_pwd", "Master Password Present"),
2939 ])
2940 NSSOGetServiceReadOutFlags      = bitfield32("nsso_get_svc_read_out_flags", "SecretStore Status Flags",[
2941         bf_boolean32(0x00800000, "nsso_mp_disabled", "Master Password Disabled"),
2942 ])
2943 NSSOReadOutFlags                = bitfield32("nsso_read_out_flags", "SecretStore Read Flags",[
2944         bf_boolean32(0x00010000, "nsso_secret_locked", "Enhanced Protection Lock on Secret"),
2945         bf_boolean32(0x00020000, "nsso_secret_not_init", "Secret Not Yet Initialized"),
2946         bf_boolean32(0x00040000, "nsso_secret_marked", "Secret Marked for Enhanced Protection"),
2947         bf_boolean32(0x00080000, "nsso_secret_not_sync", "Secret Not Yet Synchronized in NDS"),
2948         bf_boolean32(0x00200000, "nsso_secret_enh_pwd", "Enhanced Protection Password on Secret"),
2949 ])
2950 NSSOReadOutStatFlags            = bitfield32("nsso_read_out_stat_flags", "SecretStore Read Status Flags",[
2951         bf_boolean32(0x00100000, "nsso_admin_mod", "Admin Modified Secret Last"),
2952 ])
2953 NSSOVerb                        = val_string8("nsso_verb", "SecretStore Verb", [
2954         [ 0x00, "Query Server" ],
2955         [ 0x01, "Read App Secrets" ],
2956         [ 0x02, "Write App Secrets" ],
2957         [ 0x03, "Add Secret ID" ],
2958         [ 0x04, "Remove Secret ID" ],
2959         [ 0x05, "Remove SecretStore" ],
2960         [ 0x06, "Enumerate SecretID's" ],
2961         [ 0x07, "Unlock Store" ],
2962         [ 0x08, "Set Master Password" ],
2963         [ 0x09, "Get Service Information" ],
2964 ])        
2965 NSSpecificInfo                  = fw_string("ns_specific_info", "Name Space Specific Info", 512)                                         
2966 NumberOfAllocs                  = uint32("num_of_allocs", "Number of Allocations")
2967 NumberOfAttributes              = uint32("number_of_attributes", "Number of Attributes")
2968 NumberOfCPUs                    = uint32("number_of_cpus", "Number of CPU's")
2969 NumberOfDataStreams             = uint16("number_of_data_streams", "Number of Data Streams")
2970 NumberOfDynamicMemoryAreas      = uint16("number_of_dynamic_memory_areas", "Number Of Dynamic Memory Areas")
2971 NumberOfEntries                 = uint8("number_of_entries", "Number of Entries")
2972 NumberOfLocks                   = uint8("number_of_locks", "Number of Locks")
2973 NumberOfMinutesToDelay          = uint32("number_of_minutes_to_delay", "Number of Minutes to Delay")
2974 NumberOfNCPExtensions           = uint32("number_of_ncp_extensions", "Number Of NCP Extensions")
2975 NumberOfNSLoaded                = uint16("number_of_ns_loaded", "Number Of Name Spaces Loaded")
2976 NumberOfProtocols               = uint8("number_of_protocols", "Number of Protocols")
2977 NumberOfRecords                 = uint16("number_of_records", "Number of Records")
2978 NumberOfReferencedPublics       = uint32("num_of_ref_publics", "Number of Referenced Public Symbols") 
2979 NumberOfSemaphores              = uint16("number_of_semaphores", "Number Of Semaphores")
2980 NumberOfServiceProcesses        = uint8("number_of_service_processes", "Number Of Service Processes")
2981 NumberOfSetCategories           = uint32("number_of_set_categories", "Number Of Set Categories")
2982 NumberOfSMs                     = uint32("number_of_sms", "Number Of Storage Medias")
2983 NumberOfStations                = uint8("number_of_stations", "Number of Stations")
2984 NumBytes                        = uint16("num_bytes", "Number of Bytes")
2985 NumOfCCinPkt                    = uint32("num_of_cc_in_pkt", "Number of Custom Counters in Packet")
2986 NumOfChecks                     = uint32("num_of_checks", "Number of Checks")
2987 NumOfEntries                    = uint32("num_of_entries", "Number of Entries")
2988 NumOfFilesMigrated              = uint32("num_of_files_migrated", "Number Of Files Migrated")
2989 NumOfGarbageColl                = uint32("num_of_garb_coll", "Number of Garbage Collections")
2990 NumOfNCPReqs                    = uint32("num_of_ncp_reqs", "Number of NCP Requests since Server was brought up")
2991 NumOfSegments                   = uint32("num_of_segments", "Number of Segments")
2992
2993 ObjectCount                     = uint32("object_count", "Object Count")
2994 ObjectFlags                     = val_string8("object_flags", "Object Flags", [
2995         [ 0x00, "Dynamic object" ],
2996         [ 0x01, "Static object" ],
2997 ])
2998 ObjectHasProperties             = val_string8("object_has_properites", "Object Has Properties", [
2999         [ 0x00, "No properties" ],
3000         [ 0xff, "One or more properties" ],
3001 ])
3002 ObjectID                        = uint32("object_id", "Object ID", BE)
3003 ObjectID.Display('BASE_HEX')
3004 ObjectIDCount                   = uint16("object_id_count", "Object ID Count")
3005 ObjectIDInfo                    = uint32("object_id_info", "Object Information")
3006 ObjectInfoReturnCount           = uint32("object_info_rtn_count", "Object Information Count")
3007 ObjectName                      = nstring8("object_name", "Object Name")
3008 ObjectNameLen                   = fw_string("object_name_len", "Object Name", 48)
3009 ObjectNameStringz               = stringz("object_name_stringz", "Object Name")
3010 ObjectNumber                    = uint32("object_number", "Object Number")
3011 ObjectSecurity                  = val_string8("object_security", "Object Security", [
3012         [ 0x00, "Object Read (Anyone) / Object Write (Anyone)" ],
3013         [ 0x01, "Object Read (Logged in) / Object Write (Anyone)" ],
3014         [ 0x02, "Object Read (Logged in as Object) / Object Write (Anyone)" ],
3015         [ 0x03, "Object Read (Supervisor) / Object Write (Anyone)" ],
3016         [ 0x04, "Object Read (Operating System Only) / Object Write (Anyone)" ],
3017         [ 0x10, "Object Read (Anyone) / Object Write (Logged in)" ],
3018         [ 0x11, "Object Read (Logged in) / Object Write (Logged in)" ],
3019         [ 0x12, "Object Read (Logged in as Object) / Object Write (Logged in)" ],
3020         [ 0x13, "Object Read (Supervisor) / Object Write (Logged in)" ],
3021         [ 0x14, "Object Read (Operating System Only) / Object Write (Logged in)" ],
3022         [ 0x20, "Object Read (Anyone) / Object Write (Logged in as Object)" ],
3023         [ 0x21, "Object Read (Logged in) / Object Write (Logged in as Object)" ],
3024         [ 0x22, "Object Read (Logged in as Object) / Object Write (Logged in as Object)" ],
3025         [ 0x23, "Object Read (Supervisor) / Object Write (Logged in as Object)" ],
3026         [ 0x24, "Object Read (Operating System Only) / Object Write (Logged in as Object)" ],
3027         [ 0x30, "Object Read (Anyone) / Object Write (Supervisor)" ],
3028         [ 0x31, "Object Read (Logged in) / Object Write (Supervisor)" ],
3029         [ 0x32, "Object Read (Logged in as Object) / Object Write (Supervisor)" ],
3030         [ 0x33, "Object Read (Supervisor) / Object Write (Supervisor)" ],
3031         [ 0x34, "Object Read (Operating System Only) / Object Write (Supervisor)" ],
3032         [ 0x40, "Object Read (Anyone) / Object Write (Operating System Only)" ],
3033         [ 0x41, "Object Read (Logged in) / Object Write (Operating System Only)" ],
3034         [ 0x42, "Object Read (Logged in as Object) / Object Write (Operating System Only)" ],
3035         [ 0x43, "Object Read (Supervisor) / Object Write (Operating System Only)" ],
3036         [ 0x44, "Object Read (Operating System Only) / Object Write (Operating System Only)" ],
3037 ])
3038 #
3039 # XXX - should this use the "server_vals[]" value_string array from
3040 # "packet-ipx.c"?
3041 #
3042 # XXX - should this list be merged with that list?  There are some
3043 # oddities, e.g. this list has 0x03f5 for "Microsoft SQL Server", but
3044 # the list from "packet-ipx.c" has 0xf503 for that - is that just
3045 # byte-order confusion?
3046 #
3047 ObjectType                      = val_string16("object_type", "Object Type", [
3048         [ 0x0000,       "Unknown" ],
3049         [ 0x0001,       "User" ],
3050         [ 0x0002,       "User group" ],
3051         [ 0x0003,       "Print queue" ],
3052         [ 0x0004,       "NetWare file server" ],
3053         [ 0x0005,       "Job server" ],
3054         [ 0x0006,       "Gateway" ],
3055         [ 0x0007,       "Print server" ],
3056         [ 0x0008,       "Archive queue" ],
3057         [ 0x0009,       "Archive server" ],
3058         [ 0x000a,       "Job queue" ],
3059         [ 0x000b,       "Administration" ],
3060         [ 0x0021,       "NAS SNA gateway" ],
3061         [ 0x0026,       "Remote bridge server" ],
3062         [ 0x0027,       "TCP/IP gateway" ],
3063         [ 0x0047,       "Novell Print Server" ],
3064         [ 0x004b,       "Btrieve Server" ],
3065         [ 0x004c,       "NetWare SQL Server" ],
3066         [ 0x0064,       "ARCserve" ],
3067         [ 0x0066,       "ARCserve 3.0" ],
3068         [ 0x0076,       "NetWare SQL" ],
3069         [ 0x00a0,       "Gupta SQL Base Server" ],
3070         [ 0x00a1,       "Powerchute" ],
3071         [ 0x0107,       "NetWare Remote Console" ],
3072         [ 0x01cb,       "Shiva NetModem/E" ],
3073         [ 0x01cc,       "Shiva LanRover/E" ],
3074         [ 0x01cd,       "Shiva LanRover/T" ],
3075         [ 0x01d8,       "Castelle FAXPress Server" ],
3076         [ 0x01da,       "Castelle Print Server" ],
3077         [ 0x01dc,       "Castelle Fax Server" ],
3078         [ 0x0200,       "Novell SQL Server" ],
3079         [ 0x023a,       "NetWare Lanalyzer Agent" ],
3080         [ 0x023c,       "DOS Target Service Agent" ],
3081         [ 0x023f,       "NetWare Server Target Service Agent" ],
3082         [ 0x024f,       "Appletalk Remote Access Service" ],
3083         [ 0x0263,       "NetWare Management Agent" ],
3084         [ 0x0264,       "Global MHS" ],
3085         [ 0x0265,       "SNMP" ],
3086         [ 0x026a,       "NetWare Management/NMS Console" ],
3087         [ 0x026b,       "NetWare Time Synchronization" ],
3088         [ 0x0273,       "Nest Device" ],
3089         [ 0x0274,       "GroupWise Message Multiple Servers" ],
3090         [ 0x0278,       "NDS Replica Server" ],
3091         [ 0x0282,       "NDPS Service Registry Service" ],
3092         [ 0x028a,       "MPR/IPX Address Mapping Gateway" ],
3093         [ 0x028b,       "ManageWise" ],
3094         [ 0x0293,       "NetWare 6" ],
3095         [ 0x030c,       "HP JetDirect" ],
3096         [ 0x0328,       "Watcom SQL Server" ],
3097         [ 0x0355,       "Backup Exec" ],
3098         [ 0x039b,       "Lotus Notes" ],
3099         [ 0x03e1,       "Univel Server" ],
3100         [ 0x03f5,       "Microsoft SQL Server" ],
3101         [ 0x055e,       "Lexmark Print Server" ],
3102         [ 0x0640,       "Microsoft Gateway Services for NetWare" ],
3103         [ 0x064e,       "Microsoft Internet Information Server" ],
3104         [ 0x077b,       "Advantage Database Server" ],
3105         [ 0x07a7,       "Backup Exec Job Queue" ],
3106         [ 0x07a8,       "Backup Exec Job Manager" ],
3107         [ 0x07a9,       "Backup Exec Job Service" ],
3108         [ 0x5555,       "Site Lock" ],
3109         [ 0x8202,       "NDPS Broker" ],
3110 ])
3111 OCRetFlags                      = val_string8("o_c_ret_flags", "Open Create Return Flags", [
3112         [ 0x00, "No CallBack has been registered (No Op-Lock)" ],
3113         [ 0x01, "Request has been registered for CallBack (Op-Lock)" ],
3114 ])
3115 OldestDeletedFileAgeInTicks     = uint32("oldest_deleted_file_age_in_ticks", "Oldest Deleted File Age in Ticks")
3116 OldFileName                     = bytes("old_file_name", "Old File Name", 15)
3117 OldFileSize                     = uint32("old_file_size", "Old File Size")
3118 OpenCount                       = uint16("open_count", "Open Count")
3119 OpenCreateAction                = bitfield8("open_create_action", "Open Create Action", [
3120         bf_boolean8(0x01, "open_create_action_opened", "Opened"),
3121         bf_boolean8(0x02, "open_create_action_created", "Created"),
3122         bf_boolean8(0x04, "open_create_action_replaced", "Replaced"),
3123         bf_boolean8(0x08, "open_create_action_compressed", "Compressed"),
3124         bf_boolean8(0x80, "open_create_action_read_only", "Read Only"),
3125 ])      
3126 OpenCreateMode                  = bitfield8("open_create_mode", "Open Create Mode", [
3127         bf_boolean8(0x01, "open_create_mode_open", "Open existing file (file must exist)"),
3128         bf_boolean8(0x02, "open_create_mode_replace", "Replace existing file"),
3129         bf_boolean8(0x08, "open_create_mode_create", "Create new file or subdirectory (file or subdirectory cannot exist)"),
3130         bf_boolean8(0x80, "open_create_mode_oplock", "Open Callback (Op-Lock)"),
3131 ])
3132 OpenForReadCount                = uint16("open_for_read_count", "Open For Read Count")
3133 OpenForWriteCount               = uint16("open_for_write_count", "Open For Write Count")
3134 OpenRights                      = bitfield8("open_rights", "Open Rights", [
3135         bf_boolean8(0x01, "open_rights_read_only", "Read Only"),
3136         bf_boolean8(0x02, "open_rights_write_only", "Write Only"),
3137         bf_boolean8(0x04, "open_rights_deny_read", "Deny Read"),
3138         bf_boolean8(0x08, "open_rights_deny_write", "Deny Write"),
3139         bf_boolean8(0x10, "open_rights_compat", "Compatibility"),
3140         bf_boolean8(0x40, "open_rights_write_thru", "Write Through"),
3141 ])
3142 OptionNumber                    = uint8("option_number", "Option Number")
3143 originalSize                    = uint32("original_size", "Original Size")
3144 OSLanguageID                    = uint8("os_language_id", "OS Language ID")
3145 OSMajorVersion                  = uint8("os_major_version", "OS Major Version")
3146 OSMinorVersion                  = uint8("os_minor_version", "OS Minor Version")
3147 OSRevision                      = uint8("os_revision", "OS Revision")
3148 OtherFileForkSize               = uint32("other_file_fork_size", "Other File Fork Size")
3149 OtherFileForkFAT                = uint32("other_file_fork_fat", "Other File Fork FAT Entry")
3150 OutgoingPacketDiscardedNoTurboBuffer = uint16("outgoing_packet_discarded_no_turbo_buffer", "Outgoing Packet Discarded No Turbo Buffer")
3151
3152 PacketsDiscardedByHopCount      = uint16("packets_discarded_by_hop_count", "Packets Discarded By Hop Count")
3153 PacketsDiscardedUnknownNet      = uint16("packets_discarded_unknown_net", "Packets Discarded Unknown Net")
3154 PacketsFromInvalidConnection    = uint16("packets_from_invalid_connection", "Packets From Invalid Connection")
3155 PacketsReceivedDuringProcessing = uint16("packets_received_during_processing", "Packets Received During Processing")
3156 PacketsWithBadRequestType       = uint16("packets_with_bad_request_type", "Packets With Bad Request Type")
3157 PacketsWithBadSequenceNumber    = uint16("packets_with_bad_sequence_number", "Packets With Bad Sequence Number")
3158 PageTableOwnerFlag              = uint32("page_table_owner_flag", "Page Table Owner")
3159 ParentID                        = uint32("parent_id", "Parent ID")
3160 ParentID.Display("BASE_HEX")
3161 ParentBaseID                    = uint32("parent_base_id", "Parent Base ID")
3162 ParentBaseID.Display("BASE_HEX")
3163 ParentDirectoryBase             = uint32("parent_directory_base", "Parent Directory Base")
3164 ParentDOSDirectoryBase          = uint32("parent_dos_directory_base", "Parent DOS Directory Base")
3165 ParentObjectNumber              = uint32("parent_object_number", "Parent Object Number")
3166 ParentObjectNumber.Display("BASE_HEX")
3167 Password                        = nstring8("password", "Password")
3168 PathBase                        = uint8("path_base", "Path Base")
3169 PathComponentCount              = uint16("path_component_count", "Path Component Count")
3170 PathComponentSize               = uint16("path_component_size", "Path Component Size")
3171 PathCookieFlags                 = val_string16("path_cookie_flags", "Path Cookie Flags", [
3172         [ 0x0000, "Last component is Not a File Name" ],
3173         [ 0x0001, "Last component is a File Name" ],
3174 ])
3175 PathCount                       = uint8("path_count", "Path Count")
3176 Path                            = nstring8("path", "Path")
3177 PathAndName                     = stringz("path_and_name", "Path and Name")
3178 PendingIOCommands               = uint16("pending_io_commands", "Pending IO Commands")
3179 PhysicalDiskNumber              = uint8("physical_disk_number", "Physical Disk Number")
3180 PhysicalDriveCount              = uint8("physical_drive_count", "Physical Drive Count")
3181 PhysicalLockThreshold           = uint8("physical_lock_threshold", "Physical Lock Threshold")
3182 PingVersion                     = uint16("ping_version", "Ping Version")
3183 PositiveAcknowledgesSent        = uint16("positive_acknowledges_sent", "Positive Acknowledges Sent")
3184 PreCompressedSectors            = uint32("pre_compressed_sectors", "Precompressed Sectors")
3185 PreviousRecord                  = uint32("previous_record", "Previous Record")
3186 PrimaryEntry                    = uint32("primary_entry", "Primary Entry")
3187 PrintFlags                      = bitfield8("print_flags", "Print Flags", [
3188         bf_boolean8(0x08, "print_flags_ff", "Suppress Form Feeds"),
3189         bf_boolean8(0x10, "print_flags_cr", "Create"),
3190         bf_boolean8(0x20, "print_flags_del_spool", "Delete Spool File after Printing"),
3191         bf_boolean8(0x40, "print_flags_exp_tabs", "Expand Tabs in the File"),
3192         bf_boolean8(0x80, "print_flags_banner", "Print Banner Page"),
3193 ])
3194 PrinterHalted                   = val_string8("printer_halted", "Printer Halted", [
3195         [ 0x00, "Printer is not Halted" ],
3196         [ 0xff, "Printer is Halted" ],
3197 ])
3198 PrinterOffLine                  = val_string8( "printer_offline", "Printer Off-Line", [
3199         [ 0x00, "Printer is On-Line" ],
3200         [ 0xff, "Printer is Off-Line" ],
3201 ])
3202 PrintServerVersion              = uint8("print_server_version", "Print Server Version")
3203 Priority                        = uint32("priority", "Priority")
3204 Privileges                      = uint32("privileges", "Login Privileges")
3205 ProcessorType                   = val_string8("processor_type", "Processor Type", [
3206         [ 0x00, "Motorola 68000" ],
3207         [ 0x01, "Intel 8088 or 8086" ],
3208         [ 0x02, "Intel 80286" ],
3209 ])
3210 ProDOSInfo                      = bytes("pro_dos_info", "Pro DOS Info", 6)
3211 ProductMajorVersion             = uint16("product_major_version", "Product Major Version")
3212 ProductMinorVersion             = uint16("product_minor_version", "Product Minor Version")
3213 ProductRevisionVersion          = uint8("product_revision_version", "Product Revision Version")
3214 projectedCompSize               = uint32("projected_comp_size", "Projected Compression Size")
3215 PropertyHasMoreSegments         = val_string8("property_has_more_segments",
3216         "Property Has More Segments", [
3217         [ 0x00, "Is last segment" ],
3218         [ 0xff, "More segments are available" ],
3219 ])
3220 PropertyName                    = nstring8("property_name", "Property Name")
3221 PropertyName16                  = fw_string("property_name_16", "Property Name", 16)
3222 PropertyData                    = bytes("property_data", "Property Data", 128)
3223 PropertySegment                 = uint8("property_segment", "Property Segment")
3224 PropertyType                    = val_string8("property_type", "Property Type", [
3225         [ 0x00, "Display Static property" ],
3226         [ 0x01, "Display Dynamic property" ],
3227         [ 0x02, "Set Static property" ],
3228         [ 0x03, "Set Dynamic property" ],
3229 ])
3230 PropertyValue                   = fw_string("property_value", "Property Value", 128)
3231 ProposedMaxSize                 = uint16("proposed_max_size", "Proposed Max Size")
3232 protocolFlags                   = uint32("protocol_flags", "Protocol Flags")
3233 protocolFlags.Display("BASE_HEX")
3234 PurgeableBlocks                 = uint32("purgeable_blocks", "Purgeable Blocks")
3235 PurgeCcode                      = uint32("purge_c_code", "Purge Completion Code")
3236 PurgeCount                      = uint32("purge_count", "Purge Count")
3237 PurgeFlags                      = val_string16("purge_flags", "Purge Flags", [
3238         [ 0x0000, "Do not Purge All" ],
3239         [ 0x0001, "Purge All" ],
3240         [ 0xffff, "Do not Purge All" ],
3241 ])
3242 PurgeList                       = uint32("purge_list", "Purge List")
3243 PhysicalDiskChannel             = uint8("physical_disk_channel", "Physical Disk Channel")
3244 PhysicalDriveType               = val_string8("physical_drive_type", "Physical Drive Type", [
3245         [ 0x01, "XT" ],
3246         [ 0x02, "AT" ],
3247         [ 0x03, "SCSI" ],
3248         [ 0x04, "Disk Coprocessor" ],
3249         [ 0x05, "PS/2 with MFM Controller" ],
3250         [ 0x06, "PS/2 with ESDI Controller" ],
3251         [ 0x07, "Convergent Technology SBIC" ],
3252 ])      
3253 PhysicalReadErrors              = uint16("physical_read_errors", "Physical Read Errors")
3254 PhysicalReadRequests            = uint32("physical_read_requests", "Physical Read Requests")
3255 PhysicalWriteErrors             = uint16("physical_write_errors", "Physical Write Errors")
3256 PhysicalWriteRequests           = uint32("physical_write_requests", "Physical Write Requests")
3257 PrintToFileFlag                 = boolean8("print_to_file_flag", "Print to File Flag")
3258
3259 QueueID                         = uint32("queue_id", "Queue ID")
3260 QueueID.Display("BASE_HEX")
3261 QueueName                       = nstring8("queue_name", "Queue Name")
3262 QueueStartPosition              = uint32("queue_start_position", "Queue Start Position")
3263 QueueStatus                     = bitfield8("queue_status", "Queue Status", [
3264         bf_boolean8(0x01, "queue_status_new_jobs", "Operator does not want to add jobs to the queue"),
3265         bf_boolean8(0x02, "queue_status_pserver", "Operator does not want additional servers attaching"),
3266         bf_boolean8(0x04, "queue_status_svc_jobs", "Operator does not want servers to service jobs"),
3267 ])
3268 QueueType                       = uint16("queue_type", "Queue Type")
3269 QueueingVersion                 = uint8("qms_version", "QMS Version")
3270
3271 ReadBeyondWrite                 = uint16("read_beyond_write", "Read Beyond Write")
3272 RecordLockCount                 = uint16("rec_lock_count", "Record Lock Count")
3273 RecordStart                     = uint32("record_start", "Record Start")
3274 RecordEnd                       = uint32("record_end", "Record End")
3275 RecordInUseFlag                 = val_string16("record_in_use", "Record in Use", [
3276         [ 0x0000, "Record In Use" ],
3277         [ 0xffff, "Record Not In Use" ],
3278 ])      
3279 RedirectedPrinter               = uint8( "redirected_printer", "Redirected Printer" )
3280 ReferenceCount                  = uint32("reference_count", "Reference Count")
3281 RelationsCount                  = uint16("relations_count", "Relations Count")
3282 ReMirrorCurrentOffset           = uint32("re_mirror_current_offset", "ReMirror Current Offset")
3283 ReMirrorDriveNumber             = uint8("re_mirror_drive_number", "ReMirror Drive Number")
3284 RemoteMaxPacketSize             = uint32("remote_max_packet_size", "Remote Max Packet Size")
3285 RemoteTargetID                  = uint32("remote_target_id", "Remote Target ID")
3286 RemoteTargetID.Display("BASE_HEX")
3287 RemovableFlag                   = uint16("removable_flag", "Removable Flag")
3288 RemoveOpenRights                = bitfield8("remove_open_rights", "Remove Open Rights", [
3289         bf_boolean8(0x01, "remove_open_rights_ro", "Read Only"),
3290         bf_boolean8(0x02, "remove_open_rights_wo", "Write Only"),
3291         bf_boolean8(0x04, "remove_open_rights_dr", "Deny Read"),
3292         bf_boolean8(0x08, "remove_open_rights_dw", "Deny Write"),
3293         bf_boolean8(0x10, "remove_open_rights_comp", "Compatibility"),
3294         bf_boolean8(0x40, "remove_open_rights_write_thru", "Write Through"),
3295 ])
3296 RenameFlag                      = bitfield8("rename_flag", "Rename Flag", [
3297         bf_boolean8(0x01, "rename_flag_ren", "Rename to Myself allows file to be renamed to it's original name"),
3298         bf_boolean8(0x02, "rename_flag_comp", "Compatability allows files that are marked read only to be opened with read/write access"),
3299         bf_boolean8(0x04, "rename_flag_no", "Name Only renames only the specified name space entry name"),
3300 ])
3301 RepliesCancelled                = uint16("replies_cancelled", "Replies Cancelled")
3302 ReplyBuffer                     = nstring8("reply_buffer", "Reply Buffer")
3303 ReplyBufferSize                 = uint32("reply_buffer_size", "Reply Buffer Size")
3304 ReplyQueueJobNumbers            = uint32("reply_queue_job_numbers", "Reply Queue Job Numbers")
3305 RequestBitMap                   = bitfield16("request_bit_map", "Request Bit Map", [
3306         bf_boolean16(0x0001, "request_bit_map_ret_afp_ent", "AFP Entry ID"),
3307         bf_boolean16(0x0002, "request_bit_map_ret_data_fork", "Data Fork Length"),
3308         bf_boolean16(0x0004, "request_bit_map_ret_res_fork", "Resource Fork Length"),
3309         bf_boolean16(0x0008, "request_bit_map_ret_num_off", "Number of Offspring"),
3310         bf_boolean16(0x0010, "request_bit_map_ret_owner", "Owner ID"),
3311         bf_boolean16(0x0020, "request_bit_map_ret_short", "Short Name"),
3312         bf_boolean16(0x0040, "request_bit_map_ret_acc_priv", "Access Privileges"),
3313         bf_boolean16(0x0100, "request_bit_map_ratt", "Return Attributes"),
3314         bf_boolean16(0x0200, "request_bit_map_ret_afp_parent", "AFP Parent Entry ID"),
3315         bf_boolean16(0x0400, "request_bit_map_ret_cr_date", "Creation Date"),
3316         bf_boolean16(0x0800, "request_bit_map_ret_acc_date", "Access Date"),
3317         bf_boolean16(0x1000, "request_bit_map_ret_mod_date", "Modify Date&Time"),
3318         bf_boolean16(0x2000, "request_bit_map_ret_bak_date", "Backup Date&Time"),
3319         bf_boolean16(0x4000, "request_bit_map_ret_finder", "Finder Info"),
3320         bf_boolean16(0x8000, "request_bit_map_ret_long_nm", "Long Name"),
3321 ])              
3322 ResourceForkLen                 = uint32("resource_fork_len", "Resource Fork Len")
3323 RequestCode                     = val_string8("request_code", "Request Code", [
3324         [ 0x00, "Change Logged in to Temporary Authenticated" ],
3325         [ 0x01, "Change Temporary Authenticated to Logged in" ],
3326 ])
3327 RequestData                     = nstring8("request_data", "Request Data")
3328 RequestsReprocessed             = uint16("requests_reprocessed", "Requests Reprocessed")
3329 Reserved                        = uint8( "reserved", "Reserved" )
3330 Reserved2                       = bytes("reserved2", "Reserved", 2)
3331 Reserved3                       = bytes("reserved3", "Reserved", 3)
3332 Reserved4                       = bytes("reserved4", "Reserved", 4)
3333 Reserved6                       = bytes("reserved6", "Reserved", 6)
3334 Reserved8                       = bytes("reserved8", "Reserved", 8)
3335 Reserved10                      = bytes("reserved10", "Reserved", 10)
3336 Reserved12                      = bytes("reserved12", "Reserved", 12)
3337 Reserved16                      = bytes("reserved16", "Reserved", 16)
3338 Reserved20                      = bytes("reserved20", "Reserved", 20)
3339 Reserved28                      = bytes("reserved28", "Reserved", 28)
3340 Reserved36                      = bytes("reserved36", "Reserved", 36)
3341 Reserved44                      = bytes("reserved44", "Reserved", 44)
3342 Reserved48                      = bytes("reserved48", "Reserved", 48)
3343 Reserved51                      = bytes("reserved51", "Reserved", 51)
3344 Reserved56                      = bytes("reserved56", "Reserved", 56)
3345 Reserved64                      = bytes("reserved64", "Reserved", 64)
3346 Reserved120                     = bytes("reserved120", "Reserved", 120)                                  
3347 ReservedOrDirectoryNumber       = uint32("reserved_or_directory_number", "Reserved or Directory Number (see EAFlags)")
3348 ResourceCount                   = uint32("resource_count", "Resource Count")
3349 ResourceForkSize                = uint32("resource_fork_size", "Resource Fork Size")
3350 ResourceName                    = stringz("resource_name", "Resource Name")
3351 ResourceSignature               = fw_string("resource_sig", "Resource Signature", 4)
3352 RestoreTime                     = uint32("restore_time", "Restore Time")
3353 Restriction                     = uint32("restriction", "Disk Space Restriction")
3354 RestrictionsEnforced            = val_string8("restrictions_enforced", "Disk Restrictions Enforce Flag", [
3355         [ 0x00, "Enforced" ],
3356         [ 0xff, "Not Enforced" ],
3357 ])
3358 ReturnInfoCount                 = uint32("return_info_count", "Return Information Count")
3359 ReturnInfoMask                  = bitfield16("ret_info_mask", "Return Information", [
3360         bf_boolean16(0x0001, "ret_info_mask_fname", "Return File Name Information"),
3361         bf_boolean16(0x0002, "ret_info_mask_alloc", "Return Allocation Space Information"),
3362         bf_boolean16(0x0004, "ret_info_mask_attr", "Return Attribute Information"),
3363         bf_boolean16(0x0008, "ret_info_mask_size", "Return Size Information"),
3364         bf_boolean16(0x0010, "ret_info_mask_tspace", "Return Total Space Information"),
3365         bf_boolean16(0x0020, "ret_info_mask_eattr", "Return Extended Attributes Information"),
3366         bf_boolean16(0x0040, "ret_info_mask_arch", "Return Archive Information"),
3367         bf_boolean16(0x0080, "ret_info_mask_mod", "Return Modify Information"),
3368         bf_boolean16(0x0100, "ret_info_mask_create", "Return Creation Information"),
3369         bf_boolean16(0x0200, "ret_info_mask_ns", "Return Name Space Information"),
3370         bf_boolean16(0x0400, "ret_info_mask_dir", "Return Directory Information"),
3371         bf_boolean16(0x0800, "ret_info_mask_rights", "Return Rights Information"),
3372         bf_boolean16(0x1000, "ret_info_mask_id", "Return ID Information"),
3373         bf_boolean16(0x2000, "ret_info_mask_ns_attr", "Return Name Space Attributes Information"),
3374         bf_boolean16(0x4000, "ret_info_mask_actual", "Return Actual Information"),
3375         bf_boolean16(0x8000, "ret_info_mask_logical", "Return Logical Information"),
3376 ])
3377 ReturnedListCount               = uint32("returned_list_count", "Returned List Count")
3378 Revision                        = uint32("revision", "Revision")
3379 RevisionNumber                  = uint8("revision_number", "Revision")
3380 RevQueryFlag                    = val_string8("rev_query_flag", "Revoke Rights Query Flag", [
3381         [ 0x00, "Do not query the locks engine for access rights" ],
3382         [ 0x01, "Query the locks engine and return the access rights" ],
3383 ])
3384 RightsGrantMask                 = bitfield8("rights_grant_mask", "Grant Rights", [
3385         bf_boolean8(0x01, "rights_grant_mask_read", "Read"),
3386         bf_boolean8(0x02, "rights_grant_mask_write", "Write"),
3387         bf_boolean8(0x04, "rights_grant_mask_open", "Open"),
3388         bf_boolean8(0x08, "rights_grant_mask_create", "Create"),
3389         bf_boolean8(0x10, "rights_grant_mask_del", "Delete"),
3390         bf_boolean8(0x20, "rights_grant_mask_parent", "Parental"),
3391         bf_boolean8(0x40, "rights_grant_mask_search", "Search"),
3392         bf_boolean8(0x80, "rights_grant_mask_mod", "Modify"),
3393 ])
3394 RightsRevokeMask                = bitfield8("rights_revoke_mask", "Revoke Rights", [
3395         bf_boolean8(0x01, "rights_revoke_mask_read", "Read"),
3396         bf_boolean8(0x02, "rights_revoke_mask_write", "Write"),
3397         bf_boolean8(0x04, "rights_revoke_mask_open", "Open"),
3398         bf_boolean8(0x08, "rights_revoke_mask_create", "Create"),
3399         bf_boolean8(0x10, "rights_revoke_mask_del", "Delete"),
3400         bf_boolean8(0x20, "rights_revoke_mask_parent", "Parental"),
3401         bf_boolean8(0x40, "rights_revoke_mask_search", "Search"),
3402         bf_boolean8(0x80, "rights_revoke_mask_mod", "Modify"),
3403 ])
3404 RIPSocketNumber                 = uint16("rip_socket_num", "RIP Socket Number")
3405 RIPSocketNumber.Display("BASE_HEX")
3406 RouterDownFlag                  = boolean8("router_dn_flag", "Router Down Flag")
3407 RPCccode                        = val_string16("rpc_c_code", "RPC Completion Code", [
3408         [ 0x0000, "Successful" ],
3409 ])        
3410 RTagNumber                      = uint32("r_tag_num", "Resource Tag Number")
3411 RTagNumber.Display("BASE_HEX")
3412 RpyNearestSrvFlag               = boolean8("rpy_nearest_srv_flag", "Reply to Nearest Server Flag")
3413
3414 SalvageableFileEntryNumber      = uint32("salvageable_file_entry_number", "Salvageable File Entry Number")
3415 SalvageableFileEntryNumber.Display("BASE_HEX")
3416 SAPSocketNumber                 = uint16("sap_socket_number", "SAP Socket Number")
3417 SAPSocketNumber.Display("BASE_HEX")
3418 ScanItems                       = uint32("scan_items", "Number of Items returned from Scan")
3419 SearchAttributes                = bitfield8("sattr", "Search Attributes", [
3420         bf_boolean8(0x01, "sattr_ronly", "Read-Only Files Allowed"),
3421         bf_boolean8(0x02, "sattr_hid", "Hidden Files Allowed"),
3422         bf_boolean8(0x04, "sattr_sys", "System Files Allowed"),
3423         bf_boolean8(0x08, "sattr_exonly", "Execute-Only Files Allowed"),
3424         bf_boolean8(0x10, "sattr_sub", "Subdirectories Only"),
3425         bf_boolean8(0x20, "sattr_archive", "Archive"),
3426         bf_boolean8(0x40, "sattr_execute_confirm", "Execute Confirm"),
3427         bf_boolean8(0x80, "sattr_shareable", "Shareable"),
3428 ])      
3429 SearchAttributesLow             = bitfield16("search_att_low", "Search Attributes", [
3430         bf_boolean16(0x0001, "search_att_read_only", "Read-Only"),
3431         bf_boolean16(0x0002, "search_att_hidden", "Hidden Files Allowed"),
3432         bf_boolean16(0x0004, "search_att_system", "System"),
3433         bf_boolean16(0x0008, "search_att_execute_only", "Execute-Only"),
3434         bf_boolean16(0x0010, "search_att_sub", "Subdirectories Only"),
3435         bf_boolean16(0x0020, "search_att_archive", "Archive"),
3436         bf_boolean16(0x0040, "search_att_execute_confirm", "Execute Confirm"),
3437         bf_boolean16(0x0080, "search_att_shareable", "Shareable"),
3438         bf_boolean16(0x8000, "search_attr_all_files", "All Files and Directories"),
3439 ])
3440 SearchBitMap                            = bitfield8("search_bit_map", "Search Bit Map", [
3441         bf_boolean8(0x01, "search_bit_map_hidden", "Hidden"),
3442         bf_boolean8(0x02, "search_bit_map_sys", "System"),
3443         bf_boolean8(0x04, "search_bit_map_sub", "Subdirectory"),
3444         bf_boolean8(0x08, "search_bit_map_files", "Files"),
3445 ])      
3446 SearchConnNumber                        = uint32("search_conn_number", "Search Connection Number")
3447 SearchInstance                          = uint32("search_instance", "Search Instance")
3448 SearchNumber                            = uint32("search_number", "Search Number")
3449 SearchPattern                           = nstring8("search_pattern", "Search Pattern")
3450 SearchSequence                          = bytes("search_sequence", "Search Sequence", 9)
3451 SearchSequenceWord                      = uint16("search_sequence_word", "Search Sequence", BE)
3452 Second                                  = uint8("s_second", "Seconds")
3453 SecondsRelativeToTheYear2000            = uint32("sec_rel_to_y2k", "Seconds Relative to the Year 2000") 
3454 SecretStoreVerb                         = val_string8("ss_verb", "Secret Store Verb",[
3455         [ 0x00, "Query Server" ],
3456         [ 0x01, "Read App Secrets" ],
3457         [ 0x02, "Write App Secrets" ],
3458         [ 0x03, "Add Secret ID" ],
3459         [ 0x04, "Remove Secret ID" ],
3460         [ 0x05, "Remove SecretStore" ],
3461         [ 0x06, "Enumerate Secret IDs" ],
3462         [ 0x07, "Unlock Store" ],
3463         [ 0x08, "Set Master Password" ],
3464         [ 0x09, "Get Service Information" ],
3465 ])        
3466 SecurityEquivalentList                  = fw_string("security_equiv_list", "Security Equivalent List", 128) 
3467 SecurityFlag                            = bitfield8("security_flag", "Security Flag", [
3468         bf_boolean8(0x01, "checksuming", "Checksumming"),
3469         bf_boolean8(0x02, "signature", "Signature"),
3470         bf_boolean8(0x04, "complete_signatures", "Complete Signatures"),
3471         bf_boolean8(0x08, "encryption", "Encryption"),
3472         bf_boolean8(0x80, "large_internet_packets", "Large Internet Packets (LIP) Disabled"),
3473 ])      
3474 SecurityRestrictionVersion              = uint8("security_restriction_version", "Security Restriction Version")
3475 SectorsPerBlock                         = uint8("sectors_per_block", "Sectors Per Block")
3476 SectorsPerCluster                       = uint16("sectors_per_cluster", "Sectors Per Cluster" )
3477 SectorsPerClusterLong                   = uint32("sectors_per_cluster_long", "Sectors Per Cluster" )
3478 SectorsPerTrack                         = uint8("sectors_per_track", "Sectors Per Track")
3479 SectorSize                              = uint32("sector_size", "Sector Size")
3480 SemaphoreHandle                         = uint32("semaphore_handle", "Semaphore Handle")
3481 SemaphoreName                           = nstring8("semaphore_name", "Semaphore Name")
3482 SemaphoreNameLen                        = uint8("semaphore_name_len", "Semaphore Name Len")
3483 SemaphoreOpenCount                      = uint8("semaphore_open_count", "Semaphore Open Count")
3484 SemaphoreShareCount                     = uint8("semaphore_share_count", "Semaphore Share Count")
3485 SemaphoreTimeOut                        = uint16("semaphore_time_out", "Semaphore Time Out")
3486 SemaphoreValue                          = uint16("semaphore_value", "Semaphore Value")
3487 SendStatus                              = val_string8("send_status", "Send Status", [
3488         [ 0x00, "Successful" ],
3489         [ 0x01, "Illegal Station Number" ],
3490         [ 0x02, "Client Not Logged In" ],
3491         [ 0x03, "Client Not Accepting Messages" ],
3492         [ 0x04, "Client Already has a Message" ],
3493         [ 0x96, "No Alloc Space for the Message" ],
3494         [ 0xfd, "Bad Station Number" ],
3495         [ 0xff, "Failure" ],
3496 ])
3497 SequenceByte                    = uint8("sequence_byte", "Sequence")
3498 SequenceNumber                  = uint32("sequence_number", "Sequence Number")
3499 SequenceNumber.Display("BASE_HEX")
3500 ServerAddress                   = bytes("server_address", "Server Address", 12)
3501 ServerAppNumber                 = uint16("server_app_num", "Server App Number")
3502 ServerIDList                    = uint32("server_id_list", "Server ID List")
3503 ServerID                        = uint32("server_id_number", "Server ID", BE )
3504 ServerID.Display("BASE_HEX")
3505 ServerInfoFlags                 = val_string16("server_info_flags", "Server Information Flags", [
3506         [ 0x0000, "This server is not a member of a Cluster" ],
3507         [ 0x0001, "This server is a member of a Cluster" ],
3508 ])
3509 serverListFlags                 = uint32("server_list_flags", "Server List Flags")
3510 ServerName                      = fw_string("server_name", "Server Name", 48)
3511 serverName50                    = fw_string("server_name50", "Server Name", 50)
3512 ServerNameLen                   = nstring8("server_name_len", "Server Name")
3513 ServerNameStringz               = stringz("server_name_stringz", "Server Name")
3514 ServerNetworkAddress            = bytes("server_network_address", "Server Network Address", 10)
3515 ServerNode                      = bytes("server_node", "Server Node", 6)
3516 ServerSerialNumber              = uint32("server_serial_number", "Server Serial Number")
3517 ServerStation                   = uint8("server_station", "Server Station")
3518 ServerStationLong               = uint32("server_station_long", "Server Station")
3519 ServerStationList               = uint8("server_station_list", "Server Station List")
3520 ServerStatusRecord              = fw_string("server_status_record", "Server Status Record", 64)
3521 ServerTaskNumber                = uint8("server_task_number", "Server Task Number")
3522 ServerTaskNumberLong            = uint32("server_task_number_long", "Server Task Number")
3523 ServerType                      = uint16("server_type", "Server Type")
3524 ServerType.Display("BASE_HEX")
3525 ServerUtilization               = uint32("server_utilization", "Server Utilization")
3526 ServerUtilizationPercentage     = uint8("server_utilization_percentage", "Server Utilization Percentage")
3527 ServiceType                     = val_string16("Service_type", "Service Type", [
3528         [ 0x0000,       "Unknown" ],
3529         [ 0x0001,       "User" ],
3530         [ 0x0002,       "User group" ],
3531         [ 0x0003,       "Print queue" ],
3532         [ 0x0004,       "NetWare file server" ],
3533         [ 0x0005,       "Job server" ],
3534         [ 0x0006,       "Gateway" ],
3535         [ 0x0007,       "Print server" ],
3536         [ 0x0008,       "Archive queue" ],
3537         [ 0x0009,       "Archive server" ],
3538         [ 0x000a,       "Job queue" ],
3539         [ 0x000b,       "Administration" ],
3540         [ 0x0021,       "NAS SNA gateway" ],
3541         [ 0x0026,       "Remote bridge server" ],
3542         [ 0x0027,       "TCP/IP gateway" ],
3543 ])
3544 SetCmdCategory                  = val_string8("set_cmd_catagory", "Set Command Catagory", [
3545         [ 0x00, "Communications" ],
3546         [ 0x01, "Memory" ],
3547         [ 0x02, "File Cache" ],
3548         [ 0x03, "Directory Cache" ],
3549         [ 0x04, "File System" ],
3550         [ 0x05, "Locks" ],
3551         [ 0x06, "Transaction Tracking" ],
3552         [ 0x07, "Disk" ],
3553         [ 0x08, "Time" ],
3554         [ 0x09, "NCP" ],
3555         [ 0x0a, "Miscellaneous" ],
3556         [ 0x0b, "Error Handling" ],
3557         [ 0x0c, "Directory Services" ],
3558         [ 0x0d, "MultiProcessor" ],
3559         [ 0x0e, "Service Location Protocol" ],
3560         [ 0x0f, "Licensing Services" ],
3561 ])        
3562 SetCmdFlags                             = bitfield8("set_cmd_flags", "Set Command Flags", [
3563         bf_boolean8(0x01, "cmd_flags_startup_only", "Startup.ncf Only"),
3564         bf_boolean8(0x02, "cmd_flags_hidden", "Hidden"),
3565         bf_boolean8(0x04, "cmd_flags_advanced", "Advanced"),
3566         bf_boolean8(0x08, "cmd_flags_later", "Restart Server Required to Take Effect"),
3567         bf_boolean8(0x80, "cmd_flags_secure", "Console Secured"),
3568 ])
3569 SetCmdName                      = stringz("set_cmd_name", "Set Command Name")
3570 SetCmdType                      = val_string8("set_cmd_type", "Set Command Type", [
3571         [ 0x00, "Numeric Value" ],
3572         [ 0x01, "Boolean Value" ],
3573         [ 0x02, "Ticks Value" ],
3574         [ 0x04, "Time Value" ],
3575         [ 0x05, "String Value" ],
3576         [ 0x06, "Trigger Value" ],
3577         [ 0x07, "Numeric Value" ],
3578 ])        
3579 SetCmdValueNum                  = uint32("set_cmd_value_num", "Set Command Value")
3580 SetCmdValueString               = stringz("set_cmd_value_string", "Set Command Value")
3581 SetParmName                     = stringz("set_parm_name", "Set Parameter Name")
3582 SFTErrorTable                   = bytes("sft_error_table", "SFT Error Table", 60)
3583 SFTSupportLevel                 = val_string8("sft_support_level", "SFT Support Level", [
3584         [ 0x01, "Server Offers Hot Disk Error Fixing" ],
3585         [ 0x02, "Server Offers Disk Mirroring and Transaction Tracking" ],
3586         [ 0x03, "Server Offers Physical Server Mirroring" ],
3587 ])
3588 ShareableLockCount              = uint16("shareable_lock_count", "Shareable Lock Count")
3589 SharedMemoryAddresses           = bytes("shared_memory_addresses", "Shared Memory Addresses", 10)
3590 ShortName                       = fw_string("short_name", "Short Name", 12)
3591 ShortStkName                    = fw_string("short_stack_name", "Short Stack Name", 16)
3592 SiblingCount                    = uint32("sibling_count", "Sibling Count")
3593 SMIDs                           = uint32("smids", "Storage Media ID's")
3594 SoftwareDescription             = fw_string("software_description", "Software Description", 65)
3595 SoftwareDriverType              = uint8("software_driver_type", "Software Driver Type")
3596 SoftwareMajorVersionNumber      = uint8("software_major_version_number", "Software Major Version Number")
3597 SoftwareMinorVersionNumber      = uint8("software_minor_version_number", "Software Minor Version Number")
3598 SourceDirHandle                 = uint8("source_dir_handle", "Source Directory Handle")
3599 sourceOriginateTime             = bytes("source_originate_time", "Source Originate Time", 8)
3600 sourceOriginateTime.Display("BASE_HEX")
3601 SourcePath                      = nstring8("source_path", "Source Path")
3602 SourcePathComponentCount        = uint8("source_component_count", "Source Path Component Count")
3603 sourceReturnTime                = bytes("source_return_time", "Source Return Time", 8)
3604 sourceReturnTime.Display("BASE_HEX")
3605 SpaceUsed                       = uint32("space_used", "Space Used")
3606 SpaceMigrated                   = uint32("space_migrated", "Space Migrated")
3607 SrcNameSpace                    = val_string8("src_name_space", "Source Name Space", [
3608         [ 0x00, "DOS Name Space" ],
3609         [ 0x01, "MAC Name Space" ],
3610         [ 0x02, "NFS Name Space" ],
3611         [ 0x04, "Long Name Space" ],
3612 ])
3613 SupModID                        = uint32("sup_mod_id", "Sup Mod ID")
3614 StackCount                      = uint32("stack_count", "Stack Count")
3615 StackFullNameStr                = nstring8("stack_full_name_str", "Stack Full Name")
3616 StackMajorVN                    = uint8("stack_major_vn", "Stack Major Version Number")
3617 StackMinorVN                    = uint8("stack_minor_vn", "Stack Minor Version Number")
3618 StackNumber                     = uint32("stack_number", "Stack Number")
3619 StartConnNumber                 = uint32("start_conn_num", "Starting Connection Number")
3620 StartingBlock                   = uint16("starting_block", "Starting Block")
3621 StartingNumber                  = uint32("starting_number", "Starting Number")
3622 StartingSearchNumber            = uint16("start_search_number", "Start Search Number")
3623 StartNumber                     = uint32("start_number", "Start Number")
3624 startNumberFlag                 = uint16("start_number_flag", "Start Number Flag")
3625 StartVolumeNumber               = uint32("start_volume_number", "Starting Volume Number")
3626 StationList                     = uint32("station_list", "Station List")
3627 StationNumber                   = bytes("station_number", "Station Number", 3)
3628 StatMajorVersion                = uint8("stat_major_version", "Statistics Table Major Version")
3629 StatMinorVersion                = uint8("stat_minor_version", "Statistics Table Minor Version")
3630 Status                          = bitfield16("status", "Status", [
3631         bf_boolean16(0x0001, "user_info_logged_in", "Logged In"),
3632         bf_boolean16(0x0002, "user_info_being_abort", "Being Aborted"),
3633         bf_boolean16(0x0004, "user_info_audited", "Audited"),
3634         bf_boolean16(0x0008, "user_info_need_sec", "Needs Security Change"),
3635         bf_boolean16(0x0010, "user_info_mac_station", "MAC Station"),
3636         bf_boolean16(0x0020, "user_info_temp_authen", "Temporary Authenticated"),
3637         bf_boolean16(0x0040, "user_info_audit_conn", "Audit Connection Recorded"),
3638         bf_boolean16(0x0080, "user_info_dsaudit_conn", "DS Audit Connection Recorded"),
3639         bf_boolean16(0x0100, "user_info_logout", "Logout in Progress"),
3640         bf_boolean16(0x0200, "user_info_int_login", "Internal Login"),
3641         bf_boolean16(0x0400, "user_info_bindery", "Bindery Connection"),
3642 ])
3643 StatusFlagBits                  = bitfield32("status_flag_bits", "Status Flag", [
3644         bf_boolean32(0x00000001, "status_flag_bits_suballoc", "Sub Allocation"),
3645         bf_boolean32(0x00000002, "status_flag_bits_comp", "Compression"),
3646         bf_boolean32(0x00000004, "status_flag_bits_migrate", "Migration"),
3647         bf_boolean32(0x00000008, "status_flag_bits_audit", "Audit"),
3648         bf_boolean32(0x00000010, "status_flag_bits_ro", "Read Only"),
3649         bf_boolean32(0x00000020, "status_flag_bits_im_purge", "Immediate Purge"),
3650         bf_boolean32(0x80000000, "status_flag_bits_nss", "NSS Volume"),
3651 ])
3652 SubAllocClusters                = uint32("sub_alloc_clusters", "Sub Alloc Clusters")
3653 SubAllocFreeableClusters        = uint32("sub_alloc_freeable_clusters", "Sub Alloc Freeable Clusters")
3654 Subdirectory                    = uint32("sub_directory", "Subdirectory")
3655 Subdirectory.Display("BASE_HEX")
3656 SuggestedFileSize               = uint32("suggested_file_size", "Suggested File Size")
3657 SupportModuleID                 = uint32("support_module_id", "Support Module ID")
3658 SynchName                       = nstring8("synch_name", "Synch Name")
3659 SystemIntervalMarker            = uint32("system_interval_marker", "System Interval Marker")
3660
3661 TabSize                         = uint8( "tab_size", "Tab Size" )
3662 TargetClientList                = uint8("target_client_list", "Target Client List")
3663 TargetConnectionNumber          = uint16("target_connection_number", "Target Connection Number")
3664 TargetDirectoryBase             = uint32("target_directory_base", "Target Directory Base")
3665 TargetDirHandle                 = uint8("target_dir_handle", "Target Directory Handle")
3666 TargetEntryID                   = uint32("target_entry_id", "Target Entry ID")
3667 TargetEntryID.Display("BASE_HEX")
3668 TargetExecutionTime             = bytes("target_execution_time", "Target Execution Time", 6)
3669 TargetFileHandle                = bytes("target_file_handle", "Target File Handle", 6)
3670 TargetFileOffset                = uint32("target_file_offset", "Target File Offset")
3671 TargetMessage                   = nstring8("target_message", "Message")
3672 TargetPrinter                   = uint8( "target_ptr", "Target Printer" )
3673 targetReceiveTime               = bytes("target_receive_time", "Target Receive Time", 8)
3674 targetReceiveTime.Display("BASE_HEX")
3675 TargetServerIDNumber            = uint32("target_server_id_number", "Target Server ID Number", BE )
3676 TargetServerIDNumber.Display("BASE_HEX")
3677 targetTransmitTime              = bytes("target_transmit_time", "Target Transmit Time", 8)
3678 targetTransmitTime.Display("BASE_HEX")
3679 TaskNumByte                     = uint8("task_num_byte", "Task Number")
3680 TaskNumber                      = uint32("task_number", "Task Number")
3681 TaskNumberWord                  = uint16("task_number_word", "Task Number")
3682 TextJobDescription              = fw_string("text_job_description", "Text Job Description", 50)
3683 ThrashingCount                  = uint16("thrashing_count", "Thrashing Count")
3684 TimeoutLimit                    = uint16("timeout_limit", "Timeout Limit")
3685 TimesyncStatus                  = bitfield32("timesync_status_flags", "Timesync Status", [
3686         bf_boolean32(0x00000001, "timesync_status_sync", "Time is Synchronized"),
3687         bf_boolean32(0x00000002, "timesync_status_net_sync", "Time is Synchronized to the Network"), 
3688         bf_boolean32(0x00000004, "timesync_status_active", "Time Synchronization is Active"),
3689         bf_boolean32(0x00000008, "timesync_status_external", "External Time Synchronization Active"),
3690         bf_val_str32(0x00000700, "timesync_status_server_type", "Time Server Type", [
3691                 [ 0x01, "Client Time Server" ],
3692                 [ 0x02, "Secondary Time Server" ],
3693                 [ 0x03, "Primary Time Server" ],
3694                 [ 0x04, "Reference Time Server" ],
3695                 [ 0x05, "Single Reference Time Server" ],
3696         ]),
3697         bf_boolean32(0x000f0000, "timesync_status_ext_sync", "External Clock Status"),
3698 ])        
3699 TimeToNet                       = uint16("time_to_net", "Time To Net")
3700 TotalBlocks                     = uint32("total_blocks", "Total Blocks")        
3701 TotalBlocksToDecompress         = uint32("total_blks_to_dcompress", "Total Blocks To Decompress")
3702 TotalBytesRead                  = bytes("user_info_ttl_bytes_rd", "Total Bytes Read", 6)
3703 TotalBytesWritten               = bytes("user_info_ttl_bytes_wrt", "Total Bytes Written", 6)
3704 TotalCacheWrites                = uint32("total_cache_writes", "Total Cache Writes")
3705 TotalChangedFATs                = uint32("total_changed_fats", "Total Changed FAT Entries")
3706 TotalCommonCnts                 = uint32("total_common_cnts", "Total Common Counts")
3707 TotalCntBlocks                  = uint32("total_cnt_blocks", "Total Count Blocks")
3708 TotalDataStreamDiskSpaceAlloc   = uint32("total_stream_size_struct_space_alloc", "Total Data Stream Disk Space Alloc")
3709 TotalDirectorySlots             = uint16("total_directory_slots", "Total Directory Slots")
3710 TotalDirectoryEntries           = uint32("total_dir_entries", "Total Directory Entries")
3711 TotalDynamicSpace               = uint32("total_dynamic_space", "Total Dynamic Space")
3712 TotalExtendedDirectoryExtants   = uint32("total_extended_directory_extants", "Total Extended Directory Extants")
3713 TotalFileServicePackets         = uint32("total_file_service_packets", "Total File Service Packets")
3714 TotalFilesOpened                = uint32("total_files_opened", "Total Files Opened")
3715 TotalLFSCounters                = uint32("total_lfs_counters", "Total LFS Counters")
3716 TotalOffspring                  = uint16("total_offspring", "Total Offspring")
3717 TotalOtherPackets               = uint32("total_other_packets", "Total Other Packets")
3718 TotalQueueJobs                  = uint32("total_queue_jobs", "Total Queue Jobs")
3719 TotalReadRequests               = uint32("total_read_requests", "Total Read Requests")
3720 TotalRequest                    = uint32("total_request", "Total Requests")
3721 TotalRequestPackets             = uint32("total_request_packets", "Total Request Packets")
3722 TotalRoutedPackets              = uint32("total_routed_packets", "Total Routed Packets")
3723 TotalRxPkts                     = uint32("total_rx_pkts", "Total Receive Packets")
3724 TotalServerMemory               = uint16("total_server_memory", "Total Server Memory", BE)
3725 TotalTransactionsBackedOut      = uint32("total_trans_backed_out", "Total Transactions Backed Out")
3726 TotalTransactionsPerformed      = uint32("total_trans_performed", "Total Transactions Performed")
3727 TotalTxPkts                     = uint32("total_tx_pkts", "Total Transmit Packets")
3728 TotalUnfilledBackoutRequests    = uint16("total_unfilled_backout_requests", "Total Unfilled Backout Requests")
3729 TotalVolumeClusters             = uint16("total_volume_clusters", "Total Volume Clusters")
3730 TotalWriteRequests              = uint32("total_write_requests", "Total Write Requests")
3731 TotalWriteTransactionsPerformed = uint32("total_write_trans_performed", "Total Write Transactions Performed")
3732 TrackOnFlag                     = boolean8("track_on_flag", "Track On Flag")
3733 TransactionDiskSpace            = uint16("transaction_disk_space", "Transaction Disk Space")
3734 TransactionFATAllocations       = uint32("transaction_fat_allocations", "Transaction FAT Allocations")
3735 TransactionFileSizeChanges      = uint32("transaction_file_size_changes", "Transaction File Size Changes")
3736 TransactionFilesTruncated       = uint32("transaction_files_truncated", "Transaction Files Truncated")
3737 TransactionNumber               = uint32("transaction_number", "Transaction Number")
3738 TransactionTrackingEnabled      = uint8("transaction_tracking_enabled", "Transaction Tracking Enabled")
3739 TransactionTrackingFlag         = uint16("tts_flag", "Transaction Tracking Flag")
3740 TransactionTrackingSupported    = uint8("transaction_tracking_supported", "Transaction Tracking Supported")
3741 TransactionVolumeNumber         = uint16("transaction_volume_number", "Transaction Volume Number")
3742 TransportType                   = val_string8("transport_type", "Communications Type", [
3743         [ 0x01, "Internet Packet Exchange (IPX)" ],
3744         [ 0x05, "User Datagram Protocol (UDP)" ],
3745         [ 0x06, "Transmission Control Protocol (TCP)" ],
3746 ])
3747 TreeLength                      = uint32("tree_length", "Tree Length")
3748 TreeName                        = nstring32("tree_name", "Tree Name")
3749 TreeName.NWUnicode()
3750 TrusteeRights                   = bitfield16("trustee_rights_low", "Trustee Rights", [
3751         bf_boolean16(0x0001, "trustee_rights_read", "Read"),
3752         bf_boolean16(0x0002, "trustee_rights_write", "Write"),
3753         bf_boolean16(0x0004, "trustee_rights_open", "Open"),
3754         bf_boolean16(0x0008, "trustee_rights_create", "Create"),
3755         bf_boolean16(0x0010, "trustee_rights_del", "Delete"),
3756         bf_boolean16(0x0020, "trustee_rights_parent", "Parental"),
3757         bf_boolean16(0x0040, "trustee_rights_search", "Search"),
3758         bf_boolean16(0x0080, "trustee_rights_modify", "Modify"),
3759         bf_boolean16(0x0100, "trustee_rights_super", "Supervisor"),
3760 ])
3761 TTSLevel                        = uint8("tts_level", "TTS Level")
3762 TrusteeSetNumber                = uint8("trustee_set_number", "Trustee Set Number")
3763 TrusteeID                       = uint32("trustee_id_set", "Trustee ID")
3764 TrusteeID.Display("BASE_HEX")
3765 ttlCompBlks                     = uint32("ttl_comp_blks", "Total Compression Blocks")
3766 TtlDSDskSpaceAlloc              = uint32("ttl_ds_disk_space_alloc", "Total Streams Space Allocated")
3767 TtlEAs                          = uint32("ttl_eas", "Total EA's")
3768 TtlEAsDataSize                  = uint32("ttl_eas_data_size", "Total EA's Data Size")
3769 TtlEAsKeySize                   = uint32("ttl_eas_key_size", "Total EA's Key Size")
3770 ttlIntermediateBlks             = uint32("ttl_inter_blks", "Total Intermediate Blocks")
3771 TtlMigratedSize                 = uint32("ttl_migrated_size", "Total Migrated Size")
3772 TtlNumOfRTags                   = uint32("ttl_num_of_r_tags", "Total Number of Resource Tags")
3773 TtlNumOfSetCmds                 = uint32("ttl_num_of_set_cmds", "Total Number of Set Commands")
3774 TtlValuesLength                 = uint32("ttl_values_length", "Total Values Length")
3775 TtlWriteDataSize                = uint32("ttl_write_data_size", "Total Write Data Size")
3776 TurboUsedForFileService         = uint16("turbo_used_for_file_service", "Turbo Used For File Service")
3777
3778 UnclaimedPkts                   = uint32("un_claimed_packets", "Unclaimed Packets")
3779 UnCompressableDataStreamsCount  = uint32("un_compressable_data_streams_count", "Uncompressable Data Streams Count")
3780 Undefined8                      = bytes("undefined_8", "Undefined", 8)
3781 Undefined28                     = bytes("undefined_28", "Undefined", 28)
3782 UndefinedWord                   = uint16("undefined_word", "Undefined")
3783 UniqueID                        = uint8("unique_id", "Unique ID")
3784 UnknownByte                     = uint8("unknown_byte", "Unknown Byte")
3785 Unused                          = uint8("un_used", "Unused")
3786 UnusedBlocks                    = uint32("unused_blocks", "Unused Blocks")
3787 UnUsedDirectoryEntries          = uint32("un_used_directory_entries", "Unused Directory Entries")
3788 UnusedDiskBlocks                = uint32("unused_disk_blocks", "Unused Disk Blocks")
3789 UnUsedExtendedDirectoryExtants  = uint32("un_used_extended_directory_extants", "Unused Extended Directory Extants")
3790 UpdateDate                      = uint16("update_date", "Update Date")
3791 UpdateDate.NWDate()
3792 UpdateID                        = uint32("update_id", "Update ID", BE)
3793 UpdateID.Display("BASE_HEX")
3794 UpdateTime                      = uint16("update_time", "Update Time")
3795 UpdateTime.NWTime()
3796 UseCount                        = val_string16("user_info_use_count", "Use Count", [
3797         [ 0x0000, "Connection is not in use" ],
3798         [ 0x0001, "Connection is in use" ],
3799 ])
3800 UsedBlocks                      = uint32("used_blocks", "Used Blocks")
3801 UserID                          = uint32("user_id", "User ID", BE)
3802 UserID.Display("BASE_HEX")
3803 UserLoginAllowed                = val_string8("user_login_allowed", "Login Status", [
3804         [ 0x00, "Client Login Disabled" ],
3805         [ 0x01, "Client Login Enabled" ],
3806 ])
3807
3808 UserName                        = nstring8("user_name", "User Name")
3809 UserName16                      = fw_string("user_name_16", "User Name", 16)
3810 UserName48                      = fw_string("user_name_48", "User Name", 48)
3811 UserType                        = uint16("user_type", "User Type")
3812 UTCTimeInSeconds                = uint32("uts_time_in_seconds", "UTC Time in Seconds")
3813
3814 ValueAvailable                  = val_string8("value_available", "Value Available", [
3815         [ 0x00, "Has No Value" ],
3816         [ 0xff, "Has Value" ],
3817 ])
3818 VAPVersion                      = uint8("vap_version", "VAP Version")
3819 VariableBitMask                 = uint32("variable_bit_mask", "Variable Bit Mask")
3820 VariableBitsDefined             = uint16("variable_bits_defined", "Variable Bits Defined")
3821 VConsoleRevision                = uint8("vconsole_rev", "Console Revision")
3822 VConsoleVersion                 = uint8("vconsole_ver", "Console Version")
3823 Verb                            = uint32("verb", "Verb")
3824 VerbData                        = uint8("verb_data", "Verb Data")
3825 version                         = uint32("version", "Version")
3826 VersionNumber                   = uint8("version_number", "Version")
3827 VertLocation                    = uint16("vert_location", "Vertical Location")
3828 VirtualConsoleVersion           = uint8("virtual_console_version", "Virtual Console Version")
3829 VolumeID                        = uint32("volume_id", "Volume ID")
3830 VolumeID.Display("BASE_HEX")
3831 VolInfoReplyLen                 = uint16("vol_info_reply_len", "Volume Information Reply Length")
3832 VolumeCachedFlag                = val_string8("volume_cached_flag", "Volume Cached Flag", [
3833         [ 0x00, "Volume is Not Cached" ],
3834         [ 0xff, "Volume is Cached" ],
3835 ])      
3836 VolumeDataStreams               = uint8("volume_data_streams", "Volume Data Streams")
3837 VolumeHashedFlag                = val_string8("volume_hashed_flag", "Volume Hashed Flag", [
3838         [ 0x00, "Volume is Not Hashed" ],
3839         [ 0xff, "Volume is Hashed" ],
3840 ])      
3841 VolumeLastModifiedDate          = uint16("volume_last_modified_date", "Volume Last Modified Date")
3842 VolumeLastModifiedDate.NWDate()
3843 VolumeLastModifiedTime          = uint16("volume_last_modified_time", "Volume Last Modified Time") 
3844 VolumeLastModifiedTime.NWTime()
3845 VolumeMountedFlag               = val_string8("volume_mounted_flag", "Volume Mounted Flag", [
3846         [ 0x00, "Volume is Not Mounted" ],
3847         [ 0xff, "Volume is Mounted" ],
3848 ])
3849 VolumeName                      = fw_string("volume_name", "Volume Name", 16)
3850 VolumeNameLen                   = nstring8("volume_name_len", "Volume Name")
3851 VolumeNameSpaces                = uint8("volume_name_spaces", "Volume Name Spaces")
3852 VolumeNameStringz               = stringz("volume_name_stringz", "Volume Name")
3853 VolumeNumber                    = uint8("volume_number", "Volume Number")
3854 VolumeNumberLong                = uint32("volume_number_long", "Volume Number")
3855 VolumeRemovableFlag             = val_string8("volume_removable_flag", "Volume Removable Flag", [
3856         [ 0x00, "Disk Cannot be Removed from Server" ],
3857         [ 0xff, "Disk Can be Removed from Server" ],
3858 ])
3859 VolumeRequestFlags              = val_string16("volume_request_flags", "Volume Request Flags", [
3860         [ 0x0000, "Return name with volume number" ],
3861         [ 0x0001, "Do not return name with volume number" ],
3862 ])
3863 VolumeSizeInClusters            = uint32("volume_size_in_clusters", "Volume Size in Clusters")
3864 VolumesSupportedMax             = uint16("volumes_supported_max", "Volumes Supported Max")
3865 VolumeType                      = val_string16("volume_type", "Volume Type", [
3866         [ 0x0000, "NetWare 386" ],
3867         [ 0x0001, "NetWare 286" ],
3868         [ 0x0002, "NetWare 386 Version 30" ],
3869         [ 0x0003, "NetWare 386 Version 31" ],
3870 ])
3871 WastedServerMemory              = uint16("wasted_server_memory", "Wasted Server Memory", BE)
3872 WaitTime                        = uint32("wait_time", "Wait Time")
3873
3874 Year                            = val_string8("year", "Year",[
3875         [ 0x50, "1980" ],
3876         [ 0x51, "1981" ],
3877         [ 0x52, "1982" ],
3878         [ 0x53, "1983" ],
3879         [ 0x54, "1984" ],
3880         [ 0x55, "1985" ],
3881         [ 0x56, "1986" ],
3882         [ 0x57, "1987" ],
3883         [ 0x58, "1988" ],
3884         [ 0x59, "1989" ],
3885         [ 0x5a, "1990" ],
3886         [ 0x5b, "1991" ],
3887         [ 0x5c, "1992" ],
3888         [ 0x5d, "1993" ],
3889         [ 0x5e, "1994" ],
3890         [ 0x5f, "1995" ],
3891         [ 0x60, "1996" ],
3892         [ 0x61, "1997" ],
3893         [ 0x62, "1998" ],
3894         [ 0x63, "1999" ],
3895         [ 0x64, "2000" ],
3896         [ 0x65, "2001" ],
3897         [ 0x66, "2002" ],
3898         [ 0x67, "2003" ],
3899         [ 0x68, "2004" ],
3900         [ 0x69, "2005" ],
3901         [ 0x6a, "2006" ],
3902         [ 0x6b, "2007" ],
3903         [ 0x6c, "2008" ],
3904         [ 0x6d, "2009" ],
3905         [ 0x6e, "2010" ],
3906         [ 0x6f, "2011" ],
3907         [ 0x70, "2012" ],
3908         [ 0x71, "2013" ],
3909         [ 0x72, "2014" ],
3910         [ 0x73, "2015" ],
3911         [ 0x74, "2016" ],
3912         [ 0x75, "2017" ],
3913         [ 0x76, "2018" ],
3914         [ 0x77, "2019" ],
3915         [ 0x78, "2020" ],
3916         [ 0x79, "2021" ],
3917         [ 0x7a, "2022" ],
3918         [ 0x7b, "2023" ],
3919         [ 0x7c, "2024" ],
3920         [ 0x7d, "2025" ],
3921         [ 0x7e, "2026" ],
3922         [ 0x7f, "2027" ],
3923         [ 0xc0, "1984" ],
3924         [ 0xc1, "1985" ],
3925         [ 0xc2, "1986" ],
3926         [ 0xc3, "1987" ],
3927         [ 0xc4, "1988" ],
3928         [ 0xc5, "1989" ],
3929         [ 0xc6, "1990" ],
3930         [ 0xc7, "1991" ],
3931         [ 0xc8, "1992" ],
3932         [ 0xc9, "1993" ],
3933         [ 0xca, "1994" ],
3934         [ 0xcb, "1995" ],
3935         [ 0xcc, "1996" ],
3936         [ 0xcd, "1997" ],
3937         [ 0xce, "1998" ],
3938         [ 0xcf, "1999" ],
3939         [ 0xd0, "2000" ],
3940         [ 0xd1, "2001" ],
3941         [ 0xd2, "2002" ],
3942         [ 0xd3, "2003" ],
3943         [ 0xd4, "2004" ],
3944         [ 0xd5, "2005" ],
3945         [ 0xd6, "2006" ],
3946         [ 0xd7, "2007" ],
3947         [ 0xd8, "2008" ],
3948         [ 0xd9, "2009" ],
3949         [ 0xda, "2010" ],
3950         [ 0xdb, "2011" ],
3951         [ 0xdc, "2012" ],
3952         [ 0xdd, "2013" ],
3953         [ 0xde, "2014" ],
3954         [ 0xdf, "2015" ],
3955 ])
3956 ##############################################################################
3957 # Structs
3958 ##############################################################################
3959                 
3960                 
3961 acctngInfo                      = struct("acctng_info_struct", [
3962         HoldTime,
3963         HoldAmount,
3964         ChargeAmount,
3965         HeldConnectTimeInMinutes,
3966         HeldRequests,
3967         HeldBytesRead,
3968         HeldBytesWritten,
3969 ],"Accounting Information")
3970 AFP10Struct                       = struct("afp_10_struct", [
3971         AFPEntryID,
3972         ParentID,
3973         AttributesDef16,
3974         DataForkLen,
3975         ResourceForkLen,
3976         TotalOffspring,
3977         CreationDate,
3978         LastAccessedDate,
3979         ModifiedDate,
3980         ModifiedTime,
3981         ArchivedDate,
3982         ArchivedTime,
3983         CreatorID,
3984         Reserved4,
3985         FinderAttr,
3986         HorizLocation,
3987         VertLocation,
3988         FileDirWindow,
3989         Reserved16,
3990         LongName,
3991         CreatorID,
3992         ShortName,
3993         AccessPrivileges,
3994 ], "AFP Information" )                
3995 AFP20Struct                       = struct("afp_20_struct", [
3996         AFPEntryID,
3997         ParentID,
3998         AttributesDef16,
3999         DataForkLen,
4000         ResourceForkLen,
4001         TotalOffspring,
4002         CreationDate,
4003         LastAccessedDate,
4004         ModifiedDate,
4005         ModifiedTime,
4006         ArchivedDate,
4007         ArchivedTime,
4008         CreatorID,
4009         Reserved4,
4010         FinderAttr,
4011         HorizLocation,
4012         VertLocation,
4013         FileDirWindow,
4014         Reserved16,
4015         LongName,
4016         CreatorID,
4017         ShortName,
4018         AccessPrivileges,
4019         Reserved,
4020         ProDOSInfo,
4021 ], "AFP Information" )                
4022 ArchiveDateStruct               = struct("archive_date_struct", [
4023         ArchivedDate,
4024 ])                
4025 ArchiveIdStruct                 = struct("archive_id_struct", [
4026         ArchiverID,
4027 ])                
4028 ArchiveInfoStruct               = struct("archive_info_struct", [
4029         ArchivedTime,
4030         ArchivedDate,
4031         ArchiverID,
4032 ], "Archive Information")
4033 ArchiveTimeStruct               = struct("archive_time_struct", [
4034         ArchivedTime,
4035 ])                
4036 AttributesStruct                = struct("attributes_struct", [
4037         AttributesDef32,
4038         FlagsDef,
4039 ], "Attributes")
4040 authInfo                        = struct("auth_info_struct", [
4041         Status,
4042         Reserved2,
4043         Privileges,
4044 ])
4045 BoardNameStruct                 = struct("board_name_struct", [
4046         DriverBoardName,
4047         DriverShortName,
4048         DriverLogicalName,
4049 ], "Board Name")        
4050 CacheInfo                       = struct("cache_info", [
4051         uint32("max_byte_cnt", "Maximum Byte Count"),
4052         uint32("min_num_of_cache_buff", "Minimum Number Of Cache Buffers"),
4053         uint32("min_cache_report_thresh", "Minimum Cache Report Threshold"),
4054         uint32("alloc_waiting", "Allocate Waiting Count"),
4055         uint32("ndirty_blocks", "Number of Dirty Blocks"),
4056         uint32("cache_dirty_wait_time", "Cache Dirty Wait Time"),
4057         uint32("cache_max_concur_writes", "Cache Maximum Concurrent Writes"),
4058         uint32("max_dirty_time", "Maximum Dirty Time"),
4059         uint32("num_dir_cache_buff", "Number Of Directory Cache Buffers"),
4060         uint32("cache_byte_to_block", "Cache Byte To Block Shift Factor"),
4061 ], "Cache Information")
4062 CommonLanStruc                  = struct("common_lan_struct", [
4063         boolean8("not_supported_mask", "Bit Counter Supported"),
4064         Reserved3,
4065         uint32("total_tx_packet_count", "Total Transmit Packet Count"),
4066         uint32("total_rx_packet_count", "Total Receive Packet Count"),
4067         uint32("no_ecb_available_count", "No ECB Available Count"),
4068         uint32("packet_tx_too_big_count", "Transmit Packet Too Big Count"),
4069         uint32("packet_tx_too_small_count", "Transmit Packet Too Small Count"),
4070         uint32("packet_rx_overflow_count", "Receive Packet Overflow Count"),
4071         uint32("packet_rx_too_big_count", "Receive Packet Too Big Count"),
4072         uint32("packet_rs_too_small_count", "Receive Packet Too Small Count"),
4073         uint32("packet_tx_misc_error_count", "Transmit Packet Misc Error Count"),
4074         uint32("packet_rx_misc_error_count", "Receive Packet Misc Error Count"),
4075         uint32("retry_tx_count", "Transmit Retry Count"),
4076         uint32("checksum_error_count", "Checksum Error Count"),
4077         uint32("hardware_rx_mismatch_count", "Hardware Receive Mismatch Count"),
4078 ], "Common LAN Information")
4079 CompDeCompStat                  = struct("comp_d_comp_stat", [ 
4080         uint32("cmphitickhigh", "Compress High Tick"),        
4081         uint32("cmphitickcnt", "Compress High Tick Count"),        
4082         uint32("cmpbyteincount", "Compress Byte In Count"),        
4083         uint32("cmpbyteoutcnt", "Compress Byte Out Count"),        
4084         uint32("cmphibyteincnt", "Compress High Byte In Count"),        
4085         uint32("cmphibyteoutcnt", "Compress High Byte Out Count"),        
4086         uint32("decphitickhigh", "DeCompress High Tick"),        
4087         uint32("decphitickcnt", "DeCompress High Tick Count"),        
4088         uint32("decpbyteincount", "DeCompress Byte In Count"),        
4089         uint32("decpbyteoutcnt", "DeCompress Byte Out Count"),        
4090         uint32("decphibyteincnt", "DeCompress High Byte In Count"),        
4091         uint32("decphibyteoutcnt", "DeCompress High Byte Out Count"),
4092 ], "Compression/Decompression Information")                
4093 ConnFileStruct                  = struct("conn_file_struct", [
4094         ConnectionNumberWord,
4095         TaskNumByte,
4096         LockType,
4097         AccessControl,
4098         LockFlag,
4099 ], "File Connection Information")
4100 ConnStruct                      = struct("conn_struct", [
4101         TaskNumByte,
4102         LockType,
4103         AccessControl,
4104         LockFlag,
4105         VolumeNumber,
4106         DirectoryEntryNumberWord,
4107         FileName14,
4108 ], "Connection Information")
4109 ConnTaskStruct                  = struct("conn_task_struct", [
4110         ConnectionNumberByte,
4111         TaskNumByte,
4112 ], "Task Information")
4113 Counters                        = struct("counters_struct", [
4114         uint32("read_exist_blck", "Read Existing Block Count"),
4115         uint32("read_exist_write_wait", "Read Existing Write Wait Count"),
4116         uint32("read_exist_part_read", "Read Existing Partial Read Count"),
4117         uint32("read_exist_read_err", "Read Existing Read Error Count"),
4118         uint32("wrt_blck_cnt", "Write Block Count"),
4119         uint32("wrt_entire_blck", "Write Entire Block Count"),
4120         uint32("internl_dsk_get", "Internal Disk Get Count"),
4121         uint32("internl_dsk_get_need_to_alloc", "Internal Disk Get Need To Allocate Count"),
4122         uint32("internl_dsk_get_someone_beat", "Internal Disk Get Someone Beat My Count"),
4123         uint32("internl_dsk_get_part_read", "Internal Disk Get Partial Read Count"),
4124         uint32("internl_dsk_get_read_err", "Internal Disk Get Read Error Count"),
4125         uint32("async_internl_dsk_get", "Async Internal Disk Get Count"),
4126         uint32("async_internl_dsk_get_need_to_alloc", "Async Internal Disk Get Need To Alloc"),
4127         uint32("async_internl_dsk_get_someone_beat", "Async Internal Disk Get Someone Beat Me"),
4128         uint32("err_doing_async_read", "Error Doing Async Read Count"),
4129         uint32("internl_dsk_get_no_read", "Internal Disk Get No Read Count"),
4130         uint32("internl_dsk_get_no_read_alloc", "Internal Disk Get No Read Allocate Count"),
4131         uint32("internl_dsk_get_no_read_someone_beat", "Internal Disk Get No Read Someone Beat Me Count"),
4132         uint32("internl_dsk_write", "Internal Disk Write Count"),
4133         uint32("internl_dsk_write_alloc", "Internal Disk Write Allocate Count"),
4134         uint32("internl_dsk_write_someone_beat", "Internal Disk Write Someone Beat Me Count"),
4135         uint32("write_err", "Write Error Count"),
4136         uint32("wait_on_sema", "Wait On Semaphore Count"),
4137         uint32("alloc_blck_i_had_to_wait_for", "Allocate Block I Had To Wait For Someone Count"),
4138         uint32("alloc_blck", "Allocate Block Count"),
4139         uint32("alloc_blck_i_had_to_wait", "Allocate Block I Had To Wait Count"),
4140 ], "Disk Counter Information")
4141 CPUInformation                  = struct("cpu_information", [
4142         PageTableOwnerFlag,
4143         CPUType,
4144         Reserved3,
4145         CoprocessorFlag,
4146         BusType,
4147         Reserved3,
4148         IOEngineFlag,
4149         Reserved3,
4150         FSEngineFlag,
4151         Reserved3, 
4152         NonDedFlag,
4153         Reserved3,
4154         CPUString,
4155         CoProcessorString,
4156         BusString,
4157 ], "CPU Information")
4158 CreationDateStruct              = struct("creation_date_struct", [
4159         CreationDate,
4160 ])                
4161 CreationInfoStruct              = struct("creation_info_struct", [
4162         CreationTime,
4163         CreationDate,
4164         CreatorID,
4165 ], "Creation Information")
4166 CreationTimeStruct              = struct("creation_time_struct", [
4167         CreationTime,
4168 ])
4169 CustomCntsInfo                  = struct("custom_cnts_info", [
4170         CustomVariableValue,
4171         CustomString,
4172 ], "Custom Counters" )        
4173 DataStreamInfo                  = struct("data_stream_info", [
4174         AssociatedNameSpace,
4175         DataStreamName
4176 ])
4177 DataStreamSizeStruct            = struct("data_stream_size_struct", [
4178         DataStreamSize,
4179 ])
4180 DirCacheInfo                    = struct("dir_cache_info", [
4181         uint32("min_time_since_file_delete", "Minimum Time Since File Delete"),
4182         uint32("abs_min_time_since_file_delete", "Absolute Minimum Time Since File Delete"),
4183         uint32("min_num_of_dir_cache_buff", "Minimum Number Of Directory Cache Buffers"),
4184         uint32("max_num_of_dir_cache_buff", "Maximum Number Of Directory Cache Buffers"),
4185         uint32("num_of_dir_cache_buff", "Number Of Directory Cache Buffers"),
4186         uint32("dc_min_non_ref_time", "DC Minimum Non-Referenced Time"),
4187         uint32("dc_wait_time_before_new_buff", "DC Wait Time Before New Buffer"),
4188         uint32("dc_max_concurrent_writes", "DC Maximum Concurrent Writes"),
4189         uint32("dc_dirty_wait_time", "DC Dirty Wait Time"),
4190         uint32("dc_double_read_flag", "DC Double Read Flag"),
4191         uint32("map_hash_node_count", "Map Hash Node Count"),
4192         uint32("space_restriction_node_count", "Space Restriction Node Count"),
4193         uint32("trustee_list_node_count", "Trustee List Node Count"),
4194         uint32("percent_of_vol_used_by_dirs", "Percent Of Volume Used By Directories"),
4195 ], "Directory Cache Information")
4196 DirEntryStruct                  = struct("dir_entry_struct", [
4197         DirectoryEntryNumber,
4198         DOSDirectoryEntryNumber,
4199         VolumeNumberLong,
4200 ], "Directory Entry Information")
4201 DirectoryInstance               = struct("directory_instance", [
4202         SearchSequenceWord,
4203         DirectoryID,
4204         DirectoryName14,
4205         DirectoryAttributes,
4206         DirectoryAccessRights,
4207         endian(CreationDate, BE),
4208         endian(AccessDate, BE),
4209         CreatorID,
4210         Reserved2,
4211         DirectoryStamp,
4212 ], "Directory Information")
4213 DMInfoLevel0                    = struct("dm_info_level_0", [
4214         uint32("io_flag", "IO Flag"),
4215         uint32("sm_info_size", "Storage Module Information Size"),
4216         uint32("avail_space", "Available Space"),
4217         uint32("used_space", "Used Space"),
4218         stringz("s_module_name", "Storage Module Name"),
4219         uint8("s_m_info", "Storage Media Information"),
4220 ])
4221 DMInfoLevel1                    = struct("dm_info_level_1", [
4222         NumberOfSMs,
4223         SMIDs,
4224 ])
4225 DMInfoLevel2                    = struct("dm_info_level_2", [
4226         Name,
4227 ])
4228 DOSDirectoryEntryStruct         = struct("dos_directory_entry_struct", [
4229         AttributesDef32,
4230         UniqueID,
4231         PurgeFlags,
4232         DestNameSpace,
4233         DirectoryNameLen,
4234         DirectoryName,
4235         CreationTime,
4236         CreationDate,
4237         CreatorID,
4238         ArchivedTime,
4239         ArchivedDate,
4240         ArchiverID,
4241         UpdateTime,
4242         UpdateDate,
4243         NextTrusteeEntry,
4244         Reserved48,
4245         InheritedRightsMask,
4246 ], "DOS Directory Information")
4247 DOSFileEntryStruct              = struct("dos_file_entry_struct", [
4248         AttributesDef32,
4249         UniqueID,
4250         PurgeFlags,
4251         DestNameSpace,
4252         NameLen,
4253         Name12,
4254         CreationTime,
4255         CreationDate,
4256         CreatorID,
4257         ArchivedTime,
4258         ArchivedDate,
4259         ArchiverID,
4260         UpdateTime,
4261         UpdateDate,
4262         UpdateID,
4263         FileSize,
4264         DataForkFirstFAT,
4265         NextTrusteeEntry,
4266         Reserved36,
4267         InheritedRightsMask,
4268         LastAccessedDate,
4269         Reserved28,
4270         PrimaryEntry,
4271         NameList,
4272 ], "DOS File Information")
4273 DSSpaceAllocateStruct           = struct("ds_space_alloc_struct", [
4274         DataStreamSpaceAlloc,
4275 ])
4276 DynMemStruct                    = struct("dyn_mem_struct", [
4277         uint32("dyn_mem_struct_total", "Total Dynamic Space" ),
4278         uint32("dyn_mem_struct_max", "Max Used Dynamic Space" ),
4279         uint32("dyn_mem_struct_cur", "Current Used Dynamic Space" ),
4280 ], "Dynamic Memory Information")
4281 EAInfoStruct                    = struct("ea_info_struct", [
4282         EADataSize,
4283         EACount,
4284         EAKeySize,
4285 ], "Extended Attribute Information")
4286 ExtraCacheCntrs                 = struct("extra_cache_cntrs", [
4287         uint32("internl_dsk_get_no_wait", "Internal Disk Get No Wait Count"),
4288         uint32("internl_dsk_get_no_wait_need", "Internal Disk Get No Wait Need To Allocate Count"),
4289         uint32("internl_dsk_get_no_wait_no_blk", "Internal Disk Get No Wait No Block Count"),
4290         uint32("id_get_no_read_no_wait", "ID Get No Read No Wait Count"),
4291         uint32("id_get_no_read_no_wait_sema", "ID Get No Read No Wait Semaphored Count"),
4292         uint32("id_get_no_read_no_wait_buffer", "ID Get No Read No Wait No Buffer Count"),
4293         uint32("id_get_no_read_no_wait_alloc", "ID Get No Read No Wait Allocate Count"),
4294         uint32("id_get_no_read_no_wait_no_alloc", "ID Get No Read No Wait No Alloc Count"),
4295         uint32("id_get_no_read_no_wait_no_alloc_sema", "ID Get No Read No Wait No Alloc Semaphored Count"),
4296         uint32("id_get_no_read_no_wait_no_alloc_alloc", "ID Get No Read No Wait No Alloc Allocate Count"),
4297 ], "Extra Cache Counters Information")
4298
4299
4300 ReferenceIDStruct               = struct("ref_id_struct", [
4301         CurrentReferenceID,
4302 ])
4303 NSAttributeStruct               = struct("ns_attrib_struct", [
4304         AttributesDef32,
4305 ])
4306 DStreamActual                   = struct("d_stream_actual", [
4307         Reserved12,
4308         # Need to look into how to format this correctly
4309 ])
4310 DStreamLogical                  = struct("d_string_logical", [
4311         Reserved12,
4312         # Need to look into how to format this correctly
4313 ])
4314 LastUpdatedInSecondsStruct      = struct("last_update_in_seconds_struct", [
4315         SecondsRelativeToTheYear2000,
4316 ]) 
4317 DOSNameStruct                   = struct("dos_name_struct", [
4318         FileName,
4319 ], "DOS File Name") 
4320 FlushTimeStruct                 = struct("flush_time_struct", [
4321         FlushTime,
4322 ]) 
4323 ParentBaseIDStruct              = struct("parent_base_id_struct", [
4324         ParentBaseID,
4325 ]) 
4326 MacFinderInfoStruct             = struct("mac_finder_info_struct", [
4327         MacFinderInfo,
4328 ]) 
4329 SiblingCountStruct              = struct("sibling_count_struct", [
4330         SiblingCount,
4331 ]) 
4332 EffectiveRightsStruct           = struct("eff_rights_struct", [
4333         EffectiveRights,
4334         Reserved3,     
4335 ]) 
4336 MacTimeStruct                   = struct("mac_time_struct", [
4337         MACCreateDate,
4338         MACCreateTime,
4339         MACBackupDate,
4340         MACBackupTime,
4341 ])
4342 LastAccessedTimeStruct          = struct("last_access_time_struct", [
4343         LastAccessedTime,      
4344 ])
4345
4346
4347
4348 FileAttributesStruct            = struct("file_attributes_struct", [
4349         AttributesDef32,
4350 ])
4351 FileInfoStruct                  = struct("file_info_struct", [
4352         ParentID,
4353         DirectoryEntryNumber,
4354         TotalBlocksToDecompress,
4355         CurrentBlockBeingDecompressed,
4356 ], "File Information")
4357 FileInstance                    = struct("file_instance", [
4358         SearchSequenceWord,
4359         DirectoryID,
4360         FileName14,
4361         AttributesDef,
4362         FileMode,
4363         FileSize,
4364         endian(CreationDate, BE),
4365         endian(AccessDate, BE),
4366         endian(UpdateDate, BE),
4367         endian(UpdateTime, BE),
4368 ], "File Instance")
4369 FileNameStruct                  = struct("file_name_struct", [
4370         FileName,
4371 ], "File Name")       
4372 FileServerCounters              = struct("file_server_counters", [
4373         uint16("too_many_hops", "Too Many Hops"),
4374         uint16("unknown_network", "Unknown Network"),
4375         uint16("no_space_for_service", "No Space For Service"),
4376         uint16("no_receive_buff", "No Receive Buffers"),
4377         uint16("not_my_network", "Not My Network"),
4378         uint32("netbios_progated", "NetBIOS Propagated Count"),
4379         uint32("ttl_pckts_srvcd", "Total Packets Serviced"),
4380         uint32("ttl_pckts_routed", "Total Packets Routed"),
4381 ], "File Server Counters")
4382 FileSystemInfo                  = struct("file_system_info", [
4383         uint32("fat_moved", "Number of times the OS has move the location of FAT"),
4384         uint32("fat_write_err", "Number of write errors in both original and mirrored copies of FAT"),
4385         uint32("someone_else_did_it_0", "Someone Else Did It Count 0"),
4386         uint32("someone_else_did_it_1", "Someone Else Did It Count 1"),
4387         uint32("someone_else_did_it_2", "Someone Else Did It Count 2"),
4388         uint32("i_ran_out_someone_else_did_it_0", "I Ran Out Someone Else Did It Count 0"),
4389         uint32("i_ran_out_someone_else_did_it_1", "I Ran Out Someone Else Did It Count 1"),
4390         uint32("i_ran_out_someone_else_did_it_2", "I Ran Out Someone Else Did It Count 2"),
4391         uint32("turbo_fat_build_failed", "Turbo FAT Build Failed Count"),
4392         uint32("extra_use_count_node_count", "Errors allocating a use count node for TTS"),
4393         uint32("extra_extra_use_count_node_count", "Errors allocating an additional use count node for TTS"),
4394         uint32("error_read_last_fat", "Error Reading Last FAT Count"),
4395         uint32("someone_else_using_this_file", "Someone Else Using This File Count"),
4396 ], "File System Information")
4397 GenericInfoDef                  = struct("generic_info_def", [
4398         fw_string("generic_label", "Label", 64),
4399         uint32("generic_ident_type", "Identification Type"),
4400         uint32("generic_ident_time", "Identification Time"),
4401         uint32("generic_media_type", "Media Type"),
4402         uint32("generic_cartridge_type", "Cartridge Type"),
4403         uint32("generic_unit_size", "Unit Size"),
4404         uint32("generic_block_size", "Block Size"),
4405         uint32("generic_capacity", "Capacity"),
4406         uint32("generic_pref_unit_size", "Preferred Unit Size"),
4407         fw_string("generic_name", "Name",64),
4408         uint32("generic_type", "Type"),
4409         uint32("generic_status", "Status"),
4410         uint32("generic_func_mask", "Function Mask"),
4411         uint32("generic_ctl_mask", "Control Mask"),
4412         uint32("generic_parent_count", "Parent Count"),
4413         uint32("generic_sib_count", "Sibling Count"),
4414         uint32("generic_child_count", "Child Count"),
4415         uint32("generic_spec_info_sz", "Specific Information Size"),
4416         uint32("generic_object_uniq_id", "Unique Object ID"),
4417         uint32("generic_media_slot", "Media Slot"),
4418 ], "Generic Information")
4419 HandleInfoLevel0                = struct("handle_info_level_0", [
4420 #        DataStream,
4421 ])
4422 HandleInfoLevel1                = struct("handle_info_level_1", [
4423         DataStream,
4424 ])        
4425 HandleInfoLevel2                = struct("handle_info_level_2", [
4426         DOSDirectoryBase,
4427         NameSpace,
4428         DataStream,
4429 ])        
4430 HandleInfoLevel3                = struct("handle_info_level_3", [
4431         DOSDirectoryBase,
4432         NameSpace,
4433 ])        
4434 HandleInfoLevel4                = struct("handle_info_level_4", [
4435         DOSDirectoryBase,
4436         NameSpace,
4437         ParentDirectoryBase,
4438         ParentDOSDirectoryBase,
4439 ])        
4440 HandleInfoLevel5                = struct("handle_info_level_5", [
4441         DOSDirectoryBase,
4442         NameSpace,
4443         DataStream,
4444         ParentDirectoryBase,
4445         ParentDOSDirectoryBase,
4446 ])        
4447 IPXInformation                  = struct("ipx_information", [
4448         uint32("ipx_send_pkt", "IPX Send Packet Count"),
4449         uint16("ipx_malform_pkt", "IPX Malformed Packet Count"),
4450         uint32("ipx_get_ecb_req", "IPX Get ECB Request Count"),
4451         uint32("ipx_get_ecb_fail", "IPX Get ECB Fail Count"),
4452         uint32("ipx_aes_event", "IPX AES Event Count"),
4453         uint16("ipx_postponed_aes", "IPX Postponed AES Count"),
4454         uint16("ipx_max_conf_sock", "IPX Max Configured Socket Count"),
4455         uint16("ipx_max_open_sock", "IPX Max Open Socket Count"),
4456         uint16("ipx_open_sock_fail", "IPX Open Socket Fail Count"),
4457         uint32("ipx_listen_ecb", "IPX Listen ECB Count"),
4458         uint16("ipx_ecb_cancel_fail", "IPX ECB Cancel Fail Count"),
4459         uint16("ipx_get_lcl_targ_fail", "IPX Get Local Target Fail Count"),
4460 ], "IPX Information")
4461 JobEntryTime                    = struct("job_entry_time", [
4462         Year,
4463         Month,
4464         Day,
4465         Hour,
4466         Minute,
4467         Second,
4468 ], "Job Entry Time")
4469 JobStruct                       = struct("job_struct", [
4470         ClientStation,
4471         ClientTaskNumber,
4472         ClientIDNumber,
4473         TargetServerIDNumber,
4474         TargetExecutionTime,
4475         JobEntryTime,
4476         JobNumber,
4477         JobType,
4478         JobPosition,
4479         JobControlFlags,
4480         JobFileName,
4481         JobFileHandle,
4482         ServerStation,
4483         ServerTaskNumber,
4484         ServerID,
4485         TextJobDescription,
4486         ClientRecordArea,
4487 ], "Job Information")
4488 JobStructNew                    = struct("job_struct_new", [
4489         RecordInUseFlag,
4490         PreviousRecord,
4491         NextRecord,
4492         ClientStationLong,
4493         ClientTaskNumberLong,
4494         ClientIDNumber,
4495         TargetServerIDNumber,
4496         TargetExecutionTime,
4497         JobEntryTime,
4498         JobNumberLong,
4499         JobType,
4500         JobPositionWord,
4501         JobControlFlagsWord,
4502         JobFileName,
4503         JobFileHandleLong,
4504         ServerStationLong,
4505         ServerTaskNumberLong,
4506         ServerID,
4507 ], "Job Information")                
4508 KnownRoutes                     = struct("known_routes", [
4509         NetIDNumber,
4510         HopsToNet,
4511         NetStatus,
4512         TimeToNet,
4513 ], "Known Routes")
4514 KnownServStruc                  = struct("known_server_struct", [
4515         ServerAddress,
4516         HopsToNet,
4517         ServerNameStringz,
4518 ], "Known Servers")                
4519 LANConfigInfo                   = struct("lan_cfg_info", [
4520         LANdriverCFG_MajorVersion,
4521         LANdriverCFG_MinorVersion,
4522         LANdriverNodeAddress,
4523         Reserved,
4524         LANdriverModeFlags,
4525         LANdriverBoardNumber,
4526         LANdriverBoardInstance,
4527         LANdriverMaximumSize,
4528         LANdriverMaxRecvSize,
4529         LANdriverRecvSize,
4530         LANdriverCardID,
4531         LANdriverMediaID,
4532         LANdriverTransportTime,
4533         LANdriverSrcRouting,
4534         LANdriverLineSpeed,
4535         LANdriverReserved,
4536         LANdriverMajorVersion,
4537         LANdriverMinorVersion,
4538         LANdriverFlags,
4539         LANdriverSendRetries,
4540         LANdriverLink,
4541         LANdriverSharingFlags,
4542         LANdriverSlot,
4543         LANdriverIOPortsAndRanges1,
4544         LANdriverIOPortsAndRanges2,
4545         LANdriverIOPortsAndRanges3,
4546         LANdriverIOPortsAndRanges4,
4547         LANdriverMemoryDecode0,
4548         LANdriverMemoryLength0,
4549         LANdriverMemoryDecode1,
4550         LANdriverMemoryLength1,
4551         LANdriverInterrupt1,
4552         LANdriverInterrupt2,
4553         LANdriverDMAUsage1,
4554         LANdriverDMAUsage2,
4555         LANdriverLogicalName,
4556         LANdriverIOReserved,
4557         LANdriverCardName,
4558 ], "LAN Configuration Information")
4559 LastAccessStruct                = struct("last_access_struct", [
4560         LastAccessedDate,
4561 ])
4562 lockInfo                        = struct("lock_info_struct", [
4563         LogicalLockThreshold,
4564         PhysicalLockThreshold,
4565         FileLockCount,
4566         RecordLockCount,
4567 ], "Lock Information")
4568 LockStruct                      = struct("lock_struct", [
4569         TaskNumByte,
4570         LockType,
4571         RecordStart,
4572         RecordEnd,
4573 ], "Locks")
4574 LoginTime                       = struct("login_time", [
4575         Year,
4576         Month,
4577         Day,
4578         Hour,
4579         Minute,
4580         Second,
4581         DayOfWeek,
4582 ], "Login Time")
4583 LogLockStruct                   = struct("log_lock_struct", [
4584         TaskNumByte,
4585         LockStatus,
4586         LockName,
4587 ], "Logical Locks")
4588 LogRecStruct                    = struct("log_rec_struct", [
4589         ConnectionNumberWord,
4590         TaskNumByte,
4591         LockStatus,
4592 ], "Logical Record Locks")
4593 LSLInformation                  = struct("lsl_information", [
4594         uint32("rx_buffers", "Receive Buffers"),
4595         uint32("rx_buffers_75", "Receive Buffers Warning Level"),
4596         uint32("rx_buffers_checked_out", "Receive Buffers Checked Out Count"),
4597         uint32("rx_buffer_size", "Receive Buffer Size"),
4598         uint32("max_phy_packet_size", "Maximum Physical Packet Size"),
4599         uint32("last_time_rx_buff_was_alloc", "Last Time a Receive Buffer was Allocated"),
4600         uint32("max_num_of_protocols", "Maximum Number of Protocols"),
4601         uint32("max_num_of_media_types", "Maximum Number of Media Types"),
4602         uint32("total_tx_packets", "Total Transmit Packets"),
4603         uint32("get_ecb_buf", "Get ECB Buffers"),
4604         uint32("get_ecb_fails", "Get ECB Failures"),
4605         uint32("aes_event_count", "AES Event Count"),
4606         uint32("post_poned_events", "Postponed Events"),
4607         uint32("ecb_cxl_fails", "ECB Cancel Failures"),
4608         uint32("valid_bfrs_reused", "Valid Buffers Reused"),
4609         uint32("enqueued_send_cnt", "Enqueued Send Count"),
4610         uint32("total_rx_packets", "Total Receive Packets"),
4611         uint32("unclaimed_packets", "Unclaimed Packets"),
4612         uint8("stat_table_major_version", "Statistics Table Major Version"),
4613         uint8("stat_table_minor_version", "Statistics Table Minor Version"),
4614 ], "LSL Information")
4615 MaximumSpaceStruct              = struct("max_space_struct", [
4616         MaxSpace,
4617 ])
4618 MemoryCounters                  = struct("memory_counters", [
4619         uint32("orig_num_cache_buff", "Original Number Of Cache Buffers"),
4620         uint32("curr_num_cache_buff", "Current Number Of Cache Buffers"),
4621         uint32("cache_dirty_block_thresh", "Cache Dirty Block Threshold"),
4622         uint32("wait_node", "Wait Node Count"),
4623         uint32("wait_node_alloc_fail", "Wait Node Alloc Failure Count"),
4624         uint32("move_cache_node", "Move Cache Node Count"),
4625         uint32("move_cache_node_from_avai", "Move Cache Node From Avail Count"),
4626         uint32("accel_cache_node_write", "Accelerate Cache Node Write Count"),
4627         uint32("rem_cache_node", "Remove Cache Node Count"),
4628         uint32("rem_cache_node_from_avail", "Remove Cache Node From Avail Count"),
4629 ], "Memory Counters")
4630 MLIDBoardInfo                   = struct("mlid_board_info", [           
4631         uint32("protocol_board_num", "Protocol Board Number"),
4632         uint16("protocol_number", "Protocol Number"),
4633         bytes("protocol_id", "Protocol ID", 6),
4634         nstring8("protocol_name", "Protocol Name"),
4635 ], "MLID Board Information")        
4636 ModifyInfoStruct                = struct("modify_info_struct", [
4637         ModifiedTime,
4638         ModifiedDate,
4639         ModifierID,
4640         LastAccessedDate,
4641 ], "Modification Information")
4642 nameInfo                        = struct("name_info_struct", [
4643         ObjectType,
4644         nstring8("login_name", "Login Name"),
4645 ], "Name Information")
4646 NCPNetworkAddress               = struct("ncp_network_address_struct", [
4647         TransportType,
4648         Reserved3,
4649         NetAddress,
4650 ], "Network Address")
4651
4652 netAddr                         = struct("net_addr_struct", [
4653         TransportType,
4654         nbytes32("transport_addr", "Transport Address"),
4655 ], "Network Address")
4656
4657 NetWareInformationStruct        = struct("netware_information_struct", [
4658         DataStreamSpaceAlloc,           # (Data Stream Alloc Bit)
4659         AttributesDef32,                # (Attributes Bit)
4660         FlagsDef,
4661         DataStreamSize,                 # (Data Stream Size Bit)
4662         TotalDataStreamDiskSpaceAlloc,  # (Total Stream Size Bit)
4663         NumberOfDataStreams,
4664         CreationTime,                   # (Creation Bit)
4665         CreationDate,
4666         CreatorID,
4667         ModifiedTime,                   # (Modify Bit)
4668         ModifiedDate,
4669         ModifierID,
4670         LastAccessedDate,
4671         ArchivedTime,                   # (Archive Bit)
4672         ArchivedDate,
4673         ArchiverID,
4674         InheritedRightsMask,            # (Rights Bit)
4675         DirectoryEntryNumber,           # (Directory Entry Bit)
4676         DOSDirectoryEntryNumber,
4677         VolumeNumberLong,
4678         EADataSize,                     # (Extended Attribute Bit)
4679         EACount,
4680         EAKeySize,
4681         CreatorNameSpaceNumber,         # (Name Space Bit)
4682         Reserved3,
4683 ], "NetWare Information")
4684 NLMInformation                  = struct("nlm_information", [
4685         IdentificationNumber,
4686         NLMFlags,
4687         Reserved3,
4688         NLMType,
4689         Reserved3,
4690         ParentID,
4691         MajorVersion,
4692         MinorVersion,
4693         Revision,
4694         Year,
4695         Reserved3,
4696         Month,
4697         Reserved3,
4698         Day,
4699         Reserved3,
4700         AllocAvailByte,
4701         AllocFreeCount,
4702         LastGarbCollect,
4703         MessageLanguage,
4704         NumberOfReferencedPublics,
4705 ], "NLM Information")
4706 NSInfoStruct                    = struct("ns_info_struct", [
4707         NameSpace,
4708         Reserved3,
4709 ])
4710 NWAuditStatus                   = struct("nw_audit_status", [
4711         AuditVersionDate,
4712         AuditFileVersionDate,
4713         val_string16("audit_enable_flag", "Auditing Enabled Flag", [
4714                 [ 0x0000, "Auditing Disabled" ],
4715                 [ 0x0100, "Auditing Enabled" ],
4716         ]),
4717         Reserved2,
4718         uint32("audit_file_size", "Audit File Size"),
4719         uint32("modified_counter", "Modified Counter"),
4720         uint32("audit_file_max_size", "Audit File Maximum Size"),
4721         uint32("audit_file_size_threshold", "Audit File Size Threshold"),
4722         uint32("audit_record_count", "Audit Record Count"),
4723         uint32("auditing_flags", "Auditing Flags"),
4724 ], "NetWare Audit Status")
4725 ObjectSecurityStruct            = struct("object_security_struct", [
4726         ObjectSecurity,
4727 ])
4728 ObjectFlagsStruct               = struct("object_flags_struct", [
4729         ObjectFlags,
4730 ])
4731 ObjectTypeStruct                = struct("object_type_struct", [
4732         ObjectType,
4733         Reserved2,
4734 ])
4735 ObjectNameStruct                = struct("object_name_struct", [
4736         ObjectNameStringz,
4737 ])
4738 ObjectIDStruct                  = struct("object_id_struct", [
4739         ObjectID, 
4740         Restriction,
4741 ])
4742 OpnFilesStruct                  = struct("opn_files_struct", [
4743         TaskNumberWord,
4744         LockType,
4745         AccessControl,
4746         LockFlag,
4747         VolumeNumber,
4748         DOSParentDirectoryEntry,
4749         DOSDirectoryEntry,
4750         ForkCount,
4751         NameSpace,
4752         FileName,
4753 ], "Open Files Information")
4754 OwnerIDStruct                   = struct("owner_id_struct", [
4755         CreatorID,
4756 ])                
4757 PacketBurstInformation          = struct("packet_burst_information", [
4758         uint32("big_invalid_slot", "Big Invalid Slot Count"),
4759         uint32("big_forged_packet", "Big Forged Packet Count"),
4760         uint32("big_invalid_packet", "Big Invalid Packet Count"),
4761         uint32("big_still_transmitting", "Big Still Transmitting Count"),
4762         uint32("still_doing_the_last_req", "Still Doing The Last Request Count"),
4763         uint32("invalid_control_req", "Invalid Control Request Count"),
4764         uint32("control_invalid_message_number", "Control Invalid Message Number Count"),
4765         uint32("control_being_torn_down", "Control Being Torn Down Count"),
4766         uint32("big_repeat_the_file_read", "Big Repeat the File Read Count"),
4767         uint32("big_send_extra_cc_count", "Big Send Extra CC Count"),
4768         uint32("big_return_abort_mess", "Big Return Abort Message Count"),
4769         uint32("big_read_invalid_mess", "Big Read Invalid Message Number Count"),
4770         uint32("big_read_do_it_over", "Big Read Do It Over Count"),
4771         uint32("big_read_being_torn_down", "Big Read Being Torn Down Count"),
4772         uint32("previous_control_packet", "Previous Control Packet Count"),
4773         uint32("send_hold_off_message", "Send Hold Off Message Count"),
4774         uint32("big_read_no_data_avail", "Big Read No Data Available Count"),
4775         uint32("big_read_trying_to_read", "Big Read Trying To Read Too Much Count"),
4776         uint32("async_read_error", "Async Read Error Count"),
4777         uint32("big_read_phy_read_err", "Big Read Physical Read Error Count"),
4778         uint32("ctl_bad_ack_frag_list", "Control Bad ACK Fragment List Count"),
4779         uint32("ctl_no_data_read", "Control No Data Read Count"),
4780         uint32("write_dup_req", "Write Duplicate Request Count"),
4781         uint32("shouldnt_be_ack_here", "Shouldn't Be ACKing Here Count"),
4782         uint32("write_incon_packet_len", "Write Inconsistent Packet Lengths Count"),
4783         uint32("first_packet_isnt_a_write", "First Packet Isn't A Write Count"),
4784         uint32("write_trash_dup_req", "Write Trashed Duplicate Request Count"),
4785         uint32("big_write_inv_message_num", "Big Write Invalid Message Number Count"),
4786         uint32("big_write_being_torn_down", "Big Write Being Torn Down Count"),
4787         uint32("big_write_being_abort", "Big Write Being Aborted Count"),
4788         uint32("zero_ack_frag", "Zero ACK Fragment Count"),
4789         uint32("write_curr_trans", "Write Currently Transmitting Count"),
4790         uint32("try_to_write_too_much", "Trying To Write Too Much Count"),
4791         uint32("write_out_of_mem_for_ctl_nodes", "Write Out Of Memory For Control Nodes Count"),
4792         uint32("write_didnt_need_this_frag", "Write Didn't Need This Fragment Count"),
4793         uint32("write_too_many_buf_check", "Write Too Many Buffers Checked Out Count"),
4794         uint32("write_timeout", "Write Time Out Count"),
4795         uint32("write_got_an_ack0", "Write Got An ACK Count 0"),
4796         uint32("write_got_an_ack1", "Write Got An ACK Count 1"),
4797         uint32("poll_abort_conn", "Poller Aborted The Connnection Count"),
4798         uint32("may_had_out_of_order", "Maybe Had Out Of Order Writes Count"),
4799         uint32("had_an_out_of_order", "Had An Out Of Order Write Count"),
4800         uint32("moved_the_ack_bit_dn", "Moved The ACK Bit Down Count"),
4801         uint32("bumped_out_of_order", "Bumped Out Of Order Write Count"),
4802         uint32("poll_rem_old_out_of_order", "Poller Removed Old Out Of Order Count"),
4803         uint32("write_didnt_need_but_req_ack", "Write Didn't Need But Requested ACK Count"),
4804         uint32("write_trash_packet", "Write Trashed Packet Count"),
4805         uint32("too_many_ack_frag", "Too Many ACK Fragments Count"),
4806         uint32("saved_an_out_of_order_packet", "Saved An Out Of Order Packet Count"),
4807         uint32("conn_being_aborted", "Connection Being Aborted Count"),
4808 ], "Packet Burst Information")
4809
4810 PadDSSpaceAllocate              = struct("pad_ds_space_alloc", [
4811     Reserved4,
4812 ])
4813 PadAttributes                   = struct("pad_attributes", [
4814     Reserved6,
4815 ])
4816 PadDataStreamSize               = struct("pad_data_stream_size", [
4817     Reserved4,
4818 ])    
4819 PadTotalStreamSize              = struct("pad_total_stream_size", [
4820     Reserved6,
4821 ])
4822 PadCreationInfo                 = struct("pad_creation_info", [
4823     Reserved8,
4824 ])
4825 PadModifyInfo                   = struct("pad_modify_info", [
4826     Reserved10,
4827 ])
4828 PadArchiveInfo                  = struct("pad_archive_info", [
4829     Reserved8,
4830 ])
4831 PadRightsInfo                   = struct("pad_rights_info", [
4832     Reserved2,
4833 ])
4834 PadDirEntry                     = struct("pad_dir_entry", [
4835     Reserved12,
4836 ])
4837 PadEAInfo                       = struct("pad_ea_info", [
4838     Reserved12,
4839 ])
4840 PadNSInfo                       = struct("pad_ns_info", [
4841     Reserved4,
4842 ])
4843 PhyLockStruct                   = struct("phy_lock_struct", [
4844         LoggedCount,
4845         ShareableLockCount,
4846         RecordStart,
4847         RecordEnd,
4848         LogicalConnectionNumber,
4849         TaskNumByte,
4850         LockType,
4851 ], "Physical Locks")
4852 printInfo                       = struct("print_info_struct", [
4853         PrintFlags,
4854         TabSize,
4855         Copies,
4856         PrintToFileFlag,
4857         BannerName,
4858         TargetPrinter,
4859         FormType,
4860 ], "Print Information")
4861 RightsInfoStruct                = struct("rights_info_struct", [
4862         InheritedRightsMask,
4863 ])
4864 RoutersInfo                     = struct("routers_info", [
4865         bytes("node", "Node", 6),
4866         ConnectedLAN,
4867         uint16("route_hops", "Hop Count"),
4868         uint16("route_time", "Route Time"),
4869 ], "Router Information")        
4870 RTagStructure                   = struct("r_tag_struct", [
4871         RTagNumber,
4872         ResourceSignature,
4873         ResourceCount,
4874         ResourceName,
4875 ], "Resource Tag")
4876 ScanInfoFileName                = struct("scan_info_file_name", [
4877         SalvageableFileEntryNumber,
4878         FileName,
4879 ])
4880 ScanInfoFileNoName              = struct("scan_info_file_no_name", [
4881         SalvageableFileEntryNumber,        
4882 ])        
4883 Segments                        = struct("segments", [
4884         uint32("volume_segment_dev_num", "Volume Segment Device Number"),
4885         uint32("volume_segment_offset", "Volume Segment Offset"),
4886         uint32("volume_segment_size", "Volume Segment Size"),
4887 ], "Volume Segment Information")            
4888 SemaInfoStruct                  = struct("sema_info_struct", [
4889         LogicalConnectionNumber,
4890         TaskNumByte,
4891 ])
4892 SemaStruct                      = struct("sema_struct", [
4893         OpenCount,
4894         SemaphoreValue,
4895         TaskNumByte,
4896         SemaphoreName,
4897 ], "Semaphore Information")
4898 ServerInfo                      = struct("server_info", [
4899         uint32("reply_canceled", "Reply Canceled Count"),
4900         uint32("write_held_off", "Write Held Off Count"),
4901         uint32("write_held_off_with_dup", "Write Held Off With Duplicate Request"),
4902         uint32("invalid_req_type", "Invalid Request Type Count"),
4903         uint32("being_aborted", "Being Aborted Count"),
4904         uint32("already_doing_realloc", "Already Doing Re-Allocate Count"),
4905         uint32("dealloc_invalid_slot", "De-Allocate Invalid Slot Count"),
4906         uint32("dealloc_being_proc", "De-Allocate Being Processed Count"),
4907         uint32("dealloc_forged_packet", "De-Allocate Forged Packet Count"),
4908         uint32("dealloc_still_transmit", "De-Allocate Still Transmitting Count"),
4909         uint32("start_station_error", "Start Station Error Count"),
4910         uint32("invalid_slot", "Invalid Slot Count"),
4911         uint32("being_processed", "Being Processed Count"),
4912         uint32("forged_packet", "Forged Packet Count"),
4913         uint32("still_transmitting", "Still Transmitting Count"),
4914         uint32("reexecute_request", "Re-Execute Request Count"),
4915         uint32("invalid_sequence_number", "Invalid Sequence Number Count"),
4916         uint32("dup_is_being_sent", "Duplicate Is Being Sent Already Count"),
4917         uint32("sent_pos_ack", "Sent Positive Acknowledge Count"),
4918         uint32("sent_a_dup_reply", "Sent A Duplicate Reply Count"),
4919         uint32("no_mem_for_station", "No Memory For Station Control Count"),
4920         uint32("no_avail_conns", "No Available Connections Count"),
4921         uint32("realloc_slot", "Re-Allocate Slot Count"),
4922         uint32("realloc_slot_came_too_soon", "Re-Allocate Slot Came Too Soon Count"),
4923 ], "Server Information")
4924 ServersSrcInfo                  = struct("servers_src_info", [
4925         ServerNode,
4926         ConnectedLAN,
4927         HopsToNet,
4928 ], "Source Server Information")
4929 SpaceStruct                     = struct("space_struct", [        
4930         Level,
4931         MaxSpace,
4932         CurrentSpace,
4933 ], "Space Information")        
4934 SPXInformation                  = struct("spx_information", [
4935         uint16("spx_max_conn", "SPX Max Connections Count"),
4936         uint16("spx_max_used_conn", "SPX Max Used Connections"),
4937         uint16("spx_est_conn_req", "SPX Establish Connection Requests"),
4938         uint16("spx_est_conn_fail", "SPX Establish Connection Fail"),
4939         uint16("spx_listen_con_req", "SPX Listen Connect Request"),
4940         uint16("spx_listen_con_fail", "SPX Listen Connect Fail"),
4941         uint32("spx_send", "SPX Send Count"),
4942         uint32("spx_window_choke", "SPX Window Choke Count"),
4943         uint16("spx_bad_send", "SPX Bad Send Count"),
4944         uint16("spx_send_fail", "SPX Send Fail Count"),
4945         uint16("spx_abort_conn", "SPX Aborted Connection"),
4946         uint32("spx_listen_pkt", "SPX Listen Packet Count"),
4947         uint16("spx_bad_listen", "SPX Bad Listen Count"),
4948         uint32("spx_incoming_pkt", "SPX Incoming Packet Count"),
4949         uint16("spx_bad_in_pkt", "SPX Bad In Packet Count"),
4950         uint16("spx_supp_pkt", "SPX Suppressed Packet Count"),
4951         uint16("spx_no_ses_listen", "SPX No Session Listen ECB Count"),
4952         uint16("spx_watch_dog", "SPX Watch Dog Destination Session Count"),
4953 ], "SPX Information")
4954 StackInfo                       = struct("stack_info", [
4955         StackNumber,
4956         fw_string("stack_short_name", "Stack Short Name", 16),
4957 ], "Stack Information")        
4958 statsInfo                       = struct("stats_info_struct", [
4959         TotalBytesRead,
4960         TotalBytesWritten,
4961         TotalRequest,
4962 ], "Statistics")
4963 theTimeStruct                   = struct("the_time_struct", [
4964         UTCTimeInSeconds,
4965         FractionalSeconds,
4966         TimesyncStatus,
4967 ])        
4968 timeInfo                        = struct("time_info", [
4969         Year,
4970         Month,
4971         Day,
4972         Hour,
4973         Minute,
4974         Second,
4975         DayOfWeek,
4976         uint32("login_expiration_time", "Login Expiration Time"),
4977 ])              
4978 TotalStreamSizeStruct           = struct("total_stream_size_struct", [
4979         TotalDataStreamDiskSpaceAlloc,
4980         NumberOfDataStreams,
4981 ])
4982 TrendCounters                   = struct("trend_counters", [
4983         uint32("num_of_cache_checks", "Number Of Cache Checks"),
4984         uint32("num_of_cache_hits", "Number Of Cache Hits"),
4985         uint32("num_of_dirty_cache_checks", "Number Of Dirty Cache Checks"),
4986         uint32("num_of_cache_dirty_checks", "Number Of Cache Dirty Checks"),
4987         uint32("cache_used_while_check", "Cache Used While Checking"),
4988         uint32("wait_till_dirty_blcks_dec", "Wait Till Dirty Blocks Decrease Count"),
4989         uint32("alloc_blck_frm_avail", "Allocate Block From Available Count"),
4990         uint32("alloc_blck_frm_lru", "Allocate Block From LRU Count"),
4991         uint32("alloc_blck_already_wait", "Allocate Block Already Waiting"),
4992         uint32("lru_sit_time", "LRU Sitting Time"),
4993         uint32("num_of_cache_check_no_wait", "Number Of Cache Check No Wait"),
4994         uint32("num_of_cache_hits_no_wait", "Number Of Cache Hits No Wait"),
4995 ], "Trend Counters")
4996 TrusteeStruct                   = struct("trustee_struct", [
4997         ObjectID,
4998         AccessRightsMaskWord,
4999 ])
5000 UpdateDateStruct                = struct("update_date_struct", [
5001         UpdateDate,
5002 ])
5003 UpdateIDStruct                  = struct("update_id_struct", [
5004         UpdateID,
5005 ])        
5006 UpdateTimeStruct                = struct("update_time_struct", [
5007         UpdateTime,
5008 ])                
5009 UserInformation                 = struct("user_info", [
5010         ConnectionNumber,
5011         UseCount,
5012         Reserved2,
5013         ConnectionServiceType,
5014         Year,
5015         Month,
5016         Day,
5017         Hour,
5018         Minute,
5019         Second,
5020         DayOfWeek,
5021         Status,
5022         Reserved2,
5023         ExpirationTime,
5024         ObjectType,
5025         Reserved2,
5026         TransactionTrackingFlag,
5027         LogicalLockThreshold,
5028         FileWriteFlags,
5029         FileWriteState,
5030         Reserved,
5031         FileLockCount,
5032         RecordLockCount,
5033         TotalBytesRead,
5034         TotalBytesWritten,
5035         TotalRequest,
5036         HeldRequests,
5037         HeldBytesRead,
5038         HeldBytesWritten,
5039 ], "User Information")
5040 VolInfoStructure                = struct("vol_info_struct", [
5041         VolumeType,
5042         Reserved2,
5043         StatusFlagBits,
5044         SectorSize,
5045         SectorsPerClusterLong,
5046         VolumeSizeInClusters,
5047         FreedClusters,
5048         SubAllocFreeableClusters,
5049         FreeableLimboSectors,
5050         NonFreeableLimboSectors,
5051         NonFreeableAvailableSubAllocSectors,
5052         NotUsableSubAllocSectors,
5053         SubAllocClusters,
5054         DataStreamsCount,
5055         LimboDataStreamsCount,
5056         OldestDeletedFileAgeInTicks,
5057         CompressedDataStreamsCount,
5058         CompressedLimboDataStreamsCount,
5059         UnCompressableDataStreamsCount,
5060         PreCompressedSectors,
5061         CompressedSectors,
5062         MigratedFiles,
5063         MigratedSectors,
5064         ClustersUsedByFAT,
5065         ClustersUsedByDirectories,
5066         ClustersUsedByExtendedDirectories,
5067         TotalDirectoryEntries,
5068         UnUsedDirectoryEntries,
5069         TotalExtendedDirectoryExtants,
5070         UnUsedExtendedDirectoryExtants,
5071         ExtendedAttributesDefined,
5072         ExtendedAttributeExtantsUsed,
5073         DirectoryServicesObjectID,
5074         VolumeLastModifiedTime,
5075         VolumeLastModifiedDate,
5076 ], "Volume Information")
5077 VolInfo2Struct                  = struct("vol_info_struct_2", [
5078         uint32("volume_active_count", "Volume Active Count"),
5079         uint32("volume_use_count", "Volume Use Count"),
5080         uint32("mac_root_ids", "MAC Root IDs"),
5081         VolumeLastModifiedTime,
5082         VolumeLastModifiedDate,
5083         uint32("volume_reference_count", "Volume Reference Count"),
5084         uint32("compression_lower_limit", "Compression Lower Limit"),
5085         uint32("outstanding_ios", "Outstanding IOs"),
5086         uint32("outstanding_compression_ios", "Outstanding Compression IOs"),
5087         uint32("compression_ios_limit", "Compression IOs Limit"),
5088 ], "Extended Volume Information")        
5089 VolumeStruct                    = struct("volume_struct", [
5090         VolumeNumberLong,
5091         VolumeNameLen,
5092 ])
5093
5094
5095 ##############################################################################
5096 # NCP Groups
5097 ##############################################################################
5098 def define_groups():
5099         groups['accounting']    = "Accounting"
5100         groups['afp']           = "AFP"
5101         groups['auditing']      = "Auditing"
5102         groups['bindery']       = "Bindery"
5103         groups['comm']          = "Communication"
5104         groups['connection']    = "Connection"
5105         groups['directory']     = "Directory"
5106         groups['extended']      = "Extended Attribute"
5107         groups['file']          = "File"
5108         groups['fileserver']    = "File Server"
5109         groups['message']       = "Message"
5110         groups['migration']     = "Data Migration"
5111         groups['misc']          = "Miscellaneous"
5112         groups['name']          = "Name Space"
5113         groups['nds']           = "NetWare Directory"
5114         groups['print']         = "Print"
5115         groups['queue']         = "Queue"
5116         groups['sync']          = "Synchronization"
5117         groups['tts']           = "Transaction Tracking"
5118         groups['qms']           = "Queue Management System (QMS)"
5119         groups['stats']         = "Server Statistics"
5120         groups['unknown']       = "Unknown"
5121
5122 ##############################################################################
5123 # NCP Errors
5124 ##############################################################################
5125 def define_errors():
5126         errors[0x0000] = "Ok"
5127         errors[0x0001] = "Transaction tracking is available"
5128         errors[0x0002] = "Ok. The data has been written"
5129         errors[0x0003] = "Calling Station is a Manager"
5130     
5131         errors[0x0100] = "One or more of the ConnectionNumbers in the send list are invalid"
5132         errors[0x0101] = "Invalid space limit"
5133         errors[0x0102] = "Insufficient disk space"
5134         errors[0x0103] = "Queue server cannot add jobs"
5135         errors[0x0104] = "Out of disk space"
5136         errors[0x0105] = "Semaphore overflow"
5137         errors[0x0106] = "Invalid Parameter"
5138         errors[0x0107] = "Invalid Number of Minutes to Delay"
5139         errors[0x0108] = "Invalid Start or Network Number"
5140         errors[0x0109] = "Cannot Obtain License"
5141     
5142         errors[0x0200] = "One or more clients in the send list are not logged in"
5143         errors[0x0201] = "Queue server cannot attach"
5144     
5145         errors[0x0300] = "One or more clients in the send list are not accepting messages"
5146     
5147         errors[0x0400] = "Client already has message"
5148         errors[0x0401] = "Queue server cannot service job"
5149     
5150         errors[0x7300] = "Revoke Handle Rights Not Found"
5151         errors[0x7900] = "Invalid Parameter in Request Packet"
5152         errors[0x7901] = "Nothing being Compressed"
5153         errors[0x7a00] = "Connection Already Temporary"
5154         errors[0x7b00] = "Connection Already Logged in"
5155         errors[0x7c00] = "Connection Not Authenticated"
5156         
5157         errors[0x7e00] = "NCP failed boundary check"
5158         errors[0x7e01] = "Invalid Length"
5159     
5160         errors[0x7f00] = "Lock Waiting"
5161         errors[0x8000] = "Lock fail"
5162         errors[0x8001] = "File in Use"
5163     
5164         errors[0x8100] = "A file handle could not be allocated by the file server"
5165         errors[0x8101] = "Out of File Handles"
5166         
5167         errors[0x8200] = "Unauthorized to open the file"
5168         errors[0x8300] = "Unable to read/write the volume. Possible bad sector on the file server"
5169         errors[0x8301] = "Hard I/O Error"
5170     
5171         errors[0x8400] = "Unauthorized to create the directory"
5172         errors[0x8401] = "Unauthorized to create the file"
5173     
5174         errors[0x8500] = "Unauthorized to delete the specified file"
5175         errors[0x8501] = "Unauthorized to overwrite an existing file in this directory"
5176     
5177         errors[0x8700] = "An unexpected character was encountered in the filename"
5178         errors[0x8701] = "Create Filename Error"
5179     
5180         errors[0x8800] = "Invalid file handle"
5181         errors[0x8900] = "Unauthorized to search this file/directory"
5182         errors[0x8a00] = "Unauthorized to delete this file/directory"
5183         errors[0x8b00] = "Unauthorized to rename a file in this directory"
5184     
5185         errors[0x8c00] = "No set privileges"
5186         errors[0x8c01] = "Unauthorized to modify a file in this directory"
5187         errors[0x8c02] = "Unauthorized to change the restriction on this volume"
5188     
5189         errors[0x8d00] = "Some of the affected files are in use by another client"
5190         errors[0x8d01] = "The affected file is in use"
5191     
5192         errors[0x8e00] = "All of the affected files are in use by another client"
5193         errors[0x8f00] = "Some of the affected files are read-only"
5194     
5195         errors[0x9000] = "An attempt to modify a read-only volume occurred"
5196         errors[0x9001] = "All of the affected files are read-only"
5197         errors[0x9002] = "Read Only Access to Volume"
5198     
5199         errors[0x9100] = "Some of the affected files already exist"
5200         errors[0x9101] = "Some Names Exist"
5201     
5202         errors[0x9200] = "Directory with the new name already exists"
5203         errors[0x9201] = "All of the affected files already exist"
5204     
5205         errors[0x9300] = "Unauthorized to read from this file"
5206         errors[0x9400] = "Unauthorized to write to this file"
5207         errors[0x9500] = "The affected file is detached"
5208     
5209         errors[0x9600] = "The file server has run out of memory to service this request"
5210         errors[0x9601] = "No alloc space for message"
5211         errors[0x9602] = "Server Out of Space"
5212     
5213         errors[0x9800] = "The affected volume is not mounted"
5214         errors[0x9801] = "The volume associated with Volume Number is not mounted"
5215         errors[0x9802] = "The resulting volume does not exist"
5216         errors[0x9803] = "The destination volume is not mounted"
5217         errors[0x9804] = "Disk Map Error"
5218     
5219         errors[0x9900] = "The file server has run out of directory space on the affected volume"
5220         errors[0x9a00] = "Invalid request to rename the affected file to another volume"
5221     
5222         errors[0x9b00] = "DirHandle is not associated with a valid directory path"
5223         errors[0x9b01] = "A resulting directory handle is not associated with a valid directory path"
5224         errors[0x9b02] = "The directory associated with DirHandle does not exist"
5225         errors[0x9b03] = "Bad directory handle"
5226     
5227         errors[0x9c00] = "The resulting path is not valid"
5228         errors[0x9c01] = "The resulting file path is not valid"
5229         errors[0x9c02] = "The resulting directory path is not valid"
5230         errors[0x9c03] = "Invalid path"
5231     
5232         errors[0x9d00] = "A directory handle was not available for allocation"
5233     
5234         errors[0x9e00] = "The name of the directory does not conform to a legal name for this name space"
5235         errors[0x9e01] = "The new directory name does not conform to a legal name for this name space"
5236         errors[0x9e02] = "Bad File Name"
5237     
5238         errors[0x9f00] = "The request attempted to delete a directory that is in use by another client"
5239     
5240         errors[0xa000] = "The request attempted to delete a directory that is not empty"
5241         errors[0xa100] = "An unrecoverable error occured on the affected directory"
5242     
5243         errors[0xa200] = "The request attempted to read from a file region that is physically locked"
5244         errors[0xa201] = "I/O Lock Error"
5245     
5246         errors[0xa400] = "Invalid directory rename attempted"
5247         errors[0xa500] = "Invalid open create mode"
5248         errors[0xa600] = "Auditor Access has been Removed"
5249         errors[0xa700] = "Error Auditing Version"
5250             
5251         errors[0xa800] = "Invalid Support Module ID"
5252         errors[0xa801] = "No Auditing Access Rights"
5253         errors[0xa802] = "No Access Rights"
5254             
5255         errors[0xbe00] = "Invalid Data Stream"
5256         errors[0xbf00] = "Requests for this name space are not valid on this volume"
5257     
5258         errors[0xc000] = "Unauthorized to retrieve accounting data"
5259         
5260         errors[0xc100] = "The ACCOUNT_BALANCE property does not exist"
5261         errors[0xc101] = "No Account Balance"
5262         
5263         errors[0xc200] = "The object has exceeded its credit limit"
5264         errors[0xc300] = "Too many holds have been placed against this account"
5265         errors[0xc400] = "The client account has been disabled"
5266     
5267         errors[0xc500] = "Access to the account has been denied because of intruder detection"
5268         errors[0xc501] = "Login lockout"
5269         errors[0xc502] = "Server Login Locked"
5270     
5271         errors[0xc600] = "The caller does not have operator priviliges"
5272         errors[0xc601] = "The client does not have operator priviliges"
5273     
5274         errors[0xc800] = "Missing EA Key"
5275         errors[0xc900] = "EA Not Found"
5276         errors[0xca00] = "Invalid EA Handle Type"
5277         errors[0xcb00] = "EA No Key No Data"
5278         errors[0xcc00] = "EA Number Mismatch"
5279         errors[0xcd00] = "Extent Number Out of Range"
5280         errors[0xce00] = "EA Bad Directory Number"
5281         errors[0xcf00] = "Invalid EA Handle"
5282     
5283         errors[0xd000] = "Queue error"
5284         errors[0xd001] = "EA Position Out of Range"
5285         
5286         errors[0xd100] = "The queue does not exist"
5287         errors[0xd101] = "EA Access Denied"
5288     
5289         errors[0xd200] = "A queue server is not associated with this queue"
5290         errors[0xd201] = "A queue server is not associated with the selected queue"
5291         errors[0xd202] = "No queue server"
5292         errors[0xd203] = "Data Page Odd Size"
5293     
5294         errors[0xd300] = "No queue rights"
5295         errors[0xd301] = "EA Volume Not Mounted"
5296     
5297         errors[0xd400] = "The queue is full and cannot accept another request"
5298         errors[0xd401] = "The queue associated with ObjectId is full and cannot accept another request"
5299         errors[0xd402] = "Bad Page Boundary"
5300     
5301         errors[0xd500] = "A job does not exist in this queue"
5302         errors[0xd501] = "No queue job"
5303         errors[0xd502] = "The job associated with JobNumber does not exist in this queue"
5304         errors[0xd503] = "Inspect Failure"
5305         errors[0xd504] = "Unknown NCP Extension Number"
5306     
5307         errors[0xd600] = "The file server does not allow unencrypted passwords"
5308         errors[0xd601] = "No job right"
5309         errors[0xd602] = "EA Already Claimed"
5310     
5311         errors[0xd700] = "Bad account"
5312         errors[0xd701] = "The old and new password strings are identical"
5313         errors[0xd702] = "The job is currently being serviced"
5314         errors[0xd703] = "The queue is currently servicing a job"
5315         errors[0xd704] = "Queue servicing"
5316         errors[0xd705] = "Odd Buffer Size"
5317     
5318         errors[0xd800] = "Queue not active"
5319         errors[0xd801] = "No Scorecards"
5320         
5321         errors[0xd900] = "The file server cannot accept another connection as it has reached its limit"
5322         errors[0xd901] = "The client is not security equivalent to one of the objects in the Q_SERVERS group property of the target queue"
5323         errors[0xd902] = "Station is not a server"
5324         errors[0xd903] = "Bad EDS Signature"
5325     
5326         errors[0xda00] = "Attempted to login to the file server during a restricted time period"
5327         errors[0xda01] = "Queue halted"
5328         errors[0xda02] = "EA Space Limit"
5329     
5330         errors[0xdb00] = "Attempted to login to the file server from an unauthorized workstation or network"
5331         errors[0xdb01] = "The queue cannot attach another queue server"
5332         errors[0xdb02] = "Maximum queue servers"
5333         errors[0xdb03] = "EA Key Corrupt"
5334     
5335         errors[0xdc00] = "Account Expired"
5336         errors[0xdc01] = "EA Key Limit"
5337         
5338         errors[0xdd00] = "Tally Corrupt"
5339         errors[0xde00] = "Attempted to login to the file server with an incorrect password"
5340         errors[0xdf00] = "Attempted to login to the file server with a password that has expired"
5341     
5342         errors[0xe000] = "No Login Connections Available"
5343         errors[0xe700] = "No disk track"
5344         errors[0xe800] = "Write to group"
5345         errors[0xe900] = "The object is already a member of the group property"
5346     
5347         errors[0xea00] = "No such member"
5348         errors[0xea01] = "The bindery object is not a member of the set"
5349         errors[0xea02] = "Non-existent member"
5350     
5351         errors[0xeb00] = "The property is not a set property"
5352     
5353         errors[0xec00] = "No such set"
5354         errors[0xec01] = "The set property does not exist"
5355     
5356         errors[0xed00] = "Property exists"
5357         errors[0xed01] = "The property already exists"
5358         errors[0xed02] = "An attempt was made to create a bindery object property that already exists"
5359     
5360         errors[0xee00] = "The object already exists"
5361         errors[0xee01] = "The bindery object already exists"
5362     
5363         errors[0xef00] = "Illegal name"
5364         errors[0xef01] = "Illegal characters in ObjectName field"
5365         errors[0xef02] = "Invalid name"
5366     
5367         errors[0xf000] = "A wildcard was detected in a field that does not support wildcards"
5368         errors[0xf001] = "An illegal wildcard was detected in ObjectName"
5369     
5370         errors[0xf100] = "The client does not have the rights to access this bindery object"
5371         errors[0xf101] = "Bindery security"
5372         errors[0xf102] = "Invalid bindery security"
5373     
5374         errors[0xf200] = "Unauthorized to read from this object"
5375         errors[0xf300] = "Unauthorized to rename this object"
5376     
5377         errors[0xf400] = "Unauthorized to delete this object"
5378         errors[0xf401] = "No object delete privileges"
5379         errors[0xf402] = "Unauthorized to delete this queue"
5380     
5381         errors[0xf500] = "Unauthorized to create this object"
5382         errors[0xf501] = "No object create"
5383     
5384         errors[0xf600] = "No property delete"
5385         errors[0xf601] = "Unauthorized to delete the property of this object"
5386         errors[0xf602] = "Unauthorized to delete this property"
5387     
5388         errors[0xf700] = "Unauthorized to create this property"
5389         errors[0xf701] = "No property create privilege"
5390     
5391         errors[0xf800] = "Unauthorized to write to this property"
5392         errors[0xf900] = "Unauthorized to read this property"
5393         errors[0xfa00] = "Temporary remap error"
5394     
5395         errors[0xfb00] = "No such property"
5396         errors[0xfb01] = "The file server does not support this request"
5397         errors[0xfb02] = "The specified property does not exist"
5398         errors[0xfb03] = "The PASSWORD property does not exist for this bindery object"
5399         errors[0xfb04] = "NDS NCP not available"
5400         errors[0xfb05] = "Bad Directory Handle"
5401         errors[0xfb06] = "Unknown Request"
5402         errors[0xfb07] = "Invalid Subfunction Request"
5403         errors[0xfb08] = "Attempt to use an invalid parameter (drive number, path, or flag value) during a set drive path call"
5404         errors[0xfb09] = "NMAS not running on this server, NCP NOT Supported"
5405         errors[0xfb0a] = "Station Not Logged In"
5406         errors[0xfb0b] = "Secret Store not running on this server, NCP Not supported"
5407     
5408         errors[0xfc00] = "The message queue cannot accept another message"
5409         errors[0xfc01] = "The trustee associated with ObjectId does not exist"
5410         errors[0xfc02] = "The specified bindery object does not exist"
5411         errors[0xfc03] = "The bindery object associated with ObjectID does not exist"
5412         errors[0xfc04] = "A bindery object does not exist that matches"
5413         errors[0xfc05] = "The specified queue does not exist"
5414         errors[0xfc06] = "No such object"
5415         errors[0xfc07] = "The queue associated with ObjectID does not exist"
5416     
5417         errors[0xfd00] = "Bad station number"
5418         errors[0xfd01] = "The connection associated with ConnectionNumber is not active"
5419         errors[0xfd02] = "Lock collision"
5420         errors[0xfd03] = "Transaction tracking is disabled"
5421     
5422         errors[0xfe00] = "I/O failure"
5423         errors[0xfe01] = "The files containing the bindery on the file server are locked"
5424         errors[0xfe02] = "A file with the specified name already exists in this directory"
5425         errors[0xfe03] = "No more restrictions were found"
5426         errors[0xfe04] = "The file server was unable to lock the file within the specified time limit"
5427         errors[0xfe05] = "The file server was unable to lock all files within the specified time limit"
5428         errors[0xfe06] = "The bindery object associated with ObjectID is not a valid trustee"
5429         errors[0xfe07] = "Directory locked"
5430         errors[0xfe08] = "Bindery locked"
5431         errors[0xfe09] = "Invalid semaphore name length"
5432         errors[0xfe0a] = "The file server was unable to complete the operation within the specified time limit"
5433         errors[0xfe0b] = "Transaction restart"
5434         errors[0xfe0c] = "Bad packet"
5435         errors[0xfe0d] = "Timeout"
5436         errors[0xfe0e] = "User Not Found"
5437         errors[0xfe0f] = "Trustee Not Found"
5438     
5439         errors[0xff00] = "Failure"
5440         errors[0xff01] = "Lock error"
5441         errors[0xff02] = "File not found"
5442         errors[0xff03] = "The file not found or cannot be unlocked"
5443         errors[0xff04] = "Record not found"
5444         errors[0xff05] = "The logical record was not found"
5445         errors[0xff06] = "The printer associated with Printer Number does not exist"
5446         errors[0xff07] = "No such printer"
5447         errors[0xff08] = "Unable to complete the request"
5448         errors[0xff09] = "Unauthorized to change privileges of this trustee"
5449         errors[0xff0a] = "No files matching the search criteria were found"
5450         errors[0xff0b] = "A file matching the search criteria was not found"
5451         errors[0xff0c] = "Verification failed"
5452         errors[0xff0d] = "Object associated with ObjectID is not a manager"
5453         errors[0xff0e] = "Invalid initial semaphore value"
5454         errors[0xff0f] = "The semaphore handle is not valid"
5455         errors[0xff10] = "SemaphoreHandle is not associated with a valid sempahore"
5456         errors[0xff11] = "Invalid semaphore handle"
5457         errors[0xff12] = "Transaction tracking is not available"
5458         errors[0xff13] = "The transaction has not yet been written to disk"
5459         errors[0xff14] = "Directory already exists"
5460         errors[0xff15] = "The file already exists and the deletion flag was not set"
5461         errors[0xff16] = "No matching files or directories were found"
5462         errors[0xff17] = "A file or directory matching the search criteria was not found"
5463         errors[0xff18] = "The file already exists"
5464         errors[0xff19] = "Failure, No files found"
5465         errors[0xff1a] = "Unlock Error"
5466         errors[0xff1b] = "I/O Bound Error"
5467         errors[0xff1c] = "Not Accepting Messages"
5468         errors[0xff1d] = "No More Salvageable Files in Directory"
5469         errors[0xff1e] = "Calling Station is Not a Manager"
5470         errors[0xff1f] = "Bindery Failure"
5471         errors[0xff20] = "NCP Extension Not Found"
5472
5473 ##############################################################################
5474 # Produce C code
5475 ##############################################################################
5476 def ExamineVars(vars, structs_hash, vars_hash):
5477         for var in vars:
5478                 if isinstance(var, struct):
5479                         structs_hash[var.HFName()] = var
5480                         struct_vars = var.Variables()
5481                         ExamineVars(struct_vars, structs_hash, vars_hash)
5482                 else:
5483                         vars_hash[repr(var)] = var
5484                         if isinstance(var, bitfield):
5485                                 sub_vars = var.SubVariables()
5486                                 ExamineVars(sub_vars, structs_hash, vars_hash)
5487
5488 def produce_code():
5489
5490         global errors
5491
5492         print "/*"
5493         print " * Generated automatically from %s" % (sys.argv[0])
5494         print " * Do not edit this file manually, as all changes will be lost."
5495         print " */\n"
5496
5497         print """
5498 /*
5499  * This program is free software; you can redistribute it and/or
5500  * modify it under the terms of the GNU General Public License
5501  * as published by the Free Software Foundation; either version 2
5502  * of the License, or (at your option) any later version.
5503  * 
5504  * This program is distributed in the hope that it will be useful,
5505  * but WITHOUT ANY WARRANTY; without even the implied warranty of
5506  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5507  * GNU General Public License for more details.
5508  * 
5509  * You should have received a copy of the GNU General Public License
5510  * along with this program; if not, write to the Free Software
5511  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
5512  */
5513
5514 #ifdef HAVE_CONFIG_H
5515 # include "config.h"
5516 #endif
5517
5518 #include <string.h>
5519 #include <glib.h>
5520 #include <epan/packet.h>
5521 #include <epan/conversation.h>
5522 #include "ptvcursor.h"
5523 #include "packet-ncp-int.h"
5524 #include <epan/strutil.h>
5525
5526 /* Function declarations for functions used in proto_register_ncp2222() */
5527 static void ncp_init_protocol(void);
5528 static void ncp_postseq_cleanup(void);
5529
5530 /* Endianness macros */
5531 #define BE              0
5532 #define LE              1
5533 #define NO_ENDIANNESS   0
5534
5535 #define NO_LENGTH       -1
5536
5537 /* We use this int-pointer as a special flag in ptvc_record's */
5538 static int ptvc_struct_int_storage;
5539 #define PTVC_STRUCT     (&ptvc_struct_int_storage)
5540
5541 /* Values used in the count-variable ("var"/"repeat") logic. */"""
5542
5543
5544         if global_highest_var > -1:
5545                 print "#define NUM_REPEAT_VARS\t%d" % (global_highest_var + 1)
5546                 print "guint repeat_vars[NUM_REPEAT_VARS];",
5547         else:
5548                 print "#define NUM_REPEAT_VARS\t0"
5549                 print "guint *repeat_vars = NULL;",
5550
5551         print """
5552 #define NO_VAR          NUM_REPEAT_VARS
5553 #define NO_REPEAT       NUM_REPEAT_VARS
5554
5555 #define REQ_COND_SIZE_CONSTANT  0
5556 #define REQ_COND_SIZE_VARIABLE  1
5557 #define NO_REQ_COND_SIZE        0
5558
5559
5560 #define NTREE   0x00020000
5561 #define NDEPTH  0x00000002
5562 #define NREV    0x00000004
5563 #define NFLAGS  0x00000008
5564
5565
5566
5567 static int hf_ncp_func = -1;
5568 static int hf_ncp_length = -1;
5569 static int hf_ncp_subfunc = -1;
5570 static int hf_ncp_fragment_handle = -1;
5571 static int hf_ncp_completion_code = -1;
5572 static int hf_ncp_connection_status = -1;
5573 static int hf_ncp_req_frame_num = -1;
5574 static int hf_ncp_req_frame_time = -1;
5575 static int hf_ncp_fragment_size = -1;
5576 static int hf_ncp_message_size = -1;
5577 static int hf_ncp_nds_flag = -1;
5578 static int hf_ncp_nds_verb = -1; 
5579 static int hf_ping_version = -1;
5580 static int hf_nds_version = -1;
5581 static int hf_nds_flags = -1;
5582 static int hf_nds_reply_depth = -1;
5583 static int hf_nds_reply_rev = -1;
5584 static int hf_nds_reply_flags = -1;
5585 static int hf_nds_p1type = -1;
5586 static int hf_nds_uint32value = -1;
5587 static int hf_nds_bit1 = -1;
5588 static int hf_nds_bit2 = -1;
5589 static int hf_nds_bit3 = -1;
5590 static int hf_nds_bit4 = -1;
5591 static int hf_nds_bit5 = -1;
5592 static int hf_nds_bit6 = -1;
5593 static int hf_nds_bit7 = -1;
5594 static int hf_nds_bit8 = -1;
5595 static int hf_nds_bit9 = -1;
5596 static int hf_nds_bit10 = -1;
5597 static int hf_nds_bit11 = -1;
5598 static int hf_nds_bit12 = -1;
5599 static int hf_nds_bit13 = -1;
5600 static int hf_nds_bit14 = -1;
5601 static int hf_nds_bit15 = -1;
5602 static int hf_nds_bit16 = -1;
5603 static int hf_bit1outflags = -1;
5604 static int hf_bit2outflags = -1;
5605 static int hf_bit3outflags = -1;
5606 static int hf_bit4outflags = -1;
5607 static int hf_bit5outflags = -1;
5608 static int hf_bit6outflags = -1;
5609 static int hf_bit7outflags = -1;
5610 static int hf_bit8outflags = -1;
5611 static int hf_bit9outflags = -1;
5612 static int hf_bit10outflags = -1;
5613 static int hf_bit11outflags = -1;
5614 static int hf_bit12outflags = -1;
5615 static int hf_bit13outflags = -1;
5616 static int hf_bit14outflags = -1;
5617 static int hf_bit15outflags = -1;
5618 static int hf_bit16outflags = -1;
5619 static int hf_bit1nflags = -1;
5620 static int hf_bit2nflags = -1;
5621 static int hf_bit3nflags = -1;
5622 static int hf_bit4nflags = -1;
5623 static int hf_bit5nflags = -1;
5624 static int hf_bit6nflags = -1;
5625 static int hf_bit7nflags = -1;
5626 static int hf_bit8nflags = -1;
5627 static int hf_bit9nflags = -1;
5628 static int hf_bit10nflags = -1;
5629 static int hf_bit11nflags = -1;
5630 static int hf_bit12nflags = -1;
5631 static int hf_bit13nflags = -1;
5632 static int hf_bit14nflags = -1;
5633 static int hf_bit15nflags = -1;
5634 static int hf_bit16nflags = -1;
5635 static int hf_bit1rflags = -1;
5636 static int hf_bit2rflags = -1;
5637 static int hf_bit3rflags = -1;
5638 static int hf_bit4rflags = -1;
5639 static int hf_bit5rflags = -1;
5640 static int hf_bit6rflags = -1;
5641 static int hf_bit7rflags = -1;
5642 static int hf_bit8rflags = -1;
5643 static int hf_bit9rflags = -1;
5644 static int hf_bit10rflags = -1;
5645 static int hf_bit11rflags = -1;
5646 static int hf_bit12rflags = -1;
5647 static int hf_bit13rflags = -1;
5648 static int hf_bit14rflags = -1;
5649 static int hf_bit15rflags = -1;
5650 static int hf_bit16rflags = -1;
5651 static int hf_bit1cflags = -1;
5652 static int hf_bit2cflags = -1;
5653 static int hf_bit3cflags = -1;
5654 static int hf_bit4cflags = -1;
5655 static int hf_bit5cflags = -1;
5656 static int hf_bit6cflags = -1;
5657 static int hf_bit7cflags = -1;
5658 static int hf_bit8cflags = -1;
5659 static int hf_bit9cflags = -1;
5660 static int hf_bit10cflags = -1;
5661 static int hf_bit11cflags = -1;
5662 static int hf_bit12cflags = -1;
5663 static int hf_bit13cflags = -1;
5664 static int hf_bit14cflags = -1;
5665 static int hf_bit15cflags = -1;
5666 static int hf_bit16cflags = -1;
5667 static int hf_bit1acflags = -1;
5668 static int hf_bit2acflags = -1;
5669 static int hf_bit3acflags = -1;
5670 static int hf_bit4acflags = -1;
5671 static int hf_bit5acflags = -1;
5672 static int hf_bit6acflags = -1;
5673 static int hf_bit7acflags = -1;
5674 static int hf_bit8acflags = -1;
5675 static int hf_bit9acflags = -1;
5676 static int hf_bit10acflags = -1;
5677 static int hf_bit11acflags = -1;
5678 static int hf_bit12acflags = -1;
5679 static int hf_bit13acflags = -1;
5680 static int hf_bit14acflags = -1;
5681 static int hf_bit15acflags = -1;
5682 static int hf_bit16acflags = -1;
5683 static int hf_bit1vflags = -1;
5684 static int hf_bit2vflags = -1;
5685 static int hf_bit3vflags = -1;
5686 static int hf_bit4vflags = -1;
5687 static int hf_bit5vflags = -1;
5688 static int hf_bit6vflags = -1;
5689 static int hf_bit7vflags = -1;
5690 static int hf_bit8vflags = -1;
5691 static int hf_bit9vflags = -1;
5692 static int hf_bit10vflags = -1;
5693 static int hf_bit11vflags = -1;
5694 static int hf_bit12vflags = -1;
5695 static int hf_bit13vflags = -1;
5696 static int hf_bit14vflags = -1;
5697 static int hf_bit15vflags = -1;
5698 static int hf_bit16vflags = -1;
5699 static int hf_bit1eflags = -1;
5700 static int hf_bit2eflags = -1;
5701 static int hf_bit3eflags = -1;
5702 static int hf_bit4eflags = -1;
5703 static int hf_bit5eflags = -1;
5704 static int hf_bit6eflags = -1;
5705 static int hf_bit7eflags = -1;
5706 static int hf_bit8eflags = -1;
5707 static int hf_bit9eflags = -1;
5708 static int hf_bit10eflags = -1;
5709 static int hf_bit11eflags = -1;
5710 static int hf_bit12eflags = -1;
5711 static int hf_bit13eflags = -1;
5712 static int hf_bit14eflags = -1;
5713 static int hf_bit15eflags = -1;
5714 static int hf_bit16eflags = -1;
5715 static int hf_bit1infoflagsl = -1;
5716 static int hf_bit2infoflagsl = -1;
5717 static int hf_bit3infoflagsl = -1;
5718 static int hf_bit4infoflagsl = -1;
5719 static int hf_bit5infoflagsl = -1;
5720 static int hf_bit6infoflagsl = -1;
5721 static int hf_bit7infoflagsl = -1;
5722 static int hf_bit8infoflagsl = -1;
5723 static int hf_bit9infoflagsl = -1;
5724 static int hf_bit10infoflagsl = -1;
5725 static int hf_bit11infoflagsl = -1;
5726 static int hf_bit12infoflagsl = -1;
5727 static int hf_bit13infoflagsl = -1;
5728 static int hf_bit14infoflagsl = -1;
5729 static int hf_bit15infoflagsl = -1;
5730 static int hf_bit16infoflagsl = -1;
5731 static int hf_bit1infoflagsh = -1;
5732 static int hf_bit2infoflagsh = -1;
5733 static int hf_bit3infoflagsh = -1;
5734 static int hf_bit4infoflagsh = -1;
5735 static int hf_bit5infoflagsh = -1;
5736 static int hf_bit6infoflagsh = -1;
5737 static int hf_bit7infoflagsh = -1;
5738 static int hf_bit8infoflagsh = -1;
5739 static int hf_bit9infoflagsh = -1;
5740 static int hf_bit10infoflagsh = -1;
5741 static int hf_bit11infoflagsh = -1;
5742 static int hf_bit12infoflagsh = -1;
5743 static int hf_bit13infoflagsh = -1;
5744 static int hf_bit14infoflagsh = -1;
5745 static int hf_bit15infoflagsh = -1;
5746 static int hf_bit16infoflagsh = -1;
5747 static int hf_bit1lflags = -1;
5748 static int hf_bit2lflags = -1;
5749 static int hf_bit3lflags = -1;
5750 static int hf_bit4lflags = -1;
5751 static int hf_bit5lflags = -1;
5752 static int hf_bit6lflags = -1;
5753 static int hf_bit7lflags = -1;
5754 static int hf_bit8lflags = -1;
5755 static int hf_bit9lflags = -1;
5756 static int hf_bit10lflags = -1;
5757 static int hf_bit11lflags = -1;
5758 static int hf_bit12lflags = -1;
5759 static int hf_bit13lflags = -1;
5760 static int hf_bit14lflags = -1;
5761 static int hf_bit15lflags = -1;
5762 static int hf_bit16lflags = -1;
5763 static int hf_bit1l1flagsl = -1;
5764 static int hf_bit2l1flagsl = -1;
5765 static int hf_bit3l1flagsl = -1;
5766 static int hf_bit4l1flagsl = -1;
5767 static int hf_bit5l1flagsl = -1;
5768 static int hf_bit6l1flagsl = -1;
5769 static int hf_bit7l1flagsl = -1;
5770 static int hf_bit8l1flagsl = -1;
5771 static int hf_bit9l1flagsl = -1;
5772 static int hf_bit10l1flagsl = -1;
5773 static int hf_bit11l1flagsl = -1;
5774 static int hf_bit12l1flagsl = -1;
5775 static int hf_bit13l1flagsl = -1;
5776 static int hf_bit14l1flagsl = -1;
5777 static int hf_bit15l1flagsl = -1;
5778 static int hf_bit16l1flagsl = -1;
5779 static int hf_bit1l1flagsh = -1;
5780 static int hf_bit2l1flagsh = -1;
5781 static int hf_bit3l1flagsh = -1;
5782 static int hf_bit4l1flagsh = -1;
5783 static int hf_bit5l1flagsh = -1;
5784 static int hf_bit6l1flagsh = -1;
5785 static int hf_bit7l1flagsh = -1;
5786 static int hf_bit8l1flagsh = -1;
5787 static int hf_bit9l1flagsh = -1;
5788 static int hf_bit10l1flagsh = -1;
5789 static int hf_bit11l1flagsh = -1;
5790 static int hf_bit12l1flagsh = -1;
5791 static int hf_bit13l1flagsh = -1;
5792 static int hf_bit14l1flagsh = -1;
5793 static int hf_bit15l1flagsh = -1;
5794 static int hf_bit16l1flagsh = -1;
5795 static int hf_nds_tree_name = -1;
5796 static int hf_nds_reply_error = -1;
5797 static int hf_nds_net = -1;
5798 static int hf_nds_node = -1;
5799 static int hf_nds_socket = -1;
5800 static int hf_add_ref_ip = -1;
5801 static int hf_add_ref_udp = -1;                                                     
5802 static int hf_add_ref_tcp = -1;
5803 static int hf_referral_record = -1;
5804 static int hf_referral_addcount = -1;
5805 static int hf_nds_port = -1;
5806 static int hf_mv_string = -1;
5807 static int hf_nds_syntax = -1;
5808 static int hf_value_string = -1;
5809 static int hf_nds_buffer_size = -1;
5810 static int hf_nds_ver = -1;
5811 static int hf_nds_nflags = -1;
5812 static int hf_nds_scope = -1;
5813 static int hf_nds_name = -1;
5814 static int hf_nds_comm_trans = -1;
5815 static int hf_nds_tree_trans = -1;
5816 static int hf_nds_iteration = -1;
5817 static int hf_nds_eid = -1;
5818 static int hf_nds_info_type = -1;
5819 static int hf_nds_all_attr = -1;
5820 static int hf_nds_req_flags = -1;
5821 static int hf_nds_attr = -1;
5822 static int hf_nds_crc = -1;
5823 static int hf_nds_referrals = -1;
5824 static int hf_nds_result_flags = -1;
5825 static int hf_nds_tag_string = -1;
5826 static int hf_value_bytes = -1;
5827 static int hf_replica_type = -1;
5828 static int hf_replica_state = -1;
5829 static int hf_replica_number = -1;
5830 static int hf_min_nds_ver = -1;
5831 static int hf_nds_ver_include = -1;
5832 static int hf_nds_ver_exclude = -1;
5833 static int hf_nds_es = -1;
5834 static int hf_es_type = -1;
5835 static int hf_delim_string = -1;
5836 static int hf_rdn_string = -1;
5837 static int hf_nds_revent = -1;
5838 static int hf_nds_rnum = -1; 
5839 static int hf_nds_name_type = -1;
5840 static int hf_nds_rflags = -1;
5841 static int hf_nds_eflags = -1;
5842 static int hf_nds_depth = -1;
5843 static int hf_nds_class_def_type = -1;
5844 static int hf_nds_classes = -1;
5845 static int hf_nds_return_all_classes = -1;
5846 static int hf_nds_stream_flags = -1;
5847 static int hf_nds_stream_name = -1;
5848 static int hf_nds_file_handle = -1;
5849 static int hf_nds_file_size = -1;
5850 static int hf_nds_dn_output_type = -1;
5851 static int hf_nds_nested_output_type = -1;
5852 static int hf_nds_output_delimiter = -1;
5853 static int hf_nds_output_entry_specifier = -1;
5854 static int hf_es_value = -1;
5855 static int hf_es_rdn_count = -1;
5856 static int hf_nds_replica_num = -1;
5857 static int hf_nds_event_num = -1;
5858 static int hf_es_seconds = -1;
5859 static int hf_nds_compare_results = -1;
5860 static int hf_nds_parent = -1;
5861 static int hf_nds_name_filter = -1;
5862 static int hf_nds_class_filter = -1;
5863 static int hf_nds_time_filter = -1;
5864 static int hf_nds_partition_root_id = -1;
5865 static int hf_nds_replicas = -1;
5866 static int hf_nds_purge = -1;
5867 static int hf_nds_local_partition = -1;
5868 static int hf_partition_busy = -1;
5869 static int hf_nds_number_of_changes = -1;
5870 static int hf_sub_count = -1;
5871 static int hf_nds_revision = -1;
5872 static int hf_nds_base_class = -1;
5873 static int hf_nds_relative_dn = -1;
5874 static int hf_nds_root_dn = -1;
5875 static int hf_nds_parent_dn = -1;
5876 static int hf_deref_base = -1;
5877 static int hf_nds_entry_info = -1;
5878 static int hf_nds_base = -1;
5879 static int hf_nds_privileges = -1;
5880 static int hf_nds_vflags = -1;
5881 static int hf_nds_value_len = -1;
5882 static int hf_nds_cflags = -1;
5883 static int hf_nds_acflags = -1;
5884 static int hf_nds_asn1 = -1;
5885 static int hf_nds_upper = -1;
5886 static int hf_nds_lower = -1;
5887 static int hf_nds_trustee_dn = -1;
5888 static int hf_nds_attribute_dn = -1;
5889 static int hf_nds_acl_add = -1;
5890 static int hf_nds_acl_del = -1;
5891 static int hf_nds_att_add = -1;
5892 static int hf_nds_att_del = -1;
5893 static int hf_nds_keep = -1;
5894 static int hf_nds_new_rdn = -1;
5895 static int hf_nds_time_delay = -1;
5896 static int hf_nds_root_name = -1;
5897 static int hf_nds_new_part_id = -1;
5898 static int hf_nds_child_part_id = -1;
5899 static int hf_nds_master_part_id = -1;
5900 static int hf_nds_target_name = -1;
5901 static int hf_nds_super = -1;
5902 static int hf_bit1pingflags2 = -1;
5903 static int hf_bit2pingflags2 = -1;
5904 static int hf_bit3pingflags2 = -1;
5905 static int hf_bit4pingflags2 = -1;
5906 static int hf_bit5pingflags2 = -1;
5907 static int hf_bit6pingflags2 = -1;
5908 static int hf_bit7pingflags2 = -1;
5909 static int hf_bit8pingflags2 = -1;
5910 static int hf_bit9pingflags2 = -1;
5911 static int hf_bit10pingflags2 = -1;
5912 static int hf_bit11pingflags2 = -1;
5913 static int hf_bit12pingflags2 = -1;
5914 static int hf_bit13pingflags2 = -1;
5915 static int hf_bit14pingflags2 = -1;
5916 static int hf_bit15pingflags2 = -1;
5917 static int hf_bit16pingflags2 = -1;
5918 static int hf_bit1pingflags1 = -1;
5919 static int hf_bit2pingflags1 = -1;
5920 static int hf_bit3pingflags1 = -1;
5921 static int hf_bit4pingflags1 = -1;
5922 static int hf_bit5pingflags1 = -1;
5923 static int hf_bit6pingflags1 = -1;
5924 static int hf_bit7pingflags1 = -1;
5925 static int hf_bit8pingflags1 = -1;
5926 static int hf_bit9pingflags1 = -1;
5927 static int hf_bit10pingflags1 = -1;
5928 static int hf_bit11pingflags1 = -1;
5929 static int hf_bit12pingflags1 = -1;
5930 static int hf_bit13pingflags1 = -1;
5931 static int hf_bit14pingflags1 = -1;
5932 static int hf_bit15pingflags1 = -1;
5933 static int hf_bit16pingflags1 = -1;
5934 static int hf_bit1pingpflags1 = -1;
5935 static int hf_bit2pingpflags1 = -1;
5936 static int hf_bit3pingpflags1 = -1;
5937 static int hf_bit4pingpflags1 = -1;
5938 static int hf_bit5pingpflags1 = -1;
5939 static int hf_bit6pingpflags1 = -1;
5940 static int hf_bit7pingpflags1 = -1;
5941 static int hf_bit8pingpflags1 = -1;
5942 static int hf_bit9pingpflags1 = -1;
5943 static int hf_bit10pingpflags1 = -1;
5944 static int hf_bit11pingpflags1 = -1;
5945 static int hf_bit12pingpflags1 = -1;
5946 static int hf_bit13pingpflags1 = -1;
5947 static int hf_bit14pingpflags1 = -1;
5948 static int hf_bit15pingpflags1 = -1;
5949 static int hf_bit16pingpflags1 = -1;
5950 static int hf_bit1pingvflags1 = -1;
5951 static int hf_bit2pingvflags1 = -1;
5952 static int hf_bit3pingvflags1 = -1;
5953 static int hf_bit4pingvflags1 = -1;
5954 static int hf_bit5pingvflags1 = -1;
5955 static int hf_bit6pingvflags1 = -1;
5956 static int hf_bit7pingvflags1 = -1;
5957 static int hf_bit8pingvflags1 = -1;
5958 static int hf_bit9pingvflags1 = -1;
5959 static int hf_bit10pingvflags1 = -1;
5960 static int hf_bit11pingvflags1 = -1;
5961 static int hf_bit12pingvflags1 = -1;
5962 static int hf_bit13pingvflags1 = -1;
5963 static int hf_bit14pingvflags1 = -1;
5964 static int hf_bit15pingvflags1 = -1;
5965 static int hf_bit16pingvflags1 = -1;
5966 static int hf_nds_letter_ver = -1;
5967 static int hf_nds_os_ver = -1;
5968 static int hf_nds_lic_flags = -1;
5969 static int hf_nds_ds_time = -1;
5970 static int hf_nds_ping_version = -1;
5971 static int hf_nds_search_scope = -1;
5972 static int hf_nds_num_objects = -1;
5973 static int hf_bit1siflags = -1;
5974 static int hf_bit2siflags = -1;
5975 static int hf_bit3siflags = -1;
5976 static int hf_bit4siflags = -1;
5977 static int hf_bit5siflags = -1;
5978 static int hf_bit6siflags = -1;
5979 static int hf_bit7siflags = -1;
5980 static int hf_bit8siflags = -1;
5981 static int hf_bit9siflags = -1;
5982 static int hf_bit10siflags = -1;
5983 static int hf_bit11siflags = -1;
5984 static int hf_bit12siflags = -1;
5985 static int hf_bit13siflags = -1;
5986 static int hf_bit14siflags = -1;
5987 static int hf_bit15siflags = -1;
5988 static int hf_bit16siflags = -1;
5989
5990
5991         """
5992                
5993         # Look at all packet types in the packets collection, and cull information
5994         # from them.
5995         errors_used_list = []
5996         errors_used_hash = {}
5997         groups_used_list = []
5998         groups_used_hash = {}
5999         variables_used_hash = {}
6000         structs_used_hash = {}
6001
6002         for pkt in packets:
6003                 # Determine which error codes are used.
6004                 codes = pkt.CompletionCodes()
6005                 for code in codes.Records():
6006                         if not errors_used_hash.has_key(code):
6007                                 errors_used_hash[code] = len(errors_used_list)
6008                                 errors_used_list.append(code)
6009
6010                 # Determine which groups are used.
6011                 group = pkt.Group()
6012                 if not groups_used_hash.has_key(group):
6013                         groups_used_hash[group] = len(groups_used_list)
6014                         groups_used_list.append(group)
6015
6016                 # Determine which variables are used.
6017                 vars = pkt.Variables()
6018                 ExamineVars(vars, structs_used_hash, variables_used_hash)
6019
6020
6021         # Print the hf variable declarations
6022         sorted_vars = variables_used_hash.values()
6023         sorted_vars.sort()
6024         for var in sorted_vars:
6025                 print "static int " + var.HFName() + " = -1;"
6026
6027
6028         # Print the value_string's
6029         for var in sorted_vars:
6030                 if isinstance(var, val_string):
6031                         print ""
6032                         print var.Code()
6033                            
6034         # Determine which error codes are not used
6035         errors_not_used = {}
6036         # Copy the keys from the error list...
6037         for code in errors.keys():
6038                 errors_not_used[code] = 1
6039         # ... and remove the ones that *were* used.
6040         for code in errors_used_list:
6041                 del errors_not_used[code]
6042
6043         # Print a remark showing errors not used
6044         list_errors_not_used = errors_not_used.keys()
6045         list_errors_not_used.sort()
6046         for code in list_errors_not_used:
6047                 print "/* Error 0x%04x not used: %s */" % (code, errors[code])
6048         print "\n"
6049
6050         # Print the errors table
6051         print "/* Error strings. */"
6052         print "static const char *ncp_errors[] = {"
6053         for code in errors_used_list:
6054                 print '\t/* %02d (0x%04x) */ "%s",' % (errors_used_hash[code], code, errors[code])
6055         print "};\n"
6056
6057
6058
6059
6060         # Determine which groups are not used
6061         groups_not_used = {}
6062         # Copy the keys from the group list...
6063         for group in groups.keys():
6064                 groups_not_used[group] = 1
6065         # ... and remove the ones that *were* used.
6066         for group in groups_used_list:
6067                 del groups_not_used[group]
6068
6069         # Print a remark showing groups not used
6070         list_groups_not_used = groups_not_used.keys()
6071         list_groups_not_used.sort()
6072         for group in list_groups_not_used:
6073                 print "/* Group not used: %s = %s */" % (group, groups[group])
6074         print "\n"
6075
6076         # Print the groups table
6077         print "/* Group strings. */"
6078         print "static const char *ncp_groups[] = {"
6079         for group in groups_used_list:
6080                 print '\t/* %02d (%s) */ "%s",' % (groups_used_hash[group], group, groups[group])
6081         print "};\n"
6082
6083         # Print the group macros
6084         for group in groups_used_list:
6085                 name = string.upper(group)
6086                 print "#define NCP_GROUP_%s\t%d" % (name, groups_used_hash[group])
6087         print "\n"
6088
6089
6090         # Print the conditional_records for all Request Conditions.
6091         num = 0
6092         print "/* Request-Condition dfilter records. The NULL pointer"
6093         print "   is replaced by a pointer to the created dfilter_t. */"
6094         if len(global_req_cond) == 0:
6095                 print "static conditional_record req_conds = NULL;"
6096         else:
6097                 print "static conditional_record req_conds[] = {"
6098                 for req_cond in global_req_cond.keys():
6099                         print "\t{ \"%s\", NULL }," % (req_cond,)
6100                         global_req_cond[req_cond] = num
6101                         num = num + 1
6102                 print "};"
6103         print "#define NUM_REQ_CONDS %d" % (num,)
6104         print "#define NO_REQ_COND   NUM_REQ_CONDS\n\n"
6105
6106
6107
6108         # Print PTVC's for bitfields
6109         ett_list = []
6110         print "/* PTVC records for bit-fields. */"
6111         for var in sorted_vars:
6112                 if isinstance(var, bitfield):
6113                         sub_vars_ptvc = var.SubVariablesPTVC()
6114                         print "/* %s */" % (sub_vars_ptvc.Name())
6115                         print sub_vars_ptvc.Code()
6116                         ett_list.append(sub_vars_ptvc.ETTName())
6117
6118
6119         # Print the PTVC's for structures
6120         print "/* PTVC records for structs. */"
6121         # Sort them
6122         svhash = {}
6123         for svar in structs_used_hash.values():
6124                 svhash[svar.HFName()] = svar
6125                 if svar.descr:
6126                         ett_list.append(svar.ETTName())
6127
6128         struct_vars = svhash.keys()
6129         struct_vars.sort()
6130         for varname in struct_vars:
6131                 var = svhash[varname]
6132                 print var.Code()
6133
6134         ett_list.sort()
6135
6136         # Print regular PTVC's
6137         print "/* PTVC records. These are re-used to save space. */"
6138         for ptvc in ptvc_lists.Members():
6139                 if not ptvc.Null() and not ptvc.Empty():
6140                         print ptvc.Code()
6141
6142         # Print error_equivalency tables
6143         print "/* Error-Equivalency Tables. These are re-used to save space. */"
6144         for compcodes in compcode_lists.Members():
6145                 errors = compcodes.Records()
6146                 # Make sure the record for error = 0x00 comes last.
6147                 print "static const error_equivalency %s[] = {" % (compcodes.Name())
6148                 for error in errors:
6149                         error_in_packet = error >> 8;
6150                         ncp_error_index = errors_used_hash[error]
6151                         print "\t{ 0x%02x, %d }, /* 0x%04x */" % (error_in_packet,
6152                                 ncp_error_index, error)
6153                 print "\t{ 0x00, -1 }\n};\n"
6154
6155
6156
6157         # Print integer arrays for all ncp_records that need
6158         # a list of req_cond_indexes. Do it "uniquely" to save space;
6159         # if multiple packets share the same set of req_cond's,
6160         # then they'll share the same integer array
6161         print "/* Request Condition Indexes */"
6162         # First, make them unique
6163         req_cond_collection = UniqueCollection("req_cond_collection")
6164         for pkt in packets:
6165                 req_conds = pkt.CalculateReqConds()
6166                 if req_conds:
6167                         unique_list = req_cond_collection.Add(req_conds)
6168                         pkt.SetReqConds(unique_list)
6169                 else:
6170                         pkt.SetReqConds(None)
6171
6172         # Print them
6173         for req_cond in req_cond_collection.Members():
6174                 print "static const int %s[] = {" % (req_cond.Name(),)
6175                 print "\t",
6176                 vals = []
6177                 for text in req_cond.Records():
6178                         vals.append(global_req_cond[text])
6179                 vals.sort()
6180                 for val in vals:
6181                         print "%s, " % (val,),
6182
6183                 print "-1 };"
6184                 print ""    
6185
6186
6187
6188         # Functions without length parameter
6189         funcs_without_length = {}
6190
6191         # Print info string structures
6192         print "/* Info Strings */"
6193         for pkt in packets:
6194                 if pkt.req_info_str:
6195                         name = pkt.InfoStrName() + "_req"
6196                         var = pkt.req_info_str[0]
6197                         print "static const info_string_t %s = {" % (name,)
6198                         print "\t&%s," % (var.HFName(),)
6199                         print '\t"%s",' % (pkt.req_info_str[1],)
6200                         print '\t"%s"' % (pkt.req_info_str[2],)
6201                         print "};\n"
6202
6203
6204
6205         # Print ncp_record packet records
6206         print "#define SUBFUNC_WITH_LENGTH      0x02"
6207         print "#define SUBFUNC_NO_LENGTH        0x01"
6208         print "#define NO_SUBFUNC               0x00"
6209
6210         print "/* ncp_record structs for packets */"
6211         print "static const ncp_record ncp_packets[] = {" 
6212         for pkt in packets:
6213                 if pkt.HasSubFunction():
6214                         func = pkt.FunctionCode('high')
6215                         if pkt.HasLength():
6216                                 subfunc_string = "SUBFUNC_WITH_LENGTH"
6217                                 # Ensure that the function either has a length param or not
6218                                 if funcs_without_length.has_key(func):
6219                                         sys.exit("Function 0x%04x sometimes has length param, sometimes not." \
6220                                                 % (pkt.FunctionCode(),))
6221                         else:
6222                                 subfunc_string = "SUBFUNC_NO_LENGTH"
6223                                 funcs_without_length[func] = 1
6224                 else:
6225                         subfunc_string = "NO_SUBFUNC"
6226                 print '\t{ 0x%02x, 0x%02x, %s, "%s",' % (pkt.FunctionCode('high'),
6227                         pkt.FunctionCode('low'), subfunc_string, pkt.Description()),
6228
6229                 print '\t%d /* %s */,' % (groups_used_hash[pkt.Group()], pkt.Group())
6230
6231                 ptvc = pkt.PTVCRequest()
6232                 if not ptvc.Null() and not ptvc.Empty():
6233                         ptvc_request = ptvc.Name()
6234                 else:
6235                         ptvc_request = 'NULL'
6236
6237                 ptvc = pkt.PTVCReply()
6238                 if not ptvc.Null() and not ptvc.Empty():
6239                         ptvc_reply = ptvc.Name()
6240                 else:
6241                         ptvc_reply = 'NULL'
6242
6243                 errors = pkt.CompletionCodes()
6244
6245                 req_conds_obj = pkt.GetReqConds()
6246                 if req_conds_obj:
6247                         req_conds = req_conds_obj.Name()
6248                 else:
6249                         req_conds = "NULL"
6250
6251                 if not req_conds_obj:
6252                         req_cond_size = "NO_REQ_COND_SIZE"
6253                 else:
6254                         req_cond_size = pkt.ReqCondSize()
6255                         if req_cond_size == None:
6256                                 msg.write("NCP packet %s nees a ReqCondSize*() call\n" \
6257                                         % (pkt.CName(),))
6258                                 sys.exit(1)
6259                 
6260                 if pkt.req_info_str:
6261                         req_info_str = "&" + pkt.InfoStrName() + "_req"
6262                 else:
6263                         req_info_str = "NULL"
6264
6265                 print '\t\t%s, %s, %s, %s, %s, %s },\n' % \
6266                         (ptvc_request, ptvc_reply, errors.Name(), req_conds,
6267                         req_cond_size, req_info_str)
6268
6269         print '\t{ 0, 0, 0, NULL, 0, NULL, NULL, NULL, NULL, NO_REQ_COND_SIZE, NULL }'
6270         print "};\n"
6271
6272         print "/* ncp funcs that require a subfunc */"
6273         print "static const guint8 ncp_func_requires_subfunc[] = {"
6274         hi_seen = {}
6275         for pkt in packets:
6276                 if pkt.HasSubFunction():
6277                         hi_func = pkt.FunctionCode('high')
6278                         if not hi_seen.has_key(hi_func):
6279                                 print "\t0x%02x," % (hi_func)
6280                                 hi_seen[hi_func] = 1
6281         print "\t0"
6282         print "};\n"
6283
6284
6285         print "/* ncp funcs that have no length parameter */"
6286         print "static const guint8 ncp_func_has_no_length_parameter[] = {"
6287         funcs = funcs_without_length.keys()
6288         funcs.sort()
6289         for func in funcs:
6290                 print "\t0x%02x," % (func,)
6291         print "\t0"
6292         print "};\n"
6293
6294         # final_registration_ncp2222()
6295         print """
6296 void
6297 final_registration_ncp2222(void)
6298 {
6299         int i;
6300         """
6301
6302         # Create dfilter_t's for conditional_record's  
6303         print """
6304         for (i = 0; i < NUM_REQ_CONDS; i++) {
6305                 if (!dfilter_compile((const gchar*)req_conds[i].dfilter_text,
6306                         &req_conds[i].dfilter)) {
6307                         g_message("NCP dissector failed to compiler dfilter: %s\\n",
6308                         req_conds[i].dfilter_text);
6309                         g_assert_not_reached();
6310                 }
6311         }
6312 }
6313         """
6314
6315         # proto_register_ncp2222()
6316         print """
6317 static const value_string ncp_nds_verb_vals[] = {
6318         { 1, "Resolve Name" },
6319         { 2, "Read Entry Information" },
6320         { 3, "Read" },
6321         { 4, "Compare" },
6322         { 5, "List" },
6323         { 6, "Search Entries" },
6324         { 7, "Add Entry" },
6325         { 8, "Remove Entry" },
6326         { 9, "Modify Entry" },
6327         { 10, "Modify RDN" },
6328         { 11, "Create Attribute" },
6329         { 12, "Read Attribute Definition" },
6330         { 13, "Remove Attribute Definition" },
6331         { 14, "Define Class" },
6332         { 15, "Read Class Definition" },
6333         { 16, "Modify Class Definition" },
6334         { 17, "Remove Class Definition" },
6335         { 18, "List Containable Classes" },
6336         { 19, "Get Effective Rights" },
6337         { 20, "Add Partition" },
6338         { 21, "Remove Partition" },
6339         { 22, "List Partitions" },
6340         { 23, "Split Partition" },
6341         { 24, "Join Partitions" },
6342         { 25, "Add Replica" },
6343         { 26, "Remove Replica" },
6344         { 27, "Open Stream" },
6345         { 28, "Search Filter" },
6346         { 29, "Create Subordinate Reference" },
6347         { 30, "Link Replica" },
6348         { 31, "Change Replica Type" },
6349         { 32, "Start Update Schema" },
6350         { 33, "End Update Schema" },
6351         { 34, "Update Schema" },
6352         { 35, "Start Update Replica" },
6353         { 36, "End Update Replica" },
6354         { 37, "Update Replica" },
6355         { 38, "Synchronize Partition" },
6356         { 39, "Synchronize Schema" },
6357         { 40, "Read Syntaxes" },
6358         { 41, "Get Replica Root ID" },
6359         { 42, "Begin Move Entry" },
6360         { 43, "Finish Move Entry" },
6361         { 44, "Release Moved Entry" },
6362         { 45, "Backup Entry" },
6363         { 46, "Restore Entry" },
6364         { 47, "Save DIB" },
6365         { 50, "Close Iteration" },
6366         { 51, "Unused" },
6367         { 52, "Audit Skulking" },
6368         { 53, "Get Server Address" },
6369         { 54, "Set Keys" },
6370         { 55, "Change Password" },
6371         { 56, "Verify Password" },
6372         { 57, "Begin Login" },
6373         { 58, "Finish Login" },
6374         { 59, "Begin Authentication" },
6375         { 60, "Finish Authentication" },
6376         { 61, "Logout" },
6377         { 62, "Repair Ring" },
6378         { 63, "Repair Timestamps" },
6379         { 64, "Create Back Link" },
6380         { 65, "Delete External Reference" },
6381         { 66, "Rename External Reference" },
6382         { 67, "Create Directory Entry" },
6383         { 68, "Remove Directory Entry" },
6384         { 69, "Designate New Master" },
6385         { 70, "Change Tree Name" },
6386         { 71, "Partition Entry Count" },
6387         { 72, "Check Login Restrictions" },
6388         { 73, "Start Join" },
6389         { 74, "Low Level Split" },
6390         { 75, "Low Level Join" },
6391         { 76, "Abort Low Level Join" },
6392         { 77, "Get All Servers" },
6393         { 255, "EDirectory Call" },
6394         { 0,  NULL }
6395 };
6396
6397 void
6398 proto_register_ncp2222(void)
6399 {
6400
6401         static hf_register_info hf[] = {
6402         { &hf_ncp_func,
6403         { "Function", "ncp.func", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
6404
6405         { &hf_ncp_length,
6406         { "Packet Length", "ncp.length", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
6407
6408         { &hf_ncp_subfunc,
6409         { "SubFunction", "ncp.subfunc", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
6410
6411         { &hf_ncp_completion_code,
6412         { "Completion Code", "ncp.completion_code", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
6413
6414         { &hf_ncp_fragment_handle,
6415         { "NDS Fragment Handle", "ncp.ndsfrag", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6416         
6417         { &hf_ncp_fragment_size,
6418         { "NDS Fragment Size", "ncp.ndsfragsize", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6419
6420         { &hf_ncp_message_size,
6421         { "Message Size", "ncp.ndsmessagesize", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6422         
6423         { &hf_ncp_nds_flag,
6424         { "Flags", "ncp.ndsflag", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6425         
6426         { &hf_ncp_nds_verb,      
6427         { "NDS Verb", "ncp.ndsverb", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
6428         
6429         { &hf_ping_version,
6430         { "NDS Version", "ncp.ping_version", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
6431         
6432         { &hf_nds_version,
6433         { "NDS Version", "ncp.nds_version", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6434         
6435         { &hf_nds_tree_name,                             
6436         { "Tree Name", "ncp.nds_tree_name", FT_STRING, BASE_DEC, NULL, 0x0, "", HFILL }},
6437                         
6438         /*
6439          * XXX - the page at
6440          *
6441          *      http://www.odyssea.com/whats_new/tcpipnet/tcpipnet.html
6442          *
6443          * says of the connection status "The Connection Code field may
6444          * contain values that indicate the status of the client host to
6445          * server connection.  A value of 1 in the fourth bit of this data
6446          * byte indicates that the server is unavailable (server was
6447          * downed).
6448          *
6449          * The page at
6450          *
6451          *      http://www.unm.edu/~network/presentations/course/appendix/appendix_f/tsld088.htm
6452          *
6453          * says that bit 0 is "bad service", bit 2 is "no connection
6454          * available", bit 4 is "service down", and bit 6 is "server
6455          * has a broadcast message waiting for the client".
6456          *
6457          * Should it be displayed in hex, and should those bits (and any
6458          * other bits with significance) be displayed as bitfields
6459          * underneath it?
6460          */
6461         { &hf_ncp_connection_status,
6462         { "Connection Status", "ncp.connection_status", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }},
6463
6464         { &hf_ncp_req_frame_num,
6465         { "Response to Request in Frame Number", "ncp.req_frame_num", FT_FRAMENUM, BASE_NONE,
6466                 NULL, 0x0, "", HFILL }},
6467         
6468         { &hf_ncp_req_frame_time,
6469         { "Time from Request", "ncp.time", FT_RELATIVE_TIME, BASE_NONE,
6470                 NULL, 0x0, "Time between request and response in seconds", HFILL }},
6471         
6472         { &hf_nds_flags, 
6473         { "NDS Return Flags", "ncp.nds_flags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6474         
6475        
6476         { &hf_nds_reply_depth,
6477         { "Distance from Root", "ncp.ndsdepth", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6478         
6479         { &hf_nds_reply_rev,
6480         { "NDS Revision", "ncp.ndsrev", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6481         
6482         { &hf_nds_reply_flags,
6483         { "Flags", "ncp.ndsflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
6484         
6485         { &hf_nds_p1type, 
6486         { "NDS Parameter Type", "ncp.p1type", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }},
6487         
6488         { &hf_nds_uint32value, 
6489         { "NDS Value", "ncp.uint32value", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
6490
6491         { &hf_nds_bit1, 
6492         { "Typeless", "ncp.nds_bit1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6493
6494         { &hf_nds_bit2, 
6495         { "All Containers", "ncp.nds_bit2", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6496                      
6497         { &hf_nds_bit3, 
6498         { "Slashed", "ncp.nds_bit3", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6499         
6500         { &hf_nds_bit4, 
6501         { "Dotted", "ncp.nds_bit4", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6502         
6503         { &hf_nds_bit5, 
6504         { "Tuned", "ncp.nds_bit5", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6505         
6506         { &hf_nds_bit6, 
6507         { "Not Defined", "ncp.nds_bit6", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6508         
6509         { &hf_nds_bit7, 
6510         { "Not Defined", "ncp.nds_bit7", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6511         
6512         { &hf_nds_bit8, 
6513         { "Not Defined", "ncp.nds_bit8", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6514         
6515         { &hf_nds_bit9, 
6516         { "Not Defined", "ncp.nds_bit9", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6517         
6518         { &hf_nds_bit10, 
6519         { "Not Defined", "ncp.nds_bit10", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6520         
6521         { &hf_nds_bit11, 
6522         { "Not Defined", "ncp.nds_bit11", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6523         
6524         { &hf_nds_bit12, 
6525         { "Not Defined", "ncp.nds_bit12", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6526         
6527         { &hf_nds_bit13, 
6528         { "Not Defined", "ncp.nds_bit13", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6529         
6530         { &hf_nds_bit14, 
6531         { "Not Defined", "ncp.nds_bit14", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6532         
6533         { &hf_nds_bit15, 
6534         { "Not Defined", "ncp.nds_bit15", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6535         
6536         { &hf_nds_bit16, 
6537         { "Not Defined", "ncp.nds_bit16", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6538         
6539         { &hf_bit1outflags, 
6540         { "Output Flags", "ncp.bit1outflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6541
6542         { &hf_bit2outflags, 
6543         { "Entry ID", "ncp.bit2outflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6544                      
6545         { &hf_bit3outflags, 
6546         { "Replica State", "ncp.bit3outflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6547         
6548         { &hf_bit4outflags, 
6549         { "Modification Timestamp", "ncp.bit4outflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6550         
6551         { &hf_bit5outflags, 
6552         { "Purge Time", "ncp.bit5outflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6553         
6554         { &hf_bit6outflags, 
6555         { "Local Partition ID", "ncp.bit6outflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6556         
6557         { &hf_bit7outflags, 
6558         { "Distinguished Name", "ncp.bit7outflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6559         
6560         { &hf_bit8outflags, 
6561         { "Replica Type", "ncp.bit8outflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6562         
6563         { &hf_bit9outflags, 
6564         { "Partition Busy", "ncp.bit9outflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6565         
6566         { &hf_bit10outflags, 
6567         { "Not Defined", "ncp.bit10outflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6568         
6569         { &hf_bit11outflags, 
6570         { "Not Defined", "ncp.bit11outflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6571         
6572         { &hf_bit12outflags, 
6573         { "Not Defined", "ncp.bit12outflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6574         
6575         { &hf_bit13outflags, 
6576         { "Not Defined", "ncp.bit13outflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6577         
6578         { &hf_bit14outflags, 
6579         { "Not Defined", "ncp.bit14outflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6580         
6581         { &hf_bit15outflags, 
6582         { "Not Defined", "ncp.bit15outflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6583         
6584         { &hf_bit16outflags, 
6585         { "Not Defined", "ncp.bit16outflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6586         
6587         { &hf_bit1nflags, 
6588         { "Entry ID", "ncp.bit1nflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6589
6590         { &hf_bit2nflags, 
6591         { "Readable", "ncp.bit2nflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6592                      
6593         { &hf_bit3nflags, 
6594         { "Writeable", "ncp.bit3nflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6595         
6596         { &hf_bit4nflags, 
6597         { "Master", "ncp.bit4nflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6598         
6599         { &hf_bit5nflags, 
6600         { "Create ID", "ncp.bit5nflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6601         
6602         { &hf_bit6nflags, 
6603         { "Walk Tree", "ncp.bit6nflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6604         
6605         { &hf_bit7nflags, 
6606         { "Dereference Alias", "ncp.bit7nflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6607         
6608         { &hf_bit8nflags, 
6609         { "Not Defined", "ncp.bit8nflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6610         
6611         { &hf_bit9nflags, 
6612         { "Not Defined", "ncp.bit9nflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6613         
6614         { &hf_bit10nflags, 
6615         { "Not Defined", "ncp.bit10nflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6616         
6617         { &hf_bit11nflags, 
6618         { "Not Defined", "ncp.bit11nflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6619         
6620         { &hf_bit12nflags, 
6621         { "Not Defined", "ncp.bit12nflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6622         
6623         { &hf_bit13nflags, 
6624         { "Not Defined", "ncp.bit13nflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6625         
6626         { &hf_bit14nflags, 
6627         { "Prefer Referrals", "ncp.bit14nflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6628         
6629         { &hf_bit15nflags, 
6630         { "Prefer Only Referrals", "ncp.bit15nflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6631         
6632         { &hf_bit16nflags, 
6633         { "Not Defined", "ncp.bit16nflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6634         
6635         { &hf_bit1rflags, 
6636         { "Typeless", "ncp.bit1rflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6637
6638         { &hf_bit2rflags, 
6639         { "Slashed", "ncp.bit2rflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6640                      
6641         { &hf_bit3rflags, 
6642         { "Dotted", "ncp.bit3rflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6643         
6644         { &hf_bit4rflags, 
6645         { "Tuned", "ncp.bit4rflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6646         
6647         { &hf_bit5rflags, 
6648         { "Not Defined", "ncp.bit5rflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6649         
6650         { &hf_bit6rflags, 
6651         { "Not Defined", "ncp.bit6rflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6652         
6653         { &hf_bit7rflags, 
6654         { "Not Defined", "ncp.bit7rflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6655         
6656         { &hf_bit8rflags, 
6657         { "Not Defined", "ncp.bit8rflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6658         
6659         { &hf_bit9rflags, 
6660         { "Not Defined", "ncp.bit9rflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6661         
6662         { &hf_bit10rflags, 
6663         { "Not Defined", "ncp.bit10rflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6664         
6665         { &hf_bit11rflags, 
6666         { "Not Defined", "ncp.bit11rflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6667         
6668         { &hf_bit12rflags, 
6669         { "Not Defined", "ncp.bit12rflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6670         
6671         { &hf_bit13rflags, 
6672         { "Not Defined", "ncp.bit13rflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6673         
6674         { &hf_bit14rflags, 
6675         { "Not Defined", "ncp.bit14rflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6676         
6677         { &hf_bit15rflags, 
6678         { "Not Defined", "ncp.bit15rflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6679         
6680         { &hf_bit16rflags, 
6681         { "Not Defined", "ncp.bit16rflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6682         
6683         { &hf_bit1eflags, 
6684         { "Alias Entry", "ncp.bit1eflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6685
6686         { &hf_bit2eflags, 
6687         { "Partition Root", "ncp.bit2eflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6688                      
6689         { &hf_bit3eflags, 
6690         { "Container Entry", "ncp.bit3eflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6691         
6692         { &hf_bit4eflags, 
6693         { "Container Alias", "ncp.bit4eflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6694         
6695         { &hf_bit5eflags, 
6696         { "Matches List Filter", "ncp.bit5eflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6697         
6698         { &hf_bit6eflags, 
6699         { "Reference Entry", "ncp.bit6eflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6700         
6701         { &hf_bit7eflags, 
6702         { "40x Reference Entry", "ncp.bit7eflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6703         
6704         { &hf_bit8eflags, 
6705         { "Back Linked", "ncp.bit8eflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6706         
6707         { &hf_bit9eflags, 
6708         { "New Entry", "ncp.bit9eflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6709         
6710         { &hf_bit10eflags, 
6711         { "Temporary Reference", "ncp.bit10eflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6712         
6713         { &hf_bit11eflags, 
6714         { "Audited", "ncp.bit11eflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6715         
6716         { &hf_bit12eflags, 
6717         { "Entry Not Present", "ncp.bit12eflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6718         
6719         { &hf_bit13eflags, 
6720         { "Entry Verify CTS", "ncp.bit13eflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6721         
6722         { &hf_bit14eflags, 
6723         { "Entry Damaged", "ncp.bit14eflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6724         
6725         { &hf_bit15eflags, 
6726         { "Not Defined", "ncp.bit15rflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6727         
6728         { &hf_bit16eflags, 
6729         { "Not Defined", "ncp.bit16rflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6730
6731         { &hf_bit1infoflagsl, 
6732         { "Output Flags", "ncp.bit1infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6733
6734         { &hf_bit2infoflagsl, 
6735         { "Entry ID", "ncp.bit2infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6736                      
6737         { &hf_bit3infoflagsl, 
6738         { "Entry Flags", "ncp.bit3infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6739         
6740         { &hf_bit4infoflagsl, 
6741         { "Subordinate Count", "ncp.bit4infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6742         
6743         { &hf_bit5infoflagsl, 
6744         { "Modification Time", "ncp.bit5infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6745         
6746         { &hf_bit6infoflagsl, 
6747         { "Modification Timestamp", "ncp.bit6infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6748         
6749         { &hf_bit7infoflagsl, 
6750         { "Creation Timestamp", "ncp.bit7infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6751         
6752         { &hf_bit8infoflagsl, 
6753         { "Partition Root ID", "ncp.bit8infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6754         
6755         { &hf_bit9infoflagsl, 
6756         { "Parent ID", "ncp.bit9infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6757         
6758         { &hf_bit10infoflagsl, 
6759         { "Revision Count", "ncp.bit10infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6760         
6761         { &hf_bit11infoflagsl, 
6762         { "Replica Type", "ncp.bit11infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6763         
6764         { &hf_bit12infoflagsl, 
6765         { "Base Class", "ncp.bit12infoflagsl", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6766         
6767         { &hf_bit13infoflagsl, 
6768         { "Relative Distinguished Name", "ncp.bit13infoflagsl", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6769         
6770         { &hf_bit14infoflagsl, 
6771         { "Distinguished Name", "ncp.bit14infoflagsl", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6772         
6773         { &hf_bit15infoflagsl, 
6774         { "Root Distinguished Name", "ncp.bit15infoflagsl", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6775         
6776         { &hf_bit16infoflagsl, 
6777         { "Parent Distinguished Name", "ncp.bit16infoflagsl", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6778
6779         { &hf_bit1infoflagsh, 
6780         { "Purge Time", "ncp.bit1infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6781
6782         { &hf_bit2infoflagsh, 
6783         { "Dereference Base Class", "ncp.bit2infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6784                      
6785         { &hf_bit3infoflagsh, 
6786         { "Not Defined", "ncp.bit3infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6787         
6788         { &hf_bit4infoflagsh, 
6789         { "Not Defined", "ncp.bit4infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6790         
6791         { &hf_bit5infoflagsh, 
6792         { "Not Defined", "ncp.bit5infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6793         
6794         { &hf_bit6infoflagsh, 
6795         { "Not Defined", "ncp.bit6infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6796         
6797         { &hf_bit7infoflagsh, 
6798         { "Not Defined", "ncp.bit7infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6799         
6800         { &hf_bit8infoflagsh, 
6801         { "Not Defined", "ncp.bit8infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6802         
6803         { &hf_bit9infoflagsh, 
6804         { "Not Defined", "ncp.bit9infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6805         
6806         { &hf_bit10infoflagsh, 
6807         { "Not Defined", "ncp.bit10infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6808         
6809         { &hf_bit11infoflagsh, 
6810         { "Not Defined", "ncp.bit11infoflagsh", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6811         
6812         { &hf_bit12infoflagsh, 
6813         { "Not Defined", "ncp.bit12infoflagshs", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6814         
6815         { &hf_bit13infoflagsh, 
6816         { "Not Defined", "ncp.bit13infoflagsh", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6817         
6818         { &hf_bit14infoflagsh, 
6819         { "Not Defined", "ncp.bit14infoflagsh", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6820         
6821         { &hf_bit15infoflagsh, 
6822         { "Not Defined", "ncp.bit15infoflagsh", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6823         
6824         { &hf_bit16infoflagsh, 
6825         { "Not Defined", "ncp.bit16infoflagsh", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6826         
6827         { &hf_bit1lflags, 
6828         { "List Typeless", "ncp.bit1lflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6829
6830         { &hf_bit2lflags, 
6831         { "List Containers", "ncp.bit2lflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6832                      
6833         { &hf_bit3lflags, 
6834         { "List Slashed", "ncp.bit3lflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6835         
6836         { &hf_bit4lflags, 
6837         { "List Dotted", "ncp.bit4lflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6838         
6839         { &hf_bit5lflags, 
6840         { "Dereference Alias", "ncp.bit5lflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6841         
6842         { &hf_bit6lflags, 
6843         { "List All Containers", "ncp.bit6lflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6844         
6845         { &hf_bit7lflags, 
6846         { "List Obsolete", "ncp.bit7lflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6847         
6848         { &hf_bit8lflags, 
6849         { "List Tuned Output", "ncp.bit8lflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6850         
6851         { &hf_bit9lflags, 
6852         { "List External Reference", "ncp.bit9lflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6853         
6854         { &hf_bit10lflags, 
6855         { "Not Defined", "ncp.bit10lflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6856         
6857         { &hf_bit11lflags, 
6858         { "Not Defined", "ncp.bit11lflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6859         
6860         { &hf_bit12lflags, 
6861         { "Not Defined", "ncp.bit12lflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6862         
6863         { &hf_bit13lflags, 
6864         { "Not Defined", "ncp.bit13lflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6865         
6866         { &hf_bit14lflags, 
6867         { "Not Defined", "ncp.bit14lflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6868         
6869         { &hf_bit15lflags, 
6870         { "Not Defined", "ncp.bit15lflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6871         
6872         { &hf_bit16lflags, 
6873         { "Not Defined", "ncp.bit16lflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6874         
6875         { &hf_bit1l1flagsl, 
6876         { "Output Flags", "ncp.bit1l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6877
6878         { &hf_bit2l1flagsl, 
6879         { "Entry ID", "ncp.bit2l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6880                      
6881         { &hf_bit3l1flagsl, 
6882         { "Replica State", "ncp.bit3l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6883         
6884         { &hf_bit4l1flagsl, 
6885         { "Modification Timestamp", "ncp.bit4l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6886         
6887         { &hf_bit5l1flagsl, 
6888         { "Purge Time", "ncp.bit5l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6889         
6890         { &hf_bit6l1flagsl, 
6891         { "Local Partition ID", "ncp.bit6l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6892         
6893         { &hf_bit7l1flagsl, 
6894         { "Distinguished Name", "ncp.bit7l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6895         
6896         { &hf_bit8l1flagsl, 
6897         { "Replica Type", "ncp.bit8l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6898         
6899         { &hf_bit9l1flagsl, 
6900         { "Partition Busy", "ncp.bit9l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6901         
6902         { &hf_bit10l1flagsl, 
6903         { "Not Defined", "ncp.bit10l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6904         
6905         { &hf_bit11l1flagsl, 
6906         { "Not Defined", "ncp.bit11l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6907         
6908         { &hf_bit12l1flagsl, 
6909         { "Not Defined", "ncp.bit12l1flagsl", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6910         
6911         { &hf_bit13l1flagsl, 
6912         { "Not Defined", "ncp.bit13l1flagsl", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6913         
6914         { &hf_bit14l1flagsl, 
6915         { "Not Defined", "ncp.bit14l1flagsl", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6916         
6917         { &hf_bit15l1flagsl, 
6918         { "Not Defined", "ncp.bit15l1flagsl", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6919         
6920         { &hf_bit16l1flagsl, 
6921         { "Not Defined", "ncp.bit16l1flagsl", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6922
6923         { &hf_bit1l1flagsh, 
6924         { "Not Defined", "ncp.bit1l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6925
6926         { &hf_bit2l1flagsh, 
6927         { "Not Defined", "ncp.bit2l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6928                      
6929         { &hf_bit3l1flagsh, 
6930         { "Not Defined", "ncp.bit3l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6931         
6932         { &hf_bit4l1flagsh, 
6933         { "Not Defined", "ncp.bit4l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6934         
6935         { &hf_bit5l1flagsh, 
6936         { "Not Defined", "ncp.bit5l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6937         
6938         { &hf_bit6l1flagsh, 
6939         { "Not Defined", "ncp.bit6l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6940         
6941         { &hf_bit7l1flagsh, 
6942         { "Not Defined", "ncp.bit7l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6943         
6944         { &hf_bit8l1flagsh, 
6945         { "Not Defined", "ncp.bit8l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6946         
6947         { &hf_bit9l1flagsh, 
6948         { "Not Defined", "ncp.bit9l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6949         
6950         { &hf_bit10l1flagsh, 
6951         { "Not Defined", "ncp.bit10l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
6952         
6953         { &hf_bit11l1flagsh, 
6954         { "Not Defined", "ncp.bit11l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
6955         
6956         { &hf_bit12l1flagsh, 
6957         { "Not Defined", "ncp.bit12l1flagsh", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
6958         
6959         { &hf_bit13l1flagsh, 
6960         { "Not Defined", "ncp.bit13l1flagsh", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
6961         
6962         { &hf_bit14l1flagsh, 
6963         { "Not Defined", "ncp.bit14l1flagsh", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
6964         
6965         { &hf_bit15l1flagsh, 
6966         { "Not Defined", "ncp.bit15l1flagsh", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
6967         
6968         { &hf_bit16l1flagsh, 
6969         { "Not Defined", "ncp.bit16l1flagsh", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
6970         
6971         { &hf_bit1vflags, 
6972         { "Naming", "ncp.bit1vflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
6973
6974         { &hf_bit2vflags, 
6975         { "Base Class", "ncp.bit2vflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
6976                      
6977         { &hf_bit3vflags, 
6978         { "Present", "ncp.bit3vflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
6979         
6980         { &hf_bit4vflags, 
6981         { "Value Damaged", "ncp.bit4vflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
6982         
6983         { &hf_bit5vflags, 
6984         { "Not Defined", "ncp.bit5vflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
6985         
6986         { &hf_bit6vflags, 
6987         { "Not Defined", "ncp.bit6vflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
6988         
6989         { &hf_bit7vflags, 
6990         { "Not Defined", "ncp.bit7vflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
6991         
6992         { &hf_bit8vflags, 
6993         { "Not Defined", "ncp.bit8vflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
6994         
6995         { &hf_bit9vflags, 
6996         { "Not Defined", "ncp.bit9vflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
6997         
6998         { &hf_bit10vflags, 
6999         { "Not Defined", "ncp.bit10vflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7000         
7001         { &hf_bit11vflags, 
7002         { "Not Defined", "ncp.bit11vflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7003         
7004         { &hf_bit12vflags, 
7005         { "Not Defined", "ncp.bit12vflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7006         
7007         { &hf_bit13vflags, 
7008         { "Not Defined", "ncp.bit13vflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7009         
7010         { &hf_bit14vflags, 
7011         { "Not Defined", "ncp.bit14vflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7012         
7013         { &hf_bit15vflags, 
7014         { "Not Defined", "ncp.bit15vflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7015         
7016         { &hf_bit16vflags, 
7017         { "Not Defined", "ncp.bit16vflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7018         
7019         { &hf_bit1cflags, 
7020         { "Ambiguous Containment", "ncp.bit1cflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7021
7022         { &hf_bit2cflags, 
7023         { "Ambiguous Naming", "ncp.bit2cflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7024                      
7025         { &hf_bit3cflags, 
7026         { "Class Definition Cannot be Removed", "ncp.bit3cflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7027         
7028         { &hf_bit4cflags, 
7029         { "Effective Class", "ncp.bit4cflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7030         
7031         { &hf_bit5cflags, 
7032         { "Container Class", "ncp.bit5cflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7033         
7034         { &hf_bit6cflags, 
7035         { "Not Defined", "ncp.bit6cflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7036         
7037         { &hf_bit7cflags, 
7038         { "Not Defined", "ncp.bit7cflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7039         
7040         { &hf_bit8cflags, 
7041         { "Not Defined", "ncp.bit8cflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7042         
7043         { &hf_bit9cflags, 
7044         { "Not Defined", "ncp.bit9cflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7045         
7046         { &hf_bit10cflags, 
7047         { "Not Defined", "ncp.bit10cflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7048         
7049         { &hf_bit11cflags, 
7050         { "Not Defined", "ncp.bit11cflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7051         
7052         { &hf_bit12cflags, 
7053         { "Not Defined", "ncp.bit12cflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7054         
7055         { &hf_bit13cflags, 
7056         { "Not Defined", "ncp.bit13cflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7057         
7058         { &hf_bit14cflags, 
7059         { "Not Defined", "ncp.bit14cflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7060         
7061         { &hf_bit15cflags, 
7062         { "Not Defined", "ncp.bit15cflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7063         
7064         { &hf_bit16cflags, 
7065         { "Not Defined", "ncp.bit16cflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7066         
7067         { &hf_bit1acflags, 
7068         { "Single Valued", "ncp.bit1acflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7069
7070         { &hf_bit2acflags, 
7071         { "Sized", "ncp.bit2acflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7072                      
7073         { &hf_bit3acflags, 
7074         { "Non-Removable", "ncp.bit3acflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7075         
7076         { &hf_bit4acflags, 
7077         { "Read Only", "ncp.bit4acflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7078         
7079         { &hf_bit5acflags, 
7080         { "Hidden", "ncp.bit5acflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7081         
7082         { &hf_bit6acflags, 
7083         { "String", "ncp.bit6acflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7084         
7085         { &hf_bit7acflags, 
7086         { "Synchronize Immediate", "ncp.bit7acflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7087         
7088         { &hf_bit8acflags, 
7089         { "Public Read", "ncp.bit8acflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7090         
7091         { &hf_bit9acflags, 
7092         { "Server Read", "ncp.bit9acflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7093         
7094         { &hf_bit10acflags, 
7095         { "Write Managed", "ncp.bit10acflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7096         
7097         { &hf_bit11acflags, 
7098         { "Per Replica", "ncp.bit11acflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7099         
7100         { &hf_bit12acflags, 
7101         { "Never Schedule Synchronization", "ncp.bit12acflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7102         
7103         { &hf_bit13acflags, 
7104         { "Operational", "ncp.bit13acflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7105         
7106         { &hf_bit14acflags, 
7107         { "Not Defined", "ncp.bit14acflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7108         
7109         { &hf_bit15acflags, 
7110         { "Not Defined", "ncp.bit15acflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7111         
7112         { &hf_bit16acflags, 
7113         { "Not Defined", "ncp.bit16acflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7114         
7115         
7116         { &hf_nds_reply_error,
7117         { "NDS Error", "ncp.ndsreplyerror", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7118         
7119         { &hf_nds_net,
7120         { "Network","ncp.ndsnet", FT_IPXNET, BASE_NONE, NULL, 0x0, "", HFILL }},
7121
7122         { &hf_nds_node,
7123         { "Node",       "ncp.ndsnode", FT_ETHER, BASE_NONE, NULL, 0x0, "", HFILL }},
7124
7125         { &hf_nds_socket, 
7126         { "Socket",     "ncp.ndssocket", FT_UINT16, BASE_HEX, NULL, 0x0, "", HFILL }},
7127         
7128         { &hf_add_ref_ip,
7129         { "Address Referral", "ncp.ipref", FT_IPv4, BASE_DEC, NULL, 0x0, "", HFILL }},
7130         
7131         { &hf_add_ref_udp,
7132         { "Address Referral", "ncp.udpref", FT_IPv4, BASE_DEC, NULL, 0x0, "", HFILL }},
7133         
7134         { &hf_add_ref_tcp,
7135         { "Address Referral", "ncp.tcpref", FT_IPv4, BASE_DEC, NULL, 0x0, "", HFILL }},
7136         
7137         { &hf_referral_record,
7138         { "Referral Record", "ncp.ref_rec", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7139         
7140         { &hf_referral_addcount,
7141         { "Address Count", "ncp.ref_addcount", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7142         
7143         { &hf_nds_port,                                                                    
7144         { "Port", "ncp.ndsport", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7145         
7146         { &hf_mv_string,                                
7147         { "Attribute Name ", "ncp.mv_string", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7148                           
7149         { &hf_nds_syntax,                                
7150         { "Attribute Syntax ", "ncp.nds_syntax", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7151
7152         { &hf_value_string,                                
7153         { "Value ", "ncp.value_string", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7154         
7155     { &hf_nds_stream_name,                                
7156         { "Stream Name ", "ncp.nds_stream_name", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7157         
7158         { &hf_nds_buffer_size,
7159         { "NDS Reply Buffer Size", "ncp.nds_reply_buf", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7160         
7161         { &hf_nds_ver,
7162         { "NDS Version", "ncp.nds_ver", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7163         
7164         { &hf_nds_nflags,
7165         { "Flags", "ncp.nds_nflags", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7166         
7167     { &hf_nds_rflags,
7168         { "Request Flags", "ncp.nds_rflags", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7169     
7170     { &hf_nds_eflags,
7171         { "Entry Flags", "ncp.nds_eflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7172         
7173         { &hf_nds_scope,
7174         { "Scope", "ncp.nds_scope", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7175         
7176         { &hf_nds_name,
7177         { "Name", "ncp.nds_name", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7178         
7179     { &hf_nds_name_type,
7180         { "Name Type", "ncp.nds_name_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7181         
7182         { &hf_nds_comm_trans,
7183         { "Communications Transport", "ncp.nds_comm_trans", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7184         
7185         { &hf_nds_tree_trans,
7186         { "Tree Walker Transport", "ncp.nds_tree_trans", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7187         
7188         { &hf_nds_iteration,
7189         { "Iteration Handle", "ncp.nds_iteration", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7190         
7191     { &hf_nds_file_handle,
7192         { "File Handle", "ncp.nds_file_handle", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7193         
7194     { &hf_nds_file_size,
7195         { "File Size", "ncp.nds_file_size", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7196         
7197         { &hf_nds_eid,
7198         { "NDS EID", "ncp.nds_eid", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7199         
7200     { &hf_nds_depth,
7201         { "Distance object is from Root", "ncp.nds_depth", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7202         
7203         { &hf_nds_info_type,
7204         { "Info Type", "ncp.nds_info_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7205         
7206     { &hf_nds_class_def_type,
7207         { "Class Definition Type", "ncp.nds_class_def_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7208         
7209         { &hf_nds_all_attr,
7210         { "All Attributes", "ncp.nds_all_attr", FT_UINT32, BASE_DEC, NULL, 0x0, "Return all Attributes?", HFILL }},
7211         
7212     { &hf_nds_return_all_classes,
7213         { "All Classes", "ncp.nds_return_all_classes", FT_STRING, BASE_NONE, NULL, 0x0, "Return all Classes?", HFILL }},
7214         
7215         { &hf_nds_req_flags,                                       
7216         { "Request Flags", "ncp.nds_req_flags", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7217         
7218         { &hf_nds_attr,
7219         { "Attributes", "ncp.nds_attributes", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7220         
7221     { &hf_nds_classes,
7222         { "Classes", "ncp.nds_classes", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7223
7224         { &hf_nds_crc,
7225         { "CRC", "ncp.nds_crc", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7226         
7227         { &hf_nds_referrals,
7228         { "Referrals", "ncp.nds_referrals", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7229         
7230         { &hf_nds_result_flags,
7231         { "Result Flags", "ncp.nds_result_flags", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7232         
7233     { &hf_nds_stream_flags,
7234         { "Streams Flags", "ncp.nds_stream_flags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7235         
7236         { &hf_nds_tag_string,
7237         { "Tags", "ncp.nds_tags", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7238
7239         { &hf_value_bytes,
7240         { "Bytes", "ncp.value_bytes", FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL }},
7241
7242         { &hf_replica_type,
7243         { "Replica Type", "ncp.rtype", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7244
7245         { &hf_replica_state,
7246         { "Replica State", "ncp.rstate", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7247         
7248     { &hf_nds_rnum,
7249         { "Replica Number", "ncp.rnum", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7250
7251         { &hf_nds_revent,
7252         { "Event", "ncp.revent", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7253
7254         { &hf_replica_number,
7255         { "Replica Number", "ncp.rnum", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7256  
7257         { &hf_min_nds_ver,
7258         { "Minimum NDS Version", "ncp.min_nds_version", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7259
7260         { &hf_nds_ver_include,
7261         { "Include NDS Version", "ncp.inc_nds_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7262  
7263         { &hf_nds_ver_exclude,
7264         { "Exclude NDS Version", "ncp.exc_nds_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7265
7266         { &hf_nds_es,
7267         { "Input Entry Specifier", "ncp.nds_es", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7268         
7269         { &hf_es_type,
7270         { "Entry Specifier Type", "ncp.nds_es_type", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7271
7272         { &hf_rdn_string,
7273         { "RDN", "ncp.nds_rdn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7274
7275         { &hf_delim_string,
7276         { "Delimeter", "ncp.nds_delim", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7277                                  
7278     { &hf_nds_dn_output_type,
7279         { "Output Entry Specifier Type", "ncp.nds_out_es_type", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7280     
7281     { &hf_nds_nested_output_type,
7282         { "Nested Output Entry Specifier Type", "ncp.nds_nested_out_es", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7283     
7284     { &hf_nds_output_delimiter,
7285         { "Output Delimiter", "ncp.nds_out_delimiter", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7286     
7287     { &hf_nds_output_entry_specifier,
7288         { "Output Entry Specifier", "ncp.nds_out_es", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7289     
7290     { &hf_es_value,
7291         { "Entry Specifier Value", "ncp.nds_es_value", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7292
7293     { &hf_es_rdn_count,
7294         { "RDN Count", "ncp.nds_es_rdn_count", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7295     
7296     { &hf_nds_replica_num,
7297         { "Replica Number", "ncp.nds_replica_num", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7298     
7299     { &hf_es_seconds,
7300         { "Seconds", "ncp.nds_es_seconds", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7301
7302     { &hf_nds_event_num,
7303         { "Event Number", "ncp.nds_event_num", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
7304
7305     { &hf_nds_compare_results,
7306         { "Compare Results", "ncp.nds_compare_results", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7307     
7308     { &hf_nds_parent,
7309         { "Parent ID", "ncp.nds_parent", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7310
7311     { &hf_nds_name_filter,
7312         { "Name Filter", "ncp.nds_name_filter", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7313
7314     { &hf_nds_class_filter,
7315         { "Class Filter", "ncp.nds_class_filter", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7316
7317     { &hf_nds_time_filter,
7318         { "Time Filter", "ncp.nds_time_filter", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7319
7320     { &hf_nds_partition_root_id,
7321         { "Partition Root ID", "ncp.nds_partition_root_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7322
7323     { &hf_nds_replicas,
7324         { "Replicas", "ncp.nds_replicas", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7325
7326     { &hf_nds_purge,
7327         { "Purge Time", "ncp.nds_purge", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7328
7329     { &hf_nds_local_partition,
7330         { "Local Partition ID", "ncp.nds_local_partition", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7331
7332     { &hf_partition_busy, 
7333     { "Partition Busy", "ncp.nds_partition_busy", FT_BOOLEAN, 16, NULL, 0x0, "", HFILL }},
7334
7335     { &hf_nds_number_of_changes,
7336         { "Number of Attribute Changes", "ncp.nds_number_of_changes", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7337     
7338     { &hf_sub_count,
7339         { "Subordinate Count", "ncp.sub_count", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7340     
7341     { &hf_nds_revision,
7342         { "Revision Count", "ncp.nds_rev_count", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7343     
7344     { &hf_nds_base_class,
7345         { "Base Class", "ncp.nds_base_class", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7346     
7347     { &hf_nds_relative_dn,
7348         { "Relative Distinguished Name", "ncp.nds_relative_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7349     
7350     { &hf_nds_root_dn,
7351         { "Root Distinguished Name", "ncp.nds_root_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7352     
7353     { &hf_nds_parent_dn,
7354         { "Parent Distinguished Name", "ncp.nds_parent_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7355     
7356     { &hf_deref_base, 
7357     { "Dereference Base Class", "ncp.nds_deref_base", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7358     
7359     { &hf_nds_base, 
7360     { "Base Class", "ncp.nds_base", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7361     
7362     { &hf_nds_super, 
7363     { "Super Class", "ncp.nds_super", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7364     
7365     { &hf_nds_entry_info, 
7366     { "Entry Information", "ncp.nds_entry_info", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7367     
7368     { &hf_nds_privileges, 
7369     { "Privileges", "ncp.nds_privileges", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7370     
7371     { &hf_nds_vflags, 
7372     { "Value Flags", "ncp.nds_vflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7373     
7374     { &hf_nds_value_len, 
7375     { "Value Length", "ncp.nds_vlength", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7376     
7377     { &hf_nds_cflags, 
7378     { "Class Flags", "ncp.nds_cflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7379         
7380     { &hf_nds_asn1,
7381         { "ASN.1 ID", "ncp.nds_asn1", FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL }},
7382
7383     { &hf_nds_acflags, 
7384     { "Attribute Constraint Flags", "ncp.nds_acflags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7385     
7386     { &hf_nds_upper, 
7387     { "Upper Limit Value", "ncp.nds_upper", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7388     
7389     { &hf_nds_lower, 
7390     { "Lower Limit Value", "ncp.nds_lower", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7391     
7392     { &hf_nds_trustee_dn,
7393         { "Trustee Distinguished Name", "ncp.nds_trustee_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7394     
7395     { &hf_nds_attribute_dn,
7396         { "Attribute Name", "ncp.nds_attribute_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7397     
7398     { &hf_nds_acl_add,
7399         { "Access Control Lists to Add", "ncp.nds_acl_add", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7400     
7401     { &hf_nds_acl_del,
7402         { "Access Control Lists to Delete", "ncp.nds_acl_del", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7403     
7404     { &hf_nds_att_add,
7405         { "Attribute to Add", "ncp.nds_att_add", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7406     
7407     { &hf_nds_att_del,
7408         { "Attribute to Delete", "ncp.nds_att_del", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7409     
7410     { &hf_nds_keep, 
7411     { "Delete Original RDN", "ncp.nds_keep", FT_BOOLEAN, 32, NULL, 0x0, "", HFILL }},
7412     
7413     { &hf_nds_new_rdn,
7414         { "New Relative Distinguished Name", "ncp.nds_new_rdn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7415     
7416     { &hf_nds_time_delay,
7417         { "Time Delay", "ncp.nds_time_delay", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7418     
7419     { &hf_nds_root_name,
7420         { "Root Most Object Name", "ncp.nds_root_name", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7421     
7422     { &hf_nds_new_part_id,
7423         { "New Partition Root ID", "ncp.nds_new_part_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7424     
7425     { &hf_nds_child_part_id,
7426         { "Child Partition Root ID", "ncp.nds_child_part_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7427     
7428     { &hf_nds_master_part_id,
7429         { "Master Partition Root ID", "ncp.nds_master_part_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7430     
7431     { &hf_nds_target_name,
7432         { "Target Server Name", "ncp.nds_target_dn", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7433
7434
7435         { &hf_bit1pingflags1, 
7436         { "Supported Fields", "ncp.bit1pingflags1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7437
7438         { &hf_bit2pingflags1, 
7439         { "Depth", "ncp.bit2pingflags1", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7440                      
7441         { &hf_bit3pingflags1, 
7442         { "Revision", "ncp.bit3pingflags1", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7443         
7444         { &hf_bit4pingflags1, 
7445         { "Flags", "ncp.bit4pingflags1", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7446         
7447         { &hf_bit5pingflags1, 
7448         { "Verification Flags", "ncp.bit5pingflags1", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7449         
7450         { &hf_bit6pingflags1, 
7451         { "Letter Version", "ncp.bit6pingflags1", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7452         
7453         { &hf_bit7pingflags1, 
7454         { "OS Version", "ncp.bit7pingflags1", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7455         
7456         { &hf_bit8pingflags1, 
7457         { "License Flags", "ncp.bit8pingflags1", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7458         
7459         { &hf_bit9pingflags1, 
7460         { "DS Time", "ncp.bit9pingflags1", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7461         
7462         { &hf_bit10pingflags1, 
7463         { "Not Defined", "ncp.bit10pingflags1", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7464         
7465         { &hf_bit11pingflags1, 
7466         { "Not Defined", "ncp.bit11pingflags1", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7467         
7468         { &hf_bit12pingflags1, 
7469         { "Not Defined", "ncp.bit12pingflags1", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7470         
7471         { &hf_bit13pingflags1, 
7472         { "Not Defined", "ncp.bit13pingflags1", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7473         
7474         { &hf_bit14pingflags1, 
7475         { "Not Defined", "ncp.bit14pingflags1", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7476         
7477         { &hf_bit15pingflags1, 
7478         { "Not Defined", "ncp.bit15pingflags1", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7479         
7480         { &hf_bit16pingflags1, 
7481         { "Not Defined", "ncp.bit16pingflags1", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7482
7483         { &hf_bit1pingflags2, 
7484         { "Sap Name", "ncp.bit1pingflags2", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7485
7486         { &hf_bit2pingflags2, 
7487         { "Tree Name", "ncp.bit2pingflags2", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7488                      
7489         { &hf_bit3pingflags2, 
7490         { "OS Name", "ncp.bit3pingflags2", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7491         
7492         { &hf_bit4pingflags2, 
7493         { "Hardware Name", "ncp.bit4pingflags2", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7494         
7495         { &hf_bit5pingflags2, 
7496         { "Vendor Name", "ncp.bit5pingflags2", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7497         
7498         { &hf_bit6pingflags2, 
7499         { "Not Defined", "ncp.bit6pingflags2", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7500         
7501         { &hf_bit7pingflags2, 
7502         { "Not Defined", "ncp.bit7pingflags2", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7503         
7504         { &hf_bit8pingflags2, 
7505         { "Not Defined", "ncp.bit8pingflags2", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7506         
7507         { &hf_bit9pingflags2, 
7508         { "Not Defined", "ncp.bit9pingflags2", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7509         
7510         { &hf_bit10pingflags2, 
7511         { "Not Defined", "ncp.bit10pingflags2", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7512         
7513         { &hf_bit11pingflags2, 
7514         { "Not Defined", "ncp.bit11pingflags2", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7515         
7516         { &hf_bit12pingflags2, 
7517         { "Not Defined", "ncp.bit12pingflags2", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7518         
7519         { &hf_bit13pingflags2, 
7520         { "Not Defined", "ncp.bit13pingflags2", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7521         
7522         { &hf_bit14pingflags2, 
7523         { "Not Defined", "ncp.bit14pingflags2", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7524         
7525         { &hf_bit15pingflags2, 
7526         { "Not Defined", "ncp.bit15pingflags2", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7527         
7528         { &hf_bit16pingflags2, 
7529         { "Not Defined", "ncp.bit16pingflags2", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7530      
7531         { &hf_bit1pingpflags1, 
7532         { "Root Most Master Replica", "ncp.bit1pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7533
7534         { &hf_bit2pingpflags1, 
7535         { "Time Synchronized", "ncp.bit2pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7536                      
7537         { &hf_bit3pingpflags1, 
7538         { "Not Defined", "ncp.bit3pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7539         
7540         { &hf_bit4pingpflags1, 
7541         { "Not Defined", "ncp.bit4pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7542         
7543         { &hf_bit5pingpflags1, 
7544         { "Not Defined", "ncp.bit5pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7545         
7546         { &hf_bit6pingpflags1, 
7547         { "Not Defined", "ncp.bit6pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7548         
7549         { &hf_bit7pingpflags1, 
7550         { "Not Defined", "ncp.bit7pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7551         
7552         { &hf_bit8pingpflags1, 
7553         { "Not Defined", "ncp.bit8pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7554         
7555         { &hf_bit9pingpflags1, 
7556         { "Not Defined", "ncp.bit9pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7557         
7558         { &hf_bit10pingpflags1, 
7559         { "Not Defined", "ncp.bit10pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7560         
7561         { &hf_bit11pingpflags1, 
7562         { "Not Defined", "ncp.bit11pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7563         
7564         { &hf_bit12pingpflags1, 
7565         { "Not Defined", "ncp.bit12pingpflags1", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7566         
7567         { &hf_bit13pingpflags1, 
7568         { "Not Defined", "ncp.bit13pingpflags1", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7569         
7570         { &hf_bit14pingpflags1, 
7571         { "Not Defined", "ncp.bit14pingpflags1", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7572         
7573         { &hf_bit15pingpflags1, 
7574         { "Not Defined", "ncp.bit15pingpflags1", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7575         
7576         { &hf_bit16pingpflags1, 
7577         { "Not Defined", "ncp.bit16pingpflags1", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7578     
7579         { &hf_bit1pingvflags1, 
7580         { "Checksum", "ncp.bit1pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7581
7582         { &hf_bit2pingvflags1, 
7583         { "CRC32", "ncp.bit2pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7584                      
7585         { &hf_bit3pingvflags1, 
7586         { "Not Defined", "ncp.bit3pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7587         
7588         { &hf_bit4pingvflags1, 
7589         { "Not Defined", "ncp.bit4pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7590         
7591         { &hf_bit5pingvflags1, 
7592         { "Not Defined", "ncp.bit5pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7593         
7594         { &hf_bit6pingvflags1, 
7595         { "Not Defined", "ncp.bit6pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7596         
7597         { &hf_bit7pingvflags1, 
7598         { "Not Defined", "ncp.bit7pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7599         
7600         { &hf_bit8pingvflags1, 
7601         { "Not Defined", "ncp.bit8pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7602         
7603         { &hf_bit9pingvflags1, 
7604         { "Not Defined", "ncp.bit9pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7605         
7606         { &hf_bit10pingvflags1, 
7607         { "Not Defined", "ncp.bit10pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7608         
7609         { &hf_bit11pingvflags1, 
7610         { "Not Defined", "ncp.bit11pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7611         
7612         { &hf_bit12pingvflags1, 
7613         { "Not Defined", "ncp.bit12pingvflags1", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7614         
7615         { &hf_bit13pingvflags1, 
7616         { "Not Defined", "ncp.bit13pingvflags1", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7617         
7618         { &hf_bit14pingvflags1, 
7619         { "Not Defined", "ncp.bit14pingvflags1", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7620         
7621         { &hf_bit15pingvflags1, 
7622         { "Not Defined", "ncp.bit15pingvflags1", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7623         
7624         { &hf_bit16pingvflags1, 
7625         { "Not Defined", "ncp.bit16pingvflags1", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7626
7627     { &hf_nds_letter_ver,
7628         { "Letter Version", "ncp.nds_letter_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7629     
7630     { &hf_nds_os_ver,
7631         { "OS Version", "ncp.nds_os_ver", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7632     
7633     { &hf_nds_lic_flags,
7634         { "License Flags", "ncp.nds_lic_flags", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7635     
7636     { &hf_nds_ds_time,
7637         { "DS Time", "ncp.nds_ds_time", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7638     
7639     { &hf_nds_ping_version,
7640         { "Ping Version", "ncp.nds_ping_version", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
7641
7642     { &hf_nds_search_scope,
7643         { "Search Scope", "ncp.nds_search_scope", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
7644
7645     { &hf_nds_num_objects,
7646         { "Number of Objects to Search", "ncp.nds_num_objects", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL }},
7647
7648
7649         { &hf_bit1siflags, 
7650         { "Names", "ncp.bit1siflags", FT_BOOLEAN, 16, NULL, 0x00000001, "", HFILL }},
7651
7652         { &hf_bit2siflags, 
7653         { "Names and Values", "ncp.bit2siflags", FT_BOOLEAN, 16, NULL, 0x00000002, "", HFILL }},
7654                      
7655         { &hf_bit3siflags, 
7656         { "Effective Privileges", "ncp.bit3siflags", FT_BOOLEAN, 16, NULL, 0x00000004, "", HFILL }},
7657         
7658         { &hf_bit4siflags, 
7659         { "Value Info", "ncp.bit4siflags", FT_BOOLEAN, 16, NULL, 0x00000008, "", HFILL }},
7660         
7661         { &hf_bit5siflags, 
7662         { "Abbreviated Value", "ncp.bit5siflags", FT_BOOLEAN, 16, NULL, 0x00000010, "", HFILL }},
7663         
7664         { &hf_bit6siflags, 
7665         { "Not Defined", "ncp.bit6siflags", FT_BOOLEAN, 16, NULL, 0x00000020, "", HFILL }},
7666         
7667         { &hf_bit7siflags, 
7668         { "Not Defined", "ncp.bit7siflags", FT_BOOLEAN, 16, NULL, 0x00000040, "", HFILL }},
7669         
7670         { &hf_bit8siflags, 
7671         { "Not Defined", "ncp.bit8siflags", FT_BOOLEAN, 16, NULL, 0x00000080, "", HFILL }},
7672         
7673         { &hf_bit9siflags, 
7674         { "Expanded Class", "ncp.bit9siflags", FT_BOOLEAN, 16, NULL, 0x00000100, "", HFILL }},
7675         
7676         { &hf_bit10siflags, 
7677         { "Not Defined", "ncp.bit10siflags", FT_BOOLEAN, 16, NULL, 0x00000200, "", HFILL }},
7678         
7679         { &hf_bit11siflags, 
7680         { "Not Defined", "ncp.bit11siflags", FT_BOOLEAN, 16, NULL, 0x00000400, "", HFILL }},
7681         
7682         { &hf_bit12siflags, 
7683         { "Not Defined", "ncp.bit12siflags", FT_BOOLEAN, 16, NULL, 0x00000800, "", HFILL }},
7684         
7685         { &hf_bit13siflags, 
7686         { "Not Defined", "ncp.bit13siflags", FT_BOOLEAN, 16, NULL, 0x00001000, "", HFILL }},
7687         
7688         { &hf_bit14siflags, 
7689         { "Not Defined", "ncp.bit14siflags", FT_BOOLEAN, 16, NULL, 0x00002000, "", HFILL }},
7690         
7691         { &hf_bit15siflags, 
7692         { "Not Defined", "ncp.bit15siflags", FT_BOOLEAN, 16, NULL, 0x00004000, "", HFILL }},
7693         
7694         { &hf_bit16siflags, 
7695         { "Not Defined", "ncp.bit16siflags", FT_BOOLEAN, 16, NULL, 0x00008000, "", HFILL }},
7696
7697
7698
7699  """                
7700         # Print the registration code for the hf variables
7701         for var in sorted_vars:
7702                 print "\t{ &%s," % (var.HFName())
7703                 print "\t{ \"%s\", \"%s\", %s, %s, %s, 0x%x, \"\", HFILL }},\n" % \
7704                         (var.Description(), var.DFilter(),
7705                         var.EtherealFType(), var.Display(), var.ValuesName(),
7706                         var.Mask())
7707
7708         print "\t};\n"
7709  
7710         if ett_list:
7711                 print "\tstatic gint *ett[] = {"
7712
7713                 for ett in ett_list:
7714                         print "\t\t&%s," % (ett,)
7715
7716                 print "\t};\n"
7717                        
7718         print """
7719         proto_register_field_array(proto_ncp, hf, array_length(hf));
7720         """
7721
7722         if ett_list:
7723                 print """
7724         proto_register_subtree_array(ett, array_length(ett));
7725                 """
7726
7727         print """
7728         register_init_routine(&ncp_init_protocol);
7729         register_postseq_cleanup_routine(&ncp_postseq_cleanup);
7730         register_final_registration_routine(final_registration_ncp2222);
7731         """
7732
7733         
7734         # End of proto_register_ncp2222()
7735         print "}"
7736         print ""
7737         print '#include "packet-ncp2222.inc"'
7738
7739 def usage():
7740         print "Usage: ncp2222.py -o output_file"
7741         sys.exit(1)
7742
7743 def main():
7744         global compcode_lists
7745         global ptvc_lists
7746         global msg
7747
7748         optstring = "o:"
7749         out_filename = None
7750
7751         try:
7752                 opts, args = getopt.getopt(sys.argv[1:], optstring)
7753         except getopt.error:
7754                 usage()
7755
7756         for opt, arg in opts:
7757                 if opt == "-o":
7758                         out_filename = arg
7759                 else:
7760                         usage()
7761
7762         if len(args) != 0:
7763                 usage()
7764
7765         if not out_filename:
7766                 usage()
7767
7768         # Create the output file
7769         try:
7770                 out_file = open(out_filename, "w")
7771         except IOError, err:
7772                 sys.exit("Could not open %s for writing: %s" % (out_filename,
7773                         err))
7774
7775         # Set msg to current stdout
7776         msg = sys.stdout
7777
7778         # Set stdout to the output file
7779         sys.stdout = out_file
7780
7781         msg.write("Processing NCP definitions...\n")
7782         # Run the code, and if we catch any exception,
7783         # erase the output file.
7784         try:
7785                 compcode_lists  = UniqueCollection('Completion Code Lists')
7786                 ptvc_lists      = UniqueCollection('PTVC Lists')
7787
7788                 define_errors()
7789                 define_groups()         
7790                 
7791                 define_ncp2222()
7792
7793                 msg.write("Defined %d NCP types.\n" % (len(packets),))
7794                 produce_code()
7795         except:
7796                 traceback.print_exc(20, msg)
7797                 try:
7798                         out_file.close()
7799                 except IOError, err:
7800                         msg.write("Could not close %s: %s\n" % (out_filename, err))
7801
7802                 try:
7803                         if os.path.exists(out_filename):
7804                                 os.remove(out_filename)
7805                 except OSError, err:
7806                         msg.write("Could not remove %s: %s\n" % (out_filename, err))
7807
7808                 sys.exit(1)
7809
7810
7811
7812 def define_ncp2222():
7813         ##############################################################################
7814         # NCP Packets. Here I list functions and subfunctions in hexadecimal like the
7815         # NCP book (and I believe LanAlyzer does this too).
7816         # However, Novell lists these in decimal in their on-line documentation.
7817         ##############################################################################
7818         # 2222/01
7819         pkt = NCP(0x01, "File Set Lock", 'file')
7820         pkt.Request(7)
7821         pkt.Reply(8)
7822         pkt.CompletionCodes([0x0000])
7823         # 2222/02
7824         pkt = NCP(0x02, "File Release Lock", 'file')
7825         pkt.Request(7)
7826         pkt.Reply(8)
7827         pkt.CompletionCodes([0x0000, 0xff00])
7828         # 2222/03
7829         pkt = NCP(0x03, "Log File Exclusive", 'file')
7830         pkt.Request( (12, 267), [
7831                 rec( 7, 1, DirHandle ),
7832                 rec( 8, 1, LockFlag ),
7833                 rec( 9, 2, TimeoutLimit, BE ),
7834                 rec( 11, (1, 256), FilePath ),
7835         ])
7836         pkt.Reply(8)
7837         pkt.CompletionCodes([0x0000, 0x8200, 0x9600, 0xfe0d, 0xff01])
7838         # 2222/04
7839         pkt = NCP(0x04, "Lock File Set", 'file')
7840         pkt.Request( 9, [
7841                 rec( 7, 2, TimeoutLimit ),
7842         ])
7843         pkt.Reply(8)
7844         pkt.CompletionCodes([0x0000, 0xfe0d, 0xff01])
7845         ## 2222/05
7846         pkt = NCP(0x05, "Release File", 'file')
7847         pkt.Request( (9, 264), [
7848                 rec( 7, 1, DirHandle ),
7849                 rec( 8, (1, 256), FilePath ),
7850         ])
7851         pkt.Reply(8)
7852         pkt.CompletionCodes([0x0000, 0x9b00, 0x9c03, 0xff1a])
7853         # 2222/06
7854         pkt = NCP(0x06, "Release File Set", 'file')
7855         pkt.Request( 8, [
7856                 rec( 7, 1, LockFlag ),
7857         ])
7858         pkt.Reply(8)
7859         pkt.CompletionCodes([0x0000])
7860         # 2222/07
7861         pkt = NCP(0x07, "Clear File", 'file')
7862         pkt.Request( (9, 264), [
7863                 rec( 7, 1, DirHandle ),
7864                 rec( 8, (1, 256), FilePath ),
7865         ])
7866         pkt.Reply(8)
7867         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03,
7868                 0xa100, 0xfd00, 0xff1a])
7869         # 2222/08
7870         pkt = NCP(0x08, "Clear File Set", 'file')
7871         pkt.Request( 8, [
7872                 rec( 7, 1, LockFlag ),
7873         ])
7874         pkt.Reply(8)
7875         pkt.CompletionCodes([0x0000])
7876         # 2222/09
7877         pkt = NCP(0x09, "Log Logical Record", 'file')
7878         pkt.Request( (11, 138), [
7879                 rec( 7, 1, LockFlag ),
7880                 rec( 8, 2, TimeoutLimit, BE ),
7881                 rec( 10, (1, 128), LogicalRecordName ),
7882         ], info_str=(LogicalRecordName, "Log Logical Record: %s", ", %s"))
7883         pkt.Reply(8)
7884         pkt.CompletionCodes([0x0000, 0x9600, 0xfe0d, 0xff1a])
7885         # 2222/0A, 10
7886         pkt = NCP(0x0A, "Lock Logical Record Set", 'file')
7887         pkt.Request( 10, [
7888                 rec( 7, 1, LockFlag ),
7889                 rec( 8, 2, TimeoutLimit ),
7890         ])
7891         pkt.Reply(8)
7892         pkt.CompletionCodes([0x0000, 0xfe0d, 0xff1a])
7893         # 2222/0B, 11
7894         pkt = NCP(0x0B, "Clear Logical Record", 'file')
7895         pkt.Request( (8, 135), [
7896                 rec( 7, (1, 128), LogicalRecordName ),
7897         ], info_str=(LogicalRecordName, "Clear Logical Record: %s", ", %s"))
7898         pkt.Reply(8)
7899         pkt.CompletionCodes([0x0000, 0xff1a])
7900         # 2222/0C, 12
7901         pkt = NCP(0x0C, "Release Logical Record", 'file')
7902         pkt.Request( (8, 135), [
7903                 rec( 7, (1, 128), LogicalRecordName ),
7904         ], info_str=(LogicalRecordName, "Release Logical Record: %s", ", %s"))
7905         pkt.Reply(8)
7906         pkt.CompletionCodes([0x0000, 0xff1a])
7907         # 2222/0D, 13
7908         pkt = NCP(0x0D, "Release Logical Record Set", 'file')
7909         pkt.Request( 8, [
7910                 rec( 7, 1, LockFlag ),
7911         ])
7912         pkt.Reply(8)
7913         pkt.CompletionCodes([0x0000])
7914         # 2222/0E, 14
7915         pkt = NCP(0x0E, "Clear Logical Record Set", 'file')
7916         pkt.Request( 8, [
7917                 rec( 7, 1, LockFlag ),
7918         ])
7919         pkt.Reply(8)
7920         pkt.CompletionCodes([0x0000])
7921         # 2222/1100, 17/00
7922         pkt = NCP(0x1100, "Write to Spool File", 'qms')
7923         pkt.Request( (11, 16), [
7924                 rec( 10, ( 1, 6 ), Data ),
7925         ], info_str=(Data, "Write to Spool File: %s", ", %s"))
7926         pkt.Reply(8)
7927         pkt.CompletionCodes([0x0000, 0x0104, 0x8000, 0x8101, 0x8701, 0x8800,
7928                              0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9400, 0x9500,
7929                              0x9600, 0x9804, 0x9900, 0xa100, 0xa201, 0xff19])
7930         # 2222/1101, 17/01
7931         pkt = NCP(0x1101, "Close Spool File", 'qms')
7932         pkt.Request( 11, [
7933                 rec( 10, 1, AbortQueueFlag ),
7934         ])
7935         pkt.Reply(8)      
7936         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8701, 0x8800, 0x8d00,
7937                              0x8e00, 0x8f00, 0x9001, 0x9300, 0x9400, 0x9500,
7938                              0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03, 0x9d00,
7939                              0xa100, 0xd000, 0xd100, 0xd202, 0xd300, 0xd400,
7940                              0xda01, 0xe800, 0xea00, 0xeb00, 0xec00, 0xfc06,
7941                              0xfd00, 0xfe07, 0xff06])
7942         # 2222/1102, 17/02
7943         pkt = NCP(0x1102, "Set Spool File Flags", 'qms')
7944         pkt.Request( 30, [
7945                 rec( 10, 1, PrintFlags ),
7946                 rec( 11, 1, TabSize ),
7947                 rec( 12, 1, TargetPrinter ),
7948                 rec( 13, 1, Copies ),
7949                 rec( 14, 1, FormType ),
7950                 rec( 15, 1, Reserved ),
7951                 rec( 16, 14, BannerName ),
7952         ])
7953         pkt.Reply(8)
7954         pkt.CompletionCodes([0x0000, 0x9600, 0xd202, 0xd300, 0xe800, 0xea00,
7955                              0xeb00, 0xec00, 0xfc06, 0xfe07, 0xff06])
7956
7957         # 2222/1103, 17/03
7958         pkt = NCP(0x1103, "Spool A Disk File", 'qms')
7959         pkt.Request( (12, 23), [
7960                 rec( 10, 1, DirHandle ),
7961                 rec( 11, (1, 12), Data ),
7962         ], info_str=(Data, "Spool a Disk File: %s", ", %s"))
7963         pkt.Reply(8)
7964         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8701, 0x8800, 0x8d00,
7965                              0x8e00, 0x8f00, 0x9001, 0x9300, 0x9400, 0x9500,
7966                              0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03, 0x9d00,
7967                              0xa100, 0xd000, 0xd100, 0xd202, 0xd300, 0xd400,
7968                              0xda01, 0xe800, 0xea00, 0xeb00, 0xec00, 0xfc06,
7969                              0xfd00, 0xfe07, 0xff06])
7970
7971         # 2222/1106, 17/06
7972         pkt = NCP(0x1106, "Get Printer Status", 'qms')
7973         pkt.Request( 11, [
7974                 rec( 10, 1, TargetPrinter ),
7975         ])
7976         pkt.Reply(12, [
7977                 rec( 8, 1, PrinterHalted ),
7978                 rec( 9, 1, PrinterOffLine ),
7979                 rec( 10, 1, CurrentFormType ),
7980                 rec( 11, 1, RedirectedPrinter ),
7981         ])
7982         pkt.CompletionCodes([0x0000, 0x9600, 0xfb05, 0xfd00, 0xff06])
7983
7984         # 2222/1109, 17/09
7985         pkt = NCP(0x1109, "Create Spool File", 'qms')
7986         pkt.Request( (12, 23), [
7987                 rec( 10, 1, DirHandle ),
7988                 rec( 11, (1, 12), Data ),
7989         ], info_str=(Data, "Create Spool File: %s", ", %s"))
7990         pkt.Reply(8)
7991         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8400, 0x8701, 0x8d00,
7992                              0x8f00, 0x9001, 0x9400, 0x9600, 0x9804, 0x9900,
7993                              0x9b03, 0x9c03, 0xa100, 0xd000, 0xd100, 0xd202,
7994                              0xd300, 0xd400, 0xda01, 0xe800, 0xea00, 0xeb00,
7995                              0xec00, 0xfc06, 0xfd00, 0xfe07, 0xff06])
7996
7997         # 2222/110A, 17/10
7998         pkt = NCP(0x110A, "Get Printer's Queue", 'qms')
7999         pkt.Request( 11, [
8000                 rec( 10, 1, TargetPrinter ),
8001         ])
8002         pkt.Reply( 12, [
8003                 rec( 8, 4, ObjectID, BE ),
8004         ])
8005         pkt.CompletionCodes([0x0000, 0x9600, 0xff06])
8006
8007         # 2222/12, 18
8008         pkt = NCP(0x12, "Get Volume Info with Number", 'file')
8009         pkt.Request( 8, [
8010                 rec( 7, 1, VolumeNumber )
8011         ],info_str=(VolumeNumber, "Get Volume Information for Volume %d", ", %d"))
8012         pkt.Reply( 36, [
8013                 rec( 8, 2, SectorsPerCluster, BE ),
8014                 rec( 10, 2, TotalVolumeClusters, BE ),
8015                 rec( 12, 2, AvailableClusters, BE ),
8016                 rec( 14, 2, TotalDirectorySlots, BE ),
8017                 rec( 16, 2, AvailableDirectorySlots, BE ),
8018                 rec( 18, 16, VolumeName ),
8019                 rec( 34, 2, RemovableFlag, BE ),
8020         ])
8021         pkt.CompletionCodes([0x0000, 0x9804])
8022
8023         # 2222/13, 19
8024         pkt = NCP(0x13, "Get Station Number", 'connection')
8025         pkt.Request(7)
8026         pkt.Reply(11, [
8027                 rec( 8, 3, StationNumber )
8028         ])
8029         pkt.CompletionCodes([0x0000, 0xff00])
8030
8031         # 2222/14, 20
8032         pkt = NCP(0x14, "Get File Server Date And Time", 'fileserver')
8033         pkt.Request(7)
8034         pkt.Reply(15, [
8035                 rec( 8, 1, Year ),
8036                 rec( 9, 1, Month ),
8037                 rec( 10, 1, Day ),
8038                 rec( 11, 1, Hour ),
8039                 rec( 12, 1, Minute ),
8040                 rec( 13, 1, Second ),
8041                 rec( 14, 1, DayOfWeek ),
8042         ])
8043         pkt.CompletionCodes([0x0000])
8044
8045         # 2222/1500, 21/00
8046         pkt = NCP(0x1500, "Send Broadcast Message", 'message')
8047         pkt.Request((13, 70), [
8048                 rec( 10, 1, ClientListLen, var="x" ),
8049                 rec( 11, 1, TargetClientList, repeat="x" ),
8050                 rec( 12, (1, 58), TargetMessage ),
8051         ], info_str=(TargetMessage, "Send Broadcast Message: %s", ", %s"))
8052         pkt.Reply(10, [
8053                 rec( 8, 1, ClientListLen, var="x" ),
8054                 rec( 9, 1, SendStatus, repeat="x" )
8055         ])
8056         pkt.CompletionCodes([0x0000, 0xfd00])
8057
8058         # 2222/1501, 21/01
8059         pkt = NCP(0x1501, "Get Broadcast Message", 'message')
8060         pkt.Request(10)
8061         pkt.Reply((9,66), [
8062                 rec( 8, (1, 58), TargetMessage )
8063         ])
8064         pkt.CompletionCodes([0x0000, 0xfd00])
8065
8066         # 2222/1502, 21/02
8067         pkt = NCP(0x1502, "Disable Broadcasts", 'message')
8068         pkt.Request(10)
8069         pkt.Reply(8)
8070         pkt.CompletionCodes([0x0000, 0xfb0a])
8071
8072         # 2222/1503, 21/03
8073         pkt = NCP(0x1503, "Enable Broadcasts", 'message')
8074         pkt.Request(10)
8075         pkt.Reply(8)
8076         pkt.CompletionCodes([0x0000])
8077
8078         # 2222/1509, 21/09
8079         pkt = NCP(0x1509, "Broadcast To Console", 'message')
8080         pkt.Request((11, 68), [
8081                 rec( 10, (1, 58), TargetMessage )
8082         ], info_str=(TargetMessage, "Broadcast to Console: %s", ", %s"))
8083         pkt.Reply(8)
8084         pkt.CompletionCodes([0x0000])
8085         # 2222/150A, 21/10
8086         pkt = NCP(0x150A, "Send Broadcast Message", 'message')
8087         pkt.Request((17, 74), [
8088                 rec( 10, 2, ClientListCount, LE, var="x" ),
8089                 rec( 12, 4, ClientList, LE, repeat="x" ),
8090                 rec( 16, (1, 58), TargetMessage ),
8091         ], info_str=(TargetMessage, "Send Broadcast Message: %s", ", %s"))
8092         pkt.Reply(14, [
8093                 rec( 8, 2, ClientListCount, LE, var="x" ),
8094                 rec( 10, 4, ClientCompFlag, LE, repeat="x" ),
8095         ])
8096         pkt.CompletionCodes([0x0000, 0xfd00])
8097
8098         # 2222/150B, 21/11
8099         pkt = NCP(0x150B, "Get Broadcast Message", 'message')
8100         pkt.Request(10)
8101         pkt.Reply((9,66), [
8102                 rec( 8, (1, 58), TargetMessage )
8103         ])
8104         pkt.CompletionCodes([0x0000, 0xfd00])
8105
8106         # 2222/150C, 21/12
8107         pkt = NCP(0x150C, "Connection Message Control", 'message')
8108         pkt.Request(22, [
8109                 rec( 10, 1, ConnectionControlBits ),
8110                 rec( 11, 3, Reserved3 ),
8111                 rec( 14, 4, ConnectionListCount, LE, var="x" ),
8112                 rec( 18, 4, ConnectionList, LE, repeat="x" ),
8113         ])
8114         pkt.Reply(8)
8115         pkt.CompletionCodes([0x0000, 0xff00])
8116
8117         # 2222/1600, 22/0
8118         pkt = NCP(0x1600, "Set Directory Handle", 'fileserver')
8119         pkt.Request((13,267), [
8120                 rec( 10, 1, TargetDirHandle ),
8121                 rec( 11, 1, DirHandle ),
8122                 rec( 12, (1, 255), Path ),
8123         ], info_str=(Path, "Set Directory Handle to: %s", ", %s"))
8124         pkt.Reply(8)
8125         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8126                              0xfd00, 0xff00])
8127
8128
8129         # 2222/1601, 22/1
8130         pkt = NCP(0x1601, "Get Directory Path", 'fileserver')
8131         pkt.Request(11, [
8132                 rec( 10, 1, DirHandle ),
8133         ],info_str=(DirHandle, "Get Directory Path for Directory Handle %d", ", %d"))
8134         pkt.Reply((9,263), [
8135                 rec( 8, (1,255), Path ),
8136         ])
8137         pkt.CompletionCodes([0x0000, 0x9600, 0x9b00, 0x9c00, 0xa100])
8138
8139         # 2222/1602, 22/2
8140         pkt = NCP(0x1602, "Scan Directory Information", 'fileserver')
8141         pkt.Request((14,268), [
8142                 rec( 10, 1, DirHandle ),
8143                 rec( 11, 2, StartingSearchNumber, BE ),
8144                 rec( 13, (1, 255), Path ),
8145         ], info_str=(Path, "Scan Directory Information: %s", ", %s"))
8146         pkt.Reply(36, [
8147                 rec( 8, 16, DirectoryPath ),
8148                 rec( 24, 2, CreationDate, BE ),
8149                 rec( 26, 2, CreationTime, BE ),
8150                 rec( 28, 4, CreatorID, BE ),
8151                 rec( 32, 1, AccessRightsMask ),
8152                 rec( 33, 1, Reserved ),
8153                 rec( 34, 2, NextSearchNumber, BE ),
8154         ])
8155         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8156                              0xfd00, 0xff00])
8157
8158         # 2222/1603, 22/3
8159         pkt = NCP(0x1603, "Get Effective Directory Rights", 'fileserver')
8160         pkt.Request((14,268), [
8161                 rec( 10, 1, DirHandle ),
8162                 rec( 11, 2, StartingSearchNumber ),
8163                 rec( 13, (1, 255), Path ),
8164         ], info_str=(Path, "Get Effective Directory Rights: %s", ", %s"))
8165         pkt.Reply(9, [
8166                 rec( 8, 1, AccessRightsMask ),
8167         ])
8168         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8169                              0xfd00, 0xff00])
8170
8171         # 2222/1604, 22/4
8172         pkt = NCP(0x1604, "Modify Maximum Rights Mask", 'fileserver')
8173         pkt.Request((14,268), [
8174                 rec( 10, 1, DirHandle ),
8175                 rec( 11, 1, RightsGrantMask ),
8176                 rec( 12, 1, RightsRevokeMask ),
8177                 rec( 13, (1, 255), Path ),
8178         ], info_str=(Path, "Modify Maximum Rights Mask: %s", ", %s"))
8179         pkt.Reply(8)
8180         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100, 0xfa00,
8181                              0xfd00, 0xff00])
8182
8183         # 2222/1605, 22/5
8184         pkt = NCP(0x1605, "Get Volume Number", 'fileserver')
8185         pkt.Request((11, 265), [
8186                 rec( 10, (1,255), VolumeNameLen ),
8187         ], info_str=(VolumeNameLen, "Get Volume Number for: %s", ", %s"))
8188         pkt.Reply(9, [
8189                 rec( 8, 1, VolumeNumber ),
8190         ])
8191         pkt.CompletionCodes([0x0000, 0x9600, 0x9804])
8192
8193         # 2222/1606, 22/6
8194         pkt = NCP(0x1606, "Get Volume Name", 'fileserver')
8195         pkt.Request(11, [
8196                 rec( 10, 1, VolumeNumber ),
8197         ],info_str=(VolumeNumber, "Get Name for Volume %d", ", %d"))
8198         pkt.Reply((9, 263), [
8199                 rec( 8, (1,255), VolumeNameLen ),
8200         ])
8201         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0xff00])
8202
8203         # 2222/160A, 22/10
8204         pkt = NCP(0x160A, "Create Directory", 'fileserver')
8205         pkt.Request((13,267), [
8206                 rec( 10, 1, DirHandle ),
8207                 rec( 11, 1, AccessRightsMask ),
8208                 rec( 12, (1, 255), Path ),
8209         ], info_str=(Path, "Create Directory: %s", ", %s"))
8210         pkt.Reply(8)
8211         pkt.CompletionCodes([0x0000, 0x8400, 0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03,
8212                              0x9e00, 0xa100, 0xfd00, 0xff00])
8213
8214         # 2222/160B, 22/11
8215         pkt = NCP(0x160B, "Delete Directory", 'fileserver')
8216         pkt.Request((13,267), [
8217                 rec( 10, 1, DirHandle ),
8218                 rec( 11, 1, Reserved ),
8219                 rec( 12, (1, 255), Path ),
8220         ], info_str=(Path, "Delete Directory: %s", ", %s"))
8221         pkt.Reply(8)
8222         pkt.CompletionCodes([0x0000, 0x8a00, 0x9600, 0x9804, 0x9b03, 0x9c03,
8223                              0x9f00, 0xa000, 0xa100, 0xfd00, 0xff00])
8224
8225         # 2222/160C, 22/12
8226         pkt = NCP(0x160C, "Scan Directory for Trustees", 'fileserver')
8227         pkt.Request((13,267), [
8228                 rec( 10, 1, DirHandle ),
8229                 rec( 11, 1, TrusteeSetNumber ),
8230                 rec( 12, (1, 255), Path ),
8231         ], info_str=(Path, "Scan Directory for Trustees: %s", ", %s"))
8232         pkt.Reply(57, [
8233                 rec( 8, 16, DirectoryPath ),
8234                 rec( 24, 2, CreationDate, BE ),
8235                 rec( 26, 2, CreationTime, BE ),
8236                 rec( 28, 4, CreatorID ),
8237                 rec( 32, 4, TrusteeID, BE ),
8238                 rec( 36, 4, TrusteeID, BE ),
8239                 rec( 40, 4, TrusteeID, BE ),
8240                 rec( 44, 4, TrusteeID, BE ),
8241                 rec( 48, 4, TrusteeID, BE ),
8242                 rec( 52, 1, AccessRightsMask ),
8243                 rec( 53, 1, AccessRightsMask ),
8244                 rec( 54, 1, AccessRightsMask ),
8245                 rec( 55, 1, AccessRightsMask ),
8246                 rec( 56, 1, AccessRightsMask ),
8247         ])
8248         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9b03, 0x9c03,
8249                              0xa100, 0xfd00, 0xff00])
8250
8251         # 2222/160D, 22/13
8252         pkt = NCP(0x160D, "Add Trustee to Directory", 'fileserver')
8253         pkt.Request((17,271), [
8254                 rec( 10, 1, DirHandle ),
8255                 rec( 11, 4, TrusteeID, BE ),
8256                 rec( 15, 1, AccessRightsMask ),
8257                 rec( 16, (1, 255), Path ),
8258         ], info_str=(Path, "Add Trustee to Directory: %s", ", %s"))
8259         pkt.Reply(8)
8260         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03,
8261                              0xa100, 0xfc06, 0xfd00, 0xff00])
8262
8263         # 2222/160E, 22/14
8264         pkt = NCP(0x160E, "Delete Trustee from Directory", 'fileserver')
8265         pkt.Request((17,271), [
8266                 rec( 10, 1, DirHandle ),
8267                 rec( 11, 4, TrusteeID, BE ),
8268                 rec( 15, 1, Reserved ),
8269                 rec( 16, (1, 255), Path ),
8270         ], info_str=(Path, "Delete Trustee from Directory: %s", ", %s"))
8271         pkt.Reply(8)
8272         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9900, 0x9b03, 0x9c03,
8273                              0xa100, 0xfc06, 0xfd00, 0xfe07, 0xff00])
8274
8275         # 2222/160F, 22/15
8276         pkt = NCP(0x160F, "Rename Directory", 'fileserver')
8277         pkt.Request((13, 521), [
8278                 rec( 10, 1, DirHandle ),
8279                 rec( 11, (1, 255), Path ),
8280                 rec( -1, (1, 255), NewPath ),
8281         ], info_str=(Path, "Rename Directory: %s", ", %s"))
8282         pkt.Reply(8)
8283         pkt.CompletionCodes([0x0000, 0x8b00, 0x9200, 0x9600, 0x9804, 0x9b03, 0x9c03,
8284                              0x9e00, 0xa100, 0xef00, 0xfd00, 0xff00])
8285                                                                         
8286         # 2222/1610, 22/16
8287         pkt = NCP(0x1610, "Purge Erased Files", 'file')
8288         pkt.Request(10)
8289         pkt.Reply(8)
8290         pkt.CompletionCodes([0x0000, 0x8100, 0x9600, 0x9804, 0xa100, 0xff00])
8291
8292         # 2222/1611, 22/17
8293         pkt = NCP(0x1611, "Recover Erased File", 'fileserver')
8294         pkt.Request(11, [
8295                 rec( 10, 1, DirHandle ),
8296         ],info_str=(DirHandle, "Recover Erased File from Directory Handle %d", ", %d"))
8297         pkt.Reply(38, [
8298                 rec( 8, 15, OldFileName ),
8299                 rec( 23, 15, NewFileName ),
8300         ])
8301         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03,
8302                              0xa100, 0xfd00, 0xff00])
8303         # 2222/1612, 22/18
8304         pkt = NCP(0x1612, "Alloc Permanent Directory Handle", 'fileserver')
8305         pkt.Request((13, 267), [
8306                 rec( 10, 1, DirHandle ),
8307                 rec( 11, 1, DirHandleName ),
8308                 rec( 12, (1,255), Path ),
8309         ], info_str=(Path, "Allocate Permanent Directory Handle: %s", ", %s"))
8310         pkt.Reply(10, [
8311                 rec( 8, 1, DirHandle ),
8312                 rec( 9, 1, AccessRightsMask ),
8313         ])
8314         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9900, 0x9c03, 0x9d00,
8315                              0xa100, 0xfd00, 0xff00])
8316         # 2222/1613, 22/19
8317         pkt = NCP(0x1613, "Alloc Temporary Directory Handle", 'fileserver')
8318         pkt.Request((13, 267), [
8319                 rec( 10, 1, DirHandle ),
8320                 rec( 11, 1, DirHandleName ),
8321                 rec( 12, (1,255), Path ),
8322         ], info_str=(Path, "Allocate Temporary Directory Handle: %s", ", %s"))
8323         pkt.Reply(10, [
8324                 rec( 8, 1, DirHandle ),
8325                 rec( 9, 1, AccessRightsMask ),
8326         ])
8327         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9900, 0x9c03, 0x9d00,
8328                              0xa100, 0xfd00, 0xff00])
8329         # 2222/1614, 22/20
8330         pkt = NCP(0x1614, "Deallocate Directory Handle", 'fileserver')
8331         pkt.Request(11, [
8332                 rec( 10, 1, DirHandle ),
8333         ],info_str=(DirHandle, "Deallocate Directory Handle %d", ", %d"))
8334         pkt.Reply(8)
8335         pkt.CompletionCodes([0x0000, 0x9b03])
8336         # 2222/1615, 22/21
8337         pkt = NCP(0x1615, "Get Volume Info with Handle", 'file')
8338         pkt.Request( 11, [
8339                 rec( 10, 1, DirHandle )
8340         ],info_str=(DirHandle, "Get Volume Information with Handle %d", ", %d"))
8341         pkt.Reply( 36, [
8342                 rec( 8, 2, SectorsPerCluster, BE ),
8343                 rec( 10, 2, TotalVolumeClusters, BE ),
8344                 rec( 12, 2, AvailableClusters, BE ),
8345                 rec( 14, 2, TotalDirectorySlots, BE ),
8346                 rec( 16, 2, AvailableDirectorySlots, BE ),
8347                 rec( 18, 16, VolumeName ),
8348                 rec( 34, 2, RemovableFlag, BE ),
8349         ])
8350         pkt.CompletionCodes([0x0000, 0xff00])
8351         # 2222/1616, 22/22
8352         pkt = NCP(0x1616, "Alloc Special Temporary Directory Handle", 'fileserver')
8353         pkt.Request((13, 267), [
8354                 rec( 10, 1, DirHandle ),
8355                 rec( 11, 1, DirHandleName ),
8356                 rec( 12, (1,255), Path ),
8357         ], info_str=(Path, "Allocate Special Temporary Directory Handle: %s", ", %s"))
8358         pkt.Reply(10, [
8359                 rec( 8, 1, DirHandle ),
8360                 rec( 9, 1, AccessRightsMask ),
8361         ])
8362         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9900, 0x9c03, 0x9d00,
8363                              0xa100, 0xfd00, 0xff00])
8364         # 2222/1617, 22/23
8365         pkt = NCP(0x1617, "Extract a Base Handle", 'fileserver')
8366         pkt.Request(11, [
8367                 rec( 10, 1, DirHandle ),
8368         ],info_str=(DirHandle, "Extract a Base Handle from Directory Handle %d", ", %d"))
8369         pkt.Reply(22, [
8370                 rec( 8, 10, ServerNetworkAddress ),
8371                 rec( 18, 4, DirHandleLong ),
8372         ])
8373         pkt.CompletionCodes([0x0000, 0x9600, 0x9b03])
8374         # 2222/1618, 22/24
8375         pkt = NCP(0x1618, "Restore an Extracted Base Handle", 'fileserver')
8376         pkt.Request(24, [
8377                 rec( 10, 10, ServerNetworkAddress ),
8378                 rec( 20, 4, DirHandleLong ),
8379         ])
8380         pkt.Reply(10, [
8381                 rec( 8, 1, DirHandle ),
8382                 rec( 9, 1, AccessRightsMask ),
8383         ])
8384         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c00, 0x9d00, 0xa100,
8385                              0xfd00, 0xff00])
8386         # 2222/1619, 22/25
8387         pkt = NCP(0x1619, "Set Directory Information", 'fileserver')
8388         pkt.Request((21, 275), [
8389                 rec( 10, 1, DirHandle ),
8390                 rec( 11, 2, CreationDate ),
8391                 rec( 13, 2, CreationTime ),
8392                 rec( 15, 4, CreatorID, BE ),
8393                 rec( 19, 1, AccessRightsMask ),
8394                 rec( 20, (1,255), Path ),
8395         ], info_str=(Path, "Set Directory Information: %s", ", %s"))
8396         pkt.Reply(8)
8397         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9804, 0x9b03, 0x9c00, 0xa100,
8398                              0xff16])
8399         # 2222/161A, 22/26
8400         pkt = NCP(0x161A, "Get Path Name of a Volume-Directory Number Pair", 'fileserver')
8401         pkt.Request(13, [
8402                 rec( 10, 1, VolumeNumber ),
8403                 rec( 11, 2, DirectoryEntryNumberWord ),
8404         ])
8405         pkt.Reply((9,263), [
8406                 rec( 8, (1,255), Path ),
8407                 ])
8408         pkt.CompletionCodes([0x0000, 0x9804, 0x9c00, 0xa100])
8409         # 2222/161B, 22/27
8410         pkt = NCP(0x161B, "Scan Salvageable Files", 'fileserver')
8411         pkt.Request(15, [
8412                 rec( 10, 1, DirHandle ),
8413                 rec( 11, 4, SequenceNumber ),
8414         ])
8415         pkt.Reply(140, [
8416                 rec( 8, 4, SequenceNumber ),
8417                 rec( 12, 2, Subdirectory ),
8418                 rec( 14, 2, Reserved2 ),
8419                 rec( 16, 4, AttributesDef32 ),
8420                 rec( 20, 1, UniqueID ),
8421                 rec( 21, 1, FlagsDef ),
8422                 rec( 22, 1, DestNameSpace ),
8423                 rec( 23, 1, FileNameLen ),
8424                 rec( 24, 12, FileName12 ),
8425                 rec( 36, 2, CreationTime ),
8426                 rec( 38, 2, CreationDate ),
8427                 rec( 40, 4, CreatorID, BE ),
8428                 rec( 44, 2, ArchivedTime ),
8429                 rec( 46, 2, ArchivedDate ),
8430                 rec( 48, 4, ArchiverID, BE ),
8431                 rec( 52, 2, UpdateTime ),
8432                 rec( 54, 2, UpdateDate ),
8433                 rec( 56, 4, UpdateID, BE ),
8434                 rec( 60, 4, FileSize, BE ),
8435                 rec( 64, 44, Reserved44 ),
8436                 rec( 108, 2, InheritedRightsMask ),
8437                 rec( 110, 2, LastAccessedDate ),
8438                 rec( 112, 4, DeletedFileTime ),
8439                 rec( 116, 2, DeletedTime ),
8440                 rec( 118, 2, DeletedDate ),
8441                 rec( 120, 4, DeletedID, BE ),
8442                 rec( 124, 16, Reserved16 ),
8443         ])
8444         pkt.CompletionCodes([0x0000, 0xfb01, 0xff1d])
8445         # 2222/161C, 22/28
8446         pkt = NCP(0x161C, "Recover Salvageable File", 'fileserver')
8447         pkt.Request((17,525), [
8448                 rec( 10, 1, DirHandle ),
8449                 rec( 11, 4, SequenceNumber ),
8450                 rec( 15, (1, 255), FileName ),
8451                 rec( -1, (1, 255), NewFileNameLen ),
8452         ], info_str=(FileName, "Recover File: %s", ", %s"))
8453         pkt.Reply(8)
8454         pkt.CompletionCodes([0x0000, 0x8401, 0x9c03, 0xfe02])
8455         # 2222/161D, 22/29
8456         pkt = NCP(0x161D, "Purge Salvageable File", 'fileserver')
8457         pkt.Request(15, [
8458                 rec( 10, 1, DirHandle ),
8459                 rec( 11, 4, SequenceNumber ),
8460         ])
8461         pkt.Reply(8)
8462         pkt.CompletionCodes([0x0000, 0x8500, 0x9c03])
8463         # 2222/161E, 22/30
8464         pkt = NCP(0x161E, "Scan a Directory", 'fileserver')
8465         pkt.Request((17, 271), [
8466                 rec( 10, 1, DirHandle ),
8467                 rec( 11, 1, DOSFileAttributes ),
8468                 rec( 12, 4, SequenceNumber ),
8469                 rec( 16, (1, 255), SearchPattern ),
8470         ], info_str=(SearchPattern, "Scan a Directory: %s", ", %s"))
8471         pkt.Reply(140, [
8472                 rec( 8, 4, SequenceNumber ),
8473                 rec( 12, 4, Subdirectory ),
8474                 rec( 16, 4, AttributesDef32 ),
8475                 rec( 20, 1, UniqueID, LE ),
8476                 rec( 21, 1, PurgeFlags ),
8477                 rec( 22, 1, DestNameSpace ),
8478                 rec( 23, 1, NameLen ),
8479                 rec( 24, 12, Name12 ),
8480                 rec( 36, 2, CreationTime ),
8481                 rec( 38, 2, CreationDate ),
8482                 rec( 40, 4, CreatorID, BE ),
8483                 rec( 44, 2, ArchivedTime ),
8484                 rec( 46, 2, ArchivedDate ),
8485                 rec( 48, 4, ArchiverID, BE ),
8486                 rec( 52, 2, UpdateTime ),
8487                 rec( 54, 2, UpdateDate ),
8488                 rec( 56, 4, UpdateID, BE ),
8489                 rec( 60, 4, FileSize, BE ),
8490                 rec( 64, 44, Reserved44 ),
8491                 rec( 108, 2, InheritedRightsMask ),
8492                 rec( 110, 2, LastAccessedDate ),
8493                 rec( 112, 28, Reserved28 ),
8494         ])
8495         pkt.CompletionCodes([0x0000, 0x8500, 0x9c03])
8496         # 2222/161F, 22/31
8497         pkt = NCP(0x161F, "Get Directory Entry", 'fileserver')
8498         pkt.Request(11, [
8499                 rec( 10, 1, DirHandle ),
8500         ])
8501         pkt.Reply(136, [
8502                 rec( 8, 4, Subdirectory ),
8503                 rec( 12, 4, AttributesDef32 ),
8504                 rec( 16, 1, UniqueID, LE ),
8505                 rec( 17, 1, PurgeFlags ),
8506                 rec( 18, 1, DestNameSpace ),
8507                 rec( 19, 1, NameLen ),
8508                 rec( 20, 12, Name12 ),
8509                 rec( 32, 2, CreationTime ),
8510                 rec( 34, 2, CreationDate ),
8511                 rec( 36, 4, CreatorID, BE ),
8512                 rec( 40, 2, ArchivedTime ),
8513                 rec( 42, 2, ArchivedDate ), 
8514                 rec( 44, 4, ArchiverID, BE ),
8515                 rec( 48, 2, UpdateTime ),
8516                 rec( 50, 2, UpdateDate ),
8517                 rec( 52, 4, NextTrusteeEntry, BE ),
8518                 rec( 56, 48, Reserved48 ),
8519                 rec( 104, 2, MaximumSpace ),
8520                 rec( 106, 2, InheritedRightsMask ),
8521                 rec( 108, 28, Undefined28 ),
8522         ])
8523         pkt.CompletionCodes([0x0000, 0x8900, 0xbf00, 0xfb00])
8524         # 2222/1620, 22/32
8525         pkt = NCP(0x1620, "Scan Volume's User Disk Restrictions", 'fileserver')
8526         pkt.Request(15, [
8527                 rec( 10, 1, VolumeNumber ),
8528                 rec( 11, 4, SequenceNumber ),
8529         ])
8530         pkt.Reply(17, [
8531                 rec( 8, 1, NumberOfEntries, var="x" ),
8532                 rec( 9, 8, ObjectIDStruct, repeat="x" ),
8533         ])
8534         pkt.CompletionCodes([0x0000, 0x9800])
8535         # 2222/1621, 22/33
8536         pkt = NCP(0x1621, "Add User Disk Space Restriction", 'fileserver')
8537         pkt.Request(19, [
8538                 rec( 10, 1, VolumeNumber ),
8539                 rec( 11, 4, ObjectID ),
8540                 rec( 15, 4, DiskSpaceLimit ),
8541         ])
8542         pkt.Reply(8)
8543         pkt.CompletionCodes([0x0000, 0x8c00, 0x9600, 0x9800])
8544         # 2222/1622, 22/34
8545         pkt = NCP(0x1622, "Remove User Disk Space Restrictions", 'fileserver')
8546         pkt.Request(15, [
8547                 rec( 10, 1, VolumeNumber ),
8548                 rec( 11, 4, ObjectID ),
8549         ])
8550         pkt.Reply(8)
8551         pkt.CompletionCodes([0x0000, 0x8c00, 0xfe0e])
8552         # 2222/1623, 22/35
8553         pkt = NCP(0x1623, "Get Directory Disk Space Restriction", 'fileserver')
8554         pkt.Request(11, [
8555                 rec( 10, 1, DirHandle ),
8556         ])
8557         pkt.Reply(18, [
8558                 rec( 8, 1, NumberOfEntries ),
8559                 rec( 9, 1, Level ),
8560                 rec( 10, 4, MaxSpace ),
8561                 rec( 14, 4, CurrentSpace ),
8562         ])
8563         pkt.CompletionCodes([0x0000])
8564         # 2222/1624, 22/36
8565         pkt = NCP(0x1624, "Set Directory Disk Space Restriction", 'fileserver')
8566         pkt.Request(15, [
8567                 rec( 10, 1, DirHandle ),
8568                 rec( 11, 4, DiskSpaceLimit ),
8569         ])
8570         pkt.Reply(8)
8571         pkt.CompletionCodes([0x0000, 0x0101, 0x8c00, 0xbf00])
8572         # 2222/1625, 22/37
8573         pkt = NCP(0x1625, "Set Directory Entry Information", 'fileserver')
8574         pkt.Request(NO_LENGTH_CHECK, [
8575                 #
8576                 # XXX - this didn't match what was in the spec for 22/37
8577                 # on the Novell Web site.
8578                 #
8579                 rec( 10, 1, DirHandle ),
8580                 rec( 11, 1, SearchAttributes ),
8581                 rec( 12, 4, SequenceNumber ),
8582                 rec( 16, 2, ChangeBits ),
8583                 rec( 18, 2, Reserved2 ),
8584                 rec( 20, 4, Subdirectory ),
8585                 srec(DOSDirectoryEntryStruct, req_cond="ncp.search_att_sub == TRUE"),
8586                 srec(DOSFileEntryStruct, req_cond="ncp.search_att_sub == FALSE"),
8587         ])
8588         pkt.Reply(8)
8589         pkt.ReqCondSizeConstant()
8590         pkt.CompletionCodes([0x0000, 0x0106, 0x8c00, 0xbf00])
8591         # 2222/1626, 22/38
8592         pkt = NCP(0x1626, "Scan File or Directory for Extended Trustees", 'fileserver')
8593         pkt.Request((13,267), [
8594                 rec( 10, 1, DirHandle ),
8595                 rec( 11, 1, SequenceByte ),
8596                 rec( 12, (1, 255), Path ),
8597         ], info_str=(Path, "Scan for Extended Trustees: %s", ", %s"))
8598         pkt.Reply(91, [
8599                 rec( 8, 1, NumberOfEntries, var="x" ),
8600                 rec( 9, 4, ObjectID ),
8601                 rec( 13, 4, ObjectID ),
8602                 rec( 17, 4, ObjectID ),
8603                 rec( 21, 4, ObjectID ),
8604                 rec( 25, 4, ObjectID ),
8605                 rec( 29, 4, ObjectID ),
8606                 rec( 33, 4, ObjectID ),
8607                 rec( 37, 4, ObjectID ),
8608                 rec( 41, 4, ObjectID ),
8609                 rec( 45, 4, ObjectID ),
8610                 rec( 49, 4, ObjectID ),
8611                 rec( 53, 4, ObjectID ),
8612                 rec( 57, 4, ObjectID ),
8613                 rec( 61, 4, ObjectID ),
8614                 rec( 65, 4, ObjectID ),
8615                 rec( 69, 4, ObjectID ),
8616                 rec( 73, 4, ObjectID ),
8617                 rec( 77, 4, ObjectID ),
8618                 rec( 81, 4, ObjectID ),
8619                 rec( 85, 4, ObjectID ),
8620                 rec( 89, 2, AccessRightsMaskWord, repeat="x" ),
8621         ])
8622         pkt.CompletionCodes([0x0000, 0x9800, 0x9b00, 0x9c00])
8623         # 2222/1627, 22/39
8624         pkt = NCP(0x1627, "Add Extended Trustee to Directory or File", 'fileserver')
8625         pkt.Request((18,272), [
8626                 rec( 10, 1, DirHandle ),
8627                 rec( 11, 4, ObjectID, BE ),
8628                 rec( 15, 2, TrusteeRights ),
8629                 rec( 17, (1, 255), Path ),
8630         ], info_str=(Path, "Add Extended Trustee: %s", ", %s"))
8631         pkt.Reply(8)
8632         pkt.CompletionCodes([0x0000, 0x9000])
8633         # 2222/1628, 22/40
8634         pkt = NCP(0x1628, "Scan Directory Disk Space", 'fileserver')
8635         pkt.Request((17,271), [
8636                 rec( 10, 1, DirHandle ),
8637                 rec( 11, 1, SearchAttributes ),
8638                 rec( 12, 4, SequenceNumber ),
8639                 rec( 16, (1, 255), SearchPattern ),
8640         ], info_str=(SearchPattern, "Scan Directory Disk Space: %s", ", %s"))
8641         pkt.Reply((148), [
8642                 rec( 8, 4, SequenceNumber ),
8643                 rec( 12, 4, Subdirectory ),
8644                 rec( 16, 4, AttributesDef32 ),
8645                 rec( 20, 1, UniqueID ),
8646                 rec( 21, 1, PurgeFlags ),
8647                 rec( 22, 1, DestNameSpace ),
8648                 rec( 23, 1, NameLen ),
8649                 rec( 24, 12, Name12 ),
8650                 rec( 36, 2, CreationTime ),
8651                 rec( 38, 2, CreationDate ),
8652                 rec( 40, 4, CreatorID, BE ),
8653                 rec( 44, 2, ArchivedTime ),
8654                 rec( 46, 2, ArchivedDate ),
8655                 rec( 48, 4, ArchiverID, BE ),
8656                 rec( 52, 2, UpdateTime ),
8657                 rec( 54, 2, UpdateDate ),
8658                 rec( 56, 4, UpdateID, BE ),
8659                 rec( 60, 4, DataForkSize, BE ),
8660                 rec( 64, 4, DataForkFirstFAT, BE ),
8661                 rec( 68, 4, NextTrusteeEntry, BE ),
8662                 rec( 72, 36, Reserved36 ),
8663                 rec( 108, 2, InheritedRightsMask ),
8664                 rec( 110, 2, LastAccessedDate ),
8665                 rec( 112, 4, DeletedFileTime ),
8666                 rec( 116, 2, DeletedTime ),
8667                 rec( 118, 2, DeletedDate ),
8668                 rec( 120, 4, DeletedID, BE ),
8669                 rec( 124, 8, Undefined8 ),
8670                 rec( 132, 4, PrimaryEntry, LE ),
8671                 rec( 136, 4, NameList, LE ),
8672                 rec( 140, 4, OtherFileForkSize, BE ),
8673                 rec( 144, 4, OtherFileForkFAT, BE ),
8674         ])
8675         pkt.CompletionCodes([0x0000, 0x8900, 0x9c03, 0xfb01, 0xff00])
8676         # 2222/1629, 22/41
8677         pkt = NCP(0x1629, "Get Object Disk Usage and Restrictions", 'fileserver')
8678         pkt.Request(15, [
8679                 rec( 10, 1, VolumeNumber ),
8680                 rec( 11, 4, ObjectID, BE ),
8681         ])
8682         pkt.Reply(16, [
8683                 rec( 8, 4, Restriction ),
8684                 rec( 12, 4, InUse ),
8685         ])
8686         pkt.CompletionCodes([0x0000, 0x9802])
8687         # 2222/162A, 22/42
8688         pkt = NCP(0x162A, "Get Effective Rights for Directory Entry", 'fileserver')
8689         pkt.Request((12,266), [
8690                 rec( 10, 1, DirHandle ),
8691                 rec( 11, (1, 255), Path ),
8692         ], info_str=(Path, "Get Effective Rights: %s", ", %s"))
8693         pkt.Reply(10, [
8694                 rec( 8, 2, AccessRightsMaskWord ),
8695         ])
8696         pkt.CompletionCodes([0x0000, 0x9804, 0x9c03])
8697         # 2222/162B, 22/43
8698         pkt = NCP(0x162B, "Remove Extended Trustee from Dir or File", 'fileserver')
8699         pkt.Request((17,271), [
8700                 rec( 10, 1, DirHandle ),
8701                 rec( 11, 4, ObjectID, BE ),
8702                 rec( 15, 1, Unused ),
8703                 rec( 16, (1, 255), Path ),
8704         ], info_str=(Path, "Remove Extended Trustee from %s", ", %s"))
8705         pkt.Reply(8)
8706         pkt.CompletionCodes([0x0000, 0x9002, 0x9c03, 0xfe0f, 0xff09])
8707         # 2222/162C, 22/44
8708         pkt = NCP(0x162C, "Get Volume and Purge Information", 'file')
8709         pkt.Request( 11, [
8710                 rec( 10, 1, VolumeNumber )
8711         ],info_str=(VolumeNumber, "Get Volume and Purge Information for Volume %d", ", %d"))
8712         pkt.Reply( (38,53), [
8713                 rec( 8, 4, TotalBlocks ),
8714                 rec( 12, 4, FreeBlocks ),
8715                 rec( 16, 4, PurgeableBlocks ),
8716                 rec( 20, 4, NotYetPurgeableBlocks ),
8717                 rec( 24, 4, TotalDirectoryEntries ),
8718                 rec( 28, 4, AvailableDirEntries ),
8719                 rec( 32, 4, Reserved4 ),
8720                 rec( 36, 1, SectorsPerBlock ),
8721                 rec( 37, (1,16), VolumeNameLen ),
8722         ])
8723         pkt.CompletionCodes([0x0000])
8724         # 2222/162D, 22/45
8725         pkt = NCP(0x162D, "Get Directory Information", 'file')
8726         pkt.Request( 11, [
8727                 rec( 10, 1, DirHandle )
8728         ])
8729         pkt.Reply( (30, 45), [
8730                 rec( 8, 4, TotalBlocks ),
8731                 rec( 12, 4, AvailableBlocks ),
8732                 rec( 16, 4, TotalDirectoryEntries ),
8733                 rec( 20, 4, AvailableDirEntries ),
8734                 rec( 24, 4, Reserved4 ),
8735                 rec( 28, 1, SectorsPerBlock ),
8736                 rec( 29, (1,16), VolumeNameLen ),
8737         ])
8738         pkt.CompletionCodes([0x0000, 0x9b03])
8739         # 2222/162E, 22/46
8740         pkt = NCP(0x162E, "Rename Or Move", 'file')
8741         pkt.Request( (17,525), [
8742                 rec( 10, 1, SourceDirHandle ),
8743                 rec( 11, 1, SearchAttributes ),
8744                 rec( 12, 1, SourcePathComponentCount ),
8745                 rec( 13, (1,255), SourcePath ),
8746                 rec( -1, 1, DestDirHandle ),
8747                 rec( -1, 1, DestPathComponentCount ),
8748                 rec( -1, (1,255), DestPath ),
8749         ], info_str=(SourcePath, "Rename or Move: %s", ", %s"))
8750         pkt.Reply(8)
8751         pkt.CompletionCodes([0x0000, 0x0102, 0x8701, 0x8b00, 0x8d00, 0x8e00,
8752                              0x8f00, 0x9001, 0x9101, 0x9201, 0x9a00, 0x9b03,
8753                              0x9c03, 0xa400, 0xff17])
8754         # 2222/162F, 22/47
8755         pkt = NCP(0x162F, "Get Name Space Information", 'file')
8756         pkt.Request( 11, [
8757                 rec( 10, 1, VolumeNumber )
8758         ],info_str=(VolumeNumber, "Get Name Space Information for Volume %d", ", %d"))
8759         pkt.Reply( (15,523), [
8760                 #
8761                 # XXX - why does this not display anything at all
8762                 # if the stuff after the first IndexNumber is
8763                 # un-commented?
8764                 #
8765                 rec( 8, 1, DefinedNameSpaces, var="v" ),
8766                 rec( 9, (1,255), NameSpaceName, repeat="v" ),
8767                 rec( -1, 1, DefinedDataStreams, var="w" ),
8768                 rec( -1, (2,256), DataStreamInfo, repeat="w" ),
8769                 rec( -1, 1, LoadedNameSpaces, var="x" ),
8770                 rec( -1, 1, IndexNumber, repeat="x" ),
8771 #               rec( -1, 1, VolumeNameSpaces, var="y" ),
8772 #               rec( -1, 1, IndexNumber, repeat="y" ),
8773 #               rec( -1, 1, VolumeDataStreams, var="z" ),
8774 #               rec( -1, 1, IndexNumber, repeat="z" ),
8775         ])
8776         pkt.CompletionCodes([0x0000, 0xff00])
8777         # 2222/1630, 22/48
8778         pkt = NCP(0x1630, "Get Name Space Directory Entry", 'file')
8779         pkt.Request( 16, [
8780                 rec( 10, 1, VolumeNumber ),
8781                 rec( 11, 4, DOSSequence ),
8782                 rec( 15, 1, SrcNameSpace ),
8783         ])
8784         pkt.Reply( 112, [
8785                 rec( 8, 4, SequenceNumber ),
8786                 rec( 12, 4, Subdirectory ),
8787                 rec( 16, 4, AttributesDef32 ),
8788                 rec( 20, 1, UniqueID ),
8789                 rec( 21, 1, Flags ),
8790                 rec( 22, 1, SrcNameSpace ),
8791                 rec( 23, 1, NameLength ),
8792                 rec( 24, 12, Name12 ),
8793                 rec( 36, 2, CreationTime ),
8794                 rec( 38, 2, CreationDate ),
8795                 rec( 40, 4, CreatorID, BE ),
8796                 rec( 44, 2, ArchivedTime ),
8797                 rec( 46, 2, ArchivedDate ),
8798                 rec( 48, 4, ArchiverID ),
8799                 rec( 52, 2, UpdateTime ),
8800                 rec( 54, 2, UpdateDate ),
8801                 rec( 56, 4, UpdateID ),
8802                 rec( 60, 4, FileSize ),
8803                 rec( 64, 44, Reserved44 ),
8804                 rec( 108, 2, InheritedRightsMask ),
8805                 rec( 110, 2, LastAccessedDate ),
8806         ])
8807         pkt.CompletionCodes([0x0000, 0x8900, 0x9802, 0xbf00])
8808         # 2222/1631, 22/49
8809         pkt = NCP(0x1631, "Open Data Stream", 'file')
8810         pkt.Request( (15,269), [
8811                 rec( 10, 1, DataStream ),
8812                 rec( 11, 1, DirHandle ),
8813                 rec( 12, 1, AttributesDef ),
8814                 rec( 13, 1, OpenRights ),
8815                 rec( 14, (1, 255), FileName ),
8816         ], info_str=(FileName, "Open Data Stream: %s", ", %s"))
8817         pkt.Reply( 12, [
8818                 rec( 8, 4, CCFileHandle, BE ),
8819         ])
8820         pkt.CompletionCodes([0x0000, 0x8000, 0x8200, 0x9002, 0xbe00, 0xff00])
8821         # 2222/1632, 22/50
8822         pkt = NCP(0x1632, "Get Object Effective Rights for Directory Entry", 'file')
8823         pkt.Request( (16,270), [
8824                 rec( 10, 4, ObjectID, BE ),
8825                 rec( 14, 1, DirHandle ),
8826                 rec( 15, (1, 255), Path ),
8827         ], info_str=(Path, "Get Object Effective Rights: %s", ", %s"))
8828         pkt.Reply( 10, [
8829                 rec( 8, 2, TrusteeRights ),
8830         ])
8831         pkt.CompletionCodes([0x0000, 0x7e01, 0x9b00, 0x9c03])
8832         # 2222/1633, 22/51
8833         pkt = NCP(0x1633, "Get Extended Volume Information", 'file')
8834         pkt.Request( 11, [
8835                 rec( 10, 1, VolumeNumber ),
8836         ],info_str=(VolumeNumber, "Get Extended Volume Information for Volume %d", ", %d"))
8837         pkt.Reply( (139,266), [
8838                 rec( 8, 2, VolInfoReplyLen ),
8839                 rec( 10, 128, VolInfoStructure),
8840                 rec( 138, (1,128), VolumeNameLen ),
8841         ])
8842         pkt.CompletionCodes([0x0000, 0x7e01, 0x9804, 0xfb08, 0xff00])
8843         # 2222/1634, 22/52
8844         pkt = NCP(0x1634, "Get Mount Volume List", 'file')
8845         pkt.Request( 22, [
8846                 rec( 10, 4, StartVolumeNumber ),
8847                 rec( 14, 4, VolumeRequestFlags, LE ),
8848                 rec( 18, 4, SrcNameSpace ),
8849         ])
8850         pkt.Reply( 34, [
8851                 rec( 8, 4, ItemsInPacket, var="x" ),
8852                 rec( 12, 4, NextVolumeNumber ),
8853                 rec( 16, 18, VolumeStruct, repeat="x"),
8854         ])
8855         pkt.CompletionCodes([0x0000])
8856         # 2222/1700, 23/00
8857         pkt = NCP(0x1700, "Login User", 'file')
8858         pkt.Request( (12, 58), [
8859                 rec( 10, (1,16), UserName ),
8860                 rec( -1, (1,32), Password ),
8861         ], info_str=(UserName, "Login User: %s", ", %s"))
8862         pkt.Reply(8)
8863         pkt.CompletionCodes([0x0000, 0x9602, 0xc101, 0xc200, 0xc501, 0xd700,
8864                              0xd900, 0xda00, 0xdb00, 0xde00, 0xdf00, 0xe800,
8865                              0xec00, 0xed00, 0xef00, 0xf001, 0xf100, 0xf200,
8866                              0xf600, 0xfb00, 0xfc06, 0xfe07, 0xff00])
8867         # 2222/1701, 23/01
8868         pkt = NCP(0x1701, "Change User Password", 'file')
8869         pkt.Request( (13, 90), [
8870                 rec( 10, (1,16), UserName ),
8871                 rec( -1, (1,32), Password ),
8872                 rec( -1, (1,32), NewPassword ),
8873         ], info_str=(UserName, "Change Password for User: %s", ", %s"))
8874         pkt.Reply(8)
8875         pkt.CompletionCodes([0x0000, 0x9600, 0xd600, 0xf001, 0xf101, 0xf501,
8876                              0xfc06, 0xfe07, 0xff00])
8877         # 2222/1702, 23/02
8878         pkt = NCP(0x1702, "Get User Connection List", 'file')
8879         pkt.Request( (11, 26), [
8880                 rec( 10, (1,16), UserName ),
8881         ], info_str=(UserName, "Get User Connection: %s", ", %s"))
8882         pkt.Reply( (9, 136), [
8883                 rec( 8, (1, 128), ConnectionNumberList ),
8884         ])
8885         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
8886         # 2222/1703, 23/03
8887         pkt = NCP(0x1703, "Get User Number", 'file')
8888         pkt.Request( (11, 26), [
8889                 rec( 10, (1,16), UserName ),
8890         ], info_str=(UserName, "Get User Number: %s", ", %s"))
8891         pkt.Reply( 12, [
8892                 rec( 8, 4, ObjectID, BE ),
8893         ])
8894         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
8895         # 2222/1705, 23/05
8896         pkt = NCP(0x1705, "Get Station's Logged Info", 'file')
8897         pkt.Request( 11, [
8898                 rec( 10, 1, TargetConnectionNumber ),
8899         ],info_str=(TargetConnectionNumber, "Get Station's Logged Information on Connection %d", ", %d")) 
8900         pkt.Reply( 266, [
8901                 rec( 8, 16, UserName16 ),
8902                 rec( 24, 7, LoginTime ),
8903                 rec( 31, 39, FullName ),
8904                 rec( 70, 4, UserID, BE ),
8905                 rec( 74, 128, SecurityEquivalentList ),
8906                 rec( 202, 64, Reserved64 ),
8907         ])
8908         pkt.CompletionCodes([0x0000, 0x9602, 0xfc06, 0xfd00, 0xfe07, 0xff00])
8909         # 2222/1707, 23/07
8910         pkt = NCP(0x1707, "Get Group Number", 'file')
8911         pkt.Request( 14, [
8912                 rec( 10, 4, ObjectID, BE ),
8913         ])
8914         pkt.Reply( 62, [
8915                 rec( 8, 4, ObjectID, BE ),
8916                 rec( 12, 2, ObjectType, BE ),
8917                 rec( 14, 48, ObjectNameLen ),
8918         ])
8919         pkt.CompletionCodes([0x0000, 0x9602, 0xf101, 0xfc06, 0xfe07, 0xff00])
8920         # 2222/170C, 23/12
8921         pkt = NCP(0x170C, "Verify Serialization", 'file')
8922         pkt.Request( 14, [
8923                 rec( 10, 4, ServerSerialNumber ),
8924         ])
8925         pkt.Reply(8)
8926         pkt.CompletionCodes([0x0000, 0xff00])
8927         # 2222/170D, 23/13
8928         pkt = NCP(0x170D, "Log Network Message", 'file')
8929         pkt.Request( (11, 68), [
8930                 rec( 10, (1, 58), TargetMessage ),
8931         ], info_str=(TargetMessage, "Log Network Message: %s", ", %s"))
8932         pkt.Reply(8)
8933         pkt.CompletionCodes([0x0000, 0x8000, 0x8100, 0x8800, 0x8d00, 0x8e00, 0x8f00,
8934                              0x9001, 0x9400, 0x9600, 0x9804, 0x9900, 0x9b00, 0xa100,
8935                              0xa201, 0xff00])
8936         # 2222/170E, 23/14
8937         pkt = NCP(0x170E, "Get Disk Utilization", 'file')
8938         pkt.Request( 15, [
8939                 rec( 10, 1, VolumeNumber ),
8940                 rec( 11, 4, TrusteeID, BE ),
8941         ])
8942         pkt.Reply( 19, [
8943                 rec( 8, 1, VolumeNumber ),
8944                 rec( 9, 4, TrusteeID, BE ),
8945                 rec( 13, 2, DirectoryCount, BE ),
8946                 rec( 15, 2, FileCount, BE ),
8947                 rec( 17, 2, ClusterCount, BE ),
8948         ])
8949         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0xa100, 0xf200])
8950         # 2222/170F, 23/15
8951         pkt = NCP(0x170F, "Scan File Information", 'file')
8952         pkt.Request((15,269), [
8953                 rec( 10, 2, LastSearchIndex ),
8954                 rec( 12, 1, DirHandle ),
8955                 rec( 13, 1, SearchAttributes ),
8956                 rec( 14, (1, 255), FileName ),
8957         ], info_str=(FileName, "Scan File Information: %s", ", %s"))
8958         pkt.Reply( 102, [
8959                 rec( 8, 2, NextSearchIndex ),
8960                 rec( 10, 14, FileName14 ),
8961                 rec( 24, 2, AttributesDef16 ),
8962                 rec( 26, 4, FileSize, BE ),
8963                 rec( 30, 2, CreationDate, BE ),
8964                 rec( 32, 2, LastAccessedDate, BE ),
8965                 rec( 34, 2, ModifiedDate, BE ),
8966                 rec( 36, 2, ModifiedTime, BE ),
8967                 rec( 38, 4, CreatorID, BE ),
8968                 rec( 42, 2, ArchivedDate, BE ),
8969                 rec( 44, 2, ArchivedTime, BE ),
8970                 rec( 46, 56, Reserved56 ),
8971         ])
8972         pkt.CompletionCodes([0x0000, 0x8800, 0x8900, 0x9300, 0x9400, 0x9804, 0x9b00, 0x9c00,
8973                              0xa100, 0xfd00, 0xff17])
8974         # 2222/1710, 23/16
8975         pkt = NCP(0x1710, "Set File Information", 'file')
8976         pkt.Request((91,345), [
8977                 rec( 10, 2, AttributesDef16 ),
8978                 rec( 12, 4, FileSize, BE ),
8979                 rec( 16, 2, CreationDate, BE ),
8980                 rec( 18, 2, LastAccessedDate, BE ),
8981                 rec( 20, 2, ModifiedDate, BE ),
8982                 rec( 22, 2, ModifiedTime, BE ),
8983                 rec( 24, 4, CreatorID, BE ),
8984                 rec( 28, 2, ArchivedDate, BE ),
8985                 rec( 30, 2, ArchivedTime, BE ),
8986                 rec( 32, 56, Reserved56 ),
8987                 rec( 88, 1, DirHandle ),
8988                 rec( 89, 1, SearchAttributes ),
8989                 rec( 90, (1, 255), FileName ),
8990         ], info_str=(FileName, "Set Information for File: %s", ", %s"))
8991         pkt.Reply(8)
8992         pkt.CompletionCodes([0x0000, 0x8800, 0x8c00, 0x8e00, 0x9400, 0x9600, 0x9804,
8993                              0x9b03, 0x9c00, 0xa100, 0xa201, 0xfc06, 0xfd00, 0xfe07,
8994                              0xff17])
8995         # 2222/1711, 23/17
8996         pkt = NCP(0x1711, "Get File Server Information", 'fileserver')
8997         pkt.Request(10)
8998         pkt.Reply(136, [
8999                 rec( 8, 48, ServerName ),
9000                 rec( 56, 1, OSMajorVersion ),
9001                 rec( 57, 1, OSMinorVersion ),
9002                 rec( 58, 2, ConnectionsSupportedMax, BE ),
9003                 rec( 60, 2, ConnectionsInUse, BE ),
9004                 rec( 62, 2, VolumesSupportedMax, BE ),
9005                 rec( 64, 1, OSRevision ),
9006                 rec( 65, 1, SFTSupportLevel ),
9007                 rec( 66, 1, TTSLevel ),
9008                 rec( 67, 2, ConnectionsMaxUsed, BE ),
9009                 rec( 69, 1, AccountVersion ),
9010                 rec( 70, 1, VAPVersion ),
9011                 rec( 71, 1, QueueingVersion ),
9012                 rec( 72, 1, PrintServerVersion ),
9013                 rec( 73, 1, VirtualConsoleVersion ),
9014                 rec( 74, 1, SecurityRestrictionVersion ),
9015                 rec( 75, 1, InternetBridgeVersion ),
9016                 rec( 76, 1, MixedModePathFlag ),
9017                 rec( 77, 1, LocalLoginInfoCcode ),
9018                 rec( 78, 2, ProductMajorVersion, BE ),
9019                 rec( 80, 2, ProductMinorVersion, BE ),
9020                 rec( 82, 2, ProductRevisionVersion, BE ),
9021                 rec( 84, 1, OSLanguageID, LE ),
9022                 rec( 85, 51, Reserved51 ),
9023         ])
9024         pkt.CompletionCodes([0x0000, 0x9600])
9025         # 2222/1712, 23/18
9026         pkt = NCP(0x1712, "Get Network Serial Number", 'fileserver')
9027         pkt.Request(10)
9028         pkt.Reply(14, [
9029                 rec( 8, 4, ServerSerialNumber ),
9030                 rec( 12, 2, ApplicationNumber ),
9031         ])
9032         pkt.CompletionCodes([0x0000, 0x9600])
9033         # 2222/1713, 23/19
9034         pkt = NCP(0x1713, "Get Internet Address", 'fileserver')
9035         pkt.Request(11, [
9036                 rec( 10, 1, TargetConnectionNumber ),
9037         ],info_str=(TargetConnectionNumber, "Get Internet Address for Connection %d", ", %d"))
9038         pkt.Reply(20, [
9039                 rec( 8, 4, NetworkAddress, BE ),
9040                 rec( 12, 6, NetworkNodeAddress ),
9041                 rec( 18, 2, NetworkSocket, BE ),
9042         ])
9043         pkt.CompletionCodes([0x0000, 0xff00])
9044         # 2222/1714, 23/20
9045         pkt = NCP(0x1714, "Login Object", 'file')
9046         pkt.Request( (14, 60), [
9047                 rec( 10, 2, ObjectType, BE ),
9048                 rec( 12, (1,16), ClientName ),
9049                 rec( -1, (1,32), Password ),
9050         ], info_str=(UserName, "Login Object: %s", ", %s"))
9051         pkt.Reply(8)
9052         pkt.CompletionCodes([0x0000, 0x9602, 0xc101, 0xc200, 0xc501, 0xd600, 0xd700,
9053                              0xd900, 0xda00, 0xdb00, 0xde00, 0xdf00, 0xe800, 0xec00,
9054                              0xed00, 0xef00, 0xf001, 0xf100, 0xf200, 0xf600, 0xfb00,
9055                              0xfc06, 0xfe07, 0xff00])
9056         # 2222/1715, 23/21
9057         pkt = NCP(0x1715, "Get Object Connection List", 'file')
9058         pkt.Request( (13, 28), [
9059                 rec( 10, 2, ObjectType, BE ),
9060                 rec( 12, (1,16), ObjectName ),
9061         ], info_str=(UserName, "Get Object Connection List: %s", ", %s"))
9062         pkt.Reply( (9, 136), [
9063                 rec( 8, (1, 128), ConnectionNumberList ),
9064         ])
9065         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
9066         # 2222/1716, 23/22
9067         pkt = NCP(0x1716, "Get Station's Logged Info", 'file')
9068         pkt.Request( 11, [
9069                 rec( 10, 1, TargetConnectionNumber ),
9070         ])
9071         pkt.Reply( 70, [
9072                 rec( 8, 4, UserID, BE ),
9073                 rec( 12, 2, ObjectType, BE ),
9074                 rec( 14, 48, ObjectNameLen ),
9075                 rec( 62, 7, LoginTime ),       
9076                 rec( 69, 1, Reserved ),
9077         ])
9078         pkt.CompletionCodes([0x0000, 0x9602, 0xfb0a, 0xfc06, 0xfd00, 0xfe07, 0xff00])
9079         # 2222/1717, 23/23
9080         pkt = NCP(0x1717, "Get Login Key", 'file')
9081         pkt.Request(10)
9082         pkt.Reply( 16, [
9083                 rec( 8, 8, LoginKey ),
9084         ])
9085         pkt.CompletionCodes([0x0000, 0x9602])
9086         # 2222/1718, 23/24
9087         pkt = NCP(0x1718, "Keyed Object Login", 'file')
9088         pkt.Request( (21, 68), [
9089                 rec( 10, 8, LoginKey ),
9090                 rec( 18, 2, ObjectType, BE ),
9091                 rec( 20, (1,48), ObjectName ),
9092         ], info_str=(ObjectName, "Keyed Object Login: %s", ", %s"))
9093         pkt.Reply(8)
9094         pkt.CompletionCodes([0x0000, 0x9602, 0xc101, 0xc200, 0xc500, 0xd900, 0xda00,
9095                              0xdb00, 0xdc00, 0xde00, 0xff00])
9096         # 2222/171A, 23/26
9097         #
9098         # XXX - for NCP-over-IP, the NetworkAddress field appears to be
9099         # an IP address, rather than an IPX network address, and should
9100         # be dissected as an FT_IPv4 value; the NetworkNodeAddress and
9101         # NetworkSocket are 0.
9102         #
9103         # For NCP-over-IPX, it should probably be dissected as an
9104         # FT_IPXNET value.
9105         #
9106         pkt = NCP(0x171A, "Get Internet Address", 'fileserver')
9107         pkt.Request(11, [
9108                 rec( 10, 1, TargetConnectionNumber ),
9109         ])
9110         pkt.Reply(21, [
9111                 rec( 8, 4, NetworkAddress, BE ),
9112                 rec( 12, 6, NetworkNodeAddress ),
9113                 rec( 18, 2, NetworkSocket, BE ),
9114                 rec( 20, 1, ConnectionType ),
9115         ])
9116         pkt.CompletionCodes([0x0000])
9117         # 2222/171B, 23/27
9118         pkt = NCP(0x171B, "Get Object Connection List", 'file')
9119         pkt.Request( (17,64), [
9120                 rec( 10, 4, SearchConnNumber ),
9121                 rec( 14, 2, ObjectType, BE ),
9122                 rec( 16, (1,48), ObjectName ),
9123         ], info_str=(ObjectName, "Get Object Connection List: %s", ", %s"))
9124         pkt.Reply( (10,137), [
9125                 rec( 8, 1, ConnListLen, var="x" ),
9126                 rec( 9, (1,128), ConnectionNumberList, repeat="x" ),
9127         ])
9128         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
9129         # 2222/171C, 23/28
9130         pkt = NCP(0x171C, "Get Station's Logged Info", 'file')
9131         pkt.Request( 14, [
9132                 rec( 10, 4, TargetConnectionNumber ),
9133         ])
9134         pkt.Reply( 70, [
9135                 rec( 8, 4, UserID, BE ),
9136                 rec( 12, 2, ObjectType, BE ),
9137                 rec( 14, 48, ObjectNameLen ),
9138                 rec( 62, 7, LoginTime ),
9139                 rec( 69, 1, Reserved ),
9140         ])
9141         pkt.CompletionCodes([0x0000, 0x9602, 0xfb02, 0xfc06, 0xfd00, 0xfe07, 0xff00])
9142         # 2222/171D, 23/29
9143         pkt = NCP(0x171D, "Change Connection State", 'file')
9144         pkt.Request( 11, [
9145                 rec( 10, 1, RequestCode ),
9146         ])
9147         pkt.Reply(8)
9148         pkt.CompletionCodes([0x0000, 0x0109, 0x7a00, 0x7b00, 0x7c00, 0xe000, 0xfb06, 0xfd00])
9149         # 2222/171E, 23/30
9150         pkt = NCP(0x171E, "Set Watchdog Delay Interval", 'file')
9151         pkt.Request( 14, [
9152                 rec( 10, 4, NumberOfMinutesToDelay ),
9153         ])
9154         pkt.Reply(8)
9155         pkt.CompletionCodes([0x0000, 0x0107])
9156         # 2222/171F, 23/31
9157         pkt = NCP(0x171F, "Get Connection List From Object", 'file')
9158         pkt.Request( 18, [
9159                 rec( 10, 4, ObjectID, BE ),
9160                 rec( 14, 4, ConnectionNumber ),
9161         ])
9162         pkt.Reply( (9, 136), [
9163                 rec( 8, (1, 128), ConnectionNumberList ),
9164         ])
9165         pkt.CompletionCodes([0x0000, 0x9600, 0xf001, 0xfc06, 0xfe07, 0xff00])
9166         # 2222/1720, 23/32
9167         pkt = NCP(0x1720, "Scan Bindery Object (List)", 'bindery')
9168         pkt.Request((23,70), [
9169                 rec( 10, 4, NextObjectID, BE ),
9170                 rec( 14, 4, ObjectType, BE ),
9171                 rec( 18, 4, InfoFlags ),
9172                 rec( 22, (1,48), ObjectName ),
9173         ], info_str=(ObjectName, "Scan Bindery Object: %s", ", %s"))
9174         pkt.Reply(NO_LENGTH_CHECK, [
9175                 rec( 8, 4, ObjectInfoReturnCount ),
9176                 rec( 12, 4, NextObjectID, BE ),
9177                 rec( 16, 4, ObjectIDInfo ),
9178                 srec(ObjectTypeStruct, req_cond="ncp.info_flags_type == TRUE"),
9179                 srec(ObjectSecurityStruct, req_cond="ncp.info_flags_security == TRUE"),
9180                 srec(ObjectFlagsStruct, req_cond="ncp.info_flags_flags == TRUE"),
9181                 srec(ObjectNameStruct, req_cond="ncp.info_flags_name == TRUE"),
9182         ])
9183         pkt.ReqCondSizeVariable()
9184         pkt.CompletionCodes([0x0000, 0x9600, 0xef01, 0xfc02, 0xfe01, 0xff00])
9185         # 2222/1721, 23/33
9186         pkt = NCP(0x1721, "Generate GUIDs", 'nds')
9187         pkt.Request( 14, [
9188                 rec( 10, 4, ReturnInfoCount ),
9189         ])
9190         pkt.Reply(28, [
9191                 rec( 8, 4, ReturnInfoCount, var="x" ),
9192                 rec( 12, 16, GUID, repeat="x" ),
9193         ])
9194         pkt.CompletionCodes([0x0000])
9195         # 2222/1732, 23/50
9196         pkt = NCP(0x1732, "Create Bindery Object", 'bindery')
9197         pkt.Request( (15,62), [
9198                 rec( 10, 1, ObjectFlags ),
9199                 rec( 11, 1, ObjectSecurity ),
9200                 rec( 12, 2, ObjectType, BE ),
9201                 rec( 14, (1,48), ObjectName ),
9202         ], info_str=(ObjectName, "Create Bindery Object: %s", ", %s"))
9203         pkt.Reply(8)
9204         pkt.CompletionCodes([0x0000, 0x9600, 0xe700, 0xee00, 0xef00, 0xf101, 0xf501,
9205                              0xfc06, 0xfe07, 0xff00])
9206         # 2222/1733, 23/51
9207         pkt = NCP(0x1733, "Delete Bindery Object", 'bindery')
9208         pkt.Request( (13,60), [
9209                 rec( 10, 2, ObjectType, BE ),
9210                 rec( 12, (1,48), ObjectName ),
9211         ], info_str=(ObjectName, "Delete Bindery Object: %s", ", %s"))
9212         pkt.Reply(8)
9213         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf200, 0xf400, 0xf600, 0xfb00,
9214                              0xfc06, 0xfe07, 0xff00])
9215         # 2222/1734, 23/52
9216         pkt = NCP(0x1734, "Rename Bindery Object", 'bindery')
9217         pkt.Request( (14,108), [
9218                 rec( 10, 2, ObjectType, BE ),
9219                 rec( 12, (1,48), ObjectName ),
9220                 rec( -1, (1,48), NewObjectName ),
9221         ], info_str=(ObjectName, "Rename Bindery Object: %s", ", %s"))
9222         pkt.Reply(8)
9223         pkt.CompletionCodes([0x0000, 0x9600, 0xee00, 0xf000, 0xf300, 0xfc06, 0xfe07, 0xff00])
9224         # 2222/1735, 23/53
9225         pkt = NCP(0x1735, "Get Bindery Object ID", 'bindery')
9226         pkt.Request((13,60), [
9227                 rec( 10, 2, ObjectType, BE ),
9228                 rec( 12, (1,48), ObjectName ),
9229         ], info_str=(ObjectName, "Get Bindery Object: %s", ", %s"))
9230         pkt.Reply(62, [
9231                 rec( 8, 4, ObjectID, BE ),
9232                 rec( 12, 2, ObjectType, BE ),
9233                 rec( 14, 48, ObjectNameLen ),
9234         ])
9235         pkt.CompletionCodes([0x0000, 0x9600, 0xef01, 0xf000, 0xfc02, 0xfe01, 0xff00])
9236         # 2222/1736, 23/54
9237         pkt = NCP(0x1736, "Get Bindery Object Name", 'bindery')
9238         pkt.Request( 14, [
9239                 rec( 10, 4, ObjectID, BE ),
9240         ])
9241         pkt.Reply( 62, [
9242                 rec( 8, 4, ObjectID, BE ),
9243                 rec( 12, 2, ObjectType, BE ),
9244                 rec( 14, 48, ObjectNameLen ),
9245         ])
9246         pkt.CompletionCodes([0x0000, 0x9600, 0xf101, 0xfc02, 0xfe01, 0xff00])
9247         # 2222/1737, 23/55
9248         pkt = NCP(0x1737, "Scan Bindery Object", 'bindery')
9249         pkt.Request((17,64), [
9250                 rec( 10, 4, ObjectID, BE ),
9251                 rec( 14, 2, ObjectType, BE ),
9252                 rec( 16, (1,48), ObjectName ),
9253         ], info_str=(ObjectName, "Scan Bindery Object: %s", ", %s"))
9254         pkt.Reply(65, [
9255                 rec( 8, 4, ObjectID, BE ),
9256                 rec( 12, 2, ObjectType, BE ),
9257                 rec( 14, 48, ObjectNameLen ),
9258                 rec( 62, 1, ObjectFlags ),
9259                 rec( 63, 1, ObjectSecurity ),
9260                 rec( 64, 1, ObjectHasProperties ),
9261         ])
9262         pkt.CompletionCodes([0x0000, 0x9600, 0xef01, 0xfc02,
9263                              0xfe01, 0xff00])
9264         # 2222/1738, 23/56
9265         pkt = NCP(0x1738, "Change Bindery Object Security", 'bindery')
9266         pkt.Request((14,61), [
9267                 rec( 10, 1, ObjectSecurity ),
9268                 rec( 11, 2, ObjectType, BE ),
9269                 rec( 13, (1,48), ObjectName ),
9270         ], info_str=(ObjectName, "Change Bindery Object Security: %s", ", %s"))
9271         pkt.Reply(8)
9272         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf501, 0xfc02, 0xfe01, 0xff00])
9273         # 2222/1739, 23/57
9274         pkt = NCP(0x1739, "Create Property", 'bindery')
9275         pkt.Request((16,78), [
9276                 rec( 10, 2, ObjectType, BE ),
9277                 rec( 12, (1,48), ObjectName ),
9278                 rec( -1, 1, PropertyType ),
9279                 rec( -1, 1, ObjectSecurity ),
9280                 rec( -1, (1,16), PropertyName ),
9281         ], info_str=(PropertyName, "Create Property: %s", ", %s"))
9282         pkt.Reply(8)
9283         pkt.CompletionCodes([0x0000, 0x9600, 0xed00, 0xef00, 0xf000, 0xf101,
9284                              0xf200, 0xf600, 0xf700, 0xfb00, 0xfc02, 0xfe01,
9285                              0xff00])
9286         # 2222/173A, 23/58
9287         pkt = NCP(0x173A, "Delete Property", 'bindery')
9288         pkt.Request((14,76), [
9289                 rec( 10, 2, ObjectType, BE ),
9290                 rec( 12, (1,48), ObjectName ),
9291                 rec( -1, (1,16), PropertyName ),
9292         ], info_str=(PropertyName, "Delete Property: %s", ", %s"))
9293         pkt.Reply(8)
9294         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf600, 0xfb00, 0xfc02,
9295                              0xfe01, 0xff00])
9296         # 2222/173B, 23/59
9297         pkt = NCP(0x173B, "Change Property Security", 'bindery')
9298         pkt.Request((15,77), [
9299                 rec( 10, 2, ObjectType, BE ),
9300                 rec( 12, (1,48), ObjectName ),
9301                 rec( -1, 1, ObjectSecurity ),
9302                 rec( -1, (1,16), PropertyName ),
9303         ], info_str=(PropertyName, "Change Property Security: %s", ", %s"))
9304         pkt.Reply(8)
9305         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf200, 0xf600, 0xfb00,
9306                              0xfc02, 0xfe01, 0xff00])
9307         # 2222/173C, 23/60
9308         pkt = NCP(0x173C, "Scan Property", 'bindery')
9309         pkt.Request((18,80), [
9310                 rec( 10, 2, ObjectType, BE ),
9311                 rec( 12, (1,48), ObjectName ),
9312                 rec( -1, 4, LastInstance, BE ),
9313                 rec( -1, (1,16), PropertyName ),
9314         ], info_str=(PropertyName, "Scan Property: %s", ", %s"))
9315         pkt.Reply( 32, [
9316                 rec( 8, 16, PropertyName16 ),
9317                 rec( 24, 1, ObjectFlags ),
9318                 rec( 25, 1, ObjectSecurity ),
9319                 rec( 26, 4, SearchInstance, BE ),
9320                 rec( 30, 1, ValueAvailable ),
9321                 rec( 31, 1, MoreProperties ),
9322         ])
9323         pkt.CompletionCodes([0x0000, 0x9600, 0xf000, 0xf101, 0xf200, 0xf600, 0xfb00,
9324                              0xfc02, 0xfe01, 0xff00])
9325         # 2222/173D, 23/61
9326         pkt = NCP(0x173D, "Read Property Value", 'bindery')
9327         pkt.Request((15,77), [
9328                 rec( 10, 2, ObjectType, BE ),
9329                 rec( 12, (1,48), ObjectName ),
9330                 rec( -1, 1, PropertySegment ),
9331                 rec( -1, (1,16), PropertyName ),
9332         ], info_str=(PropertyName, "Read Property Value: %s", ", %s"))
9333         pkt.Reply(138, [
9334                 rec( 8, 128, PropertyData ),
9335                 rec( 136, 1, PropertyHasMoreSegments ),
9336                 rec( 137, 1, PropertyType ),
9337         ])
9338         pkt.CompletionCodes([0x0000, 0x8800, 0x9300, 0x9600, 0xec01,
9339                              0xf000, 0xf100, 0xf900, 0xfb02, 0xfc02,
9340                              0xfe01, 0xff00])
9341         # 2222/173E, 23/62
9342         pkt = NCP(0x173E, "Write Property Value", 'bindery')
9343         pkt.Request((144,206), [
9344                 rec( 10, 2, ObjectType, BE ),
9345                 rec( 12, (1,48), ObjectName ),
9346                 rec( -1, 1, PropertySegment ),
9347                 rec( -1, 1, MoreFlag ),
9348                 rec( -1, (1,16), PropertyName ),
9349                 #
9350                 # XXX - don't show this if MoreFlag isn't set?
9351                 # In at least some packages where it's not set,
9352                 # PropertyValue appears to be garbage.
9353                 #
9354                 rec( -1, 128, PropertyValue ),
9355         ], info_str=(PropertyName, "Write Property Value: %s", ", %s"))
9356         pkt.Reply(8)
9357         pkt.CompletionCodes([0x0000, 0x9600, 0xe800, 0xec01, 0xf000, 0xf800,
9358                              0xfb02, 0xfc03, 0xfe01, 0xff00 ])
9359         # 2222/173F, 23/63
9360         pkt = NCP(0x173F, "Verify Bindery Object Password", 'bindery')
9361         pkt.Request((14,92), [
9362                 rec( 10, 2, ObjectType, BE ),
9363                 rec( 12, (1,48), ObjectName ),
9364                 rec( -1, (1,32), Password ),
9365         ], info_str=(ObjectName, "Verify Bindery Object Password: %s", ", %s"))
9366         pkt.Reply(8)
9367         pkt.CompletionCodes([0x0000, 0x9600, 0xe800, 0xec01, 0xf000, 0xf101,
9368                              0xfb02, 0xfc03, 0xfe01, 0xff00 ])
9369         # 2222/1740, 23/64
9370         pkt = NCP(0x1740, "Change Bindery Object Password", 'bindery')
9371         pkt.Request((15,124), [
9372                 rec( 10, 2, ObjectType, BE ),
9373                 rec( 12, (1,48), ObjectName ),
9374                 rec( -1, (1,32), Password ),
9375                 rec( -1, (1,32), NewPassword ),
9376         ], info_str=(ObjectName, "Change Bindery Object Password: %s", ", %s"))
9377         pkt.Reply(8)
9378         pkt.CompletionCodes([0x0000, 0x9600, 0xc501, 0xd701, 0xe800, 0xec01, 0xf001,
9379                              0xf100, 0xf800, 0xfb02, 0xfc03, 0xfe01, 0xff00])
9380         # 2222/1741, 23/65
9381         pkt = NCP(0x1741, "Add Bindery Object To Set", 'bindery')
9382         pkt.Request((17,126), [
9383                 rec( 10, 2, ObjectType, BE ),
9384                 rec( 12, (1,48), ObjectName ),
9385                 rec( -1, (1,16), PropertyName ),
9386                 rec( -1, 2, MemberType, BE ),
9387                 rec( -1, (1,48), MemberName ),
9388         ], info_str=(MemberName, "Add Bindery Object to Set: %s", ", %s"))
9389         pkt.Reply(8)
9390         pkt.CompletionCodes([0x0000, 0x9600, 0xe800, 0xe900, 0xea00, 0xeb00,
9391                              0xec01, 0xf000, 0xf800, 0xfb02, 0xfc03, 0xfe01,
9392                              0xff00])
9393         # 2222/1742, 23/66
9394         pkt = NCP(0x1742, "Delete Bindery Object From Set", 'bindery')
9395         pkt.Request((17,126), [
9396                 rec( 10, 2, ObjectType, BE ),
9397                 rec( 12, (1,48), ObjectName ),
9398                 rec( -1, (1,16), PropertyName ),
9399                 rec( -1, 2, MemberType, BE ),
9400                 rec( -1, (1,48), MemberName ),
9401         ], info_str=(MemberName, "Delete Bindery Object from Set: %s", ", %s"))
9402         pkt.Reply(8)
9403         pkt.CompletionCodes([0x0000, 0x9600, 0xeb00, 0xf000, 0xf800, 0xfb02,
9404                              0xfc03, 0xfe01, 0xff00])
9405         # 2222/1743, 23/67
9406         pkt = NCP(0x1743, "Is Bindery Object In Set", 'bindery')
9407         pkt.Request((17,126), [
9408                 rec( 10, 2, ObjectType, BE ),
9409                 rec( 12, (1,48), ObjectName ),
9410                 rec( -1, (1,16), PropertyName ),
9411                 rec( -1, 2, MemberType, BE ),
9412                 rec( -1, (1,48), MemberName ),
9413         ], info_str=(MemberName, "Is Bindery Object in Set: %s", ", %s"))
9414         pkt.Reply(8)
9415         pkt.CompletionCodes([0x0000, 0x9600, 0xea00, 0xeb00, 0xec01, 0xf000,
9416                              0xfb02, 0xfc03, 0xfe01, 0xff00])
9417         # 2222/1744, 23/68
9418         pkt = NCP(0x1744, "Close Bindery", 'bindery')
9419         pkt.Request(10)
9420         pkt.Reply(8)
9421         pkt.CompletionCodes([0x0000, 0xff00])
9422         # 2222/1745, 23/69
9423         pkt = NCP(0x1745, "Open Bindery", 'bindery')
9424         pkt.Request(10)
9425         pkt.Reply(8)
9426         pkt.CompletionCodes([0x0000, 0xff00])
9427         # 2222/1746, 23/70
9428         pkt = NCP(0x1746, "Get Bindery Access Level", 'bindery')
9429         pkt.Request(10)
9430         pkt.Reply(13, [
9431                 rec( 8, 1, ObjectSecurity ),
9432                 rec( 9, 4, LoggedObjectID, BE ),
9433         ])
9434         pkt.CompletionCodes([0x0000, 0x9600])
9435         # 2222/1747, 23/71
9436         pkt = NCP(0x1747, "Scan Bindery Object Trustee Paths", 'bindery')
9437         pkt.Request(17, [
9438                 rec( 10, 1, VolumeNumber ),
9439                 rec( 11, 2, LastSequenceNumber, BE ),
9440                 rec( 13, 4, ObjectID, BE ),
9441         ])
9442         pkt.Reply((16,270), [
9443                 rec( 8, 2, LastSequenceNumber, BE),
9444                 rec( 10, 4, ObjectID, BE ),
9445                 rec( 14, 1, ObjectSecurity ),
9446                 rec( 15, (1,255), Path ),
9447         ])
9448         pkt.CompletionCodes([0x0000, 0x9300, 0x9600, 0xa100, 0xf000, 0xf100,
9449                              0xf200, 0xfc02, 0xfe01, 0xff00])
9450         # 2222/1748, 23/72
9451         pkt = NCP(0x1748, "Get Bindery Object Access Level", 'bindery')
9452         pkt.Request(14, [
9453                 rec( 10, 4, ObjectID, BE ),
9454         ])
9455         pkt.Reply(9, [
9456                 rec( 8, 1, ObjectSecurity ),
9457         ])
9458         pkt.CompletionCodes([0x0000, 0x9600])
9459         # 2222/1749, 23/73
9460         pkt = NCP(0x1749, "Is Calling Station a Manager", 'bindery')
9461         pkt.Request(10)
9462         pkt.Reply(8)
9463         pkt.CompletionCodes([0x0003, 0xff1e])
9464         # 2222/174A, 23/74
9465         pkt = NCP(0x174A, "Keyed Verify Password", 'bindery')
9466         pkt.Request((21,68), [
9467                 rec( 10, 8, LoginKey ),
9468                 rec( 18, 2, ObjectType, BE ),
9469                 rec( 20, (1,48), ObjectName ),
9470         ], info_str=(ObjectName, "Keyed Verify Password: %s", ", %s"))
9471         pkt.Reply(8)
9472         pkt.CompletionCodes([0x0000, 0xc500, 0xfe01, 0xff0c])
9473         # 2222/174B, 23/75
9474         pkt = NCP(0x174B, "Keyed Change Password", 'bindery')
9475         pkt.Request((22,100), [
9476                 rec( 10, 8, LoginKey ),
9477                 rec( 18, 2, ObjectType, BE ),
9478                 rec( 20, (1,48), ObjectName ),
9479                 rec( -1, (1,32), Password ),
9480         ], info_str=(ObjectName, "Keyed Change Password: %s", ", %s"))
9481         pkt.Reply(8)
9482         pkt.CompletionCodes([0x0000, 0xc500, 0xfe01, 0xff0c])
9483         # 2222/174C, 23/76
9484         pkt = NCP(0x174C, "List Relations Of an Object", 'bindery')
9485         pkt.Request((18,80), [
9486                 rec( 10, 4, LastSeen, BE ),
9487                 rec( 14, 2, ObjectType, BE ),
9488                 rec( 16, (1,48), ObjectName ),
9489                 rec( -1, (1,16), PropertyName ),
9490         ], info_str=(ObjectName, "List Relations of an Object: %s", ", %s"))
9491         pkt.Reply(14, [
9492                 rec( 8, 2, RelationsCount, BE, var="x" ),
9493                 rec( 10, 4, ObjectID, BE, repeat="x" ),
9494         ])
9495         pkt.CompletionCodes([0x0000, 0xf000, 0xf200, 0xfe01, 0xff00])
9496         # 2222/1764, 23/100
9497         pkt = NCP(0x1764, "Create Queue", 'qms')
9498         pkt.Request((15,316), [
9499                 rec( 10, 2, QueueType, BE ),
9500                 rec( 12, (1,48), QueueName ),
9501                 rec( -1, 1, PathBase ),
9502                 rec( -1, (1,255), Path ),
9503         ], info_str=(QueueName, "Create Queue: %s", ", %s"))
9504         pkt.Reply(12, [
9505                 rec( 8, 4, QueueID ),
9506         ])
9507         pkt.CompletionCodes([0x0000, 0x9600, 0x9900, 0xd000, 0xd100,
9508                              0xd200, 0xd300, 0xd400, 0xd500, 0xd601,
9509                              0xd703, 0xd800, 0xd902, 0xda01, 0xdb02,
9510                              0xee00, 0xff00])
9511         # 2222/1765, 23/101
9512         pkt = NCP(0x1765, "Destroy Queue", 'qms')
9513         pkt.Request(14, [
9514                 rec( 10, 4, QueueID ),
9515         ])
9516         pkt.Reply(8)
9517         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9518                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9519                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9520         # 2222/1766, 23/102
9521         pkt = NCP(0x1766, "Read Queue Current Status", 'qms')
9522         pkt.Request(14, [
9523                 rec( 10, 4, QueueID ),
9524         ])
9525         pkt.Reply(20, [
9526                 rec( 8, 4, QueueID ),
9527                 rec( 12, 1, QueueStatus ),
9528                 rec( 13, 1, CurrentEntries ),
9529                 rec( 14, 1, CurrentServers, var="x" ),
9530                 rec( 15, 4, ServerIDList, repeat="x" ),
9531                 rec( 19, 1, ServerStationList, repeat="x" ),
9532         ])
9533         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9534                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9535                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9536         # 2222/1767, 23/103
9537         pkt = NCP(0x1767, "Set Queue Current Status", 'qms')
9538         pkt.Request(15, [
9539                 rec( 10, 4, QueueID ),
9540                 rec( 14, 1, QueueStatus ),
9541         ])
9542         pkt.Reply(8)
9543         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9544                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9545                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07,
9546                              0xff00])
9547         # 2222/1768, 23/104
9548         pkt = NCP(0x1768, "Create Queue Job And File", 'qms')
9549         pkt.Request(264, [
9550                 rec( 10, 4, QueueID ),
9551                 rec( 14, 250, JobStruct ),
9552         ])
9553         pkt.Reply(62, [
9554                 rec( 8, 1, ClientStation ),
9555                 rec( 9, 1, ClientTaskNumber ),
9556                 rec( 10, 4, ClientIDNumber, BE ),
9557                 rec( 14, 4, TargetServerIDNumber, BE ),
9558                 rec( 18, 6, TargetExecutionTime ),
9559                 rec( 24, 6, JobEntryTime ),
9560                 rec( 30, 2, JobNumber, BE ),
9561                 rec( 32, 2, JobType, BE ),
9562                 rec( 34, 1, JobPosition ),
9563                 rec( 35, 1, JobControlFlags ),
9564                 rec( 36, 14, JobFileName ),
9565                 rec( 50, 6, JobFileHandle ),
9566                 rec( 56, 1, ServerStation ),
9567                 rec( 57, 1, ServerTaskNumber ),
9568                 rec( 58, 4, ServerID, BE ),
9569         ])              
9570         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9571                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9572                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07,
9573                              0xff00])
9574         # 2222/1769, 23/105
9575         pkt = NCP(0x1769, "Close File And Start Queue Job", 'qms')
9576         pkt.Request(16, [
9577                 rec( 10, 4, QueueID ),
9578                 rec( 14, 2, JobNumber, BE ),
9579         ])
9580         pkt.Reply(8)
9581         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9582                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9583                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9584         # 2222/176A, 23/106
9585         pkt = NCP(0x176A, "Remove Job From Queue", 'qms')
9586         pkt.Request(16, [
9587                 rec( 10, 4, QueueID ),
9588                 rec( 14, 2, JobNumber, BE ),
9589         ])
9590         pkt.Reply(8)
9591         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9592                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9593                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9594         # 2222/176B, 23/107
9595         pkt = NCP(0x176B, "Get Queue Job List", 'qms')
9596         pkt.Request(14, [
9597                 rec( 10, 4, QueueID ),
9598         ])
9599         pkt.Reply(12, [
9600                 rec( 8, 2, JobCount, BE, var="x" ),
9601                 rec( 10, 2, JobNumber, BE, repeat="x" ),
9602         ])
9603         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9604                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9605                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9606         # 2222/176C, 23/108
9607         pkt = NCP(0x176C, "Read Queue Job Entry", 'qms')
9608         pkt.Request(16, [
9609                 rec( 10, 4, QueueID ),
9610                 rec( 14, 2, JobNumber, BE ),
9611         ])
9612         pkt.Reply(258, [
9613             rec( 8, 250, JobStruct ),
9614         ])              
9615         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9616                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9617                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9618         # 2222/176D, 23/109
9619         pkt = NCP(0x176D, "Change Queue Job Entry", 'qms')
9620         pkt.Request(260, [
9621             rec( 14, 250, JobStruct ),
9622         ])
9623         pkt.Reply(8)            
9624         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9625                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9626                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9627         # 2222/176E, 23/110
9628         pkt = NCP(0x176E, "Change Queue Job Position", 'qms')
9629         pkt.Request(17, [
9630                 rec( 10, 4, QueueID ),
9631                 rec( 14, 2, JobNumber, BE ),
9632                 rec( 16, 1, NewPosition ),
9633         ])
9634         pkt.Reply(8)
9635         pkt.CompletionCodes([0x0000, 0x9600, 0xd000, 0xd100, 0xd500,
9636                              0xd601, 0xfe07, 0xff1f])
9637         # 2222/176F, 23/111
9638         pkt = NCP(0x176F, "Attach Queue Server To Queue", 'qms')
9639         pkt.Request(14, [
9640                 rec( 10, 4, QueueID ),
9641         ])
9642         pkt.Reply(8)
9643         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9644                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9645                              0xd800, 0xd902, 0xda01, 0xdb02, 0xea00,
9646                              0xfc06, 0xff00])
9647         # 2222/1770, 23/112
9648         pkt = NCP(0x1770, "Detach Queue Server From Queue", 'qms')
9649         pkt.Request(14, [
9650                 rec( 10, 4, QueueID ),
9651         ])
9652         pkt.Reply(8)
9653         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9654                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9655                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9656         # 2222/1771, 23/113
9657         pkt = NCP(0x1771, "Service Queue Job", 'qms')
9658         pkt.Request(16, [
9659                 rec( 10, 4, QueueID ),
9660                 rec( 14, 2, ServiceType, BE ),
9661         ])
9662         pkt.Reply(62, [
9663                 rec( 8, 1, ClientStation ),
9664                 rec( 9, 1, ClientTaskNumber ),
9665                 rec( 10, 4, ClientIDNumber, BE ),
9666                 rec( 14, 4, TargetServerIDNumber, BE ),
9667                 rec( 18, 6, TargetExecutionTime ),
9668                 rec( 24, 6, JobEntryTime ),
9669                 rec( 30, 2, JobNumber, BE ),
9670                 rec( 32, 2, JobType, BE ),
9671                 rec( 34, 1, JobPosition ),
9672                 rec( 35, 1, JobControlFlags ),
9673                 rec( 36, 14, JobFileName ),
9674                 rec( 50, 6, JobFileHandle ),
9675                 rec( 56, 1, ServerStation ),
9676                 rec( 57, 1, ServerTaskNumber ),
9677                 rec( 58, 4, ServerID, BE ),
9678         ])              
9679         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9680                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9681                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9682         # 2222/1772, 23/114
9683         pkt = NCP(0x1772, "Finish Servicing Queue Job", 'qms')
9684         pkt.Request(20, [
9685                 rec( 10, 4, QueueID ),
9686                 rec( 14, 2, JobNumber, BE ),
9687                 rec( 16, 4, ChargeInformation, BE ),
9688         ])
9689         pkt.Reply(8)            
9690         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9691                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9692                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9693         # 2222/1773, 23/115
9694         pkt = NCP(0x1773, "Abort Servicing Queue Job", 'qms')
9695         pkt.Request(16, [
9696                 rec( 10, 4, QueueID ),
9697                 rec( 14, 2, JobNumber, BE ),
9698         ])
9699         pkt.Reply(8)            
9700         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9701                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9702                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9703         # 2222/1774, 23/116
9704         pkt = NCP(0x1774, "Change To Client Rights", 'qms')
9705         pkt.Request(16, [
9706                 rec( 10, 4, QueueID ),
9707                 rec( 14, 2, JobNumber, BE ),
9708         ])
9709         pkt.Reply(8)            
9710         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9711                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9712                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9713         # 2222/1775, 23/117
9714         pkt = NCP(0x1775, "Restore Queue Server Rights", 'qms')
9715         pkt.Request(10)
9716         pkt.Reply(8)            
9717         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9718                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9719                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9720         # 2222/1776, 23/118
9721         pkt = NCP(0x1776, "Read Queue Server Current Status", 'qms')
9722         pkt.Request(19, [
9723                 rec( 10, 4, QueueID ),
9724                 rec( 14, 4, ServerID, BE ),
9725                 rec( 18, 1, ServerStation ),
9726         ])
9727         pkt.Reply(72, [
9728                 rec( 8, 64, ServerStatusRecord ),
9729         ])
9730         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9731                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9732                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9733         # 2222/1777, 23/119
9734         pkt = NCP(0x1777, "Set Queue Server Current Status", 'qms')
9735         pkt.Request(78, [
9736                 rec( 10, 4, QueueID ),
9737                 rec( 14, 64, ServerStatusRecord ),
9738         ])
9739         pkt.Reply(8)
9740         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9741                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9742                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9743         # 2222/1778, 23/120
9744         pkt = NCP(0x1778, "Get Queue Job File Size", 'qms')
9745         pkt.Request(16, [
9746                 rec( 10, 4, QueueID ),
9747                 rec( 14, 2, JobNumber, BE ),
9748         ])
9749         pkt.Reply(20, [
9750                 rec( 8, 4, QueueID ),
9751                 rec( 12, 4, JobNumberLong ),
9752                 rec( 16, 4, FileSize, BE ),
9753         ])
9754         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9755                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9756                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9757         # 2222/1779, 23/121
9758         pkt = NCP(0x1779, "Create Queue Job And File", 'qms')
9759         pkt.Request(264, [
9760                 rec( 10, 4, QueueID ),
9761                 rec( 14, 250, JobStruct ),
9762         ])
9763         pkt.Reply(94, [
9764                 rec( 8, 86, JobStructNew ),
9765         ])              
9766         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9767                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9768                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9769         # 2222/177A, 23/122
9770         pkt = NCP(0x177A, "Read Queue Job Entry", 'qms')
9771         pkt.Request(18, [
9772                 rec( 10, 4, QueueID ),
9773                 rec( 14, 4, JobNumberLong ),
9774         ])
9775         pkt.Reply(258, [
9776             rec( 8, 250, JobStruct ),
9777         ])              
9778         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9779                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9780                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9781         # 2222/177B, 23/123
9782         pkt = NCP(0x177B, "Change Queue Job Entry", 'qms')
9783         pkt.Request(264, [
9784                 rec( 10, 4, QueueID ),
9785                 rec( 14, 250, JobStruct ),
9786         ])
9787         pkt.Reply(8)            
9788         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9789                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9790                              0xd800, 0xd902, 0xda01, 0xdb02, 0xfc07, 0xff00])
9791         # 2222/177C, 23/124
9792         pkt = NCP(0x177C, "Service Queue Job", 'qms')
9793         pkt.Request(16, [
9794                 rec( 10, 4, QueueID ),
9795                 rec( 14, 2, ServiceType ),
9796         ])
9797         pkt.Reply(94, [
9798             rec( 8, 86, JobStructNew ),
9799         ])              
9800         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9801                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9802                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9803         # 2222/177D, 23/125
9804         pkt = NCP(0x177D, "Read Queue Current Status", 'qms')
9805         pkt.Request(14, [
9806                 rec( 10, 4, QueueID ),
9807         ])
9808         pkt.Reply(32, [
9809                 rec( 8, 4, QueueID ),
9810                 rec( 12, 1, QueueStatus ),
9811                 rec( 13, 3, Reserved3 ),
9812                 rec( 16, 4, CurrentEntries ),
9813                 rec( 20, 4, CurrentServers, var="x" ),
9814                 rec( 24, 4, ServerIDList, repeat="x" ),
9815                 rec( 28, 4, ServerStationList, repeat="x" ),
9816         ])
9817         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9818                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9819                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9820         # 2222/177E, 23/126
9821         pkt = NCP(0x177E, "Set Queue Current Status", 'qms')
9822         pkt.Request(15, [
9823                 rec( 10, 4, QueueID ),
9824                 rec( 14, 1, QueueStatus ),
9825         ])
9826         pkt.Reply(8)
9827         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9828                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9829                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9830         # 2222/177F, 23/127
9831         pkt = NCP(0x177F, "Close File And Start Queue Job", 'qms')
9832         pkt.Request(18, [
9833                 rec( 10, 4, QueueID ),
9834                 rec( 14, 4, JobNumberLong ),
9835         ])
9836         pkt.Reply(8)
9837         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9838                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9839                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9840         # 2222/1780, 23/128
9841         pkt = NCP(0x1780, "Remove Job From Queue", 'qms')
9842         pkt.Request(18, [
9843                 rec( 10, 4, QueueID ),
9844                 rec( 14, 4, JobNumberLong ),
9845         ])
9846         pkt.Reply(8)
9847         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9848                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9849                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9850         # 2222/1781, 23/129
9851         pkt = NCP(0x1781, "Get Queue Job List", 'qms')
9852         pkt.Request(18, [
9853                 rec( 10, 4, QueueID ),
9854                 rec( 14, 4, JobNumberLong ),
9855         ])
9856         pkt.Reply(20, [
9857                 rec( 8, 4, TotalQueueJobs ),
9858                 rec( 12, 4, ReplyQueueJobNumbers, var="x" ),
9859                 rec( 16, 4, JobNumberList, repeat="x" ),
9860         ])
9861         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9862                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9863                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9864         # 2222/1782, 23/130
9865         pkt = NCP(0x1782, "Change Job Priority", 'qms')
9866         pkt.Request(22, [
9867                 rec( 10, 4, QueueID ),
9868                 rec( 14, 4, JobNumberLong ),
9869                 rec( 18, 4, Priority ),
9870         ])
9871         pkt.Reply(8)
9872         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9873                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9874                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9875         # 2222/1783, 23/131
9876         pkt = NCP(0x1783, "Finish Servicing Queue Job", 'qms')
9877         pkt.Request(22, [
9878                 rec( 10, 4, QueueID ),
9879                 rec( 14, 4, JobNumberLong ),
9880                 rec( 18, 4, ChargeInformation ),
9881         ])
9882         pkt.Reply(8)            
9883         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9884                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9885                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9886         # 2222/1784, 23/132
9887         pkt = NCP(0x1784, "Abort Servicing Queue Job", 'qms')
9888         pkt.Request(18, [
9889                 rec( 10, 4, QueueID ),
9890                 rec( 14, 4, JobNumberLong ),
9891         ])
9892         pkt.Reply(8)            
9893         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9894                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9895                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9896         # 2222/1785, 23/133
9897         pkt = NCP(0x1785, "Change To Client Rights", 'qms')
9898         pkt.Request(18, [
9899                 rec( 10, 4, QueueID ),
9900                 rec( 14, 4, JobNumberLong ),
9901         ])
9902         pkt.Reply(8)            
9903         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9904                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9905                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff18])
9906         # 2222/1786, 23/134
9907         pkt = NCP(0x1786, "Read Queue Server Current Status", 'qms')
9908         pkt.Request(22, [
9909                 rec( 10, 4, QueueID ),
9910                 rec( 14, 4, ServerID, BE ),
9911                 rec( 18, 4, ServerStation ),
9912         ])
9913         pkt.Reply(72, [
9914                 rec( 8, 64, ServerStatusRecord ),
9915         ])
9916         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9917                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9918                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9919         # 2222/1787, 23/135
9920         pkt = NCP(0x1787, "Get Queue Job File Size", 'qms')
9921         pkt.Request(18, [
9922                 rec( 10, 4, QueueID ),
9923                 rec( 14, 4, JobNumberLong ),
9924         ])
9925         pkt.Reply(20, [
9926                 rec( 8, 4, QueueID ),
9927                 rec( 12, 4, JobNumberLong ),
9928                 rec( 16, 4, FileSize, BE ),
9929         ])
9930         pkt.CompletionCodes([0x0000, 0x9900, 0xd000, 0xd100, 0xd200,
9931                              0xd300, 0xd400, 0xd500, 0xd601, 0xd703,
9932                              0xd800, 0xd902, 0xda01, 0xdb02, 0xff00])
9933         # 2222/1788, 23/136
9934         pkt = NCP(0x1788, "Move Queue Job From Src Q to Dst Q", 'qms')
9935         pkt.Request(22, [
9936                 rec( 10, 4, QueueID ),
9937                 rec( 14, 4, JobNumberLong ),
9938                 rec( 18, 4, DstQueueID ),
9939         ])
9940         pkt.Reply(12, [
9941                 rec( 8, 4, JobNumberLong ),
9942         ])
9943         pkt.CompletionCodes([0x0000, 0x7e01, 0xfc06])
9944         # 2222/1789, 23/137
9945         pkt = NCP(0x1789, "Get Queue Jobs From Form List", 'qms')
9946         pkt.Request(24, [
9947                 rec( 10, 4, QueueID ),
9948                 rec( 14, 4, QueueStartPosition ),
9949                 rec( 18, 4, FormTypeCnt, var="x" ),
9950                 rec( 22, 2, FormType, repeat="x" ),
9951         ])
9952         pkt.Reply(20, [
9953                 rec( 8, 4, TotalQueueJobs ),
9954                 rec( 12, 4, JobCount, var="x" ),
9955                 rec( 16, 4, JobNumberList, repeat="x" ),
9956         ])
9957         pkt.CompletionCodes([0x0000, 0x7e01, 0xfc06])
9958         # 2222/178A, 23/138
9959         pkt = NCP(0x178A, "Service Queue Job By Form List", 'qms')
9960         pkt.Request(24, [
9961                 rec( 10, 4, QueueID ),
9962                 rec( 14, 4, QueueStartPosition ),
9963                 rec( 18, 4, FormTypeCnt, var= "x" ),
9964                 rec( 22, 2, FormType, repeat="x" ),
9965         ])
9966         pkt.Reply(94, [
9967            rec( 8, 86, JobStructNew ),
9968         ])              
9969         pkt.CompletionCodes([0x0000, 0x7e01, 0xfc06])
9970         # 2222/1796, 23/150
9971         pkt = NCP(0x1796, "Get Current Account Status", 'accounting')
9972         pkt.Request((13,60), [
9973                 rec( 10, 2, ObjectType, BE ),
9974                 rec( 12, (1,48), ObjectName ),
9975         ], info_str=(ObjectName, "Get Current Account Status: %s", ", %s"))
9976         pkt.Reply(264, [
9977                 rec( 8, 4, AccountBalance, BE ),
9978                 rec( 12, 4, CreditLimit, BE ),
9979                 rec( 16, 120, Reserved120 ),
9980                 rec( 136, 4, HolderID, BE ),
9981                 rec( 140, 4, HoldAmount, BE ),
9982                 rec( 144, 4, HolderID, BE ),
9983                 rec( 148, 4, HoldAmount, BE ),
9984                 rec( 152, 4, HolderID, BE ),
9985                 rec( 156, 4, HoldAmount, BE ),
9986                 rec( 160, 4, HolderID, BE ),
9987                 rec( 164, 4, HoldAmount, BE ),
9988                 rec( 168, 4, HolderID, BE ),
9989                 rec( 172, 4, HoldAmount, BE ),
9990                 rec( 176, 4, HolderID, BE ),
9991                 rec( 180, 4, HoldAmount, BE ),
9992                 rec( 184, 4, HolderID, BE ),
9993                 rec( 188, 4, HoldAmount, BE ),
9994                 rec( 192, 4, HolderID, BE ),
9995                 rec( 196, 4, HoldAmount, BE ),
9996                 rec( 200, 4, HolderID, BE ),
9997                 rec( 204, 4, HoldAmount, BE ),
9998                 rec( 208, 4, HolderID, BE ),
9999                 rec( 212, 4, HoldAmount, BE ),
10000                 rec( 216, 4, HolderID, BE ),
10001                 rec( 220, 4, HoldAmount, BE ),
10002                 rec( 224, 4, HolderID, BE ),
10003                 rec( 228, 4, HoldAmount, BE ),
10004                 rec( 232, 4, HolderID, BE ),
10005                 rec( 236, 4, HoldAmount, BE ),
10006                 rec( 240, 4, HolderID, BE ),
10007                 rec( 244, 4, HoldAmount, BE ),
10008                 rec( 248, 4, HolderID, BE ),
10009                 rec( 252, 4, HoldAmount, BE ),
10010                 rec( 256, 4, HolderID, BE ),
10011                 rec( 260, 4, HoldAmount, BE ),
10012         ])              
10013         pkt.CompletionCodes([0x0000, 0x9600, 0xc000, 0xc101, 0xc400, 0xe800,
10014                              0xea00, 0xeb00, 0xec00, 0xfc06, 0xfe07, 0xff00])
10015         # 2222/1797, 23/151
10016         pkt = NCP(0x1797, "Submit Account Charge", 'accounting')
10017         pkt.Request((26,327), [
10018                 rec( 10, 2, ServiceType, BE ),
10019                 rec( 12, 4, ChargeAmount, BE ),
10020                 rec( 16, 4, HoldCancelAmount, BE ),
10021                 rec( 20, 2, ObjectType, BE ),
10022                 rec( 22, 2, CommentType, BE ),
10023                 rec( 24, (1,48), ObjectName ),
10024                 rec( -1, (1,255), Comment ),
10025         ], info_str=(ObjectName, "Submit Account Charge: %s", ", %s"))
10026         pkt.Reply(8)            
10027         pkt.CompletionCodes([0x0000, 0x0102, 0x8800, 0x9400, 0x9600, 0xa201,
10028                              0xc000, 0xc101, 0xc200, 0xc400, 0xe800, 0xea00,
10029                              0xeb00, 0xec00, 0xfe07, 0xff00])
10030         # 2222/1798, 23/152
10031         pkt = NCP(0x1798, "Submit Account Hold", 'accounting')
10032         pkt.Request((17,64), [
10033                 rec( 10, 4, HoldCancelAmount, BE ),
10034                 rec( 14, 2, ObjectType, BE ),
10035                 rec( 16, (1,48), ObjectName ),
10036         ], info_str=(ObjectName, "Submit Account Hold: %s", ", %s"))
10037         pkt.Reply(8)            
10038         pkt.CompletionCodes([0x0000, 0x0102, 0x8800, 0x9400, 0x9600, 0xa201,
10039                              0xc000, 0xc101, 0xc200, 0xc400, 0xe800, 0xea00,
10040                              0xeb00, 0xec00, 0xfe07, 0xff00])
10041         # 2222/1799, 23/153
10042         pkt = NCP(0x1799, "Submit Account Note", 'accounting')
10043         pkt.Request((18,319), [
10044                 rec( 10, 2, ServiceType, BE ),
10045                 rec( 12, 2, ObjectType, BE ),
10046                 rec( 14, 2, CommentType, BE ),
10047                 rec( 16, (1,48), ObjectName ),
10048                 rec( -1, (1,255), Comment ),
10049         ], info_str=(ObjectName, "Submit Account Note: %s", ", %s"))
10050         pkt.Reply(8)            
10051         pkt.CompletionCodes([0x0000, 0x0102, 0x9600, 0xc000, 0xc101, 0xc400,
10052                              0xe800, 0xea00, 0xeb00, 0xec00, 0xf000, 0xfc06,
10053                              0xff00])
10054         # 2222/17c8, 23/200
10055         pkt = NCP(0x17c8, "Check Console Privileges", 'stats')
10056         pkt.Request(10)
10057         pkt.Reply(8)            
10058         pkt.CompletionCodes([0x0000, 0xc601])
10059         # 2222/17c9, 23/201
10060         pkt = NCP(0x17c9, "Get File Server Description Strings", 'stats')
10061         pkt.Request(10)
10062         pkt.Reply(520, [
10063                 rec( 8, 512, DescriptionStrings ),
10064         ])
10065         pkt.CompletionCodes([0x0000, 0x9600])
10066         # 2222/17CA, 23/202
10067         pkt = NCP(0x17CA, "Set File Server Date And Time", 'stats')
10068         pkt.Request(16, [
10069                 rec( 10, 1, Year ),
10070                 rec( 11, 1, Month ),
10071                 rec( 12, 1, Day ),
10072                 rec( 13, 1, Hour ),
10073                 rec( 14, 1, Minute ),
10074                 rec( 15, 1, Second ),
10075         ])
10076         pkt.Reply(8)
10077         pkt.CompletionCodes([0x0000, 0xc601])
10078         # 2222/17CB, 23/203
10079         pkt = NCP(0x17CB, "Disable File Server Login", 'stats')
10080         pkt.Request(10)
10081         pkt.Reply(8)
10082         pkt.CompletionCodes([0x0000, 0xc601])
10083         # 2222/17CC, 23/204
10084         pkt = NCP(0x17CC, "Enable File Server Login", 'stats')
10085         pkt.Request(10)
10086         pkt.Reply(8)
10087         pkt.CompletionCodes([0x0000, 0xc601])
10088         # 2222/17CD, 23/205
10089         pkt = NCP(0x17CD, "Get File Server Login Status", 'stats')
10090         pkt.Request(10)
10091         pkt.Reply(12, [
10092                 rec( 8, 4, UserLoginAllowed ),
10093         ])
10094         pkt.CompletionCodes([0x0000, 0x9600, 0xfb01])
10095         # 2222/17CF, 23/207
10096         pkt = NCP(0x17CF, "Disable Transaction Tracking", 'stats')
10097         pkt.Request(10)
10098         pkt.Reply(8)
10099         pkt.CompletionCodes([0x0000, 0xc601])
10100         # 2222/17D0, 23/208
10101         pkt = NCP(0x17D0, "Enable Transaction Tracking", 'stats')
10102         pkt.Request(10)
10103         pkt.Reply(8)
10104         pkt.CompletionCodes([0x0000, 0xc601])
10105         # 2222/17D1, 23/209
10106         pkt = NCP(0x17D1, "Send Console Broadcast", 'stats')
10107         pkt.Request((13,267), [
10108                 rec( 10, 1, NumberOfStations, var="x" ),
10109                 rec( 11, 1, StationList, repeat="x" ),
10110                 rec( 12, (1, 255), TargetMessage ),
10111         ], info_str=(TargetMessage, "Send Console Broadcast: %s", ", %s"))
10112         pkt.Reply(8)
10113         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10114         # 2222/17D2, 23/210
10115         pkt = NCP(0x17D2, "Clear Connection Number", 'stats')
10116         pkt.Request(11, [
10117                 rec( 10, 1, ConnectionNumber ),
10118         ],info_str=(ConnectionNumber, "Clear Connection Number %d", ", %d"))
10119         pkt.Reply(8)
10120         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10121         # 2222/17D3, 23/211
10122         pkt = NCP(0x17D3, "Down File Server", 'stats')
10123         pkt.Request(11, [
10124                 rec( 10, 1, ForceFlag ),
10125         ])
10126         pkt.Reply(8)
10127         pkt.CompletionCodes([0x0000, 0xc601, 0xff00])
10128         # 2222/17D4, 23/212
10129         pkt = NCP(0x17D4, "Get File System Statistics", 'stats')
10130         pkt.Request(10)
10131         pkt.Reply(50, [
10132                 rec( 8, 4, SystemIntervalMarker, BE ),
10133                 rec( 12, 2, ConfiguredMaxOpenFiles ),
10134                 rec( 14, 2, ActualMaxOpenFiles ),
10135                 rec( 16, 2, CurrentOpenFiles ),
10136                 rec( 18, 4, TotalFilesOpened ),
10137                 rec( 22, 4, TotalReadRequests ),
10138                 rec( 26, 4, TotalWriteRequests ),
10139                 rec( 30, 2, CurrentChangedFATs ),
10140                 rec( 32, 4, TotalChangedFATs ),
10141                 rec( 36, 2, FATWriteErrors ),
10142                 rec( 38, 2, FatalFATWriteErrors ),
10143                 rec( 40, 2, FATScanErrors ),
10144                 rec( 42, 2, ActualMaxIndexedFiles ),
10145                 rec( 44, 2, ActiveIndexedFiles ),
10146                 rec( 46, 2, AttachedIndexedFiles ),
10147                 rec( 48, 2, AvailableIndexedFiles ),
10148         ])
10149         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10150         # 2222/17D5, 23/213
10151         pkt = NCP(0x17D5, "Get Transaction Tracking Statistics", 'stats')
10152         pkt.Request((13,267), [
10153                 rec( 10, 2, LastRecordSeen ),
10154                 rec( 12, (1,255), SemaphoreName ),
10155         ])
10156         pkt.Reply(53, [
10157                 rec( 8, 4, SystemIntervalMarker, BE ),
10158                 rec( 12, 1, TransactionTrackingSupported ),
10159                 rec( 13, 1, TransactionTrackingEnabled ),
10160                 rec( 14, 2, TransactionVolumeNumber ),
10161                 rec( 16, 2, ConfiguredMaxSimultaneousTransactions ),
10162                 rec( 18, 2, ActualMaxSimultaneousTransactions ),
10163                 rec( 20, 2, CurrentTransactionCount ),
10164                 rec( 22, 4, TotalTransactionsPerformed ),
10165                 rec( 26, 4, TotalWriteTransactionsPerformed ),
10166                 rec( 30, 4, TotalTransactionsBackedOut ),
10167                 rec( 34, 2, TotalUnfilledBackoutRequests ),
10168                 rec( 36, 2, TransactionDiskSpace ),
10169                 rec( 38, 4, TransactionFATAllocations ),
10170                 rec( 42, 4, TransactionFileSizeChanges ),
10171                 rec( 46, 4, TransactionFilesTruncated ),
10172                 rec( 50, 1, NumberOfEntries, var="x" ),
10173                 rec( 51, 2, ConnTaskStruct, repeat="x" ),
10174         ])
10175         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10176         # 2222/17D6, 23/214
10177         pkt = NCP(0x17D6, "Read Disk Cache Statistics", 'stats')
10178         pkt.Request(10)
10179         pkt.Reply(86, [
10180                 rec( 8, 4, SystemIntervalMarker, BE ),
10181                 rec( 12, 2, CacheBufferCount ),
10182                 rec( 14, 2, CacheBufferSize ),
10183                 rec( 16, 2, DirtyCacheBuffers ),
10184                 rec( 18, 4, CacheReadRequests ),
10185                 rec( 22, 4, CacheWriteRequests ),
10186                 rec( 26, 4, CacheHits ),
10187                 rec( 30, 4, CacheMisses ),
10188                 rec( 34, 4, PhysicalReadRequests ),
10189                 rec( 38, 4, PhysicalWriteRequests ),
10190                 rec( 42, 2, PhysicalReadErrors ),
10191                 rec( 44, 2, PhysicalWriteErrors ),
10192                 rec( 46, 4, CacheGetRequests ),
10193                 rec( 50, 4, CacheFullWriteRequests ),
10194                 rec( 54, 4, CachePartialWriteRequests ),
10195                 rec( 58, 4, BackgroundDirtyWrites ),
10196                 rec( 62, 4, BackgroundAgedWrites ),
10197                 rec( 66, 4, TotalCacheWrites ),
10198                 rec( 70, 4, CacheAllocations ),
10199                 rec( 74, 2, ThrashingCount ),
10200                 rec( 76, 2, LRUBlockWasDirty ),
10201                 rec( 78, 2, ReadBeyondWrite ),
10202                 rec( 80, 2, FragmentWriteOccurred ),
10203                 rec( 82, 2, CacheHitOnUnavailableBlock ),
10204                 rec( 84, 2, CacheBlockScrapped ),
10205         ])
10206         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10207         # 2222/17D7, 23/215
10208         pkt = NCP(0x17D7, "Get Drive Mapping Table", 'stats')
10209         pkt.Request(10)
10210         pkt.Reply(184, [
10211                 rec( 8, 4, SystemIntervalMarker, BE ),
10212                 rec( 12, 1, SFTSupportLevel ),
10213                 rec( 13, 1, LogicalDriveCount ),
10214                 rec( 14, 1, PhysicalDriveCount ),
10215                 rec( 15, 1, DiskChannelTable ),
10216                 rec( 16, 4, Reserved4 ),
10217                 rec( 20, 2, PendingIOCommands, BE ),
10218                 rec( 22, 32, DriveMappingTable ),
10219                 rec( 54, 32, DriveMirrorTable ),
10220                 rec( 86, 32, DeadMirrorTable ),
10221                 rec( 118, 1, ReMirrorDriveNumber ),
10222                 rec( 119, 1, Filler ),
10223                 rec( 120, 4, ReMirrorCurrentOffset, BE ),
10224                 rec( 124, 60, SFTErrorTable ),
10225         ])
10226         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10227         # 2222/17D8, 23/216
10228         pkt = NCP(0x17D8, "Read Physical Disk Statistics", 'stats')
10229         pkt.Request(11, [
10230                 rec( 10, 1, PhysicalDiskNumber ),
10231         ])
10232         pkt.Reply(101, [
10233                 rec( 8, 4, SystemIntervalMarker, BE ),
10234                 rec( 12, 1, PhysicalDiskChannel ),
10235                 rec( 13, 1, DriveRemovableFlag ),
10236                 rec( 14, 1, PhysicalDriveType ),
10237                 rec( 15, 1, ControllerDriveNumber ),
10238                 rec( 16, 1, ControllerNumber ),
10239                 rec( 17, 1, ControllerType ),
10240                 rec( 18, 4, DriveSize ),
10241                 rec( 22, 2, DriveCylinders ),
10242                 rec( 24, 1, DriveHeads ),
10243                 rec( 25, 1, SectorsPerTrack ),
10244                 rec( 26, 64, DriveDefinitionString ),
10245                 rec( 90, 2, IOErrorCount ),
10246                 rec( 92, 4, HotFixTableStart ),
10247                 rec( 96, 2, HotFixTableSize ),
10248                 rec( 98, 2, HotFixBlocksAvailable ),
10249                 rec( 100, 1, HotFixDisabled ),
10250         ])
10251         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10252         # 2222/17D9, 23/217
10253         pkt = NCP(0x17D9, "Get Disk Channel Statistics", 'stats')
10254         pkt.Request(11, [
10255                 rec( 10, 1, DiskChannelNumber ),
10256         ])
10257         pkt.Reply(192, [
10258                 rec( 8, 4, SystemIntervalMarker, BE ),
10259                 rec( 12, 2, ChannelState, BE ),
10260                 rec( 14, 2, ChannelSynchronizationState, BE ),
10261                 rec( 16, 1, SoftwareDriverType ),
10262                 rec( 17, 1, SoftwareMajorVersionNumber ),
10263                 rec( 18, 1, SoftwareMinorVersionNumber ),
10264                 rec( 19, 65, SoftwareDescription ),
10265                 rec( 84, 8, IOAddressesUsed ),
10266                 rec( 92, 10, SharedMemoryAddresses ),
10267                 rec( 102, 4, InterruptNumbersUsed ),
10268                 rec( 106, 4, DMAChannelsUsed ),
10269                 rec( 110, 1, FlagBits ),
10270                 rec( 111, 1, Reserved ),
10271                 rec( 112, 80, ConfigurationDescription ),
10272         ])
10273         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10274         # 2222/17DB, 23/219
10275         pkt = NCP(0x17DB, "Get Connection's Open Files", 'file')
10276         pkt.Request(14, [
10277                 rec( 10, 2, ConnectionNumber ),
10278                 rec( 12, 2, LastRecordSeen, BE ),
10279         ])
10280         pkt.Reply(32, [
10281                 rec( 8, 2, NextRequestRecord ),
10282                 rec( 10, 1, NumberOfRecords, var="x" ),
10283                 rec( 11, 21, ConnStruct, repeat="x" ),
10284         ])
10285         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10286         # 2222/17DC, 23/220
10287         pkt = NCP(0x17DC, "Get Connection Using A File", 'file')
10288         pkt.Request((14,268), [
10289                 rec( 10, 2, LastRecordSeen, BE ),
10290                 rec( 12, 1, DirHandle ),
10291                 rec( 13, (1,255), Path ),
10292         ], info_str=(Path, "Get Connection Using File: %s", ", %s"))
10293         pkt.Reply(30, [
10294                 rec( 8, 2, UseCount, BE ),
10295                 rec( 10, 2, OpenCount, BE ),
10296                 rec( 12, 2, OpenForReadCount, BE ),
10297                 rec( 14, 2, OpenForWriteCount, BE ),
10298                 rec( 16, 2, DenyReadCount, BE ),
10299                 rec( 18, 2, DenyWriteCount, BE ),
10300                 rec( 20, 2, NextRequestRecord, BE ),
10301                 rec( 22, 1, Locked ),
10302                 rec( 23, 1, NumberOfRecords, var="x" ),
10303                 rec( 24, 6, ConnFileStruct, repeat="x" ),
10304         ])
10305         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10306         # 2222/17DD, 23/221
10307         pkt = NCP(0x17DD, "Get Physical Record Locks By Connection And File", 'file')
10308         pkt.Request(31, [
10309                 rec( 10, 2, TargetConnectionNumber ),
10310                 rec( 12, 2, LastRecordSeen, BE ),
10311                 rec( 14, 1, VolumeNumber ),
10312                 rec( 15, 2, DirectoryID ),
10313                 rec( 17, 14, FileName14 ),
10314         ], info_str=(FileName14, "Get Physical Record Locks by Connection and File: %s", ", %s"))
10315         pkt.Reply(22, [
10316                 rec( 8, 2, NextRequestRecord ),
10317                 rec( 10, 1, NumberOfLocks, var="x" ),
10318                 rec( 11, 1, Reserved ),
10319                 rec( 12, 10, LockStruct, repeat="x" ),
10320         ])
10321         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10322         # 2222/17DE, 23/222
10323         pkt = NCP(0x17DE, "Get Physical Record Locks By File", 'file')
10324         pkt.Request((14,268), [
10325                 rec( 10, 2, TargetConnectionNumber ),
10326                 rec( 12, 1, DirHandle ),
10327                 rec( 13, (1,255), Path ),
10328         ], info_str=(Path, "Get Physical Record Locks by File: %s", ", %s"))
10329         pkt.Reply(28, [
10330                 rec( 8, 2, NextRequestRecord ),
10331                 rec( 10, 1, NumberOfLocks, var="x" ),
10332                 rec( 11, 1, Reserved ),
10333                 rec( 12, 16, PhyLockStruct, repeat="x" ),
10334         ])
10335         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10336         # 2222/17DF, 23/223
10337         pkt = NCP(0x17DF, "Get Logical Records By Connection", 'file')
10338         pkt.Request(14, [
10339                 rec( 10, 2, TargetConnectionNumber ),
10340                 rec( 12, 2, LastRecordSeen, BE ),
10341         ])
10342         pkt.Reply((14,268), [
10343                 rec( 8, 2, NextRequestRecord ),
10344                 rec( 10, 1, NumberOfRecords, var="x" ),
10345                 rec( 11, (3, 257), LogLockStruct, repeat="x" ),
10346         ])
10347         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10348         # 2222/17E0, 23/224
10349         pkt = NCP(0x17E0, "Get Logical Record Information", 'file')
10350         pkt.Request((13,267), [
10351                 rec( 10, 2, LastRecordSeen ),
10352                 rec( 12, (1,255), LogicalRecordName ),
10353         ], info_str=(LogicalRecordName, "Get Logical Record Information: %s", ", %s"))
10354         pkt.Reply(20, [
10355                 rec( 8, 2, UseCount, BE ),
10356                 rec( 10, 2, ShareableLockCount, BE ),
10357                 rec( 12, 2, NextRequestRecord ),
10358                 rec( 14, 1, Locked ),
10359                 rec( 15, 1, NumberOfRecords, var="x" ),
10360                 rec( 16, 4, LogRecStruct, repeat="x" ),
10361         ])
10362         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10363         # 2222/17E1, 23/225
10364         pkt = NCP(0x17E1, "Get Connection's Semaphores", 'file')
10365         pkt.Request(14, [
10366                 rec( 10, 2, ConnectionNumber ),
10367                 rec( 12, 2, LastRecordSeen ),
10368         ])
10369         pkt.Reply((18,272), [
10370                 rec( 8, 2, NextRequestRecord ),
10371                 rec( 10, 2, NumberOfSemaphores, var="x" ),
10372                 rec( 12, (6,260), SemaStruct, repeat="x" ),
10373         ])
10374         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10375         # 2222/17E2, 23/226
10376         pkt = NCP(0x17E2, "Get Semaphore Information", 'file')
10377         pkt.Request((13,267), [
10378                 rec( 10, 2, LastRecordSeen ),
10379                 rec( 12, (1,255), SemaphoreName ),
10380         ], info_str=(SemaphoreName, "Get Semaphore Information: %s", ", %s"))
10381         pkt.Reply(17, [
10382                 rec( 8, 2, NextRequestRecord, BE ),
10383                 rec( 10, 2, OpenCount, BE ),
10384                 rec( 12, 1, SemaphoreValue ),
10385                 rec( 13, 1, NumberOfRecords, var="x" ),
10386                 rec( 14, 3, SemaInfoStruct, repeat="x" ),
10387         ])
10388         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10389         # 2222/17E3, 23/227
10390         pkt = NCP(0x17E3, "Get LAN Driver Configuration Information", 'stats')
10391         pkt.Request(11, [
10392                 rec( 10, 1, LANDriverNumber ),
10393         ])
10394         pkt.Reply(180, [
10395                 rec( 8, 4, NetworkAddress, BE ),
10396                 rec( 12, 6, HostAddress ),
10397                 rec( 18, 1, BoardInstalled ),
10398                 rec( 19, 1, OptionNumber ),
10399                 rec( 20, 160, ConfigurationText ),
10400         ])
10401         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10402         # 2222/17E5, 23/229
10403         pkt = NCP(0x17E5, "Get Connection Usage Statistics", 'stats')
10404         pkt.Request(12, [
10405                 rec( 10, 2, ConnectionNumber ),
10406         ])
10407         pkt.Reply(26, [
10408                 rec( 8, 2, NextRequestRecord ),
10409                 rec( 10, 6, BytesRead ),
10410                 rec( 16, 6, BytesWritten ),
10411                 rec( 22, 4, TotalRequestPackets ),
10412          ])
10413         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10414         # 2222/17E6, 23/230
10415         pkt = NCP(0x17E6, "Get Object's Remaining Disk Space", 'stats')
10416         pkt.Request(14, [
10417                 rec( 10, 4, ObjectID, BE ),
10418         ])
10419         pkt.Reply(21, [
10420                 rec( 8, 4, SystemIntervalMarker, BE ),
10421                 rec( 12, 4, ObjectID ),
10422                 rec( 16, 4, UnusedDiskBlocks, BE ),
10423                 rec( 20, 1, RestrictionsEnforced ),
10424          ])
10425         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])  
10426         # 2222/17E7, 23/231
10427         pkt = NCP(0x17E7, "Get File Server LAN I/O Statistics", 'stats')
10428         pkt.Request(10)
10429         pkt.Reply(74, [
10430                 rec( 8, 4, SystemIntervalMarker, BE ),
10431                 rec( 12, 2, ConfiguredMaxRoutingBuffers ),
10432                 rec( 14, 2, ActualMaxUsedRoutingBuffers ),
10433                 rec( 16, 2, CurrentlyUsedRoutingBuffers ),
10434                 rec( 18, 4, TotalFileServicePackets ),
10435                 rec( 22, 2, TurboUsedForFileService ),
10436                 rec( 24, 2, PacketsFromInvalidConnection ),
10437                 rec( 26, 2, BadLogicalConnectionCount ),
10438                 rec( 28, 2, PacketsReceivedDuringProcessing ),
10439                 rec( 30, 2, RequestsReprocessed ),
10440                 rec( 32, 2, PacketsWithBadSequenceNumber ),
10441                 rec( 34, 2, DuplicateRepliesSent ),
10442                 rec( 36, 2, PositiveAcknowledgesSent ),
10443                 rec( 38, 2, PacketsWithBadRequestType ),
10444                 rec( 40, 2, AttachDuringProcessing ),
10445                 rec( 42, 2, AttachWhileProcessingAttach ),
10446                 rec( 44, 2, ForgedDetachedRequests ),
10447                 rec( 46, 2, DetachForBadConnectionNumber ),
10448                 rec( 48, 2, DetachDuringProcessing ),
10449                 rec( 50, 2, RepliesCancelled ),
10450                 rec( 52, 2, PacketsDiscardedByHopCount ),
10451                 rec( 54, 2, PacketsDiscardedUnknownNet ),
10452                 rec( 56, 2, IncomingPacketDiscardedNoDGroup ),
10453                 rec( 58, 2, OutgoingPacketDiscardedNoTurboBuffer ),
10454                 rec( 60, 2, IPXNotMyNetwork ),
10455                 rec( 62, 4, NetBIOSBroadcastWasPropogated ),
10456                 rec( 66, 4, TotalOtherPackets ),
10457                 rec( 70, 4, TotalRoutedPackets ),
10458          ])
10459         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10460         # 2222/17E8, 23/232
10461         pkt = NCP(0x17E8, "Get File Server Misc Information", 'stats')
10462         pkt.Request(10)
10463         pkt.Reply(40, [
10464                 rec( 8, 4, SystemIntervalMarker, BE ),
10465                 rec( 12, 1, ProcessorType ),
10466                 rec( 13, 1, Reserved ),
10467                 rec( 14, 1, NumberOfServiceProcesses ),
10468                 rec( 15, 1, ServerUtilizationPercentage ),
10469                 rec( 16, 2, ConfiguredMaxBinderyObjects ),
10470                 rec( 18, 2, ActualMaxBinderyObjects ),
10471                 rec( 20, 2, CurrentUsedBinderyObjects ),
10472                 rec( 22, 2, TotalServerMemory ),
10473                 rec( 24, 2, WastedServerMemory ),
10474                 rec( 26, 2, NumberOfDynamicMemoryAreas, var="x" ),
10475                 rec( 28, 12, DynMemStruct, repeat="x" ),
10476          ])
10477         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10478         # 2222/17E9, 23/233
10479         pkt = NCP(0x17E9, "Get Volume Information", 'stats')
10480         pkt.Request(11, [
10481                 rec( 10, 1, VolumeNumber ),
10482         ],info_str=(VolumeNumber, "Get Information on Volume %d", ", %d"))
10483         pkt.Reply(48, [
10484                 rec( 8, 4, SystemIntervalMarker, BE ),
10485                 rec( 12, 1, VolumeNumber ),
10486                 rec( 13, 1, LogicalDriveNumber ),
10487                 rec( 14, 2, BlockSize ),
10488                 rec( 16, 2, StartingBlock ),
10489                 rec( 18, 2, TotalBlocks ),
10490                 rec( 20, 2, FreeBlocks ),
10491                 rec( 22, 2, TotalDirectoryEntries ),
10492                 rec( 24, 2, FreeDirectoryEntries ),
10493                 rec( 26, 2, ActualMaxUsedDirectoryEntries ),
10494                 rec( 28, 1, VolumeHashedFlag ),
10495                 rec( 29, 1, VolumeCachedFlag ),
10496                 rec( 30, 1, VolumeRemovableFlag ),
10497                 rec( 31, 1, VolumeMountedFlag ),
10498                 rec( 32, 16, VolumeName ),
10499          ])
10500         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10501         # 2222/17EA, 23/234
10502         pkt = NCP(0x17EA, "Get Connection's Task Information", 'stats')
10503         pkt.Request(12, [
10504                 rec( 10, 2, ConnectionNumber ),
10505         ])
10506         pkt.Reply(18, [
10507                 rec( 8, 2, NextRequestRecord ),
10508                 rec( 10, 4, NumberOfAttributes, var="x" ),
10509                 rec( 14, 4, Attributes, repeat="x" ),
10510          ])
10511         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10512         # 2222/17EB, 23/235
10513         pkt = NCP(0x17EB, "Get Connection's Open Files", 'file')
10514         pkt.Request(14, [
10515                 rec( 10, 2, ConnectionNumber ),
10516                 rec( 12, 2, LastRecordSeen ),
10517         ])
10518         pkt.Reply((29,283), [
10519                 rec( 8, 2, NextRequestRecord ),
10520                 rec( 10, 2, NumberOfRecords, var="x" ),
10521                 rec( 12, (17, 271), OpnFilesStruct, repeat="x" ),
10522         ])
10523         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10524         # 2222/17EC, 23/236
10525         pkt = NCP(0x17EC, "Get Connection Using A File", 'file')
10526         pkt.Request(18, [
10527                 rec( 10, 1, DataStreamNumber ),
10528                 rec( 11, 1, VolumeNumber ),
10529                 rec( 12, 4, DirectoryBase, LE ),
10530                 rec( 16, 2, LastRecordSeen ),
10531         ])
10532         pkt.Reply(33, [
10533                 rec( 8, 2, NextRequestRecord ),
10534                 rec( 10, 2, UseCount ),
10535                 rec( 12, 2, OpenCount ),
10536                 rec( 14, 2, OpenForReadCount ),
10537                 rec( 16, 2, OpenForWriteCount ),
10538                 rec( 18, 2, DenyReadCount ),
10539                 rec( 20, 2, DenyWriteCount ),
10540                 rec( 22, 1, Locked ),
10541                 rec( 23, 1, ForkCount ),
10542                 rec( 24, 2, NumberOfRecords, var="x" ),
10543                 rec( 26, 7, ConnStruct, repeat="x" ),
10544         ])
10545         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xff00])
10546         # 2222/17ED, 23/237
10547         pkt = NCP(0x17ED, "Get Physical Record Locks By Connection And File", 'file')
10548         pkt.Request(20, [
10549                 rec( 10, 2, TargetConnectionNumber ),
10550                 rec( 12, 1, DataStreamNumber ),
10551                 rec( 13, 1, VolumeNumber ),
10552                 rec( 14, 4, DirectoryBase, LE ),
10553                 rec( 18, 2, LastRecordSeen ),
10554         ])
10555         pkt.Reply(23, [
10556                 rec( 8, 2, NextRequestRecord ),
10557                 rec( 10, 2, NumberOfLocks, var="x" ),
10558                 rec( 12, 11, LockStruct, repeat="x" ),
10559         ])
10560         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10561         # 2222/17EE, 23/238
10562         pkt = NCP(0x17EE, "Get Physical Record Locks By File", 'file')
10563         pkt.Request(18, [
10564                 rec( 10, 1, DataStreamNumber ),
10565                 rec( 11, 1, VolumeNumber ),
10566                 rec( 12, 4, DirectoryBase ),
10567                 rec( 16, 2, LastRecordSeen ),
10568         ])
10569         pkt.Reply(30, [
10570                 rec( 8, 2, NextRequestRecord ),
10571                 rec( 10, 2, NumberOfLocks, var="x" ),
10572                 rec( 12, 18, PhyLockStruct, repeat="x" ),
10573         ])
10574         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10575         # 2222/17EF, 23/239
10576         pkt = NCP(0x17EF, "Get Logical Records By Connection", 'file')
10577         pkt.Request(14, [
10578                 rec( 10, 2, TargetConnectionNumber ),
10579                 rec( 12, 2, LastRecordSeen ),
10580         ])
10581         pkt.Reply((16,270), [
10582                 rec( 8, 2, NextRequestRecord ),
10583                 rec( 10, 2, NumberOfRecords, var="x" ),
10584                 rec( 12, (4, 258), LogLockStruct, repeat="x" ),
10585         ])
10586         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10587         # 2222/17F0, 23/240
10588         pkt = NCP(0x17F0, "Get Logical Record Information (old)", 'file')
10589         pkt.Request((13,267), [
10590                 rec( 10, 2, LastRecordSeen ),
10591                 rec( 12, (1,255), LogicalRecordName ),
10592         ])
10593         pkt.Reply(22, [
10594                 rec( 8, 2, ShareableLockCount ),
10595                 rec( 10, 2, UseCount ),
10596                 rec( 12, 1, Locked ),
10597                 rec( 13, 2, NextRequestRecord ),
10598                 rec( 15, 2, NumberOfRecords, var="x" ),
10599                 rec( 17, 5, LogRecStruct, repeat="x" ),
10600         ])
10601         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10602         # 2222/17F1, 23/241
10603         pkt = NCP(0x17F1, "Get Connection's Semaphores", 'file')
10604         pkt.Request(14, [
10605                 rec( 10, 2, ConnectionNumber ),
10606                 rec( 12, 2, LastRecordSeen ),
10607         ])
10608         pkt.Reply((19,273), [
10609                 rec( 8, 2, NextRequestRecord ),
10610                 rec( 10, 2, NumberOfSemaphores, var="x" ),
10611                 rec( 12, (7, 261), SemaStruct, repeat="x" ),
10612         ])
10613         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10614         # 2222/17F2, 23/242
10615         pkt = NCP(0x17F2, "Get Semaphore Information", 'file')
10616         pkt.Request((13,267), [
10617                 rec( 10, 2, LastRecordSeen ),
10618                 rec( 12, (1,255), SemaphoreName ),
10619         ], info_str=(SemaphoreName, "Get Semaphore Information: %s", ", %s"))
10620         pkt.Reply(20, [
10621                 rec( 8, 2, NextRequestRecord ),
10622                 rec( 10, 2, OpenCount ),
10623                 rec( 12, 2, SemaphoreValue ),
10624                 rec( 14, 2, NumberOfRecords, var="x" ),
10625                 rec( 16, 4, SemaInfoStruct, repeat="x" ),
10626         ])
10627         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10628         # 2222/17F3, 23/243
10629         pkt = NCP(0x17F3, "Map Directory Number to Path", 'file')
10630         pkt.Request(16, [
10631                 rec( 10, 1, VolumeNumber ),
10632                 rec( 11, 4, DirectoryNumber ),
10633                 rec( 15, 1, NameSpace ),
10634         ])
10635         pkt.Reply((9,263), [
10636                 rec( 8, (1,255), Path ),
10637         ])
10638         pkt.CompletionCodes([0x0000, 0x9600, 0x9c00, 0xc601, 0xfd00, 0xff00])
10639         # 2222/17F4, 23/244
10640         pkt = NCP(0x17F4, "Convert Path to Dir Entry", 'file')
10641         pkt.Request((12,266), [
10642                 rec( 10, 1, DirHandle ),
10643                 rec( 11, (1,255), Path ),
10644         ], info_str=(Path, "Convert Path to Directory Entry: %s", ", %s"))
10645         pkt.Reply(13, [
10646                 rec( 8, 1, VolumeNumber ),
10647                 rec( 9, 4, DirectoryNumber ),
10648         ])
10649         pkt.CompletionCodes([0x0000, 0x9600, 0xc601, 0xfd00, 0xff00])
10650         # 2222/17FD, 23/253
10651         pkt = NCP(0x17FD, "Send Console Broadcast", 'stats')
10652         pkt.Request((16, 270), [
10653                 rec( 10, 1, NumberOfStations, var="x" ),
10654                 rec( 11, 4, StationList, repeat="x" ),
10655                 rec( 15, (1, 255), TargetMessage ),
10656         ], info_str=(TargetMessage, "Send Console Broadcast: %s", ", %s"))
10657         pkt.Reply(8)
10658         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10659         # 2222/17FE, 23/254
10660         pkt = NCP(0x17FE, "Clear Connection Number", 'stats')
10661         pkt.Request(14, [
10662                 rec( 10, 4, ConnectionNumber ),
10663         ])
10664         pkt.Reply(8)
10665         pkt.CompletionCodes([0x0000, 0xc601, 0xfd00])
10666         # 2222/18, 24
10667         pkt = NCP(0x18, "End of Job", 'connection')
10668         pkt.Request(7)
10669         pkt.Reply(8)
10670         pkt.CompletionCodes([0x0000])
10671         # 2222/19, 25
10672         pkt = NCP(0x19, "Logout", 'connection')
10673         pkt.Request(7)
10674         pkt.Reply(8)
10675         pkt.CompletionCodes([0x0000])
10676         # 2222/1A, 26
10677         pkt = NCP(0x1A, "Log Physical Record", 'file')
10678         pkt.Request(24, [
10679                 rec( 7, 1, LockFlag ),
10680                 rec( 8, 6, FileHandle ),
10681                 rec( 14, 4, LockAreasStartOffset, BE ),
10682                 rec( 18, 4, LockAreaLen, BE ),
10683                 rec( 22, 2, LockTimeout ),
10684         ])
10685         pkt.Reply(8)
10686         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
10687         # 2222/1B, 27
10688         pkt = NCP(0x1B, "Lock Physical Record Set", 'file')
10689         pkt.Request(10, [
10690                 rec( 7, 1, LockFlag ),
10691                 rec( 8, 2, LockTimeout ),
10692         ])
10693         pkt.Reply(8)
10694         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
10695         # 2222/1C, 28
10696         pkt = NCP(0x1C, "Release Physical Record", 'file')
10697         pkt.Request(22, [
10698                 rec( 7, 1, Reserved ),
10699                 rec( 8, 6, FileHandle ),
10700                 rec( 14, 4, LockAreasStartOffset ),
10701                 rec( 18, 4, LockAreaLen ),
10702         ])
10703         pkt.Reply(8)
10704         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10705         # 2222/1D, 29
10706         pkt = NCP(0x1D, "Release Physical Record Set", 'file')
10707         pkt.Request(8, [
10708                 rec( 7, 1, LockFlag ),
10709         ])
10710         pkt.Reply(8)
10711         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10712         # 2222/1E, 30   #Tested and fixed 6-14-02 GM
10713         pkt = NCP(0x1E, "Clear Physical Record", 'file')
10714         pkt.Request(22, [
10715                 rec( 7, 1, Reserved ),
10716                 rec( 8, 6, FileHandle ),
10717                 rec( 14, 4, LockAreasStartOffset, BE ),
10718                 rec( 18, 4, LockAreaLen, BE ),
10719         ])
10720         pkt.Reply(8)
10721         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10722         # 2222/1F, 31
10723         pkt = NCP(0x1F, "Clear Physical Record Set", 'file')
10724         pkt.Request(8, [
10725                 rec( 7, 1, LockFlag ),
10726         ])
10727         pkt.Reply(8)
10728         pkt.CompletionCodes([0x0000, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff03])
10729         # 2222/2000, 32/00
10730         pkt = NCP(0x2000, "Open Semaphore", 'file', has_length=0)
10731         pkt.Request(10, [
10732                 rec( 8, 1, InitialSemaphoreValue ),
10733                 rec( 9, 1, SemaphoreNameLen ),
10734         ])
10735         pkt.Reply(13, [
10736                   rec( 8, 4, SemaphoreHandle, BE ),
10737                   rec( 12, 1, SemaphoreOpenCount ),
10738         ])
10739         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10740         # 2222/2001, 32/01
10741         pkt = NCP(0x2001, "Examine Semaphore", 'file', has_length=0)
10742         pkt.Request(12, [
10743                 rec( 8, 4, SemaphoreHandle, BE ),
10744         ])
10745         pkt.Reply(10, [
10746                   rec( 8, 1, SemaphoreValue ),
10747                   rec( 9, 1, SemaphoreOpenCount ),
10748         ])
10749         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10750         # 2222/2002, 32/02
10751         pkt = NCP(0x2002, "Wait On Semaphore", 'file', has_length=0)
10752         pkt.Request(14, [
10753                 rec( 8, 4, SemaphoreHandle, BE ),
10754                 rec( 12, 2, SemaphoreTimeOut, BE ), 
10755         ])
10756         pkt.Reply(8)
10757         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10758         # 2222/2003, 32/03
10759         pkt = NCP(0x2003, "Signal Semaphore", 'file', has_length=0)
10760         pkt.Request(12, [
10761                 rec( 8, 4, SemaphoreHandle, BE ),
10762         ])
10763         pkt.Reply(8)
10764         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10765         # 2222/2004, 32/04
10766         pkt = NCP(0x2004, "Close Semaphore", 'file', has_length=0)
10767         pkt.Request(12, [
10768                 rec( 8, 4, SemaphoreHandle, BE ),
10769         ])
10770         pkt.Reply(8)
10771         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
10772         # 2222/21, 33
10773         pkt = NCP(0x21, "Negotiate Buffer Size", 'connection')
10774         pkt.Request(9, [
10775                 rec( 7, 2, BufferSize, BE ),
10776         ])
10777         pkt.Reply(10, [
10778                 rec( 8, 2, BufferSize, BE ),
10779         ])
10780         pkt.CompletionCodes([0x0000])
10781         # 2222/2200, 34/00
10782         pkt = NCP(0x2200, "TTS Is Available", 'tts', has_length=0)
10783         pkt.Request(8)
10784         pkt.Reply(8)
10785         pkt.CompletionCodes([0x0001, 0xfd03, 0xff12])
10786         # 2222/2201, 34/01
10787         pkt = NCP(0x2201, "TTS Begin Transaction", 'tts', has_length=0)
10788         pkt.Request(8)
10789         pkt.Reply(8)
10790         pkt.CompletionCodes([0x0000])
10791         # 2222/2202, 34/02
10792         pkt = NCP(0x2202, "TTS End Transaction", 'tts', has_length=0)
10793         pkt.Request(8)
10794         pkt.Reply(12, [
10795                   rec( 8, 4, TransactionNumber, BE ),
10796         ])                
10797         pkt.CompletionCodes([0x0000, 0xff01])
10798         # 2222/2203, 34/03
10799         pkt = NCP(0x2203, "TTS Abort Transaction", 'tts', has_length=0)
10800         pkt.Request(8)
10801         pkt.Reply(8)
10802         pkt.CompletionCodes([0x0000, 0xfd03, 0xfe0b, 0xff01])
10803         # 2222/2204, 34/04
10804         pkt = NCP(0x2204, "TTS Transaction Status", 'tts', has_length=0)
10805         pkt.Request(12, [
10806                   rec( 8, 4, TransactionNumber, BE ),
10807         ])              
10808         pkt.Reply(8)
10809         pkt.CompletionCodes([0x0000])
10810         # 2222/2205, 34/05
10811         pkt = NCP(0x2205, "TTS Get Application Thresholds", 'tts', has_length=0)
10812         pkt.Request(8)          
10813         pkt.Reply(10, [
10814                   rec( 8, 1, LogicalLockThreshold ),
10815                   rec( 9, 1, PhysicalLockThreshold ),
10816         ])
10817         pkt.CompletionCodes([0x0000])
10818         # 2222/2206, 34/06
10819         pkt = NCP(0x2206, "TTS Set Application Thresholds", 'tts', has_length=0)
10820         pkt.Request(10, [               
10821                   rec( 8, 1, LogicalLockThreshold ),
10822                   rec( 9, 1, PhysicalLockThreshold ),
10823         ])
10824         pkt.Reply(8)
10825         pkt.CompletionCodes([0x0000, 0x9600])
10826         # 2222/2207, 34/07
10827         pkt = NCP(0x2207, "TTS Get Workstation Thresholds", 'tts', has_length=0)
10828         pkt.Request(10, [               
10829                   rec( 8, 1, LogicalLockThreshold ),
10830                   rec( 9, 1, PhysicalLockThreshold ),
10831         ])
10832         pkt.Reply(8)
10833         pkt.CompletionCodes([0x0000])
10834         # 2222/2208, 34/08
10835         pkt = NCP(0x2208, "TTS Set Workstation Thresholds", 'tts', has_length=0)
10836         pkt.Request(10, [               
10837                   rec( 8, 1, LogicalLockThreshold ),
10838                   rec( 9, 1, PhysicalLockThreshold ),
10839         ])
10840         pkt.Reply(8)
10841         pkt.CompletionCodes([0x0000])
10842         # 2222/2209, 34/09
10843         pkt = NCP(0x2209, "TTS Get Transaction Bits", 'tts', has_length=0)
10844         pkt.Request(8)
10845         pkt.Reply(9, [
10846                 rec( 8, 1, ControlFlags ),
10847         ])
10848         pkt.CompletionCodes([0x0000])
10849         # 2222/220A, 34/10
10850         pkt = NCP(0x220A, "TTS Set Transaction Bits", 'tts', has_length=0)
10851         pkt.Request(9, [
10852                 rec( 8, 1, ControlFlags ),
10853         ])
10854         pkt.Reply(8)
10855         pkt.CompletionCodes([0x0000])
10856         # 2222/2301, 35/01
10857         pkt = NCP(0x2301, "AFP Create Directory", 'afp')
10858         pkt.Request((49, 303), [
10859                 rec( 10, 1, VolumeNumber ),
10860                 rec( 11, 4, BaseDirectoryID ),
10861                 rec( 15, 1, Reserved ),
10862                 rec( 16, 4, CreatorID ),
10863                 rec( 20, 4, Reserved4 ),
10864                 rec( 24, 2, FinderAttr ),
10865                 rec( 26, 2, HorizLocation ),
10866                 rec( 28, 2, VertLocation ),
10867                 rec( 30, 2, FileDirWindow ),
10868                 rec( 32, 16, Reserved16 ),
10869                 rec( 48, (1,255), Path ),
10870         ], info_str=(Path, "AFP Create Directory: %s", ", %s"))
10871         pkt.Reply(12, [
10872                 rec( 8, 4, NewDirectoryID ),
10873         ])
10874         pkt.CompletionCodes([0x0000, 0x8301, 0x8400, 0x8800, 0x9300, 0x9600, 0x9804,
10875                              0x9900, 0x9c03, 0x9e02, 0xa100, 0xa201, 0xfd00, 0xff18])
10876         # 2222/2302, 35/02
10877         pkt = NCP(0x2302, "AFP Create File", 'afp')
10878         pkt.Request((49, 303), [
10879                 rec( 10, 1, VolumeNumber ),
10880                 rec( 11, 4, BaseDirectoryID ),
10881                 rec( 15, 1, DeleteExistingFileFlag ),
10882                 rec( 16, 4, CreatorID, BE ),
10883                 rec( 20, 4, Reserved4 ),
10884                 rec( 24, 2, FinderAttr ),
10885                 rec( 26, 2, HorizLocation, BE ),
10886                 rec( 28, 2, VertLocation, BE ),
10887                 rec( 30, 2, FileDirWindow, BE ),
10888                 rec( 32, 16, Reserved16 ),
10889                 rec( 48, (1,255), Path ),
10890         ], info_str=(Path, "AFP Create File: %s", ", %s"))
10891         pkt.Reply(12, [
10892                 rec( 8, 4, NewDirectoryID ),
10893         ])
10894         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8301, 0x8400, 0x8701, 0x8800,
10895                              0x8a00, 0x8d00, 0x8e00, 0x8f00, 0x9300, 0x9600, 0x9804,
10896                              0x9900, 0x9b03, 0x9c03, 0x9e02, 0xa100, 0xa201, 0xfd00,
10897                              0xff18])
10898         # 2222/2303, 35/03
10899         pkt = NCP(0x2303, "AFP Delete", 'afp')
10900         pkt.Request((16,270), [
10901                 rec( 10, 1, VolumeNumber ),
10902                 rec( 11, 4, BaseDirectoryID ),
10903                 rec( 15, (1,255), Path ),
10904         ], info_str=(Path, "AFP Delete: %s", ", %s"))
10905         pkt.Reply(8)
10906         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x8a00, 0x8d00, 0x8e00, 0x8f00,
10907                              0x9000, 0x9300, 0x9600, 0x9804, 0x9b03, 0x9c03, 0x9e02,
10908                              0xa000, 0xa100, 0xa201, 0xfd00, 0xff19])
10909         # 2222/2304, 35/04
10910         pkt = NCP(0x2304, "AFP Get Entry ID From Name", 'afp')
10911         pkt.Request((16,270), [
10912                 rec( 10, 1, VolumeNumber ),
10913                 rec( 11, 4, BaseDirectoryID ),
10914                 rec( 15, (1,255), Path ),
10915         ], info_str=(Path, "AFP Get Entry from Name: %s", ", %s"))
10916         pkt.Reply(12, [
10917                 rec( 8, 4, TargetEntryID, BE ),
10918         ])
10919         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804, 0x9c03,
10920                              0xa100, 0xa201, 0xfd00, 0xff19])
10921         # 2222/2305, 35/05
10922         pkt = NCP(0x2305, "AFP Get File Information", 'afp')
10923         pkt.Request((18,272), [
10924                 rec( 10, 1, VolumeNumber ),
10925                 rec( 11, 4, BaseDirectoryID ),
10926                 rec( 15, 2, RequestBitMap, BE ),
10927                 rec( 17, (1,255), Path ),
10928         ], info_str=(Path, "AFP Get File Information: %s", ", %s"))
10929         pkt.Reply(121, [
10930                 rec( 8, 4, AFPEntryID, BE ),
10931                 rec( 12, 4, ParentID, BE ),
10932                 rec( 16, 2, AttributesDef16, LE ),
10933                 rec( 18, 4, DataForkLen, BE ),
10934                 rec( 22, 4, ResourceForkLen, BE ),
10935                 rec( 26, 2, TotalOffspring, BE  ),
10936                 rec( 28, 2, CreationDate, BE ),
10937                 rec( 30, 2, LastAccessedDate, BE ),
10938                 rec( 32, 2, ModifiedDate, BE ),
10939                 rec( 34, 2, ModifiedTime, BE ),
10940                 rec( 36, 2, ArchivedDate, BE ),
10941                 rec( 38, 2, ArchivedTime, BE ),
10942                 rec( 40, 4, CreatorID, BE ),
10943                 rec( 44, 4, Reserved4 ),
10944                 rec( 48, 2, FinderAttr ),
10945                 rec( 50, 2, HorizLocation ),
10946                 rec( 52, 2, VertLocation ),
10947                 rec( 54, 2, FileDirWindow ),
10948                 rec( 56, 16, Reserved16 ),
10949                 rec( 72, 32, LongName ),
10950                 rec( 104, 4, CreatorID, BE ),
10951                 rec( 108, 12, ShortName ),
10952                 rec( 120, 1, AccessPrivileges ),
10953         ])              
10954         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804, 0x9c03,
10955                              0xa100, 0xa201, 0xfd00, 0xff19])
10956         # 2222/2306, 35/06
10957         pkt = NCP(0x2306, "AFP Get Entry ID From NetWare Handle", 'afp')
10958         pkt.Request(16, [
10959                 rec( 10, 6, FileHandle ),
10960         ])
10961         pkt.Reply(14, [
10962                 rec( 8, 1, VolumeID ),
10963                 rec( 9, 4, TargetEntryID, BE ),
10964                 rec( 13, 1, ForkIndicator ),
10965         ])              
10966         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0xa201])
10967         # 2222/2307, 35/07
10968         pkt = NCP(0x2307, "AFP Rename", 'afp')
10969         pkt.Request((21, 529), [
10970                 rec( 10, 1, VolumeNumber ),
10971                 rec( 11, 4, MacSourceBaseID, BE ),
10972                 rec( 15, 4, MacDestinationBaseID, BE ),
10973                 rec( 19, (1,255), Path ),
10974                 rec( -1, (1,255), NewFileNameLen ),
10975         ], info_str=(Path, "AFP Rename: %s", ", %s"))
10976         pkt.Reply(8)            
10977         pkt.CompletionCodes([0x0000, 0x8301, 0x8401, 0x8800, 0x8b00, 0x8e00,
10978                              0x9001, 0x9201, 0x9300, 0x9600, 0x9804, 0x9900,
10979                              0x9c03, 0x9e00, 0xa100, 0xa201, 0xfd00, 0xff0a])
10980         # 2222/2308, 35/08
10981         pkt = NCP(0x2308, "AFP Open File Fork", 'afp')
10982         pkt.Request((18, 272), [
10983                 rec( 10, 1, VolumeNumber ),
10984                 rec( 11, 4, MacBaseDirectoryID ),
10985                 rec( 15, 1, ForkIndicator ),
10986                 rec( 16, 1, AccessMode ),
10987                 rec( 17, (1,255), Path ),
10988         ], info_str=(Path, "AFP Open File Fork: %s", ", %s"))
10989         pkt.Reply(22, [
10990                 rec( 8, 4, AFPEntryID, BE ),
10991                 rec( 12, 4, DataForkLen, BE ),
10992                 rec( 16, 6, NetWareAccessHandle ),
10993         ])
10994         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8301, 0x8800, 0x9300,
10995                              0x9400, 0x9600, 0x9804, 0x9900, 0x9c03, 0xa100,
10996                              0xa201, 0xfd00, 0xff16])
10997         # 2222/2309, 35/09
10998         pkt = NCP(0x2309, "AFP Set File Information", 'afp')
10999         pkt.Request((64, 318), [
11000                 rec( 10, 1, VolumeNumber ),
11001                 rec( 11, 4, MacBaseDirectoryID ),
11002                 rec( 15, 2, RequestBitMap, BE ),
11003                 rec( 17, 2, MacAttr, BE ),
11004                 rec( 19, 2, CreationDate, BE ),
11005                 rec( 21, 2, LastAccessedDate, BE ),
11006                 rec( 23, 2, ModifiedDate, BE ),
11007                 rec( 25, 2, ModifiedTime, BE ),
11008                 rec( 27, 2, ArchivedDate, BE ),
11009                 rec( 29, 2, ArchivedTime, BE ),
11010                 rec( 31, 4, CreatorID, BE ),
11011                 rec( 35, 4, Reserved4 ),
11012                 rec( 39, 2, FinderAttr ),
11013                 rec( 41, 2, HorizLocation ),
11014                 rec( 43, 2, VertLocation ),
11015                 rec( 45, 2, FileDirWindow ),
11016                 rec( 47, 16, Reserved16 ),
11017                 rec( 63, (1,255), Path ),
11018         ], info_str=(Path, "AFP Set File Information: %s", ", %s"))
11019         pkt.Reply(8)            
11020         pkt.CompletionCodes([0x0000, 0x0104, 0x8301, 0x8800, 0x9300, 0x9400,
11021                              0x9500, 0x9600, 0x9804, 0x9c03, 0xa100, 0xa201,
11022                              0xfd00, 0xff16])
11023         # 2222/230A, 35/10
11024         pkt = NCP(0x230A, "AFP Scan File Information", 'afp')
11025         pkt.Request((26, 280), [
11026                 rec( 10, 1, VolumeNumber ),
11027                 rec( 11, 4, MacBaseDirectoryID ),
11028                 rec( 15, 4, MacLastSeenID, BE ),
11029                 rec( 19, 2, DesiredResponseCount, BE ),
11030                 rec( 21, 2, SearchBitMap, BE ),
11031                 rec( 23, 2, RequestBitMap, BE ),
11032                 rec( 25, (1,255), Path ),
11033         ], info_str=(Path, "AFP Scan File Information: %s", ", %s"))
11034         pkt.Reply(123, [
11035                 rec( 8, 2, ActualResponseCount, BE, var="x" ),
11036                 rec( 10, 113, AFP10Struct, repeat="x" ),
11037         ])      
11038         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804,
11039                              0x9c03, 0xa100, 0xa201, 0xfd00, 0xff16])
11040         # 2222/230B, 35/11
11041         pkt = NCP(0x230B, "AFP Alloc Temporary Directory Handle", 'afp')
11042         pkt.Request((16,270), [
11043                 rec( 10, 1, VolumeNumber ),
11044                 rec( 11, 4, MacBaseDirectoryID ),
11045                 rec( 15, (1,255), Path ),
11046         ], info_str=(Path, "AFP Allocate Temporary Directory Handle: %s", ", %s"))
11047         pkt.Reply(10, [
11048                 rec( 8, 1, DirHandle ),
11049                 rec( 9, 1, AccessRightsMask ),
11050         ])
11051         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600,
11052                              0x9804, 0x9b03, 0x9c03, 0x9d00, 0xa100,
11053                              0xa201, 0xfd00, 0xff00])
11054         # 2222/230C, 35/12
11055         pkt = NCP(0x230C, "AFP Get Entry ID From Path Name", 'afp')
11056         pkt.Request((12,266), [
11057                 rec( 10, 1, DirHandle ),
11058                 rec( 11, (1,255), Path ),
11059         ], info_str=(Path, "AFP Get Entry ID from Path Name: %s", ", %s"))
11060         pkt.Reply(12, [
11061                 rec( 8, 4, AFPEntryID, BE ),
11062         ])
11063         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600,
11064                              0x9804, 0x9b03, 0x9c03, 0xa100, 0xa201,
11065                              0xfd00, 0xff00])
11066         # 2222/230D, 35/13
11067         pkt = NCP(0x230D, "AFP 2.0 Create Directory", 'afp')
11068         pkt.Request((55,309), [
11069                 rec( 10, 1, VolumeNumber ),
11070                 rec( 11, 4, BaseDirectoryID ),
11071                 rec( 15, 1, Reserved ),
11072                 rec( 16, 4, CreatorID, BE ),
11073                 rec( 20, 4, Reserved4 ),
11074                 rec( 24, 2, FinderAttr ),
11075                 rec( 26, 2, HorizLocation ),
11076                 rec( 28, 2, VertLocation ),
11077                 rec( 30, 2, FileDirWindow ),
11078                 rec( 32, 16, Reserved16 ),
11079                 rec( 48, 6, ProDOSInfo ),
11080                 rec( 54, (1,255), Path ),
11081         ], info_str=(Path, "AFP 2.0 Create Directory: %s", ", %s"))
11082         pkt.Reply(12, [
11083                 rec( 8, 4, NewDirectoryID ),
11084         ])
11085         pkt.CompletionCodes([0x0000, 0x8301, 0x8400, 0x8800, 0x9300,
11086                              0x9600, 0x9804, 0x9900, 0x9c03, 0x9e00,
11087                              0xa100, 0xa201, 0xfd00, 0xff00])
11088         # 2222/230E, 35/14
11089         pkt = NCP(0x230E, "AFP 2.0 Create File", 'afp')
11090         pkt.Request((55,309), [
11091                 rec( 10, 1, VolumeNumber ),
11092                 rec( 11, 4, BaseDirectoryID ),
11093                 rec( 15, 1, DeleteExistingFileFlag ),
11094                 rec( 16, 4, CreatorID, BE ),
11095                 rec( 20, 4, Reserved4 ),
11096                 rec( 24, 2, FinderAttr ),
11097                 rec( 26, 2, HorizLocation ),
11098                 rec( 28, 2, VertLocation ),
11099                 rec( 30, 2, FileDirWindow ),
11100                 rec( 32, 16, Reserved16 ),
11101                 rec( 48, 6, ProDOSInfo ),
11102                 rec( 54, (1,255), Path ),
11103         ], info_str=(Path, "AFP 2.0 Create File: %s", ", %s"))
11104         pkt.Reply(12, [
11105                 rec( 8, 4, NewDirectoryID ),
11106         ])
11107         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8301, 0x8400,
11108                              0x8701, 0x8800, 0x8a00, 0x8d00, 0x8e00,
11109                              0x8f00, 0x9001, 0x9300, 0x9600, 0x9804,
11110                              0x9900, 0x9b03, 0x9c03, 0x9e00, 0xa100,
11111                              0xa201, 0xfd00, 0xff00])
11112         # 2222/230F, 35/15
11113         pkt = NCP(0x230F, "AFP 2.0 Get File Or Directory Information", 'afp')
11114         pkt.Request((18,272), [
11115                 rec( 10, 1, VolumeNumber ),
11116                 rec( 11, 4, BaseDirectoryID ),
11117                 rec( 15, 2, RequestBitMap, BE ),
11118                 rec( 17, (1,255), Path ),
11119         ], info_str=(Path, "AFP 2.0 Get Information: %s", ", %s"))
11120         pkt.Reply(128, [
11121                 rec( 8, 4, AFPEntryID, BE ),
11122                 rec( 12, 4, ParentID, BE ),
11123                 rec( 16, 2, AttributesDef16 ),
11124                 rec( 18, 4, DataForkLen, BE ),
11125                 rec( 22, 4, ResourceForkLen, BE ),
11126                 rec( 26, 2, TotalOffspring, BE ),
11127                 rec( 28, 2, CreationDate, BE ),
11128                 rec( 30, 2, LastAccessedDate, BE ),
11129                 rec( 32, 2, ModifiedDate, BE ),
11130                 rec( 34, 2, ModifiedTime, BE ),
11131                 rec( 36, 2, ArchivedDate, BE ),
11132                 rec( 38, 2, ArchivedTime, BE ),
11133                 rec( 40, 4, CreatorID, BE ),
11134                 rec( 44, 4, Reserved4 ),
11135                 rec( 48, 2, FinderAttr ),
11136                 rec( 50, 2, HorizLocation ),
11137                 rec( 52, 2, VertLocation ),
11138                 rec( 54, 2, FileDirWindow ),
11139                 rec( 56, 16, Reserved16 ),
11140                 rec( 72, 32, LongName ),
11141                 rec( 104, 4, CreatorID, BE ),
11142                 rec( 108, 12, ShortName ),
11143                 rec( 120, 1, AccessPrivileges ),
11144                 rec( 121, 1, Reserved ),
11145                 rec( 122, 6, ProDOSInfo ),
11146         ])              
11147         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804, 0x9c03,
11148                              0xa100, 0xa201, 0xfd00, 0xff19])
11149         # 2222/2310, 35/16
11150         pkt = NCP(0x2310, "AFP 2.0 Set File Information", 'afp')
11151         pkt.Request((70, 324), [
11152                 rec( 10, 1, VolumeNumber ),
11153                 rec( 11, 4, MacBaseDirectoryID ),
11154                 rec( 15, 2, RequestBitMap, BE ),
11155                 rec( 17, 2, AttributesDef16 ),
11156                 rec( 19, 2, CreationDate, BE ),
11157                 rec( 21, 2, LastAccessedDate, BE ),
11158                 rec( 23, 2, ModifiedDate, BE ),
11159                 rec( 25, 2, ModifiedTime, BE ),
11160                 rec( 27, 2, ArchivedDate, BE ),
11161                 rec( 29, 2, ArchivedTime, BE ),
11162                 rec( 31, 4, CreatorID, BE ),
11163                 rec( 35, 4, Reserved4 ),
11164                 rec( 39, 2, FinderAttr ),
11165                 rec( 41, 2, HorizLocation ),
11166                 rec( 43, 2, VertLocation ),
11167                 rec( 45, 2, FileDirWindow ),
11168                 rec( 47, 16, Reserved16 ),
11169                 rec( 63, 6, ProDOSInfo ),
11170                 rec( 69, (1,255), Path ),
11171         ], info_str=(Path, "AFP 2.0 Set File Information: %s", ", %s"))
11172         pkt.Reply(8)            
11173         pkt.CompletionCodes([0x0000, 0x0104, 0x8301, 0x8800, 0x9300, 0x9400,
11174                              0x9500, 0x9600, 0x9804, 0x9c03, 0xa100, 0xa201,
11175                              0xfd00, 0xff16])
11176         # 2222/2311, 35/17
11177         pkt = NCP(0x2311, "AFP 2.0 Scan File Information", 'afp')
11178         pkt.Request((26, 280), [
11179                 rec( 10, 1, VolumeNumber ),
11180                 rec( 11, 4, MacBaseDirectoryID ),
11181                 rec( 15, 4, MacLastSeenID, BE ),
11182                 rec( 19, 2, DesiredResponseCount, BE ),
11183                 rec( 21, 2, SearchBitMap, BE ),
11184                 rec( 23, 2, RequestBitMap, BE ),
11185                 rec( 25, (1,255), Path ),
11186         ], info_str=(Path, "AFP 2.0 Scan File Information: %s", ", %s"))
11187         pkt.Reply(14, [
11188                 rec( 8, 2, ActualResponseCount, var="x" ),
11189                 rec( 10, 4, AFP20Struct, repeat="x" ),
11190         ])      
11191         pkt.CompletionCodes([0x0000, 0x8301, 0x8800, 0x9300, 0x9600, 0x9804,
11192                              0x9c03, 0xa100, 0xa201, 0xfd00, 0xff16])
11193         # 2222/2312, 35/18
11194         pkt = NCP(0x2312, "AFP Get DOS Name From Entry ID", 'afp')
11195         pkt.Request(15, [
11196                 rec( 10, 1, VolumeNumber ),
11197                 rec( 11, 4, AFPEntryID, BE ),
11198         ])
11199         pkt.Reply((9,263), [
11200                 rec( 8, (1,255), Path ),
11201         ])      
11202         pkt.CompletionCodes([0x0000, 0x8900, 0x9600, 0xbf00])
11203         # 2222/2313, 35/19
11204         pkt = NCP(0x2313, "AFP Get Macintosh Info On Deleted File", 'afp')
11205         pkt.Request(15, [
11206                 rec( 10, 1, VolumeNumber ),
11207                 rec( 11, 4, DirectoryNumber, BE ),
11208         ])
11209         pkt.Reply((51,305), [
11210                 rec( 8, 4, CreatorID, BE ),
11211                 rec( 12, 4, Reserved4 ),
11212                 rec( 16, 2, FinderAttr ),
11213                 rec( 18, 2, HorizLocation ),
11214                 rec( 20, 2, VertLocation ),
11215                 rec( 22, 2, FileDirWindow ),
11216                 rec( 24, 16, Reserved16 ),
11217                 rec( 40, 6, ProDOSInfo ),
11218                 rec( 46, 4, ResourceForkSize, BE ),
11219                 rec( 50, (1,255), FileName ),
11220         ])      
11221         pkt.CompletionCodes([0x0000, 0x9c03, 0xbf00])
11222         # 2222/2400, 36/00
11223         pkt = NCP(0x2400, "Get NCP Extension Information", 'fileserver')
11224         pkt.Request(14, [
11225                 rec( 10, 4, NCPextensionNumber, LE ),
11226         ])
11227         pkt.Reply((16,270), [
11228                 rec( 8, 4, NCPextensionNumber ),
11229                 rec( 12, 1, NCPextensionMajorVersion ),
11230                 rec( 13, 1, NCPextensionMinorVersion ),
11231                 rec( 14, 1, NCPextensionRevisionNumber ),
11232                 rec( 15, (1, 255), NCPextensionName ),
11233         ])      
11234         pkt.CompletionCodes([0x0000, 0xfe00])
11235         # 2222/2401, 36/01
11236         pkt = NCP(0x2401, "Get NCP Extension Maximum Data Size", 'fileserver')
11237         pkt.Request(10)
11238         pkt.Reply(10, [
11239                 rec( 8, 2, NCPdataSize ),
11240         ])      
11241         pkt.CompletionCodes([0x0000, 0xfe00])
11242         # 2222/2402, 36/02
11243         pkt = NCP(0x2402, "Get NCP Extension Information by Name", 'fileserver')
11244         pkt.Request((11, 265), [
11245                 rec( 10, (1,255), NCPextensionName ),
11246         ], info_str=(NCPextensionName, "Get NCP Extension Information by Name: %s", ", %s"))
11247         pkt.Reply((16,270), [
11248                 rec( 8, 4, NCPextensionNumber ),
11249                 rec( 12, 1, NCPextensionMajorVersion ),
11250                 rec( 13, 1, NCPextensionMinorVersion ),
11251                 rec( 14, 1, NCPextensionRevisionNumber ),
11252                 rec( 15, (1, 255), NCPextensionName ),
11253         ])      
11254         pkt.CompletionCodes([0x0000, 0xfe00, 0xff20])
11255         # 2222/2403, 36/03
11256         pkt = NCP(0x2403, "Get Number of Registered NCP Extensions", 'fileserver')
11257         pkt.Request(10)
11258         pkt.Reply(12, [
11259                 rec( 8, 4, NumberOfNCPExtensions ),
11260         ])      
11261         pkt.CompletionCodes([0x0000, 0xfe00])
11262         # 2222/2404, 36/04
11263         pkt = NCP(0x2404, "Get NCP Extension Registered Verbs List", 'fileserver')
11264         pkt.Request(14, [
11265                 rec( 10, 4, StartingNumber ),
11266         ])
11267         pkt.Reply(20, [
11268                 rec( 8, 4, ReturnedListCount, var="x" ),
11269                 rec( 12, 4, nextStartingNumber ),
11270                 rec( 16, 4, NCPExtensionNumbers, repeat="x" ),
11271         ])      
11272         pkt.CompletionCodes([0x0000, 0xfe00])
11273         # 2222/2405, 36/05
11274         pkt = NCP(0x2405, "Return NCP Extension Information", 'fileserver')
11275         pkt.Request(14, [
11276                 rec( 10, 4, NCPextensionNumber ),
11277         ])
11278         pkt.Reply((16,270), [
11279                 rec( 8, 4, NCPextensionNumber ),
11280                 rec( 12, 1, NCPextensionMajorVersion ),
11281                 rec( 13, 1, NCPextensionMinorVersion ),
11282                 rec( 14, 1, NCPextensionRevisionNumber ),
11283                 rec( 15, (1, 255), NCPextensionName ),
11284         ])      
11285         pkt.CompletionCodes([0x0000, 0xfe00])
11286         # 2222/2406, 36/06
11287         pkt = NCP(0x2406, "Return NCP Extension Maximum Data Size", 'fileserver')
11288         pkt.Request(10)
11289         pkt.Reply(12, [
11290                 rec( 8, 4, NCPdataSize ),
11291         ])      
11292         pkt.CompletionCodes([0x0000, 0xfe00])
11293         # 2222/25, 37
11294         pkt = NCP(0x25, "Execute NCP Extension", 'fileserver')
11295         pkt.Request(11, [
11296                 rec( 7, 4, NCPextensionNumber ),
11297                 # The following value is Unicode
11298                 #rec[ 13, (1,255), RequestData ],
11299         ])
11300         pkt.Reply(8)
11301                 # The following value is Unicode
11302                 #[ 8, (1, 255), ReplyBuffer ],
11303         pkt.CompletionCodes([0x0000, 0xd504, 0xee00, 0xfe00])
11304         # 2222/3B, 59
11305         pkt = NCP(0x3B, "Commit File", 'file', has_length=0 )
11306         pkt.Request(14, [
11307                 rec( 7, 1, Reserved ),
11308                 rec( 8, 6, FileHandle ),
11309         ], info_str=(FileHandle, "Commit File - 0x%s", ", %s"))
11310         pkt.Reply(8)    
11311         pkt.CompletionCodes([0x0000, 0x8800, 0x9804, 0xff00])
11312         # 2222/3E, 62
11313         pkt = NCP(0x3E, "File Search Initialize", 'file', has_length=0 )
11314         pkt.Request((9, 263), [
11315                 rec( 7, 1, DirHandle ),
11316                 rec( 8, (1,255), Path ),
11317         ], info_str=(Path, "Initialize File Search: %s", ", %s"))
11318         pkt.Reply(14, [
11319                 rec( 8, 1, VolumeNumber ),
11320                 rec( 9, 2, DirectoryID ),
11321                 rec( 11, 2, SequenceNumber, BE ),
11322                 rec( 13, 1, AccessRightsMask ),
11323         ])
11324         pkt.CompletionCodes([0x0000, 0x9600, 0x9804, 0x9b03, 0x9c03, 0xa100,
11325                              0xfd00, 0xff16])
11326         # 2222/3F, 63
11327         pkt = NCP(0x3F, "File Search Continue", 'file', has_length=0 )
11328         pkt.Request((14, 268), [
11329                 rec( 7, 1, VolumeNumber ),
11330                 rec( 8, 2, DirectoryID ),
11331                 rec( 10, 2, SequenceNumber, BE ),
11332                 rec( 12, 1, SearchAttributes ),
11333                 rec( 13, (1,255), Path ),
11334         ], info_str=(Path, "File Search Continue: %s", ", %s"))
11335         pkt.Reply( NO_LENGTH_CHECK, [
11336                 #
11337                 # XXX - don't show this if we got back a non-zero
11338                 # completion code?  For example, 255 means "No
11339                 # matching files or directories were found", so
11340                 # presumably it can't show you a matching file or
11341                 # directory instance - it appears to just leave crap
11342                 # there.
11343                 #
11344                 srec( DirectoryInstance, req_cond="ncp.sattr_sub==TRUE"),
11345                 srec( FileInstance, req_cond="ncp.sattr_sub!=TRUE"),
11346         ])
11347         pkt.ReqCondSizeVariable()
11348         pkt.CompletionCodes([0x0000, 0xff16])
11349         # 2222/40, 64
11350         pkt = NCP(0x40, "Search for a File", 'file')
11351         pkt.Request((12, 266), [
11352                 rec( 7, 2, SequenceNumber, BE ),
11353                 rec( 9, 1, DirHandle ),
11354                 rec( 10, 1, SearchAttributes ),
11355                 rec( 11, (1,255), FileName ),
11356         ], info_str=(FileName, "Search for File: %s", ", %s"))
11357         pkt.Reply(40, [
11358                 rec( 8, 2, SequenceNumber, BE ),
11359                 rec( 10, 2, Reserved2 ),
11360                 rec( 12, 14, FileName14 ),
11361                 rec( 26, 1, AttributesDef ),
11362                 rec( 27, 1, FileExecuteType ),
11363                 rec( 28, 4, FileSize ),
11364                 rec( 32, 2, CreationDate, BE ),
11365                 rec( 34, 2, LastAccessedDate, BE ),
11366                 rec( 36, 2, ModifiedDate, BE ),
11367                 rec( 38, 2, ModifiedTime, BE ),
11368         ])
11369         pkt.CompletionCodes([0x0000, 0x8900, 0x9600, 0x9804, 0x9b03,
11370                              0x9c03, 0xa100, 0xfd00, 0xff16])
11371         # 2222/41, 65
11372         pkt = NCP(0x41, "Open File", 'file')
11373         pkt.Request((10, 264), [
11374                 rec( 7, 1, DirHandle ),
11375                 rec( 8, 1, SearchAttributes ),
11376                 rec( 9, (1,255), FileName ),
11377         ], info_str=(FileName, "Open File: %s", ", %s"))
11378         pkt.Reply(44, [
11379                 rec( 8, 6, FileHandle ),
11380                 rec( 14, 2, Reserved2 ),
11381                 rec( 16, 14, FileName14 ),
11382                 rec( 30, 1, AttributesDef ),
11383                 rec( 31, 1, FileExecuteType ),
11384                 rec( 32, 4, FileSize, BE ),
11385                 rec( 36, 2, CreationDate, BE ),
11386                 rec( 38, 2, LastAccessedDate, BE ),
11387                 rec( 40, 2, ModifiedDate, BE ),
11388                 rec( 42, 2, ModifiedTime, BE ),
11389         ])
11390         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8200, 0x9400,
11391                              0x9600, 0x9804, 0x9c03, 0xa100, 0xfd00,
11392                              0xff16])
11393         # 2222/42, 66
11394         pkt = NCP(0x42, "Close File", 'file')
11395         pkt.Request(14, [
11396                 rec( 7, 1, Reserved ),
11397                 rec( 8, 6, FileHandle ),
11398         ], info_str=(FileHandle, "Close File - 0x%s", ", %s"))
11399         pkt.Reply(8)
11400         pkt.CompletionCodes([0x0000, 0x8800, 0xff1a])
11401         # 2222/43, 67
11402         pkt = NCP(0x43, "Create File", 'file')
11403         pkt.Request((10, 264), [
11404                 rec( 7, 1, DirHandle ),
11405                 rec( 8, 1, AttributesDef ),
11406                 rec( 9, (1,255), FileName ),
11407         ], info_str=(FileName, "Create File: %s", ", %s"))
11408         pkt.Reply(44, [
11409                 rec( 8, 6, FileHandle ),
11410                 rec( 14, 2, Reserved2 ),
11411                 rec( 16, 14, FileName14 ),
11412                 rec( 30, 1, AttributesDef ),
11413                 rec( 31, 1, FileExecuteType ),
11414                 rec( 32, 4, FileSize, BE ),
11415                 rec( 36, 2, CreationDate, BE ),
11416                 rec( 38, 2, LastAccessedDate, BE ),
11417                 rec( 40, 2, ModifiedDate, BE ),
11418                 rec( 42, 2, ModifiedTime, BE ),
11419         ])
11420         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11421                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11422                              0x9804, 0x9900, 0x9b03, 0x9c03, 0xfd00,
11423                              0xff00])
11424         # 2222/44, 68
11425         pkt = NCP(0x44, "Erase File", 'file')
11426         pkt.Request((10, 264), [
11427                 rec( 7, 1, DirHandle ),
11428                 rec( 8, 1, SearchAttributes ),
11429                 rec( 9, (1,255), FileName ),
11430         ], info_str=(FileName, "Erase File: %s", ", %s"))
11431         pkt.Reply(8)
11432         pkt.CompletionCodes([0x0000, 0x8a00, 0x8d00, 0x8e00, 0x8f00,
11433                              0x9001, 0x9600, 0x9804, 0x9b03, 0x9c03,
11434                              0xa100, 0xfd00, 0xff00])
11435         # 2222/45, 69
11436         pkt = NCP(0x45, "Rename File", 'file')
11437         pkt.Request((12, 520), [
11438                 rec( 7, 1, DirHandle ),
11439                 rec( 8, 1, SearchAttributes ),
11440                 rec( 9, (1,255), FileName ),
11441                 rec( -1, 1, TargetDirHandle ),
11442                 rec( -1, (1, 255), NewFileNameLen ),
11443         ], info_str=(FileName, "Rename File: %s", ", %s"))
11444         pkt.Reply(8)
11445         pkt.CompletionCodes([0x0000, 0x8701, 0x8b00, 0x8d00, 0x8e00,
11446                              0x8f00, 0x9001, 0x9101, 0x9201, 0x9600,
11447                              0x9804, 0x9a00, 0x9b03, 0x9c03, 0xa100,
11448                              0xfd00, 0xff16])
11449         # 2222/46, 70
11450         pkt = NCP(0x46, "Set File Attributes", 'file')
11451         pkt.Request((11, 265), [
11452                 rec( 7, 1, AttributesDef ),
11453                 rec( 8, 1, DirHandle ),
11454                 rec( 9, 1, SearchAttributes ),
11455                 rec( 10, (1,255), FileName ),
11456         ], info_str=(FileName, "Set File Attributes: %s", ", %s"))
11457         pkt.Reply(8)
11458         pkt.CompletionCodes([0x0000, 0x8c00, 0x8d00, 0x8e00, 0x9600,
11459                              0x9804, 0x9b03, 0x9c03, 0xa100, 0xfd00,
11460                              0xff16])
11461         # 2222/47, 71
11462         pkt = NCP(0x47, "Get Current Size of File", 'file')
11463         pkt.Request(14, [
11464         rec(7, 1, Reserved ),
11465                 rec( 8, 6, FileHandle ),
11466         ], info_str=(FileHandle, "Get Current Size of File - 0x%s", ", %s"))
11467         pkt.Reply(12, [
11468                 rec( 8, 4, FileSize, BE ),
11469         ])
11470         pkt.CompletionCodes([0x0000, 0x8800])
11471         # 2222/48, 72
11472         pkt = NCP(0x48, "Read From A File", 'file')
11473         pkt.Request(20, [
11474                 rec( 7, 1, Reserved ),
11475                 rec( 8, 6, FileHandle ),
11476                 rec( 14, 4, FileOffset, BE ), 
11477                 rec( 18, 2, MaxBytes, BE ),                                
11478         ], info_str=(FileHandle, "Read From File - 0x%s", ", %s"))
11479         pkt.Reply(10, [ 
11480                 rec( 8, 2, NumBytes, BE ),      
11481         ])
11482         pkt.CompletionCodes([0x0000, 0x8300, 0x8800, 0x9300, 0xff1b])
11483         # 2222/49, 73
11484         pkt = NCP(0x49, "Write to a File", 'file')
11485         pkt.Request(20, [
11486                 rec( 7, 1, Reserved ),
11487                 rec( 8, 6, FileHandle ),
11488                 rec( 14, 4, FileOffset, BE ),
11489                 rec( 18, 2, MaxBytes, BE ),     
11490         ], info_str=(FileHandle, "Write to a File - 0x%s", ", %s"))
11491         pkt.Reply(8)
11492         pkt.CompletionCodes([0x0000, 0x0104, 0x8300, 0x8800, 0x9400, 0x9500, 0xa201, 0xff1b])
11493         # 2222/4A, 74
11494         pkt = NCP(0x4A, "Copy from One File to Another", 'file')
11495         pkt.Request(30, [
11496                 rec( 7, 1, Reserved ),
11497                 rec( 8, 6, FileHandle ),
11498                 rec( 14, 6, TargetFileHandle ),
11499                 rec( 20, 4, FileOffset, BE ),
11500                 rec( 24, 4, TargetFileOffset, BE ),
11501                 rec( 28, 2, BytesToCopy, BE ),
11502         ])
11503         pkt.Reply(12, [
11504                 rec( 8, 4, BytesActuallyTransferred, BE ),
11505         ])
11506         pkt.CompletionCodes([0x0000, 0x0104, 0x8300, 0x8800, 0x9300, 0x9400,
11507                              0x9500, 0x9600, 0xa201, 0xff1b])
11508         # 2222/4B, 75
11509         pkt = NCP(0x4B, "Set File Time Date Stamp", 'file')
11510         pkt.Request(18, [
11511                 rec( 7, 1, Reserved ),
11512                 rec( 8, 6, FileHandle ),
11513                 rec( 14, 2, FileTime, BE ),
11514                 rec( 16, 2, FileDate, BE ),
11515         ], info_str=(FileHandle, "Set Time and Date Stamp for File - 0x%s", ", %s"))
11516         pkt.Reply(8)
11517         pkt.CompletionCodes([0x0000, 0x8800, 0x9600])
11518         # 2222/4C, 76
11519         pkt = NCP(0x4C, "Open File", 'file')
11520         pkt.Request((11, 265), [
11521                 rec( 7, 1, DirHandle ),
11522                 rec( 8, 1, SearchAttributes ),
11523                 rec( 9, 1, AccessRightsMask ),
11524                 rec( 10, (1,255), FileName ),
11525         ], info_str=(FileName, "Open File: %s", ", %s"))
11526         pkt.Reply(44, [
11527                 rec( 8, 6, FileHandle ),
11528                 rec( 14, 2, Reserved2 ),
11529                 rec( 16, 14, FileName14 ),
11530                 rec( 30, 1, AttributesDef ),
11531                 rec( 31, 1, FileExecuteType ),
11532                 rec( 32, 4, FileSize, BE ),
11533                 rec( 36, 2, CreationDate, BE ),
11534                 rec( 38, 2, LastAccessedDate, BE ),
11535                 rec( 40, 2, ModifiedDate, BE ),
11536                 rec( 42, 2, ModifiedTime, BE ),
11537         ])
11538         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8200, 0x9400,
11539                              0x9600, 0x9804, 0x9c03, 0xa100, 0xfd00,
11540                              0xff16])
11541         # 2222/4D, 77
11542         pkt = NCP(0x4D, "Create File", 'file')
11543         pkt.Request((10, 264), [
11544                 rec( 7, 1, DirHandle ),
11545                 rec( 8, 1, AttributesDef ),
11546                 rec( 9, (1,255), FileName ),
11547         ], info_str=(FileName, "Create File: %s", ", %s"))
11548         pkt.Reply(44, [
11549                 rec( 8, 6, FileHandle ),
11550                 rec( 14, 2, Reserved2 ),
11551                 rec( 16, 14, FileName14 ),
11552                 rec( 30, 1, AttributesDef ),
11553                 rec( 31, 1, FileExecuteType ),
11554                 rec( 32, 4, FileSize, BE ),
11555                 rec( 36, 2, CreationDate, BE ),
11556                 rec( 38, 2, LastAccessedDate, BE ),
11557                 rec( 40, 2, ModifiedDate, BE ),
11558                 rec( 42, 2, ModifiedTime, BE ),
11559         ])
11560         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11561                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11562                              0x9804, 0x9900, 0x9b03, 0x9c03, 0xfd00,
11563                              0xff00])
11564         # 2222/4F, 79
11565         pkt = NCP(0x4F, "Set File Extended Attributes", 'file')
11566         pkt.Request((11, 265), [
11567                 rec( 7, 1, AttributesDef ),
11568                 rec( 8, 1, DirHandle ),
11569                 rec( 9, 1, AccessRightsMask ),
11570                 rec( 10, (1,255), FileName ),
11571         ], info_str=(FileName, "Set File Extended Attributes: %s", ", %s"))
11572         pkt.Reply(8)
11573         pkt.CompletionCodes([0x0000, 0x8c00, 0x8d00, 0x8e00, 0x9600,
11574                              0x9804, 0x9b03, 0x9c03, 0xa100, 0xfd00,
11575                              0xff16])
11576         # 2222/54, 84
11577         pkt = NCP(0x54, "Open/Create File", 'file')
11578         pkt.Request((12, 266), [
11579                 rec( 7, 1, DirHandle ),
11580                 rec( 8, 1, AttributesDef ),
11581                 rec( 9, 1, AccessRightsMask ),
11582                 rec( 10, 1, ActionFlag ),
11583                 rec( 11, (1,255), FileName ),
11584         ], info_str=(FileName, "Open/Create File: %s", ", %s"))
11585         pkt.Reply(44, [
11586                 rec( 8, 6, FileHandle ),
11587                 rec( 14, 2, Reserved2 ),
11588                 rec( 16, 14, FileName14 ),
11589                 rec( 30, 1, AttributesDef ),
11590                 rec( 31, 1, FileExecuteType ),
11591                 rec( 32, 4, FileSize, BE ),
11592                 rec( 36, 2, CreationDate, BE ),
11593                 rec( 38, 2, LastAccessedDate, BE ),
11594                 rec( 40, 2, ModifiedDate, BE ),
11595                 rec( 42, 2, ModifiedTime, BE ),
11596         ])
11597         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11598                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11599                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
11600         # 2222/55, 85
11601         pkt = NCP(0x55, "Get Sparse File Data Block Bit Map", 'file')
11602         pkt.Request(17, [
11603                 rec( 7, 6, FileHandle ),
11604                 rec( 13, 4, FileOffset ),
11605         ], info_str=(FileHandle, "Get Sparse File Data Block Bitmap for File - 0x%s", ", %s"))
11606         pkt.Reply(528, [
11607                 rec( 8, 4, AllocationBlockSize ),
11608                 rec( 12, 4, Reserved4 ),
11609                 rec( 16, 512, BitMap ),
11610         ])
11611         pkt.CompletionCodes([0x0000, 0x8800])
11612         # 2222/5601, 86/01
11613         pkt = NCP(0x5601, "Close Extended Attribute Handle", 'file', has_length=0 )
11614         pkt.Request(14, [
11615                 rec( 8, 2, Reserved2 ),
11616                 rec( 10, 4, EAHandle ),
11617         ])
11618         pkt.Reply(8)
11619         pkt.CompletionCodes([0x0000, 0xcf00, 0xd301])
11620         # 2222/5602, 86/02
11621         pkt = NCP(0x5602, "Write Extended Attribute", 'file', has_length=0 )
11622         pkt.Request((35,97), [
11623                 rec( 8, 2, EAFlags ),
11624                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
11625                 rec( 14, 4, ReservedOrDirectoryNumber ),
11626                 rec( 18, 4, TtlWriteDataSize ),
11627                 rec( 22, 4, FileOffset ),
11628                 rec( 26, 4, EAAccessFlag ),
11629                 rec( 30, 2, EAValueLength, var='x' ),
11630                 rec( 32, (2,64), EAKey ),
11631                 rec( -1, 1, EAValueRep, repeat='x' ),
11632         ], info_str=(EAKey, "Write Extended Attribute: %s", ", %s"))
11633         pkt.Reply(20, [
11634                 rec( 8, 4, EAErrorCodes ),
11635                 rec( 12, 4, EABytesWritten ),
11636                 rec( 16, 4, NewEAHandle ),
11637         ])
11638         pkt.CompletionCodes([0x0000, 0xc800, 0xc900, 0xcb00, 0xce00, 0xcf00, 0xd101,
11639                              0xd203, 0xd301, 0xd402])
11640         # 2222/5603, 86/03
11641         pkt = NCP(0x5603, "Read Extended Attribute", 'file', has_length=0 )
11642         pkt.Request((28,538), [
11643                 rec( 8, 2, EAFlags ),
11644                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
11645                 rec( 14, 4, ReservedOrDirectoryNumber ),
11646                 rec( 18, 4, FileOffset ),
11647                 rec( 22, 4, InspectSize ),
11648                 rec( 26, (2,512), EAKey ),
11649         ], info_str=(EAKey, "Read Extended Attribute: %s", ", %s"))
11650         pkt.Reply((26,536), [
11651                 rec( 8, 4, EAErrorCodes ),
11652                 rec( 12, 4, TtlValuesLength ),
11653                 rec( 16, 4, NewEAHandle ),
11654                 rec( 20, 4, EAAccessFlag ),
11655                 rec( 24, (2,512), EAValue ),
11656         ])
11657         pkt.CompletionCodes([0x0000, 0xc900, 0xce00, 0xcf00, 0xd101,
11658                              0xd301])
11659         # 2222/5604, 86/04
11660         pkt = NCP(0x5604, "Enumerate Extended Attribute", 'file', has_length=0 )
11661         pkt.Request((26,536), [
11662                 rec( 8, 2, EAFlags ),
11663                 rec( 10, 4, EAHandleOrNetWareHandleOrVolume ),
11664                 rec( 14, 4, ReservedOrDirectoryNumber ),
11665                 rec( 18, 4, InspectSize ),
11666                 rec( 22, 2, SequenceNumber ),
11667                 rec( 24, (2,512), EAKey ),
11668         ], info_str=(EAKey, "Enumerate Extended Attribute: %s", ", %s"))
11669         pkt.Reply(28, [
11670                 rec( 8, 4, EAErrorCodes ),
11671                 rec( 12, 4, TtlEAs ),
11672                 rec( 16, 4, TtlEAsDataSize ),
11673                 rec( 20, 4, TtlEAsKeySize ),
11674                 rec( 24, 4, NewEAHandle ),
11675         ])
11676         pkt.CompletionCodes([0x0000, 0x8800, 0xc900, 0xce00, 0xcf00, 0xd101,
11677                              0xd301])
11678         # 2222/5605, 86/05
11679         pkt = NCP(0x5605, "Duplicate Extended Attributes", 'file', has_length=0 )
11680         pkt.Request(28, [
11681                 rec( 8, 2, EAFlags ),
11682                 rec( 10, 2, DstEAFlags ),
11683                 rec( 12, 4, EAHandleOrNetWareHandleOrVolume ),
11684                 rec( 16, 4, ReservedOrDirectoryNumber ),
11685                 rec( 20, 4, EAHandleOrNetWareHandleOrVolume ),
11686                 rec( 24, 4, ReservedOrDirectoryNumber ),
11687         ])
11688         pkt.Reply(20, [
11689                 rec( 8, 4, EADuplicateCount ),
11690                 rec( 12, 4, EADataSizeDuplicated ),
11691                 rec( 16, 4, EAKeySizeDuplicated ),
11692         ])
11693         pkt.CompletionCodes([0x0000, 0xd101])
11694         # 2222/5701, 87/01
11695         pkt = NCP(0x5701, "Open/Create File or Subdirectory", 'file', has_length=0)
11696         pkt.Request((30, 284), [
11697                 rec( 8, 1, NameSpace  ),
11698                 rec( 9, 1, OpenCreateMode ),
11699                 rec( 10, 2, SearchAttributesLow ),
11700                 rec( 12, 2, ReturnInfoMask ),
11701                 rec( 14, 2, ExtendedInfo ),
11702                 rec( 16, 4, AttributesDef32 ),
11703                 rec( 20, 2, DesiredAccessRights ),
11704                 rec( 22, 1, VolumeNumber ),
11705                 rec( 23, 4, DirectoryBase ),
11706                 rec( 27, 1, HandleFlag ),
11707                 rec( 28, 1, PathCount, var="x" ),
11708                 rec( 29, (1,255), Path, repeat="x" ),
11709         ], info_str=(Path, "Open or Create: %s", "/%s"))
11710         pkt.Reply( NO_LENGTH_CHECK, [
11711                 rec( 8, 4, FileHandle ),
11712                 rec( 12, 1, OpenCreateAction ),
11713                 rec( 13, 1, Reserved ),
11714                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
11715                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
11716                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
11717                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
11718                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
11719                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
11720                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
11721                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
11722                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
11723                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
11724                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
11725                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
11726                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
11727                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
11728                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
11729                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
11730                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
11731                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
11732                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
11733                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
11734                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
11735                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
11736                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
11737                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
11738                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
11739                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
11740                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
11741                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
11742                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
11743                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
11744                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
11745                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
11746                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
11747                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ), 
11748                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
11749                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
11750                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
11751                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ), 
11752                 srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ), 
11753                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ), 
11754                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ), 
11755                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ), 
11756                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ), 
11757                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ), 
11758                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
11759                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ), 
11760                 srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
11761         ])
11762         pkt.ReqCondSizeVariable()
11763         pkt.CompletionCodes([0x0000, 0x8001, 0x8101, 0x8401, 0x8501,
11764                              0x8701, 0x8900, 0x8d00, 0x8f00, 0x9001, 0x9600,
11765                              0x9804, 0x9b03, 0x9c03, 0xa500, 0xa802, 0xbf00, 0xfd00, 0xff16])
11766         # 2222/5702, 87/02
11767         pkt = NCP(0x5702, "Initialize Search", 'file', has_length=0)
11768         pkt.Request( (18,272), [
11769                 rec( 8, 1, NameSpace  ),
11770                 rec( 9, 1, Reserved ),
11771                 rec( 10, 1, VolumeNumber ),
11772                 rec( 11, 4, DirectoryBase ),
11773                 rec( 15, 1, HandleFlag ),
11774                 rec( 16, 1, PathCount, var="x" ),
11775                 rec( 17, (1,255), Path, repeat="x" ),
11776         ], info_str=(Path, "Set Search Pointer to: %s", "/%s"))
11777         pkt.Reply(17, [
11778                 rec( 8, 1, VolumeNumber ),
11779                 rec( 9, 4, DirectoryNumber ),
11780                 rec( 13, 4, DirectoryEntryNumber ),
11781         ])
11782         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11783                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11784                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11785         # 2222/5703, 87/03
11786         pkt = NCP(0x5703, "Search for File or Subdirectory", 'file', has_length=0)
11787         pkt.Request((26, 280), [
11788                 rec( 8, 1, NameSpace  ),
11789                 rec( 9, 1, DataStream ),
11790                 rec( 10, 2, SearchAttributesLow ),
11791                 rec( 12, 2, ReturnInfoMask ),
11792                 rec( 14, 2, ExtendedInfo ),
11793                 rec( 16, 9, SearchSequence ),
11794                 rec( 25, (1,255), SearchPattern ),
11795         ], info_str=(SearchPattern, "Search for: %s", "/%s"))
11796         pkt.Reply( NO_LENGTH_CHECK, [
11797                 rec( 8, 9, SearchSequence ),
11798                 rec( 17, 1, Reserved ),
11799                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
11800                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
11801                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
11802                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
11803                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
11804                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
11805                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
11806                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
11807                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
11808                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
11809                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
11810                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
11811                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
11812                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
11813                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
11814                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
11815                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
11816                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
11817                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
11818                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
11819                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
11820                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
11821                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
11822                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
11823                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
11824                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
11825                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
11826                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
11827                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
11828                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
11829                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
11830                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
11831                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
11832                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ), 
11833                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
11834                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
11835                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
11836                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ), 
11837                 srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ), 
11838                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ), 
11839                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ), 
11840                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ), 
11841                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ), 
11842                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ), 
11843                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
11844                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ), 
11845                 srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
11846         ])
11847         pkt.ReqCondSizeVariable()
11848         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11849                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11850                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11851         # 2222/5704, 87/04
11852         pkt = NCP(0x5704, "Rename Or Move a File or Subdirectory", 'file', has_length=0)
11853         pkt.Request((28, 536), [
11854                 rec( 8, 1, NameSpace  ),
11855                 rec( 9, 1, RenameFlag ),
11856                 rec( 10, 2, SearchAttributesLow ),
11857                 rec( 12, 1, VolumeNumber ),
11858                 rec( 13, 4, DirectoryBase ),
11859                 rec( 17, 1, HandleFlag ),
11860                 rec( 18, 1, PathCount, var="x" ),
11861                 rec( 19, 1, VolumeNumber ),
11862                 rec( 20, 4, DirectoryBase ),
11863                 rec( 24, 1, HandleFlag ),
11864                 rec( 25, 1, PathCount, var="y" ),
11865                 rec( 26, (1, 255), Path, repeat="x" ),
11866                 rec( -1, (1,255), Path, repeat="y" ),
11867         ], info_str=(Path, "Rename or Move: %s", "/%s"))
11868         pkt.Reply(8)
11869         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11870                              0x8701, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9200, 0x9600,
11871                              0x9804, 0x9a00, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11872         # 2222/5705, 87/05
11873         pkt = NCP(0x5705, "Scan File or Subdirectory for Trustees", 'file', has_length=0)
11874         pkt.Request((24, 278), [
11875                 rec( 8, 1, NameSpace  ),
11876                 rec( 9, 1, Reserved ),
11877                 rec( 10, 2, SearchAttributesLow ),
11878                 rec( 12, 4, SequenceNumber ),
11879                 rec( 16, 1, VolumeNumber ),
11880                 rec( 17, 4, DirectoryBase ),
11881                 rec( 21, 1, HandleFlag ),
11882                 rec( 22, 1, PathCount, var="x" ),
11883                 rec( 23, (1, 255), Path, repeat="x" ),
11884         ], info_str=(Path, "Scan Trustees for: %s", "/%s"))
11885         pkt.Reply(20, [
11886                 rec( 8, 4, SequenceNumber ),
11887                 rec( 12, 2, ObjectIDCount, var="x" ),
11888                 rec( 14, 6, TrusteeStruct, repeat="x" ),
11889         ])
11890         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11891                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
11892                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11893         # 2222/5706, 87/06
11894         pkt = NCP(0x5706, "Obtain File or SubDirectory Information", 'file', has_length=0)
11895         pkt.Request((24,278), [
11896                 rec( 10, 1, SrcNameSpace ),
11897                 rec( 11, 1, DestNameSpace ),
11898                 rec( 12, 2, SearchAttributesLow ),
11899                 rec( 14, 2, ReturnInfoMask, LE ),
11900                 rec( 16, 2, ExtendedInfo ),
11901                 rec( 18, 1, VolumeNumber ),
11902                 rec( 19, 4, DirectoryBase ),
11903                 rec( 23, 1, HandleFlag ),
11904                 rec( 24, 1, PathCount, var="x" ),
11905                 rec( 25, (1,255), Path, repeat="x",),
11906         ], info_str=(Path, "Obtain Info for: %s", "/%s"))
11907         pkt.Reply(NO_LENGTH_CHECK, [
11908             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
11909             srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
11910             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
11911             srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
11912             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
11913             srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
11914             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
11915             srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
11916             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
11917             srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
11918             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
11919             srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
11920             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
11921             srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
11922             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
11923             srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
11924             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
11925             srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
11926             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
11927             srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
11928             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
11929             srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
11930             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
11931             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
11932             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
11933             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
11934             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
11935             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
11936             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
11937             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
11938             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
11939             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
11940             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
11941             srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ), 
11942             srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
11943             srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
11944             srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
11945             srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ), 
11946             srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ), 
11947             srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ), 
11948             srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ), 
11949             srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ), 
11950             srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ), 
11951             srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ), 
11952             srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
11953             srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ), 
11954             srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
11955         ])
11956         pkt.ReqCondSizeVariable()
11957         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11958                              0x8701, 0x8900, 0x8d00, 0x8f00, 0x9001, 0x9600,
11959                              0x9804, 0x9b03, 0x9c03, 0xa802, 0xbf00, 0xfd00, 0xff16])
11960         # 2222/5707, 87/07
11961         pkt = NCP(0x5707, "Modify File or Subdirectory DOS Information", 'file', has_length=0)
11962         pkt.Request((62,316), [
11963                 rec( 8, 1, NameSpace ),
11964                 rec( 9, 1, Reserved ),
11965                 rec( 10, 2, SearchAttributesLow ),
11966                 rec( 12, 2, ModifyDOSInfoMask ),
11967                 rec( 14, 2, Reserved2 ),
11968                 rec( 16, 2, AttributesDef16 ),
11969                 rec( 18, 1, FileMode ),
11970                 rec( 19, 1, FileExtendedAttributes ),
11971                 rec( 20, 2, CreationDate ),
11972                 rec( 22, 2, CreationTime ),
11973                 rec( 24, 4, CreatorID, BE ),
11974                 rec( 28, 2, ModifiedDate ),
11975                 rec( 30, 2, ModifiedTime ),
11976                 rec( 32, 4, ModifierID, BE ),
11977                 rec( 36, 2, ArchivedDate ),
11978                 rec( 38, 2, ArchivedTime ),
11979                 rec( 40, 4, ArchiverID, BE ),
11980                 rec( 44, 2, LastAccessedDate ),
11981                 rec( 46, 2, InheritedRightsMask ),
11982                 rec( 48, 2, InheritanceRevokeMask ),
11983                 rec( 50, 4, MaxSpace ),
11984                 rec( 54, 1, VolumeNumber ),
11985                 rec( 55, 4, DirectoryBase ),
11986                 rec( 59, 1, HandleFlag ),
11987                 rec( 60, 1, PathCount, var="x" ),
11988                 rec( 61, (1,255), Path, repeat="x" ),
11989         ], info_str=(Path, "Modify DOS Information for: %s", "/%s"))
11990         pkt.Reply(8)
11991         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
11992                              0x8701, 0x8c01, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9600,
11993                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
11994         # 2222/5708, 87/08
11995         pkt = NCP(0x5708, "Delete a File or Subdirectory", 'file', has_length=0)
11996         pkt.Request((20,274), [
11997                 rec( 8, 1, NameSpace ),
11998                 rec( 9, 1, Reserved ),
11999                 rec( 10, 2, SearchAttributesLow ),
12000                 rec( 12, 1, VolumeNumber ),
12001                 rec( 13, 4, DirectoryBase ),
12002                 rec( 17, 1, HandleFlag ),
12003                 rec( 18, 1, PathCount, var="x" ),
12004                 rec( 19, (1,255), Path, repeat="x" ),
12005         ], info_str=(Path, "Delete: %s", "/%s"))
12006         pkt.Reply(8)
12007         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,  
12008                              0x8701, 0x8900, 0x8a00, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9600,
12009                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12010         # 2222/5709, 87/09
12011         pkt = NCP(0x5709, "Set Short Directory Handle", 'file', has_length=0)
12012         pkt.Request((20,274), [
12013                 rec( 8, 1, NameSpace ),
12014                 rec( 9, 1, DataStream ),
12015                 rec( 10, 1, DestDirHandle ),
12016                 rec( 11, 1, Reserved ),
12017                 rec( 12, 1, VolumeNumber ),
12018                 rec( 13, 4, DirectoryBase ),
12019                 rec( 17, 1, HandleFlag ),
12020                 rec( 18, 1, PathCount, var="x" ),
12021                 rec( 19, (1,255), Path, repeat="x" ),
12022         ], info_str=(Path, "Set Short Directory Handle to: %s", "/%s"))
12023         pkt.Reply(8)
12024         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12025                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12026                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12027         # 2222/570A, 87/10
12028         pkt = NCP(0x570A, "Add Trustee Set to File or Subdirectory", 'file', has_length=0)
12029         pkt.Request((31,285), [
12030                 rec( 8, 1, NameSpace ),
12031                 rec( 9, 1, Reserved ),
12032                 rec( 10, 2, SearchAttributesLow ),
12033                 rec( 12, 2, AccessRightsMaskWord ),
12034                 rec( 14, 2, ObjectIDCount, var="y" ),
12035                 rec( 16, 1, VolumeNumber ),
12036                 rec( 17, 4, DirectoryBase ),
12037                 rec( 21, 1, HandleFlag ),
12038                 rec( 22, 1, PathCount, var="x" ),
12039                 rec( 23, (1,255), Path, repeat="x" ),
12040                 rec( -1, 7, TrusteeStruct, repeat="y" ),
12041         ], info_str=(Path, "Add Trustee Set to: %s", "/%s"))
12042         pkt.Reply(8)
12043         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12044                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12045                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfc01, 0xfd00, 0xff16])
12046         # 2222/570B, 87/11
12047         pkt = NCP(0x570B, "Delete Trustee Set from File or SubDirectory", 'file', has_length=0)
12048         pkt.Request((27,281), [
12049                 rec( 8, 1, NameSpace ),
12050                 rec( 9, 1, Reserved ),
12051                 rec( 10, 2, ObjectIDCount, var="y" ),
12052                 rec( 12, 1, VolumeNumber ),
12053                 rec( 13, 4, DirectoryBase ),
12054                 rec( 17, 1, HandleFlag ),
12055                 rec( 18, 1, PathCount, var="x" ),
12056                 rec( 19, (1,255), Path, repeat="x" ),
12057                 rec( -1, 7, TrusteeStruct, repeat="y" ),
12058         ], info_str=(Path, "Delete Trustee Set from: %s", "/%s"))
12059         pkt.Reply(8)
12060         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12061                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12062                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12063         # 2222/570C, 87/12
12064         pkt = NCP(0x570C, "Allocate Short Directory Handle", 'file', has_length=0)
12065         pkt.Request((20,274), [
12066                 rec( 8, 1, NameSpace ),
12067                 rec( 9, 1, Reserved ),
12068                 rec( 10, 2, AllocateMode ),
12069                 rec( 12, 1, VolumeNumber ),
12070                 rec( 13, 4, DirectoryBase ),
12071                 rec( 17, 1, HandleFlag ),
12072                 rec( 18, 1, PathCount, var="x" ),
12073                 rec( 19, (1,255), Path, repeat="x" ),
12074         ], info_str=(Path, "Allocate Short Directory Handle to: %s", "/%s"))
12075         pkt.Reply(14, [
12076                 rec( 8, 1, DirHandle ),
12077                 rec( 9, 1, VolumeNumber ),
12078                 rec( 10, 4, Reserved4 ),
12079         ])
12080         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12081                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12082                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12083         # 2222/5710, 87/16
12084         pkt = NCP(0x5710, "Scan Salvageable Files", 'file', has_length=0)
12085         pkt.Request((26,280), [
12086                 rec( 8, 1, NameSpace ),
12087                 rec( 9, 1, DataStream ),
12088                 rec( 10, 2, ReturnInfoMask ),
12089                 rec( 12, 2, ExtendedInfo ),
12090                 rec( 14, 4, SequenceNumber ),
12091                 rec( 18, 1, VolumeNumber ),
12092                 rec( 19, 4, DirectoryBase ),
12093                 rec( 23, 1, HandleFlag ),
12094                 rec( 24, 1, PathCount, var="x" ),
12095                 rec( 25, (1,255), Path, repeat="x" ),
12096         ], info_str=(Path, "Scan for Deleted Files in: %s", "/%s"))
12097         pkt.Reply(NO_LENGTH_CHECK, [
12098                 rec( 8, 4, SequenceNumber ),
12099                 rec( 12, 2, DeletedTime ),
12100                 rec( 14, 2, DeletedDate ),
12101                 rec( 16, 4, DeletedID, BE ),
12102                 rec( 20, 4, VolumeID ),
12103                 rec( 24, 4, DirectoryBase ),
12104                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12105                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12106                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12107                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12108                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12109                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12110                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12111                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12112                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12113                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12114                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12115                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12116                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12117                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12118                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12119                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12120                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12121                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12122                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12123                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12124                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12125                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12126                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12127                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12128                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12129                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12130                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12131                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12132                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12133                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12134                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12135                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12136                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12137                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12138                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12139         ])
12140         pkt.ReqCondSizeVariable()
12141         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12142                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12143                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12144         # 2222/5711, 87/17
12145         pkt = NCP(0x5711, "Recover Salvageable File", 'file', has_length=0)
12146         pkt.Request((23,277), [
12147                 rec( 8, 1, NameSpace ),
12148                 rec( 9, 1, Reserved ),
12149                 rec( 10, 4, SequenceNumber ),
12150                 rec( 14, 4, VolumeID ),
12151                 rec( 18, 4, DirectoryBase ),
12152                 rec( 22, (1,255), FileName ),
12153         ], info_str=(FileName, "Recover Deleted File: %s", ", %s"))
12154         pkt.Reply(8)
12155         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12156                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12157                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12158         # 2222/5712, 87/18
12159         pkt = NCP(0x5712, "Purge Salvageable Files", 'file', has_length=0)
12160         pkt.Request(22, [
12161                 rec( 8, 1, NameSpace ),
12162                 rec( 9, 1, Reserved ),
12163                 rec( 10, 4, SequenceNumber ),
12164                 rec( 14, 4, VolumeID ),
12165                 rec( 18, 4, DirectoryBase ),
12166         ])
12167         pkt.Reply(8)
12168         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12169                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12170                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12171         # 2222/5713, 87/19
12172         pkt = NCP(0x5713, "Get Name Space Information", 'file', has_length=0)
12173         pkt.Request(18, [
12174                 rec( 8, 1, SrcNameSpace ),
12175                 rec( 9, 1, DestNameSpace ),
12176                 rec( 10, 1, Reserved ),
12177                 rec( 11, 1, VolumeNumber ),
12178                 rec( 12, 4, DirectoryBase ),
12179                 rec( 16, 2, NamesSpaceInfoMask ),
12180         ])
12181         pkt.Reply(NO_LENGTH_CHECK, [
12182             srec( FileNameStruct, req_cond="ncp.ns_info_mask_modify == TRUE" ),
12183             srec( FileAttributesStruct, req_cond="ncp.ns_info_mask_fatt == TRUE" ),
12184             srec( CreationDateStruct, req_cond="ncp.ns_info_mask_cdate == TRUE" ),
12185             srec( CreationTimeStruct, req_cond="ncp.ns_info_mask_ctime == TRUE" ),
12186             srec( OwnerIDStruct, req_cond="ncp.ns_info_mask_owner == TRUE" ),
12187             srec( ArchiveDateStruct, req_cond="ncp.ns_info_mask_adate == TRUE" ),
12188             srec( ArchiveTimeStruct, req_cond="ncp.ns_info_mask_atime == TRUE" ),
12189             srec( ArchiveIdStruct, req_cond="ncp.ns_info_mask_aid == TRUE" ),
12190             srec( UpdateDateStruct, req_cond="ncp.ns_info_mask_udate == TRUE" ),
12191             srec( UpdateTimeStruct, req_cond="ncp.ns_info_mask_utime == TRUE" ),
12192             srec( UpdateIDStruct, req_cond="ncp.ns_info_mask_uid == TRUE" ),
12193             srec( LastAccessStruct, req_cond="ncp.ns_info_mask_acc_date == TRUE" ),
12194             srec( RightsInfoStruct, req_cond="ncp.ns_info_mask_max_acc_mask == TRUE" ),
12195         ])
12196         pkt.ReqCondSizeVariable()
12197         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12198                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12199                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12200         # 2222/5714, 87/20
12201         pkt = NCP(0x5714, "Search for File or Subdirectory Set", 'file', has_length=0)
12202         pkt.Request((28, 282), [
12203                 rec( 8, 1, NameSpace  ),
12204                 rec( 9, 1, DataStream ),
12205                 rec( 10, 2, SearchAttributesLow ),
12206                 rec( 12, 2, ReturnInfoMask ),
12207                 rec( 14, 2, ExtendedInfo ),
12208                 rec( 16, 2, ReturnInfoCount ),
12209                 rec( 18, 9, SearchSequence ),
12210                 rec( 27, (1,255), SearchPattern ),
12211         ], info_str=(SearchPattern, "Search for: %s", ", %s"))
12212         pkt.Reply(NO_LENGTH_CHECK, [
12213                 rec( 8, 9, SearchSequence ),
12214                 rec( 17, 1, MoreFlag ),
12215                 rec( 18, 2, InfoCount ),
12216             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12217             srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12218             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12219             srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12220             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12221             srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12222             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12223             srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12224             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12225             srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12226             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12227             srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12228             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12229             srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12230             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12231             srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12232             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12233             srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12234             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12235             srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12236             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12237             srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12238             srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12239             srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12240             srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12241             srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12242             srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12243             srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12244             srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12245             srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12246             srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12247             srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12248             srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12249             srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ), 
12250             srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
12251             srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
12252             srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
12253             srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ), 
12254             srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ), 
12255             srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ), 
12256             srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ), 
12257             srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ), 
12258             srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ), 
12259             srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ), 
12260             srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
12261             srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ), 
12262             srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
12263         ])
12264         pkt.ReqCondSizeVariable()
12265         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12266                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12267                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12268         # 2222/5715, 87/21
12269         pkt = NCP(0x5715, "Get Path String from Short Directory Handle", 'file', has_length=0)
12270         pkt.Request(10, [
12271                 rec( 8, 1, NameSpace ),
12272                 rec( 9, 1, DirHandle ),
12273         ])
12274         pkt.Reply((9,263), [
12275                 rec( 8, (1,255), Path ),
12276         ])
12277         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12278                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12279                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
12280         # 2222/5716, 87/22
12281         pkt = NCP(0x5716, "Generate Directory Base and Volume Number", 'file', has_length=0)
12282         pkt.Request((20,274), [
12283                 rec( 8, 1, SrcNameSpace ),
12284                 rec( 9, 1, DestNameSpace ),
12285                 rec( 10, 2, dstNSIndicator ),
12286                 rec( 12, 1, VolumeNumber ),
12287                 rec( 13, 4, DirectoryBase ),
12288                 rec( 17, 1, HandleFlag ),
12289                 rec( 18, 1, PathCount, var="x" ),
12290                 rec( 19, (1,255), Path, repeat="x" ),
12291         ], info_str=(Path, "Get Volume and Directory Base from: %s", "/%s"))
12292         pkt.Reply(17, [
12293                 rec( 8, 4, DirectoryBase ),
12294                 rec( 12, 4, DOSDirectoryBase ),
12295                 rec( 16, 1, VolumeNumber ),
12296         ])
12297         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12298                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12299                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12300         # 2222/5717, 87/23
12301         pkt = NCP(0x5717, "Query Name Space Information Format", 'file', has_length=0)
12302         pkt.Request(10, [
12303                 rec( 8, 1, NameSpace ),
12304                 rec( 9, 1, VolumeNumber ),
12305         ])
12306         pkt.Reply(58, [
12307                 rec( 8, 4, FixedBitMask ),
12308                 rec( 12, 4, VariableBitMask ),
12309                 rec( 16, 4, HugeBitMask ),
12310                 rec( 20, 2, FixedBitsDefined ),
12311                 rec( 22, 2, VariableBitsDefined ),
12312                 rec( 24, 2, HugeBitsDefined ),
12313                 rec( 26, 32, FieldsLenTable ),
12314         ])
12315         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12316                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12317                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12318         # 2222/5718, 87/24
12319         pkt = NCP(0x5718, "Get Name Spaces Loaded List from Volume Number", 'file', has_length=0)
12320         pkt.Request(10, [
12321                 rec( 8, 1, Reserved ),
12322                 rec( 9, 1, VolumeNumber ),
12323         ])
12324         pkt.Reply(11, [
12325                 rec( 8, 2, NumberOfNSLoaded, var="x" ),
12326                 rec( 10, 1, NameSpace, repeat="x" ),
12327         ])
12328         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12329                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12330                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12331         # 2222/5719, 87/25
12332         pkt = NCP(0x5719, "Set Name Space Information", 'file', has_length=0)
12333         pkt.Request(531, [
12334                 rec( 8, 1, SrcNameSpace ),
12335                 rec( 9, 1, DestNameSpace ),
12336                 rec( 10, 1, VolumeNumber ),
12337                 rec( 11, 4, DirectoryBase ),
12338                 rec( 15, 2, NamesSpaceInfoMask ),
12339                 rec( 17, 2, Reserved2 ),
12340                 rec( 19, 512, NSSpecificInfo ),
12341         ])
12342         pkt.Reply(8)
12343         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12344                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12345                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12346                              0xff16])
12347         # 2222/571A, 87/26
12348         pkt = NCP(0x571A, "Get Huge Name Space Information", 'file', has_length=0)
12349         pkt.Request(34, [
12350                 rec( 8, 1, NameSpace ),
12351                 rec( 9, 1, VolumeNumber ),
12352                 rec( 10, 4, DirectoryBase ),
12353                 rec( 14, 4, HugeBitMask ),
12354                 rec( 18, 16, HugeStateInfo ),
12355         ])
12356         pkt.Reply((25,279), [
12357                 rec( 8, 16, NextHugeStateInfo ),
12358                 rec( 24, (1,255), HugeData ),
12359         ])
12360         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12361                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12362                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12363                              0xff16])
12364         # 2222/571B, 87/27
12365         pkt = NCP(0x571B, "Set Huge Name Space Information", 'file', has_length=0)
12366         pkt.Request((35,289), [
12367                 rec( 8, 1, NameSpace ),
12368                 rec( 9, 1, VolumeNumber ),
12369                 rec( 10, 4, DirectoryBase ),
12370                 rec( 14, 4, HugeBitMask ),
12371                 rec( 18, 16, HugeStateInfo ),
12372                 rec( 34, (1,255), HugeData ),
12373         ])
12374         pkt.Reply(28, [
12375                 rec( 8, 16, NextHugeStateInfo ),
12376                 rec( 24, 4, HugeDataUsed ),
12377         ])
12378         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12379                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12380                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12381                              0xff16])
12382         # 2222/571C, 87/28
12383         pkt = NCP(0x571C, "Get Full Path String", 'file', has_length=0)
12384         pkt.Request((28,282), [
12385                 rec( 8, 1, SrcNameSpace ),
12386                 rec( 9, 1, DestNameSpace ),
12387                 rec( 10, 2, PathCookieFlags ),
12388                 rec( 12, 4, Cookie1 ),
12389                 rec( 16, 4, Cookie2 ),
12390                 rec( 20, 1, VolumeNumber ),
12391                 rec( 21, 4, DirectoryBase ),
12392                 rec( 25, 1, HandleFlag ),
12393                 rec( 26, 1, PathCount, var="x" ),
12394                 rec( 27, (1,255), Path, repeat="x" ),
12395         ], info_str=(Path, "Get Full Path from: %s", "/%s"))
12396         pkt.Reply((23,277), [
12397                 rec( 8, 2, PathCookieFlags ),
12398                 rec( 10, 4, Cookie1 ),
12399                 rec( 14, 4, Cookie2 ),
12400                 rec( 18, 2, PathComponentSize ),
12401                 rec( 20, 2, PathComponentCount, var='x' ),
12402                 rec( 22, (1,255), Path, repeat='x' ),
12403         ])
12404         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12405                              0x8701, 0x8b00, 0x8d00, 0x8f00, 0x9001,
12406                              0x9600, 0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12407                              0xff16])
12408         # 2222/571D, 87/29
12409         pkt = NCP(0x571D, "Get Effective Directory Rights", 'file', has_length=0)
12410         pkt.Request((24, 278), [
12411                 rec( 8, 1, NameSpace  ),
12412                 rec( 9, 1, DestNameSpace ),
12413                 rec( 10, 2, SearchAttributesLow ),
12414                 rec( 12, 2, ReturnInfoMask ),
12415                 rec( 14, 2, ExtendedInfo ),
12416                 rec( 16, 1, VolumeNumber ),
12417                 rec( 17, 4, DirectoryBase ),
12418                 rec( 21, 1, HandleFlag ),
12419                 rec( 22, 1, PathCount, var="x" ),
12420                 rec( 23, (1,255), Path, repeat="x" ),
12421         ], info_str=(Path, "Get Effective Rights for: %s", "/%s"))
12422         pkt.Reply(NO_LENGTH_CHECK, [
12423                 rec( 8, 2, EffectiveRights ),
12424                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12425                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12426                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12427                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12428                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12429                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12430                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12431                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12432                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12433                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12434                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12435                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12436                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12437                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12438                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12439                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12440                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12441                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12442                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12443                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12444                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12445                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12446                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12447                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12448                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12449                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12450                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12451                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12452                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12453                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12454                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12455                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12456                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12457                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12458                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12459         ])
12460         pkt.ReqCondSizeVariable()
12461         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12462                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12463                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12464         # 2222/571E, 87/30
12465         pkt = NCP(0x571E, "Open/Create File or Subdirectory", 'file', has_length=0)
12466         pkt.Request((34, 288), [
12467                 rec( 8, 1, NameSpace  ),
12468                 rec( 9, 1, DataStream ),
12469                 rec( 10, 1, OpenCreateMode ),
12470                 rec( 11, 1, Reserved ),
12471                 rec( 12, 2, SearchAttributesLow ),
12472                 rec( 14, 2, Reserved2 ),
12473                 rec( 16, 2, ReturnInfoMask ),
12474                 rec( 18, 2, ExtendedInfo ),
12475                 rec( 20, 4, AttributesDef32 ),
12476                 rec( 24, 2, DesiredAccessRights ),
12477                 rec( 26, 1, VolumeNumber ),
12478                 rec( 27, 4, DirectoryBase ),
12479                 rec( 31, 1, HandleFlag ),
12480                 rec( 32, 1, PathCount, var="x" ),
12481                 rec( 33, (1,255), Path, repeat="x" ),
12482         ], info_str=(Path, "Open or Create File: %s", "/%s"))
12483         pkt.Reply(NO_LENGTH_CHECK, [
12484                 rec( 8, 4, FileHandle, BE ),
12485                 rec( 12, 1, OpenCreateAction ),
12486                 rec( 13, 1, Reserved ),
12487                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12488                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12489                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12490                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12491                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12492                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12493                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12494                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12495                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12496                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12497                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12498                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12499                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12500                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12501                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12502                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12503                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12504                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12505                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12506                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12507                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12508                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12509                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12510                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12511                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12512                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12513                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12514                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12515                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12516                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12517                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12518                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12519                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12520                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12521                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12522         ])
12523         pkt.ReqCondSizeVariable()
12524         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12525                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12526                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12527         # 2222/571F, 87/31
12528         pkt = NCP(0x571F, "Get File Information", 'file', has_length=0)
12529         pkt.Request(16, [
12530                 rec( 8, 6, FileHandle  ),
12531                 rec( 14, 1, HandleInfoLevel ),
12532                 rec( 15, 1, NameSpace ),
12533         ])
12534         pkt.Reply(NO_LENGTH_CHECK, [
12535                 rec( 8, 4, VolumeNumberLong ),
12536                 rec( 12, 4, DirectoryBase ),
12537                 srec(HandleInfoLevel0, req_cond="ncp.handle_info_level==0x00" ),
12538                 srec(HandleInfoLevel1, req_cond="ncp.handle_info_level==0x01" ),
12539                 srec(HandleInfoLevel2, req_cond="ncp.handle_info_level==0x02" ),
12540                 srec(HandleInfoLevel3, req_cond="ncp.handle_info_level==0x03" ),
12541                 srec(HandleInfoLevel4, req_cond="ncp.handle_info_level==0x04" ),
12542                 srec(HandleInfoLevel5, req_cond="ncp.handle_info_level==0x05" ),
12543         ])
12544         pkt.ReqCondSizeVariable()
12545         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12546                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12547                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12548         # 2222/5720, 87/32 
12549         pkt = NCP(0x5720, "Open/Create File or Subdirectory with Callback", 'file', has_length=0)
12550         pkt.Request((30, 284), [
12551                 rec( 8, 1, NameSpace  ),
12552                 rec( 9, 1, OpenCreateMode ),
12553                 rec( 10, 2, SearchAttributesLow ),
12554                 rec( 12, 2, ReturnInfoMask ),
12555                 rec( 14, 2, ExtendedInfo ),
12556                 rec( 16, 4, AttributesDef32 ),
12557                 rec( 20, 2, DesiredAccessRights ),
12558                 rec( 22, 1, VolumeNumber ),
12559                 rec( 23, 4, DirectoryBase ),
12560                 rec( 27, 1, HandleFlag ),
12561                 rec( 28, 1, PathCount, var="x" ),
12562                 rec( 29, (1,255), Path, repeat="x" ),
12563         ], info_str=(Path, "Open or Create with Op-Lock: %s", "/%s"))
12564         pkt.Reply( NO_LENGTH_CHECK, [
12565                 rec( 8, 4, FileHandle, BE ),
12566                 rec( 12, 1, OpenCreateAction ),
12567                 rec( 13, 1, OCRetFlags ),
12568                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12569                 srec( PadDSSpaceAllocate, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12570                 srec( AttributesStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12571                 srec( PadAttributes, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12572                 srec( DataStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12573                 srec( PadDataStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12574                 srec( TotalStreamSizeStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12575                 srec( PadTotalStreamSize, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12576                 srec( CreationInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12577                 srec( PadCreationInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12578                 srec( ModifyInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12579                 srec( PadModifyInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12580                 srec( ArchiveInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12581                 srec( PadArchiveInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12582                 srec( RightsInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12583                 srec( PadRightsInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12584                 srec( DirEntryStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12585                 srec( PadDirEntry, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12586                 srec( EAInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12587                 srec( PadEAInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12588                 srec( NSInfoStruct, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12589                 srec( PadNSInfo, req_cond="(ncp.ret_info_mask != 0x0000) && (ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12590                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12591                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12592                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12593                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12594                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12595                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12596                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12597                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12598                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12599                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12600                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12601                 srec( ReferenceIDStruct, req_cond="ncp.ret_info_mask_id == 1" ), 
12602                 srec( NSAttributeStruct, req_cond="ncp.ret_info_mask_ns_attr == 1" ),
12603                 srec( DStreamActual, req_cond="ncp.ret_info_mask_actual == 1" ),
12604                 srec( DStreamLogical, req_cond="ncp.ret_info_mask_logical == 1" ),
12605                 srec( LastUpdatedInSecondsStruct, req_cond="ncp.ext_info_update == 1" ), 
12606                 srec( DOSNameStruct, req_cond="ncp.ext_info_dos_name == 1" ), 
12607                 srec( FlushTimeStruct, req_cond="ncp.ext_info_flush == 1" ), 
12608                 srec( ParentBaseIDStruct, req_cond="ncp.ext_info_parental == 1" ), 
12609                 srec( MacFinderInfoStruct, req_cond="ncp.ext_info_mac_finder == 1" ), 
12610                 srec( SiblingCountStruct, req_cond="ncp.ext_info_sibling == 1" ), 
12611                 srec( EffectiveRightsStruct, req_cond="ncp.ext_info_effective == 1" ), 
12612                 srec( MacTimeStruct, req_cond="ncp.ext_info_mac_date == 1" ),
12613                 srec( LastAccessedTimeStruct, req_cond="ncp.ext_info_access == 1" ), 
12614                 srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
12615         ])
12616         pkt.ReqCondSizeVariable()
12617         pkt.CompletionCodes([0x0000, 0x7f00, 0x8000, 0x8101, 0x8401, 0x8501,
12618                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12619                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12620         # 2222/5721, 87/33
12621         pkt = NCP(0x5721, "Open/Create File or Subdirectory II with Callback", 'file', has_length=0)
12622         pkt.Request((34, 288), [
12623                 rec( 8, 1, NameSpace  ),
12624                 rec( 9, 1, DataStream ),
12625                 rec( 10, 1, OpenCreateMode ),
12626                 rec( 11, 1, Reserved ),
12627                 rec( 12, 2, SearchAttributesLow ),
12628                 rec( 14, 2, Reserved2 ),
12629                 rec( 16, 2, ReturnInfoMask ),
12630                 rec( 18, 2, ExtendedInfo ),
12631                 rec( 20, 4, AttributesDef32 ),
12632                 rec( 24, 2, DesiredAccessRights ),
12633                 rec( 26, 1, VolumeNumber ),
12634                 rec( 27, 4, DirectoryBase ),
12635                 rec( 31, 1, HandleFlag ),
12636                 rec( 32, 1, PathCount, var="x" ),
12637                 rec( 33, (1,255), Path, repeat="x" ),
12638         ], info_str=(FilePath, "Open or Create II with Op-Lock: %s", "/%s"))
12639         pkt.Reply((91,345), [
12640                 rec( 8, 4, FileHandle ),
12641                 rec( 12, 1, OpenCreateAction ),
12642                 rec( 13, 1, OCRetFlags ),
12643                 rec( 14, 4, DataStreamSpaceAlloc ),
12644                 rec( 18, 6, AttributesStruct ),
12645                 rec( 24, 4, DataStreamSize ),
12646                 rec( 28, 4, TtlDSDskSpaceAlloc ),
12647                 rec( 32, 2, NumberOfDataStreams ),
12648                 rec( 34, 2, CreationTime ),
12649                 rec( 36, 2, CreationDate ),
12650                 rec( 38, 4, CreatorID, BE ),
12651                 rec( 42, 2, ModifiedTime ),
12652                 rec( 44, 2, ModifiedDate ),
12653                 rec( 46, 4, ModifierID, BE ),
12654                 rec( 50, 2, LastAccessedDate ),
12655                 rec( 52, 2, ArchivedTime ),
12656                 rec( 54, 2, ArchivedDate ),
12657                 rec( 56, 4, ArchiverID, BE ),
12658                 rec( 60, 2, InheritedRightsMask ),
12659                 rec( 62, 4, DirectoryEntryNumber ),
12660                 rec( 66, 4, DOSDirectoryEntryNumber ),
12661                 rec( 70, 4, VolumeNumberLong ),
12662                 rec( 74, 4, EADataSize ),
12663                 rec( 78, 4, EACount ),
12664                 rec( 82, 4, EAKeySize ),
12665                 rec( 86, 1, CreatorNameSpaceNumber ),
12666                 rec( 87, 3, Reserved3 ),
12667                 rec( 90, (1,255), FileName ),
12668         ])
12669         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12670                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12671                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12672         # 2222/5722, 87/34
12673         pkt = NCP(0x5722, "Open CallBack Control (Op-Lock)", 'file', has_length=0)
12674         pkt.Request(13, [
12675                 rec( 10, 4, CCFileHandle ),
12676                 rec( 14, 1, CCFunction ),
12677         ])
12678         pkt.Reply(8)
12679         pkt.CompletionCodes([0x0000, 0x8800])
12680         # 2222/5723, 87/35
12681         pkt = NCP(0x5723, "Modify DOS Attributes on a File or Subdirectory", 'file', has_length=0)
12682         pkt.Request((28, 282), [
12683                 rec( 8, 1, NameSpace  ),
12684                 rec( 9, 1, Flags ),
12685                 rec( 10, 2, SearchAttributesLow ),
12686                 rec( 12, 2, ReturnInfoMask ),
12687                 rec( 14, 2, ExtendedInfo ),
12688                 rec( 16, 4, AttributesDef32 ),
12689                 rec( 20, 1, VolumeNumber ),
12690                 rec( 21, 4, DirectoryBase ),
12691                 rec( 25, 1, HandleFlag ),
12692                 rec( 26, 1, PathCount, var="x" ),
12693                 rec( 27, (1,255), Path, repeat="x" ),
12694         ], info_str=(Path, "Modify DOS Attributes for: %s", "/%s"))
12695         pkt.Reply(24, [
12696                 rec( 8, 4, ItemsChecked ),
12697                 rec( 12, 4, ItemsChanged ),
12698                 rec( 16, 4, AttributeValidFlag ),
12699                 rec( 20, 4, AttributesDef32 ),
12700         ])
12701         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12702                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12703                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12704         # 2222/5724, 87/36
12705         pkt = NCP(0x5724, "Log File", 'file', has_length=0)
12706         pkt.Request((28, 282), [
12707                 rec( 8, 1, NameSpace  ),
12708                 rec( 9, 1, Reserved ),
12709                 rec( 10, 2, Reserved2 ),
12710                 rec( 12, 1, LogFileFlagLow ),
12711                 rec( 13, 1, LogFileFlagHigh ),
12712                 rec( 14, 2, Reserved2 ),
12713                 rec( 16, 4, WaitTime ),
12714                 rec( 20, 1, VolumeNumber ),
12715                 rec( 21, 4, DirectoryBase ),
12716                 rec( 25, 1, HandleFlag ),
12717                 rec( 26, 1, PathCount, var="x" ),
12718                 rec( 27, (1,255), Path, repeat="x" ),
12719         ], info_str=(Path, "Lock File: %s", "/%s"))
12720         pkt.Reply(8)
12721         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12722                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12723                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12724         # 2222/5725, 87/37
12725         pkt = NCP(0x5725, "Release File", 'file', has_length=0)
12726         pkt.Request((20, 274), [
12727                 rec( 8, 1, NameSpace  ),
12728                 rec( 9, 1, Reserved ),
12729                 rec( 10, 2, Reserved2 ),
12730                 rec( 12, 1, VolumeNumber ),
12731                 rec( 13, 4, DirectoryBase ),
12732                 rec( 17, 1, HandleFlag ),
12733                 rec( 18, 1, PathCount, var="x" ),
12734                 rec( 19, (1,255), Path, repeat="x" ),
12735         ], info_str=(Path, "Release Lock on: %s", "/%s"))
12736         pkt.Reply(8)
12737         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12738                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12739                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12740         # 2222/5726, 87/38
12741         pkt = NCP(0x5726, "Clear File", 'file', has_length=0)
12742         pkt.Request((20, 274), [
12743                 rec( 8, 1, NameSpace  ),
12744                 rec( 9, 1, Reserved ),
12745                 rec( 10, 2, Reserved2 ),
12746                 rec( 12, 1, VolumeNumber ),
12747                 rec( 13, 4, DirectoryBase ),
12748                 rec( 17, 1, HandleFlag ),
12749                 rec( 18, 1, PathCount, var="x" ),
12750                 rec( 19, (1,255), Path, repeat="x" ),
12751         ], info_str=(Path, "Clear File: %s", "/%s"))
12752         pkt.Reply(8)
12753         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12754                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12755                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12756         # 2222/5727, 87/39
12757         pkt = NCP(0x5727, "Get Directory Disk Space Restriction", 'file', has_length=0)
12758         pkt.Request((19, 273), [
12759                 rec( 8, 1, NameSpace  ),
12760                 rec( 9, 2, Reserved2 ),
12761                 rec( 11, 1, VolumeNumber ),
12762                 rec( 12, 4, DirectoryBase ),
12763                 rec( 16, 1, HandleFlag ),
12764                 rec( 17, 1, PathCount, var="x" ),
12765                 rec( 18, (1,255), Path, repeat="x" ),
12766         ], info_str=(Path, "Get Disk Space Restriction for: %s", "/%s"))
12767         pkt.Reply(18, [
12768                 rec( 8, 1, NumberOfEntries, var="x" ),
12769                 rec( 9, 9, SpaceStruct, repeat="x" ),
12770         ])
12771         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12772                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12773                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00,
12774                              0xff16])
12775         # 2222/5728, 87/40
12776         pkt = NCP(0x5728, "Search for File or Subdirectory Set (Extended Errors)", 'file', has_length=0)
12777         pkt.Request((28, 282), [
12778                 rec( 8, 1, NameSpace  ),
12779                 rec( 9, 1, DataStream ),
12780                 rec( 10, 2, SearchAttributesLow ),
12781                 rec( 12, 2, ReturnInfoMask ),
12782                 rec( 14, 2, ExtendedInfo ),
12783                 rec( 16, 2, ReturnInfoCount ),
12784                 rec( 18, 9, SearchSequence ),
12785                 rec( 27, (1,255), SearchPattern ),
12786         ], info_str=(SearchPattern, "Search for: %s", ", %s"))
12787         pkt.Reply(NO_LENGTH_CHECK, [
12788                 rec( 8, 9, SearchSequence ),
12789                 rec( 17, 1, MoreFlag ),
12790                 rec( 18, 2, InfoCount ),
12791                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 1)" ),
12792                 srec( PadDSSpaceAllocate, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_alloc == 0)" ),
12793                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 1)" ),
12794                 srec( PadAttributes, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_attr == 0)" ),
12795                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 1)" ),
12796                 srec( PadDataStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_size == 0)" ),
12797                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 1)" ),
12798                 srec( PadTotalStreamSize, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_tspace == 0)" ),
12799                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 1)" ),
12800                 srec( PadCreationInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_create == 0)" ),
12801                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 1)" ),
12802                 srec( PadModifyInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_mod == 0)" ),
12803                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 1)" ),
12804                 srec( PadArchiveInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_arch == 0)" ),
12805                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 1)" ),
12806                 srec( PadRightsInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_rights == 0)" ),
12807                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 1)" ),
12808                 srec( PadDirEntry, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_dir == 0)" ),
12809                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 1)" ),
12810                 srec( PadEAInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_eattr == 0)" ),
12811                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 1)" ),
12812                 srec( PadNSInfo, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_ns == 0)" ),
12813                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 0) && (ncp.ret_info_mask_fname == 1)" ),
12814                 srec( DSSpaceAllocateStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_alloc  == 1)" ),
12815                 srec( AttributesStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_attr == 1)" ),
12816                 srec( DataStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_size == 1)" ),
12817                 srec( TotalStreamSizeStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_tspace == 1)" ),
12818                 srec( CreationInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_create == 1)" ),
12819                 srec( ModifyInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_mod == 1)" ),
12820                 srec( ArchiveInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_arch == 1)" ),
12821                 srec( RightsInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_rights == 1)" ),
12822                 srec( DirEntryStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_dir == 1)" ),
12823                 srec( EAInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_eattr == 1)" ),
12824                 srec( NSInfoStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_ns == 1)" ),
12825                 srec( FileNameStruct, req_cond="(ncp.ext_info_newstyle == 1) && (ncp.ret_info_mask_fname == 1)" ),
12826         ])
12827         pkt.ReqCondSizeVariable()
12828         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12829                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12830                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12831         # 2222/5729, 87/41
12832         pkt = NCP(0x5729, "Scan Salvageable Files", 'file', has_length=0)
12833         pkt.Request((24,278), [
12834                 rec( 8, 1, NameSpace ),
12835                 rec( 9, 1, Reserved ),
12836                 rec( 10, 2, CtrlFlags, LE ),
12837                 rec( 12, 4, SequenceNumber ),
12838                 rec( 16, 1, VolumeNumber ),
12839                 rec( 17, 4, DirectoryBase ),
12840                 rec( 21, 1, HandleFlag ),
12841                 rec( 22, 1, PathCount, var="x" ),
12842                 rec( 23, (1,255), Path, repeat="x" ),
12843         ], info_str=(Path, "Scan Deleted Files: %s", "/%s"))
12844         pkt.Reply(NO_LENGTH_CHECK, [
12845                 rec( 8, 4, SequenceNumber ),
12846                 rec( 12, 4, DirectoryBase ),
12847                 rec( 16, 4, ScanItems, var="x" ),
12848                 srec(ScanInfoFileName, req_cond="ncp.ctrl_flags==0x0001", repeat="x" ),
12849                 srec(ScanInfoFileNoName, req_cond="ncp.ctrl_flags==0x0000", repeat="x" ),
12850         ])
12851         pkt.ReqCondSizeVariable()
12852         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12853                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12854                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12855         # 2222/572A, 87/42
12856         pkt = NCP(0x572A, "Purge Salvageable File List", 'file', has_length=0)
12857         pkt.Request(28, [
12858                 rec( 8, 1, NameSpace ),
12859                 rec( 9, 1, Reserved ),
12860                 rec( 10, 2, PurgeFlags ),
12861                 rec( 12, 4, VolumeNumberLong ),
12862                 rec( 16, 4, DirectoryBase ),
12863                 rec( 20, 4, PurgeCount, var="x" ),
12864                 rec( 24, 4, PurgeList, repeat="x" ),
12865         ])
12866         pkt.Reply(16, [
12867                 rec( 8, 4, PurgeCount, var="x" ),
12868                 rec( 12, 4, PurgeCcode, repeat="x" ),
12869         ])
12870         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12871                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12872                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12873         # 2222/572B, 87/43
12874         pkt = NCP(0x572B, "Revoke File Handle Rights", 'file', has_length=0)
12875         pkt.Request(17, [
12876                 rec( 8, 3, Reserved3 ),
12877                 rec( 11, 1, RevQueryFlag ),
12878                 rec( 12, 4, FileHandle ),
12879                 rec( 16, 1, RemoveOpenRights ),
12880         ])
12881         pkt.Reply(13, [
12882                 rec( 8, 4, FileHandle ),
12883                 rec( 12, 1, OpenRights ),
12884         ])
12885         pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
12886                              0x8701, 0x8d00, 0x8f00, 0x9001, 0x9600,
12887                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12888         # 2222/572C, 87/44
12889         pkt = NCP(0x572C, "Update File Handle Rights", 'file', has_length=0)
12890         pkt.Request(24, [
12891                 rec( 8, 2, Reserved2 ),
12892                 rec( 10, 1, VolumeNumber ),
12893                 rec( 11, 1, NameSpace ),
12894                 rec( 12, 4, DirectoryNumber ),
12895                 rec( 16, 2, AccessRightsMaskWord ),
12896                 rec( 18, 2, NewAccessRights ),
12897                 rec( 20, 4, FileHandle, BE ),
12898         ])
12899         pkt.Reply(16, [
12900                 rec( 8, 4, FileHandle, BE ),
12901                 rec( 12, 4, EffectiveRights ),
12902         ])
12903         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12904                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12905                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12906         # 2222/5742, 87/66
12907         pkt = NCP(0x5742, "Novell Advanced Auditing Service (NAAS)", 'auditing', has_length=0)
12908         pkt.Request(8)
12909         pkt.Reply(8)
12910         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12911                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12912                              0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
12913         # 2222/5801, 8801
12914         pkt = NCP(0x5801, "Query Volume Audit Status", "auditing", has_length=0)
12915         pkt.Request(12, [
12916                 rec( 8, 4, ConnectionNumber ),
12917         ])
12918         pkt.Reply(40, [
12919                 rec(8, 32, NWAuditStatus ),
12920         ])
12921         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12922                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12923                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12924         # 2222/5802, 8802
12925         pkt = NCP(0x5802, "Add User Audit Property", "auditing", has_length=0)
12926         pkt.Request(25, [
12927                 rec(8, 4, AuditIDType ),
12928                 rec(12, 4, AuditID ),
12929                 rec(16, 4, AuditHandle ),
12930                 rec(20, 4, ObjectID ),
12931                 rec(24, 1, AuditFlag ),
12932         ])
12933         pkt.Reply(8)
12934         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12935                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12936                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12937         # 2222/5803, 8803
12938         pkt = NCP(0x5803, "Add Auditor Access", "auditing", has_length=0)
12939         pkt.Request(8)
12940         pkt.Reply(8)
12941         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12942                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12943                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12944         # 2222/5804, 8804
12945         pkt = NCP(0x5804, "Change Auditor Volume Password", "auditing", has_length=0)
12946         pkt.Request(8)
12947         pkt.Reply(8)
12948         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12949                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12950                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12951         # 2222/5805, 8805
12952         pkt = NCP(0x5805, "Check Auditor Access", "auditing", has_length=0)
12953         pkt.Request(8)
12954         pkt.Reply(8)
12955         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12956                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12957                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12958         # 2222/5806, 8806
12959         pkt = NCP(0x5806, "Delete User Audit Property", "auditing", has_length=0)
12960         pkt.Request(8)
12961         pkt.Reply(8)
12962         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12963                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12964                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12965         # 2222/5807, 8807
12966         pkt = NCP(0x5807, "Disable Auditing On A Volume", "auditing", has_length=0)
12967         pkt.Request(8)
12968         pkt.Reply(8)
12969         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12970                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12971                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12972         # 2222/5808, 8808
12973         pkt = NCP(0x5808, "Enable Auditing On A Volume", "auditing", has_length=0)
12974         pkt.Request(8)
12975         pkt.Reply(8)
12976         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12977                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12978                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12979         # 2222/5809, 8809
12980         pkt = NCP(0x5809, "Query User Being Audited", "auditing", has_length=0)
12981         pkt.Request(8)
12982         pkt.Reply(8)
12983         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12984                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12985                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12986         # 2222/580A, 88,10
12987         pkt = NCP(0x580A, "Read Audit Bit Map", "auditing", has_length=0)
12988         pkt.Request(8)
12989         pkt.Reply(8)
12990         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12991                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12992                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
12993         # 2222/580B, 88,11
12994         pkt = NCP(0x580B, "Read Audit File Configuration Header", "auditing", has_length=0)
12995         pkt.Request(8)
12996         pkt.Reply(8)
12997         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
12998                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
12999                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13000         # 2222/580D, 88,13
13001         pkt = NCP(0x580D, "Remove Auditor Access", "auditing", has_length=0)
13002         pkt.Request(8)
13003         pkt.Reply(8)
13004         pkt.CompletionCodes([0x0000, 0x300, 0x8000, 0x8101, 0x8401, 0x8501,
13005                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13006                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13007         # 2222/580E, 88,14
13008         pkt = NCP(0x580E, "Reset Audit File", "auditing", has_length=0)
13009         pkt.Request(8)
13010         pkt.Reply(8)
13011         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13012                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13013                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13014                              
13015         # 2222/580F, 88,15
13016         pkt = NCP(0x580F, "Auditing NCP", "auditing", has_length=0)
13017         pkt.Request(8)
13018         pkt.Reply(8)
13019         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13020                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13021                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13022         # 2222/5810, 88,16
13023         pkt = NCP(0x5810, "Write Audit Bit Map", "auditing", has_length=0)
13024         pkt.Request(8)
13025         pkt.Reply(8)
13026         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13027                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13028                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13029         # 2222/5811, 88,17
13030         pkt = NCP(0x5811, "Write Audit File Configuration Header", "auditing", has_length=0)
13031         pkt.Request(8)
13032         pkt.Reply(8)
13033         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13034                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13035                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13036         # 2222/5812, 88,18
13037         pkt = NCP(0x5812, "Change Auditor Volume Password2", "auditing", has_length=0)
13038         pkt.Request(8)
13039         pkt.Reply(8)
13040         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13041                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13042                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13043         # 2222/5813, 88,19
13044         pkt = NCP(0x5813, "Return Audit Flags", "auditing", has_length=0)
13045         pkt.Request(8)
13046         pkt.Reply(8)
13047         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13048                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13049                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13050         # 2222/5814, 88,20
13051         pkt = NCP(0x5814, "Close Old Audit File", "auditing", has_length=0)
13052         pkt.Request(8)
13053         pkt.Reply(8)
13054         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13055                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13056                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13057         # 2222/5816, 88,22
13058         pkt = NCP(0x5816, "Check Level Two Access", "auditing", has_length=0)
13059         pkt.Request(8)
13060         pkt.Reply(8)
13061         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13062                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13063                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13064         # 2222/5817, 88,23
13065         pkt = NCP(0x5817, "Return Old Audit File List", "auditing", has_length=0)
13066         pkt.Request(8)
13067         pkt.Reply(8)
13068         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13069                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13070                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13071         # 2222/5818, 88,24
13072         pkt = NCP(0x5818, "Init Audit File Reads", "auditing", has_length=0)
13073         pkt.Request(8)
13074         pkt.Reply(8)
13075         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13076                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13077                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13078         # 2222/5819, 88,25
13079         pkt = NCP(0x5819, "Read Auditing File", "auditing", has_length=0)
13080         pkt.Request(8)
13081         pkt.Reply(8)
13082         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13083                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13084                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13085         # 2222/581A, 88,26
13086         pkt = NCP(0x581A, "Delete Old Audit File", "auditing", has_length=0)
13087         pkt.Request(8)
13088         pkt.Reply(8)
13089         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13090                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13091                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13092         # 2222/581E, 88,30
13093         pkt = NCP(0x581E, "Restart Volume auditing", "auditing", has_length=0)
13094         pkt.Request(8)
13095         pkt.Reply(8)
13096         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13097                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13098                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13099         # 2222/581F, 88,31
13100         pkt = NCP(0x581F, "Set Volume Password", "auditing", has_length=0)
13101         pkt.Request(8)
13102         pkt.Reply(8)
13103         pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
13104                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13105                              0x9804, 0x9b03, 0x9c03, 0xa600, 0xa801, 0xfd00, 0xff16])
13106         # 2222/5A01, 90/00
13107         pkt = NCP(0x5A01, "Parse Tree", 'file')
13108         pkt.Request(26, [
13109                 rec( 10, 4, InfoMask ),
13110                 rec( 14, 4, Reserved4 ),
13111                 rec( 18, 4, Reserved4 ),
13112                 rec( 22, 4, limbCount ),
13113         ])
13114         pkt.Reply(32, [
13115                 rec( 8, 4, limbCount ),
13116                 rec( 12, 4, ItemsCount ),
13117                 rec( 16, 4, nextLimbScanNum ),
13118                 rec( 20, 4, CompletionCode ),
13119                 rec( 24, 1, FolderFlag ),
13120                 rec( 25, 3, Reserved ),
13121                 rec( 28, 4, DirectoryBase ),
13122         ])
13123         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13124                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13125                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
13126         # 2222/5A0A, 90/10
13127         pkt = NCP(0x5A0A, "Get Reference Count from Dir Entry Number", 'file')
13128         pkt.Request(19, [
13129                 rec( 10, 4, VolumeNumberLong ),
13130                 rec( 14, 4, DirectoryBase ),
13131                 rec( 18, 1, NameSpace ),
13132         ])
13133         pkt.Reply(12, [
13134                 rec( 8, 4, ReferenceCount ),
13135         ])
13136         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13137                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13138                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
13139         # 2222/5A0B, 90/11
13140         pkt = NCP(0x5A0B, "Get Reference Count from Dir Handle", 'file')
13141         pkt.Request(14, [
13142                 rec( 10, 4, DirHandle ),
13143         ])
13144         pkt.Reply(12, [
13145                 rec( 8, 4, ReferenceCount ),
13146         ])
13147         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13148                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13149                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
13150         # 2222/5A0C, 90/12
13151         pkt = NCP(0x5A0C, "Set Compressed File Size", 'file')
13152         pkt.Request(20, [
13153                 rec( 10, 6, FileHandle ),
13154                 rec( 16, 4, SuggestedFileSize ),
13155         ])
13156         pkt.Reply(16, [
13157                 rec( 8, 4, OldFileSize ),
13158                 rec( 12, 4, NewFileSize ),
13159         ])
13160         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13161                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13162                              0x9804, 0x9b03, 0x9c03, 0xfd00, 0xff16])
13163         # 2222/5A80, 90/128
13164         pkt = NCP(0x5A80, "Move File Data To Data Migration", 'file')
13165         pkt.Request(27, [
13166                 rec( 10, 4, VolumeNumberLong ),
13167                 rec( 14, 4, DirectoryEntryNumber ),
13168                 rec( 18, 1, NameSpace ),
13169                 rec( 19, 3, Reserved ),
13170                 rec( 22, 4, SupportModuleID ),
13171                 rec( 26, 1, DMFlags ),
13172         ])
13173         pkt.Reply(8)
13174         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13175                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13176                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13177         # 2222/5A81, 90/129
13178         pkt = NCP(0x5A81, "Data Migration File Information", 'file')
13179         pkt.Request(19, [
13180                 rec( 10, 4, VolumeNumberLong ),
13181                 rec( 14, 4, DirectoryEntryNumber ),
13182                 rec( 18, 1, NameSpace ),
13183         ])
13184         pkt.Reply(24, [
13185                 rec( 8, 4, SupportModuleID ),
13186                 rec( 12, 4, RestoreTime ),
13187                 rec( 16, 4, DMInfoEntries, var="x" ),
13188                 rec( 20, 4, DataSize, repeat="x" ),
13189         ])
13190         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13191                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13192                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13193         # 2222/5A82, 90/130
13194         pkt = NCP(0x5A82, "Volume Data Migration Status", 'file')
13195         pkt.Request(18, [
13196                 rec( 10, 4, VolumeNumberLong ),
13197                 rec( 14, 4, SupportModuleID ),
13198         ])
13199         pkt.Reply(32, [
13200                 rec( 8, 4, NumOfFilesMigrated ),
13201                 rec( 12, 4, TtlMigratedSize ),
13202                 rec( 16, 4, SpaceUsed ),
13203                 rec( 20, 4, LimboUsed ),
13204                 rec( 24, 4, SpaceMigrated ),
13205                 rec( 28, 4, FileLimbo ),
13206         ])
13207         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13208                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13209                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13210         # 2222/5A83, 90/131
13211         pkt = NCP(0x5A83, "Migrator Status Info", 'file')
13212         pkt.Request(10)
13213         pkt.Reply(20, [
13214                 rec( 8, 1, DMPresentFlag ),
13215                 rec( 9, 3, Reserved3 ),
13216                 rec( 12, 4, DMmajorVersion ),
13217                 rec( 16, 4, DMminorVersion ),
13218         ])
13219         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13220                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13221                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13222         # 2222/5A84, 90/132
13223         pkt = NCP(0x5A84, "Data Migration Support Module Information", 'file')
13224         pkt.Request(18, [
13225                 rec( 10, 1, DMInfoLevel ),
13226                 rec( 11, 3, Reserved3),
13227                 rec( 14, 4, SupportModuleID ),
13228         ])
13229         pkt.Reply(NO_LENGTH_CHECK, [
13230                 srec( DMInfoLevel0, req_cond="ncp.dm_info_level == 0x00" ),
13231                 srec( DMInfoLevel1, req_cond="ncp.dm_info_level == 0x01" ),
13232                 srec( DMInfoLevel2, req_cond="ncp.dm_info_level == 0x02" ),
13233         ])
13234         pkt.ReqCondSizeVariable()
13235         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13236                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13237                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13238         # 2222/5A85, 90/133
13239         pkt = NCP(0x5A85, "Move File Data From Data Migration", 'file')
13240         pkt.Request(19, [
13241                 rec( 10, 4, VolumeNumberLong ),
13242                 rec( 14, 4, DirectoryEntryNumber ),
13243                 rec( 18, 1, NameSpace ),
13244         ])
13245         pkt.Reply(8)
13246         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13247                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13248                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13249         # 2222/5A86, 90/134
13250         pkt = NCP(0x5A86, "Get/Set Default Read-Write Support Module ID", 'file')
13251         pkt.Request(18, [
13252                 rec( 10, 1, GetSetFlag ),
13253                 rec( 11, 3, Reserved3 ),
13254                 rec( 14, 4, SupportModuleID ),
13255         ])
13256         pkt.Reply(12, [
13257                 rec( 8, 4, SupportModuleID ),
13258         ])
13259         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13260                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13261                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13262         # 2222/5A87, 90/135
13263         pkt = NCP(0x5A87, "Data Migration Support Module Capacity Request", 'file')
13264         pkt.Request(22, [
13265                 rec( 10, 4, SupportModuleID ),
13266                 rec( 14, 4, VolumeNumberLong ),
13267                 rec( 18, 4, DirectoryBase ),
13268         ])
13269         pkt.Reply(20, [
13270                 rec( 8, 4, BlockSizeInSectors ),
13271                 rec( 12, 4, TotalBlocks ),
13272                 rec( 16, 4, UsedBlocks ),
13273         ])
13274         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13275                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13276                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13277         # 2222/5A88, 90/136
13278         pkt = NCP(0x5A88, "RTDM Request", 'file')
13279         pkt.Request(15, [
13280                 rec( 10, 4, Verb ),
13281                 rec( 14, 1, VerbData ),
13282         ])
13283         pkt.Reply(8)
13284         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13285                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
13286                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13287     # 2222/5C, 91
13288         pkt = NCP(0x5B, "NMAS Graded Authentication", 'comm')
13289         #Need info on this packet structure
13290         pkt.Request(7)
13291         pkt.Reply(8)
13292         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13293                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
13294                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13295         # 2222/5C, 92
13296         pkt = NCP(0x5C, "SecretStore Services", 'file')
13297         #Need info on this packet structure and SecretStore Verbs
13298         pkt.Request(7)
13299         pkt.Reply(8)
13300         pkt.CompletionCodes([0x0000, 0x7e01, 0x8000, 0x8101, 0x8401, 0x8501,
13301                              0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600, 0xfb0b,
13302                              0x9804, 0x9b03, 0x9c03, 0xa800, 0xfd00, 0xff16])
13303         # 2222/5E, 94   
13304         pkt = NCP(0x5E, "NMAS Communications Packet", 'comm')
13305         pkt.Request(7)
13306         pkt.Reply(8)
13307         pkt.CompletionCodes([0x0000, 0xfb09])
13308         # 2222/61, 97
13309         pkt = NCP(0x61, "Get Big Packet NCP Max Packet Size", 'comm')
13310         pkt.Request(10, [
13311                 rec( 7, 2, ProposedMaxSize, BE ),
13312                 rec( 9, 1, SecurityFlag ),
13313         ],info_str=(ProposedMaxSize, "Get Big Max Packet Size - %d", ", %d"))
13314         pkt.Reply(13, [
13315                 rec( 8, 2, AcceptedMaxSize, BE ),
13316                 rec( 10, 2, EchoSocket, BE ),
13317                 rec( 12, 1, SecurityFlag ),
13318         ])
13319         pkt.CompletionCodes([0x0000])
13320         # 2222/63, 99
13321         pkt = NCP(0x63, "Undocumented Packet Burst", 'comm')
13322         pkt.Request(7)
13323         pkt.Reply(8)
13324         pkt.CompletionCodes([0x0000])
13325         # 2222/64, 100
13326         pkt = NCP(0x64, "Undocumented Packet Burst", 'comm')
13327         pkt.Request(7)
13328         pkt.Reply(8)
13329         pkt.CompletionCodes([0x0000])
13330         # 2222/65, 101
13331         pkt = NCP(0x65, "Packet Burst Connection Request", 'comm')
13332         pkt.Request(25, [
13333                 rec( 7, 4, LocalConnectionID, BE ),
13334                 rec( 11, 4, LocalMaxPacketSize, BE ),
13335                 rec( 15, 2, LocalTargetSocket, BE ),
13336                 rec( 17, 4, LocalMaxSendSize, BE ),
13337                 rec( 21, 4, LocalMaxRecvSize, BE ),
13338         ])
13339         pkt.Reply(16, [
13340                 rec( 8, 4, RemoteTargetID, BE ),
13341                 rec( 12, 4, RemoteMaxPacketSize, BE ),
13342         ])
13343         pkt.CompletionCodes([0x0000])
13344         # 2222/66, 102
13345         pkt = NCP(0x66, "Undocumented Packet Burst", 'comm')
13346         pkt.Request(7)
13347         pkt.Reply(8)
13348         pkt.CompletionCodes([0x0000])
13349         # 2222/67, 103
13350         pkt = NCP(0x67, "Undocumented Packet Burst", 'comm')
13351         pkt.Request(7)
13352         pkt.Reply(8)
13353         pkt.CompletionCodes([0x0000])
13354         # 2222/6801, 104/01
13355         pkt = NCP(0x6801, "Ping for NDS NCP", "nds", has_length=0)
13356         pkt.Request(8)
13357         pkt.Reply(8)
13358         pkt.ReqCondSizeVariable()
13359         pkt.CompletionCodes([0x0000, 0x8100, 0xfb04, 0xfe0c])
13360         # 2222/6802, 104/02
13361         #
13362         # XXX - if FraggerHandle is not 0xffffffff, this is not the
13363         # first fragment, so we can only dissect this by reassembling;
13364         # the fields after "Fragment Handle" are bogus for non-0xffffffff
13365         # fragments, so we shouldn't dissect them.
13366         #
13367         # XXX - are there TotalRequest requests in the packet, and
13368         # does each of them have NDSFlags and NDSVerb fields, or
13369         # does only the first one have it?
13370         #
13371         pkt = NCP(0x6802, "Send NDS Fragmented Request/Reply", "nds", has_length=0)
13372         pkt.Request(8)
13373         pkt.Reply(8)
13374         pkt.ReqCondSizeVariable()
13375         pkt.CompletionCodes([0x0000])
13376         # 2222/6803, 104/03
13377         pkt = NCP(0x6803, "Fragment Close", "nds", has_length=0)
13378         pkt.Request(12, [
13379                 rec( 8, 4, FraggerHandle ),
13380         ])
13381         pkt.Reply(8)
13382         pkt.CompletionCodes([0x0000, 0xff00])
13383         # 2222/6804, 104/04
13384         pkt = NCP(0x6804, "Return Bindery Context", "nds", has_length=0)
13385         pkt.Request(8)
13386         pkt.Reply((9, 263), [
13387                 rec( 8, (1,255), binderyContext ),
13388         ])
13389         pkt.CompletionCodes([0x0000, 0xfe0c, 0xff00])
13390         # 2222/6805, 104/05
13391         pkt = NCP(0x6805, "Monitor NDS Connection", "nds", has_length=0)
13392         pkt.Request(8)
13393         pkt.Reply(8)
13394         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
13395         # 2222/6806, 104/06
13396         pkt = NCP(0x6806, "Return NDS Statistics", "nds", has_length=0)
13397         pkt.Request(10, [
13398                 rec( 8, 2, NDSRequestFlags ),
13399         ])
13400         pkt.Reply(8)
13401         #Need to investigate how to decode Statistics Return Value
13402         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
13403         # 2222/6807, 104/07
13404         pkt = NCP(0x6807, "Clear NDS Statistics", "nds", has_length=0)
13405         pkt.Request(8)
13406         pkt.Reply(8)
13407         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
13408         # 2222/6808, 104/08
13409         pkt = NCP(0x6808, "Reload NDS Software", "nds", has_length=0)
13410         pkt.Request(8)
13411         pkt.Reply(12, [
13412                 rec( 8, 4, NDSStatus ),
13413         ])
13414         pkt.CompletionCodes([0x0000, 0xfb00, 0xfe0c, 0xff00])
13415         # 2222/68C8, 104/200
13416         pkt = NCP(0x68C8, "Query Container Audit Status", "auditing", has_length=0)
13417         pkt.Request(12, [
13418                 rec( 8, 4, ConnectionNumber ),
13419 #               rec( 12, 4, AuditIDType, LE ),
13420 #               rec( 16, 4, AuditID ),
13421 #               rec( 20, 2, BufferSize ),
13422         ])
13423         pkt.Reply(40, [
13424                 rec(8, 32, NWAuditStatus ),
13425         ])
13426         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13427         # 2222/68CA, 104/202
13428         pkt = NCP(0x68CA, "Add Auditor Access", "auditing", has_length=0)
13429         pkt.Request(8)
13430         pkt.Reply(8)
13431         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13432         # 2222/68CB, 104/203
13433         pkt = NCP(0x68CB, "Change Auditor Container Password", "auditing", has_length=0)
13434         pkt.Request(8)
13435         pkt.Reply(8)
13436         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13437         # 2222/68CC, 104/204
13438         pkt = NCP(0x68CC, "Check Auditor Access", "auditing", has_length=0)
13439         pkt.Request(8)
13440         pkt.Reply(8)
13441         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13442         # 2222/68CE, 104/206
13443         pkt = NCP(0x680CE, "Disable Container Auditing", "auditing", has_length=0)
13444         pkt.Request(8)
13445         pkt.Reply(8)
13446         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13447         # 2222/68CF, 104/207
13448         pkt = NCP(0x68CF, "Enable Container Auditing", "auditing", has_length=0)
13449         pkt.Request(8)
13450         pkt.Reply(8)
13451         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13452         # 2222/68D1, 104/209
13453         pkt = NCP(0x68D1, "Read Audit File Header", "auditing", has_length=0)
13454         pkt.Request(8)
13455         pkt.Reply(8)
13456         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13457         # 2222/68D3, 104/211
13458         pkt = NCP(0x68D3, "Remove Auditor Access", "auditing", has_length=0)
13459         pkt.Request(8)
13460         pkt.Reply(8)
13461         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13462         # 2222/68D4, 104/212
13463         pkt = NCP(0x68D4, "Reset Audit File", "auditing", has_length=0)
13464         pkt.Request(8)
13465         pkt.Reply(8)
13466         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13467         # 2222/68D6, 104/214
13468         pkt = NCP(0x68D6, "Write Audit File Configuration Header", "auditing", has_length=0)
13469         pkt.Request(8)
13470         pkt.Reply(8)
13471         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13472         # 2222/68D7, 104/215
13473         pkt = NCP(0x68D7, "Change Auditor Container Password2", "auditing", has_length=0)
13474         pkt.Request(8)
13475         pkt.Reply(8)
13476         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13477         # 2222/68D8, 104/216
13478         pkt = NCP(0x68D8, "Return Audit Flags", "auditing", has_length=0)
13479         pkt.Request(8)
13480         pkt.Reply(8)
13481         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13482         # 2222/68D9, 104/217
13483         pkt = NCP(0x68D9, "Close Old Audit File", "auditing", has_length=0)
13484         pkt.Request(8)
13485         pkt.Reply(8)
13486         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13487         # 2222/68DB, 104/219
13488         pkt = NCP(0x68DB, "Check Level Two Access", "auditing", has_length=0)
13489         pkt.Request(8)
13490         pkt.Reply(8)
13491         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13492         # 2222/68DC, 104/220
13493         pkt = NCP(0x68DC, "Check Object Audited", "auditing", has_length=0)
13494         pkt.Request(8)
13495         pkt.Reply(8)
13496         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13497         # 2222/68DD, 104/221
13498         pkt = NCP(0x68DD, "Change Object Audited", "auditing", has_length=0)
13499         pkt.Request(8)
13500         pkt.Reply(8)
13501         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13502         # 2222/68DE, 104/222
13503         pkt = NCP(0x68DE, "Return Old Audit File List", "auditing", has_length=0)
13504         pkt.Request(8)
13505         pkt.Reply(8)
13506         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13507         # 2222/68DF, 104/223
13508         pkt = NCP(0x68DF, "Init Audit File Reads", "auditing", has_length=0)
13509         pkt.Request(8)
13510         pkt.Reply(8)
13511         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13512         # 2222/68E0, 104/224
13513         pkt = NCP(0x68E0, "Read Auditing File", "auditing", has_length=0)
13514         pkt.Request(8)
13515         pkt.Reply(8)
13516         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13517         # 2222/68E1, 104/225
13518         pkt = NCP(0x68E1, "Delete Old Audit File", "auditing", has_length=0)
13519         pkt.Request(8)
13520         pkt.Reply(8)
13521         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13522         # 2222/68E5, 104/229
13523         pkt = NCP(0x68E5, "Set Audit Password", "auditing", has_length=0)
13524         pkt.Request(8)
13525         pkt.Reply(8)
13526         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13527         # 2222/68E7, 104/231
13528         pkt = NCP(0x68E7, "External Audit Append To File", "auditing", has_length=0)
13529         pkt.Request(8)
13530         pkt.Reply(8)
13531         pkt.CompletionCodes([0x0000, 0xa700, 0xfb00, 0xfe0c, 0xff00])
13532         # 2222/69, 105
13533         pkt = NCP(0x69, "Log File", 'file')
13534         pkt.Request( (12, 267), [
13535                 rec( 7, 1, DirHandle ),
13536                 rec( 8, 1, LockFlag ),
13537                 rec( 9, 2, TimeoutLimit ),
13538                 rec( 11, (1, 256), FilePath ),
13539         ], info_str=(FilePath, "Log File: %s", "/%s"))
13540         pkt.Reply(8)
13541         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x9600, 0xfe0d, 0xff01])
13542         # 2222/6A, 106
13543         pkt = NCP(0x6A, "Lock File Set", 'file')
13544         pkt.Request( 9, [
13545                 rec( 7, 2, TimeoutLimit ),
13546         ])
13547         pkt.Reply(8)
13548         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x9600, 0xfe0d, 0xff01])
13549         # 2222/6B, 107
13550         pkt = NCP(0x6B, "Log Logical Record", 'file')
13551         pkt.Request( (11, 266), [
13552                 rec( 7, 1, LockFlag ),
13553                 rec( 8, 2, TimeoutLimit ),
13554                 rec( 10, (1, 256), SynchName ),
13555         ], info_str=(SynchName, "Log Logical Record: %s", ", %s"))
13556         pkt.Reply(8)
13557         pkt.CompletionCodes([0x0000, 0x7f00, 0x9600, 0xfe0d, 0xff01])
13558         # 2222/6C, 108
13559         pkt = NCP(0x6C, "Log Logical Record", 'file')
13560         pkt.Request( 10, [
13561                 rec( 7, 1, LockFlag ),
13562                 rec( 8, 2, TimeoutLimit ),
13563         ])
13564         pkt.Reply(8)
13565         pkt.CompletionCodes([0x0000, 0x7f00, 0x9600, 0xfe0d, 0xff01])
13566         # 2222/6D, 109
13567         pkt = NCP(0x6D, "Log Physical Record", 'file')
13568         pkt.Request(24, [
13569                 rec( 7, 1, LockFlag ),
13570                 rec( 8, 6, FileHandle ),
13571                 rec( 14, 4, LockAreasStartOffset ),
13572                 rec( 18, 4, LockAreaLen ),
13573                 rec( 22, 2, LockTimeout ),
13574         ])
13575         pkt.Reply(8)
13576         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
13577         # 2222/6E, 110
13578         pkt = NCP(0x6E, "Lock Physical Record Set", 'file')
13579         pkt.Request(10, [
13580                 rec( 7, 1, LockFlag ),
13581                 rec( 8, 2, LockTimeout ),
13582         ])
13583         pkt.Reply(8)
13584         pkt.CompletionCodes([0x0000, 0x7f00, 0x8200, 0x8800, 0x9600, 0xfd02, 0xfe04, 0xff01])
13585         # 2222/6F00, 111/00
13586         pkt = NCP(0x6F00, "Open/Create a Semaphore", 'file', has_length=0)
13587         pkt.Request((10,521), [
13588                 rec( 8, 1, InitialSemaphoreValue ),
13589                 rec( 9, (1, 512), SemaphoreName ),
13590         ], info_str=(SemaphoreName, "Open/Create Semaphore: %s", ", %s"))
13591         pkt.Reply(13, [
13592                   rec( 8, 4, SemaphoreHandle ),
13593                   rec( 12, 1, SemaphoreOpenCount ),
13594         ])
13595         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
13596         # 2222/6F01, 111/01
13597         pkt = NCP(0x6F01, "Examine Semaphore", 'file', has_length=0)
13598         pkt.Request(12, [
13599                 rec( 8, 4, SemaphoreHandle ),
13600         ])
13601         pkt.Reply(10, [
13602                   rec( 8, 1, SemaphoreValue ),
13603                   rec( 9, 1, SemaphoreOpenCount ),
13604         ])
13605         pkt.CompletionCodes([0x0000, 0x9600, 0xff01])
13606         # 2222/6F02, 111/02
13607         pkt = NCP(0x6F02, "Wait On (P) Semaphore", 'file', has_length=0)
13608         pkt.Request(14, [
13609                 rec( 8, 4, SemaphoreHandle ),
13610                 rec( 12, 2, LockTimeout ),
13611         ])
13612         pkt.Reply(8)
13613         pkt.CompletionCodes([0x0000, 0x9600, 0xfe04, 0xff01])
13614         # 2222/6F03, 111/03
13615         pkt = NCP(0x6F03, "Signal (V) Semaphore", 'file', has_length=0)
13616         pkt.Request(12, [
13617                 rec( 8, 4, SemaphoreHandle ),
13618         ])
13619         pkt.Reply(8)
13620         pkt.CompletionCodes([0x0000, 0x9600, 0xfe04, 0xff01])
13621         # 2222/6F04, 111/04
13622         pkt = NCP(0x6F04, "Close Semaphore", 'file', has_length=0)
13623         pkt.Request(12, [
13624                 rec( 8, 4, SemaphoreHandle ),
13625         ])
13626         pkt.Reply(10, [
13627                 rec( 8, 1, SemaphoreOpenCount ),
13628                 rec( 9, 1, SemaphoreShareCount ),
13629         ])
13630         pkt.CompletionCodes([0x0000, 0x9600, 0xfe04, 0xff01])
13631         # 2222/7201, 114/01
13632         pkt = NCP(0x7201, "Timesync Get Time", 'file')
13633         pkt.Request(10)
13634         pkt.Reply(32,[
13635                 rec( 8, 12, theTimeStruct ),
13636                 rec(20, 8, eventOffset ),
13637                 rec(28, 4, eventTime ),
13638         ])                
13639         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13640         # 2222/7202, 114/02
13641         pkt = NCP(0x7202, "Timesync Exchange Time", 'file')
13642         pkt.Request((63,112), [
13643                 rec( 10, 4, protocolFlags ),
13644                 rec( 14, 4, nodeFlags ),
13645                 rec( 18, 8, sourceOriginateTime ),
13646                 rec( 26, 8, targetReceiveTime ),
13647                 rec( 34, 8, targetTransmitTime ),
13648                 rec( 42, 8, sourceReturnTime ),
13649                 rec( 50, 8, eventOffset ),
13650                 rec( 58, 4, eventTime ),
13651                 rec( 62, (1,50), ServerNameLen ),
13652         ], info_str=(ServerNameLen, "Timesync Exchange Time: %s", ", %s"))
13653         pkt.Reply((64,113), [
13654                 rec( 8, 3, Reserved3 ),
13655                 rec( 11, 4, protocolFlags ),
13656                 rec( 15, 4, nodeFlags ),
13657                 rec( 19, 8, sourceOriginateTime ),
13658                 rec( 27, 8, targetReceiveTime ),
13659                 rec( 35, 8, targetTransmitTime ),
13660                 rec( 43, 8, sourceReturnTime ),
13661                 rec( 51, 8, eventOffset ),
13662                 rec( 59, 4, eventTime ),
13663                 rec( 63, (1,50), ServerNameLen ),
13664         ])
13665         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13666         # 2222/7205, 114/05
13667         pkt = NCP(0x7205, "Timesync Get Server List", 'file')
13668         pkt.Request(14, [
13669                 rec( 10, 4, StartNumber ),
13670         ])
13671         pkt.Reply(66, [
13672                 rec( 8, 4, nameType ),
13673                 rec( 12, 48, ServerName ),
13674                 rec( 60, 4, serverListFlags ),
13675                 rec( 64, 2, startNumberFlag ),
13676         ])
13677         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13678         # 2222/7206, 114/06
13679         pkt = NCP(0x7206, "Timesync Set Server List", 'file')
13680         pkt.Request(14, [
13681                 rec( 10, 4, StartNumber ),
13682         ])
13683         pkt.Reply(66, [
13684                 rec( 8, 4, nameType ),
13685                 rec( 12, 48, ServerName ),
13686                 rec( 60, 4, serverListFlags ),
13687                 rec( 64, 2, startNumberFlag ),
13688         ])
13689         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13690         # 2222/720C, 114/12
13691         pkt = NCP(0x720C, "Timesync Get Version", 'file')
13692         pkt.Request(10)
13693         pkt.Reply(12, [
13694                 rec( 8, 4, version ),
13695         ])
13696         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
13697         # 2222/7B01, 123/01
13698         pkt = NCP(0x7B01, "Get Cache Information", 'stats')
13699         pkt.Request(12, [
13700                 rec(10, 1, VersionNumber),
13701                 rec(11, 1, RevisionNumber),
13702         ])
13703         pkt.Reply(288, [
13704                 rec(8, 4, CurrentServerTime, LE),
13705                 rec(12, 1, VConsoleVersion ),
13706                 rec(13, 1, VConsoleRevision ),
13707                 rec(14, 2, Reserved2 ),
13708                 rec(16, 104, Counters ),
13709                 rec(120, 40, ExtraCacheCntrs ),
13710                 rec(160, 40, MemoryCounters ),
13711                 rec(200, 48, TrendCounters ),
13712                 rec(248, 40, CacheInfo ),
13713         ])
13714         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xff00])
13715         # 2222/7B02, 123/02
13716         pkt = NCP(0x7B02, "Get File Server Information", 'stats')
13717         pkt.Request(10)
13718         pkt.Reply(150, [
13719                 rec(8, 4, CurrentServerTime ),
13720                 rec(12, 1, VConsoleVersion ),
13721                 rec(13, 1, VConsoleRevision ),
13722                 rec(14, 2, Reserved2 ),
13723                 rec(16, 4, NCPStaInUseCnt ),
13724                 rec(20, 4, NCPPeakStaInUse ),
13725                 rec(24, 4, NumOfNCPReqs ),
13726                 rec(28, 4, ServerUtilization ),
13727                 rec(32, 96, ServerInfo ),
13728                 rec(128, 22, FileServerCounters ),
13729         ])
13730         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13731         # 2222/7B03, 123/03
13732         pkt = NCP(0x7B03, "NetWare File System Information", 'stats')
13733         pkt.Request(11, [
13734                 rec(10, 1, FileSystemID ),
13735         ])
13736         pkt.Reply(68, [
13737                 rec(8, 4, CurrentServerTime ),
13738                 rec(12, 1, VConsoleVersion ),
13739                 rec(13, 1, VConsoleRevision ),
13740                 rec(14, 2, Reserved2 ),
13741                 rec(16, 52, FileSystemInfo ),
13742         ])
13743         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13744         # 2222/7B04, 123/04
13745         pkt = NCP(0x7B04, "User Information", 'stats')
13746         pkt.Request(14, [
13747                 rec(10, 4, ConnectionNumber ),
13748         ])
13749         pkt.Reply((85, 132), [
13750                 rec(8, 4, CurrentServerTime ),
13751                 rec(12, 1, VConsoleVersion ),
13752                 rec(13, 1, VConsoleRevision ),
13753                 rec(14, 2, Reserved2 ),
13754                 rec(16, 68, UserInformation ),
13755                 rec(84, (1, 48), UserName ),
13756         ])
13757         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13758         # 2222/7B05, 123/05
13759         pkt = NCP(0x7B05, "Packet Burst Information", 'stats')
13760         pkt.Request(10)
13761         pkt.Reply(216, [
13762                 rec(8, 4, CurrentServerTime ),
13763                 rec(12, 1, VConsoleVersion ),
13764                 rec(13, 1, VConsoleRevision ),
13765                 rec(14, 2, Reserved2 ),
13766                 rec(16, 200, PacketBurstInformation ),
13767         ])
13768         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13769         # 2222/7B06, 123/06
13770         pkt = NCP(0x7B06, "IPX SPX Information", 'stats')
13771         pkt.Request(10)
13772         pkt.Reply(94, [
13773                 rec(8, 4, CurrentServerTime ),
13774                 rec(12, 1, VConsoleVersion ),
13775                 rec(13, 1, VConsoleRevision ),
13776                 rec(14, 2, Reserved2 ),
13777                 rec(16, 34, IPXInformation ),
13778                 rec(50, 44, SPXInformation ),
13779         ])
13780         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13781         # 2222/7B07, 123/07
13782         pkt = NCP(0x7B07, "Garbage Collection Information", 'stats')
13783         pkt.Request(10)
13784         pkt.Reply(40, [
13785                 rec(8, 4, CurrentServerTime ),
13786                 rec(12, 1, VConsoleVersion ),
13787                 rec(13, 1, VConsoleRevision ),
13788                 rec(14, 2, Reserved2 ),
13789                 rec(16, 4, FailedAllocReqCnt ),
13790                 rec(20, 4, NumberOfAllocs ),
13791                 rec(24, 4, NoMoreMemAvlCnt ),
13792                 rec(28, 4, NumOfGarbageColl ),
13793                 rec(32, 4, FoundSomeMem ),
13794                 rec(36, 4, NumOfChecks ),
13795         ])
13796         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13797         # 2222/7B08, 123/08
13798         pkt = NCP(0x7B08, "CPU Information", 'stats')
13799         pkt.Request(14, [
13800                 rec(10, 4, CPUNumber ),
13801         ])
13802         pkt.Reply(51, [
13803                 rec(8, 4, CurrentServerTime ),
13804                 rec(12, 1, VConsoleVersion ),
13805                 rec(13, 1, VConsoleRevision ),
13806                 rec(14, 2, Reserved2 ),
13807                 rec(16, 4, NumberOfCPUs ),
13808                 rec(20, 31, CPUInformation ),
13809         ])      
13810         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13811         # 2222/7B09, 123/09
13812         pkt = NCP(0x7B09, "Volume Switch Information", 'stats')
13813         pkt.Request(14, [
13814                 rec(10, 4, StartNumber )
13815         ])
13816         pkt.Reply(28, [
13817                 rec(8, 4, CurrentServerTime ),
13818                 rec(12, 1, VConsoleVersion ),
13819                 rec(13, 1, VConsoleRevision ),
13820                 rec(14, 2, Reserved2 ),
13821                 rec(16, 4, TotalLFSCounters ),
13822                 rec(20, 4, CurrentLFSCounters, var="x"),
13823                 rec(24, 4, LFSCounters, repeat="x"),
13824         ])
13825         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13826         # 2222/7B0A, 123/10
13827         pkt = NCP(0x7B0A, "Get NLM Loaded List", 'stats')
13828         pkt.Request(14, [
13829                 rec(10, 4, StartNumber )
13830         ])
13831         pkt.Reply(28, [
13832                 rec(8, 4, CurrentServerTime ),
13833                 rec(12, 1, VConsoleVersion ),
13834                 rec(13, 1, VConsoleRevision ),
13835                 rec(14, 2, Reserved2 ),
13836                 rec(16, 4, NLMcount ),
13837                 rec(20, 4, NLMsInList, var="x" ),
13838                 rec(24, 4, NLMNumbers, repeat="x" ),
13839         ])
13840         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13841         # 2222/7B0B, 123/11
13842         pkt = NCP(0x7B0B, "NLM Information", 'stats')
13843         pkt.Request(14, [
13844                 rec(10, 4, NLMNumber ),
13845         ])
13846         pkt.Reply((79,841), [
13847                 rec(8, 4, CurrentServerTime ),
13848                 rec(12, 1, VConsoleVersion ),
13849                 rec(13, 1, VConsoleRevision ),
13850                 rec(14, 2, Reserved2 ),
13851                 rec(16, 60, NLMInformation ),
13852                 rec(76, (1,255), FileName ),
13853                 rec(-1, (1,255), Name ),
13854                 rec(-1, (1,255), Copyright ),
13855         ])
13856         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13857         # 2222/7B0C, 123/12
13858         pkt = NCP(0x7B0C, "Get Directory Cache Information", 'stats')
13859         pkt.Request(10)
13860         pkt.Reply(72, [
13861                 rec(8, 4, CurrentServerTime ),
13862                 rec(12, 1, VConsoleVersion ),
13863                 rec(13, 1, VConsoleRevision ),
13864                 rec(14, 2, Reserved2 ),
13865                 rec(16, 56, DirCacheInfo ),
13866         ])
13867         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13868         # 2222/7B0D, 123/13
13869         pkt = NCP(0x7B0D, "Get Operating System Version Information", 'stats')
13870         pkt.Request(10)
13871         pkt.Reply(70, [
13872                 rec(8, 4, CurrentServerTime ),
13873                 rec(12, 1, VConsoleVersion ),
13874                 rec(13, 1, VConsoleRevision ),
13875                 rec(14, 2, Reserved2 ),
13876                 rec(16, 1, OSMajorVersion ),
13877                 rec(17, 1, OSMinorVersion ),
13878                 rec(18, 1, OSRevision ),
13879                 rec(19, 1, AccountVersion ),
13880                 rec(20, 1, VAPVersion ),
13881                 rec(21, 1, QueueingVersion ),
13882                 rec(22, 1, SecurityRestrictionVersion ),
13883                 rec(23, 1, InternetBridgeVersion ),
13884                 rec(24, 4, MaxNumOfVol ),
13885                 rec(28, 4, MaxNumOfConn ),
13886                 rec(32, 4, MaxNumOfUsers ),
13887                 rec(36, 4, MaxNumOfNmeSps ),
13888                 rec(40, 4, MaxNumOfLANS ),
13889                 rec(44, 4, MaxNumOfMedias ),
13890                 rec(48, 4, MaxNumOfStacks ),
13891                 rec(52, 4, MaxDirDepth ),
13892                 rec(56, 4, MaxDataStreams ),
13893                 rec(60, 4, MaxNumOfSpoolPr ),
13894                 rec(64, 4, ServerSerialNumber ),
13895                 rec(68, 2, ServerAppNumber ),
13896         ])
13897         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13898         # 2222/7B0E, 123/14
13899         pkt = NCP(0x7B0E, "Get Active Connection List by Type", 'stats')
13900         pkt.Request(15, [
13901                 rec(10, 4, StartConnNumber ),
13902                 rec(14, 1, ConnectionType ),
13903         ])
13904         pkt.Reply(528, [
13905                 rec(8, 4, CurrentServerTime ),
13906                 rec(12, 1, VConsoleVersion ),
13907                 rec(13, 1, VConsoleRevision ),
13908                 rec(14, 2, Reserved2 ),
13909                 rec(16, 512, ActiveConnBitList ),
13910         ])
13911         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfd01, 0xff00])
13912         # 2222/7B0F, 123/15
13913         pkt = NCP(0x7B0F, "Get NLM Resource Tag List", 'stats')
13914         pkt.Request(18, [
13915                 rec(10, 4, NLMNumber ),
13916                 rec(14, 4, NLMStartNumber ),
13917         ])
13918         pkt.Reply(37, [
13919                 rec(8, 4, CurrentServerTime ),
13920                 rec(12, 1, VConsoleVersion ),
13921                 rec(13, 1, VConsoleRevision ),
13922                 rec(14, 2, Reserved2 ),
13923                 rec(16, 4, TtlNumOfRTags ),
13924                 rec(20, 4, CurNumOfRTags ),
13925                 rec(24, 13, RTagStructure ),
13926         ])
13927         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13928         # 2222/7B10, 123/16
13929         pkt = NCP(0x7B10, "Enumerate Connection Information from Connection List", 'stats')
13930         pkt.Request(22, [
13931                 rec(10, 1, EnumInfoMask),
13932                 rec(11, 3, Reserved3),
13933                 rec(14, 4, itemsInList, var="x"),
13934                 rec(18, 4, connList, repeat="x"),
13935         ])
13936         pkt.Reply(NO_LENGTH_CHECK, [
13937                 rec(8, 4, CurrentServerTime ),
13938                 rec(12, 1, VConsoleVersion ),
13939                 rec(13, 1, VConsoleRevision ),
13940                 rec(14, 2, Reserved2 ),
13941                 rec(16, 4, ItemsInPacket ),
13942                 srec(netAddr, req_cond="ncp.enum_info_transport==TRUE"),
13943                 srec(timeInfo, req_cond="ncp.enum_info_time==TRUE"),
13944                 srec(nameInfo, req_cond="ncp.enum_info_name==TRUE"),
13945                 srec(lockInfo, req_cond="ncp.enum_info_lock==TRUE"),
13946                 srec(printInfo, req_cond="ncp.enum_info_print==TRUE"),
13947                 srec(statsInfo, req_cond="ncp.enum_info_stats==TRUE"),
13948                 srec(acctngInfo, req_cond="ncp.enum_info_account==TRUE"),
13949                 srec(authInfo, req_cond="ncp.enum_info_auth==TRUE"),
13950         ])                
13951         pkt.ReqCondSizeVariable()
13952         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13953         # 2222/7B11, 123/17
13954         pkt = NCP(0x7B11, "Enumerate NCP Service Network Addresses", 'stats')
13955         pkt.Request(14, [
13956                 rec(10, 4, SearchNumber ),
13957         ])                
13958         pkt.Reply(60, [
13959                 rec(8, 4, CurrentServerTime ),
13960                 rec(12, 1, VConsoleVersion ),
13961                 rec(13, 1, VConsoleRevision ),
13962                 rec(14, 2, ServerInfoFlags ),
13963                 rec(16, 16, GUID ),
13964                 rec(32, 4, NextSearchNum ),
13965                 rec(36, 4, ItemsInPacket, var="x"), 
13966                 rec(40, 20, NCPNetworkAddress, repeat="x" ),
13967         ])
13968         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13969         # 2222/7B14, 123/20
13970         pkt = NCP(0x7B14, "Active LAN Board List", 'stats')
13971         pkt.Request(14, [
13972                 rec(10, 4, StartNumber ),
13973         ])               
13974         pkt.Reply(28, [
13975                 rec(8, 4, CurrentServerTime ),
13976                 rec(12, 1, VConsoleVersion ),
13977                 rec(13, 1, VConsoleRevision ),
13978                 rec(14, 2, Reserved2 ),
13979                 rec(16, 4, MaxNumOfLANS ),
13980                 rec(20, 4, ItemsInPacket, var="x"),
13981                 rec(24, 4, BoardNumbers, repeat="x"),
13982         ])                
13983         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13984         # 2222/7B15, 123/21
13985         pkt = NCP(0x7B15, "LAN Configuration Information", 'stats')
13986         pkt.Request(14, [
13987                 rec(10, 4, BoardNumber ),
13988         ])                
13989         pkt.Reply(152, [
13990                 rec(8, 4, CurrentServerTime ),
13991                 rec(12, 1, VConsoleVersion ),
13992                 rec(13, 1, VConsoleRevision ),
13993                 rec(14, 2, Reserved2 ),
13994                 rec(16,136, LANConfigInfo ),
13995         ])                
13996         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
13997         # 2222/7B16, 123/22
13998         pkt = NCP(0x7B16, "LAN Common Counters Information", 'stats')
13999         pkt.Request(18, [
14000                 rec(10, 4, BoardNumber ),
14001                 rec(14, 4, BlockNumber ),
14002         ])                
14003         pkt.Reply(86, [
14004                 rec(8, 4, CurrentServerTime ),
14005                 rec(12, 1, VConsoleVersion ),
14006                 rec(13, 1, VConsoleRevision ),
14007                 rec(14, 1, StatMajorVersion ),
14008                 rec(15, 1, StatMinorVersion ),
14009                 rec(16, 4, TotalCommonCnts ),
14010                 rec(20, 4, TotalCntBlocks ),
14011                 rec(24, 4, CustomCounters ),
14012                 rec(28, 4, NextCntBlock ),
14013                 rec(32, 54, CommonLanStruc ),
14014         ])                
14015         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14016         # 2222/7B17, 123/23
14017         pkt = NCP(0x7B17, "LAN Custom Counters Information", 'stats')
14018         pkt.Request(18, [
14019                 rec(10, 4, BoardNumber ),
14020                 rec(14, 4, StartNumber ),
14021         ])                
14022         pkt.Reply(25, [
14023                 rec(8, 4, CurrentServerTime ),
14024                 rec(12, 1, VConsoleVersion ),
14025                 rec(13, 1, VConsoleRevision ),
14026                 rec(14, 2, Reserved2 ),
14027                 rec(16, 4, NumOfCCinPkt, var="x"),
14028                 rec(20, 5, CustomCntsInfo, repeat="x"),
14029         ])                
14030         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14031         # 2222/7B18, 123/24
14032         pkt = NCP(0x7B18, "LAN Name Information", 'stats')
14033         pkt.Request(14, [
14034                 rec(10, 4, BoardNumber ),
14035         ])                
14036         pkt.Reply(19, [
14037                 rec(8, 4, CurrentServerTime ),
14038                 rec(12, 1, VConsoleVersion ),
14039                 rec(13, 1, VConsoleRevision ),
14040                 rec(14, 2, Reserved2 ),
14041                 rec(16, 3, BoardNameStruct ),
14042         ])
14043         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14044         # 2222/7B19, 123/25
14045         pkt = NCP(0x7B19, "LSL Information", 'stats')
14046         pkt.Request(10)
14047         pkt.Reply(90, [
14048                 rec(8, 4, CurrentServerTime ),
14049                 rec(12, 1, VConsoleVersion ),
14050                 rec(13, 1, VConsoleRevision ),
14051                 rec(14, 2, Reserved2 ),
14052                 rec(16, 74, LSLInformation ),
14053         ])                
14054         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14055         # 2222/7B1A, 123/26
14056         pkt = NCP(0x7B1A, "LSL Logical Board Statistics", 'stats')
14057         pkt.Request(14, [
14058                 rec(10, 4, BoardNumber ),
14059         ])                
14060         pkt.Reply(28, [
14061                 rec(8, 4, CurrentServerTime ),
14062                 rec(12, 1, VConsoleVersion ),
14063                 rec(13, 1, VConsoleRevision ),
14064                 rec(14, 2, Reserved2 ),
14065                 rec(16, 4, LogTtlTxPkts ),
14066                 rec(20, 4, LogTtlRxPkts ),
14067                 rec(24, 4, UnclaimedPkts ),
14068         ])                
14069         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14070         # 2222/7B1B, 123/27
14071         pkt = NCP(0x7B1B, "MLID Board Information", 'stats')
14072         pkt.Request(14, [
14073                 rec(10, 4, BoardNumber ),
14074         ])                
14075         pkt.Reply(44, [
14076                 rec(8, 4, CurrentServerTime ),
14077                 rec(12, 1, VConsoleVersion ),
14078                 rec(13, 1, VConsoleRevision ),
14079                 rec(14, 1, Reserved ),
14080                 rec(15, 1, NumberOfProtocols ),
14081                 rec(16, 28, MLIDBoardInfo ),
14082         ])                        
14083         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14084         # 2222/7B1E, 123/30
14085         pkt = NCP(0x7B1E, "Get Media Manager Object Information", 'stats')
14086         pkt.Request(14, [
14087                 rec(10, 4, ObjectNumber ),
14088         ])                
14089         pkt.Reply(212, [
14090                 rec(8, 4, CurrentServerTime ),
14091                 rec(12, 1, VConsoleVersion ),
14092                 rec(13, 1, VConsoleRevision ),
14093                 rec(14, 2, Reserved2 ),
14094                 rec(16, 196, GenericInfoDef ),
14095         ])                
14096         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14097         # 2222/7B1F, 123/31
14098         pkt = NCP(0x7B1F, "Get Media Manager Objects List", 'stats')
14099         pkt.Request(15, [
14100                 rec(10, 4, StartNumber ),
14101                 rec(14, 1, MediaObjectType ),
14102         ])                
14103         pkt.Reply(28, [
14104                 rec(8, 4, CurrentServerTime ),
14105                 rec(12, 1, VConsoleVersion ),
14106                 rec(13, 1, VConsoleRevision ),
14107                 rec(14, 2, Reserved2 ),
14108                 rec(16, 4, nextStartingNumber ),
14109                 rec(20, 4, ObjectCount, var="x"),
14110                 rec(24, 4, ObjectID, repeat="x"),
14111         ])                
14112         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14113         # 2222/7B20, 123/32
14114         pkt = NCP(0x7B20, "Get Media Manager Object Childrens List", 'stats')
14115         pkt.Request(22, [
14116                 rec(10, 4, StartNumber ),
14117                 rec(14, 1, MediaObjectType ),
14118                 rec(15, 3, Reserved3 ),
14119                 rec(18, 4, ParentObjectNumber ),
14120         ])                
14121         pkt.Reply(28, [
14122                 rec(8, 4, CurrentServerTime ),
14123                 rec(12, 1, VConsoleVersion ),
14124                 rec(13, 1, VConsoleRevision ),
14125                 rec(14, 2, Reserved2 ),
14126                 rec(16, 4, nextStartingNumber ),
14127                 rec(20, 4, ObjectCount, var="x" ),
14128                 rec(24, 4, ObjectID, repeat="x" ),
14129         ])                
14130         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14131         # 2222/7B21, 123/33
14132         pkt = NCP(0x7B21, "Get Volume Segment List", 'stats')
14133         pkt.Request(14, [
14134                 rec(10, 4, VolumeNumberLong ),
14135         ])                
14136         pkt.Reply(32, [
14137                 rec(8, 4, CurrentServerTime ),
14138                 rec(12, 1, VConsoleVersion ),
14139                 rec(13, 1, VConsoleRevision ),
14140                 rec(14, 2, Reserved2 ),
14141                 rec(16, 4, NumOfSegments, var="x" ),
14142                 rec(20, 12, Segments, repeat="x" ),
14143         ])                
14144         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14145         # 2222/7B22, 123/34
14146         pkt = NCP(0x7B22, "Get Volume Information by Level", 'stats')
14147         pkt.Request(15, [
14148                 rec(10, 4, VolumeNumberLong ),
14149                 rec(14, 1, InfoLevelNumber ),
14150         ])                
14151         pkt.Reply(NO_LENGTH_CHECK, [
14152                 rec(8, 4, CurrentServerTime ),
14153                 rec(12, 1, VConsoleVersion ),
14154                 rec(13, 1, VConsoleRevision ),
14155                 rec(14, 2, Reserved2 ),
14156                 rec(16, 1, InfoLevelNumber ),
14157                 rec(17, 3, Reserved3 ),
14158                 srec(VolInfoStructure, req_cond="ncp.info_level_num==0x01"),
14159                 srec(VolInfo2Struct, req_cond="ncp.info_level_num==0x02"),
14160         ])                
14161         pkt.ReqCondSizeVariable()
14162         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14163         # 2222/7B28, 123/40
14164         pkt = NCP(0x7B28, "Active Protocol Stacks", 'stats')
14165         pkt.Request(14, [
14166                 rec(10, 4, StartNumber ),
14167         ])                
14168         pkt.Reply(48, [
14169                 rec(8, 4, CurrentServerTime ),
14170                 rec(12, 1, VConsoleVersion ),
14171                 rec(13, 1, VConsoleRevision ),
14172                 rec(14, 2, Reserved2 ),
14173                 rec(16, 4, MaxNumOfLANS ),
14174                 rec(20, 4, StackCount, var="x" ),
14175                 rec(24, 4, nextStartingNumber ),
14176                 rec(28, 20, StackInfo, repeat="x" ),
14177         ])                
14178         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14179         # 2222/7B29, 123/41
14180         pkt = NCP(0x7B29, "Get Protocol Stack Configuration Information", 'stats')
14181         pkt.Request(14, [
14182                 rec(10, 4, StackNumber ),
14183         ])                
14184         pkt.Reply((37,164), [
14185                 rec(8, 4, CurrentServerTime ),
14186                 rec(12, 1, VConsoleVersion ),
14187                 rec(13, 1, VConsoleRevision ),
14188                 rec(14, 2, Reserved2 ),
14189                 rec(16, 1, ConfigMajorVN ),
14190                 rec(17, 1, ConfigMinorVN ),
14191                 rec(18, 1, StackMajorVN ),
14192                 rec(19, 1, StackMinorVN ),
14193                 rec(20, 16, ShortStkName ),
14194                 rec(36, (1,128), StackFullNameStr ),
14195         ])                
14196         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14197         # 2222/7B2A, 123/42
14198         pkt = NCP(0x7B2A, "Get Protocol Stack Statistics Information", 'stats')
14199         pkt.Request(14, [
14200                 rec(10, 4, StackNumber ),
14201         ])                
14202         pkt.Reply(38, [
14203                 rec(8, 4, CurrentServerTime ),
14204                 rec(12, 1, VConsoleVersion ),
14205                 rec(13, 1, VConsoleRevision ),
14206                 rec(14, 2, Reserved2 ),
14207                 rec(16, 1, StatMajorVersion ),
14208                 rec(17, 1, StatMinorVersion ),
14209                 rec(18, 2, ComCnts ),
14210                 rec(20, 4, CounterMask ),
14211                 rec(24, 4, TotalTxPkts ),
14212                 rec(28, 4, TotalRxPkts ),
14213                 rec(32, 4, IgnoredRxPkts ),
14214                 rec(36, 2, CustomCnts ),
14215         ])                
14216         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14217         # 2222/7B2B, 123/43
14218         pkt = NCP(0x7B2B, "Get Protocol Stack Custom Information", 'stats')
14219         pkt.Request(18, [
14220                 rec(10, 4, StackNumber ),
14221                 rec(14, 4, StartNumber ),
14222         ])                
14223         pkt.Reply(25, [
14224                 rec(8, 4, CurrentServerTime ),
14225                 rec(12, 1, VConsoleVersion ),
14226                 rec(13, 1, VConsoleRevision ),
14227                 rec(14, 2, Reserved2 ),
14228                 rec(16, 4, CustomCount, var="x" ),
14229                 rec(20, 5, CustomCntsInfo, repeat="x" ),
14230         ])                
14231         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14232         # 2222/7B2C, 123/44
14233         pkt = NCP(0x7B2C, "Get Protocol Stack Numbers by Media Number", 'stats')
14234         pkt.Request(14, [
14235                 rec(10, 4, MediaNumber ),
14236         ])                
14237         pkt.Reply(24, [
14238                 rec(8, 4, CurrentServerTime ),
14239                 rec(12, 1, VConsoleVersion ),
14240                 rec(13, 1, VConsoleRevision ),
14241                 rec(14, 2, Reserved2 ),
14242                 rec(16, 4, StackCount, var="x" ),
14243                 rec(20, 4, StackNumber, repeat="x" ),
14244         ])                
14245         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14246         # 2222/7B2D, 123/45
14247         pkt = NCP(0x7B2D, "Get Protocol Stack Numbers by LAN Board Number", 'stats')
14248         pkt.Request(14, [
14249                 rec(10, 4, BoardNumber ),
14250         ])                
14251         pkt.Reply(24, [
14252                 rec(8, 4, CurrentServerTime ),
14253                 rec(12, 1, VConsoleVersion ),
14254                 rec(13, 1, VConsoleRevision ),
14255                 rec(14, 2, Reserved2 ),
14256                 rec(16, 4, StackCount, var="x" ),
14257                 rec(20, 4, StackNumber, repeat="x" ),
14258         ])                
14259         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14260         # 2222/7B2E, 123/46
14261         pkt = NCP(0x7B2E, "Get Media Name by Media Number", 'stats')
14262         pkt.Request(14, [
14263                 rec(10, 4, MediaNumber ),
14264         ])                
14265         pkt.Reply((17,144), [
14266                 rec(8, 4, CurrentServerTime ),
14267                 rec(12, 1, VConsoleVersion ),
14268                 rec(13, 1, VConsoleRevision ),
14269                 rec(14, 2, Reserved2 ),
14270                 rec(16, (1,128), MediaName ),
14271         ])                
14272         pkt.CompletionCodes([0x0000, 0x7900, 0x7e01, 0xfb06, 0xff00])
14273         # 2222/7B2F, 123/47
14274         pkt = NCP(0x7B2F, "Get Loaded Media Number", 'stats')
14275         pkt.Request(10)
14276         pkt.Reply(28, [
14277                 rec(8, 4, CurrentServerTime ),
14278                 rec(12, 1, VConsoleVersion ),
14279                 rec(13, 1, VConsoleRevision ),
14280                 rec(14, 2, Reserved2 ),
14281                 rec(16, 4, MaxNumOfMedias ),
14282                 rec(20, 4, MediaListCount, var="x" ),
14283                 rec(24, 4, MediaList, repeat="x" ),
14284         ])                
14285         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14286         # 2222/7B32, 123/50
14287         pkt = NCP(0x7B32, "Get General Router and SAP Information", 'stats')
14288         pkt.Request(10)
14289         pkt.Reply(37, [
14290                 rec(8, 4, CurrentServerTime ),
14291                 rec(12, 1, VConsoleVersion ),
14292                 rec(13, 1, VConsoleRevision ),
14293                 rec(14, 2, Reserved2 ),
14294                 rec(16, 2, RIPSocketNumber ),
14295                 rec(18, 2, Reserved2 ),
14296                 rec(20, 1, RouterDownFlag ),
14297                 rec(21, 3, Reserved3 ),
14298                 rec(24, 1, TrackOnFlag ),
14299                 rec(25, 3, Reserved3 ),
14300                 rec(28, 1, ExtRouterActiveFlag ),
14301                 rec(29, 3, Reserved3 ),
14302                 rec(32, 2, SAPSocketNumber ),
14303                 rec(34, 2, Reserved2 ),
14304                 rec(36, 1, RpyNearestSrvFlag ),
14305         ])                
14306         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14307         # 2222/7B33, 123/51
14308         pkt = NCP(0x7B33, "Get Network Router Information", 'stats')
14309         pkt.Request(14, [
14310                 rec(10, 4, NetworkNumber ),
14311         ])                
14312         pkt.Reply(26, [
14313                 rec(8, 4, CurrentServerTime ),
14314                 rec(12, 1, VConsoleVersion ),
14315                 rec(13, 1, VConsoleRevision ),
14316                 rec(14, 2, Reserved2 ),
14317                 rec(16, 10, KnownRoutes ),
14318         ])                
14319         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
14320         # 2222/7B34, 123/52
14321         pkt = NCP(0x7B34, "Get Network Routers Information", 'stats')
14322         pkt.Request(18, [
14323                 rec(10, 4, NetworkNumber),
14324                 rec(14, 4, StartNumber ),
14325         ])                
14326         pkt.Reply(34, [
14327                 rec(8, 4, CurrentServerTime ),
14328                 rec(12, 1, VConsoleVersion ),
14329                 rec(13, 1, VConsoleRevision ),
14330                 rec(14, 2, Reserved2 ),
14331                 rec(16, 4, NumOfEntries, var="x" ),
14332                 rec(20, 14, RoutersInfo, repeat="x" ),
14333         ])                
14334         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
14335         # 2222/7B35, 123/53
14336         pkt = NCP(0x7B35, "Get Known Networks Information", 'stats')
14337         pkt.Request(14, [
14338                 rec(10, 4, StartNumber ),
14339         ])                
14340         pkt.Reply(30, [
14341                 rec(8, 4, CurrentServerTime ),
14342                 rec(12, 1, VConsoleVersion ),
14343                 rec(13, 1, VConsoleRevision ),
14344                 rec(14, 2, Reserved2 ),
14345                 rec(16, 4, NumOfEntries, var="x" ),
14346                 rec(20, 10, KnownRoutes, repeat="x" ),
14347         ])                
14348         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14349         # 2222/7B36, 123/54
14350         pkt = NCP(0x7B36, "Get Server Information", 'stats')
14351         pkt.Request((15,64), [
14352                 rec(10, 2, ServerType ),
14353                 rec(12, 2, Reserved2 ),
14354                 rec(14, (1,50), ServerNameLen ),
14355         ], info_str=(ServerNameLen, "Get Server Information: %s", ", %s"))
14356         pkt.Reply(30, [
14357                 rec(8, 4, CurrentServerTime ),
14358                 rec(12, 1, VConsoleVersion ),
14359                 rec(13, 1, VConsoleRevision ),
14360                 rec(14, 2, Reserved2 ),
14361                 rec(16, 12, ServerAddress ),
14362                 rec(28, 2, HopsToNet ),
14363         ])                
14364         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14365         # 2222/7B37, 123/55
14366         pkt = NCP(0x7B37, "Get Server Sources Information", 'stats')
14367         pkt.Request((19,68), [
14368                 rec(10, 4, StartNumber ),
14369                 rec(14, 2, ServerType ),
14370                 rec(16, 2, Reserved2 ),
14371                 rec(18, (1,50), ServerNameLen ),
14372         ], info_str=(ServerNameLen, "Get Server Sources Info: %s", ", %s"))                
14373         pkt.Reply(32, [
14374                 rec(8, 4, CurrentServerTime ),
14375                 rec(12, 1, VConsoleVersion ),
14376                 rec(13, 1, VConsoleRevision ),
14377                 rec(14, 2, Reserved2 ),
14378                 rec(16, 4, NumOfEntries, var="x" ),
14379                 rec(20, 12, ServersSrcInfo, repeat="x" ),
14380         ])                
14381         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
14382         # 2222/7B38, 123/56
14383         pkt = NCP(0x7B38, "Get Known Servers Information", 'stats')
14384         pkt.Request(16, [
14385                 rec(10, 4, StartNumber ),
14386                 rec(14, 2, ServerType ),
14387         ])                
14388         pkt.Reply(35, [
14389                 rec(8, 4, CurrentServerTime ),
14390                 rec(12, 1, VConsoleVersion ),
14391                 rec(13, 1, VConsoleRevision ),
14392                 rec(14, 2, Reserved2 ),
14393                 rec(16, 4, NumOfEntries, var="x" ),
14394                 rec(20, 15, KnownServStruc, repeat="x" ),
14395         ])                
14396         pkt.CompletionCodes([0x0000, 0x0108, 0x7e01, 0xfb06, 0xff00])
14397         # 2222/7B3C, 123/60
14398         pkt = NCP(0x7B3C, "Get Server Set Commands Information", 'stats')
14399         pkt.Request(14, [
14400                 rec(10, 4, StartNumber ),
14401         ])                
14402         pkt.Reply(NO_LENGTH_CHECK, [
14403                 rec(8, 4, CurrentServerTime ),
14404                 rec(12, 1, VConsoleVersion ),
14405                 rec(13, 1, VConsoleRevision ),
14406                 rec(14, 2, Reserved2 ),
14407                 rec(16, 4, TtlNumOfSetCmds ),
14408                 rec(20, 4, nextStartingNumber ),
14409                 rec(24, 1, SetCmdType ),
14410                 rec(25, 3, Reserved3 ),
14411                 rec(28, 1, SetCmdCategory ),
14412                 rec(29, 3, Reserved3 ),
14413                 rec(32, 1, SetCmdFlags ),
14414                 rec(33, 3, Reserved3 ),
14415                 rec(36, 100, SetCmdName ),
14416                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x00"),
14417                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x01"),
14418                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x02"),
14419                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x04"),
14420                 srec(SetCmdValueString, req_cond="ncp.set_cmd_type==0x05"),
14421                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x06"),
14422                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x07"),
14423         ])                
14424         pkt.ReqCondSizeVariable()
14425         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14426         # 2222/7B3D, 123/61
14427         pkt = NCP(0x7B3D, "Get Server Set Categories", 'stats')
14428         pkt.Request(14, [
14429                 rec(10, 4, StartNumber ),
14430         ])                
14431         pkt.Reply(124, [
14432                 rec(8, 4, CurrentServerTime ),
14433                 rec(12, 1, VConsoleVersion ),
14434                 rec(13, 1, VConsoleRevision ),
14435                 rec(14, 2, Reserved2 ),
14436                 rec(16, 4, NumberOfSetCategories ),
14437                 rec(20, 4, nextStartingNumber ),
14438                 rec(24, 100, CategoryName ),
14439         ])                
14440         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14441         # 2222/7B3E, 123/62
14442         pkt = NCP(0x7B3E, "Get Server Set Commands Information By Name", 'stats')
14443         pkt.Request(110, [
14444                 rec(10, 100, SetParmName ),
14445         ], info_str=(SetParmName, "Get Server Set Command Info for: %s", ", %s"))                
14446         pkt.Reply(NO_LENGTH_CHECK, [
14447                 rec(8, 4, CurrentServerTime ),
14448                 rec(12, 1, VConsoleVersion ),
14449                 rec(13, 1, VConsoleRevision ),
14450                 rec(14, 2, Reserved2 ),
14451                 rec(16, 4, TtlNumOfSetCmds ),
14452                 rec(20, 4, nextStartingNumber ),
14453                 rec(24, 1, SetCmdType ),
14454                 rec(25, 3, Reserved3 ),
14455                 rec(28, 1, SetCmdCategory ),
14456                 rec(29, 3, Reserved3 ),
14457                 rec(32, 1, SetCmdFlags ),
14458                 rec(33, 3, Reserved3 ),
14459                 rec(36, 100, SetCmdName ),
14460                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x00"),
14461                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x01"),
14462                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x02"),
14463                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x04"),
14464                 srec(SetCmdValueString, req_cond="ncp.set_cmd_type==0x05"),
14465                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x06"),
14466                 srec(SetCmdValueNum, req_cond="ncp.set_cmd_type==0x07"),
14467         ])                
14468         pkt.ReqCondSizeVariable()
14469         pkt.CompletionCodes([0x0000, 0x7e01, 0xfb06, 0xff00])
14470         # 2222/7B46, 123/70
14471         pkt = NCP(0x7B46, "Get Current Compressing File", 'stats')
14472         pkt.Request(14, [
14473                 rec(10, 4, VolumeNumberLong ),
14474         ])                
14475         pkt.Reply(56, [
14476                 rec(8, 4, ParentID ),
14477                 rec(12, 4, DirectoryEntryNumber ),
14478                 rec(16, 4, compressionStage ),
14479                 rec(20, 4, ttlIntermediateBlks ),
14480                 rec(24, 4, ttlCompBlks ),
14481                 rec(28, 4, curIntermediateBlks ),
14482                 rec(32, 4, curCompBlks ),
14483                 rec(36, 4, curInitialBlks ),
14484                 rec(40, 4, fileFlags ),
14485                 rec(44, 4, projectedCompSize ),
14486                 rec(48, 4, originalSize ),
14487                 rec(52, 4, compressVolume ),
14488         ])                
14489         pkt.CompletionCodes([0x0000, 0x7e00, 0x7901, 0xfb06, 0xff00])
14490         # 2222/7B47, 123/71
14491         pkt = NCP(0x7B47, "Get Current DeCompressing File Info List", 'stats')
14492         pkt.Request(14, [
14493                 rec(10, 4, VolumeNumberLong ),
14494         ])                
14495         pkt.Reply(28, [
14496                 rec(8, 4, FileListCount ),
14497                 rec(12, 16, FileInfoStruct ),
14498         ])                
14499         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
14500         # 2222/7B48, 123/72
14501         pkt = NCP(0x7B48, "Get Compression and Decompression Time and Counts", 'stats')
14502         pkt.Request(14, [
14503                 rec(10, 4, VolumeNumberLong ),
14504         ])                
14505         pkt.Reply(64, [
14506                 rec(8, 56, CompDeCompStat ),
14507         ])
14508         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb06, 0xff00])
14509         # 2222/8301, 131/01
14510         pkt = NCP(0x8301, "RPC Load an NLM", 'fileserver')
14511         pkt.Request(285, [
14512                 rec(10, 4, NLMLoadOptions ),
14513                 rec(14, 16, Reserved16 ),
14514                 rec(30, 255, PathAndName ),
14515         ], info_str=(PathAndName, "RPC Load NLM: %s", ", %s"))                
14516         pkt.Reply(12, [
14517                 rec(8, 4, RPCccode ),
14518         ])                
14519         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14520         # 2222/8302, 131/02
14521         pkt = NCP(0x8302, "RPC Unload an NLM", 'fileserver')
14522         pkt.Request(100, [
14523                 rec(10, 20, Reserved20 ),
14524                 rec(30, 70, NLMName ),
14525         ], info_str=(NLMName, "RPC Unload NLM: %s", ", %s"))                
14526         pkt.Reply(12, [
14527                 rec(8, 4, RPCccode ),
14528         ])                
14529         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14530         # 2222/8303, 131/03
14531         pkt = NCP(0x8303, "RPC Mount Volume", 'fileserver')
14532         pkt.Request(100, [
14533                 rec(10, 20, Reserved20 ),
14534                 rec(30, 70, VolumeNameStringz ),
14535         ], info_str=(VolumeNameStringz, "RPC Mount Volume: %s", ", %s"))                
14536         pkt.Reply(32, [
14537                 rec(8, 4, RPCccode),
14538                 rec(12, 16, Reserved16 ),
14539                 rec(28, 4, VolumeNumberLong ),
14540         ])                
14541         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14542         # 2222/8304, 131/04
14543         pkt = NCP(0x8304, "RPC Dismount Volume", 'fileserver')
14544         pkt.Request(100, [
14545                 rec(10, 20, Reserved20 ),
14546                 rec(30, 70, VolumeNameStringz ),
14547         ], info_str=(VolumeNameStringz, "RPC Dismount Volume: %s", ", %s"))                
14548         pkt.Reply(12, [
14549                 rec(8, 4, RPCccode ), 
14550         ])                
14551         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14552         # 2222/8305, 131/05
14553         pkt = NCP(0x8305, "RPC Add Name Space To Volume", 'fileserver')
14554         pkt.Request(100, [
14555                 rec(10, 20, Reserved20 ),
14556                 rec(30, 70, AddNameSpaceAndVol ),
14557         ], info_str=(AddNameSpaceAndVol, "RPC Add Name Space to Volume: %s", ", %s"))                
14558         pkt.Reply(12, [
14559                 rec(8, 4, RPCccode ),
14560         ])                
14561         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14562         # 2222/8306, 131/06
14563         pkt = NCP(0x8306, "RPC Set Command Value", 'fileserver')
14564         pkt.Request(100, [
14565                 rec(10, 1, SetCmdType ),
14566                 rec(11, 3, Reserved3 ),
14567                 rec(14, 4, SetCmdValueNum ),
14568                 rec(18, 12, Reserved12 ),
14569                 rec(30, 70, SetCmdName ),
14570         ], info_str=(SetCmdName, "RPC Set Command Value: %s", ", %s"))                
14571         pkt.Reply(12, [
14572                 rec(8, 4, RPCccode ),
14573         ])                
14574         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14575         # 2222/8307, 131/07
14576         pkt = NCP(0x8307, "RPC Execute NCF File", 'fileserver')
14577         pkt.Request(285, [
14578                 rec(10, 20, Reserved20 ),
14579                 rec(30, 255, PathAndName ),
14580         ], info_str=(PathAndName, "RPC Execute NCF File: %s", ", %s"))                
14581         pkt.Reply(12, [
14582                 rec(8, 4, RPCccode ),
14583         ])                
14584         pkt.CompletionCodes([0x0000, 0x7e00, 0xfb07, 0xff00])
14585 if __name__ == '__main__':
14586 #       import profile
14587 #       filename = "ncp.pstats"
14588 #       profile.run("main()", filename)
14589 #
14590 #       import pstats
14591 #       sys.stdout = msg
14592 #       p = pstats.Stats(filename)
14593 #
14594 #       print "Stats sorted by cumulative time"
14595 #       p.strip_dirs().sort_stats('cumulative').print_stats()
14596 #
14597 #       print "Function callees"
14598 #       p.print_callees()
14599         main()