Kea 2.7.6
isc::dhcp::Network::RelayInfo Class Reference

Holds optional information about relay. More...

#include <network.h>

Public Member Functions

void addAddress (const asiolink::IOAddress &addr)
 Adds an address to the list of addresses.
 
bool containsAddress (const asiolink::IOAddress &addr) const
 Checks the address list for the given address.
 
const IOAddressListgetAddresses () const
 Returns const reference to the list of addresses.
 
bool hasAddresses () const
 Indicates whether or not the address list has entries.
 

Detailed Description

Holds optional information about relay.

In some cases it is beneficial to have additional information about a relay configured in the subnet. For now, the structure holds only IP addresses, but there may potentially be additional parameters added later, e.g. relay interface-id or relay-id.

Definition at line 162 of file network.h.

Member Function Documentation

◆ addAddress()

void isc::dhcp::Network::RelayInfo::addAddress ( const asiolink::IOAddress & addr)

Adds an address to the list of addresses.

Parameters
addraddress to add
Exceptions
BadValueif the address is already in the list

Definition at line 23 of file network.cc.

References containsAddress(), isc_throw, and isc::asiolink::IOAddress::toText().

Referenced by isc::dhcp::Network::addRelayAddress().

+ Here is the call graph for this function:

◆ containsAddress()

bool isc::dhcp::Network::RelayInfo::containsAddress ( const asiolink::IOAddress & addr) const

Checks the address list for the given address.

Returns
True if the address is found in the address list

Definition at line 38 of file network.cc.

Referenced by addAddress(), and isc::dhcp::Network::hasRelayAddress().

◆ getAddresses()

const IOAddressList & isc::dhcp::Network::RelayInfo::getAddresses ( ) const

Returns const reference to the list of addresses.

Returns
const reference to the list of addresses

Definition at line 44 of file network.cc.

Referenced by isc::dhcp::Network::getRelayAddresses().

◆ hasAddresses()

bool isc::dhcp::Network::RelayInfo::hasAddresses ( ) const

Indicates whether or not the address list has entries.

Returns
True if the address list is not empty

Definition at line 33 of file network.cc.

Referenced by isc::dhcp::Network::hasRelays().


The documentation for this class was generated from the following files: