java.lang.Object
org.codelibs.jcifs.smb.dcerpc.ndr.NdrObject
org.codelibs.jcifs.smb.dcerpc.DcerpcMessage
- All Implemented Interfaces:
DcerpcConstants
- Direct Known Subclasses:
DcerpcBind,lsarpc.LsarClose,lsarpc.LsarLookupSids,lsarpc.LsarOpenPolicy2,lsarpc.LsarQueryInformationPolicy,lsarpc.LsarQueryInformationPolicy2,netdfs.NetrDfsEnumEx,samr.SamrCloseHandle,samr.SamrConnect2,samr.SamrConnect4,samr.SamrEnumerateAliasesInDomain,samr.SamrGetMembersInAlias,samr.SamrOpenAlias,samr.SamrOpenDomain,srvsvc.RemoteTOD,srvsvc.ServerGetInfo,srvsvc.ShareEnumAll,srvsvc.ShareGetInfo
Abstract base class for DCE/RPC protocol messages.
This class provides common functionality for all DCE/RPC message types.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe allocation hint for buffer sizingprotected intThe call ID for matching requests and responsesprotected intThe flags for this DCERPC messageprotected intThe total length of this DCERPC messageprotected intThe packet type of this DCERPC messageprotected intThe result code of the DCERPC operationFields inherited from interface org.codelibs.jcifs.smb.dcerpc.DcerpcConstants
DCERPC_CONC_MPX, DCERPC_DID_NOT_EXECUTE, DCERPC_FIRST_FRAG, DCERPC_LAST_FRAG, DCERPC_MAYBE, DCERPC_OBJECT_UUID, DCERPC_PENDING_CANCEL, DCERPC_RESERVED_1, DCERPC_UUID_SYNTAX_NDR, RPC_C_PF_BROADCAST, RPC_C_PF_BROADCAST_MAYBE, RPC_C_PF_IDEMPOTENT, RPC_C_PF_MAYBE, RPC_C_PF_NO_AUTO_LISTEN, RPC_C_PF_NO_AUTO_RETRY, RPC_C_PF_NO_FRAGMENT, RPC_C_PF_NOT_IDEMPOTENT, RPC_PT_ACK, RPC_PT_ALTER_CONTEXT, RPC_PT_ALTER_CONTEXT_RESPONSE, RPC_PT_BIND, RPC_PT_BIND_ACK, RPC_PT_BIND_NAK, RPC_PT_CANCEL, RPC_PT_CO_CANCEL, RPC_PT_FAULT, RPC_PT_ORPHANED, RPC_PT_PING, RPC_PT_REJECT, RPC_PT_REQUEST, RPC_PT_RESPONSE, RPC_PT_SHUTDOWN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDecodes this NDR object from the specified bufferabstract voiddecode_out(NdrBuffer buf) Decode the output parameters from this DCERPC message.voidEncodes this NDR object into the specified bufferabstract voidEncode the input parameters for this DCERPC message.intgetFlags()Gets the flags of this DCERPC messageabstract intgetOpnum()Get the operation number for this DCERPC message.intgetPtype()Gets the packet type of this DCERPC messageGet the result of the DCERPC call.booleanisFlagSet(int flag) Check if a specific flag is set.voidsetFlag(int flag) Set flagvoidunsetFlag(int flag) Remove flag
-
Field Details
-
ptype
protected int ptypeThe packet type of this DCERPC message -
flags
protected int flagsThe flags for this DCERPC message -
length
protected int lengthThe total length of this DCERPC message -
call_id
protected int call_idThe call ID for matching requests and responses -
alloc_hint
protected int alloc_hintThe allocation hint for buffer sizing -
result
protected int resultThe result code of the DCERPC operation
-
-
Constructor Details
-
DcerpcMessage
protected DcerpcMessage()Default constructor for DcerpcMessage. Initializes the DCE/RPC message structure.
-
-
Method Details
-
getPtype
public int getPtype()Gets the packet type of this DCERPC message- Returns:
- the packet type
-
getFlags
public int getFlags()Gets the flags of this DCERPC message- Returns:
- the message flags
-
isFlagSet
public boolean isFlagSet(int flag) Check if a specific flag is set.- Parameters:
flag- the flag to check- Returns:
- whether flag is set
-
unsetFlag
public void unsetFlag(int flag) Remove flag- Parameters:
flag- the flag to remove
-
setFlag
public void setFlag(int flag) Set flag- Parameters:
flag- the flag to set
-
getResult
Get the result of the DCERPC call.- Returns:
- result exception, if the call failed
-
encode
Description copied from class:NdrObjectEncodes this NDR object into the specified buffer- Specified by:
encodein classNdrObject- Parameters:
buf- the destination buffer for encoding- Throws:
NdrException- if encoding fails
-
decode
Description copied from class:NdrObjectDecodes this NDR object from the specified buffer- Specified by:
decodein classNdrObject- Parameters:
buf- the source buffer for decoding- Throws:
NdrException- if decoding fails
-
getOpnum
public abstract int getOpnum()Get the operation number for this DCERPC message.- Returns:
- the operation number
-
encode_in
Encode the input parameters for this DCERPC message.- Parameters:
buf- the buffer to encode into- Throws:
NdrException- if encoding fails
-
decode_out
Decode the output parameters from this DCERPC message.- Parameters:
buf- the buffer to decode from- Throws:
NdrException- if decoding fails
-