/** * @param fbuf * @throws DcerpcException */ private void setupReceivedFragment ( NdrBuffer fbuf ) throws DcerpcException { fbuf.reset(); fbuf.setIndex(8); fbuf.setLength(fbuf.dec_ndr_short()); if ( this.securityProvider != null ) { this.securityProvider.unwrap(fbuf); } }
/** * @param msg * @param out * @return * @throws NdrException * @throws DcerpcException */ private NdrBuffer encodeMessage ( DcerpcMessage msg, byte[] out ) throws NdrException, DcerpcException { NdrBuffer buf = new NdrBuffer(out, 0); msg.flags = DCERPC_FIRST_FRAG | DCERPC_LAST_FRAG; msg.call_id = call_id.incrementAndGet(); msg.encode(buf); if ( this.securityProvider != null ) { buf.setIndex(0); this.securityProvider.wrap(buf); } return buf; }
/** * @param fbuf * @throws DcerpcException */ private void setupReceivedFragment ( NdrBuffer fbuf ) throws DcerpcException { fbuf.reset(); fbuf.setIndex(8); fbuf.setLength(fbuf.dec_ndr_short()); if ( this.securityProvider != null ) { this.securityProvider.unwrap(fbuf); } }
/** * @param msg * @param out * @return * @throws NdrException * @throws DcerpcException */ private NdrBuffer encodeMessage ( DcerpcMessage msg, byte[] out ) throws NdrException, DcerpcException { NdrBuffer buf = new NdrBuffer(out, 0); msg.flags = DCERPC_FIRST_FRAG | DCERPC_LAST_FRAG; msg.call_id = call_id.incrementAndGet(); msg.encode(buf); if ( this.securityProvider != null ) { buf.setIndex(0); this.securityProvider.wrap(buf); } return buf; }