PcapPlusPlus  24.09
pcpp::LdapSearchRequestLayer Class Reference

#include <LdapLayer.h>

Inheritance diagram for pcpp::LdapSearchRequestLayer:
pcpp::LdapLayer pcpp::Layer pcpp::IDataContainer

Classes

class  DerefAliases
 
class  SearchRequestScope
 

Public Member Functions

 LdapSearchRequestLayer (uint16_t messageId, const std::string &baseObject, SearchRequestScope scope, DerefAliases derefAliases, uint8_t sizeLimit, uint8_t timeLimit, bool typesOnly, Asn1Record *filterRecord, const std::vector< std::string > &attributes, const std::vector< LdapControl > &controls=std::vector< LdapControl >())
 
std::string getBaseObject () const
 
SearchRequestScope getScope () const
 
DerefAliases getDerefAlias () const
 
uint8_t getSizeLimit () const
 
uint8_t getTimeLimit () const
 
bool getTypesOnly () const
 
Asn1RecordgetFilter () const
 
std::vector< std::string > getAttributes () const
 
- Public Member Functions inherited from pcpp::LdapLayer
 LdapLayer (uint16_t messageId, LdapOperationType operationType, const std::vector< Asn1Record * > &messageRecords, const std::vector< LdapControl > &controls=std::vector< LdapControl >())
 
Asn1SequenceRecordgetRootAsn1Record () const
 
Asn1ConstructedRecordgetLdapOperationAsn1Record () const
 
uint16_t getMessageID () const
 
std::vector< LdapControlgetControls () const
 
virtual LdapOperationType getLdapOperationType () const
 
template<typename Method , typename ResultType >
bool tryGet (Method method, ResultType &result)
 
void parseNextLayer () override
 
size_t getHeaderLen () const override
 
void computeCalculateFields () override
 
OsiModelLayer getOsiModelLayer () const override
 
std::string toString () const override
 
- Public Member Functions inherited from pcpp::Layer
virtual ~Layer ()
 
LayergetNextLayer () const
 
LayergetPrevLayer () const
 
ProtocolType getProtocol () const
 
bool isMemberOfProtocolFamily (ProtocolTypeFamily protocolTypeFamily) const
 
uint8_t * getData () const
 
size_t getDataLen () const
 
uint8_t * getLayerPayload () const
 
size_t getLayerPayloadSize () const
 
bool isAllocatedToPacket () const
 
void copyData (uint8_t *toArr) const
 
uint8_t * getDataPtr (size_t offset=0) const
 

Additional Inherited Members

- Static Public Member Functions inherited from pcpp::LdapLayer
static bool isLdapPort (uint16_t port)
 
static LdapLayerparseLdapMessage (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
 

Detailed Description

Represents LDAP search request operation

Constructor & Destructor Documentation

◆ LdapSearchRequestLayer()

pcpp::LdapSearchRequestLayer::LdapSearchRequestLayer ( uint16_t  messageId,
const std::string &  baseObject,
SearchRequestScope  scope,
DerefAliases  derefAliases,
uint8_t  sizeLimit,
uint8_t  timeLimit,
bool  typesOnly,
Asn1Record filterRecord,
const std::vector< std::string > &  attributes,
const std::vector< LdapControl > &  controls = std::vector< LdapControl >() 
)

A constructor to create a new LDAP search request message

Parameters
[in]messageIdThe LDAP message ID
[in]baseObjectThe base object for the LDAP search request entry
[in]scopeThe portion of the target subtree that should be considered
[in]derefAliasesThe alias dereferencing behavior, which indicates how the server should treat any aliases encountered while processing the search
[in]sizeLimitThe maximum number of entries that should be returned from the search
[in]timeLimitThe time limit for the search in seconds
[in]typesOnlyIf this is given a value of true, then it indicates that entries that match the search criteria should be returned containing only the attribute descriptions for the attributes contained in that entry but should not include the values for those attributes. If this is given a value of false, then it indicates that the attribute values should be included in the entries that are returned
[in]filterRecordThe filter for the search. Please note that parsing for the search filter doesn't exist yet. Therefore, the expected input value should be a plain ASN.1 record
[in]attributesA set of attributes to request for inclusion in entries that match the search criteria and are returned to the client
[in]controlsA vector of LDAP controls. This is an optional parameter, if not provided the message will be created without LDAP controls

Member Function Documentation

◆ getAttributes()

std::vector<std::string> pcpp::LdapSearchRequestLayer::getAttributes ( ) const
Returns
A list of search request attributes

◆ getBaseObject()

std::string pcpp::LdapSearchRequestLayer::getBaseObject ( ) const
Returns
The base object for the LDAP search request entry

◆ getDerefAlias()

DerefAliases pcpp::LdapSearchRequestLayer::getDerefAlias ( ) const
Returns
The alias dereferencing behavior

◆ getFilter()

Asn1Record* pcpp::LdapSearchRequestLayer::getFilter ( ) const
Returns
The filter for the search. Please note that parsing for the search filter doesn't exist yet. Therefore, the return value is a plain ASN.1 record

◆ getScope()

SearchRequestScope pcpp::LdapSearchRequestLayer::getScope ( ) const
Returns
The portion of the target subtree that should be considered

◆ getSizeLimit()

uint8_t pcpp::LdapSearchRequestLayer::getSizeLimit ( ) const
Returns
The maximum number of entries that should be returned from the search

◆ getTimeLimit()

uint8_t pcpp::LdapSearchRequestLayer::getTimeLimit ( ) const
Returns
The time limit for the search in seconds

◆ getTypesOnly()

bool pcpp::LdapSearchRequestLayer::getTypesOnly ( ) const
Returns
If this flag is true, then it indicates that entries that match the search criteria should be returned containing only the attribute descriptions for the attributes contained in that entry but should not include the values for those attributes. If this flag is false, then it indicates that the attribute values should be included in the entries that are returned