FileDocCategorySizeDatePackage
DcerpcBind.javaAPI DocJCIFS 1.3.17 API3329Tue Oct 18 15:26:24 BST 2011jcifs.dcerpc

DcerpcBind

public class DcerpcBind extends DcerpcMessage

Fields Summary
static final String[]
result_message
DcerpcBinding
binding
int
max_xmit
int
max_recv
Constructors Summary
public DcerpcBind()

    
DcerpcBind(DcerpcBinding binding, DcerpcHandle handle)

        this.binding = binding;
        max_xmit = handle.max_xmit;
        max_recv = handle.max_recv;
        ptype = 11;
        flags = DCERPC_FIRST_FRAG | DCERPC_LAST_FRAG;
    
Methods Summary
public voiddecode_out(NdrBuffer buf)

        buf.dec_ndr_short(); /* max transmit frag size */
        buf.dec_ndr_short(); /* max receive frag size */
        buf.dec_ndr_long();  /* assoc. group */
        int n = buf.dec_ndr_short(); /* secondary addr len */
        buf.advance(n); /* secondary addr */
        buf.align(4);
        buf.dec_ndr_small(); /* num results */
        buf.align(4);
        result = buf.dec_ndr_short();
        buf.dec_ndr_short();
        buf.advance(20);     /* transfer syntax / version */
    
public voidencode_in(NdrBuffer buf)

        buf.enc_ndr_short(max_xmit);
        buf.enc_ndr_short(max_recv);
        buf.enc_ndr_long(0); /* assoc. group */
        buf.enc_ndr_small(1); /* num context items */
        buf.enc_ndr_small(0); /* reserved */
        buf.enc_ndr_short(0); /* reserved2 */
        buf.enc_ndr_short(0); /* context id */
        buf.enc_ndr_small(1); /* number of items */
        buf.enc_ndr_small(0); /* reserved */
        binding.uuid.encode(buf);
        buf.enc_ndr_short(binding.major);
        buf.enc_ndr_short(binding.minor);
        DCERPC_UUID_SYNTAX_NDR.encode(buf);
        buf.enc_ndr_long(2); /* syntax version */
    
public intgetOpnum()

        return 0;
    
public DcerpcExceptiongetResult()

        if (result != 0)
            return new DcerpcException(getResultMessage(result));
        return null;
    
static java.lang.StringgetResultMessage(int result)


        
        return result < 4 ?
                result_message[result] :
                "0x" + jcifs.util.Hexdump.toHexString(result, 4);