Ejemplo n.º 1
0
 public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, IOException {
   application = xdr.xdrDecodeString();
   client_library = xdr.xdrDecodeString();
   key = new bamboo_key(xdr);
   value_hash = new bamboo_value_hash(xdr);
   ttl_sec = xdr.xdrDecodeInt();
 }
 public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, IOException {
   type = xdr.xdrDecodeString();
   name = xdr.xdrDecodeString();
   units = xdr.xdrDecodeString();
   slope = xdr.xdrDecodeInt();
   tmax = xdr.xdrDecodeInt();
   dmax = xdr.xdrDecodeInt();
   {
     int $size = xdr.xdrDecodeInt();
     metadata = new Ganglia_extra_data[$size];
     for (int $idx = 0; $idx < $size; ++$idx) {
       metadata[$idx] = new Ganglia_extra_data(xdr);
     }
   }
 }
Ejemplo n.º 3
0
 public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, IOException {
   ffl_stripe_unit = new length4(xdr);
   {
     int $size = xdr.xdrDecodeInt();
     ffl_mirrors = new ff_mirror4[$size];
     for (int $idx = 0; $idx < $size; ++$idx) {
       ffl_mirrors[$idx] = new ff_mirror4(xdr);
     }
   }
   ffl_flags4 = new uint32_t(xdr);
   ffl_stats_collect_hint = new uint32_t(xdr);
 }
Ejemplo n.º 4
0
 public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, IOException {
   gdir_status = xdr.xdrDecodeInt();
   switch (gdir_status) {
     case nfsstat.NFS_OK:
       gdir_resok4 = new GETDEVICEINFO4resok(xdr);
       break;
     case nfsstat.NFSERR_TOOSMALL:
       gdir_mincount = new count4(xdr);
       break;
     default:
       break;
   }
 }
Ejemplo n.º 5
0
 public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, IOException {
   spa_how = xdr.xdrDecodeInt();
   switch (spa_how) {
     case state_protect_how4.SP4_NONE:
       break;
     case state_protect_how4.SP4_MACH_CRED:
       spa_mach_ops = new state_protect_ops4(xdr);
       break;
     case state_protect_how4.SP4_SSV:
       spa_ssv_parms = new ssv_sp_parms4(xdr);
       break;
   }
 }
Ejemplo n.º 6
0
 /**
  * Decodes -- that is: deserializes -- an object from a XDR stream in compliance to RFC 1832.
  *
  * @throws OncRpcException if an ONC/RPC error occurs.
  * @throws IOException if an I/O error occurs.
  */
 public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, IOException {
   //
   // Make sure that when deserializing this object's state that
   // the stream provides state information indeed intended for this
   // particular class.
   //
   int xdrTypeCode = xdr.xdrDecodeInt();
   if (xdrTypeCode != getXdrTypeCode()) {
     throw (new InvalidClassException(
         this.getClass().getName(), "non-matching XDR type code received."));
   }
   //
   // For historial reasons (read: "for dumb and pure idiotic reasons")
   // and compatibility with the ACPLT/KS C++ Communication Library we
   // encode/decode the variant part *first* before encoding/decoding
   // the common part.
   //
   xdrDecodeVariant(xdr);
   xdrDecodeCommon(xdr);
 }
Ejemplo n.º 7
0
 /**
  * Decodes -- that is: deserializes -- an ONC/RPC authentication object (credential &amp;
  * verifier) on the server side.
  *
  * @param xdr An XDR decoding stream
  * @throws OncRpcException if an ONC/RPC error occurs.
  * @throws IOException if an I/O error occurs.
  */
 public final void xdrDecodeCredVerf(XdrDecodingStream xdr) throws OncRpcException, IOException {
   //
   // Reset some part of the object's state...
   //
   shorthandVerf = null;
   //
   // Now pull off the object state of the XDR stream...
   //
   int realLen = xdr.xdrDecodeInt();
   stamp = xdr.xdrDecodeInt();
   machinename = xdr.xdrDecodeString();
   uid = xdr.xdrDecodeInt();
   gid = xdr.xdrDecodeInt();
   gids = xdr.xdrDecodeIntVector();
   //
   // Make sure that the indicated length of the opaque data is kosher.
   // If not, throw an exception, as there is something strange going on!
   //
   int len =
       4 // length of stamp
           + ((machinename.length() + 7) & ~3) // len string incl. len
           + 4 // length of uid
           + 4 // length of gid
           + (gids.length * 4)
           + 4 // length of vector of gids incl. len
       ;
   if (realLen != len) {
     if (realLen < len) {
       throw (new OncRpcException(OncRpcException.RPC_BUFFERUNDERFLOW));
     } else {
       throw (new OncRpcException(OncRpcException.RPC_AUTHERROR));
     }
   }
   //
   // We also need to decode the verifier. This must be of type
   // AUTH_NONE too. For some obscure historical reasons, we have to
   // deal with credentials and verifiers, although they belong together,
   // according to Sun's specification.
   //
   if ((xdr.xdrDecodeInt() != OncRpcAuthType.ONCRPC_AUTH_NONE) || (xdr.xdrDecodeInt() != 0)) {
     throw (new OncRpcAuthenticationException(OncRpcAuthStatus.ONCRPC_AUTH_BADVERF));
   }
 }
Ejemplo n.º 8
0
 public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, IOException {
   metric_id = new Ganglia_metric_id(xdr);
   fmt = xdr.xdrDecodeString();
   us = xdr.xdrDecodeShort();
 }
Ejemplo n.º 9
0
 public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, IOException {
   value = xdr.xdrDecodeOpaque(mount_prot.FHSIZE2);
 }
Ejemplo n.º 10
0
 /**
  * Decodes -- that is: deserializes -- a XDR char from a XDR stream in compliance to RFC 1832.
  *
  * @throws OncRpcException if an ONC/RPC error occurs.
  * @throws IOException if an I/O error occurs.
  */
 public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, IOException {
   value = (char) xdr.xdrDecodeByte();
 }
Ejemplo n.º 11
0
 public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, IOException {
   status = xdr.xdrDecodeInt();
 }
Ejemplo n.º 12
0
 public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, IOException {
   data = xdr.xdrDecodeDynamicOpaque();
 }