class DHCIDRecordValidator implements DnsRecordValidatorInterface (View source)

DHCID (Dynamic Host Configuration Identifier) record validator

DHCID records are defined in RFC 4701 and used to associate DNS names with DHCP clients. They help to prevent conflicts when multiple DHCP clients attempt to update the same name.

The structure of a DHCID record (in its binary form) consists of:

  • A 2-octet identifier type code (in network byte order)
  • A 1-octet digest type code
  • The digest data (varies in length, typically a 32 octet SHA-256 hash)

When represented in DNS master files, the binary RDATA is encoded using base64.

Methods

__construct(ConfigurationManager $config)

No description

validate(string $content, string $name, mixed $prio, int|string|null $ttl, int $defaultTTL, mixed ...$args)

Validates DHCID record content according to RFC 4701

Details

__construct(ConfigurationManager $config)

No description

Parameters

ConfigurationManager $config

ValidationResult validate(string $content, string $name, mixed $prio, int|string|null $ttl, int $defaultTTL, mixed ...$args)

Validates DHCID record content according to RFC 4701

Parameters

string $content

The content part of the record

string $name

The name part of the record

mixed $prio

The priority value (if applicable)

int|string|null $ttl

The TTL value

int $defaultTTL

The default TTL to use if not specified

mixed ...$args

Additional validator-specific parameters

Return Value

ValidationResult

ValidationResult containing validated data or error messages