Kea  2.1.7-git
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. More...
 
bool containsAddress (const asiolink::IOAddress &addr) const
 Checks the address list for the given address. More...
 
const IOAddressListgetAddresses () const
 Returns const reference to the list of addresses. More...
 
bool hasAddresses () const
 Indicates whether or not the address list has entries. More...
 

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 133 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 isc_throw, and isc::asiolink::IOAddress::toText().

+ 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.

◆ 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 50 of file network.cc.

◆ 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.


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