Exemplo n.º 1
0
 public void xdrDecode(XdrDecodingStream xdr)
 {
     this._mode.Mode = xdr.xdrDecodeInt();
     this._uid = xdr.xdrDecodeInt();
     this._gid = xdr.xdrDecodeInt();
     this._size = xdr.xdrDecodeInt();
     this._atime = new NFSTimeValue(xdr);
     this._mtime = new NFSTimeValue(xdr);
 }
Exemplo n.º 2
0
 public void xdrDecode(XdrDecodingStream xdr)
 {
     this._obj = new NFSHandle();
     this._obj.Version = V3.RPC.NFSv3Protocol.NFS_V3;
     this._obj.xdrDecode(xdr);
     this._new_attributes = new MakeAttributes(xdr);
     this._guardcheck = xdr.xdrDecodeBoolean();
     if (this._guardcheck)
     { this._guardctime = new NFSTimeValue(xdr); }
 }
Exemplo n.º 3
0
 public void xdrDecode(XdrDecodingStream xdr)
 {
     this._obj_attributes = new PostOperationAttributes(xdr);
     this._rtmax = xdr.xdrDecodeInt();
     this._rtpref = xdr.xdrDecodeInt();
     this._rtmult = xdr.xdrDecodeInt();
     this._wtmax = xdr.xdrDecodeInt();
     this._wtpref = xdr.xdrDecodeInt();
     this._wtmult = xdr.xdrDecodeInt();
     this._dtpref = xdr.xdrDecodeInt();
     this._maxfilesize = xdr.xdrDecodeLong();
     this._time_delta = new NFSTimeValue(xdr);
     this._properties = xdr.xdrDecodeInt();
 }
Exemplo n.º 4
0
        public void xdrDecode(XdrDecodingStream xdr)
        {
            this._type = (NFSItemTypes)xdr.xdrDecodeInt();

            this._mode = new NFSPermission();
            this._mode.Mode = xdr.xdrDecodeInt();

            this._nlink = xdr.xdrDecodeInt();
            this._uid = xdr.xdrDecodeInt();
            this._gid = xdr.xdrDecodeInt();
            this._size = xdr.xdrDecodeLong();
            this._used = xdr.xdrDecodeLong();
            
            this._rdev = new SpecInformation();
            this._rdev.xdrDecode(xdr);
            
            this._fsid = xdr.xdrDecodeLong();
            this._fileid = xdr.xdrDecodeLong();
            this._atime = new NFSTimeValue(xdr);
            this._mtime = new NFSTimeValue(xdr);
            this._ctime = new NFSTimeValue(xdr);
        }
Exemplo n.º 5
0
        public void xdrDecode(XdrDecodingStream xdr)
        {
            this._type = (NFSItemTypes)xdr.xdrDecodeInt();
            
            this._mode = new NFSPermission();
            this._mode.Mode = xdr.xdrDecodeInt();
            
            this._nlink = xdr.xdrDecodeInt();
            this._uid = xdr.xdrDecodeInt();
            this._gid = xdr.xdrDecodeInt();
            this._size = xdr.xdrDecodeInt();
            this._blocksize = xdr.xdrDecodeInt();
            this._rdev = xdr.xdrDecodeInt();
            this._blocks = xdr.xdrDecodeInt();

            /* Calculate File Size (>4GB) */
            //int fileSize = (int)this._size;

            //double blockForFile = (double)fileSize / (double)this._blocksize;
            //double blocksOnDisk = blockForFile + 0.49;
            //blocksOnDisk = System.Math.Round(blocksOnDisk);

            ///* I think it's a bug on blocks value, cause some times blocks value
            // * comes 8 value greater than calculated size. 
            // * Following fixes the related bug(?) */
            //if (blocksOnDisk <= ((this._blocks / 8) - 1))
            //{ this._blocks -= 8; }

            //double diff = (blocksOnDisk - blockForFile) * this._blocksize;

            //long bytesInBlock = (long)(this._blocks / 8) * (long)this._blocksize;         
            //bytesInBlock -= (int)diff;

            //this._size = bytesInBlock >= 0? bytesInBlock : _size;
            /* ---- */

            this._fsid = xdr.xdrDecodeInt();
            this._fileid = xdr.xdrDecodeInt();
            this._atime = new NFSTimeValue(xdr);
            this._mtime = new NFSTimeValue(xdr);
            this._ctime = new NFSTimeValue(xdr);
        }
Exemplo n.º 6
0
 public void xdrDecode(XdrDecodingStream xdr)
 {
     this._size = xdr.xdrDecodeLong();
     this._mtime = new NFSTimeValue(xdr);
     this._ctime = new NFSTimeValue(xdr);
 }
Exemplo n.º 7
0
        public void xdrDecode(XdrDecodingStream xdr)
        {
            this._setmode = xdr.xdrDecodeBoolean();
            if (this._setmode)
            { this._mode.Mode = xdr.xdrDecodeInt(); }

            this._setuid = xdr.xdrDecodeBoolean();
            if (this._setuid)
            { this._uid = xdr.xdrDecodeInt(); }

            this._setgid = xdr.xdrDecodeBoolean();
            if (this._setgid)
            { this._gid = xdr.xdrDecodeInt(); }

            this._setsize = xdr.xdrDecodeBoolean();
            if (this._setsize)
            { this._size = xdr.xdrDecodeInt(); }

            this._setatime = (xdr.xdrDecodeBoolean() ? TimeHow.SET_TO_CLIENT_TIME : TimeHow.DONT_CHANGE);
            if (this._setatime != TimeHow.DONT_CHANGE)
            { this._atime = new NFSTimeValue(xdr); }

            this._setmtime = (xdr.xdrDecodeBoolean() ? TimeHow.SET_TO_CLIENT_TIME : TimeHow.DONT_CHANGE);
            if (this._setmtime != TimeHow.DONT_CHANGE)
            { this._mtime = new NFSTimeValue(xdr); }   
        }