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); }
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); } }
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)); }
public static string Read1Str(Stream si) { BER br = new BER(si); byte cb = br.ReadByte(); return Encoding.GetEncoding(10001).GetString(br.ReadBytes(cb)); }
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)); } } }
public VolStruc(BER br) { Flags = br.ReadByte(); VolName = UtAfp.Read1Str(br.BaseStream); }
public GetSrvrParmsPack(BER br) { ServerTime = br.ReadUInt32(); { int cx = br.ReadByte(); for (int x = 0; x < cx; x++) Volumes.Add(new VolStruc(br)); } }