Esempio n. 1
0
 internal PortMap2Mapping(XdrDataReader reader)
 {
     Program  = reader.ReadInt32();
     Version  = reader.ReadInt32();
     Protocol = (PortMap2Protocol)reader.ReadUInt32();
     Port     = reader.ReadUInt32();
 }
Esempio n. 2
0
 public RpcCallHeader(XdrDataReader reader)
 {
     RpcVersion  = reader.ReadUInt32();
     Program     = reader.ReadUInt32();
     Version     = reader.ReadUInt32();
     Proc        = reader.ReadInt32();
     Credentials = new RpcAuthentication(reader);
     Verifier    = new RpcAuthentication(reader);
 }
Esempio n. 3
0
        public Nfs3PathConfResult(XdrDataReader reader)
        {
            Status           = (Nfs3Status)reader.ReadInt32();
            ObjectAttributes = new Nfs3FileAttributes(reader);

            if (Status == Nfs3Status.Ok)
            {
                LinkMax         = reader.ReadUInt32();
                NameMax         = reader.ReadUInt32();
                NoTrunc         = reader.ReadBool();
                ChownRestricted = reader.ReadBool();
                CaseInsensitive = reader.ReadBool();
                CasePreserving  = reader.ReadBool();
            }
        }
Esempio n. 4
0
 internal Nfs3FileAttributes(XdrDataReader reader)
 {
     Type         = (Nfs3FileType)reader.ReadInt32();
     Mode         = (UnixFilePermissions)reader.ReadInt32();
     LinkCount    = reader.ReadUInt32();
     Uid          = reader.ReadUInt32();
     Gid          = reader.ReadUInt32();
     Size         = reader.ReadInt64();
     BytesUsed    = reader.ReadInt64();
     RdevMajor    = reader.ReadUInt32();
     RdevMinor    = reader.ReadUInt32();
     FileSystemId = reader.ReadUInt64();
     FileId       = reader.ReadUInt64();
     AccessTime   = new Nfs3FileTime(reader);
     ModifyTime   = new Nfs3FileTime(reader);
     ChangeTime   = new Nfs3FileTime(reader);
 }
Esempio n. 5
0
        public RpcMessageHeader(XdrDataReader reader)
        {
            TransactionId = reader.ReadUInt32();
            RpcMessageType type = (RpcMessageType)reader.ReadInt32();
            if (type != RpcMessageType.Reply)
            {
                throw new NotSupportedException("Parsing RPC call messages");
            }

            ReplyHeader = new RpcReplyHeader(reader);
        }
Esempio n. 6
0
        public RpcMessageHeader(XdrDataReader reader)
        {
            TransactionId = reader.ReadUInt32();
            RpcMessageType type = (RpcMessageType)reader.ReadInt32();

            if (type != RpcMessageType.Reply)
            {
                throw new NotSupportedException("Parsing RPC call messages");
            }

            ReplyHeader = new RpcReplyHeader(reader);
        }
Esempio n. 7
0
        public Nfs3SetAttributes(XdrDataReader reader)
        {
            SetMode = reader.ReadBool();

            if (SetMode)
            {
                Mode = (UnixFilePermissions)reader.ReadInt32();
            }

            SetUid = reader.ReadBool();
            if (SetUid)
            {
                Uid = reader.ReadUInt32();
            }

            SetGid = reader.ReadBool();
            if (SetGid)
            {
                Gid = reader.ReadUInt32();
            }

            SetSize = reader.ReadBool();
            if (SetSize)
            {
                Size = reader.ReadInt64();
            }

            SetAccessTime = (Nfs3SetTimeMethod)reader.ReadInt32();
            if (SetAccessTime == Nfs3SetTimeMethod.ClientTime)
            {
                AccessTime = new Nfs3FileTime(reader);
            }

            SetModifyTime = (Nfs3SetTimeMethod)reader.ReadInt32();
            if (SetModifyTime == Nfs3SetTimeMethod.ClientTime)
            {
                ModifyTime = new Nfs3FileTime(reader);
            }
        }
Esempio n. 8
0
 internal Nfs3FileSystemInfo(XdrDataReader reader)
 {
     ReadMaxBytes            = reader.ReadUInt32();
     ReadPreferredBytes      = reader.ReadUInt32();
     ReadMultipleSize        = reader.ReadUInt32();
     WriteMaxBytes           = reader.ReadUInt32();
     WritePreferredBytes     = reader.ReadUInt32();
     WriteMultipleSize       = reader.ReadUInt32();
     DirectoryPreferredBytes = reader.ReadUInt32();
     MaxFileSize             = reader.ReadInt64();
     TimePrecision           = new Nfs3FileTime(reader);
     FileSystemProperties    = (Nfs3FileSystemProperties)reader.ReadInt32();
 }
Esempio n. 9
0
        internal Nfs3FileSystemStat(XdrDataReader reader)
        {
            TotalSizeBytes             = reader.ReadUInt64();
            FreeSpaceBytes             = reader.ReadUInt64();
            AvailableFreeSpaceBytes    = reader.ReadUInt64();
            FileSlotCount              = reader.ReadUInt64();
            FreeFileSlotCount          = reader.ReadUInt64();
            AvailableFreeFileSlotCount = reader.ReadUInt64();
            uint invarsec = reader.ReadUInt32();

            if (invarsec == UInt32.MaxValue)
            {
                Invariant      = TimeSpan.MaxValue;
                InvariantUntil = DateTime.MaxValue;
            }
            else
            {
                Invariant      = TimeSpan.FromSeconds(invarsec);
                InvariantUntil = DateTime.Now.Add(Invariant);
            }
        }
Esempio n. 10
0
 public Nfs3FileTime(XdrDataReader reader)
 {
     _seconds = reader.ReadUInt32();
     _nseconds = reader.ReadUInt32();
 }
Esempio n. 11
0
 public Nfs3FileTime(XdrDataReader reader)
 {
     _seconds  = reader.ReadUInt32();
     _nseconds = reader.ReadUInt32();
 }
Esempio n. 12
0
 public RpcMismatchInfo(XdrDataReader reader)
 {
     Low  = reader.ReadUInt32();
     High = reader.ReadUInt32();
 }
Esempio n. 13
0
 public PortMap2Port(XdrDataReader reader)
 {
     Port = reader.ReadUInt32();
 }