PcapPlusPlus  24.09
pcpp::LdapResultCode Class Reference

An enum wrapper class for LDAP result codes. More...

#include <LdapLayer.h>

Public Types

enum  Value : uint8_t {
  Success = 0 , OperationsError = 1 , ProtocolError = 2 , TimeLimitExceeded = 3 ,
  SizeLimitExceeded = 4 , CompareFalse = 5 , CompareTrue = 6 , AuthMethodNotSupported = 7 ,
  StrongerAuthRequired = 8 , Referral = 10 , AdminLimitExceeded = 11 , UnavailableCriticalExtension = 12 ,
  ConfidentialityRequired = 13 , SaslBindInProgress = 14 , NoSuchAttribute = 16 , UndefinedAttributeType = 17 ,
  InappropriateMatching = 18 , ConstraintViolation = 19 , AttributeOrValueExists = 20 , InvalidAttributeSyntax = 21 ,
  NoSuchObject = 32 , AliasProblem = 33 , InvalidDNSyntax = 34 , AliasDereferencingProblem = 36 ,
  InappropriateAuthentication = 48 , InvalidCredentials = 49 , InsufficientAccessRights = 50 , Busy = 51 ,
  Unavailable = 52 , UnwillingToPerform = 53 , LoopDetect = 54 , NamingViolation = 64 ,
  ObjectClassViolation = 65 , NotAllowedOnNonLeaf = 66 , NotAllowedOnRDN = 67 , EntryAlreadyExists = 68 ,
  ObjectClassModsProhibited = 69 , AffectsMultipleDSAs = 71 , Other = 80 , Unknown = 255
}
 

Public Member Functions

constexpr LdapResultCode (Value value)
 
std::string toString () const
 

Static Public Member Functions

static LdapResultCode fromUintValue (uint8_t value)
 

Detailed Description

An enum wrapper class for LDAP result codes.

Member Enumeration Documentation

◆ Value

Define enum types and the corresponding int values

Enumerator
Success 

Indicates that the associated operation completed successfully

OperationsError 

Indicates that there was a problem with the client’s use of the LDAP protocol

ProtocolError 

Indicates that there was a problem with the client’s use of the LDAP protocol

TimeLimitExceeded 

Indicates that the associated operation failed because it hadn’t completed by the time a maximum processing time limit had been reached

SizeLimitExceeded 

Indicates that the associated search operation failed because the server has determined that the number of entries that would be returned in response to the search would exceed the upper bound for that operation

CompareFalse 

Indicates that the associated compare request targeted an entry that exists and that contains the targeted attribute, but does not have any value that matches the provided assertion value

CompareTrue 

Indicates that the associated compare request targeted an entry that exists and that contains the targeted attribute with a value that matches the provided assertion value

AuthMethodNotSupported 

Indicates that the associated bind operation failed because the client attempted to authenticate with a mechanism that the server does not support or that it does not allow the client to use

StrongerAuthRequired 

Indicates that the server requires the client to authenticate with a stronger form of authentication

Referral 

Indicates that the request cannot be processed exactly as issued, but that it might succeed if re-issued to a different server, or is updated to target a different location in the DIT

AdminLimitExceeded 

Indicates that some administrative limit within the server was exceeded while processing the request

UnavailableCriticalExtension 

Indicates that the request includes a control with a criticality of true, but that control could not be honored for some reason

ConfidentialityRequired 

Indicates that the server is only willing to process the requested operation if it is received over a secure connection that does not allow an eavesdropper to decipher or alter the contents of the request or response

SaslBindInProgress 

Indicates that the server has completed a portion of the processing for the provided SASL bind request, but that it needs additional information from the client to complete the authentication

NoSuchAttribute 

Indicates that the request targeted an attribute that does not exist in the specified entry

UndefinedAttributeType 

Indicates that the request attempted to provide one or more values for an attribute type that is not defined in the server schema

InappropriateMatching 

Indicates that the search request tried to perform some type of matching that is not supported for the target attribute type

ConstraintViolation 

Indicates that the requested operation would have resulted in an entry that violates some constraint defined within the server

AttributeOrValueExists 

Indicates that the requested operation would have resulted in an attribute in which the same value appeared more than once

InvalidAttributeSyntax 

Indicates that the requested add or modify operation would have resulted in an entry that had at least one attribute value that does not conform to the constraints of the associated attribute syntax

NoSuchObject 

Indicates that the requested operation targeted an entry that does not exist within the DIT

AliasProblem 

Indicates that a problem occurred while attempting to dereference an alias during search processing

InvalidDNSyntax 

Indicates that the request included a malformed entry DN

AliasDereferencingProblem 

Indicates that the server encountered an alias while processing the request and that there was some problem related to that alias

InappropriateAuthentication 

Indicates that the client attempted to bind in an inappropriate manner that is inappropriate for the target account

InvalidCredentials 

Indicates that the client attempted to bind with a set of credentials that cannot be used to authenticate

InsufficientAccessRights 

Indicates that the client requested an operation for which it does not have the necessary access control permissions

Busy 

Indicates that the requested operation cannot be processed because the server is currently too busy

Unavailable 

Indicates that the server is currently not available to process the requested operation

UnwillingToPerform 

Indicates that the server is not willing to process the requested operation for some reason

LoopDetect 

Indicates that the server detected some kind of circular reference in the course of processing an operation

NamingViolation 

Indicates that the requested add or modify DN operation would have resulted in an entry that violates some naming constraint within the server

ObjectClassViolation 

Indicates that the requested operation would have resulted in an entry that has an inappropriate set of object classes, or whose attributes violate the constraints associated with its set of object classes

NotAllowedOnNonLeaf 

Indicates that the requested operation is only supported for leaf entries, but the targeted entry has one or more subordinates

NotAllowedOnRDN 

Indicates that the requested modify operation would have resulted in an entry that does not include all of the attributes used in its RDN

EntryAlreadyExists 

Indicates that the requested operation would have resulted in an entry with the same DN as an entry that already exists in the server

ObjectClassModsProhibited 

Indicates that the requested modify operation would have altered the target entry’s set of object classes in a way that is not supported

AffectsMultipleDSAs 

Indicates that the requested operation would have required manipulating information in multiple servers in a way that is not supported

Other 

Used when a problem occurs for which none of the other result codes is more appropriate

Unknown 

Unknown result code

Constructor & Destructor Documentation

◆ LdapResultCode()

constexpr pcpp::LdapResultCode::LdapResultCode ( Value  value)
inlineconstexpr

Construct LdapResultCode from Value enum

Parameters
[in]valuethe result code enum value

Member Function Documentation

◆ fromUintValue()

static LdapResultCode pcpp::LdapResultCode::fromUintValue ( uint8_t  value)
static

A static method that creates LdapResultCode from an integer value

Parameters
[in]valueThe result code integer value
Returns
The result code that corresponds to the integer value. If the integer value doesn't corresponds to any operation type, LdapResultCode::Unknown is returned

◆ toString()

std::string pcpp::LdapResultCode::toString ( ) const
Returns
A string representation of the result code