Kea  2.3.4-git
Specifies where a given MAC/hardware address was

obtained. More...

Variables

static const uint32_t isc::dhcp::HWAddr::HWADDR_SOURCE_ANY = 0xffffffff
 Not really a type, only used in getMAC() calls. More...
 
static const uint32_t isc::dhcp::HWAddr::HWADDR_SOURCE_CLIENT_ADDR_RELAY_OPTION = 0x00000008
 Get it from RFC6939 option. More...
 
static const uint32_t isc::dhcp::HWAddr::HWADDR_SOURCE_DOCSIS_CMTS = 0x00000040
 A CMTS (acting as DHCP relay agent) that supports DOCSIS standard can insert DOCSIS options that contain client's MAC address. More...
 
static const uint32_t isc::dhcp::HWAddr::HWADDR_SOURCE_DOCSIS_MODEM = 0x00000080
 A cable modem (acting as DHCP client) that supports DOCSIS standard can insert DOCSIS options that contain client's MAC address. More...
 
static const uint32_t isc::dhcp::HWAddr::HWADDR_SOURCE_DUID = 0x00000002
 Extracted from DUID-LL or DUID-LLT (not 100% reliable as the client can send fake DUID). More...
 
static const uint32_t isc::dhcp::HWAddr::HWADDR_SOURCE_IPV6_LINK_LOCAL = 0x00000004
 Extracted from IPv6 link-local address. More...
 
static const uint32_t isc::dhcp::HWAddr::HWADDR_SOURCE_RAW = 0x00000001
 Obtained first hand from raw socket (100% reliable). More...
 
static const uint32_t isc::dhcp::HWAddr::HWADDR_SOURCE_REMOTE_ID = 0x00000010
 A relay can insert remote-id. More...
 
static const uint32_t isc::dhcp::HWAddr::HWADDR_SOURCE_SUBSCRIBER_ID = 0x00000020
 A relay can insert a subscriber-id option. More...
 
static const uint32_t isc::dhcp::HWAddr::HWADDR_SOURCE_UNKNOWN = 0x00000000
 Used when actual origin is not known, e.g. More...
 

Detailed Description

obtained.

The list covers all possible MAC/hw address sources.

Variable Documentation

◆ HWADDR_SOURCE_ANY

const uint32_t isc::dhcp::HWAddr::HWADDR_SOURCE_ANY = 0xffffffff
static

Not really a type, only used in getMAC() calls.

Definition at line 37 of file hwaddr.h.

◆ HWADDR_SOURCE_CLIENT_ADDR_RELAY_OPTION

const uint32_t isc::dhcp::HWAddr::HWADDR_SOURCE_CLIENT_ADDR_RELAY_OPTION = 0x00000008
static

Get it from RFC6939 option.

(A relay agent can insert client link layer address option). Note that a skilled attacker can fake that by sending his request relayed, so the legitimate relay will think it's a second relay.

Definition at line 59 of file hwaddr.h.

Referenced by isc::dhcp::Pkt::getMAC(), and isc::dhcp::Pkt6::getMACFromIPv6RelayOpt().

◆ HWADDR_SOURCE_DOCSIS_CMTS

const uint32_t isc::dhcp::HWAddr::HWADDR_SOURCE_DOCSIS_CMTS = 0x00000040
static

A CMTS (acting as DHCP relay agent) that supports DOCSIS standard can insert DOCSIS options that contain client's MAC address.

This specific option is suboption 1026 in vendor-class option with vendor-id=4491. Client in this context would be a cable modem.

Definition at line 73 of file hwaddr.h.

Referenced by isc::dhcp::Pkt::getMAC(), and isc::dhcp::Pkt6::getMACFromDocsisCMTS().

◆ HWADDR_SOURCE_DOCSIS_MODEM

const uint32_t isc::dhcp::HWAddr::HWADDR_SOURCE_DOCSIS_MODEM = 0x00000080
static

A cable modem (acting as DHCP client) that supports DOCSIS standard can insert DOCSIS options that contain client's MAC address.

This specific option is suboption 36 in vendor-class option with vendor-id=4491.

Definition at line 79 of file hwaddr.h.

Referenced by isc::dhcp::Pkt::getMAC(), and isc::dhcp::Pkt6::getMACFromDocsisModem().

◆ HWADDR_SOURCE_DUID

const uint32_t isc::dhcp::HWAddr::HWADDR_SOURCE_DUID = 0x00000002
static

Extracted from DUID-LL or DUID-LLT (not 100% reliable as the client can send fake DUID).

Definition at line 48 of file hwaddr.h.

Referenced by isc::dhcp::Pkt::getMAC(), and isc::dhcp::Pkt6::getMACFromDUID().

◆ HWADDR_SOURCE_IPV6_LINK_LOCAL

const uint32_t isc::dhcp::HWAddr::HWADDR_SOURCE_IPV6_LINK_LOCAL = 0x00000004
static

Extracted from IPv6 link-local address.

Not 100% reliable, as the client can use different IID other than EUI-64, e.g. Windows supports RFC4941 and uses random values instead of EUI-64.

Definition at line 53 of file hwaddr.h.

Referenced by isc::dhcp::Pkt::getMAC(), and isc::dhcp::Pkt::getMACFromIPv6().

◆ HWADDR_SOURCE_RAW

const uint32_t isc::dhcp::HWAddr::HWADDR_SOURCE_RAW = 0x00000001
static

Obtained first hand from raw socket (100% reliable).

Definition at line 44 of file hwaddr.h.

Referenced by isc::dhcp::Pkt::getMAC().

◆ HWADDR_SOURCE_REMOTE_ID

const uint32_t isc::dhcp::HWAddr::HWADDR_SOURCE_REMOTE_ID = 0x00000010
static

A relay can insert remote-id.

In some deployments it contains a MAC address (RFC4649).

Definition at line 63 of file hwaddr.h.

Referenced by isc::dhcp::Pkt::getMAC(), and isc::dhcp::Pkt6::getMACFromRemoteIdRelayOption().

◆ HWADDR_SOURCE_SUBSCRIBER_ID

const uint32_t isc::dhcp::HWAddr::HWADDR_SOURCE_SUBSCRIBER_ID = 0x00000020
static

A relay can insert a subscriber-id option.

In some deployments it contains a MAC address (RFC4580).

Definition at line 67 of file hwaddr.h.

◆ HWADDR_SOURCE_UNKNOWN

const uint32_t isc::dhcp::HWAddr::HWADDR_SOURCE_UNKNOWN = 0x00000000
static

Used when actual origin is not known, e.g.

when reading from a lease database that didn't store that information.

Definition at line 41 of file hwaddr.h.

Referenced by isc::dhcp::CSVLeaseFile6::next().