示例#1
0
 public GetFileDirParmsPack(BER br) {
     FileBitmap = br.ReadUInt16();
     DirectoryBitmap = br.ReadUInt16();
     FileDir = br.ReadByte();
     br.ReadByte();
     Parms = new FileParameters(br, (0 == (0x80 & FileDir)), (0 != (0x80 & FileDir)) ? DirectoryBitmap : FileBitmap);
 }
示例#2
0
        public EnumeratePack(BER br) {
            FileBitmap = br.ReadUInt16();
            DirectoryBitmap = br.ReadUInt16();
            ActualCount = br.ReadUInt16();

            for (int x = 0; x < ActualCount; x++) {
                byte cb = br.ReadByte();
                byte fd = br.ReadByte();
                BER brInner = new BER(new MemoryStream(br.ReadBytes(cb - 2), false));

                bool isDir = ((fd & 0x80) != 0);

                Ents.Add(new FileParameters(brInner, !isDir, isDir ? DirectoryBitmap : FileBitmap));

                UtPadding.Read2(br.BaseStream);
            }
        }
示例#3
0
 public DSIPack(Stream si) {
     BER br = new BER(si);
     Flags = br.ReadByte();
     Command = br.ReadByte();
     RequestID = br.ReadUInt16();
     ErrorCode = br.ReadInt32();
     TotalDataLength = br.ReadUInt32();
     Reserved = br.ReadUInt32();
     Payload = br.ReadBytes(Convert.ToInt32(TotalDataLength));
 }
示例#4
0
 public static string Read1Str(Stream si) {
     BER br = new BER(si);
     byte cb = br.ReadByte();
     return Encoding.GetEncoding(10001).GetString(br.ReadBytes(cb));
 }
示例#5
0
        public GetSrvrInfoPack(BER br) {
            Stream si = br.BaseStream;

            MachineTypeOff = br.ReadUInt16();
            AFPVersionCountOff = br.ReadUInt16();
            UAMCountOff = br.ReadUInt16();
            VolumeIconAndMaskOff = br.ReadUInt16();
            Flags = br.ReadUInt16();
            ServerName = UtAfp.Read1Str(si);
            ServerSignatureOff = br.ReadUInt16();
            NetworkAddressesCountOff = br.ReadUInt16();
            DirectoryNamesCountOff = br.ReadUInt16();
            UTF8ServerNameOff = br.ReadUInt16();

            {
                si.Position = AFPVersionCountOff;
                int cnt = br.ReadByte();
                for (int x = 0; x < cnt; x++) {
                    AFPVersionsList.Add(UtAfp.Read1Str(si));
                }
            }
            {
                si.Position = UAMCountOff;
                int cnt = br.ReadByte();
                for (int x = 0; x < cnt; x++) {
                    UAMsList.Add(UtAfp.Read1Str(si));
                }
            }
        }
示例#6
0
 public VolStruc(BER br) {
     Flags = br.ReadByte();
     VolName = UtAfp.Read1Str(br.BaseStream);
 }
示例#7
0
 public GetSrvrParmsPack(BER br) {
     ServerTime = br.ReadUInt32();
     {
         int cx = br.ReadByte();
         for (int x = 0; x < cx; x++) Volumes.Add(new VolStruc(br));
     }
 }