java.lang.Object
org.codelibs.jcifs.smb1.dcerpc.ndr.NdrObject
org.codelibs.jcifs.smb1.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 DCERPC messages.
This class provides common functionality for all DCE/RPC message types in SMB1 protocol.
-
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.smb1.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 -
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.abstract intgetOpnum()Get the operation number for this DCERPC message.Get the result of the DCERPC call.booleanisFlagSet(int flag) Checks if a specific flag is setvoidsetFlag(int flag) Sets a specific flagvoidunsetFlag(int flag) Unsets a specific 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 for SMB1 protocol.
-
-
Method Details
-
isFlagSet
public boolean isFlagSet(int flag) Checks if a specific flag is set- Parameters:
flag- the flag to check- Returns:
- true if the flag is set, false otherwise
-
unsetFlag
public void unsetFlag(int flag) Unsets a specific flag- Parameters:
flag- the flag to unset
-
setFlag
public void setFlag(int flag) Sets a specific flag- Parameters:
flag- the flag to set
-
getResult
Get the result of the DCERPC call.- Returns:
- result exception if the call failed, null otherwise
-
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
-