Exemplo n.º 1
0
        internal Nfs3MountResult(XdrDataReader reader)
        {
            FileHandle = new Nfs3FileHandle(reader);
            int numAuthFlavours = reader.ReadInt32();

            AuthFlavours = new List <int>(numAuthFlavours);
            for (int i = 0; i < numAuthFlavours; ++i)
            {
                AuthFlavours.Add(reader.ReadInt32());
            }
        }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
0
        internal Nfs3Export(XdrDataReader reader)
        {
            DirPath = reader.ReadString(Nfs3Mount.MaxPathLength);

            List <string> groups = new List <string>();

            while (reader.ReadBool())
            {
                groups.Add(reader.ReadString(Nfs3Mount.MaxNameLength));
            }

            Groups = groups;
        }
Exemplo n.º 4
0
        protected RpcReply DoSend(MemoryStream ms)
        {
            RpcTcpTransport transport = _client.GetTransport(Identifier, Version);

            byte[] buffer = ms.ToArray();
            buffer = transport.Send(buffer);

            XdrDataReader    reader = new XdrDataReader(new MemoryStream(buffer));
            RpcMessageHeader header = new RpcMessageHeader(reader);

            return(new RpcReply()
            {
                Header = header, BodyReader = reader
            });
        }
Exemplo n.º 5
0
        public Nfs3ReadDirPlusResult(XdrDataReader reader)
        {
            Status = (Nfs3Status)reader.ReadInt32();
            if (reader.ReadBool())
            {
                DirAttributes = new Nfs3FileAttributes(reader);
            }

            if (Status == Nfs3Status.Ok)
            {
                CookieVerifier = reader.ReadBytes(Nfs3.CookieVerifierSize);

                DirEntries = new List <Nfs3DirectoryEntry>();
                while (reader.ReadBool())
                {
                    Nfs3DirectoryEntry dirEntry = new Nfs3DirectoryEntry(reader);
                    DirEntries.Add(dirEntry);
                }

                Eof = reader.ReadBool();
            }
        }
Exemplo n.º 6
0
 public Nfs3FileTime(XdrDataReader reader)
 {
     _seconds  = reader.ReadUInt32();
     _nseconds = reader.ReadUInt32();
 }
Exemplo n.º 7
0
 internal Nfs3FileHandle(XdrDataReader reader)
 {
     Value = reader.ReadBuffer(Nfs3Mount.MaxFileHandleSize);
 }
Exemplo n.º 8
0
 public RpcAuthentication(XdrDataReader reader)
 {
     _flavour = (RpcAuthFlavour)reader.ReadInt32();
     _body    = reader.ReadBuffer(400);
 }