Kea 2.5.8
socket_info.h
Go to the documentation of this file.
1// Copyright (C) 2018 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
14namespace isc {
15
16namespace dhcp {
17
19struct SocketInfo {
20
22 uint16_t port_;
23 uint16_t family_;
24
27
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 isc::dhcp
66}; // namespace isc
67
68#endif // DHCP_SOCKET_INFO_H
Defines the logger used by the top-level component of kea-lfc.
Holds information about socket.
Definition: socket_info.h:19
int sockfd_
IPv4 or IPv6.
Definition: socket_info.h:26
int fallbackfd_
Fallback socket descriptor.
Definition: socket_info.h:50
isc::asiolink::IOAddress addr_
Definition: socket_info.h:21
uint16_t family_
socket port
Definition: socket_info.h:23
SocketInfo(const isc::asiolink::IOAddress &addr, const uint16_t port, const int sockfd, const int fallbackfd=-1)
SocketInfo constructor.
Definition: socket_info.h:58
uint16_t port_
bound address
Definition: socket_info.h:22