Kea 2.7.6
|
Classes | |
class | BufferOverflow |
Buffer overflow. More... | |
class | BufferTooLarge |
Buffer Too Large. More... | |
class | DummyAsioSocket |
The DummyAsioSocket class is a concrete derived class of IOAsioSocket that is not associated with any real socket. More... | |
class | DummyIOCallback |
Asynchronous I/O Completion Callback. More... | |
class | DummySocket |
The DummySocket class is a concrete derived class of IOSocket that is not associated with any real socket. More... | |
class | IntervalTimer |
The IntervalTimer class is a wrapper for the ASIO boost::asio::deadline_timer class. More... | |
class | IntervalTimerImpl |
This class holds a call back function of asynchronous operations. More... | |
class | IOAcceptor |
Base class for acceptor services in Kea. More... | |
class | IOAddress |
The IOAddress class represents an IP addresses (version agnostic) More... | |
class | IOAsioSocket |
I/O Socket with asynchronous operations. More... | |
class | IOEndpoint |
The IOEndpoint class is an abstract base class to represent a communication endpoint. More... | |
class | IOError |
An exception that is thrown if an error occurs within the IO module. More... | |
class | IOService |
The IOService class is a wrapper for the ASIO io_service class. More... | |
class | IOServiceImpl |
class | IOServiceMgr |
Class which handles events on IOService objects. More... | |
class | IoServiceThreadPool |
Implements a pausable pool of IOService driven threads. More... | |
class | IOSignalSet |
Implements an asynchronous "signal" for IOService driven processing. More... | |
class | IOSignalSetImpl |
Implementation class of IOSignalSet. More... | |
class | IOSocket |
The IOSocket class is an abstract base class to represent various types of network sockets. More... | |
class | ProcessSpawn |
Utility class for spawning new processes. More... | |
class | ProcessSpawnError |
Exception thrown when error occurs during spawning a process. More... | |
class | ProcessSpawnImpl |
Implementation of the ProcessSpawn class. More... | |
struct | ProcessState |
Type for process state. More... | |
class | SocketNotOpen |
Socket not open. More... | |
class | SocketSetError |
Error setting socket options. More... | |
class | StreamService |
class | TCPAcceptor |
Provides a service for accepting new TCP connections. More... | |
class | TCPEndpoint |
The TCPEndpoint class is a concrete derived class of IOEndpoint that represents an endpoint of a TCP packet. More... | |
class | TCPSocket |
The TCPSocket class is a concrete derived class of IOAsioSocket that represents a TCP socket. More... | |
class | TLSAcceptor |
Provides a service for accepting new TLS connections. More... | |
class | TlsContextBase |
TLS context base class. More... | |
class | TLSSocket |
The TLSSocket class is a concrete derived class of IOAsioSocket that represents a TLS socket. More... | |
class | TlsStreamBase |
TLS stream base class. More... | |
class | UDPEndpoint |
The UDPEndpoint class is a concrete derived class of IOEndpoint that represents an endpoint of a UDP packet. More... | |
class | UDPSocket |
The UDPSocket class is a concrete derived class of IOAsioSocket that represents a UDP socket. More... | |
class | UnixDomainSocket |
Represents unix domain socket implemented in terms of boost asio. More... | |
class | UnixDomainSocketAcceptor |
Implements acceptor service for UnixDomainSocket. More... | |
class | UnixDomainSocketEndpoint |
Endpoint for UnixDomainSocket. More... | |
class | UnixDomainSocketError |
Exception thrown upon socket error. More... | |
class | UnixDomainSocketImpl |
Implementation of the unix domain socket. More... | |
Typedefs | |
typedef boost::shared_ptr< isc::asiolink::IntervalTimer > | IntervalTimerPtr |
typedef boost::shared_ptr< IOService > | IOServicePtr |
Defines a smart pointer to an IOService instance. | |
typedef boost::shared_ptr< IoServiceThreadPool > | IoServiceThreadPoolPtr |
Defines a pointer to a thread pool. | |
typedef std::function< void(int signum)> | IOSignalHandler |
Defines a handler function for an IOSignal. | |
typedef boost::shared_ptr< IOSignalSet > | IOSignalSetPtr |
Defines a pointer to an IOSignalSet. | |
typedef std::vector< std::string > | ProcessArgs |
Type of the container holding arguments of the executable being run as a background process. | |
typedef std::map< const ProcessSpawnImpl *, ProcessStates > | ProcessCollection |
ProcessCollection container which stores all ProcessStates for each instance of ProcessSpawnImpl. | |
typedef std::vector< std::string > | ProcessEnvVars |
Type of the container holding environment variables of the executable being run as a background process. | |
typedef boost::shared_ptr< ProcessSpawnImpl > | ProcessSpawnImplPtr |
Pointer to a ProcessSpawnImpl class. | |
typedef boost::shared_ptr< ProcessState > | ProcessStatePtr |
Defines a pointer to a ProcessState. | |
typedef std::map< pid_t, ProcessStatePtr > | ProcessStates |
ProcessStates container which stores a ProcessState for each process identified by PID. | |
typedef boost::shared_ptr< TlsContext > | TlsContextPtr |
The type of shared pointers to TlsContext objects. | |
Enumerations | |
enum | TlsRole { CLIENT , SERVER } |
Client and server roles. More... | |
Functions | |
uint128_t | addrsInRange (const IOAddress &min, const IOAddress &max) |
Returns number of available addresses in the specified range (min - max). | |
IOAddress | firstAddrInPrefix (const IOAddress &prefix, uint8_t len) |
This code is based on similar code from the Dibbler project. | |
IOAddress | getNetmask4 (uint8_t len) |
Generates an IPv4 netmask of specified length. | |
size_t | hash_value (const IOAddress &address) |
Hash the IOAddress. | |
IOAddress | lastAddrInPrefix (const IOAddress &prefix, uint8_t len) |
returns a last address in a given prefix | |
IOAddress | offsetAddress (const IOAddress &addr, isc::util::uint128_t offset) |
Finds the address increased by offset. | |
std::ostream & | operator<< (std::ostream &os, const IOAddress &address) |
Insert the IOAddress as a string into stream. | |
ostream & | operator<< (std::ostream &os, const IOEndpoint &endpoint) |
Insert the IOEndpoint as a string into stream. | |
uint128_t | prefixesInRange (const uint8_t pool_len, const uint8_t delegated_len) |
Returns number of available IPv6 prefixes in the specified prefix. | |
int | prefixLengthFromRange (const IOAddress &min, const IOAddress &max) |
Returns prefix length from the specified range (min - max). | |
typedef boost::shared_ptr<isc::asiolink::IntervalTimer> isc::asiolink::IntervalTimerPtr |
Definition at line 138 of file interval_timer.h.
typedef boost::shared_ptr<IOService> isc::asiolink::IOServicePtr |
Defines a smart pointer to an IOService instance.
Definition at line 33 of file io_service.h.
typedef boost::shared_ptr<IoServiceThreadPool> isc::asiolink::IoServiceThreadPoolPtr |
Defines a pointer to a thread pool.
Definition at line 260 of file io_service_thread_pool.h.
typedef std::function<void(int signum)> isc::asiolink::IOSignalHandler |
Defines a handler function for an IOSignal.
Definition at line 18 of file io_service_signal.h.
typedef boost::shared_ptr<IOSignalSet> isc::asiolink::IOSignalSetPtr |
Defines a pointer to an IOSignalSet.
Definition at line 55 of file io_service_signal.h.
typedef std::vector<std::string> isc::asiolink::ProcessArgs |
Type of the container holding arguments of the executable being run as a background process.
Definition at line 37 of file process_spawn.h.
typedef std::map<const ProcessSpawnImpl*, ProcessStates> isc::asiolink::ProcessCollection |
ProcessCollection container which stores all ProcessStates for each instance of ProcessSpawnImpl.
Definition at line 60 of file process_spawn.cc.
typedef std::vector<std::string> isc::asiolink::ProcessEnvVars |
Type of the container holding environment variables of the executable being run as a background process.
Definition at line 41 of file process_spawn.h.
typedef boost::shared_ptr<ProcessSpawnImpl> isc::asiolink::ProcessSpawnImplPtr |
Pointer to a ProcessSpawnImpl class.
Definition at line 33 of file process_spawn.h.
typedef boost::shared_ptr<ProcessState> isc::asiolink::ProcessStatePtr |
Defines a pointer to a ProcessState.
Definition at line 50 of file process_spawn.cc.
typedef std::map<pid_t, ProcessStatePtr> isc::asiolink::ProcessStates |
ProcessStates container which stores a ProcessState for each process identified by PID.
Definition at line 54 of file process_spawn.cc.
typedef boost::shared_ptr<TlsContext> isc::asiolink::TlsContextPtr |
The type of shared pointers to TlsContext objects.
Definition at line 37 of file common_tls.h.
isc::util::uint128_t isc::asiolink::addrsInRange | ( | const IOAddress & | min, |
const IOAddress & | max ) |
Returns number of available addresses in the specified range (min - max).
Note that for min equal max case, the number of addresses is one.
BadValue | if min and max are not of the same family (both must be either IPv4 or IPv6) or if max < min. |
min | the first address in range |
max | the last address in range |
Definition at line 203 of file addr_utilities.cc.
References isc::asiolink::IOAddress::getFamily(), isc::asiolink::IOAddress::increase(), isc_throw, isc::asiolink::IOAddress::isV4(), isc::asiolink::IOAddress::subtract(), isc::asiolink::IOAddress::toBytes(), isc::asiolink::IOAddress::toText(), and isc::asiolink::IOAddress::toUint32().
Referenced by isc::dhcp::Pool4::Pool4(), isc::dhcp::Pool4::Pool4(), and isc::dhcp::Pool6::Pool6().
This code is based on similar code from the Dibbler project.
I, Tomasz Mrugalski, as a sole creator of that code hereby release it under BSD license for the benefit of the Kea project.
returns a first address in a given prefix
Example: For 2001:db8:1::deaf:beef and length /120 the function will return 2001:db8:1::dead:be00. See also lastAddrInPrefix.
prefix | and address that belongs to a prefix |
len | prefix length |
Definition at line 172 of file addr_utilities.cc.
References isc::asiolink::IOAddress::isV4().
Referenced by isc::dhcp::Pool4::Pool4(), isc::yang::TranslatorPool::getAddresses(), isc::dhcp::Subnet::inRange(), isc::lease_cmds::Lease6Parser::parse(), isc::dhcp::CfgSubnets4::selectSubnet4o6(), and isc::yang::TranslatorPool::setPoolIetf6().
IOAddress isc::asiolink::getNetmask4 | ( | uint8_t | len | ) |
Generates an IPv4 netmask of specified length.
BadValue | if len is greater than 32 |
Definition at line 192 of file addr_utilities.cc.
References isc_throw.
size_t isc::asiolink::hash_value | ( | const IOAddress & | address | ) |
Hash the IOAddress.
This method allows boost multi-index hashed indexes on IOAddresses. It follows the requirement with equality: if two addresses are equal their hashes are equal, if two addresses are not equal their hashes are almost surely not equal.
address | A IOAddress to hash. |
Definition at line 182 of file io_address.cc.
References isc::asiolink::IOAddress::isV4(), isc::asiolink::IOAddress::toBytes(), and isc::asiolink::IOAddress::toUint32().
Referenced by isc::asiolink::IOAddress::Hash::operator()().
returns a last address in a given prefix
Example: For 2001:db8:1::deaf:beef and length /112 the function will return 2001:db8:1::dead:ffff. See also firstAddrInPrefix.
prefix | and address that belongs to a prefix |
len | prefix length |
Definition at line 182 of file addr_utilities.cc.
References isc::asiolink::IOAddress::isV4().
Referenced by isc::dhcp::Pool4::Pool4(), isc::dhcp::PrefixRange::PrefixRange(), isc::yang::TranslatorPool::getAddresses(), isc::dhcp::Subnet::inRange(), isc::dhcp::CfgSubnets4::selectSubnet4o6(), and isc::yang::TranslatorPool::setPoolIetf6().
IOAddress isc::asiolink::offsetAddress | ( | const IOAddress & | addr, |
isc::util::uint128_t | offset ) |
Finds the address increased by offset.
Adds offset to the IPv4 or iPv6 address and finds the resulting address. Note that the current limitation is the maximum value of the offset, i.e. max uint64_t. If the sum of the IPv4 address and the offset exceeds the maximum value of uint32_t type, the 255.255.255.255 is returned.
addr | input address |
offset | distance of the returned address from the input address. |
Definition at line 368 of file addr_utilities.cc.
References isc::asiolink::IOAddress::fromBytes(), isc::asiolink::IOAddress::isV4(), isc::asiolink::IOAddress::toBytes(), and isc::asiolink::IOAddress::toUint32().
Referenced by isc::dhcp::IPRangePermutation::next().
std::ostream & isc::asiolink::operator<< | ( | std::ostream & | os, |
const IOAddress & | address ) |
Insert the IOAddress as a string into stream.
This method converts the address
into a string and inserts it into the output stream os
.
This function overloads the global operator<< to behave as described in ostream::operator<< but applied to IOAddress
objects.
os | A std::ostream object on which the insertion operation is performed. |
address | The IOAddress object output by the operation. |
std::ostream
object referenced by parameter os
after the insertion operation. Definition at line 126 of file io_address.cc.
References isc::asiolink::IOAddress::toText().
std::ostream & isc::asiolink::operator<< | ( | std::ostream & | os, |
const IOEndpoint & | endpoint ) |
Insert the IOEndpoint
as a string into stream.
This method converts endpoint
into a string and inserts it into the output stream os
.
This method converts the address and port of the endpoint in the textual format that other Kea modules would use in logging, i.e.,
If it's neither IPv6 nor IPv4, it converts the endpoint into text in the same format as that for IPv4, although in practice such a case is not really expected.
os | A std::ostream object on which the insertion operation is performed. |
endpoint | A reference to an IOEndpoint object output by the operation. |
std::ostream
object referenced by parameter os
after the insertion operation. Definition at line 54 of file io_endpoint.cc.
References isc::asiolink::IOEndpoint::getAddress(), isc::asiolink::IOEndpoint::getFamily(), and isc::asiolink::IOEndpoint::getPort().
isc::util::uint128_t isc::asiolink::prefixesInRange | ( | const uint8_t | pool_len, |
const uint8_t | delegated_len ) |
Returns number of available IPv6 prefixes in the specified prefix.
Note that if the answer is bigger than uint64_t can hold, it will return the max value of uint64_t type.
Example: prefixesInRange(48, 64) returns 65536, as there are /48 pool can be split into 65536 prefixes, each /64 large.
pool_len | length of the pool in bits |
delegated_len | length of the prefixes to be delegated from the pool |
Definition at line 352 of file addr_utilities.cc.
Returns prefix length from the specified range (min - max).
This can be considered as log2(addrsInRange)
BadValue | if min and max do not define a prefix. |
min | the first address in range |
max | the last address in range |
Definition at line 273 of file addr_utilities.cc.
References isc::asiolink::IOAddress::getFamily(), isc_throw, isc::asiolink::IOAddress::isV4(), isc::asiolink::IOAddress::toBytes(), isc::asiolink::IOAddress::toText(), and isc::asiolink::IOAddress::toUint32().
Referenced by isc::dhcp::Pool4::toElement(), and isc::dhcp::Pool6::toElement().