Kea 3.1.9
socket_info.h
Go to the documentation of this file.
1// Copyright (C) 2018-2026 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
12#include <cstdint>
13
14namespace isc {
15namespace dhcp {
16
18struct SocketInfo {
19
22
24 uint16_t port_;
25
27 uint16_t family_;
28
31
55
62 SocketInfo(const isc::asiolink::IOAddress& addr, const uint16_t port,
63 const int sockfd, const int fallbackfd = -1)
64 : addr_(addr), port_(port), family_(addr.getFamily()),
65 sockfd_(sockfd), fallbackfd_(fallbackfd) { }
66};
67
68} // namespace dhcp
69} // namespace isc
70
71#endif // DHCP_SOCKET_INFO_H
Defines the logger used by the top-level component of kea-lfc.
int sockfd_
Socket descriptor (a.k.a. primary socket).
Definition socket_info.h:30
int fallbackfd_
Fallback socket descriptor.
Definition socket_info.h:54
isc::asiolink::IOAddress addr_
Bound address.
Definition socket_info.h:21
uint16_t family_
Family IPv4 or IPv6.
Definition socket_info.h:27
SocketInfo(const isc::asiolink::IOAddress &addr, const uint16_t port, const int sockfd, const int fallbackfd=-1)
SocketInfo constructor.
Definition socket_info.h:62
uint16_t port_
Socket port.
Definition socket_info.h:24