public void encode(NetworkDataRepresentation ndr, NdrBuffer dst) {
   int padding = dst.align(4, (byte) 0);
   dst.enc_ndr_small(authenticationService);
   dst.enc_ndr_small(protectionLevel);
   dst.enc_ndr_small(padding);
   dst.enc_ndr_small(0); // Reserved
   dst.enc_ndr_long(contextId);
   System.arraycopy(body, 0, dst.getBuffer(), dst.getIndex(), body.length);
   // dst.index += body.length;
   dst.advance(body.length);
 }
 public void decode(NetworkDataRepresentation ndr, NdrBuffer src) {
   src.align(4);
   authenticationService = src.dec_ndr_small();
   protectionLevel = src.dec_ndr_small();
   src.dec_ndr_small(); // padding count
   contextId = src.dec_ndr_long();
   System.arraycopy(src.getBuffer(), src.getIndex(), body, 0, body.length);
   src.index += body.length;
 }
Example #3
0
 public void advance(int n) {
   index += n;
   if ((index - start) > deferred.length) {
     deferred.length = index - start;
   }
 }
Example #4
0
 public NdrBuffer derive(int idx) {
   NdrBuffer nb = new NdrBuffer(buf, start);
   nb.index = idx;
   nb.deferred = deferred;
   return nb;
 }