Пример #1
0
        public static byte[] openAttrs(int user, int group, int other, long sizea)
        {
            XdrBufferEncodingStream xdr = new XdrBufferEncodingStream(1024);

            //starts encoding
            xdr.beginEncoding(null, 0);

            user  = 7 << 6;
            group = 7 << 3;
            other = 7;

            mode4 fmode = new mode4();

            fmode.value = new uint32_t(group + user + other);
            fattr4_mode mode = new fattr4_mode(fmode);

            fattr4_size size = new fattr4_size(new uint64_t(sizea));

            size.xdrEncode(xdr);
            mode.xdrEncode(xdr);

            xdr.endEncoding();
            //end encoding

            byte[] retBytes = new byte[xdr.getXdrLength()];

            Array.Copy(xdr.getXdrData(), 0, retBytes, 0, xdr.getXdrLength());

            return(retBytes);
        }
Пример #2
0
        public static byte[] openAttrs(int user, int group, int other,long sizea)
        {

            XdrBufferEncodingStream xdr = new XdrBufferEncodingStream(1024);


            //starts encoding
            xdr.beginEncoding(null, 0);

            user = 7 << 6;
            group = 7 << 3;
            other = 7;

            mode4 fmode = new mode4();
            fmode.value = new uint32_t(group + user + other);
            fattr4_mode mode = new fattr4_mode(fmode);

            fattr4_size size = new fattr4_size(new uint64_t(sizea));

            size.xdrEncode(xdr);
            mode.xdrEncode(xdr);


            xdr.endEncoding();
            //end encoding

            byte[] retBytes = new byte[xdr.getXdrLength()];



            Array.Copy(xdr.getXdrData(), 0, retBytes, 0, xdr.getXdrLength());

            return retBytes;
        }