| Kea 3.0.2-git

socket_info.h
Go to the documentation of this file.
1// Copyright (C) 2018-2024 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef DHCP_SOCKET_INFO_H
8#define DHCP_SOCKET_INFO_H
9
10#include <asiolink/io_address.h>
11#include <cstdint>
12
13
14 namespace isc {
15
16 namespace dhcp {
17
19 struct SocketInfo {
20
21 isc::asiolink::IOAddress addr_;
22 uint16_t port_;
23 uint16_t family_;
24
26 int sockfd_;
27
50 int fallbackfd_;
51
58 SocketInfo(const isc::asiolink::IOAddress& addr, const uint16_t port,
59 const int sockfd, const int fallbackfd = -1)
60 : addr_(addr), port_(port), family_(addr.getFamily()),
61 sockfd_(sockfd), fallbackfd_(fallbackfd) { }
62
63};
64
65} // namespace dhcp
66} // namespace isc
67
68#endif // DHCP_SOCKET_INFO_H
isc::asiolink::IOAddress
The IOAddress class represents an IP addresses (version agnostic).
Definition io_address.h:45
io_address.h
isc::dhcp
Definition dhcp4/client_handler.cc:20
isc
Defines the logger used by the top-level component of kea-lfc.
Definition agent_parser.cc:148
isc::dhcp::SocketInfo::sockfd_
int sockfd_
IPv4 or IPv6.
Definition socket_info.h:26
isc::dhcp::SocketInfo::fallbackfd_
int fallbackfd_
Fallback socket descriptor.
Definition socket_info.h:50
isc::dhcp::SocketInfo::addr_
isc::asiolink::IOAddress addr_
Definition socket_info.h:21
isc::dhcp::SocketInfo::family_
uint16_t family_
socket port
Definition socket_info.h:23
isc::dhcp::SocketInfo::SocketInfo
SocketInfo(const isc::asiolink::IOAddress &addr, const uint16_t port, const int sockfd, const int fallbackfd=-1)
SocketInfo constructor.
Definition socket_info.h:58
isc::dhcp::SocketInfo::port_
uint16_t port_
bound address
Definition socket_info.h:22